@snippyly/plugin-staging 1.0.709 → 1.0.710

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snippyly/plugin-staging",
3
- "version": "1.0.709",
3
+ "version": "1.0.710",
4
4
  "description": "",
5
5
  "main": "snippyly.js",
6
6
  "scripts": {
package/snippyly.js CHANGED
@@ -3946,7 +3946,7 @@ class Bl extends Is{}Bl.Encryptor=class extends Bl{processBlock(t,e){const i=t,o
3946
3946
  </div>
3947
3947
  </div>
3948
3948
  </div>
3949
- `}};Lc.styles=Ic,Oc([et({type:String})],Lc.prototype,"apiKey",void 0),Oc([et({type:String})],Lc.prototype,"documentId",void 0),Oc([et({type:Boolean})],Lc.prototype,"disableInvite",void 0),Oc([et({type:Boolean})],Lc.prototype,"hasInviteAccess",void 0),Oc([it()],Lc.prototype,"userType",void 0),Oc([it()],Lc.prototype,"showCheckIcon",void 0),Oc([it()],Lc.prototype,"contactListIsHovered",void 0),Oc([it()],Lc.prototype,"invalidEmail",void 0),Oc([it()],Lc.prototype,"isEmailValid",void 0),Oc([it()],Lc.prototype,"inviting",void 0),Oc([it()],Lc.prototype,"searchingUsers",void 0),Oc([it()],Lc.prototype,"emailInput",void 0),Oc([it()],Lc.prototype,"emailTags",void 0),Oc([it()],Lc.prototype,"editingTag",void 0),Oc([it()],Lc.prototype,"editingInput",void 0),Oc([it()],Lc.prototype,"duplicateEmail",void 0),Oc([it()],Lc.prototype,"filteredContacts",void 0),Oc([ot("#mainInput")],Lc.prototype,"mainInput",void 0),Oc([ot("#editInput")],Lc.prototype,"editInput",void 0),Lc=Oc([(t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:o}=e;return{kind:i,elements:o,finisher(e){window.customElements.define(t,e)}}})(t,e))("superflow-invite-modal")],Lc);var Ac=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class $c extends Q{constructor(){super(),this._loadPlugin=!1,this.comments=[],this.addCommentMode=!1,this.showTourCommentTooltip=!1,this.allFeatureDisabled=!1,this.allFeatureRestricted=!1,this.guestMode=!1,this._expanded=!0,this.loading=!0,this._isPlanExpired=null,this.showOnboardingModal=!0,this.showLiveDemoModal=!1,this.showFigmaDemoModal=!1,this.showGuestModeSignInModal=!1,this.defaultGuestModeSignInModalConfig={title:"Sign in to notify your team",description:"Notify your team about your latest comments.",closeOnClickOutside:!1,showLeaveCommentButton:!0},this.guestModeSignInModalConfig=JSON.parse(JSON.stringify(this.defaultGuestModeSignInModalConfig)),this.showGuestModeNameModal=!1,this.guestModeSignInBannerVisible=!1,this.guestUserNameInput="",this.guestUserModelOpened=!1,this.guestUserNameUpdated=!1,this.guestUserNameUpdateLoading=!1,this.staging=Xt,this._autoLocation=!0,this.copyLinkTooltip="Copy Link",this.invalidApiKey=!1,this._isUserGlobalContact=!1,this.showQrCode=!1,this.customLoginEnabledLocally=null,this.customLoginEnabled=null,this.exitReviewModeCalled=!1,this.addCommentCount=0,this._privateCommentModeEnabled=!1,this.superflowToolbarMoved=!1,this._darkMode=!1,this.allowGuestModeSignIn=!0,this._queryParamsComments=!1,this._usePageTitleAsLocationName=!1,this.toolbarEnabled=!1,this.toolbarEnabledApiCalled=!1,this.passwordProtected=!1,this.isPasswordValid=!1,this.password="",this.validatingPasswordLoading=!1,this.showPasswordProtectedModal=!1,this.showInvalidPassword=!1,this.skipGuestNameModal=!1,this._totalViews={},this.totalViewsCount=0,this.inviteUrl="",this.showModalOnceCommentIsModeIsOff=!1,this.showInviteModal=!1,this.subscriptions=[],this.onApiKeyChange=()=>{try{this.apiKey&&(null===window||void 0===window?void 0:window.onSuperflowLoad)&&"function"==typeof window.onSuperflowLoad&&window.onSuperflowLoad()}catch(t){console.warn("Error in onApiKeyChange: ",t),bc("Error in onApiKeyChange: ",t)}},this.checkCustomLoginEnabled=async()=>{var t,e;try{const i=await(e=this.apiKey,fo(pc,ne,{timeout:12e5})({eventType:"customLoginEnabled",apiKey:e}));this.customLoginEnabled=!!(null===(t=null==i?void 0:i.data)||void 0===t?void 0:t.customLoginEnabled),this.customLoginEnabled&&this.loginWithCustomUser()}catch(t){this.customLoginEnabled=!1,console.warn("Error in checkCustomLoginEnabled: ",t),bc("Error in checkCustomLoginEnabled: ",t)}},this.loginWithCustomUser=()=>{try{this.customLoginEnabled?(rc(kt),this.loadPlugin&&this.documentId&&this.identifySnippyly()):console.warn("Identify call not allowed.")}catch(t){console.warn("Error in loginWithCustomUser: ",t),bc("Error in loginWithCustomUser: ",t)}},this.addWindowClickEventListener=()=>{try{this.windowClickEventListener||(this.windowClickEventListener=()=>{this.menuOpenedId&&(this.menuOpenedId=void 0)},window.addEventListener("click",this.windowClickEventListener))}catch(t){console.warn("Error in addWindowClickEventListener: ",t),bc("Error in addWindowClickEventListener: ",t)}},this.removeWindowClickEventListener=()=>{try{window.removeEventListener("click",this.windowClickEventListener),this.windowClickEventListener=void 0}catch(t){console.warn("Error in removeWindowClickEventListener: ",t),bc("Error in removeWindowClickEventListener: ",t)}},this.setWindowEventListner=()=>{try{window.addEventListener("locationchange",(()=>{this.checkUrl()}))}catch(t){console.warn("Error in setWindowEventListner: ",t),bc("Error in setWindowEventListner: ",t)}},this.urlChangeListener=()=>{try{const t=history.pushState;history.pushState=function(){const e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),e};const e=history.replaceState;history.replaceState=function(){const t=e.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),t},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))}))}catch(t){console.warn("Error in urlChangeListener: ",t),bc("Error in urlChangeListener: ",t)}},this.checkUrl=()=>{try{this.setInviteUrl();const t=new URL(document.location),e=t.searchParams;if(e.has(Ct)&&oc(wt,"true",!1),(null==e?void 0:e.has(It))&&!nc(It)?this.showOnboardingModal=!0:this.showOnboardingModal=!1,null==e?void 0:e.has(Nt))if(nc(Nt,!1,"sessionStorage")){this.showLiveDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(Nt),window.history.replaceState({},null===document||void 0===document?void 0:document.title,t.toString())}else this.showLiveDemoModal=!0;else this.showLiveDemoModal=!1;if(null==e?void 0:e.has(Ot))if(nc(Ot,!1)){this.showFigmaDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(Ot),window.history.replaceState({},null===document||void 0===document?void 0:document.title,t.toString())}else this.showFigmaDemoModal=!0;else this.showFigmaDemoModal=!1;if(e.has(Et)||e.has("snippyly_google_token")){if(e.has(Et)){const t=decodeURIComponent(e.get(Et)),i=lc(t,ee,ie),o=i&&JSON.parse(i);if(o){const t={};t.userId=o.uid,t.name=o.displayName,t.email=o.email,t.photoUrl=null==o?void 0:o.photoURL;const e=JSON.stringify(t),i=ac(e,ee,ie);oc(kt,i,!0),rc(At)}}else if(e.has("snippyly_google_token")){const t=JSON.parse(atob(e.get("snippyly_google_token"))),i={};i.userId=t.uid,i.name=t.displayName,i.email=t.email,i.photoUrl=null==t?void 0:t.photoURL,oc(xt,JSON.stringify(i),!0)}e.delete(Et),e.delete("snippyly_google_token"),window.history.replaceState({},document.title,t.href)}e.has(wt)?(oc(wt,"true",!1),rc(bt),e.delete(wt),window.history.replaceState({},document.title,t.href),this.loadPluginUI()):e.has(bt)||nc(wt,!1)&&this.loadPluginUI(),e.has(bt)?(oc(bt,"true",!1),rc(wt),e.delete(bt),window.history.replaceState({},document.title,t.href),this.loadPluginUI()):e.has(wt)||nc(bt,!1)&&this.loadPluginUI(),this.setVersionInUrl()}catch(t){console.warn("Error in checkUrl: ",t),bc("Error in checkUrl: ",t)}},this.setInviteUrl=()=>{try{const t=new URL(document.location);t.searchParams.has(wt)||t.searchParams.set(wt,"true"),this.inviteUrl=t.toString()}catch(t){console.warn("Error in setInviteUrl: ",t),bc("Error in setInviteUrl: ",t)}},this.detectVersion=()=>{try{if(this.projectVersionKey){const t=new URL(document.location).searchParams;if(t.get(this.projectVersionKey))this.projectVersion=t.get(this.projectVersionKey);else if(window.snippylyInitialLoadUrl){const t=new URL(window.snippylyInitialLoadUrl).searchParams;t.get(this.projectVersionKey)&&(this.projectVersion=t.get(this.projectVersionKey))}this.projectVersion&&oc(_t,this.projectVersion,!1,"sessionStorage")}else{const t=new URL(document.location).searchParams;(t.has(wt)||t.has(bt))&&t.has(Tt)&&(oc(Mt,Tt,!1,"sessionStorage"),this.projectVersion=t.get(Tt),this.projectVersion&&oc(_t,this.projectVersion,!1,"sessionStorage"))}}catch(t){console.warn("Error in detectVersion: ",t),bc("Error in detectVersion: ",t)}},this.setVersionInUrl=()=>{try{const t=this.projectVersionKey||nc(Mt,!1,"sessionStorage"),e=this.projectVersion||nc(_t,!1,"sessionStorage");if(t&&e){const i=new URL(document.location),o=i.searchParams;o.get(t)||(o.set(t,e),window.history.replaceState({},document.title,i.href))}}catch(t){console.warn("Error in setVersionInUrl: ",t),bc("Error in setVersionInUrl: ",t)}},this.loadPluginUI=async()=>{var t,e,i,o,n,r,s,a;try{if(!this.apiKey)return;if(!this.projectId)return;if(this.loadPlugin)return this.generateLocation(),this.setLocation(),void setTimeout((()=>{var t;if(this.usePageTitleAsLocationName){const e=document.title;(null===(t=this.location)||void 0===t?void 0:t.locationName)!==e&&(this.generateLocation(),this.setLocation({forceSetLocation:!0}))}}),4e3);if(this.toolbarEnabledApiCalled||await this.detectToolbarEnabled(),!this.toolbarEnabled)return;gt.includes(this.apiKey)&&this.listenToDocumentTitleChange();const l=cc();l&&!(null==l?void 0:l.isAnonymous)&&(this.loading=!0);try{this.customerMetadata=await this.getCustomerMetadata()}catch(t){console.warn("Error in getCustomerMetadata: ",t),bc("Error in getCustomerMetadata: ",t)}if(ic(jt)&&(this.isPasswordValid=ic(jt)),nc($t,!0)&&nc(Rt,!0)&&nc(Dt,!0)&&nc(Ft,!0)&&nc(Vt,!0)?(this.guestMode="true"===nc($t,!0),this.allowGuestModeSignIn="true"===nc(Rt,!0),this.passwordProtected="true"===nc(Dt,!0),this.queryParamsComments="true"===nc(Ft,!0),this.usePageTitleAsLocationName="true"===nc(Vt,!0)):(this.projectConfig=await Ec(this.apiKey,this.projectId),this.guestMode=!!(null===(t=this.projectConfig)||void 0===t?void 0:t.guestMode)||this.guestMode,this.allowGuestModeSignIn=!!(null===(i=null===(e=this.projectConfig)||void 0===e?void 0:e.guestModeConfig)||void 0===i?void 0:i.allowSignIn),this.queryParamsComments=!!(null===(o=this.projectConfig)||void 0===o?void 0:o.queryParamsComments),this.usePageTitleAsLocationName=!!(null===(n=this.projectConfig)||void 0===n?void 0:n.usePageTitleAsLocationName),(null===(r=this.projectConfig)||void 0===r?void 0:r.guestModeConfig)||(this.allowGuestModeSignIn=!0),this.passwordProtected=!!(null===(a=null===(s=this.projectConfig)||void 0===s?void 0:s.passwordProtected)||void 0===a?void 0:a.enabled),oc($t,this.guestMode+"",!0),oc(Rt,this.allowGuestModeSignIn+"",!0),oc(Dt,this.passwordProtected+"",!0),oc(Ft,this.queryParamsComments+"",!0),oc(Vt,this.usePageTitleAsLocationName+"",!0)),this.loadPlugin=!0,!document.querySelector(Kt.VELT_COMMENTS)){const t=document.createElement(Kt.VELT_COMMENTS);null==t||t.addEventListener("onSignIn",(()=>{this.loginWithGoogle()})),null==t||t.addEventListener("onUpgrade",(()=>{this.onUpgradePlanClick()})),t.addEventListener("onCommentAdd",(()=>{this.addCommentCount++})),t.addEventListener("onCommentUpdate",(t=>{var e,i;(null===(e=this.snippylyUser)||void 0===e?void 0:e.isGuest)&&"newlyAdded"===(null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.type)&&(this.addCommentCount>=2&&(this.showModalOnceCommentIsModeIsOff=!0),this.addCommentCount>=5&&!this.showModalOnceCommentIsModeIsOff&&(this.showModalOnceCommentIsModeIsOff=!0))})),window.document.body.appendChild(t)}if(!document.querySelector(Kt.VELT_CURSOR)){const t=document.createElement(Kt.VELT_CURSOR);window.document.body.appendChild(t)}if(!document.querySelector(Kt.VELT_HUDDLE)){const t=document.createElement(Kt.VELT_HUDDLE);window.document.body.appendChild(t)}if(!document.querySelector(Kt.VELT_RECORDER_NOTES)){const t=document.createElement(Kt.VELT_RECORDER_NOTES);window.document.body.appendChild(t)}if(!document.querySelector(Kt.VELT_RECORDER_CONTROL_PANEL)){const t=document.createElement(Kt.VELT_RECORDER_CONTROL_PANEL);window.document.body.appendChild(t)}if(!document.querySelector(Kt.VELT_ARROWS)){const t=document.createElement(Kt.VELT_ARROWS);window.document.body.appendChild(t)}try{const t=new URL(document.location),e=t.searchParams;let i=!1;e.has("wireframe")&&"true"===e.get("wireframe")&&(sessionStorage.setItem("velt-wireframe","true"),e.delete("wireframe"),i=!0),e.get("velt-version")&&(sessionStorage.setItem("velt-version",e.get("velt-version")),e.delete("velt-version"),i=!0),e.get("velt-env")&&(sessionStorage.setItem("velt-env",e.get("velt-env")),e.delete("velt-env"),i=!0),i&&window.history.replaceState({},document.title,t.href)}catch(t){}if(this.staging&&"true"===sessionStorage.getItem("velt-wireframe")){const t=document.createElement("velt-wireframe");t.innerHTML='\n <style>\n .dialog-header-container {\n padding: 12px;\n background: lightcyan;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: 8px;\n }\n\n .dialog-all-comment-container app-comment-dialog-all-comment > div {\n padding: 12px;\n background: lightpink;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: 8px;\n }\n\n .sidebar-dialog-header-container {\n padding: 12px;\n background: lightgreen;\n margin-bottom: 8px;\n border-radius: 8px;\n }\n\n .sidebar-dialog-header-block {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n </style>\n\t\t\t\t\t\t<velt-comment-pin-wireframe>\n\t\t\t\t\t\t\t<div class="custom-comment-pin-container">\n\t\t\t\t\t\t\t\t\t<div style="width: 35px; height: 35px; background-color: blue; border-radius: 12px; border-width: 3px; border-style: solid; border-color: #f00;"></div>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-unread-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div class="custom-indicator"></div>\n\t\t\t\t\t\t\t\t\t</velt-comment-pin-unread-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-private-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t\t<span>P</span>\n\t\t\t\t\t\t\t\t\t</velt-comment-pin-private-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-ghost-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t\t<span>G</span>\n\t\t\t\t\t\t\t\t\t</velt-comment-pin-ghost-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-index-wireframe></velt-comment-pin-index-wireframe>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-comment-pin-wireframe>\n\n\t\t\t\t\t\t<velt-comment-bubble-wireframe>\n\t\t\t\t\t\t\t<div class="custom-comment-bubble">\n\t\t\t\t\t\t\t\t<velt-comment-bubble-avatar-wireframe></velt-comment-bubble-avatar-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-bubble-comments-count-wireframe></velt-comment-bubble-comments-count-wireframe>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-comment-bubble-wireframe>\n\n\t\t\t\t\t\t<velt-text-comment-tool-wireframe>\n\t\t\t\t\t\t\t<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t\t\t\t<circle cx="50" cy="50" r="40" fill="red" />\n\t\t\t\t\t\t\t\t<rect x="5" y="5" width="90" height="90" fill="blue" fill-opacity="0.5" />\n\t\t\t\t\t\t\t\t<polygon points="50,5 95,95 5,95" fill="yellow" fill-opacity="0.7" />\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</velt-text-comment-tool-wireframe>\n\n\t\t\t\t\t\t<velt-text-comment-toolbar-wireframe>\n\t\t\t\t\t\t\t<div style="background-color:violet; display: flex; gap: 8px; border-radius: 12px; padding: 8px; align-items: center;">\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-generic-wireframe><p>GPT</p></velt-text-comment-toolbar-generic-wireframe>\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-seperator-wireframe><p>Seperator</p></velt-text-comment-toolbar-seperator-wireframe>\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-comment-annotation-wireframe><p>Comment</p></velt-text-comment-toolbar-comment-annotation-wireframe>\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-copywriter-wireframe><p>Copywriter</p></velt-text-comment-toolbar-copywriter-wireframe>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-text-comment-toolbar-wireframe>\n\t\t\t\t\t\t<velt-comment-sidebar-wireframe>\n\t\t\t\t\t\t\t<div style="background-color:lightblue; width: 100%; height: 100%;">\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-header-wireframe>\n\t\t\t\t\t\t\t\t\t<div>Custom Header</div>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-close-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div style="color:#0d6efd;">Custom Close Button</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-close-button-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-search-wireframe></velt-comment-sidebar-search-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-status-wireframe></velt-comment-sidebar-status-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div style="color:#0d6efd;">Custom Filter Button</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-button-wireframe>\n\t\t\t\t\t\t\t\t</velt-comment-sidebar-header-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-wireframe>\n\t\t\t\t\t\t\t\t\t<div>Custom Filter</div>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-title-wireframe></velt-comment-sidebar-filter-title-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-close-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div>Custom CLose filter</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-close-button-wireframe>\n\n\t\t\t\t\t\t\t\t\t<div style="background-color: yellow">\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-location-wireframe></velt-comment-sidebar-filter-location-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-people-wireframe></velt-comment-sidebar-filter-people-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-category-wireframe></velt-comment-sidebar-filter-category-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-priority-wireframe></velt-comment-sidebar-filter-priority-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-comment-type-wireframe></velt-comment-sidebar-filter-comment-type-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-versions-wireframe></velt-comment-sidebar-filter-versions-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-group-by-wireframe></velt-comment-sidebar-filter-group-by-wireframe>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-done-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div>Custom Done Button</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-done-button-wireframe>\n\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-list-wireframe></velt-comment-sidebar-list-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-empty-placeholder-wireframe>\n\t\t\t\t\t\t\t\t\t<div>Empty Placeholder</div>\n\t\t\t\t\t\t\t\t</velt-comment-sidebar-empty-placeholder-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-page-mode-wireframe></velt-comment-sidebar-page-mode-wireframe>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-comment-sidebar-wireframe>\n <velt-comment-dialog-wireframe variant="dialog">\n <div class="dialog-all-comment-container">\n <velt-comment-dialog-all-comment-wireframe></velt-comment-dialog-all-comment-wireframe>\n </div>\n <div class="dialog-body-container">\n <velt-comment-dialog-body-wireframe></velt-comment-dialog-body-wireframe>\n </div>\n <div class="dialog-composer-container">\n <velt-comment-dialog-composer-wireframe></velt-comment-dialog-composer-wireframe>\n </div>\n <div class="dialog-header-container">\n <velt-comment-dialog-header-wireframe></velt-comment-dialog-header-wireframe>\n </div>\n </velt-comment-dialog-wireframe>\n <velt-comment-dialog-wireframe variant="sidebar">\n <div class="sidebar-dialog-header-container">\n <velt-comment-dialog-header-wireframe>\n <div class="sidebar-dialog-header-block">\n <velt-comment-dialog-comment-count-wireframe></velt-comment-dialog-comment-count-wireframe>\n <velt-comment-dialog-status-wireframe></velt-comment-dialog-status-wireframe>\n <div style="flex-grow: 1"></div>\n <velt-comment-dialog-comment-category-wireframe></velt-comment-dialog-comment-category-wireframe>\n <velt-comment-dialog-priority-wireframe></velt-comment-dialog-priority-wireframe>\n </div>\n </velt-comment-dialog-header-wireframe>\n </div>\n <div class="sidebar-dialog-body-container">\n <velt-comment-dialog-body-wireframe></velt-comment-dialog-body-wireframe>\n </div>\n <div class="sidebar-dialog-composer-container">\n <velt-comment-dialog-composer-wireframe></velt-comment-dialog-composer-wireframe>\n </div>\n </velt-comment-dialog-wireframe>\n ',window.document.body.appendChild(t)}this.initializeSnippyly()}catch(t){this.loading=!1,console.warn("Error in loadPluginUI: ",t),bc("Error in loadPluginUI: ",t)}},this.listenToDocumentTitleChange=()=>{try{this.documentTitleChangeInterval||(this.documentTitleChangeInterval=setInterval((()=>{var t,e,i;const o="true"===sessionStorage.getItem("debugDocumentTitleChange");if(o&&(console.log("*** listenToDocumentTitleChange ***"),console.log("usePageTitleAsLocationName: ",this.usePageTitleAsLocationName)),this.usePageTitleAsLocationName){const n=document.title;o&&(console.log("location name: ",null===(t=this.location)||void 0===t?void 0:t.locationName),console.log("title: ",n),console.log("changed: ",(null===(e=this.location)||void 0===e?void 0:e.locationName)!==n)),(null===(i=this.location)||void 0===i?void 0:i.locationName)!==n&&(o&&console.log("%c triggering location update!","color: green; font-weight: bold;"),this.generateLocation(),this.setLocation({forceSetLocation:!0}))}}),2e3))}catch(t){bc("Error in listenToDocumentTitleChange: ",t)}},this.initializeSnippyly=async()=>{var t,i,o,n,r,s,a,l,c,d,h,u,p,v,m,f,g,w,b,y,C,x,E,k,S;try{let M=this.staging?vt:mt;this.staging||ft.includes(this.apiKey)||(M="latest"),this.veltVersion&&(M=this.veltVersion);let _=this.staging,T=!1;if((null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("velt-version"))&&(M=sessionStorage.getItem("velt-version")),null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("velt-env")){"staging"===sessionStorage.getItem("velt-env")&&(_=!1,T=!0)}if(await e(this.apiKey,{options:{develop:_,staging:T,version:M,velt:!0,proxyDomain:"https://cdn.velt.dev"}}),!window.Velt)return;if(this.autoTranslation&&(null===Velt||void 0===Velt?void 0:Velt.enableAutoTranslation)&&(null===Velt||void 0===Velt||Velt.enableAutoTranslation()),!document.querySelector(Kt.VELT_COMMENTS_SIDEBAR)){const t=document.createElement(Kt.VELT_COMMENTS_SIDEBAR);t.setAttribute(Jt.ENABLE_URL_NAVIGATION,"true"),t.setAttribute(Jt.CURRENT_LOCATION_SUFFIX,"true"),window.document.body.appendChild(t)}if(Velt){null===Velt||void 0===Velt||Velt.sf(!0);try{window.dispatchEvent(new CustomEvent("onVeltLoad",{detail:{Velt}})),(null===window||void 0===window?void 0:window.onSnippylyLoad)&&(null===window||void 0===window||window.onSnippylyLoad(Velt))}catch(t){}document.body.style.setProperty("--velt-default-font-family","'Poppins', sans-serif"),(()=>{try{if(!document.getElementById("superflowFontLink3")){const t=document.createElement("link");t.rel="stylesheet",t.href="https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/fonts%2Fpoppins%2Fpoppins.css?alt=media&token=5f31a0f2-5f67-4974-bf56-78ae655f2b68",t.id="superflowFontLink3",document.head.appendChild(t)}}catch(t){console.warn("Error in loadPoppinsFont: ",t),bc("Error in loadPoppinsFont: ",t)}})()}if(Velt&&gc({sdkVersion:null===Velt||void 0===Velt?void 0:Velt.version,sdkType:"client"}),this.generateDocumentId(),(null===Velt||void 0===Velt?void 0:Velt.on)&&"function"==typeof(null===Velt||void 0===Velt?void 0:Velt.on)?Velt.on("userUpdate").subscribe((async t=>{t&&await this.setDocumentAndLocation()})):await this.setDocumentAndLocation(),setTimeout((()=>{var t;if(this.usePageTitleAsLocationName){const e=document.title;(null===(t=this.location)||void 0===t?void 0:t.locationName)!==e&&(this.generateLocation(),this.setLocation({forceSetLocation:!0}))}}),4e3),this.commentElement=null===Velt||void 0===Velt?void 0:Velt.getCommentElement(),this.contactElement=null===Velt||void 0===Velt?void 0:Velt.getContactElement(),this.rewriterElement=null===Velt||void 0===Velt?void 0:Velt.getRewriterElement(),this.presenceElement=null===Velt||void 0===Velt?void 0:Velt.getPresenceElement(),this.commentElement){this.commentElement.enableTextComments(!0),this.customLoginEnabledLocally||this.commentElement.enableSignInButton(!0),this.commentElement.enableAttachments(!0),(null===(t=this.commentElement)||void 0===t?void 0:t.showScreenSizeInfo)&&this.commentElement.showScreenSizeInfo(!0),(null===(i=this.commentElement)||void 0===i?void 0:i.enableDeviceInfo)&&this.commentElement.enableDeviceInfo(!0),this.commentElement.enableCommentIndex(!0),this.commentElement.onCommentModeChange&&this.commentElement.onCommentModeChange().subscribe((t=>{this.addCommentMode=t,this.addCommentMode||this.showModalOnceCommentIsModeIsOff&&(this.addCommentCount>=2&&!nc(Ut)&&(this.allowGuestModeSignIn?this.openGuestModeSignInModal():this.openGuestModeNameModel(),oc(Ut,"true"),this.showModalOnceCommentIsModeIsOff=!1),this.addCommentCount>=5&&!this.showGuestModeSignInModal&&!nc(Bt,!1,"sessionStorage")&&(this.showGuestModeSignInBanner(),oc(Bt,"true",!1,"sessionStorage"),this.showModalOnceCommentIsModeIsOff=!1))})),(null===(o=this.commentElement)||void 0===o?void 0:o.enableOrphanComments)&&this.commentElement.enableOrphanComments(),(null===(n=this.commentElement)||void 0===n?void 0:n.enablePersistentCommentMode)&&this.commentElement.enablePersistentCommentMode(),(null===(r=this.commentElement)||void 0===r?void 0:r.enableGhostComments)&&this.commentElement.enableGhostComments();const e=null===window||void 0===window?void 0:window.SUPERFLOW_CUSTOM_STATUSES;e&&"object"==typeof e&&(null===(s=this.commentElement)||void 0===s?void 0:s.setCustomStatus)&&this.commentElement.setCustomStatus(e),(null===(a=this.commentElement)||void 0===a?void 0:a.enableMinimap)&&this.commentElement.enableMinimap(),(null===(l=this.commentElement)||void 0===l?void 0:l.setDStrategy)&&(null===(c=this.commentElement)||void 0===c||c.setDStrategy("dynamicId")),(null===(d=this.commentElement)||void 0===d?void 0:d.enableSidebarButtonOnCommentDialog)&&this.commentElement.enableSidebarButtonOnCommentDialog(),(null===(h=this.commentElement)||void 0===h?void 0:h.enableHotkey)&&this.commentElement.enableHotkey(),(null===(u=this.commentElement)||void 0===u?void 0:u.enableDeviceIndicatorOnCommentPins)&&this.commentElement.enableDeviceIndicatorOnCommentPins(),(null===(m=null===(v=null===(p=this.customerMetadata)||void 0===p?void 0:p.superflow)||void 0===v?void 0:v.advancedFeatures)||void 0===m?void 0:m.takeScreenshotOnComments)?this.commentElement.enableScreenshot&&this.commentElement.enableScreenshot():this.commentElement.disableScreenshot&&this.commentElement.disableScreenshot()}this.selectionElement=Velt.getSelectionElement(),this.selectionElement&&this.selectionElement.enableLiveSelection(!0),this.rewriterElement&&(null===(f=this.rewriterElement)||void 0===f||f.enableRewriter()),this.presenceElement&&(null===(g=this.presenceElement)||void 0===g?void 0:g.enableFlockMode)&&(null===(w=this.presenceElement)||void 0===w||w.enableFlockMode(!0)),(null===Velt||void 0===Velt?void 0:Velt.getDocElement)&&(this.docElement=Velt.getDocElement()),null===(x=(null===(b=this.docElement)||void 0===b?void 0:b.getDocumentMetadata)?null===(y=this.docElement)||void 0===y?void 0:y.getDocumentMetadata():null===(C=null===Velt||void 0===Velt?void 0:Velt.docService)||void 0===C?void 0:C.getDocumentMetadata$())||void 0===x||x.subscribe((t=>{var e,i;const o=(null===(e=null==t?void 0:t.superflow)||void 0===e?void 0:e.versions)?Object.values(null===(i=null==t?void 0:t.superflow)||void 0===i?void 0:i.versions):[],n=new URL(document.location).searchParams.get("version");if(n){const t=o.find((t=>t.id===n));t&&(this.version={id:t.id,name:t.versionName||t.id},this.setLocation())}})),(null===Velt||void 0===Velt?void 0:Velt.getViewsElement)&&(this.viewsElement=Velt.getViewsElement()),(null===(E=this.viewsElement)||void 0===E?void 0:E.getUniqueViewsByUser)&&(null===(S=null===(k=this.viewsElement)||void 0===k?void 0:k.getUniqueViewsByUser())||void 0===S||S.subscribe((t=>{this.totalViews=t}))),this.identifySnippyly()}catch(t){this.loading=!1,console.warn("Error in initializeSnippyly: ",t),bc("Error in initializeSnippyly: ",t)}},this.generateDocumentId=()=>{try{this.documentId=Xl(ec(window.location.origin))+"",this.projectId&&(this.documentId=this.projectId+""),this.serverDocumentId=(t=this.documentId+"")?`${Xl(t)}`:void 0}catch(t){console.warn("Error in generateDocumentId: ",t),bc("Error in generateDocumentId: ",t)}var t},this.setDocumentAndLocation=async()=>{try{this.generateDocumentId(),this.previousLocation=null,await(null===Velt||void 0===Velt?void 0:Velt.setDocumentId(this.documentId+"")),gc({documentId:this.serverDocumentId,clientDocumentId:this.documentId}),this.generateLocation(),this.setLocation()}catch(t){console.warn("Error in setDocumentAndLocation: ",t),bc("Error in setDocumentAndLocation: ",t)}},this.checkToEnableUpgradeButton=()=>{var t,e;try{this.isPlanExpired&&this.isUserGlobalContact?(null===(t=this.commentElement)||void 0===t?void 0:t.enableUpgradeButton)&&this.commentElement.enableUpgradeButton():(null===(e=this.commentElement)||void 0===e?void 0:e.disableUpgradeButton)&&this.commentElement.disableUpgradeButton()}catch(t){console.warn("Error in checkToEnableUpgradeButton: ",t),bc("Error in checkToEnableUpgradeButton: ",t)}},this.getCustomerMetadata=async()=>{try{const t=await(async t=>{try{const e=fo(pc,ne,{timeout:12e5}),i=await e({eventType:"getCustomerMetadata",apiKey:t});return null==i?void 0:i.data}catch(t){return console.warn("Error in getCustomerMetadata: ",t),null}})(this.apiKey);return(t=>{try{const e=t?JSON.stringify(t):"false";oc(Ht,e)}catch(t){console.warn("Error in setCustomerMetadataToStorage: ",t),bc("Error in setCustomerMetadataToStorage: ",t)}})(t),t}catch(t){console.warn("Error in getCustomerMetadata: ",t),bc("Error in getCustomerMetadata: ",t);const e=(()=>{try{const t=nc(Ht);return t?"false"===t?JSON.parse(JSON.stringify(Yt)):JSON.parse(t):null}catch(t){return console.warn("Error in getCustomerMetadataFromStorage: ",t),bc("Error in getCustomerMetadataFromStorage: ",t),null}})();if(e)return e}},this.getSamlConfig=async()=>{try{const t=await(async t=>{var e;try{const i=fo(pc,ne,{timeout:12e5}),o=await i({eventType:"saml",samlEventType:"getPublicConfig",apiKey:t});return null===(e=null==o?void 0:o.data)||void 0===e?void 0:e.publicConfig}catch(t){return console.warn("Error in getSamlPublicConfig: ",t),null}})(this.apiKey);return(t=>{try{if(t){const e=JSON.stringify(t);oc(Gt,e,!0)}}catch(t){console.warn("Error in setSamlConfigToStorage: ",t),bc("Error in setSamlConfigToStorage: ",t)}})(t),t}catch(t){console.warn("Error in getSamlConfig: ",t),bc("Error in getSamlConfig: ",t);const e=(()=>{try{const t=nc(Gt,!0);return t?JSON.parse(t):null}catch(t){return console.warn("Error in getSamlConfigFromStorage: ",t),bc("Error in getSamlConfigFromStorage: ",t),null}})();if(e)return e}},this.setLogos=()=>{var t,e,i,o,n,r,s,a,l,c,d,h;try{let u="light";this.privateCommentModeEnabled&&(u="dark");const p=null===(i=null===(e=null===(t=this.customerMetadata)||void 0===t?void 0:t.superflow)||void 0===e?void 0:e.customBranding)||void 0===i?void 0:i.logoMark,v=null===(r=null===(n=null===(o=null==Qt?void 0:Yt)||void 0===o?void 0:o.customBranding)||void 0===n?void 0:n.logo)||void 0===r?void 0:r.logoMark,m=null===(l=null===(a=null===(s=this.customerMetadata)||void 0===s?void 0:s.superflow)||void 0===a?void 0:a.customBranding)||void 0===l?void 0:l.wordMark,f=null===(h=null===(d=null===(c=null==Qt?void 0:Yt)||void 0===c?void 0:c.customBranding)||void 0===d?void 0:d.logo)||void 0===h?void 0:h.wordMark;switch(u){case"light":this.logoMark=(null==p?void 0:p.lightUrl)||(null==p?void 0:p.darkUrl)||(null==v?void 0:v.lightUrl),this.wordMark=(null==m?void 0:m.lightUrl)||(null==m?void 0:m.darkUrl)||(null==f?void 0:f.lightUrl);break;case"dark":this.logoMark=(null==p?void 0:p.darkUrl)||(null==p?void 0:p.lightUrl)||(null==v?void 0:v.darkUrl),this.wordMark=(null==m?void 0:m.darkUrl)||(null==m?void 0:m.lightUrl)||(null==f?void 0:f.darkUrl)}}catch(t){console.warn("Error in setLogos: ",t),bc("Error in setLogos: ",t)}},this.getLogoMark=()=>{var t;try{return(null===(t=this.logoMark)||void 0===t?void 0:t.includes("<svg"))?A`
3949
+ `}};Lc.styles=Ic,Oc([et({type:String})],Lc.prototype,"apiKey",void 0),Oc([et({type:String})],Lc.prototype,"documentId",void 0),Oc([et({type:Boolean})],Lc.prototype,"disableInvite",void 0),Oc([et({type:Boolean})],Lc.prototype,"hasInviteAccess",void 0),Oc([it()],Lc.prototype,"userType",void 0),Oc([it()],Lc.prototype,"showCheckIcon",void 0),Oc([it()],Lc.prototype,"contactListIsHovered",void 0),Oc([it()],Lc.prototype,"invalidEmail",void 0),Oc([it()],Lc.prototype,"isEmailValid",void 0),Oc([it()],Lc.prototype,"inviting",void 0),Oc([it()],Lc.prototype,"searchingUsers",void 0),Oc([it()],Lc.prototype,"emailInput",void 0),Oc([it()],Lc.prototype,"emailTags",void 0),Oc([it()],Lc.prototype,"editingTag",void 0),Oc([it()],Lc.prototype,"editingInput",void 0),Oc([it()],Lc.prototype,"duplicateEmail",void 0),Oc([it()],Lc.prototype,"filteredContacts",void 0),Oc([ot("#mainInput")],Lc.prototype,"mainInput",void 0),Oc([ot("#editInput")],Lc.prototype,"editInput",void 0),Lc=Oc([(t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:o}=e;return{kind:i,elements:o,finisher(e){window.customElements.define(t,e)}}})(t,e))("superflow-invite-modal")],Lc);var Ac=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class $c extends Q{constructor(){super(),this._loadPlugin=!1,this.comments=[],this.addCommentMode=!1,this.showTourCommentTooltip=!1,this.allFeatureDisabled=!1,this.allFeatureRestricted=!1,this.guestMode=!1,this._expanded=!0,this.loading=!0,this._isPlanExpired=null,this.showOnboardingModal=!0,this.showLiveDemoModal=!1,this.showFigmaDemoModal=!1,this.showGuestModeSignInModal=!1,this.defaultGuestModeSignInModalConfig={title:"Sign in to notify your team",description:"Notify your team about your latest comments.",closeOnClickOutside:!1,showLeaveCommentButton:!0},this.guestModeSignInModalConfig=JSON.parse(JSON.stringify(this.defaultGuestModeSignInModalConfig)),this.showGuestModeNameModal=!1,this.guestModeSignInBannerVisible=!1,this.guestUserNameInput="",this.guestUserModelOpened=!1,this.guestUserNameUpdated=!1,this.guestUserNameUpdateLoading=!1,this.staging=Xt,this._autoLocation=!0,this.copyLinkTooltip="Copy Link",this.invalidApiKey=!1,this._isUserGlobalContact=!1,this.showQrCode=!1,this.customLoginEnabledLocally=null,this.customLoginEnabled=null,this.exitReviewModeCalled=!1,this.addCommentCount=0,this._privateCommentModeEnabled=!1,this.superflowToolbarMoved=!1,this._darkMode=!1,this.allowGuestModeSignIn=!0,this._queryParamsComments=!1,this._usePageTitleAsLocationName=!1,this.toolbarEnabled=!1,this.toolbarEnabledApiCalled=!1,this.passwordProtected=!1,this.isPasswordValid=!1,this.password="",this.validatingPasswordLoading=!1,this.showPasswordProtectedModal=!1,this.showInvalidPassword=!1,this.skipGuestNameModal=!1,this._totalViews={},this.totalViewsCount=0,this.inviteUrl="",this.showModalOnceCommentIsModeIsOff=!1,this.showInviteModal=!1,this.subscriptions=[],this.onApiKeyChange=()=>{try{this.apiKey&&(null===window||void 0===window?void 0:window.onSuperflowLoad)&&"function"==typeof window.onSuperflowLoad&&window.onSuperflowLoad()}catch(t){console.warn("Error in onApiKeyChange: ",t),bc("Error in onApiKeyChange: ",t)}},this.checkCustomLoginEnabled=async()=>{var t,e;try{const i=await(e=this.apiKey,fo(pc,ne,{timeout:12e5})({eventType:"customLoginEnabled",apiKey:e}));this.customLoginEnabled=!!(null===(t=null==i?void 0:i.data)||void 0===t?void 0:t.customLoginEnabled),this.customLoginEnabled&&this.loginWithCustomUser()}catch(t){this.customLoginEnabled=!1,console.warn("Error in checkCustomLoginEnabled: ",t),bc("Error in checkCustomLoginEnabled: ",t)}},this.loginWithCustomUser=()=>{try{this.customLoginEnabled?(rc(kt),this.loadPlugin&&this.documentId&&this.identifySnippyly()):console.warn("Identify call not allowed.")}catch(t){console.warn("Error in loginWithCustomUser: ",t),bc("Error in loginWithCustomUser: ",t)}},this.addWindowClickEventListener=()=>{try{this.windowClickEventListener||(this.windowClickEventListener=()=>{this.menuOpenedId&&(this.menuOpenedId=void 0)},window.addEventListener("click",this.windowClickEventListener))}catch(t){console.warn("Error in addWindowClickEventListener: ",t),bc("Error in addWindowClickEventListener: ",t)}},this.removeWindowClickEventListener=()=>{try{window.removeEventListener("click",this.windowClickEventListener),this.windowClickEventListener=void 0}catch(t){console.warn("Error in removeWindowClickEventListener: ",t),bc("Error in removeWindowClickEventListener: ",t)}},this.setWindowEventListner=()=>{try{window.addEventListener("locationchange",(()=>{this.checkUrl()}))}catch(t){console.warn("Error in setWindowEventListner: ",t),bc("Error in setWindowEventListner: ",t)}},this.urlChangeListener=()=>{try{const t=history.pushState;history.pushState=function(){const e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),e};const e=history.replaceState;history.replaceState=function(){const t=e.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),t},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))}))}catch(t){console.warn("Error in urlChangeListener: ",t),bc("Error in urlChangeListener: ",t)}},this.checkUrl=()=>{try{this.setInviteUrl();const t=new URL(document.location),e=t.searchParams;if(e.has(Ct)&&oc(wt,"true",!1),(null==e?void 0:e.has(It))&&!nc(It)?this.showOnboardingModal=!0:this.showOnboardingModal=!1,null==e?void 0:e.has(Nt))if(nc(Nt,!1,"sessionStorage")){this.showLiveDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(Nt),window.history.replaceState({},null===document||void 0===document?void 0:document.title,t.toString())}else this.showLiveDemoModal=!0;else this.showLiveDemoModal=!1;if(null==e?void 0:e.has(Ot))if(nc(Ot,!1)){this.showFigmaDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(Ot),window.history.replaceState({},null===document||void 0===document?void 0:document.title,t.toString())}else this.showFigmaDemoModal=!0;else this.showFigmaDemoModal=!1;if(e.has(Et)||e.has("snippyly_google_token")){if(e.has(Et)){const t=decodeURIComponent(e.get(Et)),i=lc(t,ee,ie),o=i&&JSON.parse(i);if(o){const t={};t.userId=o.uid,t.name=o.displayName,t.email=o.email,t.photoUrl=null==o?void 0:o.photoURL;const e=JSON.stringify(t),i=ac(e,ee,ie);oc(kt,i,!0),rc(At)}}else if(e.has("snippyly_google_token")){const t=JSON.parse(atob(e.get("snippyly_google_token"))),i={};i.userId=t.uid,i.name=t.displayName,i.email=t.email,i.photoUrl=null==t?void 0:t.photoURL,oc(xt,JSON.stringify(i),!0)}e.delete(Et),e.delete("snippyly_google_token"),window.history.replaceState({},document.title,t.href)}e.has(wt)?(oc(wt,"true",!1),rc(bt),e.delete(wt),window.history.replaceState({},document.title,t.href),this.loadPluginUI()):e.has(bt)||nc(wt,!1)&&this.loadPluginUI(),e.has(bt)?(oc(bt,"true",!1),rc(wt),e.delete(bt),window.history.replaceState({},document.title,t.href),this.loadPluginUI()):e.has(wt)||nc(bt,!1)&&this.loadPluginUI(),this.setVersionInUrl()}catch(t){console.warn("Error in checkUrl: ",t),bc("Error in checkUrl: ",t)}},this.setInviteUrl=()=>{try{const t=new URL(document.location);t.searchParams.has(wt)||t.searchParams.set(wt,"true"),this.inviteUrl=t.toString()}catch(t){console.warn("Error in setInviteUrl: ",t),bc("Error in setInviteUrl: ",t)}},this.detectVersion=()=>{try{if(this.projectVersionKey){const t=new URL(document.location).searchParams;if(t.get(this.projectVersionKey))this.projectVersion=t.get(this.projectVersionKey);else if(window.snippylyInitialLoadUrl){const t=new URL(window.snippylyInitialLoadUrl).searchParams;t.get(this.projectVersionKey)&&(this.projectVersion=t.get(this.projectVersionKey))}this.projectVersion&&oc(_t,this.projectVersion,!1,"sessionStorage")}else{const t=new URL(document.location).searchParams;(t.has(wt)||t.has(bt))&&t.has(Tt)&&(oc(Mt,Tt,!1,"sessionStorage"),this.projectVersion=t.get(Tt),this.projectVersion&&oc(_t,this.projectVersion,!1,"sessionStorage"))}}catch(t){console.warn("Error in detectVersion: ",t),bc("Error in detectVersion: ",t)}},this.setVersionInUrl=()=>{try{const t=this.projectVersionKey||nc(Mt,!1,"sessionStorage"),e=this.projectVersion||nc(_t,!1,"sessionStorage");if(t&&e){const i=new URL(document.location),o=i.searchParams;o.get(t)||(o.set(t,e),window.history.replaceState({},document.title,i.href))}}catch(t){console.warn("Error in setVersionInUrl: ",t),bc("Error in setVersionInUrl: ",t)}},this.loadPluginUI=async()=>{var t,e,i,o,n,r,s,a;try{if(!this.apiKey)return;if(!this.projectId)return;if(this.loadPlugin)return this.generateLocation(),this.setLocation(),void setTimeout((()=>{var t;if(this.usePageTitleAsLocationName){const e=document.title;(null===(t=this.location)||void 0===t?void 0:t.locationName)!==e&&(this.generateLocation(),this.setLocation({forceSetLocation:!0}))}}),4e3);if(this.toolbarEnabledApiCalled||await this.detectToolbarEnabled(),!this.toolbarEnabled)return;gt.includes(this.apiKey)&&this.listenToDocumentTitleChange();const l=cc();l&&!(null==l?void 0:l.isAnonymous)&&(this.loading=!0);try{this.customerMetadata=await this.getCustomerMetadata()}catch(t){console.warn("Error in getCustomerMetadata: ",t),bc("Error in getCustomerMetadata: ",t)}if(ic(jt)&&(this.isPasswordValid=ic(jt)),nc($t,!0)&&nc(Rt,!0)&&nc(Dt,!0)&&nc(Ft,!0)&&nc(Vt,!0)?(this.guestMode="true"===nc($t,!0),this.allowGuestModeSignIn="true"===nc(Rt,!0),this.passwordProtected="true"===nc(Dt,!0),this.queryParamsComments="true"===nc(Ft,!0),this.usePageTitleAsLocationName="true"===nc(Vt,!0)):(this.projectConfig=await Ec(this.apiKey,this.projectId),this.guestMode=!!(null===(t=this.projectConfig)||void 0===t?void 0:t.guestMode)||this.guestMode,this.allowGuestModeSignIn=!!(null===(i=null===(e=this.projectConfig)||void 0===e?void 0:e.guestModeConfig)||void 0===i?void 0:i.allowSignIn),this.queryParamsComments=!!(null===(o=this.projectConfig)||void 0===o?void 0:o.queryParamsComments),this.usePageTitleAsLocationName=!!(null===(n=this.projectConfig)||void 0===n?void 0:n.usePageTitleAsLocationName),(null===(r=this.projectConfig)||void 0===r?void 0:r.guestModeConfig)||(this.allowGuestModeSignIn=!0),this.passwordProtected=!!(null===(a=null===(s=this.projectConfig)||void 0===s?void 0:s.passwordProtected)||void 0===a?void 0:a.enabled),oc($t,this.guestMode+"",!0),oc(Rt,this.allowGuestModeSignIn+"",!0),oc(Dt,this.passwordProtected+"",!0),oc(Ft,this.queryParamsComments+"",!0),oc(Vt,this.usePageTitleAsLocationName+"",!0)),this.loadPlugin=!0,!document.querySelector(Kt.VELT_COMMENTS)){const t=document.createElement(Kt.VELT_COMMENTS);null==t||t.addEventListener("onSignIn",(()=>{this.loginWithGoogle()})),null==t||t.addEventListener("onUpgrade",(()=>{this.onUpgradePlanClick()})),t.addEventListener("onCommentAdd",(()=>{this.addCommentCount++})),t.addEventListener("onCommentUpdate",(t=>{var e,i;(null===(e=this.snippylyUser)||void 0===e?void 0:e.isGuest)&&"newlyAdded"===(null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.type)&&(this.addCommentCount>=2&&(this.showModalOnceCommentIsModeIsOff=!0),this.addCommentCount>=5&&!this.showModalOnceCommentIsModeIsOff&&(this.showModalOnceCommentIsModeIsOff=!0))})),window.document.body.appendChild(t)}if(!document.querySelector(Kt.VELT_CURSOR)){const t=document.createElement(Kt.VELT_CURSOR);window.document.body.appendChild(t)}if(!document.querySelector(Kt.VELT_HUDDLE)){const t=document.createElement(Kt.VELT_HUDDLE);window.document.body.appendChild(t)}if(!document.querySelector(Kt.VELT_RECORDER_NOTES)){const t=document.createElement(Kt.VELT_RECORDER_NOTES);window.document.body.appendChild(t)}if(!document.querySelector(Kt.VELT_RECORDER_CONTROL_PANEL)){const t=document.createElement(Kt.VELT_RECORDER_CONTROL_PANEL);window.document.body.appendChild(t)}if(!document.querySelector(Kt.VELT_ARROWS)){const t=document.createElement(Kt.VELT_ARROWS);window.document.body.appendChild(t)}try{const t=new URL(document.location),e=t.searchParams;let i=!1;e.has("wireframe")&&"true"===e.get("wireframe")&&(sessionStorage.setItem("velt-wireframe","true"),e.delete("wireframe"),i=!0),e.get("velt-version")&&(sessionStorage.setItem("velt-version",e.get("velt-version")),e.delete("velt-version"),i=!0),e.get("velt-env")&&(sessionStorage.setItem("velt-env",e.get("velt-env")),e.delete("velt-env"),i=!0),i&&window.history.replaceState({},document.title,t.href)}catch(t){}if(this.staging&&"true"===sessionStorage.getItem("velt-wireframe")){const t=document.createElement("velt-wireframe");t.innerHTML='\n <style>\n .dialog-header-container {\n padding: 12px;\n background: lightcyan;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: 8px;\n }\n\n .dialog-all-comment-container app-comment-dialog-all-comment > div {\n padding: 12px;\n background: lightpink;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: 8px;\n }\n\n .sidebar-dialog-header-container {\n padding: 12px;\n background: lightgreen;\n margin-bottom: 8px;\n border-radius: 8px;\n }\n\n .sidebar-dialog-header-block {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n </style>\n\t\t\t\t\t\t<velt-comment-pin-wireframe>\n\t\t\t\t\t\t\t<div class="custom-comment-pin-container">\n\t\t\t\t\t\t\t\t\t<div style="width: 35px; height: 35px; background-color: blue; border-radius: 12px; border-width: 3px; border-style: solid; border-color: #f00;"></div>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-unread-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div class="custom-indicator"></div>\n\t\t\t\t\t\t\t\t\t</velt-comment-pin-unread-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-private-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t\t<span>P</span>\n\t\t\t\t\t\t\t\t\t</velt-comment-pin-private-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-ghost-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t\t<span>G</span>\n\t\t\t\t\t\t\t\t\t</velt-comment-pin-ghost-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-index-wireframe></velt-comment-pin-index-wireframe>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-comment-pin-wireframe>\n\n\t\t\t\t\t\t<velt-comment-bubble-wireframe>\n\t\t\t\t\t\t\t<div class="custom-comment-bubble">\n\t\t\t\t\t\t\t\t<velt-comment-bubble-avatar-wireframe></velt-comment-bubble-avatar-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-bubble-comments-count-wireframe></velt-comment-bubble-comments-count-wireframe>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-comment-bubble-wireframe>\n\n\t\t\t\t\t\t<velt-text-comment-tool-wireframe>\n\t\t\t\t\t\t\t<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t\t\t\t<circle cx="50" cy="50" r="40" fill="red" />\n\t\t\t\t\t\t\t\t<rect x="5" y="5" width="90" height="90" fill="blue" fill-opacity="0.5" />\n\t\t\t\t\t\t\t\t<polygon points="50,5 95,95 5,95" fill="yellow" fill-opacity="0.7" />\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</velt-text-comment-tool-wireframe>\n\n\t\t\t\t\t\t<velt-text-comment-toolbar-wireframe>\n\t\t\t\t\t\t\t<div style="background-color:violet; display: flex; gap: 8px; border-radius: 12px; padding: 8px; align-items: center;">\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-generic-wireframe><p>GPT</p></velt-text-comment-toolbar-generic-wireframe>\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-seperator-wireframe><p>Seperator</p></velt-text-comment-toolbar-seperator-wireframe>\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-comment-annotation-wireframe><p>Comment</p></velt-text-comment-toolbar-comment-annotation-wireframe>\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-copywriter-wireframe><p>Copywriter</p></velt-text-comment-toolbar-copywriter-wireframe>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-text-comment-toolbar-wireframe>\n\t\t\t\t\t\t<velt-comment-sidebar-wireframe>\n\t\t\t\t\t\t\t<div style="background-color:lightblue; width: 100%; height: 100%;">\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-header-wireframe>\n\t\t\t\t\t\t\t\t\t<div>Custom Header</div>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-close-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div style="color:#0d6efd;">Custom Close Button</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-close-button-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-search-wireframe></velt-comment-sidebar-search-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-status-wireframe></velt-comment-sidebar-status-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div style="color:#0d6efd;">Custom Filter Button</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-button-wireframe>\n\t\t\t\t\t\t\t\t</velt-comment-sidebar-header-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-wireframe>\n\t\t\t\t\t\t\t\t\t<div>Custom Filter</div>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-title-wireframe></velt-comment-sidebar-filter-title-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-close-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div>Custom CLose filter</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-close-button-wireframe>\n\n\t\t\t\t\t\t\t\t\t<div style="background-color: yellow">\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-location-wireframe></velt-comment-sidebar-filter-location-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-people-wireframe></velt-comment-sidebar-filter-people-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-category-wireframe></velt-comment-sidebar-filter-category-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-priority-wireframe></velt-comment-sidebar-filter-priority-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-comment-type-wireframe></velt-comment-sidebar-filter-comment-type-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-versions-wireframe></velt-comment-sidebar-filter-versions-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-group-by-wireframe></velt-comment-sidebar-filter-group-by-wireframe>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-done-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div>Custom Done Button</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-done-button-wireframe>\n\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-list-wireframe></velt-comment-sidebar-list-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-empty-placeholder-wireframe>\n\t\t\t\t\t\t\t\t\t<div>Empty Placeholder</div>\n\t\t\t\t\t\t\t\t</velt-comment-sidebar-empty-placeholder-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-page-mode-wireframe></velt-comment-sidebar-page-mode-wireframe>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-comment-sidebar-wireframe>\n <velt-comment-dialog-wireframe variant="dialog">\n <div class="dialog-all-comment-container">\n <velt-comment-dialog-all-comment-wireframe></velt-comment-dialog-all-comment-wireframe>\n </div>\n <div class="dialog-body-container">\n <velt-comment-dialog-body-wireframe></velt-comment-dialog-body-wireframe>\n </div>\n <div class="dialog-composer-container">\n <velt-comment-dialog-composer-wireframe></velt-comment-dialog-composer-wireframe>\n </div>\n <div class="dialog-header-container">\n <velt-comment-dialog-header-wireframe></velt-comment-dialog-header-wireframe>\n </div>\n </velt-comment-dialog-wireframe>\n <velt-comment-dialog-wireframe variant="sidebar">\n <div class="sidebar-dialog-header-container">\n <velt-comment-dialog-header-wireframe>\n <div class="sidebar-dialog-header-block">\n <velt-comment-dialog-comment-count-wireframe></velt-comment-dialog-comment-count-wireframe>\n <velt-comment-dialog-status-wireframe></velt-comment-dialog-status-wireframe>\n <div style="flex-grow: 1"></div>\n <velt-comment-dialog-comment-category-wireframe></velt-comment-dialog-comment-category-wireframe>\n <velt-comment-dialog-priority-wireframe></velt-comment-dialog-priority-wireframe>\n </div>\n </velt-comment-dialog-header-wireframe>\n </div>\n <div class="sidebar-dialog-body-container">\n <velt-comment-dialog-body-wireframe></velt-comment-dialog-body-wireframe>\n </div>\n <div class="sidebar-dialog-composer-container">\n <velt-comment-dialog-composer-wireframe></velt-comment-dialog-composer-wireframe>\n </div>\n </velt-comment-dialog-wireframe>\n ',window.document.body.appendChild(t)}this.initializeSnippyly()}catch(t){this.loading=!1,console.warn("Error in loadPluginUI: ",t),bc("Error in loadPluginUI: ",t)}},this.listenToDocumentTitleChange=()=>{try{this.documentTitleChangeInterval||(this.documentTitleChangeInterval=setInterval((()=>{var t,e,i;const o="true"===sessionStorage.getItem("debugDocumentTitleChange");if(o&&(console.log("*** listenToDocumentTitleChange ***"),console.log("usePageTitleAsLocationName: ",this.usePageTitleAsLocationName)),this.usePageTitleAsLocationName){const n=document.title;o&&(console.log("location name: ",null===(t=this.location)||void 0===t?void 0:t.locationName),console.log("title: ",n),console.log("changed: ",(null===(e=this.location)||void 0===e?void 0:e.locationName)!==n)),(null===(i=this.location)||void 0===i?void 0:i.locationName)!==n&&(o&&console.log("%c triggering location update!","color: green; font-weight: bold;"),this.generateLocation(),this.setLocation({forceSetLocation:!0}))}}),2e3))}catch(t){bc("Error in listenToDocumentTitleChange: ",t)}},this.initializeSnippyly=async()=>{var t,i,o,n,r,s,a,l,c,d,h,u,p,v,m,f,g,w,b,y,C,x,E,k,S,M,_,T;try{let I=this.staging?vt:mt;this.staging||ft.includes(this.apiKey)||(I="latest"),this.veltVersion&&(I=this.veltVersion);let N=this.staging,O=!1;if((null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("velt-version"))&&(I=sessionStorage.getItem("velt-version")),null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("velt-env")){"staging"===sessionStorage.getItem("velt-env")&&(N=!1,O=!0)}if(await e(this.apiKey,{options:{develop:N,staging:O,version:I,velt:!0,proxyDomain:"https://cdn.velt.dev"}}),!window.Velt)return;if(this.autoTranslation&&(null===Velt||void 0===Velt?void 0:Velt.enableAutoTranslation)&&(null===Velt||void 0===Velt||Velt.enableAutoTranslation()),!document.querySelector(Kt.VELT_COMMENTS_SIDEBAR)){const t=document.createElement(Kt.VELT_COMMENTS_SIDEBAR);t.setAttribute(Jt.ENABLE_URL_NAVIGATION,"true"),t.setAttribute(Jt.CURRENT_LOCATION_SUFFIX,"true"),window.document.body.appendChild(t)}if(Velt){null===Velt||void 0===Velt||Velt.sf(!0);try{window.dispatchEvent(new CustomEvent("onVeltLoad",{detail:{Velt}})),(null===window||void 0===window?void 0:window.onSnippylyLoad)&&(null===window||void 0===window||window.onSnippylyLoad(Velt))}catch(t){}document.body.style.setProperty("--velt-default-font-family","'Poppins', sans-serif"),(()=>{try{if(!document.getElementById("superflowFontLink3")){const t=document.createElement("link");t.rel="stylesheet",t.href="https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/fonts%2Fpoppins%2Fpoppins.css?alt=media&token=5f31a0f2-5f67-4974-bf56-78ae655f2b68",t.id="superflowFontLink3",document.head.appendChild(t)}}catch(t){console.warn("Error in loadPoppinsFont: ",t),bc("Error in loadPoppinsFont: ",t)}})()}if(Velt&&gc({sdkVersion:null===Velt||void 0===Velt?void 0:Velt.version,sdkType:"client"}),this.generateDocumentId(),(null===Velt||void 0===Velt?void 0:Velt.on)&&"function"==typeof(null===Velt||void 0===Velt?void 0:Velt.on)?Velt.on("userUpdate").subscribe((async t=>{t&&await this.setDocumentAndLocation()})):await this.setDocumentAndLocation(),setTimeout((()=>{var t;if(this.usePageTitleAsLocationName){const e=document.title;(null===(t=this.location)||void 0===t?void 0:t.locationName)!==e&&(this.generateLocation(),this.setLocation({forceSetLocation:!0}))}}),4e3),this.commentElement=null===Velt||void 0===Velt?void 0:Velt.getCommentElement(),this.contactElement=null===Velt||void 0===Velt?void 0:Velt.getContactElement(),this.rewriterElement=null===Velt||void 0===Velt?void 0:Velt.getRewriterElement(),this.presenceElement=null===Velt||void 0===Velt?void 0:Velt.getPresenceElement(),this.commentElement){this.commentElement.enableTextComments(!0),this.customLoginEnabledLocally||this.commentElement.enableSignInButton(!0),this.commentElement.enableAttachments(!0),(null===(t=this.commentElement)||void 0===t?void 0:t.showScreenSizeInfo)&&this.commentElement.showScreenSizeInfo(!0),(null===(i=this.commentElement)||void 0===i?void 0:i.enableDeviceInfo)&&this.commentElement.enableDeviceInfo(!0),this.commentElement.enableCommentIndex(!0),this.commentElement.onCommentModeChange&&this.commentElement.onCommentModeChange().subscribe((t=>{this.addCommentMode=t,this.addCommentMode||this.showModalOnceCommentIsModeIsOff&&(this.addCommentCount>=2&&!nc(Ut)&&(this.allowGuestModeSignIn?this.openGuestModeSignInModal():this.openGuestModeNameModel(),oc(Ut,"true"),this.showModalOnceCommentIsModeIsOff=!1),this.addCommentCount>=5&&!this.showGuestModeSignInModal&&!nc(Bt,!1,"sessionStorage")&&(this.showGuestModeSignInBanner(),oc(Bt,"true",!1,"sessionStorage"),this.showModalOnceCommentIsModeIsOff=!1))})),(null===(o=this.commentElement)||void 0===o?void 0:o.enableOrphanComments)&&this.commentElement.enableOrphanComments(),(null===(n=this.commentElement)||void 0===n?void 0:n.enablePersistentCommentMode)&&this.commentElement.enablePersistentCommentMode(),(null===(r=this.commentElement)||void 0===r?void 0:r.enableGhostComments)&&this.commentElement.enableGhostComments();const e=null===window||void 0===window?void 0:window.SUPERFLOW_CUSTOM_STATUSES;e&&"object"==typeof e&&(null===(s=this.commentElement)||void 0===s?void 0:s.setCustomStatus)&&this.commentElement.setCustomStatus(e),(null===(a=this.commentElement)||void 0===a?void 0:a.enableMinimap)&&this.commentElement.enableMinimap(),(null===(l=this.commentElement)||void 0===l?void 0:l.setDStrategy)&&(null===(c=this.commentElement)||void 0===c||c.setDStrategy("dynamicId")),(null===(d=this.commentElement)||void 0===d?void 0:d.enableSidebarButtonOnCommentDialog)&&this.commentElement.enableSidebarButtonOnCommentDialog(),(null===(h=this.commentElement)||void 0===h?void 0:h.enableHotkey)&&this.commentElement.enableHotkey(),(null===(u=this.commentElement)||void 0===u?void 0:u.enableDeviceIndicatorOnCommentPins)&&this.commentElement.enableDeviceIndicatorOnCommentPins(),(null===(m=null===(v=null===(p=this.customerMetadata)||void 0===p?void 0:p.superflow)||void 0===v?void 0:v.advancedFeatures)||void 0===m?void 0:m.takeScreenshotOnComments)?this.commentElement.enableScreenshot&&this.commentElement.enableScreenshot():this.commentElement.disableScreenshot&&this.commentElement.disableScreenshot(),(null===(w=null===(g=null===(f=this.customerMetadata)||void 0===f?void 0:f.superflow)||void 0===g?void 0:g.advancedFeatures)||void 0===w?void 0:w.hasCustomStatus)&&this.setCustomStatuses()}this.selectionElement=Velt.getSelectionElement(),this.selectionElement&&this.selectionElement.enableLiveSelection(!0),this.rewriterElement&&(null===(b=this.rewriterElement)||void 0===b||b.enableRewriter()),this.presenceElement&&(null===(y=this.presenceElement)||void 0===y?void 0:y.enableFlockMode)&&(null===(C=this.presenceElement)||void 0===C||C.enableFlockMode(!0)),(null===Velt||void 0===Velt?void 0:Velt.getDocElement)&&(this.docElement=Velt.getDocElement()),null===(S=(null===(x=this.docElement)||void 0===x?void 0:x.getDocumentMetadata)?null===(E=this.docElement)||void 0===E?void 0:E.getDocumentMetadata():null===(k=null===Velt||void 0===Velt?void 0:Velt.docService)||void 0===k?void 0:k.getDocumentMetadata$())||void 0===S||S.subscribe((t=>{var e,i;const o=(null===(e=null==t?void 0:t.superflow)||void 0===e?void 0:e.versions)?Object.values(null===(i=null==t?void 0:t.superflow)||void 0===i?void 0:i.versions):[],n=new URL(document.location).searchParams.get("version");if(n){const t=o.find((t=>t.id===n));t&&(this.version={id:t.id,name:t.versionName||t.id},this.setLocation())}})),(null===Velt||void 0===Velt?void 0:Velt.getViewsElement)&&(this.viewsElement=Velt.getViewsElement()),(null===(M=this.viewsElement)||void 0===M?void 0:M.getUniqueViewsByUser)&&(null===(T=null===(_=this.viewsElement)||void 0===_?void 0:_.getUniqueViewsByUser())||void 0===T||T.subscribe((t=>{this.totalViews=t}))),this.identifySnippyly()}catch(t){this.loading=!1,console.warn("Error in initializeSnippyly: ",t),bc("Error in initializeSnippyly: ",t)}},this.generateDocumentId=()=>{try{this.documentId=Xl(ec(window.location.origin))+"",this.projectId&&(this.documentId=this.projectId+""),this.serverDocumentId=(t=this.documentId+"")?`${Xl(t)}`:void 0}catch(t){console.warn("Error in generateDocumentId: ",t),bc("Error in generateDocumentId: ",t)}var t},this.setDocumentAndLocation=async()=>{try{this.generateDocumentId(),this.previousLocation=null,await(null===Velt||void 0===Velt?void 0:Velt.setDocumentId(this.documentId+"")),gc({documentId:this.serverDocumentId,clientDocumentId:this.documentId}),this.generateLocation(),this.setLocation()}catch(t){console.warn("Error in setDocumentAndLocation: ",t),bc("Error in setDocumentAndLocation: ",t)}},this.checkToEnableUpgradeButton=()=>{var t,e;try{this.isPlanExpired&&this.isUserGlobalContact?(null===(t=this.commentElement)||void 0===t?void 0:t.enableUpgradeButton)&&this.commentElement.enableUpgradeButton():(null===(e=this.commentElement)||void 0===e?void 0:e.disableUpgradeButton)&&this.commentElement.disableUpgradeButton()}catch(t){console.warn("Error in checkToEnableUpgradeButton: ",t),bc("Error in checkToEnableUpgradeButton: ",t)}},this.getCustomerMetadata=async()=>{try{const t=await(async t=>{try{const e=fo(pc,ne,{timeout:12e5}),i=await e({eventType:"getCustomerMetadata",apiKey:t});return null==i?void 0:i.data}catch(t){return console.warn("Error in getCustomerMetadata: ",t),null}})(this.apiKey);return(t=>{try{const e=t?JSON.stringify(t):"false";oc(Ht,e)}catch(t){console.warn("Error in setCustomerMetadataToStorage: ",t),bc("Error in setCustomerMetadataToStorage: ",t)}})(t),t}catch(t){console.warn("Error in getCustomerMetadata: ",t),bc("Error in getCustomerMetadata: ",t);const e=(()=>{try{const t=nc(Ht);return t?"false"===t?JSON.parse(JSON.stringify(Yt)):JSON.parse(t):null}catch(t){return console.warn("Error in getCustomerMetadataFromStorage: ",t),bc("Error in getCustomerMetadataFromStorage: ",t),null}})();if(e)return e}},this.setCustomStatuses=async()=>{var t;try{const e=await(async t=>{try{const e=fo(pc,ne,{timeout:12e5}),i=await e({eventType:"customStatus",subEventType:"getOrgStatuses",apiKey:t});return null==i?void 0:i.data}catch(t){return console.warn("Error in getOrgStatuses: ",t),null}})(this.apiKey);if((null==e?void 0:e.success)&&(null==e?void 0:e.data)){const i=Object.values(e.data),o=this.sortCustomStatuses(i);o.length>0&&(null===(t=this.commentElement)||void 0===t?void 0:t.setCustomStatus)&&this.commentElement.setCustomStatus(o)}}catch(t){console.warn("Error in setCustomStatuses: ",t),bc("Error in setCustomStatuses: ",t)}},this.sortCustomStatuses=t=>{try{const e=[...t].sort(((t,e)=>("number"==typeof t.order?t.order:Number.MAX_SAFE_INTEGER)-("number"==typeof e.order?e.order:Number.MAX_SAFE_INTEGER)));return e}catch(e){return console.warn("Error in sortCustomStatuses: ",e),bc("Error in sortCustomStatuses: ",e),t}},this.getSamlConfig=async()=>{try{const t=await(async t=>{var e;try{const i=fo(pc,ne,{timeout:12e5}),o=await i({eventType:"saml",samlEventType:"getPublicConfig",apiKey:t});return null===(e=null==o?void 0:o.data)||void 0===e?void 0:e.publicConfig}catch(t){return console.warn("Error in getSamlPublicConfig: ",t),null}})(this.apiKey);return(t=>{try{if(t){const e=JSON.stringify(t);oc(Gt,e,!0)}}catch(t){console.warn("Error in setSamlConfigToStorage: ",t),bc("Error in setSamlConfigToStorage: ",t)}})(t),t}catch(t){console.warn("Error in getSamlConfig: ",t),bc("Error in getSamlConfig: ",t);const e=(()=>{try{const t=nc(Gt,!0);return t?JSON.parse(t):null}catch(t){return console.warn("Error in getSamlConfigFromStorage: ",t),bc("Error in getSamlConfigFromStorage: ",t),null}})();if(e)return e}},this.setLogos=()=>{var t,e,i,o,n,r,s,a,l,c,d,h;try{let u="light";this.privateCommentModeEnabled&&(u="dark");const p=null===(i=null===(e=null===(t=this.customerMetadata)||void 0===t?void 0:t.superflow)||void 0===e?void 0:e.customBranding)||void 0===i?void 0:i.logoMark,v=null===(r=null===(n=null===(o=null==Qt?void 0:Yt)||void 0===o?void 0:o.customBranding)||void 0===n?void 0:n.logo)||void 0===r?void 0:r.logoMark,m=null===(l=null===(a=null===(s=this.customerMetadata)||void 0===s?void 0:s.superflow)||void 0===a?void 0:a.customBranding)||void 0===l?void 0:l.wordMark,f=null===(h=null===(d=null===(c=null==Qt?void 0:Yt)||void 0===c?void 0:c.customBranding)||void 0===d?void 0:d.logo)||void 0===h?void 0:h.wordMark;switch(u){case"light":this.logoMark=(null==p?void 0:p.lightUrl)||(null==p?void 0:p.darkUrl)||(null==v?void 0:v.lightUrl),this.wordMark=(null==m?void 0:m.lightUrl)||(null==m?void 0:m.darkUrl)||(null==f?void 0:f.lightUrl);break;case"dark":this.logoMark=(null==p?void 0:p.darkUrl)||(null==p?void 0:p.lightUrl)||(null==v?void 0:v.darkUrl),this.wordMark=(null==m?void 0:m.darkUrl)||(null==m?void 0:m.lightUrl)||(null==f?void 0:f.darkUrl)}}catch(t){console.warn("Error in setLogos: ",t),bc("Error in setLogos: ",t)}},this.getLogoMark=()=>{var t;try{return(null===(t=this.logoMark)||void 0===t?void 0:t.includes("<svg"))?A`
3950
3950
  ${ht(this.logoMark)}
3951
3951
  `:A`
3952
3952
  <img src=${this.logoMark} />
package/snippyly.min.js CHANGED
@@ -3946,7 +3946,7 @@ class Hl extends Ns{}Hl.Encryptor=class extends Hl{processBlock(t,e){const i=t,o
3946
3946
  </div>
3947
3947
  </div>
3948
3948
  </div>
3949
- `}};Ac.styles=Nc,Lc([it({type:String})],Ac.prototype,"apiKey",void 0),Lc([it({type:String})],Ac.prototype,"documentId",void 0),Lc([it({type:Boolean})],Ac.prototype,"disableInvite",void 0),Lc([it({type:Boolean})],Ac.prototype,"hasInviteAccess",void 0),Lc([ot()],Ac.prototype,"userType",void 0),Lc([ot()],Ac.prototype,"showCheckIcon",void 0),Lc([ot()],Ac.prototype,"contactListIsHovered",void 0),Lc([ot()],Ac.prototype,"invalidEmail",void 0),Lc([ot()],Ac.prototype,"isEmailValid",void 0),Lc([ot()],Ac.prototype,"inviting",void 0),Lc([ot()],Ac.prototype,"searchingUsers",void 0),Lc([ot()],Ac.prototype,"emailInput",void 0),Lc([ot()],Ac.prototype,"emailTags",void 0),Lc([ot()],Ac.prototype,"editingTag",void 0),Lc([ot()],Ac.prototype,"editingInput",void 0),Lc([ot()],Ac.prototype,"duplicateEmail",void 0),Lc([ot()],Ac.prototype,"filteredContacts",void 0),Lc([nt("#mainInput")],Ac.prototype,"mainInput",void 0),Lc([nt("#editInput")],Ac.prototype,"editInput",void 0),Ac=Lc([(t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:o}=e;return{kind:i,elements:o,finisher(e){window.customElements.define(t,e)}}})(t,e))("superflow-invite-modal")],Ac);var $c=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Dc extends X{constructor(){super(),this._loadPlugin=!1,this.comments=[],this.addCommentMode=!1,this.showTourCommentTooltip=!1,this.allFeatureDisabled=!1,this.allFeatureRestricted=!1,this.guestMode=!1,this._expanded=!0,this.loading=!0,this._isPlanExpired=null,this.showOnboardingModal=!0,this.showLiveDemoModal=!1,this.showFigmaDemoModal=!1,this.showGuestModeSignInModal=!1,this.defaultGuestModeSignInModalConfig={title:"Sign in to notify your team",description:"Notify your team about your latest comments.",closeOnClickOutside:!1,showLeaveCommentButton:!0},this.guestModeSignInModalConfig=JSON.parse(JSON.stringify(this.defaultGuestModeSignInModalConfig)),this.showGuestModeNameModal=!1,this.guestModeSignInBannerVisible=!1,this.guestUserNameInput="",this.guestUserModelOpened=!1,this.guestUserNameUpdated=!1,this.guestUserNameUpdateLoading=!1,this.staging=te,this._autoLocation=!0,this.copyLinkTooltip="Copy Link",this.invalidApiKey=!1,this._isUserGlobalContact=!1,this.showQrCode=!1,this.customLoginEnabledLocally=null,this.customLoginEnabled=null,this.exitReviewModeCalled=!1,this.addCommentCount=0,this._privateCommentModeEnabled=!1,this.superflowToolbarMoved=!1,this._darkMode=!1,this.allowGuestModeSignIn=!0,this._queryParamsComments=!1,this._usePageTitleAsLocationName=!1,this.toolbarEnabled=!1,this.toolbarEnabledApiCalled=!1,this.passwordProtected=!1,this.isPasswordValid=!1,this.password="",this.validatingPasswordLoading=!1,this.showPasswordProtectedModal=!1,this.showInvalidPassword=!1,this.skipGuestNameModal=!1,this._totalViews={},this.totalViewsCount=0,this.inviteUrl="",this.showModalOnceCommentIsModeIsOff=!1,this.showInviteModal=!1,this.subscriptions=[],this.onApiKeyChange=()=>{try{this.apiKey&&(null===window||void 0===window?void 0:window.onSuperflowLoad)&&"function"==typeof window.onSuperflowLoad&&window.onSuperflowLoad()}catch(t){console.warn("Error in onApiKeyChange: ",t),yc("Error in onApiKeyChange: ",t)}},this.checkCustomLoginEnabled=async()=>{var t,e;try{const i=await(e=this.apiKey,go(vc,re,{timeout:12e5})({eventType:"customLoginEnabled",apiKey:e}));this.customLoginEnabled=!!(null===(t=null==i?void 0:i.data)||void 0===t?void 0:t.customLoginEnabled),this.customLoginEnabled&&this.loginWithCustomUser()}catch(t){this.customLoginEnabled=!1,console.warn("Error in checkCustomLoginEnabled: ",t),yc("Error in checkCustomLoginEnabled: ",t)}},this.loginWithCustomUser=()=>{try{this.customLoginEnabled?(sc(St),this.loadPlugin&&this.documentId&&this.identifySnippyly()):console.warn("Identify call not allowed.")}catch(t){console.warn("Error in loginWithCustomUser: ",t),yc("Error in loginWithCustomUser: ",t)}},this.addWindowClickEventListener=()=>{try{this.windowClickEventListener||(this.windowClickEventListener=()=>{this.menuOpenedId&&(this.menuOpenedId=void 0)},window.addEventListener("click",this.windowClickEventListener))}catch(t){console.warn("Error in addWindowClickEventListener: ",t),yc("Error in addWindowClickEventListener: ",t)}},this.removeWindowClickEventListener=()=>{try{window.removeEventListener("click",this.windowClickEventListener),this.windowClickEventListener=void 0}catch(t){console.warn("Error in removeWindowClickEventListener: ",t),yc("Error in removeWindowClickEventListener: ",t)}},this.setWindowEventListner=()=>{try{window.addEventListener("locationchange",(()=>{this.checkUrl()}))}catch(t){console.warn("Error in setWindowEventListner: ",t),yc("Error in setWindowEventListner: ",t)}},this.urlChangeListener=()=>{try{const t=history.pushState;history.pushState=function(){const e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),e};const e=history.replaceState;history.replaceState=function(){const t=e.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),t},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))}))}catch(t){console.warn("Error in urlChangeListener: ",t),yc("Error in urlChangeListener: ",t)}},this.checkUrl=()=>{try{this.setInviteUrl();const t=new URL(document.location),e=t.searchParams;if(e.has(xt)&&nc(bt,"true",!1),(null==e?void 0:e.has(Nt))&&!rc(Nt)?this.showOnboardingModal=!0:this.showOnboardingModal=!1,null==e?void 0:e.has(Ot))if(rc(Ot,!1,"sessionStorage")){this.showLiveDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(Ot),window.history.replaceState({},null===document||void 0===document?void 0:document.title,t.toString())}else this.showLiveDemoModal=!0;else this.showLiveDemoModal=!1;if(null==e?void 0:e.has(Lt))if(rc(Lt,!1)){this.showFigmaDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(Lt),window.history.replaceState({},null===document||void 0===document?void 0:document.title,t.toString())}else this.showFigmaDemoModal=!0;else this.showFigmaDemoModal=!1;if(e.has(kt)||e.has("snippyly_google_token")){if(e.has(kt)){const t=decodeURIComponent(e.get(kt)),i=cc(t,ie,oe),o=i&&JSON.parse(i);if(o){const t={};t.userId=o.uid,t.name=o.displayName,t.email=o.email,t.photoUrl=null==o?void 0:o.photoURL;const e=JSON.stringify(t),i=lc(e,ie,oe);nc(St,i,!0),sc($t)}}else if(e.has("snippyly_google_token")){const t=JSON.parse(atob(e.get("snippyly_google_token"))),i={};i.userId=t.uid,i.name=t.displayName,i.email=t.email,i.photoUrl=null==t?void 0:t.photoURL,nc(Et,JSON.stringify(i),!0)}e.delete(kt),e.delete("snippyly_google_token"),window.history.replaceState({},document.title,t.href)}e.has(bt)?(nc(bt,"true",!1),sc(yt),e.delete(bt),window.history.replaceState({},document.title,t.href),this.loadPluginUI()):e.has(yt)||rc(bt,!1)&&this.loadPluginUI(),e.has(yt)?(nc(yt,"true",!1),sc(bt),e.delete(yt),window.history.replaceState({},document.title,t.href),this.loadPluginUI()):e.has(bt)||rc(yt,!1)&&this.loadPluginUI(),this.setVersionInUrl()}catch(t){console.warn("Error in checkUrl: ",t),yc("Error in checkUrl: ",t)}},this.setInviteUrl=()=>{try{const t=new URL(document.location);t.searchParams.has(bt)||t.searchParams.set(bt,"true"),this.inviteUrl=t.toString()}catch(t){console.warn("Error in setInviteUrl: ",t),yc("Error in setInviteUrl: ",t)}},this.detectVersion=()=>{try{if(this.projectVersionKey){const t=new URL(document.location).searchParams;if(t.get(this.projectVersionKey))this.projectVersion=t.get(this.projectVersionKey);else if(window.snippylyInitialLoadUrl){const t=new URL(window.snippylyInitialLoadUrl).searchParams;t.get(this.projectVersionKey)&&(this.projectVersion=t.get(this.projectVersionKey))}this.projectVersion&&nc(Tt,this.projectVersion,!1,"sessionStorage")}else{const t=new URL(document.location).searchParams;(t.has(bt)||t.has(yt))&&t.has(It)&&(nc(_t,It,!1,"sessionStorage"),this.projectVersion=t.get(It),this.projectVersion&&nc(Tt,this.projectVersion,!1,"sessionStorage"))}}catch(t){console.warn("Error in detectVersion: ",t),yc("Error in detectVersion: ",t)}},this.setVersionInUrl=()=>{try{const t=this.projectVersionKey||rc(_t,!1,"sessionStorage"),e=this.projectVersion||rc(Tt,!1,"sessionStorage");if(t&&e){const i=new URL(document.location),o=i.searchParams;o.get(t)||(o.set(t,e),window.history.replaceState({},document.title,i.href))}}catch(t){console.warn("Error in setVersionInUrl: ",t),yc("Error in setVersionInUrl: ",t)}},this.loadPluginUI=async()=>{var t,e,i,o,n,r,s,a;try{if(!this.apiKey)return;if(!this.projectId)return;if(this.loadPlugin)return this.generateLocation(),this.setLocation(),void setTimeout((()=>{var t;if(this.usePageTitleAsLocationName){const e=document.title;(null===(t=this.location)||void 0===t?void 0:t.locationName)!==e&&(this.generateLocation(),this.setLocation({forceSetLocation:!0}))}}),4e3);if(this.toolbarEnabledApiCalled||await this.detectToolbarEnabled(),!this.toolbarEnabled)return;wt.includes(this.apiKey)&&this.listenToDocumentTitleChange();const l=dc();l&&!(null==l?void 0:l.isAnonymous)&&(this.loading=!0);try{this.customerMetadata=await this.getCustomerMetadata()}catch(t){console.warn("Error in getCustomerMetadata: ",t),yc("Error in getCustomerMetadata: ",t)}if(oc(Pt)&&(this.isPasswordValid=oc(Pt)),rc(Dt,!0)&&rc(Ut,!0)&&rc(Ft,!0)&&rc(Vt,!0)&&rc(jt,!0)?(this.guestMode="true"===rc(Dt,!0),this.allowGuestModeSignIn="true"===rc(Ut,!0),this.passwordProtected="true"===rc(Ft,!0),this.queryParamsComments="true"===rc(Vt,!0),this.usePageTitleAsLocationName="true"===rc(jt,!0)):(this.projectConfig=await kc(this.apiKey,this.projectId),this.guestMode=!!(null===(t=this.projectConfig)||void 0===t?void 0:t.guestMode)||this.guestMode,this.allowGuestModeSignIn=!!(null===(i=null===(e=this.projectConfig)||void 0===e?void 0:e.guestModeConfig)||void 0===i?void 0:i.allowSignIn),this.queryParamsComments=!!(null===(o=this.projectConfig)||void 0===o?void 0:o.queryParamsComments),this.usePageTitleAsLocationName=!!(null===(n=this.projectConfig)||void 0===n?void 0:n.usePageTitleAsLocationName),(null===(r=this.projectConfig)||void 0===r?void 0:r.guestModeConfig)||(this.allowGuestModeSignIn=!0),this.passwordProtected=!!(null===(a=null===(s=this.projectConfig)||void 0===s?void 0:s.passwordProtected)||void 0===a?void 0:a.enabled),nc(Dt,this.guestMode+"",!0),nc(Ut,this.allowGuestModeSignIn+"",!0),nc(Ft,this.passwordProtected+"",!0),nc(Vt,this.queryParamsComments+"",!0),nc(jt,this.usePageTitleAsLocationName+"",!0)),this.loadPlugin=!0,!document.querySelector(Jt.VELT_COMMENTS)){const t=document.createElement(Jt.VELT_COMMENTS);null==t||t.addEventListener("onSignIn",(()=>{this.loginWithGoogle()})),null==t||t.addEventListener("onUpgrade",(()=>{this.onUpgradePlanClick()})),t.addEventListener("onCommentAdd",(()=>{this.addCommentCount++})),t.addEventListener("onCommentUpdate",(t=>{var e,i;(null===(e=this.snippylyUser)||void 0===e?void 0:e.isGuest)&&"newlyAdded"===(null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.type)&&(this.addCommentCount>=2&&(this.showModalOnceCommentIsModeIsOff=!0),this.addCommentCount>=5&&!this.showModalOnceCommentIsModeIsOff&&(this.showModalOnceCommentIsModeIsOff=!0))})),window.document.body.appendChild(t)}if(!document.querySelector(Jt.VELT_CURSOR)){const t=document.createElement(Jt.VELT_CURSOR);window.document.body.appendChild(t)}if(!document.querySelector(Jt.VELT_HUDDLE)){const t=document.createElement(Jt.VELT_HUDDLE);window.document.body.appendChild(t)}if(!document.querySelector(Jt.VELT_RECORDER_NOTES)){const t=document.createElement(Jt.VELT_RECORDER_NOTES);window.document.body.appendChild(t)}if(!document.querySelector(Jt.VELT_RECORDER_CONTROL_PANEL)){const t=document.createElement(Jt.VELT_RECORDER_CONTROL_PANEL);window.document.body.appendChild(t)}if(!document.querySelector(Jt.VELT_ARROWS)){const t=document.createElement(Jt.VELT_ARROWS);window.document.body.appendChild(t)}try{const t=new URL(document.location),e=t.searchParams;let i=!1;e.has("wireframe")&&"true"===e.get("wireframe")&&(sessionStorage.setItem("velt-wireframe","true"),e.delete("wireframe"),i=!0),e.get("velt-version")&&(sessionStorage.setItem("velt-version",e.get("velt-version")),e.delete("velt-version"),i=!0),e.get("velt-env")&&(sessionStorage.setItem("velt-env",e.get("velt-env")),e.delete("velt-env"),i=!0),i&&window.history.replaceState({},document.title,t.href)}catch(t){}if(this.staging&&"true"===sessionStorage.getItem("velt-wireframe")){const t=document.createElement("velt-wireframe");t.innerHTML='\n <style>\n .dialog-header-container {\n padding: 12px;\n background: lightcyan;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: 8px;\n }\n\n .dialog-all-comment-container app-comment-dialog-all-comment > div {\n padding: 12px;\n background: lightpink;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: 8px;\n }\n\n .sidebar-dialog-header-container {\n padding: 12px;\n background: lightgreen;\n margin-bottom: 8px;\n border-radius: 8px;\n }\n\n .sidebar-dialog-header-block {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n </style>\n\t\t\t\t\t\t<velt-comment-pin-wireframe>\n\t\t\t\t\t\t\t<div class="custom-comment-pin-container">\n\t\t\t\t\t\t\t\t\t<div style="width: 35px; height: 35px; background-color: blue; border-radius: 12px; border-width: 3px; border-style: solid; border-color: #f00;"></div>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-unread-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div class="custom-indicator"></div>\n\t\t\t\t\t\t\t\t\t</velt-comment-pin-unread-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-private-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t\t<span>P</span>\n\t\t\t\t\t\t\t\t\t</velt-comment-pin-private-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-ghost-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t\t<span>G</span>\n\t\t\t\t\t\t\t\t\t</velt-comment-pin-ghost-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-index-wireframe></velt-comment-pin-index-wireframe>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-comment-pin-wireframe>\n\n\t\t\t\t\t\t<velt-comment-bubble-wireframe>\n\t\t\t\t\t\t\t<div class="custom-comment-bubble">\n\t\t\t\t\t\t\t\t<velt-comment-bubble-avatar-wireframe></velt-comment-bubble-avatar-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-bubble-comments-count-wireframe></velt-comment-bubble-comments-count-wireframe>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-comment-bubble-wireframe>\n\n\t\t\t\t\t\t<velt-text-comment-tool-wireframe>\n\t\t\t\t\t\t\t<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t\t\t\t<circle cx="50" cy="50" r="40" fill="red" />\n\t\t\t\t\t\t\t\t<rect x="5" y="5" width="90" height="90" fill="blue" fill-opacity="0.5" />\n\t\t\t\t\t\t\t\t<polygon points="50,5 95,95 5,95" fill="yellow" fill-opacity="0.7" />\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</velt-text-comment-tool-wireframe>\n\n\t\t\t\t\t\t<velt-text-comment-toolbar-wireframe>\n\t\t\t\t\t\t\t<div style="background-color:violet; display: flex; gap: 8px; border-radius: 12px; padding: 8px; align-items: center;">\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-generic-wireframe><p>GPT</p></velt-text-comment-toolbar-generic-wireframe>\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-seperator-wireframe><p>Seperator</p></velt-text-comment-toolbar-seperator-wireframe>\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-comment-annotation-wireframe><p>Comment</p></velt-text-comment-toolbar-comment-annotation-wireframe>\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-copywriter-wireframe><p>Copywriter</p></velt-text-comment-toolbar-copywriter-wireframe>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-text-comment-toolbar-wireframe>\n\t\t\t\t\t\t<velt-comment-sidebar-wireframe>\n\t\t\t\t\t\t\t<div style="background-color:lightblue; width: 100%; height: 100%;">\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-header-wireframe>\n\t\t\t\t\t\t\t\t\t<div>Custom Header</div>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-close-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div style="color:#0d6efd;">Custom Close Button</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-close-button-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-search-wireframe></velt-comment-sidebar-search-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-status-wireframe></velt-comment-sidebar-status-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div style="color:#0d6efd;">Custom Filter Button</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-button-wireframe>\n\t\t\t\t\t\t\t\t</velt-comment-sidebar-header-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-wireframe>\n\t\t\t\t\t\t\t\t\t<div>Custom Filter</div>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-title-wireframe></velt-comment-sidebar-filter-title-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-close-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div>Custom CLose filter</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-close-button-wireframe>\n\n\t\t\t\t\t\t\t\t\t<div style="background-color: yellow">\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-location-wireframe></velt-comment-sidebar-filter-location-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-people-wireframe></velt-comment-sidebar-filter-people-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-category-wireframe></velt-comment-sidebar-filter-category-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-priority-wireframe></velt-comment-sidebar-filter-priority-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-comment-type-wireframe></velt-comment-sidebar-filter-comment-type-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-versions-wireframe></velt-comment-sidebar-filter-versions-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-group-by-wireframe></velt-comment-sidebar-filter-group-by-wireframe>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-done-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div>Custom Done Button</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-done-button-wireframe>\n\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-list-wireframe></velt-comment-sidebar-list-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-empty-placeholder-wireframe>\n\t\t\t\t\t\t\t\t\t<div>Empty Placeholder</div>\n\t\t\t\t\t\t\t\t</velt-comment-sidebar-empty-placeholder-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-page-mode-wireframe></velt-comment-sidebar-page-mode-wireframe>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-comment-sidebar-wireframe>\n <velt-comment-dialog-wireframe variant="dialog">\n <div class="dialog-all-comment-container">\n <velt-comment-dialog-all-comment-wireframe></velt-comment-dialog-all-comment-wireframe>\n </div>\n <div class="dialog-body-container">\n <velt-comment-dialog-body-wireframe></velt-comment-dialog-body-wireframe>\n </div>\n <div class="dialog-composer-container">\n <velt-comment-dialog-composer-wireframe></velt-comment-dialog-composer-wireframe>\n </div>\n <div class="dialog-header-container">\n <velt-comment-dialog-header-wireframe></velt-comment-dialog-header-wireframe>\n </div>\n </velt-comment-dialog-wireframe>\n <velt-comment-dialog-wireframe variant="sidebar">\n <div class="sidebar-dialog-header-container">\n <velt-comment-dialog-header-wireframe>\n <div class="sidebar-dialog-header-block">\n <velt-comment-dialog-comment-count-wireframe></velt-comment-dialog-comment-count-wireframe>\n <velt-comment-dialog-status-wireframe></velt-comment-dialog-status-wireframe>\n <div style="flex-grow: 1"></div>\n <velt-comment-dialog-comment-category-wireframe></velt-comment-dialog-comment-category-wireframe>\n <velt-comment-dialog-priority-wireframe></velt-comment-dialog-priority-wireframe>\n </div>\n </velt-comment-dialog-header-wireframe>\n </div>\n <div class="sidebar-dialog-body-container">\n <velt-comment-dialog-body-wireframe></velt-comment-dialog-body-wireframe>\n </div>\n <div class="sidebar-dialog-composer-container">\n <velt-comment-dialog-composer-wireframe></velt-comment-dialog-composer-wireframe>\n </div>\n </velt-comment-dialog-wireframe>\n ',window.document.body.appendChild(t)}this.initializeSnippyly()}catch(t){this.loading=!1,console.warn("Error in loadPluginUI: ",t),yc("Error in loadPluginUI: ",t)}},this.listenToDocumentTitleChange=()=>{try{this.documentTitleChangeInterval||(this.documentTitleChangeInterval=setInterval((()=>{var t,e,i;const o="true"===sessionStorage.getItem("debugDocumentTitleChange");if(o&&(console.log("*** listenToDocumentTitleChange ***"),console.log("usePageTitleAsLocationName: ",this.usePageTitleAsLocationName)),this.usePageTitleAsLocationName){const n=document.title;o&&(console.log("location name: ",null===(t=this.location)||void 0===t?void 0:t.locationName),console.log("title: ",n),console.log("changed: ",(null===(e=this.location)||void 0===e?void 0:e.locationName)!==n)),(null===(i=this.location)||void 0===i?void 0:i.locationName)!==n&&(o&&console.log("%c triggering location update!","color: green; font-weight: bold;"),this.generateLocation(),this.setLocation({forceSetLocation:!0}))}}),2e3))}catch(t){yc("Error in listenToDocumentTitleChange: ",t)}},this.initializeSnippyly=async()=>{var t,e,o,n,r,s,a,l,c,d,h,u,p,v,m,f,g,w,b,y,C,x,E,k,S;try{let M=this.staging?mt:ft;this.staging||gt.includes(this.apiKey)||(M="latest"),this.veltVersion&&(M=this.veltVersion);let _=this.staging,T=!1;if((null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("velt-version"))&&(M=sessionStorage.getItem("velt-version")),null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("velt-env")){"staging"===sessionStorage.getItem("velt-env")&&(_=!1,T=!0)}if(await i(this.apiKey,{options:{develop:_,staging:T,version:M,velt:!0,proxyDomain:"https://cdn.velt.dev"}}),!window.Velt)return;if(this.autoTranslation&&(null===Velt||void 0===Velt?void 0:Velt.enableAutoTranslation)&&(null===Velt||void 0===Velt||Velt.enableAutoTranslation()),!document.querySelector(Jt.VELT_COMMENTS_SIDEBAR)){const t=document.createElement(Jt.VELT_COMMENTS_SIDEBAR);t.setAttribute(Yt.ENABLE_URL_NAVIGATION,"true"),t.setAttribute(Yt.CURRENT_LOCATION_SUFFIX,"true"),window.document.body.appendChild(t)}if(Velt){null===Velt||void 0===Velt||Velt.sf(!0);try{window.dispatchEvent(new CustomEvent("onVeltLoad",{detail:{Velt}})),(null===window||void 0===window?void 0:window.onSnippylyLoad)&&(null===window||void 0===window||window.onSnippylyLoad(Velt))}catch(t){}document.body.style.setProperty("--velt-default-font-family","'Poppins', sans-serif"),(()=>{try{if(!document.getElementById("superflowFontLink3")){const t=document.createElement("link");t.rel="stylesheet",t.href="https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/fonts%2Fpoppins%2Fpoppins.css?alt=media&token=5f31a0f2-5f67-4974-bf56-78ae655f2b68",t.id="superflowFontLink3",document.head.appendChild(t)}}catch(t){console.warn("Error in loadPoppinsFont: ",t),yc("Error in loadPoppinsFont: ",t)}})()}if(Velt&&wc({sdkVersion:null===Velt||void 0===Velt?void 0:Velt.version,sdkType:"client"}),this.generateDocumentId(),(null===Velt||void 0===Velt?void 0:Velt.on)&&"function"==typeof(null===Velt||void 0===Velt?void 0:Velt.on)?Velt.on("userUpdate").subscribe((async t=>{t&&await this.setDocumentAndLocation()})):await this.setDocumentAndLocation(),setTimeout((()=>{var t;if(this.usePageTitleAsLocationName){const e=document.title;(null===(t=this.location)||void 0===t?void 0:t.locationName)!==e&&(this.generateLocation(),this.setLocation({forceSetLocation:!0}))}}),4e3),this.commentElement=null===Velt||void 0===Velt?void 0:Velt.getCommentElement(),this.contactElement=null===Velt||void 0===Velt?void 0:Velt.getContactElement(),this.rewriterElement=null===Velt||void 0===Velt?void 0:Velt.getRewriterElement(),this.presenceElement=null===Velt||void 0===Velt?void 0:Velt.getPresenceElement(),this.commentElement){this.commentElement.enableTextComments(!0),this.customLoginEnabledLocally||this.commentElement.enableSignInButton(!0),this.commentElement.enableAttachments(!0),(null===(t=this.commentElement)||void 0===t?void 0:t.showScreenSizeInfo)&&this.commentElement.showScreenSizeInfo(!0),(null===(e=this.commentElement)||void 0===e?void 0:e.enableDeviceInfo)&&this.commentElement.enableDeviceInfo(!0),this.commentElement.enableCommentIndex(!0),this.commentElement.onCommentModeChange&&this.commentElement.onCommentModeChange().subscribe((t=>{this.addCommentMode=t,this.addCommentMode||this.showModalOnceCommentIsModeIsOff&&(this.addCommentCount>=2&&!rc(zt)&&(this.allowGuestModeSignIn?this.openGuestModeSignInModal():this.openGuestModeNameModel(),nc(zt,"true"),this.showModalOnceCommentIsModeIsOff=!1),this.addCommentCount>=5&&!this.showGuestModeSignInModal&&!rc(Ht,!1,"sessionStorage")&&(this.showGuestModeSignInBanner(),nc(Ht,"true",!1,"sessionStorage"),this.showModalOnceCommentIsModeIsOff=!1))})),(null===(o=this.commentElement)||void 0===o?void 0:o.enableOrphanComments)&&this.commentElement.enableOrphanComments(),(null===(n=this.commentElement)||void 0===n?void 0:n.enablePersistentCommentMode)&&this.commentElement.enablePersistentCommentMode(),(null===(r=this.commentElement)||void 0===r?void 0:r.enableGhostComments)&&this.commentElement.enableGhostComments();const i=null===window||void 0===window?void 0:window.SUPERFLOW_CUSTOM_STATUSES;i&&"object"==typeof i&&(null===(s=this.commentElement)||void 0===s?void 0:s.setCustomStatus)&&this.commentElement.setCustomStatus(i),(null===(a=this.commentElement)||void 0===a?void 0:a.enableMinimap)&&this.commentElement.enableMinimap(),(null===(l=this.commentElement)||void 0===l?void 0:l.setDStrategy)&&(null===(c=this.commentElement)||void 0===c||c.setDStrategy("dynamicId")),(null===(d=this.commentElement)||void 0===d?void 0:d.enableSidebarButtonOnCommentDialog)&&this.commentElement.enableSidebarButtonOnCommentDialog(),(null===(h=this.commentElement)||void 0===h?void 0:h.enableHotkey)&&this.commentElement.enableHotkey(),(null===(u=this.commentElement)||void 0===u?void 0:u.enableDeviceIndicatorOnCommentPins)&&this.commentElement.enableDeviceIndicatorOnCommentPins(),(null===(m=null===(v=null===(p=this.customerMetadata)||void 0===p?void 0:p.superflow)||void 0===v?void 0:v.advancedFeatures)||void 0===m?void 0:m.takeScreenshotOnComments)?this.commentElement.enableScreenshot&&this.commentElement.enableScreenshot():this.commentElement.disableScreenshot&&this.commentElement.disableScreenshot()}this.selectionElement=Velt.getSelectionElement(),this.selectionElement&&this.selectionElement.enableLiveSelection(!0),this.rewriterElement&&(null===(f=this.rewriterElement)||void 0===f||f.enableRewriter()),this.presenceElement&&(null===(g=this.presenceElement)||void 0===g?void 0:g.enableFlockMode)&&(null===(w=this.presenceElement)||void 0===w||w.enableFlockMode(!0)),(null===Velt||void 0===Velt?void 0:Velt.getDocElement)&&(this.docElement=Velt.getDocElement()),null===(x=(null===(b=this.docElement)||void 0===b?void 0:b.getDocumentMetadata)?null===(y=this.docElement)||void 0===y?void 0:y.getDocumentMetadata():null===(C=null===Velt||void 0===Velt?void 0:Velt.docService)||void 0===C?void 0:C.getDocumentMetadata$())||void 0===x||x.subscribe((t=>{var e,i;const o=(null===(e=null==t?void 0:t.superflow)||void 0===e?void 0:e.versions)?Object.values(null===(i=null==t?void 0:t.superflow)||void 0===i?void 0:i.versions):[],n=new URL(document.location).searchParams.get("version");if(n){const t=o.find((t=>t.id===n));t&&(this.version={id:t.id,name:t.versionName||t.id},this.setLocation())}})),(null===Velt||void 0===Velt?void 0:Velt.getViewsElement)&&(this.viewsElement=Velt.getViewsElement()),(null===(E=this.viewsElement)||void 0===E?void 0:E.getUniqueViewsByUser)&&(null===(S=null===(k=this.viewsElement)||void 0===k?void 0:k.getUniqueViewsByUser())||void 0===S||S.subscribe((t=>{this.totalViews=t}))),this.identifySnippyly()}catch(t){this.loading=!1,console.warn("Error in initializeSnippyly: ",t),yc("Error in initializeSnippyly: ",t)}},this.generateDocumentId=()=>{try{this.documentId=tc(ic(window.location.origin))+"",this.projectId&&(this.documentId=this.projectId+""),this.serverDocumentId=(t=this.documentId+"")?`${tc(t)}`:void 0}catch(t){console.warn("Error in generateDocumentId: ",t),yc("Error in generateDocumentId: ",t)}var t},this.setDocumentAndLocation=async()=>{try{this.generateDocumentId(),this.previousLocation=null,await(null===Velt||void 0===Velt?void 0:Velt.setDocumentId(this.documentId+"")),wc({documentId:this.serverDocumentId,clientDocumentId:this.documentId}),this.generateLocation(),this.setLocation()}catch(t){console.warn("Error in setDocumentAndLocation: ",t),yc("Error in setDocumentAndLocation: ",t)}},this.checkToEnableUpgradeButton=()=>{var t,e;try{this.isPlanExpired&&this.isUserGlobalContact?(null===(t=this.commentElement)||void 0===t?void 0:t.enableUpgradeButton)&&this.commentElement.enableUpgradeButton():(null===(e=this.commentElement)||void 0===e?void 0:e.disableUpgradeButton)&&this.commentElement.disableUpgradeButton()}catch(t){console.warn("Error in checkToEnableUpgradeButton: ",t),yc("Error in checkToEnableUpgradeButton: ",t)}},this.getCustomerMetadata=async()=>{try{const t=await(async t=>{try{const e=go(vc,re,{timeout:12e5}),i=await e({eventType:"getCustomerMetadata",apiKey:t});return null==i?void 0:i.data}catch(t){return console.warn("Error in getCustomerMetadata: ",t),null}})(this.apiKey);return(t=>{try{const e=t?JSON.stringify(t):"false";nc(Gt,e)}catch(t){console.warn("Error in setCustomerMetadataToStorage: ",t),yc("Error in setCustomerMetadataToStorage: ",t)}})(t),t}catch(t){console.warn("Error in getCustomerMetadata: ",t),yc("Error in getCustomerMetadata: ",t);const e=(()=>{try{const t=rc(Gt);return t?"false"===t?JSON.parse(JSON.stringify(qt)):JSON.parse(t):null}catch(t){return console.warn("Error in getCustomerMetadataFromStorage: ",t),yc("Error in getCustomerMetadataFromStorage: ",t),null}})();if(e)return e}},this.getSamlConfig=async()=>{try{const t=await(async t=>{var e;try{const i=go(vc,re,{timeout:12e5}),o=await i({eventType:"saml",samlEventType:"getPublicConfig",apiKey:t});return null===(e=null==o?void 0:o.data)||void 0===e?void 0:e.publicConfig}catch(t){return console.warn("Error in getSamlPublicConfig: ",t),null}})(this.apiKey);return(t=>{try{if(t){const e=JSON.stringify(t);nc(Wt,e,!0)}}catch(t){console.warn("Error in setSamlConfigToStorage: ",t),yc("Error in setSamlConfigToStorage: ",t)}})(t),t}catch(t){console.warn("Error in getSamlConfig: ",t),yc("Error in getSamlConfig: ",t);const e=(()=>{try{const t=rc(Wt,!0);return t?JSON.parse(t):null}catch(t){return console.warn("Error in getSamlConfigFromStorage: ",t),yc("Error in getSamlConfigFromStorage: ",t),null}})();if(e)return e}},this.setLogos=()=>{var t,e,i,o,n,r,s,a,l,c,d,h;try{let u="light";this.privateCommentModeEnabled&&(u="dark");const p=null===(i=null===(e=null===(t=this.customerMetadata)||void 0===t?void 0:t.superflow)||void 0===e?void 0:e.customBranding)||void 0===i?void 0:i.logoMark,v=null===(r=null===(n=null===(o=null==Xt?void 0:qt)||void 0===o?void 0:o.customBranding)||void 0===n?void 0:n.logo)||void 0===r?void 0:r.logoMark,m=null===(l=null===(a=null===(s=this.customerMetadata)||void 0===s?void 0:s.superflow)||void 0===a?void 0:a.customBranding)||void 0===l?void 0:l.wordMark,f=null===(h=null===(d=null===(c=null==Xt?void 0:qt)||void 0===c?void 0:c.customBranding)||void 0===d?void 0:d.logo)||void 0===h?void 0:h.wordMark;switch(u){case"light":this.logoMark=(null==p?void 0:p.lightUrl)||(null==p?void 0:p.darkUrl)||(null==v?void 0:v.lightUrl),this.wordMark=(null==m?void 0:m.lightUrl)||(null==m?void 0:m.darkUrl)||(null==f?void 0:f.lightUrl);break;case"dark":this.logoMark=(null==p?void 0:p.darkUrl)||(null==p?void 0:p.lightUrl)||(null==v?void 0:v.darkUrl),this.wordMark=(null==m?void 0:m.darkUrl)||(null==m?void 0:m.lightUrl)||(null==f?void 0:f.darkUrl)}}catch(t){console.warn("Error in setLogos: ",t),yc("Error in setLogos: ",t)}},this.getLogoMark=()=>{var t;try{return(null===(t=this.logoMark)||void 0===t?void 0:t.includes("<svg"))?$`
3949
+ `}};Ac.styles=Nc,Lc([it({type:String})],Ac.prototype,"apiKey",void 0),Lc([it({type:String})],Ac.prototype,"documentId",void 0),Lc([it({type:Boolean})],Ac.prototype,"disableInvite",void 0),Lc([it({type:Boolean})],Ac.prototype,"hasInviteAccess",void 0),Lc([ot()],Ac.prototype,"userType",void 0),Lc([ot()],Ac.prototype,"showCheckIcon",void 0),Lc([ot()],Ac.prototype,"contactListIsHovered",void 0),Lc([ot()],Ac.prototype,"invalidEmail",void 0),Lc([ot()],Ac.prototype,"isEmailValid",void 0),Lc([ot()],Ac.prototype,"inviting",void 0),Lc([ot()],Ac.prototype,"searchingUsers",void 0),Lc([ot()],Ac.prototype,"emailInput",void 0),Lc([ot()],Ac.prototype,"emailTags",void 0),Lc([ot()],Ac.prototype,"editingTag",void 0),Lc([ot()],Ac.prototype,"editingInput",void 0),Lc([ot()],Ac.prototype,"duplicateEmail",void 0),Lc([ot()],Ac.prototype,"filteredContacts",void 0),Lc([nt("#mainInput")],Ac.prototype,"mainInput",void 0),Lc([nt("#editInput")],Ac.prototype,"editInput",void 0),Ac=Lc([(t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:o}=e;return{kind:i,elements:o,finisher(e){window.customElements.define(t,e)}}})(t,e))("superflow-invite-modal")],Ac);var $c=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Dc extends X{constructor(){super(),this._loadPlugin=!1,this.comments=[],this.addCommentMode=!1,this.showTourCommentTooltip=!1,this.allFeatureDisabled=!1,this.allFeatureRestricted=!1,this.guestMode=!1,this._expanded=!0,this.loading=!0,this._isPlanExpired=null,this.showOnboardingModal=!0,this.showLiveDemoModal=!1,this.showFigmaDemoModal=!1,this.showGuestModeSignInModal=!1,this.defaultGuestModeSignInModalConfig={title:"Sign in to notify your team",description:"Notify your team about your latest comments.",closeOnClickOutside:!1,showLeaveCommentButton:!0},this.guestModeSignInModalConfig=JSON.parse(JSON.stringify(this.defaultGuestModeSignInModalConfig)),this.showGuestModeNameModal=!1,this.guestModeSignInBannerVisible=!1,this.guestUserNameInput="",this.guestUserModelOpened=!1,this.guestUserNameUpdated=!1,this.guestUserNameUpdateLoading=!1,this.staging=te,this._autoLocation=!0,this.copyLinkTooltip="Copy Link",this.invalidApiKey=!1,this._isUserGlobalContact=!1,this.showQrCode=!1,this.customLoginEnabledLocally=null,this.customLoginEnabled=null,this.exitReviewModeCalled=!1,this.addCommentCount=0,this._privateCommentModeEnabled=!1,this.superflowToolbarMoved=!1,this._darkMode=!1,this.allowGuestModeSignIn=!0,this._queryParamsComments=!1,this._usePageTitleAsLocationName=!1,this.toolbarEnabled=!1,this.toolbarEnabledApiCalled=!1,this.passwordProtected=!1,this.isPasswordValid=!1,this.password="",this.validatingPasswordLoading=!1,this.showPasswordProtectedModal=!1,this.showInvalidPassword=!1,this.skipGuestNameModal=!1,this._totalViews={},this.totalViewsCount=0,this.inviteUrl="",this.showModalOnceCommentIsModeIsOff=!1,this.showInviteModal=!1,this.subscriptions=[],this.onApiKeyChange=()=>{try{this.apiKey&&(null===window||void 0===window?void 0:window.onSuperflowLoad)&&"function"==typeof window.onSuperflowLoad&&window.onSuperflowLoad()}catch(t){console.warn("Error in onApiKeyChange: ",t),yc("Error in onApiKeyChange: ",t)}},this.checkCustomLoginEnabled=async()=>{var t,e;try{const i=await(e=this.apiKey,go(vc,re,{timeout:12e5})({eventType:"customLoginEnabled",apiKey:e}));this.customLoginEnabled=!!(null===(t=null==i?void 0:i.data)||void 0===t?void 0:t.customLoginEnabled),this.customLoginEnabled&&this.loginWithCustomUser()}catch(t){this.customLoginEnabled=!1,console.warn("Error in checkCustomLoginEnabled: ",t),yc("Error in checkCustomLoginEnabled: ",t)}},this.loginWithCustomUser=()=>{try{this.customLoginEnabled?(sc(St),this.loadPlugin&&this.documentId&&this.identifySnippyly()):console.warn("Identify call not allowed.")}catch(t){console.warn("Error in loginWithCustomUser: ",t),yc("Error in loginWithCustomUser: ",t)}},this.addWindowClickEventListener=()=>{try{this.windowClickEventListener||(this.windowClickEventListener=()=>{this.menuOpenedId&&(this.menuOpenedId=void 0)},window.addEventListener("click",this.windowClickEventListener))}catch(t){console.warn("Error in addWindowClickEventListener: ",t),yc("Error in addWindowClickEventListener: ",t)}},this.removeWindowClickEventListener=()=>{try{window.removeEventListener("click",this.windowClickEventListener),this.windowClickEventListener=void 0}catch(t){console.warn("Error in removeWindowClickEventListener: ",t),yc("Error in removeWindowClickEventListener: ",t)}},this.setWindowEventListner=()=>{try{window.addEventListener("locationchange",(()=>{this.checkUrl()}))}catch(t){console.warn("Error in setWindowEventListner: ",t),yc("Error in setWindowEventListner: ",t)}},this.urlChangeListener=()=>{try{const t=history.pushState;history.pushState=function(){const e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),e};const e=history.replaceState;history.replaceState=function(){const t=e.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),t},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))}))}catch(t){console.warn("Error in urlChangeListener: ",t),yc("Error in urlChangeListener: ",t)}},this.checkUrl=()=>{try{this.setInviteUrl();const t=new URL(document.location),e=t.searchParams;if(e.has(xt)&&nc(bt,"true",!1),(null==e?void 0:e.has(Nt))&&!rc(Nt)?this.showOnboardingModal=!0:this.showOnboardingModal=!1,null==e?void 0:e.has(Ot))if(rc(Ot,!1,"sessionStorage")){this.showLiveDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(Ot),window.history.replaceState({},null===document||void 0===document?void 0:document.title,t.toString())}else this.showLiveDemoModal=!0;else this.showLiveDemoModal=!1;if(null==e?void 0:e.has(Lt))if(rc(Lt,!1)){this.showFigmaDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(Lt),window.history.replaceState({},null===document||void 0===document?void 0:document.title,t.toString())}else this.showFigmaDemoModal=!0;else this.showFigmaDemoModal=!1;if(e.has(kt)||e.has("snippyly_google_token")){if(e.has(kt)){const t=decodeURIComponent(e.get(kt)),i=cc(t,ie,oe),o=i&&JSON.parse(i);if(o){const t={};t.userId=o.uid,t.name=o.displayName,t.email=o.email,t.photoUrl=null==o?void 0:o.photoURL;const e=JSON.stringify(t),i=lc(e,ie,oe);nc(St,i,!0),sc($t)}}else if(e.has("snippyly_google_token")){const t=JSON.parse(atob(e.get("snippyly_google_token"))),i={};i.userId=t.uid,i.name=t.displayName,i.email=t.email,i.photoUrl=null==t?void 0:t.photoURL,nc(Et,JSON.stringify(i),!0)}e.delete(kt),e.delete("snippyly_google_token"),window.history.replaceState({},document.title,t.href)}e.has(bt)?(nc(bt,"true",!1),sc(yt),e.delete(bt),window.history.replaceState({},document.title,t.href),this.loadPluginUI()):e.has(yt)||rc(bt,!1)&&this.loadPluginUI(),e.has(yt)?(nc(yt,"true",!1),sc(bt),e.delete(yt),window.history.replaceState({},document.title,t.href),this.loadPluginUI()):e.has(bt)||rc(yt,!1)&&this.loadPluginUI(),this.setVersionInUrl()}catch(t){console.warn("Error in checkUrl: ",t),yc("Error in checkUrl: ",t)}},this.setInviteUrl=()=>{try{const t=new URL(document.location);t.searchParams.has(bt)||t.searchParams.set(bt,"true"),this.inviteUrl=t.toString()}catch(t){console.warn("Error in setInviteUrl: ",t),yc("Error in setInviteUrl: ",t)}},this.detectVersion=()=>{try{if(this.projectVersionKey){const t=new URL(document.location).searchParams;if(t.get(this.projectVersionKey))this.projectVersion=t.get(this.projectVersionKey);else if(window.snippylyInitialLoadUrl){const t=new URL(window.snippylyInitialLoadUrl).searchParams;t.get(this.projectVersionKey)&&(this.projectVersion=t.get(this.projectVersionKey))}this.projectVersion&&nc(Tt,this.projectVersion,!1,"sessionStorage")}else{const t=new URL(document.location).searchParams;(t.has(bt)||t.has(yt))&&t.has(It)&&(nc(_t,It,!1,"sessionStorage"),this.projectVersion=t.get(It),this.projectVersion&&nc(Tt,this.projectVersion,!1,"sessionStorage"))}}catch(t){console.warn("Error in detectVersion: ",t),yc("Error in detectVersion: ",t)}},this.setVersionInUrl=()=>{try{const t=this.projectVersionKey||rc(_t,!1,"sessionStorage"),e=this.projectVersion||rc(Tt,!1,"sessionStorage");if(t&&e){const i=new URL(document.location),o=i.searchParams;o.get(t)||(o.set(t,e),window.history.replaceState({},document.title,i.href))}}catch(t){console.warn("Error in setVersionInUrl: ",t),yc("Error in setVersionInUrl: ",t)}},this.loadPluginUI=async()=>{var t,e,i,o,n,r,s,a;try{if(!this.apiKey)return;if(!this.projectId)return;if(this.loadPlugin)return this.generateLocation(),this.setLocation(),void setTimeout((()=>{var t;if(this.usePageTitleAsLocationName){const e=document.title;(null===(t=this.location)||void 0===t?void 0:t.locationName)!==e&&(this.generateLocation(),this.setLocation({forceSetLocation:!0}))}}),4e3);if(this.toolbarEnabledApiCalled||await this.detectToolbarEnabled(),!this.toolbarEnabled)return;wt.includes(this.apiKey)&&this.listenToDocumentTitleChange();const l=dc();l&&!(null==l?void 0:l.isAnonymous)&&(this.loading=!0);try{this.customerMetadata=await this.getCustomerMetadata()}catch(t){console.warn("Error in getCustomerMetadata: ",t),yc("Error in getCustomerMetadata: ",t)}if(oc(Pt)&&(this.isPasswordValid=oc(Pt)),rc(Dt,!0)&&rc(Ut,!0)&&rc(Ft,!0)&&rc(Vt,!0)&&rc(jt,!0)?(this.guestMode="true"===rc(Dt,!0),this.allowGuestModeSignIn="true"===rc(Ut,!0),this.passwordProtected="true"===rc(Ft,!0),this.queryParamsComments="true"===rc(Vt,!0),this.usePageTitleAsLocationName="true"===rc(jt,!0)):(this.projectConfig=await kc(this.apiKey,this.projectId),this.guestMode=!!(null===(t=this.projectConfig)||void 0===t?void 0:t.guestMode)||this.guestMode,this.allowGuestModeSignIn=!!(null===(i=null===(e=this.projectConfig)||void 0===e?void 0:e.guestModeConfig)||void 0===i?void 0:i.allowSignIn),this.queryParamsComments=!!(null===(o=this.projectConfig)||void 0===o?void 0:o.queryParamsComments),this.usePageTitleAsLocationName=!!(null===(n=this.projectConfig)||void 0===n?void 0:n.usePageTitleAsLocationName),(null===(r=this.projectConfig)||void 0===r?void 0:r.guestModeConfig)||(this.allowGuestModeSignIn=!0),this.passwordProtected=!!(null===(a=null===(s=this.projectConfig)||void 0===s?void 0:s.passwordProtected)||void 0===a?void 0:a.enabled),nc(Dt,this.guestMode+"",!0),nc(Ut,this.allowGuestModeSignIn+"",!0),nc(Ft,this.passwordProtected+"",!0),nc(Vt,this.queryParamsComments+"",!0),nc(jt,this.usePageTitleAsLocationName+"",!0)),this.loadPlugin=!0,!document.querySelector(Jt.VELT_COMMENTS)){const t=document.createElement(Jt.VELT_COMMENTS);null==t||t.addEventListener("onSignIn",(()=>{this.loginWithGoogle()})),null==t||t.addEventListener("onUpgrade",(()=>{this.onUpgradePlanClick()})),t.addEventListener("onCommentAdd",(()=>{this.addCommentCount++})),t.addEventListener("onCommentUpdate",(t=>{var e,i;(null===(e=this.snippylyUser)||void 0===e?void 0:e.isGuest)&&"newlyAdded"===(null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.type)&&(this.addCommentCount>=2&&(this.showModalOnceCommentIsModeIsOff=!0),this.addCommentCount>=5&&!this.showModalOnceCommentIsModeIsOff&&(this.showModalOnceCommentIsModeIsOff=!0))})),window.document.body.appendChild(t)}if(!document.querySelector(Jt.VELT_CURSOR)){const t=document.createElement(Jt.VELT_CURSOR);window.document.body.appendChild(t)}if(!document.querySelector(Jt.VELT_HUDDLE)){const t=document.createElement(Jt.VELT_HUDDLE);window.document.body.appendChild(t)}if(!document.querySelector(Jt.VELT_RECORDER_NOTES)){const t=document.createElement(Jt.VELT_RECORDER_NOTES);window.document.body.appendChild(t)}if(!document.querySelector(Jt.VELT_RECORDER_CONTROL_PANEL)){const t=document.createElement(Jt.VELT_RECORDER_CONTROL_PANEL);window.document.body.appendChild(t)}if(!document.querySelector(Jt.VELT_ARROWS)){const t=document.createElement(Jt.VELT_ARROWS);window.document.body.appendChild(t)}try{const t=new URL(document.location),e=t.searchParams;let i=!1;e.has("wireframe")&&"true"===e.get("wireframe")&&(sessionStorage.setItem("velt-wireframe","true"),e.delete("wireframe"),i=!0),e.get("velt-version")&&(sessionStorage.setItem("velt-version",e.get("velt-version")),e.delete("velt-version"),i=!0),e.get("velt-env")&&(sessionStorage.setItem("velt-env",e.get("velt-env")),e.delete("velt-env"),i=!0),i&&window.history.replaceState({},document.title,t.href)}catch(t){}if(this.staging&&"true"===sessionStorage.getItem("velt-wireframe")){const t=document.createElement("velt-wireframe");t.innerHTML='\n <style>\n .dialog-header-container {\n padding: 12px;\n background: lightcyan;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: 8px;\n }\n\n .dialog-all-comment-container app-comment-dialog-all-comment > div {\n padding: 12px;\n background: lightpink;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: 8px;\n }\n\n .sidebar-dialog-header-container {\n padding: 12px;\n background: lightgreen;\n margin-bottom: 8px;\n border-radius: 8px;\n }\n\n .sidebar-dialog-header-block {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n </style>\n\t\t\t\t\t\t<velt-comment-pin-wireframe>\n\t\t\t\t\t\t\t<div class="custom-comment-pin-container">\n\t\t\t\t\t\t\t\t\t<div style="width: 35px; height: 35px; background-color: blue; border-radius: 12px; border-width: 3px; border-style: solid; border-color: #f00;"></div>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-unread-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div class="custom-indicator"></div>\n\t\t\t\t\t\t\t\t\t</velt-comment-pin-unread-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-private-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t\t<span>P</span>\n\t\t\t\t\t\t\t\t\t</velt-comment-pin-private-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-ghost-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t\t<span>G</span>\n\t\t\t\t\t\t\t\t\t</velt-comment-pin-ghost-comment-indicator-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-pin-index-wireframe></velt-comment-pin-index-wireframe>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-comment-pin-wireframe>\n\n\t\t\t\t\t\t<velt-comment-bubble-wireframe>\n\t\t\t\t\t\t\t<div class="custom-comment-bubble">\n\t\t\t\t\t\t\t\t<velt-comment-bubble-avatar-wireframe></velt-comment-bubble-avatar-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-bubble-comments-count-wireframe></velt-comment-bubble-comments-count-wireframe>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-comment-bubble-wireframe>\n\n\t\t\t\t\t\t<velt-text-comment-tool-wireframe>\n\t\t\t\t\t\t\t<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t\t\t\t<circle cx="50" cy="50" r="40" fill="red" />\n\t\t\t\t\t\t\t\t<rect x="5" y="5" width="90" height="90" fill="blue" fill-opacity="0.5" />\n\t\t\t\t\t\t\t\t<polygon points="50,5 95,95 5,95" fill="yellow" fill-opacity="0.7" />\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</velt-text-comment-tool-wireframe>\n\n\t\t\t\t\t\t<velt-text-comment-toolbar-wireframe>\n\t\t\t\t\t\t\t<div style="background-color:violet; display: flex; gap: 8px; border-radius: 12px; padding: 8px; align-items: center;">\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-generic-wireframe><p>GPT</p></velt-text-comment-toolbar-generic-wireframe>\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-seperator-wireframe><p>Seperator</p></velt-text-comment-toolbar-seperator-wireframe>\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-comment-annotation-wireframe><p>Comment</p></velt-text-comment-toolbar-comment-annotation-wireframe>\n\t\t\t\t\t\t\t\t<velt-text-comment-toolbar-copywriter-wireframe><p>Copywriter</p></velt-text-comment-toolbar-copywriter-wireframe>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-text-comment-toolbar-wireframe>\n\t\t\t\t\t\t<velt-comment-sidebar-wireframe>\n\t\t\t\t\t\t\t<div style="background-color:lightblue; width: 100%; height: 100%;">\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-header-wireframe>\n\t\t\t\t\t\t\t\t\t<div>Custom Header</div>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-close-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div style="color:#0d6efd;">Custom Close Button</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-close-button-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-search-wireframe></velt-comment-sidebar-search-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-status-wireframe></velt-comment-sidebar-status-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div style="color:#0d6efd;">Custom Filter Button</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-button-wireframe>\n\t\t\t\t\t\t\t\t</velt-comment-sidebar-header-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-wireframe>\n\t\t\t\t\t\t\t\t\t<div>Custom Filter</div>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-title-wireframe></velt-comment-sidebar-filter-title-wireframe>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-close-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div>Custom CLose filter</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-close-button-wireframe>\n\n\t\t\t\t\t\t\t\t\t<div style="background-color: yellow">\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-location-wireframe></velt-comment-sidebar-filter-location-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-people-wireframe></velt-comment-sidebar-filter-people-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-category-wireframe></velt-comment-sidebar-filter-category-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-priority-wireframe></velt-comment-sidebar-filter-priority-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-comment-type-wireframe></velt-comment-sidebar-filter-comment-type-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-versions-wireframe></velt-comment-sidebar-filter-versions-wireframe>\n\t\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-group-by-wireframe></velt-comment-sidebar-filter-group-by-wireframe>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<velt-comment-sidebar-filter-done-button-wireframe>\n\t\t\t\t\t\t\t\t\t\t<div>Custom Done Button</div>\n\t\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-done-button-wireframe>\n\t\t\t\t\t\t\t\t</velt-comment-sidebar-filter-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-list-wireframe></velt-comment-sidebar-list-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-empty-placeholder-wireframe>\n\t\t\t\t\t\t\t\t\t<div>Empty Placeholder</div>\n\t\t\t\t\t\t\t\t</velt-comment-sidebar-empty-placeholder-wireframe>\n\t\t\t\t\t\t\t\t<velt-comment-sidebar-page-mode-wireframe></velt-comment-sidebar-page-mode-wireframe>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</velt-comment-sidebar-wireframe>\n <velt-comment-dialog-wireframe variant="dialog">\n <div class="dialog-all-comment-container">\n <velt-comment-dialog-all-comment-wireframe></velt-comment-dialog-all-comment-wireframe>\n </div>\n <div class="dialog-body-container">\n <velt-comment-dialog-body-wireframe></velt-comment-dialog-body-wireframe>\n </div>\n <div class="dialog-composer-container">\n <velt-comment-dialog-composer-wireframe></velt-comment-dialog-composer-wireframe>\n </div>\n <div class="dialog-header-container">\n <velt-comment-dialog-header-wireframe></velt-comment-dialog-header-wireframe>\n </div>\n </velt-comment-dialog-wireframe>\n <velt-comment-dialog-wireframe variant="sidebar">\n <div class="sidebar-dialog-header-container">\n <velt-comment-dialog-header-wireframe>\n <div class="sidebar-dialog-header-block">\n <velt-comment-dialog-comment-count-wireframe></velt-comment-dialog-comment-count-wireframe>\n <velt-comment-dialog-status-wireframe></velt-comment-dialog-status-wireframe>\n <div style="flex-grow: 1"></div>\n <velt-comment-dialog-comment-category-wireframe></velt-comment-dialog-comment-category-wireframe>\n <velt-comment-dialog-priority-wireframe></velt-comment-dialog-priority-wireframe>\n </div>\n </velt-comment-dialog-header-wireframe>\n </div>\n <div class="sidebar-dialog-body-container">\n <velt-comment-dialog-body-wireframe></velt-comment-dialog-body-wireframe>\n </div>\n <div class="sidebar-dialog-composer-container">\n <velt-comment-dialog-composer-wireframe></velt-comment-dialog-composer-wireframe>\n </div>\n </velt-comment-dialog-wireframe>\n ',window.document.body.appendChild(t)}this.initializeSnippyly()}catch(t){this.loading=!1,console.warn("Error in loadPluginUI: ",t),yc("Error in loadPluginUI: ",t)}},this.listenToDocumentTitleChange=()=>{try{this.documentTitleChangeInterval||(this.documentTitleChangeInterval=setInterval((()=>{var t,e,i;const o="true"===sessionStorage.getItem("debugDocumentTitleChange");if(o&&(console.log("*** listenToDocumentTitleChange ***"),console.log("usePageTitleAsLocationName: ",this.usePageTitleAsLocationName)),this.usePageTitleAsLocationName){const n=document.title;o&&(console.log("location name: ",null===(t=this.location)||void 0===t?void 0:t.locationName),console.log("title: ",n),console.log("changed: ",(null===(e=this.location)||void 0===e?void 0:e.locationName)!==n)),(null===(i=this.location)||void 0===i?void 0:i.locationName)!==n&&(o&&console.log("%c triggering location update!","color: green; font-weight: bold;"),this.generateLocation(),this.setLocation({forceSetLocation:!0}))}}),2e3))}catch(t){yc("Error in listenToDocumentTitleChange: ",t)}},this.initializeSnippyly=async()=>{var t,e,o,n,r,s,a,l,c,d,h,u,p,v,m,f,g,w,b,y,C,x,E,k,S,M,_,T;try{let I=this.staging?mt:ft;this.staging||gt.includes(this.apiKey)||(I="latest"),this.veltVersion&&(I=this.veltVersion);let N=this.staging,O=!1;if((null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("velt-version"))&&(I=sessionStorage.getItem("velt-version")),null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("velt-env")){"staging"===sessionStorage.getItem("velt-env")&&(N=!1,O=!0)}if(await i(this.apiKey,{options:{develop:N,staging:O,version:I,velt:!0,proxyDomain:"https://cdn.velt.dev"}}),!window.Velt)return;if(this.autoTranslation&&(null===Velt||void 0===Velt?void 0:Velt.enableAutoTranslation)&&(null===Velt||void 0===Velt||Velt.enableAutoTranslation()),!document.querySelector(Jt.VELT_COMMENTS_SIDEBAR)){const t=document.createElement(Jt.VELT_COMMENTS_SIDEBAR);t.setAttribute(Yt.ENABLE_URL_NAVIGATION,"true"),t.setAttribute(Yt.CURRENT_LOCATION_SUFFIX,"true"),window.document.body.appendChild(t)}if(Velt){null===Velt||void 0===Velt||Velt.sf(!0);try{window.dispatchEvent(new CustomEvent("onVeltLoad",{detail:{Velt}})),(null===window||void 0===window?void 0:window.onSnippylyLoad)&&(null===window||void 0===window||window.onSnippylyLoad(Velt))}catch(t){}document.body.style.setProperty("--velt-default-font-family","'Poppins', sans-serif"),(()=>{try{if(!document.getElementById("superflowFontLink3")){const t=document.createElement("link");t.rel="stylesheet",t.href="https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/fonts%2Fpoppins%2Fpoppins.css?alt=media&token=5f31a0f2-5f67-4974-bf56-78ae655f2b68",t.id="superflowFontLink3",document.head.appendChild(t)}}catch(t){console.warn("Error in loadPoppinsFont: ",t),yc("Error in loadPoppinsFont: ",t)}})()}if(Velt&&wc({sdkVersion:null===Velt||void 0===Velt?void 0:Velt.version,sdkType:"client"}),this.generateDocumentId(),(null===Velt||void 0===Velt?void 0:Velt.on)&&"function"==typeof(null===Velt||void 0===Velt?void 0:Velt.on)?Velt.on("userUpdate").subscribe((async t=>{t&&await this.setDocumentAndLocation()})):await this.setDocumentAndLocation(),setTimeout((()=>{var t;if(this.usePageTitleAsLocationName){const e=document.title;(null===(t=this.location)||void 0===t?void 0:t.locationName)!==e&&(this.generateLocation(),this.setLocation({forceSetLocation:!0}))}}),4e3),this.commentElement=null===Velt||void 0===Velt?void 0:Velt.getCommentElement(),this.contactElement=null===Velt||void 0===Velt?void 0:Velt.getContactElement(),this.rewriterElement=null===Velt||void 0===Velt?void 0:Velt.getRewriterElement(),this.presenceElement=null===Velt||void 0===Velt?void 0:Velt.getPresenceElement(),this.commentElement){this.commentElement.enableTextComments(!0),this.customLoginEnabledLocally||this.commentElement.enableSignInButton(!0),this.commentElement.enableAttachments(!0),(null===(t=this.commentElement)||void 0===t?void 0:t.showScreenSizeInfo)&&this.commentElement.showScreenSizeInfo(!0),(null===(e=this.commentElement)||void 0===e?void 0:e.enableDeviceInfo)&&this.commentElement.enableDeviceInfo(!0),this.commentElement.enableCommentIndex(!0),this.commentElement.onCommentModeChange&&this.commentElement.onCommentModeChange().subscribe((t=>{this.addCommentMode=t,this.addCommentMode||this.showModalOnceCommentIsModeIsOff&&(this.addCommentCount>=2&&!rc(zt)&&(this.allowGuestModeSignIn?this.openGuestModeSignInModal():this.openGuestModeNameModel(),nc(zt,"true"),this.showModalOnceCommentIsModeIsOff=!1),this.addCommentCount>=5&&!this.showGuestModeSignInModal&&!rc(Ht,!1,"sessionStorage")&&(this.showGuestModeSignInBanner(),nc(Ht,"true",!1,"sessionStorage"),this.showModalOnceCommentIsModeIsOff=!1))})),(null===(o=this.commentElement)||void 0===o?void 0:o.enableOrphanComments)&&this.commentElement.enableOrphanComments(),(null===(n=this.commentElement)||void 0===n?void 0:n.enablePersistentCommentMode)&&this.commentElement.enablePersistentCommentMode(),(null===(r=this.commentElement)||void 0===r?void 0:r.enableGhostComments)&&this.commentElement.enableGhostComments();const i=null===window||void 0===window?void 0:window.SUPERFLOW_CUSTOM_STATUSES;i&&"object"==typeof i&&(null===(s=this.commentElement)||void 0===s?void 0:s.setCustomStatus)&&this.commentElement.setCustomStatus(i),(null===(a=this.commentElement)||void 0===a?void 0:a.enableMinimap)&&this.commentElement.enableMinimap(),(null===(l=this.commentElement)||void 0===l?void 0:l.setDStrategy)&&(null===(c=this.commentElement)||void 0===c||c.setDStrategy("dynamicId")),(null===(d=this.commentElement)||void 0===d?void 0:d.enableSidebarButtonOnCommentDialog)&&this.commentElement.enableSidebarButtonOnCommentDialog(),(null===(h=this.commentElement)||void 0===h?void 0:h.enableHotkey)&&this.commentElement.enableHotkey(),(null===(u=this.commentElement)||void 0===u?void 0:u.enableDeviceIndicatorOnCommentPins)&&this.commentElement.enableDeviceIndicatorOnCommentPins(),(null===(m=null===(v=null===(p=this.customerMetadata)||void 0===p?void 0:p.superflow)||void 0===v?void 0:v.advancedFeatures)||void 0===m?void 0:m.takeScreenshotOnComments)?this.commentElement.enableScreenshot&&this.commentElement.enableScreenshot():this.commentElement.disableScreenshot&&this.commentElement.disableScreenshot(),(null===(w=null===(g=null===(f=this.customerMetadata)||void 0===f?void 0:f.superflow)||void 0===g?void 0:g.advancedFeatures)||void 0===w?void 0:w.hasCustomStatus)&&this.setCustomStatuses()}this.selectionElement=Velt.getSelectionElement(),this.selectionElement&&this.selectionElement.enableLiveSelection(!0),this.rewriterElement&&(null===(b=this.rewriterElement)||void 0===b||b.enableRewriter()),this.presenceElement&&(null===(y=this.presenceElement)||void 0===y?void 0:y.enableFlockMode)&&(null===(C=this.presenceElement)||void 0===C||C.enableFlockMode(!0)),(null===Velt||void 0===Velt?void 0:Velt.getDocElement)&&(this.docElement=Velt.getDocElement()),null===(S=(null===(x=this.docElement)||void 0===x?void 0:x.getDocumentMetadata)?null===(E=this.docElement)||void 0===E?void 0:E.getDocumentMetadata():null===(k=null===Velt||void 0===Velt?void 0:Velt.docService)||void 0===k?void 0:k.getDocumentMetadata$())||void 0===S||S.subscribe((t=>{var e,i;const o=(null===(e=null==t?void 0:t.superflow)||void 0===e?void 0:e.versions)?Object.values(null===(i=null==t?void 0:t.superflow)||void 0===i?void 0:i.versions):[],n=new URL(document.location).searchParams.get("version");if(n){const t=o.find((t=>t.id===n));t&&(this.version={id:t.id,name:t.versionName||t.id},this.setLocation())}})),(null===Velt||void 0===Velt?void 0:Velt.getViewsElement)&&(this.viewsElement=Velt.getViewsElement()),(null===(M=this.viewsElement)||void 0===M?void 0:M.getUniqueViewsByUser)&&(null===(T=null===(_=this.viewsElement)||void 0===_?void 0:_.getUniqueViewsByUser())||void 0===T||T.subscribe((t=>{this.totalViews=t}))),this.identifySnippyly()}catch(t){this.loading=!1,console.warn("Error in initializeSnippyly: ",t),yc("Error in initializeSnippyly: ",t)}},this.generateDocumentId=()=>{try{this.documentId=tc(ic(window.location.origin))+"",this.projectId&&(this.documentId=this.projectId+""),this.serverDocumentId=(t=this.documentId+"")?`${tc(t)}`:void 0}catch(t){console.warn("Error in generateDocumentId: ",t),yc("Error in generateDocumentId: ",t)}var t},this.setDocumentAndLocation=async()=>{try{this.generateDocumentId(),this.previousLocation=null,await(null===Velt||void 0===Velt?void 0:Velt.setDocumentId(this.documentId+"")),wc({documentId:this.serverDocumentId,clientDocumentId:this.documentId}),this.generateLocation(),this.setLocation()}catch(t){console.warn("Error in setDocumentAndLocation: ",t),yc("Error in setDocumentAndLocation: ",t)}},this.checkToEnableUpgradeButton=()=>{var t,e;try{this.isPlanExpired&&this.isUserGlobalContact?(null===(t=this.commentElement)||void 0===t?void 0:t.enableUpgradeButton)&&this.commentElement.enableUpgradeButton():(null===(e=this.commentElement)||void 0===e?void 0:e.disableUpgradeButton)&&this.commentElement.disableUpgradeButton()}catch(t){console.warn("Error in checkToEnableUpgradeButton: ",t),yc("Error in checkToEnableUpgradeButton: ",t)}},this.getCustomerMetadata=async()=>{try{const t=await(async t=>{try{const e=go(vc,re,{timeout:12e5}),i=await e({eventType:"getCustomerMetadata",apiKey:t});return null==i?void 0:i.data}catch(t){return console.warn("Error in getCustomerMetadata: ",t),null}})(this.apiKey);return(t=>{try{const e=t?JSON.stringify(t):"false";nc(Gt,e)}catch(t){console.warn("Error in setCustomerMetadataToStorage: ",t),yc("Error in setCustomerMetadataToStorage: ",t)}})(t),t}catch(t){console.warn("Error in getCustomerMetadata: ",t),yc("Error in getCustomerMetadata: ",t);const e=(()=>{try{const t=rc(Gt);return t?"false"===t?JSON.parse(JSON.stringify(qt)):JSON.parse(t):null}catch(t){return console.warn("Error in getCustomerMetadataFromStorage: ",t),yc("Error in getCustomerMetadataFromStorage: ",t),null}})();if(e)return e}},this.setCustomStatuses=async()=>{var t;try{const e=await(async t=>{try{const e=go(vc,re,{timeout:12e5}),i=await e({eventType:"customStatus",subEventType:"getOrgStatuses",apiKey:t});return null==i?void 0:i.data}catch(t){return console.warn("Error in getOrgStatuses: ",t),null}})(this.apiKey);if((null==e?void 0:e.success)&&(null==e?void 0:e.data)){const i=Object.values(e.data),o=this.sortCustomStatuses(i);o.length>0&&(null===(t=this.commentElement)||void 0===t?void 0:t.setCustomStatus)&&this.commentElement.setCustomStatus(o)}}catch(t){console.warn("Error in setCustomStatuses: ",t),yc("Error in setCustomStatuses: ",t)}},this.sortCustomStatuses=t=>{try{const e=[...t].sort(((t,e)=>("number"==typeof t.order?t.order:Number.MAX_SAFE_INTEGER)-("number"==typeof e.order?e.order:Number.MAX_SAFE_INTEGER)));return e}catch(e){return console.warn("Error in sortCustomStatuses: ",e),yc("Error in sortCustomStatuses: ",e),t}},this.getSamlConfig=async()=>{try{const t=await(async t=>{var e;try{const i=go(vc,re,{timeout:12e5}),o=await i({eventType:"saml",samlEventType:"getPublicConfig",apiKey:t});return null===(e=null==o?void 0:o.data)||void 0===e?void 0:e.publicConfig}catch(t){return console.warn("Error in getSamlPublicConfig: ",t),null}})(this.apiKey);return(t=>{try{if(t){const e=JSON.stringify(t);nc(Wt,e,!0)}}catch(t){console.warn("Error in setSamlConfigToStorage: ",t),yc("Error in setSamlConfigToStorage: ",t)}})(t),t}catch(t){console.warn("Error in getSamlConfig: ",t),yc("Error in getSamlConfig: ",t);const e=(()=>{try{const t=rc(Wt,!0);return t?JSON.parse(t):null}catch(t){return console.warn("Error in getSamlConfigFromStorage: ",t),yc("Error in getSamlConfigFromStorage: ",t),null}})();if(e)return e}},this.setLogos=()=>{var t,e,i,o,n,r,s,a,l,c,d,h;try{let u="light";this.privateCommentModeEnabled&&(u="dark");const p=null===(i=null===(e=null===(t=this.customerMetadata)||void 0===t?void 0:t.superflow)||void 0===e?void 0:e.customBranding)||void 0===i?void 0:i.logoMark,v=null===(r=null===(n=null===(o=null==Xt?void 0:qt)||void 0===o?void 0:o.customBranding)||void 0===n?void 0:n.logo)||void 0===r?void 0:r.logoMark,m=null===(l=null===(a=null===(s=this.customerMetadata)||void 0===s?void 0:s.superflow)||void 0===a?void 0:a.customBranding)||void 0===l?void 0:l.wordMark,f=null===(h=null===(d=null===(c=null==Xt?void 0:qt)||void 0===c?void 0:c.customBranding)||void 0===d?void 0:d.logo)||void 0===h?void 0:h.wordMark;switch(u){case"light":this.logoMark=(null==p?void 0:p.lightUrl)||(null==p?void 0:p.darkUrl)||(null==v?void 0:v.lightUrl),this.wordMark=(null==m?void 0:m.lightUrl)||(null==m?void 0:m.darkUrl)||(null==f?void 0:f.lightUrl);break;case"dark":this.logoMark=(null==p?void 0:p.darkUrl)||(null==p?void 0:p.lightUrl)||(null==v?void 0:v.darkUrl),this.wordMark=(null==m?void 0:m.darkUrl)||(null==m?void 0:m.lightUrl)||(null==f?void 0:f.darkUrl)}}catch(t){console.warn("Error in setLogos: ",t),yc("Error in setLogos: ",t)}},this.getLogoMark=()=>{var t;try{return(null===(t=this.logoMark)||void 0===t?void 0:t.includes("<svg"))?$`
3950
3950
  ${ut(this.logoMark)}
3951
3951
  `:$`
3952
3952
  <img src=${this.logoMark} />