@jxsuite/studio 10.3.0 → 10.5.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 (275) hide show
  1. package/dist/chunks/2020-7sx2vexa.js +4 -0
  2. package/dist/chunks/adapter-12dxr3z7.js +4 -0
  3. package/dist/chunks/{add-new-flow-3tkn72ey.js → add-new-flow-any4pw2q.js} +3 -3
  4. package/dist/chunks/{cf-account-picker-xb8vvt2h.js → cf-account-picker-ajh60k54.js} +3 -3
  5. package/dist/chunks/cf-settings-hbj16kh3.js +4 -0
  6. package/dist/chunks/{color-area-h8dbasp1.js → color-area-gbcftzh3.js} +2 -2
  7. package/dist/chunks/{color-field-qv5r2b16.js → color-field-85136598.js} +3 -3
  8. package/dist/chunks/{color-slider-nz2mrzky.js → color-slider-w1s3ndd8.js} +2 -2
  9. package/dist/chunks/color-thzpppyc.js +4 -0
  10. package/dist/chunks/{combobox-6hs00996.js → combobox-dk98wc5x.js} +3 -3
  11. package/dist/chunks/components-a98hzqw9.js +4 -0
  12. package/dist/chunks/content-source-jq3fjs3w.js +4 -0
  13. package/dist/chunks/{convert-to-repeater-gwzh9gar.js → convert-to-repeater-g66r6qp1.js} +3 -3
  14. package/dist/chunks/editor-rth1rzj8.js +4 -0
  15. package/dist/chunks/entry-commands-02j0s19w.js +4 -0
  16. package/dist/chunks/{extension-sections-338ee35t.js → extension-sections-rqrs7dr0.js} +3 -3
  17. package/dist/chunks/file-ops-6a49er4c.js +4 -0
  18. package/dist/chunks/files-b2p9y0yz.js +4 -0
  19. package/dist/chunks/format-host-7xe57k1s.js +4 -0
  20. package/dist/chunks/fs-events-0xsy168g.js +4 -0
  21. package/dist/chunks/grid-open-h3q4fjy5.js +4 -0
  22. package/dist/chunks/{grid-view-w9nfy203.js → grid-view-0v4hjspb.js} +17 -17
  23. package/dist/chunks/{icons-gb967qc8.js → icons-j9eksgew.js} +2 -2
  24. package/dist/chunks/{iframe-entry-btck0e9s.js → iframe-entry-4zqtn3ry.js} +4 -4
  25. package/dist/chunks/{iframe-entry-b5qgggyp.js → iframe-entry-54kwwhmg.js} +4 -4
  26. package/dist/chunks/{iframe-entry-42hpmwz5.js → iframe-entry-m24fza30.js} +4 -4
  27. package/dist/chunks/iframe-host-8jcmaktg.js +4 -0
  28. package/dist/chunks/{image-bake-4afr4y6a.js → image-bake-m8gzaan9.js} +3 -3
  29. package/dist/chunks/{image-editor-x7t8jbjn.js → image-editor-0afyws7c.js} +3 -3
  30. package/dist/chunks/{index-yjrfeks8.js → index-2q88g57p.js} +3 -3
  31. package/dist/chunks/index-7nj2375a.js +4 -0
  32. package/dist/chunks/{javascript-hy2mws8v.js → javascript-5sxtr1g7.js} +3 -3
  33. package/dist/chunks/jsonMode-m6sf47hq.js +13 -0
  34. package/dist/chunks/jx-validate-808zgbgy.js +4 -0
  35. package/dist/chunks/layers-0ffdtqjn.js +4 -0
  36. package/dist/chunks/layers-panel-rw62wtvf.js +4 -0
  37. package/dist/chunks/{listbox-7gka1h86.js → listbox-k5p41049.js} +2 -2
  38. package/dist/chunks/lit-html-9bz9rcfv.js +4 -0
  39. package/dist/chunks/media-library-2a5hdbek.js +4 -0
  40. package/dist/chunks/media-open-069kzhj4.js +4 -0
  41. package/dist/chunks/media-picker-4p4pd28y.js +4 -0
  42. package/dist/chunks/menu-26nez152.js +4 -0
  43. package/dist/chunks/{monaco-binding-a51py33c.js → monaco-binding-1s2b8snq.js} +3 -3
  44. package/dist/chunks/monaco-buffer-m9fd2dka.js +4 -0
  45. package/dist/chunks/monaco-setup-e0crh3v6.js +4 -0
  46. package/dist/chunks/notify-re3js157.js +4 -0
  47. package/dist/chunks/platform-rywy3tkg.js +4 -0
  48. package/dist/chunks/popover-fhdnt4be.js +4 -0
  49. package/dist/chunks/publish-panel-czkpg8m4.js +4 -0
  50. package/dist/chunks/{publish-quick-w3nxd7q4.js → publish-quick-b9wbhqj6.js} +3 -3
  51. package/dist/chunks/publish-workspace-yy6d23b7.js +4 -0
  52. package/dist/chunks/quick-search-tp7pjnmv.js +4 -0
  53. package/dist/chunks/references-wd2yj8s1.js +4 -0
  54. package/dist/chunks/right-panel-x971k0zc.js +4 -0
  55. package/dist/chunks/source-control-k4p00hpe.js +4 -0
  56. package/dist/chunks/{split-m5rwn31z.js → split-qh21j2b0.js} +2 -2
  57. package/dist/chunks/{studio-v5wktj6f.js → studio-151kgn69.js} +4 -4
  58. package/dist/chunks/studio-15mfah02.js +10 -0
  59. package/dist/chunks/studio-1a7zshnv.js +5 -0
  60. package/dist/chunks/studio-1d8m5s38.js +16 -0
  61. package/dist/chunks/studio-35pmfjtx.js +5 -0
  62. package/dist/chunks/{studio-3na1r48j.js → studio-3yr1zdp9.js} +8 -8
  63. package/dist/chunks/studio-43pynnhz.js +5 -0
  64. package/dist/chunks/studio-44xqe0b7.js +4 -0
  65. package/dist/chunks/{studio-hh394phe.js → studio-48yzqzqr.js} +4 -4
  66. package/dist/chunks/{studio-nskxe9q1.js → studio-4jy967rj.js} +5 -5
  67. package/dist/chunks/{studio-waekn290.js → studio-4ncxzw5m.js} +4 -4
  68. package/dist/chunks/{studio-pm17wdc4.js → studio-4s5bka8t.js} +4 -4
  69. package/dist/chunks/{studio-5tet77de.js → studio-4z0cdh16.js} +3 -3
  70. package/dist/chunks/studio-5rq3e4q5.js +5 -0
  71. package/dist/chunks/{studio-2ggfzrrd.js → studio-69g6a0jn.js} +4 -4
  72. package/dist/chunks/studio-6hcfm9q3.js +5 -0
  73. package/dist/chunks/studio-6mf31e16.js +5 -0
  74. package/dist/chunks/studio-6sxnqqw8.js +5 -0
  75. package/dist/chunks/{studio-0939t1q1.js → studio-7qqb7hb8.js} +4 -4
  76. package/dist/chunks/{studio-5n193zqd.js → studio-7qr8k0v2.js} +4 -4
  77. package/dist/chunks/{studio-0x6f3nk9.js → studio-8ncm9zwx.js} +4 -4
  78. package/dist/chunks/studio-8w5pa88p.js +7 -0
  79. package/dist/chunks/{studio-3qr08sxq.js → studio-9f5vcb4w.js} +3 -3
  80. package/dist/chunks/studio-aaw7wxv8.js +5 -0
  81. package/dist/chunks/studio-afx9brsc.js +5 -0
  82. package/dist/chunks/studio-ajfq4fmr.js +5 -0
  83. package/dist/chunks/{studio-nn4f9m9c.js → studio-ber1dgte.js} +4 -4
  84. package/dist/chunks/{studio-sce30r7b.js → studio-bk0anq3b.js} +3 -3
  85. package/dist/chunks/{studio-0gvvqj3h.js → studio-bmwgj8ez.js} +4 -4
  86. package/dist/chunks/{studio-321ym1tt.js → studio-bpzwhn88.js} +4 -4
  87. package/dist/chunks/{studio-g9brbewz.js → studio-c72v1kwc.js} +4 -4
  88. package/dist/chunks/{studio-tpxcryf2.js → studio-cv6gnjqd.js} +4 -4
  89. package/dist/chunks/{studio-90zkgne5.js → studio-czpmzs9r.js} +7 -7
  90. package/dist/chunks/{studio-3c10v2q1.js → studio-d5f7sskn.js} +4 -4
  91. package/dist/chunks/studio-dmgh2rrj.js +5 -0
  92. package/dist/chunks/{studio-b68k0z00.js → studio-dst8y8vh.js} +4 -4
  93. package/dist/chunks/studio-ehj3csbm.js +6 -0
  94. package/dist/chunks/{studio-thz5t120.js → studio-ek4fb4eb.js} +4 -4
  95. package/dist/chunks/studio-ep1384t9.js +5 -0
  96. package/dist/chunks/{studio-abh9kfdh.js → studio-eq5vqn1q.js} +4 -4
  97. package/dist/chunks/studio-erjccagy.js +5 -0
  98. package/dist/chunks/studio-ex1644g2.js +5 -0
  99. package/dist/chunks/studio-f3awr5nc.js +12 -0
  100. package/dist/chunks/studio-f69wcajk.js +9 -0
  101. package/dist/chunks/{studio-p2a03pgm.js → studio-g65t6svn.js} +4 -4
  102. package/dist/chunks/{studio-3q7mhbgx.js → studio-gw83z798.js} +5 -5
  103. package/dist/chunks/{studio-nwynxqtb.js → studio-hy936516.js} +4 -4
  104. package/dist/chunks/studio-j3bq30yz.js +5 -0
  105. package/dist/chunks/studio-j52ks8q7.js +5 -0
  106. package/dist/chunks/{studio-g0hxtcga.js → studio-jqvke4ac.js} +4 -4
  107. package/dist/chunks/{studio-bct64zmj.js → studio-k05g7efh.js} +4 -4
  108. package/dist/chunks/studio-kefs4sz4.js +5 -0
  109. package/dist/chunks/{studio-s7t4vp1d.js → studio-ketrgtph.js} +5 -5
  110. package/dist/chunks/studio-m3jrjfhy.js +14 -0
  111. package/dist/chunks/{studio-45mj4jqe.js → studio-m8hesdrw.js} +4 -4
  112. package/dist/chunks/{studio-k0xzrse2.js → studio-n271vdsg.js} +36 -36
  113. package/dist/chunks/studio-n4pnf0sw.js +5 -0
  114. package/dist/chunks/{studio-wfct4h6n.js → studio-ncwx602y.js} +4 -4
  115. package/dist/chunks/{studio-423tfdte.js → studio-nngc45ct.js} +4 -4
  116. package/dist/chunks/{studio-eqcddvc2.js → studio-nv5eq0f7.js} +173 -173
  117. package/dist/chunks/{studio-ea6r1zyr.js → studio-nzp0sqjg.js} +4 -4
  118. package/dist/chunks/{studio-k2evngrj.js → studio-pgze9p34.js} +5 -5
  119. package/dist/chunks/studio-ph17an19.js +5 -0
  120. package/dist/chunks/studio-pte5w7rf.js +9 -0
  121. package/dist/chunks/studio-pv1ts08p.js +6 -0
  122. package/dist/chunks/studio-q509sqt8.js +5 -0
  123. package/dist/chunks/{studio-stahswgb.js → studio-qarg1xf9.js} +6 -6
  124. package/dist/chunks/studio-r5g7fx7q.js +9 -0
  125. package/dist/chunks/studio-s49y6m5b.js +5 -0
  126. package/dist/chunks/studio-s4k1v7dt.js +7 -0
  127. package/dist/chunks/studio-t46rt6gx.js +5 -0
  128. package/dist/chunks/{studio-y1b86ast.js → studio-td3h1644.js} +4 -4
  129. package/dist/chunks/{studio-a65kbs2e.js → studio-thgexj3w.js} +7 -7
  130. package/dist/chunks/{studio-vpevkfxw.js → studio-veh91hjv.js} +4 -4
  131. package/dist/chunks/studio-vswmz40d.js +6 -0
  132. package/dist/chunks/{studio-daksw8kh.js → studio-w3aafbpk.js} +4 -4
  133. package/dist/chunks/studio-w4mfaaam.js +5 -0
  134. package/dist/chunks/{studio-4zd6an2b.js → studio-wn2cmf9q.js} +4 -4
  135. package/dist/chunks/studio-x5ffyssw.js +5 -0
  136. package/dist/chunks/{studio-swedpd82.js → studio-x5py815g.js} +4 -4
  137. package/dist/chunks/{studio-4fnb5648.js → studio-xh6rf05g.js} +4 -4
  138. package/dist/chunks/studio-z6s56dzz.js +5 -0
  139. package/dist/chunks/{studio-nvcn2ykc.js → studio-zav9hgb3.js} +4 -4
  140. package/dist/chunks/{studio-wse1rs8t.js → studio-ze1sm147.js} +6 -6
  141. package/dist/chunks/{studio-hfxttkyr.js → studio-zkkt13qd.js} +4 -4
  142. package/dist/chunks/studio-zn7ysyzb.js +5 -0
  143. package/dist/chunks/{studio-nf8esxxc.js → studio-ztzf8mce.js} +4 -4
  144. package/dist/chunks/{studio-1410q5dw.js → studio-zzgp5yka.js} +4 -4
  145. package/dist/chunks/{tooltip-dj1pvgz7.js → tooltip-gtx40bjg.js} +3 -3
  146. package/dist/chunks/{tree-j0ebwr5s.js → tree-a19s1c05.js} +2 -2
  147. package/dist/chunks/tsMode-3f116hth.js +14 -0
  148. package/dist/chunks/workspace-home-61n1jz3q.js +4 -0
  149. package/dist/chunks/workspace-sheek6zw.js +4 -0
  150. package/dist/chunks/{ws-client-arz2qsy9.js → ws-client-cb49m87s.js} +3 -3
  151. package/dist/iframe-entry.js +14 -14
  152. package/dist/manifest.json +82 -82
  153. package/dist/studio.js +97 -96
  154. package/dist/workers/ts.worker.js +3 -3
  155. package/package.json +11 -11
  156. package/src/browse/library-layouts.ts +9 -12
  157. package/src/browse/library-pane.ts +22 -16
  158. package/src/browse/library-source.ts +3 -4
  159. package/src/canvas/canvas-live-render.ts +2 -5
  160. package/src/canvas/canvas-page-context.ts +5 -0
  161. package/src/content/entry-commands.ts +32 -27
  162. package/src/content/entry-editor.ts +46 -44
  163. package/src/content/entry-inspector.ts +15 -12
  164. package/src/content/entry-model.ts +3 -3
  165. package/src/content/entry-summaries.ts +5 -5
  166. package/src/content/hold-state.ts +172 -0
  167. package/src/content/page-summaries.ts +10 -14
  168. package/src/editor/inline-edit.ts +6 -1
  169. package/src/editor/repeater-scope.ts +333 -74
  170. package/src/grid/sources/content-source.ts +42 -66
  171. package/src/panels/block-action-bar.ts +3 -4
  172. package/src/panels/events-panel.ts +6 -2
  173. package/src/panels/formula-workspace.ts +9 -0
  174. package/src/panels/properties-panel.ts +127 -35
  175. package/src/panels/statement-editor.ts +4 -0
  176. package/src/panels/tab-strip.ts +29 -26
  177. package/src/services/ai-project-tools.ts +3 -3
  178. package/src/services/ai-tools.ts +5 -5
  179. package/src/services/ai-write-report.ts +22 -4
  180. package/src/services/context-manager.ts +110 -2
  181. package/src/services/document-assistant.ts +2 -2
  182. package/src/services/harness/chat-reducer.ts +9 -4
  183. package/src/services/render-critic.ts +234 -12
  184. package/src/services/tool-executor.ts +16 -8
  185. package/src/surfaces/collections-panel.json +1 -1
  186. package/src/surfaces/collections-panel.ts +1 -1
  187. package/src/surfaces/entry-editor.json +10 -10
  188. package/src/surfaces/entry-editor.ts +22 -19
  189. package/src/surfaces/entry-inspector.json +11 -11
  190. package/src/surfaces/entry-inspector.ts +17 -10
  191. package/src/surfaces/inspector-dock.json +3 -3
  192. package/src/surfaces/tab-strip.json +5 -5
  193. package/src/surfaces/tab-strip.ts +2 -2
  194. package/src/types.ts +2 -0
  195. package/src/ui/expression-editor.ts +10 -5
  196. package/src/ui/schema-form.ts +18 -1
  197. package/src/utils/edit-display.ts +27 -1
  198. package/dist/chunks/2020-906vx2dq.js +0 -4
  199. package/dist/chunks/adapter-hnvad61x.js +0 -4
  200. package/dist/chunks/cf-settings-mkbcz4z2.js +0 -4
  201. package/dist/chunks/color-04361ttk.js +0 -4
  202. package/dist/chunks/components-w5zqwva1.js +0 -4
  203. package/dist/chunks/content-source-1vzxq1ba.js +0 -4
  204. package/dist/chunks/editor-wvf5e6j9.js +0 -4
  205. package/dist/chunks/entry-commands-mx2whrjx.js +0 -4
  206. package/dist/chunks/file-ops-9bxvk59j.js +0 -4
  207. package/dist/chunks/files-t07yqqej.js +0 -4
  208. package/dist/chunks/format-host-5ja5gxyk.js +0 -4
  209. package/dist/chunks/fs-events-3424ezp3.js +0 -4
  210. package/dist/chunks/grid-open-1mpq9mzb.js +0 -4
  211. package/dist/chunks/iframe-host-wsg0bn73.js +0 -4
  212. package/dist/chunks/index-f9qr7kzh.js +0 -4
  213. package/dist/chunks/jsonMode-vj30te2h.js +0 -13
  214. package/dist/chunks/jx-validate-ttr5ewf0.js +0 -4
  215. package/dist/chunks/layers-m49nmwvx.js +0 -4
  216. package/dist/chunks/layers-panel-hvy2e549.js +0 -4
  217. package/dist/chunks/lit-html-k2mb9k0r.js +0 -4
  218. package/dist/chunks/media-library-ae67q4at.js +0 -4
  219. package/dist/chunks/media-open-yp9jm834.js +0 -4
  220. package/dist/chunks/media-picker-s41ngdfr.js +0 -4
  221. package/dist/chunks/menu-d2jxpgma.js +0 -4
  222. package/dist/chunks/monaco-buffer-pa0g6ax7.js +0 -4
  223. package/dist/chunks/monaco-setup-g9kterhx.js +0 -4
  224. package/dist/chunks/notify-bwehrp7q.js +0 -4
  225. package/dist/chunks/platform-kv0k65cy.js +0 -4
  226. package/dist/chunks/popover-9tf4cjrk.js +0 -4
  227. package/dist/chunks/publish-panel-gzfxcm0t.js +0 -4
  228. package/dist/chunks/publish-workspace-dppd82tc.js +0 -4
  229. package/dist/chunks/quick-search-tdxaam55.js +0 -4
  230. package/dist/chunks/references-vqyr5s9x.js +0 -4
  231. package/dist/chunks/right-panel-0yrw4cgz.js +0 -4
  232. package/dist/chunks/source-control-6fk72me2.js +0 -4
  233. package/dist/chunks/studio-0khd8xtx.js +0 -4
  234. package/dist/chunks/studio-0w3541dg.js +0 -7
  235. package/dist/chunks/studio-15hwqgd8.js +0 -5
  236. package/dist/chunks/studio-1ks5d9y4.js +0 -5
  237. package/dist/chunks/studio-3xk9zdgb.js +0 -5
  238. package/dist/chunks/studio-4f7thq0p.js +0 -5
  239. package/dist/chunks/studio-53wy9ek3.js +0 -5
  240. package/dist/chunks/studio-7rrdbvex.js +0 -5
  241. package/dist/chunks/studio-8kx6m0rg.js +0 -5
  242. package/dist/chunks/studio-9dq7rwc7.js +0 -5
  243. package/dist/chunks/studio-9qx1ywbv.js +0 -9
  244. package/dist/chunks/studio-aam8zt8z.js +0 -5
  245. package/dist/chunks/studio-b4e0ftkt.js +0 -5
  246. package/dist/chunks/studio-bz0b5brj.js +0 -6
  247. package/dist/chunks/studio-cfnn70h1.js +0 -5
  248. package/dist/chunks/studio-e7vjyp04.js +0 -10
  249. package/dist/chunks/studio-egnjpyde.js +0 -9
  250. package/dist/chunks/studio-ejrypvmq.js +0 -5
  251. package/dist/chunks/studio-f8tyeyzt.js +0 -5
  252. package/dist/chunks/studio-fj6c905s.js +0 -5
  253. package/dist/chunks/studio-fkrr7kgg.js +0 -9
  254. package/dist/chunks/studio-fspe7m9t.js +0 -5
  255. package/dist/chunks/studio-ggx3j7nd.js +0 -5
  256. package/dist/chunks/studio-j0zf5x2x.js +0 -5
  257. package/dist/chunks/studio-jeb7hth3.js +0 -5
  258. package/dist/chunks/studio-k1xqrgm5.js +0 -5
  259. package/dist/chunks/studio-k3we3kqb.js +0 -5
  260. package/dist/chunks/studio-n9qba0gx.js +0 -5
  261. package/dist/chunks/studio-nzemfbkk.js +0 -14
  262. package/dist/chunks/studio-q80fg1d6.js +0 -12
  263. package/dist/chunks/studio-r050sez0.js +0 -6
  264. package/dist/chunks/studio-s9fng7m8.js +0 -7
  265. package/dist/chunks/studio-wgc54sxf.js +0 -5
  266. package/dist/chunks/studio-wqfaqw4m.js +0 -5
  267. package/dist/chunks/studio-x0gsfr1d.js +0 -16
  268. package/dist/chunks/studio-xpx91fby.js +0 -6
  269. package/dist/chunks/studio-yrcrncev.js +0 -5
  270. package/dist/chunks/studio-yzpskb0j.js +0 -5
  271. package/dist/chunks/studio-zfdbmhp3.js +0 -5
  272. package/dist/chunks/tsMode-jg1dtphj.js +0 -14
  273. package/dist/chunks/workspace-9btkc8tk.js +0 -4
  274. package/dist/chunks/workspace-home-qcc4z5ag.js +0 -4
  275. package/src/content/draft-state.ts +0 -108
@@ -1,12 +0,0 @@
1
- import{pe}from"./studio-0939t1q1.js";var xe=pe(function(Tr){Object.defineProperty(Tr,"__esModule",{value:!0});Tr.regexpCode=Tr.getEsmExportName=Tr.getProperty=Tr.safeStringify=Tr.stringify=Tr.strConcat=Tr.addCodeArg=Tr.str=Tr._=Tr.nil=Tr._Code=Tr.Name=Tr.IDENTIFIER=Tr._CodeOrName=void 0;class Ke{}Tr._CodeOrName=Ke;Tr.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class he extends Ke{constructor(e){super();if(!Tr.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}Tr.Name=he;class U extends Ke{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof he)t[r.str]=(t[r.str]||0)+1;return t},{})}}Tr._Code=U;Tr.nil=new U("");function Nr(e,...t){let r=[e[0]],n=0;while(n<t.length)Nt(r,t[n]),r.push(e[++n]);return new U(r)}Tr._=Nr;var kt=new U("+");function qr(e,...t){let r=[Pe(e[0])],n=0;while(n<t.length)r.push(kt),Nt(r,t[n]),r.push(kt,Pe(e[++n]));return Wi(r),new U(r)}Tr.str=qr;function Nt(e,t){if(t instanceof U)e.push(...t._items);else if(t instanceof he)e.push(t);else e.push(Xi(t))}Tr.addCodeArg=Nt;function Wi(e){let t=1;while(t<e.length-1){if(e[t]===kt){let r=Qi(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function Qi(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof he||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof he))return`"${e}${t.slice(1)}`;return}function Zi(e,t){return t.emptyStr()?e:e.emptyStr()?t:qr`${e}${t}`}Tr.strConcat=Zi;function Xi(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Pe(Array.isArray(e)?e.join(","):e)}function Yi(e){return new U(Pe(e))}Tr.stringify=Yi;function Pe(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Tr.safeStringify=Pe;function ea(e){return typeof e=="string"&&Tr.IDENTIFIER.test(e)?new U(`.${e}`):Nr`[${e}]`}Tr.getProperty=ea;function ta(e){if(typeof e=="string"&&Tr.IDENTIFIER.test(e))return new U(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Tr.getEsmExportName=ta;function ra(e){return new U(e.toString())}Tr.regexpCode=ra});var jt=pe(function(Cr){Object.defineProperty(Cr,"__esModule",{value:!0});Cr.ValueScope=Cr.ValueScopeName=Cr.Scope=Cr.varKinds=Cr.UsedValueState=void 0;var C=xe();class jr extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var Je;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Je||(Cr.UsedValueState=Je={}));Cr.varKinds={const:new C.Name("const"),let:new C.Name("let"),var:new C.Name("var")};class Tt{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof C.Name?e:this.name(e)}name(e){return new C.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}Cr.Scope=Tt;class It extends C.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=C._`.${new C.Name(t)}[${r}]`}}Cr.ValueScopeName=It;var ma=C._`\n`;class Dr extends Tt{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?ma:C.nil}}get(){return this._scope}name(e){return new It(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:o}=n,s=(r=t.key)!==null&&r!==void 0?r:t.ref,i=this._values[o];if(i){let d=i.get(s);if(d)return d}else i=this._values[o]=new Map;i.set(s,n);let a=this._scope[o]||(this._scope[o]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:o,itemIndex:c}),n}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return C._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(n)=>{if(n.value===void 0)throw Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,r)}_reduceValues(e,t,r={},n){let o=C.nil;for(let s in e){let i=e[s];if(!i)continue;let a=r[s]=r[s]||new Map;i.forEach((c)=>{if(a.has(c))return;a.set(c,Je.Started);let d=t(c);if(d){let u=this.opts.es5?Cr.varKinds.var:Cr.varKinds.const;o=C._`${o}${u} ${c} = ${d};${this.opts._n}`}else if(d=n===null||n===void 0?void 0:n(c))o=C._`${o}${d}${this.opts._n}`;else throw new jr(c);a.set(c,Je.Completed)})}return o}}Cr.ValueScope=Dr});var Bt=pe(function(A){Object.defineProperty(A,"__esModule",{value:!0});A.or=A.and=A.not=A.CodeGen=A.operators=A.varKinds=A.ValueScopeName=A.ValueScope=A.Scope=A.Name=A.regexpCode=A.stringify=A.getProperty=A.nil=A.strConcat=A.str=A._=void 0;var P=xe(),H=jt(),Y=xe();Object.defineProperty(A,"_",{enumerable:!0,get:function(){return Y._}});Object.defineProperty(A,"str",{enumerable:!0,get:function(){return Y.str}});Object.defineProperty(A,"strConcat",{enumerable:!0,get:function(){return Y.strConcat}});Object.defineProperty(A,"nil",{enumerable:!0,get:function(){return Y.nil}});Object.defineProperty(A,"getProperty",{enumerable:!0,get:function(){return Y.getProperty}});Object.defineProperty(A,"stringify",{enumerable:!0,get:function(){return Y.stringify}});Object.defineProperty(A,"regexpCode",{enumerable:!0,get:function(){return Y.regexpCode}});Object.defineProperty(A,"Name",{enumerable:!0,get:function(){return Y.Name}});var Ye=jt();Object.defineProperty(A,"Scope",{enumerable:!0,get:function(){return Ye.Scope}});Object.defineProperty(A,"ValueScope",{enumerable:!0,get:function(){return Ye.ValueScope}});Object.defineProperty(A,"ValueScopeName",{enumerable:!0,get:function(){return Ye.ValueScopeName}});Object.defineProperty(A,"varKinds",{enumerable:!0,get:function(){return Ye.varKinds}});A.operators={GT:new P._Code(">"),GTE:new P._Code(">="),LT:new P._Code("<"),LTE:new P._Code("<="),EQ:new P._Code("==="),NEQ:new P._Code("!=="),NOT:new P._Code("!"),OR:new P._Code("||"),AND:new P._Code("&&"),ADD:new P._Code("+")};class ee{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Mr extends ee{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?H.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=_e(this.rhs,e,t);return this}get names(){return this.rhs instanceof P._CodeOrName?this.rhs.names:{}}}class At extends ee{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof P.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=_e(this.rhs,e,t),this}get names(){let e=this.lhs instanceof P.Name?{}:{...this.lhs.names};return Xe(e,this.rhs)}}class Fr extends At{constructor(e,t,r,n){super(e,r,n);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Vr extends ee{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class zr extends ee{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Ur extends ee{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class Hr extends ee{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=_e(this.code,e,t),this}get names(){return this.code instanceof P._CodeOrName?this.code.names:{}}}class et extends ee{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,n=r.length;while(n--){let o=r[n];if(o.optimizeNames(e,t))continue;$a(e,o.names),r.splice(n,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>se(e,t.names),{})}}class te extends et{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Lr extends et{}class Oe extends te{}Oe.kind="else";class Q extends te{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new Oe(r):r}if(t){if(e===!1)return t instanceof Q?t:t.nodes;if(this.nodes.length)return this;return new Q(Wr(e),t instanceof Q?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=_e(this.condition,e,t),this}get names(){let e=super.names;if(Xe(e,this.condition),this.else)se(e,this.else.names);return e}}Q.kind="if";class me extends te{}me.kind="for";class Kr extends me{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=_e(this.iteration,e,t),this}get names(){return se(super.names,this.iteration.names)}}class Gr extends me{constructor(e,t,r,n){super();this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){let t=e.es5?H.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){let e=Xe(super.names,this.from);return Xe(e,this.to)}}class Dt extends me{constructor(e,t,r,n){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=_e(this.iterable,e,t),this}get names(){return se(super.names,this.iterable.names)}}class Be extends te{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}Be.kind="func";class We extends et{render(e){return"return "+super.render(e)}}We.kind="return";class Jr extends te{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(n=this.finally)===null||n===void 0||n.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)se(e,this.catch.names);if(this.finally)se(e,this.finally.names);return e}}class Qe extends te{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Qe.kind="catch";class Ze extends te{render(e){return"finally"+super.render(e)}}Ze.kind="finally";class Br{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
2
- `:""},this._extScope=e,this._scope=new H.Scope({parent:e}),this._nodes=[new Lr]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){let o=this._scope.toName(t);if(r!==void 0&&n)this._constants[o.str]=r;return this._leafNode(new Mr(e,o,r)),o}const(e,t,r){return this._def(H.varKinds.const,e,t,r)}let(e,t,r){return this._def(H.varKinds.let,e,t,r)}var(e,t,r){return this._def(H.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new At(e,t,r))}add(e,t){return this._leafNode(new Fr(e,A.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==P.nil)this._leafNode(new Hr(e));return this}object(...e){let t=["{"];for(let[r,n]of e){if(t.length>1)t.push(",");if(t.push(r),r!==n||this.opts.es5)t.push(":"),P.addCodeArg(t,n)}return t.push("}"),new P._Code(t)}if(e,t,r){if(this._blockNode(new Q(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Q(e))}else(){return this._elseNode(new Oe)}endIf(){return this._endBlockNode(Q,Oe)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new Kr(e),t)}forRange(e,t,r,n,o=this.opts.es5?H.varKinds.var:H.varKinds.let){let s=this._scope.toName(e);return this._for(new Gr(o,s,t,r),()=>n(s))}forOf(e,t,r,n=H.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=t instanceof P.Name?t:this.var("_arr",t);return this.forRange("_i",0,P._`${s}.length`,(i)=>{this.var(o,P._`${s}[${i}]`),r(o)})}return this._for(new Dt("of",n,o,t),()=>r(o))}forIn(e,t,r,n=this.opts.es5?H.varKinds.var:H.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,P._`Object.keys(${t})`,r);let o=this._scope.toName(e);return this._for(new Dt("in",n,o,t),()=>r(o))}endFor(){return this._endBlockNode(me)}label(e){return this._leafNode(new Vr(e))}break(e){return this._leafNode(new zr(e))}return(e){let t=new We;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(We)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let n=new Jr;if(this._blockNode(n),this.code(e),t){let o=this.name("e");this._currNode=n.catch=new Qe(o),t(o)}if(r)this._currNode=n.finally=new Ze,this.code(r);return this._endBlockNode(Qe,Ze)}throw(e){return this._leafNode(new Ur(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||e!==void 0&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=P.nil,r,n){if(this._blockNode(new Be(e,t,r)),n)this.code(n).endFunc();return this}endFunc(){return this._endBlockNode(Be)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Q))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}A.CodeGen=Br;function se(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Xe(e,t){return t instanceof P._CodeOrName?se(e,t.names):e}function _e(e,t,r){if(e instanceof P.Name)return n(e);if(!o(e))return e;return new P._Code(e._items.reduce((s,i)=>{if(i instanceof P.Name)i=n(i);if(i instanceof P._Code)s.push(...i._items);else s.push(i);return s},[]));function n(s){let i=r[s.str];if(i===void 0||t[s.str]!==1)return s;return delete t[s.str],i}function o(s){return s instanceof P._Code&&s._items.some((i)=>i instanceof P.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function $a(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function Wr(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:P._`!${Ct(e)}`}A.not=Wr;var va=Qr(A.operators.AND);function wa(...e){return e.reduce(va)}A.and=wa;var Ea=Qr(A.operators.OR);function ba(...e){return e.reduce(Ea)}A.or=ba;function Qr(e){return(t,r)=>t===P.nil?r:r===P.nil?t:P._`${Ct(t)} ${e} ${Ct(r)}`}function Ct(e){return e instanceof P.Name?e:P._`(${e})`}});var yn=pe(function(sn){Object.defineProperty(sn,"__esModule",{value:!0});sn.checkStrictMode=sn.getErrorPath=sn.Type=sn.useFunc=sn.setEvaluated=sn.evaluatedPropsToName=sn.mergeEvaluated=sn.eachItem=sn.unescapeJsonPointer=sn.escapeJsonPointer=sn.escapeFragment=sn.unescapeFragment=sn.schemaRefOrVal=sn.schemaHasRulesButRef=sn.schemaHasRules=sn.checkUnknownRules=sn.alwaysValidSchema=sn.toHash=void 0;var R=Bt(),Oa=xe();function Ra(e){let t={};for(let r of e)t[r]=!0;return t}sn.toHash=Ra;function ka(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return en(e,t),!tn(t,e.self.RULES.all)}sn.alwaysValidSchema=ka;function en(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;let o=n.RULES.keywords;for(let s in t)if(!o[s])on(e,`unknown keyword: "${s}"`)}sn.checkUnknownRules=en;function tn(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}sn.schemaHasRules=tn;function Na(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}sn.schemaHasRulesButRef=Na;function qa({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return R._`${r}`}return R._`${e}${t}${R.getProperty(n)}`}sn.schemaRefOrVal=qa;function Ta(e){return rn(decodeURIComponent(e))}sn.unescapeFragment=Ta;function Ia(e){return encodeURIComponent(Ft(e))}sn.escapeFragment=Ia;function Ft(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}sn.escapeJsonPointer=Ft;function rn(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}sn.unescapeJsonPointer=rn;function ja(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}sn.eachItem=ja;function Xr({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,s,i,a)=>{let c=i===void 0?s:i instanceof R.Name?(s instanceof R.Name?e(o,s,i):t(o,s,i),i):s instanceof R.Name?(t(o,i,s),s):r(s,i);return a===R.Name&&!(c instanceof R.Name)?n(o,c):c}}sn.mergeEvaluated={props:Xr({mergeNames:(e,t,r)=>e.if(R._`${r} !== true && ${t} !== undefined`,()=>{e.if(R._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,R._`${r} || {}`).code(R._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(R._`${r} !== true`,()=>{if(t===!0)e.assign(r,!0);else e.assign(r,R._`${r} || {}`),Vt(e,r,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:nn}),items:Xr({mergeNames:(e,t,r)=>e.if(R._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,R._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(R._`${r} !== true`,()=>e.assign(r,t===!0?!0:R._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function nn(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",R._`{}`);if(t!==void 0)Vt(e,r,t);return r}sn.evaluatedPropsToName=nn;function Vt(e,t,r){Object.keys(r).forEach((n)=>e.assign(R._`${t}${R.getProperty(n)}`,!0))}sn.setEvaluated=Vt;var Yr={};function Da(e,t){return e.scopeValue("func",{ref:t,code:Yr[t.code]||(Yr[t.code]=new Oa._Code(t.code))})}sn.useFunc=Da;var Mt;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Mt||(sn.Type=Mt={}));function Ca(e,t,r){if(e instanceof R.Name){let n=t===Mt.Num;return r?n?R._`"[" + ${e} + "]"`:R._`"['" + ${e} + "']"`:n?R._`"/" + ${e}`:R._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?R.getProperty(e).toString():"/"+Ft(e)}sn.getErrorPath=Ca;function on(e,t,r=e.opts.strictSchema){if(!r)return;if(t=`strict mode: ${t}`,r===!0)throw Error(t);e.self.logger.warn(t)}sn.checkStrictMode=on});var Rc=pe(function(cn){Object.defineProperty(cn,"__esModule",{value:!0});var T=Bt(),ec={data:new T.Name("data"),valCxt:new T.Name("valCxt"),instancePath:new T.Name("instancePath"),parentData:new T.Name("parentData"),parentDataProperty:new T.Name("parentDataProperty"),rootData:new T.Name("rootData"),dynamicAnchors:new T.Name("dynamicAnchors"),vErrors:new T.Name("vErrors"),errors:new T.Name("errors"),this:new T.Name("this"),self:new T.Name("self"),scope:new T.Name("scope"),json:new T.Name("json"),jsonPos:new T.Name("jsonPos"),jsonLen:new T.Name("jsonLen"),jsonPart:new T.Name("jsonPart")};cn.default=ec});var Re=pe(function(fn){Object.defineProperty(fn,"__esModule",{value:!0});fn.extendErrors=fn.resetErrorsCount=fn.reportExtraError=fn.reportError=fn.keyword$DataError=fn.keywordError=void 0;var x=Bt(),rt=yn(),j=Rc();fn.keywordError={message:({keyword:e})=>x.str`must pass "${e}" keyword validation`};fn.keyword$DataError={message:({keyword:e,schemaType:t})=>t?x.str`"${e}" keyword must be ${t} ($data)`:x.str`"${e}" keyword is invalid ($data)`};function rc(e,t=fn.keywordError,r,n){let{it:o}=e,{gen:s,compositeRule:i,allErrors:a}=o,c=ln(e,t,r);if(n!==null&&n!==void 0?n:i||a)dn(s,c);else un(o,x._`[${c}]`)}fn.reportError=rc;function nc(e,t=fn.keywordError,r){let{it:n}=e,{gen:o,compositeRule:s,allErrors:i}=n,a=ln(e,t,r);if(dn(o,a),!(s||i))un(n,j.default.vErrors)}fn.reportExtraError=nc;function oc(e,t){e.assign(j.default.errors,t),e.if(x._`${j.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(x._`${j.default.vErrors}.length`,t),()=>e.assign(j.default.vErrors,null)))}fn.resetErrorsCount=oc;function sc({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:s}){if(o===void 0)throw Error("ajv implementation error");let i=e.name("err");e.forRange("i",o,j.default.errors,(a)=>{if(e.const(i,x._`${j.default.vErrors}[${a}]`),e.if(x._`${i}.instancePath === undefined`,()=>e.assign(x._`${i}.instancePath`,x.strConcat(j.default.instancePath,s.errorPath))),e.assign(x._`${i}.schemaPath`,x.str`${s.errSchemaPath}/${t}`),s.opts.verbose)e.assign(x._`${i}.schema`,r),e.assign(x._`${i}.data`,n)})}fn.extendErrors=sc;function dn(e,t){let r=e.const("err",t);e.if(x._`${j.default.vErrors} === null`,()=>e.assign(j.default.vErrors,x._`[${r}]`),x._`${j.default.vErrors}.push(${r})`),e.code(x._`${j.default.errors}++`)}function un(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;if(o.$async)r.throw(x._`new ${e.ValidationError}(${t})`);else r.assign(x._`${n}.errors`,t),r.return(!1)}var ie={keyword:new x.Name("keyword"),schemaPath:new x.Name("schemaPath"),params:new x.Name("params"),propertyName:new x.Name("propertyName"),message:new x.Name("message"),schema:new x.Name("schema"),parentSchema:new x.Name("parentSchema")};function ln(e,t,r){let{createErrors:n}=e.it;if(n===!1)return x._`{}`;return ic(e,t,r)}function ic(e,t,r={}){let{gen:n,it:o}=e,s=[ac(o,r),cc(e,r)];return dc(e,t,s),n.object(...s)}function ac({errorPath:e},{instancePath:t}){let r=t?x.str`${e}${rt.getErrorPath(t,rt.Type.Str)}`:e;return[j.default.instancePath,x.strConcat(j.default.instancePath,r)]}function cc({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:x.str`${t}/${e}`;if(r)o=x.str`${o}${rt.getErrorPath(r,rt.Type.Str)}`;return[ie.schemaPath,o]}function dc(e,{params:t,message:r},n){let{keyword:o,data:s,schemaValue:i,it:a}=e,{opts:c,propertyName:d,topSchemaRef:u,schemaPath:l}=a;if(n.push([ie.keyword,o],[ie.params,typeof t=="function"?t(e):t||x._`{}`]),c.messages)n.push([ie.message,typeof r=="function"?r(e):r]);if(c.verbose)n.push([ie.schema,i],[ie.parentSchema,x._`${u}${l}`],[j.default.data,s]);if(d)n.push([ie.propertyName,d])}});var gn=pe(function(mn){Object.defineProperty(mn,"__esModule",{value:!0});mn.boolOrEmptySchema=mn.topBoolOrEmptySchema=void 0;var pc=Re(),mc=Bt(),_c=Rc(),gc={message:"boolean schema is false"};function yc(e){let{gen:t,schema:r,validateName:n}=e;if(r===!1)pn(e,!1);else if(typeof r=="object"&&r.$async===!0)t.return(_c.default.data);else t.assign(mc._`${n}.errors`,null),t.return(!0)}mn.topBoolOrEmptySchema=yc;function $c(e,t){let{gen:r,schema:n}=e;if(n===!1)r.var(t,!1),pn(e);else r.var(t,!0)}mn.boolOrEmptySchema=$c;function pn(e,t){let{gen:r,data:n}=e;pc.reportError({gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},gc,void 0,t)}});var Ut=pe(function($n){Object.defineProperty($n,"__esModule",{value:!0});$n.getRules=$n.isJSONType=void 0;var wc=["string","number","integer","boolean","null","object","array"],Ec=new Set(wc);function bc(e){return typeof e=="string"&&Ec.has(e)}$n.isJSONType=bc;function Sc(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}$n.getRules=Sc});var Ht=pe(function(bn){Object.defineProperty(bn,"__esModule",{value:!0});bn.shouldUseRule=bn.shouldUseGroup=bn.schemaHasRulesForType=void 0;function xc({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&wn(e,n)}bn.schemaHasRulesForType=xc;function wn(e,t){return t.rules.some((r)=>En(e,r))}bn.shouldUseGroup=wn;function En(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some((n)=>e[n]!==void 0))}bn.shouldUseRule=En});var ke=pe(function(Rn){Object.defineProperty(Rn,"__esModule",{value:!0});Rn.reportTypeError=Rn.checkDataTypes=Rn.checkDataType=Rn.coerceAndCheckDataType=Rn.getJSONTypes=Rn.getSchemaTypes=Rn.DataType=void 0;var Nc=Ut(),qc=Ht(),Tc=Re(),S=Bt(),Pn=yn(),ge;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(ge||(Rn.DataType=ge={}));function Ic(e){let t=xn(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}Rn.getSchemaTypes=Ic;function xn(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(Nc.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}Rn.getJSONTypes=xn;function jc(e,t){let{gen:r,data:n,opts:o}=e,s=Dc(t,o.coerceTypes),i=t.length>0&&!(s.length===0&&t.length===1&&qc.schemaHasRulesForType(e,t[0]));if(i){let a=Kt(t,n,o.strictNumbers,ge.Wrong);r.if(a,()=>{if(s.length)Cc(e,t,s);else Gt(e)})}return i}Rn.coerceAndCheckDataType=jc;var On=new Set(["string","number","integer","boolean","null"]);function Dc(e,t){return t?e.filter((r)=>On.has(r)||t==="array"&&r==="array"):[]}function Cc(e,t,r){let{gen:n,data:o,opts:s}=e,i=n.let("dataType",S._`typeof ${o}`),a=n.let("coerced",S._`undefined`);if(s.coerceTypes==="array")n.if(S._`${i} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,S._`${o}[0]`).assign(i,S._`typeof ${o}`).if(Kt(t,o,s.strictNumbers),()=>n.assign(a,o)));n.if(S._`${a} !== undefined`);for(let d of r)if(On.has(d)||d==="array"&&s.coerceTypes==="array")c(d);n.else(),Gt(e),n.endIf(),n.if(S._`${a} !== undefined`,()=>{n.assign(o,a),Ac(e,a)});function c(d){switch(d){case"string":n.elseIf(S._`${i} == "number" || ${i} == "boolean"`).assign(a,S._`"" + ${o}`).elseIf(S._`${o} === null`).assign(a,S._`""`);return;case"number":n.elseIf(S._`${i} == "boolean" || ${o} === null
3
- || (${i} == "string" && ${o} && ${o} == +${o})`).assign(a,S._`+${o}`);return;case"integer":n.elseIf(S._`${i} === "boolean" || ${o} === null
4
- || (${i} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,S._`+${o}`);return;case"boolean":n.elseIf(S._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf(S._`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":n.elseIf(S._`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(a,null);return;case"array":n.elseIf(S._`${i} === "string" || ${i} === "number"
5
- || ${i} === "boolean" || ${o} === null`).assign(a,S._`[${o}]`)}}}function Ac({gen:e,parentData:t,parentDataProperty:r},n){e.if(S._`${t} !== undefined`,()=>e.assign(S._`${t}[${r}]`,n))}function Lt(e,t,r,n=ge.Correct){let o=n===ge.Correct?S.operators.EQ:S.operators.NEQ,s;switch(e){case"null":return S._`${t} ${o} null`;case"array":s=S._`Array.isArray(${t})`;break;case"object":s=S._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=i(S._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=i();break;default:return S._`typeof ${t} ${o} ${e}`}return n===ge.Correct?s:S.not(s);function i(a=S.nil){return S.and(S._`typeof ${t} == "number"`,a,r?S._`isFinite(${t})`:S.nil)}}Rn.checkDataType=Lt;function Kt(e,t,r,n){if(e.length===1)return Lt(e[0],t,r,n);let o,s=Pn.toHash(e);if(s.array&&s.object){let i=S._`typeof ${t} != "object"`;o=s.null?i:S._`!${t} || ${i}`,delete s.null,delete s.array,delete s.object}else o=S.nil;if(s.number)delete s.integer;for(let i in s)o=S.and(o,Lt(i,t,r,n));return o}Rn.checkDataTypes=Kt;var Mc={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?S._`{type: ${e}}`:S._`{type: ${t}}`};function Gt(e){let t=Fc(e);Tc.reportError(t,Mc)}Rn.reportTypeError=Gt;function Fc(e){let{gen:t,data:r,schema:n}=e,o=Pn.schemaRefOrVal(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var In=pe(function(qn){Object.defineProperty(qn,"__esModule",{value:!0});qn.assignDefaults=void 0;var ye=Bt(),Gc=yn();function Jc(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)Nn(e,o,r[o].default);else if(t==="array"&&Array.isArray(n))n.forEach((o,s)=>Nn(e,s,o.default))}qn.assignDefaults=Jc;function Nn(e,t,r){let{gen:n,compositeRule:o,data:s,opts:i}=e;if(r===void 0)return;let a=ye._`${s}${ye.getProperty(t)}`;if(o){Gc.checkStrictMode(e,`default is ignored for: ${a}`);return}let c=ye._`${a} === undefined`;if(i.useDefaults==="empty")c=ye._`${c} || ${a} === null || ${a} === ""`;n.if(c,ye._`${a} = ${ye.stringify(r)}`)}});var V=pe(function(Cn){Object.defineProperty(Cn,"__esModule",{value:!0});Cn.validateUnion=Cn.validateArray=Cn.usePattern=Cn.callValidateCode=Cn.schemaProperties=Cn.allSchemaProperties=Cn.noPropertyInData=Cn.propertyInData=Cn.isOwnProperty=Cn.hasPropFunc=Cn.reportMissingProp=Cn.checkMissingProp=Cn.checkReportMissingProp=void 0;var k=Bt(),Jt=yn(),re=Rc(),Bc=yn();function Wc(e,t){let{gen:r,data:n,it:o}=e;r.if(Qt(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:k._`${t}`},!0),e.error()})}Cn.checkReportMissingProp=Wc;function Qc({gen:e,data:t,it:{opts:r}},n,o){return k.or(...n.map((s)=>k.and(Qt(e,t,s,r.ownProperties),k._`${o} = ${s}`)))}Cn.checkMissingProp=Qc;function Zc(e,t){e.setParams({missingProperty:t},!0),e.error()}Cn.reportMissingProp=Zc;function jn(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:k._`Object.prototype.hasOwnProperty`})}Cn.hasPropFunc=jn;function Wt(e,t,r){return k._`${jn(e)}.call(${t}, ${r})`}Cn.isOwnProperty=Wt;function Xc(e,t,r,n){let o=k._`${t}${k.getProperty(r)} !== undefined`;return n?k._`${o} && ${Wt(e,t,r)}`:o}Cn.propertyInData=Xc;function Qt(e,t,r,n){let o=k._`${t}${k.getProperty(r)} === undefined`;return n?k.or(o,k.not(Wt(e,t,r))):o}Cn.noPropertyInData=Qt;function Dn(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}Cn.allSchemaProperties=Dn;function Yc(e,t){return Dn(t).filter((r)=>!Jt.alwaysValidSchema(e,t[r]))}Cn.schemaProperties=Yc;function ed({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:i},a,c,d){let u=d?k._`${e}, ${t}, ${n}${o}`:t,l=[[re.default.instancePath,k.strConcat(re.default.instancePath,s)],[re.default.parentData,i.parentData],[re.default.parentDataProperty,i.parentDataProperty],[re.default.rootData,re.default.rootData]];if(i.opts.dynamicRef)l.push([re.default.dynamicAnchors,re.default.dynamicAnchors]);let g=k._`${u}, ${r.object(...l)}`;return c!==k.nil?k._`${a}.call(${c}, ${g})`:k._`${a}(${g})`}Cn.callValidateCode=ed;var td=k._`new RegExp`;function rd({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,s=o(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:k._`${o.code==="new RegExp"?td:Bc.useFunc(e,o)}(${r}, ${n})`})}Cn.usePattern=rd;function nd(e){let{gen:t,data:r,keyword:n,it:o}=e,s=t.name("valid");if(o.allErrors){let a=t.let("valid",!0);return i(()=>t.assign(a,!1)),a}return t.var(s,!0),i(()=>t.break()),s;function i(a){let c=t.const("len",k._`${r}.length`);t.forRange("i",0,c,(d)=>{e.subschema({keyword:n,dataProp:d,dataPropType:Jt.Type.Num},s),t.if(k.not(s),a)})}}Cn.validateArray=nd;function od(e){let{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some((c)=>Jt.alwaysValidSchema(o,c))&&!o.opts.unevaluated)return;let i=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,d)=>{let u=e.subschema({keyword:n,schemaProp:d,compositeRule:!0},a);if(t.assign(i,k._`${i} || ${a}`),!e.mergeValidEvaluated(u,a))t.if(k.not(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}Cn.validateUnion=od});var Un=pe(function(Vn){Object.defineProperty(Vn,"__esModule",{value:!0});Vn.validateKeywordUsage=Vn.validSchemaType=Vn.funcKeywordCode=Vn.macroKeywordCode=void 0;var D=Bt(),ae=Rc(),gd=V(),yd=Re();function $d(e,t){let{gen:r,keyword:n,schema:o,parentSchema:s,it:i}=e,a=t.macro.call(i.self,o,s,i),c=Fn(r,n,a);if(i.opts.validateSchema!==!1)i.self.validateSchema(a,!0);let d=r.name("valid");e.subschema({schema:a,schemaPath:D.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}Vn.macroKeywordCode=$d;function vd(e,t){var r;let{gen:n,keyword:o,schema:s,parentSchema:i,$data:a,it:c}=e;Ed(c,t);let d=!a&&t.compile?t.compile.call(c.self,s,i,c):t.validate,u=Fn(n,o,d),l=n.let("valid");e.block$data(l,g),e.ok((r=t.valid)!==null&&r!==void 0?r:l);function g(){if(t.errors===!1){if(f(),t.modifying)Mn(e);p(()=>e.error())}else{let _=t.async?m():h();if(t.modifying)Mn(e);p(()=>wd(e,_))}}function m(){let _=n.let("ruleErrs",null);return n.try(()=>f(D._`await `),(E)=>n.assign(l,!1).if(D._`${E} instanceof ${c.ValidationError}`,()=>n.assign(_,D._`${E}.errors`),()=>n.throw(E))),_}function h(){let _=D._`${u}.errors`;return n.assign(_,null),f(D.nil),_}function f(_=t.async?D._`await `:D.nil){let E=c.opts.passContext?ae.default.this:ae.default.self,w=!(("compile"in t)&&!a||t.schema===!1);n.assign(l,D._`${_}${gd.callValidateCode(e,u,E,w)}`,t.modifying)}function p(_){var E;n.if(D.not((E=t.valid)!==null&&E!==void 0?E:l),_)}}Vn.funcKeywordCode=vd;function Mn(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,D._`${n.parentData}[${n.parentDataProperty}]`))}function wd(e,t){let{gen:r}=e;r.if(D._`Array.isArray(${t})`,()=>{r.assign(ae.default.vErrors,D._`${ae.default.vErrors} === null ? ${t} : ${ae.default.vErrors}.concat(${t})`).assign(ae.default.errors,D._`${ae.default.vErrors}.length`),yd.extendErrors(e)},()=>e.error())}function Ed({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function Fn(e,t,r){if(r===void 0)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:D.stringify(r)})}function bd(e,t,r=!1){return!t.length||t.some((n)=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Vn.validSchemaType=bd;function Sd({schema:e,opts:t,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw Error("ajv implementation error");let i=o.dependencies;if(i===null||i===void 0?void 0:i.some((a)=>!Object.prototype.hasOwnProperty.call(e,a)))throw Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(o.validateSchema){if(!o.validateSchema(e[s])){let c=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw Error(c)}}}Vn.validateKeywordUsage=Sd});var Gn=pe(function(Ln){Object.defineProperty(Ln,"__esModule",{value:!0});Ln.extendSubschemaMode=Ln.extendSubschemaData=Ln.getSubschema=void 0;var B=Bt(),Hn=yn();function Rd(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:i}){if(t!==void 0&&n!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:B._`${e.schemaPath}${B.getProperty(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:B._`${e.schemaPath}${B.getProperty(t)}${B.getProperty(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${Hn.escapeFragment(r)}`}}if(n!==void 0){if(o===void 0||s===void 0||i===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:i,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')}Ln.getSubschema=Rd;function kd(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:s,propertyName:i}){if(o!==void 0&&r!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:d,dataPathArr:u,opts:l}=t,g=a.let("data",B._`${t.data}${B.getProperty(r)}`,!0);c(g),e.errorPath=B.str`${d}${Hn.getErrorPath(r,n,l.jsPropertySyntax)}`,e.parentDataProperty=B._`${r}`,e.dataPathArr=[...u,e.parentDataProperty]}if(o!==void 0){let d=o instanceof B.Name?o:a.let("data",o,!0);if(c(d),i!==void 0)e.propertyName=i}if(s)e.dataTypes=s;function c(d){e.data=d,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,d]}}Ln.extendSubschemaData=kd;function Nd(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){if(n!==void 0)e.compositeRule=n;if(o!==void 0)e.createErrors=o;if(s!==void 0)e.allErrors=s;e.jtdDiscriminator=t,e.jtdMetadata=r}Ln.extendSubschemaMode=Nd});var Zt=pe(function(ym,Jn){Jn.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var Wn=pe(function($m,Bn){var ne=Bn.exports=function(e,t,r){if(typeof t=="function")r=t,t={};r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};nt(t,n,o,e,"",e)};ne.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ne.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ne.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ne.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function nt(e,t,r,n,o,s,i,a,c,d){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,o,s,i,a,c,d);for(var u in n){var l=n[u];if(Array.isArray(l)){if(u in ne.arrayKeywords)for(var g=0;g<l.length;g++)nt(e,t,r,l[g],o+"/"+u+"/"+g,s,o,u,n,g)}else if(u in ne.propsKeywords){if(l&&typeof l=="object")for(var m in l)nt(e,t,r,l[m],o+"/"+u+"/"+Id(m),s,o,u,n,m)}else if(u in ne.keywords||e.allKeys&&!(u in ne.skipKeywords))nt(e,t,r,l,o+"/"+u,s,o,u,n)}r(n,o,s,i,a,c,d)}}function Id(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ne=pe(function(Yn){Object.defineProperty(Yn,"__esModule",{value:!0});Yn.getSchemaRefs=Yn.resolveUrl=Yn.normalizeId=Yn._getFullPath=Yn.getFullPath=Yn.inlineRef=void 0;var jd=yn(),Dd=Zt(),Cd=Wn(),Ad=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Md(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!Xt(e);if(!t)return!1;return Qn(e)<=t}Yn.inlineRef=Md;var Fd=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Xt(e){for(let t in e){if(Fd.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Xt))return!0;if(typeof r=="object"&&Xt(r))return!0}return!1}function Qn(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,Ad.has(r))continue;if(typeof e[r]=="object")jd.eachItem(e[r],(n)=>t+=Qn(n));if(t===1/0)return 1/0}return t}function Zn(e,t="",r){if(r!==!1)t=$e(t);let n=e.parse(t);return Xn(e,n)}Yn.getFullPath=Zn;function Xn(e,t){return e.serialize(t).split("#")[0]+"#"}Yn._getFullPath=Xn;var Vd=/#\/?$/;function $e(e){return e?e.replace(Vd,""):""}Yn.normalizeId=$e;function zd(e,t,r){return r=$e(r),e.resolve(t,r)}Yn.resolveUrl=zd;var Ud=/^[a-z_][-a-z0-9._]*$/i;function Hd(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=$e(e[r]||t),s={"":o},i=Zn(n,o,!1),a={},c=new Set;return Cd(e,{allKeys:!0},(l,g,m,h)=>{if(h===void 0)return;let f=i+g,p=s[h];if(typeof l[r]=="string")p=_.call(this,l[r]);E.call(this,l.$anchor),E.call(this,l.$dynamicAnchor),s[g]=p;function _(w){let O=this.opts.uriResolver.resolve;if(w=$e(p?O(p,w):w),c.has(w))throw u(w);c.add(w);let b=this.refs[w];if(typeof b=="string")b=this.refs[b];if(typeof b=="object")d(l,b.schema,w);else if(w!==$e(f))if(w[0]==="#")d(l,a[w],w),a[w]=l;else this.refs[w]=f;return w}function E(w){if(typeof w=="string"){if(!Ud.test(w))throw Error(`invalid anchor "${w}"`);_.call(this,`#${w}`)}}}),a;function d(l,g,m){if(g!==void 0&&!Dd(l,g))throw u(m)}function u(l){return Error(`reference "${l}" resolves to more than one schema`)}}Yn.getSchemaRefs=Hd});var Yg=pe(function(_o){Object.defineProperty(_o,"__esModule",{value:!0});_o.getData=_o.KeywordCxt=_o.validateFunctionCode=void 0;var oo=gn(),so=ke(),Yt=Ht(),ot=ke(),Wd=In(),qe=Un(),er=Gn(),y=Bt(),v=Rc(),Qd=Ne(),Z=yn(),Te=Re();function Zd(e){if(co(e)){if(uo(e),ao(e)){eu(e);return}}io(e,()=>oo.topBoolOrEmptySchema(e))}_o.validateFunctionCode=Zd;function io({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},s){if(o.code.es5)e.func(t,y._`${v.default.data}, ${v.default.valCxt}`,n.$async,()=>{e.code(y._`"use strict"; ${to(r,o)}`),Yd(e,o),e.code(s)});else e.func(t,y._`${v.default.data}, ${Xd(o)}`,n.$async,()=>e.code(to(r,o)).code(s))}function Xd(e){return y._`{${v.default.instancePath}="", ${v.default.parentData}, ${v.default.parentDataProperty}, ${v.default.rootData}=${v.default.data}${e.dynamicRef?y._`, ${v.default.dynamicAnchors}={}`:y.nil}}={}`}function Yd(e,t){e.if(v.default.valCxt,()=>{if(e.var(v.default.instancePath,y._`${v.default.valCxt}.${v.default.instancePath}`),e.var(v.default.parentData,y._`${v.default.valCxt}.${v.default.parentData}`),e.var(v.default.parentDataProperty,y._`${v.default.valCxt}.${v.default.parentDataProperty}`),e.var(v.default.rootData,y._`${v.default.valCxt}.${v.default.rootData}`),t.dynamicRef)e.var(v.default.dynamicAnchors,y._`${v.default.valCxt}.${v.default.dynamicAnchors}`)},()=>{if(e.var(v.default.instancePath,y._`""`),e.var(v.default.parentData,y._`undefined`),e.var(v.default.parentDataProperty,y._`undefined`),e.var(v.default.rootData,v.default.data),t.dynamicRef)e.var(v.default.dynamicAnchors,y._`{}`)})}function eu(e){let{schema:t,opts:r,gen:n}=e;io(e,()=>{if(r.$comment&&t.$comment)fo(e);if(su(e),n.let(v.default.vErrors,null),n.let(v.default.errors,0),r.unevaluated)tu(e);lo(e),cu(e)});return}function tu(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",y._`${r}.evaluated`),t.if(y._`${e.evaluated}.dynamicProps`,()=>t.assign(y._`${e.evaluated}.props`,y._`undefined`)),t.if(y._`${e.evaluated}.dynamicItems`,()=>t.assign(y._`${e.evaluated}.items`,y._`undefined`))}function to(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?y._`/*# sourceURL=${r} */`:y.nil}function ru(e,t){if(co(e)){if(uo(e),ao(e)){nu(e,t);return}}oo.boolOrEmptySchema(e,t)}function ao({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function co(e){return typeof e.schema!="boolean"}function nu(e,t){let{schema:r,gen:n,opts:o}=e;if(o.$comment&&r.$comment)fo(e);iu(e),au(e);let s=n.const("_errs",v.default.errors);lo(e,s),n.var(t,y._`${s} === ${v.default.errors}`)}function uo(e){Z.checkUnknownRules(e),ou(e)}function lo(e,t){if(e.opts.jtd)return ro(e,[],!1,t);let r=so.getSchemaTypes(e.schema),n=so.coerceAndCheckDataType(e,r);ro(e,r,!n,t)}function ou(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;if(t.$ref&&n.ignoreKeywordsWithRef&&Z.schemaHasRulesButRef(t,o.RULES))o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function su(e){let{schema:t,opts:r}=e;if(t.default!==void 0&&r.useDefaults&&r.strictSchema)Z.checkStrictMode(e,"default is ignored in the schema root")}function iu(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=Qd.resolveUrl(e.opts.uriResolver,e.baseId,t)}function au(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function fo({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let s=r.$comment;if(o.$comment===!0)e.code(y._`${v.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){let i=y.str`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(y._`${v.default.self}.opts.$comment(${s}, ${i}, ${a}.schema)`)}}function cu(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=e;if(r.$async)t.if(y._`${v.default.errors} === 0`,()=>t.return(v.default.data),()=>t.throw(y._`new ${o}(${v.default.vErrors})`));else{if(t.assign(y._`${n}.errors`,v.default.vErrors),s.unevaluated)du(e);t.return(y._`${v.default.errors} === 0`)}}function du({gen:e,evaluated:t,props:r,items:n}){if(r instanceof y.Name)e.assign(y._`${t}.props`,r);if(n instanceof y.Name)e.assign(y._`${t}.items`,n)}function ro(e,t,r,n){let{gen:o,schema:s,data:i,allErrors:a,opts:c,self:d}=e,{RULES:u}=d;if(s.$ref&&(c.ignoreKeywordsWithRef||!Z.schemaHasRulesButRef(s,u))){o.block(()=>po(e,"$ref",u.all.$ref.definition));return}if(!c.jtd)uu(e,t);o.block(()=>{for(let g of u.rules)l(g);l(u.post)});function l(g){if(!Yt.shouldUseGroup(s,g))return;if(g.type){if(o.if(ot.checkDataType(g.type,i,c.strictNumbers)),no(e,g),t.length===1&&t[0]===g.type&&r)o.else(),ot.reportTypeError(e);o.endIf()}else no(e,g);if(!a)o.if(y._`${v.default.errors} === ${n||0}`)}}function no(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;if(o)Wd.assignDefaults(e,t.type);r.block(()=>{for(let s of t.rules)if(Yt.shouldUseRule(n,s))po(e,s.keyword,s.definition,t.type)})}function uu(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(lu(e,t),!e.opts.allowUnionTypes)fu(e,t);hu(e,e.dataTypes)}function lu(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((r)=>{if(!ho(e.dataTypes,r))tr(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),mu(e,t)}function fu(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))tr(e,"use allowUnionTypes to allow union type keyword")}function hu(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&Yt.shouldUseRule(e.schema,o)){let{type:s}=o.definition;if(s.length&&!s.some((i)=>pu(t,i)))tr(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function pu(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function ho(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function mu(e,t){let r=[];for(let n of e.dataTypes)if(ho(t,n))r.push(n);else if(t.includes("integer")&&n==="number")r.push("integer");e.dataTypes=r}function tr(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,Z.checkStrictMode(e,t,e.opts.strictTypes)}class rr{constructor(e,t,r){if(qe.validateKeywordUsage(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=Z.schemaRefOrVal(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",mo(this.$data,e));else if(this.schemaCode=this.schemaValue,!qe.validSchemaType(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);if("code"in t?t.trackErrors:t.errors!==!1)this.errsCount=e.gen.const("_errs",v.default.errors)}result(e,t,r){this.failResult(y.not(e),t,r)}failResult(e,t,r){if(this.gen.if(e),r)r();else this.error();if(t){if(this.gen.else(),t(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(e,t){this.failResult(y.not(e),void 0,t)}fail(e){if(e===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(e),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail(y._`${t} !== undefined && (${y.or(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?Te.reportExtraError:Te.reportError)(this,this.def.error,t)}$dataError(){Te.reportError(this,this.def.$dataError||Te.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');Te.resetErrorsCount(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,r=y.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=y.nil,t=y.nil){if(!this.$data)return;let{gen:r,schemaCode:n,schemaType:o,def:s}=this;if(r.if(y.or(y._`${n} === undefined`,t)),e!==y.nil)r.assign(e,!0);if(o.length||s.validateSchema){if(r.elseIf(this.invalid$data()),this.$dataError(),e!==y.nil)r.assign(e,!1)}r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:n,it:o}=this;return y.or(s(),i());function s(){if(r.length){if(!(t instanceof y.Name))throw Error("ajv implementation error");let a=Array.isArray(r)?r:[r];return y._`${ot.checkDataTypes(a,t,o.opts.strictNumbers,ot.DataType.Wrong)}`}return y.nil}function i(){if(n.validateSchema){let a=e.scopeValue("validate$data",{ref:n.validateSchema});return y._`!${a}(${t})`}return y.nil}}subschema(e,t){let r=er.getSubschema(this.it,e);er.extendSubschemaData(r,this.it,e),er.extendSubschemaMode(r,e);let n={...this.it,...r,items:void 0,props:void 0};return ru(n,t),n}mergeEvaluated(e,t){let{it:r,gen:n}=this;if(!r.opts.unevaluated)return;if(r.props!==!0&&e.props!==void 0)r.props=Z.mergeEvaluated.props(n,e.props,r.props,t);if(r.items!==!0&&e.items!==void 0)r.items=Z.mergeEvaluated.items(n,e.items,r.items,t)}mergeValidEvaluated(e,t){let{it:r,gen:n}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return n.if(t,()=>this.mergeEvaluated(e,y.Name)),!0}}_o.KeywordCxt=rr;function po(e,t,r,n){let o=new rr(e,r,t);if("code"in r)r.code(o,n);else if(o.$data&&r.validate)qe.funcKeywordCode(o,r);else if("macro"in r)qe.macroKeywordCode(o,r);else if(r.compile||r.validate)qe.funcKeywordCode(o,r)}var _u=/^\/(?:[^~]|~0|~1)*$/,gu=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function mo(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,s;if(e==="")return v.default.rootData;if(e[0]==="/"){if(!_u.test(e))throw Error(`Invalid JSON-pointer: ${e}`);o=e,s=v.default.rootData}else{let d=gu.exec(e);if(!d)throw Error(`Invalid JSON-pointer: ${e}`);let u=+d[1];if(o=d[2],o==="#"){if(u>=t)throw Error(c("property/index",u));return n[t-u]}if(u>t)throw Error(c("data",u));if(s=r[t-u],!o)return s}let i=s,a=o.split("/");for(let d of a)if(d)s=y._`${s}${y.getProperty(Z.unescapeJsonPointer(d))}`,i=y._`${i} && ${s}`;return i;function c(d,u){return`Cannot access ${d} ${u} levels up, current level is ${t}`}}_o.getData=mo});var By=pe(function($o){Object.defineProperty($o,"__esModule",{value:!0});class yo extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}$o.default=yo});var Zg=pe(function(wo){Object.defineProperty(wo,"__esModule",{value:!0});var nr=Ne();class vo extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`);this.missingRef=nr.resolveUrl(e,t,r),this.missingSchema=nr.normalizeId(nr.getFullPath(e,this.missingRef))}}wo.default=vo});var k_=pe(function(So){Object.defineProperty(So,"__esModule",{value:!0});So.resolveSchema=So.getCompilingSchema=So.resolveRef=So.compileSchema=So.SchemaEnv=void 0;var L=Bt(),Eu=By(),ce=Rc(),K=Ne(),Eo=yn(),bu=Yg();class Ie{constructor(e){var t;this.refs={},this.dynamicAnchors={};let r;if(typeof e.schema=="object")r=e.schema;this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:K.normalizeId(r===null||r===void 0?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r===null||r===void 0?void 0:r.$async,this.refs={}}}So.SchemaEnv=Ie;function sr(e){let t=bo.call(this,e);if(t)return t;let r=K.getFullPath(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,i=new L.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s}),a;if(e.$async)a=i.scopeValue("Error",{ref:Eu.default,code:L._`require("ajv/dist/runtime/validation_error").default`});let c=i.scopeName("validate");e.validateName=c;let d={gen:i,allErrors:this.opts.allErrors,data:ce.default.data,parentData:ce.default.parentData,parentDataProperty:ce.default.parentDataProperty,dataNames:[ce.default.data],dataPathArr:[L.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:L.stringify(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:L.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:L._`""`,opts:this.opts,self:this},u;try{this._compilations.add(e),bu.validateFunctionCode(d),i.optimize(this.opts.code.optimize);let l=i.toString();if(u=`${i.scopeRefs(ce.default.scope)}return ${l}`,this.opts.code.process)u=this.opts.code.process(u,e);let m=Function(`${ce.default.self}`,`${ce.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async)m.$async=!0;if(this.opts.code.source===!0)m.source={validateName:c,validateCode:l,scopeValues:i._values};if(this.opts.unevaluated){let{props:h,items:f}=d;if(m.evaluated={props:h instanceof L.Name?void 0:h,items:f instanceof L.Name?void 0:f,dynamicProps:h instanceof L.Name,dynamicItems:f instanceof L.Name},m.source)m.source.evaluated=L.stringify(m.evaluated)}return e.validate=m,e}catch(l){if(delete e.validate,delete e.validateName,u)this.logger.error("Error compiling schema, function code:",u);throw l}finally{this._compilations.delete(e)}}So.compileSchema=sr;function Su(e,t,r){var n;r=K.resolveUrl(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let s=Ou.call(this,e,r);if(s===void 0){let i=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;if(i)s=new Ie({schema:i,schemaId:a,root:e,baseId:t})}if(s===void 0)return;return e.refs[r]=Pu.call(this,s)}So.resolveRef=Su;function Pu(e){if(K.inlineRef(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:sr.call(this,e)}function bo(e){for(let t of this._compilations)if(xu(t,e))return t}So.getCompilingSchema=bo;function xu(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Ou(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||st.call(this,e,t)}function st(e,t){let r=this.opts.uriResolver.parse(t),n=K._getFullPath(this.opts.uriResolver,r),o=K.getFullPath(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return or.call(this,r,e);let s=K.normalizeId(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let a=st.call(this,e,i);if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;return or.call(this,r,a)}if(typeof(i===null||i===void 0?void 0:i.schema)!=="object")return;if(!i.validate)sr.call(this,i);if(s===K.normalizeId(t)){let{schema:a}=i,{schemaId:c}=this.opts,d=a[c];if(d)o=K.resolveUrl(this.opts.uriResolver,o,d);return new Ie({schema:a,schemaId:c,root:e,baseId:o})}return or.call(this,r,i)}So.resolveSchema=st;var Ru=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function or(e,{baseId:t,schema:r,root:n}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;let c=r[Eo.unescapeFragment(a)];if(c===void 0)return;r=c;let d=typeof r==="object"&&r[this.opts.schemaId];if(!Ru.has(a)&&d)t=K.resolveUrl(this.opts.uriResolver,t,d)}let s;if(typeof r!="boolean"&&r.$ref&&!Eo.schemaHasRulesButRef(r,this.RULES)){let a=K.resolveUrl(this.opts.uriResolver,t,r.$ref);s=st.call(this,n,a)}let{schemaId:i}=this.opts;if(s=s||new Ie({schema:r,schemaId:i,root:n,baseId:t}),s.schema!==s.root.schema)return s;return}});var xo=pe(function(Pm,Iu){Iu.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var lr=pe(function(xm,jo){var ju=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),ar=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),Du=RegExp.prototype.test.bind(/^\d*$/u),de=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),cr=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Ro=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),dr=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),Cu=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),M=Array(256);for(let t=0;t<256;t++)M[t]="%"+"0123456789ABCDEF"[t>>4]+"0123456789ABCDEF"[t&15];function I(e){if(e<2048)return M[192|e>>6]+M[128|e&63];if(e<65536)return M[224|e>>12]+M[128|e>>6&63]+M[128|e&63];return M[240|e>>18]+M[128|e>>12&63]+M[128|e>>6&63]+M[128|e&63]}function Au(e){let t="",r=0,n=0;for(n=0;n<e.length;n++){if(r=e[n].charCodeAt(0),r===48)continue;if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var Mu=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),Fu=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),Vu=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),zu=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Uu(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++){if(Vu(e[t]))continue;if(e[t]==="%"&&t+2<e.length&&de(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function Oo(e){let t=-1,r=0,n=-1,o=0;for(let a=0;a<e.length;a++)if(e[a]==="0"){if(n===-1)n=a;if(o++,o>r)r=o,t=n}else n=-1,o=0;if(r<2)return e.join(":");let s=e.slice(0,t).join(":"),i=e.slice(t+r).join(":");return s+"::"+i}function Hu(e){let t=e.indexOf("::");if(t!==-1&&e.indexOf("::",t+1)!==-1)return;let r=t===-1?e.split(":"):e.slice(0,t).split(":"),n=t===-1?[]:e.slice(t+2).split(":");if(t!==-1){if(r.length===1&&r[0]==="")r.length=0;if(n.length===1&&n[0]==="")n.length=0}let o=r.concat(n),s=0;for(let a=0;a<o.length;a++){let c=o[a];if(c==="")return;if(c.indexOf(".")!==-1){if(a!==o.length-1||t!==-1&&n.length===0||!ar(c))return;s+=2;continue}if(!Mu(c))return;o[a]=parseInt(c,16).toString(16),s++}if(t===-1){if(s!==8)return;return Oo(o)}if(s>=8)return;let i=o.slice(0,r.length);for(let a=s;a<8;a++)i.push("0");for(let a=r.length;a<o.length;a++)i.push(o[a]);return Oo(i)}function ir(e){let t=e[0]==="["&&e[e.length-1]==="]";if((e[0]==="["||e[e.length-1]==="]")&&!t)return{host:e,isIPV6:!1,error:!0};let n=t?e.slice(1,-1):e;if(t&&Fu(n))return n=n.toLowerCase(),{host:`[${n}]`,escapedHost:n,isIPV6:!1,isIPVFuture:!0};if(Lu(n,":")<2)return{host:e,isIPV6:!1,error:t};let o="",s=n.indexOf("%");if(s!==-1){let a=n.slice(s,s+3).toLowerCase()==="%25"?3:1;if(o=n.slice(s+a),!Uu(o))return{host:e,isIPV6:!1,error:!0};n=n.slice(0,s)}let i=Hu(n);if(i===void 0)return{host:e,isIPV6:!1,error:!0};return{host:i+(o?"%"+o:""),escapedHost:i+(o?"%25"+o:""),isIPV6:!0}}function Lu(e,t){let r=0;for(let n=0;n<e.length;n++)if(e[n]===t)r++;return r}function ko(e){let t=e,r=[],n=-1,o=0;while(o=t.length){if(o===1)if(t===".")break;else if(t==="/"){r.push("/");break}else{r.push(t);break}else if(o===2){if(t[0]==="."){if(t[1]===".")break;else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."||t[1]==="/"){r.push("/");break}}}else if(o===3){if(t==="/.."){if(r.length!==0)r.pop();r.push("/");break}}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."){if(t[3]==="/"){if(t=t.slice(3),r.length!==0)r.pop();continue}}}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}function Ku(e){if(e===""||e[0]==="/")return ko(e);let t=e.split("/"),r=t.length-1,n=[],o=!1;for(let s=0;s<=r;s++){let i=t[s];if(i==="."||i===".."){if(i==="..")if(n.length!==0&&n[n.length-1]!=="..")n.pop();else n.push("..");o=s===r}else n.push(i)}if(o&&n[n.length-1]!=="..")n.push("");if(n.length===0||n[0]===""||n[0].includes(":"))n.unshift(".");return n.join("/")}var Gu={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},Ju=/[@/?#:]/g,Bu=/[@/?#]/g;function No(e,t){let r=t?Bu:Ju;return r.lastIndex=0,e.replace(r,(n)=>Gu[n])}function qo(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let n=0;n<e.length;n++){if(e[n]==="%"&&n+2<e.length){let o=e.slice(n+1,n+3);if(de(o)){let s=o.toUpperCase(),i=String.fromCharCode(parseInt(s,16));if(t&&cr(i))r+=i;else r+="%"+s;n+=2;continue}}r+=e[n]}return r}function Wu(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];if(n==="%"&&r+2<e.length){let o=e.slice(r+1,r+3);if(de(o)){let s=o.toUpperCase(),i=String.fromCharCode(parseInt(s,16));if(i!=="."&&cr(i))t+=i;else t+="%"+s;r+=2;continue}}if(Ro(n))t+=n;else{let o=e.charCodeAt(r);if(o<128)t+=Io(o)?n:M[o];else if(o<55296||o>57343)t+=I(o);else if(o<=56319&&r+1<e.length){let s=e.charCodeAt(r+1);if(s>=56320&&s<=57343)t+=I(65536+(o-55296<<10)+(s-56320)),r++;else t+=I(65533)}else t+=I(65533)}}return t}function Qu(e,t=!1){let r="",n=t&&e[0]!=="/";for(let o=0;o<e.length;o++){let s=e[o];if(s==="%"&&o+2<e.length){let i=e.slice(o+1,o+3);if(de(i)){r+="%"+i.toUpperCase(),o+=2;continue}}if(s==="/")n=!1;if(Ro(s)&&(s!==":"||!n))r+=s;else{let i=e.charCodeAt(o);if(i<128)r+=M[i];else if(i<55296||i>57343)r+=I(i);else if(i<=56319&&o+1<e.length){let a=e.charCodeAt(o+1);if(a>=56320&&a<=57343)r+=I(65536+(i-55296<<10)+(a-56320)),o++;else r+=I(65533)}else r+=I(65533)}}return r}function ur(e,t){let r="";for(let n=0;n<e.length;n++){let o=e[n];if(o==="%"&&n+2<e.length){let s=e.slice(n+1,n+3);if(de(s)){r+="%"+s.toUpperCase(),n+=2;continue}}if(t(o))r+=o;else{let s=e.charCodeAt(n);if(s<128)r+=M[s];else if(s<55296||s>57343)r+=I(s);else if(s<=56319&&n+1<e.length){let i=e.charCodeAt(n+1);if(i>=56320&&i<=57343)r+=I(65536+(s-55296<<10)+(i-56320)),n++;else r+=I(65533)}else r+=I(65533)}}return r}function To(e){return ur(e,Cu)}function Zu(e){return ur(e,dr)}function Xu(e){return ur(e,dr)}function Io(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function Yu(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];if(n==="%"&&r+2<e.length){let o=e.slice(r+1,r+3);if(de(o)){let s=o.toUpperCase(),i=String.fromCharCode(parseInt(s,16));if(cr(i))t+=i;else t+="%"+s;r+=2;continue}}if(dr(n))t+=n;else{let o=e.charCodeAt(r);if(o<128)t+=Io(o)?n:M[o];else if(o<55296||o>57343)t+=I(o);else if(o<=56319&&r+1<e.length){let s=e.charCodeAt(r+1);if(s>=56320&&s<=57343)t+=I(65536+(o-55296<<10)+(s-56320)),r++;else t+=I(65533)}else t+=I(65533)}}return t}function el(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(de(n)){t+="%"+n.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function tl(e){let t=[];if(e.userinfo!==void 0)t.push(To(e.userinfo)),t.push("@");if(e.host!==void 0){let r=e.host;if(!ar(r)){let n=ir(r);if(n.isIPV6!==!0&&n.isIPVFuture!==!0)r=qo(r,!0),n=ir(r);if(n.isIPV6===!0||n.isIPVFuture===!0)r=`[${n.escapedHost}]`;else r=No(r,!1)}t.push(r)}if(typeof e.port==="number"||typeof e.port==="string"){let r=String(e.port);if(!Du(r))throw TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0}jo.exports={nonSimpleDomain:zu,recomposeAuthority:tl,reescapeHostDelimiters:No,normalizePercentEncoding:qo,normalizePathEncoding:Wu,serializePathEncoding:Qu,normalizeQueryFragmentEncoding:Yu,encodeUserinfo:To,encodeQuery:Zu,encodeFragment:Xu,escapePreservingEscapes:el,removeDotSegments:ko,removeDotSegmentsRelative:Ku,isIPv4:ar,isUUID:ju,normalizeIPv6:ir,stringArrayToHexStripped:Au}});var Fo=pe(function(Om,Mo){var{isUUID:rl}=lr(),nl=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,ol=["http","https","ws","wss","urn","urn:uuid"];function sl(e){return ol.indexOf(e)!==-1}function fr(e){if(e.secure===!0)return!0;else if(e.secure===!1)return!1;else if(e.scheme)return e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S");else return!1}function Do(e){if(!e.host)e.error=e.error||"HTTP URIs must have a host.";return e}function Co(e){let t=String(e.scheme).toLowerCase()==="https";if(e.port===(t?443:80)||e.port==="")e.port=void 0;if(!e.path)e.path="/";return e}function il(e){return e.secure=fr(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function al(e){if(e.port===(fr(e)?443:80)||e.port==="")e.port=void 0;if(typeof e.secure==="boolean")e.scheme=e.secure?"wss":"ws",e.secure=void 0;if(e.resourceName){let t=e.resourceName.indexOf("?"),r=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=r&&r!=="/"?r:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function cl(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(nl);if(r&&r[0]===e.path){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=`${n}:${t.nid||e.nid}`,s=hr(o);if(e.path=void 0,s)e=s.parse(e,t)}else e.error=e.error||"URN can not be parsed.";return e}function dl(e,t){if(e.nid===void 0)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,s=hr(o);if(s)e=s.serialize(e,t);let i=e,a=e.nss;return i.path=`${n||t.nid}:${a}`,t.skipEscape=!0,i}function ul(e,t){let r=e;if(r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!rl(r.uuid)))r.error=r.error||"UUID is not valid.";return r}function ll(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var Ao={scheme:"http",domainHost:!0,parse:Do,serialize:Co},fl={scheme:"https",domainHost:Ao.domainHost,parse:Do,serialize:Co},it={scheme:"ws",domainHost:!0,parse:il,serialize:al},hl={scheme:"wss",domainHost:it.domainHost,parse:it.parse,serialize:it.serialize},pl={scheme:"urn",parse:cl,serialize:dl,skipNormalize:!0},ml={scheme:"urn:uuid",parse:ul,serialize:ll,skipNormalize:!0},at={http:Ao,https:fl,ws:it,wss:hl,urn:pl,"urn:uuid":ml};Object.setPrototypeOf(at,null);function hr(e){return e&&(at[e]||at[e.toLowerCase()])||void 0}Mo.exports={wsIsSecure:fr,SCHEMES:at,isValidSchemeName:sl,getSchemeHandler:hr}});var Yo=pe(function(Rm,lt){var{normalizeIPv6:Lo,removeDotSegments:De,removeDotSegmentsRelative:Ko,recomposeAuthority:_l,normalizePercentEncoding:pr,normalizePathEncoding:gl,serializePathEncoding:Vo,normalizeQueryFragmentEncoding:zo,encodeQuery:yl,encodeFragment:$l,reescapeHostDelimiters:vl,isIPv4:Go,nonSimpleDomain:wl}=lr(),{SCHEMES:Jo,getSchemeHandler:mr}=Fo(),Bo=/^[A-Za-z][A-Za-z0-9+.-]*$/u,El=/[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;function Uo(e){let t=String(e);if(!Bo.test(t))throw TypeError("URI scheme is malformed.");return t}function bl(e,t){if(typeof e==="string")e=Tl(e,t);else if(typeof e==="object")e=dt(ue(e,t),t);return e}function Sl(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:o,malformedAuthorityOrPort:s,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:d}=ct(e,n),{parsed:u,malformedAuthorityOrPort:l,malformedPercentEncoding:g,malformedSchemeSpecific:m,malformedHost:h,malformedScheme:f}=ct(t,n);if(s||l||i||g||a||m||c||h||d||f)throw Error(o.error||u.error||"URI is malformed.");let p=Wo(o,u,n,!0),_=mr(r&&r.scheme||p.scheme),E=p.host,w=E!==void 0&&E!==""&&(Go(E)||Lo(E).isIPV6);if(Zo(p,r||{},_,w))throw Error("URI host is malformed.");Qo(p,r||{},_,w);let O=E&&E.indexOf("%")!==-1&&!/\P{ASCII}/u.test(E);if(p.error&&!O)throw Error(p.error);return n.skipEscape=!0,ue(p,n)}function Wo(e,t,r,n){let o={};if(!n)e=dt(ue(e,r),r),t=dt(ue(t,r),r);if(r=r||{},!r.tolerant&&t.scheme)o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=De(t.path||""),o.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=De(t.path||""),o.query=t.query;else{if(!t.path)if(o.path=e.path,t.query!==void 0)o.query=t.query;else o.query=e.query;else{if(t.path[0]==="/")o.path=De(t.path);else{let s=e.userinfo!==void 0||e.host!==void 0||e.port!==void 0;if(s&&!e.path)o.path="/"+t.path;else if(!e.path)o.path=t.path;else o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path;o.path=e.scheme===void 0&&!s&&o.path[0]!=="/"?Ko(o.path):De(o.path)}o.query=t.query}o.userinfo=e.userinfo,o.host=e.host,o.port=e.port}o.scheme=e.scheme}return o.fragment=t.fragment,o}function Pl(e,t,r){let n=Ho(e,r),o=Ho(t,r);return n!==void 0&&o!==void 0&&n===o}function ue(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[];if(r.scheme)r.scheme=Uo(r.scheme);let s=mr(n.scheme||r.scheme);if(s&&s.serialize)s.serialize(r,n);let i=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,a=(r.scheme===void 0||n.reference==="suffix")&&!i,c=!n.skipEscape&&a;if(r.path!==void 0)if(!n.skipEscape)r.path=Vo(r.path,c);else r.path=pr(r.path);if(n.reference!=="suffix"&&r.scheme)r.scheme=Uo(r.scheme),o.push(r.scheme,":");let d=_l(r);if(d!==void 0){if(n.reference!=="suffix")o.push("//");if(o.push(d),r.path&&r.path[0]!=="/")o.push("/")}if(r.path!==void 0){let u=r.path;if(!n.absolutePath&&(!s||!s.absolutePath))u=a&&u[0]!=="/"?Ko(u):De(u);if(a)u=Vo(u,!0);if(d===void 0&&u[0]==="/"&&u[1]==="/")u="/%2F"+u.slice(2);o.push(u)}if(r.query!==void 0)o.push("?",yl(r.query));if(r.fragment!==void 0)o.push("#",$l(r.fragment));return o.join("")}var xl=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,Ol=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,Rl=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function kl(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port==="number"&&(e.port<0||e.port>65535))return"URI port is malformed.";return}function je(e){if(e===void 0)return!1;let t=e.indexOf("%");while(t!==-1){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function ut(e){return e[0]==="["&&e[e.length-1]==="]"}function Nl(e){let t=e[4];return je(e[3])||t!==void 0&&!ut(t)&&je(t)||je(e[6])||je(e[7])||je(e[8])}function Qo(e,t,r,n){if(Zo(e,t,r,n))return e.error=e.error||"URI host is malformed.",!0;if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!ut(e.host)&&(t.domainHost||r&&r.domainHost)&&n===!1&&wl(e.host)){let o;try{o=new URL("http://"+e.host)}catch(s){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+s,!0}if(!ql(o))return e.error=e.error||"URI host is malformed.",!0;e.host=o.hostname}return!1}function Zo(e,t,r,n){return Boolean(e.host&&n===!1&&!ut(e.host)&&(t.domainHost||r&&r.domainHost)&&El.test(e.host))}function ql(e){return e.username===""&&e.password===""&&e.port===""&&e.pathname==="/"&&e.search===""&&e.hash===""&&e.hostname!==""}function ct(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=!1,s=!1,i=!1,a=!1,c=!1,d=!1,u=!1;if(r.reference==="suffix")if(r.scheme)e=r.scheme+":"+e;else e="//"+e;let l=e.match(Ol);if(l!==null&&l[1].indexOf("\\")!==-1)n.error="URI authority must not contain a literal backslash.",o=!0;let g=e.match(Rl);if(g!==null){let h=g[1],f=h.replace(/[\t\n\r]/g,"");if(f.length>=2){if(f.slice(0,2)!=="//")n.error=n.error||"URI authority must not contain a literal backslash.",o=!0;else if(h.length!==f.length)n.error=n.error||"URI authority introducer must not contain whitespace.",o=!0}}let m=e.match(xl);if(m){if(n.scheme=m[1],n.userinfo=m[3],n.host=m[4],n.port=parseInt(m[5],10),n.path=m[6]||"",n.query=m[7],n.fragment=m[8],n.scheme!==void 0)if(Bo.test(n.scheme))n.scheme=n.scheme.toLowerCase();else n.error=n.error||"URI scheme is malformed.",d=!0;if(s=Nl(m),s)n.error=n.error||"URI contains malformed percent-encoding.";if(isNaN(n.port))n.port=m[5];let h=kl(n,m);if(h!==void 0)n.error=n.error||h,o=!0;if(n.host)if(Go(n.host)===!1){let _=ut(n.host),E=n.host.indexOf("[")!==-1||n.host.indexOf("]")!==-1,w=Lo(n.host);if(u=w.isIPV6||w.isIPVFuture===!0,c=E&&(!_||w.error===!0),n.host=u?w.host:w.host.toLowerCase(),c)n.error=n.error||"URI host is malformed.",o=!0}else u=!0;if(n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path)n.reference="same-document";else if(n.scheme===void 0)n.reference="relative";else if(n.fragment===void 0)n.reference="absolute";else n.reference="uri";if(r.reference&&r.reference!=="suffix"&&r.reference!==n.reference)n.error=n.error||"URI is not a "+r.reference+" reference.";let f=mr(r.scheme||n.scheme);if(!c)a=Qo(n,r,f,u);if(e.indexOf("%")!==-1&&n.host!==void 0&&!c){let p=u?n.host:pr(n.host,!0);if(!u)p=pr(p.toLowerCase());n.host=u||r.scheme!=="null"?vl(p,u):p}if(!f||f&&!f.skipNormalize){if(n.path)n.path=gl(n.path);if(n.query)n.query=zo(n.query);if(n.fragment)n.fragment=zo(n.fragment)}if(f&&f.parse){if(f.parse(n,r),f===Jo.urn&&n.nid===void 0)i=!0}}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:d}}function dt(e,t){return ct(e,t).parsed}function Tl(e,t){return Xo(e,t).normalized}function Xo(e,t){let{parsed:r,malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:i,malformedScheme:a}=ct(e,t);return{normalized:n||o||s||i||a?e:ue(r,t),malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:i,malformedScheme:a}}function Ho(e,t){if(typeof e!=="string"&&typeof e!=="object")return;let r;try{r=typeof e==="string"?e:ue(e,t)}catch{return}let{normalized:n,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:c}=Xo(r,t);return o||s||i||a||c?void 0:n}var _r={SCHEMES:Jo,normalize:bl,resolve:Sl,resolveComponent:Wo,equal:Pl,serialize:ue,parse:dt};lt.exports=_r;lt.exports.default=_r;lt.exports.fastUri=_r});var rs=pe(function(ts){Object.defineProperty(ts,"__esModule",{value:!0});var es=Yo();es.code='require("ajv/dist/runtime/uri").default';ts.default=es});var Pk=pe(function(X){Object.defineProperty(X,"__esModule",{value:!0});X.CodeGen=X.Name=X.nil=X.stringify=X.str=X._=X.KeywordCxt=void 0;var jl=Yg();Object.defineProperty(X,"KeywordCxt",{enumerable:!0,get:function(){return jl.KeywordCxt}});var ve=Bt();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return ve._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return ve.str}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return ve.stringify}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return ve.nil}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return ve.Name}});Object.defineProperty(X,"CodeGen",{enumerable:!0,get:function(){return ve.CodeGen}});var Dl=By(),as=Zg(),Cl=Ut(),Ae=k_(),Al=Bt(),Ce=Ne(),ft=ke(),yr=yn(),ns=xo(),Ml=rs(),cs=(e,t)=>new RegExp(e,t);cs.code="new RegExp";var Fl=["removeAdditional","useDefaults","coerceTypes"],Vl=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),zl={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Ul={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},os=200;function Hl(e){var t,r,n,o,s,i,a,c,d,u,l,g,m,h,f,p,_,E,w,O,b,J,W,xt,Ot;let Se=e.strict,Rt=(t=e.code)===null||t===void 0?void 0:t.optimize,Rr=Rt===!0||Rt===void 0?1:Rt||0,kr=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:cs,Bi=(o=e.uriResolver)!==null&&o!==void 0?o:Ml.default;return{strictSchema:(i=(s=e.strictSchema)!==null&&s!==void 0?s:Se)!==null&&i!==void 0?i:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:Se)!==null&&c!==void 0?c:!0,strictTypes:(u=(d=e.strictTypes)!==null&&d!==void 0?d:Se)!==null&&u!==void 0?u:"log",strictTuples:(g=(l=e.strictTuples)!==null&&l!==void 0?l:Se)!==null&&g!==void 0?g:"log",strictRequired:(h=(m=e.strictRequired)!==null&&m!==void 0?m:Se)!==null&&h!==void 0?h:!1,code:e.code?{...e.code,optimize:Rr,regExp:kr}:{optimize:Rr,regExp:kr},loopRequired:(f=e.loopRequired)!==null&&f!==void 0?f:os,loopEnum:(p=e.loopEnum)!==null&&p!==void 0?p:os,meta:(_=e.meta)!==null&&_!==void 0?_:!0,messages:(E=e.messages)!==null&&E!==void 0?E:!0,inlineRefs:(w=e.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:(O=e.schemaId)!==null&&O!==void 0?O:"$id",addUsedSchema:(b=e.addUsedSchema)!==null&&b!==void 0?b:!0,validateSchema:(J=e.validateSchema)!==null&&J!==void 0?J:!0,validateFormats:(W=e.validateFormats)!==null&&W!==void 0?W:!0,unicodeRegExp:(xt=e.unicodeRegExp)!==null&&xt!==void 0?xt:!0,int32range:(Ot=e.int32range)!==null&&Ot!==void 0?Ot:!0,uriResolver:Bi}}class ht{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Hl(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new Al.ValueScope({scope:{},prefixes:Vl,es5:t,lines:r}),this.logger=Wl(e.logger);let n=e.validateFormats;if(e.validateFormats=!1,this.RULES=Cl.getRules(),ss.call(this,zl,e,"NOT SUPPORTED"),ss.call(this,Ul,e,"DEPRECATED","warn"),this._metaOpts=Jl.call(this),e.formats)Kl.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)Gl.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);Ll.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,n=ns;if(r==="id")n={...ns},n.id=n.$id,delete n.$id;if(t&&e)this.addMetaSchema(n,n[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let n=r(t);if(!("$async"in r))this.errors=r.errors;return n}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(d,u){await o.call(this,d.$schema);let l=this._addSchema(d,u);return l.validate||s.call(this,l)}async function o(d){if(d&&!this.getSchema(d))await n.call(this,{$ref:d},!0)}async function s(d){try{return this._compileSchemaEnv(d)}catch(u){if(!(u instanceof as.default))throw u;return i.call(this,u),await a.call(this,u.missingSchema),s.call(this,d)}}function i({missingSchema:d,missingRef:u}){if(this.refs[d])throw Error(`AnySchema ${d} is loaded but ${u} cannot be resolved`)}async function a(d){let u=await c.call(this,d);if(!this.refs[d])await o.call(this,u.$schema);if(!this.refs[d])this.addSchema(u,d,t)}async function c(d){let u=this._loading[d];if(u)return u;try{return await(this._loading[d]=r(d))}finally{delete this._loading[d]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,n);return this}let o;if(typeof e==="object"){let{schemaId:s}=this.opts;if(o=e[s],o!==void 0&&typeof o!="string")throw Error(`schema ${s} must be string`)}return t=Ce.normalizeId(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(r,e);if(!n&&t){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw Error(o)}return n}getSchema(e){let t;while(typeof(t=is.call(this,e))=="string")e=t;if(t===void 0){let{schemaId:r}=this.opts,n=new Ae.SchemaEnv({schema:{},schemaId:r});if(t=Ae.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=is.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);return delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let r=e[this.opts.schemaId];if(r)r=Ce.normalizeId(r),delete this.schemas[r],delete this.refs[r];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string"){if(r=e,typeof t=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r}else if(typeof e=="object"&&t===void 0){if(t=e,r=t.keyword,Array.isArray(r)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(Zl.call(this,r,t),!t)return yr.eachItem(r,(o)=>gr.call(this,o)),this;Yl.call(this,t);let n={...t,type:ft.getJSONTypes(t.type),schemaType:ft.getJSONTypes(t.schemaType)};return yr.eachItem(r,n.type.length===0?(o)=>gr.call(this,o,n):(o)=>n.type.forEach((s)=>gr.call(this,o,n,s))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let r of t.rules){let n=r.rules.findIndex((o)=>o.keyword===e);if(n>=0)r.rules.splice(n,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);return this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){if(!e||e.length===0)return"No errors";return e.map((n)=>`${r}${n.instancePath} ${n.message}`).reduce((n,o)=>n+t+o)}$dataMetaSchema(e,t){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of t){let o=n.split("/").slice(1),s=e;for(let i of o)s=s[i];for(let i in r){let a=r[i];if(typeof a!="object")continue;let{$data:c}=a.definition,d=s[i];if(c&&d)s[i]=ds(d)}}return e}_removeAllSchemas(e,t){for(let r in e){let n=e[r];if(!t||t.test(r)){if(typeof n=="string")delete e[r];else if(n&&!n.meta)this._cache.delete(n.schema),delete e[r]}}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:i}=this.opts;if(typeof e=="object")s=e[i];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof e!="boolean")throw Error("schema must be object or boolean");let a=this._cache.get(e);if(a!==void 0)return a;r=Ce.normalizeId(s||r);let c=Ce.getSchemaRefs.call(this,e,r);if(a=new Ae.SchemaEnv({schema:e,schemaId:i,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),o&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=a}if(n)this.validateSchema(e,!0);return a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else Ae.compileSchema.call(this,e);if(!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{Ae.compileSchema.call(this,e)}finally{this.opts=t}}}ht.ValidationError=Dl.default;ht.MissingRefError=as.default;X.default=ht;function ss(e,t,r,n="error"){for(let o in e){let s=o;if(s in t)this.logger[n](`${r}: option ${o}. ${e[s]}`)}}function is(e){return e=Ce.normalizeId(e),this.schemas[e]||this.refs[e]}function Ll(){let e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function Kl(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function Gl(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}function Jl(){let e={...this.opts};for(let t of Fl)delete e[t];return e}var Bl={log(){},warn(){},error(){}};function Wl(e){if(e===!1)return Bl;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}var Ql=/^[a-z_$][a-z0-9_$:-]*$/i;function Zl(e,t){let{RULES:r}=this;if(yr.eachItem(e,(n)=>{if(r.keywords[n])throw Error(`Keyword ${n} is already defined`);if(!Ql.test(n))throw Error(`Keyword ${n} has invalid name`)}),!t)return;if(t.$data&&!(("code"in t)||("validate"in t)))throw Error('$data keyword must have "code" or "validate" function')}function gr(e,t,r){var n;let o=t===null||t===void 0?void 0:t.post;if(r&&o)throw Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=o?s.post:s.rules.find(({type:c})=>c===r);if(!i)i={type:r,rules:[]},s.rules.push(i);if(s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:ft.getJSONTypes(t.type),schemaType:ft.getJSONTypes(t.schemaType)}};if(t.before)Xl.call(this,i,a,t.before);else i.rules.push(a);s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach((c)=>this.addKeyword(c))}function Xl(e,t,r){let n=e.rules.findIndex((o)=>o.keyword===r);if(n>=0)e.rules.splice(n,0,t);else e.rules.push(t),this.logger.warn(`rule ${r} is not defined`)}function Yl(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=ds(t);e.validateSchema=this.compile(t,!0)}var ef={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ds(e){return{anyOf:[e,ef]}}});var hs=pe(function(ls){Object.defineProperty(ls,"__esModule",{value:!0});ls.DiscrError=void 0;var us;(function(e){e.Tag="tag",e.Mapping="mapping"})(us||(ls.DiscrError=us={}))});var Uk=pe(function(ms){Object.defineProperty(ms,"__esModule",{value:!0});var we=Bt(),$r=hs(),ps=k_(),nf=Zg(),of=yn(),sf={message:({params:{discrError:e,tagName:t}})=>e===$r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>we._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},af={keyword:"discriminator",type:"object",schemaType:"object",error:sf,code(e){let{gen:t,data:r,schema:n,parentSchema:o,it:s}=e,{oneOf:i}=o;if(!s.opts.discriminator)throw Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw Error("discriminator: requires propertyName");if(n.mapping)throw Error("discriminator: mapping is not supported");if(!i)throw Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),d=t.const("tag",we._`${r}${we.getProperty(a)}`);t.if(we._`typeof ${d} == "string"`,()=>u(),()=>e.error(!1,{discrError:$r.DiscrError.Tag,tag:d,tagName:a})),e.ok(c);function u(){let m=g();t.if(!1);for(let h in m)t.elseIf(we._`${d} === ${h}`),t.assign(c,l(m[h]));t.else(),e.error(!1,{discrError:$r.DiscrError.Mapping,tag:d,tagName:a}),t.endIf()}function l(m){let h=t.name("valid"),f=e.subschema({keyword:"oneOf",schemaProp:m},h);return e.mergeEvaluated(f,we.Name),h}function g(){var m;let h={},f=_(o),p=!0;for(let O=0;O<i.length;O++){let b=i[O];if((b===null||b===void 0?void 0:b.$ref)&&!of.schemaHasRulesButRef(b,s.self.RULES)){let W=b.$ref;if(b=ps.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,W),b instanceof ps.SchemaEnv)b=b.schema;if(b===void 0)throw new nf.default(s.opts.uriResolver,s.baseId,W)}let J=(m=b===null||b===void 0?void 0:b.properties)===null||m===void 0?void 0:m[a];if(typeof J!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);p=p&&(f||_(b)),E(J,O)}if(!p)throw Error(`discriminator: "${a}" must be required`);return h;function _({required:O}){return Array.isArray(O)&&O.includes(a)}function E(O,b){if(O.const)w(O.const,b);else if(O.enum)for(let J of O.enum)w(J,b);else throw Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function w(O,b){if(typeof O!="string"||O in h)throw Error(`discriminator: "${a}" values must be unique strings`);h[O]=b}}}};ms.default=af});var gs=pe(function(_s){Object.defineProperty(_s,"__esModule",{value:!0});var df={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};_s.default=df});var Fk=pe(function(ws){Object.defineProperty(ws,"__esModule",{value:!0});ws.callRef=ws.getValidate=void 0;var lf=Zg(),ys=V(),F=Bt(),Ee=Rc(),$s=k_(),pt=yn(),ff={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:s,validateName:i,opts:a,self:c}=n,{root:d}=s;if((r==="#"||r==="#/")&&o===d.baseId)return l();let u=$s.resolveRef.call(c,d,o,r);if(u===void 0)throw new lf.default(n.opts.uriResolver,o,r);if(u instanceof $s.SchemaEnv)return g(u);return m(u);function l(){if(s===d)return mt(e,i,s,s.$async);let h=t.scopeValue("root",{ref:d});return mt(e,F._`${h}.validate`,d,d.$async)}function g(h){let f=vs(e,h);mt(e,f,h,h.$async)}function m(h){let f=t.scopeValue("schema",a.code.source===!0?{ref:h,code:F.stringify(h)}:{ref:h}),p=t.name("valid"),_=e.subschema({schema:h,dataTypes:[],schemaPath:F.nil,topSchemaRef:f,errSchemaPath:r},p);e.mergeEvaluated(_),e.ok(p)}}};function vs(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):F._`${r.scopeValue("wrapper",{ref:t})}.validate`}ws.getValidate=vs;function mt(e,t,r,n){let{gen:o,it:s}=e,{allErrors:i,schemaEnv:a,opts:c}=s,d=c.passContext?Ee.default.this:F.nil;if(n)u();else l();function u(){if(!a.$async)throw Error("async schema referenced by sync schema");let h=o.let("valid");o.try(()=>{if(o.code(F._`await ${ys.callValidateCode(e,t,d)}`),m(t),!i)o.assign(h,!0)},(f)=>{if(o.if(F._`!(${f} instanceof ${s.ValidationError})`,()=>o.throw(f)),g(f),!i)o.assign(h,!1)}),e.ok(h)}function l(){e.result(ys.callValidateCode(e,t,d),()=>m(t),()=>g(t))}function g(h){let f=F._`${h}.errors`;o.assign(Ee.default.vErrors,F._`${Ee.default.vErrors} === null ? ${f} : ${Ee.default.vErrors}.concat(${f})`),o.assign(Ee.default.errors,F._`${Ee.default.vErrors}.length`)}function m(h){var f;if(!s.opts.unevaluated)return;let p=(f=r===null||r===void 0?void 0:r.validate)===null||f===void 0?void 0:f.evaluated;if(s.props!==!0)if(p&&!p.dynamicProps){if(p.props!==void 0)s.props=pt.mergeEvaluated.props(o,p.props,s.props)}else{let _=o.var("props",F._`${h}.evaluated.props`);s.props=pt.mergeEvaluated.props(o,_,s.props,F.Name)}if(s.items!==!0)if(p&&!p.dynamicItems){if(p.items!==void 0)s.items=pt.mergeEvaluated.items(o,p.items,s.items)}else{let _=o.var("items",F._`${h}.evaluated.items`);s.items=pt.mergeEvaluated.items(o,_,s.items,F.Name)}}}ws.callRef=mt;ws.default=ff});var jk=pe(function(bs){Object.defineProperty(bs,"__esModule",{value:!0});var mf=gs(),_f=Fk(),gf=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",mf.default,_f.default];bs.default=gf});var Ps=pe(function(Ss){Object.defineProperty(Ss,"__esModule",{value:!0});var gt=Bt(),oe=gt.operators,_t={maximum:{okStr:"<=",ok:oe.LTE,fail:oe.GT},minimum:{okStr:">=",ok:oe.GTE,fail:oe.LT},exclusiveMaximum:{okStr:"<",ok:oe.LT,fail:oe.GTE},exclusiveMinimum:{okStr:">",ok:oe.GT,fail:oe.LTE}},$f={message:({keyword:e,schemaCode:t})=>gt.str`must be ${_t[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>gt._`{comparison: ${_t[e].okStr}, limit: ${t}}`},vf={keyword:Object.keys(_t),type:"number",schemaType:"number",$data:!0,error:$f,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data(gt._`${r} ${_t[t].fail} ${n} || isNaN(${r})`)}};Ss.default=vf});var Os=pe(function(xs){Object.defineProperty(xs,"__esModule",{value:!0});var Me=Bt(),Ef={message:({schemaCode:e})=>Me.str`must be multiple of ${e}`,params:({schemaCode:e})=>Me._`{multipleOf: ${e}}`},bf={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Ef,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,s=o.opts.multipleOfPrecision,i=t.let("res"),a=s?Me._`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:Me._`${i} !== parseInt(${i})`;e.fail$data(Me._`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};xs.default=bf});var Ns=pe(function(ks){Object.defineProperty(ks,"__esModule",{value:!0});function Rs(e){let t=e.length,r=0,n=0,o;while(n<t)if(r++,o=e.charCodeAt(n++),o>=55296&&o<=56319&&n<t){if(o=e.charCodeAt(n),(o&64512)===56320)n++}return r}ks.default=Rs;Rs.code='require("ajv/dist/runtime/ucs2length").default'});var Ts=pe(function(qs){Object.defineProperty(qs,"__esModule",{value:!0});var le=Bt(),xf=yn(),Of=Ns(),Rf={message({keyword:e,schemaCode:t}){return le.str`must NOT have ${e==="maxLength"?"more":"fewer"} than ${t} characters`},params:({schemaCode:e})=>le._`{limit: ${e}}`},kf={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Rf,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,s=t==="maxLength"?le.operators.GT:le.operators.LT,i=o.opts.unicode===!1?le._`${r}.length`:le._`${xf.useFunc(e.gen,Of.default)}(${r})`;e.fail$data(le._`${i} ${s} ${n}`)}};qs.default=kf});var js=pe(function(Is){Object.defineProperty(Is,"__esModule",{value:!0});var qf=V(),Tf=yn(),be=Bt(),If={message:({schemaCode:e})=>be.str`must match pattern "${e}"`,params:({schemaCode:e})=>be._`{pattern: ${e}}`},jf={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:If,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:s,it:i}=e,a=i.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=i.opts.code,d=c.code==="new RegExp"?be._`new RegExp`:Tf.useFunc(t,c),u=t.let("valid");t.try(()=>t.assign(u,be._`${d}(${s}, ${a}).test(${r})`),()=>t.assign(u,!1)),e.fail$data(be._`!${u}`)}else{let c=qf.usePattern(e,o);e.fail$data(be._`!${c}.test(${r})`)}}};Is.default=jf});var Cs=pe(function(Ds){Object.defineProperty(Ds,"__esModule",{value:!0});var Fe=Bt(),Cf={message({keyword:e,schemaCode:t}){return Fe.str`must NOT have ${e==="maxProperties"?"more":"fewer"} than ${t} properties`},params:({schemaCode:e})=>Fe._`{limit: ${e}}`},Af={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Cf,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?Fe.operators.GT:Fe.operators.LT;e.fail$data(Fe._`Object.keys(${r}).length ${o} ${n}`)}};Ds.default=Af});var Ms=pe(function(As){Object.defineProperty(As,"__esModule",{value:!0});var ze=V(),Ve=Bt(),Ff=yn(),Vf={message:({params:{missingProperty:e}})=>Ve.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>Ve._`{missingProperty: ${e}}`},zf={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Vf,code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:s,it:i}=e,{opts:a}=i;if(!s&&r.length===0)return;let c=r.length>=a.loopRequired;if(i.allErrors)d();else u();if(a.strictRequired){let m=e.parentSchema.properties,{definedProperties:h}=e.it;for(let f of r)if((m===null||m===void 0?void 0:m[f])===void 0&&!h.has(f)){let p=i.schemaEnv.baseId+i.errSchemaPath,_=`required property "${f}" is not defined at "${p}" (strictRequired)`;Ff.checkStrictMode(i,_,i.opts.strictRequired)}}function d(){if(c||s)e.block$data(Ve.nil,l);else for(let m of r)ze.checkReportMissingProp(e,m)}function u(){let m=t.let("missing");if(c||s){let h=t.let("valid",!0);e.block$data(h,()=>g(m,h)),e.ok(h)}else t.if(ze.checkMissingProp(e,r,m)),ze.reportMissingProp(e,m),t.else()}function l(){t.forOf("prop",n,(m)=>{e.setParams({missingProperty:m}),t.if(ze.noPropertyInData(t,o,m,a.ownProperties),()=>e.error())})}function g(m,h){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(h,ze.propertyInData(t,o,m,a.ownProperties)),t.if(Ve.not(h),()=>{e.error(),t.break()})},Ve.nil)}}};As.default=zf});var Vs=pe(function(Fs){Object.defineProperty(Fs,"__esModule",{value:!0});var Ue=Bt(),Hf={message({keyword:e,schemaCode:t}){return Ue.str`must NOT have ${e==="maxItems"?"more":"fewer"} than ${t} items`},params:({schemaCode:e})=>Ue._`{limit: ${e}}`},Lf={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Hf,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?Ue.operators.GT:Ue.operators.LT;e.fail$data(Ue._`${r}.length ${o} ${n}`)}};Fs.default=Lf});var yt=pe(function(Us){Object.defineProperty(Us,"__esModule",{value:!0});var zs=Zt();zs.code='require("ajv/dist/runtime/equal").default';Us.default=zs});var Ls=pe(function(Hs){Object.defineProperty(Hs,"__esModule",{value:!0});var vr=ke(),q=Bt(),Jf=yn(),Bf=yt(),Wf={message:({params:{i:e,j:t}})=>q.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>q._`{i: ${e}, j: ${t}}`},Qf={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Wf,code(e){let{gen:t,data:r,$data:n,schema:o,parentSchema:s,schemaCode:i,it:a}=e;if(!n&&!o)return;let c=t.let("valid"),d=s.items?vr.getSchemaTypes(s.items):[];e.block$data(c,u,q._`${i} === false`),e.ok(c);function u(){let h=t.let("i",q._`${r}.length`),f=t.let("j");e.setParams({i:h,j:f}),t.assign(c,!0),t.if(q._`${h} > 1`,()=>(l()?g:m)(h,f))}function l(){return d.length>0&&!d.some((h)=>h==="object"||h==="array")}function g(h,f){let p=t.name("item"),_=vr.checkDataTypes(d,p,a.opts.strictNumbers,vr.DataType.Wrong),E=t.const("indices",q._`{}`);t.for(q._`;${h}--;`,()=>{if(t.let(p,q._`${r}[${h}]`),t.if(_,q._`continue`),d.length>1)t.if(q._`typeof ${p} == "string"`,q._`${p} += "_"`);t.if(q._`typeof ${E}[${p}] == "number"`,()=>{t.assign(f,q._`${E}[${p}]`),e.error(),t.assign(c,!1).break()}).code(q._`${E}[${p}] = ${h}`)})}function m(h,f){let p=Jf.useFunc(t,Bf.default),_=t.name("outer");t.label(_).for(q._`;${h}--;`,()=>t.for(q._`${f} = ${h}; ${f}--;`,()=>t.if(q._`${p}(${r}[${h}], ${r}[${f}])`,()=>{e.error(),t.assign(c,!1).break(_)})))}}};Hs.default=Qf});var Gs=pe(function(Ks){Object.defineProperty(Ks,"__esModule",{value:!0});var wr=Bt(),Xf=yn(),Yf=yt(),eh={message:"must be equal to constant",params:({schemaCode:e})=>wr._`{allowedValue: ${e}}`},th={keyword:"const",$data:!0,error:eh,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:s}=e;if(n||s&&typeof s=="object")e.fail$data(wr._`!${Xf.useFunc(t,Yf.default)}(${r}, ${o})`);else e.fail(wr._`${s} !== ${r}`)}};Ks.default=th});var Bs=pe(function(Js){Object.defineProperty(Js,"__esModule",{value:!0});var He=Bt(),nh=yn(),oh=yt(),sh={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>He._`{allowedValues: ${e}}`},ih={keyword:"enum",schemaType:"array",$data:!0,error:sh,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:s,it:i}=e;if(!n&&o.length===0)throw Error("enum must have non-empty array");let a=o.length>=i.opts.loopEnum,c,d=()=>c!==null&&c!==void 0?c:c=nh.useFunc(t,oh.default),u;if(a||n)u=t.let("valid"),e.block$data(u,l);else{if(!Array.isArray(o))throw Error("ajv implementation error");let m=t.const("vSchema",s);u=He.or(...o.map((h,f)=>g(m,f)))}e.pass(u);function l(){t.assign(u,!1),t.forOf("v",s,(m)=>t.if(He._`${d()}(${r}, ${m})`,()=>t.assign(u,!0).break()))}function g(m,h){let f=o[h];return typeof f==="object"&&f!==null?He._`${d()}(${r}, ${m}[${h}])`:He._`${r} === ${f}`}}};Js.default=ih});var Hk=pe(function(Ws){Object.defineProperty(Ws,"__esModule",{value:!0});var ch=Ps(),dh=Os(),uh=Ts(),lh=js(),fh=Cs(),hh=Ms(),ph=Vs(),mh=Ls(),_h=Gs(),gh=Bs(),yh=[ch.default,dh.default,uh.default,lh.default,fh.default,hh.default,ph.default,mh.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},_h.default,gh.default];Ws.default=yh});var br=pe(function(Zs){Object.defineProperty(Zs,"__esModule",{value:!0});Zs.validateAdditionalItems=void 0;var fe=Bt(),Er=yn(),vh={message:({params:{len:e}})=>fe.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>fe._`{limit: ${e}}`},wh={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:vh,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){Er.checkStrictMode(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Qs(e,n)}};function Qs(e,t){let{gen:r,schema:n,data:o,keyword:s,it:i}=e;i.items=!0;let a=r.const("len",fe._`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass(fe._`${a} <= ${t.length}`);else if(typeof n=="object"&&!Er.alwaysValidSchema(i,n)){let d=r.var("valid",fe._`${a} <= ${t.length}`);r.if(fe.not(d),()=>c(d)),e.ok(d)}function c(d){r.forRange("i",t.length,a,(u)=>{if(e.subschema({keyword:s,dataProp:u,dataPropType:Er.Type.Num},d),!i.allErrors)r.if(fe.not(d),()=>r.break())})}}Zs.validateAdditionalItems=Qs;Zs.default=wh});var Sr=pe(function(ti){Object.defineProperty(ti,"__esModule",{value:!0});ti.validateTuple=void 0;var Ys=Bt(),$t=yn(),bh=V(),Sh={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return ei(e,"additionalItems",t);if(r.items=!0,$t.alwaysValidSchema(r,t))return;e.ok(bh.validateArray(e))}};function ei(e,t,r=e.schema){let{gen:n,parentSchema:o,data:s,keyword:i,it:a}=e;if(u(o),a.opts.unevaluated&&r.length&&a.items!==!0)a.items=$t.mergeEvaluated.items(n,r.length,a.items);let c=n.name("valid"),d=n.const("len",Ys._`${s}.length`);r.forEach((l,g)=>{if($t.alwaysValidSchema(a,l))return;n.if(Ys._`${d} > ${g}`,()=>e.subschema({keyword:i,schemaProp:g,dataProp:g},c)),e.ok(c)});function u(l){let{opts:g,errSchemaPath:m}=a,h=r.length,f=h===l.minItems&&(h===l.maxItems||l[t]===!1);if(g.strictTuples&&!f){let p=`"${i}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;$t.checkStrictMode(a,p,g.strictTuples)}}}ti.validateTuple=ei;ti.default=Sh});var oi=pe(function(ni){Object.defineProperty(ni,"__esModule",{value:!0});var xh=Sr(),Oh={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>xh.validateTuple(e,"items")};ni.default=Oh});var ai=pe(function(ii){Object.defineProperty(ii,"__esModule",{value:!0});var si=Bt(),kh=yn(),Nh=V(),qh=br(),Th={message:({params:{len:e}})=>si.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>si._`{limit: ${e}}`},Ih={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Th,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;if(n.items=!0,kh.alwaysValidSchema(n,t))return;if(o)qh.validateAdditionalItems(e,o);else e.ok(Nh.validateArray(e))}};ii.default=Ih});var di=pe(function(ci){Object.defineProperty(ci,"__esModule",{value:!0});var z=Bt(),vt=yn(),Dh={message:({params:{min:e,max:t}})=>t===void 0?z.str`must contain at least ${e} valid item(s)`:z.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?z._`{minContains: ${e}}`:z._`{minContains: ${e}, maxContains: ${t}}`},Ch={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Dh,code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e,i,a,{minContains:c,maxContains:d}=n;if(s.opts.next)i=c===void 0?1:c,a=d;else i=1;let u=t.const("len",z._`${o}.length`);if(e.setParams({min:i,max:a}),a===void 0&&i===0){vt.checkStrictMode(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){vt.checkStrictMode(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if(vt.alwaysValidSchema(s,r)){let f=z._`${u} >= ${i}`;if(a!==void 0)f=z._`${f} && ${u} <= ${a}`;e.pass(f);return}s.items=!0;let l=t.name("valid");if(a===void 0&&i===1)m(l,()=>t.if(l,()=>t.break()));else if(i===0){if(t.let(l,!0),a!==void 0)t.if(z._`${o}.length > 0`,g)}else t.let(l,!1),g();e.result(l,()=>e.reset());function g(){let f=t.name("_valid"),p=t.let("count",0);m(f,()=>t.if(f,()=>h(p)))}function m(f,p){t.forRange("i",0,u,(_)=>{e.subschema({keyword:"contains",dataProp:_,dataPropType:vt.Type.Num,compositeRule:!0},f),p()})}function h(f){if(t.code(z._`${f}++`),a===void 0)t.if(z._`${f} >= ${i}`,()=>t.assign(l,!0).break());else if(t.if(z._`${f} > ${a}`,()=>t.assign(l,!1).break()),i===1)t.assign(l,!0);else t.if(z._`${f} >= ${i}`,()=>t.assign(l,!0))}}};ci.default=Ch});var Bk=pe(function(fi){Object.defineProperty(fi,"__esModule",{value:!0});fi.validateSchemaDeps=fi.validatePropertyDeps=fi.error=void 0;var Pr=Bt(),Mh=yn(),Le=V();fi.error={message:({params:{property:e,depsCount:t,deps:r}})=>Pr.str`must have ${t===1?"property":"properties"} ${r} when property ${e} is present`,params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>Pr._`{property: ${e},
6
- missingProperty: ${n},
7
- depsCount: ${t},
8
- deps: ${r}}`};var Fh={keyword:"dependencies",type:"object",schemaType:"object",error:fi.error,code(e){let[t,r]=Vh(e);ui(e,t),li(e,r)}};function Vh({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let o=Array.isArray(e[n])?t:r;o[n]=e[n]}return[t,r]}function ui(e,t=e.schema){let{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let i in t){let a=t[i];if(a.length===0)continue;let c=Le.propertyInData(r,n,i,o.opts.ownProperties);if(e.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),o.allErrors)r.if(c,()=>{for(let d of a)Le.checkReportMissingProp(e,d)});else r.if(Pr._`${c} && (${Le.checkMissingProp(e,a,s)})`),Le.reportMissingProp(e,s),r.else()}}fi.validatePropertyDeps=ui;function li(e,t=e.schema){let{gen:r,data:n,keyword:o,it:s}=e,i=r.name("valid");for(let a in t){if(Mh.alwaysValidSchema(s,t[a]))continue;r.if(Le.propertyInData(r,n,a,s.opts.ownProperties),()=>{let c=e.subschema({keyword:o,schemaProp:a},i);e.mergeValidEvaluated(c,i)},()=>r.var(i,!0)),e.ok(i)}}fi.validateSchemaDeps=li;fi.default=Fh});var gi=pe(function(_i){Object.defineProperty(_i,"__esModule",{value:!0});var mi=Bt(),Hh=yn(),Lh={message:"property name must be valid",params:({params:e})=>mi._`{propertyName: ${e.propertyName}}`},Kh={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Lh,code(e){let{gen:t,schema:r,data:n,it:o}=e;if(Hh.alwaysValidSchema(o,r))return;let s=t.name("valid");t.forIn("key",n,(i)=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),t.if(mi.not(s),()=>{if(e.error(!0),!o.allErrors)t.break()})}),e.ok(s)}};_i.default=Kh});var xr=pe(function(yi){Object.defineProperty(yi,"__esModule",{value:!0});var wt=V(),G=Bt(),Jh=Rc(),Et=yn(),Bh={message:"must NOT have additional properties",params:({params:e})=>G._`{additionalProperty: ${e.additionalProperty}}`},Wh={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Bh,code(e){let{gen:t,schema:r,parentSchema:n,data:o,errsCount:s,it:i}=e;if(!s)throw Error("ajv implementation error");let{allErrors:a,opts:c}=i;if(i.props=!0,c.removeAdditional!=="all"&&Et.alwaysValidSchema(i,r))return;let d=wt.allSchemaProperties(n.properties),u=wt.allSchemaProperties(n.patternProperties);l(),e.ok(G._`${s} === ${Jh.default.errors}`);function l(){t.forIn("key",o,(p)=>{if(!d.length&&!u.length)h(p);else t.if(g(p),()=>h(p))})}function g(p){let _;if(d.length>8){let E=Et.schemaRefOrVal(i,n.properties,"properties");_=wt.isOwnProperty(t,E,p)}else if(d.length)_=G.or(...d.map((E)=>G._`${p} === ${E}`));else _=G.nil;if(u.length)_=G.or(_,...u.map((E)=>G._`${wt.usePattern(e,E)}.test(${p})`));return G.not(_)}function m(p){t.code(G._`delete ${o}[${p}]`)}function h(p){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(p);return}if(r===!1){if(e.setParams({additionalProperty:p}),e.error(),!a)t.break();return}if(typeof r=="object"&&!Et.alwaysValidSchema(i,r)){let _=t.name("valid");if(c.removeAdditional==="failing")f(p,_,!1),t.if(G.not(_),()=>{e.reset(),m(p)});else if(f(p,_),!a)t.if(G.not(_),()=>t.break())}}function f(p,_,E){let w={keyword:"additionalProperties",dataProp:p,dataPropType:Et.Type.Str};if(E===!1)Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1});e.subschema(w,_)}}};yi.default=Wh});var Ei=pe(function(wi){Object.defineProperty(wi,"__esModule",{value:!0});var Zh=Yg(),vi=V(),Or=yn(),$i=xr(),Xh={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e;if(s.opts.removeAdditional==="all"&&n.additionalProperties===void 0)$i.default.code(new Zh.KeywordCxt(s,$i.default,"additionalProperties"));let i=vi.allSchemaProperties(r);for(let l of i)s.definedProperties.add(l);if(s.opts.unevaluated&&i.length&&s.props!==!0)s.props=Or.mergeEvaluated.props(t,Or.toHash(i),s.props);let a=i.filter((l)=>!Or.alwaysValidSchema(s,r[l]));if(a.length===0)return;let c=t.name("valid");for(let l of a){if(d(l))u(l);else{if(t.if(vi.propertyInData(t,o,l,s.opts.ownProperties)),u(l),!s.allErrors)t.else().var(c,!0);t.endIf()}e.it.definedProperties.add(l),e.ok(c)}function d(l){return s.opts.useDefaults&&!s.compositeRule&&r[l].default!==void 0}function u(l){e.subschema({keyword:"properties",schemaProp:l,dataProp:l},c)}}};wi.default=Xh});var Oi=pe(function(xi){Object.defineProperty(xi,"__esModule",{value:!0});var bi=V(),bt=Bt(),Si=yn(),Pi=yn(),ep={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:o,it:s}=e,{opts:i}=s,a=bi.allSchemaProperties(r),c=a.filter((f)=>Si.alwaysValidSchema(s,r[f]));if(a.length===0||c.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let d=i.strictSchema&&!i.allowMatchingProperties&&o.properties,u=t.name("valid");if(s.props!==!0&&!(s.props instanceof bt.Name))s.props=Pi.evaluatedPropsToName(t,s.props);let{props:l}=s;g();function g(){for(let f of a){if(d)m(f);if(s.allErrors)h(f);else t.var(u,!0),h(f),t.if(u)}}function m(f){for(let p in d)if(new RegExp(f).test(p))Si.checkStrictMode(s,`property ${p} matches pattern ${f} (use allowMatchingProperties)`)}function h(f){t.forIn("key",n,(p)=>{t.if(bt._`${bi.usePattern(e,f)}.test(${p})`,()=>{let _=c.includes(f);if(!_)e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:p,dataPropType:Pi.Type.Str},u);if(s.opts.unevaluated&&l!==!0)t.assign(bt._`${l}[${p}]`,!0);else if(!_&&!s.allErrors)t.if(bt.not(u),()=>t.break())})})}}};xi.default=ep});var ki=pe(function(Ri){Object.defineProperty(Ri,"__esModule",{value:!0});var rp=yn(),np={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if(rp.alwaysValidSchema(n,r)){e.fail();return}let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Ri.default=np});var qi=pe(function(Ni){Object.defineProperty(Ni,"__esModule",{value:!0});var sp=V(),ip={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:sp.validateUnion,error:{message:"must match a schema in anyOf"}};Ni.default=ip});var Ii=pe(function(Ti){Object.defineProperty(Ti,"__esModule",{value:!0});var St=Bt(),cp=yn(),dp={message:"must match exactly one schema in oneOf",params:({params:e})=>St._`{passingSchemas: ${e.passing}}`},up={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:dp,code(e){let{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let s=r,i=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(d),e.result(i,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((u,l)=>{let g;if(cp.alwaysValidSchema(o,u))t.var(c,!0);else g=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},c);if(l>0)t.if(St._`${c} && ${i}`).assign(i,!1).assign(a,St._`[${a}, ${l}]`).else();t.if(c,()=>{if(t.assign(i,!0),t.assign(a,l),g)e.mergeEvaluated(g,St.Name)})})}}};Ti.default=up});var Di=pe(function(ji){Object.defineProperty(ji,"__esModule",{value:!0});var fp=yn(),hp={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");let o=t.name("valid");r.forEach((s,i)=>{if(fp.alwaysValidSchema(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:i},o);e.ok(o),e.mergeEvaluated(a)})}};ji.default=hp});var Fi=pe(function(Mi){Object.defineProperty(Mi,"__esModule",{value:!0});var Pt=Bt(),Ai=yn(),mp={message:({params:e})=>Pt.str`must match "${e.ifClause}" schema`,params:({params:e})=>Pt._`{failingKeyword: ${e.ifClause}}`},_p={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:mp,code(e){let{gen:t,parentSchema:r,it:n}=e;if(r.then===void 0&&r.else===void 0)Ai.checkStrictMode(n,'"if" without "then" and "else" is ignored');let o=Ci(n,"then"),s=Ci(n,"else");if(!o&&!s)return;let i=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),o&&s){let u=t.let("ifClause");e.setParams({ifClause:u}),t.if(a,d("then",u),d("else",u))}else if(o)t.if(a,d("then"));else t.if(Pt.not(a),d("else"));e.pass(i,()=>e.error(!0));function c(){let u=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(u)}function d(u,l){return()=>{let g=e.subschema({keyword:u},a);if(t.assign(i,a),e.mergeValidEvaluated(g,i),l)t.assign(l,Pt._`${u}`);else e.setParams({ifClause:u})}}}};function Ci(e,t){let r=e.schema[t];return r!==void 0&&!Ai.alwaysValidSchema(e,r)}Mi.default=_p});var zi=pe(function(Vi){Object.defineProperty(Vi,"__esModule",{value:!0});var yp=yn(),$p={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===void 0)yp.checkStrictMode(r,`"${e}" without "if" is ignored`)}};Vi.default=$p});var zk=pe(function(Ui){Object.defineProperty(Ui,"__esModule",{value:!0});var wp=br(),Ep=oi(),bp=Sr(),Sp=ai(),Pp=di(),xp=Bk(),Op=gi(),Rp=xr(),kp=Ei(),Np=Oi(),qp=ki(),Tp=qi(),Ip=Ii(),jp=Di(),Dp=Fi(),Cp=zi();function Ap(e=!1){let t=[qp.default,Tp.default,Ip.default,jp.default,Dp.default,Cp.default,Op.default,Rp.default,xp.default,kp.default,Np.default];if(e)t.push(Ep.default,Sp.default);else t.push(wp.default,bp.default);return t.push(Pp.default),t}Ui.default=Ap});var Li=pe(function(Hi){Object.defineProperty(Hi,"__esModule",{value:!0});var N=Bt(),Fp={message:({schemaCode:e})=>N.str`must match format "${e}"`,params:({schemaCode:e})=>N._`{format: ${e}}`},Vp={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Fp,code(e,t){let{gen:r,data:n,$data:o,schema:s,schemaCode:i,it:a}=e,{opts:c,errSchemaPath:d,schemaEnv:u,self:l}=a;if(!c.validateFormats)return;if(o)g();else m();function g(){let h=r.scopeValue("formats",{ref:l.formats,code:c.code.formats}),f=r.const("fDef",N._`${h}[${i}]`),p=r.let("fType"),_=r.let("format");r.if(N._`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(p,N._`${f}.type || "string"`).assign(_,N._`${f}.validate`),()=>r.assign(p,N._`"string"`).assign(_,f)),e.fail$data(N.or(E(),w()));function E(){if(c.strictSchema===!1)return N.nil;return N._`${i} && !${_}`}function w(){let O=u.$async?N._`(${f}.async ? await ${_}(${n}) : ${_}(${n}))`:N._`${_}(${n})`,b=N._`(typeof ${_} == "function" ? ${O} : ${_}.test(${n}))`;return N._`${_} && ${_} !== true && ${p} === ${t} && !${b}`}}function m(){let h=l.formats[s];if(!h){E();return}if(h===!0)return;let[f,p,_]=w(h);if(f===t)e.pass(O());function E(){if(c.strictSchema===!1){l.logger.warn(b());return}throw Error(b());function b(){return`unknown format "${s}" ignored in schema at path "${d}"`}}function w(b){let J=b instanceof RegExp?N.regexpCode(b):c.code.formats?N._`${c.code.formats}${N.getProperty(s)}`:void 0,W=r.scopeValue("formats",{key:s,ref:b,code:J});if(typeof b=="object"&&!(b instanceof RegExp))return[b.type||"string",b.validate,N._`${W}.validate`];return["string",b,W]}function O(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw Error("async format in sync schema");return N._`await ${_}(${n})`}return typeof p=="function"?N._`${_}(${n})`:N._`${_}.test(${n})`}}}};Hi.default=Vp});var Wk=pe(function(Ki){Object.defineProperty(Ki,"__esModule",{value:!0});var Up=Li(),Hp=[Up.default];Ki.default=Hp});var Vk=pe(function(Gi){Object.defineProperty(Gi,"__esModule",{value:!0});Gi.contentVocabulary=Gi.metadataVocabulary=void 0;Gi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Gi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});
9
- export{Bt,yn,Rc,Yg,By,Zg,k_,Pk,Fk,jk,Hk,Bk,zk,Wk,Vk,Uk};
10
-
11
- //# debugId=25A3636D3BC765A264756E2164756E21
12
- //# sourceMappingURL=studio-q80fg1d6.js.map
@@ -1,6 +0,0 @@
1
- import{p0,pf,ff,mf,f0,ag,su,Fv,gf,zI,Rh,cg,XM,Pa}from"./studio-nzemfbkk.js";import{p}from"./studio-4fnb5648.js";import{gh,Vp}from"./studio-hh394phe.js";import{_v}from"./studio-yrcrncev.js";import{jt,fn}from"./studio-aam8zt8z.js";import{Ne}from"./studio-n9qba0gx.js";import{mx}from"./studio-53wy9ek3.js";import{Fr}from"./studio-thz5t120.js";import{fh,dv,Gd,uv,hv,mh}from"./studio-zfdbmhp3.js";import{C}from"./studio-4f7thq0p.js";import{n,Q,_,v,cd}from"./studio-k3we3kqb.js";function w(e,t){return new URL(`/node_modules/${e}`,t).href}function g(e){if(e===void 0)return!1;if(n(e))return!e.includes("${");if(Array.isArray(e))return e.every((t)=>g(t));if(v(e))return!("$ref"in e)&&!("$prototype"in e)&&!("$expression"in e)&&Object.values(e).every((t)=>g(t));return!0}function uS(e){let t=new Map;for(let[s,r]of Object.entries(e.state??{})){if(cd(s)||!v(r)||!Array.isArray(r.examples))continue;let[o]=r.examples;if(g(o))t.set(s,o)}return t}var k={body:"body",root:":root"};function R(e,t,s,r,o=k){let l=[],a=(i,c)=>{let d={mediaQueries:t,scope:c,transposeValue:s};if(r)d.resolveValue=(m,h)=>r(m,h,c);for(let m of ag(i,d))l.push(m.text)},S={},y={},x=[],b=[];for(let[i,c]of Object.entries(e)){if(_(c)&&!Array.isArray(c)){if(i.startsWith("@"))x.push([i,c]);else if(!i.startsWith("--"))b.push([i,c]);continue}if(f0(i)||i.startsWith("@"))continue;if(i.startsWith("--")||i==="colorScheme"||i==="color-scheme")S[i]=c;else y[i]=c}a(S,o.root),a(y,o.body);for(let[i,c]of b)if(i.startsWith("&"))a({[i]:c},o.root);else a(c,i);for(let[i,c]of x){if(p0(i)||pf(i)){a({[i]:c},null);continue}let d={},m={},h=[];for(let[u,f]of Object.entries(c)){if(_(f)&&!Array.isArray(f)){if(!u.startsWith("@"))h.push([u,f]);continue}if(u.startsWith("--"))d[u]=f;else m[u]=f}a({[i]:d},o.root),a({[i]:m},o.body);for(let[u,f]of h)a({[i]:f},u)}if(Object.values(t).some((i)=>mf(i)!==null)&&!("colorScheme"in e))l.push(`${o.root} { color-scheme: light dark }`,`${o.root}:where([${ff}="light"]) { color-scheme: light }`,`${o.root}:where([${ff}="dark"]) { color-scheme: dark }`);return l.join(`
2
- `)}var T={body:":host",root:":host"},P=new WeakMap,J=new WeakMap;function A(e){let t=e.replaceAll(/:root\b/g,":host").replaceAll(/(^|[\s,>+~(])(?:html|body)(?![\w-])/g,"$1:host").replaceAll(/:host(?:\s*>?\s*:host)+/g,":host");return t===e?null:t}function j(e){for(let t=0;t<e.cssRules.length;t+=1){let s=e.cssRules[t],r=s instanceof CSSStyleRule?A(s.selectorText):null;if(s instanceof CSSStyleRule&&r!==null){let l=`${r}${s.cssText.slice(s.cssText.indexOf("{"))}`;try{e.insertRule(l,t),e.deleteRule(t+1)}catch{}}let o=e.cssRules[t];if(o instanceof CSSGroupingRule)j(o)}}function D(e){let t=[];for(let s of e??[]){if(!_(s)||String(s.tagName).toLowerCase()!=="link")continue;let{href:r,rel:o}=s.attributes??{};if(n(r)&&r!==""&&n(o)&&o.split(/\s+/).includes("stylesheet"))t.push(r)}return t}async function M(e){let t=hv(e,"project.json");try{let s=await fetch(t);if(!s.ok)return null;let r=new URL(t,location.href).href,o=new CSSStyleSheet({baseURL:r});return o.replaceSync(await s.text()),j(o),o}catch{return null}}async function L(e){let s=(await Promise.all(D(e.$head).map((o)=>M(o)))).filter((o)=>o!==null),{style:r}=e;if(_(r)){let o=new CSSStyleSheet;o.replaceSync(R(r,e.$media??{},(l)=>l,void 0,T)),s.push(o)}return s}function E(){let e=C?.projectConfig;if(!e||!Q(globalThis.CSSStyleSheet))return Promise.resolve([]);let t=P.get(e);if(!t)t=L(e).then((s)=>(J.set(e,s),s)),P.set(e,t);return t}function iN(){let e=C?.projectConfig;return(e&&J.get(e))??[]}var H=150;function yw(e=H){let t=new Map;function s(){for(let[r,o]of t){if(t.size<=e)break;t.delete(r),o.remove()}}return{clear(){for(let r of t.values())r.remove();t.clear()},get(r){let o=t.get(r);if(o!==void 0)t.delete(r),t.set(r,o);return o},has:(r)=>t.has(r),keys:()=>[...t.keys()],set(r,o){t.delete(r),t.set(r,o),s()},size:()=>t.size}}function O(e){let t=Gd(C?.projectRoot);return URL.canParse(t)?new URL(e,t).href:location.href}async function N(e){try{let t=await p().readFile(e);su(!0);let s=uv(e,mh());await jt();let r;if(fn(e))r=(await Fr(e,t)).document;else r=JSON.parse(t);return await F(r,e,s)}catch{return null}}async function F(e,t,s){su(!0),Fv(dv());let r=await Rh(e,{},O(t)),o=s&&{...s,revisions:Vp(),versions:gh()};zI((l)=>_v(l,o));try{let l=Pa(e,r);return l instanceof HTMLElement?l:null}finally{zI(null)}}async function W(e,t){let s=await XE(t);if(!s)return null;let r=uS(s);return await hS(s,t,r)?mx(e,r):null}async function XE(e){try{let t=JSON.parse(await p().readFile(e));return _(t)&&!Array.isArray(t)?t:null}catch{return null}}async function hS(e,t,s){let r=null;try{su(!0),Fv(dv());let o=await Rh(e,{},O(t));for(let[S,y]of s)o[S]=y;let l=!1;cg(()=>{l=!0});let{stop:a}=gf(()=>Pa({...e,tagName:"div"},o));return r=a,!l}catch{return!1}finally{cg(null),r?.()}}function V(e){return e.source!=="npm"&&(e.path?.endsWith(".json")??!1)}async function ww(e,t){let s=t.get(e);if(s)return s;let r;try{XM((l)=>w(l,`${fh()}/`)),await E();let o=Ne.find((l)=>l.path===e);if(o&&V(o))r=await W(o,e);else r=o?await mx(o):await N(e)}catch{return}if(!r)return;return t.set(e,r),r}function _p(e){if(!Q(globalThis.IntersectionObserver))return{destroy(){},observe:(r)=>e(r),releaseDetached:()=>0};let t=new Set,s=new IntersectionObserver((r)=>{for(let o of r)if(o.isIntersecting)t.delete(o.target),s.unobserve(o.target),e(o.target)},{rootMargin:"200px"});return{destroy(){s.disconnect(),t.clear()},observe(r){if(t.has(r))return;t.add(r),s.observe(r)},releaseDetached(){let r=0;for(let o of t)if(!o.isConnected)t.delete(o),s.unobserve(o),r+=1;return r}}}
3
- export{uS,iN,yw,XE,hS,ww,_p};
4
-
5
- //# debugId=1F63FE53C2A6F9CC64756E2164756E21
6
- //# sourceMappingURL=studio-r050sez0.js.map
@@ -1,7 +0,0 @@
1
- import{Wt,ml,gv,an,xn,ea,Gn,Ra,xh,Z,Yd,Qd,fi,m,h,pn,Sr,Qm,i1,oc,eg,tg,td,c1,r0,xI,eu,Ft,kv}from"./studio-yrcrncev.js";import{w,yl}from"./studio-sce30r7b.js";import{nu,ef}from"./studio-swedpd82.js";import{p}from"./studio-4fnb5648.js";import{pO,hl,Sx,u,tv}from"./studio-x0gsfr1d.js";import{ae}from"./studio-wqfaqw4m.js";import{Vu,Gl}from"./studio-yzpskb0j.js";import{Tn,nt,qo,qC}from"./studio-tpxcryf2.js";import{zt}from"./studio-daksw8kh.js";import{Ul,xS,Tb,vN,pT,fT,mT,gT}from"./studio-9qx1ywbv.js";import{oa,At}from"./studio-1ks5d9y4.js";import{Cs,Tp,Jl,jc}from"./studio-e7vjyp04.js";import{al}from"./studio-ggx3j7nd.js";import{bt,Ub,Ql,zc,sh,Ap,bC,ji}from"./studio-53wy9ek3.js";import{pl,Br,Ks,Js,zr}from"./studio-90zkgne5.js";import{Yl,$m,Ip}from"./studio-thz5t120.js";import{ju,GE}from"./studio-hfxttkyr.js";import{_i}from"./studio-wse1rs8t.js";import{rT}from"./studio-423tfdte.js";import{Sa,Fc}from"./studio-wgc54sxf.js";import{Xc}from"./studio-zfdbmhp3.js";import{tf,C,wn,vl}from"./studio-4f7thq0p.js";import{hf,E,R}from"./studio-9dq7rwc7.js";import{Me,h0}from"./studio-0gvvqj3h.js";import{me,te,g}from"./studio-3qr08sxq.js";import{n,Ze,v}from"./studio-k3we3kqb.js";import{ce}from"./studio-0939t1q1.js";var St=new Set(["entry"]);function sb(e){let t=ml(e.id);if(t)return t;let a=e.session.ui.canvasMode;if(a==="git-diff")return"publish";if(a==="media"||a==="image")return"media";if(St.has(a))return"content";let r=Yl(e.id);if(r)return r.kind==="data"?"design":"content";if(e.documentPath===an)return"styles";return Gn(e.documentPath)?"content":"design"}var Tt=new Set(["edit","design","stylebook"]);function fE(e){return e.documentPath!==null&&Yl(e.id)===null&&Tt.has(e.session.ui.canvasMode)}function Nc(e,t=u.workspace){let a=m.tabs.get(e);return a!==void 0&&sb(a)===t}function ne(e,t=u.workspace){return e.tabOrder.filter((a)=>Nc(a,t))}function _D(e){let t=m.mruOrder.find((a)=>Nc(a,e));if(t)return t;for(let a of m.panes){let r=a.tabOrder.find((i)=>Nc(i,e));if(r)return r}return null}function mE(e,t){if(e.activeTabId&&Nc(e.activeTabId,t))return e.activeTabId;return m.mruOrder.find((a)=>e.tabOrder.includes(a)&&Nc(a,t))??e.tabOrder.find((a)=>Nc(a,t))??null}var je={$schema:"https://jxsuite.com/schema/v1",$id:"StudioTabStrip",$description:"One pane's tab strip, as a Jx document over the kit: a real `tablist` of `jx-tab`s, or — for a pane that owns no document — the derivation chip naming what it is a projection of, and in both cases one trailing button. `panels/tab-strip.ts` keeps every decision: which pane a host is drawing, what each tab is called (the shortest unique suffix, and a page's ROUTE), what its tooltip says, whether closing it needs a prompt, what the overflow chevron lists and what the context menu offers. This document owns the markup, the ARIA, the keyboard and the style, and it holds THREE things the old chip drew by hand and the kit now draws: the tab's own selected state (`aria-selected`, not an `.active` class), its close button, and its dirty dot. The three that are Studio's alone go in `jx-tab`'s slots — the drill-in marker in `icon`, the draft pill in `status`, the pin toggle in `actions` (ui.md §5.4) — which is the gap that kept this strip out of the tab pattern until now. **Drag is `@atlaskit/pragmatic-drag-and-drop`, not native HTML5 DnD**: a chip carries no `draggable` attribute and no `ondrag*` handler, because `panels/tab-strip.ts` registers every chip and every strip as a pragmatic source/target through `onNodeCreated` and resolves a completed drag in `panels/tab-drop.ts`. What is left here is three SCOPE comparisons, exactly as `files-panel.json` marks a row under drag: `data-dragging` on the chip being carried, `data-drop` on the chip a drop would land beside, `data-drop-tail` on the strip when the drop is its empty tail.",tagName:"div",attributes:{part:"strip-row","data-focused":"${state.focused ? '' : null}",hidden:"${state.mode === 'empty' ? '' : null}"},onmousedown:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/focusPane"},value:[]}]},style:{$description:"`styles/shell.css`'s `.tab-strip*` rules and `styles/canvas.css`'s pane-state rules, keyed on `part` and carried in. What did NOT come with them is the point: the chip's own hover, its selected underline, its close button and its dirty dot are `jx-tab`'s, and the strip's flex row and hairline are `jx-tabs`'s. What is left here is the pane strip's own shape — the scroll container the chevron exists for, the 11px type of a chrome row, the states the PANE model adds (pinned, preview, dragging, an unfocused pane's dimmed underline), and the three slotted marks.",display:"flex",alignItems:"stretch",minWidth:"0",background:"var(--bg-panel)",borderBottom:"1px solid var(--border)",fontFamily:"var(--jx-font-sans)","&[hidden]":{display:"none"},'& [part="tabs"]':{$description:"`.tab-strip`. The kit's strip draws its own hairline; the ROW draws this one, so the strip's is taken off rather than doubled. The scrollbar is hidden by design — the wheel handler is a mouse affordance and the chevron is the pointer-independent route to the same tabs — so `overflow-x: auto` here is a scrolling box with no visible bar.",flex:"1 1 auto",minWidth:"0",gap:"0",padding:"0 var(--jx-space-2)",border:"0",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none",fontSize:"var(--jx-text-sm)","&::-webkit-scrollbar":{display:"none"}},'& [part="tabs"][data-drop-tail]::after':{$description:"The strip's own tail target: a drop onto the empty space after the last chip, or onto a pane whose strip carries no chips at all — an empty pane made a target during a drag by `panels/tab-strip.ts`'s `project`. A fixed-width bar rather than a background tint, so it reads the same as a chip's own `data-drop` edge instead of a second visual language for the same gesture.",content:'""',flex:"0 0 2px",alignSelf:"stretch",background:"var(--accent)"},'& [part="tab"]':{$description:"`.tab-strip-tab`. The kit's tab caps itself at 220px and reserves a control's height; a chrome row is tighter than that and its labels are the shortest unique suffix, so both are re-declared. `flex-shrink: 0` is what makes the strip scroll rather than squeeze fifteen documents into one width.",gap:"var(--jx-space-1)",padding:"4px var(--jx-space-2)",minHeight:"0",maxWidth:"none",flexShrink:"0",marginBlockEnd:"0",color:"var(--fg-dim)",cursor:"pointer",":hover":{color:"var(--fg)",background:"var(--hover-bg)"},'&[aria-selected="true"]':{color:"var(--fg)",borderBlockEndColor:"var(--accent)"},"&[data-dragging]":{opacity:"0.4"},"&[data-drop]":{$description:"The chip a drop would land BESIDE. An inset shadow rather than a border, so the indicator draws no layout shift mid-drag — the same reason `files-panel.json`'s row indicators are backgrounds rather than borders.",boxShadow:"inset 2px 0 0 var(--accent)"}},'& [part="tab"] [part="label"]':{maxWidth:"140px"},'& [part="tab"][data-preview] [part="label"]':{fontStyle:"italic"},'&:not([data-focused]) [part="tab"][aria-selected="true"]':{$description:"The unfocused pane's strip still says which of ITS documents is current, in a colour that does not compete with the pane holding the keyboard.",borderBlockEndColor:"var(--border)"},'& [part="tab"] [part="close"]':{$description:"`.tab-strip-close`'s reveal, applied to the kit's own close button: a row of fifteen ✕ glyphs is noise, so the affordance appears on the tab under the pointer and on the current one. The button keeps its own 24px target either way (SC 2.5.8) — this moves no pixel of layout.",opacity:"0"},'& [part="tab"]:hover [part="close"], & [part="tab"][aria-selected="true"] [part="close"]':{opacity:"1"},'& [part="origin"]':{$description:"`.tab-strip-origin` — the drill-in marker, in `jx-tab`'s icon slot. Hidden from assistive technology by the document that writes it: a reader hears where a document was opened from in the tooltip, and an arrow announced beside a file name says nothing.",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",lineHeight:"1"},'& [part="pill"]':{$description:'`.entry-pill` — the draft pill (site-architecture.md §7.6), in `jx-tab`\'s status slot. It is ON THE CHIP and not only inside the entry editor because the mistake it prevents, publishing something you believed was private, is made while glancing at a row of tabs. "Published" is deliberately as visible as "Draft": a state you can only see one half of is a state you cannot check. The two Spectrum colours it used to name are `--jx-signal` against `--jx-bg`, which flips with the theme where a fixed yellow and a fixed black did not.',padding:"0 5px",borderRadius:"var(--radius)",background:"var(--bg)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",lineHeight:"15px",whiteSpace:"nowrap"},'& [part="pill"][data-draft]':{background:"var(--jx-signal)",color:"var(--jx-bg)"},'& [part="pin"]':{$description:"`.tab-strip-pin`, in `jx-tab`'s actions slot, on the current chip and on a pinned one (the rule below). A click on it never also selects the tab, and that is the KIT's doing now rather than a `stopPropagation` this document has to remember: `jx-tab` stops a click inside its actions slot exactly as it stops one on its own close button.",display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",padding:"0",border:"none",background:"none",color:"var(--fg-dim)",font:"inherit",fontSize:"var(--jx-text-md)",lineHeight:"1",borderRadius:"var(--radius)",cursor:"pointer",":hover":{background:"var(--hover-bg)",color:"var(--fg)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-1px"}},'& [part="tab"]:not([aria-selected="true"]):not([data-pinned]) [part="pin"]':{$description:"An inactive, unpinned chip draws no pin and keeps no box for one. It was `opacity: 0` here and revealed on hover, so the invisible button still took 16px of the chip and every click on it: the centre of a short chip (the Media home's, beside its viewer tab) was the pin, so the click toggled a pin nobody could see and the tab did not activate. A box that takes clicks is a control, and a control is either shown or absent. The current chip shows its pin, a pinned chip shows its mark, and any chip pins from its context menu (`document.togglePinned`).",display:"none"},'& [part="tab"][data-pinned] [part="pin"]':{color:"var(--accent)"},'& [part="derivation"]':{$description:"A LENS pane's strip: one chip naming the projection and the document it projects, where an ordinary pane draws tab chips. It is not a tab and must not look like one — no close ✕ of its own, because a lens owns no document to close. Its vertical box is a tab chip's, `4px` top and bottom plus the 2px underline `[part=\"tab\"]` reserves, so the lens's one-chip row sits on the same baseline grid as the tab row in the pane beside it; `tab-strip.test.ts` compares the two declarations rather than the two boxes, because happy-dom lays nothing out and a 19px strip against a 28px one is the class of defect only a picture catches. Horizontally it is 10px rather than a chip's 8px: this row is one chip wide with nothing to sit beside, and a chip's tighter inset exists so several of them read as a series.",display:"flex",flex:"1 1 auto",alignItems:"baseline",gap:"6px",minWidth:"0",padding:"4px 10px",borderBottom:"2px solid transparent",whiteSpace:"nowrap",overflow:"hidden"},'& [part="preset"]':{color:"var(--fg)",fontSize:"var(--jx-text-md)"},'& [part="subject"]':{color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",textOverflow:"ellipsis",overflow:"hidden"},'& [part="overflow"]':{$description:"`.tab-strip-overflow`. It sits OUTSIDE the scrolling strip, so it stays reachable at any scroll offset — which is the whole point of it. One button draws both trailing affordances, because they are the same control in the same place: the chevron that lists the tabs currently out of view, and, on a derived pane, the ✕ that is a lens's only exit.",flex:"0 0 auto",display:"flex",alignItems:"center",justifyContent:"center",width:"22px",padding:"0",border:"none",borderLeft:"1px solid var(--border)",background:"none",color:"var(--fg-dim)",font:"inherit",fontSize:"var(--jx-text-lg)",lineHeight:"1",cursor:"pointer",":hover":{background:"var(--hover-bg)",color:"var(--fg)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-2px"}},'& [part="overflow"][hidden]':{display:"none"}},children:[{$description:"One row draws one pane, and a pane is either a set of open documents or a projection of somebody else's. A third answer — a pane with neither — draws nothing at all, which is the case with no branch here: the row itself is `hidden`.",tagName:"div",attributes:{part:"body"},style:{$description:"The switch container generates no box: the branch inside it IS the row's flex item, so a lens chip and a tab strip sit at the same depth and take the same `flex` the row gives them.",display:"contents"},$switch:{$ref:"#/state/mode"},cases:{tabs:{tagName:"jx-tabs",attributes:{part:"tabs",label:"${state.stripLabel}",selected:"${state.active}","data-drop-tail":"${state.dropTail ? '' : null}"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/activate"},value:[{$ref:"event#/detail"}]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closeTab"},value:[{$ref:"event#/detail"}]}]},onwheel:{$ref:"#/state/wheel"},children:[{$prototype:"Array",items:{$ref:"#/state/tabs"},key:{$ref:"$map/item/key"},map:{tagName:"jx-tab",attributes:{part:"tab","data-tab":"${$map.item.key}",value:"${$map.item.key}",label:"${$map.item.label}",title:"${$map.item.title}",closable:"",dirty:"${$map.item.dirty ? '' : null}","data-pinned":"${$map.item.pinned ? '' : null}","data-preview":"${$map.item.preview ? '' : null}","data-dragging":"${state.dragKey === $map.item.key ? '' : null}","data-drop":"${state.dropIndex === $map.item.index ? '' : null}"},ondblclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/promote"},value:[{$ref:"$map/item/key"}]}]},onauxclick:{$prototype:"Function",body:[{if:{operator:"===",target:{$ref:"event#/button"},value:1},then:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/closeTab"},value:[{$ref:"$map/item/key"}]}]}]},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/context"},value:[{$ref:"$map/item/key"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]},children:[{$description:"The drill-in marker: this document was opened FROM another one. `jx-tab`'s icon slot draws it before the label, which is where it has always been.",tagName:"span",attributes:{slot:"icon",part:"origin","aria-hidden":"true",hidden:"${$map.item.origin ? null : ''}"},textContent:"↳"},{$description:"The draft pill. It is a `<span>` in the status slot rather than a mounted document of its own, which is what kept it a lit fragment inside `content/entry-editor.ts` until the strip converted: a document mounted per chip would be an async mount inside a synchronous rebuild. `entryDraftPill` states the two facts; this draws them.",tagName:"span",attributes:{slot:"status",part:"pill",title:"${$map.item.pillTitle}","data-draft":"${$map.item.draft ? '' : null}",hidden:"${$map.item.pill ? null : ''}"},textContent:"${$map.item.pill}"},{$description:"The pin, in the actions slot. `title` is the whole accessible name (studio-ui-guidelines.md §10): the glyph is hidden, so a matching `aria-label` would announce it twice. `tabindex` follows the tab's own selectedness, exactly as the close button's does — the strip is ONE stop in the tab order, and a control inside every chip that took the platform's default would make fifteen.",tagName:"button",attributes:{slot:"actions",part:"pin",type:"button",title:"${$map.item.pinTitle}",tabindex:"${$map.item.tabindex}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/togglePin"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",attributes:{part:"pin-glyph","aria-hidden":"true"},textContent:"${$map.item.pinGlyph}"}]}]}}]},derivation:{$description:`THE CHIP FINISHES ITS OWN SENTENCE, and both halves are the flow's: two of the presets are labelled with an unfinished phrase — "Same page at", "Same page in" — because the interesting half is the value, and a chip whose source pane shows nothing says "no document" rather than trailing off.`,tagName:"div",attributes:{part:"derivation",title:"${state.chipTitle}"},children:[{tagName:"span",attributes:{part:"preset"},textContent:"${state.preset}"},{tagName:"span",attributes:{part:"subject"},textContent:"${state.subject}"}]}}},{tagName:"button",attributes:{part:"overflow",type:"button",title:"${state.trailingTitle}",hidden:"${state.trailing ? null : ''}"},onclick:{$prototype:"Function",body:[{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/openTrailing"},value:[{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",attributes:{part:"overflow-glyph","aria-hidden":"true"},textContent:"${state.trailingGlyph}"}]}]};E("tab-strip",je);function Et(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function Pt(e){let t=e?.$map,a=v(t)?t.item:void 0,r=v(a)?a.key:void 0;return n(r)?r:""}function Ce(e,t,a){let r=g({...t,...a,dragKey:"",dropIndex:-1,dropTail:!1});e.replaceChildren();let i=null,o=!1,s=null;return R("tab-strip",r,e,{onNodeCreated:(l,c,d,f)=>{if(o||!(l instanceof HTMLElement))return;let b=Et(d);if(b==="tabs"){s=l,a.stripHost(l);return}if(b==="tab"){let x=Pt(f);if(x)a.chipHost(l,x)}}}).then((l)=>{if(o){l.dispose();return}i=l}),{dispose(){o=!0,i?.dispose(),i=null,s=null,e.replaceChildren()},drag(l){r.dragKey=l.dragKey,r.dropIndex=l.dropIndex,r.dropTail=l.dropTail},strip:()=>s,update(l){r.focused=l.focused,r.stripLabel=l.stripLabel,r.active=l.active,r.tabs=l.tabs,r.preset=l.preset,r.subject=l.subject,r.chipTitle=l.chipTitle,r.trailing=l.trailing,r.trailingTitle=l.trailingTitle,r.trailingGlyph=l.trailingGlyph,r.mode=l.mode}}}function Fe(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),a.push.apply(a,r)}return a}function Ae(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Fe(Object(a),!0).forEach(function(r){pl(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Fe(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}var Nt={top:function e(t,a){return Math.abs(a.y-t.top)},right:function e(t,a){return Math.abs(t.right-a.x)},bottom:function e(t,a){return Math.abs(t.bottom-a.y)},left:function e(t,a){return Math.abs(a.x-t.left)}};function fe(e,t){var a,r,{element:i,input:o,allowedEdges:s}=t,l={x:o.clientX,y:o.clientY},c=i.getBoundingClientRect(),d=s.map(function(b){return{edge:b,value:Nt[b](c,l)}}),f=(a=(r=d.sort(function(b,x){return b.value-x.value})[0])===null||r===void 0?void 0:r.edge)!==null&&a!==void 0?a:null;return Ae(Ae({},e),{},pl({},re,f))}function he(e){var t;return(t=e[re])!==null&&t!==void 0?t:null}var re=Symbol("closestEdge");function Oe(e){var{startIndex:t,closestEdgeOfTarget:a,indexOfTarget:r,axis:i}=e;if(t===-1||r===-1)return t;if(t===r)return t;if(a==null)return r;var o=i==="vertical"&&a==="bottom"||i==="horizontal"&&a==="right",s=t<r;if(s)return o?r:r-1;return o?r+1:r}function Mu(e){return v(e)&&(e.type==="tab"||e.type==="file-tree"&&e.entryType==="file")}function ge(e,t,a){if(pn(t)?.derived)GE(t);if(!kv(e,t,a))return;td(e),Ft(e)}async function Ht(e,t,a){let r=[...m.tabs.values()].find((o)=>o.documentPath===e);if(r){ge(r.id,t,a);return}await _i(e,{focus:!0,paneId:t});let i=[...m.tabs.values()].find((o)=>o.documentPath===e);if(i)ge(i.id,t,a)}function Le(e,t){if(e.tabId===void 0)return e.index;return t==="left"?e.index:e.index+1}async function It(e,t){let a=he(t);if(e.type==="tab"){if(e.paneId===t.paneId){let r=pn(t.paneId);if(!r)return;let i=r.tabOrder.indexOf(e.tabId);if(i===-1)return;let o=t.tabId===void 0?r.tabOrder.length-1:Oe({axis:"horizontal",closestEdgeOfTarget:a,indexOfTarget:t.index,startIndex:i});if(o!==i)xI(e.tabId,o);return}ge(e.tabId,t.paneId,Le(t,a));return}await Ht(e.path,t.paneId,Le(t,a))}async function jt(e,t){if(e.type==="tab"){if(i1(e.tabId))td(e.tabId);return}let a=oc(t.paneId);if(await _i(e.path,{paneId:a.id}),![...m.tabs.values()].some((i)=>i.documentPath===e.path)&&tg(a))eg(a.id)}async function De(e,t){if(!t||!Mu(e.data))return;let a=e.data;if(t.data.type==="tab-slot"){await It(a,t.data);return}if(t.data.type==="pane-edge")await jt(a,t.data)}var we=null,ie=null,z=new Map,_=new Map,T=new Map,A=new Map,M=new Map,J=null,H=null,P=null,U=new Map,oe=new Map,ve=null;function Mt(e){return`pane.${e}/tabs`}function Ct(e){return hf(Mt(e.id))??we}function SD(e){Ot(),we=e,ve=Js({onDragStart({source:t}){if(!Mu(t.data))return;H=t.data.type==="tab"?{kind:"tab",tabId:t.data.tabId}:{kind:"file",path:t.data.path},be(),ye()},onDrag({location:t}){if(!H)return;let[a]=t.current.dropTargets,r=a?.data;P=r?.type==="tab-slot"?{index:r.tabId===void 0?-1:r.index,paneId:r.paneId,tail:r.tabId===void 0}:null,ye()},onDrop({location:t,source:a}){if(!Mu(a.data))return;let[r]=t.current.dropTargets;H=null,P=null,ye(),be(),De(a,r)}}),ie=me(),ie.run(()=>{te(()=>{m.activePaneId;for(let t of m.panes)t.id,t.tabOrder,t.activeTabId;u.workspace;for(let t of m.tabs.values())t.session.ui.canvasMode,t.doc.dirty,al(t),t.documentPath,t.pinned,t.preview,t.session.openedFrom,t.doc.content.frontmatter[Cs];c1(),be()})})}function Ot(){Rt(),Se(),_e(),ie?.stop(),ie=null,ve?.(),ve=null;for(let e of T.keys())$e(e);for(let e of T.values())e.dispose();T.clear(),A.clear(),we=null,H=null,P=null,z.clear(),M.clear(),_.clear()}function $e(e){let t=U.get(e);if(t){for(let a of t.values())a();U.delete(e)}oe.get(e)?.(),oe.delete(e)}function be(){let e=tv(),t=new Map;for(let r of m.panes){let i=Ct(r);if(i&&(!t.has(i)||Qm(r.id)))t.set(i,r)}let a=new Set;for(let[r,i]of t){if(e||i.derived)Lt(i,r);_.set(i.id,r),a.add(i.id)}for(let[r,i]of _){if(a.has(r))continue;if(_.delete(r),z.delete(r),M.delete(r),!t.has(i))$e(i),T.get(i)?.dispose(),T.delete(i),A.delete(i)}}function Lt(e,t){let a=Re(e);A.set(t,{mode:a.mode,paneId:e.id});let r=T.get(t);if(r)r.update(a);else T.set(t,Ce(t,a,Jt(t)));if(Kt(t,a),T.get(t)?.strip()&&e.activeTabId!==z.get(e.id))z.set(e.id,e.activeTabId),le.add(t);Dt(t)}var V=new Map,le=new Set;function Dt(e){if(V.has(e))return;V.set(e,requestAnimationFrame(()=>{V.delete(e);let t=F(e);if(t&&tv())_t(t,e);le.delete(e)}))}function Rt(){for(let e of V.values())cancelAnimationFrame(e);V.clear(),le.clear()}function _t(e,t){let a=T.get(t)?.strip();if(a&&le.has(t))[...a.children].find((r)=>r instanceof HTMLElement&&r.dataset.tab===e.activeTabId)?.scrollIntoView({block:"nearest",inline:"nearest"});Yt(e,t)}function F(e){let t=A.get(e)?.paneId;return m.panes.find((a)=>a.id===t)??null}function Jt(e){return{activate:(t)=>{Ft(t)},chipHost:(t,a)=>{Gt(e,t,a)},closeTab:(t)=>{ab(t)},context:(t,a,r)=>{let i=m.tabs.get(t);if(i)ia(i,a,r)},focusPane:()=>{Sr(F(e)?.id??fi)},openTrailing:(t)=>{Xt(e,t)},promote:(t)=>{td(t)},stripHost:(t)=>{qt(e,t)},togglePin:(t)=>{let a=m.tabs.get(t);if(a)r0(t,!a.pinned)},wheel:(t,a)=>{Zt(a)}}}function Vt(e,t){let a=ae(),r=bt(e.id)??bt(t.sourcePaneId),i=t.kind==="lens"&&t.preset==="breakpoint"?`${ju.breakpoint} ${t.media?ji(t.media):"Base"}`:t.kind==="companion"&&t.preset==="locale"?`${ju.locale} ${t.locale?Wt(t.locale):"—"}`:ju[t.preset],o=r?$d(r):"no document";return{active:"",chipTitle:`${i} · ${r?.documentPath??"no document"}`,focused:Qm(e.id),mode:"derivation",preset:i,stripLabel:se(e),subject:o,tabs:[],trailing:!0,trailingGlyph:"✕",trailingTitle:a?.get("pane.unsplit")?.title??"Close Side Pane"}}function se(e){return e.id===fi?"Open documents":"Open documents in the side pane"}function Ut(e){return{active:"",chipTitle:"",focused:Qm(e.id),mode:"empty",preset:"",stripLabel:se(e),subject:"",tabs:[],trailing:!1,trailingGlyph:"",trailingTitle:""}}function Re(e){let{derived:t}=e,a=ne(e);if(t&&a.length===0)return Vt(e,t);if(a.length===0){if(H)return{active:"",chipTitle:"",focused:Qm(e.id),mode:"tabs",preset:"",stripLabel:se(e),subject:"",tabs:[],trailing:!1,trailingGlyph:"⌄",trailingTitle:"Show hidden tabs"};return z.set(e.id,null),M.set(e.id,!1),Ut(e)}let r=Je(e);return{active:e.activeTabId??"",chipTitle:"",focused:Qm(e.id),mode:"tabs",preset:"",stripLabel:se(e),subject:"",tabs:a.flatMap((i)=>Bt(e,i,e.tabOrder.indexOf(i),r)),trailing:M.get(e.id)===!0,trailingGlyph:"⌄",trailingTitle:"Show hidden tabs"}}function Bt(e,t,a,r){let i=m.tabs.get(t);if(!i)return[];let o=vN(i);return[{dirty:i.doc.dirty||al(i),draft:o?.draft??!1,index:a,key:t,label:r.get(t)??"Untitled",origin:Boolean(i.session.openedFrom),pill:o?.text??"",pillTitle:o?.title??"",pinGlyph:i.pinned?"◉":"◎",pinTitle:i.pinned?"Unpin":"Pin",pinned:i.pinned,preview:i.preview,tabindex:t===e.activeTabId?"0":"-1",title:la(i)}]}function Gt(e,t,a){let r=U.get(e);if(!r)r=new Map,U.set(e,r);r.get(a)?.();let i=Br(zr({element:t,canDrag({input:o}){let s=h0(o.clientX,o.clientY);return!(s instanceof Element&&s.closest('[part="pin"], [part="close"]'))},getInitialData(){return{paneId:F(e)?.id,tabId:a,type:"tab"}}}),Ks({canDrop({source:o}){return Mu(o.data)},element:t,getData({element:o,input:s}){let l=F(e);if(!l)return{type:"tab-slot-refused"};return fe({index:l.tabOrder.indexOf(a),paneId:l.id,tabId:a,type:"tab-slot"},{allowedEdges:["left","right"],element:o,input:s})}}));r.set(a,i)}function qt(e,t){oe.get(e)?.();let a=Ks({canDrop({source:r}){return Mu(r.data)},element:t,getData(){let r=F(e);return r?{index:r.tabOrder.length,paneId:r.id,type:"tab-slot"}:{type:"tab-slot-refused"}}});oe.set(e,a)}function Kt(e,t){if(t.mode!=="tabs"){$e(e);return}let a=new Set(t.tabs.map((i)=>i.key)),r=U.get(e);if(!r)return;for(let[i,o]of r)if(!a.has(i))o(),r.delete(i)}function ye(){let e=H?.kind==="tab"?H.tabId:"";for(let[t,a]of A){let r=T.get(t);if(!r)continue;let i=P!==null&&P.paneId===a.paneId;r.drag({dragKey:e,dropIndex:i&&P?P.index:-1,dropTail:i&&P?P.tail:!1})}}function Yt(e,t){let a=T.get(t),r=a?.strip();if(!a||!r)return;let i=r.scrollWidth>r.clientWidth;if(i!==(M.get(e.id)===!0))M.set(e.id,i),a.update(Re(e))}function Xt(e,t){let a=F(e);if(!a)return;if(A.get(e)?.mode==="derivation"){nt("pane.unsplit",void 0,"Tabs");return}ta(a,Je(a),t)}function Zt(e){if(e.ctrlKey)return;let t=e.currentTarget;if(!(t instanceof HTMLElement)||t.scrollWidth<=t.clientWidth)return;let a=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;if(!a)return;e.preventDefault(),t.scrollLeft+=a}function Qt(e=m.activePaneId){let t=m.panes.find((d)=>d.id===e),a=_.get(e),r=a?T.get(a)?.strip()??null:null;if(!t||!r)return[];let i=r.scrollLeft,o=i+r.clientWidth,s=[],l=ne(t),c=[...r.querySelectorAll('[part="tab"]')];for(let[d,f]of c.entries()){let b=l[d];if(b&&(f.offsetLeft<i||f.offsetLeft+f.offsetWidth>o))s.push(b)}return s}function Se(){J?.close(),J=null}function ta(e,t,a){Se();let r=Qt(e.id),i=r.length>0?r:ne(e),o=Me(a??document.body);J=zt({label:"Hidden tabs",onClosed:(s)=>{if(J===s)J=null},opener:a,place:(s)=>({x:Math.max(4,o.right-s.width),y:o.bottom}),placement:"block-end span-inline-start",region:"tab-overflow",rows:i.map((s)=>({checked:s===e.activeTabId?"true":"false",destructive:!1,disabled:!1,dividerAbove:!1,id:s,run:()=>{Ft(s)},title:t.get(s)??"Untitled"}))})}var W=null;function _e(){W?.close(),W=null}function aa(e){let t={};if(Fc(e.documentPath))t.draft=!Jl(Ul(e));return t}function na(e){let t=Object.entries(e),a=t.length===1?t[0]?.[1]:void 0;if(!Ze(a))return;return a?"false":"true"}function ra(e){let t=ae();if(!t)return[];let a=aa(e),r=[],i;for(let o of t.forPlacement("context/tab")){let s=o.args;if(!(s?.required??[]).every((x)=>(x in a)))continue;let l={};for(let x of Object.keys(s?.properties??{}))if(x in a)l[x]=a[x];let c=r.length>0&&o.group!==i;({group:i}=o);let d=t.disabledReason(o.id),f=na(l),b={destructive:o.destructive===!0,dividerAbove:c,id:o.id,title:o.title};if(f!==void 0)b.checked=f;r.push(d===void 0?{...b,disabled:!1,run:()=>{Tn(t,o.id,l,"Tabs")}}:{...b,disabled:!0,requires:d})}return r}function ia(e,t,a){_e(),Se(),Ft(e.id);let r=ra(e);if(r.length===0)return;W=zt({label:"Tab actions",onClosed:(i)=>{if(W===i)W=null},origin:{x:t,y:a},region:"tab",rows:r})}function cm(e){let t=e.replace(/^\.\//,"");if(!t.startsWith("pages/"))return null;let r=t.slice(6).replace(/\.[^./]+$/,"").split("/").filter((i)=>i!=="");if(r.at(-1)==="index")r.pop();return`/${r.join("/")}`}function sa(e){let t=e.map((a)=>{let r=a.documentPath;if(!r)return{depth:0,fixed:!0,id:a.id,label:a.fallback,parts:[]};let i=cm(r);if(i!==null)return{depth:0,fixed:!0,id:a.id,label:i,parts:[]};let o=r.split("/").filter((s)=>s!==""&&s!==".");return{depth:1,fixed:!1,id:a.id,label:o.slice(-1).join("/")||r,parts:o}});for(;;){let a=new Map;for(let i of t){let o=a.get(i.label);if(o)o.push(i);else a.set(i.label,[i])}let r=!1;for(let i of a.values()){if(i.length<2)continue;for(let o of i){if(o.fixed||o.depth>=o.parts.length)continue;o.depth+=1,o.label=o.parts.slice(-o.depth).join("/"),r=!0}}if(!r)break}return new Map(t.map((a)=>[a.id,a.label]))}function Je(e){return sa(e.tabOrder.flatMap((t)=>{let a=m.tabs.get(t);return a?[{documentPath:a.documentPath,fallback:$m(a.id)??gv(a.id)??"Untitled",id:t}]:[]}))}function la(e){let t=e.documentPath||$m(e.id)||gv(e.id)||"Untitled",a=e.session.openedFrom,r=a?.documentPath?`${t}
2
- Opened from ${a.documentPath}`:t;return e.preview?`${r}
3
- Preview — double-click to keep open`:r}function $d(e){let t=e.documentPath;if(!t)return $m(e.id)??"Untitled";return cm(t)??t.split("/").at(-1)??t}function Ve(e){let t=ef(e),a=al(e);if(!e.doc.dirty&&!t&&!a)return!1;let r=xn(e);if(!r.active)return!0;if(ea(e))return!0;if(t||a)return!0;return r.peers.filter((o)=>o.state.focusedPath===e.documentPath).length===0}function xe(e){if(ea(e))return`You have read access to this session, so "${$d(e)}" has changes that were never published and have nowhere to be saved. Closing discards them.`;if(ef(e))return`"${$d(e)}" has text in its editor that the document could not be given — the `+"source does not parse, or a collaborator holds the source lock. Saving would write the file without it, so it is not offered. Closing discards that text.";return null}async function da(e){let t=xe(e);if(t)return qo("Changes Cannot Be Saved",t,{cancelLabel:"Keep Editing",confirmLabel:"Close Without Saving",destructive:!0});let a=await qC("Unsaved Changes",`"${$d(e)}" has unsaved changes.`,{discardLabel:"Close Without Saving"});if(a==="cancel")return!1;return a==="discard"||await Ip(e)}async function ab(e){let t=m.tabs.get(e);if(!t)return;if(await nu(t),!m.tabs.has(e))return;if(Ve(t)&&!await da(t))return;eu(e)}async function gE(e){let t=[...m.tabs.values()];for(let c of t)await nu(c);let a=[...m.tabs.values()].filter((c)=>Ve(c));if(a.length===0)return!0;let r=a.length===1?`"${$d(a[0])}" has unsaved changes`:`${a.length} documents have unsaved changes`,i=a.filter((c)=>xe(c)!==null),o=a.filter((c)=>xe(c)===null),s=i.length===1?`"${$d(i[0])}"`:`${i.length} of them`;if(o.length===0)return qo("Changes Cannot Be Saved",`${e} closes every open document, and ${r}. ${s} cannot be saved at all, so saving would leave work behind. Closing discards it.`,{cancelLabel:"Keep Editing",confirmLabel:"Close Without Saving",destructive:!0});let l=await qC("Unsaved Changes",i.length===0?`${e} closes every open document, and ${r}.`:`${e} closes every open document, and ${r}. ${s} cannot be saved at `+`all — saving writes the other ${o.length} and discards ${i.length===1?"that one":"those"}.`,{discardLabel:"Close Without Saving",saveLabel:i.length===0?"Save All":`Save ${o.length} of ${a.length}`});if(l==="cancel")return!1;if(l==="discard")return!0;for(let c of o)if(!await Ip(c))return!1;return!0}function We(e,t){if(!n(t)||t.trim()==="")return[...e];return[{attributes:{content:t,name:"description"},tagName:"meta"},...e]}function ze(e,t,a){let r=e.doc.content.frontmatter,i=xh(e.documentPath,t),o=i?.schema,s=o?.properties,l=new Set(o?.required||[]),c=[];if(s){for(let[d,f]of Object.entries(s)){if(a.has(d))continue;c.push({entry:f,field:d,value:r[d]})}for(let[d,f]of Object.entries(r)){if(s[d]||d.startsWith("$")||a.has(d))continue;c.push({entry:{type:Ze(f)?"boolean":"string"},field:d,value:f})}}else for(let[d,f]of Object.entries(r)){if(d.startsWith("$")||a.has(d))continue;c.push({entry:{type:Ze(f)?"boolean":"string"},field:d,value:f})}return{collection:i,fields:c,hasSchema:Boolean(s),requiredFields:l}}function B(e){return n(e)?e:""}function ca(e){return{checked:!1,hasNote:!1,hasThumb:!1,isSet:!1,kind:"text",label:e,note:"",options:[],placeholder:"",thumb:"",value:""}}function Ue(e,t,a,r,i){let o=e.replaceAll(/([A-Z])/g," $1").replace(/^./,(d)=>d.toUpperCase()),s=ca(o+(r.has(e)?" *":""));s.isSet=a!==void 0&&a!==""&&a!==!1;let l=(d)=>String(d)||void 0,c=Vu(t);if(c!==null){let d=B(a),f=rT(c,i.rerender);if(s.kind="select",s.value=d,f===null)return s.options=[{label:"Loading…",value:d}],{parse:l,row:s};if("error"in f)return s.kind="text",s.hasNote=!0,s.note=`Could not list ${c} entries — ${f.error}`,{parse:l,row:s};let b=d!==""&&!f.ids.includes(d);if(s.options=[{label:"—",value:""},...b?[{label:`${d} — not found`,value:d}]:[],...f.ids.map((x)=>({label:x,value:x}))],f.ids.length===0)s.hasNote=!0,s.note=`No ${c} entries yet.`;return{parse:l,row:s}}if(t.type==="boolean")return s.kind="boolean",s.checked=Boolean(a),{parse:(d)=>d===!0?!0:void 0,row:s};if(t.type==="array")return s.value=Array.isArray(a)?a.join(", "):B(a),s.placeholder="comma, separated",{parse:(d)=>{let f=String(d);return f?f.split(",").map((b)=>b.trim()).filter(Boolean):void 0},row:s};if(Array.isArray(t.enum))return s.kind="select",s.value=B(a),s.options=[{label:"—",value:""},...t.enum.map((d)=>({label:d,value:d}))],{parse:l,row:s};if(Ra(t.format)){let d=B(a);return s.kind="media",s.value=d,s.hasThumb=d!==""&&oa.has(At(d)),s.thumb=s.hasThumb?Xc(d):"",{parse:l,row:s}}if(t.type==="number")return s.kind="number",s.value=a===void 0?"":String(a),{parse:(d)=>{let f=String(d).trim(),b=Number(f);return f===""||Number.isNaN(b)?void 0:b},row:s};return s.value=B(a),s.placeholder=t.format==="date"?"YYYY-MM-DD":"",{parse:l,row:s}}var Be="https://fonts.googleapis.com/css2?",Ge=["https://fonts.googleapis.com","https://fonts.gstatic.com"];function ew(e){return e?.tagName==="link"&&e.attributes?.rel==="stylesheet"&&n(e.attributes.href)&&e.attributes.href.startsWith(Be)}function Te(e){return e?.tagName==="link"&&e.attributes?.rel==="preconnect"&&n(e.attributes.href)&&Ge.includes(e.attributes.href)}function vD(e){let t=e.match(/family=([^&:]+)/);if(!t)return"";return decodeURIComponent(t[1].replaceAll("+"," "))}function yD(e){return`${Be}family=${encodeURIComponent(e).replaceAll("%20","+")}&display=swap`}function wD(e){for(let t of Ge)if(!e.some((r)=>r?.tagName==="link"&&r.attributes?.rel==="preconnect"&&r.attributes.href===t)){let r={href:t,rel:"preconnect"};if(t==="https://fonts.gstatic.com")r.crossorigin="";e.push({attributes:r,tagName:"link"})}}function xD(e){if(!e.some((a)=>ew(a)))return e.filter((a)=>!Te(a));return e}var qe={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPanelPage",$description:"The Inspector's Page tab (specs/studio.md §6), the former Navigator Page panel: everything the open document says about itself before anybody reads its body — its frontmatter, the layout it is poured into, its title, description, viewport and icon, its OpenGraph card, and the raw `$head` tags no structured control owns. ONE row vocabulary across the first four sections, told apart by `kind`, because a Title, a Layout picker and a schema-driven frontmatter field differ in what they COMMIT rather than in what they look like — and what they commit is `panels/head-panel.ts`'s decision, reached by the row's `key`. Nothing here knows what a `$head` entry is, which of them are managed, what a content collection is or that a page has a layout: the flow hands over sections whose every field is already a string and this draws them. The Custom Tags section is the one different shape — a read-only list plus the form that adds to it — because those rows are markup a reader is being SHOWN rather than a value they are editing.",tagName:"div",attributes:{part:"page"},style:{$description:"The eleven `.imports-*` and four `.head-*` rules in `styles/panels.css` plus the row vocabulary the panel used to borrow from `styles/inspector.css` (`.style-row`, `.style-row-label`, `.set-dot`) and `styles/overlays.css` (`.media-picker`, `.media-picker-thumb`). The borrowed ones are TRANSCRIBED rather than shared, because a document emits no class, so a class cannot style it, and the lit panels that still draw a `.style-row` go on owning those rules until they convert. Four token repairs travel with them. `--spectrum-font-size-50` resolved only inside `<sp-theme>` and a document is mounted outside it, so every rule that read it would silently have taken its 11px fallback and stopped following the theme; each is `--jx-text-sm` here, and the two bare `10px` literals are `--jx-text-xs`. `.imports-count` read `--text-hint`, a name NO stylesheet in this package defines — an unresolvable custom property makes the whole declaration invalid at computed-value time, so the count has been inheriting its colour rather than taking the one written for it, and it says `--fg-dim`, which is what it was drawing anyway. And `.head-section-body .style-row > sp-textfield` reached INSIDE another component to widen it, which a part cannot do and no longer has to: `[part=\"widget\"]` is the field itself. Two things changed on purpose. THE CLEAR DOT IS A BUTTON — it was a `<span>` with a click handler and no role, so a row's only route to clearing its value could not be reached from the keyboard at all. AND THE ADD FORM IS STATE, not three `ref()` handles read at submit time: a document binding writes only when the scope moves, so the flow states what each field holds and clearing one after a successful add is a real change the runtime carries back.",display:"block",overflowY:"auto",padding:"var(--jx-space-2)",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="section"]':{marginBottom:"var(--jx-space-4)"},'& [part="section-header"]':{$description:'The uppercase band every section opens with. It is the only thing that ever styled a section title, which is why `[part="title"]` carries no declaration of its own: the weight, the size, the colour and the letter-spacing are all inherited from here.',display:"flex",alignItems:"center",gap:"6px",padding:"6px 8px 2px",fontSize:"var(--jx-text-sm)",fontWeight:"600",color:"var(--fg-dim)",textTransform:"uppercase",letterSpacing:"0.5px"},'& [part="count"]':{fontWeight:"400",color:"var(--fg-dim)"},'& [part="seo-button"]':{$description:"The door to Search appearance, pushed to the right edge of the band so the section still reads as a heading and the button as its affordance. The band's own uppercasing and tracking stop here: this is a sentence, not a heading.",marginLeft:"auto",textTransform:"none",letterSpacing:"normal"},'& [part="body"]':{padding:"0 var(--jx-space-2)"},'& [part="row"]':{$description:"studio-ui-guidelines.md §4.1's standard form row, stacked: the label sits above a control that takes the whole width. `min-width: 0` is what keeps it honest in a 240px dock (studio-ui-guidelines.md §4.6) — a field refuses to shrink below its own min-content without it.",display:"flex",flexDirection:"column",alignItems:"stretch",gap:"2px",padding:"2px 0",minWidth:"0"},'& [part="row-label"]':{display:"flex",alignItems:"center",gap:"4px",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="chip"]':{$description:"studio-ui-guidelines.md §4.2's set dot: a 6px accent dot, drawn only where the value is set on this document, that clears it when pressed. A real `button` — it is pressable, and it is the row's only keyboard route to clearing — stripped of the chrome a button brings so the row still reads as a label with a dot beside it.",width:"6px",height:"6px",padding:"0",border:"none",borderRadius:"50%",background:"var(--accent)",cursor:"pointer",flexShrink:"0"},'& [part="chip"]:hover':{background:"var(--danger)"},'& [part="chip"]:focus-visible':{outline:"var(--jx-focus-ring)",outlineOffset:"2px"},'& [part="row-name"]':{$description:"The visible label, `aria-hidden` in the markup: every control in the row carries the same words as its own accessible name, so a label node in the tree as well would have each field announced twice. That is the trade the kit's naming makes — a control names itself — and it is also why this row needs no minted ids.",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="widget"]':{width:"100%",minWidth:"0"},'& [part="readout"]':{$description:"A derived value set as text in the field's place, monospaced because a URL is read character by character.",display:"block",padding:"2px 0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--font-mono, monospace)",fontSize:"var(--jx-text-sm)"},'& [part="row-action"]':{alignSelf:"flex-start"},'& [part="note"]':{$description:"What the row could not find out — the entries of a referenced collection that is empty, or the reason listing it failed. A sentence under the control, in the row's own label size, so it reads as part of the field rather than as an error banner.",margin:"0",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="media"]':{display:"flex",alignItems:"center",gap:"4px",minWidth:"0"},'& [part="media"] [part="widget"]':{flex:"1",minWidth:"0"},'& [part="thumb"]':{width:"24px",height:"24px",objectFit:"cover",borderRadius:"var(--radius)",border:"1px solid var(--border)",flexShrink:"0"},'& [part="list"]':{padding:"0 var(--jx-space-2)"},'& [part="tag-row"]':{display:"flex",alignItems:"center",gap:"4px",padding:"3px var(--jx-space-2)",borderRadius:"var(--radius)",fontSize:"var(--jx-text-sm)"},'& [part="tag-row"]:hover':{background:"var(--hover-bg)"},'& [part="tag-name"]':{fontWeight:"500",whiteSpace:"nowrap"},'& [part="tag-value"]':{$description:"What the tag says. It takes the row's slack and ellipses rather than wrapping, because a row is a line and a wrapped value would push the remove button off the one the eye is on. The `title` beside it is what makes the full text readable when it does.",flex:"1",minWidth:"0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--font-mono, monospace)",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="empty"]':{$description:"The compact teaching state, drawn here rather than by `panels/empty-state.ts`: that helper is a lit template, and a surface is a document or a lit template and never a mix. It keeps the compact variant's shape — left-aligned, above the add form that IS its action, so it offers no button of its own (empty-state rule 2's stated exception).",margin:"0",padding:"var(--jx-space-3) var(--jx-space-4)",maxWidth:"34ch",lineHeight:"1.5",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="add"]':{display:"flex",alignItems:"center",gap:"4px",padding:"var(--jx-space-2)"},'& [part="add"] [part="field"]':{flex:"1",minWidth:"0"},'& [part="tag-picker"]':{minWidth:"70px"}},children:[{$prototype:"Array",items:{$ref:"#/state/sections"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"section","data-section":"${$map.item.key}"},children:[{tagName:"div",attributes:{part:"section-header"},children:[{tagName:"span",attributes:{part:"title"},textContent:"${$map.item.title}"},{tagName:"div",attributes:{part:"seo-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasSeo"},cases:{true:{tagName:"jx-action-button",attributes:{part:"seo-button"},$props:{size:"sm",quiet:!0,label:"Search appearance",hint:"Preview how this page appears in search and when shared"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openSeo"},value:[]}]},children:[{tagName:"span",textContent:"Search appearance…"}]}}}]},{tagName:"div",attributes:{part:"body"},children:[{$prototype:"Array",items:{$ref:"$map/item/rows"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"row","data-prop":"${$map.item.prop}"},children:[{tagName:"div",attributes:{part:"row-label"},children:[{tagName:"div",attributes:{part:"chip-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/isSet"},cases:{true:{tagName:"button",attributes:{part:"chip",type:"button",title:"${$map.item.clearLabel}","aria-label":"${$map.item.clearLabel}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clear"},value:[{$ref:"$map/item/key"}]}]}}}},{tagName:"span",attributes:{part:"row-name","aria-hidden":"true"},textContent:"${$map.item.label}"}]},{tagName:"div",attributes:{part:"widget-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{text:{tagName:"jx-textfield",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",placeholder:{$ref:"$map/item/placeholder"},value:{$ref:"$map/item/value"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},textarea:{tagName:"jx-textfield",attributes:{part:"widget"},$props:{size:"sm",multiline:!0,rows:3,label:"${$map.item.label}",placeholder:{$ref:"$map/item/placeholder"},value:{$ref:"$map/item/value"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},number:{tagName:"jx-number-field",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",value:{$ref:"$map/item/value"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setNumber"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},boolean:{tagName:"jx-checkbox",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",checked:{$ref:"$map/item/checked"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setBoolean"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/checked"}]}]}},readout:{$description:"A value the document derives rather than stores, such as a page's URL, which is its file's place under `pages/`. Shown, never edited here: an editable URL would be a rename, and a rename is the file tree's.",tagName:"output",attributes:{part:"readout","aria-label":"${$map.item.label}"},textContent:"${$map.item.value}"},select:{tagName:"jx-select",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setChoice"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},media:{tagName:"div",attributes:{part:"media"},children:[{tagName:"div",attributes:{part:"thumb-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasThumb"},cases:{true:{tagName:"img",attributes:{part:"thumb",src:"${$map.item.thumb}",alt:""}}}},{tagName:"jx-textfield",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",placeholder:"/image.jpg",value:{$ref:"$map/item/value"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"jx-action-button",attributes:{part:"upload"},$props:{size:"sm",quiet:!0,icon:"upload-simple",label:"Upload media",hint:"Upload media"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/upload"},value:[{$ref:"$map/item/key"}]}]}},{tagName:"jx-action-button",attributes:{part:"browse"},$props:{size:"sm",quiet:!0,icon:"image",label:"Browse media",hint:"Browse media"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/browse"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]}}]}}},{tagName:"div",attributes:{part:"action-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasAction"},cases:{true:{$description:"The row's one door elsewhere, named for what it opens: the Layout row's Edit template opens the layout in Design.",tagName:"jx-button",attributes:{part:"row-action"},$props:{size:"sm",variant:"secondary"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runRowAction"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"${$map.item.action}"}]}}},{tagName:"div",attributes:{part:"note-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasNote"},cases:{true:{tagName:"p",attributes:{part:"note"},textContent:"${$map.item.note}"}}}]}}]}]}},{tagName:"div",attributes:{part:"section","data-section":"custom"},children:[{tagName:"div",attributes:{part:"section-header"},children:[{tagName:"span",attributes:{part:"title"},textContent:"Custom Tags"},{tagName:"span",attributes:{part:"count"},textContent:"${state.customCount}"}]},{tagName:"div",attributes:{part:"custom-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/customState"},cases:{empty:{tagName:"p",attributes:{part:"empty"},textContent:"Custom tags add your own meta, link and script elements to this page — analytics, verification, a webfont. Add one below."},listed:{tagName:"div",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/customEntries"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"tag-row","data-tag":"${$map.item.key}"},children:[{tagName:"span",attributes:{part:"tag-name",title:"${$map.item.value}"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"tag-value"},textContent:"${$map.item.value}"},{tagName:"jx-action-button",attributes:{part:"remove"},$props:{icon:"x",size:"sm",quiet:!0,label:"${$map.item.removeLabel}",hint:"Remove"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/removeEntry"},value:[{$ref:"$map/item/key"}]}]}}]}}]}}},{tagName:"div",attributes:{part:"add","data-add":"tag"},children:[{tagName:"jx-select",attributes:{part:"tag-picker","data-field":"tag"},$props:{size:"sm",label:"Tag",options:{$ref:"#/state/tagOptions"},value:{$ref:"#/state/addTag"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editTag"},value:[{$ref:"event#/target/value"}]}]}},{tagName:"jx-textfield",attributes:{part:"field","data-field":"attr"},$props:{size:"sm",label:"Attribute",placeholder:"Attribute (e.g. name)",value:{$ref:"#/state/addAttr"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editAttr"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/addEntry"},value:[]}]}}]}},{tagName:"jx-textfield",attributes:{part:"field","data-field":"value"},$props:{size:"sm",label:"Value",placeholder:"Value",value:{$ref:"#/state/addValue"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editValue"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/addEntry"},value:[]}]}}]}},{tagName:"jx-action-button",attributes:{part:"add-button","data-add":"tag"},$props:{icon:"plus",size:"sm",quiet:!0,label:"Add tag",hint:"Add tag"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/addEntry"},value:[]}]}}]}]}]};E("panel-page",qe);function Ke(e,t){e.sections=t.sections,e.customCount=t.customCount,e.customState=t.customState,e.customEntries=t.customEntries,e.addTag=t.addTag,e.addAttr=t.addAttr,e.addValue=t.addValue,e.tagOptions=t.tagOptions}function ua(){return{addAttr:"",addTag:"",addValue:"",customCount:"0",customEntries:[],customState:"empty",sections:[],tagOptions:[]}}var G=new WeakMap;function Ye(e,t,a){let r=G.get(e);if(r&&(r.handle===null||r.handle.root.isConnected)){Ke(r.scope,t);return}r?.handle?.dispose(),e.textContent="";let i=g({...ua(),...a});Ke(i,t);let o={handle:null,scope:i};G.set(e,o),R("panel-page",i,e).then((s)=>{if(G.get(e)!==o){s.dispose();return}o.handle=s})}function de(e){let t=G.get(e);if(!t)return;G.delete(e),t.handle?.dispose(),e.textContent=""}var Xe={$schema:"https://jxsuite.com/schema/v1",$id:"StudioEmptyState",$description:"The one empty-state pattern (studio-ui-guidelines.md §11), as the document every region draws it from. Nine surfaces had already copied it into their own JSON — the Source Control panel's (since folded into `publish-workspace.json`), `logic-panel.json`, `panel-outline.json` and the rest each carry a `[part=\"empty\"]` block written from the same rules — because `panels/empty-state.ts` is a lit template a document cannot call. This is the copy those were waiting for: the region that has NO document of its own hands its box to this one instead of rendering the helper, so a shell with three surfaces still lit and eight converted has one empty state rather than two. The copy rules stay where they are stated, in `panels/empty-state.ts`'s header: one sentence saying what the region is FOR, the action that fills it, and one shared verb across equivalent surfaces. Nothing here decides any of them — the adapter is handed a message, an optional second sentence and a list of buttons, and this draws exactly that.",tagName:"div",attributes:{part:"empty","data-compact":"${state.compact ? '' : null}"},style:{$description:"What `.empty-state`, `.empty-state--teach`, `.empty-state-message`, `.empty-state-detail`, `.empty-state-actions`, `.empty-state-action` and the `--compact` pair said across `styles/overlays.css` and `styles/panels.css`, keyed on `part`. Neither stylesheet loses its rules: `ui/expression-editor.ts` still renders the lit helper for its own compact state, so this is a copy until that surface converts. Two values did not travel. `.empty-state`'s `font-size: 13px` was a number nothing else in the shell uses and is the kit's `--jx-text-md`; `.empty-state-detail`'s `var(--spectrum-font-size-50, 11px)` resolves only inside `<sp-theme>`, and a document mounted into a Navigator body or a canvas stage is outside it, so it would silently have taken its hard-coded fallback on every paint — it is `--jx-text-sm`, which is the step it was.",display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-6)",textAlign:"center",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)",'& [part="empty-message"]':{margin:"0",maxWidth:"34ch",lineHeight:"1.5"},'& [part="empty-detail"]':{$description:"The second sentence: where the region's content comes from. Dimmer than the first, because the first is the one a reader has to take in.",margin:"0",maxWidth:"34ch",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",opacity:"0.8"},'& [part="empty-actions"]':{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:"var(--jx-space-3)"},'& [part="empty-action"]':{flex:"none"},"&[data-compact]":{$description:"An inline section inside an otherwise populated panel — tighter and left-aligned, because it sits directly above its own add form rather than filling a region on its own.",alignItems:"flex-start",gap:"var(--jx-space-2)",padding:"var(--jx-space-3) var(--jx-space-4)",textAlign:"left",fontSize:"var(--jx-text-sm)"},'&[data-compact] [part="empty-actions"]':{justifyContent:"flex-start"}},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:"${state.message}"},{tagName:"div",attributes:{part:"empty-detail-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasDetail"},cases:{true:{tagName:"p",attributes:{part:"empty-detail"},textContent:"${state.detail}"}}},{tagName:"div",attributes:{part:"empty-actions-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasActions"},cases:{true:{tagName:"div",attributes:{part:"empty-actions"},children:[{$prototype:"Array",items:{$ref:"#/state/actions"},key:{$ref:"$map/item/id"},map:{tagName:"jx-button",attributes:{part:"empty-action"},$props:{size:"sm",variant:"secondary",disabled:{$ref:"$map/item/disabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runAction"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]}}}]};E("empty-state",Xe);function fa(e){let t=document.createElement("div");t.style.display="contents";let a=[],r=g({...Qe(e),runAction:(s)=>{a[Number(s)]?.()}});a=et(e);let i=null,o=!1;return R("empty-state",r,t).then((s)=>{if(o){s.dispose();return}i=s}),{dispose(){o=!0,i?.dispose(),i=null,t.replaceChildren()},host:t,update(s){a=et(s),Object.assign(r,Qe(s))}}}function Qe(e){let t=e.actions??[];return{actions:t.map((a,r)=>({disabled:Boolean(a.disabled),id:String(r),label:a.label})),compact:Boolean(e.compact),detail:e.detail??"",hasActions:t.length>0,hasDetail:(e.detail??"")!=="",message:e.message}}function et(e){return(e.actions??[]).map((t)=>t.run)}var tt=new WeakMap;function Pu(e,t){let a=tt.get(e);if(a)return a.update(t),a.host;let r=fa(t);return tt.set(e,r),r.host}var at={$schema:"https://jxsuite.com/schema/v1",$id:"StudioEntryInspector",$description:"The Inspector's Entry tab (specs/studio.md §6, §22.5): one collection entry's own settings while it is written on the canvas, the Content-Entry board's sidebar. Its status (draft or published), its fields as the collection's schema types them, the URL its collection page publishes it at, and the file it is stored in. `content/entry-inspector.ts` keeps every decision; the field form is an island it fills, `ui/schema-form.ts`'s, the same form the form-only entry editor draws.",tagName:"div",attributes:{part:"entry","data-jx-region":"${state.region}"},style:{$description:"A column of sections, each a small uppercase heading over its rows, like the Page tab beside it.",display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",padding:"var(--jx-space-3)",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="section"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="section-title"]':{margin:"0",fontSize:"var(--jx-text-sm)",fontWeight:"700",letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--fg-dim)"},'& [part="head"]':{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:"var(--jx-space-2)"},'& [part="kind"]':{fontWeight:"600"},'& [part="status"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="status"][data-draft="true"]':{color:"var(--warning)"},'& [part="note"]':{margin:"0",fontSize:"var(--jx-text-sm)",lineHeight:"1.5",color:"var(--fg-dim)"},'& [part="url"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",wordBreak:"break-all"},'& [part="path"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",color:"var(--fg)",wordBreak:"break-all"},'& [part="fields-head"]':{display:"flex",alignItems:"center",justifyContent:"space-between"}},children:[{tagName:"section",attributes:{part:"section","aria-labelledby":"entry-inspector-entry"},children:[{tagName:"div",attributes:{part:"head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"entry-inspector-entry"},textContent:"Entry"},{tagName:"span",attributes:{part:"status","data-draft":"${state.draft ? 'true' : 'false'}"},textContent:"${state.status}"}]},{tagName:"span",attributes:{part:"kind"},textContent:"${state.kind}"},{tagName:"div",attributes:{part:"draft-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/draftAxis"},cases:{shown:{$description:"The entry's draft state, the one field every collection with a draft workflow shares (site-architecture.md §7.6). A setter: the switch names the state it reaches.",tagName:"jx-switch",attributes:{part:"draft"},$props:{checked:{$ref:"#/state/draft"},hint:"${state.draftHint}",size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setDraft"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"Draft"}]}}}]},{tagName:"section",attributes:{part:"section","aria-labelledby":"entry-inspector-fields"},children:[{tagName:"div",attributes:{part:"fields-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"entry-inspector-fields"},textContent:"Fields"},{tagName:"jx-action-button",attributes:{part:"edit-fields"},$props:{size:"sm",quiet:!0,hint:"Edit this collection's fields in Project Settings",haspopup:"dialog"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFields"},value:[]}]},children:[{tagName:"span",textContent:"Edit"}]}]},{tagName:"div",attributes:{part:"fields-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/fieldsState"},cases:{form:{tagName:"div",attributes:{part:"fields"}},none:{tagName:"p",attributes:{part:"note"},textContent:"This collection declares no fields. Edit adds some in Project Settings."}}}]},{tagName:"section",attributes:{part:"section","aria-labelledby":"entry-inspector-page"},children:[{tagName:"div",attributes:{part:"fields-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"entry-inspector-page"},textContent:"Page"},{$description:"The door to Search appearance, the same `document.openSeo` the Page tab's button runs: an entry's search title, description and social image are its frontmatter too (studio.md §4.2).",tagName:"jx-action-button",attributes:{part:"seo-button"},$props:{size:"sm",quiet:!0,label:"Search appearance",hint:"Preview how this entry appears in search and when shared",haspopup:"dialog"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openSeo"},value:[]}]},children:[{tagName:"span",textContent:"Search appearance…"}]}]},{tagName:"div",attributes:{part:"url-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/urlState"},cases:{shown:{tagName:"code",attributes:{part:"url"},textContent:"${state.url}"},none:{tagName:"p",attributes:{part:"note"},textContent:"Entries of this collection have no page of their own."},unlisted:{$description:"The collection has a page, but the page lists the ids it publishes (`$paths.values`) and this entry is not one of them: naming a URL the build never writes would be a link to nothing.",tagName:"p",attributes:{part:"note"},textContent:"Not published: this collection's page lists the entries it publishes, and this is not one of them."},loading:{tagName:"p",attributes:{part:"note"},textContent:"Finding the page this entry is published at…"}}},{tagName:"p",attributes:{part:"note"},children:[{tagName:"span",textContent:"Stored as "},{tagName:"code",attributes:{part:"path"},textContent:"${state.path}"},{tagName:"span",textContent:"${state.storage}"}]}]}]};E("entry-inspector",at);function ga(e,t){e.region=t.region,e.kind=t.kind,e.status=t.status,e.draftAxis=t.draftAxis,e.draft=t.draft,e.draftHint=t.draftHint,e.fieldsState=t.fieldsState,e.urlState=t.urlState,e.url=t.url,e.path=t.path,e.storage=t.storage}function ba(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function rt(e,t,a,r){e.replaceChildren();let i=g({...t,...a}),o=null,s=!1,l=R("entry-inspector",i,e,{onNodeCreated:(c,d,f)=>{if(!s&&c instanceof HTMLElement&&ba(f)==="fields")r.fieldsSlot(c)}}).then((c)=>{if(s)c.dispose();else o=c;return c});return{attached:()=>{if(s)return!1;let c=o?.root;return c===void 0?!0:e.contains(c)},dispose(){s=!0,o?.dispose(),o=null},ready:l,update:(c)=>ga(i,c)}}var ya="inspector/entry";function ot(e){let t=Gn(e?.documentPath);return t!==null&&!t.fileBacked}function st(e){let t=e.documentPath??"",r=Gn(t)?.name??"",i=Sa(r),o=Ul(e),s=jc(i?.schema,o),l=Jl(o),c=r===""?null:sh(r,zc(t)),d=c?bC(c,t,o):null,f=t.endsWith(".json");return{draft:l,draftAxis:s?"shown":"hidden",draftHint:Tp,fieldsState:i?.schema?"form":"none",kind:Ub(Ql(r)?.item??"entry"),path:t,region:ya,status:s?l?"Draft":"Published":"",storage:f?". Its fields are the file itself.":". Fields are its frontmatter, and the body is its Markdown.",url:d??"",urlState:c===void 0?"loading":d?"shown":c?"unlisted":"none"}}var y=null;function lt(e,t){let a=Sa(Gn(t.documentPath)?.name??"");if(!e.formHost||!a?.schema)return;let r=Ul(t),i=Gl("entry-inspector",gT(a.schema,a.schema,r),r,{context:fT(t),errors:mT(a,r),onChange:(o)=>xS(t,o),rerender:e.redraw,ui:pT(a.schema)});if(i.parentNode!==e.formHost)e.formHost.replaceChildren(i)}function it(e,t){let a=st(t);if(a.fieldsState==="none")e.formHost=null;e.handle.update(a),lt(e,t)}function q(e){if(!y||e!==void 0&&y.host!==e)return;y.unlisten(),y.scope.stop(),y.handle.dispose(),y=null}function dt(e,t){if(y&&y.host===e&&y.tabId===t.id&&y.handle.attached()){it(y,t);return}q();let a=me(),r=()=>{if(y===i)it(i,t)},i={formHost:null,handle:rt(e,st(t),{openFields:()=>{let o=Gn(t.documentPath)?.name;nt("settings.open",o?{entry:o,section:"content"}:{section:"content"},"Entry")},openSeo:()=>{nt("document.openSeo",void 0,"Entry")},setDraft:(o)=>Tb(t,o)},{fieldsSlot:(o)=>{if(y===i)i.formHost=o,lt(i,t)}}),host:e,redraw:r,scope:a,tabId:t.id,unlisten:Ap(r)};y=i,a.run(()=>{te(()=>{t.doc.document,t.doc.content.frontmatter,C?.projectConfig?.content,r()})})}var O=null;async function bE(){try{O=(await p().listDirectory("layouts")).filter((a)=>a.type==="file"&&a.name.endsWith(".json")).map((a)=>({name:a.name.replace(/\.json$/,"").replaceAll(/[-_]+/g," ").replaceAll(/\b\w/g,(r)=>r.toUpperCase()),path:`./layouts/${a.name}`}))}catch{O=[]}return O}async function va(){await bE(),wn("rightPanel","seoModal")}function tw(){O=null,Ma()}function xa(){if(O===null)va();return O}var nw=[{attr:"name",key:"description",label:"Description"},{attr:"name",key:"viewport",label:"Viewport"}],iw=[{attr:"property",key:"og:title",label:"Title"},{attr:"property",key:"og:description",label:"Description",multiline:!0},{attr:"property",key:"og:image",label:"Image",media:!0},{attr:"property",key:"og:type",label:"Type"}],ct=new Set([...nw,...iw].map((e)=>e.key)),pt=new Set(["title"]);function wa(e){return He(e)?new Set([...pt,"description"]):pt}function vE(e){let t=ow(e.$head??[],"name","description");if(t)return String(t.attributes?.content??"");return n(e.description)?e.description:""}function V_(e,t){if(!ow(e.$head??[],"name","description")&&n(e.description)){if(t)e.description=t;else delete e.description;return}rw(e,"name","description",t)}function ow(e,t,a){return e.find((r)=>r?.tagName==="meta"&&r.attributes?.[t]===a)}function yE(e,t){return e.find((a)=>a?.tagName==="link"&&a.attributes?.rel===t)}function $a(e){if(!e?.tagName)return!1;if(e.tagName==="meta"){let t=String(e.attributes?.name??""),a=String(e.attributes?.property??"");return Boolean(t&&ct.has(t))||Boolean(a&&ct.has(a))}if(e.tagName==="link"&&e.attributes?.rel==="icon")return!0;return!1}function rw(e,t,a,r){if(!e.$head)e.$head=[];let i=e.$head.findIndex((o)=>o?.tagName==="meta"&&o.attributes?.[t]===a);if(r){let o={attributes:{[t]:a,content:r},tagName:"meta"};if(i!==-1)e.$head[i]=o;else e.$head.push(o)}else if(i!==-1)e.$head.splice(i,1)}function U_(e,t,a){if(!e.$head)e.$head=[];let r=e.$head.findIndex((i)=>i?.tagName==="link"&&i.attributes?.rel===t);if(a){let i={attributes:{href:a,rel:t},tagName:"link"};if(r!==-1)e.$head[r]=i;else e.$head.push(i)}else if(r!==-1)e.$head.splice(r,1)}function Ta(e){if(!e?.tagName)return"unknown";let t=e.attributes??{};if(t.name)return`<meta name="${String(t.name)}">`;if(t.property)return`<meta property="${String(t.property)}">`;if(t.rel&&t.href)return`<link rel="${String(t.rel)}">`;if(t.src)return`<script src="${String(t.src)}">`;if(t.charset)return`<meta charset="${String(t.charset)}">`;return`<${e.tagName}>`}function ka(e){let t=e?.attributes??{};return String(t.content??t.href??t.src??e?.textContent??"")}var yt="Jx Site",vt={donor:null,source:"none",value:""};function ke(e,t,a){let r=null;for(let i of e)if(i?.tagName==="meta"&&i.attributes?.[t]===a)r=String(i.attributes.content??"");return r}function K(e,t,a){let r=ke(e.page,t,a);if(r!==null)return{donor:null,source:"page",value:r};let i=ke(e.layout,t,a);if(i!==null)return{donor:e.layoutName??"the layout",source:"layout",value:i};let o=ke(e.site,t,a);if(o!==null)return{donor:"Site head",source:"site",value:o};return vt}function Ea(e,t){let a=e.trim();if(a)return{donor:null,source:"page",value:a};let r=t?.trim();if(r)return{donor:"Site name",source:"site",value:r};return{donor:"the build",source:"build",value:yt}}function Pa(e,t){let a=e??"",r=a.split("/").filter((s)=>s!=="");if(!t||e===null)return{crumb:a||"/",host:"",href:null};let i;try{i=new URL(a,t)}catch{return{crumb:a||"/",host:"",href:null}}let{host:o}=i;return{crumb:[o,...r].join(" › "),host:o,href:i.href}}var xt=new Map([["description",160],["og:description",200],["og:title",60],["title",60]]),Na=new Intl.Segmenter("en-US",{granularity:"grapheme"});function wE(e){let t=0;for(let a of Na.segment(e))t+=1;return t}var ut="Search appearance";function CD(e,t){yl((a)=>a.source===ut);for(let a of e.warnings){let r={action:"document.openSeo",key:`seo.${a.id}`,source:ut,tier:"problem"};if(t!==void 0)r.path=t;w.warn(a.message,r)}return e.warnings.length}function lb(e,t){return e.fields.find((a)=>a.key===t)??{...vt,key:t,label:t,limit:xt.get(t)??null}}function Ha(e){return[...e.site,...e.layout,...e.page].some((t)=>t?.tagName==="title")}function Ia(e,t){let a=[],r=(o)=>e.fields.find((s)=>s.key===o);if(r("title")?.source==="build")a.push({field:"title",id:"title-missing",message:`Neither this page nor the project names a title, so the build ships “${yt}”.`});if(r("description")?.value.trim()==="")a.push({field:"description",id:"description-missing",message:"No description reaches this page from the site, its layout or the page itself — a "+"result row shows whatever text the engine picks instead."});if(r("og:title")?.value.trim()==="")a.push({field:"og:title",id:"og-title-missing",message:"No og:title — a shared link carries no headline of its own."});if(r("og:description")?.value.trim()==="")a.push({field:"og:description",id:"og-description-missing",message:"No og:description — a shared link carries no summary of its own."});if(r("og:image")?.value.trim()==="")a.push({field:"og:image",id:"og-image-missing",message:"No og:image — a shared link renders as a text-only card."});for(let o of e.fields){let s=wE(o.value);if(o.limit!==null&&s>o.limit){let l=o.key.endsWith("description")?"summaries":"headlines";a.push({field:o.key,id:`${o.key}-long`,message:`${o.label} is ${s} characters; ${l} are cut near ${o.limit}.`})}}if(e.url.href===null)a.push({field:"url",id:"site-url-missing",message:"Project Settings names no site URL, so the build emits no canonical link and no og:url."});if(Ha(t))a.push({field:"title",id:"head-title-ignored",message:"A <title> element in $head is discarded — the build writes the title from the "+"document's own title property."});return a}function ja(e,t){let a=(s,l,c)=>({...c,key:s,label:l,limit:xt.get(s)??null}),r=[a("title","Title",Ea(t.pageTitle,t.siteName)),a("description","Description",K(e,"name","description")),a("og:title","Social title",K(e,"property","og:title")),a("og:description","Social description",K(e,"property","og:description")),a("og:image","Social image",K(e,"property","og:image")),a("og:type","Social type",K(e,"property","og:type"))],i=Pa(t.route,t.siteUrl),o={fields:r,url:i};return{...o,warnings:Ia(o,e)}}var Pe=null,Ne=[],Y=null;function Ma(){Pe=null,Ne=[],Y=null}async function Ca(e){if(Y===e)return;Y=e;let t=await Sx(e);if(Y!==e)return;Y=null,Pe=e,Ne=t?.$head??[],wn("seoModal")}function wt(e){return e.replace(/^\.\//,"").replace(/^layouts\//,"").replace(/\.json$/,"").replaceAll(/[-_/]+/g," ").replaceAll(/\b\w/g,(t)=>t.toUpperCase())||e}function Fa(e,t){let a=He(e)?hl(t):null;if(a===null)return{entries:[],name:null};let r=wt(a);if(a===Pe)return{entries:Ne,name:r};return Ca(a),{entries:[],name:r}}function xE(e,t){let a=C?.projectConfig,r=Fa(e,t.$layout),i=e?.documentPath,o={pageTitle:n(t.title)?t.title:"",route:i?cm(i):null};if(a?.name!==void 0)o.siteName=a.name;if(a?.url!==void 0)o.siteUrl=a.url;return ja({layout:r.entries,layoutName:r.name,page:We(t.$head??[],t.description),site:a?.$head??[]},o)}function He(e){let t=e?.documentPath;return Boolean(t&&C?.isSiteProject&&(t.startsWith("pages/")||t.startsWith("./pages/")))}function q_(e,t){let a={...e};if(t.title!==void 0)a.title=t.title;if(n(t.description))a.description=t.description;if(n(t.$layout)||t.$layout===!1)a.$layout=t.$layout;if(t.$head!==void 0)a.$head=t.$head;return a}function _E(e,t,a){if(!e)return;let r=e.doc.content.frontmatter,i=q_({},r).$head,o={};if(n(r.title))o.title=r.title;if(n(r.description))o.description=r.description;if(i)o.$head=[...i];if(n(r.$layout)||r.$layout===!1)o.$layout=r.$layout;a(o);let s=o.$head&&o.$head.length>0?o.$head:void 0,l=o.$layout!==r.$layout,c=o.title!==r.title,d=n(r.description)&&o.description!==r.description,f=JSON.stringify(s)!==JSON.stringify(i);if(l||c||d||f)Z(e,(b)=>{if(l)Qd(b,"$layout",n(o.$layout)||o.$layout===!1?o.$layout:void 0);if(c)Qd(b,"title",o.title);if(d)Qd(b,"description",n(o.description)?o.description:void 0);if(f)Qd(b,"$head",s)});t()}var k=null,N=null,ue="meta",Q="",ee="",S=new Map,Ie=new Map;function Aa(e){let t=e?.documentPath?cm(e.documentPath):null;if(t===null)return null;return{...j("__url","url","URL"),kind:"readout",value:t}}var Ee=new Map,D=new Map,Oa=[{label:"meta",value:"meta"},{label:"link",value:"link"},{label:"script",value:"script"}];function j(e,t,a){return{action:"",checked:!1,clearLabel:`Clear ${t}`,hasAction:!1,hasNote:!1,hasThumb:!1,isSet:!1,key:e,kind:"text",label:a,note:"",options:[],placeholder:"",prop:t,thumb:"",value:""}}function $t(e,t){e.hasThumb=t!==""&&oa.has(At(t)),e.thumb=e.hasThumb?Xc(t):""}function La(e,t){let a=n(e.title)?e.title:"";return S.set("title",{images:!1,clear:()=>t((r)=>{delete r.title}),commit:(r)=>t((i)=>{let o=String(r).trim();if(o)i.title=o;else delete i.title})}),{...j("title","title","Title"),clearLabel:"Clear title",isSet:Boolean(a),placeholder:"Page title…",value:a}}function mt(e,t,a){let r=String(ow(t,e.attr,e.key)?.attributes?.content??""),i=`meta:${e.attr}:${e.key}`;S.set(i,{images:e.media===!0,clear:()=>a((s)=>rw(s,e.attr,e.key,"")),commit:(s)=>a((l)=>rw(l,e.attr,e.key,e.media?String(s):String(s).trim()))});let o=j(i,e.key,e.label);if(o.isSet=Boolean(r),o.value=r,e.media)return o.kind="media",$t(o,r),o;return o.kind=e.multiline?"textarea":"text",o.placeholder=e.key==="viewport"?"width=device-width, initial-scale=1":`${e.label}…`,o}function Da(e,t){let a=vE(e),r="meta:name:description";S.set("meta:name:description",{images:!1,clear:()=>t((o)=>V_(o,"")),commit:(o)=>t((s)=>V_(s,String(o).trim()))});let i=j("meta:name:description","description","Description");return i.isSet=Boolean(a),i.value=a,i.kind="text",i.placeholder="Description…",i}function _a(e,t){let a=String(yE(e,"icon")?.attributes?.href??"");S.set("link:icon",{images:!0,clear:()=>t((i)=>U_(i,"icon","")),commit:(i)=>t((o)=>U_(o,"icon",String(i)))});let r=j("link:icon","icon","Icon");return r.isSet=Boolean(a),r.kind="media",r.value=a,$t(r,a),r}function Ja(e,t,a){if(!He(e))return null;let r=xa();if(r===null)return null;let i=t.$layout,o=C?.projectConfig?.defaults?.layout,s=o?wt(o):"";S.set("__layout",{images:!1,clear:()=>a((d)=>{delete d.$layout}),commit:(d)=>{let f=String(d);a((b)=>{if(f==="__default__")delete b.$layout;else if(f==="__none__")b.$layout=!1;else b.$layout=f}),pO()}});let l=j("__layout","layout","Layout");l.kind="select",l.isSet=i!==void 0,l.options=[{label:s?`Default (${s})`:"Default",value:"__default__"},{label:"None",value:"__none__"},...r.map((d)=>({label:d.name,value:d.path}))],l.value=i===!1?"__none__":i||"__default__";let c=hl(i);if(c)l.action="Edit template",l.hasAction=!0,Ie.set("__layout",()=>{(ce("t07yqqej"),import("./files-t07yqqej.js")).then(({openFileInTab:d})=>d(c.replace(/^\.\//,"")))});return{hasSeo:!1,key:"layout",rows:[l],title:"Layout"}}function Va(e){if(!e||e.doc.mode!=="content")return null;let{collection:t,fields:a,hasSchema:r,requiredFields:i}=ze(e,C?.projectConfig,wa(e));if(a.length===0&&!r)return null;return{hasSeo:!1,key:"frontmatter",rows:a.map((s)=>{let l=`fm:${s.field}`,{parse:c,row:d}=Ue(s.field,s.entry,s.value,i,{rerender:L});return S.set(l,{images:d.kind==="media"&&s.entry.format==="image",clear:()=>Z(e,(f)=>Qd(f,s.field)),commit:(f)=>Z(e,(b)=>Qd(b,s.field,c(f)))}),Object.assign(j(l,s.field,d.label),d,{clearLabel:`Clear ${s.field}`})}),title:t?`Frontmatter (${t.name})`:"Frontmatter"}}function Wa(e){Ee.clear();let t=[];for(let a of e){if($a(a)||ew(a)||Te(a))continue;let r=`tag:${t.length}`;Ee.set(r,a);let i=Ta(a);t.push({key:r,label:i,removeLabel:`Remove ${i}`,value:ka(a)})}return t}function za(e){S.clear(),Ie.clear();let t=h.value,a=e.document,r=a.$head??[],i=[],o=Va(t);if(o)i.push(o);let s=Ja(t,a,e.applyMutation);if(s)i.push(s);let l=Aa(t);i.push({hasSeo:!0,key:"page",rows:[La(a,e.applyMutation),...l?[l]:[],...nw.map((d)=>d.key==="description"?Da(a,e.applyMutation):mt(d,r,e.applyMutation)),_a(r,e.applyMutation)],title:"Page"},{hasSeo:!1,key:"opengraph",rows:iw.map((d)=>mt(d,r,e.applyMutation)),title:"OpenGraph"});let c=Wa(r);return{addAttr:Q,addTag:ue,addValue:ee,customCount:String(c.length),customEntries:c,customState:c.length===0?"empty":"listed",sections:i,tagOptions:Oa}}function L(){if(!k||!N)return;Ye(k,za(N),Ga)}function ft(){for(let{timer:e}of D.values())clearTimeout(e);D.clear()}function X(e){let t=D.get(e);if(t)clearTimeout(t.timer),D.delete(e)}function pe(e,t){X(e),S.get(e)?.commit(t)}function Ua(){let e=N,t=Q.trim(),a=ee.trim();if(!e||!t||!a)return;let r=ue||"meta";Q="",ee="",L();let i={attributes:{},tagName:r};if(r==="meta")i.attributes={content:a,name:t};else if(r==="link")i.attributes={href:a,rel:t};else if(r==="script")i.attributes={[t]:a};e.applyMutation((o)=>{if(!o.$head)o.$head=[];o.$head.push(i)}),e.rerender()}function Ba(e){let t=N,a=Ee.get(e);if(!t||!a)return;t.applyMutation((r)=>{if(!r.$head)return;let i=r.$head.indexOf(a);if(i!==-1)r.$head.splice(i,1)}),t.rerender()}var ht=null;function gt(){return ht??=(ce("s41ngdfr"),import("./media-picker-s41ngdfr.js")),ht}var Ga={addEntry:Ua,browse:(e,t)=>{X(e),gt().then((a)=>{if(t instanceof HTMLElement)a.showMediaPickerPopover(t,(r)=>{S.get(e)?.commit(r)},{images:S.get(e)?.images??!0})})},clear:(e)=>{X(e),S.get(e)?.clear()},commitText:(e,t)=>pe(e,t),editAttr:(e)=>{Q=e,L()},editText:(e,t)=>{X(e);let a=()=>{D.delete(e),S.get(e)?.commit(t)};D.set(e,{commit:a,timer:setTimeout(a,tf)})},editTag:(e)=>{ue=e,L()},editValue:(e)=>{ee=e,L()},openSeo:()=>{ae()?.run("document.openSeo")},removeEntry:Ba,runRowAction:(e)=>{Ie.get(e)?.()},setBoolean:(e,t)=>pe(e,t),setChoice:(e,t)=>pe(e,t),setNumber:(e,t)=>pe(e,t),upload:(e)=>{X(e),gt().then((t)=>{t.pickAndUpload((a)=>{S.get(e)?.commit(a)})})}};function qa(e,t){if(e!==k)ue="meta",Q="",ee="",ft();if(t.document!==N?.document)ft();k=e,N=t,L()}function SE(e){if(!e)return"Document";if(e.startsWith("pages/"))return"Page";if(e.startsWith("layouts/"))return"Template";if(e.startsWith("components/"))return"Component";let t=Gn(e);return t&&!t.fileBacked?"Entry":"Document"}var Ka="A component has no page settings: its title, search and social details come from the page that uses it.";function Ya(e){return{actions:[{label:"Edit tag and props",run:()=>{vl(e,{selection:[[]],ui:{rightTab:"properties"}})}}],detail:"Its tag name and the props it takes are set on its root element.",message:Ka}}var kD="Open a page to edit its title, description and social preview.",I=null;function CE(e){if(I&&I!==e){if(q(I),de(I),k===I)k=null,N=null}I=e,sw()}function sw(){let e=I;if(!e)return;let t=h.value;if(!t||ot(t)){if(de(e),k===e)k=null,N=null;if(t)dt(e,t);else q(e);return}if(q(e),SE(t.documentPath)==="Component"){if(de(e),k===e)k=null,N=null;let r=Pu(e,Ya(t));if(e.firstChild!==r||e.childNodes.length!==1)e.replaceChildren(r);return}let a=t.doc.mode==="content";qa(e,{applyMutation:a?(r)=>_E(h.value,sw,r):(r)=>{Yd(h.value,r)},document:a?q_(t.doc.document,t.doc.content.frontmatter):t.doc.document,rerender:sw})}
4
- export{ew,vD,yD,wD,xD,sb,fE,Nc,_D,mE,Mu,SD,cm,$d,ab,gE,Pu,bE,tw,nw,iw,vE,V_,ow,yE,rw,U_,wE,CD,lb,xE,q_,_E,SE,kD,CE,sw};
5
-
6
- //# debugId=8E3A3F4E5831B1DE64756E2164756E21
7
- //# sourceMappingURL=studio-s9fng7m8.js.map
@@ -1,5 +0,0 @@
1
- import{xh}from"./studio-yrcrncev.js";import{Rb}from"./studio-e7vjyp04.js";import{C}from"./studio-4f7thq0p.js";import{n,_}from"./studio-k3we3kqb.js";function PT(){return Object.keys(C?.projectConfig?.content??{})}function Sa(e){let t=Rb(e);if(!t)return null;if(/\.[a-z\d]+$/i.test(t.dir))return null;return{def:t.def,dir:t.dir,ext:t.ext,name:t.name,schema:t.def.schema??null}}function Bw(){return PT().map((e)=>Sa(e)).filter((e)=>e!==null)}function Fc(e){let t=xh(e??null,C?.projectConfig);return t?Sa(t.name):null}function PN(e){let t=xh(e??null,C?.projectConfig),r=t?Rb(t.name):null;if(!t||!r)return null;return{def:r.def,dir:r.dir,ext:r.ext,name:r.name,schema:t.schema}}function c(e){if(e===null||!_(e))return e;return JSON.parse(JSON.stringify(e))}function u(e){if(n(e.$ref))return"";switch(e.type){case"boolean":return!1;case"integer":case"number":return 0;case"array":return[];case"object":return FT(e);default:return""}}function FT(e){let t=e?.properties;if(!t)return{};let r=new Set(Array.isArray(e.required)?e.required:[]),o={};for(let[i,l]of Object.entries(t))if(l.default!==void 0)o[i]=c(l.default);else if(r.has(i))o[i]=u(l);return o}function FN(e,t){return(Array.isArray(e?.required)?e.required:[]).filter((o)=>t[o]===void 0)}
2
- export{PT,Sa,Bw,Fc,PN,FT,FN};
3
-
4
- //# debugId=4648C6745ACF5D3064756E2164756E21
5
- //# sourceMappingURL=studio-wgc54sxf.js.map
@@ -1,5 +0,0 @@
1
- import{ja}from"./studio-3qr08sxq.js";var t=ja(null);function jO(e){t.value=e}function ae(){return t.value}
2
- export{jO,ae};
3
-
4
- //# debugId=FD3E2412AC5C8C1564756E2164756E21
5
- //# sourceMappingURL=studio-wqfaqw4m.js.map