@fluid-topics/ft-wc-utils 0.3.16 → 0.3.18
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/deep-equal.js +9 -1
- package/build/globals.min.js +1 -1
- package/package.json +2 -2
package/build/deep-equal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
function eq(a, b) {
|
|
2
2
|
if (a === b)
|
|
3
3
|
return true;
|
|
4
4
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
@@ -54,4 +54,12 @@ export function deepEqual(a, b) {
|
|
|
54
54
|
// true if both NaN, false otherwise
|
|
55
55
|
return a !== a && b !== b;
|
|
56
56
|
}
|
|
57
|
+
export function deepEqual(a, b) {
|
|
58
|
+
try {
|
|
59
|
+
return eq(a, b);
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
57
65
|
//# sourceMappingURL=deep-equal.js.map
|
package/build/globals.min.js
CHANGED
|
@@ -118,7 +118,7 @@ var ft;const ht=null!=(null===(ft=window.HTMLSlotElement)||void 0===ft?void 0:ft
|
|
|
118
118
|
* http://polymer.github.io/PATENTS.txt
|
|
119
119
|
*
|
|
120
120
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
121
|
-
*/if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,n=window.customElements.get,r=window.customElements,i=new WeakMap,o=new WeakMap,s=new WeakMap,u=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 u=i.prototype.attributeChangedCallback,c=new Set(i.observedAttributes||[]);h(i,c,u);const a={elementClass:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:u,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,a),this._definitionsByClass.set(i,a);let l=n.call(r,t);l||(l=f(t),e.call(r,t,l)),this===window.customElements&&(s.set(i,a),a.standInClass=l);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)o.delete(t),v(t,a,!0)}const p=this._whenDefinedPromises.get(t);return void 0!==p&&(p.resolve(i),this._whenDefinedPromises.delete(t)),i}upgrade(){b.push(this),r.upgrade.apply(r,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let n=this._whenDefinedPromises.get(t);return void 0===n&&(n={},n.promise=new Promise((t=>n.resolve=t)),this._whenDefinedPromises.set(t,n)),n.promise}_upgradeWhenDefined(t,e,n){let r=this._awaitingUpgrade.get(e);r||this._awaitingUpgrade.set(e,r=new Set),n?r.add(t):r.delete(t)}},window.HTMLElement=function(){let e=c;if(e)return c=void 0,e;const n=s.get(this.constructor);if(!n)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],n.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),i.set(e,n),e},window.HTMLElement.prototype=t.prototype;const a=t=>t===document||t instanceof ShadowRoot,l=t=>{let e=t.getRootNode();if(!a(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),a(e)||(e=u.get(e)?.getRootNode()||document)}return e.customElements},f=e=>class{static get formAssociated(){return!0}constructor(){const n=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(n,HTMLElement.prototype);const r=l(n)||window.customElements,i=r._getDefinition(e);return i?v(n,i):o.set(n,r),n}connectedCallback(){const t=i.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=i.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){i.get(this)?.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)}},h=(t,e,n)=>{if(0===e.size||void 0===n)return;const r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,i){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);r.call(this,o,i),n.call(this,o,t,i)}else r.call(this,o,i)});const i=t.prototype.removeAttribute;i&&(t.prototype.removeAttribute=function(t){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);i.call(this,r),n.call(this,r,t,null)}else i.call(this,r)})},d=e=>{const n=Object.getPrototypeOf(e);if(n!==window.HTMLElement)return n===t||"HTMLElement"===n?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(n)},v=(t,e,n=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),i.set(t,e),c=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((n=>{t.hasAttribute(n)&&e.attributeChangedCallback.call(t,n,null,t.getAttribute(n))})),n&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=p.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const y=(t,e,n)=>{const r=(n?Object.getPrototypeOf(n):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=r.apply(n||this,arguments);return void 0!==t&&u.set(t,this),b.pop(),t}};y(ShadowRoot,"createElement",document),y(ShadowRoot,"importNode",document),y(Element,"insertAdjacentHTML");const m=(t,e)=>{const n=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...n,set(t){b.push(this),n.set.call(this,t),b.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,e=HTMLElement.prototype.attachInternals,n=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...n){const r=e.call(this,...n);return t.set(r,this),r},n.forEach((e=>{const n=window.ElementInternals.prototype,r=n[e];n[e]=function(...e){const n=t.get(this);if(!0!==i.get(n).formAssociated)throw new DOMException(`Failed to execute ${r} on 'ElementInternals': The target element is not a form-associated custom element.`);r?.call(this,...e)}}));class r extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class o{constructor(t){const e=new Map;t.forEach(((t,n)=>{const r=t.getAttribute("name"),i=e.get(r)||[];this[+n]=t,i.push(t),e.set(r,i)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new r(t))}))}namedItem(t){return this[t]}}const s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const n of t){const t=i.get(n);t&&!0!==t.formAssociated||e.push(n)}return new o(e)}})}}try{window.customElements.define("custom-element",null)}catch(t){const e=window.customElements.define;window.customElements.define=(t,n,r)=>{try{e.bind(window.customElements)(t,n,r)}catch(e){console.warn(t,n,r,e)}}}function Ut(t,e){const n=()=>JSON.parse(JSON.stringify(t));return at({type:Object,converter:{fromAttribute:t=>{if(null==t)return n();try{return JSON.parse(t)}catch{return n()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}function Ft(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if((n=t.length)!=e.length)return!1;for(r=n;0!=r--;)if(!Ft(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!Ft(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((n=(i=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;for(r=n;0!=r--;){var o=i[r];if(!Ft(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}class Lt{static create(t,e,n){let r=t=>o(null!=t?t:n),i=s`var(${o(t)}, ${r(n)})`;return i.name=t,i.category=e,i.defaultValue=n,i.defaultCssValue=r,i.get=e=>s`var(${o(t)}, ${r(e)})`,i.breadcrumb=()=>[],i.lastResortDefaultValue=()=>n,i}static extend(t,e,n){let r=t=>e.get(null!=t?t:n),i=s`var(${o(t)}, ${r(n)})`;return i.name=t,i.category=e.category,i.fallbackVariable=e,i.defaultValue=n,i.defaultCssValue=r,i.get=e=>s`var(${o(t)}, ${r(e)})`,i.breadcrumb=()=>[e.name,...e.breadcrumb()],i.lastResortDefaultValue=()=>n,i}static external(t,e){let n=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):o(null!=e?e:t.defaultValue),r=s`var(${o(t.name)}, ${n(t.defaultValue)})`;return r.name=t.name,r.category=t.category,r.fallbackVariable=t.fallbackVariable,r.defaultValue=t.defaultValue,r.context=e,r.defaultCssValue=n,r.get=e=>s`var(${o(t.name)}, ${n(e)})`,r.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],r.lastResortDefaultValue=()=>{var e,n;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(n=t.fallbackVariable)||void 0===n?void 0:n.lastResortDefaultValue()},r}}const Tt={colorPrimary:Lt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:Lt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:Lt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:Lt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:Lt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:Lt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:Lt.create("--ft-color-error","COLOR","#B00020"),colorOutline:Lt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:Lt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:Lt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:Lt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:Lt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:Lt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:Lt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:Lt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:Lt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:Lt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:Lt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:Lt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:Lt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:Lt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:Lt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:Lt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:Lt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:Lt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:Lt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:Lt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:Lt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:Lt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:Lt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:Lt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:Lt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:Lt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:Lt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:Lt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:Lt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:Lt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:Lt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:Lt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:Lt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:Lt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:Lt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:Lt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:Lt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:Lt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:Lt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:Lt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:Lt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:Lt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:Lt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:Lt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:Lt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:Lt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:Lt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:Lt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:Lt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:Lt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:Lt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:Lt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:Lt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:Lt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:Lt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
121
|
+
*/if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,n=window.customElements.get,r=window.customElements,i=new WeakMap,o=new WeakMap,s=new WeakMap,u=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 u=i.prototype.attributeChangedCallback,c=new Set(i.observedAttributes||[]);h(i,c,u);const a={elementClass:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:u,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,a),this._definitionsByClass.set(i,a);let l=n.call(r,t);l||(l=f(t),e.call(r,t,l)),this===window.customElements&&(s.set(i,a),a.standInClass=l);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)o.delete(t),v(t,a,!0)}const p=this._whenDefinedPromises.get(t);return void 0!==p&&(p.resolve(i),this._whenDefinedPromises.delete(t)),i}upgrade(){b.push(this),r.upgrade.apply(r,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let n=this._whenDefinedPromises.get(t);return void 0===n&&(n={},n.promise=new Promise((t=>n.resolve=t)),this._whenDefinedPromises.set(t,n)),n.promise}_upgradeWhenDefined(t,e,n){let r=this._awaitingUpgrade.get(e);r||this._awaitingUpgrade.set(e,r=new Set),n?r.add(t):r.delete(t)}},window.HTMLElement=function(){let e=c;if(e)return c=void 0,e;const n=s.get(this.constructor);if(!n)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],n.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),i.set(e,n),e},window.HTMLElement.prototype=t.prototype;const a=t=>t===document||t instanceof ShadowRoot,l=t=>{let e=t.getRootNode();if(!a(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),a(e)||(e=u.get(e)?.getRootNode()||document)}return e.customElements},f=e=>class{static get formAssociated(){return!0}constructor(){const n=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(n,HTMLElement.prototype);const r=l(n)||window.customElements,i=r._getDefinition(e);return i?v(n,i):o.set(n,r),n}connectedCallback(){const t=i.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=i.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){i.get(this)?.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)}},h=(t,e,n)=>{if(0===e.size||void 0===n)return;const r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,i){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);r.call(this,o,i),n.call(this,o,t,i)}else r.call(this,o,i)});const i=t.prototype.removeAttribute;i&&(t.prototype.removeAttribute=function(t){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);i.call(this,r),n.call(this,r,t,null)}else i.call(this,r)})},d=e=>{const n=Object.getPrototypeOf(e);if(n!==window.HTMLElement)return n===t||"HTMLElement"===n?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(n)},v=(t,e,n=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),i.set(t,e),c=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((n=>{t.hasAttribute(n)&&e.attributeChangedCallback.call(t,n,null,t.getAttribute(n))})),n&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=p.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const y=(t,e,n)=>{const r=(n?Object.getPrototypeOf(n):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=r.apply(n||this,arguments);return void 0!==t&&u.set(t,this),b.pop(),t}};y(ShadowRoot,"createElement",document),y(ShadowRoot,"importNode",document),y(Element,"insertAdjacentHTML");const m=(t,e)=>{const n=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...n,set(t){b.push(this),n.set.call(this,t),b.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,e=HTMLElement.prototype.attachInternals,n=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...n){const r=e.call(this,...n);return t.set(r,this),r},n.forEach((e=>{const n=window.ElementInternals.prototype,r=n[e];n[e]=function(...e){const n=t.get(this);if(!0!==i.get(n).formAssociated)throw new DOMException(`Failed to execute ${r} on 'ElementInternals': The target element is not a form-associated custom element.`);r?.call(this,...e)}}));class r extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class o{constructor(t){const e=new Map;t.forEach(((t,n)=>{const r=t.getAttribute("name"),i=e.get(r)||[];this[+n]=t,i.push(t),e.set(r,i)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new r(t))}))}namedItem(t){return this[t]}}const s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const n of t){const t=i.get(n);t&&!0!==t.formAssociated||e.push(n)}return new o(e)}})}}try{window.customElements.define("custom-element",null)}catch(t){const e=window.customElements.define;window.customElements.define=(t,n,r)=>{try{e.bind(window.customElements)(t,n,r)}catch(e){console.warn(t,n,r,e)}}}function Ut(t,e){const n=()=>JSON.parse(JSON.stringify(t));return at({type:Object,converter:{fromAttribute:t=>{if(null==t)return n();try{return JSON.parse(t)}catch{return n()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}function Ft(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if((n=t.length)!=e.length)return!1;for(r=n;0!=r--;)if(!Ft(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!Ft(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((n=(i=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;for(r=n;0!=r--;){var o=i[r];if(!Ft(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}class Lt{static create(t,e,n){let r=t=>o(null!=t?t:n),i=s`var(${o(t)}, ${r(n)})`;return i.name=t,i.category=e,i.defaultValue=n,i.defaultCssValue=r,i.get=e=>s`var(${o(t)}, ${r(e)})`,i.breadcrumb=()=>[],i.lastResortDefaultValue=()=>n,i}static extend(t,e,n){let r=t=>e.get(null!=t?t:n),i=s`var(${o(t)}, ${r(n)})`;return i.name=t,i.category=e.category,i.fallbackVariable=e,i.defaultValue=n,i.defaultCssValue=r,i.get=e=>s`var(${o(t)}, ${r(e)})`,i.breadcrumb=()=>[e.name,...e.breadcrumb()],i.lastResortDefaultValue=()=>n,i}static external(t,e){let n=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):o(null!=e?e:t.defaultValue),r=s`var(${o(t.name)}, ${n(t.defaultValue)})`;return r.name=t.name,r.category=t.category,r.fallbackVariable=t.fallbackVariable,r.defaultValue=t.defaultValue,r.context=e,r.defaultCssValue=n,r.get=e=>s`var(${o(t.name)}, ${n(e)})`,r.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],r.lastResortDefaultValue=()=>{var e,n;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(n=t.fallbackVariable)||void 0===n?void 0:n.lastResortDefaultValue()},r}}const Tt={colorPrimary:Lt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:Lt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:Lt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:Lt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:Lt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:Lt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:Lt.create("--ft-color-error","COLOR","#B00020"),colorOutline:Lt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:Lt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:Lt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:Lt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:Lt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:Lt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:Lt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:Lt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:Lt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:Lt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:Lt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:Lt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:Lt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:Lt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:Lt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:Lt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:Lt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:Lt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:Lt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:Lt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:Lt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:Lt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:Lt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:Lt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:Lt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:Lt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:Lt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:Lt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:Lt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:Lt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:Lt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:Lt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:Lt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:Lt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:Lt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:Lt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:Lt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:Lt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:Lt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:Lt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:Lt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:Lt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:Lt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:Lt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:Lt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:Lt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:Lt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:Lt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:Lt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:Lt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:Lt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:Lt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:Lt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:Lt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:Lt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
122
122
|
/**
|
|
123
123
|
* @license
|
|
124
124
|
* Copyright 2021 Google LLC
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-wc-utils",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.18",
|
|
4
4
|
"description": "Internal web components tools",
|
|
5
5
|
"author": "Fluid Topics <devtopics@antidot.net>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"@reduxjs/toolkit": "^1.6.2",
|
|
18
18
|
"lit": "2.2.8"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "33fac246cb4042276b1804479304a2c8fe0f8e3f"
|
|
21
21
|
}
|