2023-11-22 21:29:40 +01:00
var y = { isSignal ( t ) { return ! 1 } , processReactiveAttribute ( t , e , n , r ) { return n } } ; function T ( t , e = ! 0 ) { return e ? Object . assign ( y , t ) : ( Object . setPrototypeOf ( t , y ) , t ) } function C ( t ) { return y . isPrototypeOf ( t ) && t !== y ? t : y } function x ( t ) { return typeof t > "u" } function B ( t ) { let e = typeof t ; return e !== "object" ? e : t === null ? "null" : Object . prototype . toString . call ( t ) } function N ( t , e ) { if ( ! t || ! ( t instanceof AbortSignal ) ) return ! 0 ; if ( ! t . aborted ) return t . addEventListener ( "abort" , e ) , function ( ) { t . removeEventListener ( "abort" , e ) } } var $ = { setDeleteAttr : tt , ssr : "" } ; function tt ( t , e , n ) { if ( Reflect . set ( t , e , n ) , ! ! x ( 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 E = [ { scope : document . body , host : t => t ? t ( document . body ) : document . body , custom _element : ! 1 , prevent : ! 0 } ] , g = { get current ( ) { return E [ E . length - 1 ] } , get host ( ) { return this . current . host } , preventDefault ( ) { let { current : t } = this ; return t . prevent = ! 0 , t } , get state ( ) { return [ ... E ] } , push ( t = { } ) { return E . push ( Object . assign ( { } , this . current , { prevent : ! 1 } , t ) ) } , pushRoot ( ) { return E . push ( E [ 0 ] ) } , pop ( ) { if ( E . length !== 1 ) return E . pop ( ) } } ; function H ( ... t ) { return this . appendOriginal ( ... t ) , this } function et ( t ) { return t . append === H || ( t . appendOriginal = t . append , t . append = H ) , t } var L ; function S ( t , e , ... n ) { let r = C ( this ) , o = 0 , c , s ; switch ( ( Object ( e ) !== e || r . isSignal ( e ) ) && ( e = { textContent : e } ) , ! 0 ) { case typeof t == "function" : { o = 1 , g . push ( { scope : t , host : ( ... p ) => p . length ? ( o === 1 ? n . unshift ( ... p ) : p . forEach ( v => v ( s ) ) , void 0 ) : s } ) , c = t ( e || void 0 ) ; let a = c instanceof DocumentFragment ; if ( c . nodeName === "#comment" ) break ; let d = S . mark ( { type : "component" , name : t . name , host : a ? "this" : "parentElement" } ) ; c . prepend ( d ) , a && ( s = d ) ; break } case t === "#text" : c = j . call ( this , document . createTextNode ( "" ) , e ) ; break ; case ( t === "<>" || ! t ) : c = j . call ( this , document . createDocumentFragment ( ) , e ) ; break ; case ! ! L : c = j . call ( this , document . createElementNS ( L , t ) , e ) ; break ; case ! c : c = j . call ( this , document . createElement ( t ) , e ) } return et ( c ) , s || ( s = c ) , n . forEach ( a => a ( s ) ) , o && g . pop ( ) , o = 2 , c } S . mark = function ( t , e = ! 1 ) { t = Object . entries ( t ) . map ( ( [ o , c ] ) => o + ` =" ${ c } " ` ) . join ( " " ) ; let n = e ? "" : "/" , r = document . createComment ( ` <dde:mark ${ t } ${ $ . ssr } ${ n } > ` ) ; return e || ( r . end = document . createComment ( "</dde:mark>" ) ) , r } ; function Et ( t ) { let e = this ; return function ( ... r ) { L = t ; let o = S . call ( e , ... r ) ; return L = void 0 , o } } var { setDeleteAttr : I } = $ , P = new WeakMap ; function j ( t , ... e ) { if ( ! e . length ) return t ; P . set ( t , G ( t , this ) ) ; for ( let [ n , r ] of Object . entries ( Object . assign ( { } , ... e ) ) ) Z . call ( this , t , n , r ) ; return P . delete ( t ) , t } function Z ( t , e , n ) { let { setRemoveAttr : r , s : o } = G ( t , this ) , c = this ; n = o . processReactiveAttribute ( t , e , n , ( a , d ) => Z . call ( c , t , a , d ) ) ; let [ s ] = e ; if ( s === "=" ) return r ( e . slice ( 1 ) , n ) ; if ( s === "." ) return J ( t , e . slice ( 1 ) , n ) ; if ( /(aria|data)([A-Z])/ . test ( e ) ) return e = e . replace ( /([a-z])([A-Z])/g , "$1-$2" ) . toLowerCase ( ) , r ( e , n ) ; switch ( e === "className" && ( e = "class" ) , e ) { case "xlink:href" : return r ( e , n , "http://www.w3.org/1999/xlink" ) ; case "textContent" : return I ( t , e , n ) ; case "style" : if ( typeof n != "object" ) break ; case "dataset" : return z ( o , n , J . bind ( null , t [ e ] ) ) ; case "ariaset" : return z ( o , n , ( a , d ) => r ( "aria-" + a , d ) ) ; case "classList" : return nt . call ( c , t , n ) } return rt ( t , e ) ? I ( t , e , n ) : r ( e , n ) } function G ( t , e ) { if ( P . has ( t ) ) return P . get ( t ) ; let r = ( t instanceof SVGElement ? ct : ot ) . bind ( null , t , "Attribute" ) , o = C ( e ) ; return { setRemoveAttr : r , s : o } } function nt ( t , e ) { let n = C ( this ) ; return z ( n , e , ( r , o ) => t . classList . toggle ( r , o === - 1 ? void 0 : ! ! o ) ) , t } function vt ( t ) { return Array . from ( t . children ) . forEach ( e => e . remove ( ) ) , t } function A ( t , e , n , r ) { return t instanceof HTMLElement ? t [ e + "Attribute" ] ( n , r ) : t [ e + "AttributeNS" ] ( null , n , r ) } function rt ( t , e ) { if ( ! Reflect . has ( t , e ) ) return ! 1 ; let n = V ( t , e ) ; return ! x ( n . set ) } function V ( t , e ) { if ( t = Object . getPrototypeOf ( t ) , ! t ) return { } ; let n = Object . getOwnPropertyDescriptor ( t , e ) ; return n || V ( t , e ) } function z ( t , e , n ) { if ( ! ( typeof e != "object" || e === null ) ) return Object . entries ( e ) . forEach ( function ( [ o , c ] ) { o && ( c = t . processReactiveAttribute ( e , o , c , n ) , n ( o , c ) ) } ) } function K ( t ) { return Array . isArray ( t ) ? t . filter ( Boolean ) . join ( " " ) : t } function ot ( t , e , n , r ) { return t [ ( x ( r ) ? "remove" : "set" ) + e ] ( n , K ( r ) ) } function ct ( t , e , n , r , o = null ) { return t [ ( x ( r ) ? " remove
* Investigate ` __dde_attributes ` key of the element . * / b . c l e a r ( . . . O b j e c t . v a l u e s ( r [ O ] ) ) } ) ( r ) } ) , n e w P r o x y ( n , { a p p l y ( o , c , s ) { i f ( ! s . l e n g t h ) r e t u r n o ( ) ; l e t a = s [ 0 ] ; r e t u r n A ( r , " s e t " , t , a ) } } ) } ; v a r X = { i s S i g n a l : W , p r o c e s s R e a c t i v e A t t r i b u t e ( t , e , n , r ) { i f ( ! W ( n ) ) r e t u r n n ; l e t o = c = > r ( e , c ) ; r e t u r n q ( n , o ) , Y ( n , o , t , e ) , n ( ) } } ; f u n c t i o n Y ( t , e , . . . n ) { l e t { c u r r e n t : r } = g ; r . p r e v e n t | | r . h o s t ( f u n c t i o n ( o ) { o [ D ] | | ( o [ D ] = [ ] , _ . d i s c o n n e c t e d ( ( ) = > o [ D ] . f o r E a c h ( ( [ [ c , s ] ] ) = > R ( c , s , c [ l ] ? . h o s t ( ) = = = o ) ) ) ( o ) ) , o [ D ] . p u s h ( [ [ t , e ] , . . . n ] ) } ) } f u n c t i o n Q ( t , e ) { l e t n = ( . . . r ) = > r . l e n g t h ? l t ( n , . . . r ) : d t ( n ) ; r e t u r n f t ( n , t , e ) } v a r u t = O b j e c t . a s s i g n ( O b j e c t . c r e a t e ( n u l l ) , { s t o p P r o p a g a t i o n ( ) { t h i s . s k i p = ! 0 } } ) , U = c l a s s e x t e n d s E r r o r { c o n s t r u c t o r ( ) { s u p e r ( ) ; l e t [ e , . . . n ] = t h i s . s t a c k . s p l i t ( `
` ),r=e.slice(e.indexOf("@"),e.indexOf(".js:")+4);this.stack=n.find(o=>!o.includes(r))}};function ft(t,e,n){let r=[];B(n)!=="[object Object]"&&(n={});let{onclear:o}=b.symbols;n[o]&&(r.push(n[o]),Reflect.deleteProperty(n,o));let{host:c}=g;return Reflect.defineProperty(t,l,{value:{value:e,actions:n,onclear:r,host:c,listeners:new Set,defined:new U},enumerable:!1,writable:!1,configurable:!0}),t.toJSON=()=>t(),Object.setPrototypeOf(t[l],ut),t}function at(){return M[M.length-1]}function dt(t){if(!t[l])return;let{value:e,listeners:n}=t[l],r=at();return r&&n.add(r),h.has(r)&&h.get(r).add(t),e}function lt(t,e,n){if(!t[l])return;let r=t[l];if(!(!n&&r.value===e))return r.value=e,r.listeners.forEach(o=>o(e)),e}function q(t,e){if(t[l])return t[l].listeners.add(e)}function R(t,e,n){let r=t[l];if(!r)return;let o=r.listeners.delete(e);if(n&&!r.listeners.size){if(b.clear(t),!h.has(r))return o;let c=h.get(r);if(!h.has(c))return o;h.get(c).forEach(s=>R(s,c,!0))}return o}T(X);export{b as S,j as assign,Z as assignAttribute,et as chainableAppend,nt as classListDeclarative,S as createElement,Et as createElementNS,yt as dispatchEvent,S as el,Et as elNS,A as elementAttribute,vt as empty,W as isSignal,_ as on,T as registerReactivity,g as scope};