@snippyly/plugin-staging 1.0.665 → 1.0.667
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 +1 -1
- package/snippyly.js +1 -1
- package/snippyly.min.js +1 -1
package/package.json
CHANGED
package/snippyly.js
CHANGED
|
@@ -2664,7 +2664,7 @@ class ca extends Jn{}ca.Encryptor=class extends ca{processBlock(t,e){const i=t,o
|
|
|
2664
2664
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.52861 3.52858C3.78896 3.26823 4.21107 3.26823 4.47141 3.52858L8.00001 7.05717L11.5286 3.52858C11.789 3.26823 12.2111 3.26823 12.4714 3.52858C12.7318 3.78892 12.7318 4.21103 12.4714 4.47138L8.94282 7.99998L12.4714 11.5286C12.7318 11.7889 12.7318 12.211 12.4714 12.4714C12.2111 12.7317 11.789 12.7317 11.5286 12.4714L8.00001 8.94279L4.47141 12.4714C4.21107 12.7317 3.78896 12.7317 3.52861 12.4714C3.26826 12.211 3.26826 11.7889 3.52861 11.5286L7.0572 7.99998L3.52861 4.47138C3.26826 4.21103 3.26826 3.78892 3.52861 3.52858Z" fill="#FAFBFF"/>
|
|
2665
2665
|
</svg>
|
|
2666
2666
|
</div>
|
|
2667
|
-
`:L``}catch(t){return console.warn("Error in disableAddCommentModeButton: ",t),Pa("Error in disableAddCommentModeButton: ",t),L``}},this.addStyles=()=>{var t,e;try{const i=document.createElement("style");i.textContent=Ha.cssText,null===(t=this.shadowRoot)||void 0===t||t.appendChild(i);const o=document.createElement("style");o.textContent=Ga.cssText,null===(e=this.shadowRoot)||void 0===e||e.appendChild(o)}catch(t){console.warn("Error in addStyles: ",t),Pa("Error in addStyles: ",t)}},this.checkToolbarPosition=()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".snippyly-plugin-container");e&&requestAnimationFrame((()=>{var t;const{x:i}=e.getBoundingClientRect();if(i>=0)return;const o=e.style.transform,[n,r]=(null===(t=o.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/))||void 0===t?void 0:t.slice(1))||[],s=parseInt(n)-i;e.style.transform=`translate(${s||0}px, ${r||0}px)`}))},this._dragX=0,this._dragY=0,this._isDragging=!1,this._startX=0,this._startY=0,this.mouseMove=t=>{var e;if(this._isDragging){let i,o;const n=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(n){if(i=t.clientX-this._startX,o=t.clientY-this._startY,i>20||o>40)return;if(window.innerWidth-n.getBoundingClientRect().width-Math.abs(i)<20)return;if(window.innerHeight-n.getBoundingClientRect().height-Math.abs(o)<n.getBoundingClientRect().height)return;n.style.transform=`translate(${i}px, ${o}px)`}}},this.mouseDown=t=>{var e;const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(i){this._isDragging=!0;const e=window.getComputedStyle(i),o=new WebKitCSSMatrix(e.transform);this._startX=t.clientX-o.m41,this._startY=t.clientY-o.m42}},this.mouseUp=t=>{t&&(this._isDragging=!1)},this.mouseLeave=t=>{t&&(this._isDragging=!1)},this.guestUserNameUpdated=!!Sa(Rt);const t=new URL(document.location);t.searchParams.has(bt)&&t.searchParams.delete(bt),this.signInUrl=`${qt}/signin?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,this.signOutUrl=`${qt}/signout?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,window.Superflow={enableCustomLogin:async()=>{this.customLoginEnabledLocally=!0,ka(Ct),await this.checkCustomLoginEnabled()},identify:async t=>{this.providedUser=t,this.customLoginEnabled&&this.loginWithCustomUser()},signInUrl:this.signInUrl,signOutUrl:this.signOutUrl,openGuestModeSignInModal:t=>{this.skipGuestNameModal=t,this.openGuestModeSignInModal()},onPasswordProtectedModalOpenButtonClick:()=>{this.onPasswordProtectedModalOpenButtonClick()}};try{this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t),Pa("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){var e,i,o,n,r,s,a,l,c,d;this._loadPlugin=t,this.loadPlugin?(this.classList.add("visible"),null===(i=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.style)||void 0===i||i.setProperty("transform","none","important"),null===(r=null===(n=null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===n?void 0:n.style)||void 0===r||r.setProperty("transform","none","important"),null===(a=null===(s=null===document||void 0===document?void 0:document.body)||void 0===s?void 0:s.style)||void 0===a||a.setProperty("perspective","none","important"),null===(d=null===(c=null===(l=null===document||void 0===document?void 0:document.body)||void 0===l?void 0:l.parentElement)||void 0===c?void 0:c.style)||void 0===d||d.setProperty("perspective","none","important")):this.classList.remove("visible")}get expanded(){return this._expanded}set expanded(t){this._expanded=t,this.expanded?this.classList.add("expanded"):this.classList.remove("expanded")}get isPlanExpired(){return this._isPlanExpired}set isPlanExpired(t){this._isPlanExpired=t,this.checkToEnableUpgradeButton()}get apiKey(){return this._apiKey}set apiKey(t){this._apiKey=t,this.onApiKeyChange(),$a({apiKey:this.apiKey}),this.checkUrl()}get projectId(){return this._projectId}set projectId(t){this._projectId=t,this.checkUrl()}get projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&Ea(Et,this.projectVersionKey,!1,"sessionStorage"),this.exitReviewModeCalled||this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t),Pa("Error in set projectVersionKey: ",t)}}get autoLocation(){return this._autoLocation}set autoLocation(t){this._autoLocation="true"===t||!0===t}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}get isUserGlobalContact(){return this._isUserGlobalContact}set isUserGlobalContact(t){this._isUserGlobalContact=t,this.checkToEnableUpgradeButton()}get privateCommentModeEnabled(){return this._privateCommentModeEnabled}set privateCommentModeEnabled(t){this._privateCommentModeEnabled=t,this.darkMode=!!this.privateCommentModeEnabled}get customerMetadata(){return this._customerMetadata}set customerMetadata(t){this._customerMetadata=t,this.setLogos()}get documentMetadata(){return this._documentMetadata}set documentMetadata(t){this._documentMetadata=t}get darkMode(){return this._darkMode}set darkMode(t){this._darkMode=t,this.setLogos()}get queryParamsComments(){return this._queryParamsComments}set queryParamsComments(t){this._queryParamsComments=t,this.setQueryParamsCommentsInSdk()}get usePageTitleAsLocationName(){return this._usePageTitleAsLocationName}set usePageTitleAsLocationName(t){this._usePageTitleAsLocationName=t}get totalViews(){return this._totalViews}set totalViews(t){this._totalViews=t,this.totalViewsCount=Object.keys(this.totalViews||{}).length}connectedCallback(){super.connectedCallback(),this.getAttribute("apiKey")&&!this.getAttribute("projectId")&&(this.projectId=ya(Ca(window.location.origin))+""),this.expanded=!0,this.setAttribute("data-velt-comment-disabled","true"),this.style.zIndex="2147483647",setTimeout((()=>{if(!this.superflowToolbarMoved){this.superflowToolbarMoved=!0,document.body.appendChild(this);const t=document.querySelector(".cdk-overlay-container");t&&document.body.appendChild(t)}}),5e3);const t=document.createElement("style");t.innerHTML='body[data-velt-ongoing-recording="screen"] superflow-toolbar { display: none !important; }',document.head.appendChild(t),this.addStyles(),setTimeout((()=>{const t=document.querySelectorAll('script[src*="snippyly.min.js"]');(null==t?void 0:t.length)>1&&(console.warn("Multiple superflow scripts installed."),Ra(ht.Events.DUPLICATE_SCRIPT_INSTALLED))}),1e3)}async detectToolbarEnabled(){try{if(this.projectId&&this.apiKey){this.toolbarEnabledApiCalled=!0;const t=document.location.toString();t.includes(Ht)||t.includes(Bt)?this.toolbarEnabled=!0:this.toolbarEnabled=await(async(t,e,i)=>{var o;try{const n=yo(La,ce,{timeout:12e5}),r=await n({apiKey:t,projectId:e,url:i});return null===(o=null==r?void 0:r.data)||void 0===o?void 0:o.data}catch(t){return console.warn("Error in checkToolbarEnabled: ",t),null}})(this.apiKey,this.projectId,t),this.toolbarEnabled||Ra(ht.Events.TOOLBAR_DISABLED)}}catch(t){console.warn("Error in detectToolbarEnabled: ",t),Pa("Error in detectToolbarEnabled: ",t)}}render(){var t,e,i,o,n,r,s,a,l,c,d,h,u,p,v,m,g,f;return this.loadPlugin&&this.toolbarEnabled?!this.snippylyUser||this.loading||null===this.isPlanExpired?L`
|
|
2667
|
+
`:L``}catch(t){return console.warn("Error in disableAddCommentModeButton: ",t),Pa("Error in disableAddCommentModeButton: ",t),L``}},this.addStyles=()=>{var t,e;try{const i=document.createElement("style");i.textContent=Ha.cssText,null===(t=this.shadowRoot)||void 0===t||t.appendChild(i);const o=document.createElement("style");o.textContent=Ga.cssText,null===(e=this.shadowRoot)||void 0===e||e.appendChild(o)}catch(t){console.warn("Error in addStyles: ",t),Pa("Error in addStyles: ",t)}},this.checkToolbarPosition=()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".snippyly-plugin-container");e&&requestAnimationFrame((()=>{var t;const{x:i}=e.getBoundingClientRect();if(i>=0)return;const o=e.style.transform,[n,r]=(null===(t=o.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/))||void 0===t?void 0:t.slice(1))||[],s=parseInt(n)-i;e.style.transform=`translate(${s||0}px, ${r||0}px)`}))},this._dragX=0,this._dragY=0,this._isDragging=!1,this._startX=0,this._startY=0,this.mouseMove=t=>{var e;if(t.stopPropagation(),this._isDragging){let i,o;const n=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(n){if(i=t.clientX-this._startX,o=t.clientY-this._startY,i>20||o>40)return;if(window.innerWidth-n.getBoundingClientRect().width-Math.abs(i)<20)return;if(window.innerHeight-n.getBoundingClientRect().height-Math.abs(o)<n.getBoundingClientRect().height)return;n.style.transform=`translate(${i}px, ${o}px)`}}},this.mouseDown=t=>{var e;const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(i){this._isDragging=!0;const e=window.getComputedStyle(i),o=new WebKitCSSMatrix(e.transform);this._startX=t.clientX-o.m41,this._startY=t.clientY-o.m42}},this.mouseUp=t=>{t&&(this._isDragging=!1)},this.mouseLeave=t=>{t&&(this._isDragging=!1)},this.guestUserNameUpdated=!!Sa(Rt);const t=new URL(document.location);t.searchParams.has(bt)&&t.searchParams.delete(bt),this.signInUrl=`${qt}/signin?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,this.signOutUrl=`${qt}/signout?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,window.Superflow={enableCustomLogin:async()=>{this.customLoginEnabledLocally=!0,ka(Ct),await this.checkCustomLoginEnabled()},identify:async t=>{this.providedUser=t,this.customLoginEnabled&&this.loginWithCustomUser()},signInUrl:this.signInUrl,signOutUrl:this.signOutUrl,openGuestModeSignInModal:t=>{this.skipGuestNameModal=t,this.openGuestModeSignInModal()},onPasswordProtectedModalOpenButtonClick:()=>{this.onPasswordProtectedModalOpenButtonClick()}};try{this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t),Pa("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){var e,i,o,n,r,s,a,l,c,d;this._loadPlugin=t,this.loadPlugin?(this.classList.add("visible"),null===(i=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.style)||void 0===i||i.setProperty("transform","none","important"),null===(r=null===(n=null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===n?void 0:n.style)||void 0===r||r.setProperty("transform","none","important"),null===(a=null===(s=null===document||void 0===document?void 0:document.body)||void 0===s?void 0:s.style)||void 0===a||a.setProperty("perspective","none","important"),null===(d=null===(c=null===(l=null===document||void 0===document?void 0:document.body)||void 0===l?void 0:l.parentElement)||void 0===c?void 0:c.style)||void 0===d||d.setProperty("perspective","none","important")):this.classList.remove("visible")}get expanded(){return this._expanded}set expanded(t){this._expanded=t,this.expanded?this.classList.add("expanded"):this.classList.remove("expanded")}get isPlanExpired(){return this._isPlanExpired}set isPlanExpired(t){this._isPlanExpired=t,this.checkToEnableUpgradeButton()}get apiKey(){return this._apiKey}set apiKey(t){this._apiKey=t,this.onApiKeyChange(),$a({apiKey:this.apiKey}),this.checkUrl()}get projectId(){return this._projectId}set projectId(t){this._projectId=t,this.checkUrl()}get projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&Ea(Et,this.projectVersionKey,!1,"sessionStorage"),this.exitReviewModeCalled||this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t),Pa("Error in set projectVersionKey: ",t)}}get autoLocation(){return this._autoLocation}set autoLocation(t){this._autoLocation="true"===t||!0===t}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}get isUserGlobalContact(){return this._isUserGlobalContact}set isUserGlobalContact(t){this._isUserGlobalContact=t,this.checkToEnableUpgradeButton()}get privateCommentModeEnabled(){return this._privateCommentModeEnabled}set privateCommentModeEnabled(t){this._privateCommentModeEnabled=t,this.darkMode=!!this.privateCommentModeEnabled}get customerMetadata(){return this._customerMetadata}set customerMetadata(t){this._customerMetadata=t,this.setLogos()}get documentMetadata(){return this._documentMetadata}set documentMetadata(t){this._documentMetadata=t}get darkMode(){return this._darkMode}set darkMode(t){this._darkMode=t,this.setLogos()}get queryParamsComments(){return this._queryParamsComments}set queryParamsComments(t){this._queryParamsComments=t,this.setQueryParamsCommentsInSdk()}get usePageTitleAsLocationName(){return this._usePageTitleAsLocationName}set usePageTitleAsLocationName(t){this._usePageTitleAsLocationName=t}get totalViews(){return this._totalViews}set totalViews(t){this._totalViews=t,this.totalViewsCount=Object.keys(this.totalViews||{}).length}connectedCallback(){super.connectedCallback(),this.getAttribute("apiKey")&&!this.getAttribute("projectId")&&(this.projectId=ya(Ca(window.location.origin))+""),this.expanded=!0,this.setAttribute("data-velt-comment-disabled","true"),this.style.zIndex="2147483647",setTimeout((()=>{if(!this.superflowToolbarMoved){this.superflowToolbarMoved=!0,document.body.appendChild(this);const t=document.querySelector(".cdk-overlay-container");t&&document.body.appendChild(t)}}),5e3);const t=document.createElement("style");t.innerHTML='body[data-velt-ongoing-recording="screen"] superflow-toolbar { display: none !important; }',document.head.appendChild(t),this.addStyles(),setTimeout((()=>{const t=document.querySelectorAll('script[src*="snippyly.min.js"]');(null==t?void 0:t.length)>1&&(console.warn("Multiple superflow scripts installed."),Ra(ht.Events.DUPLICATE_SCRIPT_INSTALLED))}),1e3)}async detectToolbarEnabled(){try{if(this.projectId&&this.apiKey){this.toolbarEnabledApiCalled=!0;const t=document.location.toString();t.includes(Ht)||t.includes(Bt)?this.toolbarEnabled=!0:this.toolbarEnabled=await(async(t,e,i)=>{var o;try{const n=yo(La,ce,{timeout:12e5}),r=await n({apiKey:t,projectId:e,url:i});return null===(o=null==r?void 0:r.data)||void 0===o?void 0:o.data}catch(t){return console.warn("Error in checkToolbarEnabled: ",t),null}})(this.apiKey,this.projectId,t),this.toolbarEnabled||Ra(ht.Events.TOOLBAR_DISABLED)}}catch(t){console.warn("Error in detectToolbarEnabled: ",t),Pa("Error in detectToolbarEnabled: ",t)}}render(){var t,e,i,o,n,r,s,a,l,c,d,h,u,p,v,m,g,f;return this.loadPlugin&&this.toolbarEnabled?!this.snippylyUser||this.loading||null===this.isPlanExpired?L`
|
|
2668
2668
|
<div class="snippyly-plugin-container" part="superflow-toolbar-container">
|
|
2669
2669
|
<div class="toolbar" id="smallToolbar"
|
|
2670
2670
|
style="cursor: default; top: ${this._dragY}px; left: ${this._dragX}px;">
|
package/snippyly.min.js
CHANGED
|
@@ -2664,7 +2664,7 @@ class da extends Yn{}da.Encryptor=class extends da{processBlock(t,e){const i=t,o
|
|
|
2664
2664
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.52861 3.52858C3.78896 3.26823 4.21107 3.26823 4.47141 3.52858L8.00001 7.05717L11.5286 3.52858C11.789 3.26823 12.2111 3.26823 12.4714 3.52858C12.7318 3.78892 12.7318 4.21103 12.4714 4.47138L8.94282 7.99998L12.4714 11.5286C12.7318 11.7889 12.7318 12.211 12.4714 12.4714C12.2111 12.7317 11.789 12.7317 11.5286 12.4714L8.00001 8.94279L4.47141 12.4714C4.21107 12.7317 3.78896 12.7317 3.52861 12.4714C3.26826 12.211 3.26826 11.7889 3.52861 11.5286L7.0572 7.99998L3.52861 4.47138C3.26826 4.21103 3.26826 3.78892 3.52861 3.52858Z" fill="#FAFBFF"/>
|
|
2665
2665
|
</svg>
|
|
2666
2666
|
</div>
|
|
2667
|
-
`:D``}catch(t){return console.warn("Error in disableAddCommentModeButton: ",t),Ra("Error in disableAddCommentModeButton: ",t),D``}},this.addStyles=()=>{var t,e;try{const i=document.createElement("style");i.textContent=Ga.cssText,null===(t=this.shadowRoot)||void 0===t||t.appendChild(i);const o=document.createElement("style");o.textContent=Za.cssText,null===(e=this.shadowRoot)||void 0===e||e.appendChild(o)}catch(t){console.warn("Error in addStyles: ",t),Ra("Error in addStyles: ",t)}},this.checkToolbarPosition=()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".snippyly-plugin-container");e&&requestAnimationFrame((()=>{var t;const{x:i}=e.getBoundingClientRect();if(i>=0)return;const o=e.style.transform,[n,r]=(null===(t=o.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/))||void 0===t?void 0:t.slice(1))||[],s=parseInt(n)-i;e.style.transform=`translate(${s||0}px, ${r||0}px)`}))},this._dragX=0,this._dragY=0,this._isDragging=!1,this._startX=0,this._startY=0,this.mouseMove=t=>{var e;if(this._isDragging){let i,o;const n=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(n){if(i=t.clientX-this._startX,o=t.clientY-this._startY,i>20||o>40)return;if(window.innerWidth-n.getBoundingClientRect().width-Math.abs(i)<20)return;if(window.innerHeight-n.getBoundingClientRect().height-Math.abs(o)<n.getBoundingClientRect().height)return;n.style.transform=`translate(${i}px, ${o}px)`}}},this.mouseDown=t=>{var e;const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(i){this._isDragging=!0;const e=window.getComputedStyle(i),o=new WebKitCSSMatrix(e.transform);this._startX=t.clientX-o.m41,this._startY=t.clientY-o.m42}},this.mouseUp=t=>{t&&(this._isDragging=!1)},this.mouseLeave=t=>{t&&(this._isDragging=!1)},this.guestUserNameUpdated=!!ka(Vt);const t=new URL(document.location);t.searchParams.has(Ct)&&t.searchParams.delete(Ct),this.signInUrl=`${Qt}/signin?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,this.signOutUrl=`${Qt}/signout?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,window.Superflow={enableCustomLogin:async()=>{this.customLoginEnabledLocally=!0,Ma(xt),await this.checkCustomLoginEnabled()},identify:async t=>{this.providedUser=t,this.customLoginEnabled&&this.loginWithCustomUser()},signInUrl:this.signInUrl,signOutUrl:this.signOutUrl,openGuestModeSignInModal:t=>{this.skipGuestNameModal=t,this.openGuestModeSignInModal()},onPasswordProtectedModalOpenButtonClick:()=>{this.onPasswordProtectedModalOpenButtonClick()}};try{this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t),Ra("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){var e,i,o,n,r,s,a,l,c,d;this._loadPlugin=t,this.loadPlugin?(this.classList.add("visible"),null===(i=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.style)||void 0===i||i.setProperty("transform","none","important"),null===(r=null===(n=null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===n?void 0:n.style)||void 0===r||r.setProperty("transform","none","important"),null===(a=null===(s=null===document||void 0===document?void 0:document.body)||void 0===s?void 0:s.style)||void 0===a||a.setProperty("perspective","none","important"),null===(d=null===(c=null===(l=null===document||void 0===document?void 0:document.body)||void 0===l?void 0:l.parentElement)||void 0===c?void 0:c.style)||void 0===d||d.setProperty("perspective","none","important")):this.classList.remove("visible")}get expanded(){return this._expanded}set expanded(t){this._expanded=t,this.expanded?this.classList.add("expanded"):this.classList.remove("expanded")}get isPlanExpired(){return this._isPlanExpired}set isPlanExpired(t){this._isPlanExpired=t,this.checkToEnableUpgradeButton()}get apiKey(){return this._apiKey}set apiKey(t){this._apiKey=t,this.onApiKeyChange(),ja({apiKey:this.apiKey}),this.checkUrl()}get projectId(){return this._projectId}set projectId(t){this._projectId=t,this.checkUrl()}get projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&Sa(St,this.projectVersionKey,!1,"sessionStorage"),this.exitReviewModeCalled||this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t),Ra("Error in set projectVersionKey: ",t)}}get autoLocation(){return this._autoLocation}set autoLocation(t){this._autoLocation="true"===t||!0===t}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}get isUserGlobalContact(){return this._isUserGlobalContact}set isUserGlobalContact(t){this._isUserGlobalContact=t,this.checkToEnableUpgradeButton()}get privateCommentModeEnabled(){return this._privateCommentModeEnabled}set privateCommentModeEnabled(t){this._privateCommentModeEnabled=t,this.darkMode=!!this.privateCommentModeEnabled}get customerMetadata(){return this._customerMetadata}set customerMetadata(t){this._customerMetadata=t,this.setLogos()}get documentMetadata(){return this._documentMetadata}set documentMetadata(t){this._documentMetadata=t}get darkMode(){return this._darkMode}set darkMode(t){this._darkMode=t,this.setLogos()}get queryParamsComments(){return this._queryParamsComments}set queryParamsComments(t){this._queryParamsComments=t,this.setQueryParamsCommentsInSdk()}get usePageTitleAsLocationName(){return this._usePageTitleAsLocationName}set usePageTitleAsLocationName(t){this._usePageTitleAsLocationName=t}get totalViews(){return this._totalViews}set totalViews(t){this._totalViews=t,this.totalViewsCount=Object.keys(this.totalViews||{}).length}connectedCallback(){super.connectedCallback(),this.getAttribute("apiKey")&&!this.getAttribute("projectId")&&(this.projectId=ba(xa(window.location.origin))+""),this.expanded=!0,this.setAttribute("data-velt-comment-disabled","true"),this.style.zIndex="2147483647",setTimeout((()=>{if(!this.superflowToolbarMoved){this.superflowToolbarMoved=!0,document.body.appendChild(this);const t=document.querySelector(".cdk-overlay-container");t&&document.body.appendChild(t)}}),5e3);const t=document.createElement("style");t.innerHTML='body[data-velt-ongoing-recording="screen"] superflow-toolbar { display: none !important; }',document.head.appendChild(t),this.addStyles(),setTimeout((()=>{const t=document.querySelectorAll('script[src*="snippyly.min.js"]');(null==t?void 0:t.length)>1&&(console.warn("Multiple superflow scripts installed."),Va(ut.Events.DUPLICATE_SCRIPT_INSTALLED))}),1e3)}async detectToolbarEnabled(){try{if(this.projectId&&this.apiKey){this.toolbarEnabledApiCalled=!0;const t=document.location.toString();t.includes(Gt)||t.includes(Ht)?this.toolbarEnabled=!0:this.toolbarEnabled=await(async(t,e,i)=>{var o;try{const n=bo(Da,de,{timeout:12e5}),r=await n({apiKey:t,projectId:e,url:i});return null===(o=null==r?void 0:r.data)||void 0===o?void 0:o.data}catch(t){return console.warn("Error in checkToolbarEnabled: ",t),null}})(this.apiKey,this.projectId,t),this.toolbarEnabled||Va(ut.Events.TOOLBAR_DISABLED)}}catch(t){console.warn("Error in detectToolbarEnabled: ",t),Ra("Error in detectToolbarEnabled: ",t)}}render(){var t,e,i,o,n,r,s,a,l,c,d,h,u,p,v,m,g,f;return this.loadPlugin&&this.toolbarEnabled?!this.snippylyUser||this.loading||null===this.isPlanExpired?D`
|
|
2667
|
+
`:D``}catch(t){return console.warn("Error in disableAddCommentModeButton: ",t),Ra("Error in disableAddCommentModeButton: ",t),D``}},this.addStyles=()=>{var t,e;try{const i=document.createElement("style");i.textContent=Ga.cssText,null===(t=this.shadowRoot)||void 0===t||t.appendChild(i);const o=document.createElement("style");o.textContent=Za.cssText,null===(e=this.shadowRoot)||void 0===e||e.appendChild(o)}catch(t){console.warn("Error in addStyles: ",t),Ra("Error in addStyles: ",t)}},this.checkToolbarPosition=()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".snippyly-plugin-container");e&&requestAnimationFrame((()=>{var t;const{x:i}=e.getBoundingClientRect();if(i>=0)return;const o=e.style.transform,[n,r]=(null===(t=o.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/))||void 0===t?void 0:t.slice(1))||[],s=parseInt(n)-i;e.style.transform=`translate(${s||0}px, ${r||0}px)`}))},this._dragX=0,this._dragY=0,this._isDragging=!1,this._startX=0,this._startY=0,this.mouseMove=t=>{var e;if(t.stopPropagation(),this._isDragging){let i,o;const n=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(n){if(i=t.clientX-this._startX,o=t.clientY-this._startY,i>20||o>40)return;if(window.innerWidth-n.getBoundingClientRect().width-Math.abs(i)<20)return;if(window.innerHeight-n.getBoundingClientRect().height-Math.abs(o)<n.getBoundingClientRect().height)return;n.style.transform=`translate(${i}px, ${o}px)`}}},this.mouseDown=t=>{var e;const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(i){this._isDragging=!0;const e=window.getComputedStyle(i),o=new WebKitCSSMatrix(e.transform);this._startX=t.clientX-o.m41,this._startY=t.clientY-o.m42}},this.mouseUp=t=>{t&&(this._isDragging=!1)},this.mouseLeave=t=>{t&&(this._isDragging=!1)},this.guestUserNameUpdated=!!ka(Vt);const t=new URL(document.location);t.searchParams.has(Ct)&&t.searchParams.delete(Ct),this.signInUrl=`${Qt}/signin?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,this.signOutUrl=`${Qt}/signout?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,window.Superflow={enableCustomLogin:async()=>{this.customLoginEnabledLocally=!0,Ma(xt),await this.checkCustomLoginEnabled()},identify:async t=>{this.providedUser=t,this.customLoginEnabled&&this.loginWithCustomUser()},signInUrl:this.signInUrl,signOutUrl:this.signOutUrl,openGuestModeSignInModal:t=>{this.skipGuestNameModal=t,this.openGuestModeSignInModal()},onPasswordProtectedModalOpenButtonClick:()=>{this.onPasswordProtectedModalOpenButtonClick()}};try{this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t),Ra("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){var e,i,o,n,r,s,a,l,c,d;this._loadPlugin=t,this.loadPlugin?(this.classList.add("visible"),null===(i=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.style)||void 0===i||i.setProperty("transform","none","important"),null===(r=null===(n=null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===n?void 0:n.style)||void 0===r||r.setProperty("transform","none","important"),null===(a=null===(s=null===document||void 0===document?void 0:document.body)||void 0===s?void 0:s.style)||void 0===a||a.setProperty("perspective","none","important"),null===(d=null===(c=null===(l=null===document||void 0===document?void 0:document.body)||void 0===l?void 0:l.parentElement)||void 0===c?void 0:c.style)||void 0===d||d.setProperty("perspective","none","important")):this.classList.remove("visible")}get expanded(){return this._expanded}set expanded(t){this._expanded=t,this.expanded?this.classList.add("expanded"):this.classList.remove("expanded")}get isPlanExpired(){return this._isPlanExpired}set isPlanExpired(t){this._isPlanExpired=t,this.checkToEnableUpgradeButton()}get apiKey(){return this._apiKey}set apiKey(t){this._apiKey=t,this.onApiKeyChange(),ja({apiKey:this.apiKey}),this.checkUrl()}get projectId(){return this._projectId}set projectId(t){this._projectId=t,this.checkUrl()}get projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&Sa(St,this.projectVersionKey,!1,"sessionStorage"),this.exitReviewModeCalled||this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t),Ra("Error in set projectVersionKey: ",t)}}get autoLocation(){return this._autoLocation}set autoLocation(t){this._autoLocation="true"===t||!0===t}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}get isUserGlobalContact(){return this._isUserGlobalContact}set isUserGlobalContact(t){this._isUserGlobalContact=t,this.checkToEnableUpgradeButton()}get privateCommentModeEnabled(){return this._privateCommentModeEnabled}set privateCommentModeEnabled(t){this._privateCommentModeEnabled=t,this.darkMode=!!this.privateCommentModeEnabled}get customerMetadata(){return this._customerMetadata}set customerMetadata(t){this._customerMetadata=t,this.setLogos()}get documentMetadata(){return this._documentMetadata}set documentMetadata(t){this._documentMetadata=t}get darkMode(){return this._darkMode}set darkMode(t){this._darkMode=t,this.setLogos()}get queryParamsComments(){return this._queryParamsComments}set queryParamsComments(t){this._queryParamsComments=t,this.setQueryParamsCommentsInSdk()}get usePageTitleAsLocationName(){return this._usePageTitleAsLocationName}set usePageTitleAsLocationName(t){this._usePageTitleAsLocationName=t}get totalViews(){return this._totalViews}set totalViews(t){this._totalViews=t,this.totalViewsCount=Object.keys(this.totalViews||{}).length}connectedCallback(){super.connectedCallback(),this.getAttribute("apiKey")&&!this.getAttribute("projectId")&&(this.projectId=ba(xa(window.location.origin))+""),this.expanded=!0,this.setAttribute("data-velt-comment-disabled","true"),this.style.zIndex="2147483647",setTimeout((()=>{if(!this.superflowToolbarMoved){this.superflowToolbarMoved=!0,document.body.appendChild(this);const t=document.querySelector(".cdk-overlay-container");t&&document.body.appendChild(t)}}),5e3);const t=document.createElement("style");t.innerHTML='body[data-velt-ongoing-recording="screen"] superflow-toolbar { display: none !important; }',document.head.appendChild(t),this.addStyles(),setTimeout((()=>{const t=document.querySelectorAll('script[src*="snippyly.min.js"]');(null==t?void 0:t.length)>1&&(console.warn("Multiple superflow scripts installed."),Va(ut.Events.DUPLICATE_SCRIPT_INSTALLED))}),1e3)}async detectToolbarEnabled(){try{if(this.projectId&&this.apiKey){this.toolbarEnabledApiCalled=!0;const t=document.location.toString();t.includes(Gt)||t.includes(Ht)?this.toolbarEnabled=!0:this.toolbarEnabled=await(async(t,e,i)=>{var o;try{const n=bo(Da,de,{timeout:12e5}),r=await n({apiKey:t,projectId:e,url:i});return null===(o=null==r?void 0:r.data)||void 0===o?void 0:o.data}catch(t){return console.warn("Error in checkToolbarEnabled: ",t),null}})(this.apiKey,this.projectId,t),this.toolbarEnabled||Va(ut.Events.TOOLBAR_DISABLED)}}catch(t){console.warn("Error in detectToolbarEnabled: ",t),Ra("Error in detectToolbarEnabled: ",t)}}render(){var t,e,i,o,n,r,s,a,l,c,d,h,u,p,v,m,g,f;return this.loadPlugin&&this.toolbarEnabled?!this.snippylyUser||this.loading||null===this.isPlanExpired?D`
|
|
2668
2668
|
<div class="snippyly-plugin-container" part="superflow-toolbar-container">
|
|
2669
2669
|
<div class="toolbar" id="smallToolbar"
|
|
2670
2670
|
style="cursor: default; top: ${this._dragY}px; left: ${this._dragX}px;">
|