2024-01-31 15:01:38 +01:00
var L = { isObservable ( t ) { return ! 1 } , processReactiveAttribute ( t , e , n , r ) { return n } } ; function H ( t , e = ! 0 ) { return e ? Object . assign ( L , t ) : ( Object . setPrototypeOf ( t , L ) , t ) } function M ( t ) { return L . isPrototypeOf ( t ) && t !== L ? t : L } function w ( t ) { return typeof t > "u" } function K ( t ) { let e = typeof t ; return e !== "object" ? e : t === null ? "null" : Object . prototype . toString . call ( t ) } function W ( t , e ) { if ( ! t || ! ( t instanceof AbortSignal ) ) return ! 0 ; if ( ! t . aborted ) return t . addEventListener ( "abort" , e ) , function ( ) { t . removeEventListener ( "abort" , e ) } } function q ( t , e ) { let { observedAttributes : n = [ ] } = t . constructor ; return n . reduce ( function ( r , o ) { return Reflect . set ( r , dt ( o ) , e ( t , o ) ) , r } , { } ) } function dt ( t ) { return t . replace ( /-./g , e => e [ 1 ] . toUpperCase ( ) ) } var d = { setDeleteAttr : pt , ssr : "" , D : globalThis . document , F : globalThis . DocumentFragment , H : globalThis . HTMLElement , S : globalThis . SVGElement , M : globalThis . MutationObserver } ; function pt ( t , e , n ) { if ( Reflect . set ( t , e , n ) , ! ! w ( n ) ) { if ( Reflect . deleteProperty ( t , e ) , t instanceof d . H && t . getAttribute ( e ) === "undefined" ) return t . removeAttribute ( e ) ; if ( Reflect . get ( t , e ) === "undefined" ) return Reflect . set ( t , e , "" ) } } var A = "__dde_lifecycleToEvents" , y = "dde:connected" , _ = "dde:disconnected" , N = "dde:attributeChanged" ; var O = [ { get scope ( ) { return d . D . body } , host : t => t ? t ( d . D . body ) : d . D . body , prevent : ! 0 } ] , E = { get current ( ) { return O [ O . length - 1 ] } , get host ( ) { return this . current . host } , preventDefault ( ) { let { current : t } = this ; return t . prevent = ! 0 , t } , get state ( ) { return [ ... O ] } , push ( t = { } ) { return O . push ( Object . assign ( { } , this . current , { prevent : ! 1 } , t ) ) } , pushRoot ( ) { return O . push ( O [ 0 ] ) } , pop ( ) { if ( O . length !== 1 ) return O . pop ( ) } } ; function Q ( ... t ) { return this . appendOriginal ( ... t ) , this } function lt ( t ) { return t . append === Q || ( t . appendOriginal = t . append , t . append = Q ) , t } var F ; function T ( t , e , ... n ) { let r = M ( this ) , o = 0 , c , s ; switch ( ( Object ( e ) !== e || r . isObservable ( e ) ) && ( e = { textContent : e } ) , ! 0 ) { case typeof t == "function" : { o = 1 , E . push ( { scope : t , host : ( ... b ) => b . length ? ( o === 1 ? n . unshift ( ... b ) : b . forEach ( g => g ( s ) ) , void 0 ) : s } ) , c = t ( e || void 0 ) ; let f = c instanceof d . F ; if ( c . nodeName === "#comment" ) break ; let p = T . mark ( { type : "component" , name : t . name , host : f ? "this" : "parentElement" } ) ; c . prepend ( p ) , f && ( s = p ) ; break } case t === "#text" : c = P . call ( this , d . D . createTextNode ( "" ) , e ) ; break ; case ( t === "<>" || ! t ) : c = P . call ( this , d . D . createDocumentFragment ( ) , e ) ; break ; case ! ! F : c = P . call ( this , d . D . createElementNS ( F , t ) , e ) ; break ; case ! c : c = P . call ( this , d . D . createElement ( t ) , e ) } return lt ( c ) , s || ( s = c ) , n . forEach ( f => f ( s ) ) , o && E . pop ( ) , o = 2 , c } function jt ( t , e = t , n = void 0 ) { let r = Symbol . for ( "default" ) , o = Array . from ( e . querySelectorAll ( "slot" ) ) . reduce ( ( s , f ) => Reflect . set ( s , f . name || r , f ) && s , { } ) , c = Reflect . has ( o , r ) ; if ( t . append = new Proxy ( t . append , { apply ( s , f , p ) { if ( ! p . length ) return t ; let b = d . D . createDocumentFragment ( ) ; for ( let g of p ) { if ( ! g || ! g . slot ) { c && b . appendChild ( g ) ; continue } let D = g . slot , j = o [ D ] ; vt ( g , "remove" , "slot" ) , j && ( ht ( j , g , n ) , Reflect . deleteProperty ( o , D ) ) } return c && ( o [ r ] . replaceWith ( b ) , Reflect . deleteProperty ( o , r ) ) , t . append = s , t } } ) , t !== e ) { let s = Array . from ( t . childNodes ) ; s . forEach ( f => f . remove ( ) ) , t . append ( ... s ) } return e } function ht ( t , e , n ) { n && n ( t , e ) ; try { t . replaceWith ( P ( e , { className : [ e . className , t . className ] , dataset : { ... t . dataset } } ) ) } catch { t . replaceWith ( e ) } } T . mark = function ( t , e = ! 1 ) { t = Object . entries ( t ) . map ( ( [ o , c ] ) => o + ` =" ${ c } " ` ) . join ( " " ) ; let n = e ? "" : "/" , r = d . D . createComment ( ` <dde:mark ${ t } ${ d . ssr } ${ n } > ` ) ; return e && ( r . end = d . D . createComment ( "</dde:mark>" ) ) , r } ; function Mt ( t ) { let e = this ; return function ( ... r ) { F = t ; let o = T . call ( e , ... r ) ; return F = void 0 , o } } var $ = new WeakMap , { setDeleteAttr : X } = d ; function P ( t , ... e ) { if ( ! e . length ) return t ; $ . set ( t , et ( t , this ) ) ; for ( let [ n , r ] of Object . entries ( Object . assign ( { } , ... e ) ) ) tt . call ( this , t , n , r ) ; return $ . delete ( t ) , t } function tt ( t , e , n ) { let { setRemoveAttr : r , s : o } = et ( t , this ) , c = this ; n = o . processReactiveAttribute ( t , e , n , ( f , p ) => tt . call ( c , t , f , p ) ) ; let [ s ] = e ; if ( s === "=" ) return r ( e . slice ( 1 ) , n ) ; if ( s === "." ) return Y ( 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 X ( t , e , n ) ; case "style" : if ( typeof n != "object" ) break ; case "dataset" : return B ( o , n ,
* Investigate ` __dde_attributes ` key of the element . * / v . c l e a r ( . . . O b j e c t . v a l u e s ( t h i s [ Z ] ) ) } ) ( t ) , n } ; v a r i t = { i s O b s e r v a b l e : U , 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 ( ! U ( n ) ) r e t u r n n ; l e t o = c = > { i f ( ! t . i s C o n n e c t e d ) r e t u r n S ( n , o ) ; r ( e , c ) } ; r e t u r n V ( n , o ) , u t ( n , o , t , e ) , n ( ) } } ; f u n c t i o n u t ( t , e , . . . n ) { l e t { c u r r e n t : r } = E ; r . p r e v e n t | | r . h o s t ( f u n c t i o n ( o ) { o [ R ] | | ( o [ R ] = [ ] , m . d i s c o n n e c t e d ( ( ) = > o [ R ] . f o r E a c h ( ( [ [ c , s ] ] ) = > S ( c , s , c [ l ] ? . h o s t ( ) = = = o ) ) ) ( o ) ) , o [ R ] . p u s h ( [ [ t , e ] , . . . n ] ) } ) } f u n c t i o n c t ( t , e , n ) { l e t r = t ? ( ) = > s t ( r ) : ( . . . o ) = > o . l e n g t h ? a t ( r , . . . o ) : s t ( r ) ; r e t u r n f t ( r , e , n ) } 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 } } ) , G = 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=[];K(n)!=="[object Object]"&&(n={});let{onclear:o}=v.symbols;n[o]&&(r.push(n[o]),Reflect.deleteProperty(n,o));let{host:c}=E;return Reflect.defineProperty(t,l,{value:{value:e,actions:n,onclear:r,host:c,listeners:new Set,defined:new G},enumerable:!1,writable:!1,configurable:!0}),t.toJSON=()=>t(),Object.setPrototypeOf(t[l],Rt),t}function St(){return z[z.length-1]}function st(t){if(!t[l])return;let{value:e,listeners:n}=t[l],r=St();return r&&n.add(r),h.has(r)&&h.get(r).add(t),e}function at(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 V(t,e){if(t[l])return t[l].listeners.add(e)}function S(t,e,n){let r=t[l];if(!r)return;let o=r.listeners.delete(e);if(n&&!r.listeners.size){if(v.clear(t),!h.has(r))return o;let c=h.get(r);if(!h.has(c))return o;h.get(c).forEach(s=>S(s,c,!0))}return o}H(it);export{v as O,P as assign,tt as assignAttribute,lt as chainableAppend,bt as classListDeclarative,T as createElement,Mt as createElementNS,It as customElementRender,yt as customElementWithDDE,Vt as dispatchEvent,T as el,Mt as elNS,vt as elementAttribute,Wt as empty,U as isObservable,yt as lifecycleToEvents,v as observable,Ot as observedAttributes,m as on,H as registerReactivity,E as scope,jt as simulateSlots};