efficient-storefront-blocks 0.135.0 → 0.135.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{$ as lf,D as Bk,E as Lk,F as tf,G as Rk,H as zk,I as Or,J as Uk,K as jk,L as Gk,M as nt,N as rf,O as ko,P as fe,R as af,S as Er,T as nf,X as Kk,Y as sf,Z as _r,_ as qk,a as Xo,b as Xs,ba as aP,c as Kd,d as Sn,e as Js,f as ik,fa as xP,g as bn,h as qd,ha as hP,ia as Mf,ja as UT,ka as jT,r as al,t as Fk}from"./chunk-75GXE5JB.js";import{a as bP,d as bf,e as st,f as wf,g as Cf,h as Tf,l as Kx}from"./chunk-62AOYUOH.js";import{$ as ix,$a as el,$b as Jk,$c as kv,$e as _P,$f as Ef,A as kC,Aa as JC,Ab as Ok,Ac as iv,Ad as $v,Ae as cP,Ag as rT,B as vC,Ba as px,Bb as ho,Bc as mf,Bd as zv,Be as pP,Bg as Bx,Bk as ml,C as PC,Ca as ZC,Cb as hx,Cc as dv,Cd as Cx,Ce as yf,Cg as aT,Cj as Hx,Ck as Nf,D as rt,Da as QC,Db as tl,Dc as fv,Dd as Uv,De as uP,Dg as Lx,Dj as pl,Dk as Ux,E as TC,Ea as ek,Eb as zt,Ec as cv,Ed as jv,Ee as mP,Eg as dr,Ek as HT,F as OC,Fa as ok,Fb as Cn,Fc as pv,Fd as Gv,Fg as Rx,Fk as ua,G as EC,Ga as tk,Gb as rl,Gc as jt,Gd as Kv,Ge as kt,Gg as _f,Gj as An,Gk as WT,H as _C,Ha as rk,Hc as Ue,Hd as qv,Hg as nT,Hk as $T,I as AC,Ia as vr,Ic as Ar,Id as kx,Ie as je,If as $P,Ig as sT,Ij as OT,Ik as zT,J as FC,Ja as ak,Jb as Ix,Jc as Sx,Jd as Vv,Je as vt,Jf as zP,Jg as lT,K as BC,Kb as na,Kc as uv,Kd as vx,Ke as Oe,Kf as UP,Kg as iT,Kk as GT,La as nk,Lb as of,Lc as mv,Ld as Yv,Le as yP,Lf as jP,Lg as dT,Lk as jx,M as LC,Ma as Vd,Mb as Ek,Mc as xv,Md as Xv,Mf as Ax,N as RC,Na as Zs,Nb as _k,Nc as xf,Nd as Jv,Nf as GP,Nk as KT,O as DC,Oa as Yd,Ob as Ak,Oc as sl,Od as Gt,Of as KP,Og as fT,Ok as qT,P as Wd,Pa as dk,Pb as df,Pc as hv,Pd as Zv,Pe as Px,Pf as Fx,Pg as cT,Pk as VT,Q as NC,Qb as Xk,Qc as Iv,Qd as da,Qj as ET,Qk as YT,R as MC,Rb as ff,Rc as gv,Rj as Wx,Rk as XT,Sb as yx,Sc as hf,Sd as Qv,Se as fl,Sj as _T,Sk as JT,Ta as fk,Tb as cf,Tc as yv,Td as Tn,Tf as ir,Ti as pa,Tj as AT,Ua as ck,Uc as Sv,Va as Qs,Vc as bx,Vd as lr,Vf as On,Vi as fr,Vj as Df,W as lx,Wc as bv,Wd as eP,We as SP,Wj as Fn,Xa as wn,Xc as Pn,Xd as dl,Xe as Tx,Xf as qP,Xh as gT,Xj as Bn,Y as Vs,Ya as pk,Yb as kn,Yd as oP,Ye as wP,Yf as VP,Yg as Af,Yh as yT,Yj as ul,Z as $d,Za as Xd,Zc as wv,Zd as fa,Ze as vf,Zf as Of,Zj as Ln,_ as Ao,_a as uk,_c as Cv,_d as tP,_f as Lr,_j as FT,a as _o,aa as In,ab as mk,ac as Zk,ad as vv,ae as If,aj as Lf,b as mn,ba as HC,bb as xk,bc as Qk,bd as Pv,be as Br,bg as En,ca as WC,cb as hk,cc as nl,cd as sa,ce as rP,cf as Ex,ch as pT,cj as wT,d as sC,da as $C,db as Ik,dd as Tv,e as rx,ea as zC,eb as mx,ed as wx,eh as uT,f as lC,fa as UC,fb as gk,fd as Ov,fk as BT,g as c,ga as dx,gb as ol,gd as Ev,gi as ST,gk as LT,h as $t,hb as yk,hd as _v,hf as AP,hi as bT,hl as Gx,i as hn,ia as jC,ib as xx,id as Av,if as FP,j as Ks,ja as zd,jd as Fv,jf as Pf,k as No,kb as Sk,kd as Fr,ke as nP,kf as BP,kg as Rr,l as qs,lb as bk,ld as ll,lf as LP,lg as YP,md as la,mg as XP,n as xC,nb as Jd,nc as vn,nd as Bv,ne as sP,ng as JP,nk as $x,o as hC,ob as wk,oc as Ut,oe as lP,oh as Dx,oj as CT,p as IC,pb as Ck,pc as ev,pd as ia,pe as iP,ph as Ff,pk as RT,pl as ZT,q as gC,qb as kk,qc as ov,qd as il,qh as ca,qk as DT,ql as QT,r as yC,rb as vk,rc as tv,rd as Lv,rh as Bf,rj as kT,rk as NT,rl as Hf,s as SC,sb as Zd,sc as rv,sd as Rv,sf as RP,sg as ZP,sj as Rf,sl as e0,t as bC,tb as Pk,tc as av,tf as _x,th as mT,tj as Nx,tk as MT,u as wC,uc as pf,ud as Dv,ue as Mo,uf as DP,uh as xT,uj as vT,ul as Rn,v as Hd,vc as uf,vd as Nv,ve as ao,vf as NP,vh as hT,vj as PT,vk as zx,vl as Wf,w as kr,wb as Tk,wc as nv,wd as Mv,wf as MP,wg as QP,wh as IT,wj as Mx,xa as VC,xb as Pr,xe as gf,xf as HP,xg as eT,y as sx,ya as YC,yb as Qd,yc as sv,yd as Hv,ye as dP,yg as oT,yj as _n,z as CC,za as XC,zb as ef,zc as lv,zd as Wv,ze as fP,zf as WP,zg as tT,zj as TT}from"./chunk-XSJNH2U7.js";import{a as uC,b as Md,c as mC,g as Vk,h as gx,i as Yk}from"./chunk-XMX3KEE4.js";import{$ as Ib,$a as Mb,$c as R,$e as Zm,$g as cC,A as io,Ab as Zb,Ad as pw,B as tn,Be as Xm,Bf as ox,Ca as ye,Cb as $s,Cd as Vm,Ce as ww,Ci as vo,D as Ms,Db as Qb,E as fd,Ed as uw,Ee as Jm,F as Nt,Fd as Cd,G as rn,Ga as ot,Gg as Zw,Gi as cl,H as ze,Ha as bt,Hb as Sd,Hd as tt,Hg as Qw,I as Xe,Ia as Em,Ic as nw,Id as Do,Ie as Pd,If as Dw,Ig as eC,J as an,Ja as _m,Jd as ro,Je as Td,Jg as oC,K as cd,Kc as Um,Kd as Ht,Ke as Cw,Kh as ux,L as fb,La as Am,Ld as nr,Le as Od,Lf as sr,Lh as gn,M as cb,Ma as Fm,Mb as ew,Md as Ct,Me as Ed,Mg as tC,Mh as sk,Nd as fn,Ne as kw,Nh as at,O as pb,Od as mw,Oe as vw,Oh as Yo,P as pd,Pd as cn,Pe as _d,Pg as rC,Ph as Gd,Q as ub,Qa as Bm,Qd as xw,Qe as Ad,Qg as aC,Qh as lk,R as ea,Ra as _b,Rb as bd,Rc as sw,Re as aa,Rf as Nw,Rh as yn,S as mb,Sa as Ab,Se as Pw,Sg as nC,T as xb,Ta as Ke,U as Hs,Ua as Fb,Ub as ow,Ud as ra,Ug as iC,Uh as Dk,V as Tm,Va as Id,Vb as tw,Vd as hw,Vg as dC,W as Ce,Wa as Bb,Wd as Iw,We as Tw,X as q,Xa as Lb,Xb as rw,Xd as pn,Xf as Mw,Xg as Cr,Y as hb,Ya as Rb,Yc as U,Yd as Us,Yf as Hw,Yh as Nk,Za as Db,Zb as Wm,Zc as oe,Zd as js,Ze as Wt,Zf as Ww,Zg as fC,_ as ud,_a as Nb,_c as jm,_d as Ym,_e as Gs,_f as $w,_g as ax,a as on,ab as Hb,ad as Co,ae as gw,af as Qm,ah as nx,b as xo,ba as gb,bb as Wb,bd as rr,be as yw,bf as Ow,bh as Nd,c as lo,ca as md,cb as gd,cd as lw,ce as Sw,cf as Ew,cg as zw,d as or,da as yb,db as yd,dd as H,df as Fd,dg as Uw,dh as pC,di as Mk,ea as Sb,eb as $b,ed as wd,ee as bw,ef as _w,ei as Tr,f as Vo,fa as Om,fb as zb,fd as Ro,fg as jw,g as Ns,ga as bb,gc as $m,gd as iw,ge as kd,gg as Gw,gi as Hk,h as tb,ha as wb,hb as Ub,hd as wt,hf as Aw,hg as Rd,hi as Wk,i as rb,ia as Cb,ib as jb,id as Mt,ie as vd,if as Bd,ig as Kw,ii as $k,j as ab,jb as Lm,jd as Gm,jf as Fw,jg as Dd,k as nb,kb as Gb,kd as br,kf as ex,kg as tx,la as kb,lb as Kb,ld as ar,lf as Bw,ma as vb,mb as Rm,md as dw,mf as Lw,na as Pb,nb as sn,nf as Ld,ng as qw,o as sb,od as Be,of as un,og as Vw,pa as Tb,pb as oa,pd as ta,pf as xn,pi as CP,qb as Dm,qd as zs,qf as wr,qi as kP,ra as Ob,rb as Nm,rd as ln,rg as Yw,rh as fx,ri as kf,s as lb,sa as xd,sb as Mm,sd as fw,sg as Xw,sh as Ud,si as vP,ta as Eb,tb as qb,td as Km,th as GC,ti as Ox,u as Me,ua as hd,ub as Vb,ud as dn,uf as Rw,uh as cx,ui as PP,v as ib,vb as Yb,vc as zm,vd as qm,vg as Jw,vh as KC,w as dd,wb as Hm,wi as TP,x as db,xb as Xb,xc as aw,xh as jd,xi as OP,ya as Ws,yb as tr,yh as qC,yi as EP,z as Te,za as nn,zb as Jb,zd as cw,zh as Ys}from"./chunk-Y3CRPIPD.js";import{a as z,b as eo}from"./chunk-GAND7LXQ.js";import{c as IP,d as gP,e as Sf}from"./chunk-RNSKQVLG.js";import{jsx as qx,Fragment as g6,jsxs as y6}from"react/jsx-runtime";import{createContext as S6,useContext as b6}from"react";var w6={mirrorHostStyles:!0,css:null,fontHrefs:[]},o0=S6(w6);function ise({value:e,children:o}){return qx(o0.Provider,{value:e,children:o})}function xl(){return b6(o0)}function t0(){let{css:e,fontHrefs:o}=xl();return y6(g6,{children:[o.map(t=>qx("link",{rel:"stylesheet",href:t},t)),e?qx("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as C6}from"react/jsx-runtime";import{createContext as k6,useContext as v6}from"react";var r0=k6(void 0);function pse({metadata:e,children:o}){return C6(r0.Provider,{value:e,children:o})}var a0=()=>v6(r0);import{jsx as uo,Fragment as n6,jsxs as rd}from"react/jsx-runtime";import{useCallback as As,useEffect as Jt,useRef as Lne,useState as o6}from"react";import{SettingsSwitch as Rne}from"efficient-easel/panel";import{PagesIcon as Dne,StylesIcon as Nne}from"efficient-easel/rail";import{PaletteIcon as Mne}from"efficient-shell/icons/efficient";import{Subtree as Hne,TreeRow as s6}from"efficient-easel/tree";import{useEasel as l6}from"efficient-easel/easel";import{toItemSelector as Wne}from"efficient-easel/node-ops";import{useEaselStrings as i6}from"efficient-easel/strings";import{createContext as P6,useContext as T6}from"react";var Vx=P6(!1),xse=()=>T6(Vx);import{useMemo as O6,useRef as E6}from"react";import{useEaselApi as _6}from"efficient-easel/easel";import{useSectionOps as A6}from"efficient-easel/screen/lib/document/use-section-ops";function $f(){let e=_6(),o=A6(),t=E6(o);return t.current=o,O6(()=>({getItemById:r=>e.getState().getItemById(r),getSelectorForId:r=>e.getState().getSelectorForId(r),get components(){return e.getState().config.components},replace:(r,a,n)=>t.current.replaceComponent(r,a,n)}),[e])}import{encodePartId as Z6}from"efficient-easel/draw";import{insertAt as Q6,moveTo as e3,removeAt as o3}from"efficient-easel/fields";import{useSyncExternalStore as G6}from"react";import{isNodeList as n0}from"efficient-easel/data";var s0="Flex";function Dn(e,o){return Wt(e)?typeof e?.[Vo]=="string"?Yx(o?.[Vo]):"":Yx(e?.[Vo])}var Yx=e=>typeof e=="string"?e.trim():"",F6=e=>e.type===io&&Array.isArray(e.props?.[Jm])&&e.props[Jm].some(o=>Yx(o?.[Vo])!==""),B6=new Intl.NumberFormat("en-US");function L6(e){return/^\d+$/.test(e)?B6.format(Number(e)):e}function vse(e,o){let t=o?o.find(r=>r.key===e)?.value:lb(Ns).find(r=>r.key===e)?.value;return t===void 0?null:L6(t)}var R6={[Vo]:"any"};function Xx(e,o=!1){let t=e.props;if(!t)return{node:e,names:!1};let r=e.type==="Text"&&(Dn(t)!==""||o&&Dn(t,R6)!==""),a=o||F6(e),n=Xe(e,l=>ze(l,i=>{let d=Xx(i,a);return d.names&&(r=!0),d.node})).props;if(e.type!==s0)return{node:n===t?e:{...e,props:n},names:r};let s=Me(n);if(r&&!s&&(n={...n,[lo]:Ns}),!r&&s===Ns){let{[lo]:l,...i}=n;n=i}return{node:n===t?e:{...e,props:n},names:!1}}function l0(e,o,t){for(let r of e){if(r?.props?.id===o)return t;for(let a of rn(r??{})){let n=l0(a,o,r.type===s0?r:t);if(n!==void 0)return n}}}function Pse(e,o){if(!n0(e))return!0;let t=l0(e,o,null);if(t===void 0)return!0;if(t===null)return!1;let r=Me(t.props);return!r||r===Ns}function i0(e){let o=e?.content;if(!n0(o))return e;let t=o.map(r=>Xx(r));return t.every((r,a)=>r.node===o[a])?e:{...e,content:t.map(r=>r.node)}}function d0(e){return Xx(e).node}import{decodePartId as K6}from"efficient-easel/draw";function Nn(e,o){let t=lv(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?DT(t,o.index):null:iv(e)?.[o.rowKey]??null}function zf(e,o,t){let r=e.node.props,{key:a,row:n}=Ut(e.propKey),s=n?fv(r,a,n,e.kind,o):sv(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}import{readHidable as p0}from"efficient-easel/draw";import{parseOption as D6}from"efficient-shell/format";var Jx=e=>String(e+1).padStart(2,"0"),N6=[{label:"01 \xB7",value:"two-digit"},{label:"1.",value:"plain"}],Zx="two-digit",f0=e=>D6(N6,Zx,e),Uf=(e,o)=>e==="plain"?`${o+1}.`:Jx(o);var oh="Contents",Qx="Flex",c0="Text",M6="numberForm",H6="_contentsEntries",W6="_kickerNumber",u0="data-sf-kicker-number",$6=e=>p0(e).text.trim(),m0=e=>fa(e?.anchor),eh=e=>String(e.props?.id??""),z6=e=>!p0(e.props?.text).hidden&&!Dn(e.props)&&!Wt(e.props),hl=e=>rn(e);function x0(e){for(let o of hl(e))for(let t of o){if(lr(t.props??{}))continue;if(t.type===c0&&z6(t))return t;if(t.type===c0)continue;let r=x0(t);if(r)return r}}function h0(e){return hl(e).some(o=>o.some(t=>t&&!lr(t.props??{})&&(t.type===oh||h0(t))))}var I0=e=>e.type===Qx&&On(Qx,e.props?.direction)==="row";function g0(e){return hl(e).some(o=>o.some(t=>t&&!lr(t.props??{})&&(t.type===oh||!I0(t)&&g0(t))))}function U6(e){let o=[],t=(r,a)=>{for(let n of r){if(!n||lr(n.props??{}))continue;if(n.type===oh){a.open={contents:n,sections:a.waiting??[]},a.waiting=null,o.push(a.open);continue}if(I0(n)&&g0(n)){let l={inRow:!0,open:null,waiting:[]};for(let i of hl(n))t(i,l);a.inRow||(a.open=null);continue}let s=a.open?.sections??a.waiting;if(n.type===Qx&&m0(n.props)&&s&&!h0(n)){s.push({box:n,kicker:x0(n)});continue}for(let l of hl(n))t(l,a)}};return t(e,{inRow:!1,open:null,waiting:null}),o}function j6(e){return e.map(o=>({label:o.kicker?nn($6(o.kicker.props?.text)):"",anchor:m0(o.box.props)}))}function th(e){let o=e?.length?U6(e):[];if(!o.length)return null;let t=new Map,r=new Map;for(let a of o){let n=eh(a.contents);n&&t.set(n,j6(a.sections));let s=f0(a.contents.props?.[M6]);a.sections.forEach((l,i)=>{let d=l.kicker?eh(l.kicker):"";d&&r.set(d,Uf(s,i))})}return{entries:t,numbers:r}}var Gse=e=>e.endsWith(".")?`${e} `:`${e} \xB7 `;function y0(e){let o=e;if(!o?.content?.length)return e;let t=th(o.content);if(!t)return e;let{entries:r,numbers:a}=t,n=s=>{let l=Xe(s,h=>ze(h,n)),i=l.props??{},d=l!==s,f=eh(s),m=f?r.get(f):void 0;m&&(i={...i,[H6]:m},d=!0);let u=f?a.get(f):void 0;return u&&(i={...i,[W6]:u},d=!0),d?{...s,props:i}:s};return{...o,content:o.content.map(n)}}var q6=`[${u0}]`,V6=["bold","italic","underline","strike","link","sup","sub"],Y6=["bullet","number"];function nh(e,o){return e?[...V6,...o?Y6:[]]:[]}function S0(e,o){let t=K6(e);if(!t?.propKey)return null;let{nodeId:r,propKey:a}=t,n=o.getItemById(r),s=o.getSelectorForId(r);if(!n||!s)return null;let{key:l,row:i}=Ut(a),d=o.components[n.type]?.fields?.[l],f=i?Nn(d,i):d,m=pf(f);if(!m)return null;let u=n.props??{};if(gT(u)!==null||!i&&Fd(n.type,u,l)||n.type==="Text"&&l==="text"&&Dn(u)||i&&!(Array.isArray(u[l])&&i.index<u[l].length))return null;let h=i?mf(u[l],i):u[l];return{node:n,selector:s,propKey:a,kind:m,stored:h,offPage:Lf(f),panelOnly:av(f)}}function jf(e,o){let t=S0(e,o);if(!t)return null;let{text:r,hidden:a}=pa(t.stored);if(!Sv({offPage:t.offPage,hidden:!!a,panelOnly:t.panelOnly}))return null;let n=uf(t.kind);return{partId:e,value:r,rules:xd,multiline:n,skip:q6,offered:nh(t.kind!=="plainText",n),write:s=>{let l=S0(e,o);l&&zf({node:l.node,propKey:l.propKey,kind:l.kind,zone:l.selector.zone,index:l.selector.index},s,o.replace)}}}function sh(e,o,t){return e?.isConnected&&e.getAttribute(Ue)===t?e:o?.querySelector(`[${Ue}="${Gf(t)}"]`)??null}function Gf(e){return e.replace(/["\\]/g,"\\$&")}function b0(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var rh=null,ah=new Set;function X6(){return rh}function lh(e){if(e!==rh){rh=e;for(let o of ah)o()}}function J6(e){return ah.add(e),()=>{ah.delete(e)}}function w0(){return G6(J6,X6,()=>null)}function C0(e,o){if(e.outer)return null;let t=o.getItemById(e.ownerId);if(!t)return null;let r=kw(t.type);return!r||Me(t.props)?null:{node:t,rows:r}}function t3(e,o){let t=C0(e,o),r=o.getItemById(e.nodeId);if(!t||!r)return null;let a=_w(r.type,r.props,e.key);if(!a)return null;let n=t.node.props[t.rows];return!Array.isArray(n)||e.index<0||e.index>=n.length?null:Z6(e.ownerId,vn(t.rows,{index:e.index,rowKey:a}))}function Kf(e,o){let t=t3(e,o);return t?jf(t,o):null}function k0(e,o){return Kf(e,o)?.value}function v0(e,o){let t=Kf(e,o);return t?(t.write(e.text),!0):!1}function P0(e,o){let t=C0(e,o),r=t&&o.getSelectorForId(e.ownerId);if(!t||!r)return!1;let a=t.node.props,n=a[t.rows],s=e.index;if(!Array.isArray(n)||s<0||s>=n.length)return!1;let l;switch(e.action){case"addAfter":{let i=o.components[t.node.type]?.fields?.[t.rows];l=Q6(n,s+1,{...i?.defaultItemProps??{}});break}case"moveEarlier":case"moveLater":{let i=e.action==="moveEarlier"?s-1:s+1;if(i<0||i>=n.length)return!1;l=e3(n,s,i);break}case"delete":l=o3(n,s);break;default:return!1}return o.replace(r.zone,r.index,{...t.node,props:{...a,[t.rows]:l}}),!0}import{jsx as Pe,Fragment as VZ,jsxs as Wu}from"react/jsx-runtime";import{Fragment as YZ,useEffect as kH,useMemo as vH,useRef as XZ,useState as Ua}from"react";import{useScreenDocument as _H}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Wy}from"efficient-easel/draw/client";import JZ from"efficient-easel/screen/components/SidePanelHead";import{InspectorIconButton as ZZ}from"efficient-easel/chrome";import{Input as QZ,LoadingSpinner as eQ,PopupMenu as oQ,PopupMenuItem as PH,toast as TH}from"efficient-shell/ui";import{LayersTree as tQ,TreeGroupLabel as rQ,TreeRow as OH,TreeRowAction as $u}from"efficient-easel/tree";import{AddIcon as aQ,DuplicateIcon as nQ,PageIcon as sQ,SettingsIcon as lQ}from"efficient-easel/icons";import{PagesIcon as iQ}from"efficient-easel/rail";import{useEaselHost as dQ}from"efficient-easel/screen/lib/host";import{useEaselSession as $y}from"efficient-easel/screen/lib/session-context";import{useCallback as qf,useEffect as r3,useSyncExternalStore as a3}from"react";import{useScreenDocument as _0}from"efficient-easel/screen/components/ScreenDocumentContext";var T0=new WeakMap;function Il(e){let o=T0.get(e);return o||(o={rows:null,loading:null,listeners:new Set},T0.set(e,o)),o}function ih(e,o){e.rows=o;for(let t of e.listeners)t()}var Vf=new Set;function Yf(e,o){o?Vf.add(e):Vf.delete(e)}function O0(e){let o=Il(e),t=e.listPages().then(r=>ih(o,Vf.size?r.filter(a=>!Vf.has(a.id)):r),()=>ih(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var E0=()=>null,n3=()=>()=>{};function gl(){let{adapter:e,ready:o}=_0(),t=qf(l=>{let{listeners:i}=Il(e);return i.add(l),()=>i.delete(l)},[e]),r=qf(()=>Il(e).rows,[e]),a=a3(o?t:n3,o?r:E0,E0);r3(()=>{if(!o)return;let l=Il(e);l.rows===null&&!l.loading&&O0(e)},[e,o]);let n=qf(()=>o?O0(e):Promise.resolve(),[e,o]),s=qf(l=>ih(Il(e),l),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function s3(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function A0(){let{currentSlug:e}=_0(),{rows:o}=gl();return s3(o,e)}import{canDuplicatePage as fQ,DuplicatePageDialog as cQ}from"efficient-easel/page-copy";import{jsx as Oo,jsxs as hH}from"react/jsx-runtime";import{useEffect as AZ,useId as FZ,useMemo as BZ,useRef as LZ,useState as Ny}from"react";import{useScreenDocument as RZ}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as DZ}from"efficient-easel/screen/lib/session-context";import{uniqueSlug as IH}from"efficient-easel/page-copy";import{AddIcon as NZ}from"efficient-easel/icons";import{Button as MZ,Dialog as HZ,EmptyState as WZ,LoadingSpinner as $Z,Paragraph as zZ,SidebarLayout as UZ,SidebarNavItem as My,Title as jZ,toast as gH}from"efficient-shell/ui";import{jsx as Ot,jsxs as BR}from"react/jsx-runtime";import{useEffect as _q,useState as Ag}from"react";import{CanvasFrame as Aq}from"efficient-easel/easel";import{Button as Fq,Card as Bq,FitFrame as Lq,Text as Rq}from"efficient-shell/ui";import{jsx as D0,Fragment as g3,jsxs as y3}from"react/jsx-runtime";import{useEffect as N0,useLayoutEffect as S3}from"react";var Xf="data-theme",F0="light";function l3(e){return e.getAttribute(Xf)===F0?"light":"dark"}function i3(e,o){return l3(e)===o?!1:(o==="light"?e.setAttribute(Xf,F0):e.removeAttribute(Xf),!0)}function d3(e){return Kx(e).getItem(ox)}function Sle(e,o){Kx(e).setItem(ox,o)}function f3(e,o,t=new Date().getHours()){return Dw({mode:o.mode,override:d3(e),switchShown:o.switchShown,hour:t})}function B0(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>i3(t,f3(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[Xf]}),()=>n.disconnect()}var c3="style";function p3(e,o){let t=Dd(o),r=!1;for(let a of Kw){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function L0(e,o){let t=e.body;if(!t)return()=>{};let r=()=>p3(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[c3]}),()=>n.disconnect()}import{VIEW_DESKTOP_MIN as u3,VIEW_TABLET_MIN as m3}from"efficient-easel/screen/lib/content/view-tiers";var cr={fit:"data-fit",fitTablet:"data-fit-tablet",fitPhone:"data-fit-phone",min:"data-fit-min",minTablet:"data-fit-min-tablet",minPhone:"data-fit-min-phone",edge:"data-fit-edge"},Jo=cr,x3=e=>e.flatMap(o=>[`[${o}] p`,`[${o}] li`]).join(","),h3=String.raw`(function (doc) {
1
+ import{$ as lf,D as Bk,E as Lk,F as tf,G as Rk,H as zk,I as Or,J as Uk,K as jk,L as Gk,M as nt,N as rf,O as ko,P as fe,R as af,S as Er,T as nf,X as Kk,Y as sf,Z as _r,_ as qk,a as Xo,b as Xs,ba as aP,c as Kd,d as Sn,e as Js,f as ik,fa as xP,g as bn,h as qd,ha as hP,ia as Mf,ja as UT,ka as jT,r as al,t as Fk}from"./chunk-75GXE5JB.js";import{a as bP,d as bf,e as st,f as wf,g as Cf,h as Tf,l as Kx}from"./chunk-62AOYUOH.js";import{$ as ix,$a as Xd,$c as wv,$d as fa,$e as vf,$f as Of,$j as Ln,A as kC,Aa as YC,Ab as Qd,Ac as sv,Ad as Hv,Ae as dP,Ag as oT,Aj as _n,B as vC,Ba as XC,Bb as ef,Bc as lv,Bd as Wv,Be as fP,Bf as WP,Bg as tT,Bj as TT,C as PC,Ca as JC,Cb as Ok,Cc as iv,Cd as $v,Ce as cP,Cg as rT,D as rt,Da as px,Db as ho,Dc as mf,Dd as zv,De as pP,Dg as Bx,Dk as ml,E as TC,Ea as ZC,Eb as hx,Ec as dv,Ed as Cx,Ee as yf,Eg as aT,Ej as Hx,Ek as Nf,F as OC,Fa as QC,Fb as tl,Fc as fv,Fd as Uv,Fe as uP,Fg as Lx,Fj as pl,Fk as Ux,G as EC,Ga as ek,Gb as zt,Gc as cv,Gd as jv,Ge as mP,Gg as dr,Gk as HT,H as _C,Ha as ok,Hb as Cn,Hc as pv,Hd as Gv,Hg as Rx,Hk as ua,I as AC,Ia as tk,Ib as rl,Ic as jt,Id as Kv,Ie as kt,Ig as _f,Ij as An,Ik as WT,J as FC,Ja as rk,Jc as Ue,Jd as qv,Jg as nT,Jk as $T,K as BC,Ka as vr,Kc as Ar,Kd as kx,Ke as je,Kf as $P,Kg as sT,Kj as OT,Kk as zT,La as ak,Lb as Ix,Lc as Sx,Ld as Vv,Le as vt,Lf as zP,Lg as lT,M as LC,Mb as na,Mc as uv,Md as vx,Me as Oe,Mf as UP,Mg as iT,Mk as GT,N as RC,Na as nk,Nb as of,Nc as mv,Nd as Yv,Ne as yP,Nf as jP,Ng as dT,Nk as jx,O as DC,Oa as Vd,Ob as Ek,Oc as xv,Od as Xv,Of as Ax,P as Wd,Pa as Zs,Pb as _k,Pc as xf,Pd as Jv,Pf as GP,Pk as KT,Q as NC,Qa as Yd,Qb as Ak,Qc as sl,Qd as Gt,Qf as KP,Qg as fT,Qk as qT,R as MC,Ra as dk,Rb as df,Rc as hv,Rd as Zv,Re as Px,Rf as Fx,Rg as cT,Rk as VT,Sb as Xk,Sc as Iv,Sd as da,Sj as ET,Sk as YT,Tb as ff,Tc as gv,Tj as Wx,Tk as XT,Ub as yx,Uc as hf,Ud as Qv,Ue as fl,Uj as _T,Uk as JT,Va as fk,Vb as cf,Vc as yv,Vd as Tn,Vf as ir,Vi as pa,Vj as AT,W as lx,Wa as ck,Wc as Sv,Xa as Qs,Xc as bx,Xd as lr,Xf as On,Xi as fr,Xj as Df,Y as Vs,Yc as bv,Yd as eP,Ye as SP,Yj as Fn,Z as $d,Za as wn,Zc as Pn,Zd as dl,Ze as Tx,Zf as qP,Zh as gT,Zj as Bn,_ as Ao,_a as pk,_b as kn,_d as oP,_e as wP,_f as VP,_g as Af,_h as yT,_j as ul,a as _o,aa as In,ab as uk,ad as Cv,ae as tP,ag as Lr,ak as FT,b as mn,ba as HC,bb as el,bc as Jk,bd as kv,bf as _P,bg as Ef,ca as WC,cb as mk,cc as Zk,cd as vv,ce as If,cj as Lf,d as sC,da as $C,db as xk,dc as Qk,dd as Pv,de as Br,dg as En,e as rx,ea as zC,eb as hk,ec as nl,ed as sa,ee as rP,ef as Ex,eh as pT,ej as wT,f as lC,fa as UC,fb as Ik,fd as Tv,g as c,ga as dx,gb as mx,gd as wx,gh as uT,h as $t,hb as gk,hd as Ov,hk as BT,i as hn,ia as jC,ib as ol,id as Ev,ii as ST,ik as LT,j as Ks,ja as zd,jb as yk,jd as _v,jf as AP,ji as bT,jl as Gx,k as No,kb as xx,kd as Av,kf as FP,l as qs,ld as Fv,lf as Pf,mb as Sk,md as Fr,me as nP,mf as BP,mg as Rr,n as xC,nb as bk,nd as ll,nf as LP,ng as YP,o as hC,od as la,og as XP,p as IC,pb as Jd,pc as vn,pd as Bv,pe as sP,pg as JP,pk as $x,q as gC,qb as wk,qc as Ut,qe as lP,qh as Dx,qj as CT,r as yC,rb as Ck,rc as ev,rd as ia,re as iP,rh as Ff,rk as RT,rl as ZT,s as SC,sb as kk,sc as ov,sd as il,sh as ca,sk as DT,sl as QT,t as bC,tb as vk,tc as tv,td as Lv,th as Bf,tj as kT,tk as NT,tl as Hf,u as wC,ub as Zd,uc as rv,ud as Rv,uf as RP,ug as ZP,uj as Rf,ul as e0,v as Hd,vb as Pk,vc as av,vf as _x,vh as mT,vj as Nx,vk as MT,w as kr,wc as pf,wd as Dv,we as Mo,wf as DP,wh as xT,wj as vT,wl as Rn,xc as uf,xd as Nv,xe as ao,xf as NP,xh as hT,xj as PT,xk as zx,xl as Wf,y as sx,yb as Tk,yc as nv,yd as Mv,yf as MP,yg as QP,yh as IT,yj as Mx,z as CC,za as VC,zb as Pr,ze as gf,zf as HP,zg as eT}from"./chunk-ESXERZQ3.js";import{a as uC,b as Md,c as mC,g as Vk,h as gx,i as Yk}from"./chunk-XMX3KEE4.js";import{$ as Ib,$a as Mb,$c as R,$e as Zm,$g as cC,A as io,Ab as Zb,Ad as pw,B as tn,Be as Xm,Bf as ox,Ca as ye,Cb as $s,Cd as Vm,Ce as ww,Ci as vo,D as Ms,Db as Qb,E as fd,Ed as uw,Ee as Jm,F as Nt,Fd as Cd,G as rn,Ga as ot,Gg as Zw,Gi as cl,H as ze,Ha as bt,Hb as Sd,Hd as tt,Hg as Qw,I as Xe,Ia as Em,Ic as nw,Id as Do,Ie as Pd,If as Dw,Ig as eC,J as an,Ja as _m,Jd as ro,Je as Td,Jg as oC,K as cd,Kc as Um,Kd as Ht,Ke as Cw,Kh as ux,L as fb,La as Am,Ld as nr,Le as Od,Lf as sr,Lh as gn,M as cb,Ma as Fm,Mb as ew,Md as Ct,Me as Ed,Mg as tC,Mh as sk,Nd as fn,Ne as kw,Nh as at,O as pb,Od as mw,Oe as vw,Oh as Yo,P as pd,Pd as cn,Pe as _d,Pg as rC,Ph as Gd,Q as ub,Qa as Bm,Qd as xw,Qe as Ad,Qg as aC,Qh as lk,R as ea,Ra as _b,Rb as bd,Rc as sw,Re as aa,Rf as Nw,Rh as yn,S as mb,Sa as Ab,Se as Pw,Sg as nC,T as xb,Ta as Ke,U as Hs,Ua as Fb,Ub as ow,Ud as ra,Ug as iC,Uh as Dk,V as Tm,Va as Id,Vb as tw,Vd as hw,Vg as dC,W as Ce,Wa as Bb,Wd as Iw,We as Tw,X as q,Xa as Lb,Xb as rw,Xd as pn,Xf as Mw,Xg as Cr,Y as hb,Ya as Rb,Yc as U,Yd as Us,Yf as Hw,Yh as Nk,Za as Db,Zb as Wm,Zc as oe,Zd as js,Ze as Wt,Zf as Ww,Zg as fC,_ as ud,_a as Nb,_c as jm,_d as Ym,_e as Gs,_f as $w,_g as ax,a as on,ab as Hb,ad as Co,ae as gw,af as Qm,ah as nx,b as xo,ba as gb,bb as Wb,bd as rr,be as yw,bf as Ow,bh as Nd,c as lo,ca as md,cb as gd,cd as lw,ce as Sw,cf as Ew,cg as zw,d as or,da as yb,db as yd,dd as H,df as Fd,dg as Uw,dh as pC,di as Mk,ea as Sb,eb as $b,ed as wd,ee as bw,ef as _w,ei as Tr,f as Vo,fa as Om,fb as zb,fd as Ro,fg as jw,g as Ns,ga as bb,gc as $m,gd as iw,ge as kd,gg as Gw,gi as Hk,h as tb,ha as wb,hb as Ub,hd as wt,hf as Aw,hg as Rd,hi as Wk,i as rb,ia as Cb,ib as jb,id as Mt,ie as vd,if as Bd,ig as Kw,ii as $k,j as ab,jb as Lm,jd as Gm,jf as Fw,jg as Dd,k as nb,kb as Gb,kd as br,kf as ex,kg as tx,la as kb,lb as Kb,ld as ar,lf as Bw,ma as vb,mb as Rm,md as dw,mf as Lw,na as Pb,nb as sn,nf as Ld,ng as qw,o as sb,od as Be,of as un,og as Vw,pa as Tb,pb as oa,pd as ta,pf as xn,pi as CP,qb as Dm,qd as zs,qf as wr,qi as kP,ra as Ob,rb as Nm,rd as ln,rg as Yw,rh as fx,ri as kf,s as lb,sa as xd,sb as Mm,sd as fw,sg as Xw,sh as Ud,si as vP,ta as Eb,tb as qb,td as Km,th as GC,ti as Ox,u as Me,ua as hd,ub as Vb,ud as dn,uf as Rw,uh as cx,ui as PP,v as ib,vb as Yb,vc as zm,vd as qm,vg as Jw,vh as KC,w as dd,wb as Hm,wi as TP,x as db,xb as Xb,xc as aw,xh as jd,xi as OP,ya as Ws,yb as tr,yh as qC,yi as EP,z as Te,za as nn,zb as Jb,zd as cw,zh as Ys}from"./chunk-Y3CRPIPD.js";import{a as z,b as eo}from"./chunk-GAND7LXQ.js";import{c as IP,d as gP,e as Sf}from"./chunk-RNSKQVLG.js";import{jsx as qx,Fragment as g6,jsxs as y6}from"react/jsx-runtime";import{createContext as S6,useContext as b6}from"react";var w6={mirrorHostStyles:!0,css:null,fontHrefs:[]},o0=S6(w6);function ise({value:e,children:o}){return qx(o0.Provider,{value:e,children:o})}function xl(){return b6(o0)}function t0(){let{css:e,fontHrefs:o}=xl();return y6(g6,{children:[o.map(t=>qx("link",{rel:"stylesheet",href:t},t)),e?qx("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as C6}from"react/jsx-runtime";import{createContext as k6,useContext as v6}from"react";var r0=k6(void 0);function pse({metadata:e,children:o}){return C6(r0.Provider,{value:e,children:o})}var a0=()=>v6(r0);import{jsx as uo,Fragment as n6,jsxs as rd}from"react/jsx-runtime";import{useCallback as As,useEffect as Jt,useRef as Lne,useState as o6}from"react";import{SettingsSwitch as Rne}from"efficient-easel/panel";import{PagesIcon as Dne,StylesIcon as Nne}from"efficient-easel/rail";import{PaletteIcon as Mne}from"efficient-shell/icons/efficient";import{Subtree as Hne,TreeRow as s6}from"efficient-easel/tree";import{useEasel as l6}from"efficient-easel/easel";import{toItemSelector as Wne}from"efficient-easel/node-ops";import{useEaselStrings as i6}from"efficient-easel/strings";import{createContext as P6,useContext as T6}from"react";var Vx=P6(!1),xse=()=>T6(Vx);import{useMemo as O6,useRef as E6}from"react";import{useEaselApi as _6}from"efficient-easel/easel";import{useSectionOps as A6}from"efficient-easel/screen/lib/document/use-section-ops";function $f(){let e=_6(),o=A6(),t=E6(o);return t.current=o,O6(()=>({getItemById:r=>e.getState().getItemById(r),getSelectorForId:r=>e.getState().getSelectorForId(r),get components(){return e.getState().config.components},replace:(r,a,n)=>t.current.replaceComponent(r,a,n)}),[e])}import{encodePartId as Z6}from"efficient-easel/draw";import{insertAt as Q6,moveTo as e3,removeAt as o3}from"efficient-easel/fields";import{useSyncExternalStore as G6}from"react";import{isNodeList as n0}from"efficient-easel/data";var s0="Flex";function Dn(e,o){return Wt(e)?typeof e?.[Vo]=="string"?Yx(o?.[Vo]):"":Yx(e?.[Vo])}var Yx=e=>typeof e=="string"?e.trim():"",F6=e=>e.type===io&&Array.isArray(e.props?.[Jm])&&e.props[Jm].some(o=>Yx(o?.[Vo])!==""),B6=new Intl.NumberFormat("en-US");function L6(e){return/^\d+$/.test(e)?B6.format(Number(e)):e}function vse(e,o){let t=o?o.find(r=>r.key===e)?.value:lb(Ns).find(r=>r.key===e)?.value;return t===void 0?null:L6(t)}var R6={[Vo]:"any"};function Xx(e,o=!1){let t=e.props;if(!t)return{node:e,names:!1};let r=e.type==="Text"&&(Dn(t)!==""||o&&Dn(t,R6)!==""),a=o||F6(e),n=Xe(e,l=>ze(l,i=>{let d=Xx(i,a);return d.names&&(r=!0),d.node})).props;if(e.type!==s0)return{node:n===t?e:{...e,props:n},names:r};let s=Me(n);if(r&&!s&&(n={...n,[lo]:Ns}),!r&&s===Ns){let{[lo]:l,...i}=n;n=i}return{node:n===t?e:{...e,props:n},names:!1}}function l0(e,o,t){for(let r of e){if(r?.props?.id===o)return t;for(let a of rn(r??{})){let n=l0(a,o,r.type===s0?r:t);if(n!==void 0)return n}}}function Pse(e,o){if(!n0(e))return!0;let t=l0(e,o,null);if(t===void 0)return!0;if(t===null)return!1;let r=Me(t.props);return!r||r===Ns}function i0(e){let o=e?.content;if(!n0(o))return e;let t=o.map(r=>Xx(r));return t.every((r,a)=>r.node===o[a])?e:{...e,content:t.map(r=>r.node)}}function d0(e){return Xx(e).node}import{decodePartId as K6}from"efficient-easel/draw";function Nn(e,o){let t=lv(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?DT(t,o.index):null:iv(e)?.[o.rowKey]??null}function zf(e,o,t){let r=e.node.props,{key:a,row:n}=Ut(e.propKey),s=n?fv(r,a,n,e.kind,o):sv(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}import{readHidable as p0}from"efficient-easel/draw";import{parseOption as D6}from"efficient-shell/format";var Jx=e=>String(e+1).padStart(2,"0"),N6=[{label:"01 \xB7",value:"two-digit"},{label:"1.",value:"plain"}],Zx="two-digit",f0=e=>D6(N6,Zx,e),Uf=(e,o)=>e==="plain"?`${o+1}.`:Jx(o);var oh="Contents",Qx="Flex",c0="Text",M6="numberForm",H6="_contentsEntries",W6="_kickerNumber",u0="data-sf-kicker-number",$6=e=>p0(e).text.trim(),m0=e=>fa(e?.anchor),eh=e=>String(e.props?.id??""),z6=e=>!p0(e.props?.text).hidden&&!Dn(e.props)&&!Wt(e.props),hl=e=>rn(e);function x0(e){for(let o of hl(e))for(let t of o){if(lr(t.props??{}))continue;if(t.type===c0&&z6(t))return t;if(t.type===c0)continue;let r=x0(t);if(r)return r}}function h0(e){return hl(e).some(o=>o.some(t=>t&&!lr(t.props??{})&&(t.type===oh||h0(t))))}var I0=e=>e.type===Qx&&On(Qx,e.props?.direction)==="row";function g0(e){return hl(e).some(o=>o.some(t=>t&&!lr(t.props??{})&&(t.type===oh||!I0(t)&&g0(t))))}function U6(e){let o=[],t=(r,a)=>{for(let n of r){if(!n||lr(n.props??{}))continue;if(n.type===oh){a.open={contents:n,sections:a.waiting??[]},a.waiting=null,o.push(a.open);continue}if(I0(n)&&g0(n)){let l={inRow:!0,open:null,waiting:[]};for(let i of hl(n))t(i,l);a.inRow||(a.open=null);continue}let s=a.open?.sections??a.waiting;if(n.type===Qx&&m0(n.props)&&s&&!h0(n)){s.push({box:n,kicker:x0(n)});continue}for(let l of hl(n))t(l,a)}};return t(e,{inRow:!1,open:null,waiting:null}),o}function j6(e){return e.map(o=>({label:o.kicker?nn($6(o.kicker.props?.text)):"",anchor:m0(o.box.props)}))}function th(e){let o=e?.length?U6(e):[];if(!o.length)return null;let t=new Map,r=new Map;for(let a of o){let n=eh(a.contents);n&&t.set(n,j6(a.sections));let s=f0(a.contents.props?.[M6]);a.sections.forEach((l,i)=>{let d=l.kicker?eh(l.kicker):"";d&&r.set(d,Uf(s,i))})}return{entries:t,numbers:r}}var Gse=e=>e.endsWith(".")?`${e} `:`${e} \xB7 `;function y0(e){let o=e;if(!o?.content?.length)return e;let t=th(o.content);if(!t)return e;let{entries:r,numbers:a}=t,n=s=>{let l=Xe(s,h=>ze(h,n)),i=l.props??{},d=l!==s,f=eh(s),m=f?r.get(f):void 0;m&&(i={...i,[H6]:m},d=!0);let u=f?a.get(f):void 0;return u&&(i={...i,[W6]:u},d=!0),d?{...s,props:i}:s};return{...o,content:o.content.map(n)}}var q6=`[${u0}]`,V6=["bold","italic","underline","strike","link","sup","sub"],Y6=["bullet","number"];function nh(e,o){return e?[...V6,...o?Y6:[]]:[]}function S0(e,o){let t=K6(e);if(!t?.propKey)return null;let{nodeId:r,propKey:a}=t,n=o.getItemById(r),s=o.getSelectorForId(r);if(!n||!s)return null;let{key:l,row:i}=Ut(a),d=o.components[n.type]?.fields?.[l],f=i?Nn(d,i):d,m=pf(f);if(!m)return null;let u=n.props??{};if(gT(u)!==null||!i&&Fd(n.type,u,l)||n.type==="Text"&&l==="text"&&Dn(u)||i&&!(Array.isArray(u[l])&&i.index<u[l].length))return null;let h=i?mf(u[l],i):u[l];return{node:n,selector:s,propKey:a,kind:m,stored:h,offPage:Lf(f),panelOnly:av(f)}}function jf(e,o){let t=S0(e,o);if(!t)return null;let{text:r,hidden:a}=pa(t.stored);if(!Sv({offPage:t.offPage,hidden:!!a,panelOnly:t.panelOnly}))return null;let n=uf(t.kind);return{partId:e,value:r,rules:xd,multiline:n,skip:q6,offered:nh(t.kind!=="plainText",n),write:s=>{let l=S0(e,o);l&&zf({node:l.node,propKey:l.propKey,kind:l.kind,zone:l.selector.zone,index:l.selector.index},s,o.replace)}}}function sh(e,o,t){return e?.isConnected&&e.getAttribute(Ue)===t?e:o?.querySelector(`[${Ue}="${Gf(t)}"]`)??null}function Gf(e){return e.replace(/["\\]/g,"\\$&")}function b0(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var rh=null,ah=new Set;function X6(){return rh}function lh(e){if(e!==rh){rh=e;for(let o of ah)o()}}function J6(e){return ah.add(e),()=>{ah.delete(e)}}function w0(){return G6(J6,X6,()=>null)}function C0(e,o){if(e.outer)return null;let t=o.getItemById(e.ownerId);if(!t)return null;let r=kw(t.type);return!r||Me(t.props)?null:{node:t,rows:r}}function t3(e,o){let t=C0(e,o),r=o.getItemById(e.nodeId);if(!t||!r)return null;let a=_w(r.type,r.props,e.key);if(!a)return null;let n=t.node.props[t.rows];return!Array.isArray(n)||e.index<0||e.index>=n.length?null:Z6(e.ownerId,vn(t.rows,{index:e.index,rowKey:a}))}function Kf(e,o){let t=t3(e,o);return t?jf(t,o):null}function k0(e,o){return Kf(e,o)?.value}function v0(e,o){let t=Kf(e,o);return t?(t.write(e.text),!0):!1}function P0(e,o){let t=C0(e,o),r=t&&o.getSelectorForId(e.ownerId);if(!t||!r)return!1;let a=t.node.props,n=a[t.rows],s=e.index;if(!Array.isArray(n)||s<0||s>=n.length)return!1;let l;switch(e.action){case"addAfter":{let i=o.components[t.node.type]?.fields?.[t.rows];l=Q6(n,s+1,{...i?.defaultItemProps??{}});break}case"moveEarlier":case"moveLater":{let i=e.action==="moveEarlier"?s-1:s+1;if(i<0||i>=n.length)return!1;l=e3(n,s,i);break}case"delete":l=o3(n,s);break;default:return!1}return o.replace(r.zone,r.index,{...t.node,props:{...a,[t.rows]:l}}),!0}import{jsx as Pe,Fragment as VZ,jsxs as Wu}from"react/jsx-runtime";import{Fragment as YZ,useEffect as kH,useMemo as vH,useRef as XZ,useState as Ua}from"react";import{useScreenDocument as _H}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Wy}from"efficient-easel/draw/client";import JZ from"efficient-easel/screen/components/SidePanelHead";import{InspectorIconButton as ZZ}from"efficient-easel/chrome";import{Input as QZ,LoadingSpinner as eQ,PopupMenu as oQ,PopupMenuItem as PH,toast as TH}from"efficient-shell/ui";import{LayersTree as tQ,TreeGroupLabel as rQ,TreeRow as OH,TreeRowAction as $u}from"efficient-easel/tree";import{AddIcon as aQ,DuplicateIcon as nQ,PageIcon as sQ,SettingsIcon as lQ}from"efficient-easel/icons";import{PagesIcon as iQ}from"efficient-easel/rail";import{useEaselHost as dQ}from"efficient-easel/screen/lib/host";import{useEaselSession as $y}from"efficient-easel/screen/lib/session-context";import{useCallback as qf,useEffect as r3,useSyncExternalStore as a3}from"react";import{useScreenDocument as _0}from"efficient-easel/screen/components/ScreenDocumentContext";var T0=new WeakMap;function Il(e){let o=T0.get(e);return o||(o={rows:null,loading:null,listeners:new Set},T0.set(e,o)),o}function ih(e,o){e.rows=o;for(let t of e.listeners)t()}var Vf=new Set;function Yf(e,o){o?Vf.add(e):Vf.delete(e)}function O0(e){let o=Il(e),t=e.listPages().then(r=>ih(o,Vf.size?r.filter(a=>!Vf.has(a.id)):r),()=>ih(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var E0=()=>null,n3=()=>()=>{};function gl(){let{adapter:e,ready:o}=_0(),t=qf(l=>{let{listeners:i}=Il(e);return i.add(l),()=>i.delete(l)},[e]),r=qf(()=>Il(e).rows,[e]),a=a3(o?t:n3,o?r:E0,E0);r3(()=>{if(!o)return;let l=Il(e);l.rows===null&&!l.loading&&O0(e)},[e,o]);let n=qf(()=>o?O0(e):Promise.resolve(),[e,o]),s=qf(l=>ih(Il(e),l),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function s3(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function A0(){let{currentSlug:e}=_0(),{rows:o}=gl();return s3(o,e)}import{canDuplicatePage as fQ,DuplicatePageDialog as cQ}from"efficient-easel/page-copy";import{jsx as Oo,jsxs as hH}from"react/jsx-runtime";import{useEffect as AZ,useId as FZ,useMemo as BZ,useRef as LZ,useState as Ny}from"react";import{useScreenDocument as RZ}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as DZ}from"efficient-easel/screen/lib/session-context";import{uniqueSlug as IH}from"efficient-easel/page-copy";import{AddIcon as NZ}from"efficient-easel/icons";import{Button as MZ,Dialog as HZ,EmptyState as WZ,LoadingSpinner as $Z,Paragraph as zZ,SidebarLayout as UZ,SidebarNavItem as My,Title as jZ,toast as gH}from"efficient-shell/ui";import{jsx as Ot,jsxs as BR}from"react/jsx-runtime";import{useEffect as _q,useState as Ag}from"react";import{CanvasFrame as Aq}from"efficient-easel/easel";import{Button as Fq,Card as Bq,FitFrame as Lq,Text as Rq}from"efficient-shell/ui";import{jsx as D0,Fragment as g3,jsxs as y3}from"react/jsx-runtime";import{useEffect as N0,useLayoutEffect as S3}from"react";var Xf="data-theme",F0="light";function l3(e){return e.getAttribute(Xf)===F0?"light":"dark"}function i3(e,o){return l3(e)===o?!1:(o==="light"?e.setAttribute(Xf,F0):e.removeAttribute(Xf),!0)}function d3(e){return Kx(e).getItem(ox)}function Sle(e,o){Kx(e).setItem(ox,o)}function f3(e,o,t=new Date().getHours()){return Dw({mode:o.mode,override:d3(e),switchShown:o.switchShown,hour:t})}function B0(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>i3(t,f3(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[Xf]}),()=>n.disconnect()}var c3="style";function p3(e,o){let t=Dd(o),r=!1;for(let a of Kw){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function L0(e,o){let t=e.body;if(!t)return()=>{};let r=()=>p3(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[c3]}),()=>n.disconnect()}import{VIEW_DESKTOP_MIN as u3,VIEW_TABLET_MIN as m3}from"efficient-easel/screen/lib/content/view-tiers";var cr={fit:"data-fit",fitTablet:"data-fit-tablet",fitPhone:"data-fit-phone",min:"data-fit-min",minTablet:"data-fit-min-tablet",minPhone:"data-fit-min-phone",edge:"data-fit-edge"},Jo=cr,x3=e=>e.flatMap(o=>[`[${o}] p`,`[${o}] li`]).join(","),h3=String.raw`(function (doc) {
2
2
  if (doc.__sfFitWords) return;
3
3
  var win = doc.defaultView;
4
4
  var SELECTOR = "h1,h2,h3,h4,h5,h6,[class*='font-heading'],[class*='font-display']";