2023-11-05 21:49:32 +01:00
var w = { isSignal ( t ) { return ! 1 } , processReactiveAttribute ( t , e , n , r ) { return n } } ; function k ( t , e = ! 0 ) { return e ? Object . assign ( w , t ) : ( Object . setPrototypeOf ( t , w ) , t ) } function O ( t ) { return w . isPrototypeOf ( t ) && t !== w ? t : w } function E ( t ) { return typeof t > "u" } function F ( t ) { let e = typeof t ; return e !== "object" ? e : t === null ? "null" : Object . prototype . toString . call ( t ) } function R ( t , e ) { if ( ! t || ! ( t instanceof AbortSignal ) ) return ! 0 ; if ( ! t . aborted ) return t . addEventListener ( "abort" , e ) , function ( ) { t . removeEventListener ( "abort" , e ) } } var z = { setDeleteAttr : K } ; function K ( t , e , n ) { if ( Reflect . set ( t , e , n ) , ! ! E ( 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 y = [ { scope : document . body , namespace : "html" , host : t => t ? t ( document . body ) : document . body , prevent : ! 0 } ] , $ = t => t === "svg" ? "http://www.w3.org/2000/svg" : t , m = { get current ( ) { return y [ y . length - 1 ] } , get host ( ) { return this . current . host } , get namespace ( ) { return this . current . namespace } , set namespace ( t ) { return this . current . namespace = $ ( t ) } , preventDefault ( ) { let { current : t } = this ; return t . prevent = ! 0 , t } , elNamespace ( t ) { let e = this . namespace ; return this . namespace = t , { append ( ... n ) { return m . namespace = e , n . length === 1 ? n [ 0 ] : document . createDocumentFragment ( ) . append ( ... n ) } } } , get state ( ) { return [ ... y ] } , push ( t = { } ) { return t . namespace && ( t . namespace = $ ( t . namespace ) ) , y . push ( Object . assign ( { } , this . current , { prevent : ! 1 } , t ) ) } , pop ( ) { return y . pop ( ) } } ; function lt ( t , e , ... n ) { let r = O ( this ) , { namespace : o } = m , c = 0 , s , d ; switch ( ( Object ( e ) !== e || r . isSignal ( e ) ) && ( e = { textContent : e } ) , ! 0 ) { case typeof t == "function" : { c = 1 , m . push ( { scope : t , host : h => h ? ( c === 1 ? n . unshift ( h ) : h ( d ) , void 0 ) : d } ) , s = t ( e || void 0 ) ; let a = document . createComment ( ` <dde:mark type="component" name=" ${ t . name } "/> ` ) ; s . prepend ( a ) , s instanceof DocumentFragment && ( d = a ) ; break } case t === "#text" : s = C . call ( this , document . createTextNode ( "" ) , e ) ; break ; case t === "<>" : s = C . call ( this , document . createDocumentFragment ( ) , e ) ; break ; case o !== "html" : s = C . call ( this , document . createElementNS ( o , t ) , e ) ; break ; case ! s : s = C . call ( this , document . createElement ( t ) , e ) } return d || ( d = s ) , n . forEach ( a => a ( d ) ) , c && m . pop ( ) , c = 2 , s } var { setDeleteAttr : H } = z , L = new WeakMap ; function C ( t , ... e ) { if ( ! e . length ) return t ; L . set ( t , B ( t , this ) ) ; for ( let [ n , r ] of Object . entries ( Object . assign ( { } , ... e ) ) ) q . call ( this , t , n , r ) ; return L . delete ( t ) , t } function q ( t , e , n ) { let { setRemoveAttr : r , s : o } = B ( t , this ) , c = this ; n = o . processReactiveAttribute ( t , e , n , ( d , a ) => q . call ( c , t , d , a ) ) ; let [ s ] = e ; if ( s === "=" ) return r ( e . slice ( 1 ) , n ) ; if ( s === "." ) return U ( 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 H ( t , e , n ) ; case "style" : if ( typeof n != "object" ) break ; case "dataset" : return T ( o , n , U . bind ( null , t [ e ] ) ) ; case "ariaset" : return T ( o , n , ( d , a ) => r ( "aria-" + d , a ) ) ; case "classList" : return Q . call ( c , t , n ) } return X ( t , e ) ? H ( t , e , n ) : r ( e , n ) } function B ( t , e ) { if ( L . has ( t ) ) return L . get ( t ) ; let r = ( t instanceof SVGElement ? tt : Y ) . bind ( null , t , "Attribute" ) , o = O ( e ) ; return { setRemoveAttr : r , s : o } } function Q ( t , e ) { let n = O ( this ) ; return T ( n , e , ( r , o ) => t . classList . toggle ( r , o === - 1 ? void 0 : ! ! o ) ) , t } function gt ( t ) { return Array . from ( t . children ) . forEach ( e => e . remove ( ) ) , t } function X ( t , e ) { if ( ! Reflect . has ( t , e ) ) return ! 1 ; let n = G ( t , e ) ; return ! E ( n . set ) } function G ( t , e ) { if ( t = Object . getPrototypeOf ( t ) , ! t ) return { } ; let n = Object . getOwnPropertyDescriptor ( t , e ) ; return n || G ( t , e ) } function T ( 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 I ( t ) { return Array . isArray ( t ) ? t . filter ( Boolean ) . join ( " " ) : t } function Y ( t , e , n , r ) { return t [ ( E ( r ) ? "remove" : "set" ) + e ] ( n , I ( r ) ) } function tt ( t , e , n , r , o = null ) { return t [ ( E ( r ) ? "remove" : "set" ) + e + "NS" ] ( o , n , I ( r ) ) } function U ( t , e , n ) { if ( Reflect . set ( t , e , n ) , ! ! E ( n ) ) return Reflect . deleteProperty ( t , e ) } function Et ( t , e , ... n ) { let r = n . length ? new CustomEvent ( e , { detail : n [ 0 ] } ) : new Event ( e ) ; return t . dispatchEvent ( r ) } function _ ( t , e , n ) { return function ( o ) { return o . addEventListener ( t , e , n ) , o } } var N = nt ( ) , et = new
* Investigate ` __dde_attributes ` key of the element . * / g . c l e a r ( . . . O b j e c t . v a l u e s ( r [ S ] ) ) } ) ( r ) , r } ) , n } ; g . c l e a r = f u n c t i o n ( . . . t ) { f o r ( l e t n o f t ) { R e f l e c t . d e l e t e P r o p e r t y ( n , " t o J S O N " ) ; l e t r = n [ p ] ; r . o n c l e a r . f o r E a c h ( o = > o . c a l l ( r ) ) , e ( n , r ) , R e f l e c t . d e l e t e P r o p e r t y ( n , p ) } f u n c t i o n e ( n , r ) { r . l i s t e n e r s . f o r E a c h ( o = > { i f ( r . l i s t e n e r s . d e l e t e ( o ) , ! l . h a s ( o ) ) r e t u r n ; l e t c = l . g e t ( o ) ; c . d e l e t e ( n ) , ! ( c . s i z e > 1 ) & & ( g . c l e a r ( . . . c ) , l . d e l e t e ( o ) ) } ) } } ; v a r D = " _ _ d d e _ r e a c t i v e " ; g . e l = f u n c t i o n ( t , e ) { l e t n = d o c u m e n t . c r e a t e C o m m e n t ( ' < d d e : m a r k t y p e = " r e a c t i v e " > ' ) , r = d o c u m e n t . c r e a t e C o m m e n t ( " < / d d e : m a r k > " ) , o = d o c u m e n t . c r e a t e D o c u m e n t F r a g m e n t ( ) ; o . a p p e n d ( n , r ) ; l e t { c u r r e n t : c } = m , s = d = > { i f ( ! n . p a r e n t N o d e | | ! r . p a r e n t N o d e ) r e t u r n A ( t , s ) ; m . p u s h ( c ) ; l e t a = e ( d ) ; m . p o p ( ) , A r r a y . i s A r r a y ( a ) | | ( a = [ a ] ) ; l e t h = n ; f o r ( ; ( h = n . n e x t S i b l i n g ) ! = = r ; ) h . r e m o v e ( ) ; n . a f t e r ( . . . a ) } ; r e t u r n W ( t , s ) , Z ( t , s , n , e ) , s ( t ( ) ) , o } ; v a r V = { i s S i g n a l : P , 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 ( ! P ( n ) ) r e t u r n n ; l e t o = c = > r ( e , c ) ; r e t u r n W ( n , o ) , Z ( n , o , t , e ) , n ( ) } } ; f u n c t i o n Z ( t , e , . . . n ) { l e t { c u r r e n t : r } = m ; 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 ] ] ) = > A ( c , s , c [ p ] ? . h o s t ( ) = = = o ) ) ) ( o ) ) , o [ D ] . p u s h ( [ [ t , e ] , . . . n ] ) } ) } f u n c t i o n J ( t , e ) { l e t n = ( . . . r ) = > r . l e n g t h ? i t ( n , . . . r ) : s t ( n ) ; r e t u r n o t ( n , t , e ) } v a r r 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 } } ) , M = 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 ot(t,e,n){let r=[];F(n)!=="[object Object]"&&(n={});let{onclear:o}=g.symbols;n[o]&&(r.push(n[o]),Reflect.deleteProperty(n,o));let{host:c}=m;return Reflect.defineProperty(t,p,{value:{value:e,actions:n,onclear:r,host:c,listeners:new Set,defined:new M},enumerable:!1,writable:!1,configurable:!0}),t.toJSON=()=>t(),Object.setPrototypeOf(t[p],rt),t}function ct(){return j[j.length-1]}function st(t){if(!t[p])return;let{value:e,listeners:n}=t[p],r=ct();return r&&n.add(r),l.has(r)&&l.get(r).add(t),e}function it(t,e,n){if(!t[p])return;let r=t[p];if(!(!n&&r.value===e))return r.value=e,r.listeners.forEach(o=>o(e)),e}function W(t,e){if(t[p])return t[p].listeners.add(e)}function A(t,e,n){let r=t[p];if(!r)return;let o=r.listeners.delete(e);if(n&&!r.listeners.size){if(g.clear(t),!l.has(r))return o;let c=l.get(r);if(!l.has(c))return o;l.get(c).forEach(s=>A(s,c,!0))}return o}k(V);export{g as S,C as assign,q as assignAttribute,Q as classListDeclarative,lt as createElement,Et as dispatchEvent,lt as el,gt as empty,P as isSignal,_ as on,k as registerReactivity,m as scope};