@snippyly/plugin-staging 1.0.48 → 1.0.50

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/snippyly.js +25 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snippyly/plugin-staging",
3
- "version": "1.0.48",
3
+ "version": "1.0.50",
4
4
  "description": "",
5
5
  "main": "snippyly.js",
6
6
  "scripts": {
package/snippyly.js CHANGED
@@ -14,7 +14,7 @@ const t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShad
14
14
  * Copyright 2017 Google LLC
15
15
  * SPDX-License-Identifier: BSD-3-Clause
16
16
  */
17
- var u;v.finalized=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:v}),(null!==(r=globalThis.reactiveElementVersions)&&void 0!==r?r:globalThis.reactiveElementVersions=[]).push("1.3.2");const y=globalThis.trustedTypes,g=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,m="?"+w,C=`<${m}>`,f=document,b=(t="")=>f.createComment(t),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,k=/>/g,E=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,M=/'/g,L=/"/g,A=/^(?:script|style|textarea|title)$/i,_=(t=>(i,...o)=>({_$litType$:t,strings:i,values:o}))(1),U=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),Z=new WeakMap,V=f.createTreeWalker(f,129,null,!1),B=(t,i)=>{const o=t.length-1,e=[];let s,n=2===i?"<svg>":"",r=F;for(let i=0;i<o;i++){const o=t[i];let l,a,d=-1,c=0;for(;c<o.length&&(r.lastIndex=c,a=r.exec(o),null!==a);)c=r.lastIndex,r===F?"!--"===a[1]?r=$:void 0!==a[1]?r=k:void 0!==a[2]?(A.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=E):void 0!==a[3]&&(r=E):r===E?">"===a[0]?(r=null!=s?s:F,d=-1):void 0===a[1]?d=-2:(d=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?E:'"'===a[3]?L:M):r===L||r===M?r=E:r===$||r===k?r=F:(r=E,s=void 0);const h=r===E&&t[i+1].startsWith("/>")?" ":"";n+=r===F?o+C:d>=0?(e.push(l),o.slice(0,d)+"$lit$"+o.slice(d)+w+h):o+w+(-2===d?(e.push(void 0),i):h)}const l=n+(t[o]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==g?g.createHTML(l):l,e]};class I{constructor({strings:t,_$litType$:i},o){let e;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,d]=B(t,i);if(this.el=I.createElement(a,o),V.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=V.nextNode())&&l.length<r;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(w)){const o=d[n++];if(t.push(i),void 0!==o){const t=e.getAttribute(o.toLowerCase()+"$lit$").split(w),i=/([.?@])?(.*)/.exec(o);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?z:"?"===i[1]?H:"@"===i[1]?P:D})}else l.push({type:6,index:s})}for(const i of t)e.removeAttribute(i)}if(A.test(e.tagName)){const t=e.textContent.split(w),i=t.length-1;if(i>0){e.textContent=y?y.emptyScript:"";for(let o=0;o<i;o++)e.append(t[o],b()),V.nextNode(),l.push({type:2,index:++s});e.append(t[i],b())}}}else if(8===e.nodeType)if(e.data===m)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=e.data.indexOf(w,t+1));)l.push({type:7,index:s}),t+=w.length-1}s++}}static createElement(t,i){const o=f.createElement("template");return o.innerHTML=t,o}}function O(t,i,o=t,e){var s,n,r,l;if(i===U)return i;let a=void 0!==e?null===(s=o._$Cl)||void 0===s?void 0:s[e]:o._$Cu;const d=x(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==d&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===d?a=void 0:(a=new d(t),a._$AT(t,o,e)),void 0!==e?(null!==(r=(l=o)._$Cl)&&void 0!==r?r:l._$Cl=[])[e]=a:o._$Cu=a),void 0!==a&&(i=O(t,a._$AS(t,i.values),a,e)),i}class R{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:o},parts:e}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:f).importNode(o,!0);V.currentNode=s;let n=V.nextNode(),r=0,l=0,a=e[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new T(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new K(n,this,t)),this.v.push(i),a=e[++l]}r!==(null==a?void 0:a.index)&&(n=V.nextNode(),r++)}return s}m(t){let i=0;for(const o of this.v)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}}class T{constructor(t,i,o,e){var s;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=e,this._$Cg=null===(s=null==e?void 0:e.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=O(this,t,i),x(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==U&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var i;return S(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==j&&x(this._$AH)?this._$AA.nextSibling.data=t:this.k(f.createTextNode(t)),this._$AH=t}T(t){var i;const{values:o,_$litType$:e}=t,s="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=I.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.m(o);else{const t=new R(s,this),i=t.p(this.options);t.m(o),this.k(i),this._$AH=t}}_$AC(t){let i=Z.get(t.strings);return void 0===i&&Z.set(t.strings,i=new I(t)),i}S(t){S(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let o,e=0;for(const s of t)e===i.length?i.push(o=new T(this.M(b()),this.M(b()),this,this.options)):o=i[e],o._$AI(s),e++;e<i.length&&(this._$AR(o&&o._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var o;for(null===(o=this._$AP)||void 0===o||o.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class D{constructor(t,i,o,e,s){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=s,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,o,e){const s=this.strings;let n=!1;if(void 0===s)t=O(this,t,i,0),n=!x(t)||t!==this._$AH&&t!==U,n&&(this._$AH=t);else{const e=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=O(this,e[o+r],i,r),l===U&&(l=this._$AH[r]),n||(n=!x(l)||l!==this._$AH[r]),l===j?t=j:t!==j&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!e&&this.C(t)}C(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class z extends D{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===j?void 0:t}}const N=y?y.emptyScript:"";class H extends D{constructor(){super(...arguments),this.type=4}C(t){t&&t!==j?this.element.setAttribute(this.name,N):this.element.removeAttribute(this.name)}}class P extends D{constructor(t,i,o,e,s){super(t,i,o,e,s),this.type=5}_$AI(t,i=this){var o;if((t=null!==(o=O(this,t,i,0))&&void 0!==o?o:j)===U)return;const e=this._$AH,s=t===j&&e!==j||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==j&&(e===j||s);s&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class K{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){O(this,t)}}const J=window.litHtmlPolyfillSupport;
17
+ var u;v.finalized=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:v}),(null!==(r=globalThis.reactiveElementVersions)&&void 0!==r?r:globalThis.reactiveElementVersions=[]).push("1.3.2");const y=globalThis.trustedTypes,g=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,C="?"+w,m=`<${C}>`,f=document,b=(t="")=>f.createComment(t),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,k=/>/g,E=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,L=/'/g,M=/"/g,A=/^(?:script|style|textarea|title)$/i,_=(t=>(i,...o)=>({_$litType$:t,strings:i,values:o}))(1),U=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),Z=new WeakMap,V=f.createTreeWalker(f,129,null,!1),B=(t,i)=>{const o=t.length-1,e=[];let s,n=2===i?"<svg>":"",r=F;for(let i=0;i<o;i++){const o=t[i];let l,a,d=-1,c=0;for(;c<o.length&&(r.lastIndex=c,a=r.exec(o),null!==a);)c=r.lastIndex,r===F?"!--"===a[1]?r=$:void 0!==a[1]?r=k:void 0!==a[2]?(A.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=E):void 0!==a[3]&&(r=E):r===E?">"===a[0]?(r=null!=s?s:F,d=-1):void 0===a[1]?d=-2:(d=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?E:'"'===a[3]?M:L):r===M||r===L?r=E:r===$||r===k?r=F:(r=E,s=void 0);const h=r===E&&t[i+1].startsWith("/>")?" ":"";n+=r===F?o+m:d>=0?(e.push(l),o.slice(0,d)+"$lit$"+o.slice(d)+w+h):o+w+(-2===d?(e.push(void 0),i):h)}const l=n+(t[o]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==g?g.createHTML(l):l,e]};class I{constructor({strings:t,_$litType$:i},o){let e;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,d]=B(t,i);if(this.el=I.createElement(a,o),V.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=V.nextNode())&&l.length<r;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(w)){const o=d[n++];if(t.push(i),void 0!==o){const t=e.getAttribute(o.toLowerCase()+"$lit$").split(w),i=/([.?@])?(.*)/.exec(o);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?z:"?"===i[1]?H:"@"===i[1]?P:D})}else l.push({type:6,index:s})}for(const i of t)e.removeAttribute(i)}if(A.test(e.tagName)){const t=e.textContent.split(w),i=t.length-1;if(i>0){e.textContent=y?y.emptyScript:"";for(let o=0;o<i;o++)e.append(t[o],b()),V.nextNode(),l.push({type:2,index:++s});e.append(t[i],b())}}}else if(8===e.nodeType)if(e.data===C)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=e.data.indexOf(w,t+1));)l.push({type:7,index:s}),t+=w.length-1}s++}}static createElement(t,i){const o=f.createElement("template");return o.innerHTML=t,o}}function O(t,i,o=t,e){var s,n,r,l;if(i===U)return i;let a=void 0!==e?null===(s=o._$Cl)||void 0===s?void 0:s[e]:o._$Cu;const d=x(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==d&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===d?a=void 0:(a=new d(t),a._$AT(t,o,e)),void 0!==e?(null!==(r=(l=o)._$Cl)&&void 0!==r?r:l._$Cl=[])[e]=a:o._$Cu=a),void 0!==a&&(i=O(t,a._$AS(t,i.values),a,e)),i}class R{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:o},parts:e}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:f).importNode(o,!0);V.currentNode=s;let n=V.nextNode(),r=0,l=0,a=e[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new T(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new K(n,this,t)),this.v.push(i),a=e[++l]}r!==(null==a?void 0:a.index)&&(n=V.nextNode(),r++)}return s}m(t){let i=0;for(const o of this.v)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}}class T{constructor(t,i,o,e){var s;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=e,this._$Cg=null===(s=null==e?void 0:e.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=O(this,t,i),x(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==U&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var i;return S(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==j&&x(this._$AH)?this._$AA.nextSibling.data=t:this.k(f.createTextNode(t)),this._$AH=t}T(t){var i;const{values:o,_$litType$:e}=t,s="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=I.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.m(o);else{const t=new R(s,this),i=t.p(this.options);t.m(o),this.k(i),this._$AH=t}}_$AC(t){let i=Z.get(t.strings);return void 0===i&&Z.set(t.strings,i=new I(t)),i}S(t){S(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let o,e=0;for(const s of t)e===i.length?i.push(o=new T(this.M(b()),this.M(b()),this,this.options)):o=i[e],o._$AI(s),e++;e<i.length&&(this._$AR(o&&o._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var o;for(null===(o=this._$AP)||void 0===o||o.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class D{constructor(t,i,o,e,s){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=s,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,o,e){const s=this.strings;let n=!1;if(void 0===s)t=O(this,t,i,0),n=!x(t)||t!==this._$AH&&t!==U,n&&(this._$AH=t);else{const e=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=O(this,e[o+r],i,r),l===U&&(l=this._$AH[r]),n||(n=!x(l)||l!==this._$AH[r]),l===j?t=j:t!==j&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!e&&this.C(t)}C(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class z extends D{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===j?void 0:t}}const N=y?y.emptyScript:"";class H extends D{constructor(){super(...arguments),this.type=4}C(t){t&&t!==j?this.element.setAttribute(this.name,N):this.element.removeAttribute(this.name)}}class P extends D{constructor(t,i,o,e,s){super(t,i,o,e,s),this.type=5}_$AI(t,i=this){var o;if((t=null!==(o=O(this,t,i,0))&&void 0!==o?o:j)===U)return;const e=this._$AH,s=t===j&&e!==j||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==j&&(e===j||s);s&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class K{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){O(this,t)}}const J=window.litHtmlPolyfillSupport;
18
18
  /**
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
@@ -544,6 +544,8 @@ const et=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
544
544
 
545
545
  .toolbar-button {
546
546
  padding: 0.55em 1.28em;
547
+ white-space: nowrap;
548
+ margin: 0 8px !important;
547
549
  }
548
550
 
549
551
  @media only screen and (max-width: 620px) {
@@ -562,7 +564,7 @@ const et=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
562
564
  margin-left: 8px;
563
565
  }
564
566
  }
565
- `;var wt=function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,o):e,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,o,r):s(i,o))||r);return n>3&&r&&Object.defineProperty(i,o,r),r};let mt=class extends X{constructor(){super(),this._loadPlugin=!1,this.comments=[],this.addCommentMode=!1,this._expanded=!0,this.staging=true,this.copyLinkTooltip="Copy Link",this.invalidApiKey=!1,this.isUserGlobalContact=!1,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)}},this.removeWindowClickEventListener=()=>{try{window.removeEventListener("click",this.windowClickEventListener),this.windowClickEventListener=void 0}catch(t){console.warn("Error in removeWindowClickEventListener: ",t)}},this.setWindowEventListner=()=>{try{window.addEventListener("locationchange",(()=>{this.checkUrl()}))}catch(t){console.warn("Error in setWindowEventListner: ",t)}},this.urlChangeListener=()=>{try{const t=history.pushState;history.pushState=function(){const i=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),i};const i=history.replaceState;history.replaceState=function(){const t=i.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)}},this.checkUrl=()=>{var t;try{const i=new URL(document.location),o=i.searchParams;if(o.has("snippyly_google_token")){const e=JSON.parse(atob(o.get("snippyly_google_token"))),s={},n=(null===(t=e.providerData)||void 0===t?void 0:t.length)?e.providerData[0]:null;s.userId=e.uid,s.name=e.displayName||(null==n?void 0:n.displayName),s.email=e.email||(null==n?void 0:n.email),s.photoUrl=(null==e?void 0:e.photoURL)||(null==n?void 0:n.photoURL),s.contacts=window.SNIPPYLY_USER_CONTACTS||[],ht("snippyly-user",JSON.stringify(s),!0),o.delete("snippyly_google_token"),window.history.replaceState({},document.title,i.href)}o.has("review")?(ht("review","true",!1,"sessionStorage"),"true"!==o.get("review")&&(o.delete("review"),o.append("review","true"),window.history.replaceState({},document.title,i.href)),this.loadPluginUI()):pt("review",!1,"sessionStorage")&&(o.append("review","true"),window.history.replaceState({},document.title,i.href),this.loadPluginUI()),this.setVersionInUrl()}catch(t){console.warn("Error in checkUrl: ",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&&ht("projectVersion",this.projectVersion,!1,"sessionStorage")}}catch(t){console.warn("Error in detectVersion: ",t)}},this.setVersionInUrl=()=>{try{const t=this.projectVersionKey||pt("projectVersionKey",!1,"sessionStorage"),i=this.projectVersion||pt("projectVersion",!1,"sessionStorage");if(t&&i){const o=new URL(document.location),e=o.searchParams;e.get(t)||(e.set(t,i),window.history.replaceState({},document.title,o.href))}}catch(t){console.warn("Error in setVersionInUrl: ",t)}},this.loadPluginUI=()=>{try{if(this.loadPlugin)return this.generateLocation(),void this.setViewMode(this.viewMode);if(this.loadPlugin=!0,!document.querySelector(nt)){const t=document.createElement(nt);null==t||t.addEventListener("signIn",(()=>{this.loginWithGoogle()})),window.document.body.appendChild(t)}if(!document.querySelector(rt)){const t=document.createElement(rt);t.setAttribute(ct,"true"),window.document.body.appendChild(t)}if(!document.querySelector(st)){const t=document.createElement(st);window.document.body.appendChild(t)}if(!document.querySelector(lt)){const t=document.createElement(lt);window.document.body.appendChild(t)}if(!document.querySelector(at)){const t=document.createElement(at);window.document.body.appendChild(t)}if(!document.querySelector(dt)){const t=document.createElement(dt);window.document.body.appendChild(t)}((t="",i=!1,o)=>{if(console.log("load snippyly called"),document.getElementById("snippylyScript"))o&&o();else{const e=document.createElement("script");e.src=`https://cdn.jsdelivr.net/npm/@snippyly/sdk${i?"-staging":""}${t?"@"+t:""}/snippyly.js`,e.id="snippylyScript",e.type="module",document.body.appendChild(e),e.onload=()=>{o&&o()}}})(void 0,this.staging,(()=>{window.Snippyly&&this.initializeSnippyly()}))}catch(t){console.warn("Error in loadPluginUI: ",t)}},this.initializeSnippyly=async()=>{try{await(null===Snippyly||void 0===Snippyly?void 0:Snippyly.init(this.apiKey)),this.documentId=((t,i=0)=>{try{let o=3735928559^i,e=1103547991^i;for(let i,s=0;s<t.length;s++)i=t.charCodeAt(s),o=Math.imul(o^i,2654435761),e=Math.imul(e^i,1597334677);return o=Math.imul(o^o>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),e=Math.imul(e^e>>>16,2246822507)^Math.imul(o^o>>>13,3266489909),4294967296*(2097151&e)+(o>>>0)}catch(t){return console.warn("Error in cyrb53: ",t),0}})((t=>{let i;return i=t.includes("http")?new URL(t):new URL("http://"+t),i.hostname.replace("www.","")})(window.location.origin))+"",null===Snippyly||void 0===Snippyly||Snippyly.setDocumentId(this.documentId+""),this.generateLocation(),this.setLocation(),this.commentElement=null===Snippyly||void 0===Snippyly?void 0:Snippyly.getCommentElement(),this.commentElement&&(this.commentElement.enableTextComments(!0),this.commentElement.enableSignInButton(!0),this.commentElement.enableAttachment(!0),this.commentElement.showScreenSizeInfo(!0),this.commentElement.addCommentModeChange&&this.commentElement.addCommentModeChange().subscribe((t=>{this.addCommentMode=t}))),this.selectionElement=Snippyly.getSelectionElement(),this.selectionElement&&this.selectionElement.enableLiveSelection(!0),this.identifySnippyly()}catch(t){console.warn("Error in initializeSnippyly: ",t)}},this.generateLocation=()=>{try{const t=new URL(document.location).searchParams,i=new URL(document.location);i.searchParams.delete("review"),i.searchParams.delete("sreviewId"),i.searchParams.delete("scommentId");const o=t.get("sversion")||this.projectVersion;this.location={url:i.href,version:o}}catch(t){console.warn("Error in generateLocation: ",t)}},this.setLocation=()=>{try{window.Snippyly&&(null===Snippyly||void 0===Snippyly?void 0:Snippyly.setLocation)&&(null===Snippyly||void 0===Snippyly||Snippyly.setLocation(JSON.parse(JSON.stringify(this.location))))}catch(t){console.warn("Error in setLocation: ",t)}},this.identifySnippyly=async()=>{var t;try{this.invalidApiKey=!1;let t={name:"Anonymous User",email:"anonymous@snippyly.com",userId:"anonymous",isAnonymous:!0};if(pt("snippyly-user",!0)){const i=JSON.parse(pt("snippyly-user",!0));(null==i?void 0:i.email)&&(t=i)}t.contacts=window.SNIPPYLY_USER_CONTACTS||[],t.isAnonymous?delete t.groupId:t.groupId=Snippyly.getDocumentId()+"",await Snippyly.identify(t),(null==t?void 0:t.isAnonymous)||(this.snippylyUser=JSON.parse(JSON.stringify(t))),this.getComments(),this.checkGlobalUserContact()}catch(i){i&&"string"==typeof i&&(null===(t=null==i?void 0:i.toLowerCase())||void 0===t?void 0:t.includes("invalid"))&&(this.invalidApiKey=!0),console.warn("Error in identifySnippyly: ",i)}},this.getComments=()=>{try{this.commentElement&&(this.commentSubscription&&this.commentSubscription.unsubscribe(),this.commentSubscription=this.commentElement.getAllCommentAnnotations(this.documentId).subscribe((t=>{this.comments=t,"All"!==this.viewMode&&(this.viewMode?this.comments=t.filter((t=>{var i;return(null===(i=null==t?void 0:t.location)||void 0===i?void 0:i.view)===this.viewMode})):this.comments=this.comments.filter((t=>{var i;return!(null===(i=null==t?void 0:t.location)||void 0===i?void 0:i.view)})))})))}catch(t){console.warn("Error in getComments: ",t)}},this.checkGlobalUserContact=()=>{try{this.commentElement&&this.commentElement.isUserGlobalContact().subscribe((t=>{!this.isUserGlobalContact&&t&&this.setViewMode("All"),this.isUserGlobalContact=t,t||this.setViewMode(null)}))}catch(t){console.warn("Error in checkGlobalUserContact: ",t)}},this.toggleCommentSidebar=()=>{try{this.commentElement&&this.commentElement.toggleCommentSidebar()}catch(t){console.warn("Error in toggleCommentSidebar: ",t)}},this.toggleSnippylyPluginToolbar=()=>{try{this.expanded=!this.expanded}catch(t){console.warn("Error in toggleSnippylyPluginToolbar: ",t)}},this.loginWithGoogle=()=>{try{window.open(`https://snippyly-login-staging.web.app/?redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(t){console.warn("Error in loginWithGoogle: ",t)}},this.removeSnippyly=async()=>{try{vt("review","sessionStorage"),vt("sreviewId","sessionStorage"),vt("projectVersionKey","sessionStorage"),vt("projectVersion","sessionStorage");const t=new URL(document.location),i=t.searchParams;i.delete("sreviewId"),i.delete("review"),this.projectVersionKey&&i.delete(this.projectVersionKey),this.projectVersion=void 0,this.projectVersionKey=void 0,delete window.snippylyInitialLoadUrl,window.history.replaceState({},document.title,t.href),window.location.reload()}catch(t){console.warn("Error in removeSnippyly: ",t)}},this.signOutUser=async()=>{try{await Snippyly.signOutUser(),vt("snippyly-user"),this.snippylyUser=void 0,window.open(`https://snippyly-login-staging.web.app/?signout=true&redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(t){console.warn("Error in signOutUser: ",t)}},this.toggleMenu=(t,i)=>{try{t.stopPropagation(),this.menuOpenedId===i?this.menuOpenedId=void 0:this.menuOpenedId=i}catch(t){console.warn("Error in toggleMenu: ",t)}},this.copyLink=()=>{try{navigator.clipboard.writeText(window.location.href),this.copyLinkTooltip="Link copied!",setTimeout((()=>{this.copyLinkTooltip="Copy Link"}),2e3)}catch(t){console.warn("Error in copyLink: ",t)}},this.setViewMode=t=>{try{this.viewMode=t,t?this.location.view=t:delete this.location.view,this.setLocation(),this.getComments()}catch(t){console.warn("Error in setViewMode: ",t)}},this.setAttribute("snippyly-comment-disabled","true");try{this.expanded=!0,this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){this._loadPlugin=t,this.loadPlugin?this.classList.add("visible"):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 projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&ht("projectVersionKey",this.projectVersionKey,!1,"sessionStorage"),this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t)}}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}render(){var t,i,o,e,s,n;return this.loadPlugin?this.snippylyUser?_`
567
+ `;var wt=function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,o):e,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,o,r):s(i,o))||r);return n>3&&r&&Object.defineProperty(i,o,r),r};let Ct=class extends X{constructor(){super(),this._loadPlugin=!1,this.comments=[],this.addCommentMode=!1,this._expanded=!0,this.staging=true,this.copyLinkTooltip="Copy Link",this.invalidApiKey=!1,this.isUserGlobalContact=!1,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)}},this.removeWindowClickEventListener=()=>{try{window.removeEventListener("click",this.windowClickEventListener),this.windowClickEventListener=void 0}catch(t){console.warn("Error in removeWindowClickEventListener: ",t)}},this.setWindowEventListner=()=>{try{window.addEventListener("locationchange",(()=>{this.checkUrl()}))}catch(t){console.warn("Error in setWindowEventListner: ",t)}},this.urlChangeListener=()=>{try{const t=history.pushState;history.pushState=function(){const i=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),i};const i=history.replaceState;history.replaceState=function(){const t=i.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)}},this.checkUrl=()=>{var t;try{const i=new URL(document.location),o=i.searchParams;if(o.has("snippyly_google_token")){const e=JSON.parse(atob(o.get("snippyly_google_token"))),s={},n=(null===(t=e.providerData)||void 0===t?void 0:t.length)?e.providerData[0]:null;s.userId=e.uid,s.name=e.displayName||(null==n?void 0:n.displayName),s.email=e.email||(null==n?void 0:n.email),s.photoUrl=(null==e?void 0:e.photoURL)||(null==n?void 0:n.photoURL),s.contacts=window.SNIPPYLY_USER_CONTACTS||[],ht("snippyly-user",JSON.stringify(s),!0),o.delete("snippyly_google_token"),window.history.replaceState({},document.title,i.href)}o.has("review")?(ht("review","true",!1,"sessionStorage"),"true"!==o.get("review")&&(o.delete("review"),o.append("review","true"),window.history.replaceState({},document.title,i.href)),this.loadPluginUI()):pt("review",!1,"sessionStorage")&&(o.append("review","true"),window.history.replaceState({},document.title,i.href),this.loadPluginUI()),this.setVersionInUrl()}catch(t){console.warn("Error in checkUrl: ",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&&ht("projectVersion",this.projectVersion,!1,"sessionStorage")}}catch(t){console.warn("Error in detectVersion: ",t)}},this.setVersionInUrl=()=>{try{const t=this.projectVersionKey||pt("projectVersionKey",!1,"sessionStorage"),i=this.projectVersion||pt("projectVersion",!1,"sessionStorage");if(t&&i){const o=new URL(document.location),e=o.searchParams;e.get(t)||(e.set(t,i),window.history.replaceState({},document.title,o.href))}}catch(t){console.warn("Error in setVersionInUrl: ",t)}},this.loadPluginUI=()=>{try{if(this.loadPlugin)return this.generateLocation(),void this.setViewMode(this.viewMode);if(this.loadPlugin=!0,!document.querySelector(nt)){const t=document.createElement(nt);null==t||t.addEventListener("signIn",(()=>{this.loginWithGoogle()})),window.document.body.appendChild(t)}if(!document.querySelector(rt)){const t=document.createElement(rt);t.setAttribute(ct,"true"),window.document.body.appendChild(t)}if(!document.querySelector(st)){const t=document.createElement(st);window.document.body.appendChild(t)}if(!document.querySelector(lt)){const t=document.createElement(lt);window.document.body.appendChild(t)}if(!document.querySelector(at)){const t=document.createElement(at);window.document.body.appendChild(t)}if(!document.querySelector(dt)){const t=document.createElement(dt);window.document.body.appendChild(t)}((t="",i=!1,o)=>{if(console.log("load snippyly called"),document.getElementById("snippylyScript"))o&&o();else{const e=document.createElement("script");e.src=`https://cdn.jsdelivr.net/npm/@snippyly/sdk${i?"-staging":""}${t?"@"+t:""}/snippyly.js`,e.id="snippylyScript",e.type="module",document.body.appendChild(e),e.onload=()=>{o&&o()}}})(void 0,this.staging,(()=>{window.Snippyly&&this.initializeSnippyly()}))}catch(t){console.warn("Error in loadPluginUI: ",t)}},this.initializeSnippyly=async()=>{try{await(null===Snippyly||void 0===Snippyly?void 0:Snippyly.init(this.apiKey)),this.documentId=((t,i=0)=>{try{let o=3735928559^i,e=1103547991^i;for(let i,s=0;s<t.length;s++)i=t.charCodeAt(s),o=Math.imul(o^i,2654435761),e=Math.imul(e^i,1597334677);return o=Math.imul(o^o>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),e=Math.imul(e^e>>>16,2246822507)^Math.imul(o^o>>>13,3266489909),4294967296*(2097151&e)+(o>>>0)}catch(t){return console.warn("Error in cyrb53: ",t),0}})((t=>{let i;return i=t.includes("http")?new URL(t):new URL("http://"+t),i.hostname.replace("www.","")})(window.location.origin))+"",null===Snippyly||void 0===Snippyly||Snippyly.setDocumentId(this.documentId+""),this.generateLocation(),this.setLocation(),this.commentElement=null===Snippyly||void 0===Snippyly?void 0:Snippyly.getCommentElement(),this.commentElement&&(this.commentElement.enableTextComments(!0),this.commentElement.enableSignInButton(!0),this.commentElement.enableAttachment(!0),this.commentElement.showScreenSizeInfo(!0),this.commentElement.addCommentModeChange&&this.commentElement.addCommentModeChange().subscribe((t=>{this.addCommentMode=t}))),this.selectionElement=Snippyly.getSelectionElement(),this.selectionElement&&this.selectionElement.enableLiveSelection(!0),this.identifySnippyly()}catch(t){console.warn("Error in initializeSnippyly: ",t)}},this.generateLocation=()=>{try{const t=new URL(document.location).searchParams,i=new URL(document.location);i.searchParams.delete("review"),i.searchParams.delete("sreviewId"),i.searchParams.delete("scommentId");const o=t.get("sversion")||this.projectVersion;this.location={url:i.href,version:o}}catch(t){console.warn("Error in generateLocation: ",t)}},this.setLocation=()=>{try{window.Snippyly&&(null===Snippyly||void 0===Snippyly?void 0:Snippyly.setLocation)&&(null===Snippyly||void 0===Snippyly||Snippyly.setLocation(JSON.parse(JSON.stringify(this.location))))}catch(t){console.warn("Error in setLocation: ",t)}},this.identifySnippyly=async()=>{var t;try{this.invalidApiKey=!1;let t={name:"Anonymous User",email:"anonymous@snippyly.com",userId:"anonymous",isAnonymous:!0};if(pt("snippyly-user",!0)){const i=JSON.parse(pt("snippyly-user",!0));(null==i?void 0:i.email)&&(t=i)}t.contacts=window.SNIPPYLY_USER_CONTACTS||[],t.isAnonymous?delete t.groupId:t.groupId=Snippyly.getDocumentId()+"",await Snippyly.identify(t),(null==t?void 0:t.isAnonymous)||(this.snippylyUser=JSON.parse(JSON.stringify(t))),this.getComments(),this.checkGlobalUserContact()}catch(i){i&&"string"==typeof i&&(null===(t=null==i?void 0:i.toLowerCase())||void 0===t?void 0:t.includes("invalid"))&&(this.invalidApiKey=!0),console.warn("Error in identifySnippyly: ",i)}},this.getComments=()=>{try{this.commentElement&&(this.commentSubscription&&this.commentSubscription.unsubscribe(),this.commentSubscription=this.commentElement.getAllCommentAnnotations(this.documentId).subscribe((t=>{this.comments=t,"All"!==this.viewMode&&(this.viewMode?this.comments=t.filter((t=>{var i;return(null===(i=null==t?void 0:t.location)||void 0===i?void 0:i.view)===this.viewMode})):this.comments=this.comments.filter((t=>{var i;return!(null===(i=null==t?void 0:t.location)||void 0===i?void 0:i.view)})))})))}catch(t){console.warn("Error in getComments: ",t)}},this.checkGlobalUserContact=()=>{try{this.commentElement&&this.commentElement.isUserGlobalContact().subscribe((t=>{!this.isUserGlobalContact&&t&&this.setViewMode("All"),this.isUserGlobalContact=t,t||this.setViewMode(null)}))}catch(t){console.warn("Error in checkGlobalUserContact: ",t)}},this.toggleCommentSidebar=()=>{try{this.commentElement&&this.commentElement.toggleCommentSidebar()}catch(t){console.warn("Error in toggleCommentSidebar: ",t)}},this.toggleSnippylyPluginToolbar=()=>{try{this.expanded=!this.expanded}catch(t){console.warn("Error in toggleSnippylyPluginToolbar: ",t)}},this.loginWithGoogle=()=>{try{window.open(`https://snippyly-login-staging.web.app/?redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(t){console.warn("Error in loginWithGoogle: ",t)}},this.removeSnippyly=async()=>{try{vt("review","sessionStorage"),vt("sreviewId","sessionStorage"),vt("projectVersionKey","sessionStorage"),vt("projectVersion","sessionStorage");const t=new URL(document.location),i=t.searchParams;i.delete("sreviewId"),i.delete("review"),this.projectVersionKey&&i.delete(this.projectVersionKey),this.projectVersion=void 0,this.projectVersionKey=void 0,delete window.snippylyInitialLoadUrl,window.history.replaceState({},document.title,t.href),window.location.reload()}catch(t){console.warn("Error in removeSnippyly: ",t)}},this.signOutUser=async()=>{try{await Snippyly.signOutUser(),vt("snippyly-user"),this.snippylyUser=void 0,window.open(`https://snippyly-login-staging.web.app/?signout=true&redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(t){console.warn("Error in signOutUser: ",t)}},this.toggleMenu=(t,i)=>{try{t.stopPropagation(),this.menuOpenedId===i?this.menuOpenedId=void 0:this.menuOpenedId=i}catch(t){console.warn("Error in toggleMenu: ",t)}},this.copyLink=()=>{try{navigator.clipboard.writeText(window.location.href),this.copyLinkTooltip="Link copied!",setTimeout((()=>{this.copyLinkTooltip="Copy Link"}),2e3)}catch(t){console.warn("Error in copyLink: ",t)}},this.setViewMode=t=>{try{this.viewMode=t,t?this.location.view=t:delete this.location.view,this.setLocation(),this.getComments()}catch(t){console.warn("Error in setViewMode: ",t)}},this.setAttribute("snippyly-comment-disabled","true");try{this.expanded=!0,this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){this._loadPlugin=t,this.loadPlugin?this.classList.add("visible"):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 projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&ht("projectVersionKey",this.projectVersionKey,!1,"sessionStorage"),this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t)}}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}render(){var t,i,o,e,s,n,r;return this.loadPlugin?this.snippylyUser?_`
566
568
  <div class="snippyly-plugin-container">
567
569
  <div class="toolbar ${et({expanded:this.expanded})}">
568
570
 
@@ -665,7 +667,7 @@ const et=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
665
667
  <path fill-rule="evenodd" clip-rule="evenodd"
666
668
  d="M13.7608 2.03888C17.6888 2.64595 20.7153 5.3481 21.7503 9.17223C22.0832 10.4028 22.0832 12.5981 21.7503 13.8287C20.8136 17.2897 18.3047 19.7986 14.8437 20.7353C14.1546 20.9217 13.6783 20.9695 12.5154 20.9685C10.9367 20.9672 10.1823 20.8254 8.84963 20.2792L8.13643 19.9869L5.93697 20.5342C3.8786 21.0464 3.71866 21.071 3.44436 20.917C2.90064 20.6118 2.90443 20.3818 3.49147 18.0353L4.03021 15.8823L3.73728 15.1677C3.19053 13.8336 3.04867 13.0796 3.04737 11.5005C3.0464 10.3376 3.09415 9.86128 3.28063 9.17223C4.21127 5.73361 6.73701 3.1939 10.1308 2.28405C10.9298 2.06985 13.0392 1.92745 13.7608 2.03888ZM10.2233 4.05664C8.94525 4.46912 8.01905 5.04056 7.0373 6.02231C5.57907 7.48054 4.85364 9.09914 4.75174 11.1214C4.68947 12.3572 4.85884 13.3544 5.31582 14.4435C5.47381 14.8201 5.65855 15.2624 5.72624 15.4266C5.82922 15.6761 5.78471 15.9865 5.45432 17.3204C5.23688 18.1979 5.06827 18.9251 5.07953 18.9364C5.09079 18.9476 5.81796 18.779 6.69553 18.5616C8.02944 18.2312 8.3398 18.1867 8.5893 18.2897C8.75347 18.3573 9.19583 18.5421 9.57235 18.7001C10.6615 19.1571 11.6587 19.3264 12.8945 19.2642C14.9168 19.1623 16.5354 18.4368 17.9936 16.9786C18.968 16.0042 19.5361 15.0878 19.9685 13.7926C20.2112 13.0656 20.2457 12.7805 20.2457 11.5005C20.2457 10.2204 20.2112 9.93535 19.9685 9.20829C19.5361 7.91315 18.968 6.9967 17.9936 6.02231C16.3414 4.37025 14.566 3.66777 12.2447 3.74769C11.3595 3.77823 10.8403 3.8575 10.2233 4.05664Z" />
667
669
  </svg>
668
- <p class="action-text">${null===(t=this.comments)||void 0===t?void 0:t.length}</p>
670
+ <p class="action-text">${null===(i=this.comments)||void 0===i?void 0:i.length}</p>
669
671
  </div>
670
672
  ${this.isUserGlobalContact?_`
671
673
  <snippyly-menu class="d-sm-none">
@@ -693,12 +695,12 @@ const et=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
693
695
  </div>
694
696
 
695
697
  <!-- divider -->
696
- <div class="toolbar-section">
698
+ <div class="toolbar-section ${et({"d-none":!this.expanded})}">
697
699
  <div class="toolbar-divider"></div>
698
700
  </div>
699
701
 
700
702
  <!-- actions 2 -->
701
- <div class="toolbar-section">
703
+ <div class="toolbar-section ${et({"d-none":!this.expanded})}">
702
704
  <div class="toolbar-actions2">
703
705
  <div class="action tooltip d-sm-none" @click=${()=>this.copyLink()}>
704
706
  <div class="tooltiptext">Copy Link</div>
@@ -711,13 +713,13 @@ const et=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
711
713
 
712
714
  </div>
713
715
  <div class="action">
714
- ${(null===(i=this.snippylyUser)||void 0===i?void 0:i.photoUrl)?_`<img class="toolbar-img profile-img" src=${null===(o=this.snippylyUser)||void 0===o?void 0:o.photoUrl} referrerpolicy="no-referrer" title=${null===(e=this.snippylyUser)||void 0===e?void 0:e.name} />`:_`<div class="profile-initial"><span>${(null===(n=null===(s=this.snippylyUser)||void 0===s?void 0:s.name)||void 0===n?void 0:n.charAt(0))||"-"}</span></div>`}
716
+ ${(null===(o=this.snippylyUser)||void 0===o?void 0:o.photoUrl)?_`<img class="toolbar-img profile-img" src=${null===(e=this.snippylyUser)||void 0===e?void 0:e.photoUrl} referrerpolicy="no-referrer" title=${null===(s=this.snippylyUser)||void 0===s?void 0:s.name} />`:_`<div class="profile-initial"><span>${(null===(r=null===(n=this.snippylyUser)||void 0===n?void 0:n.name)||void 0===r?void 0:r.charAt(0))||"-"}</span></div>`}
715
717
  </div>
716
718
  </div>
717
719
  </div>
718
720
 
719
721
  <!-- context menu icon -->
720
- <div class="toolbar-section">
722
+ <div class="toolbar-section ${et({"d-none":!this.expanded})}">
721
723
  <snippyly-menu>
722
724
  <div menu-trigger class="toolbar-section">
723
725
  <svg class="toolbar-icon" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -764,6 +766,21 @@ const et=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
764
766
  <div class="toolbar-section">
765
767
  <div class="toolbar-divider"></div>
766
768
  </div>
769
+ <div class="toolbar-section comment-viewmode-section ${et({"d-none":!this.expanded})}">
770
+ <div class="toolbar-actions1">
771
+ <div class="action-border tooltip" @click=${()=>this.toggleCommentSidebar()}>
772
+ <div class="tooltiptext">All Comments</div>
773
+ <svg class="toolbar-icon-border" viewBox="0 0 24 24" fill="none"
774
+ xmlns="http://www.w3.org/2000/svg">
775
+ <path fill-rule="evenodd" clip-rule="evenodd"
776
+ d="M13.7608 2.03888C17.6888 2.64595 20.7153 5.3481 21.7503 9.17223C22.0832 10.4028 22.0832 12.5981 21.7503 13.8287C20.8136 17.2897 18.3047 19.7986 14.8437 20.7353C14.1546 20.9217 13.6783 20.9695 12.5154 20.9685C10.9367 20.9672 10.1823 20.8254 8.84963 20.2792L8.13643 19.9869L5.93697 20.5342C3.8786 21.0464 3.71866 21.071 3.44436 20.917C2.90064 20.6118 2.90443 20.3818 3.49147 18.0353L4.03021 15.8823L3.73728 15.1677C3.19053 13.8336 3.04867 13.0796 3.04737 11.5005C3.0464 10.3376 3.09415 9.86128 3.28063 9.17223C4.21127 5.73361 6.73701 3.1939 10.1308 2.28405C10.9298 2.06985 13.0392 1.92745 13.7608 2.03888ZM10.2233 4.05664C8.94525 4.46912 8.01905 5.04056 7.0373 6.02231C5.57907 7.48054 4.85364 9.09914 4.75174 11.1214C4.68947 12.3572 4.85884 13.3544 5.31582 14.4435C5.47381 14.8201 5.65855 15.2624 5.72624 15.4266C5.82922 15.6761 5.78471 15.9865 5.45432 17.3204C5.23688 18.1979 5.06827 18.9251 5.07953 18.9364C5.09079 18.9476 5.81796 18.779 6.69553 18.5616C8.02944 18.2312 8.3398 18.1867 8.5893 18.2897C8.75347 18.3573 9.19583 18.5421 9.57235 18.7001C10.6615 19.1571 11.6587 19.3264 12.8945 19.2642C14.9168 19.1623 16.5354 18.4368 17.9936 16.9786C18.968 16.0042 19.5361 15.0878 19.9685 13.7926C20.2112 13.0656 20.2457 12.7805 20.2457 11.5005C20.2457 10.2204 20.2112 9.93535 19.9685 9.20829C19.5361 7.91315 18.968 6.9967 17.9936 6.02231C16.3414 4.37025 14.566 3.66777 12.2447 3.74769C11.3595 3.77823 10.8403 3.8575 10.2233 4.05664Z" />
777
+ </svg>
778
+ <p class="action-text">${null===(t=this.comments)||void 0===t?void 0:t.length}</p>
779
+ </div>
780
+ </div>
781
+ <div class="toolbar-section">
782
+ <div class="toolbar-divider"></div>
783
+ </div>
767
784
  <div class="toolbar-section" @click=${()=>this.loginWithGoogle()}>
768
785
  <a class="toolbar-button " href="#">
769
786
  Sign in
@@ -787,4 +804,4 @@ const et=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
787
804
  </div>
788
805
  </div>
789
806
  </div>
790
- `:_``}};mt.styles=[yt,gt],wt([tt()],mt.prototype,"loadPlugin",null),wt([tt()],mt.prototype,"comments",void 0),wt([tt()],mt.prototype,"commentElement",void 0),wt([tt()],mt.prototype,"commentSubscription",void 0),wt([tt()],mt.prototype,"selectionElement",void 0),wt([tt()],mt.prototype,"addCommentMode",void 0),wt([tt()],mt.prototype,"_expanded",void 0),wt([tt()],mt.prototype,"snippylyUser",void 0),wt([Y()],mt.prototype,"apiKey",void 0),wt([tt()],mt.prototype,"staging",void 0),wt([Y()],mt.prototype,"projectVersionKey",null),wt([tt()],mt.prototype,"projectVersion",void 0),wt([tt()],mt.prototype,"_menuOpenedId",void 0),wt([tt()],mt.prototype,"copyLinkTooltip",void 0),wt([tt()],mt.prototype,"invalidApiKey",void 0),wt([tt()],mt.prototype,"documentId",void 0),wt([tt()],mt.prototype,"isUserGlobalContact",void 0),wt([tt()],mt.prototype,"location",void 0),wt([tt()],mt.prototype,"viewMode",void 0),mt=wt([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:o,elements:e}=i;return{kind:o,elements:e,finisher(i){window.customElements.define(t,i)}}})(t,i))("snippyly-plugin")],mt);export{mt as SnippylyPlugin};
807
+ `:_``}};Ct.styles=[yt,gt],wt([tt()],Ct.prototype,"loadPlugin",null),wt([tt()],Ct.prototype,"comments",void 0),wt([tt()],Ct.prototype,"commentElement",void 0),wt([tt()],Ct.prototype,"commentSubscription",void 0),wt([tt()],Ct.prototype,"selectionElement",void 0),wt([tt()],Ct.prototype,"addCommentMode",void 0),wt([tt()],Ct.prototype,"_expanded",void 0),wt([tt()],Ct.prototype,"snippylyUser",void 0),wt([Y()],Ct.prototype,"apiKey",void 0),wt([tt()],Ct.prototype,"staging",void 0),wt([Y()],Ct.prototype,"projectVersionKey",null),wt([tt()],Ct.prototype,"projectVersion",void 0),wt([tt()],Ct.prototype,"_menuOpenedId",void 0),wt([tt()],Ct.prototype,"copyLinkTooltip",void 0),wt([tt()],Ct.prototype,"invalidApiKey",void 0),wt([tt()],Ct.prototype,"documentId",void 0),wt([tt()],Ct.prototype,"isUserGlobalContact",void 0),wt([tt()],Ct.prototype,"location",void 0),wt([tt()],Ct.prototype,"viewMode",void 0),Ct=wt([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:o,elements:e}=i;return{kind:o,elements:e,finisher(i){window.customElements.define(t,i)}}})(t,i))("snippyly-plugin")],Ct);export{Ct as SnippylyPlugin};