@fluid-topics/ft-resizer 1.1.0 → 1.1.2
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/build/ft-resizer.min.js +28 -24
- package/package.json +4 -4
package/build/ft-resizer.min.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* subject to an additional IP rights grant found at
|
|
13
13
|
* http://polymer.github.io/PATENTS.txt
|
|
14
14
|
*/
|
|
15
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,o=window.customElements.define,e=window.customElements.get,r=window.customElements,i=new WeakMap,a=new WeakMap,n=new WeakMap,s=new WeakMap;let c;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,i){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(i))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=i.prototype.attributeChangedCallback,c=new Set(i.observedAttributes||[]);p(i,c,s);const l={elementClass:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:i.formAssociated,formAssociatedCallback:i.prototype.formAssociatedCallback,formDisabledCallback:i.prototype.formDisabledCallback,formResetCallback:i.prototype.formResetCallback,formStateRestoreCallback:i.prototype.formStateRestoreCallback,observedAttributes:c};this._definitionsByTag.set(t,l),this._definitionsByClass.set(i,l);let f=e.call(r,t);f||(f=h(t),o.call(r,t,f)),this===window.customElements&&(n.set(i,l),l.standInClass=f);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)a.delete(t),y(t,l,!0)}const u=this._whenDefinedPromises.get(t);return void 0!==u&&(u.resolve(i),this._whenDefinedPromises.delete(t)),i}upgrade(){g.push(this),r.upgrade.apply(r,arguments),g.pop()}get(t){const o=this._definitionsByTag.get(t);return o?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const o=this._getDefinition(t);if(void 0!==o)return Promise.resolve(o.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,o,e){let r=this._awaitingUpgrade.get(o);r||this._awaitingUpgrade.set(o,r=new Set),e?r.add(t):r.delete(t)}},window.HTMLElement=function(){let o=c;if(o)return c=void 0,o;const e=n.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return o=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(o,this.constructor.prototype),i.set(o,e),o},window.HTMLElement.prototype=t.prototype;const l=t=>t===document||t instanceof ShadowRoot,f=t=>{let o=t.getRootNode();if(!l(o)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;o=t.getRootNode(),l(o)||(o=s.get(o)?.getRootNode()||document)}return o.customElements},h=o=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const r=f(e)||window.customElements,i=r._getDefinition(o);return i?y(e,i):a.set(e,r),e}connectedCallback(){const t=i.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,o,!0)}disconnectedCallback(){const t=i.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,o,!1)}adoptedCallback(){const t=i.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=i.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=i.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=i.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=i.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},p=(t,o,e)=>{if(0===o.size||void 0===e)return;const r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,i){const a=t.toLowerCase();if(o.has(a)){const t=this.getAttribute(a);r.call(this,a,i),e.call(this,a,t,i)}else r.call(this,a,i)});const i=t.prototype.removeAttribute;i&&(t.prototype.removeAttribute=function(t){const r=t.toLowerCase();if(o.has(r)){const t=this.getAttribute(r);i.call(this,r),e.call(this,r,t,null)}else i.call(this,r)});const a=t.prototype.toggleAttribute;a&&(t.prototype.toggleAttribute=function(t,r){const i=t.toLowerCase();if(o.has(i)){const t=this.getAttribute(i);a.call(this,i,r);const o=this.getAttribute(i);e.call(this,i,t,o)}else a.call(this,i,r)})},d=o=>{const e=Object.getPrototypeOf(o);if(e!==window.HTMLElement)return e===t?Object.setPrototypeOf(o,window.HTMLElement):d(e)},y=(t,o,e=!1)=>{Object.setPrototypeOf(t,o.elementClass.prototype),i.set(t,o),c=t;try{new o.elementClass}catch(t){d(o.elementClass),new o.elementClass}o.attributeChangedCallback&&o.observedAttributes.forEach((e=>{t.hasAttribute(e)&&o.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&o.connectedCallback&&t.isConnected&&o.connectedCallback.call(t)},u=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const o=u.apply(this,arguments);return t.customElements&&(o.customElements=t.customElements),o};let g=[document];const b=(t,o,e=void 0)=>{const r=(e?Object.getPrototypeOf(e):t.prototype)[o];t.prototype[o]=function(){g.push(this);const t=r.apply(e||this,arguments);return void 0!==t&&s.set(t,this),g.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,o)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,o);Object.defineProperty(t.prototype,o,{...e,set(t){g.push(this),e.set.call(this,t),g.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,o=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const r=o.call(this,...e);return t.set(r,this),r},e.forEach((o=>{const e=window.ElementInternals.prototype,r=e[o];e[o]=function(...o){const e=t.get(this);if(!0===i.get(e).formAssociated)return r?.call(this,...o);throw new DOMException(`Failed to execute ${r} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class r extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class a{constructor(t){const o=new Map;t.forEach(((t,e)=>{const r=t.getAttribute("name"),i=o.get(r)||[];this[+e]=t,i.push(t),o.set(r,i)})),this.length=t.length,o.forEach(((t,o)=>{t&&(1===t.length?this[o]=t[0]:this[o]=new r(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),o=[];for(const e of t){const t=i.get(e);t&&!0!==t.formAssociated||o.push(e)}return new a(o)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
15
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,o=window.customElements.define,e=window.customElements.get,r=window.customElements,i=new WeakMap,a=new WeakMap,n=new WeakMap,s=new WeakMap;let c;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,i){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(i))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=i.prototype.attributeChangedCallback,c=new Set(i.observedAttributes||[]);p(i,c,s);const l={elementClass:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:i.formAssociated,formAssociatedCallback:i.prototype.formAssociatedCallback,formDisabledCallback:i.prototype.formDisabledCallback,formResetCallback:i.prototype.formResetCallback,formStateRestoreCallback:i.prototype.formStateRestoreCallback,observedAttributes:c};this._definitionsByTag.set(t,l),this._definitionsByClass.set(i,l);let f=e.call(r,t);f||(f=h(t),o.call(r,t,f)),this===window.customElements&&(n.set(i,l),l.standInClass=f);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)a.delete(t),y(t,l,!0)}const u=this._whenDefinedPromises.get(t);return void 0!==u&&(u.resolve(i),this._whenDefinedPromises.delete(t)),i}upgrade(){g.push(this),r.upgrade.apply(r,arguments),g.pop()}get(t){const o=this._definitionsByTag.get(t);return o?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const o=this._getDefinition(t);if(void 0!==o)return Promise.resolve(o.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,o,e){let r=this._awaitingUpgrade.get(o);r||this._awaitingUpgrade.set(o,r=new Set),e?r.add(t):r.delete(t)}},window.HTMLElement=function(){let o=c;if(o)return c=void 0,o;const e=n.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return o=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(o,this.constructor.prototype),i.set(o,e),o},window.HTMLElement.prototype=t.prototype;const l=t=>t===document||t instanceof ShadowRoot,f=t=>{let o=t.getRootNode();if(!l(o)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;o=t.getRootNode(),l(o)||(o=s.get(o)?.getRootNode()||document)}return o.customElements},h=o=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const r=f(e)||window.customElements,i=r._getDefinition(o);return i?y(e,i):a.set(e,r),e}connectedCallback(){const t=i.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,o,!0)}disconnectedCallback(){const t=i.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,o,!1)}adoptedCallback(){const t=i.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=i.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=i.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=i.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=i.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},p=(t,o,e)=>{if(0===o.size||void 0===e)return;const r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,i){const a=t.toLowerCase();if(o.has(a)){const t=this.getAttribute(a);r.call(this,a,i),e.call(this,a,t,i)}else r.call(this,a,i)});const i=t.prototype.removeAttribute;i&&(t.prototype.removeAttribute=function(t){const r=t.toLowerCase();if(o.has(r)){const t=this.getAttribute(r);i.call(this,r),e.call(this,r,t,null)}else i.call(this,r)});const a=t.prototype.toggleAttribute;a&&(t.prototype.toggleAttribute=function(t,r){const i=t.toLowerCase();if(o.has(i)){const t=this.getAttribute(i);a.call(this,i,r);const o=this.getAttribute(i);e.call(this,i,t,o)}else a.call(this,i,r)})},d=o=>{const e=Object.getPrototypeOf(o);if(e!==window.HTMLElement)return e===t?Object.setPrototypeOf(o,window.HTMLElement):d(e)},y=(t,o,e=!1)=>{Object.setPrototypeOf(t,o.elementClass.prototype),i.set(t,o),c=t;try{new o.elementClass}catch(t){d(o.elementClass),new o.elementClass}o.attributeChangedCallback&&o.observedAttributes.forEach((e=>{t.hasAttribute(e)&&o.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&o.connectedCallback&&t.isConnected&&o.connectedCallback.call(t)},u=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const o=u.apply(this,arguments);return t.customElements&&(o.customElements=t.customElements),o};let g=[document];const b=(t,o,e=void 0)=>{const r=(e?Object.getPrototypeOf(e):t.prototype)[o];t.prototype[o]=function(){g.push(this);const t=r.apply(e||this,arguments);return void 0!==t&&s.set(t,this),g.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,o)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,o);Object.defineProperty(t.prototype,o,{...e,set(t){g.push(this),e.set.call(this,t),g.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,o=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const r=o.call(this,...e);return t.set(r,this),r},e.forEach((o=>{const e=window.ElementInternals.prototype,r=e[o];e[o]=function(...o){const e=t.get(this);if(!0===i.get(e).formAssociated)return r?.call(this,...o);throw new DOMException(`Failed to execute ${r} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class r extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class a{constructor(t){const o=new Map;t.forEach(((t,e)=>{const r=t.getAttribute("name"),i=o.get(r)||[];this[+e]=t,i.push(t),o.set(r,i)})),this.length=t.length,o.forEach(((t,o)=>{t&&(1===t.length?this[o]=t[0]:this[o]=new r(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),o=[];for(const e of t){const t=i.get(e);t&&!0!==t.formAssociated||o.push(e)}return new a(o)}})}}try{window.customElements.define("custom-element",null)}catch(Ao){const t=window.customElements.define;window.customElements.define=(o,e,r)=>{if(null!==e)try{t.bind(window.customElements)(o,e,r)}catch(t){console.info(o,e,r,t)}}}class o{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,o)=>{this.resolvePromise=t,this.rejectPromise=o}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,o;const e=[...this.callbacks];this.callbacks=[];const r=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,i=null!==(o=this.resolvePromise)&&void 0!==o?o:()=>null;this.clearPromise();for(let t of e)try{await t()}catch(t){return void r(t)}i(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2019 Google LLC
|
|
@@ -49,7 +49,7 @@ const S={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:x},w=(t=S,o,
|
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
51
|
*/
|
|
52
|
-
const I=globalThis,W=I.trustedTypes,k=W?W.createPolicy("lit-html",{createHTML:t=>t}):void 0,K="$lit$",Z=`lit$${(Math.random()+"").slice(9)}$`,$="?"+Z,A=`<${$}>`,
|
|
52
|
+
const I=globalThis,W=I.trustedTypes,k=W?W.createPolicy("lit-html",{createHTML:t=>t}):void 0,K="$lit$",Z=`lit$${(Math.random()+"").slice(9)}$`,$="?"+Z,A=`<${$}>`,F=document,M=()=>F.createComment(""),z=t=>null===t||"object"!=typeof t&&"function"!=typeof t,B=Array.isArray,D="[ \t\n\f\r]",P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,j=/>/g,H=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),T=/'/g,G=/"/g,Y=/^(?:script|style|textarea|title)$/i,J=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),q=new WeakMap,X=F.createTreeWalker(F,129);function Q(t,o){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==k?k.createHTML(o):o}let tt=class t{constructor({strings:o,_$litType$:e},r){let i;this.parts=[];let a=0,n=0;const s=o.length-1,c=this.parts,[l,f]=((t,o)=>{const e=t.length-1,r=[];let i,a=2===o?"<svg>":"",n=P;for(let o=0;o<e;o++){const e=t[o];let s,c,l=-1,f=0;for(;f<e.length&&(n.lastIndex=f,c=n.exec(e),null!==c);)f=n.lastIndex,n===P?"!--"===c[1]?n=_:void 0!==c[1]?n=j:void 0!==c[2]?(Y.test(c[2])&&(i=RegExp("</"+c[2],"g")),n=H):void 0!==c[3]&&(n=H):n===H?">"===c[0]?(n=i??P,l=-1):void 0===c[1]?l=-2:(l=n.lastIndex-c[2].length,s=c[1],n=void 0===c[3]?H:'"'===c[3]?G:T):n===G||n===T?n=H:n===_||n===j?n=P:(n=H,i=void 0);const h=n===H&&t[o+1].startsWith("/>")?" ":"";a+=n===P?e+A:l>=0?(r.push(s),e.slice(0,l)+K+e.slice(l)+Z+h):e+Z+(-2===l?o:h)}return[Q(t,a+(t[e]||"<?>")+(2===o?"</svg>":"")),r]})(o,e);if(this.el=t.createElement(l,r),X.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=X.nextNode())&&c.length<s;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(K)){const o=f[n++],e=i.getAttribute(t).split(Z),r=/([.?@])?(.*)/.exec(o);c.push({type:1,index:a,name:r[2],strings:e,ctor:"."===r[1]?it:"?"===r[1]?at:"@"===r[1]?nt:rt}),i.removeAttribute(t)}else t.startsWith(Z)&&(c.push({type:6,index:a}),i.removeAttribute(t));if(Y.test(i.tagName)){const t=i.textContent.split(Z),o=t.length-1;if(o>0){i.textContent=W?W.emptyScript:"";for(let e=0;e<o;e++)i.append(t[e],M()),X.nextNode(),c.push({type:2,index:++a});i.append(t[o],M())}}}else if(8===i.nodeType)if(i.data===$)c.push({type:2,index:a});else{let t=-1;for(;-1!==(t=i.data.indexOf(Z,t+1));)c.push({type:7,index:a}),t+=Z.length-1}a++}}static createElement(t,o){const e=F.createElement("template");return e.innerHTML=t,e}};function ot(t,o,e=t,r){if(o===J)return o;let i=void 0!==r?e._$Co?.[r]:e._$Cl;const a=z(o)?void 0:o._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),void 0===a?i=void 0:(i=new a(t),i._$AT(t,e,r)),void 0!==r?(e._$Co??=[])[r]=i:e._$Cl=i),void 0!==i&&(o=ot(t,i._$AS(t,o.values),i,r)),o}let et=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,o,e,r){this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=e,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return void 0!==o&&11===t?.nodeType&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=ot(this,t,o),z(t)?t===V||null==t||""===t?(this._$AH!==V&&this._$AR(),this._$AH=V):t!==this._$AH&&t!==J&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>B(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==V&&z(this._$AH)?this._$AA.nextSibling.data=t:this.$(F.createTextNode(t)),this._$AH=t}g(t){const{values:o,_$litType$:e}=t,r="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=tt.createElement(Q(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===r)this._$AH.p(o);else{const t=new class{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:o},parts:e}=this._$AD,r=(t?.creationScope??F).importNode(o,!0);X.currentNode=r;let i=X.nextNode(),a=0,n=0,s=e[0];for(;void 0!==s;){if(a===s.index){let o;2===s.type?o=new et(i,i.nextSibling,this,t):1===s.type?o=new s.ctor(i,s.name,s.strings,this,t):6===s.type&&(o=new st(i,this,t)),this._$AV.push(o),s=e[++n]}a!==s?.index&&(i=X.nextNode(),a++)}return X.currentNode=F,r}p(t){let o=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,o),o+=e.strings.length-2):e._$AI(t[o])),o++}}(r,this),e=t.u(this.options);t.p(o),this.$(e),this._$AH=t}}_$AC(t){let o=q.get(t.strings);return void 0===o&&q.set(t.strings,o=new tt(t)),o}T(o){B(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,i=0;for(const a of o)i===e.length?e.push(r=new t(this.k(M()),this.k(M()),this,this.options)):r=e[i],r._$AI(a),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},rt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,o,e,r,i){this.type=1,this._$AH=V,this._$AN=void 0,this.element=t,this.name=o,this._$AM=r,this.options=i,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=V}_$AI(t,o=this,e,r){const i=this.strings;let a=!1;if(void 0===i)t=ot(this,t,o,0),a=!z(t)||t!==this._$AH&&t!==J,a&&(this._$AH=t);else{const r=t;let n,s;for(t=i[0],n=0;n<i.length-1;n++)s=ot(this,r[e+n],o,n),s===J&&(s=this._$AH[n]),a||=!z(s)||s!==this._$AH[n],s===V?t=V:t!==V&&(t+=(s??"")+i[n+1]),this._$AH[n]=s}a&&!r&&this.O(t)}O(t){t===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},it=class extends rt{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===V?void 0:t}},at=class extends rt{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==V)}},nt=class extends rt{constructor(t,o,e,r,i){super(t,o,e,r,i),this.type=5}_$AI(t,o=this){if((t=ot(this,t,o,0)??V)===J)return;const e=this._$AH,r=t===V&&e!==V||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,i=t!==V&&(e===V||r);r&&this.element.removeEventListener(this.name,this,e),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},st=class{constructor(t,o,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){ot(this,t)}};const ct=I.litHtmlPolyfillSupport;ct?.(tt,et),(I.litHtmlVersions??=[]).push("3.1.0");
|
|
53
53
|
/**
|
|
54
54
|
* @license
|
|
55
55
|
* Copyright 2019 Google LLC
|
|
@@ -66,7 +66,7 @@ const lt=globalThis,ft=lt.ShadowRoot&&(void 0===lt.ShadyCSS||lt.ShadyCSS.nativeS
|
|
|
66
66
|
* Copyright 2017 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
68
|
*/
|
|
69
|
-
const kt=globalThis,Kt=kt.trustedTypes,Zt=Kt?Kt.createPolicy("lit-html",{createHTML:t=>t}):void 0,$t="$lit$",At=`lit$${(Math.random()+"").slice(9)}$`,
|
|
69
|
+
const kt=globalThis,Kt=kt.trustedTypes,Zt=Kt?Kt.createPolicy("lit-html",{createHTML:t=>t}):void 0,$t="$lit$",At=`lit$${(Math.random()+"").slice(9)}$`,Ft="?"+At,Mt=`<${Ft}>`,zt=document,Bt=()=>zt.createComment(""),Dt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Pt=Array.isArray,_t="[ \t\n\f\r]",jt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ht=/-->/g,Tt=/>/g,Gt=RegExp(`>|${_t}(?:([^\\s"'>=/]+)(${_t}*=${_t}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Yt=/'/g,Jt=/"/g,Vt=/^(?:script|style|textarea|title)$/i,qt=(t=>(o,...e)=>({_$litType$:t,strings:o,values:e}))(1),Xt=Symbol.for("lit-noChange"),Qt=Symbol.for("lit-nothing"),to=new WeakMap,oo=zt.createTreeWalker(zt,129);function eo(t,o){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Zt?Zt.createHTML(o):o}const ro=(t,o)=>{const e=t.length-1,r=[];let i,a=2===o?"<svg>":"",n=jt;for(let o=0;o<e;o++){const e=t[o];let s,c,l=-1,f=0;for(;f<e.length&&(n.lastIndex=f,c=n.exec(e),null!==c);)f=n.lastIndex,n===jt?"!--"===c[1]?n=Ht:void 0!==c[1]?n=Tt:void 0!==c[2]?(Vt.test(c[2])&&(i=RegExp("</"+c[2],"g")),n=Gt):void 0!==c[3]&&(n=Gt):n===Gt?">"===c[0]?(n=i??jt,l=-1):void 0===c[1]?l=-2:(l=n.lastIndex-c[2].length,s=c[1],n=void 0===c[3]?Gt:'"'===c[3]?Jt:Yt):n===Jt||n===Yt?n=Gt:n===Ht||n===Tt?n=jt:(n=Gt,i=void 0);const h=n===Gt&&t[o+1].startsWith("/>")?" ":"";a+=n===jt?e+Mt:l>=0?(r.push(s),e.slice(0,l)+$t+e.slice(l)+At+h):e+At+(-2===l?o:h)}return[eo(t,a+(t[e]||"<?>")+(2===o?"</svg>":"")),r]};class io{constructor({strings:t,_$litType$:o},e){let r;this.parts=[];let i=0,a=0;const n=t.length-1,s=this.parts,[c,l]=ro(t,o);if(this.el=io.createElement(c,e),oo.currentNode=this.el.content,2===o){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=oo.nextNode())&&s.length<n;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith($t)){const o=l[a++],e=r.getAttribute(t).split(At),n=/([.?@])?(.*)/.exec(o);s.push({type:1,index:i,name:n[2],strings:e,ctor:"."===n[1]?co:"?"===n[1]?lo:"@"===n[1]?fo:so}),r.removeAttribute(t)}else t.startsWith(At)&&(s.push({type:6,index:i}),r.removeAttribute(t));if(Vt.test(r.tagName)){const t=r.textContent.split(At),o=t.length-1;if(o>0){r.textContent=Kt?Kt.emptyScript:"";for(let e=0;e<o;e++)r.append(t[e],Bt()),oo.nextNode(),s.push({type:2,index:++i});r.append(t[o],Bt())}}}else if(8===r.nodeType)if(r.data===Ft)s.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(At,t+1));)s.push({type:7,index:i}),t+=At.length-1}i++}}static createElement(t,o){const e=zt.createElement("template");return e.innerHTML=t,e}}function ao(t,o,e=t,r){if(o===Xt)return o;let i=void 0!==r?e._$Co?.[r]:e._$Cl;const a=Dt(o)?void 0:o._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),void 0===a?i=void 0:(i=new a(t),i._$AT(t,e,r)),void 0!==r?(e._$Co??=[])[r]=i:e._$Cl=i),void 0!==i&&(o=ao(t,i._$AS(t,o.values),i,r)),o}class no{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,o,e,r){this.type=2,this._$AH=Qt,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=e,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return void 0!==o&&11===t?.nodeType&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=ao(this,t,o),Dt(t)?t===Qt||null==t||""===t?(this._$AH!==Qt&&this._$AR(),this._$AH=Qt):t!==this._$AH&&t!==Xt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>Pt(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Qt&&Dt(this._$AH)?this._$AA.nextSibling.data=t:this.$(zt.createTextNode(t)),this._$AH=t}g(t){const{values:o,_$litType$:e}=t,r="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=io.createElement(eo(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===r)this._$AH.p(o);else{const t=new class{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:o},parts:e}=this._$AD,r=(t?.creationScope??zt).importNode(o,!0);oo.currentNode=r;let i=oo.nextNode(),a=0,n=0,s=e[0];for(;void 0!==s;){if(a===s.index){let o;2===s.type?o=new no(i,i.nextSibling,this,t):1===s.type?o=new s.ctor(i,s.name,s.strings,this,t):6===s.type&&(o=new ho(i,this,t)),this._$AV.push(o),s=e[++n]}a!==s?.index&&(i=oo.nextNode(),a++)}return oo.currentNode=zt,r}p(t){let o=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,o),o+=e.strings.length-2):e._$AI(t[o])),o++}}(r,this),e=t.u(this.options);t.p(o),this.$(e),this._$AH=t}}_$AC(t){let o=to.get(t.strings);return void 0===o&&to.set(t.strings,o=new io(t)),o}T(t){Pt(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let e,r=0;for(const i of t)r===o.length?o.push(e=new no(this.k(Bt()),this.k(Bt()),this,this.options)):e=o[r],e._$AI(i),r++;r<o.length&&(this._$AR(e&&e._$AB.nextSibling,r),o.length=r)}_$AR(t=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class so{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,o,e,r,i){this.type=1,this._$AH=Qt,this._$AN=void 0,this.element=t,this.name=o,this._$AM=r,this.options=i,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=Qt}_$AI(t,o=this,e,r){const i=this.strings;let a=!1;if(void 0===i)t=ao(this,t,o,0),a=!Dt(t)||t!==this._$AH&&t!==Xt,a&&(this._$AH=t);else{const r=t;let n,s;for(t=i[0],n=0;n<i.length-1;n++)s=ao(this,r[e+n],o,n),s===Xt&&(s=this._$AH[n]),a||=!Dt(s)||s!==this._$AH[n],s===Qt?t=Qt:t!==Qt&&(t+=(s??"")+i[n+1]),this._$AH[n]=s}a&&!r&&this.O(t)}O(t){t===Qt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class co extends so{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===Qt?void 0:t}}class lo extends so{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==Qt)}}class fo extends so{constructor(t,o,e,r,i){super(t,o,e,r,i),this.type=5}_$AI(t,o=this){if((t=ao(this,t,o,0)??Qt)===Xt)return;const e=this._$AH,r=t===Qt&&e!==Qt||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,i=t!==Qt&&(e===Qt||r);r&&this.element.removeEventListener(this.name,this,e),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ho{constructor(t,o,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){ao(this,t)}}const po=kt.litHtmlPolyfillSupport;po?.(io,no),(kt.litHtmlVersions??=[]).push("3.1.0");
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2017 Google LLC
|
|
@@ -77,7 +77,11 @@ class yo extends Wt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
77
77
|
* @license
|
|
78
78
|
* Copyright 2019 Google LLC
|
|
79
79
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
80
|
-
*/class So extends yo{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([o,e])=>t.registry.define(o,e))));const o={...t.shadowRootOptions,customElements:t.registry},e=this.renderOptions.creationScope=this.attachShadow(o);return((t,o)=>{vo?t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((o=>{const e=document.createElement("style"),r=No.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=o.cssText,t.appendChild(e)}))})(e,t.elementStyles),e}}var wo,Co=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};const Ro=Symbol("constructorPrototype"),Uo=Symbol("constructorName"),Eo=Symbol("exportpartsDebouncer");class Lo extends So{constructor(){super(),this[wo]=new o(5),this[Uo]=this.constructor.name,this[Ro]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Uo]&&Object.setPrototypeOf(this,this[Ro])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var o,e;if((null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==e?e:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[Eo].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var o,e,r,i,a,n;const s=t=>null!=t&&t.trim().length>0,c=t.filter(s).map((t=>t.trim()));if(0===c.length)return void this.removeAttribute("exportparts");const l=new Set;for(let t of null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const o=null!==(i=null===(r=t.getAttribute("part"))||void 0===r?void 0:r.split(" "))&&void 0!==i?i:[],e=null!==(n=null===(a=t.getAttribute("exportparts"))||void 0===a?void 0:a.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...o,...e).filter(s).map((t=>t.trim())).forEach((t=>l.add(t)))}if(0===l.size)return void this.removeAttribute("exportparts");const f=[...l.values()].flatMap((t=>c.map((o=>`${t}:${o}--${t}`))));this.setAttribute("exportparts",[...this.part,...f].join(", "))}}wo=Eo,Co([C()],Lo.prototype,"exportpartsPrefix",void 0),Co([function(t,o){const e=()=>JSON.parse(JSON.stringify(t));return C({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,o)=>!E(t,o),...null!=o?o:{}})}([])],Lo.prototype,"exportpartsPrefixes",void 0),Co([C()],Lo.prototype,"customStylesheet",void 0);const Io=ut`
|
|
80
|
+
*/class So extends yo{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([o,e])=>t.registry.define(o,e))));const o={...t.shadowRootOptions,customElements:t.registry},e=this.renderOptions.creationScope=this.attachShadow(o);return((t,o)=>{vo?t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((o=>{const e=document.createElement("style"),r=No.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=o.cssText,t.appendChild(e)}))})(e,t.elementStyles),e}}var wo,Co=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};const Ro=Symbol("constructorPrototype"),Uo=Symbol("constructorName"),Eo=Symbol("exportpartsDebouncer");class Lo extends So{constructor(){super(),this[wo]=new o(5),this[Uo]=this.constructor.name,this[Ro]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Uo]&&Object.setPrototypeOf(this,this[Ro])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var o,e;if((null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==e?e:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[Eo].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var o,e,r,i,a,n;const s=t=>null!=t&&t.trim().length>0,c=t.filter(s).map((t=>t.trim()));if(0===c.length)return void this.removeAttribute("exportparts");const l=new Set;for(let t of null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const o=null!==(i=null===(r=t.getAttribute("part"))||void 0===r?void 0:r.split(" "))&&void 0!==i?i:[],e=null!==(n=null===(a=t.getAttribute("exportparts"))||void 0===a?void 0:a.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...o,...e).filter(s).map((t=>t.trim())).forEach((t=>l.add(t)))}if(0===l.size)return void this.removeAttribute("exportparts");const f=[...l.values()].flatMap((t=>c.map((o=>`${t}:${o}--${t}`))));this.setAttribute("exportparts",[...this.part,...f].join(", "))}}wo=Eo,Co([C()],Lo.prototype,"exportpartsPrefix",void 0),Co([function(t,o){const e=()=>JSON.parse(JSON.stringify(t));return C({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,o)=>!E(t,o),...null!=o?o:{}})}([])],Lo.prototype,"exportpartsPrefixes",void 0),Co([C()],Lo.prototype,"customStylesheet",void 0);const Io=bo.create("--ft-utils-highlight-html-background-color","","COLOR","#FFF26E");ut`
|
|
81
|
+
.highlight-html-match {
|
|
82
|
+
background: ${Io};
|
|
83
|
+
}
|
|
84
|
+
`;const Wo=ut`
|
|
81
85
|
.ft-no-text-select {
|
|
82
86
|
-webkit-touch-callout: none;
|
|
83
87
|
-webkit-user-select: none;
|
|
@@ -86,7 +90,7 @@ class yo extends Wt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
86
90
|
-ms-user-select: none;
|
|
87
91
|
user-select: none;
|
|
88
92
|
}
|
|
89
|
-
`;var
|
|
93
|
+
`;var ko,Ko;ut`
|
|
90
94
|
.ft-word-wrap {
|
|
91
95
|
white-space: normal;
|
|
92
96
|
word-wrap: break-word;
|
|
@@ -109,18 +113,18 @@ class yo extends Wt{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
109
113
|
display: inline-block;
|
|
110
114
|
width: 0;
|
|
111
115
|
}
|
|
112
|
-
`,window.ftReduxStores||(window.ftReduxStores={}),navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(
|
|
116
|
+
`,window.ftReduxStores||(window.ftReduxStores={}),navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Ko=null===(ko=window.safari)||void 0===ko?void 0:ko.pushNotification)||void 0===Ko||Ko.toString());
|
|
113
117
|
/**
|
|
114
118
|
* @license
|
|
115
119
|
* Copyright 2017 Google LLC
|
|
116
120
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
117
121
|
*/
|
|
118
|
-
const
|
|
122
|
+
const Zo=2;class $o{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,e){this._$Ct=t,this._$AM=o,this._$Ci=e}_$AS(t,o){return this.update(t,o)}update(t,o){return this.render(...o)}}
|
|
119
123
|
/**
|
|
120
124
|
* @license
|
|
121
125
|
* Copyright 2017 Google LLC
|
|
122
126
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
123
|
-
*/class
|
|
127
|
+
*/class Ao extends $o{constructor(t){if(super(t),this.et=V,t.type!==Zo)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===V||null==t)return this.vt=void 0,this.et=t;if(t===J)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const o=[t];return o.raw=o,this.vt={_$litType$:this.constructor.resultType,strings:o,values:[]}}}Ao.directiveName="unsafeHTML",Ao.resultType=1;const Fo=(t=>(...o)=>({_$litDirective$:t,values:o}))(Ao);var Mo,zo;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Mo||(Mo={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(zo||(zo={})),new Map([...["abw"].map((t=>[t,zo.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,zo.AUDIO])),...["avi"].map((t=>[t,zo.AVI])),...["chm","xhs"].map((t=>[t,zo.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,zo.CODE])),...["csv"].map((t=>[t,zo.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,zo.DITA])),...["epub"].map((t=>[t,zo.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,zo.EXCEL])),...["flac"].map((t=>[t,zo.FLAC])),...["gif"].map((t=>[t,zo.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,zo.GZIP])),...["html","htm","xhtml"].map((t=>[t,zo.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,zo.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,zo.JPEG])),...["json"].map((t=>[t,zo.JSON])),...["m4a","m4p"].map((t=>[t,zo.M4A])),...["mov","qt"].map((t=>[t,zo.MOV])),...["mp3"].map((t=>[t,zo.MP3])),...["mp4","m4v"].map((t=>[t,zo.MP4])),...["ogg","oga"].map((t=>[t,zo.OGG])),...["pdf","ps"].map((t=>[t,zo.PDF])),...["png"].map((t=>[t,zo.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,zo.POWERPOINT])),...["rar"].map((t=>[t,zo.RAR])),...["stp"].map((t=>[t,zo.STP])),...["txt","rtf","md","mdown"].map((t=>[t,zo.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,zo.VIDEO])),...["wav"].map((t=>[t,zo.WAV])),...["wma"].map((t=>[t,zo.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,zo.WORD])),...["xml","xsl","rdf"].map((t=>[t,zo.XML])),...["yaml","yml","x-yaml"].map((t=>[t,zo.YAML])),...["zip"].map((t=>[t,zo.ZIP]))]);const Bo=bo.create("--ft-icon-font-size","","SIZE","24px"),Do=bo.extend("--ft-icon-fluid-topics-font-family","",bo.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),Po=bo.extend("--ft-icon-file-format-font-family","",bo.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),_o=bo.extend("--ft-icon-material-font-family","",bo.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),jo=bo.create("--ft-icon-vertical-align","","UNKNOWN","unset"),Ho=ut`
|
|
124
128
|
:host, i.ft-icon {
|
|
125
129
|
display: inline-flex;
|
|
126
130
|
align-items: center;
|
|
@@ -129,14 +133,14 @@ const Ko=2;class Zo{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,e)
|
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
:host {
|
|
132
|
-
width: ${
|
|
133
|
-
height: ${
|
|
136
|
+
width: ${Bo};
|
|
137
|
+
height: ${Bo};
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
i.ft-icon {
|
|
137
141
|
width: 100%;
|
|
138
142
|
height: 100%;
|
|
139
|
-
font-size: ${
|
|
143
|
+
font-size: ${Bo};
|
|
140
144
|
line-height: 1;
|
|
141
145
|
font-weight: normal;
|
|
142
146
|
text-transform: none;
|
|
@@ -147,33 +151,33 @@ const Ko=2;class Zo{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,e)
|
|
|
147
151
|
text-rendering: auto;
|
|
148
152
|
-webkit-font-smoothing: antialiased;
|
|
149
153
|
-moz-osx-font-smoothing: grayscale;
|
|
150
|
-
vertical-align: ${
|
|
154
|
+
vertical-align: ${jo};
|
|
151
155
|
}
|
|
152
156
|
|
|
153
157
|
i.ft-icon.ft-icon--fluid-topics {
|
|
154
|
-
font-family: ${
|
|
158
|
+
font-family: ${Do}, ft-icons, fticons, sans-serif;
|
|
155
159
|
|
|
156
160
|
/* Ugly fix because font is broken */
|
|
157
|
-
font-size: calc(0.75 * ${
|
|
158
|
-
line-height: ${
|
|
161
|
+
font-size: calc(0.75 * ${Bo});
|
|
162
|
+
line-height: ${Bo};
|
|
159
163
|
position: relative;
|
|
160
164
|
top: -4%;
|
|
161
165
|
justify-content: center;
|
|
162
166
|
}
|
|
163
167
|
|
|
164
168
|
.ft-icon--file-format {
|
|
165
|
-
font-family: ${
|
|
169
|
+
font-family: ${Po}, ft-mime, sans-serif;
|
|
166
170
|
}
|
|
167
171
|
|
|
168
172
|
.ft-icon--material {
|
|
169
|
-
font-family: ${
|
|
173
|
+
font-family: ${_o}, "Material Icons", sans-serif;
|
|
170
174
|
}
|
|
171
|
-
`;var
|
|
175
|
+
`;var To;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(To||(To={}));var Go=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};class Yo extends Lo{constructor(){super(...arguments),this.resolvedIcon=Qt}render(){const t=this.variant&&Object.values(To).includes(this.variant)?this.variant:To.fluid_topics,o=t!==To.material||!!this.value;return qt`
|
|
172
176
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
173
|
-
${
|
|
177
|
+
${Fo(this.resolvedIcon)}
|
|
174
178
|
<slot ?hidden=${o}></slot>
|
|
175
179
|
</i>
|
|
176
|
-
`}get textContent(){var t,o;return null!==(o=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==o?o:""}update(t){super.update(t),["value","variant"].some((o=>t.has(o)))&&this.resolveIcon()}resolveIcon(){var t,o;let e=this.value||this.textContent;switch(this.variant){case
|
|
180
|
+
`}get textContent(){var t,o;return null!==(o=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==o?o:""}update(t){super.update(t),["value","variant"].some((o=>t.has(o)))&&this.resolveIcon()}resolveIcon(){var t,o;let e=this.value||this.textContent;switch(this.variant){case To.file_format:this.resolvedIcon=null!==(t=zo[e.replace("-","_").toUpperCase()])&&void 0!==t?t:e;break;case To.material:this.resolvedIcon=this.value||Qt;break;default:this.resolvedIcon=null!==(o=Mo[e.replace("-","_").toUpperCase()])&&void 0!==o?o:e}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Yo.elementDefinitions={},Yo.styles=Ho,Go([C()],Yo.prototype,"variant",void 0),Go([C()],Yo.prototype,"value",void 0),Go([R()],Yo.prototype,"resolvedIcon",void 0),Go([function(t,o){return(e,r,i)=>{const a=o=>o.renderRoot?.querySelector(t)??null;if(o){const{get:t,set:o}="object"==typeof r?e:i??(()=>{const t=Symbol();return{get(){return this[t]},set(o){this[t]=o}}})();return U(0,0,{get(){let e=t.call(this);return void 0===e&&(e=a(this),(null!==e||this.hasUpdated)&&o.call(this,e)),e}})}return U(0,0,{get(){return a(this)}})}}("slot")],Yo.prototype,"slottedContent",void 0),L("ft-icon")(Yo);const Jo={colorOutline:bo.external(xo.colorOutline,"Design system"),colorOnSurfaceMedium:bo.external(xo.colorOnSurfaceMedium,"Design system")},Vo=ut`
|
|
177
181
|
:host {
|
|
178
182
|
display: block;
|
|
179
183
|
}
|
|
@@ -184,14 +188,14 @@ const Ko=2;class Zo{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,e)
|
|
|
184
188
|
|
|
185
189
|
ft-icon {
|
|
186
190
|
transform: rotate(-45deg);
|
|
187
|
-
color: ${
|
|
191
|
+
color: ${Jo.colorOutline};
|
|
188
192
|
}
|
|
189
193
|
|
|
190
194
|
.ft-resizer--dragging ft-icon,
|
|
191
195
|
.ft-resizer:hover ft-icon {
|
|
192
|
-
color: ${
|
|
196
|
+
color: ${Jo.colorOnSurfaceMedium};
|
|
193
197
|
}
|
|
194
|
-
`;var
|
|
198
|
+
`;var qo=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};class Xo extends CustomEvent{constructor(t,o){super("resize",{detail:{width:t,height:o}})}}class Qo extends Lo{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.iconVariant=To.material,this.cursor="nwse-resize",this.dragging=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return qt`
|
|
195
199
|
<style>
|
|
196
200
|
.ft-resizer {
|
|
197
201
|
cursor: ${yt(this.cursor)}
|
|
@@ -202,4 +206,4 @@ const Ko=2;class Zo{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,e)
|
|
|
202
206
|
@touchstart=${this.initDragFromTouch}>
|
|
203
207
|
<ft-icon .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon>
|
|
204
208
|
</div>
|
|
205
|
-
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,o){this.dragging=!0,this.startX=t,this.startY=o,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,o){let e=this.fixedWidth+t-this.startX,r=this.fixedHeight+o-this.startY;this.dispatchEvent(new
|
|
209
|
+
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,o){this.dragging=!0,this.startX=t,this.startY=o,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,o){let e=this.fixedWidth+t-this.startX,r=this.fixedHeight+o-this.startY;this.dispatchEvent(new Xo(e,r))}}Qo.elementDefinitions={"ft-icon":Yo},Qo.styles=[Wo,Vo],qo([C({type:Number})],Qo.prototype,"initialWidth",void 0),qo([C({type:Number})],Qo.prototype,"initialHeight",void 0),qo([C()],Qo.prototype,"icon",void 0),qo([C()],Qo.prototype,"iconVariant",void 0),qo([C()],Qo.prototype,"cursor",void 0),qo([R()],Qo.prototype,"dragging",void 0),L("ft-resizer")(Qo),t.FtResizer=Qo,t.FtResizerCssVariables=Jo,t.ResizeEvent=Xo,t.styles=Vo}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-resizer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "small",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-icon": "1.1.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-icon": "1.1.2",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "1.1.2",
|
|
24
24
|
"lit": "3.1.0"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "53ce99f657872582bca43cbb7ad691b239b22823"
|
|
27
27
|
}
|