2025-02-28 08:42:11 +01:00
/******/ var _ _webpack _modules _ _ = ( {
/***/ 622 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
2025-12-12 13:15:55 +01:00
/* harmony export */ Ob : ( ) => ( /* binding */ K ) ,
/* harmony export */ Qv : ( ) => ( /* binding */ J ) ,
/* harmony export */ XX : ( ) => ( /* binding */ G ) ,
2025-02-28 08:42:11 +01:00
/* harmony export */ fF : ( ) => ( /* binding */ l ) ,
2025-04-25 12:30:07 +02:00
/* harmony export */ h : ( ) => ( /* binding */ _ ) ,
2025-12-12 13:15:55 +01:00
/* harmony export */ q6 : ( ) => ( /* binding */ Q ) ,
2025-02-28 08:42:11 +01:00
/* harmony export */ uA : ( ) => ( /* binding */ x ) ,
2025-12-12 13:15:55 +01:00
/* harmony export */ zO : ( ) => ( /* binding */ t )
2025-02-28 08:42:11 +01:00
/* harmony export */ } ) ;
/* unused harmony exports Fragment, createElement, createRef, toChildArray */
2026-03-31 11:30:59 +02:00
var n , l , u , t , i , o , r , e , f , c , s , a , h , p = { } , v = [ ] , y = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i , d = Array . isArray ; function w ( n , l ) { for ( var u in l ) n [ u ] = l [ u ] ; return n } function g ( n ) { n && n . parentNode && n . parentNode . removeChild ( n ) } function _ ( l , u , t ) { var i , o , r , e = { } ; for ( r in u ) "key" == r ? i = u [ r ] : "ref" == r ? o = u [ r ] : e [ r ] = u [ r ] ; if ( arguments . length > 2 && ( e . children = arguments . length > 3 ? n . call ( arguments , 2 ) : t ) , "function" == typeof l && null != l . defaultProps ) for ( r in l . defaultProps ) void 0 === e [ r ] && ( e [ r ] = l . defaultProps [ r ] ) ; return m ( l , e , i , o , null ) } function m ( n , t , i , o , r ) { var e = { type : n , props : t , key : i , ref : o , _ _k : null , _ _ : null , _ _b : 0 , _ _e : null , _ _c : null , constructor : void 0 , _ _v : null == r ? ++ u : r , _ _i : - 1 , _ _u : 0 } ; return null == r && null != l . vnode && l . vnode ( e ) , e } function b ( ) { return { current : null } } function k ( n ) { return n . children } function x ( n , l ) { this . props = n , this . context = l } function S ( n , l ) { if ( null == l ) return n . _ _ ? S ( n . _ _ , n . _ _i + 1 ) : null ; for ( var u ; l < n . _ _k . length ; l ++ ) if ( null != ( u = n . _ _k [ l ] ) && null != u . _ _e ) return u . _ _e ; return "function" == typeof n . type ? S ( n ) : null } function C ( n ) { var l , u ; if ( null != ( n = n . _ _ ) && null != n . _ _c ) { for ( n . _ _e = n . _ _c . base = null , l = 0 ; l < n . _ _k . length ; l ++ ) if ( null != ( u = n . _ _k [ l ] ) && null != u . _ _e ) { n . _ _e = n . _ _c . base = u . _ _e ; break } return C ( n ) } } function M ( n ) { ( ! n . _ _d && ( n . _ _d = ! 0 ) && i . push ( n ) && ! $ . _ _r ++ || o != l . debounceRendering ) && ( ( o = l . debounceRendering ) || r ) ( $ ) } function $ ( ) { for ( var n , u , t , o , r , f , c , s = 1 ; i . length ; ) i . length > s && i . sort ( e ) , n = i . shift ( ) , s = i . length , n . _ _d && ( t = void 0 , o = void 0 , r = ( o = ( u = n ) . _ _v ) . _ _e , f = [ ] , c = [ ] , u . _ _P && ( ( t = w ( { } , o ) ) . _ _v = o . _ _v + 1 , l . vnode && l . vnode ( t ) , O ( u . _ _P , t , o , u . _ _n , u . _ _P . namespaceURI , 32 & o . _ _u ? [ r ] : null , f , null == r ? S ( o ) : r , ! ! ( 32 & o . _ _u ) , c ) , t . _ _v = o . _ _v , t . _ _ . _ _k [ t . _ _i ] = t , N ( f , t , c ) , o . _ _e = o . _ _ = null , t . _ _e != r && C ( t ) ) ) ; $ . _ _r = 0 } function I ( n , l , u , t , i , o , r , e , f , c , s ) { var a , h , y , d , w , g , _ , m = t && t . _ _k || v , b = l . length ; for ( f = P ( u , l , m , f , b ) , a = 0 ; a < b ; a ++ ) null != ( y = u . _ _k [ a ] ) && ( h = - 1 == y . _ _i ? p : m [ y . _ _i ] || p , y . _ _i = a , g = O ( n , y , h , i , o , r , e , f , c , s ) , d = y . _ _e , y . ref && h . ref != y . ref && ( h . ref && B ( h . ref , null , y ) , s . push ( y . ref , y . _ _c || d , y ) ) , null == w && null != d && ( w = d ) , ( _ = ! ! ( 4 & y . _ _u ) ) || h . _ _k === y . _ _k ? f = A ( y , f , n , _ ) : "function" == typeof y . type && void 0 !== g ? f = g : d && ( f = d . nextSibling ) , y . _ _u &= - 7 ) ; return u . _ _e = w , f } function P ( n , l , u , t , i ) { var o , r , e , f , c , s = u . length , a = s , h = 0 ; for ( n . _ _k = new Array ( i ) , o = 0 ; o < i ; o ++ ) null != ( r = l [ o ] ) && "boolean" != typeof r && "function" != typeof r ? ( "string" == typeof r || "number" == typeof r || "bigint" == typeof r || r . constructor == String ? r = n . _ _k [ o ] = m ( null , r , null , null , null ) : d ( r ) ? r = n . _ _k [ o ] = m ( k , { children : r } , null , null , null ) : void 0 === r . constructor && r . _ _b > 0 ? r = n . _ _k [ o ] = m ( r . type , r . props , r . key , r . ref ? r . ref : null , r . _ _v ) : n . _ _k [ o ] = r , f = o + h , r . _ _ = n , r . _ _b = n . _ _b + 1 , e = null , - 1 != ( c = r . _ _i = L ( r , u , f , a ) ) && ( a -- , ( e = u [ c ] ) && ( e . _ _u |= 2 ) ) , null == e || null == e . _ _v ? ( - 1 == c && ( i > s ? h -- : i < s && h ++ ) , "function" != typeof r . type && ( r . _ _u |= 4 ) ) : c != f && ( c == f - 1 ? h -- : c == f + 1 ? h ++ : ( c > f ? h -- : h ++ , r . _ _u |= 4 ) ) ) : n . _ _k [ o ] = null ; if ( a ) for ( o = 0 ; o < s ; o ++ ) null != ( e = u [ o ] ) && 0 == ( 2 & e . _ _u ) && ( e . _ _e == t && ( t = S ( e ) ) , D ( e , e ) ) ; return t } function A ( n , l , u , t ) { var i , o ; if ( "function" == typeof n . type ) { for ( i = n . _ _k , o = 0 ; i && o < i . length ; o ++ ) i [ o ] && ( i [ o ] . _ _ = n , l = A ( i [ o ] , l , u , t ) ) ; return l } n . _ _e != l && ( t && ( l && n . type && ! l . parentNode && ( l = S ( n ) ) , u . insertBefore ( n . _ _e , l || null ) ) , l = n . _ _e ) ; do { l = l && l . nextSibling } while ( null != l && 8 == l . nodeType ) ; return l } function H ( n , l ) { return l = l || [ ] , null == n || "boolean" == typeof n || ( d ( n ) ? n . some ( function ( n ) { H ( n , l ) } ) : l . push ( n ) ) , l } function L ( n , l , u , t ) { var i , o , r , e = n . key , f = n . type , c = l [ u ] , s = null != c && 0 == ( 2 & c . _ _u ) ; if ( null === c && null == e || s && e == c . key && f == c . type ) return u ; if ( t > ( s ? 1 : 0 ) ) for ( i = u - 1 , o = u + 1 ; i >= 0 || o < l . length ; ) if ( null != ( c = l [ r = i >= 0 ? i -- : o ++ ] ) && 0 == ( 2 & c . _ _u ) && e == c . key && f == c . type ) return r ; return - 1 } function T ( n , l , u ) { "-" == l [ 0 ] ? n . setProperty ( l , null == u ? "" : u ) : n [ l ] = null == u ? "" : "number" != typeof u || y . test ( l ) ? u : u + "px" } function j ( n , l , u , t , i ) { var o , r ; n : if ( "style" == l ) if ( "string" == typeof u ) n . style . cssText = u ; else { if ( "string" == typeof t && ( n . style . cssText = t = "" ) , t ) for ( l in t ) u && l in u || T ( n . style , l , "" ) ; if ( u ) for ( l in u ) t && u [ l ] == t [ l ] || T ( n . style , l , u [ l ] ) } else if ( "o" == l [ 0 ] && "n" == l [ 1 ] ) o = l != ( l = l . replace ( f , "$1" ) ) , r = l . toLowerCase ( ) , l = r in n || "onFocusOut" == l || "onFocusIn" == l ? r . slice ( 2 ) : l . slice ( 2 ) , n . l || ( n . l = { } ) , n . l [ l + o ] = u , u ? t ? u . u = t . u : ( u . u = c , n . addEventListener ( l , o ? a : s , o ) ) : n . removeEventListener ( l , o ? a : s , o ) ; else { if
2025-02-28 08:42:11 +01:00
/***/ } )
/******/ } ) ;
/************************************************************************/
/******/ // The module cache
/******/ var _ _webpack _module _cache _ _ = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/ // Check if module is in cache
/******/ var cachedModule = _ _webpack _module _cache _ _ [ moduleId ] ;
/******/ if ( cachedModule !== undefined ) {
/******/ return cachedModule . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = _ _webpack _module _cache _ _ [ moduleId ] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ _ _webpack _modules _ _ [ moduleId ] ( module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ ( ( ) => {
/******/ // define getter functions for harmony exports
/******/ _ _webpack _require _ _ . d = ( exports , definition ) => {
/******/ for ( var key in definition ) {
/******/ if ( _ _webpack _require _ _ . o ( definition , key ) && ! _ _webpack _require _ _ . o ( exports , key ) ) {
/******/ Object . defineProperty ( exports , key , { enumerable : true , get : definition [ key ] } ) ;
/******/ }
/******/ }
/******/ } ;
/******/ } ) ( ) ;
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ ( ( ) => {
/******/ _ _webpack _require _ _ . o = ( obj , prop ) => ( Object . prototype . hasOwnProperty . call ( obj , prop ) )
/******/ } ) ( ) ;
/******/
/************************************************************************/
var _ _webpack _exports _ _ = { } ;
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
zj : ( ) => ( /* reexport */ getConfig ) ,
SD : ( ) => ( /* reexport */ getContext ) ,
V6 : ( ) => ( /* reexport */ getElement ) ,
$K : ( ) => ( /* reexport */ getServerContext ) ,
vT : ( ) => ( /* reexport */ getServerState ) ,
jb : ( ) => ( /* binding */ privateApis ) ,
yT : ( ) => ( /* reexport */ splitTask ) ,
M _ : ( ) => ( /* reexport */ store ) ,
hb : ( ) => ( /* reexport */ useCallback ) ,
vJ : ( ) => ( /* reexport */ useEffect ) ,
ip : ( ) => ( /* reexport */ useInit ) ,
Nf : ( ) => ( /* reexport */ useLayoutEffect ) ,
Kr : ( ) => ( /* reexport */ useMemo ) ,
li : ( ) => ( /* reexport */ A ) ,
2025-04-25 12:30:07 +02:00
J0 : ( ) => ( /* reexport */ d ) ,
2025-02-28 08:42:11 +01:00
FH : ( ) => ( /* reexport */ useWatch ) ,
2025-04-25 12:30:07 +02:00
v4 : ( ) => ( /* reexport */ withScope ) ,
mh : ( ) => ( /* reexport */ withSyncEvent )
2025-02-28 08:42:11 +01:00
} ) ;
// EXTERNAL MODULE: ./node_modules/preact/dist/preact.module.js
var preact _module = _ _webpack _require _ _ ( 622 ) ;
2025-04-25 12:30:07 +02:00
; // ./node_modules/preact/hooks/dist/hooks.module.js
2025-12-12 13:15:55 +01:00
var hooks _module _t , r , hooks _module _u , i , hooks _module _o = 0 , hooks _module _f = [ ] , hooks _module _c = preact _module /* options */ . fF , e = hooks _module _c . _ _b , a = hooks _module _c . _ _r , v = hooks _module _c . diffed , l = hooks _module _c . _ _c , m = hooks _module _c . unmount , s = hooks _module _c . _ _ ; function p ( n , t ) { hooks _module _c . _ _h && hooks _module _c . _ _h ( r , n , hooks _module _o || t ) , hooks _module _o = 0 ; var u = r . _ _H || ( r . _ _H = { _ _ : [ ] , _ _h : [ ] } ) ; return n >= u . _ _ . length && u . _ _ . push ( { } ) , u . _ _ [ n ] } function d ( n ) { return hooks _module _o = 1 , h ( D , n ) } function h ( n , u , i ) { var o = p ( hooks _module _t ++ , 2 ) ; if ( o . t = n , ! o . _ _c && ( o . _ _ = [ i ? i ( u ) : D ( void 0 , u ) , function ( n ) { var t = o . _ _N ? o . _ _N [ 0 ] : o . _ _ [ 0 ] , r = o . t ( t , n ) ; t !== r && ( o . _ _N = [ r , o . _ _ [ 1 ] ] , o . _ _c . setState ( { } ) ) } ] , o . _ _c = r , ! r . _ _f ) ) { var f = function ( n , t , r ) { if ( ! o . _ _c . _ _H ) return ! 0 ; var u = o . _ _c . _ _H . _ _ . filter ( function ( n ) { return ! ! n . _ _c } ) ; if ( u . every ( function ( n ) { return ! n . _ _N } ) ) return ! c || c . call ( this , n , t , r ) ; var i = o . _ _c . props !== n ; return u . forEach ( function ( n ) { if ( n . _ _N ) { var t = n . _ _ [ 0 ] ; n . _ _ = n . _ _N , n . _ _N = void 0 , t !== n . _ _ [ 0 ] && ( i = ! 0 ) } } ) , c && c . call ( this , n , t , r ) || i } ; r . _ _f = ! 0 ; var c = r . shouldComponentUpdate , e = r . componentWillUpdate ; r . componentWillUpdate = function ( n , t , r ) { if ( this . _ _e ) { var u = c ; c = void 0 , f ( n , t , r ) , c = u } e && e . call ( this , n , t , r ) } , r . shouldComponentUpdate = f } return o . _ _N || o . _ _ } function y ( n , u ) { var i = p ( hooks _module _t ++ , 3 ) ; ! hooks _module _c . _ _s && C ( i . _ _H , u ) && ( i . _ _ = n , i . u = u , r . _ _H . _ _h . push ( i ) ) } function _ ( n , u ) { var i = p ( hooks _module _t ++ , 4 ) ; ! hooks _module _c . _ _s && C ( i . _ _H , u ) && ( i . _ _ = n , i . u = u , r . _ _h . push ( i ) ) } function A ( n ) { return hooks _module _o = 5 , T ( function ( ) { return { current : n } } , [ ] ) } function F ( n , t , r ) { hooks _module _o = 6 , _ ( function ( ) { if ( "function" == typeof n ) { var r = n ( t ( ) ) ; return function ( ) { n ( null ) , r && "function" == typeof r && r ( ) } } if ( n ) return n . current = t ( ) , function ( ) { return n . current = null } } , null == r ? r : r . concat ( n ) ) } function T ( n , r ) { var u = p ( hooks _module _t ++ , 7 ) ; return C ( u . _ _H , r ) && ( u . _ _ = n ( ) , u . _ _H = r , u . _ _h = n ) , u . _ _ } function q ( n , t ) { return hooks _module _o = 8 , T ( function ( ) { return n } , t ) } function x ( n ) { var u = r . context [ n . _ _c ] , i = p ( hooks _module _t ++ , 9 ) ; return i . c = n , u ? ( null == i . _ _ && ( i . _ _ = ! 0 , u . sub ( r ) ) , u . props . value ) : n . _ _ } function P ( n , t ) { hooks _module _c . useDebugValue && hooks _module _c . useDebugValue ( t ? t ( n ) : n ) } function b ( n ) { var u = p ( hooks _module _t ++ , 10 ) , i = d ( ) ; return u . _ _ = n , r . componentDidCatch || ( r . componentDidCatch = function ( n , t ) { u . _ _ && u . _ _ ( n , t ) , i [ 1 ] ( n ) } ) , [ i [ 0 ] , function ( ) { i [ 1 ] ( void 0 ) } ] } function g ( ) { var n = p ( hooks _module _t ++ , 11 ) ; if ( ! n . _ _ ) { for ( var u = r . _ _v ; null !== u && ! u . _ _m && null !== u . _ _ ; ) u = u . _ _ ; var i = u . _ _m || ( u . _ _m = [ 0 , 0 ] ) ; n . _ _ = "P" + i [ 0 ] + "-" + i [ 1 ] ++ } return n . _ _ } function j ( ) { for ( var n ; n = hooks _module _f . shift ( ) ; ) if ( n . _ _P && n . _ _H ) try { n . _ _H . _ _h . forEach ( z ) , n . _ _H . _ _h . forEach ( B ) , n . _ _H . _ _h = [ ] } catch ( t ) { n . _ _H . _ _h = [ ] , hooks _module _c . _ _e ( t , n . _ _v ) } } hooks _module _c . _ _b = function ( n ) { r = null , e && e ( n ) } , hooks _module _c . _ _ = function ( n , t ) { n && t . _ _k && t . _ _k . _ _m && ( n . _ _m = t . _ _k . _ _m ) , s && s ( n , t ) } , hooks _module _c . _ _r = function ( n ) { a && a ( n ) , hooks _module _t = 0 ; var i = ( r = n . _ _c ) . _ _H ; i && ( hooks _module _u === r ? ( i . _ _h = [ ] , r . _ _h = [ ] , i . _ _ . forEach ( function ( n ) { n . _ _N && ( n . _ _ = n . _ _N ) , n . u = n . _ _N = void 0 } ) ) : ( i . _ _h . forEach ( z ) , i . _ _h . forEach ( B ) , i . _ _h = [ ] , hooks _module _t = 0 ) ) , hooks _module _u = r } , hooks _module _c . diffed = function ( n ) { v && v ( n ) ; var t = n . _ _c ; t && t . _ _H && ( t . _ _H . _ _h . length && ( 1 !== hooks _module _f . push ( t ) && i === hooks _module _c . requestAnimationFrame || ( ( i = hooks _module _c . requestAnimationFrame ) || w ) ( j ) ) , t . _ _H . _ _ . forEach ( function ( n ) { n . u && ( n . _ _H = n . u ) , n . u = void 0 } ) ) , hooks _module _u = r = null } , hooks _module _c . _ _c = function ( n , t ) { t . some ( function ( n ) { try { n . _ _h . forEach ( z ) , n . _ _h = n . _ _h . filter ( function ( n ) { return ! n . _ _ || B ( n ) } ) } catch ( r ) { t . some ( function ( n ) { n . _ _h && ( n . _ _h = [ ] ) } ) , t = [ ] , hooks _module _c . _ _e ( r , n . _ _v ) } } ) , l && l ( n , t ) } , hooks _module _c . unmount = function ( n ) { m && m ( n ) ; var t , r = n . _ _c ; r && r . _ _H && ( r . _ _H . _ _ . forEach ( function ( n ) { try { z ( n ) } catch ( n ) { t = n } } ) , r . _ _H = void 0 , t && hooks _module _c . _ _e ( t , r . _ _v ) ) } ; var k = "function" == typeof requestAnimationFrame ; function w ( n ) { var t , r = function ( ) { clearTimeout ( u ) , k && cancelAnimationFrame ( t ) , setTimeout ( n ) } , u = setTimeout ( r , 35 ) ; k && ( t = requestAnimationFrame ( r ) ) } function z ( n ) { var t = r , u = n . _ _c ; "function" == typeof u && ( n . _ _c = void 0 , u ( ) ) , r = t } function B ( n ) { var t = r ; n . _ _c = n . _ _ ( ) , r = t } function C ( n , t ) { return ! n || n . length !== t . length || t . some ( function ( t , r ) { return t !== n [ r ] } ) } function D ( n , t ) { return " f
2025-02-28 08:42:11 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@preact/signals-core/dist/signals-core.module.js
2025-12-12 13:15:55 +01:00
var signals _core _module _i = Symbol . for ( "preact-signals" ) ; function signals _core _module _t ( ) { if ( ! ( signals _core _module _s > 1 ) ) { var i , t = ! 1 ; while ( void 0 !== signals _core _module _h ) { var r = signals _core _module _h ; signals _core _module _h = void 0 ; signals _core _module _f ++ ; while ( void 0 !== r ) { var o = r . o ; r . o = void 0 ; r . f &= - 3 ; if ( ! ( 8 & r . f ) && signals _core _module _c ( r ) ) try { r . c ( ) } catch ( r ) { if ( ! t ) { i = r ; t = ! 0 } } r = o } } signals _core _module _f = 0 ; signals _core _module _s -- ; if ( t ) throw i } else signals _core _module _s -- } function signals _core _module _r ( i ) { if ( signals _core _module _s > 0 ) return i ( ) ; signals _core _module _s ++ ; try { return i ( ) } finally { signals _core _module _t ( ) } } var signals _core _module _o = void 0 ; function n ( i ) { var t = signals _core _module _o ; signals _core _module _o = void 0 ; try { return i ( ) } finally { signals _core _module _o = t } } var signals _core _module _h = void 0 , signals _core _module _s = 0 , signals _core _module _f = 0 , signals _core _module _v = 0 ; function signals _core _module _e ( i ) { if ( void 0 !== signals _core _module _o ) { var t = i . n ; if ( void 0 === t || t . t !== signals _core _module _o ) { t = { i : 0 , S : i , p : signals _core _module _o . s , n : void 0 , t : signals _core _module _o , e : void 0 , x : void 0 , r : t } ; if ( void 0 !== signals _core _module _o . s ) signals _core _module _o . s . n = t ; signals _core _module _o . s = t ; i . n = t ; if ( 32 & signals _core _module _o . f ) i . S ( t ) ; return t } else if ( - 1 === t . i ) { t . i = 0 ; if ( void 0 !== t . n ) { t . n . p = t . p ; if ( void 0 !== t . p ) t . p . n = t . n ; t . p = signals _core _module _o . s ; t . n = void 0 ; signals _core _module _o . s . n = t ; signals _core _module _o . s = t } return t } } } function signals _core _module _u ( i , t ) { this . v = i ; this . i = 0 ; this . n = void 0 ; this . t = void 0 ; this . W = null == t ? void 0 : t . watched ; this . Z = null == t ? void 0 : t . unwatched ; this . name = null == t ? void 0 : t . name } signals _core _module _u . prototype . brand = signals _core _module _i ; signals _core _module _u . prototype . h = function ( ) { return ! 0 } ; signals _core _module _u . prototype . S = function ( i ) { var t = this , r = this . t ; if ( r !== i && void 0 === i . e ) { i . x = r ; this . t = i ; if ( void 0 !== r ) r . e = i ; else n ( function ( ) { var i ; null == ( i = t . W ) || i . call ( t ) } ) } } ; signals _core _module _u . prototype . U = function ( i ) { var t = this ; if ( void 0 !== this . t ) { var r = i . e , o = i . x ; if ( void 0 !== r ) { r . x = o ; i . e = void 0 } if ( void 0 !== o ) { o . e = r ; i . x = void 0 } if ( i === this . t ) { this . t = o ; if ( void 0 === o ) n ( function ( ) { var i ; null == ( i = t . Z ) || i . call ( t ) } ) } } } ; signals _core _module _u . prototype . subscribe = function ( i ) { var t = this ; return E ( function ( ) { var r = t . value , n = signals _core _module _o ; signals _core _module _o = void 0 ; try { i ( r ) } finally { signals _core _module _o = n } } , { name : "sub" } ) } ; signals _core _module _u . prototype . valueOf = function ( ) { return this . value } ; signals _core _module _u . prototype . toString = function ( ) { return this . value + "" } ; signals _core _module _u . prototype . toJSON = function ( ) { return this . value } ; signals _core _module _u . prototype . peek = function ( ) { var i = signals _core _module _o ; signals _core _module _o = void 0 ; try { return this . value } finally { signals _core _module _o = i } } ; Object . defineProperty ( signals _core _module _u . prototype , "value" , { get : function ( ) { var i = signals _core _module _e ( this ) ; if ( void 0 !== i ) i . i = this . i ; return this . v } , set : function ( i ) { if ( i !== this . v ) { if ( signals _core _module _f > 100 ) throw new Error ( "Cycle detected" ) ; this . v = i ; this . i ++ ; signals _core _module _v ++ ; signals _core _module _s ++ ; try { for ( var r = this . t ; void 0 !== r ; r = r . x ) r . t . N ( ) } finally { signals _core _module _t ( ) } } } } ) ; function signals _core _module _d ( i , t ) { return new signals _core _module _u ( i , t ) } function signals _core _module _c ( i ) { for ( var t = i . s ; void 0 !== t ; t = t . n ) if ( t . S . i !== t . i || ! t . S . h ( ) || t . S . i !== t . i ) return ! 0 ; return ! 1 } function signals _core _module _a ( i ) { for ( var t = i . s ; void 0 !== t ; t = t . n ) { var r = t . S . n ; if ( void 0 !== r ) t . r = r ; t . S . n = t ; t . i = - 1 ; if ( void 0 === t . n ) { i . s = t ; break } } } function signals _core _module _l ( i ) { var t = i . s , r = void 0 ; while ( void 0 !== t ) { var o = t . p ; if ( - 1 === t . i ) { t . S . U ( t ) ; if ( void 0 !== o ) o . n = t . n ; if ( void 0 !== t . n ) t . n . p = o } else r = t ; t . S . n = t . r ; if ( void 0 !== t . r ) t . r = void 0 ; t = o } i . s = r } function signals _core _module _y ( i , t ) { signals _core _module _u . call ( this , void 0 ) ; this . x = i ; this . s = void 0 ; this . g = signals _core _module _v - 1 ; this . f = 4 ; this . W = null == t ? void 0 : t . watched ; this . Z = null == t ? void 0 : t . unwatched ; this . name = null == t ? void 0 : t . name } signals _core _module _y . prototype = new signals _core _module _u ; signals _core _module _y . prototype . h = function ( ) { this . f &= - 3 ; if ( 1 & this . f ) return ! 1 ; if ( 32 == ( 36 & this . f ) ) return ! 0 ; this . f &= - 5 ; if ( this . g === signals _core _module _v ) retur
2025-04-25 12:30:07 +02:00
; // ./node_modules/@preact/signals/dist/signals.module.js
2026-03-31 11:30:59 +02:00
var signals _module _v , signals _module _s ; function signals _module _l ( i , n ) { preact _module /* options */ . fF [ i ] = n . bind ( null , preact _module /* options */ . fF [ i ] || function ( ) { } ) } function signals _module _d ( i ) { if ( signals _module _s ) signals _module _s ( ) ; signals _module _s = i && i . S ( ) } function signals _module _h ( i ) { var r = this , f = i . data , o = useSignal ( f ) ; o . value = f ; var e = T ( function ( ) { var i = r . _ _v ; while ( i = i . _ _ ) if ( i . _ _c ) { i . _ _c . _ _$f |= 4 ; break } r . _ _$u . c = function ( ) { var i , t = r . _ _$u . S ( ) , f = e . value ; t ( ) ; if ( ( 0 , preact _module /* isValidElement */ . zO ) ( f ) || 3 !== ( null == ( i = r . base ) ? void 0 : i . nodeType ) ) { r . _ _$f |= 1 ; r . setState ( { } ) } else r . base . data = f } ; return signals _core _module _w ( function ( ) { var i = o . value . value ; return 0 === i ? 0 : ! 0 === i ? "" : i || "" } ) } , [ ] ) ; return e . value } signals _module _h . displayName = "_st" ; Object . defineProperties ( signals _core _module _u . prototype , { constructor : { configurable : ! 0 , value : void 0 } , type : { configurable : ! 0 , value : signals _module _h } , props : { configurable : ! 0 , get : function ( ) { return { data : this } } } , _ _b : { configurable : ! 0 , value : 1 } } ) ; signals _module _l ( "__b" , function ( i , r ) { if ( "string" == typeof r . type ) { var n , t = r . props ; for ( var f in t ) if ( "children" !== f ) { var o = t [ f ] ; if ( o instanceof signals _core _module _u ) { if ( ! n ) r . _ _np = n = { } ; n [ f ] = o ; t [ f ] = o . peek ( ) } } } i ( r ) } ) ; signals _module _l ( "__r" , function ( i , r ) { signals _module _d ( ) ; var n , t = r . _ _c ; if ( t ) { t . _ _$f &= - 2 ; if ( void 0 === ( n = t . _ _$u ) ) t . _ _$u = n = function ( i ) { var r ; E ( function ( ) { r = this } ) ; r . c = function ( ) { t . _ _$f |= 1 ; t . setState ( { } ) } ; return r } ( ) } signals _module _v = t ; signals _module _d ( n ) ; i ( r ) } ) ; signals _module _l ( "__e" , function ( i , r , n , t ) { signals _module _d ( ) ; signals _module _v = void 0 ; i ( r , n , t ) } ) ; signals _module _l ( "diffed" , function ( i , r ) { signals _module _d ( ) ; signals _module _v = void 0 ; var n ; if ( "string" == typeof r . type && ( n = r . _ _e ) ) { var t = r . _ _np , f = r . props ; if ( t ) { var o = n . U ; if ( o ) for ( var e in o ) { var u = o [ e ] ; if ( void 0 !== u && ! ( e in t ) ) { u . d ( ) ; o [ e ] = void 0 } } else n . U = o = { } ; for ( var a in t ) { var c = o [ a ] , s = t [ a ] ; if ( void 0 === c ) { c = signals _module _p ( n , a , s , f ) ; o [ a ] = c } else c . o ( s , f ) } } } i ( r ) } ) ; function signals _module _p ( i , r , n , t ) { var f = r in i && void 0 === i . ownerSVGElement , o = signals _core _module _d ( n ) ; return { o : function ( i , r ) { o . value = i ; t = r } , d : E ( function ( ) { var n = o . value . value ; if ( t [ r ] !== n ) { t [ r ] = n ; if ( f ) i [ r ] = n ; else if ( n ) i . setAttribute ( r , n ) ; else i . removeAttribute ( r ) } } ) } } signals _module _l ( "unmount" , function ( i , r ) { if ( "string" == typeof r . type ) { var n = r . _ _e ; if ( n ) { var t = n . U ; if ( t ) { n . U = void 0 ; for ( var f in t ) { var o = t [ f ] ; if ( o ) o . d ( ) } } } } else { var e = r . _ _c ; if ( e ) { var u = e . _ _$u ; if ( u ) { e . _ _$u = void 0 ; u . d ( ) } } } i ( r ) } ) ; signals _module _l ( "__h" , function ( i , r , n , t ) { if ( t < 3 || 9 === t ) r . _ _$f |= 2 ; i ( r , n , t ) } ) ; preact _module /* Component */ . uA . prototype . shouldComponentUpdate = function ( i , r ) { if ( this . _ _R ) return ! 0 ; var n = this . _ _$u , t = n && void 0 !== n . s ; for ( var f in r ) return ! 0 ; if ( this . _ _f || "boolean" == typeof this . u && ! 0 === this . u ) { if ( ! ( t || 2 & this . _ _$f || 4 & this . _ _$f ) ) return ! 0 ; if ( 1 & this . _ _$f ) return ! 0 } else { if ( ! ( t || 4 & this . _ _$f ) ) return ! 0 ; if ( 3 & this . _ _$f ) return ! 0 } for ( var o in i ) if ( "__source" !== o && i [ o ] !== this . props [ o ] ) return ! 0 ; for ( var e in this . props ) if ( ! ( e in i ) ) return ! 0 ; return ! 1 } ; function useSignal ( i ) { return T ( function ( ) { return signals _core _module _d ( i ) } , [ ] ) } function useComputed ( i ) { var r = f ( i ) ; r . current = i ; signals _module _v . _ _$f |= 4 ; return t ( function ( ) { return u ( function ( ) { return r . current ( ) } ) } , [ ] ) } function useSignalEffect ( i ) { var r = f ( i ) ; r . current = i ; o ( function ( ) { return c ( function ( ) { return r . current ( ) } ) } , [ ] ) }
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/interactivity/build-module/namespaces.js
2025-02-28 08:42:11 +01:00
const namespaceStack = [ ] ;
const getNamespace = ( ) => namespaceStack . slice ( - 1 ) [ 0 ] ;
2025-12-12 13:15:55 +01:00
const setNamespace = ( namespace ) => {
2025-02-28 08:42:11 +01:00
namespaceStack . push ( namespace ) ;
} ;
const resetNamespace = ( ) => {
namespaceStack . pop ( ) ;
} ;
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/interactivity/build-module/scopes.js
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
2025-02-28 08:42:11 +01:00
const scopeStack = [ ] ;
const getScope = ( ) => scopeStack . slice ( - 1 ) [ 0 ] ;
2025-12-12 13:15:55 +01:00
const setScope = ( scope ) => {
2025-02-28 08:42:11 +01:00
scopeStack . push ( scope ) ;
} ;
const resetScope = ( ) => {
scopeStack . pop ( ) ;
} ;
2025-12-12 13:15:55 +01:00
const throwNotInScope = ( method ) => {
throw Error (
` Cannot call \` ${ method } () \` when there is no scope. If you are using an async function, please consider using a generator instead. If you are using some sort of async callbacks, like \` setTimeout \` , please wrap the callback with \` withScope(callback) \` . `
) ;
2025-02-28 08:42:11 +01:00
} ;
2025-12-12 13:15:55 +01:00
const getContext = ( namespace ) => {
2025-02-28 08:42:11 +01:00
const scope = getScope ( ) ;
if ( true ) {
if ( ! scope ) {
2025-12-12 13:15:55 +01:00
throwNotInScope ( "getContext" ) ;
2025-02-28 08:42:11 +01:00
}
}
return scope . context [ namespace || getNamespace ( ) ] ;
} ;
const getElement = ( ) => {
const scope = getScope ( ) ;
2025-12-12 13:15:55 +01:00
let deepReadOnlyOptions = { } ;
2025-02-28 08:42:11 +01:00
if ( true ) {
if ( ! scope ) {
2025-12-12 13:15:55 +01:00
throwNotInScope ( "getElement" ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
deepReadOnlyOptions = {
errorMessage : "Don't mutate the attributes from `getElement`, use `data-wp-bind` to modify the attributes of an element instead."
} ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const { ref , attributes } = scope ;
2025-02-28 08:42:11 +01:00
return Object . freeze ( {
ref : ref . current ,
2025-12-12 13:15:55 +01:00
attributes : deepReadOnly ( attributes , deepReadOnlyOptions )
2025-02-28 08:42:11 +01:00
} ) ;
} ;
2025-12-12 13:15:55 +01:00
const navigationContextSignal = signals _core _module _d ( 0 ) ;
function getServerContext ( namespace ) {
2025-02-28 08:42:11 +01:00
const scope = getScope ( ) ;
if ( true ) {
if ( ! scope ) {
2025-12-12 13:15:55 +01:00
throwNotInScope ( "getServerContext" ) ;
2025-02-28 08:42:11 +01:00
}
}
2025-12-12 13:15:55 +01:00
getServerContext . subscribe = navigationContextSignal . value ;
return deepClone ( scope . serverContext [ namespace || getNamespace ( ) ] ) ;
}
getServerContext . subscribe = 0 ;
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/interactivity/build-module/utils.js
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const afterNextFrame = ( callback ) => {
return new Promise ( ( resolve ) => {
2025-02-28 08:42:11 +01:00
const done = ( ) => {
clearTimeout ( timeout ) ;
window . cancelAnimationFrame ( raf ) ;
setTimeout ( ( ) => {
callback ( ) ;
resolve ( ) ;
} ) ;
} ;
const timeout = setTimeout ( done , 100 ) ;
const raf = window . requestAnimationFrame ( done ) ;
} ) ;
} ;
2025-12-12 13:15:55 +01:00
const splitTask = typeof window . scheduler ? . yield === "function" ? window . scheduler . yield . bind ( window . scheduler ) : ( ) => {
return new Promise ( ( resolve ) => {
2025-02-28 08:42:11 +01:00
setTimeout ( resolve , 0 ) ;
} ) ;
} ;
2026-03-31 11:30:59 +02:00
const onDOMReady = ( callback ) => {
const [ navigation ] = performance . getEntriesByType ( "navigation" ) ;
if ( navigation . domContentLoadedEventStart > 0 ) {
callback ( ) ;
} else {
document . addEventListener ( "DOMContentLoaded" , callback ) ;
}
} ;
2025-02-28 08:42:11 +01:00
function createFlusher ( compute , notify ) {
2025-12-12 13:15:55 +01:00
let flush = ( ) => void 0 ;
const dispose = E ( function ( ) {
2025-02-28 08:42:11 +01:00
flush = this . c . bind ( this ) ;
this . x = compute ;
this . c = notify ;
return compute ( ) ;
} ) ;
2025-12-12 13:15:55 +01:00
return { flush , dispose } ;
2025-02-28 08:42:11 +01:00
}
function utils _useSignalEffect ( callback ) {
y ( ( ) => {
let eff = null ;
let isExecuting = false ;
const notify = async ( ) => {
if ( eff && ! isExecuting ) {
isExecuting = true ;
await afterNextFrame ( eff . flush ) ;
isExecuting = false ;
}
} ;
eff = createFlusher ( callback , notify ) ;
return eff . dispose ;
} , [ ] ) ;
}
function withScope ( func ) {
const scope = getScope ( ) ;
const ns = getNamespace ( ) ;
2025-04-25 12:30:07 +02:00
let wrapped ;
2025-12-12 13:15:55 +01:00
if ( func ? . constructor ? . name === "GeneratorFunction" ) {
2025-04-25 12:30:07 +02:00
wrapped = async ( ... args ) => {
2025-02-28 08:42:11 +01:00
const gen = func ( ... args ) ;
let value ;
let it ;
2025-12-12 13:15:55 +01:00
let error ;
2025-02-28 08:42:11 +01:00
while ( true ) {
setNamespace ( ns ) ;
setScope ( scope ) ;
try {
2025-12-12 13:15:55 +01:00
it = error ? gen . throw ( error ) : gen . next ( value ) ;
error = void 0 ;
} catch ( e ) {
throw e ;
2025-02-28 08:42:11 +01:00
} finally {
resetScope ( ) ;
resetNamespace ( ) ;
}
try {
value = await it . value ;
} catch ( e ) {
2025-12-12 13:15:55 +01:00
error = e ;
2025-02-28 08:42:11 +01:00
}
if ( it . done ) {
2025-12-12 13:15:55 +01:00
if ( error ) {
throw error ;
} else {
break ;
}
2025-02-28 08:42:11 +01:00
}
}
return value ;
} ;
2025-04-25 12:30:07 +02:00
} else {
wrapped = ( ... args ) => {
setNamespace ( ns ) ;
setScope ( scope ) ;
try {
return func ( ... args ) ;
} finally {
resetNamespace ( ) ;
resetScope ( ) ;
}
} ;
2025-02-28 08:42:11 +01:00
}
2025-04-25 12:30:07 +02:00
const syncAware = func ;
if ( syncAware . sync ) {
const syncAwareWrapped = wrapped ;
syncAwareWrapped . sync = true ;
return syncAwareWrapped ;
}
return wrapped ;
2025-02-28 08:42:11 +01:00
}
function useWatch ( callback ) {
utils _useSignalEffect ( withScope ( callback ) ) ;
}
function useInit ( callback ) {
y ( withScope ( callback ) , [ ] ) ;
}
function useEffect ( callback , inputs ) {
y ( withScope ( callback ) , inputs ) ;
}
function useLayoutEffect ( callback , inputs ) {
_ ( withScope ( callback ) , inputs ) ;
}
function useCallback ( callback , inputs ) {
return q ( withScope ( callback ) , inputs ) ;
}
function useMemo ( factory , inputs ) {
return T ( withScope ( factory ) , inputs ) ;
}
const createRootFragment = ( parent , replaceNode ) => {
replaceNode = [ ] . concat ( replaceNode ) ;
const sibling = replaceNode [ replaceNode . length - 1 ] . nextSibling ;
function insert ( child , root ) {
parent . insertBefore ( child , root || sibling ) ;
}
return parent . _ _k = {
nodeType : 1 ,
parentNode : parent ,
firstChild : replaceNode [ 0 ] ,
childNodes : replaceNode ,
insertBefore : insert ,
appendChild : insert ,
removeChild ( c ) {
parent . removeChild ( c ) ;
2025-12-12 13:15:55 +01:00
} ,
contains ( c ) {
parent . contains ( c ) ;
2025-02-28 08:42:11 +01:00
}
} ;
} ;
function kebabToCamelCase ( str ) {
2025-12-12 13:15:55 +01:00
return str . replace ( /^-+|-+$/g , "" ) . toLowerCase ( ) . replace ( /-([a-z])/g , function ( _match , group1 ) {
2025-02-28 08:42:11 +01:00
return group1 . toUpperCase ( ) ;
} ) ;
}
2025-12-12 13:15:55 +01:00
const logged = /* @__PURE__ */ new Set ( ) ;
const warn = ( message ) => {
2025-02-28 08:42:11 +01:00
if ( true ) {
if ( logged . has ( message ) ) {
return ;
}
console . warn ( message ) ;
try {
throw Error ( message ) ;
} catch ( e ) {
}
logged . add ( message ) ;
}
} ;
2025-12-12 13:15:55 +01:00
const isPlainObject = ( candidate ) => Boolean (
candidate && typeof candidate === "object" && candidate . constructor === Object
) ;
2025-04-25 12:30:07 +02:00
function withSyncEvent ( callback ) {
const syncAware = callback ;
syncAware . sync = true ;
return syncAware ;
}
2025-12-12 13:15:55 +01:00
const readOnlyMap = /* @__PURE__ */ new WeakMap ( ) ;
const createDeepReadOnlyHandlers = ( errorMessage ) => {
const handleError = ( ) => {
if ( true ) {
warn ( errorMessage ) ;
}
return false ;
} ;
return {
get ( target , prop ) {
const value = target [ prop ] ;
if ( value && typeof value === "object" ) {
return deepReadOnly ( value , { errorMessage } ) ;
}
return value ;
} ,
set : handleError ,
deleteProperty : handleError ,
defineProperty : handleError
} ;
} ;
function deepReadOnly ( obj , options ) {
const errorMessage = options ? . errorMessage ? ? "Cannot modify read-only object" ;
if ( ! readOnlyMap . has ( obj ) ) {
const handlers = createDeepReadOnlyHandlers ( errorMessage ) ;
readOnlyMap . set ( obj , new Proxy ( obj , handlers ) ) ;
}
return readOnlyMap . get ( obj ) ;
}
const navigationSignal = signals _core _module _d ( 0 ) ;
function deepClone ( source ) {
if ( isPlainObject ( source ) ) {
return Object . fromEntries (
Object . entries ( source ) . map ( ( [ key , value ] ) => [
key ,
deepClone ( value )
] )
) ;
}
if ( Array . isArray ( source ) ) {
return source . map ( ( i ) => deepClone ( i ) ) ;
}
return source ;
}
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/interactivity/build-module/proxies/registry.js
2025-12-12 13:15:55 +01:00
const objToProxy = /* @__PURE__ */ new WeakMap ( ) ;
const proxyToObj = /* @__PURE__ */ new WeakMap ( ) ;
const proxyToNs = /* @__PURE__ */ new WeakMap ( ) ;
const supported = /* @__PURE__ */ new Set ( [ Object , Array ] ) ;
2025-02-28 08:42:11 +01:00
const createProxy = ( namespace , obj , handlers ) => {
if ( ! shouldProxy ( obj ) ) {
2025-12-12 13:15:55 +01:00
throw Error ( "This object cannot be proxified." ) ;
2025-02-28 08:42:11 +01:00
}
if ( ! objToProxy . has ( obj ) ) {
const proxy = new Proxy ( obj , handlers ) ;
objToProxy . set ( obj , proxy ) ;
proxyToObj . set ( proxy , obj ) ;
proxyToNs . set ( proxy , namespace ) ;
}
return objToProxy . get ( obj ) ;
} ;
2025-12-12 13:15:55 +01:00
const getProxyFromObject = ( obj ) => objToProxy . get ( obj ) ;
const getNamespaceFromProxy = ( proxy ) => proxyToNs . get ( proxy ) ;
const shouldProxy = ( candidate ) => {
if ( typeof candidate !== "object" || candidate === null ) {
2025-02-28 08:42:11 +01:00
return false ;
}
return ! proxyToNs . has ( candidate ) && supported . has ( candidate . constructor ) ;
} ;
2025-12-12 13:15:55 +01:00
const getObjectFromProxy = ( proxy ) => proxyToObj . get ( proxy ) ;
2025-02-28 08:42:11 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/interactivity/build-module/proxies/signals.js
2025-02-28 08:42:11 +01:00
const NO _SCOPE = { } ;
class PropSignal {
/ * *
* Proxy that holds the property this PropSignal is associated with .
* /
2025-12-12 13:15:55 +01:00
owner ;
2025-02-28 08:42:11 +01:00
/ * *
* Relation of computeds by scope . These computeds are read - only signals
* that depend on whether the property is a value or a getter and ,
* therefore , can return different values depending on the scope in which
* the getter is accessed .
* /
2025-12-12 13:15:55 +01:00
computedsByScope ;
2025-02-28 08:42:11 +01:00
/ * *
* Signal with the value assigned to the related property .
* /
2025-12-12 13:15:55 +01:00
valueSignal ;
2025-02-28 08:42:11 +01:00
/ * *
* Signal with the getter assigned to the related property .
* /
2025-12-12 13:15:55 +01:00
getterSignal ;
/ * *
* Pending getter to be consolidated .
* /
pendingGetter ;
2025-02-28 08:42:11 +01:00
/ * *
* Structure that manages reactivity for a property in a state object , using
* signals to keep track of property value or getter modifications .
*
* @ param owner Proxy that holds the property this instance is associated
* with .
* /
constructor ( owner ) {
this . owner = owner ;
2025-12-12 13:15:55 +01:00
this . computedsByScope = /* @__PURE__ */ new WeakMap ( ) ;
2025-02-28 08:42:11 +01:00
}
/ * *
* Changes the internal value . If a getter was set before , it is set to
* ` undefined ` .
*
* @ param value New value .
* /
setValue ( value ) {
2025-12-12 13:15:55 +01:00
this . update ( { value } ) ;
2025-02-28 08:42:11 +01:00
}
/ * *
* Changes the internal getter . If a value was set before , it is set to
* ` undefined ` .
*
* @ param getter New getter .
* /
setGetter ( getter ) {
2025-12-12 13:15:55 +01:00
this . update ( { get : getter } ) ;
}
/ * *
* Changes the internal getter asynchronously .
*
* The update is made in a microtask , which prevents issues with getters
* accessing the state , and ensures the update occurs before any render .
*
* @ param getter New getter .
* /
setPendingGetter ( getter ) {
this . pendingGetter = getter ;
queueMicrotask ( ( ) => this . consolidateGetter ( ) ) ;
}
/ * *
* Consolidate the pending value of the getter .
* /
consolidateGetter ( ) {
const getter = this . pendingGetter ;
if ( getter ) {
this . pendingGetter = void 0 ;
this . update ( { get : getter } ) ;
}
2025-02-28 08:42:11 +01:00
}
/ * *
* Returns the computed that holds the result of evaluating the prop in the
* current scope .
*
* These computeds are read - only signals that depend on whether the property
* is a value or a getter and , therefore , can return different values
* depending on the scope in which the getter is accessed .
*
* @ return Computed that depends on the scope .
* /
getComputed ( ) {
const scope = getScope ( ) || NO _SCOPE ;
if ( ! this . valueSignal && ! this . getterSignal ) {
this . update ( { } ) ;
}
2025-12-12 13:15:55 +01:00
if ( this . pendingGetter ) {
this . consolidateGetter ( ) ;
}
2025-02-28 08:42:11 +01:00
if ( ! this . computedsByScope . has ( scope ) ) {
const callback = ( ) => {
const getter = this . getterSignal ? . value ;
return getter ? getter . call ( this . owner ) : this . valueSignal ? . value ;
} ;
setNamespace ( getNamespaceFromProxy ( this . owner ) ) ;
2025-12-12 13:15:55 +01:00
this . computedsByScope . set (
scope ,
signals _core _module _w ( withScope ( callback ) )
) ;
2025-02-28 08:42:11 +01:00
resetNamespace ( ) ;
}
return this . computedsByScope . get ( scope ) ;
}
/ * *
2025-12-12 13:15:55 +01:00
* Updates the internal signals for the value and the getter of the
2025-02-28 08:42:11 +01:00
* corresponding prop .
*
* @ param param0
* @ param param0 . get New getter .
* @ param param0 . value New value .
* /
2025-12-12 13:15:55 +01:00
update ( { get , value } ) {
2025-02-28 08:42:11 +01:00
if ( ! this . valueSignal ) {
this . valueSignal = signals _core _module _d ( value ) ;
this . getterSignal = signals _core _module _d ( get ) ;
} else if ( value !== this . valueSignal . peek ( ) || get !== this . getterSignal . peek ( ) ) {
signals _core _module _r ( ( ) => {
this . valueSignal . value = value ;
this . getterSignal . value = get ;
} ) ;
}
}
}
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/interactivity/build-module/proxies/state.js
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const wellKnownSymbols = new Set (
Object . getOwnPropertyNames ( Symbol ) . map ( ( key ) => Symbol [ key ] ) . filter ( ( value ) => typeof value === "symbol" )
) ;
const proxyToProps = /* @__PURE__ */ new WeakMap ( ) ;
2025-02-28 08:42:11 +01:00
const hasPropSignal = ( proxy , key ) => proxyToProps . has ( proxy ) && proxyToProps . get ( proxy ) . has ( key ) ;
const getPropSignal = ( proxy , key , initial ) => {
if ( ! proxyToProps . has ( proxy ) ) {
2025-12-12 13:15:55 +01:00
proxyToProps . set ( proxy , /* @__PURE__ */ new Map ( ) ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
key = typeof key === "number" ? ` ${ key } ` : key ;
2025-02-28 08:42:11 +01:00
const props = proxyToProps . get ( proxy ) ;
if ( ! props . has ( key ) ) {
const ns = getNamespaceFromProxy ( proxy ) ;
const prop = new PropSignal ( proxy ) ;
props . set ( key , prop ) ;
if ( initial ) {
2025-12-12 13:15:55 +01:00
const { get , value } = initial ;
2025-02-28 08:42:11 +01:00
if ( get ) {
prop . setGetter ( get ) ;
} else {
2025-12-12 13:15:55 +01:00
prop . setValue (
shouldProxy ( value ) ? proxifyState ( ns , value ) : value
) ;
2025-02-28 08:42:11 +01:00
}
}
}
return props . get ( key ) ;
} ;
2025-12-12 13:15:55 +01:00
const objToIterable = /* @__PURE__ */ new WeakMap ( ) ;
2025-02-28 08:42:11 +01:00
let peeking = false ;
2025-12-12 13:15:55 +01:00
const PENDING _GETTER = Symbol ( "PENDING_GETTER" ) ;
2025-02-28 08:42:11 +01:00
const stateHandlers = {
get ( target , key , receiver ) {
2025-12-12 13:15:55 +01:00
if ( peeking || ! target . hasOwnProperty ( key ) && key in target || typeof key === "symbol" && wellKnownSymbols . has ( key ) ) {
2025-02-28 08:42:11 +01:00
return Reflect . get ( target , key , receiver ) ;
}
const desc = Object . getOwnPropertyDescriptor ( target , key ) ;
const prop = getPropSignal ( receiver , key , desc ) ;
const result = prop . getComputed ( ) . value ;
2025-12-12 13:15:55 +01:00
if ( result === PENDING _GETTER ) {
throw PENDING _GETTER ;
}
if ( typeof result === "function" ) {
2025-02-28 08:42:11 +01:00
const ns = getNamespaceFromProxy ( receiver ) ;
return ( ... args ) => {
setNamespace ( ns ) ;
try {
return result . call ( receiver , ... args ) ;
} finally {
resetNamespace ( ) ;
}
} ;
}
return result ;
} ,
set ( target , key , value , receiver ) {
setNamespace ( getNamespaceFromProxy ( receiver ) ) ;
try {
return Reflect . set ( target , key , value , receiver ) ;
} finally {
resetNamespace ( ) ;
}
} ,
defineProperty ( target , key , desc ) {
const isNew = ! ( key in target ) ;
const result = Reflect . defineProperty ( target , key , desc ) ;
if ( result ) {
const receiver = getProxyFromObject ( target ) ;
const prop = getPropSignal ( receiver , key ) ;
2025-12-12 13:15:55 +01:00
const { get , value } = desc ;
2025-02-28 08:42:11 +01:00
if ( get ) {
prop . setGetter ( get ) ;
} else {
const ns = getNamespaceFromProxy ( receiver ) ;
2025-12-12 13:15:55 +01:00
prop . setValue (
shouldProxy ( value ) ? proxifyState ( ns , value ) : value
) ;
2025-02-28 08:42:11 +01:00
}
if ( isNew && objToIterable . has ( target ) ) {
objToIterable . get ( target ) . value ++ ;
}
2025-12-12 13:15:55 +01:00
if ( Array . isArray ( target ) && proxyToProps . get ( receiver ) ? . has ( "length" ) ) {
const length = getPropSignal ( receiver , "length" ) ;
2025-02-28 08:42:11 +01:00
length . setValue ( target . length ) ;
}
}
return result ;
} ,
deleteProperty ( target , key ) {
const result = Reflect . deleteProperty ( target , key ) ;
if ( result ) {
const prop = getPropSignal ( getProxyFromObject ( target ) , key ) ;
2025-12-12 13:15:55 +01:00
prop . setValue ( void 0 ) ;
2025-02-28 08:42:11 +01:00
if ( objToIterable . has ( target ) ) {
objToIterable . get ( target ) . value ++ ;
}
}
return result ;
} ,
ownKeys ( target ) {
if ( ! objToIterable . has ( target ) ) {
objToIterable . set ( target , signals _core _module _d ( 0 ) ) ;
}
objToIterable . _ = objToIterable . get ( target ) . value ;
return Reflect . ownKeys ( target ) ;
}
} ;
2025-12-12 13:15:55 +01:00
const proxifyState = ( namespace , obj ) => {
return createProxy ( namespace , obj , stateHandlers ) ;
2025-02-28 08:42:11 +01:00
} ;
const peek = ( obj , key ) => {
peeking = true ;
try {
return obj [ key ] ;
} finally {
peeking = false ;
}
} ;
const deepMergeRecursive = ( target , source , override = true ) => {
if ( ! ( isPlainObject ( target ) && isPlainObject ( source ) ) ) {
return ;
}
let hasNewKeys = false ;
for ( const key in source ) {
const isNew = ! ( key in target ) ;
hasNewKeys = hasNewKeys || isNew ;
const desc = Object . getOwnPropertyDescriptor ( source , key ) ;
const proxy = getProxyFromObject ( target ) ;
const propSignal = ! ! proxy && hasPropSignal ( proxy , key ) && getPropSignal ( proxy , key ) ;
2025-12-12 13:15:55 +01:00
if ( typeof desc . get === "function" || typeof desc . set === "function" ) {
2025-02-28 08:42:11 +01:00
if ( override || isNew ) {
Object . defineProperty ( target , key , {
... desc ,
configurable : true ,
enumerable : true
} ) ;
if ( desc . get && propSignal ) {
2025-12-12 13:15:55 +01:00
propSignal . setPendingGetter ( desc . get ) ;
2025-02-28 08:42:11 +01:00
}
}
} else if ( isPlainObject ( source [ key ] ) ) {
const targetValue = Object . getOwnPropertyDescriptor ( target , key ) ? . value ;
if ( isNew || override && ! isPlainObject ( targetValue ) ) {
target [ key ] = { } ;
if ( propSignal ) {
const ns = getNamespaceFromProxy ( proxy ) ;
2025-12-12 13:15:55 +01:00
propSignal . setValue (
proxifyState ( ns , target [ key ] )
) ;
2025-02-28 08:42:11 +01:00
}
deepMergeRecursive ( target [ key ] , source [ key ] , override ) ;
2025-12-12 13:15:55 +01:00
} else if ( isPlainObject ( targetValue ) ) {
2025-02-28 08:42:11 +01:00
deepMergeRecursive ( target [ key ] , source [ key ] , override ) ;
}
} else if ( override || isNew ) {
Object . defineProperty ( target , key , desc ) ;
if ( propSignal ) {
2025-12-12 13:15:55 +01:00
const { value } = desc ;
2025-02-28 08:42:11 +01:00
const ns = getNamespaceFromProxy ( proxy ) ;
2025-12-12 13:15:55 +01:00
propSignal . setValue (
shouldProxy ( value ) ? proxifyState ( ns , value ) : value
) ;
2025-02-28 08:42:11 +01:00
}
}
}
if ( hasNewKeys && objToIterable . has ( target ) ) {
objToIterable . get ( target ) . value ++ ;
}
} ;
2025-12-12 13:15:55 +01:00
const deepMerge = ( target , source , override = true ) => signals _core _module _r (
( ) => deepMergeRecursive (
getObjectFromProxy ( target ) || target ,
source ,
override
)
) ;
2025-02-28 08:42:11 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/interactivity/build-module/proxies/store.js
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const storeRoots = /* @__PURE__ */ new WeakSet ( ) ;
2025-02-28 08:42:11 +01:00
const storeHandlers = {
get : ( target , key , receiver ) => {
const result = Reflect . get ( target , key ) ;
const ns = getNamespaceFromProxy ( receiver ) ;
2025-12-12 13:15:55 +01:00
if ( typeof result === "undefined" && storeRoots . has ( receiver ) ) {
2025-02-28 08:42:11 +01:00
const obj = { } ;
Reflect . set ( target , key , obj ) ;
return proxifyStore ( ns , obj , false ) ;
}
2025-12-12 13:15:55 +01:00
if ( typeof result === "function" ) {
2025-02-28 08:42:11 +01:00
setNamespace ( ns ) ;
const scoped = withScope ( result ) ;
resetNamespace ( ) ;
return scoped ;
}
if ( isPlainObject ( result ) && shouldProxy ( result ) ) {
return proxifyStore ( ns , result , false ) ;
}
return result ;
}
} ;
const proxifyStore = ( namespace , obj , isRoot = true ) => {
const proxy = createProxy ( namespace , obj , storeHandlers ) ;
if ( proxy && isRoot ) {
storeRoots . add ( proxy ) ;
}
return proxy ;
} ;
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/interactivity/build-module/proxies/context.js
2025-12-12 13:15:55 +01:00
const contextObjectToProxy = /* @__PURE__ */ new WeakMap ( ) ;
const contextObjectToFallback = /* @__PURE__ */ new WeakMap ( ) ;
const contextProxies = /* @__PURE__ */ new WeakSet ( ) ;
2025-02-28 08:42:11 +01:00
const descriptor = Reflect . getOwnPropertyDescriptor ;
const contextHandlers = {
get : ( target , key ) => {
const fallback = contextObjectToFallback . get ( target ) ;
const currentProp = target [ key ] ;
return key in target ? currentProp : fallback [ key ] ;
} ,
set : ( target , key , value ) => {
const fallback = contextObjectToFallback . get ( target ) ;
const obj = key in target || ! ( key in fallback ) ? target : fallback ;
obj [ key ] = value ;
return true ;
} ,
2025-12-12 13:15:55 +01:00
ownKeys : ( target ) => [
... /* @__PURE__ */ new Set ( [
... Object . keys ( contextObjectToFallback . get ( target ) ) ,
... Object . keys ( target )
] )
] ,
2025-02-28 08:42:11 +01:00
getOwnPropertyDescriptor : ( target , key ) => descriptor ( target , key ) || descriptor ( contextObjectToFallback . get ( target ) , key ) ,
has : ( target , key ) => Reflect . has ( target , key ) || Reflect . has ( contextObjectToFallback . get ( target ) , key )
} ;
const proxifyContext = ( current , inherited = { } ) => {
if ( contextProxies . has ( current ) ) {
2025-12-12 13:15:55 +01:00
throw Error ( "This object cannot be proxified." ) ;
2025-02-28 08:42:11 +01:00
}
contextObjectToFallback . set ( current , inherited ) ;
if ( ! contextObjectToProxy . has ( current ) ) {
const proxy = new Proxy ( current , contextHandlers ) ;
contextObjectToProxy . set ( current , proxy ) ;
contextProxies . add ( proxy ) ;
}
return contextObjectToProxy . get ( current ) ;
} ;
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/interactivity/build-module/proxies/index.js
2025-12-12 13:15:55 +01:00
2025-02-28 08:42:11 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/interactivity/build-module/store.js
2025-12-12 13:15:55 +01:00
const stores = /* @__PURE__ */ new Map ( ) ;
const rawStores = /* @__PURE__ */ new Map ( ) ;
const storeLocks = /* @__PURE__ */ new Map ( ) ;
const storeConfigs = /* @__PURE__ */ new Map ( ) ;
const serverStates = /* @__PURE__ */ new Map ( ) ;
const getConfig = ( namespace ) => storeConfigs . get ( namespace || getNamespace ( ) ) || { } ;
function getServerState ( namespace ) {
2025-02-28 08:42:11 +01:00
const ns = namespace || getNamespace ( ) ;
if ( ! serverStates . has ( ns ) ) {
2025-12-12 13:15:55 +01:00
serverStates . set ( ns , { } ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
getServerState . subscribe = navigationSignal . value ;
return deepClone ( serverStates . get ( ns ) ) ;
}
getServerState . subscribe = 0 ;
const universalUnlock = "I acknowledge that using a private store means my plugin will inevitably break on the next store release." ;
function store ( namespace , { state = { } , ... block } = { } , { lock = false } = { } ) {
2025-02-28 08:42:11 +01:00
if ( ! stores . has ( namespace ) ) {
if ( lock !== universalUnlock ) {
storeLocks . set ( namespace , lock ) ;
}
const rawStore = {
2025-12-12 13:15:55 +01:00
state : proxifyState (
namespace ,
isPlainObject ( state ) ? state : { }
) ,
2025-02-28 08:42:11 +01:00
... block
} ;
const proxifiedStore = proxifyStore ( namespace , rawStore ) ;
rawStores . set ( namespace , rawStore ) ;
stores . set ( namespace , proxifiedStore ) ;
} else {
if ( lock !== universalUnlock && ! storeLocks . has ( namespace ) ) {
storeLocks . set ( namespace , lock ) ;
} else {
const storeLock = storeLocks . get ( namespace ) ;
const isLockValid = lock === universalUnlock || lock !== true && lock === storeLock ;
if ( ! isLockValid ) {
if ( ! storeLock ) {
2025-12-12 13:15:55 +01:00
throw Error ( "Cannot lock a public store" ) ;
2025-02-28 08:42:11 +01:00
} else {
2025-12-12 13:15:55 +01:00
throw Error (
"Cannot unlock a private store with an invalid lock code"
) ;
2025-02-28 08:42:11 +01:00
}
}
}
const target = rawStores . get ( namespace ) ;
deepMerge ( target , block ) ;
deepMerge ( target . state , state ) ;
}
return stores . get ( namespace ) ;
}
const parseServerData = ( dom = document ) => {
2025-12-12 13:15:55 +01:00
const jsonDataScriptTag = (
// Preferred Script Module data passing form
dom . getElementById (
"wp-script-module-data-@wordpress/interactivity"
) ? ? // Legacy form
dom . getElementById ( "wp-interactivity-data" )
) ;
2025-02-28 08:42:11 +01:00
if ( jsonDataScriptTag ? . textContent ) {
try {
return JSON . parse ( jsonDataScriptTag . textContent ) ;
2025-12-12 13:15:55 +01:00
} catch {
}
2025-02-28 08:42:11 +01:00
}
return { } ;
} ;
2026-03-31 11:30:59 +02:00
const populateServerData = ( data ) => {
2025-12-12 13:15:55 +01:00
serverStates . clear ( ) ;
storeConfigs . clear ( ) ;
2026-03-31 11:30:59 +02:00
if ( isPlainObject ( data ? . state ) ) {
Object . entries ( data . state ) . forEach ( ( [ namespace , state ] ) => {
2025-12-12 13:15:55 +01:00
const st = store ( namespace , { } , { lock : universalUnlock } ) ;
2025-02-28 08:42:11 +01:00
deepMerge ( st . state , state , false ) ;
2025-12-12 13:15:55 +01:00
serverStates . set ( namespace , state ) ;
2025-02-28 08:42:11 +01:00
} ) ;
}
2026-03-31 11:30:59 +02:00
if ( isPlainObject ( data ? . config ) ) {
Object . entries ( data . config ) . forEach ( ( [ namespace , config ] ) => {
2025-02-28 08:42:11 +01:00
storeConfigs . set ( namespace , config ) ;
} ) ;
}
2026-03-31 11:30:59 +02:00
if ( isPlainObject ( data ? . derivedStateClosures ) ) {
Object . entries ( data . derivedStateClosures ) . forEach (
2025-12-12 13:15:55 +01:00
( [ namespace , paths ] ) => {
const st = store (
namespace ,
{ } ,
{ lock : universalUnlock }
) ;
paths . forEach ( ( path ) => {
const pathParts = path . split ( "." ) ;
const prop = pathParts . splice ( - 1 , 1 ) [ 0 ] ;
const parent = pathParts . reduce (
( prev , key ) => peek ( prev , key ) ,
st
) ;
const desc = Object . getOwnPropertyDescriptor (
parent ,
prop
) ;
if ( isPlainObject ( desc ? . value ) ) {
parent [ prop ] = PENDING _GETTER ;
}
} ) ;
}
) ;
}
2025-02-28 08:42:11 +01:00
} ;
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/interactivity/build-module/hooks.js
2025-02-28 08:42:11 +01:00
function isNonDefaultDirectiveSuffix ( entry ) {
return entry . suffix !== null ;
}
function isDefaultDirectiveSuffix ( entry ) {
return entry . suffix === null ;
}
2025-12-12 13:15:55 +01:00
const context = ( 0 , preact _module /* createContext */ . q6 ) ( { client : { } , server : { } } ) ;
2025-02-28 08:42:11 +01:00
const directiveCallbacks = { } ;
const directivePriorities = { } ;
2025-12-12 13:15:55 +01:00
const directive = ( name , callback , { priority = 10 } = { } ) => {
2025-02-28 08:42:11 +01:00
directiveCallbacks [ name ] = callback ;
directivePriorities [ name ] = priority ;
} ;
const resolve = ( path , namespace ) => {
if ( ! namespace ) {
2025-12-12 13:15:55 +01:00
warn (
` Namespace missing for " ${ path } ". The value for that path won't be resolved. `
) ;
2025-02-28 08:42:11 +01:00
return ;
}
let resolvedStore = stores . get ( namespace ) ;
2025-12-12 13:15:55 +01:00
if ( typeof resolvedStore === "undefined" ) {
resolvedStore = store (
namespace ,
{ } ,
{
lock : universalUnlock
}
) ;
2025-02-28 08:42:11 +01:00
}
const current = {
... resolvedStore ,
context : getScope ( ) . context [ namespace ]
} ;
try {
2025-12-12 13:15:55 +01:00
const pathParts = path . split ( "." ) ;
return pathParts . reduce ( ( acc , key ) => acc [ key ] , current ) ;
} catch ( e ) {
if ( e === PENDING _GETTER ) {
return PENDING _GETTER ;
}
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
} ;
const getEvaluate = ( { scope } ) => (
// TODO: When removing the temporarily remaining `value( ...args )` call below, remove the `...args` parameter too.
( entry , ... args ) => {
let { value : path , namespace } = entry ;
if ( typeof path !== "string" ) {
throw new Error ( "The `value` prop should be a string path" ) ;
}
const hasNegationOperator = path [ 0 ] === "!" && ! ! ( path = path . slice ( 1 ) ) ;
setScope ( scope ) ;
const value = resolve ( path , namespace ) ;
if ( typeof value === "function" ) {
if ( hasNegationOperator ) {
warn (
"Using a function with a negation operator is deprecated and will stop working in WordPress 6.9. Please use derived state instead."
) ;
const functionResult = ! value ( ... args ) ;
resetScope ( ) ;
return functionResult ;
}
2025-04-25 12:30:07 +02:00
resetScope ( ) ;
2025-12-12 13:15:55 +01:00
const wrappedFunction = ( ... functionArgs ) => {
setScope ( scope ) ;
const functionResult = value ( ... functionArgs ) ;
resetScope ( ) ;
return functionResult ;
} ;
if ( value . sync ) {
const syncAwareFunction = wrappedFunction ;
syncAwareFunction . sync = true ;
}
return wrappedFunction ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
const result = value ;
2025-04-25 12:30:07 +02:00
resetScope ( ) ;
2025-12-12 13:15:55 +01:00
return hasNegationOperator && value !== PENDING _GETTER ? ! result : result ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
) ;
const getPriorityLevels = ( directives ) => {
2025-02-28 08:42:11 +01:00
const byPriority = Object . keys ( directives ) . reduce ( ( obj , name ) => {
if ( directiveCallbacks [ name ] ) {
const priority = directivePriorities [ name ] ;
( obj [ priority ] = obj [ priority ] || [ ] ) . push ( name ) ;
}
return obj ;
} , { } ) ;
return Object . entries ( byPriority ) . sort ( ( [ p1 ] , [ p2 ] ) => parseInt ( p1 ) - parseInt ( p2 ) ) . map ( ( [ , arr ] ) => arr ) ;
} ;
const Directives = ( {
directives ,
priorityLevels : [ currentPriorityLevel , ... nextPriorityLevels ] ,
element ,
originalProps ,
previousScope
} ) => {
const scope = A ( { } ) . current ;
2025-12-12 13:15:55 +01:00
scope . evaluate = q ( getEvaluate ( { scope } ) , [ ] ) ;
const { client , server } = x ( context ) ;
2025-02-28 08:42:11 +01:00
scope . context = client ;
scope . serverContext = server ;
scope . ref = previousScope ? . ref || A ( null ) ;
2025-12-12 13:15:55 +01:00
element = ( 0 , preact _module /* cloneElement */ . Ob ) ( element , { ref : scope . ref } ) ;
2025-02-28 08:42:11 +01:00
scope . attributes = element . props ;
const children = nextPriorityLevels . length > 0 ? ( 0 , preact _module . h ) ( Directives , {
directives ,
priorityLevels : nextPriorityLevels ,
element ,
originalProps ,
previousScope : scope
} ) : element ;
2025-12-12 13:15:55 +01:00
const props = { ... originalProps , children } ;
2025-02-28 08:42:11 +01:00
const directiveArgs = {
directives ,
props ,
element ,
context ,
evaluate : scope . evaluate
} ;
setScope ( scope ) ;
for ( const directiveName of currentPriorityLevel ) {
const wrapper = directiveCallbacks [ directiveName ] ? . ( directiveArgs ) ;
2025-12-12 13:15:55 +01:00
if ( wrapper !== void 0 ) {
2025-02-28 08:42:11 +01:00
props . children = wrapper ;
}
}
resetScope ( ) ;
return props . children ;
} ;
const old = preact _module /* options */ . fF . vnode ;
2025-12-12 13:15:55 +01:00
preact _module /* options */ . fF . vnode = ( vnode ) => {
2025-02-28 08:42:11 +01:00
if ( vnode . props . _ _directives ) {
const props = vnode . props ;
const directives = props . _ _directives ;
if ( directives . key ) {
vnode . key = directives . key . find ( isDefaultDirectiveSuffix ) . value ;
}
delete props . _ _directives ;
const priorityLevels = getPriorityLevels ( directives ) ;
if ( priorityLevels . length > 0 ) {
vnode . props = {
directives ,
priorityLevels ,
originalProps : props ,
type : vnode . type ,
element : ( 0 , preact _module . h ) ( vnode . type , props ) ,
top : true
} ;
vnode . type = Directives ;
}
}
if ( old ) {
old ( vnode ) ;
}
} ;
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/interactivity/build-module/directives.js
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const warnUniqueIdWithTwoHyphens = ( prefix , suffix , uniqueId ) => {
if ( true ) {
warn (
2026-03-31 11:30:59 +02:00
` The usage of data-wp- ${ prefix } -- ${ suffix } ${ uniqueId ? ` -- ${ uniqueId } ` : "" } (two hyphens for unique ID) is deprecated and will stop working in WordPress 7.1. Please use data-wp- ${ prefix } ${ uniqueId ? ` -- ${ suffix } --- ${ uniqueId } ` : ` --- ${ suffix } ` } (three hyphens for unique ID) from now on. `
2025-12-12 13:15:55 +01:00
) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
} ;
const warnUniqueIdNotSupported = ( prefix , uniqueId ) => {
if ( true ) {
warn (
` Unique IDs are not supported for the data-wp- ${ prefix } directive. Ignoring the directive with unique ID " ${ uniqueId } ". `
) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
} ;
const warnWithSyncEvent = ( wrongPrefix , rightPrefix ) => {
if ( true ) {
warn (
` The usage of data-wp- ${ wrongPrefix } is deprecated and will stop working in WordPress 7.0. Please, use data-wp- ${ rightPrefix } with the withSyncEvent() helper from now on. `
) ;
}
} ;
2025-04-25 12:30:07 +02:00
function wrapEventAsync ( event ) {
const handler = {
get ( target , prop , receiver ) {
const value = target [ prop ] ;
switch ( prop ) {
2025-12-12 13:15:55 +01:00
case "currentTarget" :
if ( true ) {
warn (
` Accessing the synchronous event. ${ prop } property in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 7.0. Please wrap the store action in withSyncEvent(). `
) ;
}
2025-04-25 12:30:07 +02:00
break ;
2025-12-12 13:15:55 +01:00
case "preventDefault" :
case "stopImmediatePropagation" :
case "stopPropagation" :
if ( true ) {
warn (
` Using the synchronous event. ${ prop } () function in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 7.0. Please wrap the store action in withSyncEvent(). `
) ;
}
2025-04-25 12:30:07 +02:00
break ;
}
if ( value instanceof Function ) {
2025-12-12 13:15:55 +01:00
return function ( ... args ) {
return value . apply (
this === receiver ? target : this ,
args
) ;
2025-04-25 12:30:07 +02:00
} ;
}
return value ;
}
} ;
return new Proxy ( event , handler ) ;
}
2025-02-28 08:42:11 +01:00
const newRule = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g ;
const ruleClean = /\/\*[^]*?\*\/| +/g ;
const ruleNewline = /\n+/g ;
2025-12-12 13:15:55 +01:00
const empty = " " ;
const cssStringToObject = ( val ) => {
2025-02-28 08:42:11 +01:00
const tree = [ { } ] ;
let block , left ;
2025-12-12 13:15:55 +01:00
while ( block = newRule . exec ( val . replace ( ruleClean , "" ) ) ) {
2025-02-28 08:42:11 +01:00
if ( block [ 4 ] ) {
tree . shift ( ) ;
} else if ( block [ 3 ] ) {
left = block [ 3 ] . replace ( ruleNewline , empty ) . trim ( ) ;
tree . unshift ( tree [ 0 ] [ left ] = tree [ 0 ] [ left ] || { } ) ;
} else {
tree [ 0 ] [ block [ 1 ] ] = block [ 2 ] . replace ( ruleNewline , empty ) . trim ( ) ;
}
}
return tree [ 0 ] ;
} ;
2025-12-12 13:15:55 +01:00
const getGlobalEventDirective = ( type ) => {
return ( { directives , evaluate } ) => {
directives [ ` on- ${ type } ` ] . filter ( isNonDefaultDirectiveSuffix ) . forEach ( ( entry ) => {
const suffixParts = entry . suffix . split ( "--" , 2 ) ;
const eventName = suffixParts [ 0 ] ;
if ( true ) {
if ( suffixParts [ 1 ] ) {
warnUniqueIdWithTwoHyphens (
` on- ${ type } ` ,
suffixParts [ 0 ] ,
suffixParts [ 1 ]
) ;
}
}
2025-02-28 08:42:11 +01:00
useInit ( ( ) => {
2025-12-12 13:15:55 +01:00
const cb = ( event ) => {
2025-04-25 12:30:07 +02:00
const result = evaluate ( entry ) ;
2025-12-12 13:15:55 +01:00
if ( typeof result === "function" ) {
2025-04-25 12:30:07 +02:00
if ( ! result ? . sync ) {
event = wrapEventAsync ( event ) ;
}
result ( event ) ;
}
} ;
2025-12-12 13:15:55 +01:00
const globalVar = type === "window" ? window : document ;
2025-02-28 08:42:11 +01:00
globalVar . addEventListener ( eventName , cb ) ;
return ( ) => globalVar . removeEventListener ( eventName , cb ) ;
} ) ;
} ) ;
} ;
} ;
2025-12-12 13:15:55 +01:00
const evaluateItemKey = ( inheritedValue , namespace , item , itemProp , eachKey ) => {
const clientContextWithItem = {
... inheritedValue . client ,
[ namespace ] : {
... inheritedValue . client [ namespace ] ,
[ itemProp ] : item
}
} ;
const scope = {
... getScope ( ) ,
context : clientContextWithItem ,
serverContext : inheritedValue . server
} ;
return eachKey ? getEvaluate ( { scope } ) ( eachKey ) : item ;
} ;
const useItemContexts = function * ( inheritedValue , namespace , items , itemProp , eachKey ) {
const { current : itemContexts } = A ( /* @__PURE__ */ new Map ( ) ) ;
for ( const item of items ) {
const key = evaluateItemKey (
inheritedValue ,
namespace ,
item ,
itemProp ,
eachKey
) ;
if ( ! itemContexts . has ( key ) ) {
itemContexts . set (
key ,
proxifyContext (
proxifyState ( namespace , {
// Inits the item prop in the context to shadow it in case
// it was inherited from the parent context. The actual
// value is set in the `wp-each` directive later on.
[ itemProp ] : void 0
} ) ,
inheritedValue . client [ namespace ]
)
) ;
}
yield [ item , itemContexts . get ( key ) , key ] ;
}
} ;
const getGlobalAsyncEventDirective = ( type ) => {
return ( { directives , evaluate } ) => {
directives [ ` on-async- ${ type } ` ] . filter ( isNonDefaultDirectiveSuffix ) . forEach ( ( entry ) => {
if ( true ) {
warnWithSyncEvent ( ` on-async- ${ type } ` , ` on- ${ type } ` ) ;
}
const eventName = entry . suffix . split ( "--" , 1 ) [ 0 ] ;
2025-02-28 08:42:11 +01:00
useInit ( ( ) => {
2025-12-12 13:15:55 +01:00
const cb = async ( event ) => {
2025-02-28 08:42:11 +01:00
await splitTask ( ) ;
2025-04-25 12:30:07 +02:00
const result = evaluate ( entry ) ;
2025-12-12 13:15:55 +01:00
if ( typeof result === "function" ) {
2025-04-25 12:30:07 +02:00
result ( event ) ;
}
2025-02-28 08:42:11 +01:00
} ;
2025-12-12 13:15:55 +01:00
const globalVar = type === "window" ? window : document ;
2025-02-28 08:42:11 +01:00
globalVar . addEventListener ( eventName , cb , {
passive : true
} ) ;
return ( ) => globalVar . removeEventListener ( eventName , cb ) ;
} ) ;
} ) ;
} ;
} ;
2025-12-12 13:15:55 +01:00
const routerRegions = /* @__PURE__ */ new Map ( ) ;
var directives _default = ( ) => {
directive (
"context" ,
( {
directives : { context } ,
props : { children } ,
context : inheritedContext
} ) => {
const entries = context . filter ( isDefaultDirectiveSuffix ) . reverse ( ) ;
if ( ! entries . length ) {
if ( true ) {
warn (
"The usage of data-wp-context--unique-id (two hyphens) is not supported. To add a unique ID to the directive, please use data-wp-context---unique-id (three hyphens) instead."
) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
return ;
}
const { Provider } = inheritedContext ;
const { client : inheritedClient , server : inheritedServer } = x ( inheritedContext ) ;
const client = A ( { } ) ;
const server = { } ;
const result = {
client : { ... inheritedClient } ,
server : { ... inheritedServer }
2025-02-28 08:42:11 +01:00
} ;
2025-12-12 13:15:55 +01:00
const namespaces = /* @__PURE__ */ new Set ( ) ;
entries . forEach ( ( { value , namespace , uniqueId } ) => {
2025-02-28 08:42:11 +01:00
if ( ! isPlainObject ( value ) ) {
2025-12-12 13:15:55 +01:00
if ( true ) {
warn (
` The value of data-wp-context ${ uniqueId ? ` --- ${ uniqueId } ` : "" } on the ${ namespace } namespace must be a valid stringified JSON object. `
) ;
}
return ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
if ( ! client . current [ namespace ] ) {
client . current [ namespace ] = proxifyState ( namespace , { } ) ;
}
deepMerge (
client . current [ namespace ] ,
deepClone ( value ) ,
false
) ;
server [ namespace ] = value ;
namespaces . add ( namespace ) ;
} ) ;
namespaces . forEach ( ( namespace ) => {
result . client [ namespace ] = proxifyContext (
client . current [ namespace ] ,
inheritedClient [ namespace ]
) ;
result . server [ namespace ] = proxifyContext (
server [ namespace ] ,
inheritedServer [ namespace ]
) ;
} ) ;
return ( 0 , preact _module . h ) ( Provider , { value : result } , children ) ;
2025-02-28 08:42:11 +01:00
} ,
2025-12-12 13:15:55 +01:00
{ priority : 5 }
) ;
directive ( "watch" , ( { directives : { watch } , evaluate } ) => {
watch . forEach ( ( entry ) => {
if ( true ) {
if ( entry . suffix ) {
warnUniqueIdWithTwoHyphens ( "watch" , entry . suffix ) ;
}
}
2025-02-28 08:42:11 +01:00
useWatch ( ( ) => {
let start ;
if ( false ) { }
2025-04-25 12:30:07 +02:00
let result = evaluate ( entry ) ;
2025-12-12 13:15:55 +01:00
if ( typeof result === "function" ) {
2025-04-25 12:30:07 +02:00
result = result ( ) ;
}
2025-02-28 08:42:11 +01:00
if ( false ) { }
return result ;
} ) ;
} ) ;
} ) ;
2025-12-12 13:15:55 +01:00
directive ( "init" , ( { directives : { init } , evaluate } ) => {
init . forEach ( ( entry ) => {
if ( true ) {
if ( entry . suffix ) {
warnUniqueIdWithTwoHyphens ( "init" , entry . suffix ) ;
}
}
2025-02-28 08:42:11 +01:00
useInit ( ( ) => {
let start ;
if ( false ) { }
2025-04-25 12:30:07 +02:00
let result = evaluate ( entry ) ;
2025-12-12 13:15:55 +01:00
if ( typeof result === "function" ) {
2025-04-25 12:30:07 +02:00
result = result ( ) ;
}
2025-02-28 08:42:11 +01:00
if ( false ) { }
return result ;
} ) ;
} ) ;
} ) ;
2025-12-12 13:15:55 +01:00
directive ( "on" , ( { directives : { on } , element , evaluate } ) => {
const events = /* @__PURE__ */ new Map ( ) ;
on . filter ( isNonDefaultDirectiveSuffix ) . forEach ( ( entry ) => {
const suffixParts = entry . suffix . split ( "--" , 2 ) ;
if ( true ) {
if ( suffixParts [ 1 ] ) {
warnUniqueIdWithTwoHyphens (
"on" ,
suffixParts [ 0 ] ,
suffixParts [ 1 ]
) ;
}
}
if ( ! events . has ( suffixParts [ 0 ] ) ) {
events . set ( suffixParts [ 0 ] , /* @__PURE__ */ new Set ( ) ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
events . get ( suffixParts [ 0 ] ) . add ( entry ) ;
2025-02-28 08:42:11 +01:00
} ) ;
events . forEach ( ( entries , eventType ) => {
const existingHandler = element . props [ ` on ${ eventType } ` ] ;
2025-12-12 13:15:55 +01:00
element . props [ ` on ${ eventType } ` ] = ( event ) => {
if ( existingHandler ) {
existingHandler ( event ) ;
}
entries . forEach ( ( entry ) => {
2025-02-28 08:42:11 +01:00
let start ;
if ( false ) { }
2025-04-25 12:30:07 +02:00
const result = evaluate ( entry ) ;
2025-12-12 13:15:55 +01:00
if ( typeof result === "function" ) {
2025-04-25 12:30:07 +02:00
if ( ! result ? . sync ) {
event = wrapEventAsync ( event ) ;
}
result ( event ) ;
}
2025-02-28 08:42:11 +01:00
if ( false ) { }
} ) ;
} ;
} ) ;
} ) ;
2025-12-12 13:15:55 +01:00
directive (
"on-async" ,
( { directives : { "on-async" : onAsync } , element , evaluate } ) => {
if ( true ) {
warnWithSyncEvent ( "on-async" , "on" ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const events = /* @__PURE__ */ new Map ( ) ;
onAsync . filter ( isNonDefaultDirectiveSuffix ) . forEach ( ( entry ) => {
const event = entry . suffix . split ( "--" , 1 ) [ 0 ] ;
if ( ! events . has ( event ) ) {
events . set ( event , /* @__PURE__ */ new Set ( ) ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
events . get ( event ) . add ( entry ) ;
} ) ;
events . forEach ( ( entries , eventType ) => {
const existingHandler = element . props [ ` on ${ eventType } ` ] ;
element . props [ ` on ${ eventType } ` ] = ( event ) => {
if ( existingHandler ) {
existingHandler ( event ) ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
entries . forEach ( async ( entry ) => {
await splitTask ( ) ;
const result = evaluate ( entry ) ;
if ( typeof result === "function" ) {
result ( event ) ;
}
} ) ;
} ;
} ) ;
}
) ;
directive ( "on-window" , getGlobalEventDirective ( "window" ) ) ;
directive ( "on-document" , getGlobalEventDirective ( "document" ) ) ;
directive ( "on-async-window" , getGlobalAsyncEventDirective ( "window" ) ) ;
directive (
"on-async-document" ,
getGlobalAsyncEventDirective ( "document" )
) ;
directive (
"class" ,
( { directives : { class : classNames } , element , evaluate } ) => {
classNames . filter ( isNonDefaultDirectiveSuffix ) . forEach ( ( entry ) => {
const className = entry . uniqueId ? ` ${ entry . suffix } --- ${ entry . uniqueId } ` : entry . suffix ;
let result = evaluate ( entry ) ;
if ( result === PENDING _GETTER ) {
return ;
}
if ( typeof result === "function" ) {
result = result ( ) ;
}
const currentClass = element . props . class || "" ;
const classFinder = new RegExp (
` (^| \\ s) ${ className } ( \\ s| $ ) ` ,
"g"
) ;
2025-02-28 08:42:11 +01:00
if ( ! result ) {
2025-12-12 13:15:55 +01:00
element . props . class = currentClass . replace ( classFinder , " " ) . trim ( ) ;
} else if ( ! classFinder . test ( currentClass ) ) {
element . props . class = currentClass ? ` ${ currentClass } ${ className } ` : className ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
useInit ( ( ) => {
if ( ! result ) {
element . ref . current . classList . remove ( className ) ;
} else {
element . ref . current . classList . add ( className ) ;
}
} ) ;
2025-02-28 08:42:11 +01:00
} ) ;
2025-12-12 13:15:55 +01:00
}
) ;
directive ( "style" , ( { directives : { style } , element , evaluate } ) => {
style . filter ( isNonDefaultDirectiveSuffix ) . forEach ( ( entry ) => {
if ( entry . uniqueId ) {
if ( true ) {
warnUniqueIdNotSupported ( "style" , entry . uniqueId ) ;
}
return ;
}
2025-02-28 08:42:11 +01:00
const styleProp = entry . suffix ;
2025-04-25 12:30:07 +02:00
let result = evaluate ( entry ) ;
2025-12-12 13:15:55 +01:00
if ( result === PENDING _GETTER ) {
return ;
}
if ( typeof result === "function" ) {
2025-04-25 12:30:07 +02:00
result = result ( ) ;
}
2025-02-28 08:42:11 +01:00
element . props . style = element . props . style || { } ;
2025-12-12 13:15:55 +01:00
if ( typeof element . props . style === "string" ) {
2025-02-28 08:42:11 +01:00
element . props . style = cssStringToObject ( element . props . style ) ;
}
if ( ! result ) {
delete element . props . style [ styleProp ] ;
} else {
element . props . style [ styleProp ] = result ;
}
useInit ( ( ) => {
if ( ! result ) {
element . ref . current . style . removeProperty ( styleProp ) ;
} else {
2025-12-12 13:15:55 +01:00
element . ref . current . style . setProperty ( styleProp , result ) ;
2025-02-28 08:42:11 +01:00
}
} ) ;
} ) ;
} ) ;
2025-12-12 13:15:55 +01:00
directive ( "bind" , ( { directives : { bind } , element , evaluate } ) => {
bind . filter ( isNonDefaultDirectiveSuffix ) . forEach ( ( entry ) => {
if ( entry . uniqueId ) {
if ( true ) {
warnUniqueIdNotSupported ( "bind" , entry . uniqueId ) ;
}
return ;
}
2025-02-28 08:42:11 +01:00
const attribute = entry . suffix ;
2025-04-25 12:30:07 +02:00
let result = evaluate ( entry ) ;
2025-12-12 13:15:55 +01:00
if ( result === PENDING _GETTER ) {
return ;
}
if ( typeof result === "function" ) {
2025-04-25 12:30:07 +02:00
result = result ( ) ;
}
2025-02-28 08:42:11 +01:00
element . props [ attribute ] = result ;
useInit ( ( ) => {
const el = element . ref . current ;
2025-12-12 13:15:55 +01:00
if ( attribute === "style" ) {
if ( typeof result === "string" ) {
2025-02-28 08:42:11 +01:00
el . style . cssText = result ;
}
return ;
2025-12-12 13:15:55 +01:00
} else if ( attribute !== "width" && attribute !== "height" && attribute !== "href" && attribute !== "list" && attribute !== "form" && / *
2025-02-28 08:42:11 +01:00
* The value for ` tabindex ` follows the parsing rules for an
* integer . If that fails , or if the attribute isn ' t present , then
* the browsers should " follow platform conventions to determine if
* the element should be considered as a focusable area " ,
* practically meaning that most elements get a default of ` -1 ` ( not
* focusable ) , but several also get a default of ` 0 ` ( focusable in
* order after all elements with a positive ` tabindex ` value ) .
*
* @ see https : //html.spec.whatwg.org/#tabindex-value
* /
2025-12-12 13:15:55 +01:00
attribute !== "tabIndex" && attribute !== "download" && attribute !== "rowSpan" && attribute !== "colSpan" && attribute !== "role" && attribute in el ) {
2025-02-28 08:42:11 +01:00
try {
2025-12-12 13:15:55 +01:00
el [ attribute ] = result === null || result === void 0 ? "" : result ;
2025-02-28 08:42:11 +01:00
return ;
2025-12-12 13:15:55 +01:00
} catch ( err ) {
}
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
if ( result !== null && result !== void 0 && ( result !== false || attribute [ 4 ] === "-" ) ) {
2025-02-28 08:42:11 +01:00
el . setAttribute ( attribute , result ) ;
} else {
el . removeAttribute ( attribute ) ;
}
} ) ;
} ) ;
} ) ;
2025-12-12 13:15:55 +01:00
directive (
"ignore" ,
( {
element : {
type : Type ,
props : { innerHTML , ... rest }
}
} ) => {
if ( true ) {
warn (
"The data-wp-ignore directive is deprecated and will be removed in version 7.0."
) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const cached = T ( ( ) => innerHTML , [ ] ) ;
return ( 0 , preact _module . h ) ( Type , {
dangerouslySetInnerHTML : { _ _html : cached } ,
... rest
} ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
) ;
directive ( "text" , ( { directives : { text } , element , evaluate } ) => {
const entries = text . filter ( isDefaultDirectiveSuffix ) ;
if ( ! entries . length ) {
if ( true ) {
warn (
"The usage of data-wp-text--suffix is not supported. Please use data-wp-text instead."
) ;
}
2025-02-28 08:42:11 +01:00
return ;
}
2025-12-12 13:15:55 +01:00
entries . forEach ( ( entry ) => {
if ( entry . uniqueId ) {
if ( true ) {
warnUniqueIdNotSupported ( "text" , entry . uniqueId ) ;
}
return ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
try {
let result = evaluate ( entry ) ;
if ( result === PENDING _GETTER ) {
return ;
}
if ( typeof result === "function" ) {
result = result ( ) ;
}
element . props . children = typeof result === "object" ? null : result . toString ( ) ;
} catch ( e ) {
element . props . children = null ;
}
} ) ;
2025-02-28 08:42:11 +01:00
} ) ;
2025-12-12 13:15:55 +01:00
directive ( "run" , ( { directives : { run } , evaluate } ) => {
run . forEach ( ( entry ) => {
if ( true ) {
if ( entry . suffix ) {
warnUniqueIdWithTwoHyphens ( "run" , entry . suffix ) ;
}
}
2025-04-25 12:30:07 +02:00
let result = evaluate ( entry ) ;
2025-12-12 13:15:55 +01:00
if ( typeof result === "function" ) {
2025-04-25 12:30:07 +02:00
result = result ( ) ;
}
return result ;
} ) ;
2025-02-28 08:42:11 +01:00
} ) ;
2025-12-12 13:15:55 +01:00
directive (
"each" ,
( {
directives : { each , "each-key" : eachKey } ,
context : inheritedContext ,
element ,
evaluate
} ) => {
if ( element . type !== "template" ) {
if ( true ) {
warn (
"The data-wp-each directive can only be used on <template> elements."
) ;
}
return ;
}
const { Provider } = inheritedContext ;
const inheritedValue = x ( inheritedContext ) ;
const [ entry ] = each ;
const { namespace , suffix , uniqueId } = entry ;
if ( each . length > 1 ) {
if ( true ) {
warn (
"The usage of multiple data-wp-each directives on the same element is not supported. Please pick only one."
) ;
}
return ;
}
if ( uniqueId ) {
if ( true ) {
warnUniqueIdNotSupported ( "each" , uniqueId ) ;
}
return ;
}
let iterable = evaluate ( entry ) ;
if ( iterable === PENDING _GETTER ) {
return ;
}
if ( typeof iterable === "function" ) {
iterable = iterable ( ) ;
}
if ( typeof iterable ? . [ Symbol . iterator ] !== "function" ) {
return ;
}
const itemProp = suffix ? kebabToCamelCase ( suffix ) : "item" ;
const result = [ ] ;
const itemContexts = useItemContexts (
inheritedValue ,
namespace ,
iterable ,
itemProp ,
eachKey ? . [ 0 ]
) ;
for ( const [ item , itemContext , key ] of itemContexts ) {
const mergedContext = {
client : {
... inheritedValue . client ,
[ namespace ] : itemContext
} ,
server : { ... inheritedValue . server }
} ;
mergedContext . client [ namespace ] [ itemProp ] = item ;
result . push (
( 0 , preact _module . h ) (
Provider ,
{ value : mergedContext , key } ,
element . props . content
)
) ;
}
return result ;
2025-02-28 08:42:11 +01:00
} ,
2025-12-12 13:15:55 +01:00
{ priority : 20 }
) ;
directive (
"each-child" ,
( { directives : { "each-child" : eachChild } , element , evaluate } ) => {
const entry = eachChild . find ( isDefaultDirectiveSuffix ) ;
if ( ! entry ) {
return ;
}
const iterable = evaluate ( entry ) ;
return iterable === PENDING _GETTER ? element : null ;
} ,
{ priority : 1 }
) ;
directive (
"router-region" ,
( { directives : { "router-region" : routerRegion } } ) => {
const entry = routerRegion . find ( isDefaultDirectiveSuffix ) ;
if ( ! entry ) {
return ;
}
if ( entry . suffix ) {
if ( true ) {
warn (
` Suffixes for the data-wp-router-region directive are not supported. Ignoring the directive with suffix " ${ entry . suffix } ". `
) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
return ;
}
if ( entry . uniqueId ) {
if ( true ) {
warnUniqueIdNotSupported ( "router-region" , entry . uniqueId ) ;
}
return ;
}
const regionId = typeof entry . value === "string" ? entry . value : entry . value . id ;
if ( ! routerRegions . has ( regionId ) ) {
routerRegions . set ( regionId , signals _core _module _d ( ) ) ;
}
const vdom = routerRegions . get ( regionId ) . value ;
_ ( ( ) => {
if ( vdom && typeof vdom . type !== "string" ) {
navigationContextSignal . value = navigationContextSignal . peek ( ) + 1 ;
}
} , [ vdom ] ) ;
if ( vdom && typeof vdom . type !== "string" ) {
const previousScope = getScope ( ) ;
return ( 0 , preact _module /* cloneElement */ . Ob ) ( vdom , { previousScope } ) ;
}
return vdom ;
} ,
{ priority : 1 }
) ;
} ;
2025-02-28 08:42:11 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/interactivity/build-module/vdom.js
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const directivePrefix = ` data-wp- ` ;
2025-02-28 08:42:11 +01:00
const namespaces = [ ] ;
2025-12-12 13:15:55 +01:00
const currentNamespace = ( ) => namespaces [ namespaces . length - 1 ] ? ? null ;
const isObject = ( item ) => Boolean ( item && typeof item === "object" && item . constructor === Object ) ;
const invalidCharsRegex = /[^a-z0-9-_]/i ;
function parseDirectiveName ( directiveName ) {
const name = directiveName . substring ( 8 ) ;
if ( invalidCharsRegex . test ( name ) ) {
return null ;
}
const suffixIndex = name . indexOf ( "--" ) ;
if ( suffixIndex === - 1 ) {
return { prefix : name , suffix : null , uniqueId : null } ;
}
const prefix = name . substring ( 0 , suffixIndex ) ;
const remaining = name . substring ( suffixIndex ) ;
if ( remaining . startsWith ( "---" ) && remaining [ 3 ] !== "-" ) {
return {
prefix ,
suffix : null ,
uniqueId : remaining . substring ( 3 ) || null
} ;
}
let suffix = remaining . substring ( 2 ) ;
const uniqueIdIndex = suffix . indexOf ( "---" ) ;
if ( uniqueIdIndex !== - 1 && suffix . substring ( uniqueIdIndex ) [ 3 ] !== "-" ) {
const uniqueId = suffix . substring ( uniqueIdIndex + 3 ) || null ;
suffix = suffix . substring ( 0 , uniqueIdIndex ) || null ;
return { prefix , suffix , uniqueId } ;
}
return { prefix , suffix : suffix || null , uniqueId : null } ;
}
2025-02-28 08:42:11 +01:00
const nsPathRegExp = /^([\w_\/-]+)::(.+)$/ ;
2025-12-12 13:15:55 +01:00
const hydratedIslands = /* @__PURE__ */ new WeakSet ( ) ;
2025-02-28 08:42:11 +01:00
function toVdom ( root ) {
2025-12-12 13:15:55 +01:00
const nodesToRemove = /* @__PURE__ */ new Set ( ) ;
const nodesToReplace = /* @__PURE__ */ new Set ( ) ;
const treeWalker = document . createTreeWalker (
root ,
205
// TEXT + CDATA_SECTION + COMMENT + PROCESSING_INSTRUCTION + ELEMENT
2025-02-28 08:42:11 +01:00
) ;
function walk ( node ) {
2025-12-12 13:15:55 +01:00
const { nodeType } = node ;
2025-02-28 08:42:11 +01:00
if ( nodeType === 3 ) {
2025-12-12 13:15:55 +01:00
return node . data ;
2025-02-28 08:42:11 +01:00
}
if ( nodeType === 4 ) {
2025-12-12 13:15:55 +01:00
nodesToReplace . add ( node ) ;
return node . nodeValue ;
2025-02-28 08:42:11 +01:00
}
if ( nodeType === 8 || nodeType === 7 ) {
2025-12-12 13:15:55 +01:00
nodesToRemove . add ( node ) ;
return null ;
2025-02-28 08:42:11 +01:00
}
const elementNode = node ;
2025-12-12 13:15:55 +01:00
const { attributes } = elementNode ;
2025-02-28 08:42:11 +01:00
const localName = elementNode . localName ;
const props = { } ;
const children = [ ] ;
const directives = [ ] ;
let ignore = false ;
let island = false ;
for ( let i = 0 ; i < attributes . length ; i ++ ) {
const attributeName = attributes [ i ] . name ;
const attributeValue = attributes [ i ] . value ;
2025-12-12 13:15:55 +01:00
if ( attributeName [ directivePrefix . length ] && attributeName . slice ( 0 , directivePrefix . length ) === directivePrefix ) {
if ( attributeName === "data-wp-ignore" ) {
2025-02-28 08:42:11 +01:00
ignore = true ;
} else {
const regexResult = nsPathRegExp . exec ( attributeValue ) ;
2025-12-12 13:15:55 +01:00
const namespace = regexResult ? . [ 1 ] ? ? null ;
let value = regexResult ? . [ 2 ] ? ? attributeValue ;
2025-02-28 08:42:11 +01:00
try {
const parsedValue = JSON . parse ( value ) ;
value = isObject ( parsedValue ) ? parsedValue : value ;
2025-12-12 13:15:55 +01:00
} catch {
}
if ( attributeName === "data-wp-interactive" ) {
2025-02-28 08:42:11 +01:00
island = true ;
2025-12-12 13:15:55 +01:00
const islandNamespace = (
// eslint-disable-next-line no-nested-ternary
typeof value === "string" ? value : typeof value ? . namespace === "string" ? value . namespace : null
) ;
2025-02-28 08:42:11 +01:00
namespaces . push ( islandNamespace ) ;
} else {
directives . push ( [ attributeName , namespace , value ] ) ;
}
}
2025-12-12 13:15:55 +01:00
} else if ( attributeName === "ref" ) {
2025-02-28 08:42:11 +01:00
continue ;
}
props [ attributeName ] = attributeValue ;
}
if ( ignore && ! island ) {
2025-12-12 13:15:55 +01:00
return [
( 0 , preact _module . h ) ( localName , {
... props ,
innerHTML : elementNode . innerHTML ,
_ _directives : { ignore : true }
} )
] ;
2025-02-28 08:42:11 +01:00
}
if ( island ) {
hydratedIslands . add ( elementNode ) ;
}
if ( directives . length ) {
props . _ _directives = directives . reduce ( ( obj , [ name , ns , value ] ) => {
2025-12-12 13:15:55 +01:00
const directiveParsed = parseDirectiveName ( name ) ;
if ( directiveParsed === null ) {
if ( true ) {
warn ( ` Found malformed directive name: ${ name } . ` ) ;
}
2025-02-28 08:42:11 +01:00
return obj ;
}
2025-12-12 13:15:55 +01:00
const { prefix , suffix , uniqueId } = directiveParsed ;
2025-02-28 08:42:11 +01:00
obj [ prefix ] = obj [ prefix ] || [ ] ;
obj [ prefix ] . push ( {
2025-12-12 13:15:55 +01:00
namespace : ns ? ? currentNamespace ( ) ,
value ,
suffix ,
uniqueId
2025-02-28 08:42:11 +01:00
} ) ;
return obj ;
} , { } ) ;
2025-12-12 13:15:55 +01:00
for ( const prefix in props . _ _directives ) {
props . _ _directives [ prefix ] . sort (
( a , b ) => {
const aSuffix = a . suffix ? ? "" ;
const bSuffix = b . suffix ? ? "" ;
if ( aSuffix !== bSuffix ) {
return aSuffix < bSuffix ? - 1 : 1 ;
}
const aId = a . uniqueId ? ? "" ;
const bId = b . uniqueId ? ? "" ;
return + ( aId > bId ) - + ( aId < bId ) ;
}
) ;
}
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
if ( props . _ _directives ? . [ "each-child" ] ) {
props . dangerouslySetInnerHTML = {
_ _html : elementNode . innerHTML
} ;
} else if ( localName === "template" ) {
props . content = [
... elementNode . content . childNodes
] . map ( ( childNode ) => toVdom ( childNode ) ) ;
2025-02-28 08:42:11 +01:00
} else {
let child = treeWalker . firstChild ( ) ;
if ( child ) {
while ( child ) {
2025-12-12 13:15:55 +01:00
const vnode = walk ( child ) ;
2025-02-28 08:42:11 +01:00
if ( vnode ) {
children . push ( vnode ) ;
}
2025-12-12 13:15:55 +01:00
child = treeWalker . nextSibling ( ) ;
2025-02-28 08:42:11 +01:00
}
treeWalker . parentNode ( ) ;
}
}
if ( island ) {
namespaces . pop ( ) ;
}
2025-12-12 13:15:55 +01:00
return ( 0 , preact _module . h ) ( localName , props , children ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const vdom = walk ( treeWalker . currentNode ) ;
nodesToRemove . forEach (
( node ) => node . remove ( )
) ;
nodesToReplace . forEach (
( node ) => node . replaceWith (
new window . Text ( node . nodeValue ? ? "" )
)
) ;
return vdom ;
2025-02-28 08:42:11 +01:00
}
2026-03-31 11:30:59 +02:00
; // ./node_modules/@wordpress/interactivity/build-module/hydration.js
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const regionRootFragments = /* @__PURE__ */ new WeakMap ( ) ;
const getRegionRootFragment = ( regions ) => {
const region = Array . isArray ( regions ) ? regions [ 0 ] : regions ;
2025-02-28 08:42:11 +01:00
if ( ! region . parentElement ) {
2025-12-12 13:15:55 +01:00
throw Error ( "The passed region should be an element with a parent." ) ;
2025-02-28 08:42:11 +01:00
}
if ( ! regionRootFragments . has ( region ) ) {
2025-12-12 13:15:55 +01:00
regionRootFragments . set (
region ,
createRootFragment ( region . parentElement , regions )
) ;
2025-02-28 08:42:11 +01:00
}
return regionRootFragments . get ( region ) ;
} ;
2025-12-12 13:15:55 +01:00
const initialVdom = /* @__PURE__ */ new WeakMap ( ) ;
2026-03-31 11:30:59 +02:00
const hydrateRegions = async ( ) => {
2025-12-12 13:15:55 +01:00
const nodes = document . querySelectorAll ( ` [data-wp-interactive] ` ) ;
2025-02-28 08:42:11 +01:00
for ( const node of nodes ) {
if ( ! hydratedIslands . has ( node ) ) {
await splitTask ( ) ;
const fragment = getRegionRootFragment ( node ) ;
const vdom = toVdom ( node ) ;
initialVdom . set ( node , vdom ) ;
await splitTask ( ) ;
( 0 , preact _module /* hydrate */ . Qv ) ( vdom , fragment ) ;
}
}
} ;
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/interactivity/build-module/index.js
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const requiredConsent = "I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress." ;
const privateApis = ( lock ) => {
2025-02-28 08:42:11 +01:00
if ( lock === requiredConsent ) {
return {
getRegionRootFragment : getRegionRootFragment ,
initialVdom : initialVdom ,
toVdom : toVdom ,
directive : directive ,
getNamespace : getNamespace ,
h : preact _module . h ,
cloneElement : preact _module /* cloneElement */ . Ob ,
render : preact _module /* render */ . XX ,
proxifyState : proxifyState ,
parseServerData : parseServerData ,
populateServerData : populateServerData ,
2025-12-12 13:15:55 +01:00
batch : signals _core _module _r ,
routerRegions : routerRegions ,
deepReadOnly : deepReadOnly ,
navigationSignal : navigationSignal
2025-02-28 08:42:11 +01:00
} ;
}
2025-12-12 13:15:55 +01:00
throw new Error ( "Forbidden access." ) ;
2025-02-28 08:42:11 +01:00
} ;
2026-03-31 11:30:59 +02:00
populateServerData ( parseServerData ( ) ) ;
2025-12-12 13:15:55 +01:00
directives _default ( ) ;
2026-03-31 11:30:59 +02:00
onDOMReady ( hydrateRegions ) ;
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
2025-02-28 08:42:11 +01:00
var _ _webpack _exports _ _getConfig = _ _webpack _exports _ _ . zj ;
var _ _webpack _exports _ _getContext = _ _webpack _exports _ _ . SD ;
var _ _webpack _exports _ _getElement = _ _webpack _exports _ _ . V6 ;
var _ _webpack _exports _ _getServerContext = _ _webpack _exports _ _ . $K ;
var _ _webpack _exports _ _getServerState = _ _webpack _exports _ _ . vT ;
var _ _webpack _exports _ _privateApis = _ _webpack _exports _ _ . jb ;
var _ _webpack _exports _ _splitTask = _ _webpack _exports _ _ . yT ;
var _ _webpack _exports _ _store = _ _webpack _exports _ _ . M _ ;
var _ _webpack _exports _ _useCallback = _ _webpack _exports _ _ . hb ;
var _ _webpack _exports _ _useEffect = _ _webpack _exports _ _ . vJ ;
var _ _webpack _exports _ _useInit = _ _webpack _exports _ _ . ip ;
var _ _webpack _exports _ _useLayoutEffect = _ _webpack _exports _ _ . Nf ;
var _ _webpack _exports _ _useMemo = _ _webpack _exports _ _ . Kr ;
var _ _webpack _exports _ _useRef = _ _webpack _exports _ _ . li ;
var _ _webpack _exports _ _useState = _ _webpack _exports _ _ . J0 ;
var _ _webpack _exports _ _useWatch = _ _webpack _exports _ _ . FH ;
var _ _webpack _exports _ _withScope = _ _webpack _exports _ _ . v4 ;
2025-04-25 12:30:07 +02:00
var _ _webpack _exports _ _withSyncEvent = _ _webpack _exports _ _ . mh ;
export { _ _webpack _exports _ _getConfig as getConfig , _ _webpack _exports _ _getContext as getContext , _ _webpack _exports _ _getElement as getElement , _ _webpack _exports _ _getServerContext as getServerContext , _ _webpack _exports _ _getServerState as getServerState , _ _webpack _exports _ _privateApis as privateApis , _ _webpack _exports _ _splitTask as splitTask , _ _webpack _exports _ _store as store , _ _webpack _exports _ _useCallback as useCallback , _ _webpack _exports _ _useEffect as useEffect , _ _webpack _exports _ _useInit as useInit , _ _webpack _exports _ _useLayoutEffect as useLayoutEffect , _ _webpack _exports _ _useMemo as useMemo , _ _webpack _exports _ _useRef as useRef , _ _webpack _exports _ _useState as useState , _ _webpack _exports _ _useWatch as useWatch , _ _webpack _exports _ _withScope as withScope , _ _webpack _exports _ _withSyncEvent as withSyncEvent } ;