@jxsuite/studio 5.6.0 → 5.7.0

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 (173) hide show
  1. package/dist/chunks/{2020-zvax9fmb.js → 2020-cs2sb9t1.js} +3 -3
  2. package/dist/chunks/adapter-y5gdq19c.js +4 -0
  3. package/dist/chunks/{cf-account-picker-zfycs4k2.js → cf-account-picker-882a7ecm.js} +3 -3
  4. package/dist/chunks/cf-settings-20dznc3j.js +4 -0
  5. package/dist/chunks/components-q037dya7.js +4 -0
  6. package/dist/chunks/content-source-37x3vsap.js +4 -0
  7. package/dist/chunks/{convert-to-repeater-x19jr6c7.js → convert-to-repeater-grfep2w8.js} +3 -3
  8. package/dist/chunks/editor-j5sq149q.js +4 -0
  9. package/dist/chunks/entry-commands-c5h3nqck.js +4 -0
  10. package/dist/chunks/{extension-sections-y90sa0n4.js → extension-sections-dp8endhx.js} +3 -3
  11. package/dist/chunks/file-ops-937cvqk6.js +4 -0
  12. package/dist/chunks/files-tznwe1p1.js +4 -0
  13. package/dist/chunks/format-host-e2pjvd25.js +4 -0
  14. package/dist/chunks/fs-events-fv64ak3s.js +4 -0
  15. package/dist/chunks/git-panel-gb713ttc.js +4 -0
  16. package/dist/chunks/{grid-view-d9mybhn0.js → grid-view-5amhg604.js} +10 -10
  17. package/dist/chunks/iframe-host-t819mcg5.js +4 -0
  18. package/dist/chunks/{index-vnwy9d44.js → index-9ydfe04y.js} +3 -3
  19. package/dist/chunks/index-m0x5ztax.js +4 -0
  20. package/dist/chunks/{javascript-f0nrbdjb.js → javascript-d9pqgc2p.js} +2 -2
  21. package/dist/chunks/{jsonMode-nfa90dtf.js → jsonMode-800yvbem.js} +4 -4
  22. package/dist/chunks/jx-validate-zc9zp77s.js +4 -0
  23. package/dist/chunks/layers-4bsr82wz.js +4 -0
  24. package/dist/chunks/layers-panel-b6shnaax.js +4 -0
  25. package/dist/chunks/lit-html-cfn61dn7.js +4 -0
  26. package/dist/chunks/media-picker-ej0kdh1j.js +4 -0
  27. package/dist/chunks/menu-rtxf9chb.js +4 -0
  28. package/dist/chunks/{monaco-binding-antn79jf.js → monaco-binding-62dtmgbf.js} +3 -3
  29. package/dist/chunks/monaco-buffer-nn4dtx27.js +4 -0
  30. package/dist/chunks/{monaco-setup-k8s40vwg.js → monaco-setup-tj13ndtm.js} +3 -3
  31. package/dist/chunks/notify-ahs57a2z.js +4 -0
  32. package/dist/chunks/platform-v9xyfkbx.js +4 -0
  33. package/dist/chunks/publish-panel-bq36xcmj.js +4 -0
  34. package/dist/chunks/quick-search-zm00h9dh.js +4 -0
  35. package/dist/chunks/references-99ws0b0m.js +4 -0
  36. package/dist/chunks/right-panel-pq2f71q3.js +4 -0
  37. package/dist/chunks/section-registry-b2yzp9sw.js +4 -0
  38. package/dist/chunks/{studio-y17505ge.js → studio-01kbbqg3.js} +207 -207
  39. package/dist/chunks/{studio-gxna6yta.js → studio-01qza1n3.js} +4 -4
  40. package/dist/chunks/{studio-n2e133d6.js → studio-03wwfvyt.js} +4 -4
  41. package/dist/chunks/{studio-09n3fyy0.js → studio-0bbxhhce.js} +4 -4
  42. package/dist/chunks/{studio-dknr8m7b.js → studio-0k9mvpgj.js} +7 -7
  43. package/dist/chunks/{studio-s85vah66.js → studio-0scebvb9.js} +5 -5
  44. package/dist/chunks/studio-1a99w39s.js +5 -0
  45. package/dist/chunks/{studio-eegyf5vg.js → studio-1wvfxkyy.js} +4 -4
  46. package/dist/chunks/{studio-ft8pfpp0.js → studio-1x8x26k3.js} +4 -4
  47. package/dist/chunks/{studio-28pz4s1k.js → studio-222rqyyc.js} +4 -4
  48. package/dist/chunks/{studio-6exg5z4x.js → studio-4xppwncr.js} +3 -3
  49. package/dist/chunks/{studio-0c3fpdqj.js → studio-54g077x3.js} +5 -5
  50. package/dist/chunks/{studio-z47mm077.js → studio-56z7evx4.js} +6 -6
  51. package/dist/chunks/{studio-zkkdbbvd.js → studio-5e9zsamh.js} +6 -6
  52. package/dist/chunks/{studio-4yztve2t.js → studio-65fhspdd.js} +4 -4
  53. package/dist/chunks/{studio-b29h7g7s.js → studio-693nhyky.js} +4 -4
  54. package/dist/chunks/{studio-654fxcr0.js → studio-7pgy3xaf.js} +4 -4
  55. package/dist/chunks/{studio-k9pwvmz8.js → studio-888knnkc.js} +4 -4
  56. package/dist/chunks/{studio-b5rxwkj2.js → studio-9mqfamps.js} +4 -4
  57. package/dist/chunks/{studio-011em5cf.js → studio-a7xqhc3n.js} +4 -4
  58. package/dist/chunks/{studio-mf41717j.js → studio-aje966s9.js} +4 -4
  59. package/dist/chunks/studio-aqmph6k4.js +5 -0
  60. package/dist/chunks/studio-c6w3tq7t.js +5 -0
  61. package/dist/chunks/{studio-tzs6njnb.js → studio-c6zdm25z.js} +7 -7
  62. package/dist/chunks/{studio-1pxvgx1t.js → studio-c9d3pxf7.js} +4 -4
  63. package/dist/chunks/{studio-pvj970st.js → studio-ceb34dxj.js} +4 -4
  64. package/dist/chunks/studio-cvbkkfqb.js +5 -0
  65. package/dist/chunks/{studio-sadckcpp.js → studio-cxt150pj.js} +5 -5
  66. package/dist/chunks/{studio-891t1tv9.js → studio-dkn3x3hz.js} +4 -4
  67. package/dist/chunks/studio-e6re3rk1.js +5 -0
  68. package/dist/chunks/{studio-9n2j9nqk.js → studio-edbtvcd1.js} +4 -4
  69. package/dist/chunks/{studio-wr0pq67n.js → studio-eh0rac07.js} +4 -4
  70. package/dist/chunks/{studio-mm8x32gg.js → studio-evwgp1ym.js} +4 -4
  71. package/dist/chunks/{studio-9tkaykt5.js → studio-f195h2hq.js} +4 -4
  72. package/dist/chunks/{studio-0nm2skex.js → studio-fqq890ap.js} +3 -3
  73. package/dist/chunks/{studio-02y9cb4h.js → studio-frb0qbf7.js} +5 -5
  74. package/dist/chunks/{studio-je15p5v8.js → studio-gfn1kpxj.js} +5 -5
  75. package/dist/chunks/{studio-ymsjnvp9.js → studio-gh97gngt.js} +4 -4
  76. package/dist/chunks/{studio-zkvyd3ev.js → studio-gp02nqnw.js} +4 -4
  77. package/dist/chunks/{studio-5fc0728f.js → studio-hjbg8d5y.js} +7 -7
  78. package/dist/chunks/{studio-dtmdjmqb.js → studio-j6gnhvaa.js} +4 -4
  79. package/dist/chunks/{studio-d007j0z3.js → studio-mwxgyn9h.js} +6 -6
  80. package/dist/chunks/{studio-36s6qjgq.js → studio-n78gjfy8.js} +4 -4
  81. package/dist/chunks/studio-nbxqcgvf.js +5 -0
  82. package/dist/chunks/{studio-ks0ecgjx.js → studio-nt06yybj.js} +4 -4
  83. package/dist/chunks/{studio-ebt49j3c.js → studio-p7c1agz0.js} +5 -5
  84. package/dist/chunks/{studio-y164brht.js → studio-pwqfmt4p.js} +4 -4
  85. package/dist/chunks/{studio-6zyt56ek.js → studio-r3kaka4d.js} +4 -4
  86. package/dist/chunks/{studio-tj28pxa1.js → studio-semd1s8s.js} +4 -4
  87. package/dist/chunks/studio-skzanb0k.js +5 -0
  88. package/dist/chunks/{studio-z1vdxq0e.js → studio-spf2skgc.js} +4 -4
  89. package/dist/chunks/{studio-7w04zw8h.js → studio-st75kn99.js} +5 -5
  90. package/dist/chunks/{studio-dmymvk2j.js → studio-sxc0zvpt.js} +3 -3
  91. package/dist/chunks/studio-t1eedsyx.js +4 -0
  92. package/dist/chunks/{studio-153mwkyq.js → studio-tp642n5g.js} +4 -4
  93. package/dist/chunks/{studio-r7yeeqc4.js → studio-tw7rre6s.js} +4 -4
  94. package/dist/chunks/{studio-t0v47dpc.js → studio-tzegmy4w.js} +4 -4
  95. package/dist/chunks/studio-vavmwshr.js +5 -0
  96. package/dist/chunks/{studio-805fwp9k.js → studio-wma2c6g8.js} +4 -4
  97. package/dist/chunks/studio-x92tgnee.js +64 -0
  98. package/dist/chunks/studio-xk0z6msk.js +5 -0
  99. package/dist/chunks/{studio-njmg0e73.js → studio-xry7tk3z.js} +5 -5
  100. package/dist/chunks/{studio-sgzss898.js → studio-xta2vxp6.js} +7 -7
  101. package/dist/chunks/{studio-jsr14n1s.js → studio-xy3tv3az.js} +4 -4
  102. package/dist/chunks/{studio-6k1eswp9.js → studio-y7jehjrp.js} +4 -4
  103. package/dist/chunks/{studio-81twpmzj.js → studio-yr04mv2j.js} +4 -4
  104. package/dist/chunks/{studio-gj4j9e7k.js → studio-zd4kayn2.js} +4 -4
  105. package/dist/chunks/{studio-w8w9frjy.js → studio-zpnk016a.js} +12 -12
  106. package/dist/chunks/{tsMode-eq26t9gs.js → tsMode-k9s9fcag.js} +4 -4
  107. package/dist/chunks/workspace-b69mgm0e.js +4 -0
  108. package/dist/chunks/{ws-client-3gxqp06s.js → ws-client-0ja08haa.js} +3 -3
  109. package/dist/manifest.json +62 -62
  110. package/dist/studio.js +95 -95
  111. package/package.json +3 -3
  112. package/src/canvas/stage-scrollbar.ts +7 -7
  113. package/src/files/file-ops.ts +5 -8
  114. package/src/panels/jump-bar.ts +132 -158
  115. package/src/panels/pane-context.ts +8 -8
  116. package/src/panels/pane-grid.ts +18 -26
  117. package/src/panels/style-panel.ts +2 -2
  118. package/src/services/context-manager.ts +41 -70
  119. package/src/services/document-assistant.ts +12 -3
  120. package/src/services/harness/chat-reducer.ts +115 -0
  121. package/src/services/harness/turn-hooks.ts +50 -0
  122. package/src/services/tool-executor.ts +69 -288
  123. package/src/services/tool-outcomes.ts +12 -10
  124. package/src/studio.ts +2 -5
  125. package/src/surfaces/block-action-bar.json +6 -1
  126. package/src/surfaces/jump-bar.json +9 -12
  127. package/src/surfaces/jump-bar.ts +15 -16
  128. package/src/surfaces/pane-context.json +2 -2
  129. package/src/surfaces/pane-grid.json +8 -25
  130. package/src/surfaces/pane-grid.ts +7 -8
  131. package/src/surfaces/statusbar.json +71 -3
  132. package/src/surfaces/statusbar.ts +66 -139
  133. package/src/surfaces/style-panel.json +3 -3
  134. package/src/surfaces/style-panel.ts +11 -1
  135. package/dist/chunks/adapter-6zhjbpmd.js +0 -4
  136. package/dist/chunks/cf-settings-fpa485q3.js +0 -4
  137. package/dist/chunks/components-b0vh4sq8.js +0 -4
  138. package/dist/chunks/content-source-z5t0d0h9.js +0 -4
  139. package/dist/chunks/editor-7e23n4a8.js +0 -4
  140. package/dist/chunks/entry-commands-5cm6aba2.js +0 -4
  141. package/dist/chunks/file-ops-hv7gf757.js +0 -4
  142. package/dist/chunks/files-kb0epdxf.js +0 -4
  143. package/dist/chunks/format-host-eg1wy2bp.js +0 -4
  144. package/dist/chunks/fs-events-ky3vxfmh.js +0 -4
  145. package/dist/chunks/git-panel-yyg3bzp2.js +0 -4
  146. package/dist/chunks/iframe-host-9wdf0hes.js +0 -4
  147. package/dist/chunks/index-2tf0m2ne.js +0 -4
  148. package/dist/chunks/jx-validate-7w11db9v.js +0 -4
  149. package/dist/chunks/layers-7zasrpse.js +0 -4
  150. package/dist/chunks/layers-panel-9nzc4fdq.js +0 -4
  151. package/dist/chunks/lit-html-5qr7nbng.js +0 -4
  152. package/dist/chunks/media-picker-maevn9d4.js +0 -4
  153. package/dist/chunks/menu-wq6q0v3y.js +0 -4
  154. package/dist/chunks/monaco-buffer-9ry2rn5x.js +0 -4
  155. package/dist/chunks/notify-g91gjd6w.js +0 -4
  156. package/dist/chunks/platform-jdwjp2vt.js +0 -4
  157. package/dist/chunks/publish-panel-8yym447p.js +0 -4
  158. package/dist/chunks/quick-search-9bzm9kh3.js +0 -4
  159. package/dist/chunks/references-znssfqvq.js +0 -4
  160. package/dist/chunks/right-panel-czbzktm8.js +0 -4
  161. package/dist/chunks/section-registry-0rtq73qs.js +0 -4
  162. package/dist/chunks/studio-0mm38y62.js +0 -5
  163. package/dist/chunks/studio-27tc8q0h.js +0 -5
  164. package/dist/chunks/studio-7djymzt2.js +0 -5
  165. package/dist/chunks/studio-ant1zbp3.js +0 -5
  166. package/dist/chunks/studio-eb5sty2k.js +0 -5
  167. package/dist/chunks/studio-frv7vjhw.js +0 -5
  168. package/dist/chunks/studio-mb8jhtr4.js +0 -64
  169. package/dist/chunks/studio-nvykrgbj.js +0 -4
  170. package/dist/chunks/studio-nw4q9sdn.js +0 -5
  171. package/dist/chunks/studio-p6avneaq.js +0 -5
  172. package/dist/chunks/studio-vz7b43ng.js +0 -5
  173. package/dist/chunks/workspace-emt8454d.js +0 -4
@@ -0,0 +1,5 @@
1
+ import{p,We}from"./studio-y7jehjrp.js";import{te}from"./studio-ery42sqr.js";import{js,q1}from"./studio-yr04mv2j.js";import{ge,Xa,Q,v,re,k,tl,lh}from"./studio-fqq890ap.js";import{q,ym,kc,Ko,gv,bv,ma,_m,GC,m,u}from"./studio-cvbkkfqb.js";import{qt,wi,Lp,Zt,Dr,ck,Us,dk}from"./studio-1x8x26k3.js";import{hm}from"./studio-c6w3tq7t.js";import{kk,xI,_I,jd,jm}from"./studio-0k9mvpgj.js";import{Xo}from"./studio-spf2skgc.js";import{mc}from"./studio-9mqfamps.js";import{hs,pr}from"./studio-zpnk016a.js";import{la,Cb}from"./studio-xta2vxp6.js";import{vT,rC}from"./studio-ceb34dxj.js";import{wb}from"./studio-n78gjfy8.js";import{K}from"./studio-tp642n5g.js";var X={invokerTags:jm,popoverTags:jd},M="Popover",me={display:"document.repairPopoverDisplay","open-display":"document.repairPopoverDisplay",invoker:"document.repairPopoverInvoker",mode:"document.repairPopoverMode"};function Z(e,r,o,n){let a=`${r}.${o}.${n.join("/")}`,l=e.get(a)??0;return e.set(a,l+1),l===0?a:`${a}#${l}`}function L(e,r){tl((l)=>l.source===M);let o=new Map,n=xI(e,X);for(let l of n){let g=l.fix===void 0?void 0:me[l.fix];k(l.severity,l.message,{detail:l.detail,key:Z(o,"popover",l.rule,l.path),source:M,tier:"problem",...g===void 0?{}:{action:g,actionArgs:{path:l.path}},...r===void 0?{}:{path:r}})}let a=vT(e,X);for(let l of a)k(l.severity,l.message,{detail:l.detail,key:Z(o,"dialog",l.rule,l.path),source:M,tier:"problem",...r===void 0?{}:{path:r}});return n.length+a.length}function z(e,r){let o=r?.path;if(!Array.isArray(o))throw RangeError(`command "${e}" needs a "path" argument naming the popover`);return o}function _(e){let r=u.value;if(!r)throw RangeError(`command "${e}" needs an open document`);return r}function ye(){return[{category:"Document",group:"2_document",id:"document.checkPopovers",level:"document",menus:["palette"],requires:"an open document",run:()=>{let e=_("document.checkPopovers"),r=L(e.doc.document,e.documentPath??void 0);k.success(r===0?"No popover problems found in this document.":`${r} popover problem(s) filed.`,{key:"popover.run",source:M})},title:"Check Popovers",when:(e)=>e.document.open,aiTool:{description:"Check the open document for popover defects an author can fix — a base-rule `display` "+"that defeats the browser's own hiding of a closed popover, `popovertarget` on an "+"element that cannot invoke, a target naming no popover, a cut exit animation — and "+"file each as a Problem. The findings come back as data.",name:"check_popovers",report:()=>{let e=lh(M),r=e.length;return{data:e,summary:r===0?"No popover problems found in this document.":`Filed ${r} popover problem${r===1?"":"s"} in Problems.`}}}},{args:{additionalProperties:!1,properties:{path:{items:{type:["string","number"]},type:"array"}},required:["path"],type:"object"},category:"Document",group:"2_document",id:"document.repairPopoverDisplay",level:"document",menus:[],requires:"a popover whose base rule sets display",run:(e,r)=>{let n=_("document.repairPopoverDisplay"),a=z("document.repairPopoverDisplay",r),l=K(n.doc.document,a),g=_I(l?.style);if(!g)throw RangeError(`command "${"document.repairPopoverDisplay"}": nothing to move — this popover sets no display`);q(n,(h)=>{for(let y of g.base)kc(h,a,y,"");for(let y of g.breakpoints)bv(h,a,[y],"display","");if(g.openDisplay!==null)gv(h,a,":popover-open","display",g.openDisplay)}),k.success("Moved `display` into `:popover-open`.",{key:"popover.repaired.display",source:M})},title:"Move display into :popover-open",when:(e)=>e.document.open},{args:{additionalProperties:!1,properties:{path:{items:{type:["string","number"]},type:"array"}},required:["path"],type:"object"},category:"Document",group:"2_document",id:"document.repairPopoverInvoker",level:"document",menus:[],requires:"an element carrying popovertarget that cannot invoke",run:(e,r)=>{let n=_("document.repairPopoverInvoker"),a=z("document.repairPopoverInvoker",r);q(n,(l)=>{Ko(l,a,"popovertarget"),Ko(l,a,"popovertargetaction")}),k.success("Removed the attributes, which did nothing on this element.",{key:"popover.repaired.invoker",source:M})},title:"Remove the inert popover attributes",when:(e)=>e.document.open},{args:{additionalProperties:!1,properties:{path:{items:{type:["string","number"]},type:"array"}},required:["path"],type:"object"},category:"Document",group:"2_document",id:"document.repairPopoverMode",level:"document",menus:[],requires:"a popover whose mode is not one of the three keywords",run:(e,r)=>{let n=_("document.repairPopoverMode"),a=z("document.repairPopoverMode",r);q(n,(l)=>{Ko(l,a,"popover",kk)}),k.success(`Set \`popover\` to "${kk}".`,{key:"popover.repaired.mode",source:M})},title:"Set popover to auto",when:(e)=>e.document.open}]}function jE(e){e.registerAll(ye())}function bb(e,r){if(e===r)return!0;if(Array.isArray(e)&&Array.isArray(r))return e.length===r.length&&e.every((o,n)=>o===r[n]);if(e!==null&&r!==null&&typeof e==="object"&&typeof r==="object"&&!Array.isArray(e)&&!Array.isArray(r))return e.$ref===r.$ref;return!1}var F="grid://";function ds(e){switch(e.kind){case"pages":return`${F}pages`;case"library":return`${F}library`;case"collection":return`${F}collection/${encodeURIComponent(e.name)}`;default:return`${F}data/${encodeURIComponent(e.connection)}/${encodeURIComponent(e.table)}`}}function he(e){return e.startsWith(F)}function Kf(e){if(!he(e))return null;let r=e.slice(F.length).split("/");if(r[0]==="pages"&&r.length===1)return{kind:"pages"};if(r[0]==="library"&&r.length===1)return{kind:"library"};if(r[0]==="collection"&&r.length===2&&r[1])return{kind:"collection",name:decodeURIComponent(r[1])};if(r[0]==="data"&&r.length===3&&r[1]&&r[2])return{connection:decodeURIComponent(r[1]),kind:"data",table:decodeURIComponent(r[2])};return null}function jw(e){let r=Kf(e);if(!r)return null;switch(r.kind){case"pages":return"Pages · grid";case"library":return"Library";case"collection":return`${r.name} · grid`;default:return`${r.table} @ ${r.connection} · grid`}}var ee=0;function ne(e){let r=e.coalesceMs??800,o=e.now??(()=>Date.now()),n=v({deletes:new Set,errors:new Map,inserts:new Map,pending:new Map,redoStack:[],stale:new Set,undoStack:[]}),a=null,l=(t,i,s)=>{let d=n.errors.get(t);if(d)d.set(i,s);else n.errors.set(t,new Map([[i,s]]))},g=(t,i)=>{let s=n.errors.get(t);if(s?.delete(i),s?.size===0)n.errors.delete(t)},h=(t)=>{if(n.redoStack.length=0,a){a.push(t);return}let i=n.undoStack.at(-1);if(t.kind==="cell"&&i?.kind==="cell"&&i.rowKey===t.rowKey&&i.field===t.field&&t.at-i.at<=r){i.after=t.after,i.at=t.at;return}n.undoStack.push(t)},y=(t,i,s)=>{let d=n.inserts.get(t);if(d){if(s===null)delete d[i];else d[i]=s;return}if(bb(s,e.resolveBaseline(t,i))){let c=n.pending.get(t);if(c?.delete(i),c?.size===0)n.pending.delete(t);return}let f=n.pending.get(t);if(f)f.set(i,{value:s});else n.pending.set(t,new Map([[i,{value:s}]]))},b=(t,i)=>{let s=n.inserts.get(t);if(s)return s[i]??null;let d=n.pending.get(t)?.get(i);return d?d.value:e.resolveBaseline(t,i)},S=(t,i)=>{let s=n.errors.get(t);return s?.get(i)??s?.get("*")??null},G=(t,i)=>{switch(t.kind){case"cell":{y(t.rowKey,t.field,i==="undo"?t.before:t.after);break}case"insert":{if(i==="undo")n.inserts.delete(t.tempKey);else n.inserts.set(t.tempKey,{...t.cells});break}case"drop-insert":{if(i==="undo")n.inserts.set(t.tempKey,{...t.cells});else n.inserts.delete(t.tempKey);break}case"delete":{if(i==="undo")n.deletes.delete(t.rowKey);else n.deletes.add(t.rowKey);break}default:{let s=i==="undo"?t.ops.toReversed():t.ops;for(let d of s)G(d,i);break}}},T=()=>{if(a)throw Error("edit-buffer: groups may not nest");a=[]},C=()=>{let t=a;if(a=null,!t)return;if(t.length===1)n.undoStack.push(t[0]);else if(t.length>1)n.undoStack.push({kind:"group",ops:t})},R=(t)=>{let i=(s)=>{switch(s.kind){case"cell":return t(s.rowKey)?null:s;case"insert":case"drop-insert":return t(s.tempKey)?null:s;case"delete":return t(s.rowKey)?null:s;default:{let d=s.ops.map((f)=>i(f)).filter((f)=>f!==null);return d.length>0?{kind:"group",ops:d}:null}}};n.undoStack=n.undoStack.map(i).filter((s)=>s!==null),n.redoStack=n.redoStack.map(i).filter((s)=>s!==null)};return{applyCommitResult(t){let i=new Set;for(let s of t.cells)if(s.ok){let d=n.pending.get(s.rowKey);if(d?.delete(s.field),d?.size===0)n.pending.delete(s.rowKey);g(s.rowKey,s.field)}else if(l(s.rowKey,s.field,s.error??"Save failed"),s.stale)n.stale.add(s.rowKey);for(let s of t.inserts)if(s.ok)n.inserts.delete(s.tempKey),n.errors.delete(s.tempKey),i.add(s.tempKey);else l(s.tempKey,"*",s.error??"Insert failed");for(let s of t.deletes)if(s.ok)n.deletes.delete(s.rowKey),n.pending.delete(s.rowKey),n.errors.delete(s.rowKey),i.add(s.rowKey);else if(l(s.rowKey,"*",s.error??"Delete failed"),s.stale)n.stale.add(s.rowKey);for(let s of i)n.stale.delete(s);if(i.size>0)R((s)=>i.has(s))},buildBatch(){let t=[];for(let[i,s]of n.pending){if(n.deletes.has(i))continue;for(let[d,f]of s)t.push({baseline:e.resolveBaseline(i,d),field:d,rowKey:i,value:f.value})}return{cells:t,deletes:[...n.deletes].map((i)=>({rowKey:i})),inserts:[...n.inserts].map(([i,s])=>({cells:{...s},tempKey:i}))}},canRedo:()=>n.redoStack.length>0,canUndo:()=>n.undoStack.length>0,cellError:S,cellState(t,i){if(S(t,i)!==null)return"error";if(n.stale.has(t))return"stale";if(n.inserts.has(t)||n.pending.get(t)?.has(i))return"dirty";return"clean"},deleteRow(t){if(n.deletes.has(t))return;let i=n.inserts.get(t);if(i){let s={...i};n.inserts.delete(t),n.errors.delete(t),n.stale.delete(t),h({cells:s,kind:"drop-insert",tempKey:t});return}n.deletes.add(t),h({kind:"delete",rowKey:t})},dirtyCount(){let t=n.inserts.size+n.deletes.size;for(let[i,s]of n.pending)if(!n.deletes.has(i))t+=s.size;return t},discardRow(t){n.pending.delete(t),n.deletes.delete(t),n.inserts.delete(t),n.errors.delete(t),n.stale.delete(t),R((i)=>i===t)},effectiveValue:b,beginGroup:T,endGroup:C,group(t){T();try{t()}finally{C()}},insertRow(t={}){ee+=1;let i=`__new-${ee}`;return n.inserts.set(i,{...t}),h({cells:{...t},kind:"insert",tempKey:i}),i},isDirty:()=>n.pending.size>0||n.inserts.size>0||n.deletes.size>0,isInsertKey:(t)=>n.inserts.has(t),markStale(t){for(let i of t)n.stale.add(i)},redo(){let t=n.redoStack.pop();if(!t)return!1;return G(t,"redo"),n.undoStack.push(t),!0},reset(){n.pending.clear(),n.inserts.clear(),n.deletes.clear(),n.errors.clear(),n.stale.clear(),n.undoStack.length=0,n.redoStack.length=0},rowState(t){if(n.deletes.has(t))return"pending-delete";if(n.inserts.has(t))return"pending-insert";if(n.stale.has(t))return"stale";if(n.pending.has(t)||n.errors.has(t))return"dirty";return"clean"},setCell(t,i,s){let d=b(t,i);if(bb(d,s))return;y(t,i,s),h({after:s,at:o(),before:d,field:i,kind:"cell",rowKey:t})},state:n,undo(){let t=n.undoStack.pop();if(!t)return!1;return G(t,"undo"),n.redoStack.push(t),!0}}}var oe={array:220,boolean:70,date:130,enum:140,image:180,number:110,readonly:200,reference:200,string:180,text:340};function ie(e){return Math.min(340,Math.max(90,Math.round(e*7.5)))}function we(e){if(e.$ref)return"reference";if(e.enum!==void 0&&Array.isArray(e.enum))return"enum";let r=e.type==="array"?void 0:e.format;if(ma(r))return"image";if(r==="date"||r==="date-time")return"date";switch(e.type){case"number":case"integer":return"number";case"boolean":return"boolean";case"array":return"array";case"object":return"readonly";default:return(e.maxLength??0)>200||e.format==="markdown"?"text":"string"}}function se(e){let r=e.replaceAll(/([a-z0-9])([A-Z])/g,"$1 $2").replaceAll(/[_-]+/g," ").trim();return r.charAt(0).toUpperCase()+r.slice(1)}function vb(e,r={}){let o=Object.entries(e?.properties??{}),n=new Set(e?.required),a=new Set(r.readonlyFields),l=o.map(([g,h])=>{let y=a.has(g)?"readonly":we(h),b=Array.isArray(h.enum)?Math.max(...h.enum.map((S)=>String(S).length),4):0;return{editable:y!=="readonly",field:g,kind:y,pk:g===r.idField,required:n.has(g),schema:h,title:se(g),widthHint:y==="enum"?ie(b+3):oe[y]}});return l.sort((g,h)=>{let y=(S)=>S.pk?0:S.required?1:2,b=y(g)-y(h);return b===0?0:b}),l}function yb(e,r=50){let o=e.slice(0,r),n=[];for(let a of o)for(let l of Object.keys(a))if(!n.includes(l))n.push(l);return n.map((a)=>{let l=o.map((y)=>y[a]).filter((y)=>y!==null&&y!==void 0&&y!==""),g=be(l),h=Math.max(...l.map((y)=>Io(y).length),a.length,4);return{editable:!0,field:a,kind:g,title:se(a),widthHint:g==="string"||g==="text"?ie(h):oe[g]}})}function be(e){if(e.length===0)return"string";if(e.some((o)=>Array.isArray(o)))return"array";let r=e.map(String);if(e.every((o)=>typeof o==="boolean")||r.every((o)=>/^(true|false)$/i.test(o)))return"boolean";if(e.every((o)=>typeof o==="number")||r.every((o)=>o.trim()!==""&&!Number.isNaN(Number(o.replaceAll(/[$€£¥,\s]/g,"")))))return"number";if(r.every((o)=>/^\d{4}-\d{2}-\d{2}([T ].*)?$/.test(o)))return"date";if(r.some((o)=>o.length>200))return"text";return"string"}function Iu(e,r){if(e===null||e===void 0)return null;switch(r.kind){case"number":{if(typeof e==="number")return Number.isNaN(e)?null:e;let o=String(e).trim().replaceAll(/[$€£¥,\s]/g,"");if(o==="")return null;let n=Number(o);return Number.isNaN(n)?null:n}case"boolean":{if(typeof e==="boolean")return e;return String(e).trim().toLowerCase()==="true"}case"array":{if(Array.isArray(e))return e.map(String);let o=String(e).trim();return o===""?[]:o.split(",").map((n)=>n.trim()).filter(Boolean)}case"reference":{if(typeof e==="object"&&e!==null&&"$ref"in e){let n=e.$ref;return typeof n==="string"&&n!==""?n:null}let o=String(e).trim();return o===""?null:o}default:{let o=String(e);return o===""?null:o}}}function Io(e){if(e===null||e===void 0)return"";if(Array.isArray(e))return e.join(", ");if(typeof e==="object")return e.$ref;return String(e)}var Hw="__key",U=new WeakMap;function Ha(e){return e?U.get(re(e))??null:null}function Ru(e,r){let o=v({columns:[],error:null,grouping:null,loading:!1,query:{},rows:[],saving:!1,total:0}),n=new Map,a=(t)=>{n=new Map(t.map((i)=>[i.key,i]))},l=ne({resolveBaseline:(t,i)=>n.get(t)?.cells[i]??null}),g=async()=>{let t=await r.rows(o.query);o.rows=t.rows,o.total=t.total,a(t.rows)},h=(t)=>{let i=o.columns.filter((f)=>f.required&&f.editable);if(i.length===0)return null;let s=t.cells.filter((f)=>f.value===null&&i.some((c)=>c.field===f.field)).map((f)=>({error:"Required",field:f.field,ok:!1,rowKey:f.rowKey})),d=t.inserts.filter((f)=>i.some((c)=>f.cells[c.field]===null||f.cells[c.field]===void 0)).map((f)=>({error:`Missing required: ${i.filter((x)=>f.cells[x.field]===null||f.cells[x.field]===void 0).map((x)=>x.field).join(", ")}`,ok:!1,tempKey:f.tempKey}));if(s.length===0&&d.length===0)return null;return{cells:s,deletes:[],inserts:d}},y=(t)=>t===null||t===""||Array.isArray(t)&&t.length===0,b=(t,i,s)=>{if(s==="number")return(typeof t==="number"?t:0)-(typeof i==="number"?i:0);if(s==="boolean")return(t===!0?1:0)-(i===!0?1:0);return Io(t).localeCompare(Io(i))},S=()=>{let t=o.rows.map((d)=>d.key),{dir:i,orderBy:s}=o.query;if(s&&!r.capabilities.remoteSort){let d=o.columns.find((c)=>c.field===s)?.kind,f=i==="desc"?-1:1;t=t.toSorted((c,x)=>{let P=l.effectiveValue(c,s),j=l.effectiveValue(x,s);if(y(P)!==y(j))return y(P)?1:-1;return f*b(P,j,d)})}return o.grouping?[...G(t).values()].flat():t},G=(t)=>{let i=new Map;for(let s of t){let d=Io(l.effectiveValue(s,o.grouping)),f=i.get(d);if(f)f.push(s);else i.set(d,[s])}return i},T=null,C=()=>T?.refreshData(),R={addRow(t={}){let i=l.insertRow(t);return C(),i},bindView(t){T=t},buffer:l,deleteRows(t){if(t.length===0)return;l.group(()=>{for(let i of t)l.deleteRow(i)}),C()},discardRow(t){l.discardRow(t),C()},replaceAll(t,i){if(t==="")return 0;let s=o.columns.filter((c)=>c.editable&&(c.kind==="string"||c.kind==="text")),d=[...o.rows.map((c)=>c.key),...l.state.inserts.keys()],f=0;if(l.group(()=>{for(let c of d){if(l.rowState(c)==="pending-delete")continue;for(let x of s){let P=l.effectiveValue(c,x.field);if(typeof P==="string"&&P.includes(t))l.setCell(c,x.field,P.replaceAll(t,i)),f+=1}}}),f>0)C();return f},effectiveRows(){let t=(d)=>Array.isArray(d)?[...d]:d!==null&&typeof d==="object"?{$ref:d.$ref}:d,i=(d)=>{let f={[Hw]:d};for(let c of o.columns)f[c.field]=t(l.effectiveValue(d,c.field));return f},s=S().map((d)=>i(d));for(let[d]of l.state.inserts)s.push(i(d));return s},groups(){if(!o.grouping)return[];return[...G(S())].map(([t,i])=>({count:i.length,value:t}))},async load(){o.loading=!0,o.error=null;try{o.columns=await r.columns(),await g()}catch(t){o.error=te(t)}finally{o.loading=!1}C()},async refresh(){if(l.isDirty()){if(!await Xo("Refresh Grid",`Discard ${l.dirtyCount()} pending change(s) and reload?`,{confirmLabel:"Discard & Reload",destructive:!0}))return}l.reset(),await r.refresh?.(),await this.load()},async save(){if(o.saving)return;let t=l.buildBatch(),i=t.cells.length+t.inserts.length+t.deletes.length;if(i===0){k.info("No grid changes to save.",{key:"grid.save"});return}let s=h(t);if(s){l.applyCommitResult(s),k.warn("Required cells are empty — fix the marked rows, then save again.",{key:"grid.save",source:"Data",tier:"problem"});return}if(t.deletes.length>0){if(!await Xo("Delete Rows",`Save will permanently delete ${t.deletes.length} row(s). Continue?`,{confirmLabel:"Delete & Save",destructive:!0}))return}let f=new Set(t.cells.map((c)=>c.rowKey)).size+t.inserts.length+t.deletes.length>5?la({title:"Saving grid"}):null;o.saving=!0;try{let c=await r.commit(t),x=(w,V)=>`${w}\x00${V}`,P=new Map(t.cells.map((w)=>[x(w.rowKey,w.field),w]));for(let w of c.cells){let V=P.get(x(w.rowKey,w.field));if(w.ok&&V){let Y=n.get(w.rowKey);if(Y)Y.cells[w.field]=V.value}}if(l.applyCommitResult(c),c.inserts.some((w)=>w.ok)||c.deletes.some((w)=>w.ok))await g();let I=c.cells.filter((w)=>w.ok).length+c.inserts.filter((w)=>w.ok).length+c.deletes.filter((w)=>w.ok).length,H=i-I,W=c.cells.filter((w)=>w.stale).length+c.deletes.filter((w)=>w.stale).length;if(H===0)k.success(`Saved ${I} change(s).`,{key:"grid.save"});else k.error(`Saved ${I} · ${H} failed${W?` (${W} stale)`:""} — kept pending.`,{action:"file.save",key:"grid.save",source:"Data"})}catch(c){k.error("Could not save the grid.",{action:"file.save",detail:te(c),key:"grid.save",source:"Data"})}finally{o.saving=!1,f?.done(),C()}},serializeForSource(){if(!r.serializeForSource)return null;return r.serializeForSource(l.buildBatch())},async setQuery(t){o.query=t,o.loading=!0;try{await g()}catch(i){o.error=te(i)}finally{o.loading=!1}C()},setGrouping(t){o.grouping=t,C()},async setSort(t){let i={...o.query};if(t)i.orderBy=t.field,i.dir=t.dir;else delete i.orderBy,delete i.dir;if(!r.capabilities.remoteSort){o.query=i,C();return}await this.setQuery(i)},source:r,state:o,tab:e};return e.scope.run(()=>{Q(()=>{e.doc.dirty=l.isDirty()}),ym(e,{canRedo:()=>l.canRedo(),canUndo:()=>l.canUndo(),redo:()=>{l.redo(),C()},undo:()=>{l.undo(),C()}});let t=p();if(t.subscribeFileEvents&&r.backingPaths){let i=t.subscribeFileEvents((s)=>{let d=r.backingPaths(),f=new Set;for(let c of s){if(c.isDir)continue;let x=c.path.replaceAll("\\","/"),P=d.get(x);if(P!==void 0&&!mc(x))f.add(P)}if(f.size===0)return;if(l.isDirty()){let c=f.has("*")?o.rows.map((x)=>x.key):[...f];l.markStale(c),k.warn("Grid rows changed on disk — marked stale; refresh to reload.",{key:"grid.stale",source:"Data"}),C()}else R.refresh()});Xa(i)}Xa(()=>{ym(e,null),U.delete(re(e)),r.dispose?.()})}),U.set(re(e),R),R}async function md(e){let o=Ha(e)?.serializeForSource();if(o)return o;await qt();let n=wi(e.doc.sourceFormat);if(n?.capabilities.serialize){let a=e.doc.content?.frontmatter||{},l=e.doc.document,g={...a,...l,children:l.children??[]};return Us(n.name,g,{mode:"roundtrip"})}if(e.doc.mode==="content"){let a=Dr();if(a){let l=e.doc.content?.frontmatter??{},g=Object.keys(l).length>0,h={...l,...e.doc.document};return Us(a.name,h,{frontmatter:g,mode:"roundtrip"})}}return pr(e.doc.document,e.doc.layout??null)}var ve=200,ke=500,Ce=2097152,D=new Map,B=!1,N=null,E=null,O=null,J=null;function xe(){let e=[];for(let r of m.tabs.values())if(r.doc.dirty&&r.documentPath)e.push(r);return e}async function le(){if(!We())return;let e=p();if(!e.setPreviewOverlay||!e.clearPreviewOverlay)return;let r=new Set;for(let o of xe()){let n=o.documentPath.replace(/^\.\//,""),a;try{a=await md(o)}catch{continue}if(a.length>Ce)continue;if(r.add(n),D.get(n)===a)continue;D.set(n,a),await e.setPreviewOverlay(n,a)}for(let o of D.keys())if(!r.has(o))D.delete(o),await e.clearPreviewOverlay(o)}function ae(){if(!B)return;let e=Date.now();if(O??=e,E)clearTimeout(E);let r=e-O,o=Math.max(0,Math.min(ve,ke-r));E=setTimeout(()=>{E=null,O=null,J=le().finally(()=>{J=null})},o)}function HE(){ae()}function BE(){if(B)return;B=!0,N=ge(),N.run(()=>{Q(()=>{for(let e of m.tabs.values())e.doc.dirty,e.doc.document;ae()})})}function zE(){if(B=!1,E)clearTimeout(E),E=null;O=null,N?.stop(),N=null,D.clear()}async function Bw(){if(!B)return;if(E)clearTimeout(E),E=null,O=null;await J,await le()}var de=/^[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$/,Se=new Set(["vnd","prs","x"]);function Pe(e){if(typeof e!=="string")return null;let[r,...o]=e.split(";"),n=(r??"").indexOf("/");if(n===-1)return null;let a=(r??"").slice(0,n).trim().toLowerCase(),l=(r??"").slice(n+1).trim().toLowerCase();if(!de.test(a)||!de.test(l))return null;let g=l.lastIndexOf("+"),h=g===-1?null:l.slice(g+1),y=g===-1?l:l.slice(0,g);if(h==="")return null;let b=y.indexOf("."),S=b===-1?null:y.slice(0,b),G=S!==null&&Se.has(S)?S:null,T=G===null?y:y.slice(G.length+1);if(T==="")return null;let C={};for(let R of o){let t=R.indexOf("=");if(t===-1)return null;let i=R.slice(0,t).trim().toLowerCase(),s=R.slice(t+1).trim();if(i==="")return null;if(s.startsWith('"')&&s.endsWith('"')&&s.length>=2)s=s.slice(1,-1);C[i]=s}return{parameters:C,subtype:T,suffix:h,tree:G,type:a}}function zw(e){let r=Pe(e);if(r===null)return null;let o=r.tree===null?"":`${r.tree}.`,n=r.suffix===null?"":`+${r.suffix}`;return`${r.type}/${o}${r.subtype}${n}`}var ce="text/markdown; variant=GFM",ue="application/yaml",ct={".markdown":`${ce}; charset=utf-8`,".md":`${ce}; charset=utf-8`,".yaml":`${ue}; charset=utf-8`,".yml":`${ue}; charset=utf-8`};async function Ge(e,r){let o=await ck(e.name,r);return dk(e,o)}async function Er(e,r){await qt();let o=Zt(e);if(!o||!o.capabilities.parse)throw Lp(e);return{...await Ge(o,r),format:o}}var D1=async(e,r)=>{if(e.documentPath&&Zt(e.documentPath)){let n=await Er(e.documentPath,r);return{document:n.document,frontmatter:n.frontmatter}}let o=hs(r);return e.doc.layout=o.layout,{document:o.document}};var fe=()=>{};function A1(e){fe=e}function A(e){let r=e.doc.document;fe(e.documentPath,r);let o=typeof r.tagName==="string"&&r.tagName.includes("-")?wb(r):null;if(o)k.warn(o,{key:`slots:${e.documentPath??e.id}`,...e.documentPath===null?{}:{path:e.documentPath},source:"Components",tier:"problem"});L(r,e.documentPath??void 0)}function Re(e){return!hm(e.documentPath??"")}async function op(e=u.value){if(!e)return!1;if(await rC(e.id),_m(e))return k.warn(`You have read access to this session — changes to ${e.documentPath??"this document"} stay in your browser and cannot be saved.`,{action:"file.save",key:`save.readOnly:${e.documentPath??e.id}`,...e.documentPath===null?{}:{path:e.documentPath},source:"Collaboration"}),!1;if(!Re(e))return k.warn(`${e.documentPath??"This file"} is a media file, so there is no document for Save to write.`,{key:`save.notADocument:${e.documentPath??e.id}`,...e.documentPath===null?{}:{path:e.documentPath},source:"Save"}),!1;let r=Ha(e);if(r)return await r.save(),!e.doc.dirty;try{if(await GC(e))return A(e),!0;let o=await md(e);if(e.documentPath)return await p().writeFile(e.documentPath,o),e.doc.dirty=!1,Bw(),A(e),!0;if(e.fileHandle&&"createWritable"in e.fileHandle){let n=await e.fileHandle.createWritable();return await n.write(o),await n.close(),e.doc.dirty=!1,A(e),!0}k.warn("This document has no save target — use Export.",{key:"save.noTarget"})}catch(o){if(!(o instanceof Error&&o.name==="AbortError"))k.error(`Could not save ${e.documentPath??e.id}.`,{action:"file.save",detail:te(o),key:`save:${e.documentPath??e.id}`,...e.documentPath===null?{}:{path:e.documentPath},source:"Save"})}return!1}function Ee(e){return wi(e.doc.sourceFormat)??(e.doc.mode==="content"?Dr():void 0)}async function N1(){let e=u.value;if(!e)return;try{await qt();let r=Ee(e),o=await md(e),n=r?zw(r.mediaType)??"text/plain":"application/json",a=r?r.extensions[0]:".json",l=r?r.name:"Jx Component",g=r?`content${a}`:"component.json";if("showSaveFilePicker"in window){let h=e.documentPath?e.documentPath.split("/").pop():g,y=await window.showSaveFilePicker({suggestedName:h,types:[{accept:{[n]:[a]},description:l}]}),b=await y.createWritable();await b.write(o),await b.close(),e.doc.dirty=!1,A(e),k.success(`Exported as ${y.name}.`)}else{let h=new Blob([o],{type:n}),y=URL.createObjectURL(h),b=document.createElement("a");b.href=y,b.download=g,b.click(),URL.revokeObjectURL(y),e.doc.dirty=!1,A(e),k.success(`Downloaded ${g}.`)}}catch(r){if(!(r instanceof Error&&r.name==="AbortError"))k.error("Could not export the document.",{detail:te(r),source:"Export"})}}async function pe(e,r){let o=hm(e)?await Cb(e):await js({path:e});return q1(o,r)??""}async function Jf(e){let r=await pe(e.path,"delete"),o=`Delete ${e.name}? This cannot be undone.`;return Boolean(await Xo("Delete File",r===""?o:`${o} ${r}`,{confirmLabel:"Delete",destructive:!0}))}async function Yf(e,r="rename"){let o=await pe(e,r);return o===""?void 0:o}
2
+ export{bb,ds,Kf,jw,vb,yb,Iu,Io,Hw,Ha,Ru,jE,md,HE,BE,zE,Bw,zw,Er,D1,A1,op,N1,Jf,Yf};
3
+
4
+ //# debugId=1F31F44B7CF0874464756E2164756E21
5
+ //# sourceMappingURL=studio-skzanb0k.js.map
@@ -1,5 +1,5 @@
1
- import{tt,Oi}from"./studio-dmymvk2j.js";import{SI,Wx,hn,sn,Hm,II,ne}from"./studio-dknr8m7b.js";import{ge,Q,v,$c,S,zd}from"./studio-0nm2skex.js";import{te}from"./studio-ery42sqr.js";var rt="data-jx-region",ce=["rail","navigator","inspector","pane","dock.bottom","statusbar","commandbar","overlay"],de=new Set(["dock.bottom"]);function ue(e){let t=e.indexOf("/"),o=t===-1?e:e.slice(0,t),n=t===-1?void 0:e.slice(t+1);if(n===""||o==="")return null;let a=o,i;if(!de.has(o)){let s=o.indexOf(".");if(s!==-1){if(a=o.slice(0,s),i=o.slice(s+1),i==="")return null}}if(!ce.includes(a))return null;return i===void 0?n===void 0?{surface:a}:{part:n,surface:a}:n===void 0?{instance:i,surface:a}:{instance:i,part:n,surface:a}}function fe(e){return ue(e)!==null}function me(e){if(e==="pane")return"pane.primary";return e.startsWith("pane/")?`pane.primary/${e.slice(5)}`:e}function B(e){return e??document}var pe=[{locate:([,e],t)=>{let n=Rp(`inspector/field:${e}`,t)?.querySelector('[part="browse"]');return n?[n]:[]},pattern:/^inspector\/field:(.+)\/browse$/},{locate:([,e],t)=>{let o=Rp("inspector",t);return o?[...o.querySelectorAll(`[data-prop="${CSS.escape(e)}"]`)]:[]},pattern:/^inspector\/field:(.+)$/}];function ve(e,t){let o=me(e);if(!fe(o))return[];let n=[...B(t).querySelectorAll(`[data-jx-region="${CSS.escape(o)}"]`)];if(n.length>0)return n;for(let a of pe){let i=o.match(a.pattern);if(i)return a.locate(i,B(t))}return[]}function Rp(e,t){return ve(e,t).at(-1)??null}var bS={dock:"dock.bottom",inspector:"inspector",navigator:"navigator",pane:"pane.primary",rail:"rail",status:"statusbar"};function xi(e,t){return t?`pane.${e}/${t}`:`pane.${e}`}function bI(e){return xi(e,"tabs")}function vI(e){return`navigator/panel:${e}`}function yI(e){return`inspector/tab:${e}`}var wI="navigator/statements";function xI(e){return`inspector/statements:${e}`}function Lv(e){return`dock.bottom/panel:${e}`}var he={dialog:"dialog",modal:"dialog",popover:"menu",toast:"toasts"};function zt(e,t){let o=he[e];return t?`overlay.${o}:${t}`:`overlay.${o}`}var k=new Map,Y=1;function X(e){let t=Y;return Y+=1,k.set(t,{...e,id:t}),t}function H(e){k.delete(e)}function Z(){return[...k.values()]}function mI(e){let t=e.toLowerCase();return Z().filter((o)=>o.elements.has(t))}function gI(e){return Z().filter((t)=>t.name===e)}var P=null;function gS(e=document){return P??=II({document:e}),P}function ee(){return P??gS()}var L="jx-studio:/surfaces/",w=new Map;function T(e,t){w.set(e,t),Wx(ye(e),t)}function ye(e){return`${L}${e}.json`}function _I(e){return w.get(e)}function be(e){if(!e.startsWith(L)||!e.endsWith(".json"))return;return w.get(e.slice(L.length,-5))}async function R(e,t,o,n={}){let a=w.get(e);if(!a)throw Error(`Studio surface "${e}" is not registered`);if(await ee(),n.region)o.setAttribute(rt,n.region);let i=await SI(a,o,{scope:t,base:L,resolver:be,...n.onNodeCreated?{onNodeCreated:n.onNodeCreated}:{},...n.onNodeMoved?{onNodeMoved:n.onNodeMoved}:{},...n.signal?{signal:n.signal}:{}}),s=(r)=>({dispose:r,elements:i.elements,root:i.root,scope:i.scope});if(n.signal?.aborted)return s(i.dispose);let d=0,l=()=>{i.dispose(),H(d)};return d=X({elements:i.elements,host:o,name:e,remount:async()=>{l(),await R(e,t,o,n)}}),n.signal?.addEventListener("abort",()=>H(d),{once:!0}),s(l)}var oe={$schema:"https://jxsuite.com/schema/v1",$id:"StudioDialog",$description:"Studio's confirm, save-or-discard and prompt dialogs: one jx-dialog whose body is projected from the adapter's scope. `message` is a sentence; `choice` is a `jx-select` over the options; `field` is the prompt's jx-textfield with its refusal. The four answers call the host's functions, and the host decides when the dialog closes.",tagName:"jx-dialog",$props:{headline:{$ref:"#/state/headline"},confirmLabel:{$ref:"#/state/confirmLabel"},secondaryLabel:{$ref:"#/state/secondaryLabel"},cancelLabel:{$ref:"#/state/cancelLabel"},destructive:{$ref:"#/state/destructive"},size:{$ref:"#/state/size"}},attributes:{headline:"${state.headline}","confirm-label":"${state.confirmLabel || null}","secondary-label":"${state.secondaryLabel || null}","cancel-label":"${state.cancelLabel || null}",part:"dialog-host"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]},onsecondary:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/secondary"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{'& [part="message"]':{$description:"The one part of a dialog that is text rather than interface, so it opts back in to selection. The root sets `user-select: none` and `styles/tokens.json` restates it on every `dialog`, so the headline, the labels and the buttons around this sentence stay unselectable; a message is often the thing a reader copies into a search or a bug report.",margin:"0 0 var(--jx-space-3)",userSelect:"text"},'& [part="message"]:last-child':{margin:"0"},'& [part="island"] > p, & [part="island"] > span, & [part="island"] > strong, & [part="island"] > em, & [part="island"] > code':{$description:"The island's own prose is the message's other form — a body richer than a sentence, written straight into the island from a lit template (studio-ui-guidelines.md §9.4) — so it is selectable for the same reason `[part=\"message\"]` is. The opt-in stops at those children because the island is ALSO the mount point for a whole document: the Open Grid picker and Push Schema's plan put their surfaces here, and `user-select` inherits, so a rule on the island itself would hand selection to every heading, source row and button they draw, which is the interface the policy exists to keep unselectable. A mounted surface roots a `div`; a message writes paragraphs and text-level spans, so the two forms are told apart by the child that arrives.",userSelect:"text"},'& [part="island"]:empty':{display:"none"},'& [part="message-slot"], & [part="choice-slot"], & [part="field-slot"]':{display:"contents"},'& [part="choice-row"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",margin:"0 0 var(--jx-space-3)"},'& [part="choice-label"]':{fontSize:"var(--jx-text-sm)",color:"var(--jx-fg-dim)"},"& jx-textfield":{width:"100%"}},children:[{tagName:"div",attributes:{part:"message-slot",role:"none"},$switch:{$ref:"#/state/hasMessage"},cases:{true:{tagName:"p",attributes:{part:"message"},textContent:"${state.message}"}}},{tagName:"div",attributes:{part:"island"}},{tagName:"div",attributes:{part:"choice-slot",role:"none"},$switch:{$ref:"#/state/hasChoice"},cases:{true:{tagName:"div",attributes:{part:"choice-row"},children:[{tagName:"span",attributes:{part:"choice-label"},textContent:"${state.choiceLabel}"},{tagName:"jx-select",$props:{label:{$ref:"#/state/choiceLabel"},options:{$ref:"#/state/options"},value:{$ref:"#/state/chosen"}},attributes:{part:"choice"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pick"},value:[{$ref:"event#/target/value"}]}]}}]}}},{tagName:"div",attributes:{part:"field-slot",role:"none"},$switch:{$ref:"#/state/hasField"},cases:{true:{tagName:"jx-textfield",$props:{label:{$ref:"#/state/headline"},value:{$ref:"#/state/value"},placeholder:{$ref:"#/state/placeholder"},invalid:{$ref:"#/state/invalid"},error:{$ref:"#/state/error"},multiline:{$ref:"#/state/multiline"},rows:{$ref:"#/state/rows"},mono:{$ref:"#/state/mono"}},attributes:{part:"field"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/input"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"#/state/singleLine"},cases:{true:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]}}]}}]},$description:"The prompt's one field. `multiline` is what makes it a paste box rather than a line: an import the author copied out of a `_redirects` file is column-aligned, so it also asks for `mono`. A multiline field takes Enter as a newline, which is why the Enter-confirms handler below is guarded on it — a paste box whose second line submits the dialog cannot be typed into."}}}]};T("dialog",oe);function Nn(e){if(e.querySelector('[part="dialog"]'))return Promise.resolve(e);return new Promise((t)=>{e.addEventListener("jx-ready",function o(n){if(n.target!==e&&!e.querySelector('[part="dialog"]'))return;e.removeEventListener("jx-ready",o),t(e)})})}function bs(e){let t=document.createElement("div");t.style.pointerEvents="auto",t.setAttribute(rt,zt("dialog",e.region)),e.layer.append(t);let o=v({cancel:()=>{e.onCancel()},cancelLabel:e.cancelLabel,choiceLabel:e.choice?.label??"",chosen:e.choice?.chosen??"",closed:()=>{e.onClosed()},confirm:()=>{e.onConfirm()},confirmLabel:e.confirmLabel,destructive:e.destructive===!0,error:"",hasChoice:e.choice!==void 0,hasField:e.field!==void 0,mono:e.field?.mono===!0,multiline:e.field?.multiline===!0,rows:e.field?.rows??"3",singleLine:e.field!==void 0&&e.field.multiline!==!0?"true":"false",hasMessage:e.message!==void 0&&e.message!=="",headline:e.headline,input:(r)=>{o.value=r,e.onInput?.(r)},invalid:!1,message:e.message??"",options:e.choice?.options??[],pick:(r)=>{e.onPick?.(r)},placeholder:e.field?.placeholder??"",secondary:()=>{e.onSecondary?.()},secondaryLabel:e.secondaryLabel??"",size:e.size??"sm",value:e.field?.value??""}),n=null,a=!1,i=()=>{},s=new Promise((r)=>{i=r}),l=R("dialog",o,t).then(async(r)=>{let c=r.root;if(a)return r.dispose(),c;if(n=r,await Promise.race([Nn(c),s]),a)return c;if(e.island?.(c.querySelector('[part="island"]')??c),hn(c),e.field){let y=c.querySelector("jx-textfield");if(y)setTimeout(()=>{if(!a)Hm(y,e.field?.select??"all")},0)}return c});return{close(){if(a)return;a=!0,i();let r=n?.root;if(r instanceof HTMLElement)sn(r);n?.dispose(),n=null,t.remove()},host:t,ready:l,update(r){if(r.confirmLabel!==void 0)o.confirmLabel=r.confirmLabel;if(r.cancelLabel!==void 0)o.cancelLabel=r.cancelLabel;if(r.secondaryLabel!==void 0)o.secondaryLabel=r.secondaryLabel;if(r.message!==void 0)o.message=r.message,o.hasMessage=r.message!=="";if(r.value!==void 0)o.value=r.value;if(r.placeholder!==void 0)o.placeholder=r.placeholder;if(r.invalid!==void 0)o.invalid=r.invalid;if(r.error!==void 0)if(r.error!==""&&r.error===o.error){o.error="";let c=r.error;queueMicrotask(()=>{o.error=c})}else o.error=r.error;if(r.options!==void 0)o.options=r.options;if(r.chosen!==void 0)o.chosen=r.chosen}}}var re={$schema:"https://jxsuite.com/schema/v1",$id:"StudioToasts",$description:"The toast stack: a rendering of the notification service's toasts, newest last. Each row is projected by ui/layers.ts with its severity glyph and, where a recovery command exists, that command's title and gate; the two buttons call back into the host, which owns the records and their timers.",tagName:"div",attributes:{part:"stack"},style:{position:"absolute",right:"var(--jx-space-4)",bottom:"36px",display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",alignItems:"flex-end",maxWidth:"min(420px, calc(100vw - 24px))",'& [part="toast"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",pointerEvents:"auto",padding:"var(--jx-space-3)",border:"1px solid var(--jx-border)",borderLeft:"3px solid var(--jx-fg-dim)",borderRadius:"var(--jx-radius-md)",background:"var(--jx-bg-panel)",color:"var(--jx-fg)",fontSize:"var(--jx-text-sm)",lineHeight:"var(--jx-leading-sm)",boxShadow:"var(--jx-shadow-popover)"},'& [part="toast"][data-severity="success"]':{borderLeftColor:"var(--jx-success)"},'& [part="toast"][data-severity="info"]':{borderLeftColor:"var(--jx-accent)"},'& [part="toast"][data-severity="warn"]':{borderLeftColor:"var(--jx-warning)"},'& [part="toast"][data-severity="error"]':{borderLeftColor:"var(--jx-danger)"},'& [part="icon"]':{flex:"none",width:"14px",textAlign:"center",fontWeight:"700"},'& [data-severity="success"] [part="icon"]':{color:"var(--jx-success)"},'& [data-severity="info"] [part="icon"]':{color:"var(--jx-accent)"},'& [data-severity="warn"] [part="icon"]':{color:"var(--jx-warning)"},'& [data-severity="error"] [part="icon"]':{color:"var(--jx-danger)"},'& [part="message"]':{flex:"1",minWidth:"0",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3"},'& [part="action-slot"]':{display:"contents"},'& [part="action"] > [part="control"]':{color:"var(--jx-accent)"}},children:[{$prototype:"Array",items:{$ref:"#/state/toasts"},key:{$ref:"$map/item/id"},map:{tagName:"div",attributes:{part:"toast","data-severity":"${$map.item.severity}"},children:[{tagName:"span",attributes:{part:"icon","aria-hidden":"true"},textContent:"${$map.item.icon}"},{tagName:"span",attributes:{part:"message"},textContent:"${$map.item.message}"},{tagName:"span",attributes:{part:"action-slot",role:"none"},$switch:{$ref:"$map/item/hasAction"},cases:{true:{tagName:"jx-button",$props:{size:"sm",quiet:!0,disabled:{$ref:"$map/item/actionDisabled"}},attributes:{part:"action",title:"${$map.item.actionTitle}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runAction"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.actionLabel}"}]}}},{tagName:"jx-action-button",$props:{label:"Dismiss notification",hint:"Dismiss notification",icon:"x",size:"sm"},attributes:{part:"dismiss"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/dismissToast"},value:[{$ref:"$map/item/id"}]}]}}]}}]};function $e(e){return e instanceof RangeError||e instanceof Error&&e.name==="CommandUnavailableError"}function rn(e,t,o,n=t){let a=(s)=>{if(!$e(s))console.error(`${n}: command "${t}" failed`,s);S.error(te(s),{key:`command.run:${t}`,source:n})},i;try{i=e.run(t,o)}catch(s){return a(s),Promise.resolve()}return Promise.resolve(i).catch(a)}function Rc(e,t,o){let n=ne();return n?rn(n,e,t,o):Promise.resolve()}var se,F,q,M;function Ct(e){return(e==="popover"?se:e==="modal"?F:e==="toast"?M:q)||document.body}function vS(){se=document.querySelector("#layer-popover"),F=document.querySelector("#layer-modal"),q=document.querySelector("#layer-dialog"),M=document.querySelector("#layer-toast"),Ce()}var ae="jx-dialog[data-open], dialog[open]";function Mm(){return Boolean(q?.querySelector(ae)||F?.querySelector(ae))}function Qo(e,t,o={}){let{confirmLabel:n="Confirm",cancelLabel:a="Cancel",destructive:i=!1}=o;return new Promise((s)=>{let d=!1,l=(c)=>{if(d)return;d=!0,r.close(),s(c)},r=bs({cancelLabel:a,confirmLabel:n,destructive:i,headline:e,layer:Ct("dialog"),...G(t),onCancel:()=>l(!1),onClosed:()=>l(!1),onConfirm:()=>l(!0)})})}function zx(e,t,o={}){let{saveLabel:n="Save",discardLabel:a="Discard",cancelLabel:i="Cancel"}=o;return new Promise((s)=>{let d=!1,l=(c)=>{if(d)return;d=!0,r.close(),s(c)},r=bs({cancelLabel:i,confirmLabel:n,headline:e,layer:Ct("dialog"),...G(t),onCancel:()=>l("cancel"),onClosed:()=>l("cancel"),onConfirm:()=>l("save"),onSecondary:()=>l("discard"),secondaryLabel:a})})}function G(e){if(typeof e==="string")return{message:e};return{island:(t)=>{Oi(e,t)}}}function On(e,t={}){let{cancelLabel:o="Cancel",choice:n,confirmLabel:a="OK",message:i,mono:s=!1,multiline:d=!1,placeholder:l="",rows:r="3",select:c="all",size:y,validate:J,value:le=""}=t,O=(m)=>J?J(m,b):m.trim()?"":"Enter a value.",p=le,b=n?.initial??"",f="",U=!1,z=()=>typeof l==="function"?l():l,W=()=>n?n.options().map((m)=>({label:m.label,value:m.value})):[];return new Promise((m)=>{let V=!1,N=(u)=>{if(V)return;V=!0,A.close(),m(u)},K=(u)=>{f=u,A.update({error:f,invalid:f!==""})},A=bs({cancelLabel:o,confirmLabel:a,headline:e,layer:Ct("dialog"),...i===void 0?{}:G(i),...n?{choice:{chosen:b,label:n.label,options:W()}}:{},field:{mono:s,multiline:d,placeholder:z(),rows:r,select:c,value:p},...y===void 0?{}:{size:y},onCancel:()=>N(null),onClosed:()=>N(null),onConfirm:()=>{let u=O(p);if(u){K(u);return}N(p.trim())},onInput:(u)=>{U=!0,p=u;let x=O(p);if(x!==f)K(x)},onPick:(u)=>{b=u,n?.onChange?.(u);let x=O(p);f=U||f?x:"",A.update({chosen:b,error:f,invalid:f!=="",options:W(),placeholder:z()})}})})}var C=new Map;function vs(e,t){let o=`${e}:${t}`,n=C.get(o);if(n&&n.parentElement)return n;return n=document.createElement("div"),n.style.pointerEvents="auto",n.setAttribute(rt,zt(e,t)),Ct(e).append(n),C.set(o,n),n}function Pm(e,t){let o=`${e}:${t}`,n=C.get(o);if(n)Oi(tt,n),n.remove(),C.delete(o)}var Re=180,Le={error:"✕",info:"ℹ",success:"✓",warn:"!"},j=null,h=new Map,g=new Set;function Te(){return globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0}function we(){try{return new URLSearchParams(globalThis.location?.search??"").get("automation")==="1"}catch{return!1}}function yS(){return[...g].map((e)=>`overlay: toast ${e} settling in`)}function _(e){let t=h.get(e);if(t!==void 0)clearTimeout(t),h.delete(e);g.delete(e),zd(e)}function Ee(e){if(h.has(e.id)||g.has(e.id))return;let t=Te()?0:Re;if(t>0)g.add(e.id),setTimeout(()=>g.delete(e.id),t);let o=e.timeoutMs??0;if(o<=0||we())return;h.set(e.id,setTimeout(()=>_(e.id),o))}T("toasts",re);var I=null,D=null,E=null;function ie(){return I??=v({dismissToast:(e)=>{_(e)},runAction:(e)=>{let t=$c.find((n)=>n.id===e),o=ne();if(!t?.action||!o)return;_(e),rn(o,t.action,t.actionArgs,"Notifications")},toasts:[]}),I}function Me(e){let t=e.action===void 0?null:ne(),o=e.action,n=t&&o!==void 0?t.get(o):void 0,a=n&&o!==void 0&&t.isVisible(o)?n:null,i=a&&o!==void 0?t.disabledReason(o):void 0;return{actionDisabled:i!==void 0,actionLabel:a?.title??"",actionTitle:a===null||a===void 0?"":i===void 0?a.title:`${a.title} — requires ${i}`,hasAction:a!==null&&a!==void 0,icon:Le[e.severity],id:e.id,message:e.message,severity:e.severity}}function Ce(){if(je(),!M)return;j=ge(),j.run(()=>{Q(()=>{$c.length,ne();for(let e of $c)Ee(e);ie().toasts=$c.map((e)=>Me(e))})}),D=R("toasts",ie(),M),D.then((e)=>{E=e})}function je(){j?.stop(),j=null;for(let t of h.values())clearTimeout(t);h.clear(),g.clear();let e=D;if(D=null,E)E.dispose(),E=null;else if(e)e.then((t)=>t.dispose());I=null}
2
- export{mI,gI,gS,rt,Rp,bS,xi,bI,vI,yI,wI,xI,Lv,zt,T,_I,R,Nn,bs,rn,Rc,Ct,vS,Mm,Qo,zx,On,vs,Pm,yS};
1
+ import{tt,Ni}from"./studio-sxc0zvpt.js";import{vI,zx,un,rn,Pm,CI,ne}from"./studio-0k9mvpgj.js";import{ge,Q,v,$c,k,Wd}from"./studio-fqq890ap.js";import{te}from"./studio-ery42sqr.js";var rt="data-jx-region",ce=["rail","navigator","inspector","pane","dock.bottom","statusbar","commandbar","overlay"],de=new Set(["dock.bottom"]);function ue(e){let t=e.indexOf("/"),o=t===-1?e:e.slice(0,t),n=t===-1?void 0:e.slice(t+1);if(n===""||o==="")return null;let a=o,i;if(!de.has(o)){let s=o.indexOf(".");if(s!==-1){if(a=o.slice(0,s),i=o.slice(s+1),i==="")return null}}if(!ce.includes(a))return null;return i===void 0?n===void 0?{surface:a}:{part:n,surface:a}:n===void 0?{instance:i,surface:a}:{instance:i,part:n,surface:a}}function fe(e){return ue(e)!==null}function me(e){if(e==="pane")return"pane.primary";return e.startsWith("pane/")?`pane.primary/${e.slice(5)}`:e}function B(e){return e??document}var pe=[{locate:([,e],t)=>{let n=Ip(`inspector/field:${e}`,t)?.querySelector('[part="browse"]');return n?[n]:[]},pattern:/^inspector\/field:(.+)\/browse$/},{locate:([,e],t)=>{let o=Ip("inspector",t);return o?[...o.querySelectorAll(`[data-prop="${CSS.escape(e)}"]`)]:[]},pattern:/^inspector\/field:(.+)$/}];function ve(e,t){let o=me(e);if(!fe(o))return[];let n=[...B(t).querySelectorAll(`[data-jx-region="${CSS.escape(o)}"]`)];if(n.length>0)return n;for(let a of pe){let i=o.match(a.pattern);if(i)return a.locate(i,B(t))}return[]}function Ip(e,t){return ve(e,t).at(-1)??null}var fk={dock:"dock.bottom",inspector:"inspector",navigator:"navigator",pane:"pane.primary",rail:"rail",status:"statusbar"};function Zi(e,t){return t?`pane.${e}/${t}`:`pane.${e}`}function uI(e){return Zi(e,"tabs")}function hI(e){return`navigator/panel:${e}`}function pI(e){return`inspector/tab:${e}`}var fI="navigator/statements";function mI(e){return`inspector/statements:${e}`}function Iv(e){return`dock.bottom/panel:${e}`}var he={dialog:"dialog",modal:"dialog",popover:"menu",toast:"toasts"};function zt(e,t){let o=he[e];return t?`overlay.${o}:${t}`:`overlay.${o}`}var A=new Map,Y=1;function X(e){let t=Y;return Y+=1,A.set(t,{...e,id:t}),t}function H(e){A.delete(e)}function Z(){return[...A.values()]}function cI(e){let t=e.toLowerCase();return Z().filter((o)=>o.elements.has(t))}function dI(e){return Z().filter((t)=>t.name===e)}var P=null;function pk(e=document){return P??=CI({document:e}),P}function ee(){return P??pk()}var S="jx-studio:/surfaces/",L=new Map;function T(e,t){L.set(e,t),zx(ye(e),t)}function ye(e){return`${S}${e}.json`}function gI(e){return L.get(e)}function be(e){if(!e.startsWith(S)||!e.endsWith(".json"))return;return L.get(e.slice(S.length,-5))}async function R(e,t,o,n={}){let a=L.get(e);if(!a)throw Error(`Studio surface "${e}" is not registered`);if(await ee(),n.region)o.setAttribute(rt,n.region);let i=await vI(a,o,{scope:t,base:S,resolver:be,...n.onNodeCreated?{onNodeCreated:n.onNodeCreated}:{},...n.onNodeMoved?{onNodeMoved:n.onNodeMoved}:{},...n.signal?{signal:n.signal}:{}}),s=(r)=>({dispose:r,elements:i.elements,root:i.root,scope:i.scope});if(n.signal?.aborted)return s(i.dispose);let d=0,l=()=>{i.dispose(),H(d)};return d=X({elements:i.elements,host:o,name:e,remount:async()=>{l(),await R(e,t,o,n)}}),n.signal?.addEventListener("abort",()=>H(d),{once:!0}),s(l)}var oe={$schema:"https://jxsuite.com/schema/v1",$id:"StudioDialog",$description:"Studio's confirm, save-or-discard and prompt dialogs: one jx-dialog whose body is projected from the adapter's scope. `message` is a sentence; `choice` is a `jx-select` over the options; `field` is the prompt's jx-textfield with its refusal. The four answers call the host's functions, and the host decides when the dialog closes.",tagName:"jx-dialog",$props:{headline:{$ref:"#/state/headline"},confirmLabel:{$ref:"#/state/confirmLabel"},secondaryLabel:{$ref:"#/state/secondaryLabel"},cancelLabel:{$ref:"#/state/cancelLabel"},destructive:{$ref:"#/state/destructive"},size:{$ref:"#/state/size"}},attributes:{headline:"${state.headline}","confirm-label":"${state.confirmLabel || null}","secondary-label":"${state.secondaryLabel || null}","cancel-label":"${state.cancelLabel || null}",part:"dialog-host"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]},onsecondary:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/secondary"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{'& [part="message"]':{$description:"The one part of a dialog that is text rather than interface, so it opts back in to selection. The root sets `user-select: none` and `styles/tokens.json` restates it on every `dialog`, so the headline, the labels and the buttons around this sentence stay unselectable; a message is often the thing a reader copies into a search or a bug report.",margin:"0 0 var(--jx-space-3)",userSelect:"text"},'& [part="message"]:last-child':{margin:"0"},'& [part="island"] > p, & [part="island"] > span, & [part="island"] > strong, & [part="island"] > em, & [part="island"] > code':{$description:"The island's own prose is the message's other form — a body richer than a sentence, written straight into the island from a lit template (studio-ui-guidelines.md §9.4) — so it is selectable for the same reason `[part=\"message\"]` is. The opt-in stops at those children because the island is ALSO the mount point for a whole document: the Open Grid picker and Push Schema's plan put their surfaces here, and `user-select` inherits, so a rule on the island itself would hand selection to every heading, source row and button they draw, which is the interface the policy exists to keep unselectable. A mounted surface roots a `div`; a message writes paragraphs and text-level spans, so the two forms are told apart by the child that arrives.",userSelect:"text"},'& [part="island"]:empty':{display:"none"},'& [part="message-slot"], & [part="choice-slot"], & [part="field-slot"]':{display:"contents"},'& [part="choice-row"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",margin:"0 0 var(--jx-space-3)"},'& [part="choice-label"]':{fontSize:"var(--jx-text-sm)",color:"var(--jx-fg-dim)"},"& jx-textfield":{width:"100%"}},children:[{tagName:"div",attributes:{part:"message-slot",role:"none"},$switch:{$ref:"#/state/hasMessage"},cases:{true:{tagName:"p",attributes:{part:"message"},textContent:"${state.message}"}}},{tagName:"div",attributes:{part:"island"}},{tagName:"div",attributes:{part:"choice-slot",role:"none"},$switch:{$ref:"#/state/hasChoice"},cases:{true:{tagName:"div",attributes:{part:"choice-row"},children:[{tagName:"span",attributes:{part:"choice-label"},textContent:"${state.choiceLabel}"},{tagName:"jx-select",$props:{label:{$ref:"#/state/choiceLabel"},options:{$ref:"#/state/options"},value:{$ref:"#/state/chosen"}},attributes:{part:"choice"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pick"},value:[{$ref:"event#/target/value"}]}]}}]}}},{tagName:"div",attributes:{part:"field-slot",role:"none"},$switch:{$ref:"#/state/hasField"},cases:{true:{tagName:"jx-textfield",$props:{label:{$ref:"#/state/headline"},value:{$ref:"#/state/value"},placeholder:{$ref:"#/state/placeholder"},invalid:{$ref:"#/state/invalid"},error:{$ref:"#/state/error"},multiline:{$ref:"#/state/multiline"},rows:{$ref:"#/state/rows"},mono:{$ref:"#/state/mono"}},attributes:{part:"field"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/input"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"#/state/singleLine"},cases:{true:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]}}]}}]},$description:"The prompt's one field. `multiline` is what makes it a paste box rather than a line: an import the author copied out of a `_redirects` file is column-aligned, so it also asks for `mono`. A multiline field takes Enter as a newline, which is why the Enter-confirms handler below is guarded on it — a paste box whose second line submits the dialog cannot be typed into."}}}]};T("dialog",oe);function An(e){if(e.querySelector('[part="dialog"]'))return Promise.resolve(e);return new Promise((t)=>{e.addEventListener("jx-ready",function o(n){if(n.target!==e&&!e.querySelector('[part="dialog"]'))return;e.removeEventListener("jx-ready",o),t(e)})})}function bs(e){let t=document.createElement("div");t.style.pointerEvents="auto",t.setAttribute(rt,zt("dialog",e.region)),e.layer.append(t);let o=v({cancel:()=>{e.onCancel()},cancelLabel:e.cancelLabel,choiceLabel:e.choice?.label??"",chosen:e.choice?.chosen??"",closed:()=>{e.onClosed()},confirm:()=>{e.onConfirm()},confirmLabel:e.confirmLabel,destructive:e.destructive===!0,error:"",hasChoice:e.choice!==void 0,hasField:e.field!==void 0,mono:e.field?.mono===!0,multiline:e.field?.multiline===!0,rows:e.field?.rows??"3",singleLine:e.field!==void 0&&e.field.multiline!==!0?"true":"false",hasMessage:e.message!==void 0&&e.message!=="",headline:e.headline,input:(r)=>{o.value=r,e.onInput?.(r)},invalid:!1,message:e.message??"",options:e.choice?.options??[],pick:(r)=>{e.onPick?.(r)},placeholder:e.field?.placeholder??"",secondary:()=>{e.onSecondary?.()},secondaryLabel:e.secondaryLabel??"",size:e.size??"sm",value:e.field?.value??""}),n=null,a=!1,i=()=>{},s=new Promise((r)=>{i=r}),l=R("dialog",o,t).then(async(r)=>{let c=r.root;if(a)return r.dispose(),c;if(n=r,await Promise.race([An(c),s]),a)return c;if(e.island?.(c.querySelector('[part="island"]')??c),un(c),e.field){let y=c.querySelector("jx-textfield");if(y)setTimeout(()=>{if(!a)Pm(y,e.field?.select??"all")},0)}return c});return{close(){if(a)return;a=!0,i();let r=n?.root;if(r instanceof HTMLElement)rn(r);n?.dispose(),n=null,t.remove()},host:t,ready:l,update(r){if(r.confirmLabel!==void 0)o.confirmLabel=r.confirmLabel;if(r.cancelLabel!==void 0)o.cancelLabel=r.cancelLabel;if(r.secondaryLabel!==void 0)o.secondaryLabel=r.secondaryLabel;if(r.message!==void 0)o.message=r.message,o.hasMessage=r.message!=="";if(r.value!==void 0)o.value=r.value;if(r.placeholder!==void 0)o.placeholder=r.placeholder;if(r.invalid!==void 0)o.invalid=r.invalid;if(r.error!==void 0)if(r.error!==""&&r.error===o.error){o.error="";let c=r.error;queueMicrotask(()=>{o.error=c})}else o.error=r.error;if(r.options!==void 0)o.options=r.options;if(r.chosen!==void 0)o.chosen=r.chosen}}}var re={$schema:"https://jxsuite.com/schema/v1",$id:"StudioToasts",$description:"The toast stack: a rendering of the notification service's toasts, newest last. Each row is projected by ui/layers.ts with its severity glyph and, where a recovery command exists, that command's title and gate; the two buttons call back into the host, which owns the records and their timers.",tagName:"div",attributes:{part:"stack"},style:{position:"absolute",right:"var(--jx-space-4)",bottom:"36px",display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",alignItems:"flex-end",maxWidth:"min(420px, calc(100vw - 24px))",'& [part="toast"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",pointerEvents:"auto",padding:"var(--jx-space-3)",border:"1px solid var(--jx-border)",borderLeft:"3px solid var(--jx-fg-dim)",borderRadius:"var(--jx-radius-md)",background:"var(--jx-bg-panel)",color:"var(--jx-fg)",fontSize:"var(--jx-text-sm)",lineHeight:"var(--jx-leading-sm)",boxShadow:"var(--jx-shadow-popover)"},'& [part="toast"][data-severity="success"]':{borderLeftColor:"var(--jx-success)"},'& [part="toast"][data-severity="info"]':{borderLeftColor:"var(--jx-accent)"},'& [part="toast"][data-severity="warn"]':{borderLeftColor:"var(--jx-warning)"},'& [part="toast"][data-severity="error"]':{borderLeftColor:"var(--jx-danger)"},'& [part="icon"]':{flex:"none",width:"14px",textAlign:"center",fontWeight:"700"},'& [data-severity="success"] [part="icon"]':{color:"var(--jx-success)"},'& [data-severity="info"] [part="icon"]':{color:"var(--jx-accent)"},'& [data-severity="warn"] [part="icon"]':{color:"var(--jx-warning)"},'& [data-severity="error"] [part="icon"]':{color:"var(--jx-danger)"},'& [part="message"]':{flex:"1",minWidth:"0",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3"},'& [part="action-slot"]':{display:"contents"},'& [part="action"] > [part="control"]':{color:"var(--jx-accent)"}},children:[{$prototype:"Array",items:{$ref:"#/state/toasts"},key:{$ref:"$map/item/id"},map:{tagName:"div",attributes:{part:"toast","data-severity":"${$map.item.severity}"},children:[{tagName:"span",attributes:{part:"icon","aria-hidden":"true"},textContent:"${$map.item.icon}"},{tagName:"span",attributes:{part:"message"},textContent:"${$map.item.message}"},{tagName:"span",attributes:{part:"action-slot",role:"none"},$switch:{$ref:"$map/item/hasAction"},cases:{true:{tagName:"jx-button",$props:{size:"sm",quiet:!0,disabled:{$ref:"$map/item/actionDisabled"}},attributes:{part:"action",title:"${$map.item.actionTitle}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runAction"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.actionLabel}"}]}}},{tagName:"jx-action-button",$props:{label:"Dismiss notification",hint:"Dismiss notification",icon:"x",size:"sm"},attributes:{part:"dismiss"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/dismissToast"},value:[{$ref:"$map/item/id"}]}]}}]}}]};function $e(e){return e instanceof RangeError||e instanceof Error&&e.name==="CommandUnavailableError"}function on(e,t,o,n=t){let a=(s)=>{if(!$e(s))console.error(`${n}: command "${t}" failed`,s);k.error(te(s),{key:`command.run:${t}`,source:n})},i;try{i=e.run(t,o)}catch(s){return a(s),Promise.resolve()}return Promise.resolve(i).catch(a)}function Rc(e,t,o){let n=ne();return n?on(n,e,t,o):Promise.resolve()}var se,F,q,E;function Ct(e){return(e==="popover"?se:e==="modal"?F:e==="toast"?E:q)||document.body}function mk(){se=document.querySelector("#layer-popover"),F=document.querySelector("#layer-modal"),q=document.querySelector("#layer-dialog"),E=document.querySelector("#layer-toast"),Ce()}var ae="jx-dialog[data-open], dialog[open]";function Am(){return Boolean(q?.querySelector(ae)||F?.querySelector(ae))}function Xo(e,t,o={}){let{confirmLabel:n="Confirm",cancelLabel:a="Cancel",destructive:i=!1}=o;return new Promise((s)=>{let d=!1,l=(c)=>{if(d)return;d=!0,r.close(),s(c)},r=bs({cancelLabel:a,confirmLabel:n,destructive:i,headline:e,layer:Ct("dialog"),...G(t),onCancel:()=>l(!1),onClosed:()=>l(!1),onConfirm:()=>l(!0)})})}function Bx(e,t,o={}){let{saveLabel:n="Save",discardLabel:a="Discard",cancelLabel:i="Cancel"}=o;return new Promise((s)=>{let d=!1,l=(c)=>{if(d)return;d=!0,r.close(),s(c)},r=bs({cancelLabel:i,confirmLabel:n,headline:e,layer:Ct("dialog"),...G(t),onCancel:()=>l("cancel"),onClosed:()=>l("cancel"),onConfirm:()=>l("save"),onSecondary:()=>l("discard"),secondaryLabel:a})})}function G(e){if(typeof e==="string")return{message:e};return{island:(t)=>{Ni(e,t)}}}function Nn(e,t={}){let{cancelLabel:o="Cancel",choice:n,confirmLabel:a="OK",message:i,mono:s=!1,multiline:d=!1,placeholder:l="",rows:r="3",select:c="all",size:y,validate:J,value:le=""}=t,D=(m)=>J?J(m,b):m.trim()?"":"Enter a value.",p=le,b=n?.initial??"",f="",U=!1,z=()=>typeof l==="function"?l():l,W=()=>n?n.options().map((m)=>({label:m.label,value:m.value})):[];return new Promise((m)=>{let V=!1,O=(u)=>{if(V)return;V=!0,N.close(),m(u)},K=(u)=>{f=u,N.update({error:f,invalid:f!==""})},N=bs({cancelLabel:o,confirmLabel:a,headline:e,layer:Ct("dialog"),...i===void 0?{}:G(i),...n?{choice:{chosen:b,label:n.label,options:W()}}:{},field:{mono:s,multiline:d,placeholder:z(),rows:r,select:c,value:p},...y===void 0?{}:{size:y},onCancel:()=>O(null),onClosed:()=>O(null),onConfirm:()=>{let u=D(p);if(u){K(u);return}O(p.trim())},onInput:(u)=>{U=!0,p=u;let x=D(p);if(x!==f)K(x)},onPick:(u)=>{b=u,n?.onChange?.(u);let x=D(p);f=U||f?x:"",N.update({chosen:b,error:f,invalid:f!=="",options:W(),placeholder:z()})}})})}var M=new Map;function vs(e,t){let o=`${e}:${t}`,n=M.get(o);if(n&&n.parentElement)return n;return n=document.createElement("div"),n.style.pointerEvents="auto",n.setAttribute(rt,zt(e,t)),Ct(e).append(n),M.set(o,n),n}function Nm(e,t){let o=`${e}:${t}`,n=M.get(o);if(n)Ni(tt,n),n.remove(),M.delete(o)}var Re=180,Le={error:"✕",info:"ℹ",success:"✓",warn:"!"},C=null,h=new Map,g=new Set;function Te(){return globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0}function we(){try{return new URLSearchParams(globalThis.location?.search??"").get("automation")==="1"}catch{return!1}}function gk(){return[...g].map((e)=>`overlay: toast ${e} settling in`)}function _(e){let t=h.get(e);if(t!==void 0)clearTimeout(t),h.delete(e);g.delete(e),Wd(e)}function Ee(e){if(h.has(e.id)||g.has(e.id))return;let t=Te()?0:Re;if(t>0)g.add(e.id),setTimeout(()=>g.delete(e.id),t);let o=e.timeoutMs??0;if(o<=0||we())return;h.set(e.id,setTimeout(()=>_(e.id),o))}T("toasts",re);var I=null,j=null,w=null;function ie(){return I??=v({dismissToast:(e)=>{_(e)},runAction:(e)=>{let t=$c.find((n)=>n.id===e),o=ne();if(!t?.action||!o)return;_(e),on(o,t.action,t.actionArgs,"Notifications")},toasts:[]}),I}function Me(e){let t=e.action===void 0?null:ne(),o=e.action,n=t&&o!==void 0?t.get(o):void 0,a=n&&o!==void 0&&t.isVisible(o)?n:null,i=a&&o!==void 0?t.disabledReason(o):void 0;return{actionDisabled:i!==void 0,actionLabel:a?.title??"",actionTitle:a===null||a===void 0?"":i===void 0?a.title:`${a.title} — requires ${i}`,hasAction:a!==null&&a!==void 0,icon:Le[e.severity],id:e.id,message:e.message,severity:e.severity}}function Ce(){if(je(),!E)return;C=ge(),C.run(()=>{Q(()=>{$c.length,ne();for(let e of $c)Ee(e);ie().toasts=$c.map((e)=>Me(e))})}),j=R("toasts",ie(),E),j.then((e)=>{w=e})}function je(){C?.stop(),C=null;for(let t of h.values())clearTimeout(t);h.clear(),g.clear();let e=j;if(j=null,w)w.dispose(),w=null;else if(e)e.then((t)=>t.dispose());I=null}
2
+ export{cI,dI,pk,rt,Ip,fk,Zi,uI,hI,pI,fI,mI,Iv,zt,T,gI,R,An,bs,on,Rc,Ct,mk,Am,Xo,Bx,Nn,vs,Nm,gk};
3
3
 
4
- //# debugId=6BC1A95F7159629364756E2164756E21
5
- //# sourceMappingURL=studio-z1vdxq0e.js.map
4
+ //# debugId=5235C2EE8A8D6D9864756E2164756E21
5
+ //# sourceMappingURL=studio-spf2skgc.js.map
@@ -1,8 +1,8 @@
1
- import{gu,ae}from"./studio-09n3fyy0.js";var ne=ae(function(be){Object.defineProperty(be,"__esModule",{value:!0});be.bind=void 0;function at(e,r){var{type:t,listener:n,options:o}=r;return e.addEventListener(t,n,o),function i(){e.removeEventListener(t,n,o)}}be.bind=at});var Te=ae(function(k){var N=k&&k.__assign||function(){return N=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o))e[o]=r[o]}return e},N.apply(this,arguments)};Object.defineProperty(k,"__esModule",{value:!0});k.bindAll=void 0;var it=ne();function xe(e){if(typeof e>"u")return;if(typeof e==="boolean")return{capture:e};return e}function ut(e,r){if(r==null)return e;var t=N(N({},e),{options:N(N({},xe(r)),xe(e.options))});return t}function lt(e,r,t){var n=r.map(function(o){var i=ut(o,t);return(0,it.bind)(e,i)});return function o(){n.forEach(function(i){return i()})}}k.bindAll=lt});var R=ae(function(V){Object.defineProperty(V,"__esModule",{value:!0});V.bindAll=V.bind=void 0;var ct=ne();Object.defineProperty(V,"bind",{enumerable:!0,get:function(){return ct.bind}});var st=Te();Object.defineProperty(V,"bindAll",{enumerable:!0,get:function(){return st.bindAll}})});function me(e){if(Array.isArray(e))return e}function ge(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n,o,i,u,l=[],a=!0,c=!1;try{if(i=(t=t.call(e)).next,r===0){if(Object(t)!==t)return;a=!1}else for(;!(a=(n=i.call(t)).done)&&(l.push(n.value),l.length!==r);a=!0);}catch(d){c=!0,o=d}finally{try{if(!a&&t.return!=null&&(u=t.return(),Object(u)!==u))return}finally{if(c)throw o}}return l}}function L(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function X(e,r){if(e){if(typeof e=="string")return L(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?L(e,r):void 0}}function ye(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B(e,r){return me(e)||ge(e,r)||X(e,r)||ye()}var ot=gu(R());var q="data-pdnd-honey-pot";function z(e){return e instanceof Element&&e.hasAttribute(q)}function G(e){var r=document.elementsFromPoint(e.x,e.y),t=B(r,2),n=t[0],o=t[1];if(!n)return null;if(z(n))return o!==null&&o!==void 0?o:null;return n}function H(e){return H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},H(e)}function we(e,r){if(H(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(H(n)!="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function De(e){var r=we(e,"string");return H(r)=="symbol"?r:r+""}function ga(e,r,t){return(r=De(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Y=gu(R());var Ae=2147483647;var Oe={inset:"unset",border:"none",padding:0,margin:0,overflow:"visible",color:"inherit",background:"transparent",width:"auto",height:"auto"};function A(e){var r=null;return function t(){if(!r){for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];var u=e.apply(this,o);r={result:u}}return r.result}}var Z=A(function e(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover==="function"});function Ee(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Se(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Ee(Object(t),!0).forEach(function(n){ga(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ee(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var U=2,Pe=U/2;function ft(e){return{x:Math.floor(e.x),y:Math.floor(e.y)}}function dt(e){return{x:e.x-Pe,y:e.y-Pe}}function vt(e){return{x:Math.max(e.x,0),y:Math.max(e.y,0)}}function mt(e){return{x:Math.min(e.x,window.innerWidth-U),y:Math.min(e.y,window.innerHeight-U)}}function je(e){var r=e.client,t=mt(vt(dt(ft(r))));return DOMRect.fromRect({x:t.x,y:t.y,width:U,height:U})}function Ie(e){var r=e.clientRect;return{left:"".concat(r.left,"px"),top:"".concat(r.top,"px"),width:"".concat(r.width,"px"),height:"".concat(r.height,"px")}}function gt(e){var{client:r,clientRect:t}=e;return r.x>=t.x&&r.x<=t.x+t.width&&r.y>=t.y&&r.y<=t.y+t.height}function yt(e){var r=e.initial,t=document.createElement("div");if(t.setAttribute(q,"true"),Z())t.setAttribute("popover","manual");var n=je({client:r});if(Object.assign(t.style,Se(Se({position:"fixed"},Z()?Oe:{zIndex:Ae}),{},{backgroundColor:"transparent",padding:0,margin:0,boxSizing:"border-box",pointerEvents:"auto"},Ie({clientRect:n}))),document.body.appendChild(t),Z())t.showPopover();var o=Y.bind(window,{type:"pointermove",listener:function i(u){var l={x:u.clientX,y:u.clientY};n=je({client:l}),Object.assign(t.style,Ie({clientRect:n}))},options:{capture:!0}});return function i(u){var l=u.current;if(o(),gt({client:l,clientRect:n})){t.remove();return}function a(){c(),t.remove()}var c=Y.bindAll(window,[{type:"pointerdown",listener:a},{type:"pointermove",listener:a},{type:"focusin",listener:a},{type:"focusout",listener:a},{type:"dragstart",listener:a},{type:"dragenter",listener:a},{type:"dragover",listener:a}],{capture:!0})}}function Fe(){var e=null;function r(){return e=null,Y.bind(window,{type:"pointermove",listener:function n(o){e={x:o.clientX,y:o.clientY}},options:{capture:!0}})}function t(){var n=null;return function o(i){var{eventName:u,payload:l}=i;if(u==="onDragStart"){var a=l.location.initial.input,c=e!==null&&e!==void 0?e:{x:a.clientX,y:a.clientY};n=yt({initial:c})}if(u==="onDrop"){var d,f=l.location.current.input;(d=n)===null||d===void 0||d({current:{x:f.clientX,y:f.clientY}}),n=null,e=null}}}return{bindEvents:r,getOnPostDispatch:t}}function He(e){if(Array.isArray(e))return L(e)}function Ce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Me(){throw TypeError(`Invalid attempt to spread non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J(e){return He(e)||Ce(e)||X(e)||Me()}var Xe=gu(R());var Ne=A(function e(){return navigator.userAgent.includes("Firefox")});var W=A(function e(){var r=navigator,t=r.userAgent;return t.includes("AppleWebKit")&&!t.includes("Chrome")});function bt(e){return"nodeName"in e}function ke(e){return bt(e)&&e.ownerDocument!==document}var We=gu(R());var Q={isLeavingWindow:Symbol("leaving"),isEnteringWindow:Symbol("entering")};(function e(){if(typeof window>"u")return;if(!W())return;function r(){return{enterCount:0,isOverWindow:!1}}var t=r();function n(){t=r()}We.bindAll(window,[{type:"dragstart",listener:function o(){t.enterCount=0,t.isOverWindow=!0}},{type:"drop",listener:n},{type:"dragend",listener:n},{type:"dragenter",listener:function o(i){if(!t.isOverWindow&&t.enterCount===0)i[Q.isEnteringWindow]=!0;t.isOverWindow=!0,t.enterCount++}},{type:"dragleave",listener:function o(i){if(t.enterCount--,t.isOverWindow&&t.enterCount===0)i[Q.isLeavingWindow]=!0,t.isOverWindow=!1}}],{capture:!0})})();function Ke(e){var r=e.dragLeave;if(!W())return!1;return r.hasOwnProperty(Q.isLeavingWindow)}function Le(e){var r=e.dragLeave,{type:t,relatedTarget:n}=r;if(t!=="dragleave")return!1;if(W())return Ke({dragLeave:r});if(n==null)return!0;if(Ne())return ke(n);return n instanceof HTMLIFrameElement}function Re(e){var r=e.onDragEnd;return[{type:"pointermove",listener:function(){var t=0;return function n(){if(t<20){t++;return}r()}}()},{type:"pointerdown",listener:r}]}function C(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var ht=function e(r){var t=[],n=null,o=function i(){for(var u=arguments.length,l=Array(u),a=0;a<u;a++)l[a]=arguments[a];if(t=l,n)return;n=requestAnimationFrame(function(){n=null,r.apply(void 0,t)})};return o.cancel=function(){if(!n)return;cancelAnimationFrame(n),n=null},o},Ue=ht;var oe=Ue(function(e){return e()}),_=function(){var e=null;function r(n){var o=requestAnimationFrame(function(){e=null,n()});e={frameId:o,fn:n}}function t(){if(e)cancelAnimationFrame(e.frameId),e.fn(),e=null}return{schedule:r,flush:t}}();function Ye(e){var{source:r,initial:t,dispatchEvent:n}=e,o={dropTargets:[]};function i(l){n(l),o={dropTargets:l.payload.location.current.dropTargets}}var u={start:function l(a){var c=a.nativeSetDragImage,d={current:t,previous:o,initial:t};i({eventName:"onGenerateDragPreview",payload:{source:r,location:d,nativeSetDragImage:c}}),_.schedule(function(){i({eventName:"onDragStart",payload:{source:r,location:d}})})},dragUpdate:function l(a){var c=a.current;_.flush(),oe.cancel(),i({eventName:"onDropTargetChange",payload:{source:r,location:{initial:t,previous:o,current:c}}})},drag:function l(a){var c=a.current;oe(function(){_.flush();var d={initial:t,previous:o,current:c};i({eventName:"onDrag",payload:{source:r,location:d}})})},drop:function l(a){var{current:c,updatedSourcePayload:d}=a;_.flush(),oe.cancel(),i({eventName:"onDrop",payload:{source:d!==null&&d!==void 0?d:r,location:{current:c,previous:o,initial:t}}})}};return u}var ue={isActive:!1};function Be(){return!ue.isActive}function xt(e){if(e.dataTransfer)return e.dataTransfer.setDragImage.bind(e.dataTransfer);return null}function Tt(e){var{current:r,next:t}=e;if(r.length!==t.length)return!0;for(var n=0;n<r.length;n++)if(r[n].element!==t[n].element)return!0;return!1}function wt(e){var{event:r,dragType:t,getDropTargetsOver:n,dispatchEvent:o}=e;if(!Be())return;var i=Dt({event:r,dragType:t,getDropTargetsOver:n});ue.isActive=!0;var u={current:i};ie({event:r,current:i.dropTargets});var l=Ye({source:t.payload,dispatchEvent:o,initial:i});function a(s){var p=Tt({current:u.current.dropTargets,next:s.dropTargets});if(u.current=s,p)l.dragUpdate({current:u.current})}function c(s){var p=C(s),m=z(s.target)?G({x:p.clientX,y:p.clientY}):s.target,g=n({target:m,input:p,source:t.payload,current:u.current.dropTargets});if(g.length)s.preventDefault(),ie({event:s,current:g});a({dropTargets:g,input:p})}function d(){if(u.current.dropTargets.length)a({dropTargets:[],input:u.current.input});l.drop({current:u.current,updatedSourcePayload:null}),f()}function f(){ue.isActive=!1,w()}var w=Xe.bindAll(window,[{type:"dragover",listener:function s(p){c(p),l.drag({current:u.current})}},{type:"dragenter",listener:c},{type:"dragleave",listener:function s(p){if(!Le({dragLeave:p}))return;if(a({input:u.current.input,dropTargets:[]}),t.startedFrom==="external")d()}},{type:"drop",listener:function s(p){if(u.current={dropTargets:u.current.dropTargets,input:C(p)},!u.current.dropTargets.length){d();return}p.preventDefault(),ie({event:p,current:u.current.dropTargets}),l.drop({current:u.current,updatedSourcePayload:t.type==="external"?t.getDropPayload(p):null}),f()}},{type:"dragend",listener:function s(p){u.current={dropTargets:u.current.dropTargets,input:C(p)},d()}}].concat(J(Re({onDragEnd:d}))),{capture:!0});l.start({nativeSetDragImage:xt(r)})}function ie(e){var r,{event:t,current:n}=e,o=(r=n[0])===null||r===void 0?void 0:r.dropEffect;if(o!=null&&t.dataTransfer)t.dataTransfer.dropEffect=o}function Dt(e){var{event:r,dragType:t,getDropTargetsOver:n}=e,o=C(r);if(t.startedFrom==="external")return{input:o,dropTargets:[]};var i=n({input:o,source:t.payload,target:r.target,current:[]});return{input:o,dropTargets:i}}var le={canStart:Be,start:wt};var ce=new Map;function At(e){var{typeKey:r,mount:t}=e,n=ce.get(r);if(n)return n.usageCount++,n;var o={typeKey:r,unmount:t(),usageCount:1};return ce.set(r,o),o}function Ve(e){var r=At(e);return function t(){if(r.usageCount--,r.usageCount>0)return;r.unmount(),ce.delete(e.typeKey)}}function gr(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return function n(){r.forEach(function(o){return o()})}}function ee(e,r){var{attribute:t,value:n}=r;return e.setAttribute(t,n),function(){return e.removeAttribute(t)}}function qe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function F(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(t),!0).forEach(function(n){ga(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function se(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Ot(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,o=function a(){};return{s:o,n:function a(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function a(c){throw c},f:o}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
1
+ import{bu,ae}from"./studio-0bbxhhce.js";var ne=ae(function(be){Object.defineProperty(be,"__esModule",{value:!0});be.bind=void 0;function at(e,r){var{type:t,listener:n,options:o}=r;return e.addEventListener(t,n,o),function i(){e.removeEventListener(t,n,o)}}be.bind=at});var Te=ae(function(k){var N=k&&k.__assign||function(){return N=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o))e[o]=r[o]}return e},N.apply(this,arguments)};Object.defineProperty(k,"__esModule",{value:!0});k.bindAll=void 0;var it=ne();function xe(e){if(typeof e>"u")return;if(typeof e==="boolean")return{capture:e};return e}function ut(e,r){if(r==null)return e;var t=N(N({},e),{options:N(N({},xe(r)),xe(e.options))});return t}function lt(e,r,t){var n=r.map(function(o){var i=ut(o,t);return(0,it.bind)(e,i)});return function o(){n.forEach(function(i){return i()})}}k.bindAll=lt});var R=ae(function(V){Object.defineProperty(V,"__esModule",{value:!0});V.bindAll=V.bind=void 0;var ct=ne();Object.defineProperty(V,"bind",{enumerable:!0,get:function(){return ct.bind}});var st=Te();Object.defineProperty(V,"bindAll",{enumerable:!0,get:function(){return st.bindAll}})});function me(e){if(Array.isArray(e))return e}function ge(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n,o,i,u,l=[],a=!0,c=!1;try{if(i=(t=t.call(e)).next,r===0){if(Object(t)!==t)return;a=!1}else for(;!(a=(n=i.call(t)).done)&&(l.push(n.value),l.length!==r);a=!0);}catch(d){c=!0,o=d}finally{try{if(!a&&t.return!=null&&(u=t.return(),Object(u)!==u))return}finally{if(c)throw o}}return l}}function L(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function X(e,r){if(e){if(typeof e=="string")return L(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?L(e,r):void 0}}function ye(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B(e,r){return me(e)||ge(e,r)||X(e,r)||ye()}var ot=bu(R());var q="data-pdnd-honey-pot";function z(e){return e instanceof Element&&e.hasAttribute(q)}function G(e){var r=document.elementsFromPoint(e.x,e.y),t=B(r,2),n=t[0],o=t[1];if(!n)return null;if(z(n))return o!==null&&o!==void 0?o:null;return n}function H(e){return H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},H(e)}function we(e,r){if(H(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(H(n)!="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function De(e){var r=we(e,"string");return H(r)=="symbol"?r:r+""}function ga(e,r,t){return(r=De(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Y=bu(R());var Ae=2147483647;var Oe={inset:"unset",border:"none",padding:0,margin:0,overflow:"visible",color:"inherit",background:"transparent",width:"auto",height:"auto"};function A(e){var r=null;return function t(){if(!r){for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];var u=e.apply(this,o);r={result:u}}return r.result}}var Z=A(function e(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover==="function"});function Ee(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Se(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Ee(Object(t),!0).forEach(function(n){ga(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ee(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var U=2,Pe=U/2;function ft(e){return{x:Math.floor(e.x),y:Math.floor(e.y)}}function dt(e){return{x:e.x-Pe,y:e.y-Pe}}function vt(e){return{x:Math.max(e.x,0),y:Math.max(e.y,0)}}function mt(e){return{x:Math.min(e.x,window.innerWidth-U),y:Math.min(e.y,window.innerHeight-U)}}function je(e){var r=e.client,t=mt(vt(dt(ft(r))));return DOMRect.fromRect({x:t.x,y:t.y,width:U,height:U})}function Ie(e){var r=e.clientRect;return{left:"".concat(r.left,"px"),top:"".concat(r.top,"px"),width:"".concat(r.width,"px"),height:"".concat(r.height,"px")}}function gt(e){var{client:r,clientRect:t}=e;return r.x>=t.x&&r.x<=t.x+t.width&&r.y>=t.y&&r.y<=t.y+t.height}function yt(e){var r=e.initial,t=document.createElement("div");if(t.setAttribute(q,"true"),Z())t.setAttribute("popover","manual");var n=je({client:r});if(Object.assign(t.style,Se(Se({position:"fixed"},Z()?Oe:{zIndex:Ae}),{},{backgroundColor:"transparent",padding:0,margin:0,boxSizing:"border-box",pointerEvents:"auto"},Ie({clientRect:n}))),document.body.appendChild(t),Z())t.showPopover();var o=Y.bind(window,{type:"pointermove",listener:function i(u){var l={x:u.clientX,y:u.clientY};n=je({client:l}),Object.assign(t.style,Ie({clientRect:n}))},options:{capture:!0}});return function i(u){var l=u.current;if(o(),gt({client:l,clientRect:n})){t.remove();return}function a(){c(),t.remove()}var c=Y.bindAll(window,[{type:"pointerdown",listener:a},{type:"pointermove",listener:a},{type:"focusin",listener:a},{type:"focusout",listener:a},{type:"dragstart",listener:a},{type:"dragenter",listener:a},{type:"dragover",listener:a}],{capture:!0})}}function Fe(){var e=null;function r(){return e=null,Y.bind(window,{type:"pointermove",listener:function n(o){e={x:o.clientX,y:o.clientY}},options:{capture:!0}})}function t(){var n=null;return function o(i){var{eventName:u,payload:l}=i;if(u==="onDragStart"){var a=l.location.initial.input,c=e!==null&&e!==void 0?e:{x:a.clientX,y:a.clientY};n=yt({initial:c})}if(u==="onDrop"){var d,f=l.location.current.input;(d=n)===null||d===void 0||d({current:{x:f.clientX,y:f.clientY}}),n=null,e=null}}}return{bindEvents:r,getOnPostDispatch:t}}function He(e){if(Array.isArray(e))return L(e)}function Ce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Me(){throw TypeError(`Invalid attempt to spread non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J(e){return He(e)||Ce(e)||X(e)||Me()}var Xe=bu(R());var Ne=A(function e(){return navigator.userAgent.includes("Firefox")});var W=A(function e(){var r=navigator,t=r.userAgent;return t.includes("AppleWebKit")&&!t.includes("Chrome")});function bt(e){return"nodeName"in e}function ke(e){return bt(e)&&e.ownerDocument!==document}var We=bu(R());var Q={isLeavingWindow:Symbol("leaving"),isEnteringWindow:Symbol("entering")};(function e(){if(typeof window>"u")return;if(!W())return;function r(){return{enterCount:0,isOverWindow:!1}}var t=r();function n(){t=r()}We.bindAll(window,[{type:"dragstart",listener:function o(){t.enterCount=0,t.isOverWindow=!0}},{type:"drop",listener:n},{type:"dragend",listener:n},{type:"dragenter",listener:function o(i){if(!t.isOverWindow&&t.enterCount===0)i[Q.isEnteringWindow]=!0;t.isOverWindow=!0,t.enterCount++}},{type:"dragleave",listener:function o(i){if(t.enterCount--,t.isOverWindow&&t.enterCount===0)i[Q.isLeavingWindow]=!0,t.isOverWindow=!1}}],{capture:!0})})();function Ke(e){var r=e.dragLeave;if(!W())return!1;return r.hasOwnProperty(Q.isLeavingWindow)}function Le(e){var r=e.dragLeave,{type:t,relatedTarget:n}=r;if(t!=="dragleave")return!1;if(W())return Ke({dragLeave:r});if(n==null)return!0;if(Ne())return ke(n);return n instanceof HTMLIFrameElement}function Re(e){var r=e.onDragEnd;return[{type:"pointermove",listener:function(){var t=0;return function n(){if(t<20){t++;return}r()}}()},{type:"pointerdown",listener:r}]}function C(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var ht=function e(r){var t=[],n=null,o=function i(){for(var u=arguments.length,l=Array(u),a=0;a<u;a++)l[a]=arguments[a];if(t=l,n)return;n=requestAnimationFrame(function(){n=null,r.apply(void 0,t)})};return o.cancel=function(){if(!n)return;cancelAnimationFrame(n),n=null},o},Ue=ht;var oe=Ue(function(e){return e()}),_=function(){var e=null;function r(n){var o=requestAnimationFrame(function(){e=null,n()});e={frameId:o,fn:n}}function t(){if(e)cancelAnimationFrame(e.frameId),e.fn(),e=null}return{schedule:r,flush:t}}();function Ye(e){var{source:r,initial:t,dispatchEvent:n}=e,o={dropTargets:[]};function i(l){n(l),o={dropTargets:l.payload.location.current.dropTargets}}var u={start:function l(a){var c=a.nativeSetDragImage,d={current:t,previous:o,initial:t};i({eventName:"onGenerateDragPreview",payload:{source:r,location:d,nativeSetDragImage:c}}),_.schedule(function(){i({eventName:"onDragStart",payload:{source:r,location:d}})})},dragUpdate:function l(a){var c=a.current;_.flush(),oe.cancel(),i({eventName:"onDropTargetChange",payload:{source:r,location:{initial:t,previous:o,current:c}}})},drag:function l(a){var c=a.current;oe(function(){_.flush();var d={initial:t,previous:o,current:c};i({eventName:"onDrag",payload:{source:r,location:d}})})},drop:function l(a){var{current:c,updatedSourcePayload:d}=a;_.flush(),oe.cancel(),i({eventName:"onDrop",payload:{source:d!==null&&d!==void 0?d:r,location:{current:c,previous:o,initial:t}}})}};return u}var ue={isActive:!1};function Be(){return!ue.isActive}function xt(e){if(e.dataTransfer)return e.dataTransfer.setDragImage.bind(e.dataTransfer);return null}function Tt(e){var{current:r,next:t}=e;if(r.length!==t.length)return!0;for(var n=0;n<r.length;n++)if(r[n].element!==t[n].element)return!0;return!1}function wt(e){var{event:r,dragType:t,getDropTargetsOver:n,dispatchEvent:o}=e;if(!Be())return;var i=Dt({event:r,dragType:t,getDropTargetsOver:n});ue.isActive=!0;var u={current:i};ie({event:r,current:i.dropTargets});var l=Ye({source:t.payload,dispatchEvent:o,initial:i});function a(s){var p=Tt({current:u.current.dropTargets,next:s.dropTargets});if(u.current=s,p)l.dragUpdate({current:u.current})}function c(s){var p=C(s),m=z(s.target)?G({x:p.clientX,y:p.clientY}):s.target,g=n({target:m,input:p,source:t.payload,current:u.current.dropTargets});if(g.length)s.preventDefault(),ie({event:s,current:g});a({dropTargets:g,input:p})}function d(){if(u.current.dropTargets.length)a({dropTargets:[],input:u.current.input});l.drop({current:u.current,updatedSourcePayload:null}),f()}function f(){ue.isActive=!1,w()}var w=Xe.bindAll(window,[{type:"dragover",listener:function s(p){c(p),l.drag({current:u.current})}},{type:"dragenter",listener:c},{type:"dragleave",listener:function s(p){if(!Le({dragLeave:p}))return;if(a({input:u.current.input,dropTargets:[]}),t.startedFrom==="external")d()}},{type:"drop",listener:function s(p){if(u.current={dropTargets:u.current.dropTargets,input:C(p)},!u.current.dropTargets.length){d();return}p.preventDefault(),ie({event:p,current:u.current.dropTargets}),l.drop({current:u.current,updatedSourcePayload:t.type==="external"?t.getDropPayload(p):null}),f()}},{type:"dragend",listener:function s(p){u.current={dropTargets:u.current.dropTargets,input:C(p)},d()}}].concat(J(Re({onDragEnd:d}))),{capture:!0});l.start({nativeSetDragImage:xt(r)})}function ie(e){var r,{event:t,current:n}=e,o=(r=n[0])===null||r===void 0?void 0:r.dropEffect;if(o!=null&&t.dataTransfer)t.dataTransfer.dropEffect=o}function Dt(e){var{event:r,dragType:t,getDropTargetsOver:n}=e,o=C(r);if(t.startedFrom==="external")return{input:o,dropTargets:[]};var i=n({input:o,source:t.payload,target:r.target,current:[]});return{input:o,dropTargets:i}}var le={canStart:Be,start:wt};var ce=new Map;function At(e){var{typeKey:r,mount:t}=e,n=ce.get(r);if(n)return n.usageCount++,n;var o={typeKey:r,unmount:t(),usageCount:1};return ce.set(r,o),o}function Ve(e){var r=At(e);return function t(){if(r.usageCount--,r.usageCount>0)return;r.unmount(),ce.delete(e.typeKey)}}function gr(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return function n(){r.forEach(function(o){return o()})}}function ee(e,r){var{attribute:t,value:n}=r;return e.setAttribute(t,n),function(){return e.removeAttribute(t)}}function qe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function F(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(t),!0).forEach(function(n){ga(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function se(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Ot(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,o=function a(){};return{s:o,n:function a(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function a(c){throw c},f:o}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,u=!0,l=!1;return{s:function a(){t=t.call(e)},n:function a(){var c=t.next();return u=c.done,c},e:function a(c){l=!0,i=c},f:function a(){try{u||t.return==null||t.return()}finally{if(l)throw i}}}}function Ot(e,r){if(e){if(typeof e=="string")return ze(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ze(e,r):void 0}}function ze(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function pe(e){return e.slice(0).reverse()}function Ge(e){var{typeKey:r,defaultDropEffect:t}=e,n=new WeakMap,o="data-drop-target-for-".concat(r),i="[".concat(o,"]");function u(s){return n.set(s.element,s),function(){return n.delete(s.element)}}function l(s){if(!1)var p;var m=gr(ee(s.element,{attribute:o,value:"true"}),u(s));return A(m)}function a(s){var p,m,g,D,{source:y,target:h,input:b,result:T}=s,v=T===void 0?[]:T;if(h==null)return v;if(!(h instanceof Element)){if(h instanceof Node)return a({source:y,target:h.parentElement,input:b,result:v});return v}var P=h.closest(i);if(P==null)return v;var x=n.get(P);if(x==null)return v;var E={input:b,source:y,element:x.element};if(x.canDrop&&!x.canDrop(E))return a({source:y,target:x.element.parentElement,input:b,result:v});var S=(p=(m=x.getData)===null||m===void 0?void 0:m.call(x,E))!==null&&p!==void 0?p:{},j=(g=(D=x.getDropEffect)===null||D===void 0?void 0:D.call(x,E))!==null&&g!==void 0?g:t,O={data:S,element:x.element,dropEffect:j,isActiveDueToStickiness:!1};return a({source:y,target:x.element.parentElement,input:b,result:[].concat(J(v),[O])})}function c(s){var{eventName:p,payload:m}=s,g=se(m.location.current.dropTargets),D;try{for(g.s();!(D=g.n()).done;){var y,h=D.value,b=n.get(h.element),T=F(F({},m),{},{self:h});b===null||b===void 0||(y=b[p])===null||y===void 0||y.call(b,T)}}catch(v){g.e(v)}finally{g.f()}}var d={onGenerateDragPreview:c,onDrag:c,onDragStart:c,onDrop:c,onDropTargetChange:function s(p){var m=p.payload,g=new Set(m.location.current.dropTargets.map(function(K){return K.element})),D=new Set,y=se(m.location.previous.dropTargets),h;try{for(y.s();!(h=y.n()).done;){var b,T=h.value;D.add(T.element);var v=n.get(T.element),P=g.has(T.element),x=F(F({},m),{},{self:T});if(v===null||v===void 0||(b=v.onDropTargetChange)===null||b===void 0||b.call(v,x),!P){var E;v===null||v===void 0||(E=v.onDragLeave)===null||E===void 0||E.call(v,x)}}}catch(K){y.e(K)}finally{y.f()}var S=se(m.location.current.dropTargets),j;try{for(S.s();!(j=S.n()).done;){var O,M,re=j.value;if(D.has(re.element))continue;var ve=F(F({},m),{},{self:re}),I=n.get(re.element);I===null||I===void 0||(O=I.onDropTargetChange)===null||O===void 0||O.call(I,ve),I===null||I===void 0||(M=I.onDragEnter)===null||M===void 0||M.call(I,ve)}}catch(K){S.e(K)}finally{S.f()}}};function f(s){d[s.eventName](s)}function w(s){var{source:p,target:m,input:g,current:D}=s,y=a({source:p,target:m,input:g});if(y.length>=D.length)return y;var h=pe(D),b=pe(y),T=[];for(var v=0;v<h.length;v++){var P,x=h[v],E=b[v];if(E!=null){T.push(E);continue}var S=T[v-1],j=h[v-1];if((S===null||S===void 0?void 0:S.element)!==(j===null||j===void 0?void 0:j.element))break;var O=n.get(x.element);if(!O)break;var M={input:g,source:p,element:O.element};if(O.canDrop&&!O.canDrop(M))break;if(!((P=O.getIsSticky)!==null&&P!==void 0&&P.call(O,M)))break;T.push(F(F({},x),{},{isActiveDueToStickiness:!0}))}return pe(T)}return{dropTargetForConsumers:l,getIsOver:w,dispatchEvent:f}}function Et(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=St(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,o=function a(){};return{s:o,n:function a(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function a(c){throw c},f:o}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
5
5
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,u=!0,l=!1;return{s:function a(){t=t.call(e)},n:function a(){var c=t.next();return u=c.done,c},e:function a(c){l=!0,i=c},f:function a(){try{u||t.return==null||t.return()}finally{if(l)throw i}}}}function St(e,r){if(e){if(typeof e=="string")return Ze(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ze(e,r):void 0}}function Ze(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function $e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Pt(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?$e(Object(t),!0).forEach(function(n){ga(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Je(){var e=new Set,r=null;function t(i){if(!r)return;if(!i.canMonitor||i.canMonitor(r.canMonitorArgs))r.active.add(i)}function n(i){var u=Pt({},i);e.add(u),t(u);function l(){if(e.delete(u),r)r.active.delete(u)}return A(l)}function o(i){var{eventName:u,payload:l}=i;if(u==="onGenerateDragPreview"){r={canMonitorArgs:{initial:l.location.initial,source:l.source},active:new Set};var a=Et(e),c;try{for(a.s();!(c=a.n()).done;){var d=c.value;t(d)}}catch(g){a.e(g)}finally{a.f()}}if(!r)return;var f=Array.from(r.active);for(var w=0,s=f;w<s.length;w++){var p=s[w];if(r.active.has(p)){var m;(m=p[u])===null||m===void 0||m.call(p,l)}}if(u==="onDrop")r.active.clear(),r=null}return{dispatchEvent:o,monitorForConsumers:n}}function Qe(e){var{typeKey:r,mount:t,dispatchEventToSource:n,onPostDispatch:o,defaultDropEffect:i}=e,u=Je(),l=Ge({typeKey:r,defaultDropEffect:i});function a(f){n===null||n===void 0||n(f),l.dispatchEvent(f),u.dispatchEvent(f),o===null||o===void 0||o(f)}function c(f){var{event:w,dragType:s}=f;le.start({event:w,dragType:s,getDropTargetsOver:l.getIsOver,dispatchEvent:a})}function d(){function f(){var w={canStart:le.canStart,start:c};return t(w)}return Ve({typeKey:r,mount:f})}return{registerUsage:d,dropTarget:l.dropTargetForConsumers,monitor:u.monitorForConsumers}}var _e=A(function e(){return navigator.userAgent.toLocaleLowerCase().includes("android")}),et="pdnd:android-fallback";var fe="text/plain";var tt="text/uri-list";var rt="application/vnd.pdnd";var te=new WeakMap;function jt(e){return te.set(e.element,e),function r(){te.delete(e.element)}}var nt=Fe(),de=Qe({typeKey:"element",defaultDropEffect:"move",mount:function e(r){return gr(nt.bindEvents(),ot.bind(document,{type:"dragstart",listener:function t(n){var o,i,u,l,a,c;if(!r.canStart(n))return;if(n.defaultPrevented)return;if(!n.dataTransfer)return;var d=n.target;if(!(d instanceof HTMLElement))return;var f=te.get(d);if(!f)return;var w=C(n),s={element:f.element,dragHandle:(o=f.dragHandle)!==null&&o!==void 0?o:null,input:w};if(f.canDrag&&!f.canDrag(s)){n.preventDefault();return}if(f.dragHandle){var p=G({x:w.clientX,y:w.clientY});if(!f.dragHandle.contains(p)){n.preventDefault();return}}var m=(i=(u=f.getInitialDataForExternal)===null||u===void 0?void 0:u.call(f,s))!==null&&i!==void 0?i:null;if(m)for(var g=0,D=Object.entries(m);g<D.length;g++){var y=B(D[g],2),h=y[0],b=y[1];n.dataTransfer.setData(h,b!==null&&b!==void 0?b:"")}if(_e()&&!n.dataTransfer.types.includes(fe)&&!n.dataTransfer.types.includes(tt))n.dataTransfer.setData(fe,et);n.dataTransfer.setData(rt,"");var T={element:f.element,dragHandle:(l=f.dragHandle)!==null&&l!==void 0?l:null,data:(a=(c=f.getInitialData)===null||c===void 0?void 0:c.call(f,s))!==null&&a!==void 0?a:{}},v={type:"element",payload:T,startedFrom:"internal"};r.start({event:n,dragType:v})}}))},dispatchEventToSource:function e(r){var t,n,{eventName:o,payload:i}=r;(t=te.get(i.source.element))===null||t===void 0||(n=t[o])===null||n===void 0||n.call(t,i)},onPostDispatch:nt.getOnPostDispatch()}),{dropTarget:zs,monitor:Ws}=de;function gs(e){if(!1)var r;var t=gr(de.registerUsage(),jt(e),ee(e.element,{attribute:"draggable",value:"true"}));return A(t)}export{ga,gr,zs,Ws,gs};
6
6
 
7
- //# debugId=9FBD3FE97C65835064756E2164756E21
8
- //# sourceMappingURL=studio-7w04zw8h.js.map
7
+ //# debugId=5C8A290D1659961464756E2164756E21
8
+ //# sourceMappingURL=studio-st75kn99.js.map
@@ -2,7 +2,7 @@ var C=globalThis,O=(t)=>t,b=C.trustedTypes,j=b?b.createPolicy("lit-html",{create
2
2
  \f\r](?:([^\\s"'>=/]+)([
3
3
  \f\r]*=[
4
4
  \f\r]*(?:[^
5
- \f\r"'\`<>=]|("|')|))|$)`,"g"),R=/'/g,V=/"/g,z=/^(?:script|style|textarea|title)$/i,E=(t)=>(e,...s)=>({_$litType$:t,strings:e,values:s}),br=E(1),J=E(2),K=E(3),Bl=Symbol.for("lit-noChange"),tt=Symbol.for("lit-nothing"),W=new WeakMap,u=g.createTreeWalker(g,129);function Z(t,e){if(!w(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return j!==void 0?j.createHTML(e):e}var k=(t,e)=>{let s=t.length-1,i=[],n,l=e===2?"<svg>":e===3?"<math>":"",r=y;for(let o=0;o<s;o++){let a=t[o],T,h,A=-1,_=0;for(;_<a.length&&(r.lastIndex=_,h=r.exec(a),h!==null);)_=r.lastIndex,r===y?h[1]==="!--"?r=D:h[1]!==void 0?r=L:h[2]!==void 0?(z.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=p):h[3]!==void 0&&(r=p):r===p?h[0]===">"?(r=n??y,A=-1):h[1]===void 0?A=-2:(A=r.lastIndex-h[2].length,T=h[1],r=h[3]===void 0?p:h[3]==='"'?V:R):r===V||r===R?r=p:r===D||r===L?r=y:(r=p,n=void 0);let d=r===p&&t[o+1].startsWith("/>")?" ":"";l+=r===y?a+q:A>=0?(i.push(T),a.slice(0,A)+"$lit$"+a.slice(A)+c+d):a+c+(A===-2?o:d)}return[Z(t,l+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class N{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,l=0,r=t.length-1,o=this.parts,[a,T]=k(t,e);if(this.el=N.createElement(a,s),u.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=u.nextNode())!==null&&o.length<r;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith("$lit$")){let A=T[l++],_=i.getAttribute(h).split(c),d=/([.?@])?(.*)/.exec(A);o.push({type:1,index:n,name:d[2],strings:_,ctor:d[1]==="."?I:d[1]==="?"?S:d[1]==="@"?P:v}),i.removeAttribute(h)}else h.startsWith(c)&&(o.push({type:6,index:n}),i.removeAttribute(h));if(z.test(i.tagName)){let h=i.textContent.split(c),A=h.length-1;if(A>0){i.textContent=b?b.emptyScript:"";for(let _=0;_<A;_++)i.append(h[_],x()),u.nextNode(),o.push({type:2,index:++n});i.append(h[A],x())}}}else if(i.nodeType===8)if(i.data===M)o.push({type:2,index:n});else{let h=-1;for(;(h=i.data.indexOf(c,h+1))!==-1;)o.push({type:7,index:n}),h+=c.length-1}n++}}static createElement(t,e){let s=g.createElement("template");return s.innerHTML=t,s}}function f(t,e,s=t,i){if(e===Bl)return e;let n=i!==void 0?s._$Co?.[i]:s._$Cl,l=H(e)?void 0:e._$litDirective$;return n?.constructor!==l&&(n?._$AO?.(!1),l===void 0?n=void 0:(n=new l(t),n._$AT(t,s,i)),i!==void 0?(s._$Co??=[])[i]=n:s._$Cl=n),n!==void 0&&(e=f(t,n._$AS(t,e.values),n,i)),e}class B{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??g).importNode(e,!0);u.currentNode=i;let n=u.nextNode(),l=0,r=0,o=s[0];for(;o!==void 0;){if(l===o.index){let a;o.type===2?a=new m(n,n.nextSibling,this,t):o.type===1?a=new o.ctor(n,o.name,o.strings,this,t):o.type===6&&(a=new U(n,this,t)),this._$AV.push(a),o=s[++r]}l!==o?.index&&(n=u.nextNode(),l++)}return u.currentNode=g,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class m{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=tt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=f(this,t,e),H(t)?t===tt||t==null||t===""?(this._$AH!==tt&&this._$AR(),this._$AH=tt):t!==this._$AH&&t!==Bl&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):F(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==tt&&H(this._$AH)?this._$AA.nextSibling.data=t:this.T(g.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=N.createElement(Z(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{let n=new B(i,this),l=n.u(this.options);n.p(e),this.T(l),this._$AH=n}}_$AC(t){let e=W.get(t.strings);return e===void 0&&W.set(t.strings,e=new N(t)),e}k(t){w(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new m(this.O(x()),this.O(x()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=O(t).nextSibling;O(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class v{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=tt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=tt}_$AI(t,e=this,s,i){let n=this.strings,l=!1;if(n===void 0)t=f(this,t,e,0),l=!H(t)||t!==this._$AH&&t!==Bl,l&&(this._$AH=t);else{let r=t,o,a;for(t=n[0],o=0;o<n.length-1;o++)a=f(this,r[s+o],e,o),a===Bl&&(a=this._$AH[o]),l||=!H(a)||a!==this._$AH[o],a===tt?t=tt:t!==tt&&(t+=(a??"")+n[o+1]),this._$AH[o]=a}l&&!i&&this.j(t)}j(t){t===tt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class I extends v{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===tt?void 0:t}}class S extends v{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==tt)}}class P extends v{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=f(this,t,e,0)??tt)===Bl)return;let s=this._$AH,i=t===tt&&s!==tt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==tt&&(s===tt||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class U{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){f(this,t)}}var wS={M:"$lit$",P:c,A:M,C:1,L:k,R:B,D:F,V:f,I:m,H:v,N:S,U:P,B:I,F:U},G=C.litHtmlPolyfillSupport;G?.(N,m),(C.litHtmlVersions??=[]).push("3.3.3");var Oi=(t,e,s)=>{let i=s?.renderBefore??e,n=i._$litPart$;if(n===void 0){let l=s?.renderBefore??null;i._$litPart$=n=new m(e.insertBefore(x(),l),l,void 0,s??{})}return n._$AI(t),n};export{br,Bl,tt,wS,Oi};
5
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),R=/'/g,V=/"/g,z=/^(?:script|style|textarea|title)$/i,E=(t)=>(e,...s)=>({_$litType$:t,strings:e,values:s}),br=E(1),J=E(2),K=E(3),Bl=Symbol.for("lit-noChange"),tt=Symbol.for("lit-nothing"),W=new WeakMap,u=g.createTreeWalker(g,129);function Z(t,e){if(!w(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return j!==void 0?j.createHTML(e):e}var k=(t,e)=>{let s=t.length-1,i=[],n,l=e===2?"<svg>":e===3?"<math>":"",r=y;for(let o=0;o<s;o++){let a=t[o],T,h,A=-1,_=0;for(;_<a.length&&(r.lastIndex=_,h=r.exec(a),h!==null);)_=r.lastIndex,r===y?h[1]==="!--"?r=D:h[1]!==void 0?r=L:h[2]!==void 0?(z.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=p):h[3]!==void 0&&(r=p):r===p?h[0]===">"?(r=n??y,A=-1):h[1]===void 0?A=-2:(A=r.lastIndex-h[2].length,T=h[1],r=h[3]===void 0?p:h[3]==='"'?V:R):r===V||r===R?r=p:r===D||r===L?r=y:(r=p,n=void 0);let d=r===p&&t[o+1].startsWith("/>")?" ":"";l+=r===y?a+q:A>=0?(i.push(T),a.slice(0,A)+"$lit$"+a.slice(A)+c+d):a+c+(A===-2?o:d)}return[Z(t,l+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class N{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,l=0,r=t.length-1,o=this.parts,[a,T]=k(t,e);if(this.el=N.createElement(a,s),u.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=u.nextNode())!==null&&o.length<r;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith("$lit$")){let A=T[l++],_=i.getAttribute(h).split(c),d=/([.?@])?(.*)/.exec(A);o.push({type:1,index:n,name:d[2],strings:_,ctor:d[1]==="."?I:d[1]==="?"?S:d[1]==="@"?P:v}),i.removeAttribute(h)}else h.startsWith(c)&&(o.push({type:6,index:n}),i.removeAttribute(h));if(z.test(i.tagName)){let h=i.textContent.split(c),A=h.length-1;if(A>0){i.textContent=b?b.emptyScript:"";for(let _=0;_<A;_++)i.append(h[_],x()),u.nextNode(),o.push({type:2,index:++n});i.append(h[A],x())}}}else if(i.nodeType===8)if(i.data===M)o.push({type:2,index:n});else{let h=-1;for(;(h=i.data.indexOf(c,h+1))!==-1;)o.push({type:7,index:n}),h+=c.length-1}n++}}static createElement(t,e){let s=g.createElement("template");return s.innerHTML=t,s}}function f(t,e,s=t,i){if(e===Bl)return e;let n=i!==void 0?s._$Co?.[i]:s._$Cl,l=H(e)?void 0:e._$litDirective$;return n?.constructor!==l&&(n?._$AO?.(!1),l===void 0?n=void 0:(n=new l(t),n._$AT(t,s,i)),i!==void 0?(s._$Co??=[])[i]=n:s._$Cl=n),n!==void 0&&(e=f(t,n._$AS(t,e.values),n,i)),e}class B{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??g).importNode(e,!0);u.currentNode=i;let n=u.nextNode(),l=0,r=0,o=s[0];for(;o!==void 0;){if(l===o.index){let a;o.type===2?a=new m(n,n.nextSibling,this,t):o.type===1?a=new o.ctor(n,o.name,o.strings,this,t):o.type===6&&(a=new U(n,this,t)),this._$AV.push(a),o=s[++r]}l!==o?.index&&(n=u.nextNode(),l++)}return u.currentNode=g,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class m{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=tt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=f(this,t,e),H(t)?t===tt||t==null||t===""?(this._$AH!==tt&&this._$AR(),this._$AH=tt):t!==this._$AH&&t!==Bl&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):F(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==tt&&H(this._$AH)?this._$AA.nextSibling.data=t:this.T(g.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=N.createElement(Z(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{let n=new B(i,this),l=n.u(this.options);n.p(e),this.T(l),this._$AH=n}}_$AC(t){let e=W.get(t.strings);return e===void 0&&W.set(t.strings,e=new N(t)),e}k(t){w(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new m(this.O(x()),this.O(x()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=O(t).nextSibling;O(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class v{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=tt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=tt}_$AI(t,e=this,s,i){let n=this.strings,l=!1;if(n===void 0)t=f(this,t,e,0),l=!H(t)||t!==this._$AH&&t!==Bl,l&&(this._$AH=t);else{let r=t,o,a;for(t=n[0],o=0;o<n.length-1;o++)a=f(this,r[s+o],e,o),a===Bl&&(a=this._$AH[o]),l||=!H(a)||a!==this._$AH[o],a===tt?t=tt:t!==tt&&(t+=(a??"")+n[o+1]),this._$AH[o]=a}l&&!i&&this.j(t)}j(t){t===tt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class I extends v{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===tt?void 0:t}}class S extends v{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==tt)}}class P extends v{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=f(this,t,e,0)??tt)===Bl)return;let s=this._$AH,i=t===tt&&s!==tt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==tt&&(s===tt||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class U{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){f(this,t)}}var bk={M:"$lit$",P:c,A:M,C:1,L:k,R:B,D:F,V:f,I:m,H:v,N:S,U:P,B:I,F:U},G=C.litHtmlPolyfillSupport;G?.(N,m),(C.litHtmlVersions??=[]).push("3.3.3");var Ni=(t,e,s)=>{let i=s?.renderBefore??e,n=i._$litPart$;if(n===void 0){let l=s?.renderBefore??null;i._$litPart$=n=new m(e.insertBefore(x(),l),l,void 0,s??{})}return n._$AI(t),n};export{br,Bl,tt,bk,Ni};
6
6
 
7
- //# debugId=027A536B42EF692F64756E2164756E21
8
- //# sourceMappingURL=studio-dmymvk2j.js.map
7
+ //# debugId=732581C40428621064756E2164756E21
8
+ //# sourceMappingURL=studio-sxc0zvpt.js.map
@@ -0,0 +1,4 @@
1
+ var e=new Map,r=new Set;function o(){for(let t of r)t()}function ja(){o()}function db(t){return r.add(t),()=>{r.delete(t)}}function cs(t){e.set(t.key,t),o()}function x1(t){if(e.delete(t))o()}function Vf(){return[...e.values()].toSorted((t,s)=>t.order-s.order)}function Lw(){return Vf().map((t)=>t.key)}function Iw(t){return e.get(t)}var i=null,n="overview";function ub(){if(i!==null&&e.has(i))return n=i,i=null,n;if(e.has(n))return n;return Lw()[0]??n}function hb(t){if(e.has(t))n=t,i=null;else i=t;o()}export{ja,db,cs,x1,Vf,Lw,Iw,ub,hb};
2
+
3
+ //# debugId=2A602E1D78BE302464756E2164756E21
4
+ //# sourceMappingURL=studio-t1eedsyx.js.map
@@ -1,5 +1,5 @@
1
- import{Ot,rh,Ve}from"./studio-p6avneaq.js";var Rm=400;var Tc=350,dI=30000;function K(e,t){let n=e;for(let r of t){if(n==null)return;n=n[r]}return n}function so(e){return Array.isArray(e?.children)?e.children:[]}function $m(e){if(!e||typeof e!=="object")return e;if(Array.isArray(e)){for(let r of e)$m(r);return e}let t=e,{children:n}=t;if(n&&typeof n==="object"&&!Array.isArray(n)&&n.$prototype==="Array")t.children=[n];if(Array.isArray(t.children))for(let r of t.children)$m(r);if(t.$prototype==="Array"&&t.map&&typeof t.map==="object")$m(t.map);if(t.cases&&typeof t.cases==="object")for(let r of Object.values(t.cases))$m(r);return e}function ht(e){return e.length>=2?e.slice(0,-2):null}function _n(e){return e.at(-1)}function aS(e){return e.join("/")}function Xo(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;return e.every((n,r)=>n===t[r])}function qa(e,t){if(e.length>t.length)return!1;return e.every((n,r)=>n===t[r])}function Ad(e,t=[],n=0){let r=[];return l(e,t,n,r,!1),r}function l(e,t,n,r,o){if(typeof e==="string"||typeof e==="number"||typeof e==="boolean"){if(!o)r.push({depth:n,node:e,nodeType:"text",path:t});return}if(e.$prototype==="Array"){if(!o)r.push({depth:n,node:e,nodeType:"map",path:t});let s=e.map;if(s&&typeof s==="object")l(s,[...t,"map"],n+1,r,!1);return}if(!o)r.push({depth:n,node:e,nodeType:"element",path:t});if(e.$props&&Ve(e.tagName).includes("-")&&!Array.isArray(e.children))return;let{children:i}=e;if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=[...t,"children",s];l(i[s],a,n+1,r,!1)}else if(i&&typeof i==="object"&&i.$prototype==="Array")l(i,[...t,"children"],n+1,r,!1);if(e.$switch&&e.cases&&typeof e.cases==="object")for(let[s,a]of Object.entries(e.cases)){let c=[...t,"cases",s];if(a&&typeof a==="object"&&a.$ref)r.push({depth:n+1,node:a,nodeType:"case-ref",path:c});else if(a&&typeof a==="object")r.push({depth:n+1,node:a,nodeType:"case",path:c}),l(a,c,n+2,r,!0)}}function Mo(e){if(!e)return"?";if(e.$prototype==="Array"){let{items:r}=e;return`Repeater → ${(Ot(r)?r.$ref:void 0)||"items"}`}if(e.$title)return e.$title;if(e.$id)return e.$id;if(e.tagName==="slot"){let r=e.attributes?.name;return typeof r==="string"&&r.trim()?`slot: ${r.trim()}`:"slot"}let t=Ve(e.tagName)||"div",n=e.$switch?" ⇆":"";if(typeof e.textContent==="string"&&e.textContent.length>0)return`${t} — ${e.textContent.slice(0,24)}${n}`;return t+n}var D=null;function Hl(e){D=e}function vt(){return D}function Xu(e){if(!e||typeof e!=="object")return e;if(Array.isArray(e))return e.map((n)=>Xu(n));let t={};for(let[n,r]of Object.entries(e)){if(n.startsWith("on")&&rh(r))continue;if(n==="children")t.children=Array.isArray(r)?r.map((o)=>Xu(o)):Xu(r);else if(n==="cases"&&typeof r==="object"){let o={};for(let[i,s]of Object.entries(r))o[i]=Xu(s);t.cases=o}else if(n==="state"&&typeof r==="object"&&r!==null){let o={};for(let[i,s]of Object.entries(r)){if(s&&typeof s==="object"&&s.timing==="server")continue;o[i]=s}t.state=o}else if(n==="style"||n==="attributes"||n==="$media")t[n]=r;else t[n]=r}return t}var jx=null,Qu=null,lS=null,cS=null,Hx=null;function uI(){jx=document.querySelector("#activity-bar"),Qu=document.querySelector("#left-panel"),lS=document.querySelector("#right-panel"),cS=document.querySelector("#toolbar"),Hx=document.querySelector("#statusbar")}var Ep=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),dS=[":hover",":focus",":active",":focus-within",":focus-visible",":disabled",":first-child",":last-child","::before","::after","::placeholder"];function Bx(e){return e.startsWith(":")||e.startsWith(".")||e.startsWith("&")||e.startsWith("[")}var u=new Map;function Ev(e,t,n){let r=t??Rm;return(...o)=>{clearTimeout(u.get(e)),u.set(e,setTimeout(()=>{u.delete(e),n(...o)},r))}}function hI(e){clearTimeout(u.get(e)),u.delete(e)}var p=new Map,f=0;function pI(){return f}function d(e,t){f+=1;let n=()=>{f-=1},r=null;try{let o=t();if(typeof o?.then==="function")r=o}catch(o){console.error(`Renderer "${e}" failed:`,o)}if(!r){n();return}r.then(n,(o)=>{console.error(`Renderer "${e}" failed:`,o),n()})}function eh(e,t){p.set(e,t)}function Po(){for(let[e,t]of p.entries())d(e,t)}function Ni(...e){for(let t of e){let n=p.get(t);if(!n)continue;d(t,n)}}function Lc(e,t){if(e){if(t.selection!==void 0)e.session.selection=t.selection;if(t.hover!==void 0)e.session.hover=t.hover;if(t.clipboard!==void 0)e.session.clipboard=t.clipboard;if(t.ui)for(let[n,r]of Object.entries(t.ui))e.session.ui[n]=r;if(t.canvas)for(let[n,r]of Object.entries(t.canvas))e.session.canvas[n]=r}}function qr(e,t,n){if(e)e.session.ui[t]=n}function fI(e,t){if(e)for(let[n,r]of Object.entries(t))e.session.canvas[n]=r}
2
- export{Rm,Tc,dI,K,so,$m,ht,_n,aS,Xo,qa,Ad,Mo,D,Hl,vt,Xu,jx,Qu,lS,cS,Hx,uI,Ep,dS,Bx,Ev,hI,pI,eh,Po,Ni,Lc,qr,fI};
1
+ import{Ot,rh,qe}from"./studio-nbxqcgvf.js";var Tm=400;var Tc=350,oI=30000;function K(e,t){let n=e;for(let r of t){if(n==null)return;n=n[r]}return n}function _o(e){return Array.isArray(e?.children)?e.children:[]}function Lm(e){if(!e||typeof e!=="object")return e;if(Array.isArray(e)){for(let r of e)Lm(r);return e}let t=e,{children:n}=t;if(n&&typeof n==="object"&&!Array.isArray(n)&&n.$prototype==="Array")t.children=[n];if(Array.isArray(t.children))for(let r of t.children)Lm(r);if(t.$prototype==="Array"&&t.map&&typeof t.map==="object")Lm(t.map);if(t.cases&&typeof t.cases==="object")for(let r of Object.values(t.cases))Lm(r);return e}function ht(e){return e.length>=2?e.slice(0,-2):null}function _n(e){return e.at(-1)}function ok(e){return e.join("/")}function Yo(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;return e.every((n,r)=>n===t[r])}function qa(e,t){if(e.length>t.length)return!1;return e.every((n,r)=>n===t[r])}function Nd(e,t=[],n=0){let r=[];return l(e,t,n,r,!1),r}function l(e,t,n,r,o){if(typeof e==="string"||typeof e==="number"||typeof e==="boolean"){if(!o)r.push({depth:n,node:e,nodeType:"text",path:t});return}if(e.$prototype==="Array"){if(!o)r.push({depth:n,node:e,nodeType:"map",path:t});let s=e.map;if(s&&typeof s==="object")l(s,[...t,"map"],n+1,r,!1);return}if(!o)r.push({depth:n,node:e,nodeType:"element",path:t});if(e.$props&&qe(e.tagName).includes("-")&&!Array.isArray(e.children))return;let{children:i}=e;if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=[...t,"children",s];l(i[s],a,n+1,r,!1)}else if(i&&typeof i==="object"&&i.$prototype==="Array")l(i,[...t,"children"],n+1,r,!1);if(e.$switch&&e.cases&&typeof e.cases==="object")for(let[s,a]of Object.entries(e.cases)){let c=[...t,"cases",s];if(a&&typeof a==="object"&&a.$ref)r.push({depth:n+1,node:a,nodeType:"case-ref",path:c});else if(a&&typeof a==="object")r.push({depth:n+1,node:a,nodeType:"case",path:c}),l(a,c,n+2,r,!0)}}function Zo(e){if(!e)return"?";if(e.$prototype==="Array"){let{items:r}=e;return`Repeater → ${(Ot(r)?r.$ref:void 0)||"items"}`}if(e.$title)return e.$title;if(e.$id)return e.$id;if(e.tagName==="slot"){let r=e.attributes?.name;return typeof r==="string"&&r.trim()?`slot: ${r.trim()}`:"slot"}let t=qe(e.tagName)||"div",n=e.$switch?" ⇆":"";if(typeof e.textContent==="string"&&e.textContent.length>0)return`${t} — ${e.textContent.slice(0,24)}${n}`;return t+n}var D=null;function Hl(e){D=e}function vt(){return D}function Xu(e){if(!e||typeof e!=="object")return e;if(Array.isArray(e))return e.map((n)=>Xu(n));let t={};for(let[n,r]of Object.entries(e)){if(n.startsWith("on")&&rh(r))continue;if(n==="children")t.children=Array.isArray(r)?r.map((o)=>Xu(o)):Xu(r);else if(n==="cases"&&typeof r==="object"){let o={};for(let[i,s]of Object.entries(r))o[i]=Xu(s);t.cases=o}else if(n==="state"&&typeof r==="object"&&r!==null){let o={};for(let[i,s]of Object.entries(r)){if(s&&typeof s==="object"&&s.timing==="server")continue;o[i]=s}t.state=o}else if(n==="style"||n==="attributes"||n==="$media")t[n]=r;else t[n]=r}return t}var jx=null,Qu=null,rk=null,sk=null,Ev=null;function rI(){jx=document.querySelector("#activity-bar"),Qu=document.querySelector("#left-panel"),rk=document.querySelector("#right-panel"),sk=document.querySelector("#toolbar"),Ev=document.querySelector("#statusbar")}var Sp=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ak=[":hover",":focus",":active",":focus-within",":focus-visible",":disabled",":first-child",":last-child","::before","::after","::placeholder"];function Hx(e){return e.startsWith(":")||e.startsWith(".")||e.startsWith("&")||e.startsWith("[")}var u=new Map;function Tv(e,t,n){let r=t??Tm;return(...o)=>{clearTimeout(u.get(e)),u.set(e,setTimeout(()=>{u.delete(e),n(...o)},r))}}function sI(e){clearTimeout(u.get(e)),u.delete(e)}var p=new Map,f=0;function aI(){return f}function d(e,t){f+=1;let n=()=>{f-=1},r=null;try{let o=t();if(typeof o?.then==="function")r=o}catch(o){console.error(`Renderer "${e}" failed:`,o)}if(!r){n();return}r.then(n,(o)=>{console.error(`Renderer "${e}" failed:`,o),n()})}function eh(e,t){p.set(e,t)}function Oo(){for(let[e,t]of p.entries())d(e,t)}function Ai(...e){for(let t of e){let n=p.get(t);if(!n)continue;d(t,n)}}function Lc(e,t){if(e){if(t.selection!==void 0)e.session.selection=t.selection;if(t.hover!==void 0)e.session.hover=t.hover;if(t.clipboard!==void 0)e.session.clipboard=t.clipboard;if(t.ui)for(let[n,r]of Object.entries(t.ui))e.session.ui[n]=r;if(t.canvas)for(let[n,r]of Object.entries(t.canvas))e.session.canvas[n]=r}}function Gr(e,t,n){if(e)e.session.ui[t]=n}function lI(e,t){if(e)for(let[n,r]of Object.entries(t))e.session.canvas[n]=r}
2
+ export{Tm,Tc,oI,K,_o,Lm,ht,_n,ok,Yo,qa,Nd,Zo,D,Hl,vt,Xu,jx,Qu,rk,sk,Ev,rI,Sp,ak,Hx,Tv,sI,aI,eh,Oo,Ai,Lc,Gr,lI};
3
3
 
4
- //# debugId=F3BCCAE78F8C420864756E2164756E21
5
- //# sourceMappingURL=studio-153mwkyq.js.map
4
+ //# debugId=4157AE0D27B8DA8364756E2164756E21
5
+ //# sourceMappingURL=studio-tp642n5g.js.map