efficient-storefront-blocks 0.125.4 → 0.125.5

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-KB7QEJAG.js → CustomHtmlCodeWindow-HSZVKXL4.js} +1 -1
  3. package/dist/chunks/{SiteEditorProvider-TYNFV3WZ.js → SiteEditorProvider-6X2YHTVA.js} +1 -1
  4. package/dist/chunks/{chunk-DHKJAYUG.js → chunk-B3U6XXDZ.js} +1 -1
  5. package/dist/chunks/{chunk-4M7WJPOZ.js → chunk-GATK7RJE.js} +6 -6
  6. package/dist/editor/lib/document/blocks/commerce/AccountBlock/fields.js +1 -1
  7. package/dist/editor/lib/document/blocks/commerce/CartBlock/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/commerce/CountrySwitchBlock/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/commerce/SearchBlock/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/commerce/ThemeSwitchBlock/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/service/ContactRouting/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/service/Form/fields.js +1 -1
  13. package/dist/editor/lib/storefront-editor-words.d.ts +1 -0
  14. package/dist/editor/lib/storefront-editor-words.js +1 -1
  15. package/dist/index.js +26 -26
  16. package/dist/render/components/AppointmentBooking.js +1 -1
  17. package/dist/render/components/CollectionCard.js +1 -1
  18. package/dist/render/components/Collections.js +1 -1
  19. package/dist/render/components/ContactRouting.d.ts +3 -1
  20. package/dist/render/components/ContactRouting.js +1 -1
  21. package/dist/render/components/Events.js +1 -1
  22. package/dist/render/components/FitmentTable.js +1 -1
  23. package/dist/render/components/FooterMenu.js +1 -1
  24. package/dist/render/components/FooterSection.js +1 -1
  25. package/dist/render/components/FormBlock.d.ts +9 -2
  26. package/dist/render/components/FormBlock.js +1 -1
  27. package/dist/render/components/GalleryGrid.js +3 -3
  28. package/dist/render/components/GalleryItem.js +1 -1
  29. package/dist/render/components/GalleryShowcase.js +1 -1
  30. package/dist/render/components/HeaderToolBlocks.d.ts +11 -5
  31. package/dist/render/components/HeaderToolBlocks.js +1 -1
  32. package/dist/render/components/HeaderTools.d.ts +1 -0
  33. package/dist/render/components/HeaderTools.js +1 -1
  34. package/dist/render/components/PhoneMenuAccount.d.ts +6 -0
  35. package/dist/render/components/PhoneMenuAccount.js +1 -0
  36. package/dist/render/components/PhoneSheet.js +1 -1
  37. package/dist/render/components/ProductGridSection.js +1 -1
  38. package/dist/render/components/ProductHeroPanel.js +1 -1
  39. package/dist/render/components/ReviewForm.js +1 -1
  40. package/dist/render/components/SectionBand.js +1 -1
  41. package/dist/render/components/SectionGroupBody.js +1 -1
  42. package/dist/render/components/SectionNotice.js +1 -1
  43. package/dist/render/components/ThanksCard.d.ts +9 -0
  44. package/dist/render/components/ThanksCard.js +1 -0
  45. package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
  46. package/dist/render/lib/content/thanks-slot.d.ts +12 -0
  47. package/dist/render/lib/content/thanks-slot.js +1 -0
  48. package/dist/render/lib/document/blocks/commerce/AccountBlock/render.js +1 -1
  49. package/dist/render/lib/document/blocks/commerce/CartBlock/render.js +1 -1
  50. package/dist/render/lib/document/blocks/commerce/CountrySwitchBlock/render.js +1 -1
  51. package/dist/render/lib/document/blocks/commerce/SearchBlock/render.js +1 -1
  52. package/dist/render/lib/document/blocks/commerce/ThemeSwitchBlock/render.js +1 -1
  53. package/dist/render/lib/document/blocks/service/ContactRouting/meta.d.ts +4 -0
  54. package/dist/render/lib/document/blocks/service/ContactRouting/meta.js +1 -1
  55. package/dist/render/lib/document/blocks/service/ContactRouting/render.js +1 -1
  56. package/dist/render/lib/document/blocks/service/Form/meta.d.ts +6 -0
  57. package/dist/render/lib/document/blocks/service/Form/meta.js +1 -1
  58. package/dist/render/lib/document/blocks/service/Form/render.js +1 -1
  59. package/dist/render/lib/document/card-templates.js +1 -1
  60. package/dist/routine-index.json +1 -1
  61. package/dist/value-index.json +1 -1
  62. package/dist/words.d.ts +1 -0
  63. package/dist/words.js +1 -1
  64. package/package.json +1 -1
  65. /package/dist/chunks/{chunk-DHKJAYUG.js.LEGAL.txt → chunk-B3U6XXDZ.js.LEGAL.txt} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.125.5 — 2026-11-23 — Header tools pick their phone place, an After sending slot, and the side space set once
4
+
5
+ **For hosts:** no peer change. The storefront re-vendors `src/` with
6
+ `node scripts/sync-storefront-blocks.mjs`, then runs `just check`.
7
+
8
+ - **Each header tool says where it stands on a phone**: the Search, Cart,
9
+ Account, Country and Theme blocks have an "On a phone" row (In the header /
10
+ In the menu), the builder's one shared field. Unset is today's place: Search,
11
+ Country and Theme in the menu, Cart and Account in the header. A Cart in the
12
+ menu is a row of the phone menu that opens the cart; an Account in the menu
13
+ puts Sign in in the phone menu, in the Menu block's button mode too.
14
+ - **An After sending slot**: the Contact Form and the Form block each take an
15
+ "After sending" card template slot, drawn once after a shopper sends the
16
+ form, under the form's own success message. It takes a Text, a Picture, a
17
+ Box and a Button. Not seeded: with no slot, or an emptied one, the sent
18
+ state is today's one message, byte for byte. A computer's "Show" row (Form /
19
+ After sending) lets the canvas draw the sent state while editing; a live page
20
+ never reads it.
21
+ - **The side space is set once on a switched site**: on a site that sets its
22
+ side space once, every blocks section that pads its column with the site
23
+ gutter draws the site's own phone side space, not its fixed 20 or 24 px
24
+ rung (efficient-web-builder `withSideOnce`). A site without the switch draws
25
+ what it drew. A guard runs the builder's `site-gutter-once` rule over the
26
+ blocks source, so a new section that types the gutter without the switch
27
+ fails CI.
28
+ - **Correction to 0.125.0, the collection crumb**: the crumb's label also
29
+ names that same collection (the first non-blank one the wheel is in), so
30
+ the words and the link always agree.
31
+
3
32
  ## 0.125.4 — 2026-11-23 — Take efficient-web-builder 74.7
4
33
 
5
34
  **For hosts:** the `efficient-web-builder` peer is now `^74.7.0`. A host moves
@@ -1,4 +1,4 @@
1
- "use client";import{b as ee,d as te,e as se}from"./chunk-ACYEMD5J.js";import{Kk as ie,Nk as ce,Pb as oe,Tk as de,de as ne,fe as I,g as i,he as ae,nl as me,ol as ue,pl as fe,tl as he,yh as le}from"./chunk-4M7WJPOZ.js";import{d as Z}from"./chunk-AEBQM5LZ.js";import{Kf as J,Sg as B,bg as Y,la as X,li as re,xb as K}from"./chunk-HKL2EKLO.js";import"./chunk-3DCSW3PN.js";import"./chunk-Y6SLVHK3.js";import{jsx as n,jsxs as v,Fragment as Be}from"react/jsx-runtime";import{Suspense as Ge,useContext as Ue,useEffect as Se,useMemo as _,useRef as Te,useState as S}from"react";import{AccordionHeading as H,Banner as We,Button as D,Card as Ve,Dialog as qe,DropdownMenu as Qe,Segmented as Xe,Text as w,buttonClasses as Ke,colorFill as Je,colorSwatchClasses as Ye,fitFrameStyle as Ze,fitScale as et}from"efficient-shell/ui";import{CodeEditor as tt}from"efficient-shell/code";import{ChevronDownIcon as st}from"efficient-shell/icons/efficient";import{AlignSeparateIcon as ot}from"efficient-easel/icons";import{ScreenDocumentContext as nt}from"efficient-easel/screen/components/ScreenDocumentContext";var pe=".my-part";function ge(e,t,o,s){let a=_e(e,t);if(a)return De(e,t,o,s,a);let r=Fe(e,t);return r?Re(e,t,o,s,r):A(e,t,ve(s))}function _e(e,t){let o=/<style\b[^>]*>/gi;for(let s=o.exec(e);s;s=o.exec(e)){let a=s.index+s[0].length,r=e.toLowerCase().indexOf("</style",a),c=r<0?e.length:r;if(t>=a&&t<=c)return{start:a,end:c,close:r};o.lastIndex=c}return null}function He(e){return e.replace(/\/\*[\s\S]*?(\*\/|$)/g,t=>" ".repeat(t.length))}function De(e,t,o,s,a){let r=He(e.slice(a.start,a.end)),c=t-a.start,u=r[c-1]===" "&&e.slice(a.start,a.end)[c-1]!==" ",d=0,m="";for(let g=0;g<c;g++){let x=r[g];x==="{"?(d++,m=x):x==="}"?(d=Math.max(0,d-1),m=x):(x===";"||x===":")&&(m=x)}let p=r.slice(r.lastIndexOf(":",c-1)+1,c).trim();if(s.kind==="value"&&d>0&&m===":"&&!u&&(p===""||o>t))return{from:t,to:o,insert:s.value,selectFrom:t,selectTo:t+s.value.length};if(s.kind!=="value"){let g=a.close<0?e.length:e.indexOf(">",a.close)+1;return A(e,g-1,s.kind==="class"?ve(s):s.code)}let f=-1;if(d>0)f=ye(r,c,d);else{let g=r.slice(c).search(/[{}]/);g>=0&&r[c+g]==="{"&&(f=ye(r,c+g+1,1))}let h=f<0?t:a.start+f,b=f<0?-1:Le(r,f),$=b<0?pe:Pe(r,b)||pe,k=we(e,b<0?h:a.start+b);return A(e,h,`${k}${$} { ${s.property}: ${s.value}; }`,!0)}function ye(e,t,o){for(let s=t;s<e.length;s++)if(e[s]==="{")o++;else if(e[s]==="}"&&--o===0)return s;return-1}function Le(e,t){let o=0;for(let s=t;s>=0;s--)if(e[s]==="}")o++;else if(e[s]==="{"&&--o===0)return s;return-1}function Pe(e,t){let o=Math.max(e.lastIndexOf("}",t-1),e.lastIndexOf(";",t-1),e.lastIndexOf("{",t-1))+1;return e.slice(o,t).replace(/\s+/g," ").trim()}function Fe(e,t){let o=e.lastIndexOf("<",t-1);if(o<0||e.lastIndexOf(">",t-1)>o||/[/!?]/.test(e[o+1]??""))return null;let s=e.indexOf(">",t);return s<0?null:{lt:o,gt:s}}function Re(e,t,o,s,a){if(s.kind==="block")return A(e,a.gt,s.code);let r=s.kind==="value"?"style":"class",c=e.slice(a.lt,a.gt),u=new RegExp(`\\s${r}\\s*=\\s*(["'])([\\s\\S]*?)\\1`,"i").exec(c);if(u){let p=a.lt+u.index+u[0].length-1-u[2].length,f=p+u[2].length;if(t>=p&&t<=f){let k=e.slice(p,t);if(s.kind==="value"&&(/:\s*$/.test(k)||o>t&&/:[^;]*$/.test(k)))return M(t,o,s.value);if(s.kind==="class"&&!(/\S$/.test(k)&&/^\S/.test(e.slice(t,f)))){let g=`${/\S$/.test(k)?" ":""}${s.className}${/^\S/.test(e.slice(t,f))?" ":""}`;return M(t,t,g)}}let h=u[2].trimEnd(),b=s.kind==="value"?`${h&&!h.endsWith(";")?";":""}${h?" ":""}${s.property}: ${s.value}`:`${h?" ":""}${s.className}`,$=p+h.length;return M($,$,b)}let d=e[a.gt-1]==="/"?a.gt-1:a.gt,m=s.kind==="value"?` style="${s.property}: ${s.value}"`:` class="${s.className}"`;return M(d,d,m)}function ve(e){return e.kind==="block"?e.code:e.kind==="class"?`<p class="${e.className}">Text</p>`:`<div style="${e.property}: ${e.value}">Text</div>`}function M(e,t,o){return{from:e,to:t,insert:o,selectFrom:e,selectTo:e+o.length}}function we(e,t){let o=e.lastIndexOf(`
1
+ "use client";import{b as ee,d as te,e as se}from"./chunk-ACYEMD5J.js";import{Lk as ie,Ok as ce,Pb as oe,Uk as de,de as ne,fe as I,g as i,he as ae,ol as me,pl as ue,ql as fe,ul as he,yh as le}from"./chunk-GATK7RJE.js";import{d as Z}from"./chunk-AEBQM5LZ.js";import{Kf as J,Sg as B,bg as Y,la as X,li as re,xb as K}from"./chunk-HKL2EKLO.js";import"./chunk-3DCSW3PN.js";import"./chunk-Y6SLVHK3.js";import{jsx as n,jsxs as v,Fragment as Be}from"react/jsx-runtime";import{Suspense as Ge,useContext as Ue,useEffect as Se,useMemo as _,useRef as Te,useState as S}from"react";import{AccordionHeading as H,Banner as We,Button as D,Card as Ve,Dialog as qe,DropdownMenu as Qe,Segmented as Xe,Text as w,buttonClasses as Ke,colorFill as Je,colorSwatchClasses as Ye,fitFrameStyle as Ze,fitScale as et}from"efficient-shell/ui";import{CodeEditor as tt}from"efficient-shell/code";import{ChevronDownIcon as st}from"efficient-shell/icons/efficient";import{AlignSeparateIcon as ot}from"efficient-easel/icons";import{ScreenDocumentContext as nt}from"efficient-easel/screen/components/ScreenDocumentContext";var pe=".my-part";function ge(e,t,o,s){let a=_e(e,t);if(a)return De(e,t,o,s,a);let r=Fe(e,t);return r?Re(e,t,o,s,r):A(e,t,ve(s))}function _e(e,t){let o=/<style\b[^>]*>/gi;for(let s=o.exec(e);s;s=o.exec(e)){let a=s.index+s[0].length,r=e.toLowerCase().indexOf("</style",a),c=r<0?e.length:r;if(t>=a&&t<=c)return{start:a,end:c,close:r};o.lastIndex=c}return null}function He(e){return e.replace(/\/\*[\s\S]*?(\*\/|$)/g,t=>" ".repeat(t.length))}function De(e,t,o,s,a){let r=He(e.slice(a.start,a.end)),c=t-a.start,u=r[c-1]===" "&&e.slice(a.start,a.end)[c-1]!==" ",d=0,m="";for(let g=0;g<c;g++){let x=r[g];x==="{"?(d++,m=x):x==="}"?(d=Math.max(0,d-1),m=x):(x===";"||x===":")&&(m=x)}let p=r.slice(r.lastIndexOf(":",c-1)+1,c).trim();if(s.kind==="value"&&d>0&&m===":"&&!u&&(p===""||o>t))return{from:t,to:o,insert:s.value,selectFrom:t,selectTo:t+s.value.length};if(s.kind!=="value"){let g=a.close<0?e.length:e.indexOf(">",a.close)+1;return A(e,g-1,s.kind==="class"?ve(s):s.code)}let f=-1;if(d>0)f=ye(r,c,d);else{let g=r.slice(c).search(/[{}]/);g>=0&&r[c+g]==="{"&&(f=ye(r,c+g+1,1))}let h=f<0?t:a.start+f,b=f<0?-1:Le(r,f),$=b<0?pe:Pe(r,b)||pe,k=we(e,b<0?h:a.start+b);return A(e,h,`${k}${$} { ${s.property}: ${s.value}; }`,!0)}function ye(e,t,o){for(let s=t;s<e.length;s++)if(e[s]==="{")o++;else if(e[s]==="}"&&--o===0)return s;return-1}function Le(e,t){let o=0;for(let s=t;s>=0;s--)if(e[s]==="}")o++;else if(e[s]==="{"&&--o===0)return s;return-1}function Pe(e,t){let o=Math.max(e.lastIndexOf("}",t-1),e.lastIndexOf(";",t-1),e.lastIndexOf("{",t-1))+1;return e.slice(o,t).replace(/\s+/g," ").trim()}function Fe(e,t){let o=e.lastIndexOf("<",t-1);if(o<0||e.lastIndexOf(">",t-1)>o||/[/!?]/.test(e[o+1]??""))return null;let s=e.indexOf(">",t);return s<0?null:{lt:o,gt:s}}function Re(e,t,o,s,a){if(s.kind==="block")return A(e,a.gt,s.code);let r=s.kind==="value"?"style":"class",c=e.slice(a.lt,a.gt),u=new RegExp(`\\s${r}\\s*=\\s*(["'])([\\s\\S]*?)\\1`,"i").exec(c);if(u){let p=a.lt+u.index+u[0].length-1-u[2].length,f=p+u[2].length;if(t>=p&&t<=f){let k=e.slice(p,t);if(s.kind==="value"&&(/:\s*$/.test(k)||o>t&&/:[^;]*$/.test(k)))return M(t,o,s.value);if(s.kind==="class"&&!(/\S$/.test(k)&&/^\S/.test(e.slice(t,f)))){let g=`${/\S$/.test(k)?" ":""}${s.className}${/^\S/.test(e.slice(t,f))?" ":""}`;return M(t,t,g)}}let h=u[2].trimEnd(),b=s.kind==="value"?`${h&&!h.endsWith(";")?";":""}${h?" ":""}${s.property}: ${s.value}`:`${h?" ":""}${s.className}`,$=p+h.length;return M($,$,b)}let d=e[a.gt-1]==="/"?a.gt-1:a.gt,m=s.kind==="value"?` style="${s.property}: ${s.value}"`:` class="${s.className}"`;return M(d,d,m)}function ve(e){return e.kind==="block"?e.code:e.kind==="class"?`<p class="${e.className}">Text</p>`:`<div style="${e.property}: ${e.value}">Text</div>`}function M(e,t,o){return{from:e,to:t,insert:o,selectFrom:e,selectTo:e+o.length}}function we(e,t){let o=e.lastIndexOf(`
2
2
  `,t-1)+1;return/^[ \t]*/.exec(e.slice(o))[0]}function A(e,t,o,s=!1){let a=e.lastIndexOf(`
3
3
  `,t-1)+1,r=e.indexOf(`
4
4
  `,t);r<0&&(r=e.length);let c=we(e,t),u=s?o:o.split(`
@@ -1 +1 @@
1
- "use client";import{Fh as r}from"./chunk-DHKJAYUG.js";import"./chunk-RGLTNGJH.js";import"./chunk-5NGS7VFJ.js";import"./chunk-4M7WJPOZ.js";import"./chunk-AEBQM5LZ.js";import"./chunk-HKL2EKLO.js";import"./chunk-3DCSW3PN.js";import"./chunk-Y6SLVHK3.js";import{jsx as o}from"react/jsx-runtime";import e from"efficient-easel/screen/components/ScreenStoreProvider";function a(t){return o(e,{...t,parts:r})}export{a as default};
1
+ "use client";import{Fh as r}from"./chunk-B3U6XXDZ.js";import"./chunk-RGLTNGJH.js";import"./chunk-5NGS7VFJ.js";import"./chunk-GATK7RJE.js";import"./chunk-AEBQM5LZ.js";import"./chunk-HKL2EKLO.js";import"./chunk-3DCSW3PN.js";import"./chunk-Y6SLVHK3.js";import{jsx as o}from"react/jsx-runtime";import e from"efficient-easel/screen/components/ScreenStoreProvider";function a(t){return o(e,{...t,parts:r})}export{a as default};
@@ -1,4 +1,4 @@
1
- import{$ as Jd,D as hk,E as Ik,F as Kd,G as gk,H as kk,I as wr,J as vk,K as Pk,L as Tk,M as ot,N as qd,O as vo,P as ie,R as Vd,S as Cr,T as Yd,X as Ok,Y as Xd,Z as kr,_ as Ek,a as Ko,b as Ks,ba as Hv,c as Rd,d as In,e as qs,f as YC,fa as Xv,g as gn,h as Dd,ha as Jv,ia as Of,ja as kT,ka as vT,r as Zs}from"./chunk-RGLTNGJH.js";import{a as tP,d as cf,e as tt,f as pf,g as uf,h as If,l as Lx}from"./chunk-5NGS7VFJ.js";import{$ as xn,$a as ox,$c as fx,$e as lP,$f as OP,A as pC,Aa as HC,Ab as Sn,Ac as qk,Ad as Pv,Ae as bt,Af as IP,Ag as DP,Aj as iT,B as uC,Ba as WC,Bb as Js,Bc as Mt,Bd as Tv,Be as Te,Bf as gP,Bg as NP,Bk as Pf,C as Zo,Ca as $C,Cc as $e,Cd as Ov,Ce as eP,Cf as yP,Cg as MP,Ck as Tf,D as mC,Da as zC,Dc as vr,Dd as px,Df as SP,Dg as bx,Dj as Tx,Dk as Ax,E as xC,Ea as UC,Eb as nx,Ec as lx,Ed as Ev,Eg as HP,Ej as sl,Ek as ST,F as hC,Fa as jC,Fb as bn,Fc as Vk,Fd as ux,Ff as bP,Fg as wx,Fk as da,G as IC,Ga as yr,Gb as Gd,Gc as Yk,Gd as _v,Ge as mx,Gg as or,Gk as bT,H as gC,Ha as GC,Hb as uk,Hc as Xk,Hd as Av,Hg as Cx,Hj as On,Hk as wT,I as yC,Ib as mk,Ic as af,Id as Fv,Ig as yf,Ik as CT,J as SC,Ja as KC,Jb as xk,Jc as el,Jd as Ht,Je as al,Jg as WP,Jj as dT,Ka as Nd,Kb as Zd,Kc as Jk,Kd as Bv,Kg as $P,Kk as PT,L as bC,La as Vs,Lb as Ak,Lc as Zk,Ld as na,Lg as zP,Lk as Fx,M as wC,Ma as Md,Mb as Qd,Mc as Qk,Md as Lv,Mf as wP,Mg as UP,N as CC,Na as XC,Nb as sx,Nc as nf,Nd as kn,Ne as oP,Nf as CP,Ng as jP,Nk as TT,O as Ed,Ob as ef,Oc as ev,Oe as xx,Of as kP,Ok as OT,P as kC,Pc as ov,Pd as Qt,Pe as rP,Pf as yx,Pk as ET,Q as vC,Qc as ix,Qd as Rv,Qf as vP,Qg as GP,Qj as fT,Qk as _T,Ra as JC,Rc as tv,Rd as rl,Rf as PP,Rg as KP,Rj as Ox,Rk as AT,Sa as ZC,Sc as dx,Sd as Dv,Sf as Sx,Sj as cT,Sk as FT,Ta as Ys,Tb as wn,Td as sa,Tj as pT,Uc as rv,Ud as Nv,Ui as ia,V as Vm,Va as yn,Vc as av,Vj as vf,Wa as QC,Wb as Fk,Wc as nv,Wd as sf,We as aP,Wf as er,Wi as tr,Wj as En,X as Us,Xa as Hd,Xb as Bk,Xc as sv,Xd as Tr,Xe as nP,Xj as _n,Y as _d,Ya as ek,Yb as Lk,Yc as lv,Yd as Mv,Ye as mf,Yf as vn,Yh as QP,Yj as ll,Z as Bo,Za as Xs,Zb as Qs,Zc as ta,Ze as sP,Zg as Sf,Zh as eT,Zj as An,_ as Ym,_a as ok,_c as iv,_e as hx,_f as TP,_j as uT,a as Fo,aa as PC,ab as tk,ad as dv,af as iP,ag as gf,b as pn,ba as TC,bb as tx,bd as fv,bf as dP,bg as Or,bj as Cf,ca as OC,cb as rk,cd as cv,cf as fP,cg as EP,d as Vw,da as EC,db as rx,dd as pv,df as xf,dh as qP,dj as rT,e as jm,ea as _C,ed as uv,ee as Wv,eg as Pn,f as Yw,fa as Xm,fb as ak,fd as Pr,ff as cP,fh as VP,fk as mT,g as c,gb as nk,gd as ol,gk as xT,h as Rt,ha as AC,hd as ra,he as $v,hi as oT,hl as Bx,i as mn,ia as Ad,ib as Wd,ic as Cn,id as mv,ie as zv,if as Ix,ii as tT,j as $s,jb as sk,jc as Nt,je as Uv,k as No,kb as lk,kc as Rk,kd as aa,l as zs,lb as ik,lc as Dk,ld as tl,mb as dk,mc as Nk,md as xv,n as rC,nb as $d,nc as Mk,nd as hv,nf as pP,ng as Er,nk as Ex,o as aC,ob as fk,oc as Hk,oe as Mo,of as uP,og as _P,p as nC,pc as of,pd as Iv,pe as eo,pf as hf,pg as AP,ph as kx,pj as aT,pk as hT,pl as BT,q as sC,qc as tf,qd as gv,qf as mP,qg as FP,qh as bf,qk as IT,ql as LT,r as lC,rb as ck,rc as Wk,rd as yv,re as lf,rf as xP,rh as la,rk as gT,rl as Ef,s as iC,sb as Sr,se as jv,sh as wf,sj as nT,sl as RT,t as dC,tb as zd,tc as $k,td as Sv,te as Gv,tj as kf,tk as yT,u as Od,ub as Ud,uc as zk,ud as bv,ue as Kv,ug as BP,uh as YP,uj as vx,ul as Fn,v as gr,va as RC,vb as pk,vc as Uk,vd as wv,ve as qv,vh as XP,vj as sT,vk as _x,vl as _f,wa as DC,wb as ko,wc as rf,wd as Cv,we as df,wh as JP,wj as lT,x as qm,xa as NC,xb as ax,xc as jk,xd as cx,xe as Vv,xh as ZP,xj as Px,y as fC,ya as MC,yb as jd,yc as Gk,yd as kv,ye as Yv,yf as hP,yg as LP,z as cC,za as Qm,zb as Dt,zc as Kk,zd as vv,ze,zf as gx,zg as RP,zj as Tn}from"./chunk-4M7WJPOZ.js";import{a as oC,b as Td,c as tC,g as _k}from"./chunk-AEBQM5LZ.js";import{$a as Pb,$c as Co,$d as sw,$e as Wm,$g as Km,A as no,Ae as Nm,Af as zm,B as en,Bb as Ds,Bd as Rm,Be as fw,Ca as ye,Cb as $b,D as Bs,Dd as ow,De as Mm,E as Qi,Ed as pd,F as At,Fg as Ww,G as on,Ga as Xo,Gb as dd,Gd as Jo,Gg as $w,H as We,Ha as gt,Hc as qb,Hd as Do,He as xd,Hf as kw,Hg as zw,I as Ve,Ia as hm,Id as Qe,Ie as hd,Ig as Uw,J as tn,Ja as Im,Jc as _m,Jd as Bt,Je as cw,Jh as ex,K as ed,Kd as Jt,Ke as Id,Kf as Zt,Kh as hn,L as $,La as gm,Lb as zb,Ld as St,Le as gd,Lg as jw,Lh as qC,M as xo,Ma as ym,Md as ln,Me as pw,Mh as Qo,N as QS,Nd as tw,Ne as uw,Nh as et,O as eb,Od as dn,Oe as yd,Og as Gw,Oh as Ld,Pd as rw,Pe as Sd,Pg as Kw,Ph as VC,Q as ob,Qa as Sm,Qb as fd,Qc as Vb,Qe as oa,Qf as vw,Qh as Gs,R as od,Ra as gb,Re as mw,Rg as qw,S as tb,Sa as yb,T as Jr,Ta as Ge,Tb as Ub,Td as ea,Tg as Xw,U as rb,Ua as Sb,Ub as jb,Ud as aw,Ug as Jw,V as ab,Va as sd,Vd as nw,Ve as xw,W as Ls,Wa as bb,Wb as Gb,Wd as fn,Wf as Pw,Wg as Ir,X as mm,Xa as wb,Xc as U,Xd as Ms,Xf as Tw,Xh as yk,Y as Ce,Ya as Cb,Yb as Tm,Yc as te,Yd as Hs,Ye as Lt,Yf as Ow,Yg as Zw,Z as G,Za as kb,Zc as Am,Zd as Dm,Ze as Ws,Zf as Ew,Zg as Gm,_ as nb,_a as vb,_c as A,_e as Hm,_g as Qw,a as Qa,aa as td,ab as Tb,ad as Yt,ae as lw,af as hw,ah as Pd,b as mo,ba as sb,bb as Ob,bd as Yb,be as iw,bf as Iw,bg as _w,c as ao,ca as rd,cb as ld,cd as M,cf as bd,cg as Aw,ch as eC,ci as Sk,d as qt,da as lb,db as id,dd as cd,de as dw,df as gw,di as br,ea as ib,eb as Eb,ed as Ro,eg as Fw,f as Go,fa as xm,fb as _b,fc as Om,fd as Xb,fe as ud,fg as Bw,fi as bk,g as Fs,ga as db,gd as yt,gf as yw,gg as kd,gi as wk,h as GS,ha as fb,hb as Ab,hd as Ft,he as md,hf as wd,hg as Lw,hi as Ck,i as KS,ia as cb,ib as Fb,id as Fm,if as Sw,ig as vd,j as qS,jb as bm,jd as xr,jf as $m,jg as Um,k as VS,kb as Bb,kd as Xt,kf as bw,la as pb,lb as Lb,ld as Jb,lf as ww,li as Po,ma as ub,mb as wm,mf as Cd,mg as Rw,na as mb,nb as an,nd as Ae,nf as cn,ng as Dw,o as YS,ob as Zr,od as Qr,of as un,pa as xb,pb as Cm,pd as Ns,pf as hr,pi as nl,qb as km,qd as nn,qg as Nw,qh as Jm,ra as hb,rb as vm,rd as Zb,rg as Mw,rh as Fd,s as XS,sa as ad,sb as Rb,sd as Bm,sh as FC,ta as Ib,tb as Db,td as sn,tf as Cw,th as Zm,u as De,ua as nd,ub as Nb,uc as Em,ud as Lm,ug as Hw,uh as BC,v as JS,vb as Pm,w as Zi,wb as Mb,wc as Kb,wh as Bd,x as ZS,xb as Vt,xh as LC,ya as Rs,yb as Hb,yd as Qb,yh as js,z as Pe,za as rn,zb as Wb,zd as ew}from"./chunk-HKL2EKLO.js";import{c as Zv,d as Qv,e as ff}from"./chunk-3DCSW3PN.js";import{jsx as Rx,Fragment as _4,jsxs as A4}from"react/jsx-runtime";import{createContext as F4,useContext as B4}from"react";var L4={mirrorHostStyles:!0,css:null,fontHrefs:[]},DT=F4(L4);function Eae({value:e,children:o}){return Rx(DT.Provider,{value:e,children:o})}function il(){return B4(DT)}function NT(){let{css:e,fontHrefs:o}=il();return A4(_4,{children:[o.map(t=>Rx("link",{rel:"stylesheet",href:t},t)),e?Rx("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as R4}from"react/jsx-runtime";import{createContext as D4,useContext as N4}from"react";var MT=D4(void 0);function Bae({metadata:e,children:o}){return R4(MT.Provider,{value:e,children:o})}var HT=()=>N4(MT);import{jsx as fo,Fragment as u4,jsxs as Vi}from"react/jsx-runtime";import{useCallback as Os,useEffect as jt,useRef as oae,useState as d4}from"react";import{SettingsSwitch as tae}from"efficient-easel/panel";import{PagesIcon as rae,StylesIcon as aae}from"efficient-easel/rail";import{PaletteIcon as nae}from"efficient-shell/icons/efficient";import{Subtree as sae,TreeRow as m4}from"efficient-easel/tree";import{useEasel as x4}from"efficient-easel/easel";import{toItemSelector as lae}from"efficient-easel/node-ops";import{useEaselStrings as h4}from"efficient-easel/strings";import{createContext as M4,useContext as H4}from"react";var Dx=M4(!1),Dae=()=>H4(Dx);import{useMemo as W4,useRef as $4}from"react";import{useEaselApi as z4}from"efficient-easel/easel";import{useSectionOps as U4}from"efficient-easel/screen/lib/document/use-section-ops";function Af(){let e=z4(),o=U4(),t=$4(o);return t.current=o,W4(()=>({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 f6}from"efficient-easel/draw";import{insertAt as c6,moveTo as p6,removeAt as u6}from"efficient-easel/fields";import{useSyncExternalStore as r6}from"react";import{isNodeList as WT}from"efficient-easel/data";var $T="Flex";function Bn(e,o){return Lt(e)?typeof e?.[Go]=="string"?Nx(o?.[Go]):"":Nx(e?.[Go])}var Nx=e=>typeof e=="string"?e.trim():"",j4=e=>e.type===no&&Array.isArray(e.props?.[Mm])&&e.props[Mm].some(o=>Nx(o?.[Go])!==""),G4=new Intl.NumberFormat("en-US");function K4(e){return/^\d+$/.test(e)?G4.format(Number(e)):e}function Kae(e,o){let t=o?o.find(r=>r.key===e)?.value:XS(Fs).find(r=>r.key===e)?.value;return t===void 0?null:K4(t)}var q4={[Go]:"any"};function Mx(e,o=!1){let t=e.props;if(!t)return{node:e,names:!1};let r=e.type==="Text"&&(Bn(t)!==""||o&&Bn(t,q4)!==""),a=o||j4(e),n=Ve(e,l=>We(l,i=>{let d=Mx(i,a);return d.names&&(r=!0),d.node})).props;if(e.type!==$T)return{node:n===t?e:{...e,props:n},names:r};let s=De(n);if(r&&!s&&(n={...n,[ao]:Fs}),!r&&s===Fs){let{[ao]:l,...i}=n;n=i}return{node:n===t?e:{...e,props:n},names:!1}}function zT(e,o,t){for(let r of e){if(r?.props?.id===o)return t;for(let a of on(r??{})){let n=zT(a,o,r.type===$T?r:t);if(n!==void 0)return n}}}function qae(e,o){if(!WT(e))return!0;let t=zT(e,o,null);if(t===void 0)return!0;if(t===null)return!1;let r=De(t.props);return!r||r===Fs}function UT(e){let o=e?.content;if(!WT(o))return e;let t=o.map(r=>Mx(r));return t.every((r,a)=>r.node===o[a])?e:{...e,content:t.map(r=>r.node)}}function jT(e){return Mx(e).node}import{decodePartId as a6}from"efficient-easel/draw";function Ln(e,o){let t=zk(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?IT(t,o.index):null:Uk(e)?.[o.rowKey]??null}function Ff(e,o,t){let r=e.node.props,{key:a,row:n}=Nt(e.propKey),s=n?Gk(r,a,n,e.kind,o):$k(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}import{readHidable as qT}from"efficient-easel/draw";import{parseOption as V4}from"efficient-shell/format";var Hx=e=>String(e+1).padStart(2,"0"),Y4=[{label:"01 \xB7",value:"two-digit"},{label:"1.",value:"plain"}],Wx="two-digit",GT=e=>V4(Y4,Wx,e),Bf=(e,o)=>e==="plain"?`${o+1}.`:Hx(o);var Ux="Contents",$x="Flex",KT="Text",X4="numberForm",J4="_contentsEntries",Z4="_kickerNumber",VT="data-sf-kicker-number",Q4=e=>qT(e).text.trim(),YT=e=>sa(e?.anchor),zx=e=>String(e.props?.id??""),e6=e=>!qT(e.props?.text).hidden&&!Bn(e.props)&&!Lt(e.props),dl=e=>on(e);function XT(e){for(let o of dl(e))for(let t of o){if(Qt(t.props??{}))continue;if(t.type===KT&&e6(t))return t;if(t.type===KT)continue;let r=XT(t);if(r)return r}}function JT(e){return dl(e).some(o=>o.some(t=>t&&!Qt(t.props??{})&&(t.type===Ux||JT(t))))}var ZT=e=>e.type===$x&&vn($x,e.props?.direction)==="row";function QT(e){return dl(e).some(o=>o.some(t=>t&&!Qt(t.props??{})&&(t.type===Ux||!ZT(t)&&QT(t))))}function o6(e){let o=[],t=(r,a)=>{for(let n of r){if(!n||Qt(n.props??{}))continue;if(n.type===Ux){a.open={contents:n,sections:a.waiting??[]},a.waiting=null,o.push(a.open);continue}if(ZT(n)&&QT(n)){let l={inRow:!0,open:null,waiting:[]};for(let i of dl(n))t(i,l);a.inRow||(a.open=null);continue}let s=a.open?.sections??a.waiting;if(n.type===$x&&YT(n.props)&&s&&!JT(n)){s.push({box:n,kicker:XT(n)});continue}for(let l of dl(n))t(l,a)}};return t(e,{inRow:!1,open:null,waiting:null}),o}function t6(e){return e.map(o=>({label:o.kicker?rn(Q4(o.kicker.props?.text)):"",anchor:YT(o.box.props)}))}function jx(e){let o=e?.length?o6(e):[];if(!o.length)return null;let t=new Map,r=new Map;for(let a of o){let n=zx(a.contents);n&&t.set(n,t6(a.sections));let s=GT(a.contents.props?.[X4]);a.sections.forEach((l,i)=>{let d=l.kicker?zx(l.kicker):"";d&&r.set(d,Bf(s,i))})}return{entries:t,numbers:r}}var pne=e=>e.endsWith(".")?`${e} `:`${e} \xB7 `;function e0(e){let o=e;if(!o?.content?.length)return e;let t=jx(o.content);if(!t)return e;let{entries:r,numbers:a}=t,n=s=>{let l=Ve(s,h=>We(h,n)),i=l.props??{},d=l!==s,f=zx(s),x=f?r.get(f):void 0;x&&(i={...i,[J4]:x},d=!0);let u=f?a.get(f):void 0;return u&&(i={...i,[Z4]:u},d=!0),d?{...s,props:i}:s};return{...o,content:o.content.map(n)}}var n6=`[${VT}]`,s6=["bold","italic","underline","strike","link","sup","sub"],l6=["bullet","number"];function qx(e,o){return e?[...s6,...o?l6:[]]:[]}function o0(e,o){let t=a6(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}=Nt(a),d=o.components[n.type]?.fields?.[l],f=i?Ln(d,i):d,x=of(f);if(!x)return null;let u=n.props??{};if(QP(u)!==null||!i&&bd(n.type,u,l)||n.type==="Text"&&l==="text"&&Bn(u)||i&&!(Array.isArray(u[l])&&i.index<u[l].length))return null;let h=i?rf(u[l],i):u[l];return{node:n,selector:s,propKey:a,kind:x,stored:h,offPage:Cf(f),panelOnly:Hk(f)}}function Lf(e,o){let t=o0(e,o);if(!t)return null;let{text:r,hidden:a}=ia(t.stored);if(!ov({offPage:t.offPage,hidden:!!a,panelOnly:t.panelOnly}))return null;let n=tf(t.kind);return{partId:e,value:r,rules:ad,multiline:n,skip:n6,offered:qx(t.kind!=="plainText",n),write:s=>{let l=o0(e,o);l&&Ff({node:l.node,propKey:l.propKey,kind:l.kind,zone:l.selector.zone,index:l.selector.index},s,o.replace)}}}function Vx(e,o,t){return e?.isConnected&&e.getAttribute($e)===t?e:o?.querySelector(`[${$e}="${Rf(t)}"]`)??null}function Rf(e){return e.replace(/["\\]/g,"\\$&")}function t0(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var Gx=null,Kx=new Set;function i6(){return Gx}function Yx(e){if(e!==Gx){Gx=e;for(let o of Kx)o()}}function d6(e){return Kx.add(e),()=>{Kx.delete(e)}}function r0(){return r6(d6,i6,()=>null)}function a0(e,o){if(e.outer)return null;let t=o.getItemById(e.ownerId);if(!t)return null;let r=pw(t.type);return!r||De(t.props)?null:{node:t,rows:r}}function m6(e,o){let t=a0(e,o),r=o.getItemById(e.nodeId);if(!t||!r)return null;let a=gw(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:f6(e.ownerId,Cn(t.rows,{index:e.index,rowKey:a}))}function Df(e,o){let t=m6(e,o);return t?Lf(t,o):null}function n0(e,o){return Df(e,o)?.value}function s0(e,o){let t=Df(e,o);return t?(t.write(e.text),!0):!1}function l0(e,o){let t=a0(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=c6(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=p6(n,s,i);break}case"delete":l=u6(n,s);break;default:return!1}return o.replace(r.zone,r.index,{...t.node,props:{...a,[t.rows]:l}}),!0}import{jsx as ve,Fragment as IJ,jsxs as Eu}from"react/jsx-runtime";import{Fragment as gJ,useEffect as FM,useMemo as BM,useRef as yJ,useState as Ma}from"react";import{useScreenDocument as MM}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Ey}from"efficient-easel/draw/client";import SJ from"efficient-easel/screen/components/SidePanelHead";import{InspectorIconButton as bJ}from"efficient-easel/chrome";import{Input as wJ,PopupMenu as CJ,PopupMenuItem as LM,toast as RM}from"efficient-shell/ui";import{LayersTree as kJ,TreeGroupLabel as vJ,TreeRow as DM,TreeRowAction as _u}from"efficient-easel/tree";import{AddIcon as PJ,DuplicateIcon as TJ,PageIcon as OJ,SettingsIcon as EJ}from"efficient-easel/icons";import{PagesIcon as _J}from"efficient-easel/rail";import{useEaselHost as AJ}from"efficient-easel/screen/lib/host";import{useEaselSession as _y}from"efficient-easel/screen/lib/session-context";import{useCallback as Nf,useEffect as x6,useSyncExternalStore as h6}from"react";import{useScreenDocument as c0}from"efficient-easel/screen/components/ScreenDocumentContext";var i0=new WeakMap;function fl(e){let o=i0.get(e);return o||(o={rows:null,loading:null,listeners:new Set},i0.set(e,o)),o}function Xx(e,o){e.rows=o;for(let t of e.listeners)t()}var Mf=new Set;function Hf(e,o){o?Mf.add(e):Mf.delete(e)}function d0(e){let o=fl(e),t=e.listPages().then(r=>Xx(o,Mf.size?r.filter(a=>!Mf.has(a.id)):r),()=>Xx(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var f0=()=>null,I6=()=>()=>{};function cl(){let{adapter:e,ready:o}=c0(),t=Nf(l=>{let{listeners:i}=fl(e);return i.add(l),()=>i.delete(l)},[e]),r=Nf(()=>fl(e).rows,[e]),a=h6(o?t:I6,o?r:f0,f0);x6(()=>{if(!o)return;let l=fl(e);l.rows===null&&!l.loading&&d0(e)},[e,o]);let n=Nf(()=>o?d0(e):Promise.resolve(),[e,o]),s=Nf(l=>Xx(fl(e),l),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function g6(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function p0(){let{currentSlug:e}=c0(),{rows:o}=cl();return g6(o,e)}import{canDuplicatePage as FJ,DuplicatePageDialog as BJ}from"efficient-easel/page-copy";import{jsx as Eo,jsxs as kM}from"react/jsx-runtime";import{useEffect as eJ,useId as oJ,useMemo as tJ,useRef as rJ,useState as Py}from"react";import{useScreenDocument as aJ}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as nJ}from"efficient-easel/screen/lib/session-context";import{uniqueSlug as vM}from"efficient-easel/page-copy";import{AddIcon as sJ}from"efficient-easel/icons";import{Button as lJ,Dialog as iJ,EmptyState as dJ,LoadingSpinner as fJ,Paragraph as cJ,SidebarLayout as pJ,SidebarNavItem as Ty,Title as uJ,toast as PM}from"efficient-shell/ui";import{jsx as kt,jsxs as UL}from"react/jsx-runtime";import{useEffect as a7,useState as Sg}from"react";import{CanvasFrame as n7}from"efficient-easel/easel";import{Button as s7,Card as l7,FitFrame as i7,Text as d7}from"efficient-shell/ui";import{jsx as I0,Fragment as _6,jsxs as A6}from"react/jsx-runtime";import{useEffect as g0,useLayoutEffect as F6}from"react";var Wf="data-theme",u0="light";function y6(e){return e.getAttribute(Wf)===u0?"light":"dark"}function S6(e,o){return y6(e)===o?!1:(o==="light"?e.setAttribute(Wf,u0):e.removeAttribute(Wf),!0)}function b6(e){return Lx(e).getItem(zm)}function $ne(e,o){Lx(e).setItem(zm,o)}function w6(e,o,t=new Date().getHours()){return kw({mode:o.mode,override:b6(e),switchShown:o.switchShown,hour:t})}function m0(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>S6(t,w6(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[Wf]}),()=>n.disconnect()}var C6="style";function k6(e,o){let t=vd(o),r=!1;for(let a of Lw){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function x0(e,o){let t=e.body;if(!t)return()=>{};let r=()=>k6(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[C6]}),()=>n.disconnect()}import{VIEW_DESKTOP_MIN as v6,VIEW_TABLET_MIN as P6}from"efficient-easel/screen/lib/content/view-tiers";var rr={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"},qo=rr,T6=e=>e.flatMap(o=>[`[${o}] p`,`[${o}] li`]).join(","),O6=String.raw`(function (doc) {
1
+ import{$ as Jd,D as hk,E as Ik,F as Kd,G as gk,H as kk,I as wr,J as vk,K as Pk,L as Tk,M as ot,N as qd,O as vo,P as ie,R as Vd,S as Cr,T as Yd,X as Ok,Y as Xd,Z as kr,_ as Ek,a as Ko,b as Ks,ba as Hv,c as Rd,d as In,e as qs,f as YC,fa as Xv,g as gn,h as Dd,ha as Jv,ia as Of,ja as kT,ka as vT,r as Zs}from"./chunk-RGLTNGJH.js";import{a as tP,d as cf,e as tt,f as pf,g as uf,h as If,l as Lx}from"./chunk-5NGS7VFJ.js";import{$ as xn,$a as ox,$c as fx,$e as lP,$f as OP,$j as uT,A as pC,Aa as HC,Ab as Sn,Ac as qk,Ad as Pv,Ae as bt,Af as IP,Ag as DP,Aj as iT,B as uC,Ba as WC,Bb as Js,Bc as Mt,Bd as Tv,Be as Te,Bf as gP,Bg as NP,C as Zo,Ca as $C,Cc as $e,Cd as Ov,Ce as eP,Cf as yP,Cg as MP,Ck as Pf,D as mC,Da as zC,Dc as vr,Dd as px,Df as SP,Dg as bx,Dj as Tx,Dk as Tf,E as xC,Ea as UC,Eb as nx,Ec as lx,Ed as Ev,Eg as HP,Ej as sl,Ek as Ax,F as hC,Fa as jC,Fb as bn,Fc as Vk,Fd as ux,Ff as bP,Fg as wx,Fk as ST,G as IC,Ga as yr,Gb as Gd,Gc as Yk,Gd as _v,Ge as mx,Gg as or,Gk as da,H as gC,Ha as GC,Hb as uk,Hc as Xk,Hd as Av,Hg as Cx,Hj as On,Hk as bT,I as yC,Ib as mk,Ic as af,Id as Fv,Ig as yf,Ik as wT,J as SC,Ja as KC,Jb as xk,Jc as el,Jd as Ht,Je as al,Jg as WP,Jj as dT,Jk as CT,Ka as Nd,Kb as Zd,Kc as Jk,Kd as Bv,Kg as $P,L as bC,La as Vs,Lb as Ak,Lc as Zk,Ld as na,Lg as zP,Lk as PT,M as wC,Ma as Md,Mb as Qd,Mc as Qk,Md as Lv,Mf as wP,Mg as UP,Mk as Fx,N as CC,Na as XC,Nb as sx,Nc as nf,Nd as kn,Ne as oP,Nf as CP,Ng as jP,O as Ed,Ob as ef,Oc as ev,Oe as xx,Of as kP,Ok as TT,P as kC,Pc as ov,Pd as Qt,Pe as rP,Pf as yx,Pk as OT,Q as vC,Qc as ix,Qd as Rv,Qf as vP,Qg as GP,Qk as ET,Ra as JC,Rc as tv,Rd as rl,Rf as PP,Rg as KP,Rj as fT,Rk as _T,Sa as ZC,Sc as dx,Sd as Dv,Sf as Sx,Sj as Ox,Sk as AT,Ta as Ys,Tb as wn,Td as sa,Tj as cT,Tk as FT,Uc as rv,Ud as Nv,Ui as ia,Uj as pT,V as Vm,Va as yn,Vc as av,Wa as QC,Wb as Fk,Wc as nv,Wd as sf,We as aP,Wf as er,Wi as tr,Wj as vf,X as Us,Xa as Hd,Xb as Bk,Xc as sv,Xd as Tr,Xe as nP,Xj as En,Y as _d,Ya as ek,Yb as Lk,Yc as lv,Yd as Mv,Ye as mf,Yf as vn,Yh as QP,Yj as _n,Z as Bo,Za as Xs,Zb as Qs,Zc as ta,Ze as sP,Zg as Sf,Zh as eT,Zj as ll,_ as Ym,_a as ok,_c as iv,_e as hx,_f as TP,_j as An,a as Fo,aa as PC,ab as tk,ad as dv,af as iP,ag as gf,b as pn,ba as TC,bb as tx,bd as fv,bf as dP,bg as Or,bj as Cf,ca as OC,cb as rk,cd as cv,cf as fP,cg as EP,d as Vw,da as EC,db as rx,dd as pv,df as xf,dh as qP,dj as rT,e as jm,ea as _C,ed as uv,ee as Wv,eg as Pn,f as Yw,fa as Xm,fb as ak,fd as Pr,ff as cP,fh as VP,g as c,gb as nk,gd as ol,gk as mT,h as Rt,ha as AC,hd as ra,he as $v,hi as oT,hk as xT,i as mn,ia as Ad,ib as Wd,ic as Cn,id as mv,ie as zv,if as Ix,ii as tT,il as Bx,j as $s,jb as sk,jc as Nt,je as Uv,k as No,kb as lk,kc as Rk,kd as aa,l as zs,lb as ik,lc as Dk,ld as tl,mb as dk,mc as Nk,md as xv,n as rC,nb as $d,nc as Mk,nd as hv,nf as pP,ng as Er,o as aC,ob as fk,oc as Hk,oe as Mo,of as uP,og as _P,ok as Ex,p as nC,pc as of,pd as Iv,pe as eo,pf as hf,pg as AP,ph as kx,pj as aT,q as sC,qc as tf,qd as gv,qf as mP,qg as FP,qh as bf,qk as hT,ql as BT,r as lC,rb as ck,rc as Wk,rd as yv,re as lf,rf as xP,rh as la,rk as IT,rl as LT,s as iC,sb as Sr,se as jv,sh as wf,sj as nT,sk as gT,sl as Ef,t as dC,tb as zd,tc as $k,td as Sv,te as Gv,tj as kf,tl as RT,u as Od,ub as Ud,uc as zk,ud as bv,ue as Kv,ug as BP,uh as YP,uj as vx,uk as yT,v as gr,va as RC,vb as pk,vc as Uk,vd as wv,ve as qv,vh as XP,vj as sT,vl as Fn,wa as DC,wb as ko,wc as rf,wd as Cv,we as df,wh as JP,wj as lT,wk as _x,wl as _f,x as qm,xa as NC,xb as ax,xc as jk,xd as cx,xe as Vv,xh as ZP,xj as Px,y as fC,ya as MC,yb as jd,yc as Gk,yd as kv,ye as Yv,yf as hP,yg as LP,z as cC,za as Qm,zb as Dt,zc as Kk,zd as vv,ze,zf as gx,zg as RP,zj as Tn}from"./chunk-GATK7RJE.js";import{a as oC,b as Td,c as tC,g as _k}from"./chunk-AEBQM5LZ.js";import{$a as Pb,$c as Co,$d as sw,$e as Wm,$g as Km,A as no,Ae as Nm,Af as zm,B as en,Bb as Ds,Bd as Rm,Be as fw,Ca as ye,Cb as $b,D as Bs,Dd as ow,De as Mm,E as Qi,Ed as pd,F as At,Fg as Ww,G as on,Ga as Xo,Gb as dd,Gd as Jo,Gg as $w,H as We,Ha as gt,Hc as qb,Hd as Do,He as xd,Hf as kw,Hg as zw,I as Ve,Ia as hm,Id as Qe,Ie as hd,Ig as Uw,J as tn,Ja as Im,Jc as _m,Jd as Bt,Je as cw,Jh as ex,K as ed,Kd as Jt,Ke as Id,Kf as Zt,Kh as hn,L as $,La as gm,Lb as zb,Ld as St,Le as gd,Lg as jw,Lh as qC,M as xo,Ma as ym,Md as ln,Me as pw,Mh as Qo,N as QS,Nd as tw,Ne as uw,Nh as et,O as eb,Od as dn,Oe as yd,Og as Gw,Oh as Ld,Pd as rw,Pe as Sd,Pg as Kw,Ph as VC,Q as ob,Qa as Sm,Qb as fd,Qc as Vb,Qe as oa,Qf as vw,Qh as Gs,R as od,Ra as gb,Re as mw,Rg as qw,S as tb,Sa as yb,T as Jr,Ta as Ge,Tb as Ub,Td as ea,Tg as Xw,U as rb,Ua as Sb,Ub as jb,Ud as aw,Ug as Jw,V as ab,Va as sd,Vd as nw,Ve as xw,W as Ls,Wa as bb,Wb as Gb,Wd as fn,Wf as Pw,Wg as Ir,X as mm,Xa as wb,Xc as U,Xd as Ms,Xf as Tw,Xh as yk,Y as Ce,Ya as Cb,Yb as Tm,Yc as te,Yd as Hs,Ye as Lt,Yf as Ow,Yg as Zw,Z as G,Za as kb,Zc as Am,Zd as Dm,Ze as Ws,Zf as Ew,Zg as Gm,_ as nb,_a as vb,_c as A,_e as Hm,_g as Qw,a as Qa,aa as td,ab as Tb,ad as Yt,ae as lw,af as hw,ah as Pd,b as mo,ba as sb,bb as Ob,bd as Yb,be as iw,bf as Iw,bg as _w,c as ao,ca as rd,cb as ld,cd as M,cf as bd,cg as Aw,ch as eC,ci as Sk,d as qt,da as lb,db as id,dd as cd,de as dw,df as gw,di as br,ea as ib,eb as Eb,ed as Ro,eg as Fw,f as Go,fa as xm,fb as _b,fc as Om,fd as Xb,fe as ud,fg as Bw,fi as bk,g as Fs,ga as db,gd as yt,gf as yw,gg as kd,gi as wk,h as GS,ha as fb,hb as Ab,hd as Ft,he as md,hf as wd,hg as Lw,hi as Ck,i as KS,ia as cb,ib as Fb,id as Fm,if as Sw,ig as vd,j as qS,jb as bm,jd as xr,jf as $m,jg as Um,k as VS,kb as Bb,kd as Xt,kf as bw,la as pb,lb as Lb,ld as Jb,lf as ww,li as Po,ma as ub,mb as wm,mf as Cd,mg as Rw,na as mb,nb as an,nd as Ae,nf as cn,ng as Dw,o as YS,ob as Zr,od as Qr,of as un,pa as xb,pb as Cm,pd as Ns,pf as hr,pi as nl,qb as km,qd as nn,qg as Nw,qh as Jm,ra as hb,rb as vm,rd as Zb,rg as Mw,rh as Fd,s as XS,sa as ad,sb as Rb,sd as Bm,sh as FC,ta as Ib,tb as Db,td as sn,tf as Cw,th as Zm,u as De,ua as nd,ub as Nb,uc as Em,ud as Lm,ug as Hw,uh as BC,v as JS,vb as Pm,w as Zi,wb as Mb,wc as Kb,wh as Bd,x as ZS,xb as Vt,xh as LC,ya as Rs,yb as Hb,yd as Qb,yh as js,z as Pe,za as rn,zb as Wb,zd as ew}from"./chunk-HKL2EKLO.js";import{c as Zv,d as Qv,e as ff}from"./chunk-3DCSW3PN.js";import{jsx as Rx,Fragment as _4,jsxs as A4}from"react/jsx-runtime";import{createContext as F4,useContext as B4}from"react";var L4={mirrorHostStyles:!0,css:null,fontHrefs:[]},DT=F4(L4);function Eae({value:e,children:o}){return Rx(DT.Provider,{value:e,children:o})}function il(){return B4(DT)}function NT(){let{css:e,fontHrefs:o}=il();return A4(_4,{children:[o.map(t=>Rx("link",{rel:"stylesheet",href:t},t)),e?Rx("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as R4}from"react/jsx-runtime";import{createContext as D4,useContext as N4}from"react";var MT=D4(void 0);function Bae({metadata:e,children:o}){return R4(MT.Provider,{value:e,children:o})}var HT=()=>N4(MT);import{jsx as fo,Fragment as u4,jsxs as Vi}from"react/jsx-runtime";import{useCallback as Os,useEffect as jt,useRef as oae,useState as d4}from"react";import{SettingsSwitch as tae}from"efficient-easel/panel";import{PagesIcon as rae,StylesIcon as aae}from"efficient-easel/rail";import{PaletteIcon as nae}from"efficient-shell/icons/efficient";import{Subtree as sae,TreeRow as m4}from"efficient-easel/tree";import{useEasel as x4}from"efficient-easel/easel";import{toItemSelector as lae}from"efficient-easel/node-ops";import{useEaselStrings as h4}from"efficient-easel/strings";import{createContext as M4,useContext as H4}from"react";var Dx=M4(!1),Dae=()=>H4(Dx);import{useMemo as W4,useRef as $4}from"react";import{useEaselApi as z4}from"efficient-easel/easel";import{useSectionOps as U4}from"efficient-easel/screen/lib/document/use-section-ops";function Af(){let e=z4(),o=U4(),t=$4(o);return t.current=o,W4(()=>({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 f6}from"efficient-easel/draw";import{insertAt as c6,moveTo as p6,removeAt as u6}from"efficient-easel/fields";import{useSyncExternalStore as r6}from"react";import{isNodeList as WT}from"efficient-easel/data";var $T="Flex";function Bn(e,o){return Lt(e)?typeof e?.[Go]=="string"?Nx(o?.[Go]):"":Nx(e?.[Go])}var Nx=e=>typeof e=="string"?e.trim():"",j4=e=>e.type===no&&Array.isArray(e.props?.[Mm])&&e.props[Mm].some(o=>Nx(o?.[Go])!==""),G4=new Intl.NumberFormat("en-US");function K4(e){return/^\d+$/.test(e)?G4.format(Number(e)):e}function Kae(e,o){let t=o?o.find(r=>r.key===e)?.value:XS(Fs).find(r=>r.key===e)?.value;return t===void 0?null:K4(t)}var q4={[Go]:"any"};function Mx(e,o=!1){let t=e.props;if(!t)return{node:e,names:!1};let r=e.type==="Text"&&(Bn(t)!==""||o&&Bn(t,q4)!==""),a=o||j4(e),n=Ve(e,l=>We(l,i=>{let d=Mx(i,a);return d.names&&(r=!0),d.node})).props;if(e.type!==$T)return{node:n===t?e:{...e,props:n},names:r};let s=De(n);if(r&&!s&&(n={...n,[ao]:Fs}),!r&&s===Fs){let{[ao]:l,...i}=n;n=i}return{node:n===t?e:{...e,props:n},names:!1}}function zT(e,o,t){for(let r of e){if(r?.props?.id===o)return t;for(let a of on(r??{})){let n=zT(a,o,r.type===$T?r:t);if(n!==void 0)return n}}}function qae(e,o){if(!WT(e))return!0;let t=zT(e,o,null);if(t===void 0)return!0;if(t===null)return!1;let r=De(t.props);return!r||r===Fs}function UT(e){let o=e?.content;if(!WT(o))return e;let t=o.map(r=>Mx(r));return t.every((r,a)=>r.node===o[a])?e:{...e,content:t.map(r=>r.node)}}function jT(e){return Mx(e).node}import{decodePartId as a6}from"efficient-easel/draw";function Ln(e,o){let t=zk(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?IT(t,o.index):null:Uk(e)?.[o.rowKey]??null}function Ff(e,o,t){let r=e.node.props,{key:a,row:n}=Nt(e.propKey),s=n?Gk(r,a,n,e.kind,o):$k(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}import{readHidable as qT}from"efficient-easel/draw";import{parseOption as V4}from"efficient-shell/format";var Hx=e=>String(e+1).padStart(2,"0"),Y4=[{label:"01 \xB7",value:"two-digit"},{label:"1.",value:"plain"}],Wx="two-digit",GT=e=>V4(Y4,Wx,e),Bf=(e,o)=>e==="plain"?`${o+1}.`:Hx(o);var Ux="Contents",$x="Flex",KT="Text",X4="numberForm",J4="_contentsEntries",Z4="_kickerNumber",VT="data-sf-kicker-number",Q4=e=>qT(e).text.trim(),YT=e=>sa(e?.anchor),zx=e=>String(e.props?.id??""),e6=e=>!qT(e.props?.text).hidden&&!Bn(e.props)&&!Lt(e.props),dl=e=>on(e);function XT(e){for(let o of dl(e))for(let t of o){if(Qt(t.props??{}))continue;if(t.type===KT&&e6(t))return t;if(t.type===KT)continue;let r=XT(t);if(r)return r}}function JT(e){return dl(e).some(o=>o.some(t=>t&&!Qt(t.props??{})&&(t.type===Ux||JT(t))))}var ZT=e=>e.type===$x&&vn($x,e.props?.direction)==="row";function QT(e){return dl(e).some(o=>o.some(t=>t&&!Qt(t.props??{})&&(t.type===Ux||!ZT(t)&&QT(t))))}function o6(e){let o=[],t=(r,a)=>{for(let n of r){if(!n||Qt(n.props??{}))continue;if(n.type===Ux){a.open={contents:n,sections:a.waiting??[]},a.waiting=null,o.push(a.open);continue}if(ZT(n)&&QT(n)){let l={inRow:!0,open:null,waiting:[]};for(let i of dl(n))t(i,l);a.inRow||(a.open=null);continue}let s=a.open?.sections??a.waiting;if(n.type===$x&&YT(n.props)&&s&&!JT(n)){s.push({box:n,kicker:XT(n)});continue}for(let l of dl(n))t(l,a)}};return t(e,{inRow:!1,open:null,waiting:null}),o}function t6(e){return e.map(o=>({label:o.kicker?rn(Q4(o.kicker.props?.text)):"",anchor:YT(o.box.props)}))}function jx(e){let o=e?.length?o6(e):[];if(!o.length)return null;let t=new Map,r=new Map;for(let a of o){let n=zx(a.contents);n&&t.set(n,t6(a.sections));let s=GT(a.contents.props?.[X4]);a.sections.forEach((l,i)=>{let d=l.kicker?zx(l.kicker):"";d&&r.set(d,Bf(s,i))})}return{entries:t,numbers:r}}var pne=e=>e.endsWith(".")?`${e} `:`${e} \xB7 `;function e0(e){let o=e;if(!o?.content?.length)return e;let t=jx(o.content);if(!t)return e;let{entries:r,numbers:a}=t,n=s=>{let l=Ve(s,h=>We(h,n)),i=l.props??{},d=l!==s,f=zx(s),x=f?r.get(f):void 0;x&&(i={...i,[J4]:x},d=!0);let u=f?a.get(f):void 0;return u&&(i={...i,[Z4]:u},d=!0),d?{...s,props:i}:s};return{...o,content:o.content.map(n)}}var n6=`[${VT}]`,s6=["bold","italic","underline","strike","link","sup","sub"],l6=["bullet","number"];function qx(e,o){return e?[...s6,...o?l6:[]]:[]}function o0(e,o){let t=a6(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}=Nt(a),d=o.components[n.type]?.fields?.[l],f=i?Ln(d,i):d,x=of(f);if(!x)return null;let u=n.props??{};if(QP(u)!==null||!i&&bd(n.type,u,l)||n.type==="Text"&&l==="text"&&Bn(u)||i&&!(Array.isArray(u[l])&&i.index<u[l].length))return null;let h=i?rf(u[l],i):u[l];return{node:n,selector:s,propKey:a,kind:x,stored:h,offPage:Cf(f),panelOnly:Hk(f)}}function Lf(e,o){let t=o0(e,o);if(!t)return null;let{text:r,hidden:a}=ia(t.stored);if(!ov({offPage:t.offPage,hidden:!!a,panelOnly:t.panelOnly}))return null;let n=tf(t.kind);return{partId:e,value:r,rules:ad,multiline:n,skip:n6,offered:qx(t.kind!=="plainText",n),write:s=>{let l=o0(e,o);l&&Ff({node:l.node,propKey:l.propKey,kind:l.kind,zone:l.selector.zone,index:l.selector.index},s,o.replace)}}}function Vx(e,o,t){return e?.isConnected&&e.getAttribute($e)===t?e:o?.querySelector(`[${$e}="${Rf(t)}"]`)??null}function Rf(e){return e.replace(/["\\]/g,"\\$&")}function t0(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var Gx=null,Kx=new Set;function i6(){return Gx}function Yx(e){if(e!==Gx){Gx=e;for(let o of Kx)o()}}function d6(e){return Kx.add(e),()=>{Kx.delete(e)}}function r0(){return r6(d6,i6,()=>null)}function a0(e,o){if(e.outer)return null;let t=o.getItemById(e.ownerId);if(!t)return null;let r=pw(t.type);return!r||De(t.props)?null:{node:t,rows:r}}function m6(e,o){let t=a0(e,o),r=o.getItemById(e.nodeId);if(!t||!r)return null;let a=gw(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:f6(e.ownerId,Cn(t.rows,{index:e.index,rowKey:a}))}function Df(e,o){let t=m6(e,o);return t?Lf(t,o):null}function n0(e,o){return Df(e,o)?.value}function s0(e,o){let t=Df(e,o);return t?(t.write(e.text),!0):!1}function l0(e,o){let t=a0(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=c6(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=p6(n,s,i);break}case"delete":l=u6(n,s);break;default:return!1}return o.replace(r.zone,r.index,{...t.node,props:{...a,[t.rows]:l}}),!0}import{jsx as ve,Fragment as IJ,jsxs as Eu}from"react/jsx-runtime";import{Fragment as gJ,useEffect as FM,useMemo as BM,useRef as yJ,useState as Ma}from"react";import{useScreenDocument as MM}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Ey}from"efficient-easel/draw/client";import SJ from"efficient-easel/screen/components/SidePanelHead";import{InspectorIconButton as bJ}from"efficient-easel/chrome";import{Input as wJ,PopupMenu as CJ,PopupMenuItem as LM,toast as RM}from"efficient-shell/ui";import{LayersTree as kJ,TreeGroupLabel as vJ,TreeRow as DM,TreeRowAction as _u}from"efficient-easel/tree";import{AddIcon as PJ,DuplicateIcon as TJ,PageIcon as OJ,SettingsIcon as EJ}from"efficient-easel/icons";import{PagesIcon as _J}from"efficient-easel/rail";import{useEaselHost as AJ}from"efficient-easel/screen/lib/host";import{useEaselSession as _y}from"efficient-easel/screen/lib/session-context";import{useCallback as Nf,useEffect as x6,useSyncExternalStore as h6}from"react";import{useScreenDocument as c0}from"efficient-easel/screen/components/ScreenDocumentContext";var i0=new WeakMap;function fl(e){let o=i0.get(e);return o||(o={rows:null,loading:null,listeners:new Set},i0.set(e,o)),o}function Xx(e,o){e.rows=o;for(let t of e.listeners)t()}var Mf=new Set;function Hf(e,o){o?Mf.add(e):Mf.delete(e)}function d0(e){let o=fl(e),t=e.listPages().then(r=>Xx(o,Mf.size?r.filter(a=>!Mf.has(a.id)):r),()=>Xx(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var f0=()=>null,I6=()=>()=>{};function cl(){let{adapter:e,ready:o}=c0(),t=Nf(l=>{let{listeners:i}=fl(e);return i.add(l),()=>i.delete(l)},[e]),r=Nf(()=>fl(e).rows,[e]),a=h6(o?t:I6,o?r:f0,f0);x6(()=>{if(!o)return;let l=fl(e);l.rows===null&&!l.loading&&d0(e)},[e,o]);let n=Nf(()=>o?d0(e):Promise.resolve(),[e,o]),s=Nf(l=>Xx(fl(e),l),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function g6(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function p0(){let{currentSlug:e}=c0(),{rows:o}=cl();return g6(o,e)}import{canDuplicatePage as FJ,DuplicatePageDialog as BJ}from"efficient-easel/page-copy";import{jsx as Eo,jsxs as kM}from"react/jsx-runtime";import{useEffect as eJ,useId as oJ,useMemo as tJ,useRef as rJ,useState as Py}from"react";import{useScreenDocument as aJ}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as nJ}from"efficient-easel/screen/lib/session-context";import{uniqueSlug as vM}from"efficient-easel/page-copy";import{AddIcon as sJ}from"efficient-easel/icons";import{Button as lJ,Dialog as iJ,EmptyState as dJ,LoadingSpinner as fJ,Paragraph as cJ,SidebarLayout as pJ,SidebarNavItem as Ty,Title as uJ,toast as PM}from"efficient-shell/ui";import{jsx as kt,jsxs as UL}from"react/jsx-runtime";import{useEffect as a7,useState as Sg}from"react";import{CanvasFrame as n7}from"efficient-easel/easel";import{Button as s7,Card as l7,FitFrame as i7,Text as d7}from"efficient-shell/ui";import{jsx as I0,Fragment as _6,jsxs as A6}from"react/jsx-runtime";import{useEffect as g0,useLayoutEffect as F6}from"react";var Wf="data-theme",u0="light";function y6(e){return e.getAttribute(Wf)===u0?"light":"dark"}function S6(e,o){return y6(e)===o?!1:(o==="light"?e.setAttribute(Wf,u0):e.removeAttribute(Wf),!0)}function b6(e){return Lx(e).getItem(zm)}function $ne(e,o){Lx(e).setItem(zm,o)}function w6(e,o,t=new Date().getHours()){return kw({mode:o.mode,override:b6(e),switchShown:o.switchShown,hour:t})}function m0(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>S6(t,w6(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[Wf]}),()=>n.disconnect()}var C6="style";function k6(e,o){let t=vd(o),r=!1;for(let a of Lw){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function x0(e,o){let t=e.body;if(!t)return()=>{};let r=()=>k6(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[C6]}),()=>n.disconnect()}import{VIEW_DESKTOP_MIN as v6,VIEW_TABLET_MIN as P6}from"efficient-easel/screen/lib/content/view-tiers";var rr={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"},qo=rr,T6=e=>e.flatMap(o=>[`[${o}] p`,`[${o}] li`]).join(","),O6=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']";