Preview

"+playVideoString+"

map.proxi.co

map.proxi.co is based in , according to alexa, map.proxi.co doesn't have a global rank
Open This Website

Hosted In:

Safety:

Domain Extension:

.co

IP address:

40.82.255.130

Meta Data Analysis

Description
Your page doesn't have meta description
h1 tags

Email Sent
${this.headerMessage}
Email Sent
${this.title}
${this.headingName}
Route Directions
${(_d=this.popUp)===null||_d===void 0?void 0:_d.pop_up_header}
${this.heading}
${this.header}
',active:tags.includes('h1'),action:'Header 1'},{icon:'filter_2',command:'formatBlock',command_value:tags.includes('h2')?'p':'',active:tags.includes('h2'),action:'Header 2'},{icon:'format_bold',command:'bold',active:tags.includes('b'),action:'Bold Text'},{icon:'format_italic',command:'italic',active:tags.includes('i'),action:'Italic Text'},tags.includes('a')?{icon:'link_off',command:'unlink',action:'Remove Link'}:{icon:'add_link',action:'Add Link',command:()=>{// if selection is null and command is link or embed, put cursor at the end of the text and select it if(selection===null||(selection===null||selection===void 0?void 0:selection.type)==='None'){const range=document.createRange();range.setStart(this.root,0);range.setEnd(this.root,0);selection=document.getSelection();selection===null||selection===void 0?void 0:selection.removeAllRanges();selection===null||selection===void 0?void 0:selection.addRange(range);}const newLink=prompt('Write the URL here','http://');if(newLink&&newLink!==''&&newLink!=='http://'){command('createlink',newLink);}}},{icon:'subtitles',action:'Embed Link as Card',command:()=>{// if selection is null and command is link or embed, put cursor at the end of the text and select it if(selection===null||(selection===null||selection===void 0?void 0:selection.type)==='None'){const range=document.createRange();range.setStart(this.root,0);range.setEnd(this.root,0);selection=document.getSelection();selection===null||selection===void 0?void 0:selection.removeAllRanges();selection===null||selection===void 0?void 0:selection.addRange(range);}let newEmbedLink=prompt('Write the URL you would like to embed here','http://');if(newEmbedLink&&newEmbedLink!==''&&newEmbedLink!=='http://'){// add proxi_embed = true to the URL if(newEmbedLink.includes('?')){// If the URL already has a query string, append the parameter with & newEmbedLink+='&proxi_embed=true';}else{// If the URL doesn't have a query string, append the parameter with ? newEmbedLink+='?proxi_embed=true';}command('createlink',newEmbedLink);}},show:this.allowEmbed},{icon:'undo',command:'undo',action:'Undo'},{icon:'redo',command:'redo',action:'Redo'}];return $` ${commands.filter(c=>c.show!==false).map(n=>{const elem=document.createElement('mwc-icon-button');elem.setAttribute('icon',n.icon);elem.className=n.active===true?'active':'inactive';elem.addEventListener('click',()=>{if(typeof n.command==='string'){command(n.command,n.command_value);}else{n.command();}});elem.addEventListener('mouseover',()=>{this.currentHover=n.action;});elem.addEventListener('mouseout',()=>{this.currentHover=null;});return $` ${n.values?$` {const val=e.target.value;if(typeof n.command==='string'){command(n.command,val);}}} > ${n.values.map(v=>$` ${v.name}`)} `:$` ${elem}`} `;})} `;}};__decorate$2k([i$4('#errorToast')],RichTextEditor.prototype,"errorToastElement",void 0);__decorate$2k([e$5({type:Boolean})],RichTextEditor.prototype,"isSafari",void 0);__decorate$2k([e$5({type:Boolean})],RichTextEditor.prototype,"allowEmbed",void 0);__decorate$2k([e$5({type:Boolean})],RichTextEditor.prototype,"showSave",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"content",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"isURLElementOpen",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"newLink",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"save",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"currentHover",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"showWarning",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"root",void 0);RichTextEditor=__decorate$2k([n$9('rich-text-editor')],RichTextEditor);var __decorate$2l=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2l=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};var BulkRegComponent_1;let BulkRegComponent=BulkRegComponent_1=class BulkRegComponent extends s$5{constructor(){super(...arguments);this.templateName='';this.templateCategories=[];this.pointsToAdd=[];this.emails=[];this.emailToTopicIdMap=new Map();this.topicIndex=new Map();this.topicKeyIndex=new Map();this.topicCategoryIndex=new Map();}render(){return $` Welcome to your ${this.templateName} Map! To get started, we need a few things. Submit `;}static get styles(){return r$3` #mainContainer { display: flex; flex-direction: column; justify-content: center; max-width: 800px; } .input { width: 100%; } #mapInputContainer { display: flex; flex-direction: row; width: 100%; } .inputContainer { margin-top: 20px; display: flex; flex-direction: column; align-items: flex-start; } .inputTextField { margin-left: 32px; margin-top: 5px; width: 100%; } .pointEntry { display: inline-flex; width: 100%; } #formButton { --mdc-theme-primary: var(--main-primary-color); --mdc-theme-on-primary: var(--theme-white-color); margin-top: 32px; min-width: 60%; } .centeredFlexItem { align-self: center; } #mapTemplateName { font-style: italic; font-size: larger; } @media only screen and (max-width: 768px) { /* For mobile phones: */ #mapInputContainer { display: flex; flex-direction: column; width: 100%; } } `;}updateAdminEmails(){var _a;if((_a=this.emailElement)===null||_a===void 0?void 0:_a.reportValidity()){this.emails=this.emailElement.value.toLowerCase().split(',').map(s=>s.trim());}}save(){return __awaiter$2l(this,void 0,void 0,function*(){const nameValid=this.mapTitleElement.reportValidity();const emails=this.emailElement.value.toLowerCase().split(',').map(s=>s.trim());const emailValid=emails.every(email=>validateEmail(email));const hasCategories=this.templateCategories.length!==0;const valid=nameValid&&emailValid&&hasCategories;if(!valid){this.errorToastElement.showToastAndThrow('Please fix your invalid inputs (marked red).');}if(!emailValid){this.errorToastElement.showToastAndThrow('Invalid email format.');}const name=this.mapTitleElement.value.trim();// It is OK for these to be undefined, since the server sets a default. if(!this.topicCenterElement.defaultCenterIsValid){this.errorToastElement.showToastAndThrow('The center of map location is invalid (marked red).');}const default_map_center=this.topicCenterElement.defaultCenterValue;const default_map_zoom=parseIntOrUndefined(this.topicCenterElement.defaultZoomValue);const createTopicCalls=emails.map(email=>__awaiter$2l(this,void 0,void 0,function*(){yield this.createTopic(name,email,default_map_center,default_map_zoom);}));yield Promise.all(createTopicCalls);this.errorToastElement.showToast(`Successfully created ${this.emails.length} topics`);yield this.submitPoints();});}createTopic(name,email,default_map_center,default_map_zoom){return __awaiter$2l(this,void 0,void 0,function*(){const tag_info={user_tags:[]};const createTopicRequest={name,email,organization_id:undefined,use_organization_template:false,creator:undefined,categories:this.templateCategories,has_dates:false,should_filter_past_events:false,has_likes:false,discovery_level:DiscoveryLevel.Private,disable_google_images:false,hide_header:false,show_advanced_filter_row:false,custom_font:undefined,requires_approval:false,send_crowdsource_email:true,image_display:undefined,default_map_center,default_map_zoom,default_map_rotation:0,default_map_tilt:0,header_logo:undefined,header_url:undefined,header_color:undefined,header_text_color:undefined,cluster_accent_color:undefined,translation_languages:undefined,search_pill_settings:undefined,share_settings:undefined,featured_color:undefined,custom_map_geojson:undefined,custom_map_geojson_style:undefined,custom_map_style:undefined,custom_map_style_name:undefined,custom_shapes:undefined,custom_overlays:undefined,custom_social_media_image:undefined,marker_cluster_minimum:undefined,marker_cluster_threshold:undefined,icon_size:undefined,show_easy_date_filters:undefined,tag_info,pop_ups:undefined,comment_settings:undefined,add_point_customization:undefined,creation_source:TopicCreationSource.INTERNAL_CREATE,point_email_capture_customization:undefined};let createTopicResponse;yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2l(this,void 0,void 0,function*(){createTopicResponse=yield addTopic(BulkRegComponent_1.amplitude_callsite,createTopicRequest,{template_name:this.templateName});}),'An error has occurred. Context: the server rejected the request due to validation issues.');// eslint-disable-next-line @typescript-eslint/no-non-null-assertion const topicKey=createTopicResponse.write_key;// eslint-disable-next-line @typescript-eslint/no-non-null-assertion const topicId=createTopicResponse._id.$oid;// Fetch the topic so we have access to the categories yield this.fetchTopic(topicId,topicKey);});}fetchTopic(topicId,topicKey){return __awaiter$2l(this,void 0,void 0,function*(){let topic;yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2l(this,void 0,void 0,function*(){topic=yield getTopic(BulkRegComponent_1.amplitude_callsite,topicId,topicKey,false);}),'An error has occurred. Context: could not get the topic from the server.');if(topic===undefined){this.errorToastElement.showToastAndThrow('An error has occurred. Context: could not get the topic from the server.');}if(topic.email===undefined){this.errorToastElement.showToastAndThrow('An error has occurred. Context: Bulk reg requires emails to be provided at this time.');}this.emailToTopicIdMap.set(topic.email,topicId);this.topicIndex.set(topicId,topic);this.topicKeyIndex.set(topicId,topicKey);this.topicCategoryIndex.set(topicId,new Map());topic.categories.forEach(cat=>{var _a,_b,_c;(_a=this.topicCategoryIndex.get(topicId))===null||_a===void 0?void 0:_a.set(cat.name,(_c=(_b=cat._id)===null||_b===void 0?void 0:_b.$oid)!==null&&_c!==void 0?_c:'');});});}submitPoints(){return __awaiter$2l(this,void 0,void 0,function*(){const pointRequests=this.regAddPointElement.pointsToAdd;// Now use the indexes to create points for each topic. Though the points will have the same visual data, // they will be assigned to different category IDs (which in turn are different for each topic, hence the need for the indexes) const pointAddCalls=pointRequests.map(regPointRequest=>__awaiter$2l(this,void 0,void 0,function*(){var _a;const point=regPointRequest;if(point.email===undefined){this.errorToastElement.showToastAndThrow('An error has occurred. Context: Bulk reg requires emails to be provided at this time.');}// eslint-disable-next-line @typescript-eslint/no-non-null-assertion const topicId=this.emailToTopicIdMap.get(point.email);// eslint-disable-next-line @typescript-eslint/no-non-null-assertion const addPointKey=this.topicKeyIndex.get(topicId);// We assume that category names are unique. This should be fine since they are created by a Proxi employee. const categoryId=(_a=this.topicCategoryIndex.get(topicId))===null||_a===void 0?void 0:_a.get(regPointRequest.catName);point.topic_category_id={$oid:categoryId!==null&&categoryId!==void 0?categoryId:''};point.topic_id={$oid:topicId};return yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2l(this,void 0,void 0,function*(){yield addPoint(BulkRegComponent_1.amplitude_callsite,topicId,point,addPointKey);}),'An error has occurred. Context: the server rejected the request due to validation issues.');}));yield Promise.all(pointAddCalls);this.errorToastElement.showToast(`Successfully added ${pointRequests.length} points across ${this.emails.length} topics.`);});}};BulkRegComponent.amplitude_callsite='Bulk Reg Component';__decorate$2l([i$4('#errorToast')],BulkRegComponent.prototype,"errorToastElement",void 0);__decorate$2l([i$4('#addPoint')],BulkRegComponent.prototype,"regAddPointElement",void 0);__decorate$2l([i$4('#mapTitle')],BulkRegComponent.prototype,"mapTitleElement",void 0);__decorate$2l([i$4('#emails')],BulkRegComponent.prototype,"emailElement",void 0);__decorate$2l([i$4('#topicCenterInput')],BulkRegComponent.prototype,"topicCenterElement",void 0);__decorate$2l([e$5()],BulkRegComponent.prototype,"templateName",void 0);__decorate$2l([e$5({type:Array})],BulkRegComponent.prototype,"templateCategories",void 0);__decorate$2l([t$3()],BulkRegComponent.prototype,"pointsToAdd",void 0);__decorate$2l([t$3()],BulkRegComponent.prototype,"emails",void 0);BulkRegComponent=BulkRegComponent_1=__decorate$2l([n$6('bulk-reg-component')],BulkRegComponent);var __decorate$2m=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let RegAddPointComponent=class RegAddPointComponent extends s$5{constructor(){super(...arguments);this.categories=[];this.emails=[];this.pointsToAdd=[];this.pointsCountMap=new Map();this.curPointId=0;this.renderPoint=entry=>{const pointId=entry[0];const point=entry[1].point;const pointCount=entry[1].count;return $` ${point.name} | Email Count: ${pointCount} this.removePoint(pointId)}" > Category: ${point.catName} Location: ${point.location.search} `;};}render(){return $` ${[...this.pointsCountMap.entries()].map(this.renderPoint)} ADD POINTS HERE. The topic for each email will receive the same set of points. Add Details Add Point `;}static get styles(){return r$3` .input { width: 100%; padding: auto 5px; } .button { width: 100px; margin: 0px; margin-left: 10px; color: var(--theme-white-color); } .save { --mdc-theme-primary: var(--main-success-color); } .button.addPoint { --mdc-theme-primary: var(--main-primary-color); } .container { display: flex; flex-direction: column; max-width: 800px; } .pointTracker { display: flex; flex-direction: row; width: 100%; } `;}locationChanged(evt){var _a;this.nameElement.value=(_a=evt.detail.name)!==null&&_a!==void 0?_a:'';}addPoint(){var _a,_b,_c;// Using a bunch of variables to avoid short circuiting (we want to call `validate()` on all of the elements). const locationValid=this.pointInputElement.locationIsValid;const topicCategoryValid=this.pointInputElement.topicCategoryIsValid;const nameValid=this.nameElement.reportValidity();const urlValid=this.urlElement.reportValidity();const descriptionValid=this.descriptionElement.reportValidity();const valid=locationValid&&topicCategoryValid&&nameValid&&urlValid&&descriptionValid;if(!valid){this.errorToastElement.showToastAndThrow('Please fix your invalid inputs (marked red).');}// Geocode Location Result only set after successful geocoding, so we can set this as the default case and fallback to the locationElement. const location=this.pointInputElement.locationValue;// NOTE: This is a bit tricky: we want this to be undefined if it is undefined or '', so that it will not // even get serialized to the database. const name=undefinedIfEmpty((_a=this.nameElement.value)===null||_a===void 0?void 0:_a.trim());const url=undefinedIfEmpty((_b=this.urlElement.value)===null||_b===void 0?void 0:_b.trim());const description=(_c=this.descriptionElement.value)===null||_c===void 0?void 0:_c.trim();const catName=this.pointInputElement.topicCategoryValue;const points=[];const tag_info={user_tags:[]};this.emails.forEach(email=>{points.push({_id:undefined,bulkCounter:this.curPointId,email,// eslint-disable-next-line @typescript-eslint/consistent-type-assertions topic_id:{},// eslint-disable-next-line @typescript-eslint/consistent-type-assertions topic_category_id:{},catName,location,name,description,special_offer:undefined,start:undefined,end:undefined,source:undefined,embedded_video:undefined,custom_icon_url:undefined,// These should only be set by topic admins from the command center, so no need to set them here. // It is an error for a non-admin to set these. active:undefined,featured:undefined,tag_info,is_gate_hidden:undefined,custom_information:undefined,url_images:undefined,url,number:undefined,custom_shape:undefined});});this.curPointId++;this.pointsToAdd=this.pointsToAdd.concat(points);this.pointsCountMap=this.computePointCountMap();}removePoint(id){this.pointsToAdd=this.pointsToAdd.filter(p=>p.bulkCounter!==id);this.pointsCountMap=this.computePointCountMap();}computePointCountMap(){const result=new Map();this.pointsToAdd.forEach(point=>{var _a,_b;const id=point.bulkCounter;const numPointsForName=(_b=(_a=result.get(id))===null||_a===void 0?void 0:_a.count)!==null&&_b!==void 0?_b:0;// eslint-disable-next-line @typescript-eslint/consistent-type-assertions result.set(id,{point,count:numPointsForName+1});});return result;}};__decorate$2m([i$4('#errorToast')],RegAddPointComponent.prototype,"errorToastElement",void 0);__decorate$2m([i$4('#name')],RegAddPointComponent.prototype,"nameElement",void 0);__decorate$2m([i$4('#url')],RegAddPointComponent.prototype,"urlElement",void 0);__decorate$2m([i$4('#description')],RegAddPointComponent.prototype,"descriptionElement",void 0);__decorate$2m([i$4('#pointInput')],RegAddPointComponent.prototype,"pointInputElement",void 0);__decorate$2m([e$5({type:Array})],RegAddPointComponent.prototype,"categories",void 0);__decorate$2m([e$5({type:Array})],RegAddPointComponent.prototype,"emails",void 0);__decorate$2m([t$3()],RegAddPointComponent.prototype,"pointsToAdd",void 0);__decorate$2m([t$3()],RegAddPointComponent.prototype,"pointsCountMap",void 0);RegAddPointComponent=__decorate$2m([n$6('reg-add-point-component')],RegAddPointComponent);var __decorate$2n=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2m=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let SettingDrawer=class SettingDrawer extends s$5{constructor(){super(...arguments);this.openInitially=false;this.title='';this.adminPortalMobile=false;this.commandCenter=false;this.noHeader=false;this.additionalHeightReduction='0px';this.isOpened=false;this.isExpanded=false;// we have to use this because heights on mobile are all different based on the browser type this.windowHeight=window.innerHeight;this.highZIndex=false;}firstUpdated(changedProperties){return __awaiter$2m(this,void 0,void 0,function*(){if(this.openInitially){yield this.open();}if(this.noHeader){this.isExpanded=true;}});}close(){var _a;return __awaiter$2m(this,void 0,void 0,function*(){if(!this.isOpened){return;}if(!detectMobileViewport()){(_a=this.modalDialogComponent)===null||_a===void 0?void 0:_a.close();}this.style.setProperty('--slotted-content-height',`0px`);this.style.setProperty('--drawer-transform','translateY(100%)');this.requestUpdate();yield delay(300);this.isOpened=false;this.dispatchEvent(new CustomEvent('on-close'));});}// these heights are set dynamically because the needed height of the content is different on different pages. E.g. admin portal mobile is tiny. open(){return __awaiter$2m(this,void 0,void 0,function*(){if(this.isOpened){return;}this.style.setProperty('--slotted-content-height',`0px`);this.style.setProperty('--drawer-transform',this.isOpened?'translateY(0)':'translateY(100%)');this.requestUpdate();yield delay(100);this.isOpened=true;if(this.adminPortalMobile){this.additionalHeightReduction='250px';}else{// assume it is command center this.additionalHeightReduction=heights.mapHeader;}// if the --bottom-height is 0, set the z-index on setting-drawer__wrapper to 20 this.highZIndex=true;this.isExpanded?this.style.setProperty('--slotted-content-height',`calc(${this.windowHeight*.9}px - ${heights.nav} - var(--bottom-height) - ${this.additionalHeightReduction})`):this.style.setProperty('--slotted-content-height',`calc(${this.windowHeight*.6}px - ${heights.nav} - var(--bottom-height) - ${this.additionalHeightReduction})`);this.style.setProperty('--drawer-transform',this.isOpened?'translateY(0)':'translateY(100%)');if(!detectMobileViewport()){this.modalDialogComponent.open=true;}});}toggleExpand(){this.isExpanded=!this.isExpanded;this.style.setProperty('--slotted-content-height',this.isExpanded?`calc(${this.windowHeight}px - ${heights.nav} - var(--bottom-height) - ${this.additionalHeightReduction})`:`calc(65vh - ${heights.nav} - var(--bottom-height) - ${this.additionalHeightReduction})`);this.requestUpdate();}render(){const isMobilePreview=topicData.mapComponent?topicData.mapComponent.mobilePreview:false;if(!detectMobileViewport(isMobilePreview)){return $` __awaiter$2m(this,void 0,void 0,function*(){return yield this.close();})}"> `;}return $` ${this.noHeader?'':$` ${this.isExpanded?'keyboard_arrow_down':'keyboard_arrow_up'} ${this.title} __awaiter$2m(this,void 0,void 0,function*(){return yield this.close();})}">close `} ${this.noHeader?$`__awaiter$2m(this,void 0,void 0,function*(){return yield this.close();})}">close`:''} `;}static get styles(){return r$3` :host { --bottom-height: ${o$3(heights.mobileSettingsControls)}; --bottom-height-half: ${o$3(heights.mobileSettingsControlsHalf)}; --drawer-bg-color: white; --slotted-content-height: 50vh; /* default height */ transition: height 0.3s ease-in-out; } @media (max-width: 768px) { ::slotted(*) { height: var(--slotted-content-height); display: flex; flex-direction: column; transition: height 0.3s ease-in-out; } } .setting-drawer__wrapper { height: 100%; width: 100%; z-index: 4; pointer-events: none; position: absolute; top: 0; left: 0; } .highzindex { z-index: 20; } .no-header-close { position: absolute; top: 20px; right: 12px; z-index: 10; background-color: white; } .setting-drawer { width: 100%; background: var(--drawer-bg-color); border-top-right-radius: 8px; border-top-left-radius: 8px; z-index: 5; pointer-events: all; position: absolute; bottom: var(--bottom-height); left: 0; overflow: auto; box-shadow: rgba(0, 0, 40, 0.08) 0px -1px 2px 0px, rgba(0, 0, 40, 0.08) 0px -6px 10px 0px; border-top: 1px solid rgb(236, 236, 236); border-bottom: 1px solid rgb(236, 236, 236); } .setting-drawer__overlay { height: 100%; width: 100%; background: rgba(0, 0, 0, .4); z-index: 4; position: absolute; top: 0; left: 0; } .setting-drawer__controls { display: flex; justify-content: space-between; padding-left: 16px; padding-right: 16px; padding-top: 8px; border-bottom: 1px solid var(--theme-border-color); } h2 { margin:0.4rem; font-size: 1rem; } .setting-drawer__content { padding: 8px 16px; overflow-y: auto; display: flex; justify-content: center; overflow-x: hidden; } `;}};__decorate$2n([i$4('#modalDialog')],SettingDrawer.prototype,"modalDialogComponent",void 0);__decorate$2n([e$5({type:Boolean})],SettingDrawer.prototype,"openInitially",void 0);__decorate$2n([e$5({type:String})],SettingDrawer.prototype,"title",void 0);__decorate$2n([e$5({type:Boolean})],SettingDrawer.prototype,"adminPortalMobile",void 0);__decorate$2n([e$5({type:Boolean})],SettingDrawer.prototype,"commandCenter",void 0);__decorate$2n([e$5({type:Boolean})],SettingDrawer.prototype,"noHeader",void 0);__decorate$2n([t$3()],SettingDrawer.prototype,"additionalHeightReduction",void 0);__decorate$2n([t$3()],SettingDrawer.prototype,"isOpened",void 0);__decorate$2n([t$3()],SettingDrawer.prototype,"isExpanded",void 0);__decorate$2n([t$3()],SettingDrawer.prototype,"windowHeight",void 0);__decorate$2n([t$3()],SettingDrawer.prototype,"highZIndex",void 0);SettingDrawer=__decorate$2n([n$6('setting-drawer')],SettingDrawer);var __decorate$2o=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var SettingControlsType;(function(SettingControlsType){SettingControlsType["DEFAULT"]="default";SettingControlsType["MAP_STYLES"]="map-styles";SettingControlsType["MAP_SETTINGS"]="map-settings";SettingControlsType["ADD_POINT"]="add-point";})(SettingControlsType||(SettingControlsType={}));let SettingControlButtons=class SettingControlButtons extends s$5{constructor(){super(...arguments);this.buttonType=SettingControlsType.DEFAULT;this.buttonsToRender=[];this.bindAccountState=new StateController(this,accountInfo);this.buttonTypeToButtonsMap=new Map([[SettingControlsType.DEFAULT,topicData.hasExceptions===IntegrationException.WelcomeHomeRelocations?[]:[{icon:'brush',label:'Map Style',newButtonSet:SettingControlsType.MAP_STYLES},{icon:'category',label:'Categories & Tags'},{icon:'settings',label:'Advanced'},{icon:'language',label:'Publish to Proxi'}]],[SettingControlsType.MAP_STYLES,[{icon:'title',label:'Rename Map'},{icon:'format_color_fill',label:'Header Colors'},{icon:'crop_original',label:'Header Logo'},{icon:'auto_awesome',label:'Map Style'},{icon:'trip_origin',label:`Icon Settings`}]],[SettingControlsType.ADD_POINT,[{icon:'location_on',label:'Location'},{icon:'notes',label:'Title & Details'},{icon:'crop_original',label:'Images'},{icon:'sell',label:'Tags'},{icon:'link',label:'Link Outs'},{icon:'card_giftcard',label:'Special Offer'}]]]);this.addPointButton={icon:'add_location',label:`Add Point`};}handleUpgradeClick(featureType){this.dispatchEvent(new CustomEvent('on-upgrade-click',{detail:{featureType}}));}updated(changedProperties){var _a;this.buttonsToRender=(_a=this.buttonTypeToButtonsMap.get(this.buttonType))!==null&&_a!==void 0?_a:[];}handleButtonClick(button){if(button.newButtonSet){this.buttonType=button.newButtonSet;}else{this.activeButton=button;this.dispatchEvent(new CustomEvent('on-button-click',{detail:{label:button.label}}));}}resetActiveButton(){this.activeButton=undefined;}save(){this.dispatchEvent(new CustomEvent('on-save'));}render(){var _a,_b;return $` ${this.buttonType!==SettingControlsType.DEFAULT?$`{this.buttonType=SettingControlsType.DEFAULT;}}> arrow_back Back `:$` pointCache.pointsRemaining add_location Add ${(_b=(_a=topicData.topic)===null||_a===void 0?void 0:_a.point_name)!==null&&_b!==void 0?_b:'Point'} `} ${this.buttonsToRender.map(button=>$` this.handleButtonClick(button)}> ${button.icon.endsWith('.png')?$` `:$` ${button.icon} `} ${button.label} `)} `;}static get styles(){return r$3` /* width */ .scrollyButton::-webkit-scrollbar { width: 2px; } /* Track */ .scrollyButton::-webkit-scrollbar-track { background: var(--theme-light-scrollbar-color); } /* Handle */ .scrollyButton::-webkit-scrollbar-thumb { background: var(--main-moon-color); } .setting-controls-button__wrapper { overflow: scroll hidden; padding: 4px; scrollbar-width: thin; // this is for firefox margin-bottom: -16px; // this is to make up for the scrollbar width setting } .setting-controls-button__wrapper::-webkit-scrollbar { width: 0px; // this makes the scrollbar virtually invisible } .setting-controls-button__scroll-container { display: flex; } .stickyButton { display: flex; height: 100%; } .setting-controls-button { border-radius: 2px; border: none; cursor: pointer; padding: 4px 8px; background: transparent; color: var(--main-primary-color); max-height: 65px; display: flex; flex-direction: column; align-items: center; --mdc-icon-size: 1rem; gap:5px; flex: 1; height: 100%; justify-content: space-around; } .scrollyButton { flex: 1; overflow: auto; display: flex; flex-direction: row; align-items: center; justify-content: space-evenly; } .setting-controls-button--active { background-color: #fff; } .setting-drawer-button--primary { color: var(--main-success-color); --mdc-icon-size: 16px; border-right: 1px solid gray; } .setting-drawer-button--back { color: var(--main-primary-color); --mdc-icon-size: 16px; border-right: 1px solid gray; } .setting-drawer-button--add-point { color: var(--main-invalid-color); --mdc-icon-size: 16px; border-right: 1px solid gray; } .setting-controls-button__icon { margin-left: auto; margin-right: auto; } .setting-controls-button__png { margin-left: auto; margin-right: auto; height: 16px; width: 16px; } .setting-controls-button__label { color: var(--main-primary-color); text-align: center; font-size: 0.7rem; } `;}};__decorate$2o([e$5()],SettingControlButtons.prototype,"buttonType",void 0);__decorate$2o([t$3()],SettingControlButtons.prototype,"buttonsToRender",void 0);__decorate$2o([t$3()],SettingControlButtons.prototype,"activeButton",void 0);SettingControlButtons=__decorate$2o([n$6('setting-control-buttons')],SettingControlButtons);var __decorate$2p=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2n=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let SettingControls=class SettingControls extends s$5{constructor(){super(...arguments);this.amplitude_callsite='Setting Controls';this.isDrawerOpen=false;this.buttonType=SettingControlsType.DEFAULT;this.label='';this.upgradeFeatureType=FeatureType.DuplicateMap;this.isDrawerFullScreen=false;this.createTopicRequest=createTopicRequestFromTopic(topicData.topic);this.categories=[];this.userTags=[];this.willRefreshMarkers=false;this.willRefreshPage=false;this.bindTopicState=new StateController(this,topicData);this.bindPointCacheState=new StateController(this,pointCache);}openDrawer(e){this.label=e.detail.label;this.isDrawerOpen=true;this.imageToUpload=undefined;}openUpgradeDialog(e){this.label='Upgrade Dialog';this.isDrawerOpen=true;this.upgradeFeatureType=e.detail.featureType;}closeUpgradeDialog(){this.dispatchEvent(new CustomEvent('closeUpgradeDialog'));}closeDrawer(){var _a;this.isDrawerOpen=false;this.label='';(_a=this.settingControlButtons)===null||_a===void 0?void 0:_a.resetActiveButton();}// remember to bubble all dispatched events that aim to hit this function because they are sometimes rendered inside a slot // fire one event per field on topic that needs to change onChange(e){return __awaiter$2n(this,void 0,void 0,function*(){const updatedValue=e.detail.updatedValue;const fieldToUpdate=e.detail.field;this.createTopicRequest[fieldToUpdate]=updatedValue;if(isDefined(e.detail.callback)){yield e.detail.callback();}if(e.detail.refreshMarkers===true&&topicData.topic!==undefined){this.willRefreshMarkers=true;}if(e.detail.refreshPage===true){this.willRefreshPage=true;}});}onChangeHeaderLogoImage(e){var _a;this.imageToUpload=(_a=e.detail)===null||_a===void 0?void 0:_a.imageToUpload;}render(){return $` ${this.isDrawerOpen?$` ${this.label==='Categories & Tags'?$` `:this.label==='Publish to Proxi'?$` `:this.label==='Duplicate Map'?$` `:this.label==='Rename Map'?$` `:this.label==='Header Colors'?$` `:this.label==='Header Logo'?$` `:this.label===`Map Style`?$` `:this.label===`Icon Settings`?$` `:this.label==='Clustering'?$` `:this.label==='Point Approval'?$` `:this.label==='Upvotes'?$` `:this.label==='Date & Time'?$` `:this.label==='Custom URL'?$` `:this.label==='Advanced'?$` `:this.label==='Upgrade Dialog'?$` this.closeUpgradeDialog}"> `:this.label==='Add Point'?$` `:''} `:''} `;}static get styles(){return r$3` :host { width: 100%; } .setting-controls { position: absolute; width: 100%; bottom: 0; height: ${o$3(heights.mobileSettingsControls)}; background-color: var(--theme-border-color); z-index: 10; // always want this to be over the overlayed drawer - TODO - this may still be a problem with settings coming in from nav } `;}};__decorate$2p([i$4('#settingControlButtons')],SettingControls.prototype,"settingControlButtons",void 0);__decorate$2p([t$3()],SettingControls.prototype,"isDrawerOpen",void 0);__decorate$2p([t$3()],SettingControls.prototype,"buttonType",void 0);__decorate$2p([t$3()],SettingControls.prototype,"label",void 0);__decorate$2p([t$3()],SettingControls.prototype,"upgradeFeatureType",void 0);__decorate$2p([t$3()],SettingControls.prototype,"isDrawerFullScreen",void 0);__decorate$2p([t$3()],SettingControls.prototype,"createTopicRequest",void 0);__decorate$2p([t$3()],SettingControls.prototype,"categories",void 0);__decorate$2p([t$3()],SettingControls.prototype,"userTags",void 0);__decorate$2p([t$3()],SettingControls.prototype,"willRefreshMarkers",void 0);__decorate$2p([t$3()],SettingControls.prototype,"willRefreshPage",void 0);__decorate$2p([t$3()],SettingControls.prototype,"imageToUpload",void 0);SettingControls=__decorate$2p([n$6('setting-controls')],SettingControls);var __decorate$2q=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2o=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let TagsCategoriesWrapperMobile=class TagsCategoriesWrapperMobile extends s$5{constructor(){super(...arguments);this.amplitude_callsite='Edit Categories Drawer';this.activeTab=TagCategoryDataType.Category;this.activeDataType=TagCategoryDataType.Category;this.showAddData=false;this.bindTopicState=new StateController(this,topicData);}toggleTab(type){this.activeTab=type;this.activeDataType=type;this.activeData=undefined;this.showAddData=false;}onEditClick(data){this.activeData=data;if(instanceOfTagGroup(data)){this.activeDataType=TagCategoryDataType.TagGroup;}this.showAddData=true;}deleteData(){const dataToDelete=this.activeData;let settingsChangeEvent;if(this.activeDataType===TagCategoryDataType.Category){settingsChangeEvent={field:'categories',updatedValue:topicData.categories.filter(c=>c._id!==(dataToDelete===null||dataToDelete===void 0?void 0:dataToDelete._id))};}else{settingsChangeEvent={field:'tag_info',updatedValue:{user_tags:topicData.topLevelUserTags.filter(c=>c._id!==(dataToDelete===null||dataToDelete===void 0?void 0:dataToDelete._id))}};}dispatchSettingsUpdate(settingsChangeEvent,this);// delete the data this.activeData=undefined;this.showAddData=false;}onAddClick(dataType){return __awaiter$2o(this,void 0,void 0,function*(){if(dataType===TagCategoryDataType.TagGroup){this.activeDataType=dataType;this.activeData=yield topicData.createNewUserTag(true,this.amplitude_callsite);this.showAddData=true;}else if(dataType===TagCategoryDataType.Tag){this.activeDataType=dataType;this.activeData=yield topicData.createNewUserTag(false,this.amplitude_callsite);this.showAddData=true;}else{this.activeDataType=dataType;this.activeData=yield topicData.createNewCategory(this.amplitude_callsite);this.showAddData=true;}});}onUpClick(index,dataType){return __awaiter$2o(this,void 0,void 0,function*(){const data=dataType===TagCategoryDataType.Category?topicData.categories:topicData.topLevelUserTags;moveItem(data,index,index-1);const updatedTopic=Object.assign({},createTopicRequestFromTopic(topicData.topic));yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2o(this,void 0,void 0,function*(){yield topicData.fetchAndUpdateTopicData(updatedTopic,this.amplitude_callsite);}),'An error has occurred. Context: could not reorder the categories.');});}onDownClick(index,dataType){return __awaiter$2o(this,void 0,void 0,function*(){const data=dataType===TagCategoryDataType.Category?topicData.categories:topicData.topLevelUserTags;moveItem(data,index,index+1);const updatedTopic=Object.assign({},createTopicRequestFromTopic(topicData.topic));yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2o(this,void 0,void 0,function*(){yield topicData.fetchAndUpdateTopicData(updatedTopic,this.amplitude_callsite);}),'An error has occurred. Context: could not reorder the categories.');});}selectTag(e){const activeIndex=e.detail.tabIndex;this.activeDataType=activeIndex===0?TagCategoryDataType.Category:TagCategoryDataType.Tag;this.toggleTab(this.activeDataType);}exitEditMode(){this.activeData=undefined;this.showAddData=false;}render(){return $` ${this.activeData?$` Back `:''} ${this.showAddData?$` `:this.activeTab===TagCategoryDataType.Category?$` __awaiter$2o(this,void 0,void 0,function*(){return yield this.onDownClick(e.detail.index,e.detail.dataType);})}" @on-up-click="${e=>__awaiter$2o(this,void 0,void 0,function*(){return yield this.onUpClick(e.detail.index,e.detail.dataType);})}" @on-edit-click="${e=>this.onEditClick(e.detail.data)}"> =50}" class="tags-categories__add" @click="${()=>__awaiter$2o(this,void 0,void 0,function*(){return yield this.onAddClick(TagCategoryDataType.Category);})}"> add Add ${this.activeDataType} `:$` __awaiter$2o(this,void 0,void 0,function*(){return yield this.onDownClick(e.detail.index,e.detail.dataType);})}" @on-up-click="${e=>__awaiter$2o(this,void 0,void 0,function*(){return yield this.onUpClick(e.detail.index,e.detail.dataType);})}" @on-edit-click="${e=>this.onEditClick(e.detail.data)}"> __awaiter$2o(this,void 0,void 0,function*(){return yield this.onAddClick(TagCategoryDataType.Tag);})}"> Add Tag __awaiter$2o(this,void 0,void 0,function*(){return yield this.onAddClick(TagCategoryDataType.TagGroup);})}"> Add Tag Group `} `;}static get styles(){return r$3` mwc-button { --mdc-typography-button-text-transform: case; --mdc-typography-button-letter-spacing: 0px; } .wrapper { display: flex; flex-direction: column; } .tags-categories__sell { --mdc-icon-size: 14px; vertical-align: text-bottom; } .tags-categories__sell--group { margin-left: -11px; } .top-wrapper { display: flex; flex-direction: row; justify-content: center; align-items: center; } .tags-categories__add { display: block; text-align: center; margin: 10px; margin-bottom: 0; } .tags-categories__add-wrapper { display: flex; } .tags-categories__item { background-color: white; border: 1px solid lightgray; border-radius: 50px; padding: 8px; margin: 10px 4px 5px; filter: drop-shadow(rgba(0, 0, 0, 0.25) 0px 4px 4px); } .tags-categories__item.over { outline: 2px dotted #666; } .tags-categories__item.tags-categories__item--group { background-color: #EFECF3; } .tags-categories__item.active { border: 3px solid var(--main-primary-color); } .tags-categories__item--image { vertical-align: text-bottom; } `;}};__decorate$2q([i$4('#errorToast')],TagsCategoriesWrapperMobile.prototype,"errorToastElement",void 0);__decorate$2q([t$3()],TagsCategoriesWrapperMobile.prototype,"activeTab",void 0);__decorate$2q([t$3()],TagsCategoriesWrapperMobile.prototype,"activeData",void 0);__decorate$2q([t$3()],TagsCategoriesWrapperMobile.prototype,"activeDataType",void 0);__decorate$2q([t$3()],TagsCategoriesWrapperMobile.prototype,"showAddData",void 0);TagsCategoriesWrapperMobile=__decorate$2q([n$6('tags-categories-wrapper-mobile')],TagsCategoriesWrapperMobile);var __decorate$2r=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let TagsCategoriesItem=class TagsCategoriesItem extends s$5{constructor(){super(...arguments);this.data=[];this.dataType=TagCategoryDataType.Category;}onEditClick(data){this.dispatchEvent(new CustomEvent('on-edit-click',{detail:{data}}));}onUpClick(index){this.dispatchEvent(new CustomEvent('on-up-click',{detail:{dataType:this.dataType,index}}));}onDownClick(index){this.dispatchEvent(new CustomEvent('on-down-click',{detail:{dataType:this.dataType,index}}));}renderIcon(c){if(this.dataType===TagCategoryDataType.Category){return $``;}else if(this.dataType===TagCategoryDataType.Tag&&!instanceOfTagGroup(c)){return $`sell`;}else{return $`sell sell`;}}render(){return $` ${this.data.map((c,index)=>$` this.onEditClick(c)} icon="edit"> ${this.renderIcon(c)} ${c.name} this.onUpClick(index)} icon="arrow_upward" ?disabled=${index===0}> this.onDownClick(index)} icon="arrow_downward" ?disabled=${index===this.data.length-1}> `)} `;}static get styles(){return r$3` mwc-icon-button { --mdc-icon-size: 16px; --mdc-icon-button-size: 30px; } .wrapper { display: flex; flex-direction: column; } .item-wrapper { display: flex; align-items: center; margin: 5px 0; } .tags-categories__sell { --mdc-icon-size: 14px; vertical-align: text-bottom; } .tags-categories__sell--group { margin-left: -11px; } .tags-categories__item { padding: 0 8px; } .tags-categories__item.tags-categories__item--group { background-color: #EFECF3; } .tags-categories__item.active { border: 3px solid var(--main-primary-color); } .tags-categories__item--image { vertical-align: text-bottom; } `;}};TagsCategoriesItem.amplitude_callsite='Edit Categories Drawer';__decorate$2r([e$5({type:Object})],TagsCategoriesItem.prototype,"data",void 0);__decorate$2r([e$5({type:TagCategoryDataType})],TagsCategoriesItem.prototype,"dataType",void 0);TagsCategoriesItem=__decorate$2r([n$6('tags-categories-item')],TagsCategoriesItem);var __decorate$2s=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2p=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let ContextMenu=class ContextMenu extends s$5{constructor(){super(...arguments);this.type='admin-portal';this.amplitude_callsite='';this.menu_only=false;this.bindAccountState=new StateController(this,accountInfo);}firstUpdated(){return __awaiter$2p(this,void 0,void 0,function*(){yield this.startup();});}startup(){return __awaiter$2p(this,void 0,void 0,function*(){this.cornerMenu.anchor=this.menuConnect;});}connectedCallback(){super.connectedCallback();if(this.type!=='command-center'){this.style.setProperty('--context-menu-text-color','var(--main-primary-color)');}}render(){var _a,_b;const xPos=this.menu_only?0:10;const yPos=this.menu_only?0:48;return $` ${!this.menu_only?$` ${accountInfo.isAuthenticated?$` this.cornerMenu.open=true}> ${getInitials(accountInfo.fullName,accountInfo.email)} `:this.type==='command-center'?'':$` `} `:$``} this.cornerMenu.open=true} .imageUrl="${(_b=accountInfo.account)===null||_b===void 0?void 0:_b.image_url}"> ${getInitials(accountInfo.fullName,accountInfo.email)} ${accountInfo.fullName} ${accountInfo.email} person_outline Account Info ${accountInfo.isAppSumoUser===true?'and License':''} backpack My Backpack (All Maps) logout Log Out `;}static get styles(){return r$3` :host { --mdc-menu-min-width: min(100vw, 100px); --mdc-menu-item-height: 1.75rem; --mdc-typography-subtitle1-font-size: 12px; } .divider { width: 1px; height: 1.5rem; margin: 0 1rem; background: var(--theme-input-color); } #profileListItem { --mdc-menu-item-height: 3.5rem; } .profileDetails { display: flex; flex-direction: column; margin-left: 0.5rem; } .detailsName { font-size: 0.8rem; font-weight: 700; line-height: 1.25rem; color: var(--theme-input-color); } .detailsEmail { font-size: 0.75rem; line-height: 1rem; color: var(--theme-input-color); } .menuIcon { margin-right: 0.5rem; --mdc-icon-size: 0.8rem; color: var(--theme-lighter-text-color); } #expandProfile { --mdc-icon-button-size: 2.5rem; color: var(--context-menu-text-color); margin-right: -0.5rem; } .guestViewer { color: var(--context-menu-text-color); text-align: center; cursor: pointer; font-weight: bold; font-size: 12px; } .backpackicon { height: 1.5rem; margin-right: 5px; } mwc-icon-button { color: var(--context-menu-text-color); --mdc-icon-button-size: 2.5rem; } .flexContainer { display: flex; align-items: center; justify-content: center; } ::slotted(*) { cursor: pointer; } @media screen and (min-width: 901px) { .desktopOnly { display: block; } .mobileOnly { display: none; } .desktopOnly.flexContainer { display: flex; } } @media screen and (max-width: 900px) { .desktopOnly { display: none; } .mobileOnly { display: flex; } .mobileOnly.flexContainer { display: flex; } #expandProfile { --mdc-icon-button-size: 2rem; } .guestViewer { display: none; } } `;}logout(){return __awaiter$2p(this,void 0,void 0,function*(){logWithAmplitude(this.amplitude_callsite,'User Logout Click');yield accountInfo.logout();});}signInClick(){logWithAmplitude(this.amplitude_callsite,'User Login Click');this.dispatchEvent(new CustomEvent('on-signin'));}accountPageClick(){logWithAmplitude(this.amplitude_callsite,'Account Page Click');window.location.assign(`#home?settings=account`);}backpackClick(){logWithAmplitude(this.amplitude_callsite,'Backpack Click');window.location.assign(`#home`);}discoverClick(){logWithAmplitude(this.amplitude_callsite,'Proxi Discover Click');window.location.assign(`/#discover`);}manageSubscriptionClick(){this.dispatchEvent(new CustomEvent('on-manage-subscription'));logWithAmplitude(this.amplitude_callsite,'Manage Subscription Click');}};__decorate$2s([i$4('#errorToast')],ContextMenu.prototype,"errorToastElement",void 0);__decorate$2s([i$4('#cornerMenu')],ContextMenu.prototype,"cornerMenu",void 0);__decorate$2s([i$4('#menuConnect')],ContextMenu.prototype,"menuConnect",void 0);__decorate$2s([e$5()],ContextMenu.prototype,"type",void 0);__decorate$2s([e$5()],ContextMenu.prototype,"amplitude_callsite",void 0);__decorate$2s([e$5({type:Boolean})],ContextMenu.prototype,"menu_only",void 0);ContextMenu=__decorate$2s([n$6('context-menu')],ContextMenu);var __decorate$2t=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2q=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};;let TeamSwitchMenu=class TeamSwitchMenu extends s$5{constructor(){super(...arguments);this.amplitude_callsite='';this.organizations=[];this.entries=[];this.menuOpen=false;this.bindAccountState=new StateController(this,accountInfo);this.bindOrganizationState=new StateController(this,organizationInfo);}toggleMenuOpen(){// this.cornerMenu.open = true; this.menuOpen=!this.menuOpen;}// if this.organizations changes, create the entries updated(changedProperties){return __awaiter$2q(this,void 0,void 0,function*(){if(changedProperties.has('organizations')){yield this.createEntries();}});}postOrganizationUpgrade(organization_entry){return __awaiter$2q(this,void 0,void 0,function*(){// set local storage if(!organization_entry){localStorage.removeItem('organization_id');}else{localStorage.setItem('organization_id',organization_entry.id);// in beta const isInBeta=window.location.href.includes('betamap.proxi.co');if(organization_entry.validated_custom_url&&!isInBeta){// replace the url base with the custom url const url=window.location.href;const urlParts=url.split('/');const baseUrl=urlParts[2].toLowerCase();const newUrl=url.replace(baseUrl,organization_entry.validated_custom_url);// set the new url window.location.href=newUrl;}}// refresh the page window.location.reload();});}createEntries(){return __awaiter$2q(this,void 0,void 0,function*(){// iterate through organizations. if the organization does not have a parent, add it to the entries this.entries=this.organizations.map(org=>({name:org.name,logo:org.logo,id:org._id.$oid,primary_color:org.primary_color,secondary_color:org.secondary_color,validated_custom_url:isDefined(org.cname)&&org.cname.validated?org.cname.custom_url:undefined}));});}onClickCreateTeam(){this.dispatchEvent(new CustomEvent('on-start-create-team'));}render(){var _a,_b,_c,_d,_e,_f,_g,_h,_j,_k;const org_background_color=(_b=(_a=organizationInfo.organization)===null||_a===void 0?void 0:_a.primary_color)!==null&&_b!==void 0?_b:'var(--main-primary-color)';const org_text_color=(_e=(_d=(_c=organizationInfo.organization)===null||_c===void 0?void 0:_c.secondary_color)!==null&&_d!==void 0?_d:getVisibleTextColor(palette.primaryBlue))!==null&&_e!==void 0?_e:'white';return $` ${(_h=(_g=(_f=organizationInfo.organization)===null||_f===void 0?void 0:_f.name)===null||_g===void 0?void 0:_g.charAt(0))!==null&&_h!==void 0?_h:accountInfo.fullName.charAt(0)} ${(_k=(_j=organizationInfo.organization)===null||_j===void 0?void 0:_j.name)!==null&&_k!==void 0?_k:'Personal Account'} ${this.organizations.length>0?$` ${this.menuOpen?$` expand_less `:$` expand_more `} `:''} ${this.menuOpen?$` ${organizationInfo.organization&&accountInfo.migrated_from_personal!==true?$` __awaiter$2q(this,void 0,void 0,function*(){return yield this.postOrganizationUpgrade(undefined);})}> Personal Account ${accountInfo.fullName.charAt(0)} `:''} ${this.entries.filter(entry=>{var _a;return entry.id!==((_a=organizationInfo.organization)===null||_a===void 0?void 0:_a._id.$oid);}).map((organizationEntry,index)=>$` __awaiter$2q(this,void 0,void 0,function*(){return yield this.postOrganizationUpgrade(organizationEntry);})}> ${organizationEntry.name} ${organizationEntry.name.charAt(0)} `)} add Create a new team `:''} `;}static get styles(){return r$3` :host { --mdc-typography-subtitle1-font-size: 12px; --mdc-list-vertical-padding: 0px; --mdc-menu-max-width: calc(20vw - 40px); } .dropdown { background-color: white; border-radius: 0 0 8px 8px; z-index: 100; width: 100%; max-height: 50vh; overflow-y: auto; } .divider { margin: 0; background-color: var(--theme-lightest-color); } .teamOption { padding: 0.5rem; cursor: pointer; justify-content: space-between; } .child { padding-left: 1rem; } #menuConnect { cursor: pointer; justify-content: space-between; padding: 0.5rem; box-shadow: 0px 2px 2px -2px rgba(31, 27, 45, 0.08), 0px 4px 12px rgba(31, 27, 45, 0.08); border-radius: 8px; } .flexGap { gap: 0.75rem; } .org-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .orgListItem { padding-top: 0.5rem; padding-bottom: 0.5rem; } .newTeam { background-color: var(--theme-lightest-color); text-align: center; padding: 0.5rem; gap: 0.25rem; justify-content: center; cursor: pointer; } .createListItem { justify-content: center; background-color: #F7F8F9; font-weight: 500; } .flexContainer { display: flex; align-items: center; } .profileDetails { display: flex; flex-direction: column; margin-left: 0.5rem; } @media screen and (min-width: 901px) { .desktopOnly { display: block; } .mobileOnly { display: none; } .desktopOnly.flexContainer { display: flex; } } @media screen and (max-width: 900px) { .desktopOnly { display: none; } .mobileOnly { display: flex; } .mobileOnly.flexContainer { display: flex; } } `;}};__decorate$2t([i$4('#errorToast')],TeamSwitchMenu.prototype,"errorToastElement",void 0);__decorate$2t([i$4('#cornerMenu')],TeamSwitchMenu.prototype,"cornerMenu",void 0);__decorate$2t([i$4('#menuConnect')],TeamSwitchMenu.prototype,"menuConnect",void 0);__decorate$2t([e$5()],TeamSwitchMenu.prototype,"amplitude_callsite",void 0);__decorate$2t([t$3()],TeamSwitchMenu.prototype,"organizations",void 0);__decorate$2t([t$3()],TeamSwitchMenu.prototype,"entries",void 0);__decorate$2t([t$3()],TeamSwitchMenu.prototype,"menuOpen",void 0);TeamSwitchMenu=__decorate$2t([n$6('team-switch-menu')],TeamSwitchMenu);var __decorate$2u=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2r=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};var HelpMenu_1;let HelpMenu=HelpMenu_1=class HelpMenu extends s$5{constructor(){super(...arguments);this.type='backpack';this.mini=false;this.bindAccountState=new StateController(this,accountInfo);}firstUpdated(){return __awaiter$2r(this,void 0,void 0,function*(){yield this.startup();});}startup(){return __awaiter$2r(this,void 0,void 0,function*(){this.cornerMenu.anchor=this.menuConnect;});}render(){// const xPos = 0; // const yPos = 0; return $` {this.cornerMenu.open=true;this.dispatchEvent(new CustomEvent('menu-opened'));}}"> question_mark ${this.mini?'':'Help'} local_library Help Docs newspaper Visit our Blog ${this.type==='admin-portal'?$` tour Re-Launch Tour `:''} chat_bubble_outline Feature Request post_add Chat with Us mail_outline Email Us `;}static get styles(){return r$3` :host { --mdc-menu-min-width: min(100vw,150px); --mdc-menu-max-width: 200px; --mdc-typography-subtitle1-font-size: 12px; --mdc-menu-item-height: 30px; --mdc-icon-size: 16px; } .menuIcon { margin-right: 0.5rem; color: var(--theme-lighter-text-color); } mwc-icon-button { color: var(--context-menu-text-color); --mdc-icon-button-size: 2.5rem; } .linkButton { cursor: pointer; color: var(--main-primary-color); margin: 0 1rem; } .flexContainer { display: flex; align-items: center; } .headerIcon { margin-right: 2px; --mdc-icon-size: 1rem; } @media screen and (min-width: 901px) { .desktopOnly { display: block; } .mobileOnly { display: none; } .desktopOnly.flexContainer { display: flex; } } @media screen and (max-width: 900px) { .desktopOnly { display: none; } .mobileOnly { display: flex; } .mobileOnly.flexContainer { display: flex; } } `;}learnClick(){logWithAmplitude(HelpMenu_1.amplitude_callsite,'Proxi Learn Click');window.open(`https://www.proxi.co/learn`);}blogClick(){logWithAmplitude(HelpMenu_1.amplitude_callsite,'Proxi Blog Click');window.open(`https://proxi.co/blog`);}visitContactClick(){logWithAmplitude(HelpMenu_1.amplitude_callsite,'Email Us Click');window.location.assign(`mailto:[email protected]`);}relaunchTourClick(){var _a,_b;logWithAmplitude(HelpMenu_1.amplitude_callsite,'Relaunch Tour Click');chameleonExperience(ChameleonTour.DesktopAdminPortalTour,(_b=(_a=undefinedIfEmpty(accountInfo.email))!==null&&_a!==void 0?_a:getFromLocalStorage('email'))!==null&&_b!==void 0?_b:'',false,true);}submitFeatureRequestClick(){logWithAmplitude(HelpMenu_1.amplitude_callsite,'Submit Feature Request Click');window.open(`https://proxi.sleekplan.app/`);}};HelpMenu.amplitude_callsite='Help Menu';__decorate$2u([i$4('#errorToast')],HelpMenu.prototype,"errorToastElement",void 0);__decorate$2u([i$4('#cornerMenu')],HelpMenu.prototype,"cornerMenu",void 0);__decorate$2u([i$4('#menuConnect')],HelpMenu.prototype,"menuConnect",void 0);__decorate$2u([e$5({type:String})],HelpMenu.prototype,"type",void 0);__decorate$2u([t$3()],HelpMenu.prototype,"mini",void 0);HelpMenu=HelpMenu_1=__decorate$2u([n$6('help-menu')],HelpMenu);var __decorate$2v=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2s=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};var Navbar_1;const pagesForHelp=['admin-portal','backpack','account'];let Navbar=Navbar_1=class Navbar extends s$5{constructor(){super(...arguments);this.type='admin-portal';this.loading=false;this.bindTopicState=new StateController(this,topicData);this.bindAccountState=new StateController(this,accountInfo);}connectedCallback(){const _super=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return __awaiter$2s(this,void 0,void 0,function*(){yield this.startup();_super.connectedCallback.call(this);});}startup(){return __awaiter$2s(this,void 0,void 0,function*(){if(topicData.topicKey===undefined&&this.type!=='discover'&&!accountInfo.isAuthenticated){redirectToLogin();}// get subscription level and set text as subscription level if(accountInfo.isAuthenticated){// if organization is defined then set subscription level text to "Teams" if(subscriptionInfo.subscriptionLevelText==='Free'&&!organizationInfo.isGuest){this.subscription_level_text='Subscribe';}else{this.subscription_level_text=subscriptionInfo.subscriptionLevelText;}}});}closeOpenDrawers(){var _a;return __awaiter$2s(this,void 0,void 0,function*(){yield(_a=this.duplicateDrawer)===null||_a===void 0?void 0:_a.close();});}pricingClick(){if(!organizationInfo.isGuest){logWithAmplitude(Navbar_1.amplitude_callsite,'Proxi Pricing Click');window.location.assign('/#home?page_name=Team%20Settings&setting_type=SubscriptionAndBilling');}}whatsNewClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'What\'s New Click');window.open('https://proxi.sleekplan.app/changelog','_blank');}marketingAndPrintingServicesClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'Marketing and Printing Services Click');window.open('https://www.proxi.co/proxi-map-services');}openAccountPage(){logWithAmplitude(Navbar_1.amplitude_callsite,'Account Page Click');window.location.assign(`/#account`);}openChargebeePortal(){var _a,_b;return __awaiter$2s(this,void 0,void 0,function*(){logWithAmplitude(Navbar_1.amplitude_callsite,'Manage Subscription Click');if(!isDefined(subscriptionInfo.subscription_customer_id)){(_a=getMainPage().errorToastElement)===null||_a===void 0?void 0:_a.showToastAndThrow('An Error Occured - Unable to open subscription portal. Reach out to help.proxi.co');}else{const request={customer_id:subscriptionInfo.subscription_customer_id,redirect_url:(_b=window.location.href)!==null&&_b!==void 0?_b:'https://map.proxi.co/#home'};yield openChargebeePortal(request);}});}render(){var _a,_b;const logo=renderOrganizationLogo((_a=organizationInfo.organization)===null||_a===void 0?void 0:_a.logo);return $` ${accountInfo.isAuthenticated?$` ${this.type==='admin-portal'?$` Back to Dashboard `:$` ${this.type!=='backpack'?$` Your Maps `:``} ${this.type!=='discover'&&isEmpty(organizationInfo.organization)?$` search Discover `:``} `}`:$` person_outline Log in to save and manage your maps `} ${pagesForHelp.includes(this.type)?$` ondemand_video Demo Video `:``} ${this.type==='admin-portal'?'':$` add New Map `} ${accountInfo.isAuthenticated?$` ${accountInfo.isAppSumoUser===true?$` ${this.subscription_level_text} `:$` ${this.subscription_level_text} `} `:$``} ${this.type==='admin-portal'?$` home `:logo} ${getPageNameByType(this.type)} ${accountInfo.isAuthenticated?$` ${this.subscription_level_text} `:''} ${this.type==='admin-portal'&&detectMobileViewport()// show mobile only ?$` Share Map `:$` add New Map `} ${accountInfo.isAuthenticated?$` `:$``} ${detectMobileViewport()?$` {var _a;return(_a=this.duplicateDrawer)===null||_a===void 0?void 0:_a.close();}}" @close-upgrade="${()=>{var _a;return(_a=this.duplicationModal)===null||_a===void 0?void 0:_a.close();}}"> `:$` {var _a;return(_a=this.duplicationModal)===null||_a===void 0?void 0:_a.close();}}"> {var _a;return(_a=this.duplicateDrawer)===null||_a===void 0?void 0:_a.close();}}" @close-upgrade="${()=>{var _a;return(_a=this.duplicationModal)===null||_a===void 0?void 0:_a.close();}}"> `} {var _a;return(_a=this.signinModalComponent)===null||_a===void 0?void 0:_a.close();}}"> {var _a;return(_a=this.signinModalComponent)===null||_a===void 0?void 0:_a.close();}}"> this.upgradeDialogComponent.close()}"> this.upgradeDialogComponent.close()}" > `;}static get styles(){return r$3` .wrapper { postion: fixed; width: 100%; } :host { --mdc-menu-min-width: min(100vw, 292px); --mdc-typography-subtitle1-font-size: 12px; } mwc-dialog { /* this is because handontable sets the zindex of its columns and row headers to 160 */ z-index: 200; } nav { height: ${o$3(heights.nav)}; display: flex; align-items: center; justify-content: space-between; box-shadow: 0px 4px 6px 0 #ECECEC; z-index: 2; padding-left: 1rem; padding-right: 1rem; } .shareButtonIcon { --mdc-icon-size: 1.5rem; } .no-pointer:hover { cursor: default; } #logoDesktop img { max-height: 2.5rem; vertical-align: middle; } #logoMobile img { max-height: 1.5rem; vertical-align: middle; } #leftContent { --btn-padding-x: .25rem; } .divider { width: 1px; height: 1.5rem; margin: 0 1rem; background: var(--main-moon-color); } .backpackButton { display: flex; flex-direction: row; align-items: center; } .backpackButton:hover { cursor: pointer; } .buttonSection { margin: 0.1rem 0.25rem; } .grantSection { margin: 0.25rem 1rem; flex-wrap: nowrap; } #signinModalComponent { --mdc-theme-surface: var(--theme-white-color); } .linkButton { cursor: pointer; color: var(--main-primary-color); margin: 0 1rem; } .leftIcon { margin-right: 2px; --mdc-icon-size: 1rem; } .leftPng { height: 1.5rem; margin-right: 5px; } .backpackicon { height: 1rem; margin-right: 5px; } mwc-icon-button { color: var(--main-primary-color); --mdc-icon-button-size: 2.5rem; } .mdc-icon-button { margin-right: 4px; } .flexContainer { display: flex; align-items: center; } .homeLink { margin-right: 1rem; color: var(--main-primary-color) } .homeLink:visited { color: var(--main-primary-color); } .subscriptionTag { padding: 1px; border-radius: 8px; margin-right: 0.5rem; display: flex; align-items: center; cursor: pointer; padding: 5px; } .subscriptionNameTag { border-radius: 6px; padding: 3px 6px; margin-left: 4px; margin-right: 4px; } .spin { animation: spin 2s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @media screen and (min-width: 901px) { .desktopOnly { display: block; } .mobileOnly { display: none; } .desktopOnly.flexContainer { display: flex; } #shareSection { margin-right: -0.5rem; } } @media screen and (max-width: 900px) { .desktopOnly { display: none; } .mobileOnly { display: flex; } .mobileOnly.flexContainer { display: flex; } nav { padding: 0 1rem 0 0.75rem; } .mobileStack { display: flex; flex-direction: column; align-items: center; } .grantSection { margin-right: 0.5rem; } .pageName { font-size: 12px; line-height: 0.75rem; margin: 5px; } #rightContent { right: 0px; position: absolute; } .leftPng { height: 1rem; } .homeLink { margin-right: 0.5rem; } .subscriptionTag { padding: 2px; border-radius: 8px; font-size: 12px; margin: 0px } .subscriptionNameTag { padding: 0px; } @media screen and (max-width: 600px) { .pageName { display: none; } } } `;}copyCollaboratorMapLinkToClipboard(){var _a,_b,_c;return __awaiter$2s(this,void 0,void 0,function*(){if(((_a=topicData.topic)===null||_a===void 0?void 0:_a.is_addpointer)===true){if(topicData.discoveryLevel==='addpoint_public'){this.crowdsourceLink=undefinedIfEmpty((_b=topicData.topic)===null||_b===void 0?void 0:_b.cc_keyless_link);}else{this.crowdsourceLink=undefinedIfEmpty((_c=topicData.topic)===null||_c===void 0?void 0:_c.cc_addpoint_link);}}});}copyViewOnlyMapLinkToClipboard(){var _a,_b;return __awaiter$2s(this,void 0,void 0,function*(){if(topicData.discoveryLevel!=='private'){this.viewonlyLink=undefinedIfEmpty((_a=topicData.topic)===null||_a===void 0?void 0:_a.cc_keyless_link);}else{this.viewonlyLink=undefinedIfEmpty((_b=topicData.topic)===null||_b===void 0?void 0:_b.cc_read_link);}});}duplicateMapClick(){var _a;return __awaiter$2s(this,void 0,void 0,function*(){logWithAmplitude(Navbar_1.amplitude_callsite,'Duplicate Map Click');if(detectMobileViewport()){yield this.closeOpenDrawers();yield(_a=this.duplicateDrawer)===null||_a===void 0?void 0:_a.open();}else if(this.duplicationModal){this.duplicationModal.open=true;}});}openUpgradeDialog(){var _a;this.upgradeDialogComponent.open=true;(_a=this.shareModal)===null||_a===void 0?void 0:_a.close();}shareMapClick(){return __awaiter$2s(this,void 0,void 0,function*(){logWithAmplitude(Navbar_1.amplitude_callsite,'Share Map Click');yield this.copyViewOnlyMapLinkToClipboard();yield this.copyCollaboratorMapLinkToClipboard();this.dispatchEvent(new CustomEvent('on-share-map-click',{detail:{crowdsourceLink:this.crowdsourceLink,viewonlyLink:this.viewonlyLink}}));});}grantAccessClick(){var _a;return __awaiter$2s(this,void 0,void 0,function*(){logWithAmplitude(Navbar_1.amplitude_callsite,'Grant Access Click');if(this.type==='admin-portal'){yield(_a=topicData.mapComponent)===null||_a===void 0?void 0:_a.manageAccessClick();}else{window.location.assign('/#home?page_name=Team%20Settings&setting_type=ManageTeamMembers');}});}signInClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'User Login Click');if(this.signinModalComponent){this.signinModalComponent.open=true;}}proxiBackpackClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'Proxi Backpack Click');window.location.assign(`/#home`);}accountPageClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'Account Page Click');window.location.assign(`/#account`);}startMapClick(){return __awaiter$2s(this,void 0,void 0,function*(){this.loading=true;logWithAmplitude(Navbar_1.amplitude_callsite,'Start Map Click');yield createBackingTopic(Navbar_1.amplitude_callsite);this.loading=false;});}discoverClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'Proxi Discover Click');window.location.assign(`/#discover`);}demoClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'Demo Video Click');const link='https://www.proxi.co/proxi-demo-video';window.open(link,'_blank');// chameleonExperience(ChameleonTour.DemoVideo, undefinedIfEmpty(accountInfo.email) ?? getFromLocalStorage('email') ?? '', false, true); }};Navbar.amplitude_callsite='Nav Bar';__decorate$2v([i$4('#errorToast')],Navbar.prototype,"errorToastElement",void 0);__decorate$2v([i$4('#duplicationModal')],Navbar.prototype,"duplicationModal",void 0);__decorate$2v([i$4('#duplicateDrawer')],Navbar.prototype,"duplicateDrawer",void 0);__decorate$2v([i$4('#shareModal')],Navbar.prototype,"shareModal",void 0);__decorate$2v([i$4('#upgradeDialogComponent')],Navbar.prototype,"upgradeDialogComponent",void 0);__decorate$2v([i$4('#signinModalComponent')],Navbar.prototype,"signinModalComponent",void 0);__decorate$2v([e$5({type:String})],Navbar.prototype,"crowdsourceLink",void 0);__decorate$2v([e$5({type:String})],Navbar.prototype,"viewonlyLink",void 0);__decorate$2v([e$5()],Navbar.prototype,"type",void 0);__decorate$2v([e$5()],Navbar.prototype,"subscription_level_text",void 0);__decorate$2v([t$3()],Navbar.prototype,"loading",void 0);Navbar=Navbar_1=__decorate$2v([n$6('nav-bar')],Navbar);var __decorate$2w=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let AccountAvatar=class AccountAvatar extends s$5{constructor(){super(...arguments);this.indent='0';this.backgroundColor='var(--theme-white-color)';this.textColor='var(--theme-input-color)';this.isTeam=false;this.bindAccountState=new StateController(this,accountInfo);}connectedCallback(){super.connectedCallback();if(this.size==='xl'){this.style.setProperty('--avatar-size','10rem');this.style.setProperty('--avatar-font-size','2rem');}else if(this.size==='lg'){this.style.setProperty('--avatar-size','4.5rem');this.style.setProperty('--avatar-font-size','2rem');}else if(this.size==='sm'){this.style.setProperty('--avatar-size','1.5rem');this.style.setProperty('--avatar-font-size','0.75rem');}else if(this.size==='xs'){this.style.setProperty('--avatar-size','1rem');this.style.setProperty('--avatar-font-size','0.5rem');}else{this.style.setProperty('--avatar-size','3rem');this.style.setProperty('--avatar-font-size','1.5rem');}}updated(changedProperties){if(changedProperties.has('accountInfo')){this.requestUpdate();}}render(){var _a;return $` ${undefinedIfEmpty(this.imageUrl)?$``:$` `} `;}static get styles(){return r$3` .avatar { display: inline-block; vertical-align: middle; position: relative; cursor: pointer; background-color: var(--theme-white-color); border-radius: 50%; overflow: hidden; height: var(--avatar-size); width: var(--avatar-size); box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; border: 1px solid var(--theme-border-color); } .avatarLetters { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-weight: bold; font-size: var(--avatar-font-size); color: var(--theme-input-color); } @media screen and (max-width: 550px) { .avatar { --avatar-size: 2rem; } .avatarLetters { --avatar-font-size: 0.75rem; } } `;}};__decorate$2w([e$5({type:String})],AccountAvatar.prototype,"size",void 0);__decorate$2w([e$5({type:String})],AccountAvatar.prototype,"indent",void 0);__decorate$2w([e$5({type:String})],AccountAvatar.prototype,"backgroundColor",void 0);__decorate$2w([e$5({type:String})],AccountAvatar.prototype,"textColor",void 0);__decorate$2w([e$5({type:Boolean})],AccountAvatar.prototype,"isTeam",void 0);__decorate$2w([e$5({type:String})],AccountAvatar.prototype,"imageUrl",void 0);AccountAvatar=__decorate$2w([n$6('account-avatar')],AccountAvatar);var __decorate$2x=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2t=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let BackpackCard=class BackpackCard extends s$5{constructor(){super(...arguments);this.amplitude_callsite='Backpack Card';this.folders=[];this.isPinned=false;this.isOnly=false;this.canPin=false;this.showRemoveFromFolder=false;this.hideViewerType=false;this.hideMetadata=false;this.hideBookmarkButton=false;this.goToDetailPage=false;this.inCarousel=false;this.hideActions=false;this.onboarding=false;this.loadModals=false;this.mini=false;this.showImage=false;this.userType='Viewer';}updated(changedProperties){if(changedProperties.has('topic')){this.backgroundImage=isDefined(this.topic)?getSmallSocialImageForTopic(this.topic):'';this.checkForBookmarkKeys();this.setUserTypeAndTopicUrl();}}checkForBookmarkKeys(){var _a,_b,_c,_d,_e;if(((_a=this.topic)===null||_a===void 0?void 0:_a.is_owner)===true||((_b=this.topic)===null||_b===void 0?void 0:_b.is_writer)===true){return;}let bookmark=accountInfo.bookmarks.find(bookmark=>{var _a;return bookmark.topic_id===((_a=this.topic)===null||_a===void 0?void 0:_a._id);});for(let i=0;i${this.isPinned?'Remove Pin':'Pin'}`;}if(this.isPinned){return $`push_pin`;}}else{if(this.hideViewerType){return $``;}else{return $`${this.userType}`;}}}removeFromCreatorProfile(){this.dispatchEvent(new CustomEvent('on-remove-from-creator-profile'));}submitAddToFolder(){return __awaiter$2t(this,void 0,void 0,function*(){if(this.selectedFolderId&&this.topic!=null){yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2t(this,void 0,void 0,function*(){var _a,_b,_c,_d;if(this.selectedFolderId&&((_a=this.topic)===null||_a===void 0?void 0:_a._id)){yield addTopicToFolder(this.amplitude_callsite,this.selectedFolderId,(_b=this.topic)===null||_b===void 0?void 0:_b._id.$oid,{});}(_c=this.folderStructureModal)===null||_c===void 0?void 0:_c.close();yield(_d=this.topicToFolderDrawer)===null||_d===void 0?void 0:_d.close();}),'An error has occurred. Context: Failed to add to folder');}});}submitAddToTeam(){return __awaiter$2t(this,void 0,void 0,function*(){if(isDefined(this.topic)&&isDefined(this.selectedTeamId)){yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2t(this,void 0,void 0,function*(){var _a,_b,_c,_d,_e,_f;yield migrateTopicToOrganization(this.amplitude_callsite,(_a=this.selectedTeamId)!==null&&_a!==void 0?_a:'',(_c=(_b=this.topic)===null||_b===void 0?void 0:_b._id.$oid)!==null&&_c!==void 0?_c:'');yield(_d=this.topicToTeamDrawer)===null||_d===void 0?void 0:_d.close();(_e=this.topicToTeamModal)===null||_e===void 0?void 0:_e.close();this.dispatchEvent(new CustomEvent('on-move-topic',{detail:{movedTopicId:(_f=this.topic)===null||_f===void 0?void 0:_f._id.$oid}}));}),'An error has occurred. Context: Failed to add map to team. You may not have the right accesses on the map or the team.');}});}addToTeam(){var _a;return __awaiter$2t(this,void 0,void 0,function*(){if(detectMobileViewport()){yield(_a=this.topicToTeamDrawer)===null||_a===void 0?void 0:_a.open();}else if(this.topicToTeamModal){this.topicToTeamModal.open=true;}});}renderTopRightCTA(){var _a,_b,_c,_d;if(isDefined(this.creatorProfile)){if(!this.creatorProfile.is_owner&&!this.hideBookmarkButton){return $``;}else if(this.canPin){return $`Remove`;}}else if(((_a=this.topic)===null||_a===void 0?void 0:_a.is_owner)===true||((_b=this.topic)===null||_b===void 0?void 0:_b.is_writer)===true){return $` __awaiter$2t(this,void 0,void 0,function*(){return yield this.toggleDuplicateTopic();})} @share-topic=${()=>__awaiter$2t(this,void 0,void 0,function*(){return yield this.toggleShareTopic();})} @move-topic=${this.addToTeam} @add-to-folder=${this.toggleAddToFolder} @delete-topic=${()=>this.triggerDeleteTopic()} @remove-from-folder=${()=>this.toggleRemoveFromFolder()}> `;}else{if(this.hideBookmarkButton){return $``;}return $``;}}removeTopic(){var _a;return __awaiter$2t(this,void 0,void 0,function*(){if(isDefined(this.topic)&&isDefined(this.selectedFolderId)){yield removeTopicFromFolder(this.amplitude_callsite,this.selectedFolderId,(_a=this.topic)===null||_a===void 0?void 0:_a._id.$oid,{});this.dispatchEvent(new CustomEvent('on-remove-topic-from-folder',{detail:{removedTopicId:this.topic._id.$oid}}));this.removeTopicFromFolderModal.close();}});}selectFolderToAdd(e){this.selectedFolderId=e.detail.folderId;}selectTeamToAdd(e){this.selectedTeamId=e.detail.teamId;}openUpgradeDialog(){var _a;this.upgradeDialogComponent.open=true;(_a=this.shareModal)===null||_a===void 0?void 0:_a.close();}render(){var _a,_b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s,_t,_u,_v,_w,_x;return $` ${this.viewType!=='list'?$` ${this.hideActions?'':$` ${this.renderTopLeftCTA()} ${this.renderTopRightCTA()} `} ${this.showImage?$``:''} ${(_b=(_a=this.topic)===null||_a===void 0?void 0:_a.name)!==null&&_b!==void 0?_b:''} ${this.hideMetadata?'':$` place ${(_c=this.topic)===null||_c===void 0?void 0:_c.statistics.approximate_point_count} visibility ${(_d=this.topic)===null||_d===void 0?void 0:_d.statistics.approximate_topic_views} `} `:''} ${this.viewType==='list'?$` ${(_f=(_e=this.topic)===null||_e===void 0?void 0:_e.name)!==null&&_f!==void 0?_f:''} ${(_g=this.topic)===null||_g===void 0?void 0:_g.statistics.approximate_point_count} ${(_h=this.topic)===null||_h===void 0?void 0:_h.statistics.approximate_topic_views} ${new Date((_k=(_j=this.topic)===null||_j===void 0?void 0:_j.updated_at)!==null&&_k!==void 0?_k:'').toLocaleString()} window.open(this.topicUrl)}"> ${((_l=this.topic)===null||_l===void 0?void 0:_l.is_owner)===true||((_m=this.topic)===null||_m===void 0?void 0:_m.is_writer)===true?$` edit Edit `:$` visibility View `} ${this.renderTopRightCTA()} `:''} ${this.loadModals?$` this.shareModal.close()}"> ${((_o=this.topic)===null||_o===void 0?void 0:_o.is_owner)===true||((_p=this.topic)===null||_p===void 0?void 0:_p.is_writer)===true?$` `:$` `} ${detectMobileViewport()?$` __awaiter$2t(this,void 0,void 0,function*(){var _y;yield(_y=this.topicToTeamDrawer)===null||_y===void 0?void 0:_y.close();})}"> Cancel Add `:$` {var _a;return(_a=this.topicToTeamModal)===null||_a===void 0?void 0:_a.close();}}"> {var _a;return(_a=this.topicToTeamModal)===null||_a===void 0?void 0:_a.close();}}"> Cancel Add `} ${detectMobileViewport()?$` __awaiter$2t(this,void 0,void 0,function*(){var _z,_0;(_z=this.folderStructureModal)===null||_z===void 0?void 0:_z.close();yield(_0=this.topicToFolderDrawer)===null||_0===void 0?void 0:_0.close();})}"> Cancel Add `:$` {var _a;return(_a=this.folderStructureModal)===null||_a===void 0?void 0:_a.close();}}"> {var _a;return(_a=this.folderStructureModal)===null||_a===void 0?void 0:_a.close();}}"> Cancel Add `} this.duplicationModal.close()}"> this.duplicationModal.close()}"> this.removeTopicFromFolderModal.close()}"> this.removeTopicFromFolderModal.close()}"> {var _a;return(_a=this.deleteTopicModalComponent)===null||_a===void 0?void 0:_a.close();}}"> __awaiter$2t(this,void 0,void 0,function*(){return yield this.deleteTopic();})}" @close="${()=>{var _a;return(_a=this.deleteTopicModalComponent)===null||_a===void 0?void 0:_a.close();}}"> `:''} this.upgradeDialogComponent.close()}"> this.upgradeDialogComponent.close()}"> `;}static get styles(){return r$3` .backpack-card__wrapper { cursor: pointer; width: 100%; position: relative; border-radius: 0.75rem; overflow: hidden; background: var(--theme-white-color); display: flex; border: solid .1px lightgray; flex-direction: column; } .backpack-card__actions { display: flex; justify-content: space-between; position: absolute; width: inherit; } .backpack-card__info { width: 100%; display: flex; padding: 5px 5px; flex-direction: column; align-items: flex-start; gap: 8px; box-sizing: border-box; } .backpack-card__title-wrapper { width: 100%; display: flex; align-items: center; justify-content: center; } .backpack-card__action--remove { margin: 6px; --mdc-typography-button-text-transform: case; --mdc-typography-button-letter-spacing: 0px; --mdc-theme-primary: var(--main-invalid-color); --mdc-theme-on-primary: var(--theme-input-color); } .backpack-card__action--add-pin { margin: 6px; --mdc-typography-button-text-transform: case; --mdc-typography-button-letter-spacing: 0px; --mdc-theme-primary: var(--main-featured-color); --mdc-theme-on-primary: var(--theme-input-color); } .backpack-card__action--remove-pin { margin: 6px; --mdc-typography-button-text-transform: case; --mdc-typography-button-letter-spacing: 0px; --mdc-theme-primary: white; --mdc-theme-on-primary: var(--theme-input-color); } .backpack-card__pin { padding: 10px; } .backpack-card__avatar { margin-left: 10px; border: 1px solid var(--theme-focus-border-color); border-radius: 50%; height: 40px; margin-top: -12px; margin-right: 4px; } .backpack-card__metadata { width: 100%; display: flex; align-items: center; justify-content: center; color: var(--theme-input-color); gap: 15px; /* color: var(--gray-700, #666276); */ font-size: 12px; line-height: 100%; } .backpack-card__metadata-icon { color: var(--theme-lighter-text-color); padding-right: 4px; --mdc-icon-size: 12px; } .backpack-card__metadata-item { display: flex; align-items: center; } .backpack-card__user-type { padding: 3px 5px; height: 100%; align-self: center; font-size: 12px; color: var(--theme-white-color); border-radius: 6px; background: var(--main-primary-color); margin: 0 10px; } .backpack-card__user-type--Editor { background: var(--main-invalid-color); } .backpack-card__user-type--Owner { background: var(--main-secondary-color); } .backpack-card__image-wrapper { width: 100%; display: flex; } .backpack-card__image { min-width: 100%; min-height: 100%; object-fit: cover; } .shareModalBody { padding: 1.5rem; } .shareModalTitle { font-size: 1.5rem; font-weight: 700; color: var(--main-primary-color); text-align: center; margin-top: 1.5rem; } .actionButtons { display: flex; margin-top: 2rem; justify-content: space-between; } .tr { display: flex; border: 1px solid var(--theme-border-color); padding: 0.25rem 1.5rem; align-items: center; } a { text-decoration: none; color: inherit; } .td { flex: 1; } .td.td-actions { display: flex; justify-content: center; align-items: center; gap: 0.25rem; } .btnIcon { margin-right: 0.25rem; } @media (min-width: 551px) { .desktopOnly { display: block; } .mobileOnly { display: none; } .backpack-card__wrapper--only { max-width: 400px; } .backpack-card__image-wrapper { max-height: 60px; } .backpack-card__title { padding: 0px 5px; margin: 0; vertical-align: top; font-weight: bold; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; color: #454056; font-weight: 700; line-height: 100%; } .small-text { font-size: 0.7rem; white-space: normal; padding: 0; font-weight: normal; white-space: nowrap; } } @media (max-width: 550px) { .desktopOnly { display: none; } .mobileOnly { display: block; } .backpack-card__title { display: block; margin-bottom: 8px; text-align: center; } .small-text { font-size: 0.8rem; white-space: normal; padding: 0; } .backpack-card__avatar { display: block; margin: auto; margin-top: -20px; } .backpack-card__metadata { display: none; } .backpack-card__wrapper { margin-right: 10px; margin-bottom: 10px; } .backpack-card__wrapper--scroll { width: 200px; height: 100%; } .backpack-card__wrapper--scroll .backpack-card__image-wrapper { height: 130px; } } `;}};__decorate$2x([i$4('#errorToast')],BackpackCard.prototype,"errorToastElement",void 0);__decorate$2x([i$4('#deleteTopicModalComponent')],BackpackCard.prototype,"deleteTopicModalComponent",void 0);__decorate$2x([i$4('#duplicationMapComponent')],BackpackCard.prototype,"duplicationModal",void 0);__decorate$2x([i$4('#topicToFolderDrawer')],BackpackCard.prototype,"topicToFolderDrawer",void 0);__decorate$2x([i$4('#folderStructureModal')],BackpackCard.prototype,"folderStructureModal",void 0);__decorate$2x([i$4('#topicToTeamModal')],BackpackCard.prototype,"topicToTeamModal",void 0);__decorate$2x([i$4('#topicToTeamDrawer')],BackpackCard.prototype,"topicToTeamDrawer",void 0);__decorate$2x([i$4('#removeTopicFromFolderModal')],BackpackCard.prototype,"removeTopicFromFolderModal",void 0);__decorate$2x([i$4('#shareModal')],BackpackCard.prototype,"shareModal",void 0);__decorate$2x([i$4('#upgradeDialogComponent')],BackpackCard.prototype,"upgradeDialogComponent",void 0);__decorate$2x([e$5({type:Object})],BackpackCard.prototype,"topic",void 0);__decorate$2x([e$5({type:Array})],BackpackCard.prototype,"folders",void 0);__decorate$2x([e$5({type:Object})],BackpackCard.prototype,"creatorProfile",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"isPinned",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"isOnly",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"canPin",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"showRemoveFromFolder",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"hideViewerType",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"hideMetadata",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"hideBookmarkButton",void 0);__decorate$2x([e$5({type:String})],BackpackCard.prototype,"selectedFolderId",void 0);__decorate$2x([e$5({type:String})],BackpackCard.prototype,"selectedTeamId",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"goToDetailPage",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"inCarousel",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"hideActions",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"onboarding",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"loadModals",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"mini",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"topicUrl",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"crowdsourceLink",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"shareLink",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"viewonlyLink",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"folderInfo",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"selectedFolderInfo",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"showImage",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"viewType",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"readKey",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"readLinkWithKey",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"backgroundImage",void 0);BackpackCard=__decorate$2x([n$6('backpack-card')],BackpackCard);var __decorate$2y=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let InsightCard=class InsightCard extends s$5{constructor(){super(...arguments);this.amplitude_callsite='Insight Card';this.statNumber='None';this.statName='NA';}onClick(){this.dispatchEvent(new CustomEvent('click'));}onActionClick(){this.dispatchEvent(new CustomEvent('action-click'));}render(){var _a,_b,_c;return $` ${(_a=this.statName)!==null&&_a!==void 0?_a:''} ${this.actionString} ${this.blocked===true?'N/A':(_c=(_b=this.statTopic)===null||_b===void 0?void 0:_b.name)!==null&&_c!==void 0?_c:this.statNumber} ${this.blocked===true?$` `:``} ${this.moreInfoText?$` ${this.moreInfoText} `:``} `;}static get styles(){return r$3` .insight-card__wrapper { width: 100%; border-radius: 0.75rem; background: #1d485f; border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; box-sizing: border-box; color: var(--main-secondary-color); overflow: hidden; } .insight-card__stat-number { color: white; font-size: 20px; font-weight: 500; line-height: 130%; position: relative; width: 100%; text-overflow: ellipsis; overflow: hidden; } .insight-card__blocked { position: absolute; width: 100%; height: 100%; top: 0; left: 0; background: rgba(255, 255, 255, 0.75); -webkit-backdrop-filter: blur(9px); /* fixes blur for Safari*/ backdrop-filter: blur(9px); } .insight-card__stat-name { color: var(--theme-input-border-color); font-size: 12px; line-height: 150%; } .insight-card__more-info { color: var(--main-invalid-color); font-size: 12px; font-style: italic; line-height: 100%; margin-top: 1rem; cursor: pointer; } @media (max-width: 500px) { .insight-card__stat-number { font-size: 16px; } `;}};__decorate$2y([i$4('#errorToast')],InsightCard.prototype,"errorToastElement",void 0);__decorate$2y([e$5({type:String})],InsightCard.prototype,"statNumber",void 0);__decorate$2y([e$5({type:Object})],InsightCard.prototype,"statTopic",void 0);__decorate$2y([e$5({type:String})],InsightCard.prototype,"actionString",void 0);__decorate$2y([e$5({type:String})],InsightCard.prototype,"statName",void 0);__decorate$2y([e$5({type:String})],InsightCard.prototype,"changeName",void 0);__decorate$2y([e$5({type:Boolean})],InsightCard.prototype,"blocked",void 0);__decorate$2y([e$5({type:Number})],InsightCard.prototype,"changeNumber",void 0);__decorate$2y([e$5({type:String})],InsightCard.prototype,"moreInfoText",void 0);InsightCard=__decorate$2y([n$6('insight-card')],InsightCard);var __decorate$2z=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let LoadingElement=class LoadingElement extends s$5{constructor(){super(...arguments);this.amplitude_callsite='Loading Element';this.loadingString='Loading';this.horizontal=false;this.small=false;}render(){return $` ${this.loadingString} `;}static get styles(){return r$3` :host { width: 100%; } .loading-element__wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; } .loading-element__loading-image { width: 100px; height: auto; } .horizontal { flex-direction: row; } .small { width: 25px; } `;}};__decorate$2z([e$5({type:String})],LoadingElement.prototype,"loadingString",void 0);__decorate$2z([e$5({type:Boolean})],LoadingElement.prototype,"horizontal",void 0);__decorate$2z([e$5({type:Boolean})],LoadingElement.prototype,"small",void 0);LoadingElement=__decorate$2z([n$6('loading-element')],LoadingElement);var __decorate$2A=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let ProgressElement=class ProgressElement extends s$5{constructor(){super(...arguments);this.amplitude_callsite='Progress Element';this.currentIndex=1;this.totalIndex=1;this.barColor='var(--main-success-color)';}render(){const progressBarWidth=(this.currentIndex+1)/this.totalIndex*100;return $` `;}static get styles(){return r$3` :host { width: 100%; border: 1px solid var(--main-moon-color); border-radius: 4px; background-color: var(--theme-border-color); } .progress-bar { display: flex; gap: 5px; align-items: center; justify-content: center; } .progress-bar { height: 10px; } .progress-dot { width: 10px; height: 10px; border-radius: 50%; background-color: var(--theme-border-color); transition: background-color 0.4s ease-in-out; } .progress-dot.filled { background-color: var(--main-success-color); } .progress-dot.current { background-color: #808080; } `;}};__decorate$2A([e$5({type:Number})],ProgressElement.prototype,"currentIndex",void 0);__decorate$2A([e$5({type:Number})],ProgressElement.prototype,"totalIndex",void 0);__decorate$2A([e$5({type:String})],ProgressElement.prototype,"barColor",void 0);ProgressElement=__decorate$2A([n$6('progress-element')],ProgressElement);var __decorate$2B=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let MultiUserAvatar=class MultiUserAvatar extends s$5{constructor(){super(...arguments);this.backgroundColor='var(--theme-white-color)';this.textColor='var(--theme-input-color)';this.users=[];this.maxAvatars=6;this.bindAccountState=new StateController(this,accountInfo);}connectedCallback(){super.connectedCallback();if(this.size==='xl'){this.style.setProperty('--avatar-size','10rem');this.style.setProperty('--avatar-font-size','2rem');}else if(this.size==='lg'){this.style.setProperty('--avatar-size','4.5rem');this.style.setProperty('--avatar-font-size','2rem');}else if(this.size==='sm'){this.style.setProperty('--avatar-size','1.5rem');this.style.setProperty('--avatar-font-size','0.75rem');}else{this.style.setProperty('--avatar-size','3rem');this.style.setProperty('--avatar-font-size','1.5rem');}}render(){var _a;const usersCount=(_a=this.users.length)!==null&&_a!==void 0?_a:0;const showPlusCircle=usersCount>this.maxAvatars;return $` ${this.users.slice(0,this.maxAvatars).map((user,index)=>{var _a,_b,_c,_d;return $` ${getInitials((_c=user.name)!==null&&_c!==void 0?_c:'',(_d=user.email)!==null&&_d!==void 0?_d:'')} `;})} ${showPlusCircle?$` +${usersCount-this.maxAvatars} `:''} `;}static get styles(){return r$3` .avatarOverlay { position: relative; z-index: 1; } .plusCircle { display: flex; justify-content: center; align-items: center; border-radius: 50%; width: var(--avatar-size); height: var(--avatar-size); box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; font-size: var(--avatar-font-size); cursor: pointer; border: 1px solid var(--theme-border-color); background-color: var(--theme-white-color); } `;}};__decorate$2B([e$5({type:String})],MultiUserAvatar.prototype,"size",void 0);__decorate$2B([e$5({type:String})],MultiUserAvatar.prototype,"backgroundColor",void 0);__decorate$2B([e$5({type:String})],MultiUserAvatar.prototype,"textColor",void 0);__decorate$2B([e$5({type:Array})],MultiUserAvatar.prototype,"users",void 0);__decorate$2B([t$3()],MultiUserAvatar.prototype,"maxAvatars",void 0);MultiUserAvatar=__decorate$2B([n$6('multi-user-avatar')],MultiUserAvatar);var __decorate$2C=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let CategoryPill=class CategoryPill extends s$5{constructor(){super(...arguments);this.checked=false;}handleClick(e){var _a,_b;this.dispatchEvent(new CustomEvent('select',{detail:(_b=(_a=this.value)===null||_a===void 0?void 0:_a._id)===null||_b===void 0?void 0:_b.$oid}));}render(){var _a,_b;const containerClass=`pillItem${this.checked?' selected':''}`;const selectedIconClass=`selectedIcon${this.checked?'':' displayNone'}`;const pillIconClass=this.checked?'displayNone':'';return $` check ${(_b=this.value)===null||_b===void 0?void 0:_b.name} `;}static get styles(){return r$3` .pillItem { display: flex; align-items: center; padding: 2px 4px; background: transparent; border: 2px solid var(--theme-border-color); border-radius: 40px; font-size: 12px; font-weight: 500; cursor: pointer; margin-right: 0.25rem; margin-bottom: 0.25rem; } .pillItem.selected { background: var(--main-primary-color); color: var(--theme-white-color); } .pillTitle { padding: 0 0.75rem; } .selectedIcon { border: 2px solid var(--theme-white-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; } mwc-icon { --mdc-icon-size: 1rem; } .displayNone { display: none; } `;}};__decorate$2C([e$5({type:Object})],CategoryPill.prototype,"value",void 0);__decorate$2C([e$5({type:Boolean})],CategoryPill.prototype,"checked",void 0);CategoryPill=__decorate$2C([n$6('category-pill')],CategoryPill);var __decorate$2D=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2u=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let CategorySelector=class CategorySelector extends s$5{constructor(){super(...arguments);this.canAddCategory=false;this.dropdown=false;this.dropdownOpen=false;this.previewMode=false;this.amplitude_callsite='category-selector';this.bindTopicState=new StateController(this,topicData);}connectedCallback(){const _super=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});var _a,_b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p;return __awaiter$2u(this,void 0,void 0,function*(){_super.connectedCallback.call(this);if(this.value===undefined){// allow a delay for the form to fully render. This doesn't really impact experience at the moment // because the form loads in the background yield delay(1000);let autoSelectedCategory;// if there are lots of options and one isn't already set, we want to force a selection // dropdown is only on when there are more than 8 // if the user has selected a category before, we want to keep that selection but keep this before the url check because the url check will override this const previous_stored=getFromLocalStorage(`${topicData.topicId}_last_category`);const previous_stored_cat=(_b=(_a=topicData.topic)===null||_a===void 0?void 0:_a.categories)===null||_b===void 0?void 0:_b.find(c=>{var _a;return((_a=c._id)===null||_a===void 0?void 0:_a.$oid)===previous_stored;});if(!this.dropdown&&!this.previousValue){const d=this.isWriter?(_f=(_e=(_d=(_c=topicData.topic)===null||_c===void 0?void 0:_c.categories)===null||_d===void 0?void 0:_d[0])===null||_e===void 0?void 0:_e._id)===null||_f===void 0?void 0:_f.$oid:(_l=(_k=(_j=(_h=(_g=topicData.topic)===null||_g===void 0?void 0:_g.categories)===null||_h===void 0?void 0:_h.filter(c=>c.can_crowdsource))===null||_j===void 0?void 0:_j[0])===null||_k===void 0?void 0:_k._id)===null||_l===void 0?void 0:_l.$oid;autoSelectedCategory=previous_stored_cat?(_m=previous_stored_cat._id)===null||_m===void 0?void 0:_m.$oid:d;}else if(!this.previousValue&&previous_stored_cat){autoSelectedCategory=previous_stored;}// check url parameters for categories and get the first in the comma separated list const urlParams=new URLSearchParams(window.location.search);const categoryNames=urlParams.get('categories');if(categoryNames!==null){const categoryIds=categoryNames.split(',').map(c=>{var _a,_b;return(_b=(_a=topicData.topic)===null||_a===void 0?void 0:_a.categories)===null||_b===void 0?void 0:_b.find(cat=>cat.name.toLowerCase()===c.toLowerCase());}).filter(isDefined).map(c=>{var _a;return(_a=c._id)===null||_a===void 0?void 0:_a.$oid;});if(categoryIds.length>0){autoSelectedCategory=categoryIds[0];}}this.value=(_p=(_o=this.previousValue)!==null&&_o!==void 0?_o:autoSelectedCategory)!==null&&_p!==void 0?_p:undefined;this.dispatchEvent(new CustomEvent('select',{detail:this.value}));this.requestUpdate();};});}get isWriter(){return this.previewMode?false:topicData.isWriter;}handleSelect(e){this.value=e.detail;this.dispatchEvent(new CustomEvent('select',{detail:this.value}));if(this.dropdown){this.dropdownOpen=false;}this.requestUpdate();}reportValidity(){return this.value!==undefined;}createNewCategory(){this.editableCategory={_id:undefined,name:'New Category',can_crowdsource:true,icon:'https://img.icons8.com/?size=48&id=63763&format=png',icon_size:undefined};}cancelCreateNewCategory(){this.editableCategory=undefined;}saveNewCategory(){var _a,_b,_c,_d;return __awaiter$2u(this,void 0,void 0,function*(){if(this.editableCategory!==undefined){this.editableCategory.name=(_b=(_a=this.categoryNameInput)===null||_a===void 0?void 0:_a.textContent)!==null&&_b!==void 0?_b:'New Category';this.editableCategory.icon=yield this.getSuggestedIcon(this.editableCategory.name);const categories=[...((_d=(_c=topicData.topic)===null||_c===void 0?void 0:_c.categories)!==null&&_d!==void 0?_d:[]),this.editableCategory];yield topicData.fetchAndUpdateTopicData({categories},this.amplitude_callsite,true,true);this.requestUpdate();this.editableCategory=undefined;}});}getSuggestedIcon(category_name){return __awaiter$2u(this,void 0,void 0,function*(){let suggestedIcons=[];for(let i=0;i2){break;}else if(i===0&&category_name.endsWith('s')){category_name=category_name.slice(0,-1);}else if(i===1){const words=category_name.split(' ');category_name=words[0];}}if(suggestedIcons.length===0){return'https://img.icons8.com/?size=48&id=63763&format=png';}return`https://img.icons8.com/${suggestedIcons[0].platform}/${suggestedIcons[0].commonName}.png`;});}render(){var _a,_b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m;const availableCategories=(_b=(_a=topicData.topic)===null||_a===void 0?void 0:_a.categories)===null||_b===void 0?void 0:_b.filter(c=>c.can_crowdsource);this.value=isDefined(this.previousValue)?this.previousValue:this.dropdown?undefined:(_d=(_c=availableCategories===null||availableCategories===void 0?void 0:availableCategories[0])===null||_c===void 0?void 0:_c._id)===null||_d===void 0?void 0:_d.$oid;return $` ${this.dropdown&&!this.dropdownOpen?$` {this.dropdownOpen=!this.dropdownOpen;}}"> {var _a;return((_a=c._id)===null||_a===void 0?void 0:_a.$oid)===this.value;})}> ${this.dropdownOpen?'':this.value?'Change':'Select'} ${this.dropdownOpen?$` ${(_h=this.isWriter?(_e=topicData.topic)===null||_e===void 0?void 0:_e.categories:(_g=(_f=topicData.topic)===null||_f===void 0?void 0:_f.categories)===null||_g===void 0?void 0:_g.filter(c=>c.can_crowdsource))===null||_h===void 0?void 0:_h.map(c=>{var _a;return $` `;})} `:null} `:$` ${(_m=this.isWriter?(_j=topicData.topic)===null||_j===void 0?void 0:_j.categories:(_l=(_k=topicData.topic)===null||_k===void 0?void 0:_k.categories)===null||_l===void 0?void 0:_l.filter(c=>c.can_crowdsource))===null||_m===void 0?void 0:_m.map(c=>{var _a;return $` `;})} ${this.canAddCategory===true&&this.isWriter&&this.editableCategory===undefined?$` add New Category `:''} ${this.canAddCategory===true&&this.isWriter&&this.editableCategory!==undefined?$` Type Name Here check close `:''} `} `;}static get styles(){return r$3` :host { font-family: var(--custom-font), 'Montserrat', sans-serif; } .invalid { border: var(--main-warning-color) 2px solid; border-radius: 5px; } .arrow { font-size: 0.6rem; text-decoration: underline; } .pillsContainer { display: flex; flex-wrap: wrap; margin-top: 0.5rem; } .pill-button { display: flex; align-items: center; cursor: pointer; } category-pill { display: flex; align-items: center; } .clickable { cursor: pointer; } .editable { cursor: text; } .action-icon { --mdc-icon-size: 24px; margin-left: 8px; margin-bottom: 8px; cursor: pointer; } .tags-categories__item { background-color: white; border: 2px solid var(--theme-border-color); border-radius: 50px; padding: 2px 10px; margin-bottom: 4px; font-family: var(--custom-font) 'Montserrat'; } .tags-categories__sell { --mdc-icon-size: 14px; vertical-align: text-bottom; } .tags-categories__item.over { outline: 2px dotted #666; } .tags-categories__item.tags-categories__item--group { background-color: #EFECF3; } .tags-categories__item.active { border: 3px solid var(--main-primary-color); } .tags-categories__item--image { vertical-align: text-bottom; } `;}};__decorate$2D([i$4('#categoryName')],CategorySelector.prototype,"categoryNameInput",void 0);__decorate$2D([e$5({type:String})],CategorySelector.prototype,"previousValue",void 0);__decorate$2D([e$5({type:Boolean})],CategorySelector.prototype,"canAddCategory",void 0);__decorate$2D([e$5({type:Object})],CategorySelector.prototype,"editableCategory",void 0);__decorate$2D([e$5({type:Boolean})],CategorySelector.prototype,"dropdown",void 0);__decorate$2D([t$3()],CategorySelector.prototype,"dropdownOpen",void 0);__decorate$2D([t$3()],CategorySelector.prototype,"previewMode",void 0);CategorySelector=__decorate$2D([n$6('category-selector')],CategorySelector);var __decorate$2E=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2v=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let ConfirmModal=class ConfirmModal extends s$5{constructor(){super(...arguments);this.heading='Confirm';this.content='Are you sure?';this.cancelButtonText='Cancel';this.submitButtonText='Confirm';}handleSubmit(){return __awaiter$2v(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent('confirm'));});}handleCancel(){return __awaiter$2v(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent('close'));});}render(){return $` ${this.heading} ${this.content} ${this.cancelButtonText} ${this.submitButtonText} `;}static get styles(){return r$3` .folderModalContent { padding: 0.5rem 1.5rem 1rem; } #modalTitle { margin-bottom: 1.25rem; color: var(--main-primary-color); display: flex; algin-items: center; justify-content: center; } .actionButtonsWrapper { margin-top: 1.5rem; display: flex; justify-content: center; } form-button { padding: 0.5rem; } `;}};ConfirmModal.amplitude_callsite='Confirm Modal';__decorate$2E([e$5({type:String})],ConfirmModal.prototype,"heading",void 0);__decorate$2E([e$5({type:String})],ConfirmModal.prototype,"content",void 0);__decorate$2E([e$5({type:String})],ConfirmModal.prototype,"cancelButtonText",void 0);__decorate$2E([e$5({type:String})],ConfirmModal.prototype,"submitButtonText",void 0);ConfirmModal=__decorate$2E([n$6('confirm-modal')],ConfirmModal);var __decorate$2F=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FolderAccordion=class FolderAccordion extends s$5{render(){var _a,_b,_c;return $` ${this.hasChildren===true?$` {var _a;return this.opened=!((_a=this.opened)!==null&&_a!==void 0?_a:false);}}>${((_b=this.opened)!==null&&_b!==void 0?_b:false)?'expand_less':'expand_more'} `:$``} ${((_c=this.opened)!==null&&_c!==void 0?_c:false)?$` `:''} `;}static get styles(){return r$3` .accordionPanel.noAncestors { width: 100%; } .headingWrapper { display: flex; align-items: center; } .headingName { display: flex; align-items: center; cursor: pointer; } .spacer { width: 30px; } mwc-icon { cursor: pointer; margin-right: 0.5rem; size: 12px; } .toggleIcon { margin-left: 2px; margin-right: 7px; --mdc-icon-size: 16px; } .contentWrapper { padding-left: 0.5rem; } `;}};__decorate$2F([e$5({type:Boolean})],FolderAccordion.prototype,"opened",void 0);__decorate$2F([e$5({type:Boolean})],FolderAccordion.prototype,"hasChildren",void 0);__decorate$2F([e$5({type:Boolean})],FolderAccordion.prototype,"hasAncestors",void 0);FolderAccordion=__decorate$2F([n$6('folder-accordion')],FolderAccordion);var __decorate$2G=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FolderCard=class FolderCard extends s$5{render(){return $` folder `;}static get styles(){return r$3` .folderIcon { margin-right: 1.5rem; font-size: 2rem; } .folderCard { display: flex; align-items: center; padding: 1.5rem 2rem; margin: 0.5rem; border-radius: 0.75rem; overflow: hidden; cursor: pointer; background: var(--theme-white-color); box-shadow: 0px 2px 2px -2px rgba(31, 27, 45, 0.08), 0px 4px 12px rgba(31, 27, 45, 0.08); } `;}};FolderCard=__decorate$2G([n$6('folder-card')],FolderCard);var __decorate$2H=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2w=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};var FolderMenu_1;let FolderMenu=FolderMenu_1=class FolderMenu extends s$5{constructor(){super(...arguments);this.isOwner=false;this.isWriter=false;this.bindAccountState=new StateController(this,accountInfo);}firstUpdated(){return __awaiter$2w(this,void 0,void 0,function*(){yield this.startup();});}startup(){return __awaiter$2w(this,void 0,void 0,function*(){this.cornerMenu.anchor=this.menuConnect;});}openMenu(){this.cornerMenu.open=true;}render(){if(!this.isOwner&&!this.isWriter)return'';return $` drive_file_rename_outline Rename ${featuresInfo.addFolderEditorsEnabled?$` folder_shared `:$` `} Manage Access subdirectory_arrow_right New Sub Folder ${this.isOwner?$` delete Delete Folder `:''} `;}static get styles(){return r$3` :host { --mdc-menu-min-width: min(100vw, 232px); --mdc-typography-subtitle1-font-size: 12px; --context-menu-color: var(--theme-input-color); --mdc-icon-button-size: 1.5rem; } .menuIcon { color: var(--context-menu-color); cursor: pointer; --mdc-icon-size: 16px; } .menuPng { margin-right: 0.25rem; height: 20px; margin-top: auto; color: var(--context-menu-color); cursor: pointer; } mwc-list-item { --mdc-menu-item-height: 2.5rem; color: var(--context-menu-color); } mwc-list-item:hover { --context-menu-color: var(--main-primary-color); font-weight: 500; } .flexContainer { display: flex; align-items: center; } @media only screen and (max-width: 550px) { .menuPng { margin-top: 20px; } } `;}renameClick(){logWithAmplitude(FolderMenu_1.amplitude_callsite,'Folder Rename Click');this.dispatchEvent(new CustomEvent('rename-folder',{detail:{type:'rename-folder'}}));}manageAccessClick(){logWithAmplitude(FolderMenu_1.amplitude_callsite,'Folder Manage Access Click');this.dispatchEvent(new CustomEvent('manage-folder-access',{detail:{type:'manage-folder-access'}}));}newSubFolderClick(){logWithAmplitude(FolderMenu_1.amplitude_callsite,'Folder New Subfolder Click');this.dispatchEvent(new CustomEvent('add-sub-folder',{detail:{type:'add-sub-folder'}}));}deleteFolderClick(){logWithAmplitude(FolderMenu_1.amplitude_callsite,'Folder Delete Click');this.dispatchEvent(new CustomEvent('delete-folder',{detail:{type:'delete-folder'}}));}};FolderMenu.amplitude_callsite='Folder Menu';__decorate$2H([i$4('#errorToast')],FolderMenu.prototype,"errorToastElement",void 0);__decorate$2H([i$4('#cornerMenu')],FolderMenu.prototype,"cornerMenu",void 0);__decorate$2H([i$4('#menuConnect')],FolderMenu.prototype,"menuConnect",void 0);__decorate$2H([e$5({type:Boolean})],FolderMenu.prototype,"isOwner",void 0);__decorate$2H([e$5({type:Boolean})],FolderMenu.prototype,"isWriter",void 0);FolderMenu=FolderMenu_1=__decorate$2H([n$6('folder-menu')],FolderMenu);var __decorate$2I=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormButton=class FormButton extends s$5{constructor(){super(...arguments);this.fullWidth=false;this.fullHeight=false;this.size='md';this.customFont=false;this.variant='raised';this.vertical=false;}connectedCallback(){var _a,_b,_c,_d;super.connectedCallback();if(this.borderStyle==='round'){this.style.setProperty('--btn-border-radius','1.5rem');}else if(this.borderStyle==='side'){this.style.setProperty('--btn-border-radius','0 0.5rem 0.5rem 0');}else if(this.borderStyle==='none'){this.style.setProperty('--btn-border-radius','0');}else{this.style.setProperty('--btn-border-radius','4px');}if(this.size==='sm'){this.style.setProperty('--btn-font-size','12px');this.style.setProperty('--btn-padding-y','0.3rem');this.style.setProperty('--mdc-icon-size','16px');}else if(this.size==='md'){this.style.setProperty('--btn-font-size','0.8rem');this.style.setProperty('--btn-padding-y','0.4rem');this.style.setProperty('--btn-padding-x','1rem');this.style.setProperty('--mdc-icon-size','24px');}else if(this.size==='lg'){this.style.setProperty('--btn-font-size','1rem');this.style.setProperty('--btn-padding-y','0.6rem');this.style.setProperty('--btn-padding-x','1rem');this.style.setProperty('--mdc-icon-size','32px');}else if(this.size==='xs'){this.style.setProperty('--btn-font-size','0.2rem');this.style.setProperty('--btn-padding-y','0.25rem');this.style.setProperty('--btn-padding-x','0.5rem');this.style.setProperty('--mdc-icon-size','12px');}if(this.customFont===true){this.style.setProperty('font-family','var(--custom-font))');}if(this.variant==='outline'){this.style.setProperty('--btn-background-color','transparent');this.style.setProperty('--btn-hover-opacity','1');this.style.setProperty('--btn-hover-color','var(--main-primary-opacity-color)');this.style.setProperty('--btn-border-color',`${(_a=this.textColor)!==null&&_a!==void 0?_a:'var(--main-primary-color)'}`);this.style.setProperty('--btn-label-color','var(--main-primary-color)');}else if(this.variant==='outlinewarning'){this.style.setProperty('--btn-background-color','transparent');this.style.setProperty('--btn-hover-opacity','1');this.style.setProperty('--btn-hover-color','var(--main-primary-opacity-color)');this.style.setProperty('--btn-border-color','var(--main-invalid-color)');this.style.setProperty('--btn-label-color','var(--main-invalid-color)');}else if(this.variant==='social'){this.style.setProperty('--btn-background-color','transparent');this.style.setProperty('--btn-hover-opacity','1');this.style.setProperty('--btn-hover-color','var(--main-primary-color)');this.style.setProperty('--btn-border-color','var(--main-primary-color)');this.style.setProperty('--btn-label-color','var(--main-primary-color)');}else if(this.variant==='navbutton'){this.style.setProperty('--btn-background-color','transparent');this.style.setProperty('--btn-hover-opacity','1');this.style.setProperty('--btn-hover-color','var(--main-primary-color)');this.style.setProperty('--btn-border-color','transparent');this.style.setProperty('--btn-label-color','var(--main-primary-color)');this.style.setProperty('--btn-padding-x','5px');}else if(this.variant==='transparentoutline'){this.style.setProperty('--btn-hover-opacity','1');this.style.setProperty('--btn-background-color','#FFFFFF50');this.style.setProperty('--btn-hover-color','var(--main-primary-color)');// eslint-disable-next-line no-empty }else if(this.variant==='custom'){}else if(this.variant==='horizontaltall'){this.style.setProperty('--btn-flex-direction','column');this.style.setProperty('--btn-white-space','wrap');this.style.setProperty('justify-content','space-evenly');}else{this.style.setProperty('--btn-hover-color','var(--btn-background-color)');this.style.setProperty('--btn-border-color','transparent');this.style.setProperty('--btn-label-color','var(--theme-white-color)');// if background color is white, set border color to theme border color if(((_b=this.backgroundColor)===null||_b===void 0?void 0:_b.toLowerCase())==='#ffffff'||this.backgroundColor==='white'||this.backgroundColor===`var('--theme-white-color'))`||((_c=this.backgroundColor)===null||_c===void 0?void 0:_c.toLowerCase())==='#fff'){this.style.setProperty('--btn-border-color',(_d=this.textColor)!==null&&_d!==void 0?_d:'var(--theme-border-color)');}}if(this.vertical===false){this.style.setProperty('--btn-flex-direction','row');this.style.setProperty('--btn-white-space','nowrap');}else{this.style.setProperty('--btn-flex-direction','column');this.style.setProperty('--btn-white-space','wrap');this.style.setProperty('--btn-padding-y','0.25rem');}if(this.backgroundColor){this.style.setProperty('--btn-background-color',this.backgroundColor);const textColor=getVisibleTextColor(this.backgroundColor);this.style.setProperty('--btn-label-color',textColor);// set hover color to 20% darker const hoverColor=tinycolor(this.backgroundColor).darken(20).toString();this.style.setProperty('--btn-hover-color',hoverColor);}if(this.textColor){this.style.setProperty('--btn-label-color',this.textColor);}}render(){return $` ${this.icon?$` ${this.icon}`:''} `;}static get styles(){return r$3` .form-btn { display: flex; flex-direction: var(--btn-flex-direction); justify-content: center; align-items: center; width: 100%; color: var(--btn-label-color); text-align: center; text-decoration: none; white-space: var(--btn-white-space); vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; user-select: none; background-color: var(--btn-background-color, ${o$3(palette.primaryBlue)}); border: 1px solid var(--btn-border-color); padding: var(--btn-padding-y) var(--btn-padding-x, 0.5rem); font-size: var(--btn-font-size) 0.8rem; border-radius: var(--btn-border-radius); transition: all 0.2s ease-in-out; font-family: var(--main-font) } .form-btn:hover { opacity: var(--btn-hover-opacity, 0.8); color: var(--theme-white-color); background-color: var(--btn-hover-color, ${o$3(palette.primaryBlue)}); } .form-btn:disabled { color: var(--main-moon-color); cursor: not-allowed; } @media screen and (max-width: 900px) { .form-btn { font-size: 0.7rem; line-height: 1; font-weight: normal; } } `;}};__decorate$2I([e$5({type:String})],FormButton.prototype,"type",void 0);__decorate$2I([e$5({type:Boolean})],FormButton.prototype,"disabled",void 0);__decorate$2I([e$5({type:Boolean})],FormButton.prototype,"fullWidth",void 0);__decorate$2I([e$5({type:Boolean})],FormButton.prototype,"fullHeight",void 0);__decorate$2I([e$5({type:String})],FormButton.prototype,"borderStyle",void 0);__decorate$2I([e$5({type:String})],FormButton.prototype,"size",void 0);__decorate$2I([e$5({type:Boolean})],FormButton.prototype,"customFont",void 0);__decorate$2I([e$5({type:String})],FormButton.prototype,"variant",void 0);__decorate$2I([e$5({type:Boolean})],FormButton.prototype,"vertical",void 0);__decorate$2I([e$5({type:String})],FormButton.prototype,"backgroundColor",void 0);__decorate$2I([e$5({type:String})],FormButton.prototype,"textColor",void 0);__decorate$2I([e$5({type:String})],FormButton.prototype,"icon",void 0);FormButton=__decorate$2I([n$6('form-button')],FormButton);var __decorate$2J=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormCheckbox=class FormCheckbox extends s$5{constructor(){super(...arguments);this.class_name='';}handleChangeChecked(e){this.checked=e.target.checked;this.dispatchEvent(new CustomEvent('change',{detail:e.target}));this.requestUpdate();}render(){return $` `;}static get styles(){return r$3` :host { --form-checkbox-border-color: var(--theme-checkbox-color); --form-checkbox-label-color: var(--theme-input-color); } .form-check { display: flex; min-height: 1.5rem; align-items: center; } .form-check-input { width: 1rem; height: 1rem; margin: 0.2rem 0; vertical-align: top; background-color: transparent; background-repeat: no-repeat; background-position: center; background-size: contain; border: 2px solid var(--form-checkbox-border-color); -webkit-appearance: none; -moz-appearance: none; appearance: none; -webkit-print-color-adjust: exact; color-adjust: exact; } .form-check-input[type="checkbox"] { border-radius: 0.1875rem; } .form-check-input:active { filter: 0; } .form-check-input:focus { outline: 0; box-shadow: 0; } .form-check-input:checked { background-color: transparent; } .form-check-input:checked[type="checkbox"] { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23102c3d' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e"); } .form-check-input.blue:checked[type="checkbox"] { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23689D9D' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e"); } .form-check-input[type="checkbox"]:indeterminate { background-color: var(--main-primary-color); border-color: var(--main-primary-color); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e"); } .form-check-input:disabled { pointer-events: none; filter: none; opacity: 0.5; } .form-check-input[disabled] ~ .form-check-label, .form-check-input:disabled ~ .form-check-label { opacity: 0.5; } .form-check-input[disabled] ~ .form-check-label, .form-check-input:disabled ~ .form-check-label { opacity: 0.5; } .form-check-label { color: var(--form-checkbox-label-color); padding-left: 0.5rem; word-break: break-all; } `;}};__decorate$2J([e$5({type:String})],FormCheckbox.prototype,"name",void 0);__decorate$2J([e$5({type:Boolean})],FormCheckbox.prototype,"checked",void 0);__decorate$2J([e$5({type:String})],FormCheckbox.prototype,"class_name",void 0);__decorate$2J([e$5({type:Boolean})],FormCheckbox.prototype,"indeterminate",void 0);__decorate$2J([e$5({type:Boolean})],FormCheckbox.prototype,"disabled",void 0);FormCheckbox=__decorate$2J([n$6('form-checkbox')],FormCheckbox);var __decorate$2K=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormInput=class FormInput extends s$5{constructor(){super(...arguments);this.prefix='';this.prefixIcon='';this.disabled=false;}get hasPrefix(){return this.prefix.length>0;}handleChange(e){this.value=e.target.value;this.dispatchEvent(new CustomEvent('change',{detail:e.target}));}handleInputSubmit(e){e.preventDefault();this.dispatchEvent(new CustomEvent('submit',{detail:this.formInputElement.value}));return false;}reportValidity(){var _a;if(this.type==='email'&&this.value!==undefined){return validateEmail(this.value);}return(_a=this.formInputElement)===null||_a===void 0?void 0:_a.reportValidity();}render(){var _a,_b,_c,_d;const maxLimit=this.topLabel?this.topLabel:this.maxLength?`${this.maxLength} chars`:'';return $` ${this.label} ${this.hideMaxLength===true?'':$` ${maxLimit} `} ${this.prefixIcon?$`${this.prefixIcon}`:''} ${this.hasPrefix?$`${this.prefix}`:''} ${this.hasAdd===true?$` add `:''} `;}static get styles(){return r$3` .form-input__prefix { font-weight: 800; font-size: 18px; align-self: center; padding: 10px 6px; background: var(--theme-lightest-color); border: 1px solid var(--theme-input-border-color); border-right: none; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .form-input__wrapper { display: flex; position: relative; } .form-label { line-height: 1rem; font-size: 0.8rem; font-weight: 500; color: var(--theme-input-color); display: flex; justify-content: space-between; align-items: flex-end; } .form-label .max-limit { color: var(--theme-input-color); font-size: 0.8rem; font-weight: normal; padding-left: 1rem; } .form-control { display: block; width: 100%; box-sizing: border-box; padding: 10px; font-size: 0.75rem; line-height: 1.5; color: var(--theme-input-color); border: 1px solid var(--theme-input-border-color); background-color: var(--theme-white-color); background-clip: padding-box; -webkit-appearance: none; -moz-appearance: none; appearance: none; border-top-right-radius: 6px; border-bottom-right-radius: 6px; box-shadow: inset 0 1px 2px transparent; transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .form-control--rounded { border-top-left-radius: 6px; border-bottom-left-radius: 6px; } .form-control--no-border { border: none; } input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px white inset; } .form-control:focus { border-color: var(--theme-focus-border-color); background-color: var(var(--theme-white-color)); outline: 0; } .form-control--disabled { background-color: var(--theme-lightest-color); opacity: 0.7; } .form-control--prefix-icon { padding-left: 2.5rem; } .form-control:invalid, .form-control.is-invalid { border-color: var(--main-invalid-color); padding-right: calc(1.5em + 1.15rem); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%23EA8567' fill-rule='evenodd'%3e%3cpath d='M9 3a6 6 0 1 0 0 12A6 6 0 1 0 9 3zM1.5 9a7.5 7.5 0 1 1 15 0 7.5 7.5 0 1 1-15 0zM9 5.25a.75.75 0 0 1 .75.75v3a.75.75 0 1 1-1.5 0V6A.75.75 0 0 1 9 5.25zM8.25 12a.75.75 0 0 1 .75-.75h.008a.75.75 0 1 1 0 1.5H9a.75.75 0 0 1-.75-.75z'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right calc(0.375em + 0.2875rem) center; background-size: calc(0.75em + 0.575rem) calc(0.75em + 0.575rem); } .form-control::placeholder { color: var(--theme-input-color); opacity: 1; } .form-input__add { position: absolute; cursor: pointer; top: 6px; right: 6px; padding: 0.25rem; --mdc-icon-size: 1.5rem; color: var(--main-primary-color); } .form-input__prefix__icon { position: absolute; left: 6px; top: 6px; padding: 0.25rem; --mdc-icon-size: 1.5rem; color: var(--theme-input-color); } `;}};__decorate$2K([i$4('#formInput')],FormInput.prototype,"formInputElement",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"value",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"type",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"label",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"placeholder",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"prefix",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"prefixIcon",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"maxLength",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"topLabel",void 0);__decorate$2K([e$5({type:Boolean})],FormInput.prototype,"required",void 0);__decorate$2K([e$5({type:Boolean})],FormInput.prototype,"hideMaxLength",void 0);__decorate$2K([e$5({type:Boolean})],FormInput.prototype,"noBorder",void 0);__decorate$2K([e$5({type:Boolean})],FormInput.prototype,"hasAdd",void 0);__decorate$2K([e$5({type:Boolean})],FormInput.prototype,"disabled",void 0);FormInput=__decorate$2K([n$6('form-input')],FormInput);var __decorate$2L=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormInputButton=class FormInputButton extends s$5{constructor(){super(...arguments);this.type='topic';this.label='';this.placeholder='';this.isOwner=false;this.isOpenMobileSelectBox=false;this.hideRole=false;this.value='';this.currentOption='';this.options=this.type!==undefined&&isDefined(AccessCollection[this.type])?AccessCollection[this.type].filter(accessItem=>accessItem.limited===false||this.isOwner).map(accessItem=>{return{value:accessItem.value,name:accessItem.name};}):[];}updated(changedProperties){var _a,_b,_c;if(changedProperties.has('type')){this.options=this.type!==undefined&&isDefined(AccessCollection[this.type])?AccessCollection[this.type].filter(accessItem=>accessItem.limited===false||this.isOwner).map(accessItem=>{return{value:accessItem.value,name:accessItem.name};}):[];this.currentOption=(_a=undefinedIfEmpty(this.value))!==null&&_a!==void 0?_a:(_c=this.options[((_b=this.options)===null||_b===void 0?void 0:_b.length)-1])===null||_c===void 0?void 0:_c.value;this.requestUpdate();}}handleChange(e){this.value=e.target.value;}handleClick(e){this.dispatchEvent(new CustomEvent('submit',{detail:{value:this.value,option:this.currentOption}}));this.value='';}handleClickOption(newValue){if(!newValue||newValue===''){return;}this.currentOption=newValue;this.toggleOpenSelectBox();}toggleOpenSelectBox(){this.isOpenMobileSelectBox=!this.isOpenMobileSelectBox;}render(){var _a,_b,_c;return $` ${this.label!==''?$` ${this.label} `:''} ${this.hideRole?'':$` this.handleClickOption(e.target.value)}" > ${this.options.map(option=>{return $` ${option.name} `;})} `} `;}static get styles(){return r$3` .flexContainer { display: flex; align-items: center; gap: 5px; } .alignCenter { align-items: center; } .inputLabel { font-size: 20px; color: var(--main-primary-color); margin-bottom: 0.5rem; } #accessLevel { width: 165px; padding-left: 1rem; padding-right: 1rem; border: 1px solid var(--main-primary-color); margin-left: -1px; display: flex; flex-direction: column; justify-content: center; position: relative; } #currentMenuOption { display: flex; align-items: center; justify-content: space-between; cursor: pointer; } #cornerMenu { position: absolute; margin-top: -60%; background: white; border: 1px solid var( --theme-border-color); } #textbox { flex: 1; } #textbox:focus { border-color: var(--theme-focus-border-color); background-color: var(--theme-white-color); outline: 0; } .form-btn { margin-left: -1px; min-width: 134px; } .form-btn:hover { opacity: 0.8; } .sendButton { color: var(--main-success-color); } #overlayBackground { background: var(--theme-overlay-background-color); width: 100%; height: 100%; position: absolute; top: 0; left: 0; } #overlayOptions { background: var(--theme-white-color); box-sizing: border-box; position: absolute; width: 100%; bottom: 0; left: 0; padding: 1rem 0.5rem; } .optionItem { padding: 1rem; } .optionItem.selected { background: var(--main-featured-color); border-radius: 1rem; } .optionIcon { width: 3rem; height: 1.75rem; } @media screen and (max-width: 900px) { #accessLevel { width: 120px; } } @media (min-width: 551px) { .desktopOnly { display: block; } .desktopOnly.flexContainer { display: flex; } .mobileOnly { display: none; } } @media (max-width: 550px) { .desktopOnly { display: none; } .mobileOnly { display: block; } .mobileOnly.flexContainer { display: flex; } } `;}};__decorate$2L([e$5({type:String})],FormInputButton.prototype,"type",void 0);__decorate$2L([e$5({type:String})],FormInputButton.prototype,"label",void 0);__decorate$2L([e$5({type:String})],FormInputButton.prototype,"placeholder",void 0);__decorate$2L([e$5({type:Boolean})],FormInputButton.prototype,"isOwner",void 0);__decorate$2L([e$5({type:Boolean})],FormInputButton.prototype,"isOpenMobileSelectBox",void 0);__decorate$2L([e$5({type:Boolean})],FormInputButton.prototype,"hideRole",void 0);__decorate$2L([t$3()],FormInputButton.prototype,"value",void 0);__decorate$2L([t$3()],FormInputButton.prototype,"currentOption",void 0);__decorate$2L([t$3()],FormInputButton.prototype,"options",void 0);FormInputButton=__decorate$2L([n$6('form-input-access')],FormInputButton);var __decorate$2M=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormInputButton$1=class FormInputButton extends s$5{constructor(){super(...arguments);this.value='';this.label='';this.placeholder='';this.readonly='readonly';this.valid=true;}handleChange(e){this.value=e.target.value;}handleClick(e){this.dispatchEvent(new CustomEvent('submit',{detail:e.target}));}handleKeyDown(e){if(e.key==='Enter'){this.handleClick(e);}}render(){return $` ${this.label!==''?$` ${this.label} `:''} ${this.readonly==='readonly'?$` `:$` `} `;}static get styles(){return r$3` .inputArea { display: flex; } .inputLabel { font-size: 0.8rem; color: var(--main-primary-color); margin-bottom: 0.5rem; } #textbox { flex: 1; overflow: auto; box-sizing: border-box; display: block; padding: 0.5rem 0.75rem; font-size: 0.8rem; line-height: 1.5; color: var(--theme-lighter-text-color); background-color: var(--theme-white-color); background-clip: padding-box; border: 1px solid var(--theme-input-border-color); -webkit-appearance: none; -moz-appearance: none; appearance: none; border-radius: 0.5rem 0 0 0.5rem; box-shadow: inset 0 1px 2px transparent; transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; cursor: text; } #textbox:focus { border-color: var(--theme-focus-border-color); background-color: var(--theme-white-color); outline: 0; } #textbox.input-write { color: var(--theme-input-color); } .form-btn { margin-left: -1px; } .form-btn:hover { opacity: 0.8; } `;}};__decorate$2M([e$5({type:String})],FormInputButton$1.prototype,"value",void 0);__decorate$2M([e$5({type:String})],FormInputButton$1.prototype,"type",void 0);__decorate$2M([e$5({type:String})],FormInputButton$1.prototype,"label",void 0);__decorate$2M([e$5({type:String})],FormInputButton$1.prototype,"placeholder",void 0);__decorate$2M([e$5({type:String})],FormInputButton$1.prototype,"readonly",void 0);__decorate$2M([t$3()],FormInputButton$1.prototype,"valid",void 0);FormInputButton$1=__decorate$2M([n$6('form-input-button')],FormInputButton$1);var __decorate$2N=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormSwitch=class FormSwitch extends s$5{constructor(){super(...arguments);this.name='';this.colored=false;this.disabled=false;this.mini=false;}handleChangeChecked(e){this.checked=e.target.checked;this.dispatchEvent(new CustomEvent('change',{detail:this.checked}));}setChecked(checked){var _a;this.checked=checked;// force update by removing and adding the input element const input=(_a=this.shadowRoot)===null||_a===void 0?void 0:_a.querySelector('input');if(input){const parent=input.parentElement;if(parent){parent.removeChild(input);input.checked=checked;parent.appendChild(input);}}}render(){var _a;return $` `;}static get styles(){return r$3` .form-check { display: flex; min-height: 1.5rem; align-items: center; font-size: 0.75rem; } .form-check-input { vertical-align: top; background-repeat: no-repeat; -webkit-appearance: none; -moz-appearance: none; appearance: none; } .form-check-input { width: 2rem; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); background-position: left center; border-radius: 2rem; transition: background-position 0.15s ease-in-out; height: 1.125rem; border: 0; background-color: var(--theme-checkbox-color); margin: 3px 0; min-width: 30px; } @media (prefers-reduced-motion: reduce) { .form-check-input { transition: none; } } .form-check-input:focus { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); } .form-check-input:checked { background-position: right center; } .form-check-input:checked { background-color: var(--main-primary-color); } .form-check-label { color: var(--theme-input-color); margin-left: 0.25rem; flex: 1; font-size: 0.75rem; } .form-check-mini { font-size: 0.75rem; min-height: 1rem; } .form-switch-colored .form-check-input:checked { background-color: var(--main-success-color); } .form-switch-disabled .form-check-input:checked { background-color: var(--theme-checkbox-color); } .form-switch-mini { width: 1.5rem; height: 0.75rem; margin: 0; } .form-check-input-mini { width: 1.5rem; height: 0.75rem; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); background-position: left center; border-radius: 2rem; transition: background-position 0.15s ease-in-out; height: 0.9rem; border: 0; background-color: var(--theme-checkbox-color); margin: 3px 0; min-width: 25px; } `;}};__decorate$2N([e$5({type:String})],FormSwitch.prototype,"name",void 0);__decorate$2N([e$5({type:Boolean})],FormSwitch.prototype,"checked",void 0);__decorate$2N([e$5({type:Boolean})],FormSwitch.prototype,"colored",void 0);__decorate$2N([e$5({type:Boolean})],FormSwitch.prototype,"disabled",void 0);__decorate$2N([e$5({type:Boolean})],FormSwitch.prototype,"mini",void 0);FormSwitch=__decorate$2N([n$6('form-switch')],FormSwitch);var __decorate$2O=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormTextarea=class FormTextarea extends s$5{handleChange(e){this.value=e.target.value;this.dispatchEvent(new CustomEvent('change',{detail:e.target}));}reportValidity(){var _a;return(_a=this.formTextareaElement)===null||_a===void 0?void 0:_a.reportValidity();}render(){const maxLimit=this.maxLength?`${this.maxLength} chars`:'';return $` ${this.label} ${this.hideMaxLength===true?'':$` ${maxLimit} `} ${this.value} `;}static get styles(){return r$3` .form-label { line-height: 1rem; font-size: 0.8rem; color: var(--theme-input-color); display: flex; font-weight: 500; justify-content: space-between; align-items: flex-end; } .form-label .max-limit { color: var(--theme-lighter-text-color); padding-left: 1rem; } .form-control { resize: vertical; min-height: 7rem; display: block; width: 100%; box-sizing: border-box; margin-top: 0.25rem; padding: 10px; font-family: var(--custom-font), 'Montserrat', sans-serif !important; font-size: 0.75rem; line-height: 1.5; color: var(--theme-input-color); border: 1px solid var(--theme-input-border-color); background-color: var(--theme-white-color); background-clip: padding-box; -webkit-appearance: none; -moz-appearance: none; appearance: none; border-radius: 0.5rem; box-shadow: inset 0 1px 2px transparent; transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .form-control:focus { border-color: var(--theme-focus-border-color); background-color: var(--theme-white-color); outline: 0; } .form-control::placeholder { color: var(--theme-lighter-text-color); opacity: 1; } `;}};__decorate$2O([i$4('#form-textarea')],FormTextarea.prototype,"formTextareaElement",void 0);__decorate$2O([e$5({type:String})],FormTextarea.prototype,"value",void 0);__decorate$2O([e$5({type:String})],FormTextarea.prototype,"type",void 0);__decorate$2O([e$5({type:String})],FormTextarea.prototype,"label",void 0);__decorate$2O([e$5({type:String})],FormTextarea.prototype,"placeholder",void 0);__decorate$2O([e$5({type:String})],FormTextarea.prototype,"maxLength",void 0);__decorate$2O([e$5({type:Boolean})],FormTextarea.prototype,"required",void 0);__decorate$2O([e$5({type:Boolean})],FormTextarea.prototype,"hideMaxLength",void 0);FormTextarea=__decorate$2O([n$6('form-textarea')],FormTextarea);var __decorate$2P=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormTooltip=class FormTooltip extends s$5{constructor(){super(...arguments);this.tipwidth='220px';this.leftPadding='50%';this.position='bottom';}render(){const containerStyles=`width: ${this.tipwidth}; left: ${this.leftPadding}`;return $` ${this.message} `;}static get styles(){return r$3` :host { --mdc-icon-size: 1rem; } .tooltip { position: relative; display: flex; cursor: pointer; } /* Tooltip text */ .tooltip .tooltipText { visibility: hidden; background-color: var(--theme-white-color); color: var(--theme-input-color); text-align: center; padding: 0.75rem 1rem; border-radius: 0.75rem; border: 1px solid var(--theme-border-color); /* Position the tooltip text */ position: absolute; z-index: 1; transform: translateX(-50%); /* Fade in tooltip */ opacity: 0; transition: opacity 0.3s; box-shadow: 0px 80px 80px -20px rgba(154, 156, 165, 0.08), 0px 30px 24px -10px rgba(154, 156, 165, 0.05), 0px 12px 10px -6px rgba(154, 156, 165, 0.04), 0px 4px 4px -4px rgba(30, 33, 44, 0.03); } .tooltip.top .tooltipText { bottom: calc(100% + 0.5rem); } .tooltip.bottom .tooltipText { top: calc(100% + 0.5rem); } /* Tooltip arrow */ .tooltip .tooltipText::after { position: absolute; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; } .tooltip.top .tooltipText::after { bottom: -10px; border-color: var(--theme-white-color) transparent transparent; } .tooltip.bottom .tooltipText::after { top: -10px; border-color: transparent transparent var(--theme-white-color); } .tooltip .tooltipText::before { position: absolute; left: 50%; margin-left: -6px; border-width: 6px; border-style: solid; } .tooltip.top .tooltipText::before { bottom: -12px; border-color: var(--theme-white-color) transparent transparent; } .tooltip.bottom .tooltipText::before { top: -12px; border-color: transparent transparent var(--theme-border-color); } /* Show the tooltip text when you mouse over the tooltip container */ .tooltip:hover .tooltipText { visibility: visible; opacity: 1; } `;}};__decorate$2P([e$5({type:String})],FormTooltip.prototype,"message",void 0);__decorate$2P([e$5({type:String})],FormTooltip.prototype,"tipwidth",void 0);__decorate$2P([e$5({type:String})],FormTooltip.prototype,"leftPadding",void 0);__decorate$2P([e$5({type:String})],FormTooltip.prototype,"position",void 0);__decorate$2P([e$5({type:Boolean})],FormTooltip.prototype,"opened",void 0);FormTooltip=__decorate$2P([n$6('form-tooltip')],FormTooltip);/*! * lightgallery | 2.4.0 | January 29th 2022 * http://www.lightgalleryjs.com/ * Copyright (c) 2020 Sachin Neravath; * @license GPLv3 */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var __assign=function(){__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i\n \n \n ";this.core.outer.addClass('lg-has-thumb');if(this.settings.appendThumbnailsTo==='.lg-components'){this.core.$lgComponents.append(html);}else{this.core.outer.append(html);}this.$thumbOuter=this.core.outer.find('.lg-thumb-outer').first();this.$lgThumb=this.core.outer.find('.lg-thumb').first();if(this.settings.animateThumb){this.core.outer.find('.lg-thumb').css('transition-duration',this.core.settings.speed+'ms').css('width',this.thumbTotalWidth+'px').css('position','relative');}this.setThumbItemHtml(this.core.galleryItems);};Thumbnail.prototype.enableThumbDrag=function(){var _this=this;var thumbDragUtils={cords:{startX:0,endX:0},isMoved:false,newTranslateX:0,startTime:new Date(),endTime:new Date(),touchMoveTime:0};var isDragging=false;this.$thumbOuter.addClass('lg-grab');this.core.outer.find('.lg-thumb').first().on('mousedown.lg.thumb',function(e){if(_this.thumbTotalWidth>_this.thumbOuterWidth){// execute only on .lg-object e.preventDefault();thumbDragUtils.cords.startX=e.pageX;thumbDragUtils.startTime=new Date();_this.thumbClickable=false;isDragging=true;// ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 _this.core.outer.get().scrollLeft+=1;_this.core.outer.get().scrollLeft-=1;// * _this.$thumbOuter.removeClass('lg-grab').addClass('lg-grabbing');}});this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,function(e){if(!_this.core.lgOpened)return;if(isDragging){thumbDragUtils.cords.endX=e.pageX;thumbDragUtils=_this.onThumbTouchMove(thumbDragUtils);}});this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,function(){if(!_this.core.lgOpened)return;if(thumbDragUtils.isMoved){thumbDragUtils=_this.onThumbTouchEnd(thumbDragUtils);}else{_this.thumbClickable=true;}if(isDragging){isDragging=false;_this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab');}});};Thumbnail.prototype.enableThumbSwipe=function(){var _this=this;var thumbDragUtils={cords:{startX:0,endX:0},isMoved:false,newTranslateX:0,startTime:new Date(),endTime:new Date(),touchMoveTime:0};this.$lgThumb.on('touchstart.lg',function(e){if(_this.thumbTotalWidth>_this.thumbOuterWidth){e.preventDefault();thumbDragUtils.cords.startX=e.targetTouches[0].pageX;_this.thumbClickable=false;thumbDragUtils.startTime=new Date();}});this.$lgThumb.on('touchmove.lg',function(e){if(_this.thumbTotalWidth>_this.thumbOuterWidth){e.preventDefault();thumbDragUtils.cords.endX=e.targetTouches[0].pageX;thumbDragUtils=_this.onThumbTouchMove(thumbDragUtils);}});this.$lgThumb.on('touchend.lg',function(){if(thumbDragUtils.isMoved){thumbDragUtils=_this.onThumbTouchEnd(thumbDragUtils);}else{_this.thumbClickable=true;}});};// Rebuild thumbnails Thumbnail.prototype.rebuildThumbnails=function(){var _this=this;// Remove transitions this.$thumbOuter.addClass('lg-rebuilding-thumbnails');setTimeout(function(){_this.thumbTotalWidth=_this.core.galleryItems.length*(_this.settings.thumbWidth+_this.settings.thumbMargin);_this.$lgThumb.css('width',_this.thumbTotalWidth+'px');_this.$lgThumb.empty();_this.setThumbItemHtml(_this.core.galleryItems);_this.animateThumb(_this.core.index);},50);setTimeout(function(){_this.$thumbOuter.removeClass('lg-rebuilding-thumbnails');},200);};// @ts-check Thumbnail.prototype.setTranslate=function(value){this.$lgThumb.css('transform','translate3d(-'+value+'px, 0px, 0px)');};Thumbnail.prototype.getPossibleTransformX=function(left){if(left>this.thumbTotalWidth-this.thumbOuterWidth){left=this.thumbTotalWidth-this.thumbOuterWidth;}if(leftthis.thumbTotalWidth-this.thumbOuterWidth){this.translateX=this.thumbTotalWidth-this.thumbOuterWidth;}if(this.translateX0.15&&thumbDragUtils.endTime.valueOf()-thumbDragUtils.touchMoveTime2){speedX+=1;}speedX=speedX+speedX*(Math.abs(distanceXnew)/this.thumbOuterWidth);this.$lgThumb.css('transition-duration',Math.min(speedX-1,2)+'settings');distanceXnew=distanceXnew*speedX;this.translateX=this.getPossibleTransformX(this.translateX-distanceXnew);this.setTranslate(this.translateX);}else{this.translateX=thumbDragUtils.newTranslateX;}if(Math.abs(thumbDragUtils.cords.endX-thumbDragUtils.cords.startX)\n \n ";};Thumbnail.prototype.getThumbItemHtml=function(items){var thumbList='';for(var i=0;i');this.core.outer.find('.lg-toggle-thumb').first().on('click.lg',function(){_this.core.outer.toggleClass('lg-components-open');});}};Thumbnail.prototype.thumbKeyPress=function(){var _this=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,function(e){if(!_this.core.lgOpened||!_this.settings.toggleThumb)return;if(e.keyCode===38){e.preventDefault();_this.core.outer.addClass('lg-components-open');}else if(e.keyCode===40){e.preventDefault();_this.core.outer.removeClass('lg-components-open');}});};Thumbnail.prototype.destroy=function(){if(this.settings.thumbnail){this.$LG(window).off(".lg.thumb.global"+this.core.lgId);this.core.LGel.off('.lg.thumb');this.core.LGel.off('.thumb');this.$thumbOuter.remove();this.core.outer.removeClass('lg-has-thumb');}};return Thumbnail;}();/*! * lightgallery | 2.4.0 | January 29th 2022 * http://www.lightgalleryjs.com/ * Copyright (c) 2020 Sachin Neravath; * @license GPLv3 */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var __assign$1=function(){__assign$1=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i":'';if(this.settings.actualSize){zoomIcons+="";}this.core.outer.addClass('lg-use-transition-for-zoom');this.core.$toolbar.first().append(zoomIcons);};/** * @desc Enable zoom option only once the image is completely loaded * If zoomFromOrigin is true, Zoom is enabled once the dummy image has been inserted * * Zoom styles are defined under lg-zoomable CSS class. */Zoom.prototype.enableZoom=function(event){var _this=this;// delay will be 0 except first time var _speed=this.settings.enableZoomAfter+event.detail.delay;// set _speed value 0 if gallery opened from direct url and if it is first slide if(this.$LG('body').first().hasClass('lg-from-hash')&&event.detail.delay){// will execute only once _speed=0;}else{// Remove lg-from-hash to enable starting animation. this.$LG('body').first().removeClass('lg-from-hash');}this.zoomableTimeout=setTimeout(function(){if(!_this.isImageSlide()){return;}_this.core.getSlideItem(event.detail.index).addClass('lg-zoomable');if(event.detail.index===_this.core.index){_this.setZoomEssentials();}},_speed+30);};Zoom.prototype.enableZoomOnSlideItemLoad=function(){// Add zoomable class this.core.LGel.on(lGEvents$1.slideItemLoad+".zoom",this.enableZoom.bind(this));};Zoom.prototype.getModifier=function(rotateValue,axis,el){var originalRotate=rotateValue;rotateValue=Math.abs(rotateValue);var transformValues=this.getCurrentTransform(el);if(!transformValues){return 1;}var modifier=1;if(axis==='X'){var flipHorizontalValue=Math.sign(parseFloat(transformValues[0]));if(rotateValue===0||rotateValue===180){modifier=1;}else if(rotateValue===90){if(originalRotate===-90&&flipHorizontalValue===1||originalRotate===90&&flipHorizontalValue===-1){modifier=-1;}else{modifier=1;}}modifier=modifier*flipHorizontalValue;}else{var flipVerticalValue=Math.sign(parseFloat(transformValues[3]));if(rotateValue===0||rotateValue===180){modifier=1;}else if(rotateValue===90){var sinX=parseFloat(transformValues[1]);var sinMinusX=parseFloat(transformValues[2]);modifier=Math.sign(sinX*sinMinusX*originalRotate*flipVerticalValue);}modifier=modifier*flipVerticalValue;}return modifier;};Zoom.prototype.getImageSize=function($image,rotateValue,axis){var imageSizes={y:'offsetHeight',x:'offsetWidth'};if(Math.abs(rotateValue)===90){// Swap axis if(axis==='x'){axis='y';}else{axis='x';}}return $image[imageSizes[axis]];};Zoom.prototype.getDragCords=function(e,rotateValue){if(rotateValue===90){return{x:e.pageY,y:e.pageX};}else{return{x:e.pageX,y:e.pageY};}};Zoom.prototype.getSwipeCords=function(e,rotateValue){var x=e.targetTouches[0].pageX;var y=e.targetTouches[0].pageY;if(rotateValue===90){return{x:y,y:x};}else{return{x:x,y:y};}};Zoom.prototype.getDragAllowedAxises=function(rotateValue,scale){scale=scale||this.scale||1;var allowY=this.imageYSize*scale>this.containerRect.height;var allowX=this.imageXSize*scale>this.containerRect.width;if(rotateValue===90){return{allowX:allowY,allowY:allowX};}else{return{allowX:allowX,allowY:allowY};}};/** * * @param {Element} el * @return matrix(cos(X), sin(X), -sin(X), cos(X), 0, 0); * Get the current transform value */Zoom.prototype.getCurrentTransform=function(el){if(!el){return;}var st=window.getComputedStyle(el,null);var tm=st.getPropertyValue('-webkit-transform')||st.getPropertyValue('-moz-transform')||st.getPropertyValue('-ms-transform')||st.getPropertyValue('-o-transform')||st.getPropertyValue('transform')||'none';if(tm!=='none'){return tm.split('(')[1].split(')')[0].split(',');}return;};Zoom.prototype.getCurrentRotation=function(el){if(!el){return 0;}var values=this.getCurrentTransform(el);if(values){return Math.round(Math.atan2(parseFloat(values[1]),parseFloat(values[0]))*(180/Math.PI));// If you want rotate in 360 //return (angle < 0 ? angle + 360 : angle); }return 0;};Zoom.prototype.setZoomEssentials=function(){var $image=this.core.getSlideItem(this.core.index).find('.lg-image').first();var rotateEl=this.core.getSlideItem(this.core.index).find('.lg-img-rotate').first().get();this.rotateValue=this.getCurrentRotation(rotateEl);this.imageYSize=this.getImageSize($image.get(),this.rotateValue,'y');this.imageXSize=this.getImageSize($image.get(),this.rotateValue,'x');this.containerRect=this.core.outer.get().getBoundingClientRect();this.modifierX=this.getModifier(this.rotateValue,'X',rotateEl);this.modifierY=this.getModifier(this.rotateValue,'Y',rotateEl);};/** * @desc Image zoom * Translate the wrap and scale the image to get better user experience * * @param {String} scale - Zoom decrement/increment value */Zoom.prototype.zoomImage=function(scale){// Find offset manually to avoid issue after zoom var offsetX=(this.containerRect.width-this.imageXSize)/2+this.containerRect.left;var _a=this.core.mediaContainerPosition,top=_a.top,bottom=_a.bottom;var topBottomSpacing=Math.abs(top-bottom)/2;var offsetY=(this.containerRect.height-this.imageYSize-topBottomSpacing*this.modifierX)/2+this.scrollTop+this.containerRect.top;var originalX;var originalY;if(scale===1){this.positionChanged=false;}var dragAllowedAxises=this.getDragAllowedAxises(Math.abs(this.rotateValue),scale);var allowY=dragAllowedAxises.allowY,allowX=dragAllowedAxises.allowX;if(this.positionChanged){originalX=this.left/(this.scale-1);originalY=this.top/(this.scale-1);this.pageX=Math.abs(originalX)+offsetX;this.pageY=Math.abs(originalY)+offsetY;this.positionChanged=false;}var possibleSwipeCords=this.getPossibleSwipeDragCords(this.rotateValue,scale);var _x=offsetX-this.pageX;var _y=offsetY-this.pageY;var x=(scale-1)*_x;var y=(scale-1)*_y;if(allowX){if(this.isBeyondPossibleLeft(x,possibleSwipeCords.minX)){x=possibleSwipeCords.minX;}else if(this.isBeyondPossibleRight(x,possibleSwipeCords.maxX)){x=possibleSwipeCords.maxX;}}else{if(scale>1){if(xpossibleSwipeCords.maxX){x=possibleSwipeCords.maxX;}}}if(allowY){if(this.isBeyondPossibleTop(y,possibleSwipeCords.minY)){y=possibleSwipeCords.minY;}else if(this.isBeyondPossibleBottom(y,possibleSwipeCords.maxY)){y=possibleSwipeCords.maxY;}}else{// If the translate value based on index of beyond the viewport, utilize the available space to prevent image being cut out if(scale>1){//If image goes beyond viewport top, use the minim possible translate value if(ypossibleSwipeCords.maxY){y=possibleSwipeCords.maxY;}}}this.setZoomStyles({x:x,y:y,scale:scale});};/** * @desc apply scale3d to image and translate to image wrap * @param {style} X,Y and scale */Zoom.prototype.setZoomStyles=function(style){var $image=this.core.getSlideItem(this.core.index).find('.lg-image').first();var $dummyImage=this.core.outer.find('.lg-current .lg-dummy-img').first();var $imageWrap=$image.parent();this.scale=style.scale;$image.css('transform','scale3d('+style.scale+', '+style.scale+', 1)');$dummyImage.css('transform','scale3d('+style.scale+', '+style.scale+', 1)');var transform='translate3d('+style.x+'px, '+style.y+'px, 0)';$imageWrap.css('transform',transform);this.left=style.x;this.top=style.y;};/** * @param index - Index of the current slide * @param event - event will be available only if the function is called on clicking/taping the imags */Zoom.prototype.setActualSize=function(index,event){var _this=this;// Allow zoom only on image if(!this.isImageSlide()||this.core.outer.hasClass('lg-first-slide-loading')){return;}var scale=this.getCurrentImageActualSizeScale();if(this.core.outer.hasClass('lg-zoomed')){this.scale=1;}else{this.scale=this.getScale(scale);}this.setPageCords(event);this.beginZoom(this.scale);this.zoomImage(this.scale);setTimeout(function(){_this.core.outer.removeClass('lg-grabbing').addClass('lg-grab');},10);};Zoom.prototype.getNaturalWidth=function(index){var $image=this.core.getSlideItem(index).find('.lg-image').first();var naturalWidth=this.core.galleryItems[index].width;return naturalWidth?parseFloat(naturalWidth):$image.get().naturalWidth;};Zoom.prototype.getActualSizeScale=function(naturalWidth,width){var _scale;var scale;if(naturalWidth>width){_scale=naturalWidth/width;scale=_scale||2;}else{scale=1;}return scale;};Zoom.prototype.getCurrentImageActualSizeScale=function(){var $image=this.core.getSlideItem(this.core.index).find('.lg-image').first();var width=$image.get().offsetWidth;var naturalWidth=this.getNaturalWidth(this.core.index)||width;return this.getActualSizeScale(naturalWidth,width);};Zoom.prototype.getPageCords=function(event){var cords={};if(event){cords.x=event.pageX||event.targetTouches[0].pageX;cords.y=event.pageY||event.targetTouches[0].pageY;}else{var containerRect=this.core.outer.get().getBoundingClientRect();cords.x=containerRect.width/2+containerRect.left;cords.y=containerRect.height/2+this.scrollTop+containerRect.top;}return cords;};Zoom.prototype.setPageCords=function(event){var pageCords=this.getPageCords(event);this.pageX=pageCords.x;this.pageY=pageCords.y;};// If true, zoomed - in else zoomed out Zoom.prototype.beginZoom=function(scale){this.core.outer.removeClass('lg-zoom-drag-transition lg-zoom-dragging');if(scale>1){this.core.outer.addClass('lg-zoomed');var $actualSize=this.core.getElementById('lg-actual-size');$actualSize.removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut);}else{this.resetZoom();}return scale>1;};Zoom.prototype.getScale=function(scale){var actualSizeScale=this.getCurrentImageActualSizeScale();if(scaleactualSizeScale){scale=actualSizeScale;}return scale;};Zoom.prototype.init=function(){var _this=this;if(!this.settings.zoom){return;}this.buildTemplates();this.enableZoomOnSlideItemLoad();var tapped=null;this.core.outer.on('dblclick.lg',function(event){if(!_this.$LG(event.target).hasClass('lg-image')){return;}_this.setActualSize(_this.core.index,event);});this.core.outer.on('touchstart.lg',function(event){var $target=_this.$LG(event.target);if(event.targetTouches.length===1&&$target.hasClass('lg-image')){if(!tapped){tapped=setTimeout(function(){tapped=null;},300);}else{clearTimeout(tapped);tapped=null;event.preventDefault();_this.setActualSize(_this.core.index,event);}}});// Update zoom on resize and orientationchange this.core.LGel.on(lGEvents$1.containerResize+".zoom "+lGEvents$1.rotateRight+".zoom "+lGEvents$1.rotateLeft+".zoom "+lGEvents$1.flipHorizontal+".zoom "+lGEvents$1.flipVertical+".zoom",function(){if(!_this.core.lgOpened||!_this.isImageSlide())return;_this.setPageCords();_this.setZoomEssentials();_this.zoomImage(_this.scale);});// Update zoom on resize and orientationchange this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,function(){if(!_this.core.lgOpened)return;_this.scrollTop=_this.$LG(window).scrollTop();});this.core.getElementById('lg-zoom-out').on('click.lg',function(){if(_this.core.outer.find('.lg-current .lg-image').get()){_this.scale-=_this.settings.scale;_this.scale=_this.getScale(_this.scale);_this.beginZoom(_this.scale);_this.zoomImage(_this.scale);}});this.core.getElementById('lg-zoom-in').on('click.lg',function(){_this.zoomIn();});this.core.getElementById('lg-actual-size').on('click.lg',function(){_this.setActualSize(_this.core.index);});this.core.LGel.on(lGEvents$1.beforeOpen+".zoom",function(){_this.core.outer.find('.lg-item').removeClass('lg-zoomable');});this.core.LGel.on(lGEvents$1.afterOpen+".zoom",function(){_this.scrollTop=_this.$LG(window).scrollTop();// Set the initial value center _this.pageX=_this.core.outer.width()/2;_this.pageY=_this.core.outer.height()/2+_this.scrollTop;_this.scale=1;});// Reset zoom on slide change this.core.LGel.on(lGEvents$1.afterSlide+".zoom",function(event){var prevIndex=event.detail.prevIndex;_this.scale=1;_this.positionChanged=false;_this.resetZoom(prevIndex);if(_this.isImageSlide()){_this.setZoomEssentials();}});// Drag option after zoom this.zoomDrag();this.pinchZoom();this.zoomSwipe();// Store the zoomable timeout value just to clear it while closing this.zoomableTimeout=false;this.positionChanged=false;};Zoom.prototype.zoomIn=function(scale){// Allow zoom only on image if(!this.isImageSlide()){return;}if(scale){this.scale=scale;}else{this.scale+=this.settings.scale;}this.scale=this.getScale(this.scale);this.beginZoom(this.scale);this.zoomImage(this.scale);};// Reset zoom effect Zoom.prototype.resetZoom=function(index){this.core.outer.removeClass('lg-zoomed lg-zoom-drag-transition');var $actualSize=this.core.getElementById('lg-actual-size');var $item=this.core.getSlideItem(index!==undefined?index:this.core.index);$actualSize.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn);$item.find('.lg-img-wrap').first().removeAttr('style');$item.find('.lg-image').first().removeAttr('style');this.scale=1;this.left=0;this.top=0;// Reset pagx pagy values to center this.setPageCords();};Zoom.prototype.getTouchDistance=function(e){return Math.sqrt((e.targetTouches[0].pageX-e.targetTouches[1].pageX)*(e.targetTouches[0].pageX-e.targetTouches[1].pageX)+(e.targetTouches[0].pageY-e.targetTouches[1].pageY)*(e.targetTouches[0].pageY-e.targetTouches[1].pageY));};Zoom.prototype.pinchZoom=function(){var _this=this;var startDist=0;var pinchStarted=false;var initScale=1;var $item=this.core.getSlideItem(this.core.index);this.core.$inner.on('touchstart.lg',function(e){$item=_this.core.getSlideItem(_this.core.index);if(!_this.isImageSlide()){return;}if(e.targetTouches.length===2&&!_this.core.outer.hasClass('lg-first-slide-loading')&&(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))){initScale=_this.scale||1;_this.core.outer.removeClass('lg-zoom-drag-transition lg-zoom-dragging');_this.core.touchAction='pinch';startDist=_this.getTouchDistance(e);}});this.core.$inner.on('touchmove.lg',function(e){if(e.targetTouches.length===2&&_this.core.touchAction==='pinch'&&(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))){e.preventDefault();var endDist=_this.getTouchDistance(e);var distance=startDist-endDist;if(!pinchStarted&&Math.abs(distance)>5){pinchStarted=true;}if(pinchStarted){_this.scale=Math.max(1,initScale+-distance*0.008);_this.zoomImage(_this.scale);}}});this.core.$inner.on('touchend.lg',function(e){if(_this.core.touchAction==='pinch'&&(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))){pinchStarted=false;startDist=0;if(_this.scale2){speedX+=1;}if(speedY>2){speedY+=1;}distanceXnew=distanceXnew*speedX;distanceYnew=distanceYnew*speedY;var _LGel=this.core.getSlideItem(this.core.index).find('.lg-img-wrap').first();var distance={};distance.x=this.left+distanceXnew*this.modifierX;distance.y=this.top+distanceYnew*this.modifierY;var possibleSwipeCords=this.getPossibleSwipeDragCords(rotateValue);if(Math.abs(distanceXnew)>15||Math.abs(distanceYnew)>15){if(allowY){if(this.isBeyondPossibleTop(distance.y,possibleSwipeCords.minY)){distance.y=possibleSwipeCords.minY;}else if(this.isBeyondPossibleBottom(distance.y,possibleSwipeCords.maxY)){distance.y=possibleSwipeCords.maxY;}}if(allowX){if(this.isBeyondPossibleLeft(distance.x,possibleSwipeCords.minX)){distance.x=possibleSwipeCords.minX;}else if(this.isBeyondPossibleRight(distance.x,possibleSwipeCords.maxX)){distance.x=possibleSwipeCords.maxX;}}if(allowY){this.top=distance.y;}else{distance.y=this.top;}if(allowX){this.left=distance.x;}else{distance.x=this.left;}this.setZoomSwipeStyles(_LGel,distance);this.positionChanged=true;}};Zoom.prototype.getZoomSwipeCords=function(startCoords,endCoords,allowX,allowY,possibleSwipeCords){var distance={};if(allowY){distance.y=this.top+(endCoords.y-startCoords.y)*this.modifierY;if(this.isBeyondPossibleTop(distance.y,possibleSwipeCords.minY)){var diffMinY=possibleSwipeCords.minY-distance.y;distance.y=possibleSwipeCords.minY-diffMinY/6;}else if(this.isBeyondPossibleBottom(distance.y,possibleSwipeCords.maxY)){var diffMaxY=distance.y-possibleSwipeCords.maxY;distance.y=possibleSwipeCords.maxY+diffMaxY/6;}}else{distance.y=this.top;}if(allowX){distance.x=this.left+(endCoords.x-startCoords.x)*this.modifierX;if(this.isBeyondPossibleLeft(distance.x,possibleSwipeCords.minX)){var diffMinX=possibleSwipeCords.minX-distance.x;distance.x=possibleSwipeCords.minX-diffMinX/6;}else if(this.isBeyondPossibleRight(distance.x,possibleSwipeCords.maxX)){var difMaxX=distance.x-possibleSwipeCords.maxX;distance.x=possibleSwipeCords.maxX+difMaxX/6;}}else{distance.x=this.left;}return distance;};Zoom.prototype.isBeyondPossibleLeft=function(x,minX){return x>=minX;};Zoom.prototype.isBeyondPossibleRight=function(x,maxX){return x=minY;};Zoom.prototype.isBeyondPossibleBottom=function(y,maxY){return y15||Math.abs(endCoords.y-startCoords.y)>15){isMoved=true;_this.setZoomSwipeStyles(_LGel,distance);}}});this.core.$inner.on('touchend.lg',function(e){if(_this.core.touchAction==='zoomSwipe'&&(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))){_this.core.touchAction=undefined;_this.core.outer.removeClass('lg-zoom-dragging');if(!isMoved){return;}isMoved=false;endTime=new Date();var touchDuration=endTime.valueOf()-startTime.valueOf();_this.touchendZoom(startCoords,endCoords,allowX,allowY,touchDuration,_this.rotateValue);}});};Zoom.prototype.zoomDrag=function(){var _this=this;var startCoords={};var endCoords={};var isDragging=false;var isMoved=false;// Allow x direction drag var allowX=false;// Allow Y direction drag var allowY=false;var startTime;var endTime;var possibleSwipeCords;var _LGel;this.core.outer.on('mousedown.lg.zoom',function(e){// Allow zoom only on image if(!_this.isImageSlide()){return;}var $item=_this.core.getSlideItem(_this.core.index);if(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target)){startTime=new Date();_LGel=_this.core.getSlideItem(_this.core.index).find('.lg-img-wrap').first();var dragAllowedAxises=_this.getDragAllowedAxises(Math.abs(_this.rotateValue));allowY=dragAllowedAxises.allowY;allowX=dragAllowedAxises.allowX;if(_this.core.outer.hasClass('lg-zoomed')){if(_this.$LG(e.target).hasClass('lg-object')&&(allowX||allowY)){e.preventDefault();startCoords=_this.getDragCords(e,Math.abs(_this.rotateValue));possibleSwipeCords=_this.getPossibleSwipeDragCords(_this.rotateValue);isDragging=true;// ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 _this.core.outer.get().scrollLeft+=1;_this.core.outer.get().scrollLeft-=1;_this.core.outer.removeClass('lg-grab').addClass('lg-grabbing lg-zoom-drag-transition lg-zoom-dragging');// reset opacity and transition duration }}}});this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,function(e){if(isDragging){isMoved=true;endCoords=_this.getDragCords(e,Math.abs(_this.rotateValue));var distance=_this.getZoomSwipeCords(startCoords,endCoords,allowX,allowY,possibleSwipeCords);_this.setZoomSwipeStyles(_LGel,distance);}});this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,function(e){if(isDragging){endTime=new Date();isDragging=false;_this.core.outer.removeClass('lg-zoom-dragging');// Fix for chrome mouse move on click if(isMoved&&(startCoords.x!==endCoords.x||startCoords.y!==endCoords.y)){endCoords=_this.getDragCords(e,Math.abs(_this.rotateValue));var touchDuration=endTime.valueOf()-startTime.valueOf();_this.touchendZoom(startCoords,endCoords,allowX,allowY,touchDuration,_this.rotateValue);}isMoved=false;}_this.core.outer.removeClass('lg-grabbing').addClass('lg-grab');});};Zoom.prototype.closeGallery=function(){this.resetZoom();};Zoom.prototype.destroy=function(){// Unbind all events added by lightGallery zoom plugin this.$LG(window).off(".lg.zoom.global"+this.core.lgId);this.core.LGel.off('.lg.zoom');this.core.LGel.off('.zoom');clearTimeout(this.zoomableTimeout);this.zoomableTimeout=false;};return Zoom;}();/*! * lightgallery | 2.4.0 | January 29th 2022 * http://www.lightgalleryjs.com/ * Copyright (c) 2020 Sachin Neravath; * @license GPLv3 */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var __assign$2=function(){__assign$2=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;iwWidth){lgSize=size_1;break;}// take last item as last option if(i===isResponsiveSizes.length-1){lgSize=size_1;}}}var size=lgSize.split('-');var width=parseInt(size[0],10);var height=parseInt(size[1],10);var cWidth=container.width();var cHeight=container.height()-spacing;var maxWidth=Math.min(cWidth,width);var maxHeight=Math.min(cHeight,height);var ratio=Math.min(maxWidth/width,maxHeight/height);return{width:width*ratio,height:height*ratio};},/** * @desc Get transform value based on the imageSize. Used for ZoomFromOrigin option * @param {jQuery Element} * @returns {String} Transform CSS string */getTransform:function(el,container,top,bottom,imageSize){if(!imageSize){return;}var LGel=$LG(el).find('img').first();if(!LGel.get()){return;}var containerRect=container.get().getBoundingClientRect();var wWidth=containerRect.width;// using innerWidth to include mobile safari bottom bar var wHeight=container.height()-(top+bottom);var elWidth=LGel.width();var elHeight=LGel.height();var elStyle=LGel.style();var x=(wWidth-elWidth)/2-LGel.offset().left+(parseFloat(elStyle.paddingLeft)||0)+(parseFloat(elStyle.borderLeft)||0)+$LG(window).scrollLeft()+containerRect.left;var y=(wHeight-elHeight)/2-LGel.offset().top+(parseFloat(elStyle.paddingTop)||0)+(parseFloat(elStyle.borderTop)||0)+$LG(window).scrollTop()+top;var scX=elWidth/imageSize.width;var scY=elHeight/imageSize.height;var transform='translate3d('+(x*=-1)+'px, '+(y*=-1)+'px, 0) scale3d('+scX+', '+scY+', 1)';return transform;},getIframeMarkup:function(iframeWidth,iframeHeight,iframeMaxWidth,iframeMaxHeight,src,iframeTitle){var title=iframeTitle?'title="'+iframeTitle+'"':'';return"\n \n ";},getImgMarkup:function(index,src,altAttr,srcset,sizes,sources){var srcsetAttr=srcset?"srcset=\""+srcset+"\"":'';var sizesAttr=sizes?"sizes=\""+sizes+"\"":'';var imgMarkup="";var sourceTag='';if(sources){var sourceObj=typeof sources==='string'?JSON.parse(sources):sources;sourceTag=sourceObj.map(function(source){var attrs='';Object.keys(source).forEach(function(key){// Do not remove the first space as it is required to separate the attributes attrs+=" "+key+"=\""+source[key]+"\"";});return"";});}return""+sourceTag+imgMarkup;},// Get src from responsive src getResponsiveSrc:function(srcItms){var rsWidth=[];var rsSrc=[];var src='';for(var i=0;iwWidth){src=rsSrc[j];break;}}return src;},isImageLoaded:function(img){if(!img)return false;// During the onload event, IE correctly identifies any images that // weren’t downloaded as not complete. Others should too. Gecko-based // browsers act like NS4 in that they report this incorrectly. if(!img.complete){return false;}// However, they do have two very useful properties: naturalWidth and // naturalHeight. These give the true size of the image. If it failed // to load, either of these should be zero. if(img.naturalWidth===0){return false;}// No other way of checking: assume it’s ok. return true;},getVideoPosterMarkup:function(_poster,dummyImg,videoContStyle,playVideoString,_isVideo){var videoClass='';if(_isVideo&&_isVideo.youtube){videoClass='lg-has-youtube';}else if(_isVideo&&_isVideo.vimeo){videoClass='lg-has-vimeo';}else{videoClass='lg-has-html5';}return"\n \n \n "+playVideoString+"\n \n \n \n \n \n \n \n \n "+(dummyImg||'')+"\n \n ";},/** * @desc Create dynamic elements array from gallery items when dynamic option is false * It helps to avoid frequent DOM interaction * and avoid multiple checks for dynamic elments * * @returns {Array} dynamicEl */getDynamicOptions:function(items,extraProps,getCaptionFromTitleOrAlt,exThumbImage){var dynamicElements=[];var availableDynamicOptions=__spreadArrays(defaultDynamicOptions,extraProps);[].forEach.call(items,function(item){var dynamicEl={};for(var i=0;i-1){label=dynamicAttr;}if(label){dynamicEl[label]=attr.value;}}}var currentItem=$LG(item);var alt=currentItem.find('img').first().attr('alt');var title=currentItem.attr('title');var thumb=exThumbImage?currentItem.attr(exThumbImage):currentItem.find('img').first().attr('src');dynamicEl.thumb=thumb;if(getCaptionFromTitleOrAlt&&!dynamicEl.subHtml){dynamicEl.subHtml=title||alt||'';}dynamicEl.alt=alt||title||'';dynamicElements.push(dynamicEl);});return dynamicElements;},isMobile:function(){return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);},/** * @desc Check the given src is video * @param {String} src * @return {Object} video type * Ex:{ youtube : ["//www.youtube.com/watch?v=c0asJgSyxcY", "c0asJgSyxcY"] } * * @todo - this information can be moved to dynamicEl to avoid frequent calls */isVideo:function(src,isHTML5VIdeo,index){if(!src){if(isHTML5VIdeo){return{html5:true};}else{console.error('lightGallery :- data-src is not provided on slide item '+(index+1)+'. Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/');return;}}var youtube=src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i);var vimeo=src.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i);var wistia=src.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);if(youtube){return{youtube:youtube};}else if(vimeo){return{vimeo:vimeo};}else if(wistia){return{wistia:wistia};}}};// @ref - https://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio // @ref - https://2ality.com/2017/04/setting-up-multi-platform-packages.html // Unique id for each gallery var lgId=0;var LightGallery=/** @class */function(){function LightGallery(element,options){this.lgOpened=false;this.index=0;// lightGallery modules this.plugins=[];// false when lightGallery load first slide content; this.lGalleryOn=false;// True when a slide animation is in progress this.lgBusy=false;this.currentItemsInDom=[];// Scroll top value before lightGallery is opened this.prevScrollTop=0;this.isDummyImageRemoved=false;this.dragOrSwipeEnabled=false;this.mediaContainerPosition={top:0,bottom:0};if(!element){return this;}lgId++;this.lgId=lgId;this.el=element;this.LGel=$LG(element);this.generateSettings(options);this.buildModules();// When using dynamic mode, ensure dynamicEl is an array if(this.settings.dynamic&&this.settings.dynamicEl!==undefined&&!Array.isArray(this.settings.dynamicEl)){throw'When using dynamic mode, you must also define dynamicEl as an Array.';}this.galleryItems=this.getItems();this.normalizeSettings();// Gallery items this.init();this.validateLicense();return this;}LightGallery.prototype.generateSettings=function(options){// lightGallery settings this.settings=__assign$2(__assign$2({},lightGalleryCoreSettings),options);if(this.settings.isMobile&&typeof this.settings.isMobile==='function'?this.settings.isMobile():utils.isMobile()){var mobileSettings=__assign$2(__assign$2({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=__assign$2(__assign$2({},this.settings),mobileSettings);}};LightGallery.prototype.normalizeSettings=function(){if(this.settings.slideEndAnimation){this.settings.hideControlOnEnd=false;}if(!this.settings.closable){this.settings.swipeToClose=false;}// And reset it on close to get the correct value next time this.zoomFromOrigin=this.settings.zoomFromOrigin;// At the moment, Zoom from image doesn't support dynamic options // @todo add zoomFromOrigin support for dynamic images if(this.settings.dynamic){this.zoomFromOrigin=false;}if(!this.settings.container){this.settings.container=document.body;}// settings.preload should not be grater than $item.length this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length);};LightGallery.prototype.init=function(){var _this=this;this.addSlideVideoInfo(this.galleryItems);this.buildStructure();this.LGel.trigger(lGEvents$2.init,{instance:this});if(this.settings.keyPress){this.keyPress();}setTimeout(function(){_this.enableDrag();_this.enableSwipe();_this.triggerPosterClick();},50);this.arrow();if(this.settings.mousewheel){this.mousewheel();}if(!this.settings.dynamic){this.openGalleryOnItemClick();}};LightGallery.prototype.openGalleryOnItemClick=function(){var _this=this;var _loop_1=function(index){var element=this_1.items[index];var $element=$LG(element);// Using different namespace for click because click event should not unbind if selector is same object('this') // @todo manage all event listners - should have namespace that represent element var uuid=lgQuery.generateUUID();$element.attr('data-lg-id',uuid).on("click.lgcustom-item-"+uuid,function(e){e.preventDefault();var currentItemIndex=_this.settings.index||index;_this.openGallery(currentItemIndex,element);});};var this_1=this;// Using for loop instead of using bubbling as the items can be any html element. for(var index=0;index "+this.settings.prevHtml+" \n "+this.settings.nextHtml+" ";}if(this.settings.appendSubHtmlTo!=='.lg-item'){subHtmlCont='';}var addClasses='';if(this.settings.allowMediaOverlap){// Do not remove space before last single quote addClasses+='lg-media-overlap ';}var ariaLabelledby=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':'';var ariaDescribedby=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':'';var containerClassName="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?'lg-inline':'');var closeIcon=this.settings.closable&&this.settings.showCloseIcon?"":'';var maximizeIcon=this.settings.showMaximizeIcon?"":'';var template="\n \n \n\n \n\n
h2 tags

person_add_outline Grant Edit Access
Add Points Faster
${title}
Share ${topicData.name}
Add Creator Profile
${this.modalTitle}
${this.editMode?`${(_h=(_g=topicData.topic)===null||_g===void 0?void 0:_g.point_name)!==null&&_h!==void 0?_h:'Point'} Edit Form`:`${(_k=(_j=topicData.topic)===null||_j===void 0?void 0:_j.point_name)!==null&&_k!==void 0?_k:'Point'} Form`}
Add Maps to Page
Profile Info
Route Summary
Step-by-Step ${this.transitOption.toLowerCase()}ing Directions ${directionList.innerHTML}
Duplicate ${(_c=this.topic)===null||_c===void 0?void 0:_c.name}
Duplicate Map
Getting "${this.gptQuery}" in ${(_a=topicData.topic)===null||_a===void 0?void 0:_a.default_map_center.search}
folder_shared Manage Folder Access
Create a new team
Manage Access
Team Access
Guest Editors on This Map
${this.title}
Nominations are closed
${c.description}
${(_o=this.point)===null||_o===void 0?void 0:_o.name}
${(_o=this.point)===null||_o===void 0?void 0:_o.name}
${(_o=this.point)===null||_o===void 0?void 0:_o.name}
${(_w=(_v=(_u=(_t=this.clueLocation)===null||_t===void 0?void 0:_t.challenge_location_info)===null||_u===void 0?void 0:_u.clue_details)===null||_v===void 0?void 0:_v.clue)!==null&&_w!==void 0?_w:''}
Search and Add Places
${(_w=this.point)===null||_w===void 0?void 0:_w.name}
${(_o=this.point)===null||_o===void 0?void 0:_o.name}
',active:tags.includes('h2'),action:'Header 2'},{icon:'format_bold',command:'bold',active:tags.includes('b'),action:'Bold Text'},{icon:'format_italic',command:'italic',active:tags.includes('i'),action:'Italic Text'},tags.includes('a')?{icon:'link_off',command:'unlink',action:'Remove Link'}:{icon:'add_link',action:'Add Link',command:()=>{// if selection is null and command is link or embed, put cursor at the end of the text and select it if(selection===null||(selection===null||selection===void 0?void 0:selection.type)==='None'){const range=document.createRange();range.setStart(this.root,0);range.setEnd(this.root,0);selection=document.getSelection();selection===null||selection===void 0?void 0:selection.removeAllRanges();selection===null||selection===void 0?void 0:selection.addRange(range);}const newLink=prompt('Write the URL here','http://');if(newLink&&newLink!==''&&newLink!=='http://'){command('createlink',newLink);}}},{icon:'subtitles',action:'Embed Link as Card',command:()=>{// if selection is null and command is link or embed, put cursor at the end of the text and select it if(selection===null||(selection===null||selection===void 0?void 0:selection.type)==='None'){const range=document.createRange();range.setStart(this.root,0);range.setEnd(this.root,0);selection=document.getSelection();selection===null||selection===void 0?void 0:selection.removeAllRanges();selection===null||selection===void 0?void 0:selection.addRange(range);}let newEmbedLink=prompt('Write the URL you would like to embed here','http://');if(newEmbedLink&&newEmbedLink!==''&&newEmbedLink!=='http://'){// add proxi_embed = true to the URL if(newEmbedLink.includes('?')){// If the URL already has a query string, append the parameter with & newEmbedLink+='&proxi_embed=true';}else{// If the URL doesn't have a query string, append the parameter with ? newEmbedLink+='?proxi_embed=true';}command('createlink',newEmbedLink);}},show:this.allowEmbed},{icon:'undo',command:'undo',action:'Undo'},{icon:'redo',command:'redo',action:'Redo'}];return $` ${commands.filter(c=>c.show!==false).map(n=>{const elem=document.createElement('mwc-icon-button');elem.setAttribute('icon',n.icon);elem.className=n.active===true?'active':'inactive';elem.addEventListener('click',()=>{if(typeof n.command==='string'){command(n.command,n.command_value);}else{n.command();}});elem.addEventListener('mouseover',()=>{this.currentHover=n.action;});elem.addEventListener('mouseout',()=>{this.currentHover=null;});return $` ${n.values?$` {const val=e.target.value;if(typeof n.command==='string'){command(n.command,val);}}} > ${n.values.map(v=>$` ${v.name}`)} `:$` ${elem}`} `;})} `;}};__decorate$2k([i$4('#errorToast')],RichTextEditor.prototype,"errorToastElement",void 0);__decorate$2k([e$5({type:Boolean})],RichTextEditor.prototype,"isSafari",void 0);__decorate$2k([e$5({type:Boolean})],RichTextEditor.prototype,"allowEmbed",void 0);__decorate$2k([e$5({type:Boolean})],RichTextEditor.prototype,"showSave",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"content",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"isURLElementOpen",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"newLink",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"save",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"currentHover",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"showWarning",void 0);__decorate$2k([t$8()],RichTextEditor.prototype,"root",void 0);RichTextEditor=__decorate$2k([n$9('rich-text-editor')],RichTextEditor);var __decorate$2l=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2l=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};var BulkRegComponent_1;let BulkRegComponent=BulkRegComponent_1=class BulkRegComponent extends s$5{constructor(){super(...arguments);this.templateName='';this.templateCategories=[];this.pointsToAdd=[];this.emails=[];this.emailToTopicIdMap=new Map();this.topicIndex=new Map();this.topicKeyIndex=new Map();this.topicCategoryIndex=new Map();}render(){return $` Welcome to your ${this.templateName} Map! To get started, we need a few things. Submit `;}static get styles(){return r$3` #mainContainer { display: flex; flex-direction: column; justify-content: center; max-width: 800px; } .input { width: 100%; } #mapInputContainer { display: flex; flex-direction: row; width: 100%; } .inputContainer { margin-top: 20px; display: flex; flex-direction: column; align-items: flex-start; } .inputTextField { margin-left: 32px; margin-top: 5px; width: 100%; } .pointEntry { display: inline-flex; width: 100%; } #formButton { --mdc-theme-primary: var(--main-primary-color); --mdc-theme-on-primary: var(--theme-white-color); margin-top: 32px; min-width: 60%; } .centeredFlexItem { align-self: center; } #mapTemplateName { font-style: italic; font-size: larger; } @media only screen and (max-width: 768px) { /* For mobile phones: */ #mapInputContainer { display: flex; flex-direction: column; width: 100%; } } `;}updateAdminEmails(){var _a;if((_a=this.emailElement)===null||_a===void 0?void 0:_a.reportValidity()){this.emails=this.emailElement.value.toLowerCase().split(',').map(s=>s.trim());}}save(){return __awaiter$2l(this,void 0,void 0,function*(){const nameValid=this.mapTitleElement.reportValidity();const emails=this.emailElement.value.toLowerCase().split(',').map(s=>s.trim());const emailValid=emails.every(email=>validateEmail(email));const hasCategories=this.templateCategories.length!==0;const valid=nameValid&&emailValid&&hasCategories;if(!valid){this.errorToastElement.showToastAndThrow('Please fix your invalid inputs (marked red).');}if(!emailValid){this.errorToastElement.showToastAndThrow('Invalid email format.');}const name=this.mapTitleElement.value.trim();// It is OK for these to be undefined, since the server sets a default. if(!this.topicCenterElement.defaultCenterIsValid){this.errorToastElement.showToastAndThrow('The center of map location is invalid (marked red).');}const default_map_center=this.topicCenterElement.defaultCenterValue;const default_map_zoom=parseIntOrUndefined(this.topicCenterElement.defaultZoomValue);const createTopicCalls=emails.map(email=>__awaiter$2l(this,void 0,void 0,function*(){yield this.createTopic(name,email,default_map_center,default_map_zoom);}));yield Promise.all(createTopicCalls);this.errorToastElement.showToast(`Successfully created ${this.emails.length} topics`);yield this.submitPoints();});}createTopic(name,email,default_map_center,default_map_zoom){return __awaiter$2l(this,void 0,void 0,function*(){const tag_info={user_tags:[]};const createTopicRequest={name,email,organization_id:undefined,use_organization_template:false,creator:undefined,categories:this.templateCategories,has_dates:false,should_filter_past_events:false,has_likes:false,discovery_level:DiscoveryLevel.Private,disable_google_images:false,hide_header:false,show_advanced_filter_row:false,custom_font:undefined,requires_approval:false,send_crowdsource_email:true,image_display:undefined,default_map_center,default_map_zoom,default_map_rotation:0,default_map_tilt:0,header_logo:undefined,header_url:undefined,header_color:undefined,header_text_color:undefined,cluster_accent_color:undefined,translation_languages:undefined,search_pill_settings:undefined,share_settings:undefined,featured_color:undefined,custom_map_geojson:undefined,custom_map_geojson_style:undefined,custom_map_style:undefined,custom_map_style_name:undefined,custom_shapes:undefined,custom_overlays:undefined,custom_social_media_image:undefined,marker_cluster_minimum:undefined,marker_cluster_threshold:undefined,icon_size:undefined,show_easy_date_filters:undefined,tag_info,pop_ups:undefined,comment_settings:undefined,add_point_customization:undefined,creation_source:TopicCreationSource.INTERNAL_CREATE,point_email_capture_customization:undefined};let createTopicResponse;yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2l(this,void 0,void 0,function*(){createTopicResponse=yield addTopic(BulkRegComponent_1.amplitude_callsite,createTopicRequest,{template_name:this.templateName});}),'An error has occurred. Context: the server rejected the request due to validation issues.');// eslint-disable-next-line @typescript-eslint/no-non-null-assertion const topicKey=createTopicResponse.write_key;// eslint-disable-next-line @typescript-eslint/no-non-null-assertion const topicId=createTopicResponse._id.$oid;// Fetch the topic so we have access to the categories yield this.fetchTopic(topicId,topicKey);});}fetchTopic(topicId,topicKey){return __awaiter$2l(this,void 0,void 0,function*(){let topic;yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2l(this,void 0,void 0,function*(){topic=yield getTopic(BulkRegComponent_1.amplitude_callsite,topicId,topicKey,false);}),'An error has occurred. Context: could not get the topic from the server.');if(topic===undefined){this.errorToastElement.showToastAndThrow('An error has occurred. Context: could not get the topic from the server.');}if(topic.email===undefined){this.errorToastElement.showToastAndThrow('An error has occurred. Context: Bulk reg requires emails to be provided at this time.');}this.emailToTopicIdMap.set(topic.email,topicId);this.topicIndex.set(topicId,topic);this.topicKeyIndex.set(topicId,topicKey);this.topicCategoryIndex.set(topicId,new Map());topic.categories.forEach(cat=>{var _a,_b,_c;(_a=this.topicCategoryIndex.get(topicId))===null||_a===void 0?void 0:_a.set(cat.name,(_c=(_b=cat._id)===null||_b===void 0?void 0:_b.$oid)!==null&&_c!==void 0?_c:'');});});}submitPoints(){return __awaiter$2l(this,void 0,void 0,function*(){const pointRequests=this.regAddPointElement.pointsToAdd;// Now use the indexes to create points for each topic. Though the points will have the same visual data, // they will be assigned to different category IDs (which in turn are different for each topic, hence the need for the indexes) const pointAddCalls=pointRequests.map(regPointRequest=>__awaiter$2l(this,void 0,void 0,function*(){var _a;const point=regPointRequest;if(point.email===undefined){this.errorToastElement.showToastAndThrow('An error has occurred. Context: Bulk reg requires emails to be provided at this time.');}// eslint-disable-next-line @typescript-eslint/no-non-null-assertion const topicId=this.emailToTopicIdMap.get(point.email);// eslint-disable-next-line @typescript-eslint/no-non-null-assertion const addPointKey=this.topicKeyIndex.get(topicId);// We assume that category names are unique. This should be fine since they are created by a Proxi employee. const categoryId=(_a=this.topicCategoryIndex.get(topicId))===null||_a===void 0?void 0:_a.get(regPointRequest.catName);point.topic_category_id={$oid:categoryId!==null&&categoryId!==void 0?categoryId:''};point.topic_id={$oid:topicId};return yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2l(this,void 0,void 0,function*(){yield addPoint(BulkRegComponent_1.amplitude_callsite,topicId,point,addPointKey);}),'An error has occurred. Context: the server rejected the request due to validation issues.');}));yield Promise.all(pointAddCalls);this.errorToastElement.showToast(`Successfully added ${pointRequests.length} points across ${this.emails.length} topics.`);});}};BulkRegComponent.amplitude_callsite='Bulk Reg Component';__decorate$2l([i$4('#errorToast')],BulkRegComponent.prototype,"errorToastElement",void 0);__decorate$2l([i$4('#addPoint')],BulkRegComponent.prototype,"regAddPointElement",void 0);__decorate$2l([i$4('#mapTitle')],BulkRegComponent.prototype,"mapTitleElement",void 0);__decorate$2l([i$4('#emails')],BulkRegComponent.prototype,"emailElement",void 0);__decorate$2l([i$4('#topicCenterInput')],BulkRegComponent.prototype,"topicCenterElement",void 0);__decorate$2l([e$5()],BulkRegComponent.prototype,"templateName",void 0);__decorate$2l([e$5({type:Array})],BulkRegComponent.prototype,"templateCategories",void 0);__decorate$2l([t$3()],BulkRegComponent.prototype,"pointsToAdd",void 0);__decorate$2l([t$3()],BulkRegComponent.prototype,"emails",void 0);BulkRegComponent=BulkRegComponent_1=__decorate$2l([n$6('bulk-reg-component')],BulkRegComponent);var __decorate$2m=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let RegAddPointComponent=class RegAddPointComponent extends s$5{constructor(){super(...arguments);this.categories=[];this.emails=[];this.pointsToAdd=[];this.pointsCountMap=new Map();this.curPointId=0;this.renderPoint=entry=>{const pointId=entry[0];const point=entry[1].point;const pointCount=entry[1].count;return $` ${point.name} | Email Count: ${pointCount} this.removePoint(pointId)}" > Category: ${point.catName} Location: ${point.location.search} `;};}render(){return $` ${[...this.pointsCountMap.entries()].map(this.renderPoint)} ADD POINTS HERE. The topic for each email will receive the same set of points. Add Details Add Point `;}static get styles(){return r$3` .input { width: 100%; padding: auto 5px; } .button { width: 100px; margin: 0px; margin-left: 10px; color: var(--theme-white-color); } .save { --mdc-theme-primary: var(--main-success-color); } .button.addPoint { --mdc-theme-primary: var(--main-primary-color); } .container { display: flex; flex-direction: column; max-width: 800px; } .pointTracker { display: flex; flex-direction: row; width: 100%; } `;}locationChanged(evt){var _a;this.nameElement.value=(_a=evt.detail.name)!==null&&_a!==void 0?_a:'';}addPoint(){var _a,_b,_c;// Using a bunch of variables to avoid short circuiting (we want to call `validate()` on all of the elements). const locationValid=this.pointInputElement.locationIsValid;const topicCategoryValid=this.pointInputElement.topicCategoryIsValid;const nameValid=this.nameElement.reportValidity();const urlValid=this.urlElement.reportValidity();const descriptionValid=this.descriptionElement.reportValidity();const valid=locationValid&&topicCategoryValid&&nameValid&&urlValid&&descriptionValid;if(!valid){this.errorToastElement.showToastAndThrow('Please fix your invalid inputs (marked red).');}// Geocode Location Result only set after successful geocoding, so we can set this as the default case and fallback to the locationElement. const location=this.pointInputElement.locationValue;// NOTE: This is a bit tricky: we want this to be undefined if it is undefined or '', so that it will not // even get serialized to the database. const name=undefinedIfEmpty((_a=this.nameElement.value)===null||_a===void 0?void 0:_a.trim());const url=undefinedIfEmpty((_b=this.urlElement.value)===null||_b===void 0?void 0:_b.trim());const description=(_c=this.descriptionElement.value)===null||_c===void 0?void 0:_c.trim();const catName=this.pointInputElement.topicCategoryValue;const points=[];const tag_info={user_tags:[]};this.emails.forEach(email=>{points.push({_id:undefined,bulkCounter:this.curPointId,email,// eslint-disable-next-line @typescript-eslint/consistent-type-assertions topic_id:{},// eslint-disable-next-line @typescript-eslint/consistent-type-assertions topic_category_id:{},catName,location,name,description,special_offer:undefined,start:undefined,end:undefined,source:undefined,embedded_video:undefined,custom_icon_url:undefined,// These should only be set by topic admins from the command center, so no need to set them here. // It is an error for a non-admin to set these. active:undefined,featured:undefined,tag_info,is_gate_hidden:undefined,custom_information:undefined,url_images:undefined,url,number:undefined,custom_shape:undefined});});this.curPointId++;this.pointsToAdd=this.pointsToAdd.concat(points);this.pointsCountMap=this.computePointCountMap();}removePoint(id){this.pointsToAdd=this.pointsToAdd.filter(p=>p.bulkCounter!==id);this.pointsCountMap=this.computePointCountMap();}computePointCountMap(){const result=new Map();this.pointsToAdd.forEach(point=>{var _a,_b;const id=point.bulkCounter;const numPointsForName=(_b=(_a=result.get(id))===null||_a===void 0?void 0:_a.count)!==null&&_b!==void 0?_b:0;// eslint-disable-next-line @typescript-eslint/consistent-type-assertions result.set(id,{point,count:numPointsForName+1});});return result;}};__decorate$2m([i$4('#errorToast')],RegAddPointComponent.prototype,"errorToastElement",void 0);__decorate$2m([i$4('#name')],RegAddPointComponent.prototype,"nameElement",void 0);__decorate$2m([i$4('#url')],RegAddPointComponent.prototype,"urlElement",void 0);__decorate$2m([i$4('#description')],RegAddPointComponent.prototype,"descriptionElement",void 0);__decorate$2m([i$4('#pointInput')],RegAddPointComponent.prototype,"pointInputElement",void 0);__decorate$2m([e$5({type:Array})],RegAddPointComponent.prototype,"categories",void 0);__decorate$2m([e$5({type:Array})],RegAddPointComponent.prototype,"emails",void 0);__decorate$2m([t$3()],RegAddPointComponent.prototype,"pointsToAdd",void 0);__decorate$2m([t$3()],RegAddPointComponent.prototype,"pointsCountMap",void 0);RegAddPointComponent=__decorate$2m([n$6('reg-add-point-component')],RegAddPointComponent);var __decorate$2n=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2m=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let SettingDrawer=class SettingDrawer extends s$5{constructor(){super(...arguments);this.openInitially=false;this.title='';this.adminPortalMobile=false;this.commandCenter=false;this.noHeader=false;this.additionalHeightReduction='0px';this.isOpened=false;this.isExpanded=false;// we have to use this because heights on mobile are all different based on the browser type this.windowHeight=window.innerHeight;this.highZIndex=false;}firstUpdated(changedProperties){return __awaiter$2m(this,void 0,void 0,function*(){if(this.openInitially){yield this.open();}if(this.noHeader){this.isExpanded=true;}});}close(){var _a;return __awaiter$2m(this,void 0,void 0,function*(){if(!this.isOpened){return;}if(!detectMobileViewport()){(_a=this.modalDialogComponent)===null||_a===void 0?void 0:_a.close();}this.style.setProperty('--slotted-content-height',`0px`);this.style.setProperty('--drawer-transform','translateY(100%)');this.requestUpdate();yield delay(300);this.isOpened=false;this.dispatchEvent(new CustomEvent('on-close'));});}// these heights are set dynamically because the needed height of the content is different on different pages. E.g. admin portal mobile is tiny. open(){return __awaiter$2m(this,void 0,void 0,function*(){if(this.isOpened){return;}this.style.setProperty('--slotted-content-height',`0px`);this.style.setProperty('--drawer-transform',this.isOpened?'translateY(0)':'translateY(100%)');this.requestUpdate();yield delay(100);this.isOpened=true;if(this.adminPortalMobile){this.additionalHeightReduction='250px';}else{// assume it is command center this.additionalHeightReduction=heights.mapHeader;}// if the --bottom-height is 0, set the z-index on setting-drawer__wrapper to 20 this.highZIndex=true;this.isExpanded?this.style.setProperty('--slotted-content-height',`calc(${this.windowHeight*.9}px - ${heights.nav} - var(--bottom-height) - ${this.additionalHeightReduction})`):this.style.setProperty('--slotted-content-height',`calc(${this.windowHeight*.6}px - ${heights.nav} - var(--bottom-height) - ${this.additionalHeightReduction})`);this.style.setProperty('--drawer-transform',this.isOpened?'translateY(0)':'translateY(100%)');if(!detectMobileViewport()){this.modalDialogComponent.open=true;}});}toggleExpand(){this.isExpanded=!this.isExpanded;this.style.setProperty('--slotted-content-height',this.isExpanded?`calc(${this.windowHeight}px - ${heights.nav} - var(--bottom-height) - ${this.additionalHeightReduction})`:`calc(65vh - ${heights.nav} - var(--bottom-height) - ${this.additionalHeightReduction})`);this.requestUpdate();}render(){const isMobilePreview=topicData.mapComponent?topicData.mapComponent.mobilePreview:false;if(!detectMobileViewport(isMobilePreview)){return $` __awaiter$2m(this,void 0,void 0,function*(){return yield this.close();})}"> `;}return $` ${this.noHeader?'':$` ${this.isExpanded?'keyboard_arrow_down':'keyboard_arrow_up'} ${this.title} __awaiter$2m(this,void 0,void 0,function*(){return yield this.close();})}">close `} ${this.noHeader?$`__awaiter$2m(this,void 0,void 0,function*(){return yield this.close();})}">close`:''} `;}static get styles(){return r$3` :host { --bottom-height: ${o$3(heights.mobileSettingsControls)}; --bottom-height-half: ${o$3(heights.mobileSettingsControlsHalf)}; --drawer-bg-color: white; --slotted-content-height: 50vh; /* default height */ transition: height 0.3s ease-in-out; } @media (max-width: 768px) { ::slotted(*) { height: var(--slotted-content-height); display: flex; flex-direction: column; transition: height 0.3s ease-in-out; } } .setting-drawer__wrapper { height: 100%; width: 100%; z-index: 4; pointer-events: none; position: absolute; top: 0; left: 0; } .highzindex { z-index: 20; } .no-header-close { position: absolute; top: 20px; right: 12px; z-index: 10; background-color: white; } .setting-drawer { width: 100%; background: var(--drawer-bg-color); border-top-right-radius: 8px; border-top-left-radius: 8px; z-index: 5; pointer-events: all; position: absolute; bottom: var(--bottom-height); left: 0; overflow: auto; box-shadow: rgba(0, 0, 40, 0.08) 0px -1px 2px 0px, rgba(0, 0, 40, 0.08) 0px -6px 10px 0px; border-top: 1px solid rgb(236, 236, 236); border-bottom: 1px solid rgb(236, 236, 236); } .setting-drawer__overlay { height: 100%; width: 100%; background: rgba(0, 0, 0, .4); z-index: 4; position: absolute; top: 0; left: 0; } .setting-drawer__controls { display: flex; justify-content: space-between; padding-left: 16px; padding-right: 16px; padding-top: 8px; border-bottom: 1px solid var(--theme-border-color); } h2 { margin:0.4rem; font-size: 1rem; } .setting-drawer__content { padding: 8px 16px; overflow-y: auto; display: flex; justify-content: center; overflow-x: hidden; } `;}};__decorate$2n([i$4('#modalDialog')],SettingDrawer.prototype,"modalDialogComponent",void 0);__decorate$2n([e$5({type:Boolean})],SettingDrawer.prototype,"openInitially",void 0);__decorate$2n([e$5({type:String})],SettingDrawer.prototype,"title",void 0);__decorate$2n([e$5({type:Boolean})],SettingDrawer.prototype,"adminPortalMobile",void 0);__decorate$2n([e$5({type:Boolean})],SettingDrawer.prototype,"commandCenter",void 0);__decorate$2n([e$5({type:Boolean})],SettingDrawer.prototype,"noHeader",void 0);__decorate$2n([t$3()],SettingDrawer.prototype,"additionalHeightReduction",void 0);__decorate$2n([t$3()],SettingDrawer.prototype,"isOpened",void 0);__decorate$2n([t$3()],SettingDrawer.prototype,"isExpanded",void 0);__decorate$2n([t$3()],SettingDrawer.prototype,"windowHeight",void 0);__decorate$2n([t$3()],SettingDrawer.prototype,"highZIndex",void 0);SettingDrawer=__decorate$2n([n$6('setting-drawer')],SettingDrawer);var __decorate$2o=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var SettingControlsType;(function(SettingControlsType){SettingControlsType["DEFAULT"]="default";SettingControlsType["MAP_STYLES"]="map-styles";SettingControlsType["MAP_SETTINGS"]="map-settings";SettingControlsType["ADD_POINT"]="add-point";})(SettingControlsType||(SettingControlsType={}));let SettingControlButtons=class SettingControlButtons extends s$5{constructor(){super(...arguments);this.buttonType=SettingControlsType.DEFAULT;this.buttonsToRender=[];this.bindAccountState=new StateController(this,accountInfo);this.buttonTypeToButtonsMap=new Map([[SettingControlsType.DEFAULT,topicData.hasExceptions===IntegrationException.WelcomeHomeRelocations?[]:[{icon:'brush',label:'Map Style',newButtonSet:SettingControlsType.MAP_STYLES},{icon:'category',label:'Categories & Tags'},{icon:'settings',label:'Advanced'},{icon:'language',label:'Publish to Proxi'}]],[SettingControlsType.MAP_STYLES,[{icon:'title',label:'Rename Map'},{icon:'format_color_fill',label:'Header Colors'},{icon:'crop_original',label:'Header Logo'},{icon:'auto_awesome',label:'Map Style'},{icon:'trip_origin',label:`Icon Settings`}]],[SettingControlsType.ADD_POINT,[{icon:'location_on',label:'Location'},{icon:'notes',label:'Title & Details'},{icon:'crop_original',label:'Images'},{icon:'sell',label:'Tags'},{icon:'link',label:'Link Outs'},{icon:'card_giftcard',label:'Special Offer'}]]]);this.addPointButton={icon:'add_location',label:`Add Point`};}handleUpgradeClick(featureType){this.dispatchEvent(new CustomEvent('on-upgrade-click',{detail:{featureType}}));}updated(changedProperties){var _a;this.buttonsToRender=(_a=this.buttonTypeToButtonsMap.get(this.buttonType))!==null&&_a!==void 0?_a:[];}handleButtonClick(button){if(button.newButtonSet){this.buttonType=button.newButtonSet;}else{this.activeButton=button;this.dispatchEvent(new CustomEvent('on-button-click',{detail:{label:button.label}}));}}resetActiveButton(){this.activeButton=undefined;}save(){this.dispatchEvent(new CustomEvent('on-save'));}render(){var _a,_b;return $` ${this.buttonType!==SettingControlsType.DEFAULT?$`{this.buttonType=SettingControlsType.DEFAULT;}}> arrow_back Back `:$` pointCache.pointsRemaining add_location Add ${(_b=(_a=topicData.topic)===null||_a===void 0?void 0:_a.point_name)!==null&&_b!==void 0?_b:'Point'} `} ${this.buttonsToRender.map(button=>$` this.handleButtonClick(button)}> ${button.icon.endsWith('.png')?$` `:$` ${button.icon} `} ${button.label} `)} `;}static get styles(){return r$3` /* width */ .scrollyButton::-webkit-scrollbar { width: 2px; } /* Track */ .scrollyButton::-webkit-scrollbar-track { background: var(--theme-light-scrollbar-color); } /* Handle */ .scrollyButton::-webkit-scrollbar-thumb { background: var(--main-moon-color); } .setting-controls-button__wrapper { overflow: scroll hidden; padding: 4px; scrollbar-width: thin; // this is for firefox margin-bottom: -16px; // this is to make up for the scrollbar width setting } .setting-controls-button__wrapper::-webkit-scrollbar { width: 0px; // this makes the scrollbar virtually invisible } .setting-controls-button__scroll-container { display: flex; } .stickyButton { display: flex; height: 100%; } .setting-controls-button { border-radius: 2px; border: none; cursor: pointer; padding: 4px 8px; background: transparent; color: var(--main-primary-color); max-height: 65px; display: flex; flex-direction: column; align-items: center; --mdc-icon-size: 1rem; gap:5px; flex: 1; height: 100%; justify-content: space-around; } .scrollyButton { flex: 1; overflow: auto; display: flex; flex-direction: row; align-items: center; justify-content: space-evenly; } .setting-controls-button--active { background-color: #fff; } .setting-drawer-button--primary { color: var(--main-success-color); --mdc-icon-size: 16px; border-right: 1px solid gray; } .setting-drawer-button--back { color: var(--main-primary-color); --mdc-icon-size: 16px; border-right: 1px solid gray; } .setting-drawer-button--add-point { color: var(--main-invalid-color); --mdc-icon-size: 16px; border-right: 1px solid gray; } .setting-controls-button__icon { margin-left: auto; margin-right: auto; } .setting-controls-button__png { margin-left: auto; margin-right: auto; height: 16px; width: 16px; } .setting-controls-button__label { color: var(--main-primary-color); text-align: center; font-size: 0.7rem; } `;}};__decorate$2o([e$5()],SettingControlButtons.prototype,"buttonType",void 0);__decorate$2o([t$3()],SettingControlButtons.prototype,"buttonsToRender",void 0);__decorate$2o([t$3()],SettingControlButtons.prototype,"activeButton",void 0);SettingControlButtons=__decorate$2o([n$6('setting-control-buttons')],SettingControlButtons);var __decorate$2p=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2n=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let SettingControls=class SettingControls extends s$5{constructor(){super(...arguments);this.amplitude_callsite='Setting Controls';this.isDrawerOpen=false;this.buttonType=SettingControlsType.DEFAULT;this.label='';this.upgradeFeatureType=FeatureType.DuplicateMap;this.isDrawerFullScreen=false;this.createTopicRequest=createTopicRequestFromTopic(topicData.topic);this.categories=[];this.userTags=[];this.willRefreshMarkers=false;this.willRefreshPage=false;this.bindTopicState=new StateController(this,topicData);this.bindPointCacheState=new StateController(this,pointCache);}openDrawer(e){this.label=e.detail.label;this.isDrawerOpen=true;this.imageToUpload=undefined;}openUpgradeDialog(e){this.label='Upgrade Dialog';this.isDrawerOpen=true;this.upgradeFeatureType=e.detail.featureType;}closeUpgradeDialog(){this.dispatchEvent(new CustomEvent('closeUpgradeDialog'));}closeDrawer(){var _a;this.isDrawerOpen=false;this.label='';(_a=this.settingControlButtons)===null||_a===void 0?void 0:_a.resetActiveButton();}// remember to bubble all dispatched events that aim to hit this function because they are sometimes rendered inside a slot // fire one event per field on topic that needs to change onChange(e){return __awaiter$2n(this,void 0,void 0,function*(){const updatedValue=e.detail.updatedValue;const fieldToUpdate=e.detail.field;this.createTopicRequest[fieldToUpdate]=updatedValue;if(isDefined(e.detail.callback)){yield e.detail.callback();}if(e.detail.refreshMarkers===true&&topicData.topic!==undefined){this.willRefreshMarkers=true;}if(e.detail.refreshPage===true){this.willRefreshPage=true;}});}onChangeHeaderLogoImage(e){var _a;this.imageToUpload=(_a=e.detail)===null||_a===void 0?void 0:_a.imageToUpload;}render(){return $` ${this.isDrawerOpen?$` ${this.label==='Categories & Tags'?$` `:this.label==='Publish to Proxi'?$` `:this.label==='Duplicate Map'?$` `:this.label==='Rename Map'?$` `:this.label==='Header Colors'?$` `:this.label==='Header Logo'?$` `:this.label===`Map Style`?$` `:this.label===`Icon Settings`?$` `:this.label==='Clustering'?$` `:this.label==='Point Approval'?$` `:this.label==='Upvotes'?$` `:this.label==='Date & Time'?$` `:this.label==='Custom URL'?$` `:this.label==='Advanced'?$` `:this.label==='Upgrade Dialog'?$` this.closeUpgradeDialog}"> `:this.label==='Add Point'?$` `:''} `:''} `;}static get styles(){return r$3` :host { width: 100%; } .setting-controls { position: absolute; width: 100%; bottom: 0; height: ${o$3(heights.mobileSettingsControls)}; background-color: var(--theme-border-color); z-index: 10; // always want this to be over the overlayed drawer - TODO - this may still be a problem with settings coming in from nav } `;}};__decorate$2p([i$4('#settingControlButtons')],SettingControls.prototype,"settingControlButtons",void 0);__decorate$2p([t$3()],SettingControls.prototype,"isDrawerOpen",void 0);__decorate$2p([t$3()],SettingControls.prototype,"buttonType",void 0);__decorate$2p([t$3()],SettingControls.prototype,"label",void 0);__decorate$2p([t$3()],SettingControls.prototype,"upgradeFeatureType",void 0);__decorate$2p([t$3()],SettingControls.prototype,"isDrawerFullScreen",void 0);__decorate$2p([t$3()],SettingControls.prototype,"createTopicRequest",void 0);__decorate$2p([t$3()],SettingControls.prototype,"categories",void 0);__decorate$2p([t$3()],SettingControls.prototype,"userTags",void 0);__decorate$2p([t$3()],SettingControls.prototype,"willRefreshMarkers",void 0);__decorate$2p([t$3()],SettingControls.prototype,"willRefreshPage",void 0);__decorate$2p([t$3()],SettingControls.prototype,"imageToUpload",void 0);SettingControls=__decorate$2p([n$6('setting-controls')],SettingControls);var __decorate$2q=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2o=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let TagsCategoriesWrapperMobile=class TagsCategoriesWrapperMobile extends s$5{constructor(){super(...arguments);this.amplitude_callsite='Edit Categories Drawer';this.activeTab=TagCategoryDataType.Category;this.activeDataType=TagCategoryDataType.Category;this.showAddData=false;this.bindTopicState=new StateController(this,topicData);}toggleTab(type){this.activeTab=type;this.activeDataType=type;this.activeData=undefined;this.showAddData=false;}onEditClick(data){this.activeData=data;if(instanceOfTagGroup(data)){this.activeDataType=TagCategoryDataType.TagGroup;}this.showAddData=true;}deleteData(){const dataToDelete=this.activeData;let settingsChangeEvent;if(this.activeDataType===TagCategoryDataType.Category){settingsChangeEvent={field:'categories',updatedValue:topicData.categories.filter(c=>c._id!==(dataToDelete===null||dataToDelete===void 0?void 0:dataToDelete._id))};}else{settingsChangeEvent={field:'tag_info',updatedValue:{user_tags:topicData.topLevelUserTags.filter(c=>c._id!==(dataToDelete===null||dataToDelete===void 0?void 0:dataToDelete._id))}};}dispatchSettingsUpdate(settingsChangeEvent,this);// delete the data this.activeData=undefined;this.showAddData=false;}onAddClick(dataType){return __awaiter$2o(this,void 0,void 0,function*(){if(dataType===TagCategoryDataType.TagGroup){this.activeDataType=dataType;this.activeData=yield topicData.createNewUserTag(true,this.amplitude_callsite);this.showAddData=true;}else if(dataType===TagCategoryDataType.Tag){this.activeDataType=dataType;this.activeData=yield topicData.createNewUserTag(false,this.amplitude_callsite);this.showAddData=true;}else{this.activeDataType=dataType;this.activeData=yield topicData.createNewCategory(this.amplitude_callsite);this.showAddData=true;}});}onUpClick(index,dataType){return __awaiter$2o(this,void 0,void 0,function*(){const data=dataType===TagCategoryDataType.Category?topicData.categories:topicData.topLevelUserTags;moveItem(data,index,index-1);const updatedTopic=Object.assign({},createTopicRequestFromTopic(topicData.topic));yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2o(this,void 0,void 0,function*(){yield topicData.fetchAndUpdateTopicData(updatedTopic,this.amplitude_callsite);}),'An error has occurred. Context: could not reorder the categories.');});}onDownClick(index,dataType){return __awaiter$2o(this,void 0,void 0,function*(){const data=dataType===TagCategoryDataType.Category?topicData.categories:topicData.topLevelUserTags;moveItem(data,index,index+1);const updatedTopic=Object.assign({},createTopicRequestFromTopic(topicData.topic));yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2o(this,void 0,void 0,function*(){yield topicData.fetchAndUpdateTopicData(updatedTopic,this.amplitude_callsite);}),'An error has occurred. Context: could not reorder the categories.');});}selectTag(e){const activeIndex=e.detail.tabIndex;this.activeDataType=activeIndex===0?TagCategoryDataType.Category:TagCategoryDataType.Tag;this.toggleTab(this.activeDataType);}exitEditMode(){this.activeData=undefined;this.showAddData=false;}render(){return $` ${this.activeData?$` Back `:''} ${this.showAddData?$` `:this.activeTab===TagCategoryDataType.Category?$` __awaiter$2o(this,void 0,void 0,function*(){return yield this.onDownClick(e.detail.index,e.detail.dataType);})}" @on-up-click="${e=>__awaiter$2o(this,void 0,void 0,function*(){return yield this.onUpClick(e.detail.index,e.detail.dataType);})}" @on-edit-click="${e=>this.onEditClick(e.detail.data)}"> =50}" class="tags-categories__add" @click="${()=>__awaiter$2o(this,void 0,void 0,function*(){return yield this.onAddClick(TagCategoryDataType.Category);})}"> add Add ${this.activeDataType} `:$` __awaiter$2o(this,void 0,void 0,function*(){return yield this.onDownClick(e.detail.index,e.detail.dataType);})}" @on-up-click="${e=>__awaiter$2o(this,void 0,void 0,function*(){return yield this.onUpClick(e.detail.index,e.detail.dataType);})}" @on-edit-click="${e=>this.onEditClick(e.detail.data)}"> __awaiter$2o(this,void 0,void 0,function*(){return yield this.onAddClick(TagCategoryDataType.Tag);})}"> Add Tag __awaiter$2o(this,void 0,void 0,function*(){return yield this.onAddClick(TagCategoryDataType.TagGroup);})}"> Add Tag Group `} `;}static get styles(){return r$3` mwc-button { --mdc-typography-button-text-transform: case; --mdc-typography-button-letter-spacing: 0px; } .wrapper { display: flex; flex-direction: column; } .tags-categories__sell { --mdc-icon-size: 14px; vertical-align: text-bottom; } .tags-categories__sell--group { margin-left: -11px; } .top-wrapper { display: flex; flex-direction: row; justify-content: center; align-items: center; } .tags-categories__add { display: block; text-align: center; margin: 10px; margin-bottom: 0; } .tags-categories__add-wrapper { display: flex; } .tags-categories__item { background-color: white; border: 1px solid lightgray; border-radius: 50px; padding: 8px; margin: 10px 4px 5px; filter: drop-shadow(rgba(0, 0, 0, 0.25) 0px 4px 4px); } .tags-categories__item.over { outline: 2px dotted #666; } .tags-categories__item.tags-categories__item--group { background-color: #EFECF3; } .tags-categories__item.active { border: 3px solid var(--main-primary-color); } .tags-categories__item--image { vertical-align: text-bottom; } `;}};__decorate$2q([i$4('#errorToast')],TagsCategoriesWrapperMobile.prototype,"errorToastElement",void 0);__decorate$2q([t$3()],TagsCategoriesWrapperMobile.prototype,"activeTab",void 0);__decorate$2q([t$3()],TagsCategoriesWrapperMobile.prototype,"activeData",void 0);__decorate$2q([t$3()],TagsCategoriesWrapperMobile.prototype,"activeDataType",void 0);__decorate$2q([t$3()],TagsCategoriesWrapperMobile.prototype,"showAddData",void 0);TagsCategoriesWrapperMobile=__decorate$2q([n$6('tags-categories-wrapper-mobile')],TagsCategoriesWrapperMobile);var __decorate$2r=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let TagsCategoriesItem=class TagsCategoriesItem extends s$5{constructor(){super(...arguments);this.data=[];this.dataType=TagCategoryDataType.Category;}onEditClick(data){this.dispatchEvent(new CustomEvent('on-edit-click',{detail:{data}}));}onUpClick(index){this.dispatchEvent(new CustomEvent('on-up-click',{detail:{dataType:this.dataType,index}}));}onDownClick(index){this.dispatchEvent(new CustomEvent('on-down-click',{detail:{dataType:this.dataType,index}}));}renderIcon(c){if(this.dataType===TagCategoryDataType.Category){return $``;}else if(this.dataType===TagCategoryDataType.Tag&&!instanceOfTagGroup(c)){return $`sell`;}else{return $`sell sell`;}}render(){return $` ${this.data.map((c,index)=>$` this.onEditClick(c)} icon="edit"> ${this.renderIcon(c)} ${c.name} this.onUpClick(index)} icon="arrow_upward" ?disabled=${index===0}> this.onDownClick(index)} icon="arrow_downward" ?disabled=${index===this.data.length-1}> `)} `;}static get styles(){return r$3` mwc-icon-button { --mdc-icon-size: 16px; --mdc-icon-button-size: 30px; } .wrapper { display: flex; flex-direction: column; } .item-wrapper { display: flex; align-items: center; margin: 5px 0; } .tags-categories__sell { --mdc-icon-size: 14px; vertical-align: text-bottom; } .tags-categories__sell--group { margin-left: -11px; } .tags-categories__item { padding: 0 8px; } .tags-categories__item.tags-categories__item--group { background-color: #EFECF3; } .tags-categories__item.active { border: 3px solid var(--main-primary-color); } .tags-categories__item--image { vertical-align: text-bottom; } `;}};TagsCategoriesItem.amplitude_callsite='Edit Categories Drawer';__decorate$2r([e$5({type:Object})],TagsCategoriesItem.prototype,"data",void 0);__decorate$2r([e$5({type:TagCategoryDataType})],TagsCategoriesItem.prototype,"dataType",void 0);TagsCategoriesItem=__decorate$2r([n$6('tags-categories-item')],TagsCategoriesItem);var __decorate$2s=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2p=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let ContextMenu=class ContextMenu extends s$5{constructor(){super(...arguments);this.type='admin-portal';this.amplitude_callsite='';this.menu_only=false;this.bindAccountState=new StateController(this,accountInfo);}firstUpdated(){return __awaiter$2p(this,void 0,void 0,function*(){yield this.startup();});}startup(){return __awaiter$2p(this,void 0,void 0,function*(){this.cornerMenu.anchor=this.menuConnect;});}connectedCallback(){super.connectedCallback();if(this.type!=='command-center'){this.style.setProperty('--context-menu-text-color','var(--main-primary-color)');}}render(){var _a,_b;const xPos=this.menu_only?0:10;const yPos=this.menu_only?0:48;return $` ${!this.menu_only?$` ${accountInfo.isAuthenticated?$` this.cornerMenu.open=true}> ${getInitials(accountInfo.fullName,accountInfo.email)} `:this.type==='command-center'?'':$` `} `:$``} this.cornerMenu.open=true} .imageUrl="${(_b=accountInfo.account)===null||_b===void 0?void 0:_b.image_url}"> ${getInitials(accountInfo.fullName,accountInfo.email)} ${accountInfo.fullName} ${accountInfo.email} person_outline Account Info ${accountInfo.isAppSumoUser===true?'and License':''} backpack My Backpack (All Maps) logout Log Out `;}static get styles(){return r$3` :host { --mdc-menu-min-width: min(100vw, 100px); --mdc-menu-item-height: 1.75rem; --mdc-typography-subtitle1-font-size: 12px; } .divider { width: 1px; height: 1.5rem; margin: 0 1rem; background: var(--theme-input-color); } #profileListItem { --mdc-menu-item-height: 3.5rem; } .profileDetails { display: flex; flex-direction: column; margin-left: 0.5rem; } .detailsName { font-size: 0.8rem; font-weight: 700; line-height: 1.25rem; color: var(--theme-input-color); } .detailsEmail { font-size: 0.75rem; line-height: 1rem; color: var(--theme-input-color); } .menuIcon { margin-right: 0.5rem; --mdc-icon-size: 0.8rem; color: var(--theme-lighter-text-color); } #expandProfile { --mdc-icon-button-size: 2.5rem; color: var(--context-menu-text-color); margin-right: -0.5rem; } .guestViewer { color: var(--context-menu-text-color); text-align: center; cursor: pointer; font-weight: bold; font-size: 12px; } .backpackicon { height: 1.5rem; margin-right: 5px; } mwc-icon-button { color: var(--context-menu-text-color); --mdc-icon-button-size: 2.5rem; } .flexContainer { display: flex; align-items: center; justify-content: center; } ::slotted(*) { cursor: pointer; } @media screen and (min-width: 901px) { .desktopOnly { display: block; } .mobileOnly { display: none; } .desktopOnly.flexContainer { display: flex; } } @media screen and (max-width: 900px) { .desktopOnly { display: none; } .mobileOnly { display: flex; } .mobileOnly.flexContainer { display: flex; } #expandProfile { --mdc-icon-button-size: 2rem; } .guestViewer { display: none; } } `;}logout(){return __awaiter$2p(this,void 0,void 0,function*(){logWithAmplitude(this.amplitude_callsite,'User Logout Click');yield accountInfo.logout();});}signInClick(){logWithAmplitude(this.amplitude_callsite,'User Login Click');this.dispatchEvent(new CustomEvent('on-signin'));}accountPageClick(){logWithAmplitude(this.amplitude_callsite,'Account Page Click');window.location.assign(`#home?settings=account`);}backpackClick(){logWithAmplitude(this.amplitude_callsite,'Backpack Click');window.location.assign(`#home`);}discoverClick(){logWithAmplitude(this.amplitude_callsite,'Proxi Discover Click');window.location.assign(`/#discover`);}manageSubscriptionClick(){this.dispatchEvent(new CustomEvent('on-manage-subscription'));logWithAmplitude(this.amplitude_callsite,'Manage Subscription Click');}};__decorate$2s([i$4('#errorToast')],ContextMenu.prototype,"errorToastElement",void 0);__decorate$2s([i$4('#cornerMenu')],ContextMenu.prototype,"cornerMenu",void 0);__decorate$2s([i$4('#menuConnect')],ContextMenu.prototype,"menuConnect",void 0);__decorate$2s([e$5()],ContextMenu.prototype,"type",void 0);__decorate$2s([e$5()],ContextMenu.prototype,"amplitude_callsite",void 0);__decorate$2s([e$5({type:Boolean})],ContextMenu.prototype,"menu_only",void 0);ContextMenu=__decorate$2s([n$6('context-menu')],ContextMenu);var __decorate$2t=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2q=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};;let TeamSwitchMenu=class TeamSwitchMenu extends s$5{constructor(){super(...arguments);this.amplitude_callsite='';this.organizations=[];this.entries=[];this.menuOpen=false;this.bindAccountState=new StateController(this,accountInfo);this.bindOrganizationState=new StateController(this,organizationInfo);}toggleMenuOpen(){// this.cornerMenu.open = true; this.menuOpen=!this.menuOpen;}// if this.organizations changes, create the entries updated(changedProperties){return __awaiter$2q(this,void 0,void 0,function*(){if(changedProperties.has('organizations')){yield this.createEntries();}});}postOrganizationUpgrade(organization_entry){return __awaiter$2q(this,void 0,void 0,function*(){// set local storage if(!organization_entry){localStorage.removeItem('organization_id');}else{localStorage.setItem('organization_id',organization_entry.id);// in beta const isInBeta=window.location.href.includes('betamap.proxi.co');if(organization_entry.validated_custom_url&&!isInBeta){// replace the url base with the custom url const url=window.location.href;const urlParts=url.split('/');const baseUrl=urlParts[2].toLowerCase();const newUrl=url.replace(baseUrl,organization_entry.validated_custom_url);// set the new url window.location.href=newUrl;}}// refresh the page window.location.reload();});}createEntries(){return __awaiter$2q(this,void 0,void 0,function*(){// iterate through organizations. if the organization does not have a parent, add it to the entries this.entries=this.organizations.map(org=>({name:org.name,logo:org.logo,id:org._id.$oid,primary_color:org.primary_color,secondary_color:org.secondary_color,validated_custom_url:isDefined(org.cname)&&org.cname.validated?org.cname.custom_url:undefined}));});}onClickCreateTeam(){this.dispatchEvent(new CustomEvent('on-start-create-team'));}render(){var _a,_b,_c,_d,_e,_f,_g,_h,_j,_k;const org_background_color=(_b=(_a=organizationInfo.organization)===null||_a===void 0?void 0:_a.primary_color)!==null&&_b!==void 0?_b:'var(--main-primary-color)';const org_text_color=(_e=(_d=(_c=organizationInfo.organization)===null||_c===void 0?void 0:_c.secondary_color)!==null&&_d!==void 0?_d:getVisibleTextColor(palette.primaryBlue))!==null&&_e!==void 0?_e:'white';return $` ${(_h=(_g=(_f=organizationInfo.organization)===null||_f===void 0?void 0:_f.name)===null||_g===void 0?void 0:_g.charAt(0))!==null&&_h!==void 0?_h:accountInfo.fullName.charAt(0)} ${(_k=(_j=organizationInfo.organization)===null||_j===void 0?void 0:_j.name)!==null&&_k!==void 0?_k:'Personal Account'} ${this.organizations.length>0?$` ${this.menuOpen?$` expand_less `:$` expand_more `} `:''} ${this.menuOpen?$` ${organizationInfo.organization&&accountInfo.migrated_from_personal!==true?$` __awaiter$2q(this,void 0,void 0,function*(){return yield this.postOrganizationUpgrade(undefined);})}> Personal Account ${accountInfo.fullName.charAt(0)} `:''} ${this.entries.filter(entry=>{var _a;return entry.id!==((_a=organizationInfo.organization)===null||_a===void 0?void 0:_a._id.$oid);}).map((organizationEntry,index)=>$` __awaiter$2q(this,void 0,void 0,function*(){return yield this.postOrganizationUpgrade(organizationEntry);})}> ${organizationEntry.name} ${organizationEntry.name.charAt(0)} `)} add Create a new team `:''} `;}static get styles(){return r$3` :host { --mdc-typography-subtitle1-font-size: 12px; --mdc-list-vertical-padding: 0px; --mdc-menu-max-width: calc(20vw - 40px); } .dropdown { background-color: white; border-radius: 0 0 8px 8px; z-index: 100; width: 100%; max-height: 50vh; overflow-y: auto; } .divider { margin: 0; background-color: var(--theme-lightest-color); } .teamOption { padding: 0.5rem; cursor: pointer; justify-content: space-between; } .child { padding-left: 1rem; } #menuConnect { cursor: pointer; justify-content: space-between; padding: 0.5rem; box-shadow: 0px 2px 2px -2px rgba(31, 27, 45, 0.08), 0px 4px 12px rgba(31, 27, 45, 0.08); border-radius: 8px; } .flexGap { gap: 0.75rem; } .org-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .orgListItem { padding-top: 0.5rem; padding-bottom: 0.5rem; } .newTeam { background-color: var(--theme-lightest-color); text-align: center; padding: 0.5rem; gap: 0.25rem; justify-content: center; cursor: pointer; } .createListItem { justify-content: center; background-color: #F7F8F9; font-weight: 500; } .flexContainer { display: flex; align-items: center; } .profileDetails { display: flex; flex-direction: column; margin-left: 0.5rem; } @media screen and (min-width: 901px) { .desktopOnly { display: block; } .mobileOnly { display: none; } .desktopOnly.flexContainer { display: flex; } } @media screen and (max-width: 900px) { .desktopOnly { display: none; } .mobileOnly { display: flex; } .mobileOnly.flexContainer { display: flex; } } `;}};__decorate$2t([i$4('#errorToast')],TeamSwitchMenu.prototype,"errorToastElement",void 0);__decorate$2t([i$4('#cornerMenu')],TeamSwitchMenu.prototype,"cornerMenu",void 0);__decorate$2t([i$4('#menuConnect')],TeamSwitchMenu.prototype,"menuConnect",void 0);__decorate$2t([e$5()],TeamSwitchMenu.prototype,"amplitude_callsite",void 0);__decorate$2t([t$3()],TeamSwitchMenu.prototype,"organizations",void 0);__decorate$2t([t$3()],TeamSwitchMenu.prototype,"entries",void 0);__decorate$2t([t$3()],TeamSwitchMenu.prototype,"menuOpen",void 0);TeamSwitchMenu=__decorate$2t([n$6('team-switch-menu')],TeamSwitchMenu);var __decorate$2u=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2r=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};var HelpMenu_1;let HelpMenu=HelpMenu_1=class HelpMenu extends s$5{constructor(){super(...arguments);this.type='backpack';this.mini=false;this.bindAccountState=new StateController(this,accountInfo);}firstUpdated(){return __awaiter$2r(this,void 0,void 0,function*(){yield this.startup();});}startup(){return __awaiter$2r(this,void 0,void 0,function*(){this.cornerMenu.anchor=this.menuConnect;});}render(){// const xPos = 0; // const yPos = 0; return $` {this.cornerMenu.open=true;this.dispatchEvent(new CustomEvent('menu-opened'));}}"> question_mark ${this.mini?'':'Help'} local_library Help Docs newspaper Visit our Blog ${this.type==='admin-portal'?$` tour Re-Launch Tour `:''} chat_bubble_outline Feature Request post_add Chat with Us mail_outline Email Us `;}static get styles(){return r$3` :host { --mdc-menu-min-width: min(100vw,150px); --mdc-menu-max-width: 200px; --mdc-typography-subtitle1-font-size: 12px; --mdc-menu-item-height: 30px; --mdc-icon-size: 16px; } .menuIcon { margin-right: 0.5rem; color: var(--theme-lighter-text-color); } mwc-icon-button { color: var(--context-menu-text-color); --mdc-icon-button-size: 2.5rem; } .linkButton { cursor: pointer; color: var(--main-primary-color); margin: 0 1rem; } .flexContainer { display: flex; align-items: center; } .headerIcon { margin-right: 2px; --mdc-icon-size: 1rem; } @media screen and (min-width: 901px) { .desktopOnly { display: block; } .mobileOnly { display: none; } .desktopOnly.flexContainer { display: flex; } } @media screen and (max-width: 900px) { .desktopOnly { display: none; } .mobileOnly { display: flex; } .mobileOnly.flexContainer { display: flex; } } `;}learnClick(){logWithAmplitude(HelpMenu_1.amplitude_callsite,'Proxi Learn Click');window.open(`https://www.proxi.co/learn`);}blogClick(){logWithAmplitude(HelpMenu_1.amplitude_callsite,'Proxi Blog Click');window.open(`https://proxi.co/blog`);}visitContactClick(){logWithAmplitude(HelpMenu_1.amplitude_callsite,'Email Us Click');window.location.assign(`mailto:[email protected]`);}relaunchTourClick(){var _a,_b;logWithAmplitude(HelpMenu_1.amplitude_callsite,'Relaunch Tour Click');chameleonExperience(ChameleonTour.DesktopAdminPortalTour,(_b=(_a=undefinedIfEmpty(accountInfo.email))!==null&&_a!==void 0?_a:getFromLocalStorage('email'))!==null&&_b!==void 0?_b:'',false,true);}submitFeatureRequestClick(){logWithAmplitude(HelpMenu_1.amplitude_callsite,'Submit Feature Request Click');window.open(`https://proxi.sleekplan.app/`);}};HelpMenu.amplitude_callsite='Help Menu';__decorate$2u([i$4('#errorToast')],HelpMenu.prototype,"errorToastElement",void 0);__decorate$2u([i$4('#cornerMenu')],HelpMenu.prototype,"cornerMenu",void 0);__decorate$2u([i$4('#menuConnect')],HelpMenu.prototype,"menuConnect",void 0);__decorate$2u([e$5({type:String})],HelpMenu.prototype,"type",void 0);__decorate$2u([t$3()],HelpMenu.prototype,"mini",void 0);HelpMenu=HelpMenu_1=__decorate$2u([n$6('help-menu')],HelpMenu);var __decorate$2v=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2s=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};var Navbar_1;const pagesForHelp=['admin-portal','backpack','account'];let Navbar=Navbar_1=class Navbar extends s$5{constructor(){super(...arguments);this.type='admin-portal';this.loading=false;this.bindTopicState=new StateController(this,topicData);this.bindAccountState=new StateController(this,accountInfo);}connectedCallback(){const _super=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return __awaiter$2s(this,void 0,void 0,function*(){yield this.startup();_super.connectedCallback.call(this);});}startup(){return __awaiter$2s(this,void 0,void 0,function*(){if(topicData.topicKey===undefined&&this.type!=='discover'&&!accountInfo.isAuthenticated){redirectToLogin();}// get subscription level and set text as subscription level if(accountInfo.isAuthenticated){// if organization is defined then set subscription level text to "Teams" if(subscriptionInfo.subscriptionLevelText==='Free'&&!organizationInfo.isGuest){this.subscription_level_text='Subscribe';}else{this.subscription_level_text=subscriptionInfo.subscriptionLevelText;}}});}closeOpenDrawers(){var _a;return __awaiter$2s(this,void 0,void 0,function*(){yield(_a=this.duplicateDrawer)===null||_a===void 0?void 0:_a.close();});}pricingClick(){if(!organizationInfo.isGuest){logWithAmplitude(Navbar_1.amplitude_callsite,'Proxi Pricing Click');window.location.assign('/#home?page_name=Team%20Settings&setting_type=SubscriptionAndBilling');}}whatsNewClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'What\'s New Click');window.open('https://proxi.sleekplan.app/changelog','_blank');}marketingAndPrintingServicesClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'Marketing and Printing Services Click');window.open('https://www.proxi.co/proxi-map-services');}openAccountPage(){logWithAmplitude(Navbar_1.amplitude_callsite,'Account Page Click');window.location.assign(`/#account`);}openChargebeePortal(){var _a,_b;return __awaiter$2s(this,void 0,void 0,function*(){logWithAmplitude(Navbar_1.amplitude_callsite,'Manage Subscription Click');if(!isDefined(subscriptionInfo.subscription_customer_id)){(_a=getMainPage().errorToastElement)===null||_a===void 0?void 0:_a.showToastAndThrow('An Error Occured - Unable to open subscription portal. Reach out to help.proxi.co');}else{const request={customer_id:subscriptionInfo.subscription_customer_id,redirect_url:(_b=window.location.href)!==null&&_b!==void 0?_b:'https://map.proxi.co/#home'};yield openChargebeePortal(request);}});}render(){var _a,_b;const logo=renderOrganizationLogo((_a=organizationInfo.organization)===null||_a===void 0?void 0:_a.logo);return $` ${accountInfo.isAuthenticated?$` ${this.type==='admin-portal'?$` Back to Dashboard `:$` ${this.type!=='backpack'?$` Your Maps `:``} ${this.type!=='discover'&&isEmpty(organizationInfo.organization)?$` search Discover `:``} `}`:$` person_outline Log in to save and manage your maps `} ${pagesForHelp.includes(this.type)?$` ondemand_video Demo Video `:``} ${this.type==='admin-portal'?'':$` add New Map `} ${accountInfo.isAuthenticated?$` ${accountInfo.isAppSumoUser===true?$` ${this.subscription_level_text} `:$` ${this.subscription_level_text} `} `:$``} ${this.type==='admin-portal'?$` home `:logo} ${getPageNameByType(this.type)} ${accountInfo.isAuthenticated?$` ${this.subscription_level_text} `:''} ${this.type==='admin-portal'&&detectMobileViewport()// show mobile only ?$` Share Map `:$` add New Map `} ${accountInfo.isAuthenticated?$` `:$``} ${detectMobileViewport()?$` {var _a;return(_a=this.duplicateDrawer)===null||_a===void 0?void 0:_a.close();}}" @close-upgrade="${()=>{var _a;return(_a=this.duplicationModal)===null||_a===void 0?void 0:_a.close();}}"> `:$` {var _a;return(_a=this.duplicationModal)===null||_a===void 0?void 0:_a.close();}}"> {var _a;return(_a=this.duplicateDrawer)===null||_a===void 0?void 0:_a.close();}}" @close-upgrade="${()=>{var _a;return(_a=this.duplicationModal)===null||_a===void 0?void 0:_a.close();}}"> `} {var _a;return(_a=this.signinModalComponent)===null||_a===void 0?void 0:_a.close();}}"> {var _a;return(_a=this.signinModalComponent)===null||_a===void 0?void 0:_a.close();}}"> this.upgradeDialogComponent.close()}"> this.upgradeDialogComponent.close()}" > `;}static get styles(){return r$3` .wrapper { postion: fixed; width: 100%; } :host { --mdc-menu-min-width: min(100vw, 292px); --mdc-typography-subtitle1-font-size: 12px; } mwc-dialog { /* this is because handontable sets the zindex of its columns and row headers to 160 */ z-index: 200; } nav { height: ${o$3(heights.nav)}; display: flex; align-items: center; justify-content: space-between; box-shadow: 0px 4px 6px 0 #ECECEC; z-index: 2; padding-left: 1rem; padding-right: 1rem; } .shareButtonIcon { --mdc-icon-size: 1.5rem; } .no-pointer:hover { cursor: default; } #logoDesktop img { max-height: 2.5rem; vertical-align: middle; } #logoMobile img { max-height: 1.5rem; vertical-align: middle; } #leftContent { --btn-padding-x: .25rem; } .divider { width: 1px; height: 1.5rem; margin: 0 1rem; background: var(--main-moon-color); } .backpackButton { display: flex; flex-direction: row; align-items: center; } .backpackButton:hover { cursor: pointer; } .buttonSection { margin: 0.1rem 0.25rem; } .grantSection { margin: 0.25rem 1rem; flex-wrap: nowrap; } #signinModalComponent { --mdc-theme-surface: var(--theme-white-color); } .linkButton { cursor: pointer; color: var(--main-primary-color); margin: 0 1rem; } .leftIcon { margin-right: 2px; --mdc-icon-size: 1rem; } .leftPng { height: 1.5rem; margin-right: 5px; } .backpackicon { height: 1rem; margin-right: 5px; } mwc-icon-button { color: var(--main-primary-color); --mdc-icon-button-size: 2.5rem; } .mdc-icon-button { margin-right: 4px; } .flexContainer { display: flex; align-items: center; } .homeLink { margin-right: 1rem; color: var(--main-primary-color) } .homeLink:visited { color: var(--main-primary-color); } .subscriptionTag { padding: 1px; border-radius: 8px; margin-right: 0.5rem; display: flex; align-items: center; cursor: pointer; padding: 5px; } .subscriptionNameTag { border-radius: 6px; padding: 3px 6px; margin-left: 4px; margin-right: 4px; } .spin { animation: spin 2s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @media screen and (min-width: 901px) { .desktopOnly { display: block; } .mobileOnly { display: none; } .desktopOnly.flexContainer { display: flex; } #shareSection { margin-right: -0.5rem; } } @media screen and (max-width: 900px) { .desktopOnly { display: none; } .mobileOnly { display: flex; } .mobileOnly.flexContainer { display: flex; } nav { padding: 0 1rem 0 0.75rem; } .mobileStack { display: flex; flex-direction: column; align-items: center; } .grantSection { margin-right: 0.5rem; } .pageName { font-size: 12px; line-height: 0.75rem; margin: 5px; } #rightContent { right: 0px; position: absolute; } .leftPng { height: 1rem; } .homeLink { margin-right: 0.5rem; } .subscriptionTag { padding: 2px; border-radius: 8px; font-size: 12px; margin: 0px } .subscriptionNameTag { padding: 0px; } @media screen and (max-width: 600px) { .pageName { display: none; } } } `;}copyCollaboratorMapLinkToClipboard(){var _a,_b,_c;return __awaiter$2s(this,void 0,void 0,function*(){if(((_a=topicData.topic)===null||_a===void 0?void 0:_a.is_addpointer)===true){if(topicData.discoveryLevel==='addpoint_public'){this.crowdsourceLink=undefinedIfEmpty((_b=topicData.topic)===null||_b===void 0?void 0:_b.cc_keyless_link);}else{this.crowdsourceLink=undefinedIfEmpty((_c=topicData.topic)===null||_c===void 0?void 0:_c.cc_addpoint_link);}}});}copyViewOnlyMapLinkToClipboard(){var _a,_b;return __awaiter$2s(this,void 0,void 0,function*(){if(topicData.discoveryLevel!=='private'){this.viewonlyLink=undefinedIfEmpty((_a=topicData.topic)===null||_a===void 0?void 0:_a.cc_keyless_link);}else{this.viewonlyLink=undefinedIfEmpty((_b=topicData.topic)===null||_b===void 0?void 0:_b.cc_read_link);}});}duplicateMapClick(){var _a;return __awaiter$2s(this,void 0,void 0,function*(){logWithAmplitude(Navbar_1.amplitude_callsite,'Duplicate Map Click');if(detectMobileViewport()){yield this.closeOpenDrawers();yield(_a=this.duplicateDrawer)===null||_a===void 0?void 0:_a.open();}else if(this.duplicationModal){this.duplicationModal.open=true;}});}openUpgradeDialog(){var _a;this.upgradeDialogComponent.open=true;(_a=this.shareModal)===null||_a===void 0?void 0:_a.close();}shareMapClick(){return __awaiter$2s(this,void 0,void 0,function*(){logWithAmplitude(Navbar_1.amplitude_callsite,'Share Map Click');yield this.copyViewOnlyMapLinkToClipboard();yield this.copyCollaboratorMapLinkToClipboard();this.dispatchEvent(new CustomEvent('on-share-map-click',{detail:{crowdsourceLink:this.crowdsourceLink,viewonlyLink:this.viewonlyLink}}));});}grantAccessClick(){var _a;return __awaiter$2s(this,void 0,void 0,function*(){logWithAmplitude(Navbar_1.amplitude_callsite,'Grant Access Click');if(this.type==='admin-portal'){yield(_a=topicData.mapComponent)===null||_a===void 0?void 0:_a.manageAccessClick();}else{window.location.assign('/#home?page_name=Team%20Settings&setting_type=ManageTeamMembers');}});}signInClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'User Login Click');if(this.signinModalComponent){this.signinModalComponent.open=true;}}proxiBackpackClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'Proxi Backpack Click');window.location.assign(`/#home`);}accountPageClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'Account Page Click');window.location.assign(`/#account`);}startMapClick(){return __awaiter$2s(this,void 0,void 0,function*(){this.loading=true;logWithAmplitude(Navbar_1.amplitude_callsite,'Start Map Click');yield createBackingTopic(Navbar_1.amplitude_callsite);this.loading=false;});}discoverClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'Proxi Discover Click');window.location.assign(`/#discover`);}demoClick(){logWithAmplitude(Navbar_1.amplitude_callsite,'Demo Video Click');const link='https://www.proxi.co/proxi-demo-video';window.open(link,'_blank');// chameleonExperience(ChameleonTour.DemoVideo, undefinedIfEmpty(accountInfo.email) ?? getFromLocalStorage('email') ?? '', false, true); }};Navbar.amplitude_callsite='Nav Bar';__decorate$2v([i$4('#errorToast')],Navbar.prototype,"errorToastElement",void 0);__decorate$2v([i$4('#duplicationModal')],Navbar.prototype,"duplicationModal",void 0);__decorate$2v([i$4('#duplicateDrawer')],Navbar.prototype,"duplicateDrawer",void 0);__decorate$2v([i$4('#shareModal')],Navbar.prototype,"shareModal",void 0);__decorate$2v([i$4('#upgradeDialogComponent')],Navbar.prototype,"upgradeDialogComponent",void 0);__decorate$2v([i$4('#signinModalComponent')],Navbar.prototype,"signinModalComponent",void 0);__decorate$2v([e$5({type:String})],Navbar.prototype,"crowdsourceLink",void 0);__decorate$2v([e$5({type:String})],Navbar.prototype,"viewonlyLink",void 0);__decorate$2v([e$5()],Navbar.prototype,"type",void 0);__decorate$2v([e$5()],Navbar.prototype,"subscription_level_text",void 0);__decorate$2v([t$3()],Navbar.prototype,"loading",void 0);Navbar=Navbar_1=__decorate$2v([n$6('nav-bar')],Navbar);var __decorate$2w=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let AccountAvatar=class AccountAvatar extends s$5{constructor(){super(...arguments);this.indent='0';this.backgroundColor='var(--theme-white-color)';this.textColor='var(--theme-input-color)';this.isTeam=false;this.bindAccountState=new StateController(this,accountInfo);}connectedCallback(){super.connectedCallback();if(this.size==='xl'){this.style.setProperty('--avatar-size','10rem');this.style.setProperty('--avatar-font-size','2rem');}else if(this.size==='lg'){this.style.setProperty('--avatar-size','4.5rem');this.style.setProperty('--avatar-font-size','2rem');}else if(this.size==='sm'){this.style.setProperty('--avatar-size','1.5rem');this.style.setProperty('--avatar-font-size','0.75rem');}else if(this.size==='xs'){this.style.setProperty('--avatar-size','1rem');this.style.setProperty('--avatar-font-size','0.5rem');}else{this.style.setProperty('--avatar-size','3rem');this.style.setProperty('--avatar-font-size','1.5rem');}}updated(changedProperties){if(changedProperties.has('accountInfo')){this.requestUpdate();}}render(){var _a;return $` ${undefinedIfEmpty(this.imageUrl)?$``:$` `} `;}static get styles(){return r$3` .avatar { display: inline-block; vertical-align: middle; position: relative; cursor: pointer; background-color: var(--theme-white-color); border-radius: 50%; overflow: hidden; height: var(--avatar-size); width: var(--avatar-size); box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; border: 1px solid var(--theme-border-color); } .avatarLetters { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-weight: bold; font-size: var(--avatar-font-size); color: var(--theme-input-color); } @media screen and (max-width: 550px) { .avatar { --avatar-size: 2rem; } .avatarLetters { --avatar-font-size: 0.75rem; } } `;}};__decorate$2w([e$5({type:String})],AccountAvatar.prototype,"size",void 0);__decorate$2w([e$5({type:String})],AccountAvatar.prototype,"indent",void 0);__decorate$2w([e$5({type:String})],AccountAvatar.prototype,"backgroundColor",void 0);__decorate$2w([e$5({type:String})],AccountAvatar.prototype,"textColor",void 0);__decorate$2w([e$5({type:Boolean})],AccountAvatar.prototype,"isTeam",void 0);__decorate$2w([e$5({type:String})],AccountAvatar.prototype,"imageUrl",void 0);AccountAvatar=__decorate$2w([n$6('account-avatar')],AccountAvatar);var __decorate$2x=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2t=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let BackpackCard=class BackpackCard extends s$5{constructor(){super(...arguments);this.amplitude_callsite='Backpack Card';this.folders=[];this.isPinned=false;this.isOnly=false;this.canPin=false;this.showRemoveFromFolder=false;this.hideViewerType=false;this.hideMetadata=false;this.hideBookmarkButton=false;this.goToDetailPage=false;this.inCarousel=false;this.hideActions=false;this.onboarding=false;this.loadModals=false;this.mini=false;this.showImage=false;this.userType='Viewer';}updated(changedProperties){if(changedProperties.has('topic')){this.backgroundImage=isDefined(this.topic)?getSmallSocialImageForTopic(this.topic):'';this.checkForBookmarkKeys();this.setUserTypeAndTopicUrl();}}checkForBookmarkKeys(){var _a,_b,_c,_d,_e;if(((_a=this.topic)===null||_a===void 0?void 0:_a.is_owner)===true||((_b=this.topic)===null||_b===void 0?void 0:_b.is_writer)===true){return;}let bookmark=accountInfo.bookmarks.find(bookmark=>{var _a;return bookmark.topic_id===((_a=this.topic)===null||_a===void 0?void 0:_a._id);});for(let i=0;i${this.isPinned?'Remove Pin':'Pin'}`;}if(this.isPinned){return $`push_pin`;}}else{if(this.hideViewerType){return $``;}else{return $`${this.userType}`;}}}removeFromCreatorProfile(){this.dispatchEvent(new CustomEvent('on-remove-from-creator-profile'));}submitAddToFolder(){return __awaiter$2t(this,void 0,void 0,function*(){if(this.selectedFolderId&&this.topic!=null){yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2t(this,void 0,void 0,function*(){var _a,_b,_c,_d;if(this.selectedFolderId&&((_a=this.topic)===null||_a===void 0?void 0:_a._id)){yield addTopicToFolder(this.amplitude_callsite,this.selectedFolderId,(_b=this.topic)===null||_b===void 0?void 0:_b._id.$oid,{});}(_c=this.folderStructureModal)===null||_c===void 0?void 0:_c.close();yield(_d=this.topicToFolderDrawer)===null||_d===void 0?void 0:_d.close();}),'An error has occurred. Context: Failed to add to folder');}});}submitAddToTeam(){return __awaiter$2t(this,void 0,void 0,function*(){if(isDefined(this.topic)&&isDefined(this.selectedTeamId)){yield this.errorToastElement.tryOrErrorToast(()=>__awaiter$2t(this,void 0,void 0,function*(){var _a,_b,_c,_d,_e,_f;yield migrateTopicToOrganization(this.amplitude_callsite,(_a=this.selectedTeamId)!==null&&_a!==void 0?_a:'',(_c=(_b=this.topic)===null||_b===void 0?void 0:_b._id.$oid)!==null&&_c!==void 0?_c:'');yield(_d=this.topicToTeamDrawer)===null||_d===void 0?void 0:_d.close();(_e=this.topicToTeamModal)===null||_e===void 0?void 0:_e.close();this.dispatchEvent(new CustomEvent('on-move-topic',{detail:{movedTopicId:(_f=this.topic)===null||_f===void 0?void 0:_f._id.$oid}}));}),'An error has occurred. Context: Failed to add map to team. You may not have the right accesses on the map or the team.');}});}addToTeam(){var _a;return __awaiter$2t(this,void 0,void 0,function*(){if(detectMobileViewport()){yield(_a=this.topicToTeamDrawer)===null||_a===void 0?void 0:_a.open();}else if(this.topicToTeamModal){this.topicToTeamModal.open=true;}});}renderTopRightCTA(){var _a,_b,_c,_d;if(isDefined(this.creatorProfile)){if(!this.creatorProfile.is_owner&&!this.hideBookmarkButton){return $``;}else if(this.canPin){return $`Remove`;}}else if(((_a=this.topic)===null||_a===void 0?void 0:_a.is_owner)===true||((_b=this.topic)===null||_b===void 0?void 0:_b.is_writer)===true){return $` __awaiter$2t(this,void 0,void 0,function*(){return yield this.toggleDuplicateTopic();})} @share-topic=${()=>__awaiter$2t(this,void 0,void 0,function*(){return yield this.toggleShareTopic();})} @move-topic=${this.addToTeam} @add-to-folder=${this.toggleAddToFolder} @delete-topic=${()=>this.triggerDeleteTopic()} @remove-from-folder=${()=>this.toggleRemoveFromFolder()}> `;}else{if(this.hideBookmarkButton){return $``;}return $``;}}removeTopic(){var _a;return __awaiter$2t(this,void 0,void 0,function*(){if(isDefined(this.topic)&&isDefined(this.selectedFolderId)){yield removeTopicFromFolder(this.amplitude_callsite,this.selectedFolderId,(_a=this.topic)===null||_a===void 0?void 0:_a._id.$oid,{});this.dispatchEvent(new CustomEvent('on-remove-topic-from-folder',{detail:{removedTopicId:this.topic._id.$oid}}));this.removeTopicFromFolderModal.close();}});}selectFolderToAdd(e){this.selectedFolderId=e.detail.folderId;}selectTeamToAdd(e){this.selectedTeamId=e.detail.teamId;}openUpgradeDialog(){var _a;this.upgradeDialogComponent.open=true;(_a=this.shareModal)===null||_a===void 0?void 0:_a.close();}render(){var _a,_b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s,_t,_u,_v,_w,_x;return $` ${this.viewType!=='list'?$` ${this.hideActions?'':$` ${this.renderTopLeftCTA()} ${this.renderTopRightCTA()} `} ${this.showImage?$``:''} ${(_b=(_a=this.topic)===null||_a===void 0?void 0:_a.name)!==null&&_b!==void 0?_b:''} ${this.hideMetadata?'':$` place ${(_c=this.topic)===null||_c===void 0?void 0:_c.statistics.approximate_point_count} visibility ${(_d=this.topic)===null||_d===void 0?void 0:_d.statistics.approximate_topic_views} `} `:''} ${this.viewType==='list'?$` ${(_f=(_e=this.topic)===null||_e===void 0?void 0:_e.name)!==null&&_f!==void 0?_f:''} ${(_g=this.topic)===null||_g===void 0?void 0:_g.statistics.approximate_point_count} ${(_h=this.topic)===null||_h===void 0?void 0:_h.statistics.approximate_topic_views} ${new Date((_k=(_j=this.topic)===null||_j===void 0?void 0:_j.updated_at)!==null&&_k!==void 0?_k:'').toLocaleString()} window.open(this.topicUrl)}"> ${((_l=this.topic)===null||_l===void 0?void 0:_l.is_owner)===true||((_m=this.topic)===null||_m===void 0?void 0:_m.is_writer)===true?$` edit Edit `:$` visibility View `} ${this.renderTopRightCTA()} `:''} ${this.loadModals?$` this.shareModal.close()}"> ${((_o=this.topic)===null||_o===void 0?void 0:_o.is_owner)===true||((_p=this.topic)===null||_p===void 0?void 0:_p.is_writer)===true?$` `:$` `} ${detectMobileViewport()?$` __awaiter$2t(this,void 0,void 0,function*(){var _y;yield(_y=this.topicToTeamDrawer)===null||_y===void 0?void 0:_y.close();})}"> Cancel Add `:$` {var _a;return(_a=this.topicToTeamModal)===null||_a===void 0?void 0:_a.close();}}"> {var _a;return(_a=this.topicToTeamModal)===null||_a===void 0?void 0:_a.close();}}"> Cancel Add `} ${detectMobileViewport()?$` __awaiter$2t(this,void 0,void 0,function*(){var _z,_0;(_z=this.folderStructureModal)===null||_z===void 0?void 0:_z.close();yield(_0=this.topicToFolderDrawer)===null||_0===void 0?void 0:_0.close();})}"> Cancel Add `:$` {var _a;return(_a=this.folderStructureModal)===null||_a===void 0?void 0:_a.close();}}"> {var _a;return(_a=this.folderStructureModal)===null||_a===void 0?void 0:_a.close();}}"> Cancel Add `} this.duplicationModal.close()}"> this.duplicationModal.close()}"> this.removeTopicFromFolderModal.close()}"> this.removeTopicFromFolderModal.close()}"> {var _a;return(_a=this.deleteTopicModalComponent)===null||_a===void 0?void 0:_a.close();}}"> __awaiter$2t(this,void 0,void 0,function*(){return yield this.deleteTopic();})}" @close="${()=>{var _a;return(_a=this.deleteTopicModalComponent)===null||_a===void 0?void 0:_a.close();}}"> `:''} this.upgradeDialogComponent.close()}"> this.upgradeDialogComponent.close()}"> `;}static get styles(){return r$3` .backpack-card__wrapper { cursor: pointer; width: 100%; position: relative; border-radius: 0.75rem; overflow: hidden; background: var(--theme-white-color); display: flex; border: solid .1px lightgray; flex-direction: column; } .backpack-card__actions { display: flex; justify-content: space-between; position: absolute; width: inherit; } .backpack-card__info { width: 100%; display: flex; padding: 5px 5px; flex-direction: column; align-items: flex-start; gap: 8px; box-sizing: border-box; } .backpack-card__title-wrapper { width: 100%; display: flex; align-items: center; justify-content: center; } .backpack-card__action--remove { margin: 6px; --mdc-typography-button-text-transform: case; --mdc-typography-button-letter-spacing: 0px; --mdc-theme-primary: var(--main-invalid-color); --mdc-theme-on-primary: var(--theme-input-color); } .backpack-card__action--add-pin { margin: 6px; --mdc-typography-button-text-transform: case; --mdc-typography-button-letter-spacing: 0px; --mdc-theme-primary: var(--main-featured-color); --mdc-theme-on-primary: var(--theme-input-color); } .backpack-card__action--remove-pin { margin: 6px; --mdc-typography-button-text-transform: case; --mdc-typography-button-letter-spacing: 0px; --mdc-theme-primary: white; --mdc-theme-on-primary: var(--theme-input-color); } .backpack-card__pin { padding: 10px; } .backpack-card__avatar { margin-left: 10px; border: 1px solid var(--theme-focus-border-color); border-radius: 50%; height: 40px; margin-top: -12px; margin-right: 4px; } .backpack-card__metadata { width: 100%; display: flex; align-items: center; justify-content: center; color: var(--theme-input-color); gap: 15px; /* color: var(--gray-700, #666276); */ font-size: 12px; line-height: 100%; } .backpack-card__metadata-icon { color: var(--theme-lighter-text-color); padding-right: 4px; --mdc-icon-size: 12px; } .backpack-card__metadata-item { display: flex; align-items: center; } .backpack-card__user-type { padding: 3px 5px; height: 100%; align-self: center; font-size: 12px; color: var(--theme-white-color); border-radius: 6px; background: var(--main-primary-color); margin: 0 10px; } .backpack-card__user-type--Editor { background: var(--main-invalid-color); } .backpack-card__user-type--Owner { background: var(--main-secondary-color); } .backpack-card__image-wrapper { width: 100%; display: flex; } .backpack-card__image { min-width: 100%; min-height: 100%; object-fit: cover; } .shareModalBody { padding: 1.5rem; } .shareModalTitle { font-size: 1.5rem; font-weight: 700; color: var(--main-primary-color); text-align: center; margin-top: 1.5rem; } .actionButtons { display: flex; margin-top: 2rem; justify-content: space-between; } .tr { display: flex; border: 1px solid var(--theme-border-color); padding: 0.25rem 1.5rem; align-items: center; } a { text-decoration: none; color: inherit; } .td { flex: 1; } .td.td-actions { display: flex; justify-content: center; align-items: center; gap: 0.25rem; } .btnIcon { margin-right: 0.25rem; } @media (min-width: 551px) { .desktopOnly { display: block; } .mobileOnly { display: none; } .backpack-card__wrapper--only { max-width: 400px; } .backpack-card__image-wrapper { max-height: 60px; } .backpack-card__title { padding: 0px 5px; margin: 0; vertical-align: top; font-weight: bold; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; color: #454056; font-weight: 700; line-height: 100%; } .small-text { font-size: 0.7rem; white-space: normal; padding: 0; font-weight: normal; white-space: nowrap; } } @media (max-width: 550px) { .desktopOnly { display: none; } .mobileOnly { display: block; } .backpack-card__title { display: block; margin-bottom: 8px; text-align: center; } .small-text { font-size: 0.8rem; white-space: normal; padding: 0; } .backpack-card__avatar { display: block; margin: auto; margin-top: -20px; } .backpack-card__metadata { display: none; } .backpack-card__wrapper { margin-right: 10px; margin-bottom: 10px; } .backpack-card__wrapper--scroll { width: 200px; height: 100%; } .backpack-card__wrapper--scroll .backpack-card__image-wrapper { height: 130px; } } `;}};__decorate$2x([i$4('#errorToast')],BackpackCard.prototype,"errorToastElement",void 0);__decorate$2x([i$4('#deleteTopicModalComponent')],BackpackCard.prototype,"deleteTopicModalComponent",void 0);__decorate$2x([i$4('#duplicationMapComponent')],BackpackCard.prototype,"duplicationModal",void 0);__decorate$2x([i$4('#topicToFolderDrawer')],BackpackCard.prototype,"topicToFolderDrawer",void 0);__decorate$2x([i$4('#folderStructureModal')],BackpackCard.prototype,"folderStructureModal",void 0);__decorate$2x([i$4('#topicToTeamModal')],BackpackCard.prototype,"topicToTeamModal",void 0);__decorate$2x([i$4('#topicToTeamDrawer')],BackpackCard.prototype,"topicToTeamDrawer",void 0);__decorate$2x([i$4('#removeTopicFromFolderModal')],BackpackCard.prototype,"removeTopicFromFolderModal",void 0);__decorate$2x([i$4('#shareModal')],BackpackCard.prototype,"shareModal",void 0);__decorate$2x([i$4('#upgradeDialogComponent')],BackpackCard.prototype,"upgradeDialogComponent",void 0);__decorate$2x([e$5({type:Object})],BackpackCard.prototype,"topic",void 0);__decorate$2x([e$5({type:Array})],BackpackCard.prototype,"folders",void 0);__decorate$2x([e$5({type:Object})],BackpackCard.prototype,"creatorProfile",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"isPinned",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"isOnly",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"canPin",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"showRemoveFromFolder",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"hideViewerType",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"hideMetadata",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"hideBookmarkButton",void 0);__decorate$2x([e$5({type:String})],BackpackCard.prototype,"selectedFolderId",void 0);__decorate$2x([e$5({type:String})],BackpackCard.prototype,"selectedTeamId",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"goToDetailPage",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"inCarousel",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"hideActions",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"onboarding",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"loadModals",void 0);__decorate$2x([e$5({type:Boolean})],BackpackCard.prototype,"mini",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"topicUrl",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"crowdsourceLink",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"shareLink",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"viewonlyLink",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"folderInfo",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"selectedFolderInfo",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"showImage",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"viewType",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"readKey",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"readLinkWithKey",void 0);__decorate$2x([t$3()],BackpackCard.prototype,"backgroundImage",void 0);BackpackCard=__decorate$2x([n$6('backpack-card')],BackpackCard);var __decorate$2y=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let InsightCard=class InsightCard extends s$5{constructor(){super(...arguments);this.amplitude_callsite='Insight Card';this.statNumber='None';this.statName='NA';}onClick(){this.dispatchEvent(new CustomEvent('click'));}onActionClick(){this.dispatchEvent(new CustomEvent('action-click'));}render(){var _a,_b,_c;return $` ${(_a=this.statName)!==null&&_a!==void 0?_a:''} ${this.actionString} ${this.blocked===true?'N/A':(_c=(_b=this.statTopic)===null||_b===void 0?void 0:_b.name)!==null&&_c!==void 0?_c:this.statNumber} ${this.blocked===true?$` `:``} ${this.moreInfoText?$` ${this.moreInfoText} `:``} `;}static get styles(){return r$3` .insight-card__wrapper { width: 100%; border-radius: 0.75rem; background: #1d485f; border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; box-sizing: border-box; color: var(--main-secondary-color); overflow: hidden; } .insight-card__stat-number { color: white; font-size: 20px; font-weight: 500; line-height: 130%; position: relative; width: 100%; text-overflow: ellipsis; overflow: hidden; } .insight-card__blocked { position: absolute; width: 100%; height: 100%; top: 0; left: 0; background: rgba(255, 255, 255, 0.75); -webkit-backdrop-filter: blur(9px); /* fixes blur for Safari*/ backdrop-filter: blur(9px); } .insight-card__stat-name { color: var(--theme-input-border-color); font-size: 12px; line-height: 150%; } .insight-card__more-info { color: var(--main-invalid-color); font-size: 12px; font-style: italic; line-height: 100%; margin-top: 1rem; cursor: pointer; } @media (max-width: 500px) { .insight-card__stat-number { font-size: 16px; } `;}};__decorate$2y([i$4('#errorToast')],InsightCard.prototype,"errorToastElement",void 0);__decorate$2y([e$5({type:String})],InsightCard.prototype,"statNumber",void 0);__decorate$2y([e$5({type:Object})],InsightCard.prototype,"statTopic",void 0);__decorate$2y([e$5({type:String})],InsightCard.prototype,"actionString",void 0);__decorate$2y([e$5({type:String})],InsightCard.prototype,"statName",void 0);__decorate$2y([e$5({type:String})],InsightCard.prototype,"changeName",void 0);__decorate$2y([e$5({type:Boolean})],InsightCard.prototype,"blocked",void 0);__decorate$2y([e$5({type:Number})],InsightCard.prototype,"changeNumber",void 0);__decorate$2y([e$5({type:String})],InsightCard.prototype,"moreInfoText",void 0);InsightCard=__decorate$2y([n$6('insight-card')],InsightCard);var __decorate$2z=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let LoadingElement=class LoadingElement extends s$5{constructor(){super(...arguments);this.amplitude_callsite='Loading Element';this.loadingString='Loading';this.horizontal=false;this.small=false;}render(){return $` ${this.loadingString} `;}static get styles(){return r$3` :host { width: 100%; } .loading-element__wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; } .loading-element__loading-image { width: 100px; height: auto; } .horizontal { flex-direction: row; } .small { width: 25px; } `;}};__decorate$2z([e$5({type:String})],LoadingElement.prototype,"loadingString",void 0);__decorate$2z([e$5({type:Boolean})],LoadingElement.prototype,"horizontal",void 0);__decorate$2z([e$5({type:Boolean})],LoadingElement.prototype,"small",void 0);LoadingElement=__decorate$2z([n$6('loading-element')],LoadingElement);var __decorate$2A=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let ProgressElement=class ProgressElement extends s$5{constructor(){super(...arguments);this.amplitude_callsite='Progress Element';this.currentIndex=1;this.totalIndex=1;this.barColor='var(--main-success-color)';}render(){const progressBarWidth=(this.currentIndex+1)/this.totalIndex*100;return $` `;}static get styles(){return r$3` :host { width: 100%; border: 1px solid var(--main-moon-color); border-radius: 4px; background-color: var(--theme-border-color); } .progress-bar { display: flex; gap: 5px; align-items: center; justify-content: center; } .progress-bar { height: 10px; } .progress-dot { width: 10px; height: 10px; border-radius: 50%; background-color: var(--theme-border-color); transition: background-color 0.4s ease-in-out; } .progress-dot.filled { background-color: var(--main-success-color); } .progress-dot.current { background-color: #808080; } `;}};__decorate$2A([e$5({type:Number})],ProgressElement.prototype,"currentIndex",void 0);__decorate$2A([e$5({type:Number})],ProgressElement.prototype,"totalIndex",void 0);__decorate$2A([e$5({type:String})],ProgressElement.prototype,"barColor",void 0);ProgressElement=__decorate$2A([n$6('progress-element')],ProgressElement);var __decorate$2B=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let MultiUserAvatar=class MultiUserAvatar extends s$5{constructor(){super(...arguments);this.backgroundColor='var(--theme-white-color)';this.textColor='var(--theme-input-color)';this.users=[];this.maxAvatars=6;this.bindAccountState=new StateController(this,accountInfo);}connectedCallback(){super.connectedCallback();if(this.size==='xl'){this.style.setProperty('--avatar-size','10rem');this.style.setProperty('--avatar-font-size','2rem');}else if(this.size==='lg'){this.style.setProperty('--avatar-size','4.5rem');this.style.setProperty('--avatar-font-size','2rem');}else if(this.size==='sm'){this.style.setProperty('--avatar-size','1.5rem');this.style.setProperty('--avatar-font-size','0.75rem');}else{this.style.setProperty('--avatar-size','3rem');this.style.setProperty('--avatar-font-size','1.5rem');}}render(){var _a;const usersCount=(_a=this.users.length)!==null&&_a!==void 0?_a:0;const showPlusCircle=usersCount>this.maxAvatars;return $` ${this.users.slice(0,this.maxAvatars).map((user,index)=>{var _a,_b,_c,_d;return $` ${getInitials((_c=user.name)!==null&&_c!==void 0?_c:'',(_d=user.email)!==null&&_d!==void 0?_d:'')} `;})} ${showPlusCircle?$` +${usersCount-this.maxAvatars} `:''} `;}static get styles(){return r$3` .avatarOverlay { position: relative; z-index: 1; } .plusCircle { display: flex; justify-content: center; align-items: center; border-radius: 50%; width: var(--avatar-size); height: var(--avatar-size); box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; font-size: var(--avatar-font-size); cursor: pointer; border: 1px solid var(--theme-border-color); background-color: var(--theme-white-color); } `;}};__decorate$2B([e$5({type:String})],MultiUserAvatar.prototype,"size",void 0);__decorate$2B([e$5({type:String})],MultiUserAvatar.prototype,"backgroundColor",void 0);__decorate$2B([e$5({type:String})],MultiUserAvatar.prototype,"textColor",void 0);__decorate$2B([e$5({type:Array})],MultiUserAvatar.prototype,"users",void 0);__decorate$2B([t$3()],MultiUserAvatar.prototype,"maxAvatars",void 0);MultiUserAvatar=__decorate$2B([n$6('multi-user-avatar')],MultiUserAvatar);var __decorate$2C=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let CategoryPill=class CategoryPill extends s$5{constructor(){super(...arguments);this.checked=false;}handleClick(e){var _a,_b;this.dispatchEvent(new CustomEvent('select',{detail:(_b=(_a=this.value)===null||_a===void 0?void 0:_a._id)===null||_b===void 0?void 0:_b.$oid}));}render(){var _a,_b;const containerClass=`pillItem${this.checked?' selected':''}`;const selectedIconClass=`selectedIcon${this.checked?'':' displayNone'}`;const pillIconClass=this.checked?'displayNone':'';return $` check ${(_b=this.value)===null||_b===void 0?void 0:_b.name} `;}static get styles(){return r$3` .pillItem { display: flex; align-items: center; padding: 2px 4px; background: transparent; border: 2px solid var(--theme-border-color); border-radius: 40px; font-size: 12px; font-weight: 500; cursor: pointer; margin-right: 0.25rem; margin-bottom: 0.25rem; } .pillItem.selected { background: var(--main-primary-color); color: var(--theme-white-color); } .pillTitle { padding: 0 0.75rem; } .selectedIcon { border: 2px solid var(--theme-white-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; } mwc-icon { --mdc-icon-size: 1rem; } .displayNone { display: none; } `;}};__decorate$2C([e$5({type:Object})],CategoryPill.prototype,"value",void 0);__decorate$2C([e$5({type:Boolean})],CategoryPill.prototype,"checked",void 0);CategoryPill=__decorate$2C([n$6('category-pill')],CategoryPill);var __decorate$2D=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2u=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let CategorySelector=class CategorySelector extends s$5{constructor(){super(...arguments);this.canAddCategory=false;this.dropdown=false;this.dropdownOpen=false;this.previewMode=false;this.amplitude_callsite='category-selector';this.bindTopicState=new StateController(this,topicData);}connectedCallback(){const _super=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});var _a,_b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p;return __awaiter$2u(this,void 0,void 0,function*(){_super.connectedCallback.call(this);if(this.value===undefined){// allow a delay for the form to fully render. This doesn't really impact experience at the moment // because the form loads in the background yield delay(1000);let autoSelectedCategory;// if there are lots of options and one isn't already set, we want to force a selection // dropdown is only on when there are more than 8 // if the user has selected a category before, we want to keep that selection but keep this before the url check because the url check will override this const previous_stored=getFromLocalStorage(`${topicData.topicId}_last_category`);const previous_stored_cat=(_b=(_a=topicData.topic)===null||_a===void 0?void 0:_a.categories)===null||_b===void 0?void 0:_b.find(c=>{var _a;return((_a=c._id)===null||_a===void 0?void 0:_a.$oid)===previous_stored;});if(!this.dropdown&&!this.previousValue){const d=this.isWriter?(_f=(_e=(_d=(_c=topicData.topic)===null||_c===void 0?void 0:_c.categories)===null||_d===void 0?void 0:_d[0])===null||_e===void 0?void 0:_e._id)===null||_f===void 0?void 0:_f.$oid:(_l=(_k=(_j=(_h=(_g=topicData.topic)===null||_g===void 0?void 0:_g.categories)===null||_h===void 0?void 0:_h.filter(c=>c.can_crowdsource))===null||_j===void 0?void 0:_j[0])===null||_k===void 0?void 0:_k._id)===null||_l===void 0?void 0:_l.$oid;autoSelectedCategory=previous_stored_cat?(_m=previous_stored_cat._id)===null||_m===void 0?void 0:_m.$oid:d;}else if(!this.previousValue&&previous_stored_cat){autoSelectedCategory=previous_stored;}// check url parameters for categories and get the first in the comma separated list const urlParams=new URLSearchParams(window.location.search);const categoryNames=urlParams.get('categories');if(categoryNames!==null){const categoryIds=categoryNames.split(',').map(c=>{var _a,_b;return(_b=(_a=topicData.topic)===null||_a===void 0?void 0:_a.categories)===null||_b===void 0?void 0:_b.find(cat=>cat.name.toLowerCase()===c.toLowerCase());}).filter(isDefined).map(c=>{var _a;return(_a=c._id)===null||_a===void 0?void 0:_a.$oid;});if(categoryIds.length>0){autoSelectedCategory=categoryIds[0];}}this.value=(_p=(_o=this.previousValue)!==null&&_o!==void 0?_o:autoSelectedCategory)!==null&&_p!==void 0?_p:undefined;this.dispatchEvent(new CustomEvent('select',{detail:this.value}));this.requestUpdate();};});}get isWriter(){return this.previewMode?false:topicData.isWriter;}handleSelect(e){this.value=e.detail;this.dispatchEvent(new CustomEvent('select',{detail:this.value}));if(this.dropdown){this.dropdownOpen=false;}this.requestUpdate();}reportValidity(){return this.value!==undefined;}createNewCategory(){this.editableCategory={_id:undefined,name:'New Category',can_crowdsource:true,icon:'https://img.icons8.com/?size=48&id=63763&format=png',icon_size:undefined};}cancelCreateNewCategory(){this.editableCategory=undefined;}saveNewCategory(){var _a,_b,_c,_d;return __awaiter$2u(this,void 0,void 0,function*(){if(this.editableCategory!==undefined){this.editableCategory.name=(_b=(_a=this.categoryNameInput)===null||_a===void 0?void 0:_a.textContent)!==null&&_b!==void 0?_b:'New Category';this.editableCategory.icon=yield this.getSuggestedIcon(this.editableCategory.name);const categories=[...((_d=(_c=topicData.topic)===null||_c===void 0?void 0:_c.categories)!==null&&_d!==void 0?_d:[]),this.editableCategory];yield topicData.fetchAndUpdateTopicData({categories},this.amplitude_callsite,true,true);this.requestUpdate();this.editableCategory=undefined;}});}getSuggestedIcon(category_name){return __awaiter$2u(this,void 0,void 0,function*(){let suggestedIcons=[];for(let i=0;i2){break;}else if(i===0&&category_name.endsWith('s')){category_name=category_name.slice(0,-1);}else if(i===1){const words=category_name.split(' ');category_name=words[0];}}if(suggestedIcons.length===0){return'https://img.icons8.com/?size=48&id=63763&format=png';}return`https://img.icons8.com/${suggestedIcons[0].platform}/${suggestedIcons[0].commonName}.png`;});}render(){var _a,_b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m;const availableCategories=(_b=(_a=topicData.topic)===null||_a===void 0?void 0:_a.categories)===null||_b===void 0?void 0:_b.filter(c=>c.can_crowdsource);this.value=isDefined(this.previousValue)?this.previousValue:this.dropdown?undefined:(_d=(_c=availableCategories===null||availableCategories===void 0?void 0:availableCategories[0])===null||_c===void 0?void 0:_c._id)===null||_d===void 0?void 0:_d.$oid;return $` ${this.dropdown&&!this.dropdownOpen?$` {this.dropdownOpen=!this.dropdownOpen;}}"> {var _a;return((_a=c._id)===null||_a===void 0?void 0:_a.$oid)===this.value;})}> ${this.dropdownOpen?'':this.value?'Change':'Select'} ${this.dropdownOpen?$` ${(_h=this.isWriter?(_e=topicData.topic)===null||_e===void 0?void 0:_e.categories:(_g=(_f=topicData.topic)===null||_f===void 0?void 0:_f.categories)===null||_g===void 0?void 0:_g.filter(c=>c.can_crowdsource))===null||_h===void 0?void 0:_h.map(c=>{var _a;return $` `;})} `:null} `:$` ${(_m=this.isWriter?(_j=topicData.topic)===null||_j===void 0?void 0:_j.categories:(_l=(_k=topicData.topic)===null||_k===void 0?void 0:_k.categories)===null||_l===void 0?void 0:_l.filter(c=>c.can_crowdsource))===null||_m===void 0?void 0:_m.map(c=>{var _a;return $` `;})} ${this.canAddCategory===true&&this.isWriter&&this.editableCategory===undefined?$` add New Category `:''} ${this.canAddCategory===true&&this.isWriter&&this.editableCategory!==undefined?$` Type Name Here check close `:''} `} `;}static get styles(){return r$3` :host { font-family: var(--custom-font), 'Montserrat', sans-serif; } .invalid { border: var(--main-warning-color) 2px solid; border-radius: 5px; } .arrow { font-size: 0.6rem; text-decoration: underline; } .pillsContainer { display: flex; flex-wrap: wrap; margin-top: 0.5rem; } .pill-button { display: flex; align-items: center; cursor: pointer; } category-pill { display: flex; align-items: center; } .clickable { cursor: pointer; } .editable { cursor: text; } .action-icon { --mdc-icon-size: 24px; margin-left: 8px; margin-bottom: 8px; cursor: pointer; } .tags-categories__item { background-color: white; border: 2px solid var(--theme-border-color); border-radius: 50px; padding: 2px 10px; margin-bottom: 4px; font-family: var(--custom-font) 'Montserrat'; } .tags-categories__sell { --mdc-icon-size: 14px; vertical-align: text-bottom; } .tags-categories__item.over { outline: 2px dotted #666; } .tags-categories__item.tags-categories__item--group { background-color: #EFECF3; } .tags-categories__item.active { border: 3px solid var(--main-primary-color); } .tags-categories__item--image { vertical-align: text-bottom; } `;}};__decorate$2D([i$4('#categoryName')],CategorySelector.prototype,"categoryNameInput",void 0);__decorate$2D([e$5({type:String})],CategorySelector.prototype,"previousValue",void 0);__decorate$2D([e$5({type:Boolean})],CategorySelector.prototype,"canAddCategory",void 0);__decorate$2D([e$5({type:Object})],CategorySelector.prototype,"editableCategory",void 0);__decorate$2D([e$5({type:Boolean})],CategorySelector.prototype,"dropdown",void 0);__decorate$2D([t$3()],CategorySelector.prototype,"dropdownOpen",void 0);__decorate$2D([t$3()],CategorySelector.prototype,"previewMode",void 0);CategorySelector=__decorate$2D([n$6('category-selector')],CategorySelector);var __decorate$2E=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2v=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};let ConfirmModal=class ConfirmModal extends s$5{constructor(){super(...arguments);this.heading='Confirm';this.content='Are you sure?';this.cancelButtonText='Cancel';this.submitButtonText='Confirm';}handleSubmit(){return __awaiter$2v(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent('confirm'));});}handleCancel(){return __awaiter$2v(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent('close'));});}render(){return $` ${this.heading} ${this.content} ${this.cancelButtonText} ${this.submitButtonText} `;}static get styles(){return r$3` .folderModalContent { padding: 0.5rem 1.5rem 1rem; } #modalTitle { margin-bottom: 1.25rem; color: var(--main-primary-color); display: flex; algin-items: center; justify-content: center; } .actionButtonsWrapper { margin-top: 1.5rem; display: flex; justify-content: center; } form-button { padding: 0.5rem; } `;}};ConfirmModal.amplitude_callsite='Confirm Modal';__decorate$2E([e$5({type:String})],ConfirmModal.prototype,"heading",void 0);__decorate$2E([e$5({type:String})],ConfirmModal.prototype,"content",void 0);__decorate$2E([e$5({type:String})],ConfirmModal.prototype,"cancelButtonText",void 0);__decorate$2E([e$5({type:String})],ConfirmModal.prototype,"submitButtonText",void 0);ConfirmModal=__decorate$2E([n$6('confirm-modal')],ConfirmModal);var __decorate$2F=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FolderAccordion=class FolderAccordion extends s$5{render(){var _a,_b,_c;return $` ${this.hasChildren===true?$` {var _a;return this.opened=!((_a=this.opened)!==null&&_a!==void 0?_a:false);}}>${((_b=this.opened)!==null&&_b!==void 0?_b:false)?'expand_less':'expand_more'} `:$``} ${((_c=this.opened)!==null&&_c!==void 0?_c:false)?$` `:''} `;}static get styles(){return r$3` .accordionPanel.noAncestors { width: 100%; } .headingWrapper { display: flex; align-items: center; } .headingName { display: flex; align-items: center; cursor: pointer; } .spacer { width: 30px; } mwc-icon { cursor: pointer; margin-right: 0.5rem; size: 12px; } .toggleIcon { margin-left: 2px; margin-right: 7px; --mdc-icon-size: 16px; } .contentWrapper { padding-left: 0.5rem; } `;}};__decorate$2F([e$5({type:Boolean})],FolderAccordion.prototype,"opened",void 0);__decorate$2F([e$5({type:Boolean})],FolderAccordion.prototype,"hasChildren",void 0);__decorate$2F([e$5({type:Boolean})],FolderAccordion.prototype,"hasAncestors",void 0);FolderAccordion=__decorate$2F([n$6('folder-accordion')],FolderAccordion);var __decorate$2G=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FolderCard=class FolderCard extends s$5{render(){return $` folder `;}static get styles(){return r$3` .folderIcon { margin-right: 1.5rem; font-size: 2rem; } .folderCard { display: flex; align-items: center; padding: 1.5rem 2rem; margin: 0.5rem; border-radius: 0.75rem; overflow: hidden; cursor: pointer; background: var(--theme-white-color); box-shadow: 0px 2px 2px -2px rgba(31, 27, 45, 0.08), 0px 4px 12px rgba(31, 27, 45, 0.08); } `;}};FolderCard=__decorate$2G([n$6('folder-card')],FolderCard);var __decorate$2H=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};var __awaiter$2w=undefined&&undefined.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});};var FolderMenu_1;let FolderMenu=FolderMenu_1=class FolderMenu extends s$5{constructor(){super(...arguments);this.isOwner=false;this.isWriter=false;this.bindAccountState=new StateController(this,accountInfo);}firstUpdated(){return __awaiter$2w(this,void 0,void 0,function*(){yield this.startup();});}startup(){return __awaiter$2w(this,void 0,void 0,function*(){this.cornerMenu.anchor=this.menuConnect;});}openMenu(){this.cornerMenu.open=true;}render(){if(!this.isOwner&&!this.isWriter)return'';return $` drive_file_rename_outline Rename ${featuresInfo.addFolderEditorsEnabled?$` folder_shared `:$` `} Manage Access subdirectory_arrow_right New Sub Folder ${this.isOwner?$` delete Delete Folder `:''} `;}static get styles(){return r$3` :host { --mdc-menu-min-width: min(100vw, 232px); --mdc-typography-subtitle1-font-size: 12px; --context-menu-color: var(--theme-input-color); --mdc-icon-button-size: 1.5rem; } .menuIcon { color: var(--context-menu-color); cursor: pointer; --mdc-icon-size: 16px; } .menuPng { margin-right: 0.25rem; height: 20px; margin-top: auto; color: var(--context-menu-color); cursor: pointer; } mwc-list-item { --mdc-menu-item-height: 2.5rem; color: var(--context-menu-color); } mwc-list-item:hover { --context-menu-color: var(--main-primary-color); font-weight: 500; } .flexContainer { display: flex; align-items: center; } @media only screen and (max-width: 550px) { .menuPng { margin-top: 20px; } } `;}renameClick(){logWithAmplitude(FolderMenu_1.amplitude_callsite,'Folder Rename Click');this.dispatchEvent(new CustomEvent('rename-folder',{detail:{type:'rename-folder'}}));}manageAccessClick(){logWithAmplitude(FolderMenu_1.amplitude_callsite,'Folder Manage Access Click');this.dispatchEvent(new CustomEvent('manage-folder-access',{detail:{type:'manage-folder-access'}}));}newSubFolderClick(){logWithAmplitude(FolderMenu_1.amplitude_callsite,'Folder New Subfolder Click');this.dispatchEvent(new CustomEvent('add-sub-folder',{detail:{type:'add-sub-folder'}}));}deleteFolderClick(){logWithAmplitude(FolderMenu_1.amplitude_callsite,'Folder Delete Click');this.dispatchEvent(new CustomEvent('delete-folder',{detail:{type:'delete-folder'}}));}};FolderMenu.amplitude_callsite='Folder Menu';__decorate$2H([i$4('#errorToast')],FolderMenu.prototype,"errorToastElement",void 0);__decorate$2H([i$4('#cornerMenu')],FolderMenu.prototype,"cornerMenu",void 0);__decorate$2H([i$4('#menuConnect')],FolderMenu.prototype,"menuConnect",void 0);__decorate$2H([e$5({type:Boolean})],FolderMenu.prototype,"isOwner",void 0);__decorate$2H([e$5({type:Boolean})],FolderMenu.prototype,"isWriter",void 0);FolderMenu=FolderMenu_1=__decorate$2H([n$6('folder-menu')],FolderMenu);var __decorate$2I=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormButton=class FormButton extends s$5{constructor(){super(...arguments);this.fullWidth=false;this.fullHeight=false;this.size='md';this.customFont=false;this.variant='raised';this.vertical=false;}connectedCallback(){var _a,_b,_c,_d;super.connectedCallback();if(this.borderStyle==='round'){this.style.setProperty('--btn-border-radius','1.5rem');}else if(this.borderStyle==='side'){this.style.setProperty('--btn-border-radius','0 0.5rem 0.5rem 0');}else if(this.borderStyle==='none'){this.style.setProperty('--btn-border-radius','0');}else{this.style.setProperty('--btn-border-radius','4px');}if(this.size==='sm'){this.style.setProperty('--btn-font-size','12px');this.style.setProperty('--btn-padding-y','0.3rem');this.style.setProperty('--mdc-icon-size','16px');}else if(this.size==='md'){this.style.setProperty('--btn-font-size','0.8rem');this.style.setProperty('--btn-padding-y','0.4rem');this.style.setProperty('--btn-padding-x','1rem');this.style.setProperty('--mdc-icon-size','24px');}else if(this.size==='lg'){this.style.setProperty('--btn-font-size','1rem');this.style.setProperty('--btn-padding-y','0.6rem');this.style.setProperty('--btn-padding-x','1rem');this.style.setProperty('--mdc-icon-size','32px');}else if(this.size==='xs'){this.style.setProperty('--btn-font-size','0.2rem');this.style.setProperty('--btn-padding-y','0.25rem');this.style.setProperty('--btn-padding-x','0.5rem');this.style.setProperty('--mdc-icon-size','12px');}if(this.customFont===true){this.style.setProperty('font-family','var(--custom-font))');}if(this.variant==='outline'){this.style.setProperty('--btn-background-color','transparent');this.style.setProperty('--btn-hover-opacity','1');this.style.setProperty('--btn-hover-color','var(--main-primary-opacity-color)');this.style.setProperty('--btn-border-color',`${(_a=this.textColor)!==null&&_a!==void 0?_a:'var(--main-primary-color)'}`);this.style.setProperty('--btn-label-color','var(--main-primary-color)');}else if(this.variant==='outlinewarning'){this.style.setProperty('--btn-background-color','transparent');this.style.setProperty('--btn-hover-opacity','1');this.style.setProperty('--btn-hover-color','var(--main-primary-opacity-color)');this.style.setProperty('--btn-border-color','var(--main-invalid-color)');this.style.setProperty('--btn-label-color','var(--main-invalid-color)');}else if(this.variant==='social'){this.style.setProperty('--btn-background-color','transparent');this.style.setProperty('--btn-hover-opacity','1');this.style.setProperty('--btn-hover-color','var(--main-primary-color)');this.style.setProperty('--btn-border-color','var(--main-primary-color)');this.style.setProperty('--btn-label-color','var(--main-primary-color)');}else if(this.variant==='navbutton'){this.style.setProperty('--btn-background-color','transparent');this.style.setProperty('--btn-hover-opacity','1');this.style.setProperty('--btn-hover-color','var(--main-primary-color)');this.style.setProperty('--btn-border-color','transparent');this.style.setProperty('--btn-label-color','var(--main-primary-color)');this.style.setProperty('--btn-padding-x','5px');}else if(this.variant==='transparentoutline'){this.style.setProperty('--btn-hover-opacity','1');this.style.setProperty('--btn-background-color','#FFFFFF50');this.style.setProperty('--btn-hover-color','var(--main-primary-color)');// eslint-disable-next-line no-empty }else if(this.variant==='custom'){}else if(this.variant==='horizontaltall'){this.style.setProperty('--btn-flex-direction','column');this.style.setProperty('--btn-white-space','wrap');this.style.setProperty('justify-content','space-evenly');}else{this.style.setProperty('--btn-hover-color','var(--btn-background-color)');this.style.setProperty('--btn-border-color','transparent');this.style.setProperty('--btn-label-color','var(--theme-white-color)');// if background color is white, set border color to theme border color if(((_b=this.backgroundColor)===null||_b===void 0?void 0:_b.toLowerCase())==='#ffffff'||this.backgroundColor==='white'||this.backgroundColor===`var('--theme-white-color'))`||((_c=this.backgroundColor)===null||_c===void 0?void 0:_c.toLowerCase())==='#fff'){this.style.setProperty('--btn-border-color',(_d=this.textColor)!==null&&_d!==void 0?_d:'var(--theme-border-color)');}}if(this.vertical===false){this.style.setProperty('--btn-flex-direction','row');this.style.setProperty('--btn-white-space','nowrap');}else{this.style.setProperty('--btn-flex-direction','column');this.style.setProperty('--btn-white-space','wrap');this.style.setProperty('--btn-padding-y','0.25rem');}if(this.backgroundColor){this.style.setProperty('--btn-background-color',this.backgroundColor);const textColor=getVisibleTextColor(this.backgroundColor);this.style.setProperty('--btn-label-color',textColor);// set hover color to 20% darker const hoverColor=tinycolor(this.backgroundColor).darken(20).toString();this.style.setProperty('--btn-hover-color',hoverColor);}if(this.textColor){this.style.setProperty('--btn-label-color',this.textColor);}}render(){return $` ${this.icon?$` ${this.icon}`:''} `;}static get styles(){return r$3` .form-btn { display: flex; flex-direction: var(--btn-flex-direction); justify-content: center; align-items: center; width: 100%; color: var(--btn-label-color); text-align: center; text-decoration: none; white-space: var(--btn-white-space); vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; user-select: none; background-color: var(--btn-background-color, ${o$3(palette.primaryBlue)}); border: 1px solid var(--btn-border-color); padding: var(--btn-padding-y) var(--btn-padding-x, 0.5rem); font-size: var(--btn-font-size) 0.8rem; border-radius: var(--btn-border-radius); transition: all 0.2s ease-in-out; font-family: var(--main-font) } .form-btn:hover { opacity: var(--btn-hover-opacity, 0.8); color: var(--theme-white-color); background-color: var(--btn-hover-color, ${o$3(palette.primaryBlue)}); } .form-btn:disabled { color: var(--main-moon-color); cursor: not-allowed; } @media screen and (max-width: 900px) { .form-btn { font-size: 0.7rem; line-height: 1; font-weight: normal; } } `;}};__decorate$2I([e$5({type:String})],FormButton.prototype,"type",void 0);__decorate$2I([e$5({type:Boolean})],FormButton.prototype,"disabled",void 0);__decorate$2I([e$5({type:Boolean})],FormButton.prototype,"fullWidth",void 0);__decorate$2I([e$5({type:Boolean})],FormButton.prototype,"fullHeight",void 0);__decorate$2I([e$5({type:String})],FormButton.prototype,"borderStyle",void 0);__decorate$2I([e$5({type:String})],FormButton.prototype,"size",void 0);__decorate$2I([e$5({type:Boolean})],FormButton.prototype,"customFont",void 0);__decorate$2I([e$5({type:String})],FormButton.prototype,"variant",void 0);__decorate$2I([e$5({type:Boolean})],FormButton.prototype,"vertical",void 0);__decorate$2I([e$5({type:String})],FormButton.prototype,"backgroundColor",void 0);__decorate$2I([e$5({type:String})],FormButton.prototype,"textColor",void 0);__decorate$2I([e$5({type:String})],FormButton.prototype,"icon",void 0);FormButton=__decorate$2I([n$6('form-button')],FormButton);var __decorate$2J=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormCheckbox=class FormCheckbox extends s$5{constructor(){super(...arguments);this.class_name='';}handleChangeChecked(e){this.checked=e.target.checked;this.dispatchEvent(new CustomEvent('change',{detail:e.target}));this.requestUpdate();}render(){return $` `;}static get styles(){return r$3` :host { --form-checkbox-border-color: var(--theme-checkbox-color); --form-checkbox-label-color: var(--theme-input-color); } .form-check { display: flex; min-height: 1.5rem; align-items: center; } .form-check-input { width: 1rem; height: 1rem; margin: 0.2rem 0; vertical-align: top; background-color: transparent; background-repeat: no-repeat; background-position: center; background-size: contain; border: 2px solid var(--form-checkbox-border-color); -webkit-appearance: none; -moz-appearance: none; appearance: none; -webkit-print-color-adjust: exact; color-adjust: exact; } .form-check-input[type="checkbox"] { border-radius: 0.1875rem; } .form-check-input:active { filter: 0; } .form-check-input:focus { outline: 0; box-shadow: 0; } .form-check-input:checked { background-color: transparent; } .form-check-input:checked[type="checkbox"] { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23102c3d' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e"); } .form-check-input.blue:checked[type="checkbox"] { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23689D9D' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e"); } .form-check-input[type="checkbox"]:indeterminate { background-color: var(--main-primary-color); border-color: var(--main-primary-color); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e"); } .form-check-input:disabled { pointer-events: none; filter: none; opacity: 0.5; } .form-check-input[disabled] ~ .form-check-label, .form-check-input:disabled ~ .form-check-label { opacity: 0.5; } .form-check-input[disabled] ~ .form-check-label, .form-check-input:disabled ~ .form-check-label { opacity: 0.5; } .form-check-label { color: var(--form-checkbox-label-color); padding-left: 0.5rem; word-break: break-all; } `;}};__decorate$2J([e$5({type:String})],FormCheckbox.prototype,"name",void 0);__decorate$2J([e$5({type:Boolean})],FormCheckbox.prototype,"checked",void 0);__decorate$2J([e$5({type:String})],FormCheckbox.prototype,"class_name",void 0);__decorate$2J([e$5({type:Boolean})],FormCheckbox.prototype,"indeterminate",void 0);__decorate$2J([e$5({type:Boolean})],FormCheckbox.prototype,"disabled",void 0);FormCheckbox=__decorate$2J([n$6('form-checkbox')],FormCheckbox);var __decorate$2K=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormInput=class FormInput extends s$5{constructor(){super(...arguments);this.prefix='';this.prefixIcon='';this.disabled=false;}get hasPrefix(){return this.prefix.length>0;}handleChange(e){this.value=e.target.value;this.dispatchEvent(new CustomEvent('change',{detail:e.target}));}handleInputSubmit(e){e.preventDefault();this.dispatchEvent(new CustomEvent('submit',{detail:this.formInputElement.value}));return false;}reportValidity(){var _a;if(this.type==='email'&&this.value!==undefined){return validateEmail(this.value);}return(_a=this.formInputElement)===null||_a===void 0?void 0:_a.reportValidity();}render(){var _a,_b,_c,_d;const maxLimit=this.topLabel?this.topLabel:this.maxLength?`${this.maxLength} chars`:'';return $` ${this.label} ${this.hideMaxLength===true?'':$` ${maxLimit} `} ${this.prefixIcon?$`${this.prefixIcon}`:''} ${this.hasPrefix?$`${this.prefix}`:''} ${this.hasAdd===true?$` add `:''} `;}static get styles(){return r$3` .form-input__prefix { font-weight: 800; font-size: 18px; align-self: center; padding: 10px 6px; background: var(--theme-lightest-color); border: 1px solid var(--theme-input-border-color); border-right: none; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .form-input__wrapper { display: flex; position: relative; } .form-label { line-height: 1rem; font-size: 0.8rem; font-weight: 500; color: var(--theme-input-color); display: flex; justify-content: space-between; align-items: flex-end; } .form-label .max-limit { color: var(--theme-input-color); font-size: 0.8rem; font-weight: normal; padding-left: 1rem; } .form-control { display: block; width: 100%; box-sizing: border-box; padding: 10px; font-size: 0.75rem; line-height: 1.5; color: var(--theme-input-color); border: 1px solid var(--theme-input-border-color); background-color: var(--theme-white-color); background-clip: padding-box; -webkit-appearance: none; -moz-appearance: none; appearance: none; border-top-right-radius: 6px; border-bottom-right-radius: 6px; box-shadow: inset 0 1px 2px transparent; transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .form-control--rounded { border-top-left-radius: 6px; border-bottom-left-radius: 6px; } .form-control--no-border { border: none; } input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px white inset; } .form-control:focus { border-color: var(--theme-focus-border-color); background-color: var(var(--theme-white-color)); outline: 0; } .form-control--disabled { background-color: var(--theme-lightest-color); opacity: 0.7; } .form-control--prefix-icon { padding-left: 2.5rem; } .form-control:invalid, .form-control.is-invalid { border-color: var(--main-invalid-color); padding-right: calc(1.5em + 1.15rem); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%23EA8567' fill-rule='evenodd'%3e%3cpath d='M9 3a6 6 0 1 0 0 12A6 6 0 1 0 9 3zM1.5 9a7.5 7.5 0 1 1 15 0 7.5 7.5 0 1 1-15 0zM9 5.25a.75.75 0 0 1 .75.75v3a.75.75 0 1 1-1.5 0V6A.75.75 0 0 1 9 5.25zM8.25 12a.75.75 0 0 1 .75-.75h.008a.75.75 0 1 1 0 1.5H9a.75.75 0 0 1-.75-.75z'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right calc(0.375em + 0.2875rem) center; background-size: calc(0.75em + 0.575rem) calc(0.75em + 0.575rem); } .form-control::placeholder { color: var(--theme-input-color); opacity: 1; } .form-input__add { position: absolute; cursor: pointer; top: 6px; right: 6px; padding: 0.25rem; --mdc-icon-size: 1.5rem; color: var(--main-primary-color); } .form-input__prefix__icon { position: absolute; left: 6px; top: 6px; padding: 0.25rem; --mdc-icon-size: 1.5rem; color: var(--theme-input-color); } `;}};__decorate$2K([i$4('#formInput')],FormInput.prototype,"formInputElement",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"value",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"type",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"label",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"placeholder",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"prefix",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"prefixIcon",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"maxLength",void 0);__decorate$2K([e$5({type:String})],FormInput.prototype,"topLabel",void 0);__decorate$2K([e$5({type:Boolean})],FormInput.prototype,"required",void 0);__decorate$2K([e$5({type:Boolean})],FormInput.prototype,"hideMaxLength",void 0);__decorate$2K([e$5({type:Boolean})],FormInput.prototype,"noBorder",void 0);__decorate$2K([e$5({type:Boolean})],FormInput.prototype,"hasAdd",void 0);__decorate$2K([e$5({type:Boolean})],FormInput.prototype,"disabled",void 0);FormInput=__decorate$2K([n$6('form-input')],FormInput);var __decorate$2L=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormInputButton=class FormInputButton extends s$5{constructor(){super(...arguments);this.type='topic';this.label='';this.placeholder='';this.isOwner=false;this.isOpenMobileSelectBox=false;this.hideRole=false;this.value='';this.currentOption='';this.options=this.type!==undefined&&isDefined(AccessCollection[this.type])?AccessCollection[this.type].filter(accessItem=>accessItem.limited===false||this.isOwner).map(accessItem=>{return{value:accessItem.value,name:accessItem.name};}):[];}updated(changedProperties){var _a,_b,_c;if(changedProperties.has('type')){this.options=this.type!==undefined&&isDefined(AccessCollection[this.type])?AccessCollection[this.type].filter(accessItem=>accessItem.limited===false||this.isOwner).map(accessItem=>{return{value:accessItem.value,name:accessItem.name};}):[];this.currentOption=(_a=undefinedIfEmpty(this.value))!==null&&_a!==void 0?_a:(_c=this.options[((_b=this.options)===null||_b===void 0?void 0:_b.length)-1])===null||_c===void 0?void 0:_c.value;this.requestUpdate();}}handleChange(e){this.value=e.target.value;}handleClick(e){this.dispatchEvent(new CustomEvent('submit',{detail:{value:this.value,option:this.currentOption}}));this.value='';}handleClickOption(newValue){if(!newValue||newValue===''){return;}this.currentOption=newValue;this.toggleOpenSelectBox();}toggleOpenSelectBox(){this.isOpenMobileSelectBox=!this.isOpenMobileSelectBox;}render(){var _a,_b,_c;return $` ${this.label!==''?$` ${this.label} `:''} ${this.hideRole?'':$` this.handleClickOption(e.target.value)}" > ${this.options.map(option=>{return $` ${option.name} `;})} `} `;}static get styles(){return r$3` .flexContainer { display: flex; align-items: center; gap: 5px; } .alignCenter { align-items: center; } .inputLabel { font-size: 20px; color: var(--main-primary-color); margin-bottom: 0.5rem; } #accessLevel { width: 165px; padding-left: 1rem; padding-right: 1rem; border: 1px solid var(--main-primary-color); margin-left: -1px; display: flex; flex-direction: column; justify-content: center; position: relative; } #currentMenuOption { display: flex; align-items: center; justify-content: space-between; cursor: pointer; } #cornerMenu { position: absolute; margin-top: -60%; background: white; border: 1px solid var( --theme-border-color); } #textbox { flex: 1; } #textbox:focus { border-color: var(--theme-focus-border-color); background-color: var(--theme-white-color); outline: 0; } .form-btn { margin-left: -1px; min-width: 134px; } .form-btn:hover { opacity: 0.8; } .sendButton { color: var(--main-success-color); } #overlayBackground { background: var(--theme-overlay-background-color); width: 100%; height: 100%; position: absolute; top: 0; left: 0; } #overlayOptions { background: var(--theme-white-color); box-sizing: border-box; position: absolute; width: 100%; bottom: 0; left: 0; padding: 1rem 0.5rem; } .optionItem { padding: 1rem; } .optionItem.selected { background: var(--main-featured-color); border-radius: 1rem; } .optionIcon { width: 3rem; height: 1.75rem; } @media screen and (max-width: 900px) { #accessLevel { width: 120px; } } @media (min-width: 551px) { .desktopOnly { display: block; } .desktopOnly.flexContainer { display: flex; } .mobileOnly { display: none; } } @media (max-width: 550px) { .desktopOnly { display: none; } .mobileOnly { display: block; } .mobileOnly.flexContainer { display: flex; } } `;}};__decorate$2L([e$5({type:String})],FormInputButton.prototype,"type",void 0);__decorate$2L([e$5({type:String})],FormInputButton.prototype,"label",void 0);__decorate$2L([e$5({type:String})],FormInputButton.prototype,"placeholder",void 0);__decorate$2L([e$5({type:Boolean})],FormInputButton.prototype,"isOwner",void 0);__decorate$2L([e$5({type:Boolean})],FormInputButton.prototype,"isOpenMobileSelectBox",void 0);__decorate$2L([e$5({type:Boolean})],FormInputButton.prototype,"hideRole",void 0);__decorate$2L([t$3()],FormInputButton.prototype,"value",void 0);__decorate$2L([t$3()],FormInputButton.prototype,"currentOption",void 0);__decorate$2L([t$3()],FormInputButton.prototype,"options",void 0);FormInputButton=__decorate$2L([n$6('form-input-access')],FormInputButton);var __decorate$2M=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormInputButton$1=class FormInputButton extends s$5{constructor(){super(...arguments);this.value='';this.label='';this.placeholder='';this.readonly='readonly';this.valid=true;}handleChange(e){this.value=e.target.value;}handleClick(e){this.dispatchEvent(new CustomEvent('submit',{detail:e.target}));}handleKeyDown(e){if(e.key==='Enter'){this.handleClick(e);}}render(){return $` ${this.label!==''?$` ${this.label} `:''} ${this.readonly==='readonly'?$` `:$` `} `;}static get styles(){return r$3` .inputArea { display: flex; } .inputLabel { font-size: 0.8rem; color: var(--main-primary-color); margin-bottom: 0.5rem; } #textbox { flex: 1; overflow: auto; box-sizing: border-box; display: block; padding: 0.5rem 0.75rem; font-size: 0.8rem; line-height: 1.5; color: var(--theme-lighter-text-color); background-color: var(--theme-white-color); background-clip: padding-box; border: 1px solid var(--theme-input-border-color); -webkit-appearance: none; -moz-appearance: none; appearance: none; border-radius: 0.5rem 0 0 0.5rem; box-shadow: inset 0 1px 2px transparent; transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; cursor: text; } #textbox:focus { border-color: var(--theme-focus-border-color); background-color: var(--theme-white-color); outline: 0; } #textbox.input-write { color: var(--theme-input-color); } .form-btn { margin-left: -1px; } .form-btn:hover { opacity: 0.8; } `;}};__decorate$2M([e$5({type:String})],FormInputButton$1.prototype,"value",void 0);__decorate$2M([e$5({type:String})],FormInputButton$1.prototype,"type",void 0);__decorate$2M([e$5({type:String})],FormInputButton$1.prototype,"label",void 0);__decorate$2M([e$5({type:String})],FormInputButton$1.prototype,"placeholder",void 0);__decorate$2M([e$5({type:String})],FormInputButton$1.prototype,"readonly",void 0);__decorate$2M([t$3()],FormInputButton$1.prototype,"valid",void 0);FormInputButton$1=__decorate$2M([n$6('form-input-button')],FormInputButton$1);var __decorate$2N=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormSwitch=class FormSwitch extends s$5{constructor(){super(...arguments);this.name='';this.colored=false;this.disabled=false;this.mini=false;}handleChangeChecked(e){this.checked=e.target.checked;this.dispatchEvent(new CustomEvent('change',{detail:this.checked}));}setChecked(checked){var _a;this.checked=checked;// force update by removing and adding the input element const input=(_a=this.shadowRoot)===null||_a===void 0?void 0:_a.querySelector('input');if(input){const parent=input.parentElement;if(parent){parent.removeChild(input);input.checked=checked;parent.appendChild(input);}}}render(){var _a;return $` `;}static get styles(){return r$3` .form-check { display: flex; min-height: 1.5rem; align-items: center; font-size: 0.75rem; } .form-check-input { vertical-align: top; background-repeat: no-repeat; -webkit-appearance: none; -moz-appearance: none; appearance: none; } .form-check-input { width: 2rem; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); background-position: left center; border-radius: 2rem; transition: background-position 0.15s ease-in-out; height: 1.125rem; border: 0; background-color: var(--theme-checkbox-color); margin: 3px 0; min-width: 30px; } @media (prefers-reduced-motion: reduce) { .form-check-input { transition: none; } } .form-check-input:focus { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); } .form-check-input:checked { background-position: right center; } .form-check-input:checked { background-color: var(--main-primary-color); } .form-check-label { color: var(--theme-input-color); margin-left: 0.25rem; flex: 1; font-size: 0.75rem; } .form-check-mini { font-size: 0.75rem; min-height: 1rem; } .form-switch-colored .form-check-input:checked { background-color: var(--main-success-color); } .form-switch-disabled .form-check-input:checked { background-color: var(--theme-checkbox-color); } .form-switch-mini { width: 1.5rem; height: 0.75rem; margin: 0; } .form-check-input-mini { width: 1.5rem; height: 0.75rem; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); background-position: left center; border-radius: 2rem; transition: background-position 0.15s ease-in-out; height: 0.9rem; border: 0; background-color: var(--theme-checkbox-color); margin: 3px 0; min-width: 25px; } `;}};__decorate$2N([e$5({type:String})],FormSwitch.prototype,"name",void 0);__decorate$2N([e$5({type:Boolean})],FormSwitch.prototype,"checked",void 0);__decorate$2N([e$5({type:Boolean})],FormSwitch.prototype,"colored",void 0);__decorate$2N([e$5({type:Boolean})],FormSwitch.prototype,"disabled",void 0);__decorate$2N([e$5({type:Boolean})],FormSwitch.prototype,"mini",void 0);FormSwitch=__decorate$2N([n$6('form-switch')],FormSwitch);var __decorate$2O=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormTextarea=class FormTextarea extends s$5{handleChange(e){this.value=e.target.value;this.dispatchEvent(new CustomEvent('change',{detail:e.target}));}reportValidity(){var _a;return(_a=this.formTextareaElement)===null||_a===void 0?void 0:_a.reportValidity();}render(){const maxLimit=this.maxLength?`${this.maxLength} chars`:'';return $` ${this.label} ${this.hideMaxLength===true?'':$` ${maxLimit} `} ${this.value} `;}static get styles(){return r$3` .form-label { line-height: 1rem; font-size: 0.8rem; color: var(--theme-input-color); display: flex; font-weight: 500; justify-content: space-between; align-items: flex-end; } .form-label .max-limit { color: var(--theme-lighter-text-color); padding-left: 1rem; } .form-control { resize: vertical; min-height: 7rem; display: block; width: 100%; box-sizing: border-box; margin-top: 0.25rem; padding: 10px; font-family: var(--custom-font), 'Montserrat', sans-serif !important; font-size: 0.75rem; line-height: 1.5; color: var(--theme-input-color); border: 1px solid var(--theme-input-border-color); background-color: var(--theme-white-color); background-clip: padding-box; -webkit-appearance: none; -moz-appearance: none; appearance: none; border-radius: 0.5rem; box-shadow: inset 0 1px 2px transparent; transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .form-control:focus { border-color: var(--theme-focus-border-color); background-color: var(--theme-white-color); outline: 0; } .form-control::placeholder { color: var(--theme-lighter-text-color); opacity: 1; } `;}};__decorate$2O([i$4('#form-textarea')],FormTextarea.prototype,"formTextareaElement",void 0);__decorate$2O([e$5({type:String})],FormTextarea.prototype,"value",void 0);__decorate$2O([e$5({type:String})],FormTextarea.prototype,"type",void 0);__decorate$2O([e$5({type:String})],FormTextarea.prototype,"label",void 0);__decorate$2O([e$5({type:String})],FormTextarea.prototype,"placeholder",void 0);__decorate$2O([e$5({type:String})],FormTextarea.prototype,"maxLength",void 0);__decorate$2O([e$5({type:Boolean})],FormTextarea.prototype,"required",void 0);__decorate$2O([e$5({type:Boolean})],FormTextarea.prototype,"hideMaxLength",void 0);FormTextarea=__decorate$2O([n$6('form-textarea')],FormTextarea);var __decorate$2P=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c=0;i--)if(d=decorators[i])r=(c3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;};let FormTooltip=class FormTooltip extends s$5{constructor(){super(...arguments);this.tipwidth='220px';this.leftPadding='50%';this.position='bottom';}render(){const containerStyles=`width: ${this.tipwidth}; left: ${this.leftPadding}`;return $` ${this.message} `;}static get styles(){return r$3` :host { --mdc-icon-size: 1rem; } .tooltip { position: relative; display: flex; cursor: pointer; } /* Tooltip text */ .tooltip .tooltipText { visibility: hidden; background-color: var(--theme-white-color); color: var(--theme-input-color); text-align: center; padding: 0.75rem 1rem; border-radius: 0.75rem; border: 1px solid var(--theme-border-color); /* Position the tooltip text */ position: absolute; z-index: 1; transform: translateX(-50%); /* Fade in tooltip */ opacity: 0; transition: opacity 0.3s; box-shadow: 0px 80px 80px -20px rgba(154, 156, 165, 0.08), 0px 30px 24px -10px rgba(154, 156, 165, 0.05), 0px 12px 10px -6px rgba(154, 156, 165, 0.04), 0px 4px 4px -4px rgba(30, 33, 44, 0.03); } .tooltip.top .tooltipText { bottom: calc(100% + 0.5rem); } .tooltip.bottom .tooltipText { top: calc(100% + 0.5rem); } /* Tooltip arrow */ .tooltip .tooltipText::after { position: absolute; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; } .tooltip.top .tooltipText::after { bottom: -10px; border-color: var(--theme-white-color) transparent transparent; } .tooltip.bottom .tooltipText::after { top: -10px; border-color: transparent transparent var(--theme-white-color); } .tooltip .tooltipText::before { position: absolute; left: 50%; margin-left: -6px; border-width: 6px; border-style: solid; } .tooltip.top .tooltipText::before { bottom: -12px; border-color: var(--theme-white-color) transparent transparent; } .tooltip.bottom .tooltipText::before { top: -12px; border-color: transparent transparent var(--theme-border-color); } /* Show the tooltip text when you mouse over the tooltip container */ .tooltip:hover .tooltipText { visibility: visible; opacity: 1; } `;}};__decorate$2P([e$5({type:String})],FormTooltip.prototype,"message",void 0);__decorate$2P([e$5({type:String})],FormTooltip.prototype,"tipwidth",void 0);__decorate$2P([e$5({type:String})],FormTooltip.prototype,"leftPadding",void 0);__decorate$2P([e$5({type:String})],FormTooltip.prototype,"position",void 0);__decorate$2P([e$5({type:Boolean})],FormTooltip.prototype,"opened",void 0);FormTooltip=__decorate$2P([n$6('form-tooltip')],FormTooltip);/*! * lightgallery | 2.4.0 | January 29th 2022 * http://www.lightgalleryjs.com/ * Copyright (c) 2020 Sachin Neravath; * @license GPLv3 */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var __assign=function(){__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i\n \n \n ";this.core.outer.addClass('lg-has-thumb');if(this.settings.appendThumbnailsTo==='.lg-components'){this.core.$lgComponents.append(html);}else{this.core.outer.append(html);}this.$thumbOuter=this.core.outer.find('.lg-thumb-outer').first();this.$lgThumb=this.core.outer.find('.lg-thumb').first();if(this.settings.animateThumb){this.core.outer.find('.lg-thumb').css('transition-duration',this.core.settings.speed+'ms').css('width',this.thumbTotalWidth+'px').css('position','relative');}this.setThumbItemHtml(this.core.galleryItems);};Thumbnail.prototype.enableThumbDrag=function(){var _this=this;var thumbDragUtils={cords:{startX:0,endX:0},isMoved:false,newTranslateX:0,startTime:new Date(),endTime:new Date(),touchMoveTime:0};var isDragging=false;this.$thumbOuter.addClass('lg-grab');this.core.outer.find('.lg-thumb').first().on('mousedown.lg.thumb',function(e){if(_this.thumbTotalWidth>_this.thumbOuterWidth){// execute only on .lg-object e.preventDefault();thumbDragUtils.cords.startX=e.pageX;thumbDragUtils.startTime=new Date();_this.thumbClickable=false;isDragging=true;// ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 _this.core.outer.get().scrollLeft+=1;_this.core.outer.get().scrollLeft-=1;// * _this.$thumbOuter.removeClass('lg-grab').addClass('lg-grabbing');}});this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,function(e){if(!_this.core.lgOpened)return;if(isDragging){thumbDragUtils.cords.endX=e.pageX;thumbDragUtils=_this.onThumbTouchMove(thumbDragUtils);}});this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,function(){if(!_this.core.lgOpened)return;if(thumbDragUtils.isMoved){thumbDragUtils=_this.onThumbTouchEnd(thumbDragUtils);}else{_this.thumbClickable=true;}if(isDragging){isDragging=false;_this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab');}});};Thumbnail.prototype.enableThumbSwipe=function(){var _this=this;var thumbDragUtils={cords:{startX:0,endX:0},isMoved:false,newTranslateX:0,startTime:new Date(),endTime:new Date(),touchMoveTime:0};this.$lgThumb.on('touchstart.lg',function(e){if(_this.thumbTotalWidth>_this.thumbOuterWidth){e.preventDefault();thumbDragUtils.cords.startX=e.targetTouches[0].pageX;_this.thumbClickable=false;thumbDragUtils.startTime=new Date();}});this.$lgThumb.on('touchmove.lg',function(e){if(_this.thumbTotalWidth>_this.thumbOuterWidth){e.preventDefault();thumbDragUtils.cords.endX=e.targetTouches[0].pageX;thumbDragUtils=_this.onThumbTouchMove(thumbDragUtils);}});this.$lgThumb.on('touchend.lg',function(){if(thumbDragUtils.isMoved){thumbDragUtils=_this.onThumbTouchEnd(thumbDragUtils);}else{_this.thumbClickable=true;}});};// Rebuild thumbnails Thumbnail.prototype.rebuildThumbnails=function(){var _this=this;// Remove transitions this.$thumbOuter.addClass('lg-rebuilding-thumbnails');setTimeout(function(){_this.thumbTotalWidth=_this.core.galleryItems.length*(_this.settings.thumbWidth+_this.settings.thumbMargin);_this.$lgThumb.css('width',_this.thumbTotalWidth+'px');_this.$lgThumb.empty();_this.setThumbItemHtml(_this.core.galleryItems);_this.animateThumb(_this.core.index);},50);setTimeout(function(){_this.$thumbOuter.removeClass('lg-rebuilding-thumbnails');},200);};// @ts-check Thumbnail.prototype.setTranslate=function(value){this.$lgThumb.css('transform','translate3d(-'+value+'px, 0px, 0px)');};Thumbnail.prototype.getPossibleTransformX=function(left){if(left>this.thumbTotalWidth-this.thumbOuterWidth){left=this.thumbTotalWidth-this.thumbOuterWidth;}if(leftthis.thumbTotalWidth-this.thumbOuterWidth){this.translateX=this.thumbTotalWidth-this.thumbOuterWidth;}if(this.translateX0.15&&thumbDragUtils.endTime.valueOf()-thumbDragUtils.touchMoveTime2){speedX+=1;}speedX=speedX+speedX*(Math.abs(distanceXnew)/this.thumbOuterWidth);this.$lgThumb.css('transition-duration',Math.min(speedX-1,2)+'settings');distanceXnew=distanceXnew*speedX;this.translateX=this.getPossibleTransformX(this.translateX-distanceXnew);this.setTranslate(this.translateX);}else{this.translateX=thumbDragUtils.newTranslateX;}if(Math.abs(thumbDragUtils.cords.endX-thumbDragUtils.cords.startX)\n \n ";};Thumbnail.prototype.getThumbItemHtml=function(items){var thumbList='';for(var i=0;i');this.core.outer.find('.lg-toggle-thumb').first().on('click.lg',function(){_this.core.outer.toggleClass('lg-components-open');});}};Thumbnail.prototype.thumbKeyPress=function(){var _this=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,function(e){if(!_this.core.lgOpened||!_this.settings.toggleThumb)return;if(e.keyCode===38){e.preventDefault();_this.core.outer.addClass('lg-components-open');}else if(e.keyCode===40){e.preventDefault();_this.core.outer.removeClass('lg-components-open');}});};Thumbnail.prototype.destroy=function(){if(this.settings.thumbnail){this.$LG(window).off(".lg.thumb.global"+this.core.lgId);this.core.LGel.off('.lg.thumb');this.core.LGel.off('.thumb');this.$thumbOuter.remove();this.core.outer.removeClass('lg-has-thumb');}};return Thumbnail;}();/*! * lightgallery | 2.4.0 | January 29th 2022 * http://www.lightgalleryjs.com/ * Copyright (c) 2020 Sachin Neravath; * @license GPLv3 */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var __assign$1=function(){__assign$1=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i":'';if(this.settings.actualSize){zoomIcons+="";}this.core.outer.addClass('lg-use-transition-for-zoom');this.core.$toolbar.first().append(zoomIcons);};/** * @desc Enable zoom option only once the image is completely loaded * If zoomFromOrigin is true, Zoom is enabled once the dummy image has been inserted * * Zoom styles are defined under lg-zoomable CSS class. */Zoom.prototype.enableZoom=function(event){var _this=this;// delay will be 0 except first time var _speed=this.settings.enableZoomAfter+event.detail.delay;// set _speed value 0 if gallery opened from direct url and if it is first slide if(this.$LG('body').first().hasClass('lg-from-hash')&&event.detail.delay){// will execute only once _speed=0;}else{// Remove lg-from-hash to enable starting animation. this.$LG('body').first().removeClass('lg-from-hash');}this.zoomableTimeout=setTimeout(function(){if(!_this.isImageSlide()){return;}_this.core.getSlideItem(event.detail.index).addClass('lg-zoomable');if(event.detail.index===_this.core.index){_this.setZoomEssentials();}},_speed+30);};Zoom.prototype.enableZoomOnSlideItemLoad=function(){// Add zoomable class this.core.LGel.on(lGEvents$1.slideItemLoad+".zoom",this.enableZoom.bind(this));};Zoom.prototype.getModifier=function(rotateValue,axis,el){var originalRotate=rotateValue;rotateValue=Math.abs(rotateValue);var transformValues=this.getCurrentTransform(el);if(!transformValues){return 1;}var modifier=1;if(axis==='X'){var flipHorizontalValue=Math.sign(parseFloat(transformValues[0]));if(rotateValue===0||rotateValue===180){modifier=1;}else if(rotateValue===90){if(originalRotate===-90&&flipHorizontalValue===1||originalRotate===90&&flipHorizontalValue===-1){modifier=-1;}else{modifier=1;}}modifier=modifier*flipHorizontalValue;}else{var flipVerticalValue=Math.sign(parseFloat(transformValues[3]));if(rotateValue===0||rotateValue===180){modifier=1;}else if(rotateValue===90){var sinX=parseFloat(transformValues[1]);var sinMinusX=parseFloat(transformValues[2]);modifier=Math.sign(sinX*sinMinusX*originalRotate*flipVerticalValue);}modifier=modifier*flipVerticalValue;}return modifier;};Zoom.prototype.getImageSize=function($image,rotateValue,axis){var imageSizes={y:'offsetHeight',x:'offsetWidth'};if(Math.abs(rotateValue)===90){// Swap axis if(axis==='x'){axis='y';}else{axis='x';}}return $image[imageSizes[axis]];};Zoom.prototype.getDragCords=function(e,rotateValue){if(rotateValue===90){return{x:e.pageY,y:e.pageX};}else{return{x:e.pageX,y:e.pageY};}};Zoom.prototype.getSwipeCords=function(e,rotateValue){var x=e.targetTouches[0].pageX;var y=e.targetTouches[0].pageY;if(rotateValue===90){return{x:y,y:x};}else{return{x:x,y:y};}};Zoom.prototype.getDragAllowedAxises=function(rotateValue,scale){scale=scale||this.scale||1;var allowY=this.imageYSize*scale>this.containerRect.height;var allowX=this.imageXSize*scale>this.containerRect.width;if(rotateValue===90){return{allowX:allowY,allowY:allowX};}else{return{allowX:allowX,allowY:allowY};}};/** * * @param {Element} el * @return matrix(cos(X), sin(X), -sin(X), cos(X), 0, 0); * Get the current transform value */Zoom.prototype.getCurrentTransform=function(el){if(!el){return;}var st=window.getComputedStyle(el,null);var tm=st.getPropertyValue('-webkit-transform')||st.getPropertyValue('-moz-transform')||st.getPropertyValue('-ms-transform')||st.getPropertyValue('-o-transform')||st.getPropertyValue('transform')||'none';if(tm!=='none'){return tm.split('(')[1].split(')')[0].split(',');}return;};Zoom.prototype.getCurrentRotation=function(el){if(!el){return 0;}var values=this.getCurrentTransform(el);if(values){return Math.round(Math.atan2(parseFloat(values[1]),parseFloat(values[0]))*(180/Math.PI));// If you want rotate in 360 //return (angle < 0 ? angle + 360 : angle); }return 0;};Zoom.prototype.setZoomEssentials=function(){var $image=this.core.getSlideItem(this.core.index).find('.lg-image').first();var rotateEl=this.core.getSlideItem(this.core.index).find('.lg-img-rotate').first().get();this.rotateValue=this.getCurrentRotation(rotateEl);this.imageYSize=this.getImageSize($image.get(),this.rotateValue,'y');this.imageXSize=this.getImageSize($image.get(),this.rotateValue,'x');this.containerRect=this.core.outer.get().getBoundingClientRect();this.modifierX=this.getModifier(this.rotateValue,'X',rotateEl);this.modifierY=this.getModifier(this.rotateValue,'Y',rotateEl);};/** * @desc Image zoom * Translate the wrap and scale the image to get better user experience * * @param {String} scale - Zoom decrement/increment value */Zoom.prototype.zoomImage=function(scale){// Find offset manually to avoid issue after zoom var offsetX=(this.containerRect.width-this.imageXSize)/2+this.containerRect.left;var _a=this.core.mediaContainerPosition,top=_a.top,bottom=_a.bottom;var topBottomSpacing=Math.abs(top-bottom)/2;var offsetY=(this.containerRect.height-this.imageYSize-topBottomSpacing*this.modifierX)/2+this.scrollTop+this.containerRect.top;var originalX;var originalY;if(scale===1){this.positionChanged=false;}var dragAllowedAxises=this.getDragAllowedAxises(Math.abs(this.rotateValue),scale);var allowY=dragAllowedAxises.allowY,allowX=dragAllowedAxises.allowX;if(this.positionChanged){originalX=this.left/(this.scale-1);originalY=this.top/(this.scale-1);this.pageX=Math.abs(originalX)+offsetX;this.pageY=Math.abs(originalY)+offsetY;this.positionChanged=false;}var possibleSwipeCords=this.getPossibleSwipeDragCords(this.rotateValue,scale);var _x=offsetX-this.pageX;var _y=offsetY-this.pageY;var x=(scale-1)*_x;var y=(scale-1)*_y;if(allowX){if(this.isBeyondPossibleLeft(x,possibleSwipeCords.minX)){x=possibleSwipeCords.minX;}else if(this.isBeyondPossibleRight(x,possibleSwipeCords.maxX)){x=possibleSwipeCords.maxX;}}else{if(scale>1){if(xpossibleSwipeCords.maxX){x=possibleSwipeCords.maxX;}}}if(allowY){if(this.isBeyondPossibleTop(y,possibleSwipeCords.minY)){y=possibleSwipeCords.minY;}else if(this.isBeyondPossibleBottom(y,possibleSwipeCords.maxY)){y=possibleSwipeCords.maxY;}}else{// If the translate value based on index of beyond the viewport, utilize the available space to prevent image being cut out if(scale>1){//If image goes beyond viewport top, use the minim possible translate value if(ypossibleSwipeCords.maxY){y=possibleSwipeCords.maxY;}}}this.setZoomStyles({x:x,y:y,scale:scale});};/** * @desc apply scale3d to image and translate to image wrap * @param {style} X,Y and scale */Zoom.prototype.setZoomStyles=function(style){var $image=this.core.getSlideItem(this.core.index).find('.lg-image').first();var $dummyImage=this.core.outer.find('.lg-current .lg-dummy-img').first();var $imageWrap=$image.parent();this.scale=style.scale;$image.css('transform','scale3d('+style.scale+', '+style.scale+', 1)');$dummyImage.css('transform','scale3d('+style.scale+', '+style.scale+', 1)');var transform='translate3d('+style.x+'px, '+style.y+'px, 0)';$imageWrap.css('transform',transform);this.left=style.x;this.top=style.y;};/** * @param index - Index of the current slide * @param event - event will be available only if the function is called on clicking/taping the imags */Zoom.prototype.setActualSize=function(index,event){var _this=this;// Allow zoom only on image if(!this.isImageSlide()||this.core.outer.hasClass('lg-first-slide-loading')){return;}var scale=this.getCurrentImageActualSizeScale();if(this.core.outer.hasClass('lg-zoomed')){this.scale=1;}else{this.scale=this.getScale(scale);}this.setPageCords(event);this.beginZoom(this.scale);this.zoomImage(this.scale);setTimeout(function(){_this.core.outer.removeClass('lg-grabbing').addClass('lg-grab');},10);};Zoom.prototype.getNaturalWidth=function(index){var $image=this.core.getSlideItem(index).find('.lg-image').first();var naturalWidth=this.core.galleryItems[index].width;return naturalWidth?parseFloat(naturalWidth):$image.get().naturalWidth;};Zoom.prototype.getActualSizeScale=function(naturalWidth,width){var _scale;var scale;if(naturalWidth>width){_scale=naturalWidth/width;scale=_scale||2;}else{scale=1;}return scale;};Zoom.prototype.getCurrentImageActualSizeScale=function(){var $image=this.core.getSlideItem(this.core.index).find('.lg-image').first();var width=$image.get().offsetWidth;var naturalWidth=this.getNaturalWidth(this.core.index)||width;return this.getActualSizeScale(naturalWidth,width);};Zoom.prototype.getPageCords=function(event){var cords={};if(event){cords.x=event.pageX||event.targetTouches[0].pageX;cords.y=event.pageY||event.targetTouches[0].pageY;}else{var containerRect=this.core.outer.get().getBoundingClientRect();cords.x=containerRect.width/2+containerRect.left;cords.y=containerRect.height/2+this.scrollTop+containerRect.top;}return cords;};Zoom.prototype.setPageCords=function(event){var pageCords=this.getPageCords(event);this.pageX=pageCords.x;this.pageY=pageCords.y;};// If true, zoomed - in else zoomed out Zoom.prototype.beginZoom=function(scale){this.core.outer.removeClass('lg-zoom-drag-transition lg-zoom-dragging');if(scale>1){this.core.outer.addClass('lg-zoomed');var $actualSize=this.core.getElementById('lg-actual-size');$actualSize.removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut);}else{this.resetZoom();}return scale>1;};Zoom.prototype.getScale=function(scale){var actualSizeScale=this.getCurrentImageActualSizeScale();if(scaleactualSizeScale){scale=actualSizeScale;}return scale;};Zoom.prototype.init=function(){var _this=this;if(!this.settings.zoom){return;}this.buildTemplates();this.enableZoomOnSlideItemLoad();var tapped=null;this.core.outer.on('dblclick.lg',function(event){if(!_this.$LG(event.target).hasClass('lg-image')){return;}_this.setActualSize(_this.core.index,event);});this.core.outer.on('touchstart.lg',function(event){var $target=_this.$LG(event.target);if(event.targetTouches.length===1&&$target.hasClass('lg-image')){if(!tapped){tapped=setTimeout(function(){tapped=null;},300);}else{clearTimeout(tapped);tapped=null;event.preventDefault();_this.setActualSize(_this.core.index,event);}}});// Update zoom on resize and orientationchange this.core.LGel.on(lGEvents$1.containerResize+".zoom "+lGEvents$1.rotateRight+".zoom "+lGEvents$1.rotateLeft+".zoom "+lGEvents$1.flipHorizontal+".zoom "+lGEvents$1.flipVertical+".zoom",function(){if(!_this.core.lgOpened||!_this.isImageSlide())return;_this.setPageCords();_this.setZoomEssentials();_this.zoomImage(_this.scale);});// Update zoom on resize and orientationchange this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,function(){if(!_this.core.lgOpened)return;_this.scrollTop=_this.$LG(window).scrollTop();});this.core.getElementById('lg-zoom-out').on('click.lg',function(){if(_this.core.outer.find('.lg-current .lg-image').get()){_this.scale-=_this.settings.scale;_this.scale=_this.getScale(_this.scale);_this.beginZoom(_this.scale);_this.zoomImage(_this.scale);}});this.core.getElementById('lg-zoom-in').on('click.lg',function(){_this.zoomIn();});this.core.getElementById('lg-actual-size').on('click.lg',function(){_this.setActualSize(_this.core.index);});this.core.LGel.on(lGEvents$1.beforeOpen+".zoom",function(){_this.core.outer.find('.lg-item').removeClass('lg-zoomable');});this.core.LGel.on(lGEvents$1.afterOpen+".zoom",function(){_this.scrollTop=_this.$LG(window).scrollTop();// Set the initial value center _this.pageX=_this.core.outer.width()/2;_this.pageY=_this.core.outer.height()/2+_this.scrollTop;_this.scale=1;});// Reset zoom on slide change this.core.LGel.on(lGEvents$1.afterSlide+".zoom",function(event){var prevIndex=event.detail.prevIndex;_this.scale=1;_this.positionChanged=false;_this.resetZoom(prevIndex);if(_this.isImageSlide()){_this.setZoomEssentials();}});// Drag option after zoom this.zoomDrag();this.pinchZoom();this.zoomSwipe();// Store the zoomable timeout value just to clear it while closing this.zoomableTimeout=false;this.positionChanged=false;};Zoom.prototype.zoomIn=function(scale){// Allow zoom only on image if(!this.isImageSlide()){return;}if(scale){this.scale=scale;}else{this.scale+=this.settings.scale;}this.scale=this.getScale(this.scale);this.beginZoom(this.scale);this.zoomImage(this.scale);};// Reset zoom effect Zoom.prototype.resetZoom=function(index){this.core.outer.removeClass('lg-zoomed lg-zoom-drag-transition');var $actualSize=this.core.getElementById('lg-actual-size');var $item=this.core.getSlideItem(index!==undefined?index:this.core.index);$actualSize.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn);$item.find('.lg-img-wrap').first().removeAttr('style');$item.find('.lg-image').first().removeAttr('style');this.scale=1;this.left=0;this.top=0;// Reset pagx pagy values to center this.setPageCords();};Zoom.prototype.getTouchDistance=function(e){return Math.sqrt((e.targetTouches[0].pageX-e.targetTouches[1].pageX)*(e.targetTouches[0].pageX-e.targetTouches[1].pageX)+(e.targetTouches[0].pageY-e.targetTouches[1].pageY)*(e.targetTouches[0].pageY-e.targetTouches[1].pageY));};Zoom.prototype.pinchZoom=function(){var _this=this;var startDist=0;var pinchStarted=false;var initScale=1;var $item=this.core.getSlideItem(this.core.index);this.core.$inner.on('touchstart.lg',function(e){$item=_this.core.getSlideItem(_this.core.index);if(!_this.isImageSlide()){return;}if(e.targetTouches.length===2&&!_this.core.outer.hasClass('lg-first-slide-loading')&&(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))){initScale=_this.scale||1;_this.core.outer.removeClass('lg-zoom-drag-transition lg-zoom-dragging');_this.core.touchAction='pinch';startDist=_this.getTouchDistance(e);}});this.core.$inner.on('touchmove.lg',function(e){if(e.targetTouches.length===2&&_this.core.touchAction==='pinch'&&(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))){e.preventDefault();var endDist=_this.getTouchDistance(e);var distance=startDist-endDist;if(!pinchStarted&&Math.abs(distance)>5){pinchStarted=true;}if(pinchStarted){_this.scale=Math.max(1,initScale+-distance*0.008);_this.zoomImage(_this.scale);}}});this.core.$inner.on('touchend.lg',function(e){if(_this.core.touchAction==='pinch'&&(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))){pinchStarted=false;startDist=0;if(_this.scale2){speedX+=1;}if(speedY>2){speedY+=1;}distanceXnew=distanceXnew*speedX;distanceYnew=distanceYnew*speedY;var _LGel=this.core.getSlideItem(this.core.index).find('.lg-img-wrap').first();var distance={};distance.x=this.left+distanceXnew*this.modifierX;distance.y=this.top+distanceYnew*this.modifierY;var possibleSwipeCords=this.getPossibleSwipeDragCords(rotateValue);if(Math.abs(distanceXnew)>15||Math.abs(distanceYnew)>15){if(allowY){if(this.isBeyondPossibleTop(distance.y,possibleSwipeCords.minY)){distance.y=possibleSwipeCords.minY;}else if(this.isBeyondPossibleBottom(distance.y,possibleSwipeCords.maxY)){distance.y=possibleSwipeCords.maxY;}}if(allowX){if(this.isBeyondPossibleLeft(distance.x,possibleSwipeCords.minX)){distance.x=possibleSwipeCords.minX;}else if(this.isBeyondPossibleRight(distance.x,possibleSwipeCords.maxX)){distance.x=possibleSwipeCords.maxX;}}if(allowY){this.top=distance.y;}else{distance.y=this.top;}if(allowX){this.left=distance.x;}else{distance.x=this.left;}this.setZoomSwipeStyles(_LGel,distance);this.positionChanged=true;}};Zoom.prototype.getZoomSwipeCords=function(startCoords,endCoords,allowX,allowY,possibleSwipeCords){var distance={};if(allowY){distance.y=this.top+(endCoords.y-startCoords.y)*this.modifierY;if(this.isBeyondPossibleTop(distance.y,possibleSwipeCords.minY)){var diffMinY=possibleSwipeCords.minY-distance.y;distance.y=possibleSwipeCords.minY-diffMinY/6;}else if(this.isBeyondPossibleBottom(distance.y,possibleSwipeCords.maxY)){var diffMaxY=distance.y-possibleSwipeCords.maxY;distance.y=possibleSwipeCords.maxY+diffMaxY/6;}}else{distance.y=this.top;}if(allowX){distance.x=this.left+(endCoords.x-startCoords.x)*this.modifierX;if(this.isBeyondPossibleLeft(distance.x,possibleSwipeCords.minX)){var diffMinX=possibleSwipeCords.minX-distance.x;distance.x=possibleSwipeCords.minX-diffMinX/6;}else if(this.isBeyondPossibleRight(distance.x,possibleSwipeCords.maxX)){var difMaxX=distance.x-possibleSwipeCords.maxX;distance.x=possibleSwipeCords.maxX+difMaxX/6;}}else{distance.x=this.left;}return distance;};Zoom.prototype.isBeyondPossibleLeft=function(x,minX){return x>=minX;};Zoom.prototype.isBeyondPossibleRight=function(x,maxX){return x=minY;};Zoom.prototype.isBeyondPossibleBottom=function(y,maxY){return y15||Math.abs(endCoords.y-startCoords.y)>15){isMoved=true;_this.setZoomSwipeStyles(_LGel,distance);}}});this.core.$inner.on('touchend.lg',function(e){if(_this.core.touchAction==='zoomSwipe'&&(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target))){_this.core.touchAction=undefined;_this.core.outer.removeClass('lg-zoom-dragging');if(!isMoved){return;}isMoved=false;endTime=new Date();var touchDuration=endTime.valueOf()-startTime.valueOf();_this.touchendZoom(startCoords,endCoords,allowX,allowY,touchDuration,_this.rotateValue);}});};Zoom.prototype.zoomDrag=function(){var _this=this;var startCoords={};var endCoords={};var isDragging=false;var isMoved=false;// Allow x direction drag var allowX=false;// Allow Y direction drag var allowY=false;var startTime;var endTime;var possibleSwipeCords;var _LGel;this.core.outer.on('mousedown.lg.zoom',function(e){// Allow zoom only on image if(!_this.isImageSlide()){return;}var $item=_this.core.getSlideItem(_this.core.index);if(_this.$LG(e.target).hasClass('lg-item')||$item.get().contains(e.target)){startTime=new Date();_LGel=_this.core.getSlideItem(_this.core.index).find('.lg-img-wrap').first();var dragAllowedAxises=_this.getDragAllowedAxises(Math.abs(_this.rotateValue));allowY=dragAllowedAxises.allowY;allowX=dragAllowedAxises.allowX;if(_this.core.outer.hasClass('lg-zoomed')){if(_this.$LG(e.target).hasClass('lg-object')&&(allowX||allowY)){e.preventDefault();startCoords=_this.getDragCords(e,Math.abs(_this.rotateValue));possibleSwipeCords=_this.getPossibleSwipeDragCords(_this.rotateValue);isDragging=true;// ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 _this.core.outer.get().scrollLeft+=1;_this.core.outer.get().scrollLeft-=1;_this.core.outer.removeClass('lg-grab').addClass('lg-grabbing lg-zoom-drag-transition lg-zoom-dragging');// reset opacity and transition duration }}}});this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,function(e){if(isDragging){isMoved=true;endCoords=_this.getDragCords(e,Math.abs(_this.rotateValue));var distance=_this.getZoomSwipeCords(startCoords,endCoords,allowX,allowY,possibleSwipeCords);_this.setZoomSwipeStyles(_LGel,distance);}});this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,function(e){if(isDragging){endTime=new Date();isDragging=false;_this.core.outer.removeClass('lg-zoom-dragging');// Fix for chrome mouse move on click if(isMoved&&(startCoords.x!==endCoords.x||startCoords.y!==endCoords.y)){endCoords=_this.getDragCords(e,Math.abs(_this.rotateValue));var touchDuration=endTime.valueOf()-startTime.valueOf();_this.touchendZoom(startCoords,endCoords,allowX,allowY,touchDuration,_this.rotateValue);}isMoved=false;}_this.core.outer.removeClass('lg-grabbing').addClass('lg-grab');});};Zoom.prototype.closeGallery=function(){this.resetZoom();};Zoom.prototype.destroy=function(){// Unbind all events added by lightGallery zoom plugin this.$LG(window).off(".lg.zoom.global"+this.core.lgId);this.core.LGel.off('.lg.zoom');this.core.LGel.off('.zoom');clearTimeout(this.zoomableTimeout);this.zoomableTimeout=false;};return Zoom;}();/*! * lightgallery | 2.4.0 | January 29th 2022 * http://www.lightgalleryjs.com/ * Copyright (c) 2020 Sachin Neravath; * @license GPLv3 */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var __assign$2=function(){__assign$2=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;iwWidth){lgSize=size_1;break;}// take last item as last option if(i===isResponsiveSizes.length-1){lgSize=size_1;}}}var size=lgSize.split('-');var width=parseInt(size[0],10);var height=parseInt(size[1],10);var cWidth=container.width();var cHeight=container.height()-spacing;var maxWidth=Math.min(cWidth,width);var maxHeight=Math.min(cHeight,height);var ratio=Math.min(maxWidth/width,maxHeight/height);return{width:width*ratio,height:height*ratio};},/** * @desc Get transform value based on the imageSize. Used for ZoomFromOrigin option * @param {jQuery Element} * @returns {String} Transform CSS string */getTransform:function(el,container,top,bottom,imageSize){if(!imageSize){return;}var LGel=$LG(el).find('img').first();if(!LGel.get()){return;}var containerRect=container.get().getBoundingClientRect();var wWidth=containerRect.width;// using innerWidth to include mobile safari bottom bar var wHeight=container.height()-(top+bottom);var elWidth=LGel.width();var elHeight=LGel.height();var elStyle=LGel.style();var x=(wWidth-elWidth)/2-LGel.offset().left+(parseFloat(elStyle.paddingLeft)||0)+(parseFloat(elStyle.borderLeft)||0)+$LG(window).scrollLeft()+containerRect.left;var y=(wHeight-elHeight)/2-LGel.offset().top+(parseFloat(elStyle.paddingTop)||0)+(parseFloat(elStyle.borderTop)||0)+$LG(window).scrollTop()+top;var scX=elWidth/imageSize.width;var scY=elHeight/imageSize.height;var transform='translate3d('+(x*=-1)+'px, '+(y*=-1)+'px, 0) scale3d('+scX+', '+scY+', 1)';return transform;},getIframeMarkup:function(iframeWidth,iframeHeight,iframeMaxWidth,iframeMaxHeight,src,iframeTitle){var title=iframeTitle?'title="'+iframeTitle+'"':'';return"\n \n ";},getImgMarkup:function(index,src,altAttr,srcset,sizes,sources){var srcsetAttr=srcset?"srcset=\""+srcset+"\"":'';var sizesAttr=sizes?"sizes=\""+sizes+"\"":'';var imgMarkup="";var sourceTag='';if(sources){var sourceObj=typeof sources==='string'?JSON.parse(sources):sources;sourceTag=sourceObj.map(function(source){var attrs='';Object.keys(source).forEach(function(key){// Do not remove the first space as it is required to separate the attributes attrs+=" "+key+"=\""+source[key]+"\"";});return"";});}return""+sourceTag+imgMarkup;},// Get src from responsive src getResponsiveSrc:function(srcItms){var rsWidth=[];var rsSrc=[];var src='';for(var i=0;iwWidth){src=rsSrc[j];break;}}return src;},isImageLoaded:function(img){if(!img)return false;// During the onload event, IE correctly identifies any images that // weren’t downloaded as not complete. Others should too. Gecko-based // browsers act like NS4 in that they report this incorrectly. if(!img.complete){return false;}// However, they do have two very useful properties: naturalWidth and // naturalHeight. These give the true size of the image. If it failed // to load, either of these should be zero. if(img.naturalWidth===0){return false;}// No other way of checking: assume it’s ok. return true;},getVideoPosterMarkup:function(_poster,dummyImg,videoContStyle,playVideoString,_isVideo){var videoClass='';if(_isVideo&&_isVideo.youtube){videoClass='lg-has-youtube';}else if(_isVideo&&_isVideo.vimeo){videoClass='lg-has-vimeo';}else{videoClass='lg-has-html5';}return"\n \n \n "+playVideoString+"\n \n \n \n \n \n \n \n \n "+(dummyImg||'')+"\n \n ";},/** * @desc Create dynamic elements array from gallery items when dynamic option is false * It helps to avoid frequent DOM interaction * and avoid multiple checks for dynamic elments * * @returns {Array} dynamicEl */getDynamicOptions:function(items,extraProps,getCaptionFromTitleOrAlt,exThumbImage){var dynamicElements=[];var availableDynamicOptions=__spreadArrays(defaultDynamicOptions,extraProps);[].forEach.call(items,function(item){var dynamicEl={};for(var i=0;i-1){label=dynamicAttr;}if(label){dynamicEl[label]=attr.value;}}}var currentItem=$LG(item);var alt=currentItem.find('img').first().attr('alt');var title=currentItem.attr('title');var thumb=exThumbImage?currentItem.attr(exThumbImage):currentItem.find('img').first().attr('src');dynamicEl.thumb=thumb;if(getCaptionFromTitleOrAlt&&!dynamicEl.subHtml){dynamicEl.subHtml=title||alt||'';}dynamicEl.alt=alt||title||'';dynamicElements.push(dynamicEl);});return dynamicElements;},isMobile:function(){return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);},/** * @desc Check the given src is video * @param {String} src * @return {Object} video type * Ex:{ youtube : ["//www.youtube.com/watch?v=c0asJgSyxcY", "c0asJgSyxcY"] } * * @todo - this information can be moved to dynamicEl to avoid frequent calls */isVideo:function(src,isHTML5VIdeo,index){if(!src){if(isHTML5VIdeo){return{html5:true};}else{console.error('lightGallery :- data-src is not provided on slide item '+(index+1)+'. Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/');return;}}var youtube=src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i);var vimeo=src.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i);var wistia=src.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);if(youtube){return{youtube:youtube};}else if(vimeo){return{vimeo:vimeo};}else if(wistia){return{wistia:wistia};}}};// @ref - https://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio // @ref - https://2ality.com/2017/04/setting-up-multi-platform-packages.html // Unique id for each gallery var lgId=0;var LightGallery=/** @class */function(){function LightGallery(element,options){this.lgOpened=false;this.index=0;// lightGallery modules this.plugins=[];// false when lightGallery load first slide content; this.lGalleryOn=false;// True when a slide animation is in progress this.lgBusy=false;this.currentItemsInDom=[];// Scroll top value before lightGallery is opened this.prevScrollTop=0;this.isDummyImageRemoved=false;this.dragOrSwipeEnabled=false;this.mediaContainerPosition={top:0,bottom:0};if(!element){return this;}lgId++;this.lgId=lgId;this.el=element;this.LGel=$LG(element);this.generateSettings(options);this.buildModules();// When using dynamic mode, ensure dynamicEl is an array if(this.settings.dynamic&&this.settings.dynamicEl!==undefined&&!Array.isArray(this.settings.dynamicEl)){throw'When using dynamic mode, you must also define dynamicEl as an Array.';}this.galleryItems=this.getItems();this.normalizeSettings();// Gallery items this.init();this.validateLicense();return this;}LightGallery.prototype.generateSettings=function(options){// lightGallery settings this.settings=__assign$2(__assign$2({},lightGalleryCoreSettings),options);if(this.settings.isMobile&&typeof this.settings.isMobile==='function'?this.settings.isMobile():utils.isMobile()){var mobileSettings=__assign$2(__assign$2({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=__assign$2(__assign$2({},this.settings),mobileSettings);}};LightGallery.prototype.normalizeSettings=function(){if(this.settings.slideEndAnimation){this.settings.hideControlOnEnd=false;}if(!this.settings.closable){this.settings.swipeToClose=false;}// And reset it on close to get the correct value next time this.zoomFromOrigin=this.settings.zoomFromOrigin;// At the moment, Zoom from image doesn't support dynamic options // @todo add zoomFromOrigin support for dynamic images if(this.settings.dynamic){this.zoomFromOrigin=false;}if(!this.settings.container){this.settings.container=document.body;}// settings.preload should not be grater than $item.length this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length);};LightGallery.prototype.init=function(){var _this=this;this.addSlideVideoInfo(this.galleryItems);this.buildStructure();this.LGel.trigger(lGEvents$2.init,{instance:this});if(this.settings.keyPress){this.keyPress();}setTimeout(function(){_this.enableDrag();_this.enableSwipe();_this.triggerPosterClick();},50);this.arrow();if(this.settings.mousewheel){this.mousewheel();}if(!this.settings.dynamic){this.openGalleryOnItemClick();}};LightGallery.prototype.openGalleryOnItemClick=function(){var _this=this;var _loop_1=function(index){var element=this_1.items[index];var $element=$LG(element);// Using different namespace for click because click event should not unbind if selector is same object('this') // @todo manage all event listners - should have namespace that represent element var uuid=lgQuery.generateUUID();$element.attr('data-lg-id',uuid).on("click.lgcustom-item-"+uuid,function(e){e.preventDefault();var currentItemIndex=_this.settings.index||index;_this.openGallery(currentItemIndex,element);});};var this_1=this;// Using for loop instead of using bubbling as the items can be any html element. for(var index=0;index "+this.settings.prevHtml+" \n "+this.settings.nextHtml+" ";}if(this.settings.appendSubHtmlTo!=='.lg-item'){subHtmlCont='';}var addClasses='';if(this.settings.allowMediaOverlap){// Do not remove space before last single quote addClasses+='lg-media-overlap ';}var ariaLabelledby=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':'';var ariaDescribedby=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':'';var containerClassName="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?'lg-inline':'');var closeIcon=this.settings.closable&&this.settings.showCloseIcon?"":'';var maximizeIcon=this.settings.showMaximizeIcon?"":'';var template="\n \n \n\n \n\n
${this.title}
${this.heading}
Site Speed
4.8897750377655

Rankings

Alexa Rank:

0

Site's Traffic

alexa rank

DNS Analysis

Host Type Class TTL Target
map.proxi.coCNAMEIN11142mapmyx.azurewebsites.net

Similar