2023-11-08 13:44:37 +01:00
|
|
|
var m={isSignal(t){return!1},processReactiveAttribute(t,e,n,o){return n}};function $(t,e=!0){return e?Object.assign(m,t):(Object.setPrototypeOf(t,m),t)}function _(t){return m.isPrototypeOf(t)&&t!==m?t:m}function l(t){return typeof t>"u"}function x(t,e){if(!t||!(t instanceof AbortSignal))return!0;if(!t.aborted)return t.addEventListener("abort",e),function(){t.removeEventListener("abort",e)}}var y={setDeleteAttr:U};function U(t,e,n){if(Reflect.set(t,e,n),!!l(n)){if(Reflect.deleteProperty(t,e),t instanceof HTMLElement&&t.getAttribute(e)==="undefined")return t.removeAttribute(e);if(Reflect.get(t,e)==="undefined")return Reflect.set(t,e,"")}}var v=[{scope:document.body,host:t=>t?t(document.body):document.body,prevent:!0}],L={get current(){return v[v.length-1]},get host(){return this.current.host},preventDefault(){let{current:t}=this;return t.prevent=!0,t},get state(){return[...v]},push(t={}){return v.push(Object.assign({},this.current,{prevent:!1},t))},pop(){return v.pop()}},A;function E(t,e,...n){let o=_(this),r=0,c,f;switch((Object(e)!==e||o.isSignal(e))&&(e={textContent:e}),!0){case typeof t=="function":{r=1,L.push({scope:t,host:h=>h?(r===1?n.unshift(h):h(f),void 0):f}),c=t(e||void 0);let d=c instanceof DocumentFragment,a=E.mark({type:"component",name:t.name,host:d?"this":c.nodeName==="#comment"?"previousLater":"parentElement"});c.prepend(a),d&&(f=a);break}case t==="#text":c=w.call(this,document.createTextNode(""),e);break;case(t==="<>"||!t):c=w.call(this,document.createDocumentFragment(),e);break;case A:c=w.call(this,document.createElementNS(A,t),e);break;case!c:c=w.call(this,document.createElement(t),e)}return B(c),f||(f=c),n.forEach(d=>d(f)),r&&L.pop(),r=2,c}E.mark=function(t,e=!1){t=Object.entries(t).map(([r,c])=>r+`="${c}"`).join(" ");let n=e?"":"/",o=document.createComment(`<dde:mark ${t}${n}>`);return e||(o.end=document.createComment("</dde:mark>")),o};E.later=function(){let t=E.mark({type:"later"});return t.append=t.prepend=function(...e){return t.after(...e),t},t};function Q(t){let e=this;return function(...o){A=t;let r=E.call(e,...o);return A=void 0,r}}var{setDeleteAttr:N}=y,O=new WeakMap;function w(t,...e){if(!e.length)return t;O.set(t,T(t,this));for(let[n,o]of Object.entries(Object.assign({},...e)))P.call(this,t,n,o);return O.delete(t),t}function P(t,e,n){let{setRemoveAttr:o,s:r}=T(t,this),c=this;n=r.processReactiveAttribute(t,e,n,(d,a)=>P.call(c,t,d,a));let[f]=e;if(f==="=")return o(e.slice(1),n);if(f===".")return D(t,e.slice(1),n);if(/(aria|data)([A-Z])/.test(e))return e=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o(e,n);switch(e==="className"&&(e="class"),e){case"xlink:href":return o(e,n,"http://www.w3.org/1999/xlink");case"textContent":return N(t,e,n);case"style":if(typeof n!="object")break;case"dataset":return S(r,n,D.bind(null,t[e]));case"ariaset":return S(r,n,(d,a)=>o("aria-"+d,a));case"classList":return q.call(c,t,n)}return z(t,e)?N(t,e,n):o(e,n)}function T(t,e){if(O.has(t))return O.get(t);let o=(t instanceof SVGElement?k:F).bind(null,t,"Attribute"),r=_(e);return{setRemoveAttr:o,s:r}}function q(t,e){let n=_(this);return S(n,e,(o,r)=>t.classList.toggle(o,r===-1?void 0:!!r)),t}function Y(t){return Array.from(t.children).forEach(e=>e.remove()),t}function z(t,e){if(!Reflect.has(t,e))return!1;let n=W(t,e);return!l(n.set)}function W(t,e){if(t=Object.getPrototypeOf(t),!t)return{};let n=Object.getOwnPropertyDescriptor(t,e);return n||W(t,e)}function S(t,e,n){if(!(typeof e!="object"||e===null))return Object.entries(e).forEach(function([r,c]){r&&(c=t.processReactiveAttribute(e,r,c,n),n(r,c))})}function M(t){return Array.isArray(t)?t.filter(Boolean).join(" "):t}function F(t,e,n,o){return t[(l(o)?"remove":"set")+e](n,M(o))}function k(t,e,n,o,r=null){return t[(l(o)?"remove":"set")+e+"NS"](r,n,M(o))}function D(t,e,n){if(Reflect.set(t,e,n),!!l(n))return Reflect.deleteProperty(t,e)}function j(...t){return this.appendOrig(...t),this}function B(t){return t.append===j||(t.appendOrig=t.append,t.append=j),t}function nt(t,e,...n){let o=n.length?new CustomEvent(e,{detail:n[0]}):new Event(e);return t.dispatchEvent(o)}func
|