Comparing version 7.6.9 to 7.6.10
@@ -1,2 +0,2 @@ | ||
import"weakmap-polyfill";import{setActiveComponent as e,clearActiveComponent as t}from"reactive-signal";export{Signal,batch,clearActiveComponent,computed,effect,getActiveComponent,setActiveComponent,signal,signalObject}from"reactive-signal";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},n.apply(this,arguments)}function o(e){return e.replace(/-(\w)/g,(e,t)=>t.toUpperCase())}function r(e){return e.children}function s(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}!function(){if("undefined"!=typeof document&&!("adoptedStyleSheets"in document)){var e="ShadyCSS"in window&&!ShadyCSS.nativeShadow,t=document.implementation.createHTMLDocument("boot"),n=new WeakMap,o="object"==typeof DOMException?Error:DOMException,r=Object.defineProperty,s=Array.prototype.forEach,i=/@import.+?;?$/gm,l=CSSStyleSheet.prototype;l.replace=function(){return Promise.reject(new o("Can't call replace on non-constructed CSSStyleSheets."))},l.replaceSync=function(){throw new o("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};var c=new WeakMap,a=new WeakMap,u=new WeakMap,p=R.prototype;p.replace=function(e){try{return this.replaceSync(e),Promise.resolve(this)}catch(e){return Promise.reject(e)}},p.replaceSync=function(e){if(O(this),"string"==typeof e){var t=this,n=c.get(t).ownerNode;n.textContent=function(e){var t=e.replace(i,"");return t!==e&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),t.trim()}(e),c.set(t,n.sheet),a.get(t).forEach(function(e){e.isConnected()&&P(t,N(t,e))})}},r(p,"cssRules",{configurable:!0,enumerable:!0,get:function(){return O(this),c.get(this).cssRules}}),["addImport","addPageRule","addRule","deleteRule","insertRule","removeImport","removeRule"].forEach(function(e){p[e]=function(){var t=this;O(t);var n=arguments,o=c.get(t),r=a.get(t),s=o[e].apply(o,n);return r.forEach(function(o){if(o.isConnected()){var r=N(t,o).sheet;r[e].apply(r,n)}}),s}}),r(R,Symbol.hasInstance,{configurable:!0,value:C});var d={childList:!0,subtree:!0},h=new WeakMap,f=new WeakMap,m=new WeakMap,y=new WeakMap,v=L.prototype;if(v.isConnected=function(){var e=f.get(this);return e instanceof Document?"loading"!==e.readyState:function(e){return"isConnected"in e?e.isConnected:document.contains(e)}(e.host)},v.connect=function(){var e=k(this);y.get(this).observe(e,d),m.get(this).length>0&&x(this),A(e,function(e){j(e).connect()})},v.disconnect=function(){y.get(this).disconnect()},v.update=function(e){var t=this,n=f.get(t)===document?"Document":"ShadowRoot";if(!Array.isArray(e))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Iterator getter is not callable.");if(!e.every(C))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Failed to convert value to 'CSSStyleSheet'");if(e.some(E))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Can't adopt non-constructed stylesheets");t.sheets=e;var o,r,s=m.get(t),i=(o=e).filter(function(e,t){return o.indexOf(e)===t});(r=i,s.filter(function(e){return-1===r.indexOf(e)})).forEach(function(e){var n;(n=N(e,t)).parentNode.removeChild(n),function(e,t){u.get(e).delete(t),a.set(e,a.get(e).filter(function(e){return e!==t}))}(e,t)}),m.set(t,i),t.isConnected()&&i.length>0&&x(t)},window.CSSStyleSheet=R,T(Document),"ShadowRoot"in window){T(ShadowRoot);var g=Element.prototype,b=g.attachShadow;g.attachShadow=function(e){var t=b.call(this,e);return"closed"===e.mode&&n.set(this,t),t}}var S=j(document);S.isConnected()?S.connect():document.addEventListener("DOMContentLoaded",S.connect.bind(S))}function w(e){return e.shadowRoot||n.get(e)}function C(e){return"object"==typeof e&&(p.isPrototypeOf(e)||l.isPrototypeOf(e))}function E(e){return"object"==typeof e&&l.isPrototypeOf(e)}function N(e,t){return u.get(e).get(t)}function P(e,t){requestAnimationFrame(function(){var n,o;!function(e){for(var t=0;t<e.cssRules.length;t++)e.deleteRule(0)}(t.sheet),n=c.get(e),o=t.sheet,s.call(n.cssRules,function(e,t){o.insertRule(e.cssText,t)})})}function O(e){if(!c.has(e))throw new TypeError("Illegal invocation")}function R(){var e=this,n=document.createElement("style");t.body.appendChild(n),c.set(e,n.sheet),a.set(e,[]),u.set(e,new WeakMap)}function j(e){var t=h.get(e);return t||(t=new L(e),h.set(e,t)),t}function T(e){r(e.prototype,"adoptedStyleSheets",{configurable:!0,enumerable:!0,get:function(){return j(this).sheets},set:function(e){j(this).update(e)}})}function A(e,t){for(var n=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT,function(e){return w(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},null,!1),o=void 0;o=n.nextNode();)t(w(o))}function k(e){var t=f.get(e);return t instanceof Document?t.body:t}function x(e){var t=document.createDocumentFragment(),n=m.get(e),o=y.get(e),r=k(e);o.disconnect(),n.forEach(function(n){t.appendChild(N(n,e)||function(e,t){var n=document.createElement("style");return u.get(e).set(t,n),a.get(e).push(t),n}(n,e))}),r.insertBefore(t,null),o.observe(r,d),n.forEach(function(t){P(t,N(t,e))})}function L(t){var n=this;n.sheets=[],f.set(n,t),m.set(n,[]),y.set(n,new MutationObserver(function(t,o){document?t.forEach(function(t){e||s.call(t.addedNodes,function(e){e instanceof Element&&A(e,function(e){j(e).connect()})}),s.call(t.removedNodes,function(t){t instanceof Element&&(function(e,t){return t instanceof HTMLStyleElement&&m.get(e).some(function(t){return N(t,e)})}(n,t)&&x(n),e||A(t,function(e){j(e).disconnect()}))})}):o.disconnect()}))}}(),function(){const e="undefined"!=typeof window?window:global;if(void 0===e.Reflect||void 0===e.customElements||e.customElements.hasOwnProperty("polyfillWrapFlushCallback"))return;const t=e.HTMLElement;e.HTMLElement=function(){return Reflect.construct(t,[],this.constructor)},HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)}();const l=/\B([A-Z])/g;function c(e){const t=new CSSStyleSheet;return t.replaceSync(e),t}function a(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function u(){return{}}function p(e,t,n){return{configurable:!0,get(){const e=n.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}function d(e,t,...n){let o;if(t?t.ignoreAttrs=!0:t={ignoreAttrs:!0},arguments.length>2?o=n.flat():null!=t.children&&(o=t.children,delete t.children),e===r)return o;if("function"==typeof e){if(!e.tagName)return o&&(t.children=o),e(t);e=e.tagName}return{nodeName:e,children:o,attributes:t,key:t.key}}function h(e,t,...o){return d(e.nodeName,n({},e.attributes,t),o.length>0?o.flat():e.children)}Array.prototype.flat||(Array.prototype.flat=function(e=1){const t=[],n=(o,r)=>{for(const s of o)Array.isArray(s)&&r<e?n(s,r+1):t.push(s)};return n(this,0),t}),d.f=r;const f={onanimationcancel:1,oncompositionend:1,oncompositionstart:1,oncompositionupdate:1,onfocusin:1,onfocusout:1,onscrollend:1,ontouchcancel:1,ontouchend:1,ontouchmove:1,ontouchstart:1},m=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,y={};function v(e,t){y["o-"+e]=t}function g(e){let t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n,o,r){if("className"===t&&(t="class"),"o"==t[0]&&"-"==t[1]&&Promise.resolve().then(()=>{var n;null==(n=y[t])||n.call(y,e,o)}),"key"===t||"ignoreAttrs"===t);else if("ref"===t)s(n,null),s(o,e);else if("class"!==t||r)if("style"===t)if("string"==typeof o)e.style.cssText=o;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)o&&t in o||w(e.style,t,"");if(o)for(t in o)n&&o[t]===n[t]||w(e.style,t,o[t])}else if("unsafeHTML"===t)o&&(e.innerHTML=o.html||o||"");else if("o"==t[0]&&"n"==t[1])!function(e,t,n,o){let r=t!==(t=t.replace(/Capture$/,"")),s=t.toLowerCase();t=(f[s]||s in e?s:t).slice(2),n?o||e.addEventListener(t,S,r):e.removeEventListener(t,S,r),(e._listeners||(e._listeners={}))[t]=n}(e,t,o,n);else if("INPUT"===e.nodeName&&"value"===t)e.value=null==o?"":o;else if("list"!==t&&"type"!==t&&"css"!==t&&!r&&t in e){try{e[t]=null==o?"":o}catch(e){}null!=o&&!1!==o||"spellcheck"==t||e.removeAttribute(t)}else{let n=r&&t!==(t=t.replace(/^xlink:?/,""));if(null==o||!1===o)n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t);else if("function"!=typeof o)if(n)e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o);else if("Component"===e.constructor.is){var i;const n=null==(i=e.constructor.reflectProps)?void 0:i[t];n&&e.setAttribute(t,"function"==typeof n?n(o):o)}else e.setAttribute(t,o)}else e.className=o||""}function S(e){return this._listeners[e.type](e)}function w(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n.toString()):e[t]=null==n?"":"number"!=typeof n||m.test(t)?n.toString():n+"px"}let C=0,E=!1,N=!1,P=!1;function O(e,t,n,o,r){if(!e&&!t)return null;let s;var l;return C++||(E=null!=n&&void 0!==n.ownerSVGElement,P=!1),i(t)?n?(j(n,t,P,o,r),s=n.childNodes):(s=[],t.forEach((t,n)=>{let i=R(0===n?e:null,t,o,r);s.push(i)})):(i(e)||e instanceof NodeList?[...e].forEach((e,n)=>{0===n?s=R(e,t,o,r):T(e,!1)}):s=R(e,t,o,r),n&&(null==(l=s)?void 0:l.parentNode)!==n&&n.appendChild(s)),--C||(P=!1),s}function R(e,t,n,r){e&&t&&e.props&&(e.props.children=t.children);let s=e,i=E,l=N;var c;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||n)?e.nodeValue!=t&&(e.nodeValue=String(t)):(s=document.createTextNode(String(t)),e&&(e.parentNode&&(null==(c=e.parentNode)||c.replaceChild(s,e)),T(e,!0))),s&&(s.prevProps={}),s;let u=t.nodeName;var p;if(N="foreignObject"===u,E="svg"===u||!N&&E,u=String(u),(!e||!a(e,u))&&(s=function(e,t){let n=N||E?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}(u),"Component"===(null==(p=s.constructor)?void 0:p.is)&&Object.assign(s.props,t.attributes),e)){for(var d;e.firstChild;)s.appendChild(e.firstChild);e.parentNode&&(null==(d=e.parentNode)||d.replaceChild(s,e)),T(e,!0)}let h=s.firstChild,f=s.prevProps,m=t.children;if(null==f){f=s.prevProps={};for(let e=s.attributes,t=e.length;t--;)f[e[t].name]=e[t].value}return!P&&m&&1===m.length&&"string"==typeof m[0]&&null!=h&&void 0!==h.splitText&&null==h.nextSibling?h.nodeValue!=m[0]&&(h.nodeValue=m[0]):(m&&m.length||null!=h)&&("Component"==s.constructor.is&&s.constructor.noSlot||j(s,m,P||null!=f.unsafeHTML,n,r)),function(e,t,n,r,s){let i,l,c=e.update;for(i in e.receiveProps&&(l=Object.assign({},n)),n)t&&null!=t[i]||null==n[i]||(b(e,i,n[i],n[i]=void 0,N||E),c&&delete e.props[i]);for(i in t)if(c&&"object"==typeof t[i]&&"ref"!==i){("style"===i||"o"===i[0]&&"-"===i[1])&&b(e,i,n[i],n[i]=t[i],N||E);let r=o(i);e.props[r]=n[r]=t[i]}else if("children"!==i&&(!(i in n)||t[i]!==("value"===i||"checked"===i?e[i]:n[i])))if(b(e,i,n[i],t[i],N||E),-1!==e.nodeName.indexOf("-")){e.props=e.props||{};let r=o(i);e.props[r]=n[r]=t[i]}else n[i]=t[i];c&&!s&&e.parentNode&&!1!==e.receiveProps(e.props,l)&&e.queuedUpdate()}(s,t.attributes,f,0,r),s.props&&(s.props.children=t.children),E=i,N=l,s}function j(e,t,n,o,r){let s,i,l,c,u,p=e.childNodes,d=[],h={},f=0,m=0,y=p.length,v=0,b=t?t.length:0;if(0!==y)for(let e=0;e<y;e++){var S;let t=p[e],o=t.prevProps,r=b&&o?o.key:null;null!=r?(f++,h[r]=t):(o||(void 0!==t.splitText?!n||(null==(S=t.nodeValue)?void 0:S.trim()):n))&&(d[v++]=t)}if(0!==b)for(let n=0;n<b;n++){if(c=t[n],u=null,c){let e=c.key;if(null!=e)f&&void 0!==h[e]&&(u=h[e],h[e]=void 0,f--);else if(m<v)for(s=m;s<v;s++)if(void 0!==d[s]&&(w=i=d[s],"string"==typeof(C=c)||"number"==typeof C?void 0!==w.splitText:a(w,C.nodeName))){u=i,d[s]=void 0,s===v-1&&v--,s===m&&m++;break}}u=R(u,c,o,r),l=p[n],u&&u!==e&&u!==l&&(null==l?e.appendChild(u):u===l.nextSibling?g(l):e.insertBefore(u,l))}var w,C;if(f)for(let e in h)void 0!==h[e]&&T(h[e],!1);for(;m<=v;)void 0!==(u=d[v--])&&T(u,!1)}function T(e,t){null!=e.prevProps&&e.prevProps.ref&&("function"==typeof e.prevProps.ref?e.prevProps.ref(null):e.prevProps.ref.current&&(e.prevProps.ref.current=null)),!1!==t&&null!=e.prevProps||g(e),function(e){var t;for(e=null==(t=e)?void 0:t.lastChild;e;){let t=e.previousSibling;T(e,!0),e=t}}(e)}const A={mixin:{},globalCSS:[]};function k(e){Object.assign(A.mixin,e)}function x(e){A.globalCSS.includes(e)||A.globalCSS.push(e)}function L(e,t){Object.defineProperty(t,"tagName",{value:e,writable:!1}),customElements.get(e)?console.warn(`Failed to execute 'define' on 'CustomElementRegistry': the tag name "${e}" has already been used with this registry`):customElements.define(e,t)}function M(e){return function(t){L(e,t)}}let I=0;const F=new WeakMap;class W extends HTMLElement{static define(e){L(e,this)}constructor(){if(super(),this.elementId=void 0,this.isInstalled=void 0,this.inject=void 0,this.injection=void 0,this.renderRoot=void 0,this.rootElement=void 0,this.updateQueued=!1,this.constructor.defaultProps||(this.constructor.defaultProps={}),this.constructor.propTypes||(this.constructor.propTypes={}),this.constructor.reflectProps||(this.constructor.reflectProps={}),this.constructor.props)for(const e in this.constructor.props){const t=this.constructor.props[e];this.constructor.defaultProps[e]=t.default,this.constructor.propTypes[e]=t.type,this.constructor.reflectProps[e]=t.reflect}this.props=Object.assign({},this.constructor.defaultProps,this.props),this.elementId=I++,this.isInstalled=!1,this.rootElement=null}attributeChangedCallback(e,t,n){if(this.constructor.props&&this.constructor.props[e]){const o=this.constructor.props[e];o.changed&&o.changed.call(this,n,t)}}static get observedAttributes(){return this.props?Object.keys(this.props):[]}injectObject(){let e=this.parentNode;for(;e&&!this.store&&!A.mixin.store;)this.store=e.store,e=e.parentNode||e.host;if(this.inject){let t;for(this.injection={},e=this.parentNode;e&&!t;)t=e.provide,e=e.parentNode||e.host;t&&this.inject.forEach(e=>{this.injection[e]=t[e]})}for(const e in A.mixin)this.hasOwnProperty(e)||Object.defineProperty(this,e,{get:()=>A.mixin[e]})}createRenderRoot(){if(this.constructor.isLightDOM)return this;if(this.shadowRoot){let e;for(;e=this.shadowRoot.firstChild;)this.shadowRoot.removeChild(e);return this.shadowRoot}return this.attachShadow({mode:"open"})}applyAdoptedStyleSheets(){if(this.constructor.isLightDOM||F.has(this.constructor))this.renderRoot.adoptedStyleSheets=F.get(this.constructor);else{const e=this.constructor.css;if(e){let t=[];t="string"==typeof e?[c(e)]:i(e)?e.map(e=>"string"==typeof e?c(e):e.default&&"string"==typeof e.default?c(e.default):e):e.default&&"string"==typeof e.default?[c(e.default)]:[e],t=[...A.globalCSS,...t],this.renderRoot.adoptedStyleSheets=t,F.set(this.constructor,t)}else A.globalCSS.length&&(this.renderRoot.adoptedStyleSheets=A.globalCSS)}}appendStyleVNode(e){if(this.props.css&&e){const t={nodeName:"style",attributes:{},children:[this.props.css]};e.push?e.push(t):e.children.push(t)}}connectedCallback(){this.injectObject(),this.attrsToProps(),this.install(),this.fire("install",this),this.renderRoot=this.createRenderRoot(),this.applyAdoptedStyleSheets(),e(this),this.beforeRender(),this.fire("beforeRender",this);const n=this.render(this.props,this.store);var o;this.appendStyleVNode(n),this.rendered(n),t(),this.rootElement=O(null,n,null,this,!1),i(this.rootElement)?this.rootElement.forEach(e=>{var t;null==(t=this.renderRoot)||t.appendChild(e)}):this.rootElement&&(null==(o=this.renderRoot)||o.appendChild(this.rootElement)),this.installed(),this.fire("installed",this),this.isInstalled=!0,Promise.resolve().then(()=>{this.ready(),this.fire("ready",this)})}disconnectedCallback(){this.uninstall(),this.fire("uninstall",this),this.isInstalled=!1}update(n){this.beforeUpdate(),this.fire("beforeUpdate",this),this.attrsToProps(),e(this),this.beforeRender(),this.fire("beforeRender",this);const o=this.render(this.props,this.store);this.appendStyleVNode(o),this.rendered(o),t(null),this.rootElement=O(this.rootElement,o,this.renderRoot,this,!!n),this.updated(),this.fire("updated",this)}queuedUpdate(){this.updateQueued||(this.updateQueued=!0,Promise.resolve().then(()=>{this.update(),this.updateQueued=!1}))}updateProps(e){Object.keys(e).forEach(t=>{this.props[t]=e[t],this.prevProps&&(this.prevProps[t]=e[t])}),this.update()}updateSelf(){this.update(!0)}removeProp(e){this.removeAttribute(e),this.isInstalled&&this.update()}setProp(e,t){this.setAttribute(e,t&&"object"==typeof t?JSON.stringify(t):t),this.isInstalled&&this.update()}attrsToProps(){if(this.props.ignoreAttrs)return;const e=this;e.props.css=e.getAttribute("css");const t=this.constructor.propTypes;t&&Object.keys(t).forEach(n=>{const o=i(t[n])?t[n]:[t[n]],r=e.getAttribute(n.replace(l,"-$1").toLowerCase());if(null!==r)for(let t=0;t<o.length;t++){let s=!1;switch(o[t]){case String:e.props[n]=r,s=!0;break;case Number:e.props[n]=Number(r),s=!0;break;case Boolean:e.props[n]="false"!==r&&"0"!==r,s=!0;break;case Array:case Object:try{e.props[n]=JSON.parse(r)}catch(e){console.warn(`The ${n} object prop does not comply with the JSON specification, the incorrect string is [${r}].`)}s=!0}if(s)break}else e.props[n]=e.constructor.defaultProps&&e.constructor.defaultProps.hasOwnProperty(n)?e.constructor.defaultProps[n]:null})}fire(e,t,n){const{bubbles:o,composed:r}=Object.assign({bubbles:!1,composed:!1},n),s=this.props[`on${function(e){return e.replace(/\-(\w)/g,(e,t)=>t.toUpperCase()).replace(/^\S/,e=>e.toUpperCase())}(e)}`];s?s(new CustomEvent(e,{detail:t,bubbles:o,composed:r})):this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:o,composed:r}))}install(){}installed(){}ready(){}uninstall(){}beforeUpdate(){}updated(){}beforeRender(){}rendered(e){}receiveProps(){}}function H(e,t,n){return t="string"==typeof t?document.querySelector(t):t,n&&t&&(t.store=n),O(null,e,t,null,!1)}W.is="Component",W.defaultProps=void 0,W.reflectProps=void 0,W.propTypes=void 0,W.css=void 0,W.isLightDOM=void 0,W.noSlot=void 0;const D={}.hasOwnProperty;function U(...e){const t=[];for(let n=0;n<e.length;n++){const o=e[n];if(!o)continue;const r=typeof o;if("string"===r||"number"===r)t.push(o);else if(Array.isArray(o)&&o.length){const e=U(...o);e&&t.push(e)}else if("object"===r)for(const e in o)D.call(o,e)&&o[e]&&t.push(e)}return t.join(" ")}function V(e,...t){if(e.class?(t.unshift(e.class),delete e.class):e.className&&(t.unshift(e.className),delete e.className),t.length>0)return{class:U(...t)}}let $={};function _(e,...t){let n="";if(e.forEach((e,o)=>{if(void 0!==t[o]&&"string"!=typeof t[o]&&"number"!=typeof t[o])throw new Error(`Unsupported value in CSS: ${t[o]}`);n+=e+(t[o]||"")}),$[n])return $[n];{const e=new CSSStyleSheet;return e.replaceSync(n),$[n]=e,e}}const q="7.6.9";export{W as Component,W as WeElement,p as bind,U as classNames,h as cloneElement,d as createElement,u as createRef,_ as css,L as define,L as defineElement,V as extractClass,x as globalCSS,d as h,k as mixin,v as registerDirective,H as render,M as tag,q as version}; | ||
import"weakmap-polyfill";import{setActiveComponent as e,clearActiveComponent as t}from"reactive-signal";export{Signal,batch,clearActiveComponent,computed,effect,getActiveComponent,setActiveComponent,signal,signalObject}from"reactive-signal";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},n.apply(this,arguments)}function o(e){return e.replace(/-(\w)/g,(e,t)=>t.toUpperCase())}function r(e){return e.children}function s(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}!function(){if("undefined"!=typeof document&&!("adoptedStyleSheets"in document)){var e="ShadyCSS"in window&&!ShadyCSS.nativeShadow,t=document.implementation.createHTMLDocument("boot"),n=new WeakMap,o="object"==typeof DOMException?Error:DOMException,r=Object.defineProperty,s=Array.prototype.forEach,i=/@import.+?;?$/gm,l=CSSStyleSheet.prototype;l.replace=function(){return Promise.reject(new o("Can't call replace on non-constructed CSSStyleSheets."))},l.replaceSync=function(){throw new o("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};var c=new WeakMap,a=new WeakMap,u=new WeakMap,p=j.prototype;p.replace=function(e){try{return this.replaceSync(e),Promise.resolve(this)}catch(e){return Promise.reject(e)}},p.replaceSync=function(e){if(O(this),"string"==typeof e){var t=this,n=c.get(t).ownerNode;n.textContent=function(e){var t=e.replace(i,"");return t!==e&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),t.trim()}(e),c.set(t,n.sheet),a.get(t).forEach(function(e){e.isConnected()&&N(t,P(t,e))})}},r(p,"cssRules",{configurable:!0,enumerable:!0,get:function(){return O(this),c.get(this).cssRules}}),["addImport","addPageRule","addRule","deleteRule","insertRule","removeImport","removeRule"].forEach(function(e){p[e]=function(){var t=this;O(t);var n=arguments,o=c.get(t),r=a.get(t),s=o[e].apply(o,n);return r.forEach(function(o){if(o.isConnected()){var r=P(t,o).sheet;r[e].apply(r,n)}}),s}}),r(j,Symbol.hasInstance,{configurable:!0,value:C});var d={childList:!0,subtree:!0},h=new WeakMap,f=new WeakMap,y=new WeakMap,m=new WeakMap,g=k.prototype;if(g.isConnected=function(){var e=f.get(this);return e instanceof Document?"loading"!==e.readyState:function(e){return"isConnected"in e?e.isConnected:document.contains(e)}(e.host)},g.connect=function(){var e=M(this);m.get(this).observe(e,d),y.get(this).length>0&&x(this),R(e,function(e){T(e).connect()})},g.disconnect=function(){m.get(this).disconnect()},g.update=function(e){var t=this,n=f.get(t)===document?"Document":"ShadowRoot";if(!Array.isArray(e))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Iterator getter is not callable.");if(!e.every(C))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Failed to convert value to 'CSSStyleSheet'");if(e.some(E))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Can't adopt non-constructed stylesheets");t.sheets=e;var o,r,s=y.get(t),i=(o=e).filter(function(e,t){return o.indexOf(e)===t});(r=i,s.filter(function(e){return-1===r.indexOf(e)})).forEach(function(e){var n;(n=P(e,t)).parentNode.removeChild(n),function(e,t){u.get(e).delete(t),a.set(e,a.get(e).filter(function(e){return e!==t}))}(e,t)}),y.set(t,i),t.isConnected()&&i.length>0&&x(t)},window.CSSStyleSheet=j,A(Document),"ShadowRoot"in window){A(ShadowRoot);var v=Element.prototype,b=v.attachShadow;v.attachShadow=function(e){var t=b.call(this,e);return"closed"===e.mode&&n.set(this,t),t}}var S=T(document);S.isConnected()?S.connect():document.addEventListener("DOMContentLoaded",S.connect.bind(S))}function w(e){return e.shadowRoot||n.get(e)}function C(e){return"object"==typeof e&&(p.isPrototypeOf(e)||l.isPrototypeOf(e))}function E(e){return"object"==typeof e&&l.isPrototypeOf(e)}function P(e,t){return u.get(e).get(t)}function N(e,t){requestAnimationFrame(function(){var n,o;!function(e){for(var t=0;t<e.cssRules.length;t++)e.deleteRule(0)}(t.sheet),n=c.get(e),o=t.sheet,s.call(n.cssRules,function(e,t){o.insertRule(e.cssText,t)})})}function O(e){if(!c.has(e))throw new TypeError("Illegal invocation")}function j(){var e=this,n=document.createElement("style");t.body.appendChild(n),c.set(e,n.sheet),a.set(e,[]),u.set(e,new WeakMap)}function T(e){var t=h.get(e);return t||(t=new k(e),h.set(e,t)),t}function A(e){r(e.prototype,"adoptedStyleSheets",{configurable:!0,enumerable:!0,get:function(){return T(this).sheets},set:function(e){T(this).update(e)}})}function R(e,t){for(var n=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT,function(e){return w(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},null,!1),o=void 0;o=n.nextNode();)t(w(o))}function M(e){var t=f.get(e);return t instanceof Document?t.body:t}function x(e){var t=document.createDocumentFragment(),n=y.get(e),o=m.get(e),r=M(e);o.disconnect(),n.forEach(function(n){t.appendChild(P(n,e)||function(e,t){var n=document.createElement("style");return u.get(e).set(t,n),a.get(e).push(t),n}(n,e))}),r.insertBefore(t,null),o.observe(r,d),n.forEach(function(t){N(t,P(t,e))})}function k(t){var n=this;n.sheets=[],f.set(n,t),y.set(n,[]),m.set(n,new MutationObserver(function(t,o){document?t.forEach(function(t){e||s.call(t.addedNodes,function(e){e instanceof Element&&R(e,function(e){T(e).connect()})}),s.call(t.removedNodes,function(t){t instanceof Element&&(function(e,t){return t instanceof HTMLStyleElement&&y.get(e).some(function(t){return P(t,e)})}(n,t)&&x(n),e||R(t,function(e){T(e).disconnect()}))})}):o.disconnect()}))}}(),function(){const e="undefined"!=typeof window?window:global;if(void 0===e.Reflect||void 0===e.customElements||e.customElements.hasOwnProperty("polyfillWrapFlushCallback"))return;const t=e.HTMLElement;e.HTMLElement=function(){return Reflect.construct(t,[],this.constructor)},HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)}();const l=/\B([A-Z])/g;function c(e){const t=new CSSStyleSheet;return t.replaceSync(e),t}function a(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function u(){return{}}function p(e,t,n){return{configurable:!0,get(){const e=n.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}function d(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function h(e,t,n){const o=Object.assign({merge:"uniqueMerge",default:null},n);let r=e.constructor,s=r[t],i=d(s)?0:Array.isArray(s)?1:2;if("none"===o.merge||2===i)return s;const l=0===i?Object.assign({},o.default):o.default;let c=[s];for(;r&&(r=r.__proto__,r[t]);)c.push(r[t]);let a=s;return a=0===i?c.reduce((e,t)=>d(t)?Object.assign({},l,t,e):e,{}):c.reduce((e,t)=>(Array.isArray(t)&&e.push(...t),e),[]),Array.isArray(a)&&"uniqueMerge"===o.merge&&(a=Array.from(new Set(a)),d(l)&&a.forEach((e,t)=>{d(e)&&(a[t]=Object.assign({},l,e))})),a||l}function f(e,t,...n){let o;if(t?t.ignoreAttrs=!0:t={ignoreAttrs:!0},arguments.length>2?o=n.flat():null!=t.children&&(o=t.children,delete t.children),e===r)return o;if("function"==typeof e){if(!e.tagName)return o&&(t.children=o),e(t);e=e.tagName}return{nodeName:e,children:o,attributes:t,key:t.key}}function y(e,t,...o){return f(e.nodeName,n({},e.attributes,t),o.length>0?o.flat():e.children)}Array.prototype.flat||(Array.prototype.flat=function(e=1){const t=[],n=(o,r)=>{for(const s of o)Array.isArray(s)&&r<e?n(s,r+1):t.push(s)};return n(this,0),t}),f.f=r;const m={onanimationcancel:1,oncompositionend:1,oncompositionstart:1,oncompositionupdate:1,onfocusin:1,onfocusout:1,onscrollend:1,ontouchcancel:1,ontouchend:1,ontouchmove:1,ontouchstart:1},g=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,v={};function b(e,t){v["o-"+e]=t}function S(e){let t=e.parentNode;t&&t.removeChild(e)}function w(e,t,n,o,r){if("className"===t&&(t="class"),"o"==t[0]&&"-"==t[1]&&Promise.resolve().then(()=>{var n;null==(n=v[t])||n.call(v,e,o)}),"key"===t||"ignoreAttrs"===t);else if("ref"===t)s(n,null),s(o,e);else if("class"!==t||r)if("style"===t)if("string"==typeof o)e.style.cssText=o;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)o&&t in o||E(e.style,t,"");if(o)for(t in o)n&&o[t]===n[t]||E(e.style,t,o[t])}else if("unsafeHTML"===t)o&&(e.innerHTML=o.html||o||"");else if("o"==t[0]&&"n"==t[1])!function(e,t,n,o){let r=t!==(t=t.replace(/Capture$/,"")),s=t.toLowerCase();t=(m[s]||s in e?s:t).slice(2),n?o||e.addEventListener(t,C,r):e.removeEventListener(t,C,r),(e._listeners||(e._listeners={}))[t]=n}(e,t,o,n);else if("INPUT"===e.nodeName&&"value"===t)e.value=null==o?"":o;else if("list"!==t&&"type"!==t&&"css"!==t&&!r&&t in e){try{e[t]=null==o?"":o}catch(e){}null!=o&&!1!==o||"spellcheck"==t||e.removeAttribute(t)}else{let n=r&&t!==(t=t.replace(/^xlink:?/,""));if(null==o||!1===o)n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t);else if("function"!=typeof o)if(n)e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o);else if("Component"===e.constructor.is){var i;const n=null==(i=e.constructor.reflectProps)?void 0:i[t];n&&e.setAttribute(t,"function"==typeof n?n(o):o)}else e.setAttribute(t,o)}else e.className=o||""}function C(e){return this._listeners[e.type](e)}function E(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n.toString()):e[t]=null==n?"":"number"!=typeof n||g.test(t)?n.toString():n+"px"}let P=0,N=!1,O=!1,j=!1;function T(e,t,n,o,r){if(!e&&!t)return null;let s;var l;return P++||(N=null!=n&&void 0!==n.ownerSVGElement,j=!1),i(t)?n?(R(n,t,j,o,r),s=n.childNodes):(s=[],t.forEach((t,n)=>{let i=A(0===n?e:null,t,o,r);s.push(i)})):(i(e)||e instanceof NodeList?[...e].forEach((e,n)=>{0===n?s=A(e,t,o,r):M(e,!1)}):s=A(e,t,o,r),n&&(null==(l=s)?void 0:l.parentNode)!==n&&n.appendChild(s)),--P||(j=!1),s}function A(e,t,n,r){e&&t&&e.props&&(e.props.children=t.children);let s=e,i=N,l=O;var c;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||n)?e.nodeValue!=t&&(e.nodeValue=String(t)):(s=document.createTextNode(String(t)),e&&(e.parentNode&&(null==(c=e.parentNode)||c.replaceChild(s,e)),M(e,!0))),s&&(s.prevProps={}),s;let u=t.nodeName;var p;if(O="foreignObject"===u,N="svg"===u||!O&&N,u=String(u),(!e||!a(e,u))&&(s=function(e,t){let n=O||N?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}(u),"Component"===(null==(p=s.constructor)?void 0:p.is)&&Object.assign(s.props,t.attributes),e)){for(var d;e.firstChild;)s.appendChild(e.firstChild);e.parentNode&&(null==(d=e.parentNode)||d.replaceChild(s,e)),M(e,!0)}let h=s.firstChild,f=s.prevProps,y=t.children;if(null==f){f=s.prevProps={};for(let e=s.attributes,t=e.length;t--;)f[e[t].name]=e[t].value}return!j&&y&&1===y.length&&"string"==typeof y[0]&&null!=h&&void 0!==h.splitText&&null==h.nextSibling?h.nodeValue!=y[0]&&(h.nodeValue=y[0]):(y&&y.length||null!=h)&&("Component"==s.constructor.is&&s.constructor.noSlot||R(s,y,j||null!=f.unsafeHTML,n,r)),function(e,t,n,r,s){let i,l,c=e.update;for(i in e.receiveProps&&(l=Object.assign({},n)),n)t&&null!=t[i]||null==n[i]||(w(e,i,n[i],n[i]=void 0,O||N),c&&delete e.props[i]);for(i in t)if(c&&"object"==typeof t[i]&&"ref"!==i){("style"===i||"o"===i[0]&&"-"===i[1])&&w(e,i,n[i],n[i]=t[i],O||N);let r=o(i);e.props[r]=n[r]=t[i]}else if("children"!==i&&(!(i in n)||t[i]!==("value"===i||"checked"===i?e[i]:n[i])))if(w(e,i,n[i],t[i],O||N),-1!==e.nodeName.indexOf("-")){e.props=e.props||{};let r=o(i);e.props[r]=n[r]=t[i]}else n[i]=t[i];c&&!s&&e.parentNode&&!1!==e.receiveProps(e.props,l)&&e.queuedUpdate()}(s,t.attributes,f,0,r),s.props&&(s.props.children=t.children),N=i,O=l,s}function R(e,t,n,o,r){let s,i,l,c,u,p=e.childNodes,d=[],h={},f=0,y=0,m=p.length,g=0,v=t?t.length:0;if(0!==m)for(let e=0;e<m;e++){var b;let t=p[e],o=t.prevProps,r=v&&o?o.key:null;null!=r?(f++,h[r]=t):(o||(void 0!==t.splitText?!n||(null==(b=t.nodeValue)?void 0:b.trim()):n))&&(d[g++]=t)}if(0!==v)for(let n=0;n<v;n++){if(c=t[n],u=null,c){let e=c.key;if(null!=e)f&&void 0!==h[e]&&(u=h[e],h[e]=void 0,f--);else if(y<g)for(s=y;s<g;s++)if(void 0!==d[s]&&(w=i=d[s],"string"==typeof(C=c)||"number"==typeof C?void 0!==w.splitText:a(w,C.nodeName))){u=i,d[s]=void 0,s===g-1&&g--,s===y&&y++;break}}u=A(u,c,o,r),l=p[n],u&&u!==e&&u!==l&&(null==l?e.appendChild(u):u===l.nextSibling?S(l):e.insertBefore(u,l))}var w,C;if(f)for(let e in h)void 0!==h[e]&&M(h[e],!1);for(;y<=g;)void 0!==(u=d[g--])&&M(u,!1)}function M(e,t){null!=e.prevProps&&e.prevProps.ref&&("function"==typeof e.prevProps.ref?e.prevProps.ref(null):e.prevProps.ref.current&&(e.prevProps.ref.current=null)),!1!==t&&null!=e.prevProps||S(e),function(e){var t;for(e=null==(t=e)?void 0:t.lastChild;e;){let t=e.previousSibling;M(e,!0),e=t}}(e)}const x={mixin:{},globalCSS:[]};function k(e){Object.assign(x.mixin,e)}function L(e){x.globalCSS.includes(e)||x.globalCSS.push(e)}function I(e,t){Object.defineProperty(t,"tagName",{value:e,writable:!1}),customElements.get(e)?console.warn(`Failed to execute 'define' on 'CustomElementRegistry': the tag name "${e}" has already been used with this registry`):customElements.define(e,t)}function F(e){return function(t){I(e,t)}}let W=0;const H=new WeakMap;class V extends HTMLElement{static define(e){I(e,this)}constructor(){super(),this.elementId=void 0,this.isInstalled=void 0,this.inject=void 0,this.injection=void 0,this.renderRoot=void 0,this.rootElement=void 0,this.state=void 0,this.updateQueued=!1,this.handleProps(),this.elementId=W++,this.isInstalled=!1,this.rootElement=null}handleProps(){this.constructor.defaultProps=h(this,"defaultProps",{default:{}})||{},this.constructor.propTypes=h(this,"propTypes",{default:{}})||{},this.constructor.reflectProps=h(this,"reflectProps",{default:{}})||{};const e=h(this,"props",{default:{},merge:"uniqueMerge"});if(this.constructor.props)for(const t in e){const n=e[t];this.constructor.defaultProps[t]=n.default,this.constructor.propTypes[t]=n.type,this.constructor.reflectProps[t]=n.reflect}this.props=Object.assign({},this.constructor.defaultProps,this.props)}attributeChangedCallback(e,t,n){if(this.constructor.props&&this.constructor.props[e]){const o=this.constructor.props[e];if(o.changed){const r=this.getTypeValueOfProp(e,n),s=this.getTypeValueOfProp(e,t);o.changed.call(this,r,s)}}}setState(e,t=!1){if("object"!=typeof e)throw new Error("takes an object of state variables to update");Object.keys(e).forEach(t=>this.state[t]=e[t]),t||this.queuedUpdate()}static get observedAttributes(){return this.props?Object.keys(this.props):[]}injectObject(){let e=this.parentNode;for(;e&&!this.store&&!x.mixin.store;)this.store=e.store,e=e.parentNode||e.host;if(this.inject){let t;for(this.injection={},e=this.parentNode;e&&!t;)t=e.provide,e=e.parentNode||e.host;t&&this.inject.forEach(e=>{this.injection[e]=t[e]})}for(const e in x.mixin)this.hasOwnProperty(e)||Object.defineProperty(this,e,{get:()=>x.mixin[e]})}createRenderRoot(){if(this.constructor.isLightDOM)return this;if(this.shadowRoot){let e;for(;e=this.shadowRoot.firstChild;)this.shadowRoot.removeChild(e);return this.shadowRoot}return this.attachShadow({mode:"open"})}applyAdoptedStyleSheets(){if(this.constructor.isLightDOM||H.has(this.constructor))this.renderRoot.adoptedStyleSheets=H.get(this.constructor);else{const e=this.constructor.css;if(e){let t=[];t="string"==typeof e?[c(e)]:i(e)?e.map(e=>"string"==typeof e?c(e):e.default&&"string"==typeof e.default?c(e.default):e):e.default&&"string"==typeof e.default?[c(e.default)]:[e],t=[...x.globalCSS,...t],this.renderRoot.adoptedStyleSheets=t,H.set(this.constructor,t)}else x.globalCSS.length&&(this.renderRoot.adoptedStyleSheets=x.globalCSS)}}appendStyleVNode(e){if(this.props.css&&e){const t={nodeName:"style",attributes:{},children:[this.props.css]};e.push?e.push(t):e.children.push(t)}}connectedCallback(){this.injectObject(),this.attrsToProps(),this.install(),this.fire("install",this),this.renderRoot=this.createRenderRoot(),this.applyAdoptedStyleSheets(),e(this),this.beforeRender(),this.fire("beforeRender",this);const n=this.render(this.props,this.store);var o;this.appendStyleVNode(n),this.rendered(n),t(),this.rootElement=T(null,n,null,this,!1),i(this.rootElement)?this.rootElement.forEach(e=>{var t;null==(t=this.renderRoot)||t.appendChild(e)}):this.rootElement&&(null==(o=this.renderRoot)||o.appendChild(this.rootElement)),this.installed(),this.fire("installed",this),this.isInstalled=!0,Promise.resolve().then(()=>{this.ready(),this.fire("ready",this)})}disconnectedCallback(){this.uninstall(),this.fire("uninstall",this),this.isInstalled=!1}update(n){this.beforeUpdate(),this.fire("beforeUpdate",this),this.attrsToProps(),e(this),this.beforeRender(),this.fire("beforeRender",this);const o=this.render(this.props,this.store);this.appendStyleVNode(o),this.rendered(o),t(null),this.rootElement=T(this.rootElement,o,this.renderRoot,this,!!n),this.updated(),this.fire("updated",this)}queuedUpdate(){this.updateQueued||(this.updateQueued=!0,Promise.resolve().then(()=>{this.update(),this.updateQueued=!1}))}updateProps(e){Object.keys(e).forEach(t=>{this.props[t]=e[t],this.prevProps&&(this.prevProps[t]=e[t])}),this.update()}updateSelf(){this.update(!0)}removeProp(e){this.removeAttribute(e),this.isInstalled&&this.update()}setProp(e,t){this.setAttribute(e,t&&"object"==typeof t?JSON.stringify(t):t),this.isInstalled&&this.update()}attrsToProps(){if(this.props.ignoreAttrs)return;const e=this;e.props.css=e.getAttribute("css");const t=this.constructor.propTypes;t&&Object.keys(t).forEach(t=>{const n=e.getAttribute(t.replace(l,"-$1").toLowerCase());e.props[t]=null!==n?this.getTypeValueOfProp(t,n):e.constructor.defaultProps&&e.constructor.defaultProps.hasOwnProperty(t)?e.constructor.defaultProps[t]:null})}getTypeValueOfProp(e,t){const n=this.constructor.propTypes,o=i(n[e])?n[e]:[n[e]];for(let n=0;n<o.length;n++)switch(o[n]){case String:return t;case Number:return Number(t);case Boolean:return Boolean("false"!==t&&"0"!==t);case Array:case Object:try{return JSON.parse(t)}catch(n){console.warn(`The ${e} object prop does not comply with the JSON specification, the incorrect string is [${t}].`)}}}fire(e,t,n){const{bubbles:o,composed:r}=Object.assign({bubbles:!1,composed:!1},n),s=this.props[`on${function(e){return e.replace(/\-(\w)/g,(e,t)=>t.toUpperCase()).replace(/^\S/,e=>e.toUpperCase())}(e)}`];s?s(new CustomEvent(e,{detail:t,bubbles:o,composed:r})):this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:o,composed:r}))}install(){}installed(){}ready(){}uninstall(){}beforeUpdate(){}updated(){}beforeRender(){}rendered(e){}receiveProps(){}}function D(e,t,n){return t="string"==typeof t?document.querySelector(t):t,n&&t&&(t.store=n),T(null,e,t,null,!1)}V.is="Component",V.defaultProps=void 0,V.reflectProps=void 0,V.propTypes=void 0,V.css=void 0,V.isLightDOM=void 0,V.noSlot=void 0;const U={}.hasOwnProperty;function _(...e){const t=[];for(let n=0;n<e.length;n++){const o=e[n];if(!o)continue;const r=typeof o;if("string"===r||"number"===r)t.push(o);else if(Array.isArray(o)&&o.length){const e=_(...o);e&&t.push(e)}else if("object"===r)for(const e in o)U.call(o,e)&&o[e]&&t.push(e)}return t.join(" ")}function $(e,...t){if(e.class?(t.unshift(e.class),delete e.class):e.className&&(t.unshift(e.className),delete e.className),t.length>0)return{class:_(...t)}}let q={};function B(e,...t){let n="";if(e.forEach((e,o)=>{if(void 0!==t[o]&&"string"!=typeof t[o]&&"number"!=typeof t[o])throw new Error(`Unsupported value in CSS: ${t[o]}`);n+=e+(t[o]||"")}),q[n])return q[n];{const e=new CSSStyleSheet;return e.replaceSync(n),q[n]=e,e}}const J="7.6.10";export{V as Component,V as WeElement,p as bind,_ as classNames,y as cloneElement,f as createElement,u as createRef,B as css,I as define,I as defineElement,$ as extractClass,L as globalCSS,f as h,k as mixin,b as registerDirective,D as render,F as tag,J as version}; | ||
//# sourceMappingURL=omi.modern.js.map |
@@ -1,2 +0,2 @@ | ||
import"weakmap-polyfill";import{setActiveComponent as e,clearActiveComponent as t}from"reactive-signal";export{Signal,batch,clearActiveComponent,computed,effect,getActiveComponent,setActiveComponent,signal,signalObject}from"reactive-signal";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e,t,n){return i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i},i.apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return i(e,arguments,r(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),o(n,e)},s(e)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function l(e){return e.children}function u(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}function p(e){return"[object Array]"===Object.prototype.toString.call(e)}!function(){if("undefined"!=typeof document&&!("adoptedStyleSheets"in document)){var e="ShadyCSS"in window&&!ShadyCSS.nativeShadow,t=document.implementation.createHTMLDocument("boot"),n=new WeakMap,r="object"==typeof DOMException?Error:DOMException,o=Object.defineProperty,i=Array.prototype.forEach,s=/@import.+?;?$/gm,c=CSSStyleSheet.prototype;c.replace=function(){return Promise.reject(new r("Can't call replace on non-constructed CSSStyleSheets."))},c.replaceSync=function(){throw new r("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};var a=new WeakMap,l=new WeakMap,u=new WeakMap,p=j.prototype;p.replace=function(e){try{return this.replaceSync(e),Promise.resolve(this)}catch(e){return Promise.reject(e)}},p.replaceSync=function(e){if(N(this),"string"==typeof e){var t=this,n=a.get(t).ownerNode;n.textContent=function(e){var t=e.replace(s,"");return t!==e&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),t.trim()}(e),a.set(t,n.sheet),l.get(t).forEach(function(e){e.isConnected()&&O(t,P(t,e))})}},o(p,"cssRules",{configurable:!0,enumerable:!0,get:function(){return N(this),a.get(this).cssRules}}),["addImport","addPageRule","addRule","deleteRule","insertRule","removeImport","removeRule"].forEach(function(e){p[e]=function(){var t=this;N(t);var n=arguments,r=a.get(t),o=l.get(t),i=r[e].apply(r,n);return o.forEach(function(r){if(r.isConnected()){var o=P(t,r).sheet;o[e].apply(o,n)}}),i}}),o(j,Symbol.hasInstance,{configurable:!0,value:C});var f={childList:!0,subtree:!0},d=new WeakMap,h=new WeakMap,v=new WeakMap,y=new WeakMap,m=M.prototype;if(m.isConnected=function(){var e=h.get(this);return e instanceof Document?"loading"!==e.readyState:function(e){return"isConnected"in e?e.isConnected:document.contains(e)}(e.host)},m.connect=function(){var e=k(this);y.get(this).observe(e,f),v.get(this).length>0&&x(this),A(e,function(e){R(e).connect()})},m.disconnect=function(){y.get(this).disconnect()},m.update=function(e){var t=this,n=h.get(t)===document?"Document":"ShadowRoot";if(!Array.isArray(e))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Iterator getter is not callable.");if(!e.every(C))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Failed to convert value to 'CSSStyleSheet'");if(e.some(E))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Can't adopt non-constructed stylesheets");t.sheets=e;var r,o,i=v.get(t),s=(r=e).filter(function(e,t){return r.indexOf(e)===t});(o=s,i.filter(function(e){return-1===o.indexOf(e)})).forEach(function(e){var n;(n=P(e,t)).parentNode.removeChild(n),function(e,t){u.get(e).delete(t),l.set(e,l.get(e).filter(function(e){return e!==t}))}(e,t)}),v.set(t,s),t.isConnected()&&s.length>0&&x(t)},window.CSSStyleSheet=j,T(Document),"ShadowRoot"in window){T(ShadowRoot);var b=Element.prototype,g=b.attachShadow;b.attachShadow=function(e){var t=g.call(this,e);return"closed"===e.mode&&n.set(this,t),t}}var S=R(document);S.isConnected()?S.connect():document.addEventListener("DOMContentLoaded",S.connect.bind(S))}function w(e){return e.shadowRoot||n.get(e)}function C(e){return"object"==typeof e&&(p.isPrototypeOf(e)||c.isPrototypeOf(e))}function E(e){return"object"==typeof e&&c.isPrototypeOf(e)}function P(e,t){return u.get(e).get(t)}function O(e,t){requestAnimationFrame(function(){var n,r;!function(e){for(var t=0;t<e.cssRules.length;t++)e.deleteRule(0)}(t.sheet),n=a.get(e),r=t.sheet,i.call(n.cssRules,function(e,t){r.insertRule(e.cssText,t)})})}function N(e){if(!a.has(e))throw new TypeError("Illegal invocation")}function j(){var e=this,n=document.createElement("style");t.body.appendChild(n),a.set(e,n.sheet),l.set(e,[]),u.set(e,new WeakMap)}function R(e){var t=d.get(e);return t||(t=new M(e),d.set(e,t)),t}function T(e){o(e.prototype,"adoptedStyleSheets",{configurable:!0,enumerable:!0,get:function(){return R(this).sheets},set:function(e){R(this).update(e)}})}function A(e,t){for(var n=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT,function(e){return w(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},null,!1),r=void 0;r=n.nextNode();)t(w(r))}function k(e){var t=h.get(e);return t instanceof Document?t.body:t}function x(e){var t=document.createDocumentFragment(),n=v.get(e),r=y.get(e),o=k(e);r.disconnect(),n.forEach(function(n){t.appendChild(P(n,e)||function(e,t){var n=document.createElement("style");return u.get(e).set(t,n),l.get(e).push(t),n}(n,e))}),o.insertBefore(t,null),r.observe(o,f),n.forEach(function(t){O(t,P(t,e))})}function M(t){var n=this;n.sheets=[],h.set(n,t),v.set(n,[]),y.set(n,new MutationObserver(function(t,r){document?t.forEach(function(t){e||i.call(t.addedNodes,function(e){e instanceof Element&&A(e,function(e){R(e).connect()})}),i.call(t.removedNodes,function(t){t instanceof Element&&(function(e,t){return t instanceof HTMLStyleElement&&v.get(e).some(function(t){return P(t,e)})}(n,t)&&x(n),e||A(t,function(e){R(e).disconnect()}))})}):r.disconnect()}))}}(),function(){var e="undefined"!=typeof window?window:global;if(void 0!==e.Reflect&&void 0!==e.customElements&&!e.customElements.hasOwnProperty("polyfillWrapFlushCallback")){var t=e.HTMLElement;e.HTMLElement=function(){return Reflect.construct(t,[],this.constructor)},HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)}}();var f=/\B([A-Z])/g;function d(e){var t=new CSSStyleSheet;return t.replaceSync(e),t}function h(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function v(){return{}}function y(e,t,n){return{configurable:!0,get:function(){var e=n.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}function m(e,t){var n;if(t?t.ignoreAttrs=!0:t={ignoreAttrs:!0},arguments.length>2?n=[].slice.call(arguments,2).flat():null!=t.children&&(n=t.children,delete t.children),e===l)return n;if("function"==typeof e){if(!e.tagName)return n&&(t.children=n),e(t);e=e.tagName}return{nodeName:e,children:n,attributes:t,key:t.key}}function b(e,t){var r=[].slice.call(arguments,2);return m(e.nodeName,n({},e.attributes,t),r.length>0?r.flat():e.children)}Array.prototype.flat||(Array.prototype.flat=function(e){void 0===e&&(e=1);var t=[];return function n(r,o){for(var i,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r);!(i=s()).done;){var a=i.value;Array.isArray(a)&&o<e?n(a,o+1):t.push(a)}}(this,0),t}),m.f=l;var g={onanimationcancel:1,oncompositionend:1,oncompositionstart:1,oncompositionupdate:1,onfocusin:1,onfocusout:1,onscrollend:1,ontouchcancel:1,ontouchend:1,ontouchmove:1,ontouchstart:1},S=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,w={};function C(e,t){w["o-"+e]=t}function E(e){var t=e.parentNode;t&&t.removeChild(e)}function P(e,t,n,r,o){if("className"===t&&(t="class"),"o"==t[0]&&"-"==t[1]&&Promise.resolve().then(function(){var n;null==(n=w[t])||n.call(w,e,r)}),"key"===t||"ignoreAttrs"===t);else if("ref"===t)u(n,null),u(r,e);else if("class"!==t||o)if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||N(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||N(e.style,t,r[t])}else if("unsafeHTML"===t)r&&(e.innerHTML=r.html||r||"");else if("o"==t[0]&&"n"==t[1])!function(e,t,n,r){var o=t!==(t=t.replace(/Capture$/,"")),i=t.toLowerCase();t=(g[i]||i in e?i:t).slice(2),n?r||e.addEventListener(t,O,o):e.removeEventListener(t,O,o),(e._listeners||(e._listeners={}))[t]=n}(e,t,r,n);else if("INPUT"===e.nodeName&&"value"===t)e.value=null==r?"":r;else if("list"!==t&&"type"!==t&&"css"!==t&&!o&&t in e){try{e[t]=null==r?"":r}catch(e){}null!=r&&!1!==r||"spellcheck"==t||e.removeAttribute(t)}else{var i=o&&t!==(t=t.replace(/^xlink:?/,""));if(null==r||!1===r)i?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t);else if("function"!=typeof r)if(i)e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r);else if("Component"===e.constructor.is){var s,c=null==(s=e.constructor.reflectProps)?void 0:s[t];c&&e.setAttribute(t,"function"==typeof c?c(r):r)}else e.setAttribute(t,r)}else e.className=r||""}function O(e){return this._listeners[e.type](e)}function N(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n.toString()):e[t]=null==n?"":"number"!=typeof n||S.test(t)?n.toString():n+"px"}var j=0,R=!1,T=!1,A=!1;function k(e,t,n,r,o){return e||t?(j++||(R=null!=n&&void 0!==n.ownerSVGElement,A=!1),p(t)?n?(M(n,t,A,r,o),i=n.childNodes):(i=[],t.forEach(function(t,n){var s=x(0===n?e:null,t,r,o);i.push(s)})):(p(e)||e instanceof NodeList?[].concat(e).forEach(function(e,n){0===n?i=x(e,t,r,o):L(e,!1)}):i=x(e,t,r,o),n&&(null==(s=i)?void 0:s.parentNode)!==n&&n.appendChild(i)),--j||(A=!1),i):null;var i,s}function x(e,t,n,r){e&&t&&e.props&&(e.props.children=t.children);var o,i=e,s=R,c=T;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||n)?e.nodeValue!=t&&(e.nodeValue=String(t)):(i=document.createTextNode(String(t)),e&&(e.parentNode&&(null==(o=e.parentNode)||o.replaceChild(i,e)),L(e,!0))),i&&(i.prevProps={}),i;var l,u,p,f=t.nodeName;if(T="foreignObject"===f,R="svg"===f||!T&&R,f=String(f),(!e||!h(e,f))&&(u=f,(p=T||R?document.createElementNS("http://www.w3.org/2000/svg",u):document.createElement(u)).normalizedNodeName=u,"Component"===(null==(l=(i=p).constructor)?void 0:l.is)&&Object.assign(i.props,t.attributes),e)){for(var d;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&(null==(d=e.parentNode)||d.replaceChild(i,e)),L(e,!0)}var v=i.firstChild,y=i.prevProps,m=t.children;if(null==y){y=i.prevProps={};for(var b=i.attributes,g=b.length;g--;)y[b[g].name]=b[g].value}return!A&&m&&1===m.length&&"string"==typeof m[0]&&null!=v&&void 0!==v.splitText&&null==v.nextSibling?v.nodeValue!=m[0]&&(v.nodeValue=m[0]):(m&&m.length||null!=v)&&("Component"==i.constructor.is&&i.constructor.noSlot||M(i,m,A||null!=y.unsafeHTML,n,r)),function(e,t,n,r,o){var i,s,c=e.update;for(i in e.receiveProps&&(s=Object.assign({},n)),n)t&&null!=t[i]||null==n[i]||(P(e,i,n[i],n[i]=void 0,T||R),c&&delete e.props[i]);for(i in t)if(c&&"object"==typeof t[i]&&"ref"!==i){("style"===i||"o"===i[0]&&"-"===i[1])&&P(e,i,n[i],n[i]=t[i],T||R);var l=a(i);e.props[l]=n[l]=t[i]}else if("children"!==i&&(!(i in n)||t[i]!==("value"===i||"checked"===i?e[i]:n[i])))if(P(e,i,n[i],t[i],T||R),-1!==e.nodeName.indexOf("-")){e.props=e.props||{};var u=a(i);e.props[u]=n[u]=t[i]}else n[i]=t[i];c&&!o&&e.parentNode&&!1!==e.receiveProps(e.props,s)&&e.queuedUpdate()}(i,t.attributes,y,0,r),i.props&&(i.props.children=t.children),R=s,T=c,i}function M(e,t,n,r,o){var i,s,c,a,l,u,p,f=e.childNodes,d=[],v={},y=0,m=0,b=f.length,g=0,S=t?t.length:0;if(0!==b)for(var w=0;w<b;w++){var C,P=f[w],O=P.prevProps,N=S&&O?O.key:null;null!=N?(y++,v[N]=P):(O||(void 0!==P.splitText?!n||(null==(C=P.nodeValue)?void 0:C.trim()):n))&&(d[g++]=P)}if(0!==S)for(var j=0;j<S;j++){if(l=null,a=t[j]){var R=a.key;if(null!=R)y&&void 0!==v[R]&&(l=v[R],v[R]=void 0,y--);else if(m<g)for(i=m;i<g;i++)if(void 0!==d[i]&&(u=s=d[i],"string"==typeof(p=a)||"number"==typeof p?void 0!==u.splitText:h(u,p.nodeName))){l=s,d[i]=void 0,i===g-1&&g--,i===m&&m++;break}}l=x(l,a,r,o),c=f[j],l&&l!==e&&l!==c&&(null==c?e.appendChild(l):l===c.nextSibling?E(c):e.insertBefore(l,c))}if(y)for(var T in v)void 0!==v[T]&&L(v[T],!1);for(;m<=g;)void 0!==(l=d[g--])&&L(l,!1)}function L(e,t){null!=e.prevProps&&e.prevProps.ref&&("function"==typeof e.prevProps.ref?e.prevProps.ref(null):e.prevProps.ref.current&&(e.prevProps.ref.current=null)),!1!==t&&null!=e.prevProps||E(e),function(e){var t;for(e=null==(t=e)?void 0:t.lastChild;e;){var n=e.previousSibling;L(e,!0),e=n}}(e)}var I={mixin:{},globalCSS:[]};function F(e){Object.assign(I.mixin,e)}function _(e){I.globalCSS.includes(e)||I.globalCSS.push(e)}function W(e,t){Object.defineProperty(t,"tagName",{value:e,writable:!1}),customElements.get(e)?console.warn("Failed to execute 'define' on 'CustomElementRegistry': the tag name \""+e+'" has already been used with this registry'):customElements.define(e,t)}function H(e){return function(t){W(e,t)}}var D=0,U=new WeakMap,V=/*#__PURE__*/function(n){var r,i;function s(){var e;if((e=n.call(this)||this).elementId=void 0,e.isInstalled=void 0,e.inject=void 0,e.injection=void 0,e.renderRoot=void 0,e.rootElement=void 0,e.updateQueued=!1,e.constructor.defaultProps||(e.constructor.defaultProps={}),e.constructor.propTypes||(e.constructor.propTypes={}),e.constructor.reflectProps||(e.constructor.reflectProps={}),e.constructor.props)for(var t in e.constructor.props){var r=e.constructor.props[t];e.constructor.defaultProps[t]=r.default,e.constructor.propTypes[t]=r.type,e.constructor.reflectProps[t]=r.reflect}return e.props=Object.assign({},e.constructor.defaultProps,e.props),e.elementId=D++,e.isInstalled=!1,e.rootElement=null,e}i=n,(r=s).prototype=Object.create(i.prototype),r.prototype.constructor=r,o(r,i),s.define=function(e){W(e,this)};var c,a,l=s.prototype;return l.attributeChangedCallback=function(e,t,n){if(this.constructor.props&&this.constructor.props[e]){var r=this.constructor.props[e];r.changed&&r.changed.call(this,n,t)}},l.injectObject=function(){for(var e=this,t=this.parentNode;t&&!this.store&&!I.mixin.store;)this.store=t.store,t=t.parentNode||t.host;if(this.inject){var n;for(this.injection={},t=this.parentNode;t&&!n;)n=t.provide,t=t.parentNode||t.host;n&&this.inject.forEach(function(t){e.injection[t]=n[t]})}var r=function(t){e.hasOwnProperty(t)||Object.defineProperty(e,t,{get:function(){return I.mixin[t]}})};for(var o in I.mixin)r(o)},l.createRenderRoot=function(){if(this.constructor.isLightDOM)return this;if(this.shadowRoot){for(var e;e=this.shadowRoot.firstChild;)this.shadowRoot.removeChild(e);return this.shadowRoot}return this.attachShadow({mode:"open"})},l.applyAdoptedStyleSheets=function(){if(this.constructor.isLightDOM||U.has(this.constructor))this.renderRoot.adoptedStyleSheets=U.get(this.constructor);else{var e=this.constructor.css;if(e){var t=[];t="string"==typeof e?[d(e)]:p(e)?e.map(function(e){return"string"==typeof e?d(e):e.default&&"string"==typeof e.default?d(e.default):e}):e.default&&"string"==typeof e.default?[d(e.default)]:[e],t=[].concat(I.globalCSS,t),this.renderRoot.adoptedStyleSheets=t,U.set(this.constructor,t)}else I.globalCSS.length&&(this.renderRoot.adoptedStyleSheets=I.globalCSS)}},l.appendStyleVNode=function(e){if(this.props.css&&e){var t={nodeName:"style",attributes:{},children:[this.props.css]};e.push?e.push(t):e.children.push(t)}},l.connectedCallback=function(){var n=this;this.injectObject(),this.attrsToProps(),this.install(),this.fire("install",this),this.renderRoot=this.createRenderRoot(),this.applyAdoptedStyleSheets(),e(this),this.beforeRender(),this.fire("beforeRender",this);var r,o=this.render(this.props,this.store);this.appendStyleVNode(o),this.rendered(o),t(),this.rootElement=k(null,o,null,this,!1),p(this.rootElement)?this.rootElement.forEach(function(e){var t;null==(t=n.renderRoot)||t.appendChild(e)}):this.rootElement&&(null==(r=this.renderRoot)||r.appendChild(this.rootElement)),this.installed(),this.fire("installed",this),this.isInstalled=!0,Promise.resolve().then(function(){n.ready(),n.fire("ready",n)})},l.disconnectedCallback=function(){this.uninstall(),this.fire("uninstall",this),this.isInstalled=!1},l.update=function(n){this.beforeUpdate(),this.fire("beforeUpdate",this),this.attrsToProps(),e(this),this.beforeRender(),this.fire("beforeRender",this);var r=this.render(this.props,this.store);this.appendStyleVNode(r),this.rendered(r),t(null),this.rootElement=k(this.rootElement,r,this.renderRoot,this,!!n),this.updated(),this.fire("updated",this)},l.queuedUpdate=function(){var e=this;this.updateQueued||(this.updateQueued=!0,Promise.resolve().then(function(){e.update(),e.updateQueued=!1}))},l.updateProps=function(e){var t=this;Object.keys(e).forEach(function(n){t.props[n]=e[n],t.prevProps&&(t.prevProps[n]=e[n])}),this.update()},l.updateSelf=function(){this.update(!0)},l.removeProp=function(e){this.removeAttribute(e),this.isInstalled&&this.update()},l.setProp=function(e,t){this.setAttribute(e,t&&"object"==typeof t?JSON.stringify(t):t),this.isInstalled&&this.update()},l.attrsToProps=function(){if(!this.props.ignoreAttrs){var e=this;e.props.css=e.getAttribute("css");var t=this.constructor.propTypes;t&&Object.keys(t).forEach(function(n){var r=p(t[n])?t[n]:[t[n]],o=e.getAttribute(n.replace(f,"-$1").toLowerCase());if(null!==o)for(var i=0;i<r.length;i++){var s=!1;switch(r[i]){case String:e.props[n]=o,s=!0;break;case Number:e.props[n]=Number(o),s=!0;break;case Boolean:e.props[n]="false"!==o&&"0"!==o,s=!0;break;case Array:case Object:try{e.props[n]=JSON.parse(o)}catch(e){console.warn("The "+n+" object prop does not comply with the JSON specification, the incorrect string is ["+o+"].")}s=!0}if(s)break}else e.props[n]=e.constructor.defaultProps&&e.constructor.defaultProps.hasOwnProperty(n)?e.constructor.defaultProps[n]:null})}},l.fire=function(e,t,n){var r=Object.assign({bubbles:!1,composed:!1},n),o=r.bubbles,i=r.composed,s=this.props["on"+function(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()}).replace(/^\S/,function(e){return e.toUpperCase()})}(e)];s?s(new CustomEvent(e,{detail:t,bubbles:o,composed:i})):this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:o,composed:i}))},l.install=function(){},l.installed=function(){},l.ready=function(){},l.uninstall=function(){},l.beforeUpdate=function(){},l.updated=function(){},l.beforeRender=function(){},l.rendered=function(e){},l.receiveProps=function(){},c=s,(a=[{key:"observedAttributes",get:function(){return this.props?Object.keys(this.props):[]}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?o:String(o),r)}var o}(c,a),Object.defineProperty(c,"prototype",{writable:!1}),s}(/*#__PURE__*/s(HTMLElement));function B(e,t,n){return t="string"==typeof t?document.querySelector(t):t,n&&t&&(t.store=n),k(null,e,t,null,!1)}V.is="Component",V.defaultProps=void 0,V.reflectProps=void 0,V.propTypes=void 0,V.css=void 0,V.isLightDOM=void 0,V.noSlot=void 0;var $={}.hasOwnProperty;function q(){for(var e=[].slice.call(arguments),t=[],n=0;n<e.length;n++){var r=e[n];if(r){var o=typeof r;if("string"===o||"number"===o)t.push(r);else if(Array.isArray(r)&&r.length){var i=q.apply(void 0,r);i&&t.push(i)}else if("object"===o)for(var s in r)$.call(r,s)&&r[s]&&t.push(s)}}return t.join(" ")}function J(e){var t=[].slice.call(arguments,1);if(e.class?(t.unshift(e.class),delete e.class):e.className&&(t.unshift(e.className),delete e.className),t.length>0)return{class:q.apply(void 0,t)}}var Q={};function z(e){var t=[].slice.call(arguments,1),n="";if(e.forEach(function(e,r){if(void 0!==t[r]&&"string"!=typeof t[r]&&"number"!=typeof t[r])throw new Error("Unsupported value in CSS: "+t[r]);n+=e+(t[r]||"")}),Q[n])return Q[n];var r=new CSSStyleSheet;return r.replaceSync(n),Q[n]=r,r}var G="7.6.9";export{V as Component,V as WeElement,y as bind,q as classNames,b as cloneElement,m as createElement,v as createRef,z as css,W as define,W as defineElement,J as extractClass,_ as globalCSS,m as h,F as mixin,C as registerDirective,B as render,H as tag,G as version}; | ||
import"weakmap-polyfill";import{setActiveComponent as e,clearActiveComponent as t}from"reactive-signal";export{Signal,batch,clearActiveComponent,computed,effect,getActiveComponent,setActiveComponent,signal,signalObject}from"reactive-signal";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e,t,n){return i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i},i.apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return i(e,arguments,r(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),o(n,e)},s(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function u(e){return e.children}function l(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}function f(e){return"[object Array]"===Object.prototype.toString.call(e)}!function(){if("undefined"!=typeof document&&!("adoptedStyleSheets"in document)){var e="ShadyCSS"in window&&!ShadyCSS.nativeShadow,t=document.implementation.createHTMLDocument("boot"),n=new WeakMap,r="object"==typeof DOMException?Error:DOMException,o=Object.defineProperty,i=Array.prototype.forEach,s=/@import.+?;?$/gm,a=CSSStyleSheet.prototype;a.replace=function(){return Promise.reject(new r("Can't call replace on non-constructed CSSStyleSheets."))},a.replaceSync=function(){throw new r("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};var c=new WeakMap,u=new WeakMap,l=new WeakMap,f=N.prototype;f.replace=function(e){try{return this.replaceSync(e),Promise.resolve(this)}catch(e){return Promise.reject(e)}},f.replaceSync=function(e){if(j(this),"string"==typeof e){var t=this,n=c.get(t).ownerNode;n.textContent=function(e){var t=e.replace(s,"");return t!==e&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),t.trim()}(e),c.set(t,n.sheet),u.get(t).forEach(function(e){e.isConnected()&&O(t,P(t,e))})}},o(f,"cssRules",{configurable:!0,enumerable:!0,get:function(){return j(this),c.get(this).cssRules}}),["addImport","addPageRule","addRule","deleteRule","insertRule","removeImport","removeRule"].forEach(function(e){f[e]=function(){var t=this;j(t);var n=arguments,r=c.get(t),o=u.get(t),i=r[e].apply(r,n);return o.forEach(function(r){if(r.isConnected()){var o=P(t,r).sheet;o[e].apply(o,n)}}),i}}),o(N,Symbol.hasInstance,{configurable:!0,value:C});var p={childList:!0,subtree:!0},d=new WeakMap,h=new WeakMap,v=new WeakMap,y=new WeakMap,m=k.prototype;if(m.isConnected=function(){var e=h.get(this);return e instanceof Document?"loading"!==e.readyState:function(e){return"isConnected"in e?e.isConnected:document.contains(e)}(e.host)},m.connect=function(){var e=M(this);y.get(this).observe(e,p),v.get(this).length>0&&x(this),T(e,function(e){A(e).connect()})},m.disconnect=function(){y.get(this).disconnect()},m.update=function(e){var t=this,n=h.get(t)===document?"Document":"ShadowRoot";if(!Array.isArray(e))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Iterator getter is not callable.");if(!e.every(C))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Failed to convert value to 'CSSStyleSheet'");if(e.some(E))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Can't adopt non-constructed stylesheets");t.sheets=e;var r,o,i=v.get(t),s=(r=e).filter(function(e,t){return r.indexOf(e)===t});(o=s,i.filter(function(e){return-1===o.indexOf(e)})).forEach(function(e){var n;(n=P(e,t)).parentNode.removeChild(n),function(e,t){l.get(e).delete(t),u.set(e,u.get(e).filter(function(e){return e!==t}))}(e,t)}),v.set(t,s),t.isConnected()&&s.length>0&&x(t)},window.CSSStyleSheet=N,R(Document),"ShadowRoot"in window){R(ShadowRoot);var g=Element.prototype,b=g.attachShadow;g.attachShadow=function(e){var t=b.call(this,e);return"closed"===e.mode&&n.set(this,t),t}}var S=A(document);S.isConnected()?S.connect():document.addEventListener("DOMContentLoaded",S.connect.bind(S))}function w(e){return e.shadowRoot||n.get(e)}function C(e){return"object"==typeof e&&(f.isPrototypeOf(e)||a.isPrototypeOf(e))}function E(e){return"object"==typeof e&&a.isPrototypeOf(e)}function P(e,t){return l.get(e).get(t)}function O(e,t){requestAnimationFrame(function(){var n,r;!function(e){for(var t=0;t<e.cssRules.length;t++)e.deleteRule(0)}(t.sheet),n=c.get(e),r=t.sheet,i.call(n.cssRules,function(e,t){r.insertRule(e.cssText,t)})})}function j(e){if(!c.has(e))throw new TypeError("Illegal invocation")}function N(){var e=this,n=document.createElement("style");t.body.appendChild(n),c.set(e,n.sheet),u.set(e,[]),l.set(e,new WeakMap)}function A(e){var t=d.get(e);return t||(t=new k(e),d.set(e,t)),t}function R(e){o(e.prototype,"adoptedStyleSheets",{configurable:!0,enumerable:!0,get:function(){return A(this).sheets},set:function(e){A(this).update(e)}})}function T(e,t){for(var n=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT,function(e){return w(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},null,!1),r=void 0;r=n.nextNode();)t(w(r))}function M(e){var t=h.get(e);return t instanceof Document?t.body:t}function x(e){var t=document.createDocumentFragment(),n=v.get(e),r=y.get(e),o=M(e);r.disconnect(),n.forEach(function(n){t.appendChild(P(n,e)||function(e,t){var n=document.createElement("style");return l.get(e).set(t,n),u.get(e).push(t),n}(n,e))}),o.insertBefore(t,null),r.observe(o,p),n.forEach(function(t){O(t,P(t,e))})}function k(t){var n=this;n.sheets=[],h.set(n,t),v.set(n,[]),y.set(n,new MutationObserver(function(t,r){document?t.forEach(function(t){e||i.call(t.addedNodes,function(e){e instanceof Element&&T(e,function(e){A(e).connect()})}),i.call(t.removedNodes,function(t){t instanceof Element&&(function(e,t){return t instanceof HTMLStyleElement&&v.get(e).some(function(t){return P(t,e)})}(n,t)&&x(n),e||T(t,function(e){A(e).disconnect()}))})}):r.disconnect()}))}}(),function(){var e="undefined"!=typeof window?window:global;if(void 0!==e.Reflect&&void 0!==e.customElements&&!e.customElements.hasOwnProperty("polyfillWrapFlushCallback")){var t=e.HTMLElement;e.HTMLElement=function(){return Reflect.construct(t,[],this.constructor)},HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)}}();var p=/\B([A-Z])/g;function d(e){var t=new CSSStyleSheet;return t.replaceSync(e),t}function h(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function v(){return{}}function y(e,t,n){return{configurable:!0,get:function(){var e=n.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}function m(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function g(e,t,n){var r=Object.assign({merge:"uniqueMerge",default:null},n),o=e.constructor,i=o[t],s=m(i)?0:Array.isArray(i)?1:2;if("none"===r.merge||2===s)return i;for(var a=0===s?Object.assign({},r.default):r.default,c=[i];o&&(o=o.__proto__)[t];)c.push(o[t]);var u=i;return u=0===s?c.reduce(function(e,t){return m(t)?Object.assign({},a,t,e):e},{}):c.reduce(function(e,t){return Array.isArray(t)&&e.push.apply(e,t),e},[]),Array.isArray(u)&&"uniqueMerge"===r.merge&&(u=Array.from(new Set(u)),m(a)&&u.forEach(function(e,t){m(e)&&(u[t]=Object.assign({},a,e))})),u||a}function b(e,t){var n;if(t?t.ignoreAttrs=!0:t={ignoreAttrs:!0},arguments.length>2?n=[].slice.call(arguments,2).flat():null!=t.children&&(n=t.children,delete t.children),e===u)return n;if("function"==typeof e){if(!e.tagName)return n&&(t.children=n),e(t);e=e.tagName}return{nodeName:e,children:n,attributes:t,key:t.key}}function S(e,t){var r=[].slice.call(arguments,2);return b(e.nodeName,n({},e.attributes,t),r.length>0?r.flat():e.children)}Array.prototype.flat||(Array.prototype.flat=function(e){void 0===e&&(e=1);var t=[];return function n(r,o){for(var i,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r);!(i=s()).done;){var c=i.value;Array.isArray(c)&&o<e?n(c,o+1):t.push(c)}}(this,0),t}),b.f=u;var w={onanimationcancel:1,oncompositionend:1,oncompositionstart:1,oncompositionupdate:1,onfocusin:1,onfocusout:1,onscrollend:1,ontouchcancel:1,ontouchend:1,ontouchmove:1,ontouchstart:1},C=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,E={};function P(e,t){E["o-"+e]=t}function O(e){var t=e.parentNode;t&&t.removeChild(e)}function j(e,t,n,r,o){if("className"===t&&(t="class"),"o"==t[0]&&"-"==t[1]&&Promise.resolve().then(function(){var n;null==(n=E[t])||n.call(E,e,r)}),"key"===t||"ignoreAttrs"===t);else if("ref"===t)l(n,null),l(r,e);else if("class"!==t||o)if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||A(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||A(e.style,t,r[t])}else if("unsafeHTML"===t)r&&(e.innerHTML=r.html||r||"");else if("o"==t[0]&&"n"==t[1])!function(e,t,n,r){var o=t!==(t=t.replace(/Capture$/,"")),i=t.toLowerCase();t=(w[i]||i in e?i:t).slice(2),n?r||e.addEventListener(t,N,o):e.removeEventListener(t,N,o),(e._listeners||(e._listeners={}))[t]=n}(e,t,r,n);else if("INPUT"===e.nodeName&&"value"===t)e.value=null==r?"":r;else if("list"!==t&&"type"!==t&&"css"!==t&&!o&&t in e){try{e[t]=null==r?"":r}catch(e){}null!=r&&!1!==r||"spellcheck"==t||e.removeAttribute(t)}else{var i=o&&t!==(t=t.replace(/^xlink:?/,""));if(null==r||!1===r)i?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t);else if("function"!=typeof r)if(i)e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r);else if("Component"===e.constructor.is){var s,a=null==(s=e.constructor.reflectProps)?void 0:s[t];a&&e.setAttribute(t,"function"==typeof a?a(r):r)}else e.setAttribute(t,r)}else e.className=r||""}function N(e){return this._listeners[e.type](e)}function A(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n.toString()):e[t]=null==n?"":"number"!=typeof n||C.test(t)?n.toString():n+"px"}var R=0,T=!1,M=!1,x=!1;function k(e,t,n,r,o){return e||t?(R++||(T=null!=n&&void 0!==n.ownerSVGElement,x=!1),f(t)?n?(I(n,t,x,r,o),i=n.childNodes):(i=[],t.forEach(function(t,n){var s=L(0===n?e:null,t,r,o);i.push(s)})):(f(e)||e instanceof NodeList?[].concat(e).forEach(function(e,n){0===n?i=L(e,t,r,o):_(e,!1)}):i=L(e,t,r,o),n&&(null==(s=i)?void 0:s.parentNode)!==n&&n.appendChild(i)),--R||(x=!1),i):null;var i,s}function L(e,t,n,r){e&&t&&e.props&&(e.props.children=t.children);var o,i=e,s=T,a=M;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||n)?e.nodeValue!=t&&(e.nodeValue=String(t)):(i=document.createTextNode(String(t)),e&&(e.parentNode&&(null==(o=e.parentNode)||o.replaceChild(i,e)),_(e,!0))),i&&(i.prevProps={}),i;var u,l,f,p=t.nodeName;if(M="foreignObject"===p,T="svg"===p||!M&&T,p=String(p),(!e||!h(e,p))&&(l=p,(f=M||T?document.createElementNS("http://www.w3.org/2000/svg",l):document.createElement(l)).normalizedNodeName=l,"Component"===(null==(u=(i=f).constructor)?void 0:u.is)&&Object.assign(i.props,t.attributes),e)){for(var d;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&(null==(d=e.parentNode)||d.replaceChild(i,e)),_(e,!0)}var v=i.firstChild,y=i.prevProps,m=t.children;if(null==y){y=i.prevProps={};for(var g=i.attributes,b=g.length;b--;)y[g[b].name]=g[b].value}return!x&&m&&1===m.length&&"string"==typeof m[0]&&null!=v&&void 0!==v.splitText&&null==v.nextSibling?v.nodeValue!=m[0]&&(v.nodeValue=m[0]):(m&&m.length||null!=v)&&("Component"==i.constructor.is&&i.constructor.noSlot||I(i,m,x||null!=y.unsafeHTML,n,r)),function(e,t,n,r,o){var i,s,a=e.update;for(i in e.receiveProps&&(s=Object.assign({},n)),n)t&&null!=t[i]||null==n[i]||(j(e,i,n[i],n[i]=void 0,M||T),a&&delete e.props[i]);for(i in t)if(a&&"object"==typeof t[i]&&"ref"!==i){("style"===i||"o"===i[0]&&"-"===i[1])&&j(e,i,n[i],n[i]=t[i],M||T);var u=c(i);e.props[u]=n[u]=t[i]}else if("children"!==i&&(!(i in n)||t[i]!==("value"===i||"checked"===i?e[i]:n[i])))if(j(e,i,n[i],t[i],M||T),-1!==e.nodeName.indexOf("-")){e.props=e.props||{};var l=c(i);e.props[l]=n[l]=t[i]}else n[i]=t[i];a&&!o&&e.parentNode&&!1!==e.receiveProps(e.props,s)&&e.queuedUpdate()}(i,t.attributes,y,0,r),i.props&&(i.props.children=t.children),T=s,M=a,i}function I(e,t,n,r,o){var i,s,a,c,u,l,f,p=e.childNodes,d=[],v={},y=0,m=0,g=p.length,b=0,S=t?t.length:0;if(0!==g)for(var w=0;w<g;w++){var C,E=p[w],P=E.prevProps,j=S&&P?P.key:null;null!=j?(y++,v[j]=E):(P||(void 0!==E.splitText?!n||(null==(C=E.nodeValue)?void 0:C.trim()):n))&&(d[b++]=E)}if(0!==S)for(var N=0;N<S;N++){if(u=null,c=t[N]){var A=c.key;if(null!=A)y&&void 0!==v[A]&&(u=v[A],v[A]=void 0,y--);else if(m<b)for(i=m;i<b;i++)if(void 0!==d[i]&&(l=s=d[i],"string"==typeof(f=c)||"number"==typeof f?void 0!==l.splitText:h(l,f.nodeName))){u=s,d[i]=void 0,i===b-1&&b--,i===m&&m++;break}}u=L(u,c,r,o),a=p[N],u&&u!==e&&u!==a&&(null==a?e.appendChild(u):u===a.nextSibling?O(a):e.insertBefore(u,a))}if(y)for(var R in v)void 0!==v[R]&&_(v[R],!1);for(;m<=b;)void 0!==(u=d[b--])&&_(u,!1)}function _(e,t){null!=e.prevProps&&e.prevProps.ref&&("function"==typeof e.prevProps.ref?e.prevProps.ref(null):e.prevProps.ref.current&&(e.prevProps.ref.current=null)),!1!==t&&null!=e.prevProps||O(e),function(e){var t;for(e=null==(t=e)?void 0:t.lastChild;e;){var n=e.previousSibling;_(e,!0),e=n}}(e)}var F={mixin:{},globalCSS:[]};function W(e){Object.assign(F.mixin,e)}function H(e){F.globalCSS.includes(e)||F.globalCSS.push(e)}function V(e,t){Object.defineProperty(t,"tagName",{value:e,writable:!1}),customElements.get(e)?console.warn("Failed to execute 'define' on 'CustomElementRegistry': the tag name \""+e+'" has already been used with this registry'):customElements.define(e,t)}function D(e){return function(t){V(e,t)}}var U=0,q=new WeakMap,B=/*#__PURE__*/function(n){var r,i;function s(){var e;return(e=n.call(this)||this).elementId=void 0,e.isInstalled=void 0,e.inject=void 0,e.injection=void 0,e.renderRoot=void 0,e.rootElement=void 0,e.state=void 0,e.updateQueued=!1,e.handleProps(),e.elementId=U++,e.isInstalled=!1,e.rootElement=null,e}i=n,(r=s).prototype=Object.create(i.prototype),r.prototype.constructor=r,o(r,i),s.define=function(e){V(e,this)};var a,c,u=s.prototype;return u.handleProps=function(){this.constructor.defaultProps=g(this,"defaultProps",{default:{}})||{},this.constructor.propTypes=g(this,"propTypes",{default:{}})||{},this.constructor.reflectProps=g(this,"reflectProps",{default:{}})||{};var e=g(this,"props",{default:{},merge:"uniqueMerge"});if(this.constructor.props)for(var t in e){var n=e[t];this.constructor.defaultProps[t]=n.default,this.constructor.propTypes[t]=n.type,this.constructor.reflectProps[t]=n.reflect}this.props=Object.assign({},this.constructor.defaultProps,this.props)},u.attributeChangedCallback=function(e,t,n){if(this.constructor.props&&this.constructor.props[e]){var r=this.constructor.props[e];if(r.changed){var o=this.getTypeValueOfProp(e,n),i=this.getTypeValueOfProp(e,t);r.changed.call(this,o,i)}}},u.setState=function(e,t){var n=this;if(void 0===t&&(t=!1),"object"!=typeof e)throw new Error("takes an object of state variables to update");Object.keys(e).forEach(function(t){return n.state[t]=e[t]}),t||this.queuedUpdate()},u.injectObject=function(){for(var e=this,t=this.parentNode;t&&!this.store&&!F.mixin.store;)this.store=t.store,t=t.parentNode||t.host;if(this.inject){var n;for(this.injection={},t=this.parentNode;t&&!n;)n=t.provide,t=t.parentNode||t.host;n&&this.inject.forEach(function(t){e.injection[t]=n[t]})}var r=function(t){e.hasOwnProperty(t)||Object.defineProperty(e,t,{get:function(){return F.mixin[t]}})};for(var o in F.mixin)r(o)},u.createRenderRoot=function(){if(this.constructor.isLightDOM)return this;if(this.shadowRoot){for(var e;e=this.shadowRoot.firstChild;)this.shadowRoot.removeChild(e);return this.shadowRoot}return this.attachShadow({mode:"open"})},u.applyAdoptedStyleSheets=function(){if(this.constructor.isLightDOM||q.has(this.constructor))this.renderRoot.adoptedStyleSheets=q.get(this.constructor);else{var e=this.constructor.css;if(e){var t=[];t="string"==typeof e?[d(e)]:f(e)?e.map(function(e){return"string"==typeof e?d(e):e.default&&"string"==typeof e.default?d(e.default):e}):e.default&&"string"==typeof e.default?[d(e.default)]:[e],t=[].concat(F.globalCSS,t),this.renderRoot.adoptedStyleSheets=t,q.set(this.constructor,t)}else F.globalCSS.length&&(this.renderRoot.adoptedStyleSheets=F.globalCSS)}},u.appendStyleVNode=function(e){if(this.props.css&&e){var t={nodeName:"style",attributes:{},children:[this.props.css]};e.push?e.push(t):e.children.push(t)}},u.connectedCallback=function(){var n=this;this.injectObject(),this.attrsToProps(),this.install(),this.fire("install",this),this.renderRoot=this.createRenderRoot(),this.applyAdoptedStyleSheets(),e(this),this.beforeRender(),this.fire("beforeRender",this);var r,o=this.render(this.props,this.store);this.appendStyleVNode(o),this.rendered(o),t(),this.rootElement=k(null,o,null,this,!1),f(this.rootElement)?this.rootElement.forEach(function(e){var t;null==(t=n.renderRoot)||t.appendChild(e)}):this.rootElement&&(null==(r=this.renderRoot)||r.appendChild(this.rootElement)),this.installed(),this.fire("installed",this),this.isInstalled=!0,Promise.resolve().then(function(){n.ready(),n.fire("ready",n)})},u.disconnectedCallback=function(){this.uninstall(),this.fire("uninstall",this),this.isInstalled=!1},u.update=function(n){this.beforeUpdate(),this.fire("beforeUpdate",this),this.attrsToProps(),e(this),this.beforeRender(),this.fire("beforeRender",this);var r=this.render(this.props,this.store);this.appendStyleVNode(r),this.rendered(r),t(null),this.rootElement=k(this.rootElement,r,this.renderRoot,this,!!n),this.updated(),this.fire("updated",this)},u.queuedUpdate=function(){var e=this;this.updateQueued||(this.updateQueued=!0,Promise.resolve().then(function(){e.update(),e.updateQueued=!1}))},u.updateProps=function(e){var t=this;Object.keys(e).forEach(function(n){t.props[n]=e[n],t.prevProps&&(t.prevProps[n]=e[n])}),this.update()},u.updateSelf=function(){this.update(!0)},u.removeProp=function(e){this.removeAttribute(e),this.isInstalled&&this.update()},u.setProp=function(e,t){this.setAttribute(e,t&&"object"==typeof t?JSON.stringify(t):t),this.isInstalled&&this.update()},u.attrsToProps=function(){var e=this;if(!this.props.ignoreAttrs){var t=this;t.props.css=t.getAttribute("css");var n=this.constructor.propTypes;n&&Object.keys(n).forEach(function(n){var r=t.getAttribute(n.replace(p,"-$1").toLowerCase());t.props[n]=null!==r?e.getTypeValueOfProp(n,r):t.constructor.defaultProps&&t.constructor.defaultProps.hasOwnProperty(n)?t.constructor.defaultProps[n]:null})}},u.getTypeValueOfProp=function(e,t){for(var n=this.constructor.propTypes,r=f(n[e])?n[e]:[n[e]],o=0;o<r.length;o++)switch(r[o]){case String:return t;case Number:return Number(t);case Boolean:return Boolean("false"!==t&&"0"!==t);case Array:case Object:try{return JSON.parse(t)}catch(n){console.warn("The "+e+" object prop does not comply with the JSON specification, the incorrect string is ["+t+"].")}}},u.fire=function(e,t,n){var r=Object.assign({bubbles:!1,composed:!1},n),o=r.bubbles,i=r.composed,s=this.props["on"+function(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()}).replace(/^\S/,function(e){return e.toUpperCase()})}(e)];s?s(new CustomEvent(e,{detail:t,bubbles:o,composed:i})):this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:o,composed:i}))},u.install=function(){},u.installed=function(){},u.ready=function(){},u.uninstall=function(){},u.beforeUpdate=function(){},u.updated=function(){},u.beforeRender=function(){},u.rendered=function(e){},u.receiveProps=function(){},a=s,(c=[{key:"observedAttributes",get:function(){return this.props?Object.keys(this.props):[]}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?o:String(o),r)}var o}(a,c),Object.defineProperty(a,"prototype",{writable:!1}),s}(/*#__PURE__*/s(HTMLElement));function $(e,t,n){return t="string"==typeof t?document.querySelector(t):t,n&&t&&(t.store=n),k(null,e,t,null,!1)}B.is="Component",B.defaultProps=void 0,B.reflectProps=void 0,B.propTypes=void 0,B.css=void 0,B.isLightDOM=void 0,B.noSlot=void 0;var J={}.hasOwnProperty;function Q(){for(var e=[].slice.call(arguments),t=[],n=0;n<e.length;n++){var r=e[n];if(r){var o=typeof r;if("string"===o||"number"===o)t.push(r);else if(Array.isArray(r)&&r.length){var i=Q.apply(void 0,r);i&&t.push(i)}else if("object"===o)for(var s in r)J.call(r,s)&&r[s]&&t.push(s)}}return t.join(" ")}function z(e){var t=[].slice.call(arguments,1);if(e.class?(t.unshift(e.class),delete e.class):e.className&&(t.unshift(e.className),delete e.className),t.length>0)return{class:Q.apply(void 0,t)}}var G={};function Z(e){var t=[].slice.call(arguments,1),n="";if(e.forEach(function(e,r){if(void 0!==t[r]&&"string"!=typeof t[r]&&"number"!=typeof t[r])throw new Error("Unsupported value in CSS: "+t[r]);n+=e+(t[r]||"")}),G[n])return G[n];var r=new CSSStyleSheet;return r.replaceSync(n),G[n]=r,r}var K="7.6.10";export{B as Component,B as WeElement,y as bind,Q as classNames,S as cloneElement,b as createElement,v as createRef,Z as css,V as define,V as defineElement,z as extractClass,H as globalCSS,b as h,W as mixin,P as registerDirective,$ as render,D as tag,K as version}; | ||
//# sourceMappingURL=omi.module.js.map |
@@ -1,3 +0,3 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("weakmap-polyfill"),require("reactive-signal")):"function"==typeof define&&define.amd?define(["exports","weakmap-polyfill","reactive-signal"],t):t((e||self).Omi={},0,e.reactiveSignal)}(this,function(e,t,n){function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function s(e,t,n){return s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o},s.apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return s(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),i(n,e)},c(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function u(e){return e.children}function f(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}function p(e){return"[object Array]"===Object.prototype.toString.call(e)}!function(){if("undefined"!=typeof document&&!("adoptedStyleSheets"in document)){var e="ShadyCSS"in window&&!ShadyCSS.nativeShadow,t=document.implementation.createHTMLDocument("boot"),n=new WeakMap,r="object"==typeof DOMException?Error:DOMException,o=Object.defineProperty,i=Array.prototype.forEach,s=/@import.+?;?$/gm,c=CSSStyleSheet.prototype;c.replace=function(){return Promise.reject(new r("Can't call replace on non-constructed CSSStyleSheets."))},c.replaceSync=function(){throw new r("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};var a=new WeakMap,l=new WeakMap,u=new WeakMap,f=N.prototype;f.replace=function(e){try{return this.replaceSync(e),Promise.resolve(this)}catch(e){return Promise.reject(e)}},f.replaceSync=function(e){if(j(this),"string"==typeof e){var t=this,n=a.get(t).ownerNode;n.textContent=function(e){var t=e.replace(s,"");return t!==e&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),t.trim()}(e),a.set(t,n.sheet),l.get(t).forEach(function(e){e.isConnected()&&O(t,E(t,e))})}},o(f,"cssRules",{configurable:!0,enumerable:!0,get:function(){return j(this),a.get(this).cssRules}}),["addImport","addPageRule","addRule","deleteRule","insertRule","removeImport","removeRule"].forEach(function(e){f[e]=function(){var t=this;j(t);var n=arguments,r=a.get(t),o=l.get(t),i=r[e].apply(r,n);return o.forEach(function(r){if(r.isConnected()){var o=E(t,r).sheet;o[e].apply(o,n)}}),i}}),o(N,Symbol.hasInstance,{configurable:!0,value:C});var p={childList:!0,subtree:!0},d=new WeakMap,h=new WeakMap,v=new WeakMap,y=new WeakMap,m=M.prototype;if(m.isConnected=function(){var e=h.get(this);return e instanceof Document?"loading"!==e.readyState:function(e){return"isConnected"in e?e.isConnected:document.contains(e)}(e.host)},m.connect=function(){var e=x(this);y.get(this).observe(e,p),v.get(this).length>0&&k(this),T(e,function(e){R(e).connect()})},m.disconnect=function(){y.get(this).disconnect()},m.update=function(e){var t=this,n=h.get(t)===document?"Document":"ShadowRoot";if(!Array.isArray(e))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Iterator getter is not callable.");if(!e.every(C))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Failed to convert value to 'CSSStyleSheet'");if(e.some(P))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Can't adopt non-constructed stylesheets");t.sheets=e;var r,o,i=v.get(t),s=(r=e).filter(function(e,t){return r.indexOf(e)===t});(o=s,i.filter(function(e){return-1===o.indexOf(e)})).forEach(function(e){var n;(n=E(e,t)).parentNode.removeChild(n),function(e,t){u.get(e).delete(t),l.set(e,l.get(e).filter(function(e){return e!==t}))}(e,t)}),v.set(t,s),t.isConnected()&&s.length>0&&k(t)},window.CSSStyleSheet=N,A(Document),"ShadowRoot"in window){A(ShadowRoot);var b=Element.prototype,g=b.attachShadow;b.attachShadow=function(e){var t=g.call(this,e);return"closed"===e.mode&&n.set(this,t),t}}var S=R(document);S.isConnected()?S.connect():document.addEventListener("DOMContentLoaded",S.connect.bind(S))}function w(e){return e.shadowRoot||n.get(e)}function C(e){return"object"==typeof e&&(f.isPrototypeOf(e)||c.isPrototypeOf(e))}function P(e){return"object"==typeof e&&c.isPrototypeOf(e)}function E(e,t){return u.get(e).get(t)}function O(e,t){requestAnimationFrame(function(){var n,r;!function(e){for(var t=0;t<e.cssRules.length;t++)e.deleteRule(0)}(t.sheet),n=a.get(e),r=t.sheet,i.call(n.cssRules,function(e,t){r.insertRule(e.cssText,t)})})}function j(e){if(!a.has(e))throw new TypeError("Illegal invocation")}function N(){var e=this,n=document.createElement("style");t.body.appendChild(n),a.set(e,n.sheet),l.set(e,[]),u.set(e,new WeakMap)}function R(e){var t=d.get(e);return t||(t=new M(e),d.set(e,t)),t}function A(e){o(e.prototype,"adoptedStyleSheets",{configurable:!0,enumerable:!0,get:function(){return R(this).sheets},set:function(e){R(this).update(e)}})}function T(e,t){for(var n=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT,function(e){return w(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},null,!1),r=void 0;r=n.nextNode();)t(w(r))}function x(e){var t=h.get(e);return t instanceof Document?t.body:t}function k(e){var t=document.createDocumentFragment(),n=v.get(e),r=y.get(e),o=x(e);r.disconnect(),n.forEach(function(n){t.appendChild(E(n,e)||function(e,t){var n=document.createElement("style");return u.get(e).set(t,n),l.get(e).push(t),n}(n,e))}),o.insertBefore(t,null),r.observe(o,p),n.forEach(function(t){O(t,E(t,e))})}function M(t){var n=this;n.sheets=[],h.set(n,t),v.set(n,[]),y.set(n,new MutationObserver(function(t,r){document?t.forEach(function(t){e||i.call(t.addedNodes,function(e){e instanceof Element&&T(e,function(e){R(e).connect()})}),i.call(t.removedNodes,function(t){t instanceof Element&&(function(e,t){return t instanceof HTMLStyleElement&&v.get(e).some(function(t){return E(t,e)})}(n,t)&&k(n),e||T(t,function(e){R(e).disconnect()}))})}):r.disconnect()}))}}(),function(){var e="undefined"!=typeof window?window:global;if(void 0!==e.Reflect&&void 0!==e.customElements&&!e.customElements.hasOwnProperty("polyfillWrapFlushCallback")){var t=e.HTMLElement;e.HTMLElement=function(){return Reflect.construct(t,[],this.constructor)},HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)}}();var d=/\B([A-Z])/g;function h(e){var t=new CSSStyleSheet;return t.replaceSync(e),t}function v(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function y(e,t){var n;if(t?t.ignoreAttrs=!0:t={ignoreAttrs:!0},arguments.length>2?n=[].slice.call(arguments,2).flat():null!=t.children&&(n=t.children,delete t.children),e===u)return n;if("function"==typeof e){if(!e.tagName)return n&&(t.children=n),e(t);e=e.tagName}return{nodeName:e,children:n,attributes:t,key:t.key}}Array.prototype.flat||(Array.prototype.flat=function(e){void 0===e&&(e=1);var t=[];return function n(r,o){for(var i,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r);!(i=s()).done;){var c=i.value;Array.isArray(c)&&o<e?n(c,o+1):t.push(c)}}(this,0),t}),y.f=u;var m={onanimationcancel:1,oncompositionend:1,oncompositionstart:1,oncompositionupdate:1,onfocusin:1,onfocusout:1,onscrollend:1,ontouchcancel:1,ontouchend:1,ontouchmove:1,ontouchstart:1},b=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,g={};function S(e){var t=e.parentNode;t&&t.removeChild(e)}function w(e,t,n,r,o){if("className"===t&&(t="class"),"o"==t[0]&&"-"==t[1]&&Promise.resolve().then(function(){var n;null==(n=g[t])||n.call(g,e,r)}),"key"===t||"ignoreAttrs"===t);else if("ref"===t)f(n,null),f(r,e);else if("class"!==t||o)if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||P(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||P(e.style,t,r[t])}else if("unsafeHTML"===t)r&&(e.innerHTML=r.html||r||"");else if("o"==t[0]&&"n"==t[1])!function(e,t,n,r){var o=t!==(t=t.replace(/Capture$/,"")),i=t.toLowerCase();t=(m[i]||i in e?i:t).slice(2),n?r||e.addEventListener(t,C,o):e.removeEventListener(t,C,o),(e._listeners||(e._listeners={}))[t]=n}(e,t,r,n);else if("INPUT"===e.nodeName&&"value"===t)e.value=null==r?"":r;else if("list"!==t&&"type"!==t&&"css"!==t&&!o&&t in e){try{e[t]=null==r?"":r}catch(e){}null!=r&&!1!==r||"spellcheck"==t||e.removeAttribute(t)}else{var i=o&&t!==(t=t.replace(/^xlink:?/,""));if(null==r||!1===r)i?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t);else if("function"!=typeof r)if(i)e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r);else if("Component"===e.constructor.is){var s,c=null==(s=e.constructor.reflectProps)?void 0:s[t];c&&e.setAttribute(t,"function"==typeof c?c(r):r)}else e.setAttribute(t,r)}else e.className=r||""}function C(e){return this._listeners[e.type](e)}function P(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n.toString()):e[t]=null==n?"":"number"!=typeof n||b.test(t)?n.toString():n+"px"}var E=0,O=!1,j=!1,N=!1;function R(e,t,n,r,o){return e||t?(E++||(O=null!=n&&void 0!==n.ownerSVGElement,N=!1),p(t)?n?(T(n,t,N,r,o),i=n.childNodes):(i=[],t.forEach(function(t,n){var s=A(0===n?e:null,t,r,o);i.push(s)})):(p(e)||e instanceof NodeList?[].concat(e).forEach(function(e,n){0===n?i=A(e,t,r,o):x(e,!1)}):i=A(e,t,r,o),n&&(null==(s=i)?void 0:s.parentNode)!==n&&n.appendChild(i)),--E||(N=!1),i):null;var i,s}function A(e,t,n,r){e&&t&&e.props&&(e.props.children=t.children);var o,i=e,s=O,c=j;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||n)?e.nodeValue!=t&&(e.nodeValue=String(t)):(i=document.createTextNode(String(t)),e&&(e.parentNode&&(null==(o=e.parentNode)||o.replaceChild(i,e)),x(e,!0))),i&&(i.prevProps={}),i;var a,u,f,p=t.nodeName;if(j="foreignObject"===p,O="svg"===p||!j&&O,p=String(p),(!e||!v(e,p))&&(u=p,(f=j||O?document.createElementNS("http://www.w3.org/2000/svg",u):document.createElement(u)).normalizedNodeName=u,"Component"===(null==(a=(i=f).constructor)?void 0:a.is)&&Object.assign(i.props,t.attributes),e)){for(var d;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&(null==(d=e.parentNode)||d.replaceChild(i,e)),x(e,!0)}var h=i.firstChild,y=i.prevProps,m=t.children;if(null==y){y=i.prevProps={};for(var b=i.attributes,g=b.length;g--;)y[b[g].name]=b[g].value}return!N&&m&&1===m.length&&"string"==typeof m[0]&&null!=h&&void 0!==h.splitText&&null==h.nextSibling?h.nodeValue!=m[0]&&(h.nodeValue=m[0]):(m&&m.length||null!=h)&&("Component"==i.constructor.is&&i.constructor.noSlot||T(i,m,N||null!=y.unsafeHTML,n,r)),function(e,t,n,r,o){var i,s,c=e.update;for(i in e.receiveProps&&(s=Object.assign({},n)),n)t&&null!=t[i]||null==n[i]||(w(e,i,n[i],n[i]=void 0,j||O),c&&delete e.props[i]);for(i in t)if(c&&"object"==typeof t[i]&&"ref"!==i){("style"===i||"o"===i[0]&&"-"===i[1])&&w(e,i,n[i],n[i]=t[i],j||O);var a=l(i);e.props[a]=n[a]=t[i]}else if("children"!==i&&(!(i in n)||t[i]!==("value"===i||"checked"===i?e[i]:n[i])))if(w(e,i,n[i],t[i],j||O),-1!==e.nodeName.indexOf("-")){e.props=e.props||{};var u=l(i);e.props[u]=n[u]=t[i]}else n[i]=t[i];c&&!o&&e.parentNode&&!1!==e.receiveProps(e.props,s)&&e.queuedUpdate()}(i,t.attributes,y,0,r),i.props&&(i.props.children=t.children),O=s,j=c,i}function T(e,t,n,r,o){var i,s,c,a,l,u,f,p=e.childNodes,d=[],h={},y=0,m=0,b=p.length,g=0,w=t?t.length:0;if(0!==b)for(var C=0;C<b;C++){var P,E=p[C],O=E.prevProps,j=w&&O?O.key:null;null!=j?(y++,h[j]=E):(O||(void 0!==E.splitText?!n||(null==(P=E.nodeValue)?void 0:P.trim()):n))&&(d[g++]=E)}if(0!==w)for(var N=0;N<w;N++){if(l=null,a=t[N]){var R=a.key;if(null!=R)y&&void 0!==h[R]&&(l=h[R],h[R]=void 0,y--);else if(m<g)for(i=m;i<g;i++)if(void 0!==d[i]&&(u=s=d[i],"string"==typeof(f=a)||"number"==typeof f?void 0!==u.splitText:v(u,f.nodeName))){l=s,d[i]=void 0,i===g-1&&g--,i===m&&m++;break}}l=A(l,a,r,o),c=p[N],l&&l!==e&&l!==c&&(null==c?e.appendChild(l):l===c.nextSibling?S(c):e.insertBefore(l,c))}if(y)for(var T in h)void 0!==h[T]&&x(h[T],!1);for(;m<=g;)void 0!==(l=d[g--])&&x(l,!1)}function x(e,t){null!=e.prevProps&&e.prevProps.ref&&("function"==typeof e.prevProps.ref?e.prevProps.ref(null):e.prevProps.ref.current&&(e.prevProps.ref.current=null)),!1!==t&&null!=e.prevProps||S(e),function(e){var t;for(e=null==(t=e)?void 0:t.lastChild;e;){var n=e.previousSibling;x(e,!0),e=n}}(e)}var k={mixin:{},globalCSS:[]};function M(e,t){Object.defineProperty(t,"tagName",{value:e,writable:!1}),customElements.get(e)?console.warn("Failed to execute 'define' on 'CustomElementRegistry': the tag name \""+e+'" has already been used with this registry'):customElements.define(e,t)}var L=0,I=new WeakMap,F=/*#__PURE__*/function(e){var t,r;function o(){var t;if((t=e.call(this)||this).elementId=void 0,t.isInstalled=void 0,t.inject=void 0,t.injection=void 0,t.renderRoot=void 0,t.rootElement=void 0,t.updateQueued=!1,t.constructor.defaultProps||(t.constructor.defaultProps={}),t.constructor.propTypes||(t.constructor.propTypes={}),t.constructor.reflectProps||(t.constructor.reflectProps={}),t.constructor.props)for(var n in t.constructor.props){var r=t.constructor.props[n];t.constructor.defaultProps[n]=r.default,t.constructor.propTypes[n]=r.type,t.constructor.reflectProps[n]=r.reflect}return t.props=Object.assign({},t.constructor.defaultProps,t.props),t.elementId=L++,t.isInstalled=!1,t.rootElement=null,t}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,i(t,r),o.define=function(e){M(e,this)};var s,c,a=o.prototype;return a.attributeChangedCallback=function(e,t,n){if(this.constructor.props&&this.constructor.props[e]){var r=this.constructor.props[e];r.changed&&r.changed.call(this,n,t)}},a.injectObject=function(){for(var e=this,t=this.parentNode;t&&!this.store&&!k.mixin.store;)this.store=t.store,t=t.parentNode||t.host;if(this.inject){var n;for(this.injection={},t=this.parentNode;t&&!n;)n=t.provide,t=t.parentNode||t.host;n&&this.inject.forEach(function(t){e.injection[t]=n[t]})}var r=function(t){e.hasOwnProperty(t)||Object.defineProperty(e,t,{get:function(){return k.mixin[t]}})};for(var o in k.mixin)r(o)},a.createRenderRoot=function(){if(this.constructor.isLightDOM)return this;if(this.shadowRoot){for(var e;e=this.shadowRoot.firstChild;)this.shadowRoot.removeChild(e);return this.shadowRoot}return this.attachShadow({mode:"open"})},a.applyAdoptedStyleSheets=function(){if(this.constructor.isLightDOM||I.has(this.constructor))this.renderRoot.adoptedStyleSheets=I.get(this.constructor);else{var e=this.constructor.css;if(e){var t=[];t="string"==typeof e?[h(e)]:p(e)?e.map(function(e){return"string"==typeof e?h(e):e.default&&"string"==typeof e.default?h(e.default):e}):e.default&&"string"==typeof e.default?[h(e.default)]:[e],t=[].concat(k.globalCSS,t),this.renderRoot.adoptedStyleSheets=t,I.set(this.constructor,t)}else k.globalCSS.length&&(this.renderRoot.adoptedStyleSheets=k.globalCSS)}},a.appendStyleVNode=function(e){if(this.props.css&&e){var t={nodeName:"style",attributes:{},children:[this.props.css]};e.push?e.push(t):e.children.push(t)}},a.connectedCallback=function(){var e=this;this.injectObject(),this.attrsToProps(),this.install(),this.fire("install",this),this.renderRoot=this.createRenderRoot(),this.applyAdoptedStyleSheets(),n.setActiveComponent(this),this.beforeRender(),this.fire("beforeRender",this);var t,r=this.render(this.props,this.store);this.appendStyleVNode(r),this.rendered(r),n.clearActiveComponent(),this.rootElement=R(null,r,null,this,!1),p(this.rootElement)?this.rootElement.forEach(function(t){var n;null==(n=e.renderRoot)||n.appendChild(t)}):this.rootElement&&(null==(t=this.renderRoot)||t.appendChild(this.rootElement)),this.installed(),this.fire("installed",this),this.isInstalled=!0,Promise.resolve().then(function(){e.ready(),e.fire("ready",e)})},a.disconnectedCallback=function(){this.uninstall(),this.fire("uninstall",this),this.isInstalled=!1},a.update=function(e){this.beforeUpdate(),this.fire("beforeUpdate",this),this.attrsToProps(),n.setActiveComponent(this),this.beforeRender(),this.fire("beforeRender",this);var t=this.render(this.props,this.store);this.appendStyleVNode(t),this.rendered(t),n.clearActiveComponent(null),this.rootElement=R(this.rootElement,t,this.renderRoot,this,!!e),this.updated(),this.fire("updated",this)},a.queuedUpdate=function(){var e=this;this.updateQueued||(this.updateQueued=!0,Promise.resolve().then(function(){e.update(),e.updateQueued=!1}))},a.updateProps=function(e){var t=this;Object.keys(e).forEach(function(n){t.props[n]=e[n],t.prevProps&&(t.prevProps[n]=e[n])}),this.update()},a.updateSelf=function(){this.update(!0)},a.removeProp=function(e){this.removeAttribute(e),this.isInstalled&&this.update()},a.setProp=function(e,t){this.setAttribute(e,t&&"object"==typeof t?JSON.stringify(t):t),this.isInstalled&&this.update()},a.attrsToProps=function(){if(!this.props.ignoreAttrs){var e=this;e.props.css=e.getAttribute("css");var t=this.constructor.propTypes;t&&Object.keys(t).forEach(function(n){var r=p(t[n])?t[n]:[t[n]],o=e.getAttribute(n.replace(d,"-$1").toLowerCase());if(null!==o)for(var i=0;i<r.length;i++){var s=!1;switch(r[i]){case String:e.props[n]=o,s=!0;break;case Number:e.props[n]=Number(o),s=!0;break;case Boolean:e.props[n]="false"!==o&&"0"!==o,s=!0;break;case Array:case Object:try{e.props[n]=JSON.parse(o)}catch(e){console.warn("The "+n+" object prop does not comply with the JSON specification, the incorrect string is ["+o+"].")}s=!0}if(s)break}else e.props[n]=e.constructor.defaultProps&&e.constructor.defaultProps.hasOwnProperty(n)?e.constructor.defaultProps[n]:null})}},a.fire=function(e,t,n){var r=Object.assign({bubbles:!1,composed:!1},n),o=r.bubbles,i=r.composed,s=this.props["on"+function(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()}).replace(/^\S/,function(e){return e.toUpperCase()})}(e)];s?s(new CustomEvent(e,{detail:t,bubbles:o,composed:i})):this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:o,composed:i}))},a.install=function(){},a.installed=function(){},a.ready=function(){},a.uninstall=function(){},a.beforeUpdate=function(){},a.updated=function(){},a.beforeRender=function(){},a.rendered=function(e){},a.receiveProps=function(){},s=o,(c=[{key:"observedAttributes",get:function(){return this.props?Object.keys(this.props):[]}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?o:String(o),r)}var o}(s,c),Object.defineProperty(s,"prototype",{writable:!1}),o}(/*#__PURE__*/c(HTMLElement));F.is="Component",F.defaultProps=void 0,F.reflectProps=void 0,F.propTypes=void 0,F.css=void 0,F.isLightDOM=void 0,F.noSlot=void 0;var _={}.hasOwnProperty;function W(){for(var e=[].slice.call(arguments),t=[],n=0;n<e.length;n++){var r=e[n];if(r){var o=typeof r;if("string"===o||"number"===o)t.push(r);else if(Array.isArray(r)&&r.length){var i=W.apply(void 0,r);i&&t.push(i)}else if("object"===o)for(var s in r)_.call(r,s)&&r[s]&&t.push(s)}}return t.join(" ")}var D={};Object.defineProperty(e,"Signal",{enumerable:!0,get:function(){return n.Signal}}),Object.defineProperty(e,"batch",{enumerable:!0,get:function(){return n.batch}}),Object.defineProperty(e,"clearActiveComponent",{enumerable:!0,get:function(){return n.clearActiveComponent}}),Object.defineProperty(e,"computed",{enumerable:!0,get:function(){return n.computed}}),Object.defineProperty(e,"effect",{enumerable:!0,get:function(){return n.effect}}),Object.defineProperty(e,"getActiveComponent",{enumerable:!0,get:function(){return n.getActiveComponent}}),Object.defineProperty(e,"setActiveComponent",{enumerable:!0,get:function(){return n.setActiveComponent}}),Object.defineProperty(e,"signal",{enumerable:!0,get:function(){return n.signal}}),Object.defineProperty(e,"signalObject",{enumerable:!0,get:function(){return n.signalObject}}),e.Component=F,e.WeElement=F,e.bind=function(e,t,n){return{configurable:!0,get:function(){var e=n.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}},e.classNames=W,e.cloneElement=function(e,t){var n=[].slice.call(arguments,2);return y(e.nodeName,r({},e.attributes,t),n.length>0?n.flat():e.children)},e.createElement=y,e.createRef=function(){return{}},e.css=function(e){var t=[].slice.call(arguments,1),n="";if(e.forEach(function(e,r){if(void 0!==t[r]&&"string"!=typeof t[r]&&"number"!=typeof t[r])throw new Error("Unsupported value in CSS: "+t[r]);n+=e+(t[r]||"")}),D[n])return D[n];var r=new CSSStyleSheet;return r.replaceSync(n),D[n]=r,r},e.define=M,e.defineElement=M,e.extractClass=function(e){var t=[].slice.call(arguments,1);if(e.class?(t.unshift(e.class),delete e.class):e.className&&(t.unshift(e.className),delete e.className),t.length>0)return{class:W.apply(void 0,t)}},e.globalCSS=function(e){k.globalCSS.includes(e)||k.globalCSS.push(e)},e.h=y,e.mixin=function(e){Object.assign(k.mixin,e)},e.registerDirective=function(e,t){g["o-"+e]=t},e.render=function(e,t,n){return t="string"==typeof t?document.querySelector(t):t,n&&t&&(t.store=n),R(null,e,t,null,!1)},e.tag=function(e){return function(t){M(e,t)}},e.version="7.6.9"}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("weakmap-polyfill"),require("reactive-signal")):"function"==typeof define&&define.amd?define(["exports","weakmap-polyfill","reactive-signal"],t):t((e||self).Omi={},0,e.reactiveSignal)}(this,function(e,t,n){function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function s(e,t,n){return s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o},s.apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return s(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),i(n,e)},c(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function l(e){return e.children}function f(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}function p(e){return"[object Array]"===Object.prototype.toString.call(e)}!function(){if("undefined"!=typeof document&&!("adoptedStyleSheets"in document)){var e="ShadyCSS"in window&&!ShadyCSS.nativeShadow,t=document.implementation.createHTMLDocument("boot"),n=new WeakMap,r="object"==typeof DOMException?Error:DOMException,o=Object.defineProperty,i=Array.prototype.forEach,s=/@import.+?;?$/gm,c=CSSStyleSheet.prototype;c.replace=function(){return Promise.reject(new r("Can't call replace on non-constructed CSSStyleSheets."))},c.replaceSync=function(){throw new r("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.")};var a=new WeakMap,u=new WeakMap,l=new WeakMap,f=N.prototype;f.replace=function(e){try{return this.replaceSync(e),Promise.resolve(this)}catch(e){return Promise.reject(e)}},f.replaceSync=function(e){if(j(this),"string"==typeof e){var t=this,n=a.get(t).ownerNode;n.textContent=function(e){var t=e.replace(s,"");return t!==e&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),t.trim()}(e),a.set(t,n.sheet),u.get(t).forEach(function(e){e.isConnected()&&E(t,P(t,e))})}},o(f,"cssRules",{configurable:!0,enumerable:!0,get:function(){return j(this),a.get(this).cssRules}}),["addImport","addPageRule","addRule","deleteRule","insertRule","removeImport","removeRule"].forEach(function(e){f[e]=function(){var t=this;j(t);var n=arguments,r=a.get(t),o=u.get(t),i=r[e].apply(r,n);return o.forEach(function(r){if(r.isConnected()){var o=P(t,r).sheet;o[e].apply(o,n)}}),i}}),o(N,Symbol.hasInstance,{configurable:!0,value:C});var p={childList:!0,subtree:!0},d=new WeakMap,h=new WeakMap,v=new WeakMap,y=new WeakMap,m=k.prototype;if(m.isConnected=function(){var e=h.get(this);return e instanceof Document?"loading"!==e.readyState:function(e){return"isConnected"in e?e.isConnected:document.contains(e)}(e.host)},m.connect=function(){var e=x(this);y.get(this).observe(e,p),v.get(this).length>0&&M(this),R(e,function(e){A(e).connect()})},m.disconnect=function(){y.get(this).disconnect()},m.update=function(e){var t=this,n=h.get(t)===document?"Document":"ShadowRoot";if(!Array.isArray(e))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Iterator getter is not callable.");if(!e.every(C))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Failed to convert value to 'CSSStyleSheet'");if(e.some(O))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Can't adopt non-constructed stylesheets");t.sheets=e;var r,o,i=v.get(t),s=(r=e).filter(function(e,t){return r.indexOf(e)===t});(o=s,i.filter(function(e){return-1===o.indexOf(e)})).forEach(function(e){var n;(n=P(e,t)).parentNode.removeChild(n),function(e,t){l.get(e).delete(t),u.set(e,u.get(e).filter(function(e){return e!==t}))}(e,t)}),v.set(t,s),t.isConnected()&&s.length>0&&M(t)},window.CSSStyleSheet=N,T(Document),"ShadowRoot"in window){T(ShadowRoot);var b=Element.prototype,g=b.attachShadow;b.attachShadow=function(e){var t=g.call(this,e);return"closed"===e.mode&&n.set(this,t),t}}var S=A(document);S.isConnected()?S.connect():document.addEventListener("DOMContentLoaded",S.connect.bind(S))}function w(e){return e.shadowRoot||n.get(e)}function C(e){return"object"==typeof e&&(f.isPrototypeOf(e)||c.isPrototypeOf(e))}function O(e){return"object"==typeof e&&c.isPrototypeOf(e)}function P(e,t){return l.get(e).get(t)}function E(e,t){requestAnimationFrame(function(){var n,r;!function(e){for(var t=0;t<e.cssRules.length;t++)e.deleteRule(0)}(t.sheet),n=a.get(e),r=t.sheet,i.call(n.cssRules,function(e,t){r.insertRule(e.cssText,t)})})}function j(e){if(!a.has(e))throw new TypeError("Illegal invocation")}function N(){var e=this,n=document.createElement("style");t.body.appendChild(n),a.set(e,n.sheet),u.set(e,[]),l.set(e,new WeakMap)}function A(e){var t=d.get(e);return t||(t=new k(e),d.set(e,t)),t}function T(e){o(e.prototype,"adoptedStyleSheets",{configurable:!0,enumerable:!0,get:function(){return A(this).sheets},set:function(e){A(this).update(e)}})}function R(e,t){for(var n=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT,function(e){return w(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},null,!1),r=void 0;r=n.nextNode();)t(w(r))}function x(e){var t=h.get(e);return t instanceof Document?t.body:t}function M(e){var t=document.createDocumentFragment(),n=v.get(e),r=y.get(e),o=x(e);r.disconnect(),n.forEach(function(n){t.appendChild(P(n,e)||function(e,t){var n=document.createElement("style");return l.get(e).set(t,n),u.get(e).push(t),n}(n,e))}),o.insertBefore(t,null),r.observe(o,p),n.forEach(function(t){E(t,P(t,e))})}function k(t){var n=this;n.sheets=[],h.set(n,t),v.set(n,[]),y.set(n,new MutationObserver(function(t,r){document?t.forEach(function(t){e||i.call(t.addedNodes,function(e){e instanceof Element&&R(e,function(e){A(e).connect()})}),i.call(t.removedNodes,function(t){t instanceof Element&&(function(e,t){return t instanceof HTMLStyleElement&&v.get(e).some(function(t){return P(t,e)})}(n,t)&&M(n),e||R(t,function(e){A(e).disconnect()}))})}):r.disconnect()}))}}(),function(){var e="undefined"!=typeof window?window:global;if(void 0!==e.Reflect&&void 0!==e.customElements&&!e.customElements.hasOwnProperty("polyfillWrapFlushCallback")){var t=e.HTMLElement;e.HTMLElement=function(){return Reflect.construct(t,[],this.constructor)},HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)}}();var d=/\B([A-Z])/g;function h(e){var t=new CSSStyleSheet;return t.replaceSync(e),t}function v(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function y(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function m(e,t,n){var r=Object.assign({merge:"uniqueMerge",default:null},n),o=e.constructor,i=o[t],s=y(i)?0:Array.isArray(i)?1:2;if("none"===r.merge||2===s)return i;for(var c=0===s?Object.assign({},r.default):r.default,a=[i];o&&(o=o.__proto__)[t];)a.push(o[t]);var u=i;return u=0===s?a.reduce(function(e,t){return y(t)?Object.assign({},c,t,e):e},{}):a.reduce(function(e,t){return Array.isArray(t)&&e.push.apply(e,t),e},[]),Array.isArray(u)&&"uniqueMerge"===r.merge&&(u=Array.from(new Set(u)),y(c)&&u.forEach(function(e,t){y(e)&&(u[t]=Object.assign({},c,e))})),u||c}function b(e,t){var n;if(t?t.ignoreAttrs=!0:t={ignoreAttrs:!0},arguments.length>2?n=[].slice.call(arguments,2).flat():null!=t.children&&(n=t.children,delete t.children),e===l)return n;if("function"==typeof e){if(!e.tagName)return n&&(t.children=n),e(t);e=e.tagName}return{nodeName:e,children:n,attributes:t,key:t.key}}Array.prototype.flat||(Array.prototype.flat=function(e){void 0===e&&(e=1);var t=[];return function n(r,o){for(var i,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r);!(i=s()).done;){var c=i.value;Array.isArray(c)&&o<e?n(c,o+1):t.push(c)}}(this,0),t}),b.f=l;var g={onanimationcancel:1,oncompositionend:1,oncompositionstart:1,oncompositionupdate:1,onfocusin:1,onfocusout:1,onscrollend:1,ontouchcancel:1,ontouchend:1,ontouchmove:1,ontouchstart:1},S=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,w={};function C(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,n,r,o){if("className"===t&&(t="class"),"o"==t[0]&&"-"==t[1]&&Promise.resolve().then(function(){var n;null==(n=w[t])||n.call(w,e,r)}),"key"===t||"ignoreAttrs"===t);else if("ref"===t)f(n,null),f(r,e);else if("class"!==t||o)if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||E(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||E(e.style,t,r[t])}else if("unsafeHTML"===t)r&&(e.innerHTML=r.html||r||"");else if("o"==t[0]&&"n"==t[1])!function(e,t,n,r){var o=t!==(t=t.replace(/Capture$/,"")),i=t.toLowerCase();t=(g[i]||i in e?i:t).slice(2),n?r||e.addEventListener(t,P,o):e.removeEventListener(t,P,o),(e._listeners||(e._listeners={}))[t]=n}(e,t,r,n);else if("INPUT"===e.nodeName&&"value"===t)e.value=null==r?"":r;else if("list"!==t&&"type"!==t&&"css"!==t&&!o&&t in e){try{e[t]=null==r?"":r}catch(e){}null!=r&&!1!==r||"spellcheck"==t||e.removeAttribute(t)}else{var i=o&&t!==(t=t.replace(/^xlink:?/,""));if(null==r||!1===r)i?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t);else if("function"!=typeof r)if(i)e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r);else if("Component"===e.constructor.is){var s,c=null==(s=e.constructor.reflectProps)?void 0:s[t];c&&e.setAttribute(t,"function"==typeof c?c(r):r)}else e.setAttribute(t,r)}else e.className=r||""}function P(e){return this._listeners[e.type](e)}function E(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n.toString()):e[t]=null==n?"":"number"!=typeof n||S.test(t)?n.toString():n+"px"}var j=0,N=!1,A=!1,T=!1;function R(e,t,n,r,o){return e||t?(j++||(N=null!=n&&void 0!==n.ownerSVGElement,T=!1),p(t)?n?(M(n,t,T,r,o),i=n.childNodes):(i=[],t.forEach(function(t,n){var s=x(0===n?e:null,t,r,o);i.push(s)})):(p(e)||e instanceof NodeList?[].concat(e).forEach(function(e,n){0===n?i=x(e,t,r,o):k(e,!1)}):i=x(e,t,r,o),n&&(null==(s=i)?void 0:s.parentNode)!==n&&n.appendChild(i)),--j||(T=!1),i):null;var i,s}function x(e,t,n,r){e&&t&&e.props&&(e.props.children=t.children);var o,i=e,s=N,c=A;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||n)?e.nodeValue!=t&&(e.nodeValue=String(t)):(i=document.createTextNode(String(t)),e&&(e.parentNode&&(null==(o=e.parentNode)||o.replaceChild(i,e)),k(e,!0))),i&&(i.prevProps={}),i;var a,l,f,p=t.nodeName;if(A="foreignObject"===p,N="svg"===p||!A&&N,p=String(p),(!e||!v(e,p))&&(l=p,(f=A||N?document.createElementNS("http://www.w3.org/2000/svg",l):document.createElement(l)).normalizedNodeName=l,"Component"===(null==(a=(i=f).constructor)?void 0:a.is)&&Object.assign(i.props,t.attributes),e)){for(var d;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&(null==(d=e.parentNode)||d.replaceChild(i,e)),k(e,!0)}var h=i.firstChild,y=i.prevProps,m=t.children;if(null==y){y=i.prevProps={};for(var b=i.attributes,g=b.length;g--;)y[b[g].name]=b[g].value}return!T&&m&&1===m.length&&"string"==typeof m[0]&&null!=h&&void 0!==h.splitText&&null==h.nextSibling?h.nodeValue!=m[0]&&(h.nodeValue=m[0]):(m&&m.length||null!=h)&&("Component"==i.constructor.is&&i.constructor.noSlot||M(i,m,T||null!=y.unsafeHTML,n,r)),function(e,t,n,r,o){var i,s,c=e.update;for(i in e.receiveProps&&(s=Object.assign({},n)),n)t&&null!=t[i]||null==n[i]||(O(e,i,n[i],n[i]=void 0,A||N),c&&delete e.props[i]);for(i in t)if(c&&"object"==typeof t[i]&&"ref"!==i){("style"===i||"o"===i[0]&&"-"===i[1])&&O(e,i,n[i],n[i]=t[i],A||N);var a=u(i);e.props[a]=n[a]=t[i]}else if("children"!==i&&(!(i in n)||t[i]!==("value"===i||"checked"===i?e[i]:n[i])))if(O(e,i,n[i],t[i],A||N),-1!==e.nodeName.indexOf("-")){e.props=e.props||{};var l=u(i);e.props[l]=n[l]=t[i]}else n[i]=t[i];c&&!o&&e.parentNode&&!1!==e.receiveProps(e.props,s)&&e.queuedUpdate()}(i,t.attributes,y,0,r),i.props&&(i.props.children=t.children),N=s,A=c,i}function M(e,t,n,r,o){var i,s,c,a,u,l,f,p=e.childNodes,d=[],h={},y=0,m=0,b=p.length,g=0,S=t?t.length:0;if(0!==b)for(var w=0;w<b;w++){var O,P=p[w],E=P.prevProps,j=S&&E?E.key:null;null!=j?(y++,h[j]=P):(E||(void 0!==P.splitText?!n||(null==(O=P.nodeValue)?void 0:O.trim()):n))&&(d[g++]=P)}if(0!==S)for(var N=0;N<S;N++){if(u=null,a=t[N]){var A=a.key;if(null!=A)y&&void 0!==h[A]&&(u=h[A],h[A]=void 0,y--);else if(m<g)for(i=m;i<g;i++)if(void 0!==d[i]&&(l=s=d[i],"string"==typeof(f=a)||"number"==typeof f?void 0!==l.splitText:v(l,f.nodeName))){u=s,d[i]=void 0,i===g-1&&g--,i===m&&m++;break}}u=x(u,a,r,o),c=p[N],u&&u!==e&&u!==c&&(null==c?e.appendChild(u):u===c.nextSibling?C(c):e.insertBefore(u,c))}if(y)for(var T in h)void 0!==h[T]&&k(h[T],!1);for(;m<=g;)void 0!==(u=d[g--])&&k(u,!1)}function k(e,t){null!=e.prevProps&&e.prevProps.ref&&("function"==typeof e.prevProps.ref?e.prevProps.ref(null):e.prevProps.ref.current&&(e.prevProps.ref.current=null)),!1!==t&&null!=e.prevProps||C(e),function(e){var t;for(e=null==(t=e)?void 0:t.lastChild;e;){var n=e.previousSibling;k(e,!0),e=n}}(e)}var L={mixin:{},globalCSS:[]};function I(e,t){Object.defineProperty(t,"tagName",{value:e,writable:!1}),customElements.get(e)?console.warn("Failed to execute 'define' on 'CustomElementRegistry': the tag name \""+e+'" has already been used with this registry'):customElements.define(e,t)}var _=0,F=new WeakMap,W=/*#__PURE__*/function(e){var t,r;function o(){var t;return(t=e.call(this)||this).elementId=void 0,t.isInstalled=void 0,t.inject=void 0,t.injection=void 0,t.renderRoot=void 0,t.rootElement=void 0,t.state=void 0,t.updateQueued=!1,t.handleProps(),t.elementId=_++,t.isInstalled=!1,t.rootElement=null,t}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,i(t,r),o.define=function(e){I(e,this)};var s,c,a=o.prototype;return a.handleProps=function(){this.constructor.defaultProps=m(this,"defaultProps",{default:{}})||{},this.constructor.propTypes=m(this,"propTypes",{default:{}})||{},this.constructor.reflectProps=m(this,"reflectProps",{default:{}})||{};var e=m(this,"props",{default:{},merge:"uniqueMerge"});if(this.constructor.props)for(var t in e){var n=e[t];this.constructor.defaultProps[t]=n.default,this.constructor.propTypes[t]=n.type,this.constructor.reflectProps[t]=n.reflect}this.props=Object.assign({},this.constructor.defaultProps,this.props)},a.attributeChangedCallback=function(e,t,n){if(this.constructor.props&&this.constructor.props[e]){var r=this.constructor.props[e];if(r.changed){var o=this.getTypeValueOfProp(e,n),i=this.getTypeValueOfProp(e,t);r.changed.call(this,o,i)}}},a.setState=function(e,t){var n=this;if(void 0===t&&(t=!1),"object"!=typeof e)throw new Error("takes an object of state variables to update");Object.keys(e).forEach(function(t){return n.state[t]=e[t]}),t||this.queuedUpdate()},a.injectObject=function(){for(var e=this,t=this.parentNode;t&&!this.store&&!L.mixin.store;)this.store=t.store,t=t.parentNode||t.host;if(this.inject){var n;for(this.injection={},t=this.parentNode;t&&!n;)n=t.provide,t=t.parentNode||t.host;n&&this.inject.forEach(function(t){e.injection[t]=n[t]})}var r=function(t){e.hasOwnProperty(t)||Object.defineProperty(e,t,{get:function(){return L.mixin[t]}})};for(var o in L.mixin)r(o)},a.createRenderRoot=function(){if(this.constructor.isLightDOM)return this;if(this.shadowRoot){for(var e;e=this.shadowRoot.firstChild;)this.shadowRoot.removeChild(e);return this.shadowRoot}return this.attachShadow({mode:"open"})},a.applyAdoptedStyleSheets=function(){if(this.constructor.isLightDOM||F.has(this.constructor))this.renderRoot.adoptedStyleSheets=F.get(this.constructor);else{var e=this.constructor.css;if(e){var t=[];t="string"==typeof e?[h(e)]:p(e)?e.map(function(e){return"string"==typeof e?h(e):e.default&&"string"==typeof e.default?h(e.default):e}):e.default&&"string"==typeof e.default?[h(e.default)]:[e],t=[].concat(L.globalCSS,t),this.renderRoot.adoptedStyleSheets=t,F.set(this.constructor,t)}else L.globalCSS.length&&(this.renderRoot.adoptedStyleSheets=L.globalCSS)}},a.appendStyleVNode=function(e){if(this.props.css&&e){var t={nodeName:"style",attributes:{},children:[this.props.css]};e.push?e.push(t):e.children.push(t)}},a.connectedCallback=function(){var e=this;this.injectObject(),this.attrsToProps(),this.install(),this.fire("install",this),this.renderRoot=this.createRenderRoot(),this.applyAdoptedStyleSheets(),n.setActiveComponent(this),this.beforeRender(),this.fire("beforeRender",this);var t,r=this.render(this.props,this.store);this.appendStyleVNode(r),this.rendered(r),n.clearActiveComponent(),this.rootElement=R(null,r,null,this,!1),p(this.rootElement)?this.rootElement.forEach(function(t){var n;null==(n=e.renderRoot)||n.appendChild(t)}):this.rootElement&&(null==(t=this.renderRoot)||t.appendChild(this.rootElement)),this.installed(),this.fire("installed",this),this.isInstalled=!0,Promise.resolve().then(function(){e.ready(),e.fire("ready",e)})},a.disconnectedCallback=function(){this.uninstall(),this.fire("uninstall",this),this.isInstalled=!1},a.update=function(e){this.beforeUpdate(),this.fire("beforeUpdate",this),this.attrsToProps(),n.setActiveComponent(this),this.beforeRender(),this.fire("beforeRender",this);var t=this.render(this.props,this.store);this.appendStyleVNode(t),this.rendered(t),n.clearActiveComponent(null),this.rootElement=R(this.rootElement,t,this.renderRoot,this,!!e),this.updated(),this.fire("updated",this)},a.queuedUpdate=function(){var e=this;this.updateQueued||(this.updateQueued=!0,Promise.resolve().then(function(){e.update(),e.updateQueued=!1}))},a.updateProps=function(e){var t=this;Object.keys(e).forEach(function(n){t.props[n]=e[n],t.prevProps&&(t.prevProps[n]=e[n])}),this.update()},a.updateSelf=function(){this.update(!0)},a.removeProp=function(e){this.removeAttribute(e),this.isInstalled&&this.update()},a.setProp=function(e,t){this.setAttribute(e,t&&"object"==typeof t?JSON.stringify(t):t),this.isInstalled&&this.update()},a.attrsToProps=function(){var e=this;if(!this.props.ignoreAttrs){var t=this;t.props.css=t.getAttribute("css");var n=this.constructor.propTypes;n&&Object.keys(n).forEach(function(n){var r=t.getAttribute(n.replace(d,"-$1").toLowerCase());t.props[n]=null!==r?e.getTypeValueOfProp(n,r):t.constructor.defaultProps&&t.constructor.defaultProps.hasOwnProperty(n)?t.constructor.defaultProps[n]:null})}},a.getTypeValueOfProp=function(e,t){for(var n=this.constructor.propTypes,r=p(n[e])?n[e]:[n[e]],o=0;o<r.length;o++)switch(r[o]){case String:return t;case Number:return Number(t);case Boolean:return Boolean("false"!==t&&"0"!==t);case Array:case Object:try{return JSON.parse(t)}catch(n){console.warn("The "+e+" object prop does not comply with the JSON specification, the incorrect string is ["+t+"].")}}},a.fire=function(e,t,n){var r=Object.assign({bubbles:!1,composed:!1},n),o=r.bubbles,i=r.composed,s=this.props["on"+function(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()}).replace(/^\S/,function(e){return e.toUpperCase()})}(e)];s?s(new CustomEvent(e,{detail:t,bubbles:o,composed:i})):this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:o,composed:i}))},a.install=function(){},a.installed=function(){},a.ready=function(){},a.uninstall=function(){},a.beforeUpdate=function(){},a.updated=function(){},a.beforeRender=function(){},a.rendered=function(e){},a.receiveProps=function(){},s=o,(c=[{key:"observedAttributes",get:function(){return this.props?Object.keys(this.props):[]}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?o:String(o),r)}var o}(s,c),Object.defineProperty(s,"prototype",{writable:!1}),o}(/*#__PURE__*/c(HTMLElement));W.is="Component",W.defaultProps=void 0,W.reflectProps=void 0,W.propTypes=void 0,W.css=void 0,W.isLightDOM=void 0,W.noSlot=void 0;var D={}.hasOwnProperty;function H(){for(var e=[].slice.call(arguments),t=[],n=0;n<e.length;n++){var r=e[n];if(r){var o=typeof r;if("string"===o||"number"===o)t.push(r);else if(Array.isArray(r)&&r.length){var i=H.apply(void 0,r);i&&t.push(i)}else if("object"===o)for(var s in r)D.call(r,s)&&r[s]&&t.push(s)}}return t.join(" ")}var V={};Object.defineProperty(e,"Signal",{enumerable:!0,get:function(){return n.Signal}}),Object.defineProperty(e,"batch",{enumerable:!0,get:function(){return n.batch}}),Object.defineProperty(e,"clearActiveComponent",{enumerable:!0,get:function(){return n.clearActiveComponent}}),Object.defineProperty(e,"computed",{enumerable:!0,get:function(){return n.computed}}),Object.defineProperty(e,"effect",{enumerable:!0,get:function(){return n.effect}}),Object.defineProperty(e,"getActiveComponent",{enumerable:!0,get:function(){return n.getActiveComponent}}),Object.defineProperty(e,"setActiveComponent",{enumerable:!0,get:function(){return n.setActiveComponent}}),Object.defineProperty(e,"signal",{enumerable:!0,get:function(){return n.signal}}),Object.defineProperty(e,"signalObject",{enumerable:!0,get:function(){return n.signalObject}}),e.Component=W,e.WeElement=W,e.bind=function(e,t,n){return{configurable:!0,get:function(){var e=n.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}},e.classNames=H,e.cloneElement=function(e,t){var n=[].slice.call(arguments,2);return b(e.nodeName,r({},e.attributes,t),n.length>0?n.flat():e.children)},e.createElement=b,e.createRef=function(){return{}},e.css=function(e){var t=[].slice.call(arguments,1),n="";if(e.forEach(function(e,r){if(void 0!==t[r]&&"string"!=typeof t[r]&&"number"!=typeof t[r])throw new Error("Unsupported value in CSS: "+t[r]);n+=e+(t[r]||"")}),V[n])return V[n];var r=new CSSStyleSheet;return r.replaceSync(n),V[n]=r,r},e.define=I,e.defineElement=I,e.extractClass=function(e){var t=[].slice.call(arguments,1);if(e.class?(t.unshift(e.class),delete e.class):e.className&&(t.unshift(e.className),delete e.className),t.length>0)return{class:H.apply(void 0,t)}},e.globalCSS=function(e){L.globalCSS.includes(e)||L.globalCSS.push(e)},e.h=b,e.mixin=function(e){Object.assign(L.mixin,e)},e.registerDirective=function(e,t){w["o-"+e]=t},e.render=function(e,t,n){return t="string"==typeof t?document.querySelector(t):t,n&&t&&(t.store=n),R(null,e,t,null,!1)},e.tag=function(e){return function(t){I(e,t)}},e.version="7.6.10"}); | ||
if(typeof window!=='undefined'){window.omi=window.Omi}; | ||
//# sourceMappingURL=omi.umd.js.map |
{ | ||
"name": "omi", | ||
"version": "7.6.9", | ||
"version": "7.6.10", | ||
"scripts": { | ||
@@ -45,4 +45,3 @@ "start": "vite", | ||
"typedoc": "^0.25.1", | ||
"typescript": "^4.6.4", | ||
"vite": "^3.1.0" | ||
"typescript": "^4.6.4" | ||
}, | ||
@@ -49,0 +48,0 @@ "lint-staged": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
534545
23
1417