@homepages/concrete 12.0.0 → 13.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/CHANGELOG.md +192 -0
  2. package/README.md +8 -10
  3. package/codemods/fixtures-are-data.mjs +7 -0
  4. package/codemods/fixtures-list-properties.mjs +6 -0
  5. package/codemods/manifest.json +15 -0
  6. package/codemods/steps/fixtures-list-properties.mjs +16 -0
  7. package/codemods/steps/fixtures-to-data.mjs +41 -0
  8. package/dist/artifact/playground/client/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
  9. package/dist/artifact/playground/client/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
  10. package/dist/artifact/playground/client/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
  11. package/dist/artifact/playground/client/assets/index-Bmvcss4B.js +1338 -0
  12. package/dist/artifact/playground/client/assets/index-C01UCAWD.css +1 -0
  13. package/dist/artifact/playground/client/index.html +2 -2
  14. package/dist/artifact/playground/client/island-canvas-host.mjs +1 -1
  15. package/dist/artifact/playground/host.mjs +110 -59
  16. package/dist/base.css +2 -2
  17. package/dist/cli/build/icons.js +1 -1
  18. package/dist/cli/build/index.js +11 -10
  19. package/dist/cli/build/manifest.js +44 -0
  20. package/dist/cli/build/record.js +123 -0
  21. package/dist/cli/build/sections.js +28 -18
  22. package/dist/cli/build/source.js +1 -1
  23. package/dist/cli/build/static.js +8 -5
  24. package/dist/cli/build/template-build.js +614 -0
  25. package/dist/cli/check/analyze.js +18 -1
  26. package/dist/cli/check/load-workspace.js +2 -2
  27. package/dist/cli/check/portable-names.js +1 -1
  28. package/dist/cli/check/render/corpus.js +119 -0
  29. package/dist/cli/check/render/invariants.js +1 -0
  30. package/dist/cli/check/stages/bundles.js +15 -18
  31. package/dist/cli/check/stages/composition.js +8 -25
  32. package/dist/cli/check/stages/fixtures.js +14 -10
  33. package/dist/cli/check/stages/logic.js +7 -23
  34. package/dist/cli/check/stages/render.js +12 -14
  35. package/dist/cli/check/stages/sections.js +22 -66
  36. package/dist/cli/check/stages/stylesheet.js +4 -26
  37. package/dist/cli/check/stages/workspace.js +27 -22
  38. package/dist/cli/commands.js +51 -23
  39. package/dist/cli/currency/preamble.js +1 -1
  40. package/dist/cli/currency/resolve-latest.js +3 -2
  41. package/dist/cli/dev/capture-browser.js +26 -0
  42. package/dist/cli/dev/fixture-schema.js +441 -0
  43. package/dist/cli/dev/folder-files.js +244 -0
  44. package/dist/cli/dev/index.js +7 -3
  45. package/dist/cli/dev/playground-server.js +34 -0
  46. package/dist/cli/dev/section-ladders.js +76 -0
  47. package/dist/cli/dev/server.js +120 -304
  48. package/dist/cli/install/background.js +16 -0
  49. package/dist/cli/install/index.js +45 -0
  50. package/dist/cli/install/tools.js +27 -0
  51. package/dist/cli/media/derive.js +19 -13
  52. package/dist/cli/media/deriver-plugin.js +14 -3
  53. package/dist/cli/property/fixture-list.js +46 -0
  54. package/dist/cli/property/index.js +12 -9
  55. package/dist/cli/property/library.js +12 -10
  56. package/dist/cli/publish/artifact.js +90 -0
  57. package/dist/cli/publish/captures.js +61 -0
  58. package/dist/cli/publish/fixtures.js +17 -0
  59. package/dist/cli/publish/index.js +10 -18
  60. package/dist/cli/{build → publish}/playground.js +3 -3
  61. package/dist/cli/publish/report.js +15 -33
  62. package/dist/cli/upgrade/codemod.d.ts +14 -0
  63. package/dist/cli/upgrade/fixture-conversion.d.ts +11 -0
  64. package/dist/cli/upgrade/fixture-conversion.js +54 -0
  65. package/dist/cli/upgrade/fixture-modules.js +125 -0
  66. package/dist/cli/upgrade/fixtures-to-data.d.ts +40 -0
  67. package/dist/cli/upgrade/fixtures-to-data.js +498 -0
  68. package/dist/cli/upgrade/index.js +18 -2
  69. package/dist/cli/upgrade/legacy-fixtures.d.ts +34 -0
  70. package/dist/cli/upgrade/legacy-fixtures.js +22 -0
  71. package/dist/cli/upgrade/stage.js +1 -1
  72. package/dist/cli/workspace-fixtures.js +80 -0
  73. package/dist/cli.js +1 -0
  74. package/dist/css/compile.js +9 -3
  75. package/dist/fixtures/bundle-rule.js +16 -16
  76. package/dist/fixtures/media-plugin.js +12 -33
  77. package/dist/fixtures/synthesize-empties.js +3 -2
  78. package/dist/index.d.ts +7 -7
  79. package/dist/{playground-island-runtime.d.ts → island-runtime.d.ts} +1 -2
  80. package/dist/{playground-island-runtime.js → island-runtime.js} +1 -2
  81. package/dist/islands/client-module.js +1 -1
  82. package/dist/{cli/dev → islands}/tsconfig-paths.js +2 -14
  83. package/dist/islands/wrap.js +40 -0
  84. package/dist/node_modules/.pnpm/acorn@8.18.0/node_modules/acorn/dist/acorn.js +5119 -0
  85. package/dist/packages/external/concrete/package.js +1 -1
  86. package/dist/packages/internal/bundle-evaluation/dist/cache.js +36 -0
  87. package/dist/packages/internal/bundle-evaluation/dist/evaluate.js +174 -0
  88. package/dist/packages/internal/bundle-evaluation/dist/index.js +5 -0
  89. package/dist/packages/internal/bundle-evaluation/dist/section-code.js +10 -0
  90. package/dist/packages/internal/capture-settle/dist/index.js +2 -2
  91. package/dist/packages/internal/capture-settle/dist/settle.js +88 -13
  92. package/dist/packages/internal/code-fingerprint/dist/index.js +57 -0
  93. package/dist/packages/internal/content-doc-ops/dist/index.js +176 -0
  94. package/dist/packages/internal/content-doc-ops/dist/made-rows.js +15 -0
  95. package/dist/packages/internal/deliverable-reads/dist/bootstrap.js +81 -0
  96. package/dist/packages/internal/deliverable-reads/dist/display.js +21 -0
  97. package/dist/packages/internal/deliverable-reads/dist/format.js +15 -0
  98. package/dist/packages/internal/deliverable-reads/dist/index.js +7 -0
  99. package/dist/packages/internal/deliverable-reads/dist/pages.js +29 -0
  100. package/dist/packages/internal/deliverable-reads/dist/requirements.js +72 -0
  101. package/dist/{cli/capture → packages/internal/download-files/dist}/bundle.js +8 -4
  102. package/dist/packages/internal/download-files/dist/capture-origin.js +126 -0
  103. package/dist/packages/internal/download-files/dist/capture-routes.js +139 -0
  104. package/dist/packages/internal/download-files/dist/capture-shell.js +38 -0
  105. package/dist/packages/internal/download-files/dist/capture.js +74 -0
  106. package/dist/packages/internal/download-files/dist/egress-watch.js +38 -0
  107. package/dist/packages/internal/download-files/dist/files.js +7 -0
  108. package/dist/packages/internal/download-files/dist/finish.js +35 -0
  109. package/dist/packages/internal/download-files/dist/fleet.js +94 -0
  110. package/dist/packages/internal/download-files/dist/format.js +40 -0
  111. package/dist/packages/internal/download-files/dist/make.js +105 -0
  112. package/dist/packages/internal/download-files/dist/master-tally.js +32 -0
  113. package/dist/packages/internal/download-files/dist/names.js +24 -0
  114. package/dist/packages/internal/download-files/dist/pdf-boxes.js +33 -0
  115. package/dist/packages/internal/download-files/dist/pdf-image-placements.js +194 -0
  116. package/dist/packages/internal/download-files/dist/pdf-images.js +289 -0
  117. package/dist/packages/internal/file-store/dist/files.js +8 -0
  118. package/dist/packages/internal/file-store/dist/lru.js +40 -0
  119. package/dist/packages/internal/file-store/dist/refusal.js +12 -0
  120. package/dist/packages/internal/file-store/dist/trees.js +151 -0
  121. package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +1 -1
  122. package/dist/packages/internal/fill-bake/dist/compute-reads.js +47 -21
  123. package/dist/packages/internal/fill-bake/dist/index.js +5 -1
  124. package/dist/packages/internal/fill-bake/dist/item-merge.js +4 -3
  125. package/dist/packages/internal/fill-bake/dist/resolve-instance.js +9 -0
  126. package/dist/packages/internal/fill-bake/dist/resolve.js +3 -0
  127. package/dist/packages/internal/fill-bake/dist/round-trip.js +2 -0
  128. package/dist/packages/internal/fill-bake/dist/strip.js +6 -0
  129. package/dist/packages/internal/fill-vocabulary/dist/holder.js +1 -1
  130. package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +1 -1
  131. package/dist/packages/internal/fill-vocabulary/dist/verbs.js +1 -1
  132. package/dist/packages/internal/island-runtime/dist/index.js +1 -10
  133. package/dist/packages/internal/island-runtime/dist/use-capture-ready.d.ts +5 -0
  134. package/dist/packages/internal/lead-fields/dist/ingest.js +72 -0
  135. package/dist/packages/internal/media-resolution/dist/video.js +6 -2
  136. package/dist/packages/internal/page-render/dist/addresses.js +57 -0
  137. package/dist/packages/internal/page-render/dist/index.js +6 -0
  138. package/dist/packages/internal/page-render/dist/kept.js +30 -0
  139. package/dist/packages/internal/page-render/dist/nav.js +42 -0
  140. package/dist/packages/internal/page-render/dist/render.js +152 -0
  141. package/dist/packages/internal/page-shell/dist/assemble.js +161 -0
  142. package/dist/packages/internal/page-shell/dist/escape.js +10 -0
  143. package/dist/packages/internal/page-shell/dist/frame.js +23 -0
  144. package/dist/packages/internal/page-shell/dist/index.js +26 -0
  145. package/dist/packages/internal/playground/dist/build-fingerprint.js +18 -0
  146. package/dist/packages/internal/playground/dist/fixture-conversions/list-names-properties.js +76 -0
  147. package/dist/packages/internal/playground/dist/fixture-formats.d.ts +37 -0
  148. package/dist/packages/internal/playground/dist/fixture-formats.js +20 -0
  149. package/dist/packages/internal/playground/dist/host/bootstrap.js +108 -0
  150. package/dist/packages/internal/playground/dist/host/built.js +202 -0
  151. package/dist/packages/internal/playground/dist/host/catalog-fixture.js +53 -0
  152. package/dist/packages/internal/playground/dist/host/download.js +34 -0
  153. package/dist/packages/internal/playground/dist/host/env.js +11 -0
  154. package/dist/packages/internal/playground/dist/host/everywhere-saves.js +353 -0
  155. package/dist/packages/internal/playground/dist/host/fixture-addresses.js +52 -0
  156. package/dist/packages/internal/playground/dist/host/fixture-documents.js +494 -0
  157. package/dist/packages/internal/playground/dist/host/fixture-operations.js +364 -0
  158. package/dist/packages/internal/playground/dist/host/fixture-units.js +93 -0
  159. package/dist/{fixtures → packages/internal/playground/dist/host}/image-dimensions.js +1 -1
  160. package/dist/packages/internal/playground/dist/host/leads.js +41 -0
  161. package/dist/packages/internal/playground/dist/host/media-saves.js +309 -0
  162. package/dist/{fixtures → packages/internal/playground/dist/host}/media-store.js +79 -26
  163. package/dist/packages/internal/playground/dist/host/overridable.js +9 -0
  164. package/dist/packages/internal/playground/dist/host/owned-saves.js +203 -0
  165. package/dist/{playground → packages/internal/playground/dist}/host/page-state.js +1 -1
  166. package/dist/packages/internal/playground/dist/host/program.js +54 -0
  167. package/dist/packages/internal/playground/dist/host/property-derive.js +216 -0
  168. package/dist/packages/internal/playground/dist/host/property-saves.js +74 -0
  169. package/dist/{fixtures → packages/internal/playground/dist/host}/property.js +88 -229
  170. package/dist/packages/internal/playground/dist/host/provenance.js +49 -0
  171. package/dist/packages/internal/playground/dist/host/resolve.js +553 -0
  172. package/dist/packages/internal/playground/dist/host/row-images.js +41 -0
  173. package/dist/{fixtures → packages/internal/playground/dist/host}/rows.js +1 -1
  174. package/dist/packages/internal/playground/dist/host/save.js +429 -0
  175. package/dist/packages/internal/playground/dist/host/serve.js +952 -0
  176. package/dist/packages/internal/playground/dist/host/site.js +79 -0
  177. package/dist/packages/internal/playground/dist/host/slots.js +202 -0
  178. package/dist/packages/internal/playground/dist/host/stated-content.js +93 -0
  179. package/dist/packages/internal/playground/dist/host/stored-fixtures.js +135 -0
  180. package/dist/packages/internal/playground/dist/host/violations.js +7 -0
  181. package/dist/packages/internal/playground/dist/jobs/lanes.js +24 -0
  182. package/dist/packages/internal/playground/dist/jobs/memory-queue.js +112 -0
  183. package/dist/packages/internal/playground/dist/jobs/probe.js +37 -0
  184. package/dist/packages/internal/playground/dist/jobs/queue.js +28 -0
  185. package/dist/packages/internal/playground/dist/jobs/runner.js +207 -0
  186. package/dist/packages/internal/playground/dist/layout.js +14 -0
  187. package/dist/packages/internal/playground/dist/platform.js +33 -0
  188. package/dist/packages/internal/playground/dist/server/changes.js +57 -0
  189. package/dist/packages/internal/playground/dist/server/crop.js +47 -0
  190. package/dist/packages/internal/playground/dist/server/derived-files.js +88 -0
  191. package/dist/packages/internal/playground/dist/server/download.js +158 -0
  192. package/dist/{cli/dev → packages/internal/playground/dist/server}/http.js +4 -12
  193. package/dist/packages/internal/playground/dist/server/jobs.js +29 -0
  194. package/dist/{cli/dev → packages/internal/playground/dist/server}/listen.js +4 -11
  195. package/dist/packages/internal/playground/dist/server/playground-server.js +424 -0
  196. package/dist/{cli/dev → packages/internal/playground/dist/server}/request-error.js +1 -1
  197. package/dist/packages/internal/playground/dist/server/size-ladders.js +170 -0
  198. package/dist/packages/internal/playground/dist/server/verification.js +75 -0
  199. package/dist/packages/internal/playground/dist/server/verify-build.js +139 -0
  200. package/dist/packages/internal/playground/dist/wire.js +78 -0
  201. package/dist/packages/internal/property-facts/dist/registry-facts.js +1 -1
  202. package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +1 -1
  203. package/dist/packages/internal/section-contracts/dist/reads-acyclic-contract.js +1 -1
  204. package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +1 -1
  205. package/dist/packages/internal/site-files/dist/head.js +59 -0
  206. package/dist/packages/internal/site-files/dist/index.js +4 -0
  207. package/dist/packages/internal/site-files/dist/site.js +211 -0
  208. package/dist/packages/internal/static-assets-binding/dist/index.js +32 -0
  209. package/dist/packages/internal/static-assets-binding/dist/section-asset-url.js +38 -5
  210. package/dist/packages/internal/template-artifact/dist/asset-mime.js +8 -1
  211. package/dist/packages/internal/template-artifact/dist/build.js +148 -0
  212. package/dist/packages/internal/template-artifact/dist/composition.js +62 -0
  213. package/dist/packages/internal/template-artifact/dist/index.js +2 -2
  214. package/dist/packages/internal/template-artifact/dist/layout.js +48 -12
  215. package/dist/packages/internal/template-artifact/dist/manifest.js +3 -10
  216. package/dist/packages/internal/template-artifact/dist/verify.js +51 -31
  217. package/dist/packages/internal/template-contracts/dist/address-value.js +6 -1
  218. package/dist/packages/internal/template-contracts/dist/content-categories.js +10 -1
  219. package/dist/packages/internal/template-contracts/dist/fact-compute.d.ts +1 -1
  220. package/dist/packages/internal/template-contracts/dist/fact-keys.d.ts +1 -1
  221. package/dist/packages/internal/template-contracts/dist/fact-registry.d.ts +3 -3
  222. package/dist/packages/internal/template-contracts/dist/fact-registry.js +59 -32
  223. package/dist/packages/internal/template-contracts/dist/fill-spec.js +14 -1
  224. package/dist/packages/internal/template-contracts/dist/list.d.ts +3 -3
  225. package/dist/packages/internal/template-contracts/dist/media-candidates.js +67 -2
  226. package/dist/packages/internal/template-contracts/dist/media-offer.js +180 -0
  227. package/dist/packages/internal/template-contracts/dist/object.d.ts +2 -2
  228. package/dist/packages/internal/template-contracts/dist/primitive-descriptors.js +9 -2
  229. package/dist/packages/internal/template-contracts/dist/read-graph.js +36 -2
  230. package/dist/packages/internal/template-contracts/dist/ref-locate.js +16 -1
  231. package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +9 -10
  232. package/dist/packages/internal/template-contracts/dist/registry-facts.js +12 -1
  233. package/dist/packages/internal/template-contracts/dist/registry-graph.js +112 -0
  234. package/dist/packages/internal/template-contracts/dist/registry-shape.js +15 -2
  235. package/dist/packages/internal/template-contracts/dist/require-graph.js +300 -0
  236. package/dist/packages/internal/template-contracts/dist/row-ref.d.ts +3 -3
  237. package/dist/packages/internal/template-contracts/dist/row.d.ts +3 -3
  238. package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +1 -1
  239. package/dist/{schema → packages/internal/template-contracts/dist}/section-nav.d.ts +1 -1
  240. package/dist/packages/internal/template-contracts/dist/slot-builders.d.ts +4 -4
  241. package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +3 -1
  242. package/dist/packages/internal/template-contracts/dist/slot-catalog.js +24 -1
  243. package/dist/packages/internal/template-contracts/dist/slot-overrides.js +26 -1
  244. package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +1 -1
  245. package/dist/packages/internal/template-contracts/dist/slot-types.js +1 -1
  246. package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +1 -1
  247. package/dist/packages/internal/template-contracts/dist/table-members.js +7 -2
  248. package/dist/packages/internal/template-contracts/dist/video-value.d.ts +1 -1
  249. package/dist/packages/internal/upload-formats/dist/heic.js +35 -0
  250. package/dist/packages/internal/upload-formats/dist/index.js +80 -0
  251. package/dist/packages/internal/upload-formats/dist/magic-bytes.js +293 -0
  252. package/dist/platform/paths.js +1 -0
  253. package/dist/platform/process.js +49 -1
  254. package/dist/rules/registry.js +27 -3
  255. package/dist/schema/fact.d.ts +2 -2
  256. package/dist/schema/facts-view.d.ts +1 -1
  257. package/dist/schema/section-props.d.ts +1 -1
  258. package/dist/schema/section-schema.d.ts +1 -1
  259. package/dist/schema/section-schema.js +1 -0
  260. package/dist/section/declare.d.ts +1 -1
  261. package/dist/section/discovery.js +6 -2
  262. package/dist/section/publish-shape.js +38 -0
  263. package/dist/section/section.d.ts +1 -1
  264. package/dist/template/define-template.d.ts +14 -4
  265. package/dist/template/define-template.js +2 -0
  266. package/dist/template/logic-shim.d.ts +1 -1
  267. package/dist/template/materialize.js +1 -1
  268. package/dist/template/running-copy.js +0 -1
  269. package/dist/template/section-reads.js +1 -1
  270. package/guide/reference/cli/INDEX.md +6 -5
  271. package/guide/reference/cli/build.md +10 -8
  272. package/guide/reference/cli/check.md +4 -2
  273. package/guide/reference/cli/dev.md +6 -2
  274. package/guide/reference/cli/install.md +41 -0
  275. package/guide/reference/cli/property-add.md +5 -4
  276. package/guide/reference/cli/property-list.md +2 -2
  277. package/guide/reference/cli/publish.md +5 -5
  278. package/guide/reference/cli/upgrade.md +1 -1
  279. package/guide/reference/rules/INDEX.md +8 -4
  280. package/package.json +14 -30
  281. package/dist/artifact/playground/client/assets/index-BcLGpWLR.js +0 -1266
  282. package/dist/artifact/playground/client/assets/index-CxWPYOH2.css +0 -1
  283. package/dist/cli/build/artifact.js +0 -220
  284. package/dist/cli/build/captures.js +0 -48
  285. package/dist/cli/build/fixtures.js +0 -92
  286. package/dist/cli/capture/capture-browser.js +0 -37
  287. package/dist/cli/capture/capture.js +0 -115
  288. package/dist/cli/check/render/inputs.js +0 -60
  289. package/dist/cli/check/render/nav.js +0 -31
  290. package/dist/cli/dev/crop.js +0 -20
  291. package/dist/cli/dev/fixture-ladders.js +0 -96
  292. package/dist/cli/dev/hmr.js +0 -26
  293. package/dist/cli/dev/islands.js +0 -234
  294. package/dist/cli/dev/load-template.js +0 -52
  295. package/dist/cli/dev/vite.js +0 -114
  296. package/dist/cli/dev/workspace-reader.js +0 -249
  297. package/dist/cli/publish/freshness.js +0 -64
  298. package/dist/fixtures/brand.d.ts +0 -4
  299. package/dist/fixtures/brand.js +0 -8
  300. package/dist/fixtures/load.js +0 -159
  301. package/dist/fixtures/resolve.js +0 -392
  302. package/dist/fixtures.d.ts +0 -429
  303. package/dist/fixtures.js +0 -23
  304. package/dist/packages/internal/canvas-core/dist/island-host.js +0 -62
  305. package/dist/packages/internal/canvas-core/dist/island-shields.js +0 -30
  306. package/dist/playground/canvas-island-host.d.ts +0 -11
  307. package/dist/playground/canvas-island-host.js +0 -29
  308. package/dist/playground/canvas-markers.js +0 -14
  309. package/dist/playground/host/paths.js +0 -8
  310. package/dist/playground/layout.js +0 -17
  311. package/dist/playground/wire.js +0 -28
@@ -1,4 +1,77 @@
1
- var us=/^(\d+(?:\.\d+)?)(in|mm)$/;function yn(e){let t=us.exec(e),[,n,r]=t??[];if(n===void 0||r===void 0)throw new Error(`malformed physical length: "${e}"`);let o=Number.parseFloat(n);return r==="mm"?o/25.4:o}function Xe(e){if(typeof e.width=="number"&&typeof e.height=="number")return{frameWidth:e.width,frameHeight:e.height,bleed:0,viewportWidth:e.width,viewportHeight:e.height,deviceScaleFactor:1,pixelWidth:e.width,pixelHeight:e.height,pointWidth:e.width/96*72,pointHeight:e.height/96*72,bleedPoints:0};let t=e,n=yn(t.width),r=yn(t.height),o=t.bleed===void 0?0:yn(t.bleed),i=n*96,s=r*96,a=o*96,l=i+2*a,d=s+2*a,f=t.dpi/96;return{frameWidth:i,frameHeight:s,bleed:a,viewportWidth:l,viewportHeight:d,deviceScaleFactor:f,pixelWidth:Math.round(l*f),pixelHeight:Math.round(d*f),pointWidth:(n+2*o)*72,pointHeight:(r+2*o)*72,bleedPoints:o*72}}var Ce="concrete-frame";function Ze(e){let t=Xe(e);return{"--frame-w":`${t.frameWidth}px`,"--frame-h":`${t.frameHeight}px`,"--frame-bleed":`${t.bleed}px`}}var $t="data-tr-island",Ur="__trCaptureHolds";var bn=`(function () {
1
+ var w0=Object.defineProperty;var Zt=(e,t)=>{for(var r in t)w0(e,r,{get:t[r],enumerable:!0})};async function Fa(e){let t=await globalThis.crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t),r=>r.toString(16).padStart(2,"0")).join("")}var es="manifest.json",x0="sections",_0="template",$0="static",k0="assets",S0="islands";var hb="client";var Qi=".concrete/build";function sd(e){return`${Qi}/${e}`}function Da(e){return e===Qi||e.startsWith(`${Qi}/`)}function ad(e){return e.startsWith(`${Qi}/`)?e.slice(Qi.length+1):null}var I0=".json";function yb(e){return e.endsWith(I0)}var cd={bundle:"bundle.zip",document:"document.pdf"};var ld="island-canvas-host.mjs",$M={host:"host.mjs",clientShell:`${hb}/index.html`,canvasIslandHost:`${hb}/${ld}`};var ut={schema:"schema.json",fillSpec:"fill-spec.json",readGraph:"read-graph.json",logic:"logic.mjs",renderer:"renderer.mjs"},ts={composition:"composition.json",stylesheet:"template.css",preview:"preview.json",staticAssets:"static-assets.json"},ud=/^(?!\.{1,2}$)[A-Za-z0-9._-]+$/;function vb(e){return ud.test(e)}function bb(e){let t=e.split("/");return t.length===2&&t.every(r=>ud.test(r))}function wb(e){return e!==""&&e.split("/").every(t=>ud.test(t))}function O0(e){return`${x0}/${e}`}function _o(e,t){return`${O0(e)}/${t}`}function ns(e){return`${_0}/${e}`}function R0(e,t){return _o(e,`${S0}/${t}`)}function j0(e){let t=e.lastIndexOf(":");return t<0?e:e.slice(0,t)}function Xi(e){return`${$0}/${e}`}function wr(e){return`${k0}/${e}`}function xb(e){let t=[],r=(a,c)=>{t.push({path:a,filename:c.filename,contentHash:c.content_hash})};r(Xi(e.base_css.filename),e.base_css),r(ns(ts.stylesheet),e.template_css);for(let[a,c]of Object.entries(e.islands))r(R0(j0(a),c.filename),c);e.island_runtime!==null&&r(Xi(e.island_runtime.filename),e.island_runtime);for(let a of Object.values(e.react_vendor??{}))r(Xi(a.filename),a);e.react_vendor_core!==null&&r(Xi(e.react_vendor_core.filename),e.react_vendor_core),e.analytics!==null&&r(Xi(e.analytics.filename),e.analytics);for(let a of Object.values(e.masters))t.push({path:wr(a),filename:a});let{ico:o,svg:n,png:i,apple_touch:s}=e.icons;r(wr(o.filename),o),n!==null&&r(wr(n.filename),n);for(let a of Object.values(i))r(wr(a.filename),a);return r(wr(s.filename),s),t}var g=class extends Error{constructor(r,o){super(o);this.status=r}status};async function dd(e){let t=await e;return t===null?null:{text:t,fingerprint:await Fa(new TextEncoder().encode(t))}}function P0(e){let t=[e.path,..."from"in e?[e.from]:[]].find(Da);if(t!==void 0)throw new g(400,`A save writes no file at "${t}".`);return e}var _b="This playground's store does not list its folders, so it cannot make, rename, duplicate or delete a fixture; do it in the template's files.";function $b(e){let{build:t,store:r}=e,o=new Map,n=c=>{if(t.revision!==void 0)return dd(t.readText(c));let l=o.get(c);if(l===void 0){let u=dd(t.readText(c));u.catch(()=>{o.get(c)===u&&o.delete(c)}),o.set(c,u),l=u}return l},i=0,s=async()=>{let c=r===void 0?"":r.revision===void 0?`#${String(i+=1)}`:await r.revision();return`${t.revision?.()??""}|${c}`},a=c=>({version:c,readText(l){let u=ad(l);return u!==null?n(u):r===void 0||Da(l)?Promise.resolve(null):dd(r.readText(l))},async readBytes(l){let u=ad(l);if(u===null)throw new g(501,_b);if(t.readBytes===void 0)throw new g(501,"This playground's host reads no build file's bytes, so it cannot make a site.");let d=await t.readBytes(u);return d===null?null:{bytes:d,fingerprint:await Fa(d)}},list:()=>Promise.reject(new g(501,_b))});return{files:{current:async()=>a(await s()),async change(c,l){if(r===void 0)throw new g(501,"This playground does not save.");return await r.write(l.map(P0)),{version:await s()}}},fixtures:r!==void 0,async media(c,l){if(Da(l)||r===void 0)return null;let u=await r.mediaFile(l);if(u===null)return null;let d=await r.size?.(l);return typeof d=="number"?{file:u,size:d}:{file:u}},url:t.url,loadModule:e.loadModule,react:e.react,...e.base===void 0?{}:{base:e.base},...e.captures===void 0?{}:{captures:e.captures}}}var b={};Zt(b,{$brand:()=>pd,$input:()=>Fp,$output:()=>zp,NEVER:()=>fd,TimePrecision:()=>Mp,ZodAny:()=>Rg,ZodArray:()=>Tg,ZodBase64:()=>ll,ZodBase64URL:()=>ul,ZodBigInt:()=>Qo,ZodBigIntFormat:()=>pl,ZodBoolean:()=>Xo,ZodCIDRv4:()=>al,ZodCIDRv6:()=>cl,ZodCUID:()=>el,ZodCUID2:()=>tl,ZodCatch:()=>eh,ZodCodec:()=>zs,ZodCustom:()=>Fs,ZodCustomStringFormat:()=>Go,ZodDate:()=>js,ZodDefault:()=>Kg,ZodDiscriminatedUnion:()=>zg,ZodE164:()=>dl,ZodEmail:()=>Yc,ZodEmoji:()=>Xc,ZodEnum:()=>Ko,ZodError:()=>aE,ZodExactOptional:()=>Bg,ZodFile:()=>Vg,ZodFirstPartyTypeKind:()=>ph,ZodFunction:()=>uh,ZodGUID:()=>ks,ZodIPv4:()=>il,ZodIPv6:()=>sl,ZodISODate:()=>Bc,ZodISODateTime:()=>Hc,ZodISODuration:()=>Wc,ZodISOTime:()=>Jc,ZodIntersection:()=>Fg,ZodIssueCode:()=>lE,ZodJWT:()=>fl,ZodKSUID:()=>ol,ZodLazy:()=>ah,ZodLiteral:()=>Zg,ZodMAC:()=>xg,ZodMap:()=>Cg,ZodNaN:()=>nh,ZodNanoID:()=>Qc,ZodNever:()=>Pg,ZodNonOptional:()=>bl,ZodNull:()=>Ig,ZodNullable:()=>Wg,ZodNumber:()=>Yo,ZodNumberFormat:()=>jr,ZodObject:()=>Es,ZodOptional:()=>vl,ZodPipe:()=>As,ZodPrefault:()=>Gg,ZodPreprocess:()=>rh,ZodPromise:()=>lh,ZodReadonly:()=>oh,ZodRealError:()=>rt,ZodRecord:()=>Wo,ZodSet:()=>Lg,ZodString:()=>qo,ZodStringFormat:()=>$e,ZodSuccess:()=>Qg,ZodSymbol:()=>kg,ZodTemplateLiteral:()=>sh,ZodTransform:()=>Hg,ZodTuple:()=>Ng,ZodType:()=>ee,ZodULID:()=>nl,ZodURL:()=>Rs,ZodUUID:()=>Jt,ZodUndefined:()=>Sg,ZodUnion:()=>Ts,ZodUnknown:()=>jg,ZodVoid:()=>Eg,ZodXID:()=>rl,ZodXor:()=>Ag,_ZodString:()=>Gc,_default:()=>qg,_function:()=>d_,any:()=>Zx,array:()=>Ps,base64:()=>Sx,base64url:()=>Ix,bigint:()=>Nx,boolean:()=>$g,catch:()=>th,check:()=>f_,cidrv4:()=>$x,cidrv6:()=>kx,clone:()=>Ke,codec:()=>a_,coerce:()=>mh,config:()=>Pe,core:()=>un,cuid:()=>gx,cuid2:()=>hx,custom:()=>p_,date:()=>Hx,decode:()=>mg,decodeAsync:()=>hg,describe:()=>m_,discriminatedUnion:()=>Gx,e164:()=>Ox,email:()=>ix,emoji:()=>px,encode:()=>pg,encodeAsync:()=>gg,endsWith:()=>No,enum:()=>hl,exactOptional:()=>Jg,file:()=>r_,flattenError:()=>us,float32:()=>Ax,float64:()=>zx,formatError:()=>ds,fromJSONSchema:()=>x_,function:()=>d_,getErrorMap:()=>dE,globalRegistry:()=>Me,gt:()=>Ht,gte:()=>Ge,guid:()=>sx,hash:()=>Tx,hex:()=>Ex,hostname:()=>Px,httpUrl:()=>fx,includes:()=>Fo,instanceof:()=>h_,int:()=>Kc,int32:()=>Fx,int64:()=>Ux,intersection:()=>Dg,invertCodec:()=>c_,ipv4:()=>wx,ipv6:()=>_x,iso:()=>Jo,json:()=>v_,jwt:()=>Rx,keyof:()=>Bx,ksuid:()=>bx,lazy:()=>ch,length:()=>Or,literal:()=>n_,locales:()=>bs,looseObject:()=>Kx,looseRecord:()=>Xx,lowercase:()=>Ao,lt:()=>Vt,lte:()=>ft,mac:()=>xx,map:()=>Qx,maxLength:()=>Ir,maxSize:()=>Cn,meta:()=>g_,mime:()=>Uo,minLength:()=>ln,minSize:()=>Bt,multipleOf:()=>Mn,nan:()=>s_,nanoid:()=>mx,nativeEnum:()=>t_,negative:()=>zc,never:()=>ml,nonnegative:()=>Dc,nonoptional:()=>Xg,nonpositive:()=>Fc,normalize:()=>Mo,null:()=>Og,nullable:()=>Is,nullish:()=>o_,number:()=>_g,object:()=>Jx,optional:()=>Ss,overwrite:()=>Pt,parse:()=>lg,parseAsync:()=>ug,partialRecord:()=>Yx,pipe:()=>qc,positive:()=>Ac,prefault:()=>Yg,preprocess:()=>b_,prettifyError:()=>Id,promise:()=>u_,property:()=>Nc,readonly:()=>ih,record:()=>Mg,refine:()=>dh,regex:()=>To,regexes:()=>dt,registry:()=>fc,safeDecode:()=>vg,safeDecodeAsync:()=>wg,safeEncode:()=>yg,safeEncodeAsync:()=>bg,safeParse:()=>dg,safeParseAsync:()=>fg,set:()=>e_,setErrorMap:()=>uE,size:()=>Sr,slugify:()=>Vo,startsWith:()=>Do,strictObject:()=>Wx,string:()=>$s,stringFormat:()=>jx,stringbool:()=>y_,success:()=>i_,superRefine:()=>fh,symbol:()=>Cx,templateLiteral:()=>l_,toJSONSchema:()=>Lc,toLowerCase:()=>Lo,toUpperCase:()=>Zo,transform:()=>yl,treeifyError:()=>Sd,trim:()=>Co,tuple:()=>Ug,uint32:()=>Dx,uint64:()=>Mx,ulid:()=>yx,undefined:()=>Lx,union:()=>gl,unknown:()=>Rr,uppercase:()=>zo,url:()=>dx,util:()=>T,uuid:()=>ax,uuidv4:()=>cx,uuidv6:()=>lx,uuidv7:()=>ux,void:()=>Vx,xid:()=>vx,xor:()=>qx});var un={};Zt(un,{$ZodAny:()=>np,$ZodArray:()=>ap,$ZodAsyncError:()=>jt,$ZodBase64:()=>Jf,$ZodBase64URL:()=>Wf,$ZodBigInt:()=>oc,$ZodBigIntFormat:()=>Xf,$ZodBoolean:()=>gs,$ZodCIDRv4:()=>Vf,$ZodCIDRv6:()=>Hf,$ZodCUID:()=>Ef,$ZodCUID2:()=>Tf,$ZodCatch:()=>Sp,$ZodCheck:()=>ke,$ZodCheckBigIntFormat:()=>af,$ZodCheckEndsWith:()=>bf,$ZodCheckGreaterThan:()=>Xa,$ZodCheckIncludes:()=>yf,$ZodCheckLengthEquals:()=>pf,$ZodCheckLessThan:()=>Ya,$ZodCheckLowerCase:()=>gf,$ZodCheckMaxLength:()=>df,$ZodCheckMaxSize:()=>cf,$ZodCheckMimeType:()=>xf,$ZodCheckMinLength:()=>ff,$ZodCheckMinSize:()=>lf,$ZodCheckMultipleOf:()=>of,$ZodCheckNumberFormat:()=>sf,$ZodCheckOverwrite:()=>_f,$ZodCheckProperty:()=>wf,$ZodCheckRegex:()=>mf,$ZodCheckSizeEquals:()=>uf,$ZodCheckStartsWith:()=>vf,$ZodCheckStringFormat:()=>Po,$ZodCheckUpperCase:()=>hf,$ZodCodec:()=>ys,$ZodCustom:()=>Ap,$ZodCustomStringFormat:()=>Gf,$ZodDate:()=>sp,$ZodDefault:()=>xp,$ZodDiscriminatedUnion:()=>up,$ZodE164:()=>Kf,$ZodEmail:()=>Of,$ZodEmoji:()=>jf,$ZodEncodeError:()=>zn,$ZodEnum:()=>gp,$ZodError:()=>ls,$ZodExactOptional:()=>bp,$ZodFile:()=>yp,$ZodFunction:()=>Pp,$ZodGUID:()=>Sf,$ZodIPv4:()=>Cf,$ZodIPv6:()=>Lf,$ZodISODate:()=>Nf,$ZodISODateTime:()=>Df,$ZodISODuration:()=>Mf,$ZodISOTime:()=>Uf,$ZodIntersection:()=>dp,$ZodJWT:()=>qf,$ZodKSUID:()=>Ff,$ZodLazy:()=>Tp,$ZodLiteral:()=>hp,$ZodMAC:()=>Zf,$ZodMap:()=>pp,$ZodNaN:()=>Ip,$ZodNanoID:()=>Pf,$ZodNever:()=>op,$ZodNonOptional:()=>$p,$ZodNull:()=>tp,$ZodNullable:()=>wp,$ZodNumber:()=>rc,$ZodNumberFormat:()=>Yf,$ZodObject:()=>ew,$ZodObjectJIT:()=>cp,$ZodOptional:()=>sc,$ZodPipe:()=>ac,$ZodPrefault:()=>_p,$ZodPreprocess:()=>Op,$ZodPromise:()=>Ep,$ZodReadonly:()=>Rp,$ZodRealError:()=>nt,$ZodRecord:()=>fp,$ZodRegistry:()=>dc,$ZodSet:()=>mp,$ZodString:()=>kr,$ZodStringFormat:()=>_e,$ZodSuccess:()=>kp,$ZodSymbol:()=>Qf,$ZodTemplateLiteral:()=>jp,$ZodTransform:()=>vp,$ZodTuple:()=>ic,$ZodType:()=>Y,$ZodULID:()=>Af,$ZodURL:()=>Rf,$ZodUUID:()=>If,$ZodUndefined:()=>ep,$ZodUnion:()=>hs,$ZodUnknown:()=>rp,$ZodVoid:()=>ip,$ZodXID:()=>zf,$ZodXor:()=>lp,$brand:()=>pd,$constructor:()=>h,$input:()=>Fp,$output:()=>zp,Doc:()=>ms,JSONSchema:()=>nx,JSONSchemaGenerator:()=>Zc,NEVER:()=>fd,TimePrecision:()=>Mp,_any:()=>sm,_array:()=>pm,_base64:()=>jc,_base64url:()=>Pc,_bigint:()=>Qp,_boolean:()=>Yp,_catch:()=>QP,_check:()=>tx,_cidrv4:()=>Oc,_cidrv6:()=>Rc,_coercedBigint:()=>em,_coercedBoolean:()=>Xp,_coercedDate:()=>dm,_coercedNumber:()=>Bp,_coercedString:()=>Np,_cuid:()=>wc,_cuid2:()=>xc,_custom:()=>gm,_date:()=>um,_decode:()=>Za,_decodeAsync:()=>Ha,_default:()=>GP,_discriminatedUnion:()=>UP,_e164:()=>Ec,_email:()=>pc,_emoji:()=>vc,_encode:()=>La,_encodeAsync:()=>Va,_endsWith:()=>No,_enum:()=>HP,_file:()=>mm,_float32:()=>Wp,_float64:()=>Kp,_gt:()=>Ht,_gte:()=>Ge,_guid:()=>ws,_includes:()=>Fo,_int:()=>Jp,_int32:()=>qp,_int64:()=>tm,_intersection:()=>MP,_ipv4:()=>Sc,_ipv6:()=>Ic,_isoDate:()=>Lp,_isoDateTime:()=>Cp,_isoDuration:()=>Vp,_isoTime:()=>Zp,_jwt:()=>Tc,_ksuid:()=>kc,_lazy:()=>rE,_length:()=>Or,_literal:()=>JP,_lowercase:()=>Ao,_lt:()=>Vt,_lte:()=>ft,_mac:()=>Up,_map:()=>ZP,_max:()=>ft,_maxLength:()=>Ir,_maxSize:()=>Cn,_mime:()=>Uo,_min:()=>Ge,_minLength:()=>ln,_minSize:()=>Bt,_multipleOf:()=>Mn,_nan:()=>fm,_nanoid:()=>bc,_nativeEnum:()=>BP,_negative:()=>zc,_never:()=>cm,_nonnegative:()=>Dc,_nonoptional:()=>YP,_nonpositive:()=>Fc,_normalize:()=>Mo,_null:()=>im,_nullable:()=>qP,_number:()=>Hp,_optional:()=>KP,_overwrite:()=>Pt,_parse:()=>Io,_parseAsync:()=>Oo,_pipe:()=>eE,_positive:()=>Ac,_promise:()=>oE,_property:()=>Nc,_readonly:()=>tE,_record:()=>LP,_refine:()=>hm,_regex:()=>To,_safeDecode:()=>Ja,_safeDecodeAsync:()=>Ka,_safeEncode:()=>Ba,_safeEncodeAsync:()=>Wa,_safeParse:()=>Ro,_safeParseAsync:()=>jo,_set:()=>VP,_size:()=>Sr,_slugify:()=>Vo,_startsWith:()=>Do,_string:()=>Dp,_stringFormat:()=>Ho,_stringbool:()=>wm,_success:()=>XP,_superRefine:()=>ym,_symbol:()=>rm,_templateLiteral:()=>nE,_toLowerCase:()=>Lo,_toUpperCase:()=>Zo,_transform:()=>WP,_trim:()=>Co,_tuple:()=>CP,_uint32:()=>Gp,_uint64:()=>nm,_ulid:()=>_c,_undefined:()=>om,_union:()=>DP,_unknown:()=>am,_uppercase:()=>zo,_url:()=>xs,_uuid:()=>mc,_uuidv4:()=>gc,_uuidv6:()=>hc,_uuidv7:()=>yc,_void:()=>lm,_xid:()=>$c,_xor:()=>NP,clone:()=>Ke,config:()=>Pe,createStandardJSONSchemaMethod:()=>Bo,createToJSONSchemaMethod:()=>xm,decode:()=>oj,decodeAsync:()=>sj,describe:()=>vm,encode:()=>rj,encodeAsync:()=>ij,extractDefs:()=>Zn,finalize:()=>Vn,flattenError:()=>us,formatError:()=>ds,globalConfig:()=>xr,globalRegistry:()=>Me,initializeContext:()=>Ln,isValidBase64:()=>Bf,isValidBase64URL:()=>Gb,isValidJWT:()=>Yb,locales:()=>bs,meta:()=>bm,parse:()=>Ma,parseAsync:()=>Ca,prettifyError:()=>Id,process:()=>we,regexes:()=>dt,registry:()=>fc,safeDecode:()=>cj,safeDecodeAsync:()=>uj,safeEncode:()=>aj,safeEncodeAsync:()=>lj,safeParse:()=>Od,safeParseAsync:()=>Rd,toDotPath:()=>jb,toJSONSchema:()=>Lc,treeifyError:()=>Sd,util:()=>T,version:()=>$f});var kb,fd=Object.freeze({status:"aborted"});function h(e,t,r){function o(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let l=s.prototype,u=Object.keys(l);for(let d=0;d<u.length;d++){let f=u[d];f in a||(a[f]=l[f].bind(a))}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let l=r?.Parent?new i:this;o(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var pd=Symbol("zod_brand"),jt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},zn=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(kb=globalThis).__zod_globalConfig??(kb.__zod_globalConfig={});var xr=globalThis.__zod_globalConfig;function Pe(e){return e&&Object.assign(xr,e),xr}var T={};Zt(T,{BIGINT_FORMAT_RANGES:()=>$d,Class:()=>gd,NUMBER_FORMAT_RANGES:()=>_d,aborted:()=>Un,allowsEval:()=>vd,assert:()=>F0,assertEqual:()=>E0,assertIs:()=>A0,assertNever:()=>z0,assertNotEqual:()=>T0,assignProp:()=>Dn,base64ToUint8Array:()=>Ib,base64urlToUint8Array:()=>X0,cached:()=>ko,captureStackTrace:()=>Ua,cleanEnum:()=>Y0,cleanRegex:()=>is,clone:()=>Ke,cloneDef:()=>N0,createTransparentProxy:()=>V0,defineLazy:()=>se,esc:()=>Na,escapeRegex:()=>xt,explicitlyAborted:()=>kd,extend:()=>J0,finalizeIssue:()=>qe,floatSafeRemainder:()=>hd,getElementAtPath:()=>U0,getEnumValues:()=>os,getLengthableOrigin:()=>cs,getParsedType:()=>Z0,getSizableOrigin:()=>as,hexToUint8Array:()=>ej,isObject:()=>_r,isPlainObject:()=>Nn,issue:()=>So,joinValues:()=>v,jsonStringifyReplacer:()=>$o,merge:()=>K0,mergeDefs:()=>cn,normalizeParams:()=>z,nullish:()=>Fn,numKeys:()=>L0,objectClone:()=>D0,omit:()=>B0,optionalKeys:()=>xd,parsedType:()=>j,partial:()=>q0,pick:()=>H0,prefixIssues:()=>tt,primitiveTypes:()=>wd,promiseAllObject:()=>M0,propertyKeyTypes:()=>ss,randomString:()=>C0,required:()=>G0,safeExtend:()=>W0,shallowClone:()=>bd,slugify:()=>yd,stringifyPrimitive:()=>R,uint8ArrayToBase64:()=>Ob,uint8ArrayToBase64url:()=>Q0,uint8ArrayToHex:()=>tj,unwrapMessage:()=>rs});function E0(e){return e}function T0(e){return e}function A0(e){}function z0(e){throw new Error("Unexpected value in exhaustive check")}function F0(e){}function os(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function v(e,t="|"){return e.map(r=>R(r)).join(t)}function $o(e,t){return typeof t=="bigint"?t.toString():t}function ko(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Fn(e){return e==null}function is(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function hd(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}var Sb=Symbol("evaluating");function se(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Sb)return o===void 0&&(o=Sb,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function D0(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Dn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function cn(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function N0(e){return cn(e._zod.def)}function U0(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function M0(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function C0(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Na(e){return JSON.stringify(e)}function yd(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Ua="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function _r(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var vd=ko(()=>{if(xr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Nn(e){if(_r(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(_r(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function bd(e){return Nn(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function L0(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var Z0=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},ss=new Set(["string","number","symbol"]),wd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function xt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ke(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function z(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function V0(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function R(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function xd(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var _d={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},$d={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function H0(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=cn(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=r.shape[a])}return Dn(this,"shape",s),s},checks:[]});return Ke(e,i)}function B0(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=cn(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return Dn(this,"shape",s),s},checks:[]});return Ke(e,i)}function J0(e,t){if(!Nn(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=cn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Dn(this,"shape",i),i}});return Ke(e,n)}function W0(e,t){if(!Nn(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=cn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Dn(this,"shape",o),o}});return Ke(e,r)}function K0(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=cn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Dn(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ke(e,r)}function q0(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=cn(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let l in r){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(let l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return Dn(this,"shape",c),c},checks:[]});return Ke(t,s)}function G0(e,t,r){let o=cn(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(let s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Dn(this,"shape",i),i}});return Ke(t,o)}function Un(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function kd(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function tt(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function rs(e){return typeof e=="string"?e:e?.message}function qe(e,t,r){let o=e.message?e.message:rs(e.inst?._zod.def?.error?.(e))??rs(t?.error?.(e))??rs(r.customError?.(e))??rs(r.localeError?.(e))??"Invalid input",{inst:n,continue:i,input:s,...a}=e;return a.path??(a.path=[]),a.message=o,t?.reportInput&&(a.input=s),a}function as(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function cs(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function j(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function So(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function Y0(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Ib(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function Ob(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function X0(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Ib(t+r)}function Q0(e){return Ob(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ej(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function tj(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var gd=class{constructor(...t){}};var Rb=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,$o,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ls=h("$ZodError",Rb),nt=h("$ZodError",Rb,{Parent:Error});function us(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function ds(e,t=r=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>o({issues:a},[...i,...s.path]));else if(s.code==="invalid_key")o({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")o({issues:s.issues},[...i,...s.path]);else{let a=[...i,...s.path];if(a.length===0)r._errors.push(t(s));else{let c=r,l=0;for(;l<a.length;){let u=a[l];l===a.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(t(s))):c[u]=c[u]||{_errors:[]},c=c[u],l++}}}};return o(e),r}function Sd(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var s,a;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>o({issues:l},[...i,...c.path]));else if(c.code==="invalid_key")o({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")o({issues:c.issues},[...i,...c.path]);else{let l=[...i,...c.path];if(l.length===0){r.errors.push(t(c));continue}let u=r,d=0;for(;d<l.length;){let f=l[d],p=d===l.length-1;typeof f=="string"?(u.properties??(u.properties={}),(s=u.properties)[f]??(s[f]={errors:[]}),u=u.properties[f]):(u.items??(u.items=[]),(a=u.items)[f]??(a[f]={errors:[]}),u=u.items[f]),p&&u.errors.push(t(c)),d++}}};return o(e),r}function jb(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function Id(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${jb(o.path)}`);return t.join(`
2
+ `)}var Io=e=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new jt;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>qe(c,i,Pe())));throw Ua(a,n?.callee),a}return s.value},Ma=Io(nt),Oo=e=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>qe(c,i,Pe())));throw Ua(a,n?.callee),a}return s.value},Ca=Oo(nt),Ro=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new jt;return i.issues.length?{success:!1,error:new(e??ls)(i.issues.map(s=>qe(s,n,Pe())))}:{success:!0,data:i.value}},Od=Ro(nt),jo=e=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>qe(s,n,Pe())))}:{success:!0,data:i.value}},Rd=jo(nt),La=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return Io(e)(t,r,n)},rj=La(nt),Za=e=>(t,r,o)=>Io(e)(t,r,o),oj=Za(nt),Va=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return Oo(e)(t,r,n)},ij=Va(nt),Ha=e=>async(t,r,o)=>Oo(e)(t,r,o),sj=Ha(nt),Ba=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return Ro(e)(t,r,n)},aj=Ba(nt),Ja=e=>(t,r,o)=>Ro(e)(t,r,o),cj=Ja(nt),Wa=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return jo(e)(t,r,n)},lj=Wa(nt),Ka=e=>async(t,r,o)=>jo(e)(t,r,o),uj=Ka(nt);var dt={};Zt(dt,{base64:()=>Hd,base64url:()=>qa,bigint:()=>Yd,boolean:()=>Qd,browserEmail:()=>vj,cidrv4:()=>Zd,cidrv6:()=>Vd,cuid:()=>jd,cuid2:()=>Pd,date:()=>Wd,datetime:()=>qd,domain:()=>xj,duration:()=>Fd,e164:()=>Jd,email:()=>Nd,emoji:()=>Ud,extendedDuration:()=>dj,guid:()=>Dd,hex:()=>_j,hostname:()=>wj,html5Email:()=>gj,httpProtocol:()=>Bd,idnEmail:()=>yj,integer:()=>Xd,ipv4:()=>Md,ipv6:()=>Cd,ksuid:()=>Ad,lowercase:()=>nf,mac:()=>Ld,md5_base64:()=>kj,md5_base64url:()=>Sj,md5_hex:()=>$j,nanoid:()=>zd,null:()=>ef,number:()=>Ga,rfc5322Email:()=>hj,sha1_base64:()=>Oj,sha1_base64url:()=>Rj,sha1_hex:()=>Ij,sha256_base64:()=>Pj,sha256_base64url:()=>Ej,sha256_hex:()=>jj,sha384_base64:()=>Aj,sha384_base64url:()=>zj,sha384_hex:()=>Tj,sha512_base64:()=>Dj,sha512_base64url:()=>Nj,sha512_hex:()=>Fj,string:()=>Gd,time:()=>Kd,ulid:()=>Ed,undefined:()=>tf,unicodeEmail:()=>Pb,uppercase:()=>rf,uuid:()=>$r,uuid4:()=>fj,uuid6:()=>pj,uuid7:()=>mj,xid:()=>Td});var jd=/^[cC][0-9a-z]{6,}$/,Pd=/^[0-9a-z]+$/,Ed=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Td=/^[0-9a-vA-V]{20}$/,Ad=/^[A-Za-z0-9]{27}$/,zd=/^[a-zA-Z0-9_-]{21}$/,Fd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,dj=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Dd=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,$r=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,fj=$r(4),pj=$r(6),mj=$r(7),Nd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,gj=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,hj=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Pb=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,yj=Pb,vj=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,bj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ud(){return new RegExp(bj,"u")}var Md=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Cd=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ld=e=>{let t=xt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Zd=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Vd=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Hd=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,qa=/^[A-Za-z0-9_-]*$/,wj=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,xj=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Bd=/^https?$/,Jd=/^\+[1-9]\d{6,14}$/,Eb="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Wd=new RegExp(`^${Eb}$`);function Tb(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Kd(e){return new RegExp(`^${Tb(e)}$`)}function qd(e){let t=Tb({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${Eb}T(?:${o})$`)}var Gd=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Yd=/^-?\d+n?$/,Xd=/^-?\d+$/,Ga=/^-?\d+(?:\.\d+)?$/,Qd=/^(?:true|false)$/i,ef=/^null$/i;var tf=/^undefined$/i;var nf=/^[^A-Z]*$/,rf=/^[^a-z]*$/,_j=/^[0-9a-fA-F]*$/;function fs(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ps(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var $j=/^[0-9a-fA-F]{32}$/,kj=fs(22,"=="),Sj=ps(22),Ij=/^[0-9a-fA-F]{40}$/,Oj=fs(27,"="),Rj=ps(27),jj=/^[0-9a-fA-F]{64}$/,Pj=fs(43,"="),Ej=ps(43),Tj=/^[0-9a-fA-F]{96}$/,Aj=fs(64,""),zj=ps(64),Fj=/^[0-9a-fA-F]{128}$/,Dj=fs(86,"=="),Nj=ps(86);var ke=h("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),zb={number:"number",bigint:"bigint",object:"date"},Ya=h("$ZodCheckLessThan",(e,t)=>{ke.init(e,t);let r=zb[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Xa=h("$ZodCheckGreaterThan",(e,t)=>{ke.init(e,t);let r=zb[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),of=h("$ZodCheckMultipleOf",(e,t)=>{ke.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):hd(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),sf=h("$ZodCheckNumberFormat",(e,t)=>{ke.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=_d[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=i,r&&(a.pattern=Xd)}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),af=h("$ZodCheckBigIntFormat",(e,t)=>{ke.init(e,t);let[r,o]=$d[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),cf=h("$ZodCheckMaxSize",(e,t)=>{var r;ke.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Fn(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:as(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),lf=h("$ZodCheckMinSize",(e,t)=>{var r;ke.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Fn(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:as(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),uf=h("$ZodCheckSizeEquals",(e,t)=>{var r;ke.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Fn(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:as(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),df=h("$ZodCheckMaxLength",(e,t)=>{var r;ke.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Fn(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=cs(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ff=h("$ZodCheckMinLength",(e,t)=>{var r;ke.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Fn(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=cs(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),pf=h("$ZodCheckLengthEquals",(e,t)=>{var r;ke.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Fn(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=cs(n),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Po=h("$ZodCheckStringFormat",(e,t)=>{var r,o;ke.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),mf=h("$ZodCheckRegex",(e,t)=>{Po.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),gf=h("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=nf),Po.init(e,t)}),hf=h("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=rf),Po.init(e,t)}),yf=h("$ZodCheckIncludes",(e,t)=>{ke.init(e,t);let r=xt(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),vf=h("$ZodCheckStartsWith",(e,t)=>{ke.init(e,t);let r=new RegExp(`^${xt(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),bf=h("$ZodCheckEndsWith",(e,t)=>{ke.init(e,t);let r=new RegExp(`.*${xt(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function Ab(e,t,r){e.issues.length&&t.issues.push(...tt(r,e.issues))}var wf=h("$ZodCheckProperty",(e,t)=>{ke.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>Ab(n,r,t.property));Ab(o,r,t.property)}}),xf=h("$ZodCheckMimeType",(e,t)=>{ke.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),_f=h("$ZodCheckOverwrite",(e,t)=>{ke.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var ms=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
3
+ `).filter(s=>s),n=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
4
+ `))}};var $f={major:4,minor:4,patch:3};var Y=h("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=$f;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(s,a,c)=>{let l=Un(s),u;for(let d of a){if(d._zod.def.when){if(kd(s)||!d._zod.def.when(s))continue}else if(l)continue;let f=s.issues.length,p=d._zod.check(s);if(p instanceof Promise&&c?.async===!1)throw new jt;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,s.issues.length!==f&&(l||(l=Un(s,f)))});else{if(s.issues.length===f)continue;l||(l=Un(s,f))}}return u?u.then(()=>s):s},i=(s,a,c)=>{if(Un(s))return s.aborted=!0,s;let l=n(a,o,c);if(l instanceof Promise){if(c.async===!1)throw new jt;return l.then(u=>e._zod.parse(u,c))}return e._zod.parse(l,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let l=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(u=>i(u,s,a)):i(l,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new jt;return c.then(l=>n(l,o,a))}return n(c,o,a)}}se(e,"~standard",()=>({validate:n=>{try{let i=Od(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Rd(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),kr=h("$ZodString",(e,t)=>{Y.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Gd(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),_e=h("$ZodStringFormat",(e,t)=>{Po.init(e,t),kr.init(e,t)}),Sf=h("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Dd),_e.init(e,t)}),If=h("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=$r(o))}else t.pattern??(t.pattern=$r());_e.init(e,t)}),Of=h("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Nd),_e.init(e,t)}),Rf=h("$ZodURL",(e,t)=>{_e.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===Bd.source&&!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),jf=h("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ud()),_e.init(e,t)}),Pf=h("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=zd),_e.init(e,t)}),Ef=h("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=jd),_e.init(e,t)}),Tf=h("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Pd),_e.init(e,t)}),Af=h("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ed),_e.init(e,t)}),zf=h("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Td),_e.init(e,t)}),Ff=h("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ad),_e.init(e,t)}),Df=h("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=qd(t)),_e.init(e,t)}),Nf=h("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Wd),_e.init(e,t)}),Uf=h("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Kd(t)),_e.init(e,t)}),Mf=h("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Fd),_e.init(e,t)}),Cf=h("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Md),_e.init(e,t),e._zod.bag.format="ipv4"}),Lf=h("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Cd),_e.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Zf=h("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ld(t.delimiter)),_e.init(e,t),e._zod.bag.format="mac"}),Vf=h("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Zd),_e.init(e,t)}),Hf=h("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Vd),_e.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Bf(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Jf=h("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Hd),_e.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Bf(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Gb(e){if(!qa.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Bf(r)}var Wf=h("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=qa),_e.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Gb(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Kf=h("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Jd),_e.init(e,t)});function Yb(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var qf=h("$ZodJWT",(e,t)=>{_e.init(e,t),e._zod.check=r=>{Yb(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Gf=h("$ZodCustomStringFormat",(e,t)=>{_e.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),rc=h("$ZodNumber",(e,t)=>{Y.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ga,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),Yf=h("$ZodNumberFormat",(e,t)=>{sf.init(e,t),rc.init(e,t)}),gs=h("$ZodBoolean",(e,t)=>{Y.init(e,t),e._zod.pattern=Qd,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),oc=h("$ZodBigInt",(e,t)=>{Y.init(e,t),e._zod.pattern=Yd,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Xf=h("$ZodBigIntFormat",(e,t)=>{af.init(e,t),oc.init(e,t)}),Qf=h("$ZodSymbol",(e,t)=>{Y.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),ep=h("$ZodUndefined",(e,t)=>{Y.init(e,t),e._zod.pattern=tf,e._zod.values=new Set([void 0]),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),tp=h("$ZodNull",(e,t)=>{Y.init(e,t),e._zod.pattern=ef,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),np=h("$ZodAny",(e,t)=>{Y.init(e,t),e._zod.parse=r=>r}),rp=h("$ZodUnknown",(e,t)=>{Y.init(e,t),e._zod.parse=r=>r}),op=h("$ZodNever",(e,t)=>{Y.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),ip=h("$ZodVoid",(e,t)=>{Y.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),sp=h("$ZodDate",(e,t)=>{Y.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function Db(e,t,r){e.issues.length&&t.issues.push(...tt(r,e.issues)),t.value[r]=e.value}var ap=h("$ZodArray",(e,t)=>{Y.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let a=n[s],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(l=>Db(l,r,s))):Db(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function nc(e,t,r,o,n,i){let s=r in o;if(e.issues.length){if(n&&i&&!s)return;t.issues.push(...tt(r,e.issues))}if(!s&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?s&&(t.value[r]=void 0):t.value[r]=e.value}function Xb(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=xd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Qb(e,t,r,o,n,i){let s=[],a=n.keySet,c=n.catchall._zod,l=c.def.type,u=c.optin==="optional",d=c.optout==="optional";for(let f in t){if(f==="__proto__"||a.has(f))continue;if(l==="never"){s.push(f);continue}let p=c.run({value:t[f],issues:[]},o);p instanceof Promise?e.push(p.then(m=>nc(m,r,f,t,u,d))):nc(p,r,f,t,u,d)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var ew=h("$ZodObject",(e,t)=>{if(Y.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=ko(()=>Xb(t));se(e._zod,"propValues",()=>{let a=t.shape,c={};for(let l in a){let u=a[l]._zod;if(u.values){c[l]??(c[l]=new Set);for(let d of u.values)c[l].add(d)}}return c});let n=_r,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let l=a.value;if(!n(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};let u=[],d=s.shape;for(let f of s.keys){let p=d[f],m=p._zod.optin==="optional",S=p._zod.optout==="optional",_=p._zod.run({value:l[f],issues:[]},c);_ instanceof Promise?u.push(_.then(O=>nc(O,a,f,l,m,S))):nc(_,a,f,l,m,S)}return i?Qb(u,l,a,c,o.value,e):u.length?Promise.all(u).then(()=>a):a}}),cp=h("$ZodObjectJIT",(e,t)=>{ew.init(e,t);let r=e._zod.parse,o=ko(()=>Xb(t)),n=f=>{let p=new ms(["shape","payload","ctx"]),m=o.value,S=F=>{let P=Na(F);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};p.write("const input = payload.value;");let _=Object.create(null),O=0;for(let F of m.keys)_[F]=`key_${O++}`;p.write("const newResult = {};");for(let F of m.keys){let P=_[F],N=Na(F),Q=f[F],J=Q?._zod?.optin==="optional",X=Q?._zod?.optout==="optional";p.write(`const ${P} = ${S(F)};`),J&&X?p.write(`
5
+ if (${P}.issues.length) {
6
+ if (${N} in input) {
7
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
8
+ ...iss,
9
+ path: iss.path ? [${N}, ...iss.path] : [${N}]
10
+ })));
11
+ }
12
+ }
13
+
14
+ if (${P}.value === undefined) {
15
+ if (${N} in input) {
16
+ newResult[${N}] = undefined;
17
+ }
18
+ } else {
19
+ newResult[${N}] = ${P}.value;
20
+ }
21
+
22
+ `):J?p.write(`
23
+ if (${P}.issues.length) {
24
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
25
+ ...iss,
26
+ path: iss.path ? [${N}, ...iss.path] : [${N}]
27
+ })));
28
+ }
29
+
30
+ if (${P}.value === undefined) {
31
+ if (${N} in input) {
32
+ newResult[${N}] = undefined;
33
+ }
34
+ } else {
35
+ newResult[${N}] = ${P}.value;
36
+ }
37
+
38
+ `):p.write(`
39
+ const ${P}_present = ${N} in input;
40
+ if (${P}.issues.length) {
41
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
42
+ ...iss,
43
+ path: iss.path ? [${N}, ...iss.path] : [${N}]
44
+ })));
45
+ }
46
+ if (!${P}_present && !${P}.issues.length) {
47
+ payload.issues.push({
48
+ code: "invalid_type",
49
+ expected: "nonoptional",
50
+ input: undefined,
51
+ path: [${N}]
52
+ });
53
+ }
54
+
55
+ if (${P}_present) {
56
+ if (${P}.value === undefined) {
57
+ newResult[${N}] = undefined;
58
+ } else {
59
+ newResult[${N}] = ${P}.value;
60
+ }
61
+ }
62
+
63
+ `)}p.write("payload.value = newResult;"),p.write("return payload;");let H=p.compile();return(F,P)=>H(f,F,P)},i,s=_r,a=!xr.jitless,l=a&&vd.value,u=t.catchall,d;e._zod.parse=(f,p)=>{d??(d=o.value);let m=f.value;return s(m)?a&&l&&p?.async===!1&&p.jitless!==!0?(i||(i=n(t.shape)),f=i(f,p),u?Qb([],m,f,p,d,e):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f)}});function Nb(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!Un(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>qe(s,o,Pe())))}),t)}var hs=h("$ZodUnion",(e,t)=>{Y.init(e,t),se(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),se(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),se(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),se(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${o.map(n=>is(n.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},n);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}return i?Promise.all(s).then(a=>Nb(a,o,e,n)):Nb(s,o,e,n)}});function Ub(e,t,r,o){let n=e.filter(i=>i.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>qe(s,o,Pe())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var lp=h("$ZodXor",(e,t)=>{hs.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},n);c instanceof Promise?(s.push(c),i=!0):s.push(c)}return i?Promise.all(s).then(a=>Ub(a,o,e,n)):Ub(s,o,e,n)}}),up=h("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,hs.init(e,t);let r=e._zod.parse;se(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(let l of c)n[a].add(l)}}return n});let o=ko(()=>{let n=t.options,i=new Map;for(let s of n){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!_r(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let a=o.value.get(s?.[t.discriminator]);return a?a._zod.run(n,i):t.unionFallback||i.direction==="backward"?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:s,path:[t.discriminator],inst:e}),n)}}),dp=h("$ZodIntersection",(e,t)=>{Y.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>Mb(r,c,l)):Mb(r,i,s)}});function kf(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Nn(e)&&Nn(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=kf(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=kf(n,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Mb(e,t,r){let o=new Map,n;for(let a of t.issues)if(a.code==="unrecognized_keys"){n??(n=a);for(let c of a.keys)o.has(c)||o.set(c,{}),o.get(c).l=!0}else e.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let c of a.keys)o.has(c)||o.set(c,{}),o.get(c).r=!0;else e.issues.push(a);let i=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&n&&e.issues.push({...n,keys:i}),Un(e))return e;let s=kf(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var ic=h("$ZodTuple",(e,t)=>{Y.init(e,t);let r=t.items;e._zod.parse=(o,n)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],a=Cb(r,"optin"),c=Cb(r,"optout");if(!t.rest){if(i.length<a)return o.issues.push({code:"too_small",minimum:a,inclusive:!0,input:i,inst:e,origin:"array"}),o;i.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:i,inst:e,origin:"array"})}let l=new Array(r.length);for(let u=0;u<r.length;u++){let d=r[u]._zod.run({value:i[u],issues:[]},n);d instanceof Promise?s.push(d.then(f=>{l[u]=f})):l[u]=d}if(t.rest){let u=r.length-1,d=i.slice(r.length);for(let f of d){u++;let p=t.rest._zod.run({value:f,issues:[]},n);p instanceof Promise?s.push(p.then(m=>Lb(m,o,u))):Lb(p,o,u)}}return s.length?Promise.all(s).then(()=>Zb(l,o,r,i,c)):Zb(l,o,r,i,c)}});function Cb(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function Lb(e,t,r){e.issues.length&&t.issues.push(...tt(r,e.issues)),t.value[r]=e.value}function Zb(e,t,r,o,n){for(let i=0;i<r.length;i++){let s=e[i],a=i<o.length;if(s.issues.length){if(!a&&i>=n){t.value.length=i;break}t.issues.push(...tt(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=o.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var fp=h("$ZodRecord",(e,t)=>{Y.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Nn(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let a=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){a.add(typeof l=="number"?l.toString():l);let u=t.keyType._zod.run({value:l,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>qe(p,o,Pe())),input:l,path:[l],inst:e});continue}let d=u.value,f=t.valueType._zod.run({value:n[l],issues:[]},o);f instanceof Promise?i.push(f.then(p=>{p.issues.length&&r.issues.push(...tt(l,p.issues)),r.value[d]=p.value})):(f.issues.length&&r.issues.push(...tt(l,f.issues)),r.value[d]=f.value)}let c;for(let l in n)a.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(n)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,a))continue;let c=t.keyType._zod.run({value:a,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Ga.test(a)&&c.issues.length){let d=t.keyType._zod.run({value:Number(a),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?r.value[a]=n[a]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>qe(d,o,Pe())),input:a,path:[a],inst:e});continue}let u=t.valueType._zod.run({value:n[a],issues:[]},o);u instanceof Promise?i.push(u.then(d=>{d.issues.length&&r.issues.push(...tt(a,d.issues)),r.value[c.value]=d.value})):(u.issues.length&&r.issues.push(...tt(a,u.issues)),r.value[c.value]=u.value)}}return i.length?Promise.all(i).then(()=>r):r}}),pp=h("$ZodMap",(e,t)=>{Y.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,a]of n){let c=t.keyType._zod.run({value:s,issues:[]},o),l=t.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise||l instanceof Promise?i.push(Promise.all([c,l]).then(([u,d])=>{Vb(u,d,r,s,n,e,o)})):Vb(c,l,r,s,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function Vb(e,t,r,o,n,i,s){e.issues.length&&(ss.has(typeof o)?r.issues.push(...tt(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(a=>qe(a,s,Pe()))})),t.issues.length&&(ss.has(typeof o)?r.issues.push(...tt(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(a=>qe(a,s,Pe()))})),r.value.set(e.value,t.value)}var mp=h("$ZodSet",(e,t)=>{Y.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let a=t.valueType._zod.run({value:s,issues:[]},o);a instanceof Promise?i.push(a.then(c=>Hb(c,r))):Hb(a,r)}return i.length?Promise.all(i).then(()=>r):r}});function Hb(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var gp=h("$ZodEnum",(e,t)=>{Y.init(e,t);let r=os(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>ss.has(typeof n)).map(n=>typeof n=="string"?xt(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),hp=h("$ZodLiteral",(e,t)=>{if(Y.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?xt(o):o?xt(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),yp=h("$ZodFile",(e,t)=>{Y.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),vp=h("$ZodTransform",(e,t)=>{Y.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new zn(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r.fallback=!0,r));if(n instanceof Promise)throw new jt;return r.value=n,r.fallback=!0,r}});function Bb(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var sc=h("$ZodOptional",(e,t)=>{Y.init(e,t),e._zod.optin="optional",e._zod.optout="optional",se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),se(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${is(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=r.value,i=t.innerType._zod.run(r,o);return i instanceof Promise?i.then(s=>Bb(s,n)):Bb(i,n)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),bp=h("$ZodExactOptional",(e,t)=>{sc.init(e,t),se(e._zod,"values",()=>t.innerType._zod.values),se(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),wp=h("$ZodNullable",(e,t)=>{Y.init(e,t),se(e._zod,"optin",()=>t.innerType._zod.optin),se(e._zod,"optout",()=>t.innerType._zod.optout),se(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${is(r.source)}|null)$`):void 0}),se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),xp=h("$ZodDefault",(e,t)=>{Y.init(e,t),e._zod.optin="optional",se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Jb(i,t)):Jb(n,t)}});function Jb(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var _p=h("$ZodPrefault",(e,t)=>{Y.init(e,t),e._zod.optin="optional",se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),$p=h("$ZodNonOptional",(e,t)=>{Y.init(e,t),se(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Wb(i,e)):Wb(n,e)}});function Wb(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var kp=h("$ZodSuccess",(e,t)=>{Y.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new zn("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Sp=h("$ZodCatch",(e,t)=>{Y.init(e,t),e._zod.optin="optional",se(e._zod,"optout",()=>t.innerType._zod.optout),se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>qe(s,o,Pe()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>qe(i,o,Pe()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),Ip=h("$ZodNaN",(e,t)=>{Y.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),ac=h("$ZodPipe",(e,t)=>{Y.init(e,t),se(e._zod,"values",()=>t.in._zod.values),se(e._zod,"optin",()=>t.in._zod.optin),se(e._zod,"optout",()=>t.out._zod.optout),se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>Qa(s,t.in,o)):Qa(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>Qa(i,t.out,o)):Qa(n,t.out,o)}});function Qa(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var ys=h("$ZodCodec",(e,t)=>{Y.init(e,t),se(e._zod,"values",()=>t.in._zod.values),se(e._zod,"optin",()=>t.in._zod.optin),se(e._zod,"optout",()=>t.out._zod.optout),se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(s=>ec(s,t,o)):ec(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>ec(s,t,o)):ec(i,t,o)}}});function ec(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>tc(e,i,t.out,r)):tc(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>tc(e,i,t.in,r)):tc(e,n,t.in,r)}}function tc(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}var Op=h("$ZodPreprocess",(e,t)=>{ac.init(e,t)}),Rp=h("$ZodReadonly",(e,t)=>{Y.init(e,t),se(e._zod,"propValues",()=>t.innerType._zod.propValues),se(e._zod,"values",()=>t.innerType._zod.values),se(e._zod,"optin",()=>t.innerType?._zod?.optin),se(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(Kb):Kb(n)}});function Kb(e){return e.value=Object.freeze(e.value),e}var jp=h("$ZodTemplateLiteral",(e,t)=>{Y.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s))}else if(o===null||wd.has(typeof o))r.push(xt(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),Pp=h("$ZodFunction",(e,t)=>(Y.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?Ma(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Ma(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Ca(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Ca(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new ic({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),Ep=h("$ZodPromise",(e,t)=>{Y.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),Tp=h("$ZodLazy",(e,t)=>{Y.init(e,t),se(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),se(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),se(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),se(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),se(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),Ap=h("$ZodCustom",(e,t)=>{ke.init(e,t),Y.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>qb(i,r,o,e));qb(n,r,o,e)}});function qb(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(So(n))}}var bs={};Zt(bs,{ar:()=>tw,az:()=>nw,be:()=>ow,bg:()=>iw,ca:()=>sw,cs:()=>aw,da:()=>cw,de:()=>lw,el:()=>uw,en:()=>cc,eo:()=>dw,es:()=>fw,fa:()=>pw,fi:()=>mw,fr:()=>gw,frCA:()=>hw,he:()=>yw,hr:()=>vw,hu:()=>bw,hy:()=>xw,id:()=>_w,is:()=>$w,it:()=>kw,ja:()=>Sw,ka:()=>Iw,kh:()=>Ow,km:()=>lc,ko:()=>Rw,lt:()=>Pw,mk:()=>Ew,ms:()=>Tw,nl:()=>Aw,no:()=>zw,ota:()=>Fw,pl:()=>Nw,ps:()=>Dw,pt:()=>Uw,ro:()=>Mw,ru:()=>Lw,sl:()=>Zw,sv:()=>Vw,ta:()=>Hw,th:()=>Bw,tr:()=>Jw,ua:()=>Ww,uk:()=>uc,ur:()=>Kw,uz:()=>qw,vi:()=>Gw,yo:()=>Qw,zhCN:()=>Yw,zhTW:()=>Xw});var Mj=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${R(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${v(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function tw(){return{localeError:Mj()}}var Cj=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${a}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${R(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${v(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function nw(){return{localeError:Cj()}}function rw(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var Lj=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${R(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=rw(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=rw(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${v(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function ow(){return{localeError:Lj()}}var Zj=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${R(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${v(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function iw(){return{localeError:Zj()}}var Vj=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${a}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${R(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${v(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function sw(){return{localeError:Vj()}}var Hj=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${a}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${R(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${v(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function aw(){return{localeError:Hj()}}var Bj=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${a}`:`Ugyldigt input: forventede ${i}, fik ${a}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${R(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),a=o[n.origin]??n.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${i} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),a=o[n.origin]??n.origin;return s?`For lille: forventede ${a} ${s.verb} ${i} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${v(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};function cw(){return{localeError:Bj()}}var Jj=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${a}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${R(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${v(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function lw(){return{localeError:Jj()}}var Wj=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(n){return e[n]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return typeof n.expected=="string"&&/^[A-Z]/.test(n.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${n.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`}case"invalid_value":return n.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${R(n.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${v(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function uw(){return{localeError:Wj()}}var Kj=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return`Invalid input: expected ${i}, received ${a}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${R(n.values[0])}`:`Invalid option: expected one of ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function cc(){return{localeError:Kj()}}var qj=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${a}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${R(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function dw(){return{localeError:qj()}}var Gj=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${a}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${R(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),a=o[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),a=o[n.origin]??n.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${i}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function fw(){return{localeError:Gj()}}var Yj=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${R(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${v(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${v(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function pw(){return{localeError:Yj()}}var Xj=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${a}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${R(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${v(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function mw(){return{localeError:Xj()}}var Qj=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${a} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${R(n.values[0])} attendu`:`Option invalide : une valeur parmi ${v(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${o[n.origin]??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${o[n.origin]??"valeur"} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${v(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function gw(){return{localeError:Qj()}}var eP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${a}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${R(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${v(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function hw(){return{localeError:eP()}}var tP=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=l=>l?e[l]:void 0,o=l=>{let u=r(l);return u?u.label:l??e.unknown.label},n=l=>`\u05D4${o(l)}`,i=l=>(r(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=l=>l?t[l]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let u=l.expected,d=c[u??""]??o(u),f=j(l.input),p=c[f]??e[f]?.label??f;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${R(l.values[0])}`;let u=l.values.map(p=>R(p));if(l.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let d=u[u.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let u=s(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let m=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(l.origin==="array"||l.origin==="set"){let m=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",S=l.inclusive?`${l.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${S}`.trim()}let f=l.inclusive?"<=":"<",p=i(l.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${l.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${l.maximum.toString()}`}case"too_small":{let u=s(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let m=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(l.origin==="array"||l.origin==="set"){let m=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let _=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`}let S=l.inclusive?`${l.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${S}`.trim()}let f=l.inclusive?">=":">",p=i(l.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${l.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${l.minimum.toString()}`}case"invalid_format":{let u=l;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${u.pattern}`;let d=a[u.format],f=d?.label??u.format,m=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${m}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${v(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function yw(){return{localeError:tP()}}var nP=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${a}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${a}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${R(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),a=o[n.origin]??n.origin;return s?`Preveliko: o\u010Dekivano da ${a??"vrijednost"} ima ${i}${n.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${a??"vrijednost"} bude ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),a=o[n.origin]??n.origin;return s?`Premalo: o\u010Dekivano da ${a} ima ${i}${n.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${a} bude ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${v(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[n.origin]??n.origin}`;default:return"Neispravan unos"}}};function vw(){return{localeError:nP()}}var rP=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${R(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function bw(){return{localeError:rP()}}function ww(e,t,r){return Math.abs(e)===1?t:r}function Eo(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var oP=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${R(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=ww(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Eo(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Eo(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=ww(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Eo(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Eo(n.origin)} \u056C\u056B\u0576\u056B ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${v(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Eo(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Eo(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function xw(){return{localeError:oP()}}var iP=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${i}, diterima ${a}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${R(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function _w(){return{localeError:iP()}}var sP=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${R(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${v(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function $w(){return{localeError:sP()}}var aP=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${a}`:`Input non valido: atteso ${i}, ricevuto ${a}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${R(n.values[0])}`:`Opzione non valida: atteso uno tra ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${v(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function kw(){return{localeError:aP()}}var cP=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${R(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${v(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${v(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Sw(){return{localeError:cP()}}var lP=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${R(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${v(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${v(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Iw(){return{localeError:lP()}}var uP=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${R(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${v(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function lc(){return{localeError:uP()}}function Ow(){return lc()}var dP=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${R(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${v(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${v(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Rw(){return{localeError:dP()}}var vs=e=>e.charAt(0).toUpperCase()+e.slice(1);function jw(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var fP=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,i,s,a){let c=e[n]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[a][s?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${R(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${v(n.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[n.origin]??n.origin,s=t(n.origin,jw(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${vs(i??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.maximum.toString()} ${s.unit??"element\u0173"}`;let a=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${vs(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let i=o[n.origin]??n.origin,s=t(n.origin,jw(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${vs(i??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.minimum.toString()} ${s.unit??"element\u0173"}`;let a=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${vs(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${n.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${v(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[n.origin]??n.origin;return`${vs(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Pw(){return{localeError:fP()}}var pP=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${R(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${v(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Ew(){return{localeError:pP()}}var mP=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${a}`:`Input tidak sah: dijangka ${i}, diterima ${a}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${R(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${v(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function Tw(){return{localeError:mP()}}var gP=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${i}, ontving ${a}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${R(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),a=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),a=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function Aw(){return{localeError:gP()}}var hP=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${a}`:`Ugyldig input: forventet ${i}, fikk ${a}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${R(n.values[0])}`:`Ugyldig valg: forventet en av ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${v(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function zw(){return{localeError:hP()}}var yP=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${a}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${R(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Fw(){return{localeError:yP()}}var vP=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${R(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${v(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${v(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Dw(){return{localeError:vP()}}var bP=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${a}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${R(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Nw(){return{localeError:bP()}}var wP=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${a}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${R(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${r[i.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};function Uw(){return{localeError:wP()}}var xP=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(n){return e[n]??null}let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${a}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${R(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Prea mic: a\u0219teptat ca ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${v(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}};function Mw(){return{localeError:xP()}}function Cw(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var _P=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${R(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=Cw(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=Cw(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${v(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Lw(){return{localeError:_P()}}var $P=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${a}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${R(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${v(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function Zw(){return{localeError:$P()}}var kP=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${a}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${R(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${v(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Vw(){return{localeError:kP()}}var SP=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${R(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${v(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${v(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function Hw(){return{localeError:SP()}}var IP=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${R(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${v(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Bw(){return{localeError:IP()}}var OP=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${a}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${R(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${v(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function Jw(){return{localeError:OP()}}var RP=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${R(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${v(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function uc(){return{localeError:RP()}}function Ww(){return uc()}var jP=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${R(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${v(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${v(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Kw(){return{localeError:jP()}}var PP=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${a}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${R(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${v(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function qw(){return{localeError:PP()}}var EP=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${R(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${v(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Gw(){return{localeError:EP()}}var TP=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${R(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${v(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Yw(){return{localeError:TP()}}var AP=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${R(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${v(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Xw(){return{localeError:AP()}}var zP=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=j(n.input),a=o[s]??s;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${R(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${i}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${i}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${v(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Qw(){return{localeError:zP()}}var ex,zp=Symbol("ZodOutput"),Fp=Symbol("ZodInput"),dc=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function fc(){return new dc}(ex=globalThis).__zod_globalRegistry??(ex.__zod_globalRegistry=fc());var Me=globalThis.__zod_globalRegistry;function Dp(e,t){return new e({type:"string",...z(t)})}function Np(e,t){return new e({type:"string",coerce:!0,...z(t)})}function pc(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...z(t)})}function ws(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...z(t)})}function mc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...z(t)})}function gc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...z(t)})}function hc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...z(t)})}function yc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...z(t)})}function xs(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...z(t)})}function vc(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...z(t)})}function bc(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...z(t)})}function wc(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...z(t)})}function xc(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...z(t)})}function _c(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...z(t)})}function $c(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...z(t)})}function kc(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...z(t)})}function Sc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...z(t)})}function Ic(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...z(t)})}function Up(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...z(t)})}function Oc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...z(t)})}function Rc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...z(t)})}function jc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...z(t)})}function Pc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...z(t)})}function Ec(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...z(t)})}function Tc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...z(t)})}var Mp={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Cp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...z(t)})}function Lp(e,t){return new e({type:"string",format:"date",check:"string_format",...z(t)})}function Zp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...z(t)})}function Vp(e,t){return new e({type:"string",format:"duration",check:"string_format",...z(t)})}function Hp(e,t){return new e({type:"number",checks:[],...z(t)})}function Bp(e,t){return new e({type:"number",coerce:!0,checks:[],...z(t)})}function Jp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...z(t)})}function Wp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...z(t)})}function Kp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...z(t)})}function qp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...z(t)})}function Gp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...z(t)})}function Yp(e,t){return new e({type:"boolean",...z(t)})}function Xp(e,t){return new e({type:"boolean",coerce:!0,...z(t)})}function Qp(e,t){return new e({type:"bigint",...z(t)})}function em(e,t){return new e({type:"bigint",coerce:!0,...z(t)})}function tm(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...z(t)})}function nm(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...z(t)})}function rm(e,t){return new e({type:"symbol",...z(t)})}function om(e,t){return new e({type:"undefined",...z(t)})}function im(e,t){return new e({type:"null",...z(t)})}function sm(e){return new e({type:"any"})}function am(e){return new e({type:"unknown"})}function cm(e,t){return new e({type:"never",...z(t)})}function lm(e,t){return new e({type:"void",...z(t)})}function um(e,t){return new e({type:"date",...z(t)})}function dm(e,t){return new e({type:"date",coerce:!0,...z(t)})}function fm(e,t){return new e({type:"nan",...z(t)})}function Vt(e,t){return new Ya({check:"less_than",...z(t),value:e,inclusive:!1})}function ft(e,t){return new Ya({check:"less_than",...z(t),value:e,inclusive:!0})}function Ht(e,t){return new Xa({check:"greater_than",...z(t),value:e,inclusive:!1})}function Ge(e,t){return new Xa({check:"greater_than",...z(t),value:e,inclusive:!0})}function Ac(e){return Ht(0,e)}function zc(e){return Vt(0,e)}function Fc(e){return ft(0,e)}function Dc(e){return Ge(0,e)}function Mn(e,t){return new of({check:"multiple_of",...z(t),value:e})}function Cn(e,t){return new cf({check:"max_size",...z(t),maximum:e})}function Bt(e,t){return new lf({check:"min_size",...z(t),minimum:e})}function Sr(e,t){return new uf({check:"size_equals",...z(t),size:e})}function Ir(e,t){return new df({check:"max_length",...z(t),maximum:e})}function ln(e,t){return new ff({check:"min_length",...z(t),minimum:e})}function Or(e,t){return new pf({check:"length_equals",...z(t),length:e})}function To(e,t){return new mf({check:"string_format",format:"regex",...z(t),pattern:e})}function Ao(e){return new gf({check:"string_format",format:"lowercase",...z(e)})}function zo(e){return new hf({check:"string_format",format:"uppercase",...z(e)})}function Fo(e,t){return new yf({check:"string_format",format:"includes",...z(t),includes:e})}function Do(e,t){return new vf({check:"string_format",format:"starts_with",...z(t),prefix:e})}function No(e,t){return new bf({check:"string_format",format:"ends_with",...z(t),suffix:e})}function Nc(e,t,r){return new wf({check:"property",property:e,schema:t,...z(r)})}function Uo(e,t){return new xf({check:"mime_type",mime:e,...z(t)})}function Pt(e){return new _f({check:"overwrite",tx:e})}function Mo(e){return Pt(t=>t.normalize(e))}function Co(){return Pt(e=>e.trim())}function Lo(){return Pt(e=>e.toLowerCase())}function Zo(){return Pt(e=>e.toUpperCase())}function Vo(){return Pt(e=>yd(e))}function pm(e,t,r){return new e({type:"array",element:t,...z(r)})}function DP(e,t,r){return new e({type:"union",options:t,...z(r)})}function NP(e,t,r){return new e({type:"union",options:t,inclusive:!1,...z(r)})}function UP(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...z(o)})}function MP(e,t,r){return new e({type:"intersection",left:t,right:r})}function CP(e,t,r,o){let n=r instanceof Y,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...z(i)})}function LP(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...z(o)})}function ZP(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...z(o)})}function VP(e,t,r){return new e({type:"set",valueType:t,...z(r)})}function HP(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...z(r)})}function BP(e,t,r){return new e({type:"enum",entries:t,...z(r)})}function JP(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...z(r)})}function mm(e,t){return new e({type:"file",...z(t)})}function WP(e,t){return new e({type:"transform",transform:t})}function KP(e,t){return new e({type:"optional",innerType:t})}function qP(e,t){return new e({type:"nullable",innerType:t})}function GP(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():bd(r)}})}function YP(e,t,r){return new e({type:"nonoptional",innerType:t,...z(r)})}function XP(e,t){return new e({type:"success",innerType:t})}function QP(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function eE(e,t,r){return new e({type:"pipe",in:t,out:r})}function tE(e,t){return new e({type:"readonly",innerType:t})}function nE(e,t,r){return new e({type:"template_literal",parts:t,...z(r)})}function rE(e,t){return new e({type:"lazy",getter:t})}function oE(e,t){return new e({type:"promise",innerType:t})}function gm(e,t,r){let o=z(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function hm(e,t,r){return new e({type:"custom",check:"custom",fn:t,...z(r)})}function ym(e,t){let r=tx(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(So(n,o.value,r._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push(So(i))}},e(o.value,o)),t);return r}function tx(e,t){let r=new ke({check:"custom",...z(t)});return r._zod.check=e,r}function vm(e){let t=new ke({check:"describe"});return t._zod.onattach=[r=>{let o=Me.get(r)??{};Me.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function bm(e){let t=new ke({check:"meta"});return t._zod.onattach=[r=>{let o=Me.get(r)??{};Me.add(r,{...o,...e})}],t._zod.check=()=>{},t}function wm(e,t){let r=z(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(p=>typeof p=="string"?p.toLowerCase():p),n=n.map(p=>typeof p=="string"?p.toLowerCase():p));let i=new Set(o),s=new Set(n),a=e.Codec??ys,c=e.Boolean??gs,l=e.String??kr,u=new l({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),f=new a({type:"pipe",in:u,out:d,transform:((p,m)=>{let S=p;return r.case!=="sensitive"&&(S=S.toLowerCase()),i.has(S)?!0:s.has(S)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:m.value,inst:f,continue:!1}),{})}),reverseTransform:((p,m)=>p===!0?o[0]||"true":n[0]||"false"),error:r.error});return f}function Ho(e,t,r,o={}){let n=z(o),i={...z(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}function Ln(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Me,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function we(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let u={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,u);else{let f=s.schema,p=t.processors[n.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);p(e,t,f,u)}let d=e._zod.parent;d&&(s.ref||(s.ref=d),we(d,t,u),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&Ye(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Zn(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=o.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(a,s[0])}}let n=s=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(s[0])?.id,f=e.external.uri??(m=>m);if(d)return{ref:f(d)};let p=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=p,{defId:p,ref:`${f("__shared")}#/${a}/${p}`}}if(s[1]===r)return{ref:"#"};let l=`#/${a}/`,u=s[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:l+u}},i=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:l}=n(s);a.def={...a.schema},l&&(a.defId=l);let u=a.schema;for(let d in u)delete u[d];u.$ref=c};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
64
+
65
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){i(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function Vn(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=a=>{let c=e.seen.get(a);if(c.ref===null)return;let l=c.def??c.schema,u={...l},d=c.ref;if(c.ref=null,d){o(d);let p=e.seen.get(d),m=p.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(m)):Object.assign(l,m),Object.assign(l,u),a._zod.parent===d)for(let _ in l)_==="$ref"||_==="allOf"||_ in u||delete l[_];if(m.$ref&&p.def)for(let _ in l)_==="$ref"||_==="allOf"||_ in p.def&&JSON.stringify(l[_])===JSON.stringify(p.def[_])&&delete l[_]}let f=a._zod.parent;if(f&&f!==d){o(f);let p=e.seen.get(f);if(p?.schema.$ref&&(l.$ref=p.schema.$ref,p.def))for(let m in l)m==="$ref"||m==="allOf"||m in p.def&&JSON.stringify(l[m])===JSON.stringify(p.def[m])&&delete l[m]}e.override({zodSchema:a,jsonSchema:l,path:c.path??[]})};for(let a of[...e.seen.entries()].reverse())o(a[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(a)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&n.id===i&&delete n.id;let s=e.external?.defs??{};for(let a of e.seen.entries()){let c=a[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,s[c.defId]=c.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?n.$defs=s:n.definitions=s);try{let a=JSON.parse(JSON.stringify(n));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Bo(t,"input",e.processors),output:Bo(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Ye(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Ye(o.element,r);if(o.type==="set")return Ye(o.valueType,r);if(o.type==="lazy")return Ye(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Ye(o.innerType,r);if(o.type==="intersection")return Ye(o.left,r)||Ye(o.right,r);if(o.type==="record"||o.type==="map")return Ye(o.keyType,r)||Ye(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Ye(o.in,r)||Ye(o.out,r);if(o.type==="object"){for(let n in o.shape)if(Ye(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(Ye(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(Ye(n,r))return!0;return!!(o.rest&&Ye(o.rest,r))}return!1}var xm=(e,t={})=>r=>{let o=Ln({...r,processors:t});return we(e,o),Zn(o,e),Vn(o,e)},Bo=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},s=Ln({...n??{},target:i,io:t,processors:r});return we(e,s),Zn(s,e),Vn(s,e)};var iE={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},_m=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof s=="number"&&(n.maxLength=s),a&&(n.format=iE[a]??a,n.format===""&&delete n.format,a==="time"&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let u=[...c];u.length===1?n.pattern=u[0].source:u.length>1&&(n.allOf=[...u.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},$m=(e,t,r,o)=>{let n=r,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof a=="string"&&a.includes("int")?n.type="integer":n.type="number";let d=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),f=typeof l=="number"&&l<=(s??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";d?p?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u:typeof i=="number"&&(n.minimum=i),f?p?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l:typeof s=="number"&&(n.maximum=s),typeof c=="number"&&(n.multipleOf=c)},km=(e,t,r,o)=>{r.type="boolean"},Sm=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Im=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Om=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Rm=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},jm=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Pm=(e,t,r,o)=>{r.not={}},Em=(e,t,r,o)=>{},Tm=(e,t,r,o)=>{},Am=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},zm=(e,t,r,o)=>{let n=e._zod.def,i=os(n.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},Fm=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let s of n.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},Dm=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Nm=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},Um=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=e._zod.bag;s!==void 0&&(i.minLength=s),a!==void 0&&(i.maxLength=a),c?c.length===1?(i.contentMediaType=c[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(n,i)},Mm=(e,t,r,o)=>{r.type="boolean"},Cm=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Lm=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Zm=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Vm=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Hm=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Bm=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(n.minItems=s),typeof a=="number"&&(n.maxItems=a),n.type="array",n.items=we(i.element,t,{...o,path:[...o.path,"items"]})},Jm=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let s=i.shape;for(let l in s)n.properties[l]=we(s[l],t,{...o,path:[...o.path,"properties",l]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{let u=i.shape[l]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));c.size>0&&(n.required=Array.from(c)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=we(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},Mc=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,s=n.options.map((a,c)=>we(a,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=s:r.anyOf=s},Wm=(e,t,r,o)=>{let n=e._zod.def,i=we(n.left,t,{...o,path:[...o.path,"allOf",0]}),s=we(n.right,t,{...o,path:[...o.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=c},Km=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((f,p)=>we(f,t,{...o,path:[...o.path,s,p]})),l=i.rest?we(i.rest,t,{...o,path:[...o.path,a,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=c,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:c},l&&n.items.anyOf.push(l),n.minItems=c.length,l||(n.maxItems=c.length)):(n.items=c,l&&(n.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u=="number"&&(n.minItems=u),typeof d=="number"&&(n.maxItems=d)},qm=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let s=i.keyType,c=s._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let u=we(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let d of c)n.patternProperties[d.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=we(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=we(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let l=s._zod.values;if(l){let u=[...l].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(n.required=u)}},Gm=(e,t,r,o)=>{let n=e._zod.def,i=we(n.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Ym=(e,t,r,o)=>{let n=e._zod.def;we(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Xm=(e,t,r,o)=>{let n=e._zod.def;we(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Qm=(e,t,r,o)=>{let n=e._zod.def;we(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},eg=(e,t,r,o)=>{let n=e._zod.def;we(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},tg=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?n.out:n.in:n.out;we(s,t,o);let a=t.seen.get(e);a.ref=s},ng=(e,t,r,o)=>{let n=e._zod.def;we(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},rg=(e,t,r,o)=>{let n=e._zod.def;we(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Cc=(e,t,r,o)=>{let n=e._zod.def;we(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},og=(e,t,r,o)=>{let n=e._zod.innerType;we(n,t,o);let i=t.seen.get(e);i.ref=n},Uc={string:_m,number:$m,boolean:km,bigint:Sm,symbol:Im,null:Om,undefined:Rm,void:jm,never:Pm,any:Em,unknown:Tm,date:Am,enum:zm,literal:Fm,nan:Dm,template_literal:Nm,file:Um,success:Mm,custom:Cm,function:Lm,transform:Zm,map:Vm,set:Hm,array:Bm,object:Jm,union:Mc,intersection:Wm,tuple:Km,record:qm,nullable:Gm,nonoptional:Ym,default:Xm,prefault:Qm,catch:eg,pipe:tg,readonly:ng,promise:rg,optional:Cc,lazy:og};function Lc(e,t){if("_idmap"in e){let o=e,n=Ln({...t,processors:Uc}),i={};for(let c of o._idmap.entries()){let[l,u]=c;we(u,n)}let s={},a={registry:o,uri:t?.uri,defs:i};n.external=a;for(let c of o._idmap.entries()){let[l,u]=c;Zn(n,u),s[l]=Vn(n,u)}if(Object.keys(i).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:i}}return{schemas:s}}let r=Ln({...t,processors:Uc});return we(e,r),Zn(r,e),Vn(r,e)}var Zc=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Ln({processors:Uc,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return we(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),Zn(this.ctx,t);let o=Vn(this.ctx,t),{"~standard":n,...i}=o;return i}};var nx={};var _s={};Zt(_s,{ZodAny:()=>Rg,ZodArray:()=>Tg,ZodBase64:()=>ll,ZodBase64URL:()=>ul,ZodBigInt:()=>Qo,ZodBigIntFormat:()=>pl,ZodBoolean:()=>Xo,ZodCIDRv4:()=>al,ZodCIDRv6:()=>cl,ZodCUID:()=>el,ZodCUID2:()=>tl,ZodCatch:()=>eh,ZodCodec:()=>zs,ZodCustom:()=>Fs,ZodCustomStringFormat:()=>Go,ZodDate:()=>js,ZodDefault:()=>Kg,ZodDiscriminatedUnion:()=>zg,ZodE164:()=>dl,ZodEmail:()=>Yc,ZodEmoji:()=>Xc,ZodEnum:()=>Ko,ZodExactOptional:()=>Bg,ZodFile:()=>Vg,ZodFunction:()=>uh,ZodGUID:()=>ks,ZodIPv4:()=>il,ZodIPv6:()=>sl,ZodIntersection:()=>Fg,ZodJWT:()=>fl,ZodKSUID:()=>ol,ZodLazy:()=>ah,ZodLiteral:()=>Zg,ZodMAC:()=>xg,ZodMap:()=>Cg,ZodNaN:()=>nh,ZodNanoID:()=>Qc,ZodNever:()=>Pg,ZodNonOptional:()=>bl,ZodNull:()=>Ig,ZodNullable:()=>Wg,ZodNumber:()=>Yo,ZodNumberFormat:()=>jr,ZodObject:()=>Es,ZodOptional:()=>vl,ZodPipe:()=>As,ZodPrefault:()=>Gg,ZodPreprocess:()=>rh,ZodPromise:()=>lh,ZodReadonly:()=>oh,ZodRecord:()=>Wo,ZodSet:()=>Lg,ZodString:()=>qo,ZodStringFormat:()=>$e,ZodSuccess:()=>Qg,ZodSymbol:()=>kg,ZodTemplateLiteral:()=>sh,ZodTransform:()=>Hg,ZodTuple:()=>Ng,ZodType:()=>ee,ZodULID:()=>nl,ZodURL:()=>Rs,ZodUUID:()=>Jt,ZodUndefined:()=>Sg,ZodUnion:()=>Ts,ZodUnknown:()=>jg,ZodVoid:()=>Eg,ZodXID:()=>rl,ZodXor:()=>Ag,_ZodString:()=>Gc,_default:()=>qg,_function:()=>d_,any:()=>Zx,array:()=>Ps,base64:()=>Sx,base64url:()=>Ix,bigint:()=>Nx,boolean:()=>$g,catch:()=>th,check:()=>f_,cidrv4:()=>$x,cidrv6:()=>kx,codec:()=>a_,cuid:()=>gx,cuid2:()=>hx,custom:()=>p_,date:()=>Hx,describe:()=>m_,discriminatedUnion:()=>Gx,e164:()=>Ox,email:()=>ix,emoji:()=>px,enum:()=>hl,exactOptional:()=>Jg,file:()=>r_,float32:()=>Ax,float64:()=>zx,function:()=>d_,guid:()=>sx,hash:()=>Tx,hex:()=>Ex,hostname:()=>Px,httpUrl:()=>fx,instanceof:()=>h_,int:()=>Kc,int32:()=>Fx,int64:()=>Ux,intersection:()=>Dg,invertCodec:()=>c_,ipv4:()=>wx,ipv6:()=>_x,json:()=>v_,jwt:()=>Rx,keyof:()=>Bx,ksuid:()=>bx,lazy:()=>ch,literal:()=>n_,looseObject:()=>Kx,looseRecord:()=>Xx,mac:()=>xx,map:()=>Qx,meta:()=>g_,nan:()=>s_,nanoid:()=>mx,nativeEnum:()=>t_,never:()=>ml,nonoptional:()=>Xg,null:()=>Og,nullable:()=>Is,nullish:()=>o_,number:()=>_g,object:()=>Jx,optional:()=>Ss,partialRecord:()=>Yx,pipe:()=>qc,prefault:()=>Yg,preprocess:()=>b_,promise:()=>u_,readonly:()=>ih,record:()=>Mg,refine:()=>dh,set:()=>e_,strictObject:()=>Wx,string:()=>$s,stringFormat:()=>jx,stringbool:()=>y_,success:()=>i_,superRefine:()=>fh,symbol:()=>Cx,templateLiteral:()=>l_,transform:()=>yl,tuple:()=>Ug,uint32:()=>Dx,uint64:()=>Mx,ulid:()=>yx,undefined:()=>Lx,union:()=>gl,unknown:()=>Rr,url:()=>dx,uuid:()=>ax,uuidv4:()=>cx,uuidv6:()=>lx,uuidv7:()=>ux,void:()=>Vx,xid:()=>vx,xor:()=>qx});var Vc={};Zt(Vc,{endsWith:()=>No,gt:()=>Ht,gte:()=>Ge,includes:()=>Fo,length:()=>Or,lowercase:()=>Ao,lt:()=>Vt,lte:()=>ft,maxLength:()=>Ir,maxSize:()=>Cn,mime:()=>Uo,minLength:()=>ln,minSize:()=>Bt,multipleOf:()=>Mn,negative:()=>zc,nonnegative:()=>Dc,nonpositive:()=>Fc,normalize:()=>Mo,overwrite:()=>Pt,positive:()=>Ac,property:()=>Nc,regex:()=>To,size:()=>Sr,slugify:()=>Vo,startsWith:()=>Do,toLowerCase:()=>Lo,toUpperCase:()=>Zo,trim:()=>Co,uppercase:()=>zo});var Jo={};Zt(Jo,{ZodISODate:()=>Bc,ZodISODateTime:()=>Hc,ZodISODuration:()=>Wc,ZodISOTime:()=>Jc,date:()=>sg,datetime:()=>ig,duration:()=>cg,time:()=>ag});var Hc=h("ZodISODateTime",(e,t)=>{Df.init(e,t),$e.init(e,t)});function ig(e){return Cp(Hc,e)}var Bc=h("ZodISODate",(e,t)=>{Nf.init(e,t),$e.init(e,t)});function sg(e){return Lp(Bc,e)}var Jc=h("ZodISOTime",(e,t)=>{Uf.init(e,t),$e.init(e,t)});function ag(e){return Zp(Jc,e)}var Wc=h("ZodISODuration",(e,t)=>{Mf.init(e,t),$e.init(e,t)});function cg(e){return Vp(Wc,e)}var rx=(e,t)=>{ls.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>ds(e,r)},flatten:{value:r=>us(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,$o,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,$o,2)}},isEmpty:{get(){return e.issues.length===0}}})},aE=h("ZodError",rx),rt=h("ZodError",rx,{Parent:Error});var lg=Io(rt),ug=Oo(rt),dg=Ro(rt),fg=jo(rt),pg=La(rt),mg=Za(rt),gg=Va(rt),hg=Ha(rt),yg=Ba(rt),vg=Ja(rt),bg=Wa(rt),wg=Ka(rt);var ox=new WeakMap;function Os(e,t,r){let o=Object.getPrototypeOf(e),n=ox.get(o);if(n||(n=new Set,ox.set(o,n)),!n.has(t)){n.add(t);for(let i in r){let s=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}var ee=h("ZodType",(e,t)=>(Y.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Bo(e,"input"),output:Bo(e,"output")}}),e.toJSONSchema=xm(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>lg(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>dg(e,r,o),e.parseAsync=async(r,o)=>ug(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>fg(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>pg(e,r,o),e.decode=(r,o)=>mg(e,r,o),e.encodeAsync=async(r,o)=>gg(e,r,o),e.decodeAsync=async(r,o)=>hg(e,r,o),e.safeEncode=(r,o)=>yg(e,r,o),e.safeDecode=(r,o)=>vg(e,r,o),e.safeEncodeAsync=async(r,o)=>bg(e,r,o),e.safeDecodeAsync=async(r,o)=>wg(e,r,o),Os(e,"ZodType",{check(...r){let o=this.def;return this.clone(T.mergeDefs(o,{checks:[...o.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return Ke(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(dh(r,o))},superRefine(r,o){return this.check(fh(r,o))},overwrite(r){return this.check(Pt(r))},optional(){return Ss(this)},exactOptional(){return Jg(this)},nullable(){return Is(this)},nullish(){return Ss(Is(this))},nonoptional(r){return Xg(this,r)},array(){return Ps(this)},or(r){return gl([this,r])},and(r){return Dg(this,r)},transform(r){return qc(this,yl(r))},default(r){return qg(this,r)},prefault(r){return Yg(this,r)},catch(r){return th(this,r)},pipe(r){return qc(this,r)},readonly(){return ih(this)},describe(r){let o=this.clone();return Me.add(o,{description:r}),o},meta(...r){if(r.length===0)return Me.get(this);let o=this.clone();return Me.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return Me.get(e)?.description},configurable:!0}),e)),Gc=h("_ZodString",(e,t)=>{kr.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(o,n,i)=>_m(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Os(e,"_ZodString",{regex(...o){return this.check(To(...o))},includes(...o){return this.check(Fo(...o))},startsWith(...o){return this.check(Do(...o))},endsWith(...o){return this.check(No(...o))},min(...o){return this.check(ln(...o))},max(...o){return this.check(Ir(...o))},length(...o){return this.check(Or(...o))},nonempty(...o){return this.check(ln(1,...o))},lowercase(o){return this.check(Ao(o))},uppercase(o){return this.check(zo(o))},trim(){return this.check(Co())},normalize(...o){return this.check(Mo(...o))},toLowerCase(){return this.check(Lo())},toUpperCase(){return this.check(Zo())},slugify(){return this.check(Vo())}})}),qo=h("ZodString",(e,t)=>{kr.init(e,t),Gc.init(e,t),e.email=r=>e.check(pc(Yc,r)),e.url=r=>e.check(xs(Rs,r)),e.jwt=r=>e.check(Tc(fl,r)),e.emoji=r=>e.check(vc(Xc,r)),e.guid=r=>e.check(ws(ks,r)),e.uuid=r=>e.check(mc(Jt,r)),e.uuidv4=r=>e.check(gc(Jt,r)),e.uuidv6=r=>e.check(hc(Jt,r)),e.uuidv7=r=>e.check(yc(Jt,r)),e.nanoid=r=>e.check(bc(Qc,r)),e.guid=r=>e.check(ws(ks,r)),e.cuid=r=>e.check(wc(el,r)),e.cuid2=r=>e.check(xc(tl,r)),e.ulid=r=>e.check(_c(nl,r)),e.base64=r=>e.check(jc(ll,r)),e.base64url=r=>e.check(Pc(ul,r)),e.xid=r=>e.check($c(rl,r)),e.ksuid=r=>e.check(kc(ol,r)),e.ipv4=r=>e.check(Sc(il,r)),e.ipv6=r=>e.check(Ic(sl,r)),e.cidrv4=r=>e.check(Oc(al,r)),e.cidrv6=r=>e.check(Rc(cl,r)),e.e164=r=>e.check(Ec(dl,r)),e.datetime=r=>e.check(ig(r)),e.date=r=>e.check(sg(r)),e.time=r=>e.check(ag(r)),e.duration=r=>e.check(cg(r))});function $s(e){return Dp(qo,e)}var $e=h("ZodStringFormat",(e,t)=>{_e.init(e,t),Gc.init(e,t)}),Yc=h("ZodEmail",(e,t)=>{Of.init(e,t),$e.init(e,t)});function ix(e){return pc(Yc,e)}var ks=h("ZodGUID",(e,t)=>{Sf.init(e,t),$e.init(e,t)});function sx(e){return ws(ks,e)}var Jt=h("ZodUUID",(e,t)=>{If.init(e,t),$e.init(e,t)});function ax(e){return mc(Jt,e)}function cx(e){return gc(Jt,e)}function lx(e){return hc(Jt,e)}function ux(e){return yc(Jt,e)}var Rs=h("ZodURL",(e,t)=>{Rf.init(e,t),$e.init(e,t)});function dx(e){return xs(Rs,e)}function fx(e){return xs(Rs,{protocol:dt.httpProtocol,hostname:dt.domain,...T.normalizeParams(e)})}var Xc=h("ZodEmoji",(e,t)=>{jf.init(e,t),$e.init(e,t)});function px(e){return vc(Xc,e)}var Qc=h("ZodNanoID",(e,t)=>{Pf.init(e,t),$e.init(e,t)});function mx(e){return bc(Qc,e)}var el=h("ZodCUID",(e,t)=>{Ef.init(e,t),$e.init(e,t)});function gx(e){return wc(el,e)}var tl=h("ZodCUID2",(e,t)=>{Tf.init(e,t),$e.init(e,t)});function hx(e){return xc(tl,e)}var nl=h("ZodULID",(e,t)=>{Af.init(e,t),$e.init(e,t)});function yx(e){return _c(nl,e)}var rl=h("ZodXID",(e,t)=>{zf.init(e,t),$e.init(e,t)});function vx(e){return $c(rl,e)}var ol=h("ZodKSUID",(e,t)=>{Ff.init(e,t),$e.init(e,t)});function bx(e){return kc(ol,e)}var il=h("ZodIPv4",(e,t)=>{Cf.init(e,t),$e.init(e,t)});function wx(e){return Sc(il,e)}var xg=h("ZodMAC",(e,t)=>{Zf.init(e,t),$e.init(e,t)});function xx(e){return Up(xg,e)}var sl=h("ZodIPv6",(e,t)=>{Lf.init(e,t),$e.init(e,t)});function _x(e){return Ic(sl,e)}var al=h("ZodCIDRv4",(e,t)=>{Vf.init(e,t),$e.init(e,t)});function $x(e){return Oc(al,e)}var cl=h("ZodCIDRv6",(e,t)=>{Hf.init(e,t),$e.init(e,t)});function kx(e){return Rc(cl,e)}var ll=h("ZodBase64",(e,t)=>{Jf.init(e,t),$e.init(e,t)});function Sx(e){return jc(ll,e)}var ul=h("ZodBase64URL",(e,t)=>{Wf.init(e,t),$e.init(e,t)});function Ix(e){return Pc(ul,e)}var dl=h("ZodE164",(e,t)=>{Kf.init(e,t),$e.init(e,t)});function Ox(e){return Ec(dl,e)}var fl=h("ZodJWT",(e,t)=>{qf.init(e,t),$e.init(e,t)});function Rx(e){return Tc(fl,e)}var Go=h("ZodCustomStringFormat",(e,t)=>{Gf.init(e,t),$e.init(e,t)});function jx(e,t,r={}){return Ho(Go,e,t,r)}function Px(e){return Ho(Go,"hostname",dt.hostname,e)}function Ex(e){return Ho(Go,"hex",dt.hex,e)}function Tx(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=dt[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return Ho(Go,o,n,t)}var Yo=h("ZodNumber",(e,t)=>{rc.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(o,n,i)=>$m(e,o,n,i),Os(e,"ZodNumber",{gt(o,n){return this.check(Ht(o,n))},gte(o,n){return this.check(Ge(o,n))},min(o,n){return this.check(Ge(o,n))},lt(o,n){return this.check(Vt(o,n))},lte(o,n){return this.check(ft(o,n))},max(o,n){return this.check(ft(o,n))},int(o){return this.check(Kc(o))},safe(o){return this.check(Kc(o))},positive(o){return this.check(Ht(0,o))},nonnegative(o){return this.check(Ge(0,o))},negative(o){return this.check(Vt(0,o))},nonpositive(o){return this.check(ft(0,o))},multipleOf(o,n){return this.check(Mn(o,n))},step(o,n){return this.check(Mn(o,n))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function _g(e){return Hp(Yo,e)}var jr=h("ZodNumberFormat",(e,t)=>{Yf.init(e,t),Yo.init(e,t)});function Kc(e){return Jp(jr,e)}function Ax(e){return Wp(jr,e)}function zx(e){return Kp(jr,e)}function Fx(e){return qp(jr,e)}function Dx(e){return Gp(jr,e)}var Xo=h("ZodBoolean",(e,t)=>{gs.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>km(e,r,o,n)});function $g(e){return Yp(Xo,e)}var Qo=h("ZodBigInt",(e,t)=>{oc.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Sm(e,o,n,i),e.gte=(o,n)=>e.check(Ge(o,n)),e.min=(o,n)=>e.check(Ge(o,n)),e.gt=(o,n)=>e.check(Ht(o,n)),e.gte=(o,n)=>e.check(Ge(o,n)),e.min=(o,n)=>e.check(Ge(o,n)),e.lt=(o,n)=>e.check(Vt(o,n)),e.lte=(o,n)=>e.check(ft(o,n)),e.max=(o,n)=>e.check(ft(o,n)),e.positive=o=>e.check(Ht(BigInt(0),o)),e.negative=o=>e.check(Vt(BigInt(0),o)),e.nonpositive=o=>e.check(ft(BigInt(0),o)),e.nonnegative=o=>e.check(Ge(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(Mn(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Nx(e){return Qp(Qo,e)}var pl=h("ZodBigIntFormat",(e,t)=>{Xf.init(e,t),Qo.init(e,t)});function Ux(e){return tm(pl,e)}function Mx(e){return nm(pl,e)}var kg=h("ZodSymbol",(e,t)=>{Qf.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Im(e,r,o,n)});function Cx(e){return rm(kg,e)}var Sg=h("ZodUndefined",(e,t)=>{ep.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Rm(e,r,o,n)});function Lx(e){return om(Sg,e)}var Ig=h("ZodNull",(e,t)=>{tp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Om(e,r,o,n)});function Og(e){return im(Ig,e)}var Rg=h("ZodAny",(e,t)=>{np.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Em(e,r,o,n)});function Zx(){return sm(Rg)}var jg=h("ZodUnknown",(e,t)=>{rp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Tm(e,r,o,n)});function Rr(){return am(jg)}var Pg=h("ZodNever",(e,t)=>{op.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pm(e,r,o,n)});function ml(e){return cm(Pg,e)}var Eg=h("ZodVoid",(e,t)=>{ip.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>jm(e,r,o,n)});function Vx(e){return lm(Eg,e)}var js=h("ZodDate",(e,t)=>{sp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Am(e,o,n,i),e.min=(o,n)=>e.check(Ge(o,n)),e.max=(o,n)=>e.check(ft(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Hx(e){return um(js,e)}var Tg=h("ZodArray",(e,t)=>{ap.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Bm(e,r,o,n),e.element=t.element,Os(e,"ZodArray",{min(r,o){return this.check(ln(r,o))},nonempty(r){return this.check(ln(1,r))},max(r,o){return this.check(Ir(r,o))},length(r,o){return this.check(Or(r,o))},unwrap(){return this.element}})});function Ps(e,t){return pm(Tg,e,t)}function Bx(e){let t=e._zod.def.shape;return hl(Object.keys(t))}var Es=h("ZodObject",(e,t)=>{cp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Jm(e,r,o,n),T.defineLazy(e,"shape",()=>t.shape),Os(e,"ZodObject",{keyof(){return hl(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Rr()})},loose(){return this.clone({...this._zod.def,catchall:Rr()})},strict(){return this.clone({...this._zod.def,catchall:ml()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return T.extend(this,r)},safeExtend(r){return T.safeExtend(this,r)},merge(r){return T.merge(this,r)},pick(r){return T.pick(this,r)},omit(r){return T.omit(this,r)},partial(...r){return T.partial(vl,this,r[0])},required(...r){return T.required(bl,this,r[0])}})});function Jx(e,t){let r={type:"object",shape:e??{},...T.normalizeParams(t)};return new Es(r)}function Wx(e,t){return new Es({type:"object",shape:e,catchall:ml(),...T.normalizeParams(t)})}function Kx(e,t){return new Es({type:"object",shape:e,catchall:Rr(),...T.normalizeParams(t)})}var Ts=h("ZodUnion",(e,t)=>{hs.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mc(e,r,o,n),e.options=t.options});function gl(e,t){return new Ts({type:"union",options:e,...T.normalizeParams(t)})}var Ag=h("ZodXor",(e,t)=>{Ts.init(e,t),lp.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mc(e,r,o,n),e.options=t.options});function qx(e,t){return new Ag({type:"union",options:e,inclusive:!1,...T.normalizeParams(t)})}var zg=h("ZodDiscriminatedUnion",(e,t)=>{Ts.init(e,t),up.init(e,t)});function Gx(e,t,r){return new zg({type:"union",options:t,discriminator:e,...T.normalizeParams(r)})}var Fg=h("ZodIntersection",(e,t)=>{dp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Wm(e,r,o,n)});function Dg(e,t){return new Fg({type:"intersection",left:e,right:t})}var Ng=h("ZodTuple",(e,t)=>{ic.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Km(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Ug(e,t,r){let o=t instanceof Y,n=o?r:t,i=o?t:null;return new Ng({type:"tuple",items:e,rest:i,...T.normalizeParams(n)})}var Wo=h("ZodRecord",(e,t)=>{fp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>qm(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function Mg(e,t,r){return!t||!t._zod?new Wo({type:"record",keyType:$s(),valueType:e,...T.normalizeParams(t)}):new Wo({type:"record",keyType:e,valueType:t,...T.normalizeParams(r)})}function Yx(e,t,r){let o=Ke(e);return o._zod.values=void 0,new Wo({type:"record",keyType:o,valueType:t,...T.normalizeParams(r)})}function Xx(e,t,r){return new Wo({type:"record",keyType:e,valueType:t,mode:"loose",...T.normalizeParams(r)})}var Cg=h("ZodMap",(e,t)=>{pp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Vm(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Bt(...r)),e.nonempty=r=>e.check(Bt(1,r)),e.max=(...r)=>e.check(Cn(...r)),e.size=(...r)=>e.check(Sr(...r))});function Qx(e,t,r){return new Cg({type:"map",keyType:e,valueType:t,...T.normalizeParams(r)})}var Lg=h("ZodSet",(e,t)=>{mp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Hm(e,r,o,n),e.min=(...r)=>e.check(Bt(...r)),e.nonempty=r=>e.check(Bt(1,r)),e.max=(...r)=>e.check(Cn(...r)),e.size=(...r)=>e.check(Sr(...r))});function e_(e,t){return new Lg({type:"set",valueType:e,...T.normalizeParams(t)})}var Ko=h("ZodEnum",(e,t)=>{gp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(o,n,i)=>zm(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ko({...t,checks:[],...T.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Ko({...t,checks:[],...T.normalizeParams(n),entries:i})}});function hl(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Ko({type:"enum",entries:r,...T.normalizeParams(t)})}function t_(e,t){return new Ko({type:"enum",entries:e,...T.normalizeParams(t)})}var Zg=h("ZodLiteral",(e,t)=>{hp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Fm(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function n_(e,t){return new Zg({type:"literal",values:Array.isArray(e)?e:[e],...T.normalizeParams(t)})}var Vg=h("ZodFile",(e,t)=>{yp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Um(e,r,o,n),e.min=(r,o)=>e.check(Bt(r,o)),e.max=(r,o)=>e.check(Cn(r,o)),e.mime=(r,o)=>e.check(Uo(Array.isArray(r)?r:[r],o))});function r_(e){return mm(Vg,e)}var Hg=h("ZodTransform",(e,t)=>{vp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Zm(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new zn(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(T.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(T.issue(s))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r.fallback=!0,r)):(r.value=n,r.fallback=!0,r)}});function yl(e){return new Hg({type:"transform",transform:e})}var vl=h("ZodOptional",(e,t)=>{sc.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Ss(e){return new vl({type:"optional",innerType:e})}var Bg=h("ZodExactOptional",(e,t)=>{bp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Jg(e){return new Bg({type:"optional",innerType:e})}var Wg=h("ZodNullable",(e,t)=>{wp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gm(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Is(e){return new Wg({type:"nullable",innerType:e})}function o_(e){return Ss(Is(e))}var Kg=h("ZodDefault",(e,t)=>{xp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xm(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function qg(e,t){return new Kg({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():T.shallowClone(t)}})}var Gg=h("ZodPrefault",(e,t)=>{_p.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qm(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Yg(e,t){return new Gg({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():T.shallowClone(t)}})}var bl=h("ZodNonOptional",(e,t)=>{$p.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ym(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Xg(e,t){return new bl({type:"nonoptional",innerType:e,...T.normalizeParams(t)})}var Qg=h("ZodSuccess",(e,t)=>{kp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mm(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function i_(e){return new Qg({type:"success",innerType:e})}var eh=h("ZodCatch",(e,t)=>{Sp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>eg(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function th(e,t){return new eh({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var nh=h("ZodNaN",(e,t)=>{Ip.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Dm(e,r,o,n)});function s_(e){return fm(nh,e)}var As=h("ZodPipe",(e,t)=>{ac.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>tg(e,r,o,n),e.in=t.in,e.out=t.out});function qc(e,t){return new As({type:"pipe",in:e,out:t})}var zs=h("ZodCodec",(e,t)=>{As.init(e,t),ys.init(e,t)});function a_(e,t,r){return new zs({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function c_(e){let t=e._zod.def;return new zs({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var rh=h("ZodPreprocess",(e,t)=>{As.init(e,t),Op.init(e,t)}),oh=h("ZodReadonly",(e,t)=>{Rp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ng(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function ih(e){return new oh({type:"readonly",innerType:e})}var sh=h("ZodTemplateLiteral",(e,t)=>{jp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Nm(e,r,o,n)});function l_(e,t){return new sh({type:"template_literal",parts:e,...T.normalizeParams(t)})}var ah=h("ZodLazy",(e,t)=>{Tp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>og(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function ch(e){return new ah({type:"lazy",getter:e})}var lh=h("ZodPromise",(e,t)=>{Ep.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>rg(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function u_(e){return new lh({type:"promise",innerType:e})}var uh=h("ZodFunction",(e,t)=>{Pp.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Lm(e,r,o,n)});function d_(e){return new uh({type:"function",input:Array.isArray(e?.input)?Ug(e?.input):e?.input??Ps(Rr()),output:e?.output??Rr()})}var Fs=h("ZodCustom",(e,t)=>{Ap.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cm(e,r,o,n)});function f_(e){let t=new ke({check:"custom"});return t._zod.check=e,t}function p_(e,t){return gm(Fs,e??(()=>!0),t)}function dh(e,t={}){return hm(Fs,e,t)}function fh(e,t){return ym(e,t)}var m_=vm,g_=bm;function h_(e,t={}){let r=new Fs({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...T.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}var y_=(...e)=>wm({Codec:zs,Boolean:Xo,String:qo},...e);function v_(e){let t=ch(()=>gl([$s(e),_g(),$g(),Og(),Ps(t),Mg($s(),t)]));return t}function b_(e,t){return new rh({type:"pipe",in:yl(e),out:t})}var lE={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function uE(e){Pe({customError:e})}function dE(){return Pe().customError}var ph;ph||(ph={});var U={..._s,...Vc,iso:Jo},fE=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function pE(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function mE(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function w_(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return U.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return U.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let i=mE(n,t),s=Be(i,t);return t.refs.set(n,s),t.processing.delete(n),s}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return U.null();if(n.length===0)return U.never();if(n.length===1)return U.literal(n[0]);if(n.every(s=>typeof s=="string"))return U.enum(n);let i=n.map(s=>U.literal(s));return i.length<2?i[0]:U.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return U.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let s={...e,type:i};return w_(s,t)});return n.length===0?U.never():n.length===1?n[0]:U.union(n)}if(!r)return U.any();let o;switch(r){case"string":{let n=U.string();if(e.format){let i=e.format;i==="email"?n=n.check(U.email()):i==="uri"||i==="uri-reference"?n=n.check(U.url()):i==="uuid"||i==="guid"?n=n.check(U.uuid()):i==="date-time"?n=n.check(U.iso.datetime()):i==="date"?n=n.check(U.iso.date()):i==="time"?n=n.check(U.iso.time()):i==="duration"?n=n.check(U.iso.duration()):i==="ipv4"?n=n.check(U.ipv4()):i==="ipv6"?n=n.check(U.ipv6()):i==="mac"?n=n.check(U.mac()):i==="cidr"?n=n.check(U.cidrv4()):i==="cidr-v6"?n=n.check(U.cidrv6()):i==="base64"?n=n.check(U.base64()):i==="base64url"?n=n.check(U.base64url()):i==="e164"?n=n.check(U.e164()):i==="jwt"?n=n.check(U.jwt()):i==="emoji"?n=n.check(U.emoji()):i==="nanoid"?n=n.check(U.nanoid()):i==="cuid"?n=n.check(U.cuid()):i==="cuid2"?n=n.check(U.cuid2()):i==="ulid"?n=n.check(U.ulid()):i==="xid"?n=n.check(U.xid()):i==="ksuid"&&(n=n.check(U.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),o=n;break}case"number":case"integer":{let n=r==="integer"?U.number().int():U.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),o=n;break}case"boolean":{o=U.boolean();break}case"null":{o=U.null();break}case"object":{let n={},i=e.properties||{},s=new Set(e.required||[]);for(let[c,l]of Object.entries(i)){let u=Be(l,t);n[c]=s.has(c)?u:u.optional()}if(e.propertyNames){let c=Be(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?Be(e.additionalProperties,t):U.any();if(Object.keys(n).length===0){o=U.record(c,l);break}let u=U.object(n).passthrough(),d=U.looseRecord(c,l);o=U.intersection(u,d);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),u=[];for(let f of l){let p=Be(c[f],t),m=U.string().regex(new RegExp(f));u.push(U.looseRecord(m,p))}let d=[];if(Object.keys(n).length>0&&d.push(U.object(n).passthrough()),d.push(...u),d.length===0)o=U.object({}).passthrough();else if(d.length===1)o=d[0];else{let f=U.intersection(d[0],d[1]);for(let p=2;p<d.length;p++)f=U.intersection(f,d[p]);o=f}break}let a=U.object(n);e.additionalProperties===!1?o=a.strict():typeof e.additionalProperties=="object"?o=a.catchall(Be(e.additionalProperties,t)):o=a.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let s=n.map(c=>Be(c,t)),a=i&&typeof i=="object"&&!Array.isArray(i)?Be(i,t):void 0;a?o=U.tuple(s).rest(a):o=U.tuple(s),typeof e.minItems=="number"&&(o=o.check(U.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(U.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(c=>Be(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?Be(e.additionalItems,t):void 0;a?o=U.tuple(s).rest(a):o=U.tuple(s),typeof e.minItems=="number"&&(o=o.check(U.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(U.maxLength(e.maxItems)))}else if(i!==void 0){let s=Be(i,t),a=U.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),o=a}else o=U.array(U.any());break}default:throw new Error(`Unsupported type: ${r}`)}return o}function Be(e,t){if(typeof e=="boolean")return e?U.any():U.never();let r=w_(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(l=>Be(l,t)),c=U.union(a);r=o?U.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(l=>Be(l,t)),c=U.xor(a);r=o?U.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:U.any();else{let a=o?r:Be(e.allOf[0],t),c=o?0:1;for(let l=c;l<e.allOf.length;l++)a=U.intersection(a,Be(e.allOf[l],t));r=a}e.nullable===!0&&t.version==="openapi-3.0"&&(r=U.nullable(r)),e.readOnly===!0&&(r=U.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of i)a in e&&(n[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(n[a]=e[a]);for(let a of Object.keys(e))fE.has(a)||(n[a]=e[a]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function x_(e,t){if(typeof e=="boolean")return e?U.any():U.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=pE(r,t?.defaultTarget),n=r.$defs||r.definitions||{},i={version:o,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??Me};return Be(r,i)}var mh={};Zt(mh,{bigint:()=>vE,boolean:()=>yE,date:()=>bE,number:()=>hE,string:()=>gE});function gE(e){return Np(qo,e)}function hE(e){return Bp(Yo,e)}function yE(e){return Xp(Xo,e)}function vE(e){return em(Qo,e)}function bE(e){return dm(js,e)}Pe(cc());var Et=b.object({filename:b.string().min(1),content_hash:b.string().min(1)}),__=b.object({base_css:Et,template_css:Et,islands:b.record(b.string(),Et),island_runtime:Et.nullable(),react_vendor:b.record(b.string(),Et).nullable(),react_vendor_core:Et.nullable(),analytics:Et.nullable(),masters:b.record(b.string(),b.string()),icons:b.object({ico:Et,svg:Et.nullable(),png:b.record(b.string(),Et),apple_touch:Et})}).strict();var wE={street:"st",str:"st",st:"st",avenue:"ave",aven:"ave",av:"ave",ave:"ave",road:"rd",rd:"rd",drive:"dr",dr:"dr",boulevard:"blvd",blvd:"blvd",lane:"ln",ln:"ln",court:"ct",ct:"ct",circle:"cir",cir:"cir",place:"pl",pl:"pl",terrace:"ter",ter:"ter",parkway:"pkwy",pkwy:"pkwy",highway:"hwy",hwy:"hwy",way:"way",trail:"trl",trl:"trl",square:"sq",sq:"sq",loop:"loop",point:"pt",pt:"pt"},xE={north:"n",n:"n",south:"s",s:"s",east:"e",e:"e",west:"w",w:"w",northeast:"ne",ne:"ne",northwest:"nw",nw:"nw",southeast:"se",se:"se",southwest:"sw",sw:"sw"};function k_(e,t){return[e,t].map(r=>(r??"").trim()).filter(r=>r!=="").join(", ")}var $_=2;function S_(e){let t=(e??"").trim().split(/\s+/).filter(n=>n!=="");if(t.length===0)return null;let r=n=>(t[n]??"").replace(/\.$/,"").toLowerCase(),o=t.length;return o>$_+1&&xE[r(o-1)]!==void 0&&(o-=1),o-1>=$_&&wE[r(o-1)]!==void 0?t.slice(0,o-1).join(" "):t.join(" ")}var gh=["autocomplete","manual_pinned","resolved"],O_=["street","unit","city","state","postal"],Pr=[...O_,"latitude","longitude"];function Er(e){return Pr.includes(e)}function Ds(e){if(typeof e!="string")return null;let t=e.trim();return t===""?null:t}function I_(e,t){return typeof e=="number"&&Number.isFinite(e)&&Math.abs(e)<=t?e:null}function Oe(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;let t=e,r=I_(t.latitude,90),o=I_(t.longitude,180),n=r!==null&&o!==null,i=t.source,s={street:Ds(t.street),unit:Ds(t.unit),city:Ds(t.city),state:Ds(t.state),postal:Ds(t.postal),latitude:n?r:null,longitude:n?o:null,source:typeof i=="string"&&gh.includes(i)?i:null};return n||O_.some(a=>s[a]!==null)?s:null}function R_(e){let t=Oe(e);return t===null||t.latitude===null?!1:t.street!==null&&t.city!==null&&t.state!==null&&t.postal!==null}function _E(e){return/^\s*(\d{5})-?\d{4}\s*$/.exec(e)?.[1]??e}function $E(e){let t=k_(e.street,e.unit),r=[e.state,e.postal===null?null:_E(e.postal)].filter(n=>n!==null).join(" "),o=[t,e.city??"",r].filter(n=>n!=="").join(", ");return o===""?null:o}function hh(e){return{...e,display:$E(e),street_no_type:S_(e.street)}}var kE={street:null,unit:null,city:null,state:null,postal:null,latitude:null,longitude:null,source:null};function j_(e){return hh(Oe(e)??kE)}function P_(e,t){let r=Oe(e);return r===null?null:r[t]}var yh=Symbol.for("@homepages/concrete:row:of"),vh=Symbol.for("@homepages/concrete:element:of");function ei(e){return typeof e=="object"&&e!==null&&e.kind==="sibling"&&Ae(e.of)}function SE(e,t){return e===t||Re(e)&&Re(t)&&e.key===t.key}function wl(e,t){let r=[...e];for(let o of t??[])r.some(n=>SE(n,o))||r.push(o);return r}function _t(e){return typeof e=="object"&&e!==null&&"section"in e&&typeof e.section=="string"&&"slot"in e&&typeof e.slot=="string"}function xl(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="row"&&"field"in e&&typeof e.field=="string"}function dn(e){if(!xl(e))return;let t=e[yh];return typeof t=="object"&&t!==null?t:void 0}function $t(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="element"}function E_(e){if(!$t(e))return;let t=e[vh];return typeof t=="object"&&t!==null?t:void 0}function Re(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="home"&&"key"in e&&typeof e.key=="string"}function _l(e){return typeof e=="object"&&e!==null&&"head"in e&&typeof e.head=="object"&&"declaration"in e&&Ae(e.declaration)}function Ae(e){return typeof e=="object"&&e!==null&&"type"in e&&typeof e.type=="string"}function IE(e){if(typeof e.slot!="string")throw new Error(`the row member "${e.field}" is read through a row that is not in scope \u2014 declare the row beside its reader (a field of the same object or item) or at the top level, and read its member there.`);return{kind:"row",slot:e.slot,field:e.field}}function OE(e){return{kind:"section",section:e.section,slot:e.slot}}function T_(e){return _t(e)?OE(e):xl(e)?IE(e):$t(e)?{kind:"element"}:{kind:"home",key:e.key}}function bh(e){return e.kind==="section"}function $l(e,t){if(typeof e=="function")return{kind:"compute",fn:e,reads:[]};let r=t;if(e.requires===void 0)return{kind:"compute",fn:r,reads:[...e.reads]};if(!Array.isArray(e.requires)||e.requires.length===0)throw new Error("compute(): `requires` names at least one read \u2014 omit it when the value needs none.");return{kind:"compute",fn:r,reads:wl(e.reads,e.requires),requires:[...e.requires]}}function pt(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="compute"&&"fn"in e&&typeof e.fn=="function"}var RE=Symbol("compute:handles");function A_(e){return typeof e!="object"||e===null?{}:e[RE]??{}}function Tr(e){return typeof e=="object"&&e!==null&&e.kind==="compute"&&typeof e.fn=="function"}function jE(e,t){let r=e.kind;if(r==="home"&&"key"in e&&typeof e.key=="string")return t.facts[e.key.slice(e.key.indexOf(".")+1)]??null;if(r==="item"&&"field"in e&&typeof e.field=="string"){if(t.row===void 0)throw new Error(`a registry compute reads the member "${e.field}" of an item, outside any item`);return t.row[e.field]??null}throw new Error(`a registry compute carries a read of kind "${String(r)}", which \`defineFacts\` never stores`)}function PE(e,t){return e.fn(...e.reads.map(r=>jE(r,t)))}function z_(e,t,r){let o={};for(let[n,i]of Object.entries(e)){let s=i.source;Tr(s)&&(o[n]=PE(s,{facts:r,row:t}))}return o}var EE={write:new Set(["brief","reads","requires","none"]),pick:new Set(["brief","reads","requires","unique"]),find:new Set(["brief","reads","requires","none"])};function wh(e,t){let r=`fill.${e}()`;if(typeof t.brief!="string"||t.brief.trim()==="")throw new Error(`${r}: \`brief\` is required \u2014 it is the whole instruction the model is given.`);let o=EE[e],n={kind:"fill",verb:e};for(let[s,a]of Object.entries(t)){if(!o.has(s))throw new Error(`${r}: "${s}" is not an option \u2014 it takes ${[...o].map(c=>`\`${c}\``).join(", ")}, and everything the model should know goes in the brief.`);if(s==="none"&&a!==void 0&&a!==!0)throw new Error(`${r}: \`none\` is \`true\` or absent \u2014 it admits the empty answer, and the brief's last sentence says when nothing is right.`);if(s==="unique"&&a!==void 0&&typeof a!="boolean")throw new Error(`${r}: \`unique\` is a boolean \u2014 \`false\` lets a pick repeat an element.`);if(s==="requires"&&a!==void 0&&(!Array.isArray(a)||a.length===0))throw new Error(`${r}: \`requires\` names at least one read \u2014 omit it when the fill needs none.`);a!==void 0&&(n[s]=s==="reads"||s==="requires"?[...a]:a)}let i=n.requires;return i!==void 0&&(n.reads=wl(n.reads??[],i)),n}function TE(e){return wh("write",e)}function AE(e){return wh("pick",e)}function zE(e){return wh("find",e)}var Tt={write:TE,pick:AE,find:zE};function At(e,t){if(Wt(e))return[e];if(!Array.isArray(e)||!e.every(n=>typeof n=="object"&&n!==null))return;if(e.length===0)throw new Error(`${t} declares \`source: []\` \u2014 a list of fills names at least one fill, and a holder nothing fills declares no \`source\`.`);let r=e.filter(n=>!Wt(n)).length;if(r===0)return e;let o=r<e.length?"a derivation beside a fill":r>1?"several derivations":"a derivation in a list";throw new Error(`${t}'s \`source\` lists ${o} \u2014 \`source\` takes one derivation (a fact, a slot, a row's member, the element, a \`compute()\`) or an ordered list of fills: a holder has one write path, and a derived value has no writer beside it.`)}function Ar(e){return Wt(e)||Array.isArray(e)&&e.length>0&&e.every(Wt)}function Wt(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="fill"&&"verb"in e&&(e.verb==="write"||e.verb==="pick"||e.verb==="find")&&"brief"in e&&typeof e.brief=="string"}var kl=Symbol.for("@homepages/concrete:fill:declaration");function F_(e){return Ar(e)?{[kl]:Wt(e)?[e]:[...e]}:{}}var FE=Symbol.for("@homepages/concrete:fill:section");function D_(e){return e?.[FE]}function De(e){if(!(typeof e!="object"||e===null))return e[kl]}var N_=["Basement","Ground","1st floor","2nd floor","3rd floor","4th floor","Penthouse"];var DE=["text","number","select","image","list","poi","url","date","email","phone","address","video","tour","document","media"],NE=[],U_=[...DE,...NE];var xh=["id","slot","index","def","value","present","enclosing"],ti=["image","video","tour","document"];function Xe(e){return ti.includes(e)}function ni(e){return e==="media"||Xe(e)}var ri={cutout:{label:"Background removed",kinds:["image"],site:"holder",options:{enclosed:{required:!1,type:"string",values:["clear","keep"]}}},autocrop:{label:"Cropped to its subject",kinds:["image"],site:"holder",options:{brief:{required:!0,type:"string"}}},probe:{label:"Probed",kinds:["image","video","document"],site:"kind",options:{}},understand:{label:"Understood",kinds:["image","video","document","tour"],site:"kind",options:{}},preview:{label:"Preview",kinds:["image","video","document"],site:"kind",options:{}},ladder:{label:"Renditions",kinds:["image","video","document"],site:"kind",options:{}},transcode:{label:"Transcoded",kinds:["video"],site:"kind",options:{}},poster:{label:"Poster",kinds:["video","document"],site:"kind",options:{}},rasterize:{label:"Pages rasterized",kinds:["document"],site:"kind",options:{}},fetch:{label:"Link fetched",kinds:["video","tour"],site:"kind",options:{}},tour_details:{label:"Tour details",kinds:["tour"],site:"kind",options:{}},crop:{label:"Cut to its crop",kinds:["image"],site:"place",options:{}}},Sl=Object.keys(ri),UE=Sl.filter(e=>ri[e].site==="holder"),M6=Sl.filter(e=>ri[e].site==="kind");function ME(e){return typeof e=="string"&&Object.hasOwn(ri,e)}function CE(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;let{kind:t,verb:r}=e;return t==="process"&&ME(r)?e:null}function _h(e){let t=ri[e.verb],r=Object.keys(t.options),o=r.length>0?`it takes ${r.map(n=>`\`${n}\``).join(", ")}`:"it takes none";for(let[n,i]of Object.entries(e)){if(n==="kind"||n==="verb"||i===void 0)continue;if(n==="reads")return`\`${e.verb}\` takes no \`reads\` \u2014 a process is about one media value, never the property`;let s=t.options[n];if(s===void 0){let a=n==="aspect"&&e.verb==="autocrop"?"; its aspect is the holder's `crop` \u2014 the aspect it locks, free form where it locks none":"";return`\`${e.verb}\` takes no option "${n}" \u2014 ${o}${a}`}if(s.values!==void 0){if(typeof i!="string"||!s.values.includes(i))return`\`${e.verb}\`'s \`${n}\` is one of ${s.values.map(a=>`"${a}"`).join(", ")}`;continue}if(typeof i!==s.type||typeof i=="string"&&i.trim()==="")return`\`${e.verb}\`'s \`${n}\` is a non-empty ${s.type}`}for(let[n,i]of Object.entries(t.options))if(i.required&&e[n]===void 0)return`\`${e.verb}\` requires \`${n}\``;return null}function Ce(e){let{type:t,kinds:r}=e;if(t==="media"){let o=Array.isArray(r)?r.filter(n=>typeof n=="string"&&Xe(n)):[];return o.length>0?o:ti}return typeof t=="string"&&Xe(t)?[t]:[]}function Il(e){let{kinds:t,process:r}=e;if(t!==void 0){if(e.type!=="media")return"declares `kinds` \u2014 only `media()` leaves its kind open; a kind's own builder fixes it";if(!Array.isArray(t)||t.length===0||!t.every(i=>typeof i=="string"&&Xe(i)))return`declares \`kinds\` ${JSON.stringify(t)} \u2014 a non-empty list of ${ti.join(", ")}`}if(r===void 0)return null;let o=UE.map(i=>`process.${i}()`).join(", ");if(!Array.isArray(r)||r.length===0)return`declares \`process\` ${JSON.stringify(r)} \u2014 a non-empty list of processes (${o})`;let n=new Set;for(let i of r){let s=CE(i);if(s===null)return`processes ${JSON.stringify(i)}, which is no process (${o})`;let{verb:a}=s,c=ri[a];if(c.site==="kind")return`processes "${a}", which every ${c.kinds.join(", ")} gets from birth on its kind's row \u2014 never a holder's to declare`;if(c.site==="place")return`processes "${a}", which every ${c.kinds.join(", ")} place gets wherever its value carries a crop \u2014 never a holder's to declare`;if(n.has(a))return`processes "${a}" twice \u2014 a holder declares each process once`;n.add(a);let l=_h(s);if(l!==null)return`processes "${a}" with options that do not fit: ${l}`;let u=Ce(e).filter(d=>!c.kinds.includes(d));if(u.length>0)return`processes "${a}", which applies to ${c.kinds.join(", ")} and not to ${u.join(", ")}`}return null}var LE=new Set(["application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","text/plain","text/csv"]);function M_(e){let t=(e.split(";")[0]??"").trim().toLowerCase();return t.startsWith("image/")?"image":t.startsWith("video/")?"video":LE.has(t)?"document":null}function C_(e){let t=Ns(e);if(t===null)return null;let r=$h[t].kind;return r==="tour"||r==="video"?r:null}var zr=["visibility","variant"];var $h={matterport:{kind:"tour",label:"Matterport",pattern:/(^|\.)matterport\.com$/i,strategy:"api"},biganto:{kind:"tour",label:"Biganto",pattern:/(^|\.)biganto\.com$/i,strategy:"opengraph"},iguide:{kind:"tour",label:"iGUIDE",pattern:/(^|\.)youriguide\.com$/i,strategy:"opengraph"},kuula:{kind:"tour",label:"Kuula",pattern:/(^|\.)kuula\.co$/i,strategy:"opengraph"},momento360:{kind:"tour",label:"Momento360",pattern:/(^|\.)momento360\.com$/i,strategy:"opengraph"},cloudpano:{kind:"tour",label:"CloudPano",pattern:/(^|\.)cloudpano\.com$/i,strategy:"none"},asteroom:{kind:"tour",label:"Asteroom",pattern:/(^|\.)asteroom\.com$/i,strategy:"none"},zillow3d:{kind:"tour",label:"Zillow 3D Home",pattern:/(^|\.)zillow\.com$/i,path:/^\/view-3d-home\//i,strategy:"none"},youtube:{kind:"video",label:"YouTube",pattern:/(^|\.)(youtube\.com|youtu\.be)$/i,strategy:"oembed"},vimeo:{kind:"video",label:"Vimeo",pattern:/(^|\.)vimeo\.com$/i,strategy:"oembed"},zillow:{kind:"listing",label:"Zillow",pattern:/(^|\.)zillow\.com$/i,strategy:"none"},redfin:{kind:"listing",label:"Redfin",pattern:/(^|\.)redfin\.com$/i,strategy:"none"},dropbox:{kind:"file",label:"Dropbox",pattern:/(^|\.)dropbox\.com$/i,strategy:"none"},drive:{kind:"file",label:"Google Drive",pattern:/^drive\.google\.com$/i,strategy:"none"},maps:{kind:"map",label:"Google Maps",pattern:/(^|\.)google\.com$/i,path:/^\/maps(\/|$)/i,strategy:"none"}};function Ns(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!=="http:"&&t.protocol!=="https:")return null;for(let[r,o]of Object.entries($h))if(o.pattern.test(t.hostname)&&!(o.path&&!o.path.test(t.pathname)))return r;return null}function kh(e){if(typeof e!="string"||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=new Date(`${e}T00:00:00Z`);return!Number.isNaN(t.getTime())&&t.toISOString().slice(0,10)===e}function Sh(e){return typeof e=="string"&&/^[^\s@]+@[^\s@.]+(\.[^\s@.]+)+$/.test(e)}function Ih(e){if(typeof e!="string"||!/^\+?[\d\s().-]+$/.test(e))return!1;let t=e.replace(/\D/g,"").length;return t>=7&&t<=15}var ZE="badge=0&autopause=0&player_id=0&title=0&byline=0&portrait=0&sidedock=0&vimeo_logo=0&pip=0&chromecast=0&quality_selector=0&progress_bar=1";function L_(e){let t=e.trim();if(!t)return null;let r=Ns(t);if(r==="vimeo"){let o=t.match(/vimeo\.com\/(?:.*\/)?(\d+)/);return o?`https://player.vimeo.com/video/${o[1]}?${ZE}`:null}if(r==="youtube"){let o=t.match(/youtu\.be\/([A-Za-z0-9_-]{11})/)??t.match(/[?&]v=([A-Za-z0-9_-]{11})/)??t.match(/youtube\.com\/(?:embed|shorts)\/([A-Za-z0-9_-]{11})/);return o?`https://www.youtube.com/embed/${o[1]}?rel=0`:null}return null}function Z_(e){let t=e.trim();if(!t)return null;let r=Ns(t);if(r==="matterport"){let o=new URL(t).searchParams.get("m");return o!==null&&/^[A-Za-z0-9]+$/.test(o)?`https://my.matterport.com/show/?m=${o}&nt=1`:null}return r!==null&&VE.has(r)?t:null}var VE=new Set(["biganto","iguide","kuula","momento360","cloudpano","asteroom","zillow3d"]);var oi=["master","poster","encode"],ii=["crop","cutout","mask_white","mask_black"],Rh=["master","crop","cutout","mask_white","mask_black","poster","encode"];function jh(e){return e!==null&&!(e.x<=0&&e.y<=0&&e.width>=1&&e.height>=1)}var V_="job_failed";function H_(e){return e.url!==null?e.url.replace(/^[a-z][a-z0-9+.-]*:\/\//i,""):e.key?.split("/").pop()??e.id}function Ol(e,t){let{id:r,renditions:o,...n}=e,i=e.kind==="image";return{...n,id:t.id,file:t.file,crop:i?t.crop:null,name:t.name!==null&&t.name!==""?t.name:H_(e),renditions:{...o,crop:i?t.renditions.crop:null,cutout:i?t.renditions.cutout:null,mask_white:i?t.renditions.mask_white:null,mask_black:i?t.renditions.mask_black:null}}}function Rl(e){let{id:t,file:r,crop:o,name:n,renditions:i,...s}=e,{crop:a,cutout:c,mask_white:l,mask_black:u,...d}=i;return{file:{...s,id:r,renditions:d},value:{id:t,file:r,crop:o,name:n,renditions:{crop:a,cutout:c,mask_white:l,mask_black:u}}}}function Ph(e){return e.url===null?"upload":"link"}function Kt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Us(e){if(!Kt(e))return!1;let{id:t,kind:r,renditions:o}=e;return typeof t=="string"&&typeof r=="string"&&Xe(r)&&Kt(o)}function si(e){return Kt(e)&&typeof e.id=="string"&&typeof e.file=="string"&&Kt(e.renditions)&&!("kind"in e)&&!("picked"in e)}function jl(e){return Kt(e)&&typeof e.file=="string"&&e.file!==""&&!si(e)&&!Us(e)}function Hn(e){return Kt(e)&&typeof e.media=="string"&&e.media!==""}function zt(e){if(Kt(e)){if(Hn(e))return e.media;if(si(e)||Us(e))return e.id;if(jl(e))return e.picked??e.file}}function Qe(e){if(Hn(e))return e.media;if(jl(e))return e.file}function Oh(e,t){if(Array.isArray(e))for(let r of e)Oh(r,t);else if(si(e))t.has(e.id)||t.set(e.id,e);else if(Kt(e)&&!Us(e))for(let r of Object.values(e))Oh(r,t)}function Pl(e){let t=new Map;for(let[r,o]of Object.entries(e))r!=="files"&&Oh(o,t);return t}function HE(e,t){return Object.hasOwn(e.files,t)?e.files[t]:void 0}function Eh(e,t){let r=HE(t,e.file);return r===void 0?null:Ol(r,e)}function El(e){let t={};for(let[r,o]of Pl(e)){let n=Eh(o,e);n!==null&&(t[r]=n)}return t}function Th(e){return Object.hasOwn(e,"crop")||e.renditions!==void 0}function Ah(e,t){let r=Object.hasOwn(t,"crop"),o=t.renditions??{},n=r?null:e.renditions,i=Object.fromEntries(ii.map(s=>[s,Object.hasOwn(o,s)?o[s]??null:n?.[s]??null]));return{crop:r?t.crop??null:e.crop,renditions:i}}function B_(e,t){if(e===null||e.kind!=="image"||!Th(t))return e;let r=Ah({crop:e.crop,renditions:e.renditions},t);return{...e,crop:r.crop,renditions:{...e.renditions,...r.renditions}}}function zh(e,t){return Th(t)?{...e,...Ah({crop:e.crop,renditions:e.renditions},t)}:e}function Fh(e,t){let r,o=i=>(r??=El(t),Object.hasOwn(r,i)?r[i]:null),n=i=>{if(Array.isArray(i))return i.flatMap(a=>{let c=n(a);return c===null&&a!==null?[]:[c]});if(!Kt(i)||Us(i))return i;if(si(i))return Eh(i,t);if(jl(i))return o(i.file);if(Hn(i))return B_(o(i.media),i);let s={};for(let[a,c]of Object.entries(i))s[a]=n(c);return s};return n(e)}function qt(e){if(Array.isArray(e))return e.map(qt);if(!Kt(e))return e;if(Us(e)||si(e))return{media:e.id};if(Hn(e)){let{crop:r,renditions:o,...n}=e;return n}let t={};for(let[r,o]of Object.entries(e))t[r]=qt(o);return t}var Ms="property.uploads";function Ft(e){if(typeof e=="string"&&e!=="")return[e];if(!(!Array.isArray(e)||e.length===0||!e.every(t=>typeof t=="string"&&t!=="")))return[...e]}function fn(e){let t=Ce(e);if(t.length===0)return null;let r=Ft(e.from);return r===void 0?{kinds:t}:{kinds:t,from:r}}function Dh(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function JE(e){if(zt(e)!==void 0||!Dh(e))return e;for(let t of Object.values(e))if(zt(t)!==void 0)return t}function Nh(e,t){let[r,...o]=t.split(".");if(r!=="property"||o.length===0)return null;let n=e;for(let i of o)if(n=Array.isArray(n)?n.find(s=>Dh(s)&&s.id===i):Dh(n)&&Object.hasOwn(n,i)?n[i]:void 0,n===void 0)return null;return Array.isArray(n)?n.flatMap(i=>{let s=JE(i),a=zt(s);return a===void 0?[]:[{id:a,value:s}]}):null}function J_(e,t){return Nh(e,t)?.map(({id:r})=>r)??null}function WE(e,t){let r=Pl(e),o=new Set,n=[];for(let i of Ft(t.from)??[])for(let{id:s,value:a}of Nh(e,i)??[]){if(o.has(s))continue;let c=r.get(s),l=c===void 0||!Object.hasOwn(e.files,c.file)?void 0:e.files[c.file];if(c===void 0||l===void 0||!t.kinds.includes(l.kind))continue;o.add(s);let u=Hn(a)?zh(c,a):c;n.push({id:s,value:u,file:l,list:i})}return n}function KE(e,t){return WE(e,t).map(({value:r,file:o,list:n})=>({record:Ol(o,r),list:n}))}function Fr(e,t){return KE(e,t).map(({record:r})=>r)}function W_(e){if(e===null||typeof e!="object")return null;let t=e;return t.type!=="media"||t.kinds===void 0||Il({type:"media",kinds:t.kinds})!==null||t.from!==void 0&&(!Array.isArray(t.from)||Ft(t.from)===void 0)?null:fn(t)}function K_(e){return{type:"media",kinds:[...e.kinds],...e.from===void 0?{}:{from:[...e.from]}}}function q_(e,t){let r=new Set(e),o=t.filter(s=>r.has(s)),n=new Set(o),i=0;return e.map(s=>n.has(s)?o[i++]:s)}var ai=new Map;function Mh(e){ai.set(e.home,e)}function Tl(e){let t=ai.get(e);if(t===void 0)throw new Error(`fact registry: the ${e} registry is not declared yet \u2014 import @homepages/template-contracts/fact-registry (or ./fact-keys, ./table-members) before reading it.`);return t}var Y_=new Set(["text","select","email","phone","url","date"]);function Bn(e){switch(e.type){case"number":case"image":case"address":return e.type;case"list":return qE(e.element);default:return Y_.has(e.type)?"text":null}}function qE(e){return e.type==="object"?"row_list":e.type==="image"?"image_list":e.type==="number"?"number_list":Y_.has(e.type)?"text_list":null}function Cs(e){if(e.type==="list"){let r=e.element;if(r.type!=="object")return Cs(r);for(let o of Object.values(r.fields)){let n=Cs(o);if(n!==void 0)return n}return}let t=e.from===void 0?null:fn(e);return t?.from===void 0?void 0:t}function GE(e){if(e.type!=="list")return!1;let t=e.element.type;return Xe(t)||t==="media"}function X_(e){return Object.entries(e.pages).flatMap(([t,r])=>GE(r.declaration)?[`${e.home}.${t}`]:[])}function Q_(e){return Tr(e.source)}var G_=new WeakMap;function Ch(e){let t=G_.get(e);return t===void 0&&(t=YE(e),G_.set(e,t)),t}function YE(e){let t=new Map;for(let[r,o]of Object.entries(e.pages)){let n=o.declaration;if(n.type==="list")continue;let i=`${e.home}.${r}`;if(n.type==="address"){t.set(i,{declaration:n,value_type:"address"});for(let s of Pr)t.set(`${i}.${s}`,{declaration:n,value_type:Lh(s)});continue}t.set(i,{declaration:n,value_type:XE(i,n)})}return t}function XE(e,t){if(t.type==="image")return"image";if(Xe(t.type)||t.type==="media")throw new Error(`fact registry: ${e} is a single ${t.type} \u2014 a top-level media fact is an image, the one media value a slot binds.`);return t.type==="number"?"number":"text"}function Lh(e){return e==="latitude"||e==="longitude"?"number":"text"}function QE(e,t){if(t.type!=="list")return null;let r=t.element;return r.type==="object"?e:r.type==="row"?r.from.slice(r.from.indexOf(".")+1):null}var Uh;function e$(){if(Uh!==void 0)return Uh;Tl("library");let e=new Map;for(let t of ai.values())for(let[r,o]of Object.entries(t.pages)){let n=QE(r,o.declaration);n!==null&&e.set(`${t.home}.${r}`,n)}return ai.has("property")&&ai.has("library")&&(Uh=e),e}function Dr(){return[...new Set(e$().values())]}function ve(e){return typeof e=="string"?e$().get(e)??null:null}function Zh(e){return e?.kind==="home"?ve(e.key):null}function Jn(e){for(let t of ai.values()){let r=Object.hasOwn(t.pages,e)?t.pages[e]:void 0;if(r?.declaration.type==="list"&&r.declaration.element.type==="object")return t.home}throw new Error(`fact registry: no linked registry declares a table "${e}"`)}function Vh(e){return`property.${e}`}function Hh(e,t){let r=e.pages[t],o=r?.declaration.type==="list"?r.declaration.element:void 0;if(o?.type!=="object")throw new Error(`fact registry: the ${e.home} registry declares no list of objects "${t}"`);return o.fields}function Bh(e){return Hh(Tl(Jn(e)),e)}function Jh(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function pn(e,t){let r=Jh(Bh(e),t);return r===void 0?void 0:Bn(r)}function Ls(e){if(typeof e!="string")return null;let t=e.lastIndexOf(".");if(t<=0)return null;let r=ve(e.slice(0,t));if(r===null)return null;let o=e.slice(t+1);return pn(r,o)==="row_list"?{table:r,member:o}:null}function ci(e){if(typeof e!="string")return null;let t=e.lastIndexOf(".");if(t<=0)return null;let r=e.slice(0,t),o=ve(r);if(o===null)return null;let n=e.slice(t+1);return pn(o,n)===void 0?null:{table:o,tableKey:r,member:n}}var Al=["type","label","from","source","locked","when"],t$=new Set(Al),zl=Symbol.for("@homepages/concrete:table-of");function Fl(e,t){return Object.defineProperty(e,zl,{value:t,enumerable:!1})}function Vs(e){if(typeof e!="object"||e===null)return null;let t=e[zl];return typeof t=="string"?t:null}function eT(e){return Object.keys(Bh(e))}function Zs(e,t){return Object.freeze({kind:"row",field:t,[yh]:e})}function tT(e,t){return new Proxy(Zs(e,t),{get(r,o,n){return typeof o=="string"&&!(o in r)&&Er(o)?Zs(e,`${t}.${o}`):Reflect.get(r,o,n)}})}var n$=Symbol.for("@homepages/concrete:row:definition");function mt(e){let t=e[n$];return typeof t=="object"&&t!==null?t:e}var nT=new Set(["then","toJSON","$$typeof","asymmetricMatch","nodeType","tagName","@@iterator"]);function r$(e,t,r=[]){let o=t===null?null:new Set(eT(t)),n=new Proxy(e,{get(i,s,a){if(s===n$)return i;if(typeof s!="string")return Reflect.get(i,s,a);if(t!==null&&o!==null){let c=[t,...r],l=c.map(d=>d===t&&!o.has(s)?void 0:pn(d,s));if(l.every(d=>d===void 0))return Reflect.get(i,s,a);let u=l.findIndex(d=>d===void 0||d!==l[0]);if(u===-1)return l[0]==="address"?tT(n,s):Zs(n,s);if(s in i||t$.has(s))return Reflect.get(i,s,a);throw new Error(`row: "${String(i.label)}" reads the member "${s}", which its \`from\` table ${c[u]} ${l[u]===void 0?"lacks":"holds at another kind"} \u2014 every table a row names carries every member its readers read, at one kind.`)}return s in i||t$.has(s)?Reflect.get(i,s,a):nT.has(s)?void 0:Zs(n,s)}});return n}function o$(e){let t=new Proxy(e,{get(r,o,n){return typeof o=="string"&&!(o in r)&&Er(o)?Zs(t,o):Reflect.get(r,o,n)}});return t}function i$(e,t){let r=e.map(t);return r.some((o,n)=>o!==e[n])?r:void 0}function s$(e,t){let r=e.reads===void 0?void 0:i$(e.reads,t),o=e.requires===void 0?void 0:i$(e.requires,t);return r===void 0&&o===void 0?e:{...e,...r===void 0?{}:{reads:r},...o===void 0?{}:{requires:o}}}function mn(e,t){let r=mt(e),o,n=r.source;if(n!==void 0)if(pt(n)){let s=s$(n,t);s!==n&&(o={...r,source:s})}else{let s=t(n);s!==n&&(o={...r,source:s})}let i=De(r);if(i!==void 0){let s=!1,a=i.map(c=>{let l=s$(c,t);return l!==c&&(s=!0),l});s&&(o={...o??r,[kl]:a})}return o??r}function a$(e){return t=>{let r=dn(t);if(r===void 0)return t;let o=e.get(r);return o===void 0?t:{kind:"row",slot:o,field:t.field}}}var c$=new Set(["row","address"]);function l$(e){let t=new Map;for(let[r,o]of Object.entries(e))typeof o=="object"&&o!==null&&c$.has(o.type)&&t.set(o,r);return t}function u$(e,t,r){let o=[e.source];mn(e,n=>(o.push(n),n));for(let[n,i]of t)if(!(n===e||i===r))for(let s of Al){let a=n[s];if(a!==void 0&&o.includes(a))return`${i}.${s}`}}function d$(e){let t=e.slice(e.indexOf(".")+1);return`reads \`${e}\`, which is the row's own \`${t}\`, not a member \u2014 a row's ${Al.map(r=>`\`${r}\``).join(", ")} are its slot definition's, and its table has no member named \`${t}\`.`}function Wn(e){return c$.has(e.type)?{...mt(e)}:e}function Kh(e,t){for(let r of At(t,e)??[])if(!(r.verb!=="pick"||r.of===void 0))throw new Error(`${e}'s \`fill.pick\` states \`of\` \u2014 a pick chooses from its holder's \`from\`; remove \`of\` and name the candidates in \`from\`.`)}function rT(e){return _t(e)?{kind:"section",section:e.section,slot:e.slot}:Ae(e)?{kind:"sibling",of:e}:Re(e)?{kind:"home",key:e.key}:e}function Dt(e){return Hs(e,rT)}function oT(e,t,r){if(!(t!==!0||r===void 0)){if(pt(r)){if(r.requires!==void 0&&r.requires.length>0)return;throw new Error(`${e} is \`required\` and sourced by a \`compute()\` naming no \`requires\` \u2014 nothing to require. Name the reads the value cannot do without: \`compute({ reads, requires: [fact.property.address] }, \u2026)\`.`)}if(_t(r)||Ae(r)||ei(r))throw new Error(`${e} is \`required\` and mirrors another slot \u2014 a mirror requires its upstream; mark that slot \`required\` instead.`)}}function Hs(e,t){let r=e.source;oT(e.label??"a slot",e.required,r);let o=r!==void 0&&At(r,e.label??"a slot")===void 0;return{...e.locked===!0?{locked:!0}:{},...e.required===!0?{required:!0}:{},...o?{source:t(r)}:{},...F_(r),...e.label!==void 0?{label:e.label}:{},...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...e.when!==void 0?{when:e.when}:{}}}function Wh(e){return t=>({type:"text",size:e,...Dt(t),...t.cap!==void 0?{cap:t.cap}:{}})}var Le={short:Wh("short"),medium:Wh("medium"),long:Wh("long")};function Ue(e){return{type:"number",...Dt(e),...e.thousandsSep!==void 0?{thousandsSep:e.thousandsSep}:{},...e.decimals!==void 0?{decimals:e.decimals}:{},...e.maxDigits!==void 0?{maxDigits:e.maxDigits}:{}}}function iT(e){return{type:"select",...Dt(e),...e.creatable!==void 0?{creatable:e.creatable}:{}}}function sT(e){if(Re(e.source))throw new Error(`select: "${e.label}" declares both \`from\` and a fact \`source\` \u2014 a select takes exactly one set of choices.`);return Kh(`select: "${e.label}"`,e.source),{type:"select",...Dt(e),values:[...e.from],...e.creatable!==void 0?{creatable:e.creatable}:{}}}function aT(e,t){if(Wt(t.source)&&t.source.verb!=="pick")throw new Error(`select: a display entry is filled by \`fill.pick\` \u2014 the model picks one of its cases \u2014 never \`fill.${t.source.verb}\`.`);return Kh("select: a display entry",t.source),{cases:[...e],...t.locked===!0?{locked:!0}:{},...t.source!==void 0?{source:t.source}:{}}}function cT(e){if(Array.isArray(e))throw new Error("select: takes one options object \u2014 write the choices as `from`: `select({ from: [...], \u2026 })`.");if(e.options!==void 0)throw new Error("select: declares `options` \u2014 a select names its choices in `from`: `select({ from: [...], \u2026 })`.");return e.label===void 0&&Array.isArray(e.from)?aT(e.from,e):e.from!==void 0?sT(e):iT(e)}var Bs=cT;function Nr(e){return{type:"url",...Dt(e),...e.accepts!==void 0?{accepts:e.accepts}:{}}}function qh(e){return{type:"date",...Dt(e)}}function f$(e){return{type:"email",...Dt(e)}}function p$(e){return{type:"phone",...Dt(e)}}function Dl(e={}){return o$({type:"address",...Dt(e)})}function m$(e,t){let r=`${e}: "${t.label??e}"`;Kh(r,t.source);let o=Il({type:e,kinds:t.kinds,process:t.process});if(o!==null)throw new Error(`${r} ${o}.`);let n=At(t.source,r),i=t.source!==void 0&&n===void 0&&!pt(t.source);if(i&&t.from!==void 0)throw new Error(`${r} picks \`from\` a media list and declares a \`source\` \u2014 a slot bound to a fact holds what that fact holds.`);if((i||pt(t.source))&&t.process!==void 0)throw new Error(`${r} declares \`process\` beside a \`source\` that derives its value \u2014 a derived slot holds what it derives from, processed where that is declared.`);if(n?.some(c=>c.verb==="pick")===!0&&t.from===void 0)throw new Error(`${r} is picked by a \`fill.pick\` and names no \`from\` \u2014 a pick chooses from its holder's \`from\` (\`from: fact.property.property_media\`); a media declaration without one owns its media.`);let a=lT(r,e,t.kinds,t.from)?.map(c=>Re(c)?c.key:c);return{...a!==void 0?{from:a.length===1?a[0]:a}:{},...t.process!==void 0?{process:t.process.map(c=>({...c}))}:{}}}function lT(e,t,r,o){if(o===void 0)return;let n=Array.isArray(o)?o:[o];if(n.length===0)throw new Error(`${e} declares \`from: []\` \u2014 name the media list it picks from, or omit \`from\` and the declaration owns its media.`);let i=Ce({type:t,kinds:r}),s=new Set;for(let a of n){let c=typeof a=="object"&&a!==null&&!Re(a),l=Re(a)?a.key:c&&"declaration"in a?a.declaration:a;if(s.has(l))throw new Error(`${e} picks \`from\` one media list twice \u2014 each list is named once; a media value two lists hold is one candidate, attributed to the first.`);if(s.add(l),!c)continue;let u=Ce(l.element);if(u.length>0&&!i.some(d=>u.includes(d)))throw new Error(`${e} picks \`from\` a list of ${u.join(", ")}, whose items can never be ${i.join(" or ")} \u2014 each list it picks from holds items of its kinds.`)}return n}function gn(e={}){return{type:"image",...Dt(e),...e.crop!==void 0?{crop:e.crop}:{},...m$("image",e)}}function Nl(e={}){return{type:"media",...Dt(e),...e.kinds!==void 0?{kinds:[...e.kinds]}:{},...m$("media",e)}}var Yh=Symbol.for("@homepages/concrete:object:declared-fields");function Kn(e){return e[Yh]}function Xh(e,t){let r=Kn(t);return r!==void 0&&Object.defineProperty(e,Yh,{value:r,enumerable:!1}),e}var g$="a label is a source, as a text slot takes one",Gh="`label: text.short({ cap: 60, source: fill.write({ reads, brief }) })`",uT=new Set(["type","size","cap","locked"]);function dT(e,t,r){if(typeof t=="string")throw new Error(`${e} declares the label ${JSON.stringify(t)} \u2014 ${g$}: write \`label: compute(() => ${JSON.stringify(t)})\`.`);if(Ae(t)){let o=Object.entries(r).find(([,n])=>n===t);if(o===void 0)return fT(e,t);if(t.type!=="text"&&t.type!=="address")throw new Error(`${e} label names its field "${o[0]}", a "${t.type}" \u2014 a label names a text or an address field.`);return{field:o[0]}}if(Ar(t)){let o=Wt(t)?`\`fill.${t.verb}\``:"list of fills";throw new Error(`${e} label is a bare ${o} \u2014 the label is the fill's holder, so it states the kind the fill writes: ${Gh}.`)}return Le.short({locked:!0,source:t})}function fT(e,t){let r=De(t);if(r===void 0||r.some(s=>s.verb!=="write")||t.type!=="text")throw new Error(`${e} declares a slot as its label that is none of its fields \u2014 ${g$}: write what that slot read as the label (\`label: comp.address.street\`, \`label: compute(() => "Listing agent")\`), a written label as ${Gh}; a title the user edits is a field, which the label names by its const.`);let o=Object.keys(t).filter(s=>!uT.has(s));if(o.length>0)throw new Error(`${e} label is a written text slot declaring ${o.map(s=>`\`${s}\``).join(", ")} \u2014 a label states only its kind and cap: ${Gh}; a title the user edits is a field, which the label names by its const.`);let{size:n,cap:i}=t;return Le[n]({locked:!0,source:r.length===1?r[0]:r,...i!==void 0?{cap:i}:{}})}function pT(e){let{type:t,element:r}=e;if(t==="object")return"an object \u2014 an object never holds another; flatten its fields into this one";if(t==="list"&&r?.type==="object")return mT(e);if(t==="list"&&r?.type==="row")return"a list of rows \u2014 declare the selection at the top level instead"}var Js="declare the list at the top level instead";function mT(e){let t=De(e);if(t!==void 0&&t.some(n=>n.verb!=="pick")||t===void 0&&Ar(e.source))return`a list of objects declaring a fill other than a pick \u2014 no fill but a pick writes a list inside an object; ${Js}`;let r=e.source;if(Re(r))return`a list of objects sourced by the fact "${r.key}" \u2014 its items carry their own minted ids, so it lists a row's member, a \`compute()\` or authored items; ${Js}`;if(_t(r)||ei(r)||Ae(r))return`a list of objects sourced by another list slot \u2014 its items carry their own minted ids, so it lists a row's member, a \`compute()\` or authored items; ${Js}`;let o=e.element.fields;for(let[n,i]of Object.entries(o)){let s=gT(i,o);if(s!==void 0)return`a list of objects whose item field "${n}" is ${s}`}}function gT(e,t){if(e.type==="list"&&e.element?.type==="object")return"a list of objects \u2014 a list of objects nests one level; flatten the inner list's fields into this item or declare it beside the outer list";if(De(e)!==void 0)return`filled \u2014 no fill writes into a list inside an object; ${Js}`;let r=e.source;if(r===void 0)return;if(pt(r))return`a \`compute()\` \u2014 an item of a list inside an object reads its element, or a row \`from\` its member; ${Js}`;let{kind:o,slot:n}=r;if(o==="element"&&e.type==="row"&&ve(e.from)!==null)return"a table's row holding the element \u2014 the element of a list inside an object is a member's item: hold it in a row `from` that member (`row({ label, from: unit.floor_plans, source: entry })`)";if(o!=="element"&&!(e.type!=="row"&&o==="row"&&typeof n=="string"&&t[n]?.type==="row"))return"bound to something outside its item \u2014 an item of a list inside an object reads its element, a row `from` its member, or a row beside it"}function li(e){let t="object";if(e.source!==void 0)throw new Error(`${t} declares \`source\`, but an object is a pure container with no value of its own \u2014 declare it on the field that holds the value.`);if(Object.hasOwn(e.fields,"label")&&e.fields.label!==e.label)throw new Error(`${t} declares a field keyed "label" \u2014 the key is reserved for the object's label: write its source as \`label\`, beside \`fields\`.`);let r=xh.find(u=>Object.hasOwn(e.fields,u));if(r!==void 0)throw new Error(`${t} field "${r}" is named like its binding's own \`${r}\` \u2014 a field is read straight off its object's binding, which owns ${xh.map(u=>`\`${u}\``).join(", ")}. Rename the field.`);let o=e.label===void 0?void 0:dT(t,e.label,e.fields),n=o!==void 0&&!("type"in o)?o:void 0,i={...o===void 0||n!==void 0?{}:{label:o},...e.fields};if(Object.keys(i).length===0)throw new Error(`${t} declares no fields \u2014 an object groups at least one.`);for(let[u,d]of Object.entries(i)){let f=pT(d);if(f!==void 0)throw new Error(`${t} field "${u}" is ${f}.`);if(u!=="label"&&d.label===void 0)throw new Error(`${t} field "${u}" declares no \`label\` \u2014 every field of an object states the name the editor shows it by.`)}let s=l$(i);for(let[u,d]of Object.entries(i)){let f=u$(d,s);if(f!==void 0)throw new Error(`${t} field "${u}" ${d$(f)}`)}let a=a$(s),c={};for(let[u,d]of Object.entries(i))c[u]=Wn(mn(d,a));let l={type:"object",...e.locked===!0?{locked:!0}:{},...n!==void 0?{label:n}:{},fields:c,...e.when!==void 0?{when:e.when}:{}};return Object.defineProperty(l,Yh,{value:i,enumerable:!1}),l}function Qh(e){let t=e.indexOf("/");return t===-1?e:e.slice(t+1)}function Ws(e,t=[]){let r=new Map;for(let s of e)for(let a of s.sections){let c=Qh(a.section);r.has(c)||r.set(c,a.instance_id)}let o=new Set(t.filter(s=>!s.enabled).map(s=>s.page_id)),n=s=>{let a=r.get(s);return a===void 0||e.filter(l=>l.sections.some(u=>u.instance_id===a)).every(l=>o.has(l.id))?void 0:a};function i(s,a){if(s.kind==="home")return{layer:"home",key:s.key};let c=s.section===Qh(a.section)?a.instanceId:n(s.section);return c===void 0?void 0:{layer:"section",instanceId:c,slot:s.slot}}return{readable:n,locate:i}}function ty(e){if(e.type==="object")return null;let t=e.source;if(t===null||typeof t!="object")return null;let{kind:r,section:o,slot:n}=t;return r==="section"&&typeof o=="string"&&typeof n=="string"?{kind:"section",section:o,slot:n}:null}var Ks=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function ui(e,t){if(Object.hasOwn(e,t))return e[t];let r=t.indexOf(".");if(r<=0)return;let o=e[t.slice(0,r)];if(o?.type!=="object"||!Ks(o.fields))return;let n=t.slice(r+1);return Object.hasOwn(o.fields,n)?o.fields[n]:void 0}function hT(e,t,r){if(t.siblings!==void 0&&Object.hasOwn(t.siblings,r))return{path:t.container===void 0?r:`${t.container}.${r}`,def:t.siblings[r],sibling:!0};if(t.nested===!0)return;let o=ui(e,r);return o===void 0?void 0:{path:r,def:o,sibling:!1}}function ny(e){return e==="row"||e==="address"}function Ur(e,t,r){let o=hT(e,t,r);if(!(o===void 0||!ny(o.def.type)))return{...o,kind:o.def.type}}function y$(e,t,r){let o=Ur(e,t,r.slot);if(o===void 0)return;let n=o.kind==="row"?Ml(o.def):null;return n===null?{layer:"section",slot:o.path,member:r.field}:{layer:"home",row:o.path,table:n,member:r.field}}function Ml(e){return ve(e.from)}function gt(e){if(!Array.isArray(e.from)){let t=Ml(e);return t===null?[]:[t]}return e.from.flatMap(t=>ve(t)??[])}function qn(e,t){let r=new Set,o=[];for(let n of t){let i=e[n];for(let s of i){let a=Ul(s.id);a===null||r.has(a)||(r.add(a),o.push({id:a,table:n}))}}return o}function di(e,t,r){if(t.length>1&&r!==null){let o=qn(e,t).find(n=>n.id===r);if(o!==void 0)return o.table}return t[0]??null}function yT(e){if(e===void 0)return;if(h$(e.source))return e;if(e.type!=="object"||!Ks(e.fields))return;let t=Object.values(e.fields).filter(r=>h$(r.source));return t.length===1?t[0]:void 0}function ry(e){let t=yT(e);return t?.type==="row"?gt(t):[]}function h$(e){return Ks(e)&&e.kind==="element"}function v$(e,t){return b$(ey(e,e.section,e.slots,t,new Set))}function Mr(e,t){return b$(vT(e,t))}function vT(e,t){return w$(e,e.section,e.slots,t,new Set)}function b$(e){return e.length===1?e[0]:null}function ey(e,t,r,o,n){let i=`${t??""}\0${o}`;if(n.has(i))return[];n.add(i);let s=ui(r,o);return s?.type==="row"?gt(s):s?.type==="list"?w$(e,t,r,s,n):[]}function w$(e,t,r,o,n){let i=Ks(o.source)?o.source:void 0;if(i===void 0||i.kind==="authored"||i.kind==="derived")return ry(o.element);let s=Zh(i);if(s!==null)return[s];let{kind:a,section:c,slot:l}=i;if(a!=="section"||typeof c!="string"||typeof l!="string")return[];if(c===t)return ey(e,t,r,l,n);let u=e.sectionSlots?.(c);return u===void 0?[]:ey(e,c,u,l,n)}var Ul=e=>typeof e=="string"&&e!==""?e:null;function Gn(e,t=null){if(typeof e=="string")return t===null?null:Ul(e);let r=x$(e);return r===null?null:Ul(e[r])}function x$(e){return Ks(e)?["id","media","file"].find(t=>Ul(e[t])!==null)??null:null}function bT(e,t){if(Re(e)){if(ve(e.key)===null)throw new Error(`list: "${t}" is sourced by the fact "${e.key}", which is no table \u2014 a list's source is a table, a list slot, a list-valued member, a \`compute()\` or a fill; a list of the property's media is picked (\`fill.pick\`) from its item's \`from\`, or computed over a media list (\`compute({ reads: [fact.property.property_media] }, \u2026)\`).`);return{kind:"home",key:e.key}}if(_t(e))return{kind:"section",section:e.section,slot:e.slot};if(Ae(e))return{kind:"sibling",of:e};if(dn(e)!==void 0||pt(e))return e;throw new Error(`list: "${t}" declares a source that is no list.`)}function k$(e){return Re(e)?ve(e.key):Ae(e)&&e.type==="list"?Vs(e):null}var wT=new Set(["label","locked","placeholder","when","source"]);function xT(e){let t={};for(let[r,o]of Object.entries(e))wT.has(r)||(t[r]=o);return t}function _T(e,t){if(Re(e)&&ve(e.key)!==null)return{type:"row",from:e.key,source:{kind:"element"}};for(let o of At(e,`list: "${t}"`)??[]){if(o.verb==="write")throw new Error(S$(t,"declares no `item`"));if(o.verb==="pick")throw new Error(iy(t,"declares no `item`"))}if(Ar(e))return{type:"poi"};if(Ae(e)&&e.type==="list")return $T(e,t);let r=dn(e);if(r!==void 0){let o=Vs(r);if(o!==null&&pn(o,e.field)==="image_list")return{type:"image"}}throw new Error(`list: "${t}" declares no \`item\`, and its source does not say what its elements are \u2014 declare \`item\`: a plain slot (\`item: image()\`), or a function of the element (\`item: (el) => object({ \u2026 })\`).`)}function S$(e,t){return`list: "${e}" is written by a \`fill.write\` and ${t} \u2014 the item is the kind every written element is: a value slot (\`item: text.short({ cap: 80 })\`), an object exactly one field of which holds the element (\`question: text.medium({ label: "Question", cap: 48, source: el })\`), or an object declared plainly whose members the write answers (\`item: object({ label: text.short({ label: "Unit" }), fields: { \u2026 } })\`).`}function I$(e){if(typeof e!="object"||e===null||e.type!=="object")return!1;let t=e.fields??{};return!Object.values(t).some(r=>$t(r.source))}function _$(e,t){if(e.type!=="object")return;let r=Object.entries(e.fields).filter(([,o])=>o.type!=="row"&&o.source?.kind==="element");if(r.length!==1)throw new Error(S$(t,r.length===0?"its object item holds the element in no field":`its object item holds the element in ${String(r.length)} fields (${r.map(([o])=>`"${o}"`).join(", ")}) \u2014 one field holds it`))}function $T(e,t){let r=e.element;if(r===void 0||r.type==="object")throw new Error(`list: "${t}" lists the items of a list of objects \u2014 declare \`item\` to say what each item holds.`);return r.type==="row"?{type:"row",from:r.from,source:{kind:"element"}}:xT(r)}function iy(e,t){return`list: "${e}" is picked by a \`fill.pick\` and ${t} \u2014 the item holds the pick in the field holding its candidates: a candidate holder itself (\`item: image({ from: fact.property.property_media })\`, \`item: row({ label: "Agent", from: fact.property.contacts })\`), or an object exactly one field of which holds candidates and no source, which its siblings read by its const (\`const photo = image({ label: "Photo", from: fact.property.property_media }); object({ fields: { photo, caption: text.short({ label: "Caption", source: fill.write({ reads: [photo], brief }) }) } })\`).`}function sy(e){let t=mt(e);return t.type==="row"?typeof t.from=="string":t.type==="select"?Array.isArray(t.values):typeof t.type=="string"&&(Xe(t.type)||t.type==="media")&&t.from!==void 0}function ay(e){return mt(e).source===void 0&&De(e)===void 0}function O$(e,t){if(e.type!=="object")return sy(e)&&ay(e)?null:void 0;let r=Kn(e)??e.fields??{},o=Object.entries(r).filter(([,s])=>typeof s=="object"&&s!==null&&sy(s)&&ay(s)),n=o.filter(([,s])=>mt(s).type!=="select"),i=n.length>0?n:o;if(i.length>1)throw new Error(`list: "${t}"'s item declares ${String(i.length)} fields with \`from\` and no source (${i.map(([s])=>`"${s}"`).join(", ")}) \u2014 a picked list's item holds its pick in exactly one; give the others a source of their own.`);return i.length===1?i[0][0]:void 0}function $$(e){return{...Wn(e),source:{kind:"element"}}}function oy(e,t){if(t===void 0)return null;let r=t===null?e:(Kn(e)??e.fields)[t],o=mt(r);return o.type==="row"?ve(o.from):null}function kT(e,t){if(t===null)return $$(e);let r=e,o=(Kn(e)??r.fields)[t],n=s=>s===o||typeof s=="object"&&s!==null&&mt(s)===mt(o)?{kind:"element"}:s,i={};for(let[s,a]of Object.entries(r.fields))i[s]=s===t?$$(a):mn(a,n);return Xh({...r,fields:i},r)}function ST(e,t,r){let o=i=>{if(!$t(i))return i;if(E_(i)!==t)throw new Error(`list: "${r}"'s item reads the element of another list \u2014 an element is read only inside its own list's item.`);return{kind:"element"}};if(e.type==="object"){let i=e,s={},a=!1;for(let[c,l]of Object.entries(i.fields))s[c]=Wn(mn(l,o)),s[c]!==l&&(a=!0);return a?Xh({...i,fields:s},i):i}return Wn(mn(e,o))}function R$(e,t){let r=e.type==="object"?Object.entries(e.fields):[["",e]];for(let[o,n]of r){let i=n.source;if(i?.kind==="home")throw new Error(`list: "${t}"'s item${o===""?"":` field "${o}"`} is bound to the fact "${String(i.key)}", which is the same value in every item \u2014 read the element or a row's member instead; a property fact belongs in a fill's or a \`compute()\`'s \`reads\`.`)}}function IT(e,t){if(e.item===void 0)return _T(e.source,t);let r=new Set((At(e.source,`list: "${t}"`)??[]).map(c=>c.verb));if(r.has("pick")){let c=OT(e.item,t);return r.has("write")&&_$(c,t),c}let o={},n=Object.freeze({kind:"element",[vh]:o,[zl]:k$(e.source)}),i=typeof e.item=="function"?e.item(n):e.item;if(typeof i!="object"||i===null||typeof i.type!="string")throw new Error(`list: "${t}"'s item is no slot \u2014 return a value slot, a row or an object.`);if(i.type==="list")throw new Error(`list: "${t}"'s item is a list \u2014 a list's item is a value slot, a row or an object; a list never holds lists.`);if(i.type!=="object"&&De(i)!==void 0)throw new Error(`list: "${t}"'s item declares a fill \u2014 one decision produces the whole list, so the fill belongs on the list's \`source:\`; a field of an object item may carry its own.`);R$(i,t);let s=ST(i,o,t);if(r.has("write")&&!I$(e.item)&&_$(s,t),s.type==="object"||s.type==="row")return s;let a={...s};return delete a.locked,a}function OT(e,t){if(typeof e=="function")throw new Error(iy(t,"declares its item as a function"));if(typeof e!="object"||e===null||typeof e.type!="string")throw new Error(`list: "${t}"'s item is no slot \u2014 return a value slot, a row or an object.`);let r=O$(e,t);if(r===void 0)throw new Error(iy(t,"its item declares no field with `from` and no source"));R$(e,t);let o=kT(e,r);if(o.type==="object"||o.type==="row")return o;let n={...o};return delete n.locked,n}function RT(e,t){let r=e.source;if(!(r===void 0||(At(r,"list")??[]).some(i=>i.verb==="pick"))||typeof e.item!="object"||e.item===null)return k$(r);let n=e.item;if(r===void 0){if(n.type!=="object")return oy(n,sy(n)?null:void 0);let i=Object.entries(Kn(n)??{}).filter(([,s])=>mt(s).type==="row"&&ay(s));return i.length===1?oy(n,i[0][0]):null}return oy(n,O$(n,t))}function ht(e){let t=e.label??"list",r=e.source,o=At(r,`list: "${t}"`),n=I$(e.item),i=o?.every(l=>l.verb==="pick"||l.verb==="write"&&n)===!0;if(o!==void 0&&e.max===void 0&&!i)throw new Error(`list: "${t}" is filled but declares no \`max\` \u2014 a fill is an open supply, so the list bounds it.`);for(let l of o??[])if(l.verb==="pick"&&l.of!==void 0)throw new Error(`list: "${t}"'s \`fill.pick\` states \`of\` \u2014 a list's pick chooses from its item's \`from\`; remove \`of\`.`);let s={type:"list",...Hs(e,l=>bT(l,t)),element:IT(e,t),...e.min!==void 0?{min:e.min}:{},...e.max!==void 0?{max:e.max}:{}},a=pt(r)?ry(s.element):void 0,c=a===void 0?RT(e,t):a.length===1?a[0]:null;return Fl(s,c)}function Cl(e,t){if(t!==void 0&&(typeof t!="object"||t===null||Array.isArray(t)))throw new Error(`process.${e}(): takes an options object, or nothing.`);let r={kind:"process",verb:e};for(let[n,i]of Object.entries(t??{}))i!==void 0&&(r[n]=i);let o=_h(r);if(o!==null)throw new Error(`process.${e}(): ${o}.`);return r}function jT(e){return Cl("cutout",e)}function PT(e){return Cl("autocrop",e)}function hn(e,t){return Cl(e,t)}function ET(e){return hn("probe",e)}function TT(e){return hn("understand",e)}function AT(e){return hn("preview",e)}function zT(e){return hn("ladder",e)}function FT(e){return hn("transcode",e)}function DT(e){return hn("poster",e)}function NT(e){return hn("rasterize",e)}function UT(e){return hn("fetch",e)}function MT(e){return hn("tour_details",e)}function CT(e){return Cl("crop",e)}var LT={cutout:jT,autocrop:PT},Ll={...LT,probe:ET,understand:TT,preview:AT,ladder:zT,transcode:FT,poster:DT,rasterize:NT,fetch:UT,tour_details:MT,crop:CT};function ZT(e,t="a list"){return`${e} is sourced by ${t} \u2014 a row's slot source names a row, which it mirrors. A list's first row is a \`compute()\` over the list: \`source: compute({ reads: [list] }, (rows) => rows[0] ?? null)\`.`}function VT(e,t){if(Re(e))throw new Error(`row: "${t}" is sourced by the fact "${e.key}" \u2014 a table is a row's \`from\`, never its source: \`row({ label, from: fact.${e.key} })\` holds its first row, which the user may re-pick.`);if(_t(e))return{kind:"section",section:e.section,slot:e.slot};if(Ae(e))return{kind:"sibling",of:e};if($t(e)||pt(e))return Object.freeze({...e});throw new Error(`row: "${t}" declares a source that is no element, slot, compute or pick.`)}function HT(e,t){if(Array.isArray(e))return BT(e,t);let r=Re(e)?ve(e.key):null;if(r!==null)return{key:e.key,tables:[r]};let o=dn(e);if(o!==void 0){let n=`${String(mt(o).from)}.${e.field}`;if(Ls(n)!==null)return{key:n,tables:[]}}throw new Error(e===void 0?`row: "${t}" declares no \`from\` \u2014 a row names its fact data: a table (\`row({ label, from: fact.property.contacts })\`) or a row's list-valued member (\`from: unit.floor_plans\`).`:`row: "${t}"'s \`from\` is ${Re(e)?`the fact "${e.key}", which is not a table`:"no table or list-valued member"} \u2014 a row's \`from\` is a fact table (\`fact.property.contacts\`) or a table row's list-valued member (\`unit.floor_plans\`).`)}function BT(e,t){if(e.length===0)throw new Error(`row: "${t}" declares \`from: []\` \u2014 a row names the table it is a row of.`);let r=[],o=[];for(let n of e){let i=Re(n)?ve(n.key):null;if(i===null)throw new Error(`row: "${t}"'s \`from\` lists ${Re(n)?`the fact "${n.key}", which is not a table`:"something that is no table"} \u2014 a row's list of \`from\` names tables (\`[fact.property.contacts, \u2026]\`); a list-valued member is a row's only \`from\`.`);if(o.includes(i))throw new Error(`row: "${t}" names the ${i} table twice in \`from\` \u2014 each table is named once.`);r.push(n.key),o.push(i)}return{key:r.length===1?r[0]:r,tables:o}}function JT(e,t,r){let o=Vs(Ae(e)||$t(e)?e:void 0);if(!(o===null||t.includes(o)))throw new Error(`row: "${r}" is \`from\` the ${t.join(", ")} table${t.length===1?"":"s"} but its source holds a row of ${o} \u2014 a row's source yields a row of its own \`from\`.`)}function j$(e){let{key:t,tables:r}=HT(e.from,e.label),o=r[0]??null;if(o===null&&!$t(e.source))throw new Error(`row: "${e.label}" is \`from\` the list-valued member "${t}" but its source is no element \u2014 a row from a member holds an item of it, the element of the list over that member: \`source: entry\`.`);if(Ae(e.source)&&e.source.type==="list")throw new Error(ZT(`row: "${e.label}"`));let n=At(e.source,`row: "${e.label}"`);for(let a of n??[]){if(a.verb!=="pick")throw new Error(`row: "${e.label}" is filled by \`fill.${a.verb}\` \u2014 a row holds a row that exists, which only a \`fill.pick({ brief })\` out of its \`from\` yields.`);if(a.of!==void 0)throw new Error(`row: "${e.label}"'s \`fill.pick\` states \`of\` \u2014 a row's pick chooses from its \`from\`; remove \`of\`.`)}n===void 0&&e.source!==void 0&&o!==null&&JT(e.source,r,e.label);let i=Hs(e,a=>VT(a,e.label)),s=Fl({type:"row",from:t,...i},o);return r$(s,o,r.slice(1))}var E$=["property","library"];function fi(e){let t=e.indexOf("."),r=t===-1?"":e.slice(0,t);if(!E$.includes(r))throw new Error(`fact registry: "${e}" names no home's list fact`);return{home:r,key:e.slice(t+1)}}function T$(e){return e.type==="row"?e:null}function Hl(e){if(e.type!=="object")return null;for(let[t,r]of Object.entries(e.fields)){let o=r.source;if(Xe(r.type)&&typeof o=="object"&&o!==null&&o.kind==="element")return t}return null}function A$(e){return(Array.isArray(e.from)?e.from:[e.from]).filter(r=>typeof r=="string")}function z$(e){return e.head!==null}function yn(e,t){if("label"in e)throw new Error("fact registry: a page head holds no `label` \u2014 the declaration states the fact's name");for(let r of["title","description"]){let o=e[r];if(typeof o=="string"&&o.trim()==="")throw new Error(`fact registry: a page declares an empty ${r}`)}return{head:e,declaration:t}}var WT=new Set(["home","item"]);function uy(e,t,r){let o=typeof t=="object"&&t!==null?r.pages.get(t):void 0;if(o!==void 0)return{kind:"home",key:`${r.home}.${o}`};if(_l(t)){let i=r.pages.get(t);if(i===void 0)throw new Error(`${e} reads a page that is not one of this registry's \u2014 a registry reads its own facts by their page's const.`);return{kind:"home",key:`${r.home}.${i}`}}let n=ei(t)?t.of:t;if(Ae(n)){let i=r.fields?.get(n);if(i===void 0)throw new Error(`${e} reads the declaration "${n.label??n.type}", which is not a field of the same item \u2014 a field reads its siblings by their consts, and a top-level fact by its page's const.`);return{kind:"item",field:i}}if(Re(t)&&[...r.pages.values()].some(i=>t.key===`${r.home}.${i}`))return{kind:"home",key:t.key};if(Re(t))throw new Error(`${e} is bound to the fact "${t.key}" \u2014 a registry declares the facts; it reads a sibling page by its const and binds none.`);if(_t(t))throw new Error(`${e} reads a section's slot \u2014 a registry reads no section.`);if($t(t)&&r.picked===!0)return{kind:"element"};if($t(t))throw new Error(`${e} reads the element \u2014 a registry's list nothing picks is built by the user, so its item's fields read one another by const.`);if(dn(t)!==void 0)throw new Error(`${e} reads the member "${t.field}" of a row that is not a field of the same item.`);if(xl(t)&&typeof t.slot=="string")return{kind:"row",slot:t.slot,field:t.field};if(typeof t=="object"&&t!==null&&WT.has(String(t.kind)))return t;throw new Error(`${e} declares a read a registry cannot answer.`)}function KT(e,t,r){return Array.isArray(t)?t.length===1?cy(e,t[0],r):t.map(o=>cy(e,o,r)):cy(e,t,r)}function cy(e,t,r){let o=typeof t=="object"&&t!==null?r.pages.get(t):void 0,n=typeof t=="string"?t:o===void 0?void 0:`${r.home}.${o}`;if(n===void 0||!r.mediaLists.has(n))throw new Error(`${e} picks \`from\` something other than one of this registry's media lists \u2014 a media field picks from a list of media (the \`uploads\` page, a sorted list), by its const, or owns its media.`);return n}function dy(e,t,r){let o=t.reads.map(n=>uy(e,n,r));return t.requires===void 0?{kind:"compute",fn:t.fn,reads:o}:{kind:"compute",fn:t.fn,reads:o,requires:t.requires.map(n=>uy(e,n,r))}}function qT(e,t){if(t.when!==void 0)throw new Error(`${e} declares \`when\` \u2014 a registry has no display variant; a page is drawn when a template reads it.`);if(t.required!==void 0)throw new Error(`${e} declares \`required\` \u2014 a fact requires nothing on its own account; what a property must answer is what its templates require.`);if(t.type==="poi")throw new Error(`${e} is a poi \u2014 a place the platform builds is no fact.`)}function GT(e,t,r){let o=De(r)??[];if(t==="library"&&o.length>0)throw new Error(`${e} declares a fill \u2014 a library's facts are the org's own, and nothing fills them.`);if(o.some(n=>n.verb==="find"))throw new Error(`${e} declares a \`find\` \u2014 a home's fact is answered, written or picked, never looked up.`)}function YT(e,t){let{type:r,fields:o}=t;if(r!=="object"||o===void 0)return;let n=Object.entries(o).filter(([,i])=>i.type==="row");if(n.length>0)throw new Error(`${e} holds a picked row in ${n.map(([i])=>`"${i}"`).join(", ")} \u2014 a list picking rows declares the row as its item (\`item: row({ from })\`), whose members are the row's.`)}function XT(e){let t=new Map,r=e.fields;for(let o of[r,Kn(e)??{}])for(let[n,i]of Object.entries(o))typeof i=="object"&&i!==null&&t.set(i,n);return t}function fy(e,t,r){qT(e,t),GT(e,r.home,t);let o=Wn(mn(t,n=>uy(e,n,r)));switch(o.from!==void 0&&(Xe(String(o.type))||o.type==="media")&&(o={...o,from:KT(e,t.from,r)}),o.type){case"object":{let n={},i={...r,fields:XT(o)};for(let[s,a]of Object.entries(o.fields))n[s]=fy(`${e}.${s}`,a,i);o={...o,fields:n};break}case"list":{let n=o.max,i={home:r.home,pages:r.pages,mediaLists:r.mediaLists},s=De(t)?.some(c=>c.verb==="pick")===!0,a=fy(`${e}[]`,o.element,s?{...i,picked:!0}:i);YT(`${e}[]`,a),o={...o,element:a,...Tr(n)?{max:dy(`${e}.max`,n,i)}:{}};break}default:break}return o}function QT(e,t,r,o){let n=`${e}.${t}`,i=fy(n,r.declaration,o);if(i.type==="object")throw new Error(`${n} is an object \u2014 a top-level fact is a value or a list; a group of fields is a list's item.`);if(i.label===void 0)throw new Error(`${n} declares no \`label\` \u2014 a top-level fact states the name its page and its Details section show it by.`);if(r.head===null)return{head:null,declaration:i};let{title:s,description:a}=r.head;return{head:{title:typeof s=="string"?s:dy(`${n}.title`,s,o),description:typeof a=="string"?a:dy(`${n}.description`,a,o)},declaration:i}}var eA=["home","pages"];function tA(e){return"head"in e&&"declaration"in e}function nA(e){let t=e.element;return e.type==="list"&&typeof t?.type=="string"&&(Xe(t.type)||t.type==="media")}function F$(e,t){if(!E$.includes(e))throw new Error(`fact registry: "${e}" is not a home`);let r=new Map,o=new Set,n={};for(let[c,l]of Object.entries(t)){if(eA.includes(c))throw new Error(`fact registry: ${e} declares a page keyed "${c}", a registry's own key`);r.set(l,c);let u=tA(l)?l:{head:null,declaration:l};n[c]=u,nA(u.declaration)&&o.add(`${e}.${c}`)}let i={home:e,pages:r,mediaLists:o},s={};for(let[c,l]of Object.entries(n))s[c]=QT(e,c,l,i);let a={home:e,pages:s};for(let c of Object.keys(t))a[c]={kind:"home",key:`${e}.${c}`};return a}var rA=[{value:"for_sale",label:"For sale",icon:"tag",description:"List price, finance details, and a sold-ready layout."},{value:"for_rent",label:"For rent",icon:"key",description:"Monthly rent, lease terms, pets, and utilities."}],oA=["sold","active"],iA=["total","monthly"];function sA(e){return e==null?"active":"sold"}function aA(e){return e==="for_rent"?"monthly":"total"}var cA=6371e3;function lA(e,t,r,o){let n=c=>c*Math.PI/180,i=n(r-e),s=n(o-t),a=Math.sin(i/2)**2+Math.cos(n(e))*Math.cos(n(r))*Math.sin(s/2)**2;return 2*cA*Math.asin(Math.sqrt(a))}function uA(e,t){return e?.latitude==null||e.longitude==null||t?.latitude==null||t.longitude==null?null:Math.round(lA(t.latitude,t.longitude,e.latitude,e.longitude))}var dA=yn({title:"Your contacts",description:"The people your listings name, with the headshots and logos they carry."},ht({label:"Contacts",item:()=>{let e=Le.short({label:"Name",cap:256});return li({label:e,fields:{headshot:gn({label:"Headshot"}),name:e,title:Le.short({label:"Title",cap:128}),org_name:Le.short({label:"Organization",cap:256}),email:f$({label:"Email"}),phone:p$({label:"Phone"}),website:Nr({label:"Website"}),address:Dl({label:"Address"}),bio:Le.long({label:"Bio",cap:4e3}),logo_dark:gn({label:"Logo for light backgrounds",process:[Ll.cutout()]}),logo_light:gn({label:"Logo for dark backgrounds",process:[Ll.cutout()]}),instagram:Nr({label:"Instagram"}),linkedin:Nr({label:"LinkedIn"}),x:Nr({label:"X"}),facebook:Nr({label:"Facebook"})}})}})),Yn=F$("library",{contacts:dA});Mh(Yn);var py=yn({title:"What\u2019s the address?",description:"We\u2019ll build your map and neighborhood details from this."},Dl({label:"Address"})),D$=yn({title:"For sale or for rent?",description:"This adjusts the pricing details we ask for."},Bs({label:"Listing intent",from:[...rA]})),Xn=yn({title:"Add photos, docs, and links",description:"Everything you add helps fill and enrich your website."},ht({label:"Uploads",item:Nl()})),my=ht({label:"Media",item:Nl({kinds:["image","video","tour"],from:Xn}),source:Tt.pick({brief:"What shows the property: its photographs, renderings, videos and virtual tours, of the building, its rooms, grounds, amenities, surroundings and views, which a page's gallery and sections draw for a visitor walking through the property. An upload belongs when its name or account says it is one of those. It does not belong when its name or account says it is something else: a floor plan or other diagram, a logo or brand graphic, a photograph of a person or people, a flyer, slide or other image that is mostly text, a screenshot, a map or a document page. When neither its name nor its account says what it is, you cannot tell. The list runs as a walk through the property: aerial and street views, then the approach and entry, then the interiors room by room (living spaces, kitchen and dining, bedrooms, bathrooms), then outdoor spaces, amenities, surroundings and views, every shot of one space together; a video or tour sits with the space it shows, and one of the whole property comes first."})}),N$=ht({label:"Floor plans",item:gn({label:"Floor plan",from:Xn,process:[Ll.cutout({enclosed:"keep"})]}),source:Tt.pick({brief:"The property's floor plans: each upload that is exactly one floor plan, a top-down view of one floor of a dwelling's rooms and walls, drawn or rendered, flat or in 3D, at any size, whatever title, figures or text are printed around it, which a page's plans draw and each unit's own plans are picked from. An upload belongs when its name or account says it shows one floor plan. It does not belong when its name or account says it holds two or more plans, or is something else: a building key or site diagram, a legend, scale bar or north arrow on its own, a logo, a photograph or plain text. When neither its name nor its account says what it is, or how many plans it holds, you cannot tell. The list runs from the lowest floor to the highest, the plans of several units in the order the units are numbered, each unit's floors together."})}),fA=ht({label:"Documents",item:Nl({kinds:["document","image","video"],from:Xn}),source:Tt.pick({brief:"The property's documents: what sets out its specifics, the figures, finances, terms, legal record, condition or plans a buyer, tenant or investor studies, which a page offers as downloads and a reader wanting only them reads in place of every upload. An upload belongs when its name or account says it records those: an offering memorandum, brochure, listing sheet, rent roll, financials, comparables, lease, survey, site plan, plan set, disclosure or report. It does not belong when its name or account says it is a photograph, rendering, video or tour showing the property, an image of floor plans or elevations, a logo, a photograph of people, an ad, sign or announcement, a map, or notes for whoever makes the marketing. When neither its name nor its account says what it is, you cannot tell. The list runs as a buyer reads it: the offering memorandum, brochure or listing sheet, then the financials, rent roll and comparables, then the leases, legal record and disclosures, then the reports, surveys and plans."})}),pA=gn({label:"Hero",from:my,source:Tt.pick({brief:"The property's cover image: the one image the page's banner draws above the address, standing for the whole property at a glance for a visitor arriving at the page. It is an image of the property, by its name or account, a photograph or a rendering alike, ranked by what it shows and never by how it was made: the front exterior of the building first, then another exterior or aerial view, then the widest, brightest view of the main living space. A close-up, a bathroom, a utility space, an empty room or anything that reads as a fragment rather than a place is a weaker cover, never ruled out, so where those are the only images of the property the best of them is the cover. A logo or brand graphic, a headshot, an image that is mostly text, a screenshot, a map, a document page, a floor plan or other diagram is not an image of the property, nor is an image whose name and account do not say what it is; with no image of the property there is no cover."})}),mA=Nr({label:"Website"}),U$={unit:'"Unit 3", "#3", "Apt 3" and "Residence 3" all label "Unit 3"',space:'"Suite 200", "Ste 200" and "#200" all label "Suite 200"'};function M$(e){return`This ${e}'s floor plans: every one of the property's floor plans labeled for it, whatever the plan draws (a floor of the ${e}, its roof deck, its storage), listed beside the ${e}'s specs. A plan's label is read from its name and the text printed on it, never from the rooms drawn or any figures. A plan belongs when its label names this ${e}: the ${e}'s own label or a plain variant of it (${U$[e]}), a descriptor the ${e}'s label carries in brackets left off; a plan labeled for several ${e}s, as a shared floor printed with each ${e}'s number, belongs to each of them. A plan labeled for other ${e}s and not this one does not belong. When a plan labels no ${e}, you cannot tell. The list runs from the lowest floor to the highest.
66
+
67
+ floor: the level of the ${e} the plan draws, or the part of it where the plan draws no whole level, in the form "Basement", "2nd floor" or "Roof deck". It is read as the plan's label is, from the plan's name and a title among the words printed on it, never from what its account says the drawing shows or from the words that mark its rooms, and a ${e} number is not a floor. A plan whose name and printed title state neither has none.`}function C$(e){return`This ${e}'s photos: every one of the property's photos labeled for it, whatever the photo shows, listed beside the ${e}'s specs. A photo's label is read from its name, the text printed on it and a caption its account records, never from what it shows, any figures, how much it looks like the ${e} or where it falls among the uploads. A photo belongs when its label names this ${e}: the ${e}'s own label or a plain variant of it (${U$[e]}), a descriptor the ${e}'s label carries in brackets left off; a photo labeled for several ${e}s belongs to each of them. A photo labeled for other ${e}s and not this one does not belong. When a photo labels no ${e}, you cannot tell.`}var gA=M$("unit"),hA=C$("unit"),yA=[`The property's units: a row for each dwelling the uploads present with specs of its own, the home a listing describes or each unit a building's documents name or number, read by a buyer or tenant comparing the residences and by the user checking each row against their documents. The property is what the uploads market, whatever address they print for it. A row holds what the uploads print for that dwelling: the words printed on a sheet, a page or a floor plan, as its account quotes them, never what an account says a drawing, a photo or a map shows, the rooms, doors and spaces; each figure as printed, not worked out from other figures, rounded or carried over from another dwelling, a unit mix or the building; and a member no upload prints for that dwelling is empty. A dwelling the uploads only name, picture or mark with a status, with no specs printed for it, has no row. A plan or a row printed for several dwellings, in the form "Unit 4/6", gives each of those dwellings a row of its own carrying what is printed for it, and no row stands for two; a dwelling named in several uploads or on several pages is one row carrying everything they print for it. A commercial space is not a dwelling, nor is a unit-mix row standing for unnamed units, a whole building, a comparable property, a market average or a portfolio total.`,`label: the dwelling's own name as printed, its unit number or name, in the form "201", "Residence 201" or "4B", one dwelling's alone, without a status word and never its street address; a dwelling presented alone, with no unit name, is "Home".`,"beds, baths, sqft: as printed for that dwelling; a studio is one bedroom.",'price: the asking price or monthly rent as written for that dwelling, or, where none is printed, its status word, in the form "Sold" or "Leased".',"floor: the floor of its building the dwelling sits on, as printed; a unit number is not a floor.","hoa_monthly: the HOA, condo or strata fee printed per month for that dwelling; a fee for another period, or for the building, is not its own.","parking: the number of parking spaces printed for that dwelling, a garage counted by its cars; parking printed with no count, or for the building, is not its own.","lot_sqft: the lot printed in square feet for that dwelling, a home's own; a lot the building's dwellings share is not its own.","amenities: what sets this dwelling apart from the other dwellings in its building, each in the few words an upload states it; a feature printed for two of them, or for the building, is the building's, and a standard finish, a note printed on a plan or what the other members already say sets nothing apart. Most dwellings have none.","When no dwelling has specs of its own printed, the table is empty."].join(`
68
+
69
+ `),Zl=Le.short({label:"Unit"}),vA=Ue({label:"Beds"}),bA=Ue({label:"Baths",decimals:!0}),L$=Ue({label:"Sq ft",thousandsSep:!0}),Z$=Le.short({label:"Price",cap:40}),V$=Le.short({label:"Building floor(s)",cap:20}),H$=Ue({label:"Parking spaces"}),B$=ht({label:"Amenities",max:12,item:Le.short({cap:40})});function J$(e,t){return ht({label:"Floor plans",source:Tt.pick({reads:[e],brief:t}),item:li({fields:{image:gn({label:"Floor plan",from:N$}),floor:Bs({label:"Floor",from:[...N_],creatable:!0})}})})}function W$(e,t){return ht({label:"Photos",source:Tt.pick({reads:[e],brief:t}),item:gn({label:"Photo",from:my})})}var wA=yn({title:"Tell us about the units",description:"Add each unit\u2019s details and floor plans so they appear on your website."},ht({label:"Units",source:Tt.write({reads:[Xn],brief:yA}),item:li({label:Zl,fields:{label:Zl,beds:vA,baths:bA,sqft:L$,price:Z$,floor:V$,hoa_monthly:Ue({label:"Monthly HOA fee"}),parking:H$,lot_sqft:Ue({label:"Lot sq ft",thousandsSep:!0}),amenities:B$,floor_plans:J$(Zl,gA),photos:W$(Zl,hA)}})})),xA=M$("space"),_A=C$("space"),$A=["The property's commercial spaces: a row for each shop, office suite, restaurant or other non-residential space the uploads present with specs of its own, named or numbered in a building's documents, read by a tenant or investor comparing the spaces and by the user checking each row against their documents. The property is what the uploads market, whatever address they print for it. A row holds what the uploads print for that space: the words printed on a sheet, a page or a floor plan, as its account quotes them, never what an account says a drawing, a photo or a map shows; each figure as printed, not worked out from other figures, rounded or carried over from another space or the building; and a member no upload prints for that space is empty. A space the uploads only name, picture or mark with a status, with no specs printed for it, has no row, and a space named in several uploads or on several pages is one row carrying everything they print for it. A dwelling is not a commercial space, nor is a whole building, a comparable property, a market average or a portfolio total.",`label: the space's own name as printed, in the form "Suite 200" or "Retail A", without a status word and never its street address.`,"use: what the space is for, as printed.","sqft: as printed for that space.",'price: the rent or price as written for that space, or, where none is printed, its status word, in the form "Leased" or "Call for pricing".',"floor: the floor of its building the space sits on, as printed; a suite number is not a floor.","parking: the number of parking spaces printed for that space; parking printed with no count, or for the building, is not its own.","amenities: what sets this space apart from the other spaces in its building, each in the few words an upload states it; a feature printed for two of them, or for the building, is the building's, and a standard fitting, a note printed on a plan or what the other members already say sets nothing apart. Most spaces have none.","When no commercial space has specs of its own printed, the table is empty."].join(`
70
+
71
+ `),Vl=Le.short({label:"Space"}),kA=yn({title:"Tell us about the commercial spaces",description:"Add each space\u2019s details and floor plans so they appear on your website."},ht({label:"Commercial spaces",source:Tt.write({reads:[Xn],brief:$A}),item:li({label:Vl,fields:{label:Vl,use:Le.short({label:"Use",cap:40}),sqft:L$,price:Z$,floor:V$,parking:H$,amenities:B$,floor_plans:J$(Vl,xA),photos:W$(Vl,_A)}})})),SA="The property's comparables: the other properties an upload sets beside the one it markets, so that property's price and specs can be weighed against theirs, read by a buyer or seller judging the price and by the user checking each row against their documents. They appear as the rows of a sales or rent comparables table, as panels with their own photo and figures, as numbered pins in a map legend or as lines in a survey of recent trades. The property the uploads market is the one this request is for, whatever address they print for it; in a building, it is the building and every unit the uploads market in it. It is never a comparable, even in its own comparables table or at the center of a comparables map, and an upload presenting it or one of its units for itself, such as a listing sheet, brochure, price list or market history, presents no comparable; another unit of its building is a comparable only where an upload sets it beside the property as one, such as a sister unit's earlier sale in a comps table. A market or area average, a portfolio total, or anything that is not one property is not a comparable. A row holds what the uploads print for that property, read through every upload whole, a table included where it continues onto the next page: each figure as printed and a listing's remarks word for word, never worked out from other figures or carried over from a neighboring row, a summary or the property itself; a studio is one bedroom; a property listed in several places is one row carrying every figure those places state; a figure no upload prints for it is empty. When no upload sets another property beside the one it markets, the list is empty.",ly=Dl({label:"Address"}),P$=qh({label:"Sale date"}),IA=yn({title:"Which properties compare?",description:"Recently sold or listed homes like this one shape the pricing story."},ht({label:"Comparables",max:50,source:Tt.write({reads:[Xn,py],brief:SA}),item:li({label:ly,fields:{address:ly,price:Ue({label:"Price"}),sale_date:P$,beds:Ue({label:"Beds"}),baths:Ue({label:"Baths",decimals:!0}),sqft:Ue({label:"Sq ft"}),photo:gn({label:"Photo"}),year_built:Ue({label:"Year built"}),lot_sqft:Ue({label:"Lot sq ft"}),stories:Ue({label:"Stories",decimals:!0}),units:Ue({label:"Units"}),hoa_monthly:Ue({label:"HOA per month"}),list_price:Ue({label:"List price"}),listed_date:qh({label:"Listed date"}),mls_number:Le.short({label:"MLS number"}),description:Le.long({label:"Description"}),status:Bs({label:"Status",from:[...oA],locked:!0,source:$l({reads:[P$]},e=>sA(e))}),distance_m:Ue({label:"Distance (m)",locked:!0,source:$l({reads:[ly,py]},(e,t)=>uA(e,t))}),price_period:Bs({label:"Price period",from:[...iA],locked:!0,source:$l({reads:[D$]},e=>aA(e))})}})})),OA=yn({title:"Who\u2019s on this listing?",description:"Add the contacts for this property, and drag them into the order your marketing shows them."},ht({label:"Contacts",min:1,max:12,source:Tt.pick({reads:[Xn],brief:"The listing's contacts: the people a buyer or tenant reaches about this property, chosen from the library's contacts, in the order the listing presents them, the first or most prominent first. A contact belongs when an upload's name or account says it prints their email or phone, or their full name, as a contact for this listing, an agent, broker, or sales or leasing contact, judged by their name, title, organization, email and phone against what the uploads print. A contact the uploads leave out, where their accounts name the listing's contacts, does not belong, and a shared organization, a matching first name or a name printed in another role, an architect, a photographer or a seller, names no contact. When no upload's account names any contact, there are none."}),item:j$({label:"Contact",from:Yn.contacts})})),Ze=F$("property",{address:py,listing_intent:D$,description:yn({title:"Describe the property",description:"Talk it up like you would to a buyer, and our AI writes your website copy."},Le.long({label:"Description"})),uploads:Xn,property_media:my,floor_plans:N$,property_documents:fA,hero:pA,site_url:mA,units:wA,commercial_spaces:kA,contacts:OA,comparables:IA});Mh(Ze);function vn(e){return Ch(Ze).has(e)}function RA(e){let t=Ch(Ze).get(e);if(t===void 0)throw new Error(`fact registry: "${e}" names no property fact`);return t}function qs(e){return RA(e).value_type}function jA(){return X_(Ze)}function Gs(e){return typeof e=="string"&&jA().includes(e)}function PA(e){return typeof e=="string"?e:null}function EA(e){let t=zt(e);return t===void 0?null:{media:t}}function K$(e,t){let[,r="",o]=e.split("."),n=t[r];switch(qs(`property.${r}`)){case"address":{let i=Oe(n);return o===void 0?i:i===null?null:i[o]}case"image":return EA(n);case"number":return typeof n=="number"?n:null;case"text":return PA(n)}}function TA(e){let t=Ls(e);return t!==null?`${e.slice(0,e.length-t.member.length-1)}[].${t.member}`:ve(e)===null?null:e}function AA(e){let t=ci(e);return t!==null?`${t.tableKey}[].${t.member}`:ve(e)!==null||vn(e)||Gs(e)?e:null}function G$(e){return e===void 0?[]:typeof e=="string"?[e]:[...e]}function Bl(e){return G$(e.from).map(TA).filter(t=>t!==null)}function gy(e,t){let r=new Map(t);for(let[o,n]of Object.entries(e))n.type==="row"&&r.set(o,Bl(n));return r}function Y$(e,t){return e.map(r=>r.includes("[]")?r:`${r}[].${t}`)}function X$(e){let t=AA(e);if(t===null)throw new Error(`read graph: "${e}" names no fact the registry declares.`);return t}function Qn(e,t){let r=[];for(let o of e??[])o.kind==="home"?r.push(X$(o.key)):o.kind==="row"&&r.push(...Y$(t.rows.get(o.slot)??[],o.field));return r}function Cr(e){return[...new Set(e)]}function Q$(e){return e.fills??[]}function zA(e){return(Array.isArray(e)?e:[]).filter(r=>typeof r=="object"&&r!==null&&r.kind==="home")}function FA(e){let t=new Map;for(let r of e.decisions){let o=r;if(!(o.kind==="display"||o.id===void 0)){Q$(o).length>0&&t.set(o.id,o);for(let[n,i]of Object.entries(o.fields??{}))t.set(`${o.id}[].${n}`,i)}}return t}function Jl(e,t){let r=e.variant?.cases;return r===void 0?t:t===void 0?[...r]:r.filter(o=>t.includes(o))}function q$(e,t,r,o){let n=Jl(t,r.when),i={path:e,...n===void 0?{}:{when:n},required:t.required===!0},s=t.type!=="row"&&t.type!=="list"?G$(t.from).filter(Gs):[];if(o!==void 0){let c=Q$(o),l=[...c.flatMap(d=>Qn(d.reads,r)),...Qn(zA(o.of),r),...s],u=c.flatMap(d=>Qn(d.requires,r));return{...i,kind:"fill",reads:Cr(l),requires:Cr(u)}}let a=t.source;switch(a?.kind){case"home":{let c=t.type==="row"?Bl(t):[X$(a.key??"")];return{...i,kind:t.type==="row"?"row":"binding",reads:c,requires:[]}}case"derived":return{...i,kind:"compute",reads:Cr(Qn(a.reads,r)),requires:Cr(Qn(a.requires,r))};case"section":return{...i,kind:"mirror",reads:[],requires:[],mirrors:{kind:"section",section:a.section??"",slot:a.slot??""}};case"row":return{...i,kind:"member",reads:Y$(r.rows.get(a.slot??"")??[],a.field??""),requires:[]};case"element":return{...i,kind:t.type==="row"?"row":"element",reads:t.type==="row"?Bl(t):[],requires:[]};default:return t.type==="row"?{...i,kind:"row",reads:Bl(t),requires:[]}:{...i,kind:"content",reads:s,requires:[]}}}function hy(e,t,r,o,n){if(t.type==="object"){let l=t.fields??{},u={rows:gy(l,r.rows),when:Jl(t,r.when)};for(let[d,f]of Object.entries(l))hy(`${e}.${d}`,f,u,o,n);return}n.push(q$(e,t,r,o.get(e)));let i=t.element;if(t.type!=="list"||i===void 0)return;let s={rows:r.rows,when:Jl(t,r.when)};if(i.type!=="object"){n.push(q$(`${e}[]`,i,s,o.get(`${e}[]`)));return}let a=i.fields??{},c={rows:gy(a,r.rows),when:Jl(i,s.when)};for(let[l,u]of Object.entries(a))hy(`${e}[].${l}`,u,c,o,n)}function DA(e,t,r){let o=e.cases?.[0]??"";return e.source?.kind==="derived"?{source:"compute",first:o,transform:e.source.transform??"",reads:Cr(Qn(e.source.reads,t)),requires:Cr(Qn(e.source.requires,t))}:e.fill!==void 0?{source:"pick",first:o,reads:Cr(Qn(r,t)),requires:[]}:{source:"authored",first:o,reads:[],requires:[]}}function ek(e,t){let r=e.slots,o={rows:gy(r,new Map),when:void 0},n=FA(t),i=[];for(let[c,l]of Object.entries(r))hy(c,l,o,n,i);let s=t.decisions.flatMap(c=>c.kind==="display"?c.reads??[]:[]),a={slots:i};for(let c of["visibility","variant"]){let l=e.display?.[c];l!==void 0&&(a[c]=DA(l,o,s))}return a}function Wl(e,t){let r=Ws(e);return{pages:e.map(o=>({id:o.id,instances:o.sections.map(n=>{let i=t.get(n.section);if(i===void 0)throw new Error(`read graph: the composition places section "${n.section}", which carries no read graph.`);let s={instanceId:n.instance_id,section:n.section},a=i.slots.map(c=>{let{mirrors:l,...u}=c;if(l===void 0)return u;let d=r.locate(l,s);return d===void 0?u:{...u,mirrors:{instanceId:d.instanceId,slot:d.slot}}});return{instanceId:n.instance_id,section:n.section,required:n.required===!0,...i.visibility===void 0?{}:{visibility:i.visibility},...i.variant===void 0?{}:{variant:i.variant},slots:a}})}))}}var tk=["website","social-post","story","brochure","flyer","postcard","presentation"];var nk={website:"Website","social-post":"Social Post",story:"Story",brochure:"Brochure",flyer:"Flyer",postcard:"Postcard",presentation:"Presentation"};var sk=b.object({section:b.string(),instance_id:b.string(),required:b.boolean().optional()}),rk=b.object({instance_id:b.string(),slot:b.string()}),NA=b.object({id:b.string(),label:b.string(),path:b.string(),optional:b.boolean().optional(),sections:b.array(sk)}),UA=b.object({id:b.string(),label:b.string(),optional:b.boolean().optional(),direction:b.enum(["column","row"]).optional(),sections:b.array(sk)}),ok=b.object({id:b.string(),label:b.string(),category:b.enum(tk),preset:b.string().optional(),width:b.union([b.number(),b.string()]).optional(),height:b.union([b.number(),b.string()]).optional(),dpi:b.number().optional(),bleed:b.string().optional()}),ik=b.object({id:b.string(),label:b.string(),pages:b.array(b.string()).min(1)}),MA=b.discriminatedUnion("output",[b.object({output:b.literal("website"),formats:b.array(ok).min(1),pages:b.array(NA).min(1),canvases:b.array(ik).min(1),read_index:b.array(rk)}),b.object({output:b.enum(["image","document"]),formats:b.array(ok).min(1),pages:b.array(UA).min(1),canvases:b.array(ik).min(1),read_index:b.array(rk)})]);function ak(e){let t=MA.safeParse(e);return t.success?t.data:null}var yy=b.string().regex(/^[0-9a-f]{64}$/,"a lowercase hex SHA-256"),LA=b.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/,"an org UUID"),ZA=b.union([b.literal("global"),b.object({orgs:b.array(LA).min(1)}).strict()]),vy=b.object({key:b.string().refine(bb,"a section key `<template>/<section>`"),display_name:b.string().min(1),content_hash:yy}).strict(),ck=b.object({artifact_schema:b.literal(5),framework_version:b.string().min(1),key:b.string().refine(vb,"a template key: one path segment"),display_name:b.string().min(1),deliverable_type:b.enum(["website","image","document"]),scope:ZA,source_digest:yy,template:b.object({content_hash:yy}).strict(),sections:b.array(vy),fixture_list:b.string().refine(e=>wb(e)&&yb(e),"a fixture list path: relative, safe segments, a `.json` document")}).strict().superRefine((e,t)=>{e.sections.forEach((r,o)=>{r.key.startsWith(`${e.key}/`)||t.addIssue({code:"custom",path:["sections",o,"key"],message:`section "${r.key}" is not namespaced under "${e.key}/"`});let n=e.sections[o-1];n!==void 0&&n.key>=r.key&&t.addIssue({code:"custom",path:["sections",o,"key"],message:`sections must be sorted by key with no repeat; "${r.key}" follows "${n.key}"`})})});var Gt=class extends Error{path;name="BuildReadError";constructor(t,r){super(`${t}: ${r}`),this.path=t}},Ys=ck.shape,by=vy.shape,VA=b.object({key:Ys.key,display_name:Ys.display_name,deliverable_type:Ys.deliverable_type,template:b.object({content_hash:Ys.template.shape.content_hash}),fixture_list:Ys.fixture_list.optional(),sections:b.array(b.object({key:by.key,display_name:by.display_name,content_hash:by.content_hash}))}).superRefine((e,t)=>{let r=new Set;e.sections.forEach((o,n)=>{o.key.startsWith(`${e.key}/`)||t.addIssue({code:"custom",path:["sections",n,"key"],message:`section "${o.key}" is not namespaced under "${e.key}/"`}),r.has(o.key)&&t.addIssue({code:"custom",path:["sections",n,"key"],message:`section "${o.key}" is listed twice`}),r.add(o.key)})});function pi(e,t){if(t===null)throw new Gt(e,"the build has no such file");return t}function Xs(e,t){try{return JSON.parse(t.text)}catch(r){throw new Gt(e,`is not JSON (${r instanceof Error?r.message:String(r)})`)}}function wy(e,t){let r=Xs(e,pi(e,t));if(typeof r!="object"||r===null||Array.isArray(r))throw new Gt(e,"is not a JSON object");return r}function lk(e){return e.issues.map(t=>`${t.path.length===0?"":`${t.path.join(".")}: `}${t.message}`).join("; ")}async function uk(e){let t=ns(ts.composition),r=ns(ts.staticAssets),o=ns(ts.preview),[n,i,s,a]=await Promise.all([e.readText(es),e.readText(t),e.readText(r),e.readText(o)]),c=pi(es,n),l=VA.safeParse(Xs(es,c));if(!l.success)throw new Gt(es,`does not carry the build's identity: ${lk(l.error)}`);let u=l.data,d=ak(Xs(t,pi(t,i)));if(d===null)throw new Gt(t,"is not a valid union composition");let f=__.safeParse(Xs(r,pi(r,s)));if(!f.success)throw new Gt(r,`is not a static-assets binding: ${lk(f.error)}`);let p=Xs(o,pi(o,a)),m=await Promise.all(u.sections.map(async _=>{let O=N=>_o(_.key,N),[H,F,P]=await Promise.all([e.readText(O(ut.schema)),e.readText(O(ut.fillSpec)),e.readText(O(ut.readGraph))]);return{section:_,at:O,schemaFile:H,fillSpecFile:F,readGraphFile:P}})),S=new Map;for(let{section:_,at:O,schemaFile:H,fillSpecFile:F,readGraphFile:P}of m){let N=wy(O(ut.schema),H),Q=wy(O(ut.fillSpec),F),J=wy(O(ut.readGraph),P);if(!Array.isArray(J.slots))throw new Gt(O(ut.readGraph),"is not a read graph: it has no slots");let X=K=>async()=>{let{text:M,fingerprint:V}=pi(O(K),await e.readText(O(K)));return{text:M,fingerprint:V}};S.set(_.key,{key:_.key,displayName:_.display_name,contentHash:_.content_hash,schema:N,fillSpec:Q,readGraph:J,logic:X(ut.logic),renderer:X(ut.renderer)})}for(let _ of d.pages)for(let O of _.sections)if(!S.has(O.section))throw new Gt(t,`places section "${O.section}", which the manifest does not list`);return{key:u.key,displayName:u.display_name,deliverableType:u.deliverable_type,contentHash:u.template.content_hash,fixtureList:u.fixture_list??null,manifestFingerprint:c.fingerprint,composition:d,staticAssets:f.data,preview:p,sections:S,readGraph:Wl(d.pages,new Map([...S].map(([_,O])=>[_,O.readGraph])))}}function Nt(e){let t=new URLSearchParams;for(let[o,n]of Object.entries(e))n!=null&&n!==""&&t.set(o,n);let r=t.toString();return r===""?"":`?${r}`}var er={site:"site",download:"download"};function Kl(e){let[t,r,o,n,i,...s]=e.split("/");if(t!=="properties"||o!=="content"||r===void 0||r===""||n===void 0||n===""||i!==er.site&&i!==er.download)return null;try{return{property:decodeURIComponent(r),fixture:decodeURIComponent(n),output:i,rest:s.map(decodeURIComponent)}}catch{return null}}var he={catalog:"api/catalog",problems:"api/problems",render:"api/render",save:"api/save",library:"api/library",fixtures:"api/fixtures",upload:e=>{let{target:t}=e;return`api/upload${Nt({property:"property"in t?t.property:null,fixture:"fixture"in t?t.fixture:null,name:e.name,list:"list"in t?t.list:null,owner:"owner"in t?t.owner:null,instance:"instance"in t?t.instance:null,slot:"slot"in t?t.slot:null})}`},media:e=>`api/media${Nt({property:e})}`,owned:e=>`api/owned${Nt({fixture:e})}`,bootstrap:(e,t)=>`api/bootstrap${Nt({fixture:e,format:t})}`,requirements:e=>`api/requirements${Nt({fixture:e})}`,propertyRequirements:e=>`api/requirements${Nt({property:e})}`,facts:(e,t)=>`api/facts${Nt({property:e,home:t})}`,canvas:(e,t,r,o)=>`properties/${encodeURIComponent(e)}/content/${encodeURIComponent(t)}/${r===null?"canvas":`canvas/${encodeURIComponent(r)}`}${Nt({format:o})}`,live:(e,t,r)=>`properties/${encodeURIComponent(e)}/content/${encodeURIComponent(t)}/live${r==="/"?"":`/${encodeURIComponent(r.slice(1))}`}`,leads:"api/leads/ingest",output:(e,t,r)=>`properties/${encodeURIComponent(e)}/content/${encodeURIComponent(t)}/${r==="website"?er.site:er.download}/`,download:(e,t,r={})=>`${he.output(e,t,"image").slice(0,-1)}${r.page===void 0||r.page===null?"":`/${encodeURIComponent(r.page)}.png`}${Nt({format:r.format})}`,site:(e,t,r)=>`${he.output(e,t,"website")}${r==="/"?"":`${r.slice(1)}/`}`,build:"build/",jobs:"api/jobs",job:(e,t)=>`api/jobs/${encodeURIComponent(e)}${Nt({wait:t===void 0?null:String(t)})}`,probe:e=>`api/probe${Nt({fixture:e})}`,verify:"api/verify",changes:"__changes"};function HA(e,t){return t.startsWith(`${e}/`)?t.slice(e.length+1):t}function BA(e,t){return{async readText(r){let o=await e.readText(sd(r));return t.push(`${r}@${o?.fingerprint??"-"}`),o}}}function JA(e){let{composition:t}=e,r=c=>HA(e.key,c),o=t.pages.map(c=>({id:c.id,label:c.label,..."path"in c?{path:c.path}:{},..."direction"in c&&c.direction!==void 0?{direction:c.direction}:{},...c.optional===!0?{optional:!0}:{},sections:c.sections.map(l=>({instanceId:l.instance_id,section:r(l.section)}))})),n=new Map,s=t.pages.flatMap(c=>c.sections).filter((c,l,u)=>u.findIndex(d=>d.instance_id===c.instance_id)===l).map(c=>{let l=e.sections.get(c.section);n.set(r(c.section),c.section);let u=l.schema,d=u.slots??{},f=u.display?.variant;return{instanceId:c.instance_id,section:r(c.section),label:l.displayName,sectionSchema:{slots:d,slot_order:[...u.slot_order??Object.keys(d)]},display:{required:c.required===!0,variant:f===void 0?null:{cases:[...f.cases??[]],locked:f.locked===!0}},version:{schema:u,fillSpec:l.fillSpec}}});return{template:{key:e.key,name:e.displayName,output:t.output,formats:t.output==="website"?[]:t.formats,pages:o,canvases:t.canvases.map(c=>({id:c.id,label:c.label,pages:[...c.pages]})),instances:s},binding:e.staticAssets,fixtureList:e.fixtureList,published:n}}async function WA(e){let t=[],r=await uk(BA(e,t));return{build:JA(r),key:[...t].sort().join(`
72
+ `)}}function xy(e,t,r){return r===void 0?e.url(`${he.build}${t}`):`${r}${t}`}function KA(e,t,r){let o=Object.entries(t.islands);if(o.length===0)return{map:{},canvasHost:null,importMap:{},documentLoader:{kind:"none"}};let{island_runtime:n,react_vendor:i,react_vendor_core:s}=t;if(n===null||i===null||s===null)throw new Error("The build binds islands but no island runtime or React vendor.");let a=u=>xy(e,u,r),c=Object.fromEntries(o.map(([u,d])=>[u,a(d.filename)])),l=Object.fromEntries(Object.entries(i).map(([u,d])=>[u,a(d.filename)]));return{map:c,canvasHost:e.url(ld),importMap:l,documentLoader:{kind:"bundles",runtime:{url:a(n.filename)},islandMap:c,reactVendorMap:l,reactVendorCore:{url:a(s.filename)}}}}function qA(e){let{captures:t}=e;return t===void 0?{}:{captured:()=>t.fixtures(),shipped:r=>t.read(r)}}function dk(e){let t=null,r=null,o=u=>{if(t?.version===u.version)return t.build;let d=WA(u).then(({build:f,key:p})=>r?.key===p?r.build:(r={key:p,build:f},f));return t={version:u.version,build:d},d.catch(()=>{t?.build===d&&(t=null)}),d},n=async()=>o(await e.files.current()),i=(u,d)=>{let f=u.published.get(d);if(f===void 0)throw new Error(`The composition places no section "${d}".`);return f},s=async(u,d)=>{let f=i(u,d),m=u.template.instances.find(O=>O.section===d).version?.schema??{},_=(await e.loadModule(_o(f,ut.logic))).computed??{};return{localKey:d,schema:{slots:m.slots??{},display:m.display??{}},bakeContext:{computed:_,section_key:d}}},a={template:async()=>(await n()).template,islands:async u=>KA(e,(await n()).binding,u),computes:async u=>s(await n(),u),binding:async()=>(await n()).binding,...qA(e)},c={async section(u){let d=_o(i(await n(),u),ut.renderer),f=(await e.loadModule(d)).default;if(typeof f!="function"&&(typeof f!="object"||f===null))throw new Error(`${d} has no default-exported component.`);return f},createElement:(u,d)=>e.react.createElement(u,d),renderToString:(u,d)=>e.react.renderToString(u,d)},l={binding:async()=>(await n()).binding,async buildFile(u){let d=await(await e.files.current()).readBytes(sd(u));if(d===null)throw new Error(`The build has no file at "${u}".`);return d.bytes},shareImage:e.shareImage};return{reader:a,site:l,readAt:o,computesAt:s,renderer:c,stylesheets:async u=>{let{binding:d}=await n();return[xy(e,d.base_css.filename,u),xy(e,d.template_css.filename,u)]}}}var L={};Zt(L,{BRAND:()=>xz,DIRTY:()=>Lr,EMPTY_PATH:()=>QA,INVALID:()=>q,NEVER:()=>iF,OK:()=>Je,ParseStatus:()=>Ve,Schema:()=>ne,ZodAny:()=>rr,ZodArray:()=>_n,ZodBigInt:()=>Vr,ZodBoolean:()=>Hr,ZodBranded:()=>ea,ZodCatch:()=>to,ZodDate:()=>Br,ZodDefault:()=>eo,ZodDiscriminatedUnion:()=>Yl,ZodEffects:()=>It,ZodEnum:()=>Xr,ZodError:()=>ot,ZodFirstPartyTypeKind:()=>G,ZodFunction:()=>Ql,ZodIntersection:()=>qr,ZodIssueCode:()=>A,ZodLazy:()=>Gr,ZodLiteral:()=>Yr,ZodMap:()=>bi,ZodNaN:()=>xi,ZodNativeEnum:()=>Qr,ZodNever:()=>Ut,ZodNull:()=>Wr,ZodNullable:()=>Qt,ZodNumber:()=>Zr,ZodObject:()=>it,ZodOptional:()=>kt,ZodParsedType:()=>C,ZodPipeline:()=>ta,ZodPromise:()=>or,ZodReadonly:()=>no,ZodRecord:()=>Xl,ZodSchema:()=>ne,ZodSet:()=>wi,ZodString:()=>nr,ZodSymbol:()=>yi,ZodTransformer:()=>It,ZodTuple:()=>Xt,ZodType:()=>ne,ZodUndefined:()=>Jr,ZodUnion:()=>Kr,ZodUnknown:()=>xn,ZodVoid:()=>vi,addIssueToContext:()=>D,any:()=>Pz,array:()=>zz,bigint:()=>Sz,boolean:()=>_k,coerce:()=>oF,custom:()=>bk,date:()=>Iz,datetimeRegex:()=>yk,defaultErrorMap:()=>bn,discriminatedUnion:()=>Uz,effect:()=>Gz,enum:()=>Wz,function:()=>Hz,getErrorMap:()=>mi,getParsedType:()=>Yt,instanceof:()=>$z,intersection:()=>Mz,isAborted:()=>ql,isAsync:()=>gi,isDirty:()=>Gl,isValid:()=>tr,late:()=>_z,lazy:()=>Bz,literal:()=>Jz,makeIssue:()=>Qs,map:()=>Zz,nan:()=>kz,nativeEnum:()=>Kz,never:()=>Tz,null:()=>jz,nullable:()=>Xz,number:()=>xk,object:()=>Fz,objectUtil:()=>_y,oboolean:()=>rF,onumber:()=>nF,optional:()=>Yz,ostring:()=>tF,pipeline:()=>eF,preprocess:()=>Qz,promise:()=>qz,quotelessJson:()=>GA,record:()=>Lz,set:()=>Vz,setErrorMap:()=>XA,strictObject:()=>Dz,string:()=>wk,symbol:()=>Oz,transformer:()=>Gz,tuple:()=>Cz,undefined:()=>Rz,union:()=>Nz,unknown:()=>Ez,util:()=>de,void:()=>Az});var de;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let s of n)i[s]=s;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),s={};for(let a of i)s[a]=n[a];return e.objectValues(s)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},e.find=(n,i)=>{for(let s of n)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(de||(de={}));var _y;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(_y||(_y={}));var C=de.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Yt=e=>{switch(typeof e){case"undefined":return C.undefined;case"string":return C.string;case"number":return Number.isNaN(e)?C.nan:C.number;case"boolean":return C.boolean;case"function":return C.function;case"bigint":return C.bigint;case"symbol":return C.symbol;case"object":return Array.isArray(e)?C.array:e===null?C.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?C.promise:typeof Map<"u"&&e instanceof Map?C.map:typeof Set<"u"&&e instanceof Set?C.set:typeof Date<"u"&&e instanceof Date?C.date:C.object;default:return C.unknown}};var A=de.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),GA=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ot=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)o._errors.push(r(s));else{let a=o,c=0;for(;c<s.path.length;){let l=s.path[c];c===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(s))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return n(this),o}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,de.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n))}else o.push(t(n));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};ot.create=e=>new ot(e);var YA=(e,t)=>{let r;switch(e.code){case A.invalid_type:e.received===C.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case A.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,de.jsonStringifyReplacer)}`;break;case A.unrecognized_keys:r=`Unrecognized key(s) in object: ${de.joinValues(e.keys,", ")}`;break;case A.invalid_union:r="Invalid input";break;case A.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${de.joinValues(e.options)}`;break;case A.invalid_enum_value:r=`Invalid enum value. Expected ${de.joinValues(e.options)}, received '${e.received}'`;break;case A.invalid_arguments:r="Invalid function arguments";break;case A.invalid_return_type:r="Invalid function return type";break;case A.invalid_date:r="Invalid date";break;case A.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:de.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case A.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case A.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case A.custom:r="Invalid input";break;case A.invalid_intersection_types:r="Intersection results could not be merged";break;case A.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case A.not_finite:r="Number must be finite";break;default:r=t.defaultError,de.assertNever(e)}return{message:r}},bn=YA;var fk=bn;function XA(e){fk=e}function mi(){return fk}var Qs=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let a="",c=o.filter(l=>!!l).slice().reverse();for(let l of c)a=l(s,{data:t,defaultError:a}).message;return{...n,path:i,message:a}},QA=[];function D(e,t){let r=mi(),o=Qs({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===bn?void 0:bn].filter(n=>!!n)});e.common.issues.push(o)}var Ve=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return q;n.status==="dirty"&&t.dirty(),o.push(n.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,s=await n.value;o.push({key:i,value:s})}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return q;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(o[i.value]=s.value)}return{status:t.value,value:o}}},q=Object.freeze({status:"aborted"}),Lr=e=>({status:"dirty",value:e}),Je=e=>({status:"valid",value:e}),ql=e=>e.status==="aborted",Gl=e=>e.status==="dirty",tr=e=>e.status==="valid",gi=e=>typeof Promise<"u"&&e instanceof Promise;var B;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(B||(B={}));var St=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},pk=(e,t)=>{if(tr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new ot(e.common.issues);return this._error=r,this._error}}};function te(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??o??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:n}}var ne=class{get description(){return this._def.description}_getType(t){return Yt(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Yt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ve,ctx:{common:t.parent.common,data:t.data,parsedType:Yt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(gi(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Yt(t)},n=this._parseSync({data:t,path:o.path,parent:o});return pk(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Yt(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return tr(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>tr(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Yt(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(gi(n)?n:Promise.resolve(n));return pk(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let s=t(n),a=()=>i.addIssue({code:A.custom,...o(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,r){return this._refinement((o,n)=>t(o)?!0:(n.addIssue(typeof r=="function"?r(o,n):r),!1))}_refinement(t){return new It({schema:this,typeName:G.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return kt.create(this,this._def)}nullable(){return Qt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _n.create(this)}promise(){return or.create(this,this._def)}or(t){return Kr.create([this,t],this._def)}and(t){return qr.create(this,t,this._def)}transform(t){return new It({...te(this._def),schema:this,typeName:G.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new eo({...te(this._def),innerType:this,defaultValue:r,typeName:G.ZodDefault})}brand(){return new ea({typeName:G.ZodBranded,type:this,...te(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new to({...te(this._def),innerType:this,catchValue:r,typeName:G.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return ta.create(this,t)}readonly(){return no.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},ez=/^c[^\s-]{8,}$/i,tz=/^[0-9a-z]+$/,nz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,rz=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,oz=/^[a-z0-9_-]{21}$/i,iz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,sz=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,az=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,cz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",$y,lz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,uz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,dz=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,fz=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,pz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,mz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gk="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",gz=new RegExp(`^${gk}$`);function hk(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function hz(e){return new RegExp(`^${hk(e)}$`)}function yk(e){let t=`${gk}T${hk(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function yz(e,t){return!!((t==="v4"||!t)&&lz.test(e)||(t==="v6"||!t)&&dz.test(e))}function vz(e,t){if(!iz.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return!1}}function bz(e,t){return!!((t==="v4"||!t)&&uz.test(e)||(t==="v6"||!t)&&fz.test(e))}var nr=class e extends ne{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==C.string){let i=this._getOrReturnCtx(t);return D(i,{code:A.invalid_type,expected:C.string,received:i.parsedType}),q}let o=new Ve,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),D(n,{code:A.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),D(n,{code:A.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(n=this._getOrReturnCtx(t,n),s?D(n,{code:A.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&D(n,{code:A.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")az.test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"email",code:A.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")$y||($y=new RegExp(cz,"u")),$y.test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"emoji",code:A.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")rz.test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"uuid",code:A.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")oz.test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"nanoid",code:A.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")ez.test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"cuid",code:A.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")tz.test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"cuid2",code:A.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")nz.test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"ulid",code:A.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),D(n,{validation:"url",code:A.invalid_string,message:i.message}),o.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"regex",code:A.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),D(n,{code:A.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),D(n,{code:A.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),D(n,{code:A.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?yk(i).test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{code:A.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?gz.test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{code:A.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?hz(i).test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{code:A.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?sz.test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"duration",code:A.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?yz(t.data,i.version)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"ip",code:A.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?vz(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"jwt",code:A.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?bz(t.data,i.version)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"cidr",code:A.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?pz.test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"base64",code:A.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?mz.test(t.data)||(n=this._getOrReturnCtx(t,n),D(n,{validation:"base64url",code:A.invalid_string,message:i.message}),o.dirty()):de.assertNever(i);return{status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:A.invalid_string,...B.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...B.errToObj(t)})}url(t){return this._addCheck({kind:"url",...B.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...B.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...B.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...B.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...B.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...B.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...B.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...B.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...B.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...B.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...B.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...B.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...B.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...B.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...B.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...B.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...B.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...B.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...B.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...B.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...B.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...B.errToObj(r)})}nonempty(t){return this.min(1,B.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};nr.create=e=>new nr({checks:[],typeName:G.ZodString,coerce:e?.coerce??!1,...te(e)});function wz(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}var Zr=class e extends ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==C.number){let i=this._getOrReturnCtx(t);return D(i,{code:A.invalid_type,expected:C.number,received:i.parsedType}),q}let o,n=new Ve;for(let i of this._def.checks)i.kind==="int"?de.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),D(o,{code:A.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),D(o,{code:A.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),D(o,{code:A.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?wz(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),D(o,{code:A.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),D(o,{code:A.not_finite,message:i.message}),n.dirty()):de.assertNever(i);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,B.toString(r))}gt(t,r){return this.setLimit("min",t,!1,B.toString(r))}lte(t,r){return this.setLimit("max",t,!0,B.toString(r))}lt(t,r){return this.setLimit("max",t,!1,B.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:B.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:B.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:B.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:B.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:B.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:B.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:B.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:B.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:B.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:B.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&de.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Zr.create=e=>new Zr({checks:[],typeName:G.ZodNumber,coerce:e?.coerce||!1,...te(e)});var Vr=class e extends ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==C.bigint)return this._getInvalidInput(t);let o,n=new Ve;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),D(o,{code:A.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),D(o,{code:A.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),D(o,{code:A.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):de.assertNever(i);return{status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return D(r,{code:A.invalid_type,expected:C.bigint,received:r.parsedType}),q}gte(t,r){return this.setLimit("min",t,!0,B.toString(r))}gt(t,r){return this.setLimit("min",t,!1,B.toString(r))}lte(t,r){return this.setLimit("max",t,!0,B.toString(r))}lt(t,r){return this.setLimit("max",t,!1,B.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:B.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:B.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:B.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:B.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:B.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:B.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Vr.create=e=>new Vr({checks:[],typeName:G.ZodBigInt,coerce:e?.coerce??!1,...te(e)});var Hr=class extends ne{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==C.boolean){let o=this._getOrReturnCtx(t);return D(o,{code:A.invalid_type,expected:C.boolean,received:o.parsedType}),q}return Je(t.data)}};Hr.create=e=>new Hr({typeName:G.ZodBoolean,coerce:e?.coerce||!1,...te(e)});var Br=class e extends ne{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==C.date){let i=this._getOrReturnCtx(t);return D(i,{code:A.invalid_type,expected:C.date,received:i.parsedType}),q}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return D(i,{code:A.invalid_date}),q}let o=new Ve,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),D(n,{code:A.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),D(n,{code:A.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):de.assertNever(i);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:B.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:B.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Br.create=e=>new Br({checks:[],coerce:e?.coerce||!1,typeName:G.ZodDate,...te(e)});var yi=class extends ne{_parse(t){if(this._getType(t)!==C.symbol){let o=this._getOrReturnCtx(t);return D(o,{code:A.invalid_type,expected:C.symbol,received:o.parsedType}),q}return Je(t.data)}};yi.create=e=>new yi({typeName:G.ZodSymbol,...te(e)});var Jr=class extends ne{_parse(t){if(this._getType(t)!==C.undefined){let o=this._getOrReturnCtx(t);return D(o,{code:A.invalid_type,expected:C.undefined,received:o.parsedType}),q}return Je(t.data)}};Jr.create=e=>new Jr({typeName:G.ZodUndefined,...te(e)});var Wr=class extends ne{_parse(t){if(this._getType(t)!==C.null){let o=this._getOrReturnCtx(t);return D(o,{code:A.invalid_type,expected:C.null,received:o.parsedType}),q}return Je(t.data)}};Wr.create=e=>new Wr({typeName:G.ZodNull,...te(e)});var rr=class extends ne{constructor(){super(...arguments),this._any=!0}_parse(t){return Je(t.data)}};rr.create=e=>new rr({typeName:G.ZodAny,...te(e)});var xn=class extends ne{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Je(t.data)}};xn.create=e=>new xn({typeName:G.ZodUnknown,...te(e)});var Ut=class extends ne{_parse(t){let r=this._getOrReturnCtx(t);return D(r,{code:A.invalid_type,expected:C.never,received:r.parsedType}),q}};Ut.create=e=>new Ut({typeName:G.ZodNever,...te(e)});var vi=class extends ne{_parse(t){if(this._getType(t)!==C.undefined){let o=this._getOrReturnCtx(t);return D(o,{code:A.invalid_type,expected:C.void,received:o.parsedType}),q}return Je(t.data)}};vi.create=e=>new vi({typeName:G.ZodVoid,...te(e)});var _n=class e extends ne{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==C.array)return D(r,{code:A.invalid_type,expected:C.array,received:r.parsedType}),q;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,a=r.data.length<n.exactLength.value;(s||a)&&(D(r,{code:s?A.too_big:A.too_small,minimum:a?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),o.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(D(r,{code:A.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(D(r,{code:A.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>n.type._parseAsync(new St(r,s,r.path,a)))).then(s=>Ve.mergeArray(o,s));let i=[...r.data].map((s,a)=>n.type._parseSync(new St(r,s,r.path,a)));return Ve.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:B.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:B.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:B.toString(r)}})}nonempty(t){return this.min(1,t)}};_n.create=(e,t)=>new _n({type:e,minLength:null,maxLength:null,exactLength:null,typeName:G.ZodArray,...te(t)});function hi(e){if(e instanceof it){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=kt.create(hi(o))}return new it({...e._def,shape:()=>t})}else return e instanceof _n?new _n({...e._def,type:hi(e.element)}):e instanceof kt?kt.create(hi(e.unwrap())):e instanceof Qt?Qt.create(hi(e.unwrap())):e instanceof Xt?Xt.create(e.items.map(t=>hi(t))):e}var it=class e extends ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=de.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==C.object){let l=this._getOrReturnCtx(t);return D(l,{code:A.invalid_type,expected:C.object,received:l.parsedType}),q}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ut&&this._def.unknownKeys==="strip"))for(let l in n.data)s.includes(l)||a.push(l);let c=[];for(let l of s){let u=i[l],d=n.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new St(n,d,n.path,l)),alwaysSet:l in n.data})}if(this._def.catchall instanceof Ut){let l=this._def.unknownKeys;if(l==="passthrough")for(let u of a)c.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(l==="strict")a.length>0&&(D(n,{code:A.unrecognized_keys,keys:a}),o.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let u of a){let d=n.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new St(n,d,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let l=[];for(let u of c){let d=await u.key,f=await u.value;l.push({key:d,value:f,alwaysSet:u.alwaysSet})}return l}).then(l=>Ve.mergeObjectSync(o,l)):Ve.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return B.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:B.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:G.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of de.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of de.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return hi(this)}partial(t){let r={};for(let o of de.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of de.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof kt;)i=i._def.innerType;r[o]=i}return new e({...this._def,shape:()=>r})}keyof(){return vk(de.objectKeys(this.shape))}};it.create=(e,t)=>new it({shape:()=>e,unknownKeys:"strip",catchall:Ut.create(),typeName:G.ZodObject,...te(t)});it.strictCreate=(e,t)=>new it({shape:()=>e,unknownKeys:"strict",catchall:Ut.create(),typeName:G.ZodObject,...te(t)});it.lazycreate=(e,t)=>new it({shape:e,unknownKeys:"strip",catchall:Ut.create(),typeName:G.ZodObject,...te(t)});var Kr=class extends ne{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new ot(a.ctx.common.issues));return D(r,{code:A.invalid_union,unionErrors:s}),q}if(r.common.async)return Promise.all(o.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let i,s=[];for(let c of o){let l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new ot(c));return D(r,{code:A.invalid_union,unionErrors:a}),q}}get options(){return this._def.options}};Kr.create=(e,t)=>new Kr({options:e,typeName:G.ZodUnion,...te(t)});var wn=e=>e instanceof Gr?wn(e.schema):e instanceof It?wn(e.innerType()):e instanceof Yr?[e.value]:e instanceof Xr?e.options:e instanceof Qr?de.objectValues(e.enum):e instanceof eo?wn(e._def.innerType):e instanceof Jr?[void 0]:e instanceof Wr?[null]:e instanceof kt?[void 0,...wn(e.unwrap())]:e instanceof Qt?[null,...wn(e.unwrap())]:e instanceof ea||e instanceof no?wn(e.unwrap()):e instanceof to?wn(e._def.innerType):[],Yl=class e extends ne{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==C.object)return D(r,{code:A.invalid_type,expected:C.object,received:r.parsedType}),q;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(D(r,{code:A.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),q)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let s=wn(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(n.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);n.set(a,i)}}return new e({typeName:G.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...te(o)})}};function ky(e,t){let r=Yt(e),o=Yt(t);if(e===t)return{valid:!0,data:e};if(r===C.object&&o===C.object){let n=de.objectKeys(t),i=de.objectKeys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=ky(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===C.array&&o===C.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=ky(s,a);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return r===C.date&&o===C.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var qr=class extends ne{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,s)=>{if(ql(i)||ql(s))return q;let a=ky(i.value,s.value);return a.valid?((Gl(i)||Gl(s))&&r.dirty(),{status:r.value,value:a.data}):(D(o,{code:A.invalid_intersection_types}),q)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};qr.create=(e,t,r)=>new qr({left:e,right:t,typeName:G.ZodIntersection,...te(r)});var Xt=class e extends ne{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.array)return D(o,{code:A.invalid_type,expected:C.array,received:o.parsedType}),q;if(o.data.length<this._def.items.length)return D(o,{code:A.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q;!this._def.rest&&o.data.length>this._def.items.length&&(D(o,{code:A.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...o.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new St(o,s,o.path,a)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>Ve.mergeArray(r,s)):Ve.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Xt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Xt({items:e,typeName:G.ZodTuple,rest:null,...te(t)})};var Xl=class e extends ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.object)return D(o,{code:A.invalid_type,expected:C.object,received:o.parsedType}),q;let n=[],i=this._def.keyType,s=this._def.valueType;for(let a in o.data)n.push({key:i._parse(new St(o,a,o.path,a)),value:s._parse(new St(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?Ve.mergeObjectAsync(r,n):Ve.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof ne?new e({keyType:t,valueType:r,typeName:G.ZodRecord,...te(o)}):new e({keyType:nr.create(),valueType:t,typeName:G.ZodRecord,...te(r)})}},bi=class extends ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.map)return D(o,{code:A.invalid_type,expected:C.map,received:o.parsedType}),q;let n=this._def.keyType,i=this._def.valueType,s=[...o.data.entries()].map(([a,c],l)=>({key:n._parse(new St(o,a,o.path,[l,"key"])),value:i._parse(new St(o,c,o.path,[l,"value"]))}));if(o.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return q;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(l.value,u.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return q;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(l.value,u.value)}return{status:r.value,value:a}}}};bi.create=(e,t,r)=>new bi({valueType:t,keyType:e,typeName:G.ZodMap,...te(r)});var wi=class e extends ne{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.set)return D(o,{code:A.invalid_type,expected:C.set,received:o.parsedType}),q;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(D(o,{code:A.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(D(o,{code:A.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let l=new Set;for(let u of c){if(u.status==="aborted")return q;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}let a=[...o.data.values()].map((c,l)=>i._parse(new St(o,c,o.path,l)));return o.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:B.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:B.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};wi.create=(e,t)=>new wi({valueType:e,minSize:null,maxSize:null,typeName:G.ZodSet,...te(t)});var Ql=class e extends ne{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==C.function)return D(r,{code:A.invalid_type,expected:C.function,received:r.parsedType}),q;function o(a,c){return Qs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mi(),bn].filter(l=>!!l),issueData:{code:A.invalid_arguments,argumentsError:c}})}function n(a,c){return Qs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mi(),bn].filter(l=>!!l),issueData:{code:A.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof or){let a=this;return Je(async function(...c){let l=new ot([]),u=await a._def.args.parseAsync(c,i).catch(p=>{throw l.addIssue(o(c,p)),l}),d=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(d,i).catch(p=>{throw l.addIssue(n(d,p)),l})})}else{let a=this;return Je(function(...c){let l=a._def.args.safeParse(c,i);if(!l.success)throw new ot([o(c,l.error)]);let u=Reflect.apply(s,this,l.data),d=a._def.returns.safeParse(u,i);if(!d.success)throw new ot([n(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Xt.create(t).rest(xn.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,o){return new e({args:t||Xt.create([]).rest(xn.create()),returns:r||xn.create(),typeName:G.ZodFunction,...te(o)})}},Gr=class extends ne{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Gr.create=(e,t)=>new Gr({getter:e,typeName:G.ZodLazy,...te(t)});var Yr=class extends ne{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return D(r,{received:r.data,code:A.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:t.data}}get value(){return this._def.value}};Yr.create=(e,t)=>new Yr({value:e,typeName:G.ZodLiteral,...te(t)});function vk(e,t){return new Xr({values:e,typeName:G.ZodEnum,...te(t)})}var Xr=class e extends ne{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return D(r,{expected:de.joinValues(o),received:r.parsedType,code:A.invalid_type}),q}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return D(r,{received:r.data,code:A.invalid_enum_value,options:o}),q}return Je(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};Xr.create=vk;var Qr=class extends ne{_parse(t){let r=de.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==C.string&&o.parsedType!==C.number){let n=de.objectValues(r);return D(o,{expected:de.joinValues(n),received:o.parsedType,code:A.invalid_type}),q}if(this._cache||(this._cache=new Set(de.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=de.objectValues(r);return D(o,{received:o.data,code:A.invalid_enum_value,options:n}),q}return Je(t.data)}get enum(){return this._def.values}};Qr.create=(e,t)=>new Qr({values:e,typeName:G.ZodNativeEnum,...te(t)});var or=class extends ne{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==C.promise&&r.common.async===!1)return D(r,{code:A.invalid_type,expected:C.promise,received:r.parsedType}),q;let o=r.parsedType===C.promise?r.data:Promise.resolve(r.data);return Je(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};or.create=(e,t)=>new or({type:e,typeName:G.ZodPromise,...te(t)});var It=class extends ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===G.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:s=>{D(o,s),s.fatal?r.abort():r.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(o.data,i);if(o.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return q;let c=await this._def.schema._parseAsync({data:a,path:o.path,parent:o});return c.status==="aborted"?q:c.status==="dirty"?Lr(c.value):r.value==="dirty"?Lr(c.value):c});{if(r.value==="aborted")return q;let a=this._def.schema._parseSync({data:s,path:o.path,parent:o});return a.status==="aborted"?q:a.status==="dirty"?Lr(a.value):r.value==="dirty"?Lr(a.value):a}}if(n.type==="refinement"){let s=a=>{let c=n.refinement(a,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(o.common.async===!1){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?q:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>a.status==="aborted"?q:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(n.type==="transform")if(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!tr(s))return q;let a=n.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>tr(s)?Promise.resolve(n.transform(s.value,i)).then(a=>({status:r.value,value:a})):q);de.assertNever(n)}};It.create=(e,t,r)=>new It({schema:e,typeName:G.ZodEffects,effect:t,...te(r)});It.createWithPreprocess=(e,t,r)=>new It({schema:t,effect:{type:"preprocess",transform:e},typeName:G.ZodEffects,...te(r)});var kt=class extends ne{_parse(t){return this._getType(t)===C.undefined?Je(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};kt.create=(e,t)=>new kt({innerType:e,typeName:G.ZodOptional,...te(t)});var Qt=class extends ne{_parse(t){return this._getType(t)===C.null?Je(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Qt.create=(e,t)=>new Qt({innerType:e,typeName:G.ZodNullable,...te(t)});var eo=class extends ne{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===C.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};eo.create=(e,t)=>new eo({innerType:e,typeName:G.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...te(t)});var to=class extends ne{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return gi(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ot(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new ot(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};to.create=(e,t)=>new to({innerType:e,typeName:G.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...te(t)});var xi=class extends ne{_parse(t){if(this._getType(t)!==C.nan){let o=this._getOrReturnCtx(t);return D(o,{code:A.invalid_type,expected:C.nan,received:o.parsedType}),q}return{status:"valid",value:t.data}}};xi.create=e=>new xi({typeName:G.ZodNaN,...te(e)});var xz=Symbol("zod_brand"),ea=class extends ne{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},ta=class e extends ne{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?q:i.status==="dirty"?(r.dirty(),Lr(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?q:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:G.ZodPipeline})}},no=class extends ne{_parse(t){let r=this._def.innerType._parse(t),o=n=>(tr(n)&&(n.value=Object.freeze(n.value)),n);return gi(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};no.create=(e,t)=>new no({innerType:e,typeName:G.ZodReadonly,...te(t)});function mk(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function bk(e,t={},r){return e?rr.create().superRefine((o,n)=>{let i=e(o);if(i instanceof Promise)return i.then(s=>{if(!s){let a=mk(t,o),c=a.fatal??r??!0;n.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=mk(t,o),a=s.fatal??r??!0;n.addIssue({code:"custom",...s,fatal:a})}}):rr.create()}var _z={object:it.lazycreate},G;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(G||(G={}));var $z=(e,t={message:`Input not instance of ${e.name}`})=>bk(r=>r instanceof e,t),wk=nr.create,xk=Zr.create,kz=xi.create,Sz=Vr.create,_k=Hr.create,Iz=Br.create,Oz=yi.create,Rz=Jr.create,jz=Wr.create,Pz=rr.create,Ez=xn.create,Tz=Ut.create,Az=vi.create,zz=_n.create,Fz=it.create,Dz=it.strictCreate,Nz=Kr.create,Uz=Yl.create,Mz=qr.create,Cz=Xt.create,Lz=Xl.create,Zz=bi.create,Vz=wi.create,Hz=Ql.create,Bz=Gr.create,Jz=Yr.create,Wz=Xr.create,Kz=Qr.create,qz=or.create,Gz=It.create,Yz=kt.create,Xz=Qt.create,Qz=It.createWithPreprocess,eF=ta.create,tF=()=>wk().optional(),nF=()=>xk().optional(),rF=()=>_k().optional(),oF={string:(e=>nr.create({...e,coerce:!0})),number:(e=>Zr.create({...e,coerce:!0})),boolean:(e=>Hr.create({...e,coerce:!0})),bigint:(e=>Vr.create({...e,coerce:!0})),date:(e=>Br.create({...e,coerce:!0}))};var iF=q;var ra=L.object({key:L.string(),mime:L.string().nullable(),width:L.number().int().nullable(),height:L.number().int().nullable(),bytes:L.number().int().nullable()}).strict(),Sy=ra.extend({url:L.string()}).strict(),oa=L.object({x:L.number(),y:L.number(),width:L.number(),height:L.number()}).strict(),kk=L.object({crop:oa.nullable(),options:L.record(L.string(),L.unknown()),version:L.string().optional()}).strict(),Sk=ra.extend({over:kk}).strict(),sF=Sy.extend({over:kk}).strict(),xe=L.null(),oo=L.string().nullable(),ro=L.number().int().nullable();function kn(e,t,r,o=Rh){let n=s=>ii.includes(s),i=Object.fromEntries(o.map(s=>[s,r.includes(s)?(n(s)?t:e).nullable():xe]));return L.object(i).strict()}var aF={id:L.string(),file:L.string(),crop:oa.nullable(),name:L.string()},eu={key:oo,mime:oo,bytes:ro,url:oo,provider:oo,added_at:L.string(),account:oo,page_count:ro,duration_ms:ro,width:ro,height:ro,captured_at:oo,scan_count:ro,poster_at_ms:ro,state:L.enum(["processing","ready","failed"]),...aF};function Iy(e,t,r){let o=L.object({...eu,kind:L.literal("image"),key:L.string(),url:xe,provider:xe,page_count:xe,duration_ms:xe,poster_at_ms:xe,captured_at:xe,scan_count:xe,renditions:kn(e,t,["master","crop","cutout","mask_white","mask_black"]),...r.image}).strict(),n=L.object({...eu,kind:L.literal("video"),crop:xe,page_count:xe,scan_count:xe,renditions:kn(e,t,["poster","encode"]),...r.video}).strict(),i=L.object({...eu,kind:L.literal("tour"),crop:xe,key:xe,mime:xe,bytes:xe,url:L.string(),provider:L.string(),page_count:xe,duration_ms:xe,poster_at_ms:xe,width:xe,height:xe,renditions:kn(e,t,["poster"]),...r.tour}).strict(),s=L.object({...eu,kind:L.literal("document"),crop:xe,key:L.string(),url:xe,provider:xe,duration_ms:xe,poster_at_ms:xe,width:xe,height:xe,captured_at:xe,scan_count:xe,renditions:kn(e,t,["poster"]),...r.document}).strict();return L.discriminatedUnion("kind",[o,n,i,s])}var Ik=Iy(ra,Sk,{image:{},video:{},tour:{},document:{}}),Ok={image:{file_url:L.string()},video:{file_url:oo},tour:{file_url:xe},document:{file_url:L.string()}},v2=Iy(Sy,sF,Ok);function Rk(e,t){let[r,o,n,i]=Iy(e,e,t).options,s={file:!0,crop:!0,name:!0};return L.discriminatedUnion("kind",[r.omit(s).extend({renditions:kn(e,e,["master"],oi)}),o.omit(s).extend({renditions:kn(e,e,["poster","encode"],oi)}),n.omit(s).extend({renditions:kn(e,e,["poster"],oi)}),i.omit(s).extend({renditions:kn(e,e,["poster"],oi)})])}var cF=Rk(ra,{image:{},video:{},tour:{},document:{}}),b2=Rk(Sy,Ok),Oy=kn(ra,Sk,ii,ii),lF=L.object({id:L.string(),file:L.string(),crop:oa.nullable(),name:L.string().nullable(),renditions:Oy}).strict(),uF=L.object({media:L.string(),crop:oa.nullable().optional(),renditions:Oy.partial().strict().optional()}).strict(),w2=L.object({id:L.string(),file:L.string(),crop:oa.nullable(),name:L.string().nullable(),renditions:Oy.partial().strict()}).strict();var jk={property:Ze,library:Yn},$n=L.string().nullable(),dF=L.object({street:$n,unit:$n,city:$n,state:$n,postal:$n,latitude:L.number().nullable(),longitude:L.number().nullable(),source:L.enum(gh).nullable(),display:$n,street_no_type:$n}).strict();function fF(e){let t=fi(e),r=jk[t.home].pages[t.key]?.declaration;if(r?.type!=="list")throw new Error(`registry facts: ${e} is not a list fact`);return r.element}function pF(e,t){let[r,...o]=(e??[]).map(n=>typeof n=="string"?n:n.value);return t===!0||r===void 0?$n:L.enum([r,...o]).nullable()}function na(e){switch(e.type){case"list":return L.array($k(e.element));case"object":return L.object(Object.fromEntries(Object.entries(e.fields).map(([t,r])=>[t,na(r)]))).strict();case"row":return $k(fF(e.from));case"address":return dF;case"image":case"video":case"tour":case"document":case"media":return(e.from===void 0?lF:uF).nullable();case"number":return(e.decimals===!0?L.number():L.number().int()).nullable();case"select":return pF(e.values,e.creatable);case"date":return L.string().regex(/^\d{4}-\d{2}-\d{2}$/).nullable();case"text":case"url":case"email":case"phone":return $n}}function $k(e){if(e.type==="object"){let t=Object.entries(e.fields);return L.object({...Object.fromEntries(t.map(([r,o])=>[r,na(o)])),id:L.string()}).strict()}return e.type==="row"?na(e):na(e).unwrap()}var Pk=L.object({...Object.fromEntries(Object.entries(jk.property.pages).map(([e,t])=>[e,na(t.declaration)])),files:L.record(L.string(),cF)}).strict();function ir(e){return e.type==="row"||e.type==="object"||e.type==="list"&&(e.element?.type==="object"||e.element?.type==="row")?!1:e.source!==void 0&&e.source.kind!=="element"&&e.source.kind!=="authored"}var mF={".svg":"image/svg+xml",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".ico":"image/x-icon",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject",".mp4":"video/mp4",".webm":"video/webm",".mov":"video/quicktime",".mp3":"audio/mpeg",".wav":"audio/wav",".pdf":"application/pdf",".zip":"application/zip"};function Ry(e){let t=e.slice(e.lastIndexOf(".")).toLowerCase();return mF[t]??"application/octet-stream"}function nu(e,t){return`contact:${e}:${t}`}function ru(e){return`comparable:${e}:photo`}var gF=Date.UTC(2026,0,1);function Py(e){return new Date(gF+e*1e3).toISOString()}var hF={".pdf":"application/pdf",".mp4":"video/mp4",".webm":"video/webm",".mov":"video/quicktime",".mp3":"audio/mpeg",".wav":"audio/wav",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".webp":"image/webp",".avif":"image/avif",".gif":"image/gif",".svg":"image/svg+xml",".zip":"application/zip"};function Ek(e){return e.slice(e.lastIndexOf("/")+1)}function yF(e){let t=Ek(e),r=t.lastIndexOf(".");return r<=0?"":t.slice(r).toLowerCase()}function io(e){return typeof e=="string"?e:e.url}function Tk(e,t){return t!==void 0&&e.startsWith(`${t}/`)?e.slice(t.length):e}function Ey(e){let t=Ek(e),r=t.lastIndexOf("."),o=r<=0?"":t.slice(r);return t.slice(0,t.length-o.length).replace(/-[0-9a-f]{8}$/,"")+o}function tu(e){return hF[yF(e)]??"application/octet-stream"}function jy(e,t=null){let r=typeof e=="string"?null:e;return{key:io(e),mime:t,width:r?.width??null,height:r?.height??null,bytes:null}}function Ak(e,t,r){let o=io(r);return{id:e,kind:t,file:r,url:null,provider:null,filename:o===""?"":Ey(o),mime:o===""?"":tu(o)}}function ou(e,t,r,o,n,i){let s=io(r),a=t==="video"?{encode:jy(r,tu(s)),...i===void 0?{}:{poster:jy(i)}}:i===void 0?{}:{poster:jy(i)};return{record:Ty(e,t,Ey(s),Py(o),{mime:tu(s),...n,key:s,renditions:Fk(a)}),catalog:{...Ak(e,t,r),...i===void 0?{}:{posterFile:i}}}}function zk(e,t){let r=io(t);return{record:Ty(e,"image",Ey(r),Py(0),{mime:tu(r),key:r}),catalog:Ak(e,"image",t)}}var vF={crop:null,key:null,mime:null,bytes:null,url:null,provider:null,account:null,page_count:null,duration_ms:null,width:null,height:null,captured_at:null,scan_count:null,poster_at_ms:null,renditions:{master:null,crop:null,cutout:null,mask_white:null,mask_black:null,poster:null,encode:null},state:"ready"};function Ty(e,t,r,o,n){return{...vF,id:e,file:e,kind:t,name:r,added_at:o,...n}}function bF(e){return typeof e=="string"?e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,""):""}function Fk(e){return{master:null,crop:null,cutout:null,mask_white:null,mask_black:null,poster:null,encode:null,...e}}function wF(e){return{key:e,mime:null,width:null,height:null,bytes:null}}function Dk(e,t,r,o,n){let i=n===void 0?{}:{poster:wF(n)},s=r.url,a=r.provider;return{record:Ty(e,t,bF(s),Py(o),{...r,renditions:Fk(i)}),catalog:{id:e,kind:t,file:null,url:typeof s=="string"?s:null,provider:typeof a=="string"?a:null,filename:"",mime:"",...n===void 0?{}:{posterUrl:n}}}}var xF=Ze.pages.comparables.declaration.element.fields;function Nk(e,t){return{...e,...z_(xF,e,t)}}var _F=["headshot","logo_dark","logo_light"],$F=new Set(["street","unit","city","state","postal","latitude","longitude","source"]);function Mk(e){return typeof e=="string"?e.length>0:typeof e=="object"&&e!==null&&typeof e.url=="string"&&typeof e.width=="number"&&typeof e.height=="number"}function en(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var kF=new Set(["id","file","poster","preview","thumbnail_source_url","source"]),SF=new Set(["address","uploads","property_media","floor_plans","property_documents","hero","units","commercial_spaces","contacts","comparables"]),IF={site_url:null},Ay={units:{floor:null,hoa_monthly:null,parking:null,lot_sqft:null,amenities:[]},commercial_spaces:{use:null,sqft:null,price:null,floor:null,parking:null,amenities:[]},comparables:{year_built:null,lot_sqft:null,stories:null,units:null,hoa_monthly:null,list_price:null,listed_date:null,mls_number:null,description:null}},Uk={property_media:{kinds:["image","video","tour"],what:"a photo, video or tour"},floor_plans:{kinds:["image"],what:"a floor plan"},property_documents:{kinds:["document","image","video"],what:"a document, image or video"}};function Ck(e,t){return Object.fromEntries(Object.entries(e).filter(([r])=>!t.has(r)))}function sr(e){return Array.isArray(e)?e:[]}function zy(e,t,r,o){let n=(f,p)=>Mk(f)?!0:(o(`${p}: expected a media file`),!1),i=e.id,{file:s,poster:a,preview:c,thumbnail_source_url:l}=e,u=Ck(e,kF),d=e.kind;return d==="video"&&e.source!=="upload"&&e.source!=="link"?(o(`${r}.source: expected "upload" or "link"`),null):d==="image"?n(s,`${r}.file`)?ou(i,"image",s,t,u):null:d==="video"&&e.source==="upload"?!n(s,`${r}.file`)||a!==void 0&&!n(a,`${r}.poster`)?null:ou(i,"video",s,t,u,a):d==="video"||d==="tour"?l!==void 0&&(typeof l!="string"||l==="")?(o(`${r}.thumbnail_source_url: expected a non-empty URL`),null):Dk(i,d,u,t,l):d==="document"?!n(s,`${r}.file`)||c!==void 0&&!n(c,`${r}.preview`)?null:ou(i,"document",s,t,u,c):(o(`${r}.kind: expected "image", "video", "tour" or "document"`),null)}function Lk(e,t){let r=[],o=new Map,n={},i=M=>{let{file:V,value:le}=Rl(M);return n[V.id]=V,le},s=M=>{r.push({rule:"fixtures/property-invalid",file:t,message:M})},a=new Map,c=(M,V,le)=>{if(typeof V!="string"||V==="")return s(`${le}: every entry needs a non-empty string id`),!1;let ae=a.get(M);return ae===void 0&&a.set(M,ae=new Set),ae.has(V)?(s(`${le}: id "${V}" is repeated within ${M}`),!1):(ae.add(V),!0)},l=(M,V)=>Mk(M)?!0:(s(`${V}: expected a media file`),!1),u=[];for(let[M,V]of sr(e.uploads).entries()){let le=`uploads[${M}]`;if(!en(V)){s(`${le}: expected an upload entry`);continue}if(!c("uploads",V.id,le))continue;let ae=zy(V,M,le,s);ae!==null&&(u.push(i(ae.record)),o.set(ae.catalog.id,ae.catalog))}let d=new Map(sr(e.uploads).flatMap(M=>en(M)&&typeof M.id=="string"?[[M.id,M.kind]]:[])),f={property_media:[],floor_plans:[],property_documents:[]};for(let M of Object.keys(Uk)){let{kinds:V,what:le}=Uk[M];for(let[ae,Se]of sr(e[M]).entries()){let I=`${M}[${ae}]`,E=en(Se)?Se.id:void 0,ue=typeof E=="string"?d.get(E):void 0;typeof E!="string"||!V.includes(ue)?s(`${I}: expected ${le} among the property's uploads`):c(M,E,I)&&f[M].push({media:E})}}let p=(M,V,le)=>{let ae=en(M)?M.id:void 0;return typeof ae!="string"||n[ae]?.kind!=="image"||!f[V].some(Se=>Se.media===ae)?(s(`${le}: expected ${V==="property_media"?"a photo":"a floor plan"} among the property's ${V}`),null):{media:ae}},m=e.hero===void 0||e.hero===null?null:p(e.hero,"property_media","hero"),S=(M,V,le)=>{if(M==null||!l(M,le))return null;let{record:ae,catalog:Se}=zk(V,M);return o.set(V,Se),i(ae)},_=(M,V,le)=>{let ae=[];for(let[Se,I]of sr(V).entries()){let E=`${M}[${Se}]`;if(!en(I)||!c(M,I.id,E))continue;let ue=sr(I.floor_plans).flatMap((Ie,ye)=>{let Fe=`${E}.floor_plans[${ye}]`;if(!en(Ie))return s(`${Fe}: expected a floor plan the row holds`),[];let{image:sn,...an}=Ie,lt=p(sn,"floor_plans",`${Fe}.image`);return lt===null?[]:[{id:lt.media,image:lt,...an}]}),fe=sr(I.photos).flatMap((Ie,ye)=>{let Fe=p(Ie,"property_media",`${E}.photos[${ye}]`);return Fe===null?[]:[Fe]});ae.push({...le,...I,floor_plans:ue,photos:fe})}return ae},O=_("units",e.units,Ay.units),H=_("commercial_spaces",e.commercial_spaces,Ay.commercial_spaces),F=(M,V)=>{M!=null&&!en(M)&&s(`${V}: expected an address \u2014 its parts and its pin \u2014 or null`);for(let[le,ae]of Object.entries(en(M)?M:{}))if(!$F.has(le))s(`${V}.${le}: not a member an address states (its parts and its pin)`);else if(ae!=null){let Se=le==="latitude"||le==="longitude";(Se?typeof ae!="number":typeof ae!="string")&&s(`${V}.${le}: expected ${Se?"a number":"a string"} or null`)}return j_(M)},P=[];for(let[M,V]of sr(e.contacts).entries()){let le=`contacts[${M}]`;if(!en(V)||!c("contacts",V.id,le))continue;let ae={...V};for(let Se of _F)ae[Se]=S(V[Se],nu(V.id,Se),`${le}.${Se}`);ae.address=F(V.address,`${le}.address`),P.push(ae)}let N=F(e.address,"address"),Q=[];for(let[M,V]of sr(e.comparables).entries()){let le=`comparables[${M}]`;if(!en(V)||!c("comparables",V.id,le))continue;let{photo:ae,...Se}=V,I=F(V.address,`${le}.address`),E={...Ay.comparables,...Se,address:I,photo:S(ae,ru(V.id),`${le}.photo`)};Q.push(Nk(E,{address:N,listing_intent:e.listing_intent}))}if(r.length>0)return{facts:null,media:o,violations:r};let X={...{...IF,...Ck(e,SF)},address:N,uploads:u,property_media:f.property_media,floor_plans:f.floor_plans,property_documents:f.property_documents,hero:m,units:O,commercial_spaces:H,contacts:P,comparables:Q,files:n},K=Pk.safeParse(X);if(!K.success){for(let M of K.error.issues)s(`${M.path.map(String).join(".")||"(root)"}: ${M.message}`);return{facts:null,media:o,violations:r}}return{facts:K.data,media:o,violations:r}}function Fy(e){return e!==null&&typeof e=="object"?e:null}function We(e){let t=Fy(e);if(t?.kind!=="row")return null;let{slot:r,field:o}=t;return typeof r!="string"||r===""||typeof o!="string"||o===""?null:{slot:r,field:o}}function tn(e){return Object.entries(e??{}).filter(([,t])=>t.type==="row"&&Fy(t.source)?.kind==="element").map(([t])=>t)}function Zk(e){let t=new Set(tn(e)),r={};for(let[o,n]of Object.entries(e??{})){let i=We(n.source);i!==null&&t.has(i.slot)&&(r[o]=i.field)}return r}function nn(e){let t=Fy(e.source);if(t===null||t.kind==="authored")return{kind:"none"};let{kind:r,key:o,section:n,slot:i,transform:s}=t;if(r==="home"&&typeof o=="string"){let a=ve(o);if(a!==null)return{kind:"table",table:a}}return r==="section"&&typeof n=="string"&&typeof i=="string"?{kind:"section",section:n,slot:i}:r==="derived"&&typeof s=="string"?{kind:"derived",transform:s}:{kind:"other"}}function so(e){return Hh(Jn(e)==="library"?Yn:Ze,e)}function _i(e,t){return Jh(so(e),t)}function Vk(e){return Object.keys(so(e))}function Dy(e,t){if(t==="id")return{kind:"identity"};let r=t.indexOf("."),o=r===-1?t:t.slice(0,r),n=pn(e,o)??null;if(n===null)return{kind:"unknown",offers:Vk(e)};if(r!==-1){let i=t.slice(r+1);return n!=="address"?{kind:"unknown",offers:Vk(e)}:Er(i)?{kind:"member",value_type:Lh(i),storable:ia(e,t)}:{kind:"unknown",offers:Pr.map(s=>`${o}.${s}`)}}return{kind:"member",value_type:n,storable:ia(e,t)}}function ia(e,t){if(t===void 0){if(ve(e)!==null)return!0;if(!vn(e))return!1;let o=e.slice(0,e.lastIndexOf("."));return!(vn(o)&&qs(o)==="address")}if(!Dr().includes(e))return!1;let r=_i(e,t);return r!==void 0&&!Q_(r)}function Hk(e,t){let r=t.source;return r?.kind!=="row"||typeof r.field!="string"||Dy(e,r.field).kind==="unknown"?null:r.field}function sa(e,t){let r=Object.entries(so(e)).filter(([,n])=>Bn(n)==="address").map(([n])=>n);return t[e].map(n=>{let i={...n};for(let s of r)i[s]=Oe(n[s]);return i})}function Ny(e,t,r){let o=Dy(e,r);if(o.kind==="identity")return t.id??null;if(o.kind==="unknown")return null;let n=r.indexOf(".");if(n===-1)return t[r]??null;let i=r.slice(n+1);return Er(i)?P_(t[r.slice(0,n)],i):null}function iu(e,t){return sa(e,t).map(r=>r.id)}function Bk(e,t,r){return sa(e,r).find(o=>o.id===t)}function Uy(e,t,r,o){let n=Bk(e,t,o);return n===void 0?null:Ny(e,n,r)}function aa(e,t,r,o={},n){let i=tn(r);return RF(e,t,Zk(r),i,o,n)}function RF(e,t,r,o,n,i){return(i===void 0?sa(e,t):i.flatMap(a=>{let c=Bk(e,a,t);return c===void 0?[]:[c]})).map(a=>{let c={id:a.id};for(let l of o)c[l]=a.id;for(let[l,u]of Object.entries(r))c[l]=Ny(e,a,u);for(let[l,u]of Object.entries(n))c[l]=u(d=>Ny(e,a,d),a.id);return c})}function ca(e,t){if(vn(t))return K$(t,e);if(Gs(t))return e[t.slice(9)];let r=ve(t);if(r!==null)return sa(r,e);let o=ci(t);if(o!==null)return sa(o.table,e).map(n=>n[o.member]??null)}function $i(e,t){return e?.order?.[t]===!0}function la(e,t){return e?.scalar?.[t]===!0}function He(e,t){return`${e}.${t}`}function rn(e){let t=e.indexOf(".");return t<=0||t===e.length-1||e.includes(".",t+1)?null:{object:e.slice(0,t),field:e.slice(t+1)}}function My(e,t){let r=rn(t);if(r===null)return e[t];let o=e[r.object];return o!==null&&typeof o=="object"&&!Array.isArray(o)?o[r.field]:void 0}function Jk(e,t,r){let o=rn(t);if(o===null)return{...e,[t]:r};let n=e[o.object],i=n!==null&&typeof n=="object"&&!Array.isArray(n)?n:{};return{...e,[o.object]:{...i,[o.field]:r}}}function ki(e,t){return{...e?.items?.[t]??{}}}function Cy(e,t){return{...e?.items_removed?.[t]??{}}}function Wk(e){if(e===null||typeof e!="object")return[];let t=e.reads;return Array.isArray(t)?t:[]}function Kk(e){let{kind:t,section:r,slot:o}=e??{};return t==="section"&&typeof r=="string"&&typeof o=="string"?{kind:t,section:r,slot:o}:null}function qk(e){return Wk(e).map((t,r)=>{let o=t??{},{kind:n,key:i,slot:s,field:a}=o;if(n==="home"&&typeof i=="string")return{kind:"home",key:i};if(n==="row"&&typeof s=="string"&&s!==""&&typeof a=="string")return{kind:"row",slot:s,field:a};if(n==="element")return{kind:"element"};let c=Kk(t);if(c!==null)return c;throw new Error(`reads[${String(r)}] is not a home, section, row or element ref: ${JSON.stringify(t)}`)})}function ua(e){return Wk(e).flatMap(t=>Kk(t)??[])}function ar(e){return ua(e).length>0}function Ly(e,t,r,o,n,i){let a=qk(t).map(c=>{if(c.kind==="home")return ca(r,c.key);if(c.kind==="row"){if(n===void 0)throw new Error(`reads the row member "${c.field}" with no row in scope`);return n(c.field,c.slot)}if(c.kind==="element"){if(i===void 0)throw new Error("reads the element outside a list's item");return i()}return o?.(c)}).map(c=>Fh(c,r));return qt(e(...a))}function cr(e){let t=e.display;return t!==null&&typeof t=="object"?t:{}}var ao=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function co(e){return e.type==="list"&&e.element!==void 0}function lr(e){return e.element?.type==="object"?e.element.fields??{}:void 0}function su(e,t){return e.decisions?.find(r=>r.produces?.includes(t)===!0)}function Si(e,t){if(typeof e=="string")return e===""?null:e;if(t!==null&&ao(e)){let r=e.id;if(typeof r=="string"&&r!=="")return r}return Gn(e,t)}function da(e,t,r){let[o]=t;if(o===void 0)return{table:null,id:Si(e,null),element:e};if(t.length>1)for(let n of t){let i=Si(e,n);if(i!==null&&qn(r,[n]).some(s=>s.id===i))return{table:n,id:i}}return{table:o,id:Si(e,o)}}function Sn(e,t,r){return e.table!==null?e.id===null?null:qt(Uy(e.table,e.id,t,r)):ao(e.element)?e.element[t]??null:null}function jF(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619)>>>0;return t.toString(16).padStart(8,"0")}function Zy(e){let t=new Map;return e.map(r=>{let o=Gn(r,null)??`el_${jF(JSON.stringify(r)??"undefined")}`,n=t.get(o)??0;return t.set(o,n+1),n===0?o:`${o}_${String(n)}`})}function ur(e,t){let{element:r,table:o,facts:n,computes:i}=t,s=r.type==="object"?r.fields??{}:void 0;return o!==null?s===void 0?e.map(a=>a.id):e.flatMap(({element:a,id:c})=>{let l=typeof a=="string"?a:c,[u]=qt(aa(o,n,s,i,[l]));return u===void 0?[]:[Gk({...u,id:c},s,n)]}):r.type==="row"?e.map(a=>a.id):s===void 0?e.map(a=>a.element):e.map(a=>Gk(PF(a,s,i),s,n))}function Vy(e){return co(e)&&e.element?.type==="object"?e.element:void 0}function au(e,t,r){if(!Array.isArray(e))return e;let o=Zy(e);return ur(e.map((n,i)=>({element:n,id:o[i]})),{element:t,table:null,facts:r,computes:{}})}function Gk(e,t,r){for(let[o,n]of Object.entries(t)){let i=Vy(n);i!==void 0&&Object.hasOwn(e,o)&&(e[o]=au(e[o],i,r))}return e}function PF({element:e,id:t,storedItem:r},o,n){let i=new Set(tn(o)),s=c=>ao(e)?e[c]??null:null,a={id:t};for(let[c,l]of Object.entries(o)){if(i.has(c)){a[c]=t;continue}if(ao(l.source)&&l.source.kind==="element"){a[c]=e;continue}let u=We(l.source);u!==null&&i.has(u.slot)&&(a[c]=s(u.field))}for(let[c,l]of Object.entries(o)){let u=We(l.source);if(u===null||o[u.slot]?.type!=="address")continue;let d=Oe(Object.hasOwn(a,u.slot)?a[u.slot]:r?.[u.slot]);a[c]=ao(d)?d[u.field]??null:null}for(let[c,l]of Object.entries(n))a[c]=l(s,e);return a}function Yk(e,t,r){if(!Array.isArray(e))return[];let o=tn(t),n=Object.entries(t).find(([,i])=>ao(i.source)&&i.source.kind==="element"&&i.type!=="row")?.[0];return e.flatMap(i=>{let s=Gn(i,r);return s===null||!ao(i)?[]:r!==null?[{element:o.map(l=>i[l]).find(l=>typeof l=="string"&&l!=="")??s,id:s}]:[{element:n!==void 0?i[n]:o.length>0?s:void 0,id:s,storedItem:i}]})}function Qk(e){if(e.source===null||e.source===void 0||typeof e.source!="object")return null;let t=e.source;return t.kind!=="home"?null:typeof t.key=="string"?t.key:null}function eS(e,t,r,o){let n=ve(e);return n!==null?qt(aa(n,t,r,o)):qt(ca(t,e)??null)}function cu(e){if(e.source===null||e.source===void 0||typeof e.source!="object")return null;let t=e.source;return t.kind!=="derived"?null:typeof t.transform=="string"?{transform:t.transform}:null}function lu(e,t,r,o={}){let n=e.slots??{},i={},s=nS(n,t,r,o);for(let[a,c]of Object.entries(n)){if(c.type==="row"){let u=s.rows(a);u!==void 0&&(i[a]=u.id);continue}if(c.type==="object"){let u=zF(a,c,s,t,r,o);Object.keys(u).length>0&&(i[a]=u);continue}if(tS(c)){let u=rS(a,c,t,r,o,s);u!==void 0&&(i[a]=u);continue}let l=Hy(a,c,t,r,s);l!==void 0&&(i[a]=l.value)}return i}function tS(e){return co(e)&&nn(e).kind!=="other"}function EF(e,t){let r=rn(t),o=r===null?void 0:e[r.object];return r!==null&&o?.type==="object"?{container:r.object,siblings:o.fields??{}}:{}}function fa(e,t){let r=EF(e.slots,t);return o=>{let n=Ur(e.slots,r,o);return n===void 0?void 0:e.rows(n.path)}}function Hy(e,t,r,o,n){let i=fa(n,e),s=We(t.source);if(s!==null){let l=i(s.slot);return l===void 0?void 0:{value:Sn(l,s.field,r)}}let a=Qk(t);if(a!==null)try{return{value:eS(a,r)}}catch{return{value:null}}let c=cu(t);if(c!==null){if(ar(t.source))return;let l=In(c.transform,t.source,r,o,{slot_id:e},void 0,uu(i,r));return{value:l===null?null:l.value}}}function uu(e,t){return(r,o)=>{let n=e(o);return n===void 0?void 0:Sn(n,r,t)}}function nS(e,t,r,o){let n=new Map;for(let[l,u]of Object.entries(e))if(Xk(u)&&n.set(l,u),u.type==="object")for(let[d,f]of Object.entries(u.fields??{}))Xk(f)&&n.set(He(l,d),f);let i=new Map,s=new Set,c={slots:e,rows:l=>{if(i.has(l))return i.get(l);let u=n.get(l);if(u===void 0||s.has(l))return;s.add(l);let d=u.type==="address"?TF(l,u,t,r,o,c):AF(l,u,t,r,o,c);return s.delete(l),i.set(l,d),d}};return c}function Xk(e){return ny(e.type)}function TF(e,t,r,o,n,i){let s=t.source===void 0?n.stored===void 0?void 0:{value:oS(n.stored,e)}:Hy(e,t,r,o,i);return s===void 0?void 0:{table:null,id:null,element:Oe(s.value)}}function AF(e,t,r,o,n,i){let s=gt(t),a=n.heldRows?.[e];if(a!==void 0)return{table:di(r,s,a),id:a};if(t.source===void 0){if(s.length===0||su(n,e)!==void 0)return;let u=qn(r,s)[0];return u===void 0?{table:s[0],id:null}:{table:u.table,id:u.id}}let c=cu(t);if(c===null||ar(t.source))return;let l=In(c.transform,t.source,r,o,{slot_id:e},void 0,uu(fa(i,e),r));return da(l?.value??null,s,r)}function zF(e,t,r,o,n,i){let s=t.fields??{},a={};for(let[c,l]of Object.entries(s)){let u=He(e,c);if(l.type==="row"){let m=r.rows(u);m!==void 0&&(a[c]=m.id);continue}if(tS(l)){let m=rS(u,l,o,n,i,r);m!==void 0&&(a[c]=m);continue}let d=Vy(l),f=d===void 0?null:We(l.source);if(d!==void 0&&f!==null){let m=fa(r,u)(f.slot);if(m===void 0)continue;a[c]=au(Sn(m,f.field,o),d,o);continue}let p=Hy(u,l,o,n,r);p!==void 0&&(a[c]=d===void 0?p.value:au(p.value,d,o))}return a}function rS(e,t,r,o,n,i){let s=t.element;if(s===void 0)return;let a=Mr({slots:i.slots},t),c=lr(t),l={element:s,table:a,facts:r,computes:du(e,c,r,o,FF(i,e))},u=nn(t);switch(u.kind){case"table":return a===null?void 0:ur(iu(a,r).map(d=>({element:d,id:d})),l);case"derived":{if(ar(t.source))return;let d=In(u.transform,t.source,r,o,{slot_id:e},void 0,uu(fa(i,e),r));return d===null?null:ur(pa(d.value,a),l)}case"none":{if(c===void 0||n.stored===void 0)return;let d=oS(n.stored,e);return Array.isArray(d)?ur(Yk(d,c,a),l):void 0}case"section":case"other":return}}function pa(e,t){let r=Array.isArray(e)?e:[];if(t!==null)return r.flatMap(n=>{let i=Si(n,t);return i===null?[]:[{element:i,id:i}]});let o=Zy(r);return r.map((n,i)=>({element:n,id:o[i]}))}function oS(e,t){let r=rn(t);if(r===null)return e[t];let o=e[r.object];return o!==null&&typeof o=="object"?o[r.field]:void 0}function FF(e,t){return{rows:e,nested:rn(t)!==null}}function du(e,t,r,o,n){let i={},s=new Set(tn(t)),a={container:e,siblings:t??{},nested:n?.nested===!0},c=l=>{if(n===void 0)return;let u=Ur(n.rows.slots,a,l);return u===void 0||u.sibling?void 0:n.rows.rows(u.path)};for(let[l,u]of Object.entries(t??{})){let d=cu(u);d!==null&&(i[l]=(f,p)=>{let m=(S,_)=>{if(s.has(_))return f(S);let O=c(_);return O===void 0?void 0:Sn(O,S,r)};return In(d.transform,u.source,r,o,{slot_id:`${e}.${l}`},void 0,m,()=>p)?.value??null})}return i}function In(e,t,r,o,n,i,s,a){let c=o?.computed[e];try{if(c===void 0)throw new Error(`derived handle "${e}" is not in the section's computed map`);return{value:Ly(c,t,r,i,s,a)}}catch(l){return o?.log?.error({event:"derive_function_threw",section_key:o.section_key,...n,derived_handle:e,err:l},"derive: authored function threw or is missing; resolved to nothing"),null}}function By(e,t,r,o={}){return uu(fa(nS(e,t,r,o),""),t)}function fu(e,t,r,o={}){let n=cr(e),i={},s=By(e.slots??{},t,r,o);for(let a of zr){let c=n[a],l=c?.source?.transform;if(c===void 0||typeof l!="string"||ar(c.source))continue;let u=In(l,c.source,t,r,{display_entry:a},void 0,s);if(u===null)continue;let d=Jy(c,a,u.value,r);d!==null&&(i[a]=d)}return i}function Jy(e,t,r,o){let n=typeof r=="string"?r:"";return e.cases?.includes(n)===!0?n:(o?.log?.error({event:"display_compute_out_of_vocabulary",section_key:o.section_key,display_entry:t,answer:r},"display: source compute answered outside its declared cases; falling back to the first case"),null)}function pu(e,t){return e?.[t]===!0}var iS=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function sS(e){return Qe(e)??null}function Mt(e,t){let r=sS(t);return r!==null?sS(e)===r?e:t:Array.isArray(t)?Array.isArray(e)?NF(e,t):t:iS(t)&&iS(e)?DF(e,t):t}function DF(e,t){let r={};for(let[o,n]of Object.entries(t))r[o]=Mt(e[o],n);return r}function NF(e,t){let r=new Map;for(let o of e){let n=Gn(o);if(n===null)continue;let i=r.get(n);i===void 0?r.set(n,[o]):i.push(o)}return t.map(o=>{let n=Gn(o),i=n===null?void 0:r.get(n);return i===void 0||i.length===0?o:Mt(i.shift(),o)})}var UF=e=>typeof e=="string"&&e.startsWith("tmp_");function MF(e,t){let r=[],o=new Map;for(let n of t){let i=n[e],s=typeof i=="string"?o.get(i):void 0;if(s===void 0){typeof i=="string"&&o.set(i,r.length),r.push(n);continue}r[s]={...n,...r[s]}}return r}function mu(e,t,r,o,n,i){let s=i?{...e}:{};for(let[a,c]of Object.entries(t)){if(a===n){s[a]=c;continue}s[a]=r?.[a]===!0?e[a]:Mt(e[a],c)}for(let a of o)a in e&&(s[a]=e[a]);return s}function Ii(e){let t=e.membership??"table",r=e.idKey??"id",o=MF(r,e.current);if(t==="table")return LF({...e,idKey:r,current:o});let{freshSource:n,overrides:i,generatedFields:s}=e,a=new Map;for(let l of o){let u=l[r];typeof u=="string"&&a.set(u,l)}if(t==="source")return e.ordered===!0?CF(o,n,e,r):n.map(l=>{let u=l[r],d=typeof u=="string"?a.get(u):void 0;return d===void 0?l:mu(d,l,i?.[u],s,r,!0)});let c=new Map;for(let l of n){let u=l[r];typeof u=="string"&&c.set(u,l)}return o.flatMap(l=>{let u=l[r];if(typeof u!="string")return[l];let d=c.get(u);return d===void 0?[]:[mu(l,d,i?.[u],s,r,!0)]})}function CF(e,t,r,o){let n=new Map;for(let a of t){let c=a[o];typeof c=="string"&&n.set(c,a)}let i=[],s=new Set;for(let a of e){let c=a[o],l=typeof c=="string"?n.get(c):void 0;l===void 0||s.has(c)||(i.push(mu(a,l,r.overrides?.[c],r.generatedFields,o,!0)),s.add(c))}for(let a of t){let c=a[o];typeof c=="string"&&s.has(c)||i.push(a)}return i}function LF(e){let{current:t,freshSource:r,overrides:o,removed:n,generatedFields:i,idKey:s,ordered:a}=e,c=new Map;for(let f of r){let p=f[s];typeof p=="string"&&c.set(p,f)}let l=[],u=new Set;for(let f of t){let p=f[s];if(UF(p)||typeof p!="string"){l.push(f);continue}let m=c.get(p);m!==void 0&&(l.push(mu(f,m,o?.[p],i,s,!1)),u.add(p))}for(let f of r){let p=f[s];typeof p!="string"||u.has(p)||n?.[p]!==!0&&l.push(f)}if(a===!0)return l;let d=new Map;return r.forEach((f,p)=>{let m=f[s];typeof m=="string"&&d.set(m,p)}),l.map((f,p)=>{let m=f[s],S=typeof m=="string"?d.get(m):void 0;return{row:f,i:p,idx:S}}).sort((f,p)=>f.idx===void 0&&p.idx===void 0?f.i-p.i:f.idx===void 0?1:p.idx===void 0?-1:f.idx-p.idx).map(f=>f.row)}var Ky="display.",et=(e,t)=>`${e} ${t}`,gu=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function Oi(e,t){if(e===void 0)return;if(t===`${Ky}visibility`)return e.enabled?"visible":"hidden";if(t===`${Ky}variant`)return e.variant;if(Object.hasOwn(e.slots,t))return e.slots[t];let r=rn(t);if(r===null)return;let o=e.slots[r.object];return gu(o)?o[r.field]:void 0}function hu(e){let t=VF(e.sections);if(t.size===0)return{contentDoc:e.contentDoc,changed:!1,changes:[],faults:[]};let r=new Map(e.contentDoc.instances.map(I=>[I.instance_id,{...I}])),o=new Set,n=I=>(o.has(I.instance_id)||(I.slots={...I.slots},o.add(I.instance_id)),I.slots),i=(I,E,ue)=>{let fe=rn(E),Ie=n(I);if(fe===null||Object.hasOwn(Ie,E)){Ie[E]=ue;return}let ye=Ie[fe.object];Ie[fe.object]={...gu(ye)?ye:{},[fe.field]:ue}},{facts:s}=e,a=I=>(e.typing?.get(I)??e.sections.get(I))?.localKey,c=(I,E)=>e.placement.locate({kind:"section",section:E.section,slot:E.slot},{instanceId:I,section:a(I)??""})?.instanceId,l=(I,E)=>c(I.instanceId,E),u=(I,E)=>Oi(I===void 0?void 0:r.get(I),E),d=I=>e.typing?.get(I)??e.sections.get(I),f=I=>{let E=e.placement.readable(I);return E===void 0?void 0:d(E)?.schema.slots},p=(I,E)=>{let ue=I===void 0?void 0:d(I);return ue===void 0?null:v$({section:ue.localKey,slots:ue.schema.slots??{},sectionSlots:f},E)},m=new Map,S=(I,E)=>({element:I.def.element??{},table:E,facts:s,computes:du(I.key,lr(I.def),s,I.section.bakeContext)}),_=(I,E,ue,fe)=>{let Ie=I.slots[E.key];return lr(E.def)===void 0?Mt(Ie,fe):Ii({current:Array.isArray(Ie)?Ie:[],freshSource:fe,overrides:ki(I.slot_overrides,E.key),generatedFields:[],membership:"source",ordered:$i(I.slot_overrides,E.key)})},O=(I,E,ue)=>{let fe=e.typing?.get(I)??e.sections.get(I),Ie=fe===void 0?void 0:ui(fe.schema.slots??{},E),ye=u(I,E);if(Ie?.type==="address")return{value:Sn({table:null,id:null,element:Oe(ye)},ue,s)};let Fe=typeof ye=="string"&&ye!==""?ye:null,sn=Ie===void 0?null:di(s,gt(Ie),Fe),an=m.get(et(I,E)),lt=an!==void 0&&an.id===Fe?an:{table:sn,id:Fe};if(!(lt.table===null&&lt.element===void 0&&lt.id!==null))return{value:Sn(lt,ue,s)}},H=(I,E)=>{let ue=I.section.schema.slots??{},fe=rn(I.key),Ie=fe===null?void 0:ue[fe.object]?.fields,ye=fe===null||Ie===void 0?{}:{container:fe.object,siblings:Ie};return Ur(ue,ye,E)?.path},F=I=>(E,ue)=>{let fe=H(I,ue);return fe===void 0?void 0:O(I.instanceId,fe,E)?.value},P=(I,E)=>{if(E.kind==="reader"){let ye=O(E.instanceId,E.rowPath,E.field);return ye===void 0?void 0:{value:Mt(Oi(I,E.key),ye.value)}}if(E.kind==="mirror"){let ye=l(E,E.ref),Fe=u(ye,E.ref.slot),sn=p(E.instanceId,E.key);if(E.def.type==="row"){let lt=da(Fe,gt(E.def),s);return m.set(et(E.instanceId,E.key),{...lt,element:Fe}),{value:lt.id}}if(E.def.type!=="list")return{value:Mt(Oi(I,E.key),Fe??null)};let an=ur(pa(Array.isArray(Fe)?Fe:[],sn),S(E,sn));return{value:_(I,E,sn,an)}}let ue=In(E.transform,E.source,s,E.section.bakeContext,{slot_id:E.key},ye=>u(l(E,ye),ye.slot),F(E));if(E.def.type==="row"){let ye=da(ue?.value??null,gt(E.def),s);return m.set(et(E.instanceId,E.key),ye),{value:ye.id}}if(co(E.def)){let ye=p(E.instanceId,E.key),Fe=ur(pa(ue?.value??[],ye),S(E,ye));return{value:_(I,E,ye,Fe)}}let fe=E.def.type==="list",Ie=ue===null?fe?[]:null:ue.value??(fe?[]:null);return{value:Mt(Oi(I,E.key),Ie)}},N=[],Q=new Set,J=(I,E)=>{N.push({instance_id:I.instanceId,path:I.key,kind:E})},X=I=>{let E=r.get(I.instanceId);if(E===void 0)return!1;let ue=Q.has(et(I.instanceId,I.key));if(I.kind==="display")return ZF(E,I,ue?null:{facts:s,readSlot:ye=>u(l(I,ye),ye.slot),readRow:F(I)},J);if(I.kind!=="mirror"&&la(E.slot_overrides,I.key))return!1;ue&&J(I,"compute_cycle");let fe=ue?{value:I.kind!=="reader"&&I.def.type==="list"?[]:null}:P(E,I);return fe===void 0||HF(Oi(E,I.key),fe.value)?!1:(i(E,I.key,fe.value),!0)},K=[],M=new Set,V=[],le=I=>{if(I===void 0)return;let E=V.indexOf(et(I.instanceId,I.key));if(E===-1)ae(I);else for(let ue of V.slice(E))Q.add(ue)},ae=I=>{let E=et(I.instanceId,I.key);if(!(M.has(E)||V.includes(E))){V.push(E);for(let ue of I.slotRefs){let fe=l(I,ue);le(fe===void 0?void 0:t.get(et(fe,ue.slot)))}if(I.kind==="derived"||I.kind==="display")for(let ue of qy(I.source)){let fe=H(I,ue);le(fe===void 0?void 0:t.get(et(I.instanceId,fe)))}V.pop(),M.add(E),X(I)&&K.push({instance_id:I.instanceId,slot:I.key})}};for(let I of t.values())ae(I);if(K.length===0)return{contentDoc:e.contentDoc,changed:!1,changes:K,faults:N};let Se=e.contentDoc.instances.map(I=>r.get(I.instance_id)??I);return{contentDoc:{...e.contentDoc,instances:Se},changed:!0,changes:K,faults:N}}function ZF(e,t,r,o){if(pu(e.display_overrides,t.displayEntry))return!1;let n=r===null?null:In(t.transform,t.source,r.facts,t.section.bakeContext,{display_entry:t.displayEntry},r.readSlot,r.readRow),i=cr(t.section.schema)[t.displayEntry],s=n===null||i===void 0?null:Jy(i,t.displayEntry,n.value,t.section.bakeContext);s===null&&o(t,r===null?"compute_cycle":"display_unresolved");let a=s??i?.cases?.[0];if(a===void 0)return!1;if(t.displayEntry==="visibility"){let c=a!=="hidden";return e.enabled===c?!1:(e.enabled=c,!0)}return e.variant===a?!1:(e.variant=a,!0)}function VF(e){let t=new Map;for(let[r,o]of e){let n=o.schema.slots??{},i=[];for(let[c,l]of Object.entries(n)){if(i.push({path:c,def:l,reader:{}}),l.type!=="object")continue;let u=l.fields??{};for(let[d,f]of Object.entries(u))i.push({path:He(c,d),def:f,reader:{container:c,siblings:u}})}for(let{path:c,def:l}of i){let u=ty(l);if(u!==null){t.set(et(r,c),{kind:"mirror",instanceId:r,key:c,slotRefs:[u],section:o,ref:u,def:l});continue}let d=Wy(l.source),f=ua(l.source);d===null||f.length===0||t.set(et(r,c),{kind:"derived",instanceId:r,key:c,slotRefs:f,section:o,transform:d,source:l.source,def:l})}let s=(c,l)=>{let u=Ur(n,c,l)?.path,d=u===void 0?void 0:t.get(et(r,u));return d!==void 0&&(d.kind==="mirror"||d.kind==="derived")&&d.def.type==="row"?u:void 0};for(let c=!0;c;){c=!1;for(let{path:l,def:u,reader:d}of i){if(t.has(et(r,l)))continue;let f=We(u.source),p=f===null?void 0:s(d,f.slot);if(f!==null&&p!==void 0){t.set(et(r,l),{kind:"reader",instanceId:r,key:l,slotRefs:[{kind:"section",section:o.localKey,slot:p}],section:o,rowPath:p,field:f.field}),c=!0;continue}let m=Wy(u.source);m===null||!qy(u.source).some(S=>s(d,S)!==void 0)||(t.set(et(r,l),{kind:"derived",instanceId:r,key:l,slotRefs:[],section:o,transform:m,source:u.source,def:u}),c=!0)}}let a=cr(o.schema);for(let c of zr){let l=a[c]?.source,u=Wy(l),d=ua(l);if(u===null||d.length===0&&!qy(l).some(p=>s({},p)!==void 0))continue;let f=`${Ky}${c}`;t.set(et(r,f),{kind:"display",instanceId:r,key:f,transform:u,source:l,slotRefs:d,section:o,displayEntry:c})}}return t}function qy(e){return(gu(e)&&Array.isArray(e.reads)?e.reads:[]).flatMap(r=>gu(r)&&r.kind==="row"&&typeof r.slot=="string"?[r.slot]:[])}function Wy(e){if(e===null||typeof e!="object")return null;let{kind:t,transform:r}=e;return t==="derived"&&typeof r=="string"?r:null}function HF(e,t){return JSON.stringify(e)===JSON.stringify(t)}var Gy=["poi","address"];function Ri(e){return typeof e=="string"&&Gy.includes(e)}var QF=["url","date","email","phone"];function yu(e){return QF.includes(e)}var eD=["image","video","tour","document","media"];function lS(e){return eD.includes(e.type??"")?e.type:void 0}function uS(e){if(e.type==="list"){let t=e.element?.type;return t==="select"?"select":Ri(t)||t==="object"||t==="row"?void 0:lS({type:t})!==void 0?"mediaList":"list"}return e.type==="text"||yu(e.type)?"text":e.type==="select"?"choice":lS(e)}function dS(e){return typeof e=="object"&&e!==null?e.fill:void 0}function tD(e){switch(e.type){case"list":return"list";case"text":case"url":case"date":case"email":case"phone":return"text";case"number":return"number";default:return"pick"}}var fS=new Set(["select","image","video","tour","document","media","row"]);function Qy(e,t,r){let o=r.verb,n=`fillSpecFromSchema: slot "${e}" (type "${String(t.type)}")`,i=r.of;if(o==="write"&&i!==void 0)throw new Error(`${n} is filled by a \`fill.write\` that declares \`of\` \u2014 the kind a write produces is its holder's.`);if(t.type==="list"){let c=t.element?.type;if(o==="write"&&nD(n,t.element),o==="find"&&!Ri(c))throw new Error(`${n} is filled by \`fill.find\`, but only ${rD} are found \u2014 it sources ${oD} or a list whose item is one.`);if(o!=="find"&&Ri(c))throw new Error(`${n} is filled by \`fill.${o}\`, but a list of ${String(c)} is found by the platform's lookup, never ${o==="write"?"written":"picked"} \u2014 \`fill.find\`.`);pS(n,r);return}if(Ri(t.type)){if(o==="find")return;throw new Error(`${n} is filled by \`fill.${o}\`, but ${Yy(String(t.type))} is found by the platform's lookup, never ${o==="write"?"written":"picked"} \u2014 \`fill.find\`.`)}let s=t.type==="text"||t.type==="number"||yu(t.type);if(o==="write"&&s)return;if(o==="pick"&&fS.has(t.type??"")){pS(n,r);return}let a=String(t.type);throw new Error(s?`${n} is filled by \`fill.${o}\`, but ${Yy(a)} is written \u2014 \`fill.write\`.`:fS.has(t.type??"")?`${n} is filled by \`fill.${o}\`, but ${Yy(a)} holds a value that exists \u2014 \`fill.pick\`.`:`${n} is filled, but no fill produces that type.`)}function pS(e,t){if(!(t.verb!=="pick"||t.of===void 0))throw new Error(`${e} is filled by a \`fill.pick\` that states \`of\` \u2014 a pick chooses from its holder's \`from\`.`)}function nD(e,t){let r=t!==void 0&&ni(t.type??"")?"a list of media":Object.entries(t?.type==="object"?t.fields??{}:{}).find(([,o])=>ni(o.type??"")&&o.source?.kind==="element")?.[0];if(r!==void 0)throw new Error(`${e} is filled by \`fill.write\`, but ${r==="a list of media"?r:`its item's media member "${r}"`} would hold what the write answers \u2014 a write composes, it does not birth media: pick it (\`fill.pick\`).`)}var rD="places and addresses",oD=Gy.map(e=>`\`${e}()\``).join(", ");function Yy(e){return`${/^[aeiou]/.test(e)&&e!=="url"?"an":"a"} ${e}`}function yS(e,t){if(t.type==="list")return yS(e,iD(e,t));if(t.type==="row"){let o=Ft(t.from);if(o===void 0)throw new Error(`fillSpecFromSchema: row "${e}" is picked but names no \`from\` \u2014 a row's pick chooses from its table: \`from: fact.property.\u2026\`.`);return o.map(n=>({kind:"home",key:n}))}if(t.type==="select"){if(!Array.isArray(t.values))throw new Error(`fillSpecFromSchema: select "${e}" is picked but states no \`from\` \u2014 a pick chooses from the select's own values.`);return{type:"select",values:[...t.values]}}let r=fn(t);if(r===null)throw new Error(`fillSpecFromSchema: ${String(t.type)} "${e}" is picked, but holds no candidates \u2014 a pick chooses a row of a table, a select's value or a media slot's media value.`);if(r.from===void 0)throw new Error(`fillSpecFromSchema: ${String(t.type)} "${e}" is picked but names no \`from\` \u2014 a pick chooses from its holder's \`from\` (\`from: fact.property.property_media\`); a media slot without one owns its media.`);return K_(r)}function mS(e){return e.source?.kind!=="element"?!1:e.type==="row"?Ft(e.from)!==void 0:e.type==="select"?Array.isArray(e.values):ni(e.type??"")&&e.from!==void 0}function iD(e,t){let r=t.element;if(r!==void 0&&r.type!=="object"&&mS(r))return r;let o=Object.values(r?.fields??{}).filter(mS);if(o.length===1)return o[0];throw new Error(`fillSpecFromSchema: list "${e}" is picked, but its item holds ${o.length===0?"no":String(o.length)} \`from\` field${o.length===1?"":"s"} bound to the element \u2014 a picked list's item is a \`from\` primitive, or an object exactly one field of which holds the pick.`)}function ev(e,t,r){let o=r.map(n=>{let i={kind:"fill",verb:n.verb},s=n.unique;s!==void 0&&(i.unique=s),i.brief=n.brief;let a=n.none;a!==void 0&&(i.none=a);let c=vu(n.reads);c.length>0&&(i.reads=c);let l=vu(n.requires);return l.length>0&&(i.requires=l),i});return r.some(n=>n.verb==="pick")?{of:yS(e,t),fills:o}:{fills:o}}function vu(e){return(e??[]).map(t=>{if(typeof t=="object"&&t!==null&&t.kind==="item")return t;if(Ae(t))throw new Error(`fillSpecFromSchema: a fill reads the slot "${typeof t.label=="string"?t.label:t.type}" by its const, which only a section declared with \`section()\` resolves \u2014 read another section's slot through its ref (\`Section.slots.<key>\`).`);if(_l(t))throw new Error("fillSpecFromSchema: a fill reads a fact registry's page \u2014 a section reads a fact through `fact.*`, never a registry's own declaration.");return T_(t)})}function bu(e,t,r){for(let o of t??[]){let n=D_(o);for(let i of vu(o.reads))i.kind==="home"?e.facts.add(i.key):bh(i)&&i.section!==n&&e.slots.set(`${i.section} ${i.slot}`,i)}for(let o of Array.isArray(r)?r:[r])Re(o)&&ve(o.key)!==null&&e.facts.add(o.key)}function vS(e){return e.type==="poi"}function bS(e){return e.type==="row"&&Ft(e.from)!==void 0}function sD(e,t,r){if(!(r.userAnswers||t.source!==void 0||De(t)!==void 0)&&!(vS(t)||bS(t)))throw new Error(`fillSpecFromSchema: slot "${e}" declares no \`source:\` \u2014 nothing would ever write it. Bind it to a fact, a row's member or a slot, \`compute()\` it, or fill it.`)}function aD(e,t){if(t.type==="select")throw new Error(`fillSpecFromSchema: select slot "${e}" is filled, which only a select inside a list's item may be \u2014 a top-level select is bound with \`source:\`; fill a field of a list's object item instead.`)}function cD(e,t,r){for(let i of r)Qy(e,t,i);aD(e,t);let{of:o,fills:n}=ev(e,t,r);return{id:e,kind:tD(t),...o===void 0?{}:{of:o},produces:[e],fills:n}}function lD(e,t,r,o){for(let a of r)Qy(e,t,a);if(!(o.userAnswers&&t.type==="list"&&r.every(a=>a.verb==="pick"))&&t.type!=="row"&&uS(t)===void 0)throw new Error(`fillSpecFromSchema: item field "${e}" (type "${String(t.type)}") is filled, but an item cannot fill one \u2014 an item's fields are written or picked inside the list's one batched call, which plans text, a date, an email, a phone, a url, a select key, a media value, a row, or a list of text, dates, emails, phones, urls, keys or media.`);let{of:i,fills:s}=ev(e,t,r);return{...i===void 0?{}:{of:i},fills:s}}function uD(e,t,r,o){let n=De(t),i=t.element?.type==="object"?t.element.fields??{}:void 0,s={};for(let[d,f]of Object.entries(i??{})){let p=De(f);p!==void 0&&(s[d]=lD(`${e}.${d}`,f,p,o),bu(r,p,s[d].of))}let a=n===void 0&&t.source===void 0;if(!o.userAnswers&&a&&Object.keys(s).length>0)throw new Error(`fillSpecFromSchema: list "${e}" fills its items' fields but has no source \u2014 a list the user builds holds no items when the fill runs. Source it (a table, a pool, a list, a compute) or fill it (\`fill.pick({ brief })\`, \`fill.write()\`).`);if(!o.userAnswers&&!a){for(let[d,f]of Object.entries(i??{}))if(!(f.source!==void 0||De(f)!==void 0||vS(f)||bS(f)))throw new Error(`fillSpecFromSchema: item field "${e}.${d}" declares no \`source:\` \u2014 nothing would ever write it. Read the element or a row's member, \`compute()\` it, or fill it.`)}let c=Object.keys(s).length>0?{fields:s}:{};if(n===void 0)return Object.keys(s).length===0?void 0:{id:e,kind:"list",produces:[e],...c};if(!o.userAnswers&&t.max===void 0)throw new Error(`fillSpecFromSchema: list "${e}" is filled but declares no \`max\` \u2014 a section's filled list is chosen in one call, so the list bounds it.`);for(let d of n)Qy(e,t,d);let{of:l,fills:u}=ev(e,t,n);return bu(r,n,l),{id:e,kind:"list",...l===void 0?{}:{of:l},produces:[e],fills:u,...c}}function gS(e,t,r,o){if(t.type==="list")return uD(e,t,r,o);let n=De(t);if(n===void 0){sD(e,t,o);return}let i=cD(e,t,n);return bu(r,n,i.of),i}function wS(e,t){let r=[];for(let[o,n]of Object.entries(e.slots)){let i=n,s=i.type==="object"?Object.entries(i.fields??{}).map(([a,c])=>gS(`${o}.${a}`,c,t,e)):[gS(o,i,t,e)];for(let a of s)a!==void 0&&r.push(a)}return r}var Xy="display";function dD(e,t){let r=e.meta.display;if(r===void 0)return;let o=zr.filter(i=>dS(r[i])!==void 0);if(o.length===0)return;let n=new Map;for(let i of o){let s=De(dS(r[i]));bu(t,s);for(let a of(s??[]).flatMap(c=>vu(c.reads)))a.kind==="home"?n.set(`home ${a.key}`,a):bh(a)?n.set(`section ${a.section} ${a.slot}`,a):n.set(JSON.stringify(a),a)}if(Xy in e.slots)throw new Error(`fillSpecFromSchema: slot "${Xy}" collides with the decision id reserved for \`meta.display\`'s own fill \u2014 rename the slot.`);return{id:Xy,kind:"display",entries:o,produces:[],...n.size===0?{}:{reads:[...n.values()]}}}function hS(e,t){return e<t?-1:e>t?1:0}function fD(e){return[...e.values()].sort((t,r)=>hS(t.section,r.section)||hS(t.slot,r.slot))}function xS(){return{facts:new Set,slots:new Map}}function _S(e){let t=xS(),r={slots:e.slots,userAnswers:!1},o=wS(r,t),n=dD(e,t);return n!==void 0&&o.push(n),{reads:[...t.facts].sort(),slot_reads:fD(t.slots),decisions:o}}function $S(e){let t=xS(),r=e.pages,o={slots:Object.fromEntries(Object.entries(r).map(([i,s])=>[`${e.home}.${i}`,s.declaration])),userAnswers:!0},n=wS(o,t);return{reads:[...t.facts].sort(),slot_reads:[],decisions:n}}var ma="We can\u2019t read HEIC photos yet. Save it as a JPEG (on a Mac, open it in Preview and choose File > Export), then upload that.",pD=new Set([".heic",".heif"]),mD=new Set(["image/heic","image/heif","image/heic-sequence","image/heif-sequence"]),kS=new Set(["heic","heix","heim","heis","hevc","hevx","hevm","hevs"]);function SS(e,t){return pD.has(e)||mD.has(t)}function IS(e){if(e.length<12)return!1;let t=n=>String.fromCharCode(e[n],e[n+1],e[n+2],e[n+3]);if(t(4)!=="ftyp")return!1;if(kS.has(t(8)))return!0;let r=(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0,o=Math.min(r,e.length);for(let n=16;n+4<=o;n+=4)if(kS.has(t(n)))return!0;return!1}var tv=4096,gD=new Set(["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation"]),hD=new Set(["application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint"]),OS=new Set(["text/plain","text/csv"]),yD=new Set([...OS,"application/vnd.ms-excel"]),on=e=>e.startsWith("image/"),On=e=>e.startsWith("video/");function Ne(e,t,r){return e.length<t+r.length?!1:r.every((o,n)=>e[t+n]===o)}function Ot(e,t,r){let o=Array.from(r,n=>n.charCodeAt(0));return Ne(e,t,o)}var vD=e=>Ot(e,4,"ftyp"),bD=["moov","mdat","wide","free","skip","pnot"];function wD(e){let t=(r,o)=>e.length>r+o*2&&e[r]===71&&e[r+o]===71&&e[r+o*2]===71;return t(0,188)||t(4,192)}var xD=1024;function _D(e){let t=Math.min(e.length,xD);for(let r=0;r+5<=t;r++)if(Ot(e,r,"%PDF-"))return!0;return!1}function RS(e){return e.length===0?!1:e.every(t=>t>=32||t===9||t===10||t===13||t===12)}function $D(e){if(!RS(e))return!1;let t=new TextDecoder("utf-8",{fatal:!1}).decode(e).toLowerCase();return t.trimStart().startsWith("<?xml")||t.includes("<svg")}var kD=[{label:"a JPEG image",test:e=>Ne(e,0,[255,216,255]),satisfies:on},{label:"a PNG image",test:e=>Ne(e,0,[137,80,78,71,13,10,26,10]),satisfies:on},{label:"a GIF image",test:e=>Ot(e,0,"GIF87a")||Ot(e,0,"GIF89a"),satisfies:on},{label:"a WebP image",test:e=>Ot(e,0,"RIFF")&&Ot(e,8,"WEBP"),satisfies:on},{label:"a BMP image",test:e=>Ot(e,0,"BM"),satisfies:on},{label:"a TIFF image",test:e=>Ne(e,0,[73,73,42,0])||Ne(e,0,[77,77,0,42]),satisfies:on},{label:"a Windows icon",test:e=>Ne(e,0,[0,0,1,0])||Ne(e,0,[0,0,2,0]),satisfies:on},{label:"a JPEG 2000 image",test:e=>Ne(e,0,[0,0,0,12,106,80,32,32])||Ne(e,0,[255,79,255,81]),satisfies:on},{label:"a JPEG XL image",test:e=>Ne(e,0,[255,10])||Ne(e,0,[0,0,0,12,74,88,76,32]),satisfies:on},{label:"an ISO base media file (MP4, MOV or AVIF)",test:vD,satisfies:e=>on(e)||On(e)},{label:"a QuickTime video",test:e=>bD.some(t=>Ot(e,4,t)),satisfies:On},{label:"a Matroska or WebM video",test:e=>Ne(e,0,[26,69,223,163]),satisfies:On},{label:"an AVI video",test:e=>Ot(e,0,"RIFF")&&Ot(e,8,"AVI "),satisfies:On},{label:"an MPEG video stream",test:e=>Ne(e,0,[0,0,1,186])||Ne(e,0,[0,0,1,179]),satisfies:On},{label:"an MPEG transport stream",test:wD,satisfies:On},{label:"a Flash video",test:e=>Ot(e,0,"FLV")&&e[3]===1,satisfies:On},{label:"an Ogg video",test:e=>Ot(e,0,"OggS"),satisfies:On},{label:"a Windows Media video",test:e=>Ne(e,0,[48,38,178,117,142,102,207,17]),satisfies:On},{label:"a PDF",test:_D,satisfies:e=>e==="application/pdf"},{label:"a ZIP archive (the container Word, Excel and PowerPoint files use)",test:e=>Ne(e,0,[80,75,3,4])||Ne(e,0,[80,75,5,6])||Ne(e,0,[80,75,7,8]),satisfies:e=>gD.has(e)},{label:"a legacy Office document",test:e=>Ne(e,0,[208,207,17,224,161,177,26,225]),satisfies:e=>hD.has(e)},{label:"SVG or XML markup",test:$D,satisfies:e=>e==="image/svg+xml"||OS.has(e)},{label:"plain text",test:RS,satisfies:e=>yD.has(e)}];function nv(e,t){if(IS(e))return{ok:!1,detail:ma};let r=kD.find(o=>o.test(e));return r?r.satisfies(t)?{ok:!0}:{ok:!1,detail:`This file was uploaded as ${t}, but its contents are ${r.label}. Rename or re-export the file so its type matches, then try again.`}:{ok:!1,detail:`This file's contents don't look like ${t}. It may be corrupt, empty, or saved in a format we don't accept.`}}var ji=500*1024*1024,wu=[{extension:".pdf",mimeTypes:["application/pdf"],family:"pdf"},{extension:".csv",mimeTypes:["text/csv","application/vnd.ms-excel"],family:"spreadsheet"},{extension:".xlsx",mimeTypes:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],family:"spreadsheet"},{extension:".docx",mimeTypes:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],family:"text-document"},{extension:".doc",mimeTypes:["application/msword"],family:"text-document"},{extension:".txt",mimeTypes:["text/plain"],family:"text-document"},{extension:".pptx",mimeTypes:["application/vnd.openxmlformats-officedocument.presentationml.presentation"],family:"presentation"}],jS=new Set(wu.map(e=>e.extension)),PS=new Set(wu.flatMap(e=>e.mimeTypes));function Pi(e){let t=e.indexOf(";");return(t===-1?e:e.slice(0,t)).trim().toLowerCase()}function Rt(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),r=e.slice(t+1),o=r.lastIndexOf(".");return o<=0?"":r.slice(o).toLowerCase()}function SD(e){return Pi(e).startsWith("image/")}function ID(e){return Pi(e).startsWith("video/")}function OD(e,t){return jS.has(Rt(e))&&PS.has(Pi(t))}function ES(e,t){return rv(e,t)!==null?!1:SD(t)||ID(t)||OD(e,t)}function rv(e,t){return SS(Rt(e),Pi(t))?ma:null}var RD=[...PS,...jS].join(","),SB=["image/*","video/*",RD].join(","),TS="an image, a video, or a document (PDF, Word, Excel .xlsx, PowerPoint .pptx, CSV, or text)";var ov={},AS={};for(let e of wu){let t=e.extension.slice(1);AS[t]=e.mimeTypes[0];for(let r of e.mimeTypes)ov[r]=t}var zS={"image/avif":"avif","image/webp":"webp","image/jpeg":"jpg","image/png":"png","image/svg+xml":"svg","video/mp4":"mp4",...ov},jD={avif:"image/avif",webp:"image/webp",jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",mp4:"video/mp4",...AS},PD={image:"img",video:"video"};function ED(e){return ov[e]?"doc":PD[e.split("/")[0]]??null}function TD(e){let t=(e.split("/").pop()??"").split("?")[0]??"",r=t.lastIndexOf(".");if(r<=0)return null;let o=t.slice(r+1);return/^[a-zA-Z0-9]+$/.test(o)?o.toLowerCase():null}function Ei(e,t){if(t&&zS[t])return t;let r=TD(e);return r?jD[r]??null:null}function iv(e,t,r,o){let n=ED(t);if(!n)return null;let i=o(r===null?e:`${e}
73
+ ${r}`).slice(0,16);return`assets/${n}/${i}.${zS[t]}`}function sv(e,t=64){let r=new WeakMap,o=n=>typeof n=="object"&&n!==null||typeof n=="function"?n:null;return{hash:e,kept(n,i){let s=o(n),a=s===null?void 0:r.get(s),c=a?.get(i);if(c!==void 0)return a.delete(i),a.set(i,c),c},keep(n,i,s){let a=o(n);if(a===null)return;let c=r.get(a);c===void 0&&r.set(a,c=new Map),c.delete(i),c.set(i,s),c.size>t&&c.delete(c.keys().next().value)}}}function FS(e){return e.split("/").pop()}function av(e,t){let r=e.replace(/\/+$/,"");return t==="/"?`${r}/`:`${r}${t}/`}function cv(e){let{pages:t,currentPageId:r,contentBase:o}=e,n=t.find(a=>a.id===r);if(n===void 0)throw new Error(`nav: page "${r}" is not one of the declared pages (${t.map(a=>a.id).join(", ")}).`);let i=new Map;for(let a of t)if(!(a.id!==n.id&&a.enabled===!1))for(let c of a.sections){if(c.enabled===!1)continue;let l=FS(c.key);(!i.has(l)||a.id===n.id)&&i.set(l,{page:a,anchor:c.anchor})}let s={};for(let[a,{page:c,anchor:l}]of i)l===void 0||l===""||(s[a]=c.id===n.id?`#${l}`:`${av(o,c.path)}#${l}`);return{anchors:s,pages:t.filter(a=>a.enabled!==!1).map(a=>({id:a.id,label:a.label,href:av(o,a.path),current:a.id===n.id}))}}function ga(e){return e?.variant?.cases[0]}function DS(e){return e.split("-").map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function lv(e){let t=e?.variant;if(t)return{cases:t.cases.map(r=>({value:r,label:DS(r)})),locked:t.locked===!0}}function uv(e,t){return e?.find(r=>r.page_id===t)?.enabled??!0}function NS(e){let t=e.find(r=>r.path==="/")??e[0];if(t===void 0)throw new Error("a composition holds at least one page");return t}function dv(e){if(e.output==="website")return[NS(e.pages).id];let t=e.canvases[0];if(t===void 0)throw new Error("a composition holds at least one canvas");return[...t.pages]}function fv(e){let t=new Set,r=[];for(let o of e.pages)for(let n of o.sections)t.has(n.instance_id)||(t.add(n.instance_id),r.push(n));return r}var pv={pending:[],processing:{},failed:[],failed_crops:[],waiting:{},evaluating:!1};async function mv(e){let{composition:t,contentDoc:r}=e,o=new Map(r.instances.map(c=>[c.instance_id,c])),n=new Map,i=new Set(dv(t));for(let c of t.pages)if(i.has(c.id))for(let l of c.sections)n.has(l.instance_id)||n.set(l.instance_id,c.id);let s=await Promise.all(fv(t).map(async c=>{let l=e.sectionOf(c.section),u=l.schema.display,d=o.get(c.instance_id)?.variant??ga(u),f=n.get(c.instance_id),[p,m]=await Promise.all([e.computedOf(c,l),f===void 0?Promise.resolve({html:null,render_error:null}):e.render(c,l,{pageId:f,variant:d})]);return{instance_id:c.instance_id,section_key:l.section_key,section_display_name:l.section_display_name,render_key:l.render_key,schema:l.schema,fill_spec:l.fill_spec,required:c.required??!1,html:m.html,render_error:m.render_error===null?null:{code:m.render_error.code,message:m.render_error.message},fill_failure:e.fillFailureOf?.(c.instance_id)??null,computed:p,...e.resolveFaultsOf===void 0?{}:{resolve_faults:e.resolveFaultsOf(c.instance_id)},variant:d,variant_select:lv(u)}})),a=t.output==="website";return{deliverable:e.deliverable,format:e.format,pages:t.pages.map(c=>({id:c.id,label:c.label,path:a?c.path??null:null,...a?{}:{direction:c.direction??"column"},optional:c.optional??!1,enabled:uv(r.page_state,c.id),instance_ids:c.sections.map(l=>l.instance_id)})),canvases:t.canvases.map(c=>({id:c.id,label:c.label,page_ids:[...c.pages]})),sections:s,facts:e.facts,by:e.by,fill_holders:e.fillHolders,content_fingerprint:e.contentFingerprint}}function xu(e){return{id:e.id,label:e.label,category:e.category,...e.width!==void 0?{width:e.width}:{},...e.height!==void 0?{height:e.height}:{},...e.dpi!==void 0?{dpi:e.dpi}:{},...e.bleed!==void 0?{bleed:e.bleed}:{}}}var gv=["home","building","apartments","trendUp","tag","key","template","palette","filePen","library","plug","helpCircle","lock","creditCard","settings","power","user","plus","globe","image","fileText","users","eye","eyeOff","pulse","search","chart","layout","chevDown","chevRight","chevSelector","pencil","dots","grip","external","copy","trash","archive","sparkle","arrowUp","arrowDown","arrowLeft","arrowRight","undo","redo","logout","check","x","clock","calendar","mapPin","userPlus","mail","phone","share","upload","bookOpen","newspaper","presentation","instagram","facebook","linkedin","xLogo"],MB=new Set(gv);var AD={crop:b.object({mode:b.enum(["locked","free"]),aspect:b.number().positive().optional(),aspectLabel:b.string().optional(),mobile:b.object({aspect:b.number().positive(),breakpoint:b.number().int().positive()}).strict().optional()}).strict().refine(e=>e.mode!=="locked"||e.aspect!=null,{message:"locked crop requires an aspect"}).refine(e=>e.mobile==null||e.aspect!=null,{message:"a mobile crop needs a desktop aspect to differ from"}).refine(e=>e.mobile==null||e.aspect==null||Math.abs(e.mobile.aspect-e.aspect)>1e-4,{message:"a mobile crop equal to the desktop aspect declares nothing \u2014 omit it"}).optional()},zD={playback:b.object({autoplay:b.boolean().optional(),loop:b.boolean().optional(),muted:b.boolean().optional(),controls:b.boolean().optional(),playsinline:b.boolean().optional(),preload:b.enum(["none","metadata","auto"]).optional()}).strict().refine(e=>e.autoplay!==!0||e.muted===!0,{message:"autoplay requires muted (browsers block unmuted autoplay)"}).optional()},FD=b.object({kind:b.literal("process"),verb:b.enum(Sl)}).catchall(b.unknown()),ha={from:b.union([b.string().min(1),b.array(b.string().min(1)).min(2)]).optional(),process:b.array(FD).nonempty().optional()},Ti=e=>e==null||typeof e=="string"&&e.trim()==="",hv=e=>e==null,_u=e=>e==null||typeof e=="object"&&Object.values(e).every(t=>t==null||t===""),$u={text:{shape:{size:b.enum(["short","medium","long"]).optional(),cap:b.number().int().positive().optional()},default:()=>"",isEmpty:Ti},number:{shape:{thousandsSep:b.boolean().optional(),decimals:b.boolean().optional(),maxDigits:b.number().int().positive().optional()},default:()=>null,isEmpty:hv},select:{shape:{values:b.array(b.union([b.string(),b.object({value:b.string(),label:b.string(),icon:b.enum(gv).optional(),description:b.string().min(1).optional()}).strict()])).optional(),options:b.object({source:b.string()}).strict().optional(),creatable:b.boolean().optional()},default:()=>null,isEmpty:Ti},image:{shape:{...AD,...ha},default:()=>({url:"",alt:""}),isEmpty:_u},video:{shape:{...zD,...ha},default:()=>({url:"",poster:"",alt:""}),isEmpty:_u},tour:{shape:{...ha},default:()=>({id:"",url:"",poster:"",alt:""}),isEmpty:_u},list:{shape:{min:b.number().int().nonnegative().optional(),max:b.number().int().positive().optional()},default:()=>[],isEmpty:e=>e==null||Array.isArray(e)&&e.length===0},poi:{shape:{},default:()=>null,isEmpty:hv},url:{shape:{accepts:b.string().optional()},default:()=>"",isEmpty:Ti},date:{shape:{},default:()=>null,isEmpty:Ti},email:{shape:{},default:()=>"",isEmpty:Ti},phone:{shape:{},default:()=>"",isEmpty:Ti},address:{shape:{},default:()=>null,isEmpty:e=>Oe(e)===null},document:{shape:{...ha},default:()=>null,isEmpty:hv},media:{shape:{kinds:b.array(b.enum(ti)).nonempty().optional(),...ha},default:()=>null,isEmpty:_u}};function DD(e){return U_.includes(e)}function US(e){return e==="object"?{}:DD(e)?$u[e].default():null}var ND={property:["property.hero"],library:[]};function ZS(e,t){let r=[];for(let o of e??[])o.kind==="home"&&o.key!==void 0?r.push(o.key):o.kind==="item"&&o.field!==void 0&&t!==null&&r.push(`${t}[].${o.field}`);return r}function ya(e,t){return Tr(e)?ZS(e.reads,t):[]}function yv(e){let t=e.from;return t===void 0||e.type==="row"?[]:[...Ft(t)??[]]}function MS(e,t){let r=e?.of,o=r?.type==="media"?[...Ft(r.from)??[]]:[];return[...(e?.fills??[]).flatMap(n=>ZS(n.reads,t)),...o]}function CS(e){return[...new Set(e)]}function UD(e){if(e.type==="object")return{fields:e.fields,rowsOf:null};let t=T$(e);if(t===null)return null;let r=A$(t)[0];if(r===void 0)return null;let{home:o,key:n}=fi(r),i=Tl(o).pages[n]?.declaration;return i?.type!=="list"||i.element.type!=="object"?null:{fields:i.element.fields,rowsOf:r}}function MD(e,t,r){let o=e.pages[t],n=o.declaration,i=`${e.home}.${t}`,s=r.get(i),a=o.head,c=[...MS(s,i),...ya(n.source,null),...yv(n),...a===null?[]:[...ya(a.title,null),...ya(a.description,null)],...n.type==="list"?[...ya(n.max,null),...yv(n.element)]:[]],l=n.type==="list"?UD(n.element):null,u;return l!==null?u=Object.entries(l.fields).map(([d,f])=>({path:`${i}[].${d}`,declaration:f,reads:CS([...ya(f.source,i),...MS(s?.fields?.[d],i),...yv(f)])})):n.type==="address"?u=Pr.map(d=>({path:`${i}.${d}`,declaration:null,reads:[]})):u=[{path:i,declaration:n,reads:[]}],{home:e.home,key:t,path:i,declaration:n,paged:z$(o),rowsOf:l?.rowsOf??null,fields:u,reads:CS(c.filter(d=>d!==i))}}var LS=new WeakMap;function VS(e){let t=LS.get(e);if(t!==void 0)return t;let r=new Map;for(let n of $S(e).decisions)n.id!==void 0&&r.set(n.id,n);let o={home:e.home,facts:Object.keys(e.pages).map(n=>MD(e,n,r)),platformReads:ND[e.home]};return LS.set(e,o),o}var CD=/^([a-z]+\.[a-z_]+)(?:(\[\]|\[0\])\.([a-z_]+))?(?:\.([a-z_]+))?$/;function LD(e){let t=e.map(VS),r=t.flatMap(o=>o.facts);return{platformReads:t.flatMap(o=>o.platformReads),facts:r,byPath:new Map(r.map(o=>[o.path,o])),fields:new Map(r.flatMap(o=>o.fields.map(n=>[n.path,n])))}}function va(e,t){let r=CD.exec(t),o=r===null?void 0:e.byPath.get(r[1]);if(r===null||o===void 0)throw new Error(`require graph: "${t}" names no fact the registries declare.`);let[,,n,i,s]=r;return{fact:o,...n===void 0?{}:{rows:n==="[0]"?"first":"every"},...i===void 0?{}:{member:i},...s===void 0?{}:{part:s}}}function ZD(e,t){let r=va(e,t);return r.member!==void 0?[`${r.fact.path}[].${r.member}`]:r.part!==void 0?[`${r.fact.path}.${r.part}`]:r.fact.fields.map(o=>o.path)}function dr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function HS(e,t){if(e===null)return t==null;switch(e.type){case"list":return!Array.isArray(t)||t.length===0;case"object":return!dr(t);case"row":return t==null;case"media":return $u.image.isEmpty(t);default:return $u[e.type]?.isEmpty(t)??t==null}}function BS(e,t){let r=Oe(e);return r===null||r[t]===null}function VD(e){if(typeof e=="string")return e;if(!dr(e))return null;let t=e.id??e.row_id;return typeof t=="string"?t:null}function HD(e,t,r,o,n){if(e.rowsOf===null)return dr(r)?r[o]:void 0;let i=fi(e.rowsOf),s=t[i.home],a=VD(r),c=s?.[i.key],l=Array.isArray(c)&&a!==null?c.find(u=>dr(u)&&u.id===a):void 0;if(dr(l))return l[o];if(dr(r)&&Object.hasOwn(r,o))return r[o];if(s==null&&a!==null)throw new Error(`require graph: "${n}" reads a picked row's member, but the facts hold only the pick; pass the ${i.home} facts, where the row's members are stored.`)}function BD(e,t,r){let{fact:o,rows:n,member:i,part:s}=va(e,r),a=t[o.home]?.[o.key]??null;if(i===void 0)return s===void 0?!HS(o.declaration,a):!BS(a,s);let c=e.fields.get(`${o.path}[].${i}`)?.declaration??null,l=d=>{let f=HD(o,t,d,i,r);return s===void 0?!HS(c,f):!BS(f,s)},u=Array.isArray(a)?a:[];return n==="first"?u.length>0&&l(u[0]):u.every(l)}function JD(e){return e==null?!0:typeof e=="string"?e.trim()==="":Array.isArray(e)?e.length===0:dr(e)?Object.keys(e).length===0:!1}function WD(e,t){let[r,...o]=t.split("[]"),n=r.indexOf("."),i=n<0?e[r]:e[He(r.slice(0,n),r.slice(n+1))]??WS(e[r.slice(0,n)],r.slice(n+1));return KS(i,o)}function WS(e,t){let r=e;for(let o of t.split(".").filter(n=>n!==""))r=dr(r)?r[o]:void 0;return r}function KS(e,t){if(t.length===0)return JD(e);if(!Array.isArray(e))return!1;let[r,...o]=t;return e.some(n=>KS(WS(n,r),o))}function KD(e,t){return e.when===void 0||t!==void 0&&e.when.includes(t)}function qD(e){let t=[];for(let r=e.indexOf("[]");r>=0;r=e.indexOf("[]",r+2))t.push(e.slice(0,r),e.slice(0,r+2));return t.filter(r=>r!==e)}function vv(e,t,r){let o=n=>n.required&&KD(n,r);return o(t)?qD(t.path).every(n=>{let i=e.slots.find(s=>s.path===n);return i===void 0||o(i)}):!1}function GD(e,t){let r=t.variant===void 0?void 0:e.variantCases.get(t.section);return r===void 0||r.length===0?[void 0]:r}function YD(e,t,r){let o=e.page_state?.find(a=>a.page_id===t)?.enabled!==!1,n=e.instances.find(a=>a.instance_id===r.instanceId),i=n?.enabled===void 0?r.visibility?.first!=="hidden":n.enabled,s=r.variant===void 0?void 0:n?.variant??r.variant.first;return{shown:o&&r.required&&i,variant:s}}var XD=[Ze,Yn];function ku(e,t){for(let r of t)e.set(r,[r])}function QD(e,t){t.length===1?ku(e,t):t.length>1&&e.set(t.join("|"),t)}function e4(e){let[t,...r]=e;return t===void 0?new Map:new Map([...t].filter(([o])=>r.every(n=>n.has(o))))}function qS(e){let t=LD(e.registries??XD),r=new Set,o=new Set,n=m=>{let{fact:S}=va(t,m);o.has(S.path)||(o.add(S.path),S.reads.forEach(n));for(let _ of ZD(t,m))r.has(_)||(r.add(_),t.fields.get(_)?.reads.forEach(n))},i=new Map,s=[],a=[],c=[];t.platformReads.forEach(n);for(let m of e.subjects){let S=new Map;for(let P of m.graph.pages)for(let N of P.instances)S.set(N.instanceId,{pageId:P.id,instance:N});let _=new Set,O=(P,N,Q,J,X)=>{if(Q.kind!=="mirror"){X(P,N,Q);return}let K=Q.mirrors===void 0?void 0:S.get(Q.mirrors.instanceId),M=`${Q.mirrors?.instanceId??""}/${Q.mirrors?.slot??""}`,V=K?.instance.slots.find(le=>le.path===Q.mirrors?.slot);K!==void 0&&V!==void 0&&!J.has(M)&&O(K.pageId,K.instance,V,new Set([...J,M]),X)},H=P=>(N,Q,J)=>{switch(J.kind){case"binding":case"member":ku(P,J.reads);return;case"row":QD(P,J.reads);return;case"compute":case"fill":case"content":ku(P,J.requires);return;case"mirror":case"element":return}},F=P=>(N,Q,J)=>{if(J.kind!=="fill"&&J.kind!=="content")return;let X=P.instances.find(M=>M.instance_id===Q.instanceId),K=`${Q.instanceId}/${J.path}`;_.has(K)||!WD(X?.slots??{},J.path)||(_.add(K),c.push({subject:m.id,pageId:N,instanceId:Q.instanceId,slot:J.path}))};for(let P of m.graph.pages)for(let N of P.instances){let Q=N.required&&N.visibility===void 0&&!m.optionalPages.has(P.id),J=GD(m,N);for(let X of["visibility","variant"]){let K=N[X];K!==void 0&&(K.reads.forEach(n),K.requires.length!==0&&(X==="variant"&&Q?ku(i,K.requires):a.push({subject:m.id,instanceId:N.instanceId,slot:`display.${X}`,requires:K.requires})))}if(Q){let X=J.map(K=>{let M=new Map;for(let V of N.slots)vv(N,V,K)&&O(P.id,N,V,new Set,H(M));return M});for(let[K,M]of e4(X))i.set(K,M)}for(let X of N.slots)X.reads.forEach(n),!(Q&&J.every(M=>vv(N,X,M)))&&(X.kind==="compute"||X.kind==="fill")&&X.requires.length>0&&a.push({subject:m.id,instanceId:N.instanceId,slot:X.path,requires:X.requires});if(m.content!==void 0){let{shown:X,variant:K}=YD(m.content,P.id,N),M=F(m.content);if(X)for(let V of N.slots)vv(N,V,K)&&O(P.id,N,V,new Set,M)}}}let l=m=>BD(t,e.facts,m);for(let m of a)s.push({...m,unanswered:m.requires.filter(S=>!l(S))});for(let m of i.values())m.forEach(n);let u=[...i.values()].filter(m=>!m.some(l)),d=new Set(u.flat()),f=new Set([...i.values()].flat()),p=[];for(let m of t.facts){let S=F=>va(t,F).fact===m,_=F=>[...F].filter(S).sort((P,N)=>JS(t,m,P)-JS(t,m,N)),O=m.fields.map(F=>F.path).filter(F=>r.has(F)),H=_(f);O.length===0&&H.length===0||p.push({home:m.home,key:m.key,paged:m.paged,used:O,required:H,unanswered:H.filter(F=>d.has(F)),preconditions:s.filter(F=>F.requires.some(S))})}return{pages:p,emptyContent:c}}function JS(e,t,r){if(r===t.path)return-1;let{member:o,part:n}=va(e,r),i=o===void 0?`${t.path}.${n??""}`:`${t.path}[].${o}`,s=t.fields.findIndex(a=>a.path===i);return(s<0?t.fields.length:s)*2+(r.includes("[0]")?1:0)}function t4(e){let r=e.display?.variant?.cases;return Array.isArray(r)?r.filter(o=>typeof o=="string"):void 0}function Su(e,t){let r=new Map;for(let[o,n]of t.sections){let i=t4(n.schema);i!==void 0&&r.set(o,i)}return{id:e,graph:t.readGraph,optionalPages:new Set(t.composition.pages.filter(o=>o.optional===!0).map(o=>o.id)),variantCases:r}}function GS(e){let t=e;return{instances:Array.isArray(t?.instances)?t.instances:[],page_state:Array.isArray(t?.page_state)?t.page_state:void 0}}function bv(e,t,r){return{...Su(e,t),content:GS(r)}}function Iu(e,t){return qS({subjects:e,facts:{property:t}})}function Ou(e,t,r){return{mode:e,subjects:t.map(o=>o.id),pages:r.pages.map(o=>({home:o.home,key:o.key,paged:o.paged,used:[...o.used],required:[...o.required],unanswered:[...o.unanswered],preconditions:o.preconditions.map(n=>({subject:n.subject,instance_id:n.instanceId,slot:n.slot,requires:[...n.requires],unanswered:[...n.unanswered]}))})),empty_content:r.emptyContent.map(o=>({subject:o.subject,page_id:o.pageId,instance_id:o.instanceId,slot:o.slot}))}}function wv(e,t){return Ou("deliverable",[e],Iu([e],t))}function ba(e){return/^processed\/crops\/([^/]+)\//.exec(e)?.[1]??null}var n4={responsiveFor:()=>Promise.resolve(null)};async function fr(e,t){try{let r=await e.ladder(t);return{responsiveFor:async o=>{try{return await r.responsiveFor(o)}catch{return null}}}}catch{return n4}}var wa={id:"",url:"",filename:"",content_type:"",size_bytes:0,poster:""};async function r4(e,t,r){if(!t)return e;try{e.poster=await r.fileUrl(t)}catch(i){return r.log?.warn({media_id:e.id,err:i.message},"resolve-document-slot: preview presign failed; no poster"),e}let n=await(await fr(r,[t])).responsiveFor(t);return n&&(e.poster_responsive=n),e}async function pr(e,t,r){if(e===null)return null;if(typeof e!="object")return wa;let o=e,n=Qe(o)??"";if(!n)return wa;let i=t.get(n);if(i===void 0)return r.log?.warn({media_id:n},"resolve-document-slot: no media the render may reach"),wa;let s=i.key;if(s===null)return r.log?.warn({media_id:n},"resolve-document-slot: media has no stored object"),wa;try{let c=(o.picked===null&&typeof o.name=="string"&&o.name!==""?o.name:null)??i.name,l={id:n,url:r.namedFileUrl?await r.namedFileUrl(s,c):await r.fileUrl(s),filename:c,content_type:i.mime??"",size_bytes:i.bytes??0,poster:""};return await r4(l,i.renditions.poster?.key??null,r)}catch(a){return r.log?.error({media_id:n,err:a.message},"resolve-document-slot: presign failed; soft-empty document"),wa}}var YS=16/10;function XS(e){if(e===null||typeof e!="object")return null;let t=e,[r,o,n,i]=["x","y","width","height"].map(s=>t[s]);return![r,o,n,i].every(s=>typeof s=="number"&&Number.isFinite(s))||r===0&&o===0&&n===1&&i===1?null:{x:r,y:o,width:n,height:i}}function mr(e){if(e===null||typeof e!="object")return{mode:"free",aspect:YS};let t=e,r=typeof t.aspect=="number"&&t.aspect>0?t.aspect:YS,o=t.mobile?.aspect,n=typeof o=="number"&&o>0&&Math.abs(o-r)>1e-4?o:void 0;return{mode:t.mode==="free"?"free":"locked",aspect:r,...n===void 0?{}:{mobileAspect:n}}}function o4(e,t){if(e===null||t===null)return e===t;let r=o=>Math.round(o*1e4)/1e4;return r(e.x)===r(t.x)&&r(e.y)===r(t.y)&&r(e.width)===r(t.width)&&r(e.height)===r(t.height)}function i4(e,t){if(e===null||!(e>0)||!(t>0))return null;let r=Math.min(1,t/e),o=Math.min(1,e/t),n={x:(1-r)/2,y:0,width:r,height:o};return o4(n,{x:0,y:0,width:1,height:1})?null:n}function QS(e,t,r,o){if(e!==null||r.mode==="free")return e;let n=o==="mobile"?r.mobileAspect:r.aspect;return n===void 0?null:i4(t,n)}function lo(){return{id:"",url:"",alt:""}}function eI(e,t){let r=t===void 0?void 0:e.renditions[t==="white"?"mask_white":"mask_black"]?.key,o=jh(e.crop)?e.renditions.crop?.key:void 0;return r??e.renditions.cutout?.key??o??e.key}async function xv(e,t,r,o){if(t===void 0)return r.log?.warn({id:e},"resolve-media-id: no image media the render may reach; no media"),null;if(t.kind!=="image")return r.log?.warn({id:e,kind:t.kind},"resolve-media-id: media is not an image; no media"),null;try{let n=eI(t,o?.mask);return{url:await r.servedUrl(n),source_key:n}}catch(n){return r.log?.error({id:e,err:n.message},"resolve-media-id: presign failed; no media"),null}}function tI(e){let t=e&&typeof e=="object"?e.key:void 0;return typeof t=="string"&&t.length>0?t:null}function nI(e,t,r){let o=XS(e.crop);return t===void 0?o:QS(o,t.imageAspect,t.aspects,r)}function rI(e,t,r){if(!jh(r))return null;let o=e.renditions&&typeof e.renditions=="object"?e.renditions:{},n=tI(o.crop);return n!==null&&ba(n)===t?n:null}function oI(e,t){return rI(e,Ru(e),nI(e,t))}function iI(e,t){let r=e.mobile&&typeof e.mobile=="object"?e.mobile:t===void 0?null:{};return r===null?null:rI(r,Ru(e),nI(r,t,"mobile"))}async function s4(e,t){try{return{url:await t.servedUrl(e)}}catch{return null}}function a4(e,t,r){let o=Ru(e),n=e.renditions&&typeof e.renditions=="object"?e.renditions:{},i=a=>{let c=tI(n[a]);return c!==null&&c.startsWith(`processed/cutout/${o}/`)?c:null};return(t===null?null:i(t==="white"?"mask_white":"mask_black"))??i("cutout")??(t===null?oI(e,r):null)}function Ru(e){return Qe(e)??""}async function Ai(e,t,r,o){if(e===null)return{value:null,desktopKey:null,mobileKey:null};if(!e||typeof e!="object")return{value:lo(),desktopKey:null,mobileKey:null};let n=e,i=typeof n.ar=="number"?n.ar:null,s=Ru(n),a=n.mask==="white"||n.mask==="black"?n.mask:null,c=s?t.get(s):void 0,l=o===void 0?void 0:{aspects:o,imageAspect:c4(c,i)},u=s?iI(n,l):null,d=u?await s4(u,r):null,f=typeof n.alt=="string"?n.alt:"",p=s?a4(n,a,l):null,m,S;if(p){m={id:s,url:await r.servedUrl(p),alt:f},S=p;let _=await xv(s,c,r);_&&_.url!==m.url&&(m.download_url=_.url)}else if(s){let _=await xv(s,c,r,a?{mask:a}:void 0);if(!_)return{value:lo(),desktopKey:null,mobileKey:u};m={id:s,url:_.url,alt:f},S=_.source_key}else return{value:lo(),desktopKey:null,mobileKey:null};return{value:d?{...m,mobile:d}:m,desktopKey:S,mobileKey:d?u:null}}function c4(e,t){return e?.kind==="image"&&e.width!==null&&e.height!==null&&e.width>0&&e.height>0?e.width/e.height:t!==null&&t>0?t:null}async function xa(e,t){let r=e.flatMap(n=>[n.desktopKey,n.mobileKey]).filter(n=>!!n),o=await fr(t,r);for(let n of e){if(!n.value)continue;let i=await o.responsiveFor(n.desktopKey);if(i&&(n.value.responsive=i),n.value.mobile&&n.mobileKey){let s=await o.responsiveFor(n.mobileKey);s&&(n.value.mobile={...n.value.mobile,responsive:s})}}}async function _a(e,t,r,o){let n=await Ai(e,t,r,o);return await xa([n],r),n.value}var zi={id:"",url:"",poster:"",alt:""};async function l4(e,t,r){if(!t||!e.poster)return e;let n=await(await fr(r,[t])).responsiveFor(t);return n&&(e.poster_responsive=n),e}async function gr(e,t,r){if(e===null)return null;if(typeof e!="object")return zi;let o=e,n=Qe(o)??"";if(!n)return zi;let i=t.get(n);if(i===void 0)return r.log?.warn({media_id:n},"resolve-tour-slot: no tour media the render may reach"),zi;if(i.kind!=="tour")return r.log?.warn({media_id:n,kind:i.kind},"resolve-tour-slot: media is not a tour"),zi;try{let s=Z_(i.url);if(s===null)return r.log?.warn({media_id:n},"resolve-tour-slot: tour link embeds nowhere"),zi;let a=i.renditions.poster?.key??null,c={id:n,url:s,poster:a?await r.fileUrl(a):"",alt:typeof o.alt=="string"?o.alt:"",provider:i.provider};return l4(c,a,r)}catch(s){return r.log?.error({media_id:n,err:s.message},"resolve-tour-slot: presign failed; soft-empty tour"),zi}}var Fi={id:"",url:"",poster:"",alt:""};async function _v(e,t,r){if(!t||!e.poster)return e;let n=await(await fr(r,[t])).responsiveFor(t);return n&&(e.poster_responsive=n),e}function u4(e){let t=e.failed_outputs?.transcode;return t===void 0?e.state==="failed":t!==V_}async function hr(e,t,r){if(e===null)return null;if(typeof e!="object")return Fi;let o=e,n=Qe(o)??"";if(!n)return Fi;let i=t.get(n);if(i===void 0)return r.log?.warn({media_id:n},"resolve-video-slot: no video media the render may reach"),Fi;if(i.kind!=="video")return r.log?.warn({media_id:n,kind:i.kind},"resolve-video-slot: media is not a video"),Fi;let s=i.renditions.poster?.key??null,a=typeof o.alt=="string"?o.alt:"";try{if(Ph(i)==="link"){let d=i.url,f=L_(d);if(!f)return r.log?.warn({media_id:n},"resolve-video-slot: link upload embeds nowhere"),Fi;let p={id:n,url:f,poster:s?await r.fileUrl(s):"",alt:a,source:"link"};return i.provider!==null&&(p.provider=i.provider),_v(p,s,r)}let c=s?await r.fileUrl(s):"",l=i.renditions.encode;if(l===null)return r.log?.warn({media_id:n,state:i.state},"resolve-video-slot: no encode; poster-only"),u4(i)||r.notePending?.({kind:"video",id:n}),_v({id:n,url:"",poster:c,alt:a},s,r);let u={id:n,url:await r.fileUrl(l.key),poster:c,alt:a};return l.width!==null&&(u.width=l.width),l.height!==null&&(u.height=l.height),_v(u,s,r)}catch(c){return r.log?.error({media_id:n,err:c.message},"resolve-video-slot: presign failed; soft-empty video"),Fi}}async function Di(e,t,r,o){if(e===null||typeof e!="object")return null;let n=Qe(e);if(n===void 0)return null;let i=r.get(n);if(i===void 0)return o.log?.warn({media_id:n},"resolve-media-slot: no media the render may reach"),null;if(!Ce(t).includes(i.kind))return o.log?.warn({media_id:n,kind:i.kind},"resolve-media-slot: media is of a kind the slot does not hold"),null;let s={media:n};switch(i.kind){case"image":{let a=await _a(e,r,o,mr(t.crop));return a===null?null:{...a,kind:"image"}}case"video":{let a=await hr(s,r,o);return a===null?null:{...a,kind:"video"}}case"tour":{let a=await gr(s,r,o);return a===null?null:{...a,kind:"tour"}}case"document":{let a=await pr(s,r,o);return a===null?null:{...a,kind:"document"}}}}function $v(e){return e==="image"?"image":e==="video"?"video":e==="tour"?"tour":e==="document"?"document":e==="media"?"media":e==="poi"?"poi":"scalar"}function uo(e){if(e?.type!=="list")return null;let t=e.element?.type==="object"?e.element?.fields:void 0;return t!=null?{kind:"record",fields:t}:{kind:"primitive",primitive:$v(e.element?.type)}}async function ju(e,t,r){if(!Array.isArray(e))return[];let o=uo(t);return o===null?e:o.kind==="record"?d4(e,o.fields,r):sI(e,o.primitive,r,t.element)}async function sI(e,t,r,o){switch(t){case"image":{let n=[];for(let i of e)n.push(await Ai(i,r.records,r.store,mr(o?.crop)));return await xa(n,r.store),n.map(i=>i.value??lo())}case"video":return(await Promise.all(e.map(i=>hr(i,r.records,r.store)))).filter(i=>i!==null);case"tour":return(await Promise.all(e.map(i=>gr(i,r.records,r.store)))).filter(i=>i!==null);case"document":return(await Promise.all(e.map(i=>pr(i,r.records,r.store)))).filter(i=>i!==null);case"media":return(await Promise.all(e.map(i=>Di(i,o??{},r.records,r.store)))).filter(i=>i!==null);case"poi":return e.map(n=>r.resolvePoi(n));case"scalar":return e}}async function d4(e,t,r){if(!Object.values(t).some(kv))return e;let o=[],n=await aI(e,t,r,o);return await xa(o,r.store),n}async function aI(e,t,r,o){let n=Object.entries(t).filter(([,s])=>kv(s));if(n.length===0)return e;let i=[];for(let s of e){if(!s||typeof s!="object"||Array.isArray(s)){i.push(s);continue}let a={...s};for(let[c,l]of n)c in a&&(a[c]=await f4(a[c],l,r,o));i.push(a)}return i}function kv(e){if($v(e.type)!=="scalar")return!0;let t=uo(e);return t===null?!1:t.kind==="record"?Object.values(t.fields).some(kv):t.primitive!=="scalar"}async function f4(e,t,r,o){if(uo(t)!==null)return p4(e,t,r,o);switch($v(t.type)){case"image":{let n=await Ai(e,r.records,r.store,mr(t.crop));return o.push(n),n.value}case"video":return hr(e,r.records,r.store);case"tour":return gr(e,r.records,r.store);case"document":return pr(e,r.records,r.store);case"media":return Di(e,t,r.records,r.store);case"poi":return r.resolvePoi(e);case"scalar":return e}}async function p4(e,t,r,o){if(!Array.isArray(e))return[];let n=uo(t);if(n===null)return e;if(n.kind==="record")return aI(e,n.fields,r,o);if(n.primitive!=="image")return sI(e,n.primitive,r,t.element);let i=[];for(let s of e)i.push(await Ai(s,r.records,r.store,mr(t.element?.crop)));return o.push(...i),i.map(s=>s.value??lo())}function Sv(e){return new Map(Object.entries(e??{}))}async function Pu(e,t,r){if(t===void 0)return e;if(uo(t)!==null)return ju(e,t,r);switch(t.type){case"image":return _a(e,r.records,r.store,mr(t.crop));case"video":return hr(e,r.records,r.store);case"tour":return gr(e,r.records,r.store);case"document":return pr(e,r.records,r.store);case"media":return Di(e,t,r.records,r.store);case"poi":return r.resolvePoi(e);case"object":return m4(e,t,r);default:return e}}async function m4(e,t,r){if(t.fields==null||!e||typeof e!="object"||Array.isArray(e))return e;let[o]=await ju([e],{type:"list",element:{type:"object",fields:t.fields}},r);return o}var cI="/section-assets/",lI="[A-Za-z0-9._-]+\\.[A-Za-z0-9]+",_J=new RegExp(`^${lI}$`),g4=new RegExp(`${cI.replace(/\//g,"\\/")}(${lI})`,"g");function h4(e){if(!e.startsWith("/")||!e.endsWith("/"))throw new Error(`A build base starts and ends with "/", not "${e}".`);return e}function y4(e){switch(e.kind){case"canonical":return cI;case"underBuildBase":return h4(e.buildBase);case"stylesheet":return""}}function Eu(e,t){let r=y4(t),o=new Set;return{text:e.replace(g4,(i,s)=>(o.add(s),t.kind==="canonical"?i:`${r}${s}`)),files:[...o]}}var uI=/\.css$/i,dI=/\.(mjs|js)$/i;function fI(e){return uI.test(e)||dI.test(e)}function pI(e,t,r){return uI.test(e)?Eu(t,{kind:"stylesheet"}):dI.test(e)?Eu(t,{kind:"underBuildBase",buildBase:r}):{text:t,files:[]}}function mI(e,t){return e??ga(t.display)}function gI(e,t,r,o){return e(JSON.stringify([r,o??null,t]))}async function hI(e){let{schema:t}=e,r={};for(let[o,n]of Object.entries(t.slots??{}))r[o]=US(n.type);for(let[o,n]of Object.entries(e.values))n!==void 0&&(r[o]=await Pu(n,t.slots?.[o],e.media));return{slots:r,variant:mI(e.variant,t),nav:{selfAnchor:e.nav.selfAnchor??t.anchor,anchors:e.nav.anchors,pages:e.nav.pages}}}async function Iv(e){let t=e.inputs??await hI(e),{kept:r}=e,o=r===void 0?null:gI(r.hash,t,e.identifierPrefix,e.buildBase),n=o===null?void 0:r.kept(e.component,o);if(n!==void 0)return{...n,inputs:t};let i=e.react.renderToString(e.react.createElement(e.component,{...t}),{identifierPrefix:e.identifierPrefix}),s=Eu(i,e.buildBase===void 0?{kind:"canonical"}:{kind:"underBuildBase",buildBase:e.buildBase}),a={html:s.text,buildFiles:s.files};return o!==null&&r.keep(e.component,o,a),{...a,inputs:t}}function yI(e,t){let r=Ov(e,t),o=new Map(e.instances.map(n=>[n.instanceId,n]));return r.sections.flatMap(n=>{let i=o.get(n.instanceId);return i?.enabled===!0?[i]:[]})}function Ov(e,t){let r=e.pages.find(o=>o.id===t);if(r===void 0)throw new Error(`The composition declares no page "${t}" (have: ${e.pages.map(o=>o.id).join(", ")}).`);return r}async function vI(e){let t=new Map(e.instances.map(o=>[o.instanceId,o.enabled])),r=[];for(let o of e.pages){let n=[];for(let i of o.sections){let{schema:s}=await e.section(i.section);n.push({key:i.section,anchor:s.anchor,enabled:t.get(i.instanceId)===!0})}r.push({id:o.id,label:o.label,path:o.path??`/${o.id}`,enabled:e.pageEnabled(o.id),sections:n})}return r}async function Rv(e,t,r){return e.output!=="website"?{anchors:{},pages:[]}:cv({pages:await vI(e),currentPageId:t,contentBase:r})}async function bI(e,t,r,o){let{react:n,snapshot:i,over:s}=e,a=s?.[t.instanceId],c=await i.section(r),l=await Iv({react:n,component:c.component,schema:c.schema,values:{...t.values,...a?.values},variant:a?.variant??t.variant,nav:o,media:i.media(),identifierPrefix:t.instanceId,buildBase:e.buildBase,kept:e.kept});return{instanceId:t.instanceId,...l}}async function $a(e){let t=Ov(e.snapshot,e.pageId),r=await Rv(e.snapshot,t.id,e.contentBase),o=new Map(t.sections.map(i=>[i.instanceId,i.section])),n=[];for(let i of yI(e.snapshot,t.id))n.push(await bI(e,i,o.get(i.instanceId),r));return n}async function jv(e,t){let r=Ov(e.snapshot,e.pageId),o=[r,...e.snapshot.pages].flatMap(i=>i.sections).find(i=>i.instanceId===t);if(o===void 0)throw new Error(`The composition places no instance "${t}".`);let n=e.snapshot.instances.find(i=>i.instanceId===t)??{instanceId:t,values:{},enabled:!1};return bI(e,n,o.section,await Rv(e.snapshot,r.id,e.contentBase))}var Tu=e=>e<0?0:e>1?1:e;function xI(e){if(typeof e!="object"||e===null)return null;let{nx:t=0,ny:r=0,nw:o=1,nh:n=1}=e;if(![t,r,o,n].every(c=>typeof c=="number"&&Number.isFinite(c)))return null;let i=Tu(t),s=Tu(r),a={nx:i,ny:s,nw:Math.min(Tu(o),1-i),nh:Math.min(Tu(n),1-s)};return a.nw<=0||a.nh<=0||a.nx===0&&a.ny===0&&a.nw===1&&a.nh===1?null:a}var v4=/^processed\/crops\/([^/]+)\/(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)$/;function b4(e,t){return`processed/crops/${e}/${t.nx}_${t.ny}_${t.nw}_${t.nh}`}var Pv=e=>({x:e.nx,y:e.ny,width:e.nw,height:e.nh});function fo(e){if(typeof e!="object"||e===null)return null;let{x:t,y:r,width:o,height:n}=e;return xI({nx:t,ny:r,nw:o,nh:n})}function wI(e,t){return{key:b4(e,t),mime:null,width:null,height:null,bytes:null,over:{crop:Pv(t),options:{}}}}function Au(e,t,r){return{file:e,...t===null?{}:{crop:Pv(t),renditions:{crop:wI(e,t)}},...r===null?{}:{mobile:{crop:Pv(r),renditions:{crop:wI(e,r)}}}}}function w4(e){let t=v4.exec(e);if(t===null||ba(e)===null)return null;let r=xI({nx:Number(t[2]),ny:Number(t[3]),nw:Number(t[4]),nh:Number(t[5])});return r===null?null:{id:t[1],rect:r}}function Ev(e){return e==null?null:typeof e=="string"?e:e.url}function _I(e,t={}){let r=t.url??(c=>c),{content:o}=t,n=(c,l,u,d)=>{let f=o===void 0||u===null?null:iv(c,u,null,o.hash);if(f===null)return l;let p=`${o.contentBase}${f}`;return o.listed(p,{url:l,contentType:u,...d===void 0?{}:{master:d}}),p},i=new Map;for(let c of e.values())for(let l of[c.file,c.posterFile]){let u=Ev(l);u!==null&&i.set(u,l)}let s=c=>i.has(c)?n(c,r(c),Ei(c)):c,a=c=>{let l=c===null?void 0:i.get(c);if(c===null||l===void 0||typeof l=="string"||l.responsive===null)return null;let u=Ei(c),d=u===null?void 0:{url:r(c),contentType:u};return{...l.responsive,sources:l.responsive.sources.map(f=>({...f,srcset:x4(f.srcset,p=>n(p,r(p),Ei(p,f.type),d))}))}};return{servedUrl:c=>{let l=w4(c);if(l===null)return Promise.resolve(s(c));let u=Ev(e.get(l.id)?.file);return u===null?Promise.reject(new Error(`no image "${l.id}" to crop`)):Promise.resolve(n(c,t.crop===void 0?r(u):t.crop(u,l.rect),Ei(u)))},fileUrl:c=>Promise.resolve(s(c)),ladder:()=>Promise.resolve({responsiveFor:c=>Promise.resolve(a(c))})}}function x4(e,t){return e.split(",").map(r=>{let[o="",...n]=r.trim().split(/\s+/);return[t(o),...n].join(" ")}).join(", ")}function $I(e,t,r,o){let n=Sv({...e===null?{}:El(e),...o}),i=new Map;for(let s of t.values()){let a=Ev(s.file);a!==null&&s.sizeBytes!==void 0&&i.set(a,s.sizeBytes)}return new Map([...n].map(([s,a])=>{let c=a.bytes??(a.key===null?void 0:i.get(a.key)??r?.(a.key));return[s,c===void 0||c===a.bytes?a:{...a,bytes:c}]}))}function kI(e,t){return t==="list"?Array.isArray(e)&&e.length===0:t==="object"?typeof e=="object"&&e!==null&&Object.keys(e).length===0:e==null}function SI(e,t,r,o,n,i){if(Object.keys(i?.scalar??{}).some(c=>c===t||c.startsWith(`${t}.`)))return{kind:"authored"};let s=e.source;if(e.type==="object")return{kind:"authored"};if(e.type==="row"){if(typeof r=="string")return{kind:"authored"};let c=di(n,gt(e),typeof o=="string"?o:null);return c!==null?{kind:"fact",ref:Vh(c)}:{kind:"empty"}}if(s?.kind==="home")return{kind:"fact",ref:String(s.key)};if(s?.kind==="derived")return{kind:"computed",ref:String(s.transform)};if(s?.kind==="section")return{kind:"computed",ref:t};let a=We(s);return a!==null?{kind:"fact",ref:`${a.slot}.${a.field}`}:s?.kind==="element"?{kind:"fact",ref:"element"}:kI(o,e.type)?{kind:"empty"}:{kind:"authored"}}function II(e){switch(e.type){case"text":case"select":case"url":case"email":case"phone":return"";case"video":return{id:"",url:"",poster:"",alt:""};case"tour":return{id:"",url:"",poster:"",alt:""};case"list":return[];default:return null}}function PI(e){if(e.settled===void 0)throw new Error(`Fixture "${e.id}" is synthesized: it carries no settled doc, and no playground serves it.`)}var _4={date:{admits:e=>e===null||kh(e),expected:'a real calendar day written "YYYY-MM-DD", or null for none'},email:{admits:e=>e==null||e===""||Sh(e),expected:"an email address"},phone:{admits:e=>e==null||e===""||Ih(e),expected:"a phone number a dialer can call"}};function zu(e){return e==="list"?[]:e==="object"?{}:null}function $4(e){if(!("schema"in e))return e;let{schema:t}=e;return{key:e.key,slots:t.slots,display:t.meta.display??{},computed:A_(t),decisions:I4(t)}}function Av(e){let t=new Set,r=[];for(let o of e)t.has(o.instance)||(t.add(o.instance),r.push({key:o.key,instance:o.instance,section:$4(o.section)}));return r}function k4(e,t){return{localKey:e.key,schema:{slots:e.slots,display:e.display},bakeContext:{computed:{...e.computed},section_key:e.key,log:t}}}function S4(e){let t=[{id:"fixture",sections:e.placements.map(r=>({section:r.section,instance_id:r.instance}))}];return hu({contentDoc:{instances:[...e.instances]},facts:e.facts,sections:new Map(e.sections),placement:Ws(t)}).contentDoc.instances}function EI(e){let{facts:t,media:r,module:o}=e,n=[],i=Av(e.placements),s=(p,m="fixtures/instance-not-placed")=>{n.push({rule:m,file:o,message:`fixture "${e.id}" ${p}`})},a=new Map;for(let p of e.entries){if(i.find(S=>S.key===p.section&&S.instance===p.instance)===void 0){s(`states content for "${p.section}" instance "${p.instance}", which no page places`);continue}if(a.has(p.instance)){s(`states content twice for instance "${p.instance}"`,"fixtures/document-invalid");continue}a.set(p.instance,p)}let c={facts:t,media:r,module:o,fixtureId:e.id,log:e.log,violations:n,spelling:e.spelling},l=i.map(p=>O4(p,a.get(p.instance),c)),u=S4({instances:l.map(p=>p.instance),placements:i.map(p=>({instance:p.instance,section:p.key})),sections:new Map(l.map(p=>[p.instance.instance_id,p.section])),facts:t}),d=[],f={};return u.forEach((p,m)=>{let{placement:S,values:_}=l[m],O=S.section.slots,H={},F={};for(let[P,N]of Object.entries(O)){F[P]=SI(N,P,_[P],p.slots[P],t,p.slot_overrides);let Q=N.variant?.cases;Q!==void 0&&(p.variant===void 0||!Q.includes(p.variant))||(H[P]=p.slots[P])}d.push({instance_id:p.instance_id,section_key:S.section.key,enabled:p.enabled,...p.variant===void 0?{}:{variant:p.variant},slots:H,...p.slot_overrides===void 0?{}:{slot_overrides:p.slot_overrides}}),f[p.instance_id]=F}),{id:e.id,label:e.label,module:o,synthesized:!1,facts:t,media:r,contentDoc:{instances:d},settled:u,provenance:f,property:e.property,violations:n}}function I4(e){try{return _S(e).decisions}catch{return[]}}function O4(e,t,r){let{section:o}=e,n=o.slots,i={computed:{...o.computed},section_key:o.key,log:r.log},s=[...o.decisions],a=t?.values??{},c={decisions:s,heldRows:{},spelling:r.spelling,at:J=>({fixtureId:r.fixtureId,module:r.module,media:r.media,violations:r.violations,instance:e.instance,slot:J})};for(let J of Object.keys(a))n[J]===void 0&&r.violations.push({rule:"fixtures/document-invalid",file:r.module,message:`fixture "${r.fixtureId}": "${e.instance}".${J} names a slot section "${o.key}" does not declare`});let l={};for(let[J,X]of Object.entries(n)){let K=TI(c,X,J,a[J],!0);K!==void 0&&(l[J]=K),E4(r,e.instance,X,J,a[J])}T4(r,e.instance,n,c.heldRows);let u={decisions:s,heldRows:c.heldRows,stored:l},d=lu({slots:n},r.facts,i,u),f={};for(let[J,X]of Object.entries(n))f[J]=AI(X,J,Object.hasOwn(d,J)?{value:d[J]}:void 0,l[J],s);for(let[J,X]of Object.entries(n)){let K=A4(X,J,l[J],t?.marks,f[J]);K!==void 0&&(f[J]=K)}let p=j4(c,n,f,t?.overrides??{},o.key),m=o.display,S=fu({display:m,slots:n},r.facts,i,u),_=S.visibility??m.visibility?.cases?.[0],O=m.variant?.cases,H=t?.display.variant;H!==void 0&&O?.includes(H)!==!0&&(r.violations.push({rule:"fixtures/value-invalid",file:r.module,message:`fixture "${r.fixtureId}": content for "${e.instance}" names variant "${H}", which section "${o.key}" does not declare`}),H=void 0);let F=t?.display.enabled,P=H??S.variant??O?.[0],N={...F===void 0?{}:{visibility:!0},...H===void 0?{}:{variant:!0}},Q={instance_id:e.instance,enabled:F??(_===void 0?!0:_!=="hidden"),...P===void 0?{}:{variant:P},slots:f,...R4(p,t?.marks),...Object.keys(N).length===0?{}:{display_overrides:N}};return{placement:e,instance:Q,section:k4(o,r.log),values:a}}function R4(e,t){let r=Object.fromEntries(Object.entries(t??{}).filter(([,n])=>n!==void 0&&Object.keys(n).length>0)),o={...Object.keys(e).length===0?{}:{scalar:e},...r};return Object.keys(o).length===0?{}:{slot_overrides:o}}function j4(e,t,r,o,n){let i={},s=new Set(e.decisions.flatMap(l=>l.produces??[])),a=(l,u)=>ir(l)||s.has(u),c=(l,u)=>{let{fixtureId:d,module:f,instance:p,violations:m}=e.at(l);m.push({rule:"fixtures/document-invalid",file:f,message:`fixture "${d}": content for "${p}" overrides "${l}", ${u}`})};for(let[l,u]of Object.entries(o)){if(u===void 0)continue;let d=t[l];if(d===void 0)c(l,`which section "${n}" does not declare`);else if(d.type==="object"){if(!yt(u)){c(l,"which is an object: override its sourced fields by field");continue}let f=d.fields,p=yt(r[l])?{...r[l]}:{};for(let[m,S]of Object.entries(u)){if(S===void 0)continue;let _=He(l,m),O=f[m];O===void 0?c(_,`which object "${l}" does not declare`):a(O,_)?(p[m]=OI(e,O,S,e.at(_)),i[_]=!0):c(_,"which no fact, row member, compute or fill sources")}r[l]=p}else a(d,l)?(r[l]=OI(e,d,u,e.at(l)),i[l]=!0):c(l,"which no fact, row member, compute or fill sources")}return i}function OI(e,t,r,o){return r===null?null:zv(e.spelling,t,r,o)}function TI(e,t,r,o,n){if(o!=null){if(t.type==="row"){if(typeof o!="string"){Ni(e,t,o,e.at(r));return}return n&&(e.heldRows[r]=o),o}if(t.type==="object"){if(!yt(o)){Ni(e,t,o,e.at(r));return}return jI(e,t.fields,r,o),RI(e,t.fields,r,o,n)}if(t.type==="list"&&t.element?.type==="object"){if(!Array.isArray(o)){Ni(e,t,o,e.at(r));return}let i=t.element.fields,s=P4(t),a=tn(i);return o.map((c,l)=>{let u=yt(c)?c:{};yt(c)?jI(e,i,`${r}[${String(l)}]`,u,["id"]):Ni(e,t.element,c,e.at(`${r}[${String(l)}]`));let d=RI(e,i,r,u,!1),f=a.map(m=>u[m]).find(m=>typeof m=="string"&&m!=="");return{id:s===null?u.id??`${r}-${String(l+1)}`:f??u.id,...d}})}if(t.type==="list"&&t.element?.type==="row"){if(!Array.isArray(o)){Ni(e,t,o,e.at(r));return}return o.filter(i=>typeof i=="string")}return zv(e.spelling,t,o,e.at(r))}}function RI(e,t,r,o,n){let i={};for(let[s,a]of Object.entries(t)){let c=TI(e,a,He(r,s),o[s],n);c!==void 0&&(i[s]=c)}return i}function jI(e,t,r,o,n=[]){if(e.spelling.kinds)for(let i of Object.keys(o)){if(t[i]!==void 0||n.includes(i))continue;let s=e.at(r);s.violations.push({rule:"fixtures/document-invalid",file:s.module,message:`fixture "${s.fixtureId}": "${s.instance}".${r}.${i} names a field the slot does not declare`})}}function P4(e){return nn(e).kind!=="none"||We(e.source)!==null?null:Mr({slots:{}},e)}function E4(e,t,r,o,n){if(r.type!=="list"||!Array.isArray(n)||nn(r).kind!=="table")return;let s=Mr({slots:{}},r),a=s===null?0:iu(s,e.facts).length;n.length<=a||e.violations.push({rule:"fixtures/rows-not-in-property",file:e.module,message:`fixture "${e.fixtureId}": "${t}".${o} states ${String(n.length)} items, but its property carries ${String(a)} \u2014 the rows of a list sourced by a table are the property's`})}function T4(e,t,r,o){for(let[n,i]of Object.entries(o)){if(i===null)continue;let s=n.indexOf("."),a=r[s===-1?n:n.slice(0,s)],c=s===-1?a:a?.type==="object"?a.fields[n.slice(s+1)]:void 0;if(c===void 0)continue;let l=gt(c);l.length===0||qn(e.facts,l).some(u=>u.id===i)||e.violations.push({rule:"fixtures/held-row-not-in-property",file:e.module,message:`fixture "${e.fixtureId}": "${t}".${n} holds row "${i}", which its property does not carry; it loads empty`})}}function AI(e,t,r,o,n){if(e.type==="object"){let i=e.fields,s=yt(r?.value)?r.value:{},a=yt(o)?o:{},c={};for(let[l,u]of Object.entries(i)){let d=He(t,l);c[l]=Object.hasOwn(s,l)?Tv(u,d,{value:s[l]},a[l],n):Tv(u,d,void 0,a[l],n)}return c}return e.type==="list"&&e.element?.type==="object"&&Array.isArray(r?.value)?z4(e,t,r.value,o,n):r!==void 0?r.value??zu(e.type):e.source===void 0&&o!==void 0?o:zu(e.type)}function A4(e,t,r,o,n){if(e.type!=="list"||e.element?.type!=="object"||!Array.isArray(r)||o===void 0)return;let i=ki(o,t),s=Cy(o,t),a=$i(o,t);if(Object.keys(i).length===0&&Object.keys(s).length===0&&!a)return;let c=nn(e).kind;if(!(c==="none"||c==="other"))return c!=="table"?r:Ii({current:r.filter(yt),freshSource:Array.isArray(n)?n.filter(yt):[],overrides:i,...Object.keys(s).length===0?{}:{removed:s},generatedFields:[],membership:"table",ordered:a})}function Tv(e,t,r,o,n){return e.type==="object"||e.type==="list"&&e.element?.type==="object"&&Array.isArray(r?.value)?AI(e,t,r,o,n):r!==void 0?r.value:e.source===void 0&&o!==void 0?o:II(e)}function z4(e,t,r,o,n){let i=e.element?.fields??{},s=Array.isArray(o)?o.filter(yt):[],a=nn(e).kind==="none"&&We(e.source)===null;return r.map((c,l)=>{let u=yt(c)?c:{},d=a?s.find(p=>p.id===u.id):s[l],f={id:u.id};for(let[p,m]of Object.entries(i))f[p]=Tv(m,`${t}.${p}`,Object.hasOwn(u,p)?{value:u[p]}:void 0,d?.[p],n);return f})}var yt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function zv(e,t,r,o){if(ni(t.type))return e.media(t,r,o);if(e.kinds&&zI(t,r)!==null)return Ni({spelling:e},t,r,o),zu(t.type);if(t.type==="address")return Oe(r);let n=_4[t.type];if(n!==void 0&&!n.admits(r))return o.violations.push({rule:"fixtures/value-invalid",file:o.module,message:`fixture "${o.fixtureId}": "${o.instance}".${o.slot} (${t.type}) states ${JSON.stringify(r)}; it takes ${n.expected}`}),zu(t.type);if(t.type==="list"&&Array.isArray(r)&&t.element!==void 0&&t.element.type!=="object"&&t.element.type!=="row"){let i=t.element;return r.map(s=>zv(e,i,s,o)).filter(s=>s!=null)}return r}function zI(e,t){if(t===null)return null;switch(e.type){case"text":case"select":case"url":case"date":case"email":case"phone":return typeof t=="string"?null:"a string";case"number":return typeof t=="number"&&Number.isFinite(t)?null:"a number";case"address":case"poi":return yt(t)?null:"an object";case"list":return Array.isArray(t)?null:"a list";default:return null}}function Ni(e,t,r,o){if(!e.spelling.kinds)return;let n=zI(t,r)??(t.type==="row"?"a row id":t.type==="object"?"an object of its fields":t.type==="list"?"a list":`a ${t.type} value`);o.violations.push({rule:"fixtures/document-invalid",file:o.module,message:`fixture "${o.fixtureId}": "${o.instance}".${o.slot} (${t.type}) states ${JSON.stringify(r)}; it takes ${n}`})}function FI(e,t,r,o){let n={media:e},i=t===void 0?null:fo(t),s=r===void 0?null:fo(r),a=[t,r].find(c=>c!==void 0&&fo(c)===null&&!F4(c));return a!==void 0?(o.violations.push({rule:"fixtures/value-invalid",file:o.module,message:`fixture "${o.fixtureId}": "${o.instance}".${o.slot} states the crop ${JSON.stringify(a)}; a crop takes x, y, width and height, each a share (0..1) of the image, naming a region inside it`}),n):i===null&&s===null?n:Au(e,i,s)}function F4(e){return yt(e)?e.x===0&&e.y===0&&e.width===1&&e.height===1:!1}function DI(e,t,r,o){let n=typeof t=="string"?o.media.get(t):void 0;return n===void 0||!Ce(e).includes(n.kind)?(o.violations.push({rule:"fixtures/media-not-in-property",file:o.module,message:`fixture "${o.fixtureId}": "${o.instance}".${o.slot} references ${r}`}),null):{media:n.id}}var Dv=["$schema","notes"],D4=new Set(["properties","fixtures",...Dv]),N4=new Set(["property","content","page_state","files",...Dv]),U4=new Set([...N4,"label"]),M4=new Set(["slots","slot_overrides","enabled","variant"]),C4=new Set(["scalar","items","items_removed","order"]),Ee=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Fu(e){let t=e.lastIndexOf("/");return t===-1?"":e.slice(0,t)}function vt(e,t){if(typeof t!="string"||t==="")return{problem:"expected a path relative to this file"};if(t.startsWith("/")||t.includes("\\")||/^[a-z][a-z0-9+.-]*:/i.test(t))return{problem:`"${t}" is not a path relative to this file`};let r=[];for(let n of t.split("/"))if(!(n===""||n==="."))if(n===".."){if(r.length===0)return{problem:`"${t}" names a file outside this file's own folder`};r.pop()}else r.push(n);if(r.length===0)return{problem:`"${t}" names a folder, not a file`};let o=Fu(e);return{path:o===""?r.join("/"):`${o}/${r.join("/")}`}}function Rn(e){let t=e.slice(e.lastIndexOf("/")+1);return t.endsWith(".json")?t.slice(0,-5):t}function jn(e){let t=Fu(e);return t.slice(t.lastIndexOf("/")+1)}async function UI(e){let{store:t}=e,r=[],o=(_,O,H)=>{r.push({rule:_,file:O,message:H})},n=_=>({properties:[],fixtures:[],list:_,violations:r}),i=vt(e.listedIn,e.list);if("problem"in i)return o("fixtures/reference-invalid",e.listedIn,`fixtures: ${i.problem}`),n(null);let s=i.path,a=await Fv(t,s,e.listedIn,"fixtures",o);if(a===null)return n(null);Du(a,D4,s,"",o);let c=a.properties,l=a.fixtures;if(Array.isArray(c)||o("fixtures/document-invalid",s,"properties: expected a list of property document paths"),Array.isArray(l)||o("fixtures/document-invalid",s,"fixtures: expected a list of content fixture paths"),!Array.isArray(c)||!Array.isArray(l))return n(s);let u=NI(s,"properties",c,jn,"a property's name is its folder's",o),d=NI(s,"fixtures",l,Rn,"a content fixture's name is its file name",o);L4(s,u,d,o);let f=new Map,p=[];for(let{at:_,path:O}of u){let H=K4(t,O,s,_,o);f.set(O,H);let F=await H;F?.facts!=null&&p.push({name:jn(O),file:O,facts:F.facts,media:F.media})}let m=Av(e.placements),S=[];for(let{at:_,path:O}of d){let H=await Fv(t,O,s,_,o);if(H===null)continue;let F=await Z4({id:Rn(O),file:O,list:s,doc:H,store:t,placements:m,properties:f,report:o,log:e.log});F!==null&&(r.push(...F.violations),S.push(F.resolved))}return{properties:p,fixtures:S,list:s,violations:r}}function NI(e,t,r,o,n,i){let s=new Map,a=[];for(let[c,l]of r.entries()){let u=`${t}[${String(c)}]`,d=vt(e,l);if("problem"in d){i("fixtures/reference-invalid",e,`${u}: ${d.problem}`);continue}let f=o(d.path),p=s.get(f);if(p!==void 0){i("fixtures/document-invalid",e,`${u}: "${d.path}" has the name "${f}" that "${p}" has; ${n}, and names are unique across the template`);continue}s.set(f,d.path),a.push({at:u,path:d.path})}return a}function L4(e,t,r,o){for(let{at:n,path:i}of t){let s=`${Fu(i)}/`,a=[e,...r.map(l=>l.path),...t.filter(l=>l.path!==i).map(l=>l.path)],c=Fu(i)===""?e:a.find(l=>l.startsWith(s));c!==void 0&&o("fixtures/document-invalid",e,`${n}: "${i}" shares its folder with "${c}"; a property's document sits in a folder of its own`)}}async function Fv(e,t,r,o,n){let i=await e.readText(t);if(i===null)return n("fixtures/reference-invalid",r,`${o}: "${t}" does not exist`),null;let s;try{s=JSON.parse(i)}catch(a){return n("fixtures/document-invalid",t,`does not parse as JSON: ${a instanceof Error?a.message:String(a)}`),null}return Ee(s)?s:(n("fixtures/document-invalid",t,"expected a JSON object"),null)}function Du(e,t,r,o,n){for(let i of Object.keys(e))t.has(i)||n("fixtures/document-invalid",r,`${o===""?"":`${o}.`}${i}: not a member this document states`)}async function Z4(e){let{id:t,file:r,doc:o,report:n}=e;o.label!==void 0&&n("fixtures/document-invalid",r,`label: not a member this document states; a content fixture's one name is its file name ("${t}"), so rename the file to rename it`),Du(o,U4,r,"",n);let i=vt(r,o.property);if("problem"in i)return n("fixtures/reference-invalid",r,`property: ${i.problem}`),null;let s=e.properties.get(i.path);if(s===void 0)return n("fixtures/reference-invalid",r,`property: "${i.path}" is not in the fixture list's properties; list it in ${e.list}`),null;let a=await s;if(a===null||a.facts===null)return null;let c=B4(o.content,r,e.placements,n),l=await V4(e.store,r,o.files,a.media,n),{violations:u,...d}=EI({id:t,label:t,module:r,facts:a.facts,media:new Map([...a.media,...l.catalog]),placements:e.placements,entries:c,spelling:q4,property:i.path,...e.log===void 0?{}:{log:e.log}}),f=H4(o.page_state,r,n),p=Object.keys(l.records).length===0?{}:{owned:l.records};return{resolved:{...d,...p,...f===void 0?{}:{pages:f}},violations:u}}async function V4(e,t,r,o,n){let i=new Map,s={};if(r===void 0)return{catalog:i,records:s};if(!Array.isArray(r))return n("fixtures/document-invalid",t,"files: expected a list of upload entries"),{catalog:i,records:s};for(let[a,c]of r.entries()){let l=`files[${String(a)}]`,u=!1,d=_=>{u=!0,n("fixtures/document-invalid",t,_)};if(!Ee(c)){d(`${l}: expected an upload entry`);continue}let f=c.id;if(typeof f!="string"||f===""){d(`${l}: every entry needs a non-empty string id`);continue}if(i.has(f)||o.has(f)){d(`${l}: id "${f}" is ${i.has(f)?"repeated within files":"its property's media's too"}; a file a slot owns has an id of its own`);continue}let p={...c};for(let _ of MI){if(p[_]===void 0)continue;let O=vt(t,p[_]);if("problem"in O){n("fixtures/reference-invalid",t,`${l}.${_}: ${O.problem}`),u=!0;continue}let H=await e.mediaFile(O.path);H===null&&(n("fixtures/reference-invalid",t,`${l}.${_}: "${O.path}" does not exist`),u=!0),p[_]=H}if(u)continue;let m=zy(p,a,l,d);if(m===null)continue;let S=Ik.safeParse(m.record);if(!S.success){d(`${l}: ${S.error.issues.map(_=>`${_.path.join(".")||"(entry)"}: ${_.message}`).join("; ")}`);continue}i.set(f,m.catalog),s[f]=S.data}return{catalog:i,records:s}}function H4(e,t,r){if(e===void 0)return;if(!Array.isArray(e)){r("fixtures/document-invalid",t,"page_state: expected a list of { page_id, enabled }");return}let o={};return e.forEach((n,i)=>{Ee(n)&&typeof n.page_id=="string"&&typeof n.enabled=="boolean"&&Object.keys(n).length===2?o[n.page_id]={enabled:n.enabled}:r("fixtures/document-invalid",t,`page_state[${String(i)}]: expected { "page_id": <page id>, "enabled": true or false }`)}),Object.keys(o).length===0?void 0:o}function B4(e,t,r,o){if(e===void 0)return[];if(!Ee(e))return o("fixtures/document-invalid",t,"content: expected an object of instances, by instance id"),[];let n=[];for(let[s,a]of Object.entries(e)){let c=`content.${s}`;if(!Ee(a)){o("fixtures/document-invalid",t,`${c}: expected what the instance states`);continue}Du(a,M4,t,c,o);let l=r.find(F=>F.instance===s),u=l?.key??"(unplaced)",d=l?.section.slots??{},f=Ee(a.slot_overrides)?a.slot_overrides:{};a.slot_overrides!==void 0&&!Ee(a.slot_overrides)&&o("fixtures/document-invalid",t,`${c}.slot_overrides: expected an object`),Du(f,C4,t,`${c}.slot_overrides`,o);let p=Ee(f.scalar)?f.scalar:{},m=Ee(a.slots)?a.slots:{};a.slots!==void 0&&!Ee(a.slots)&&o("fixtures/document-invalid",t,`${c}.slots: expected an object of slot values, by slot id`);let S={},_={};for(let[F,P]of Object.entries(m)){let N=d[F];if(N===void 0||l===void 0){S[F]=P;continue}if(p[F]===!0){_[F]=P;continue}if(N.type==="object"&&Ee(P)){let Q=N.fields,J={},X={};for(let[K,M]of Object.entries(P)){let V=Q[K];p[`${F}.${K}`]===!0?X[K]=M:V!==void 0&&ir(V)?i(`${c}.slots.${F}.${K}`,`${F}.${K}`):J[K]=M}S[F]=J,Object.keys(X).length>0&&(_[F]=X);continue}ir(N)?i(`${c}.slots.${F}`,F):S[F]=P}for(let F of Object.keys(p)){let P=F.indexOf("."),N=P===-1?F:F.slice(0,P),Q=m[N];(P===-1?Q!==void 0:Ee(Q)&&Q[F.slice(P+1)]!==void 0)||o("fixtures/document-invalid",t,`${c}.slot_overrides.scalar.${F}: marks a value the instance does not state`)}let O=a.enabled,H=a.variant;O!==void 0&&typeof O!="boolean"&&o("fixtures/document-invalid",t,`${c}.enabled: expected true or false`),H!==void 0&&typeof H!="string"&&o("fixtures/document-invalid",t,`${c}.variant: expected a variant case`),n.push({section:u,instance:s,values:S,display:{...typeof O=="boolean"?{enabled:O}:{},...typeof H=="string"?{variant:H}:{}},overrides:_,marks:J4(f)})}return n;function i(s,a){o("fixtures/document-invalid",t,`${s}: a sourced slot is stated only as the user's override \u2014 mark it in slot_overrides.scalar["${a}"], or leave it to its source`)}}function J4(e){let t={};return Ee(e.items)&&(t.items=e.items),Ee(e.items_removed)&&(t.items_removed=e.items_removed),Ee(e.order)&&(t.order=e.order),t}var MI=["file","poster","preview"],W4=["headshot","logo_dark","logo_light"];async function K4(e,t,r,o,n){let i=await Fv(e,t,r,o,n);if(i===null)return null;let s={};for(let[f,p]of Object.entries(i))Dv.includes(f)||(s[f]=p);let a=async(f,p)=>{let m=vt(t,f);if("problem"in m)return n("fixtures/reference-invalid",t,`${p}: ${m.problem}`),null;let S=await e.mediaFile(m.path);return S===null&&n("fixtures/reference-invalid",t,`${p}: "${m.path}" does not exist`),S},c=f=>Array.isArray(f)?f.filter(Ee):[],l=(f,p)=>{if(!Ee(f)||typeof f.media!="string")return f;for(let m of Object.keys(f))m!=="media"&&n("fixtures/document-invalid",t,`${p}.${m}: not a member a pick states \u2014 it takes { "media": <id> }`);return{id:f.media}},u=(f,p)=>Array.isArray(f)?f.map((m,S)=>l(m,`${p}[${String(S)}]`)):f;Array.isArray(s.uploads)&&(s.uploads=await Promise.all(s.uploads.map(async(f,p)=>{if(!Ee(f))return f;let m={...f};for(let S of MI)m[S]!==void 0&&(m[S]=await a(m[S],`uploads[${String(p)}].${S}`));return m})));for(let f of["property_media","floor_plans","property_documents"])s[f]!==void 0&&(s[f]=u(s[f],f));s.hero!==void 0&&(s.hero=l(s.hero,"hero"));for(let f of["units","commercial_spaces"])Array.isArray(s[f])&&(s[f]=s[f].map((p,m)=>{if(!Ee(p))return p;let S=`${f}[${String(m)}]`,_={...p};return _.photos!==void 0&&(_.photos=u(_.photos,`${S}.photos`)),Array.isArray(_.floor_plans)&&(_.floor_plans=_.floor_plans.map((O,H)=>Ee(O)?{...O,image:l(O.image,`${S}.floor_plans[${String(H)}].image`)}:O)),_}));Array.isArray(s.contacts)&&(s.contacts=await Promise.all(c(s.contacts).map(async(f,p)=>{let m={...f};for(let S of W4)typeof m[S]=="string"&&(m[S]=await a(m[S],`contacts[${String(p)}].${S}`));return m}))),Array.isArray(s.comparables)&&(s.comparables=await Promise.all(c(s.comparables).map(async(f,p)=>{let m={...f};return typeof m.photo=="string"&&(m.photo=await a(m.photo,`comparables[${String(p)}].photo`)),m})));let d=Lk(s,t);for(let f of d.violations)n(f.rule,f.file,f.message);return d}var q4={media:G4,kinds:!0};function G4(e,t,r){let o=e.type==="image"?["media","crop","mobile"]:["media"];if(!Ee(t)||typeof t.media!="string"||Object.keys(t).some(s=>!o.includes(s)))return r.violations.push({rule:"fixtures/document-invalid",file:r.module,message:`fixture "${r.fixtureId}": "${r.instance}".${r.slot} (${e.type}) states ${JSON.stringify(t)}; it takes { "media": <id> }${e.type==="image"?', with a "crop" beside it when cropped':""}`}),null;let n=t.media,i=DI(e,n,`${e.type} "${n}", which its property does not carry`,r);return i===null||t.crop===void 0&&t.mobile===void 0?i:FI(i.media,t.crop,Ee(t.mobile)?t.mobile.crop:void 0,r)}var Y4=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function LI(e){return e.slice(0,e.lastIndexOf("/")+1)}async function ZI(e,t){let r=await e(t);if(r===null)return null;try{let o=JSON.parse(r);return Y4(o)?o:null}catch{return null}}function CI(e,t){let r=[];for(let o of Array.isArray(t)?t:[]){let n=vt(e,o);"path"in n&&!r.includes(n.path)&&r.push(n.path)}return r}async function VI(e,t){let r=await ZI(e,t),o=CI(t,r?.properties),n=CI(t,r?.fixtures),i=new Map;for(let s of n){let a=await X4(e,s);a!==null&&i.set(s,a)}return{list:t,properties:o,fixtures:n,named:i}}async function X4(e,t){let r=await ZI(e,t);if(r===null)return null;let o=vt(t,r.property);return"path"in o?o.path:null}function Pn(e){return{kind:"fixture",key:e,folder:`${LI(e)}${Rn(e)}/`}}function ka(e){let t=LI(e);return{kind:"property",key:t,folder:t}}function HI(e){let t=new Map;for(let r of e.fixtures)t.set(r,Pn(r));for(let r of[...e.properties,...e.named.values()]){let o=ka(r);t.has(o.key)||t.set(o.key,o)}return[...t.values()]}function BI(e,t){let r=null,o=-1;for(let n of t){if(n.kind==="fixture"&&n.key===e)return n;let i=n.folder;if(!e.startsWith(i))continue;let s=i.length;(s>o||s===o&&n.kind==="property")&&(r=n,o=s)}return r}function Sa(e,t,r){if(t.size===0)return e;if(typeof e=="string"){let o=t.get(e);return o!==void 0?o:r==="path"?e.split(".").map(n=>t.get(n)??n).join("."):e}return Array.isArray(e)?e.map(o=>Sa(o,t)):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([o,n])=>[o,Sa(n,t,o)])):e}var Ia=class extends Error{faults;constructor(t){super(t.map(r=>r.message).join("; ")),this.faults=t,this.name="ContentDocOpsRefusal"}};function WI(e,t,r){let{composition:o}=r,n=r.declaredVariants??new Map,i=r.listsOfObjects??new Map,s=new Map;for(let d of o.pages)for(let f of d.sections)s.has(f.instance_id)||s.set(f.instance_id,f.required===!0);let a=new Map(o.pages.map(d=>[d.id,d])),c=[];if(t.forEach((d,f)=>{if("section_instance_id"in d&&!s.has(d.section_instance_id)&&c.push({pointer:`/ops/${f}/section_instance_id`,code:"unknown_section_instance",message:`No section instance '${d.section_instance_id}' in the deliverable's composition`}),d.op==="set_variant"&&s.has(d.section_instance_id)){let p=n.get(d.section_instance_id);p?p.locked?c.push({pointer:`/ops/${f}/variant`,code:"variant_locked",message:`Section instance '${d.section_instance_id}' declares a locked variant, which the user cannot switch`}):p.cases.includes(d.variant)||c.push({pointer:`/ops/${f}/variant`,code:"unknown_variant_case",message:`'${d.variant}' is not a declared case of section instance '${d.section_instance_id}' (declared: ${p.cases.join(", ")})`}):c.push({pointer:`/ops/${f}/variant`,code:"section_declares_no_variant",message:`Section instance '${d.section_instance_id}' declares no display variant`})}if(d.op==="set_slot"&&d.override?.kind==="scalar"&&i.get(d.section_instance_id)?.has(d.slot_id)===!0&&c.push({pointer:`/ops/${f}/override`,code:"whole_list_marker_on_list_of_objects",message:`Slot '${d.slot_id}' is a list of objects, which marks per item, never whole`}),d.op==="toggle_section"&&!d.enabled&&s.get(d.section_instance_id)===!0&&c.push({pointer:`/ops/${f}/section_instance_id`,code:"section_required",message:`Section instance '${d.section_instance_id}' is required and cannot be hidden`}),d.op==="toggle_page"){let p=a.get(d.page_id);p?p.optional||c.push({pointer:`/ops/${f}/page_id`,code:"page_not_optional",message:`Page '${d.page_id}' is not optional and cannot be toggled`}):c.push({pointer:`/ops/${f}/page_id`,code:"unknown_page",message:`No page '${d.page_id}' in the deliverable's composition`})}}),c.length)throw new Ia(c);let l={...e,instances:e.instances.map(d=>({...d,slots:{...d.slots},...d.slot_overrides?{slot_overrides:structuredClone(d.slot_overrides)}:{},...d.display_overrides?{display_overrides:{...d.display_overrides}}:{}})),...e.page_state?{page_state:e.page_state.map(d=>({...d}))}:{}},u=d=>{let f=l.instances.find(p=>p.instance_id===d);if(!f)throw new Error(`instance ${d} vanished after validation`);return f};for(let d of t)switch(d.op){case"set_slot":{let f=u(d.section_instance_id);f.slots=Jk(f.slots,d.slot_id,d.value),d.override&&Q4(f,d.slot_id,d.override);break}case"relink_slot":eN(u(d.section_instance_id),d.slot_id,d.target);break;case"toggle_section":{let f=u(d.section_instance_id);f.enabled=d.enabled,JI(f,"visibility");break}case"set_variant":{let f=u(d.section_instance_id);f.variant=d.variant,JI(f,"variant");break}case"toggle_page":{let f=l.page_state??[],p=f.find(m=>m.page_id===d.page_id);p?p.enabled=d.enabled:f.push({page_id:d.page_id,enabled:d.enabled}),l.page_state=f;break}}return l}function JI(e,t){e.display_overrides={...e.display_overrides,[t]:!0}}function Q4(e,t,r){let o=e.slot_overrides??={};if(r.kind==="scalar")(o.scalar??={})[t]=!0;else if(r.kind==="item"){let n=o.items??={},i=n[t]??={};(i[r.item_id]??={})[r.field]=!0}else if(r.kind==="order")(o.order??={})[t]=!0;else{let n=o.items_removed??={};(n[t]??={})[r.item_id]=!0}}function eN(e,t,r){let o=e.slot_overrides;if(o){if(r.kind==="scalar")o.scalar&&(delete o.scalar[t],Object.keys(o.scalar).length===0&&delete o.scalar);else if(r.kind==="item"){let n=o.items?.[t];if(n){let i=n[r.item_id];i&&(delete i[r.field],Object.keys(i).length===0&&delete n[r.item_id]),Object.keys(n).length===0&&delete o.items[t],o.items&&Object.keys(o.items).length===0&&delete o.items}}else if(r.kind==="order")o.order&&(delete o.order[t],Object.keys(o.order).length===0&&delete o.order);else{let n=o.items_removed?.[t];n&&(delete n[r.item_id],Object.keys(n).length===0&&delete o.items_removed[t],o.items_removed&&Object.keys(o.items_removed).length===0&&delete o.items_removed)}!o.scalar&&!o.items&&!o.items_removed&&!o.order&&delete e.slot_overrides}}var Nu=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function tN(e,t){return e==="address"?Oe(t):e==="text_list"||e==="number_list"?(Array.isArray(t)?t:[]).filter(o=>o!=null&&o!=="").map(o=>KI(e==="text_list"?"text":"number",o)):KI(e,t)}function KI(e,t){if(e==="number"){if(t===""||t===void 0||t===null)return null;if(typeof t=="string"&&Number.isFinite(Number(t)))return Number(t)}return e==="text"&&typeof t=="number"?String(t):t??null}var qI=e=>Dr().includes(e);function nN(e){let t=e.split(".");if(t.length===3){let[o,n,i]=t;if(!qI(o))throw new g(400,`"${e}" names no row of a table the property holds.`);if(!ia(o,i))throw new g(400,`"${e}" is ${o}' ${i}, which no one writes back.`);let s=_i(o,i);return{table:o,row:n,member:i,valueType:s===void 0?null:Bn(s)}}let r=`property.${e}`;if(t.length!==1||!vn(r)||!ia(r))throw new g(400,`"${e}" names no fact the playground can write.`);if(qI(e))throw new g(400,`"${e}" is a list of rows: write its rows.`);return{table:null,member:e,valueType:qs(r)}}function GI(e,t){if(!Nu(t))return t;let r=Nu(e)?e:{},o={...r};for(let[n,i]of Object.entries(t))(i!==null||n in r)&&(o[n]=i);return o}function YI(e,t,r,o){let n=nN(r);if(Array.isArray(o)&&n.valueType!=="text_list"&&n.valueType!=="number_list")throw new g(400,`"${r}" holds no list; set its value.`);let i=tN(n.valueType,o);if(n.table===null)return{...t,[n.member]:GI(t[n.member],i)};let{table:s,row:a}=n,c=t[s];if(!Array.isArray(c)||!c.some(l=>Nu(l)&&l.id===a))throw new g(404,`The property document "${e.property}" holds no ${s} row "${a}".`);return{...t,[s]:c.map(l=>Nu(l)&&l.id===a?{...l,[n.member]:GI(l[n.member],i)}:l)}}var yr=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),rN={staged:new Map,adoptedMember:(e,t)=>{throw new g(422,`"${e}.${t}": this batch reads no section, so nothing adopts.`)}};function QI(e,t,r,o,n=rN){let i={property:{...t},rowIds:new Map,media:n,committed:new Set};for(let s of r){let a=Sa(s,i.rowIds);a.op==="set_slot"||a.op==="relink_slot"?o(a):oN(e,i,a)}return{property:i.property,rowIds:i.rowIds,committed:i.committed}}function oN(e,t,r){switch(r.op){case"set_value":t.property=YI(e,t.property,r.path,r.value);return;case"add_row":sN(t,r.home,r.path,r.value,r.temp_id);return;case"remove_row":cN(t,r.home,r.path);return;case"pick":lN(t,r.path,r.id);return;case"unpick":uN(t,r.path,r.id);return;case"order":dN(t,r.home,r.path,r.ids);return;case"set_list":fN(t,r.path,r.list);return;case"clear_media":pN(t,r.path);return;case"commit_media":oO(t,r.path,r.media_id);return;case"adopt_media":mN(t,r.instance_id,r.slot,r.row_id,r.media_id);return}}var eO=e=>Dr().includes(e);function iN(e,t){let r=Ze.pages,n=(Object.hasOwn(r,e)?r[e]:void 0)?.declaration;if(n?.type!=="list")throw new g(400,`"${t}" names no list the property holds.`);return n}function Uu(e,t){let r=e[t];return Array.isArray(r)?r:[]}function tO(e,t){return e.type==="object"?e.fields:e.type==="row"&&t!==null&&eO(t)?so(t):{}}function st(e,t){if(!yr(t))return null;let r=Hl(e);return r!==null?Mu(t[r]):typeof t.id=="string"?t.id:Mu(t)}function Mu(e){if(typeof e=="string"&&e!=="")return e;if(!yr(e))return null;for(let t of["media","media_id"])if(typeof e[t]=="string"&&e[t]!=="")return e[t];return null}function Lu(e){return["media","image","video","tour","document"].includes(e.type)&&e.from!==void 0}function nO(e){return["image","video","tour","document"].includes(e.type)&&e.from===void 0}function Ui(e,t){let r=t.split("."),[o]=r,n=iN(o,t);if(r.length===1)return{path:t,element:n.element,items:Uu(e,o),write:d=>({...e,[o]:[...d]})};if(r.length!==3)throw new g(400,`"${t}" names no list: a list is a fact, or a row's list member.`);let[,i,s]=r,a=tO(n.element,o)[s];if(a?.type!=="list")throw new g(400,`"${t}" names no list a ${o} row holds.`);let c=Uu(e,o),l=c.find(d=>st(n.element,d)===i);if(!yr(l))throw new g(404,`The property document holds no ${o} row "${i}".`);let u=Array.isArray(l[s])?l[s]:[];return{path:t,element:a.element,items:u,write:d=>({...e,[o]:c.map(f=>f===l?{...l,[s]:[...d]}:f)})}}function rO(e,t){let r=t.lastIndexOf(".");if(r<0)throw new g(400,`"${t}" names no row or item.`);return{list:Ui(e,t.slice(0,r)),id:t.slice(r+1)}}function Uv(e,t,r){if(t===void 0)return null;if(nO(e)){if(t===null)return null;throw new g(422,`${r}: a row's own image is set by committing a file staged for it, not by a value.`)}if(Lu(e)){let o=Mu(t);return o===null?null:{media:o}}return e.type==="address"?t===null?null:Oe(t):e.type==="list"?(Array.isArray(t)?t:[]).filter(n=>n!=null&&n!=="").map((n,i)=>Uv(e.element,n,`${r}[${String(i)}]`)):e.type==="object"?yr(t)?Cu(e.fields,t,r):null:t}var XI=e=>e.source?.kind==="compute";function Cu(e,t,r){for(let n of Object.keys(t)){if(n==="id")continue;let i=Object.hasOwn(e,n)?e[n]:void 0;if(i===void 0)throw new g(400,`${r}: the item declares no field "${n}".`);if(XI(i))throw new g(400,`${r}: "${n}" is derived, so no one writes it.`)}let o={};for(let[n,i]of Object.entries(e))XI(i)||(o[n]=Object.hasOwn(t,n)?Uv(i,t[n],`${r}.${n}`):i.type==="list"?[]:null);return o}var Nv=()=>globalThis.crypto.randomUUID();function sN(e,t,r,o,n){let i=yr(o)?o:{};if(t==="library"){if(r!=="contacts"||!eO(r)||Jn(r)!=="library")throw new g(400,`"${r}" names no list of the library.`);let d=Nv(),f={id:d,...Cu(so(r),i,`add_row "${r}"`)};e.property={...e.property,contacts:[...Uu(e.property,"contacts"),f]},e.rowIds.set(n,d);return}let s=Ui(e.property,r),{element:a}=s;if(a.type!=="object")throw new g(422,`"${r}" is a list of ${a.type==="row"?"rows the library holds, so add one there and pick it":"picks, so pick one"}.`);let c=Cu(a.fields,i,`add_row "${r}"`),l=Hl(a);if(l!==null){let d=st(a,c);if(d===null)throw new g(400,`add_row "${r}": an item of this list is named by the ${l} it picks; pick one.`);let f=s.items.find(p=>st(a,p)===d);e.property=f===void 0?s.write([c,...s.items]):s.write(s.items.map(p=>p===f?{...p,...aN(c,i)}:p)),e.rowIds.set(n,d);return}let u=Nv();e.property=s.write([{id:u,...c},...s.items]),e.rowIds.set(n,u)}function aN(e,t){return Object.fromEntries(Object.entries(e).filter(([r])=>Object.hasOwn(t,r)))}function cN(e,t,r){if(t==="library"&&r.split(".")[0]!=="contacts")throw new g(400,`"${r}" names no row of the library.`);let{list:o,id:n}=rO(e.property,r);if(!o.items.some(i=>st(o.element,i)===n))throw new g(404,`"${o.path}" holds no item "${n}".`);e.property=o.write(o.items.filter(i=>st(o.element,i)!==n))}function lN(e,t,r){let o=Ui(e.property,t),{element:n}=o;if(n.type==="row"){if(!o.items.some(i=>st(n,i)===r))throw new g(404,`The fixture's library holds no ${t} row "${r}".`);return}if(!Lu(n))throw new g(400,`"${t}" is not a list of picks.`);if(!o.items.some(i=>st(n,i)===r)){if(!Uu(e.property,"uploads").some(i=>yr(i)&&i.id===r))throw new g(404,`The property's uploads hold no "${r}" to pick.`);e.property=o.write([...o.items,{media:r}])}}function uN(e,t,r){let o=Ui(e.property,t);if(o.element.type!=="row"&&!Lu(o.element))throw new g(400,`"${t}" is not a list of picks.`);o.items.some(n=>st(o.element,n)===r)&&(e.property=o.write(o.items.filter(n=>st(o.element,n)!==r)))}function dN(e,t,r,o){if(t==="library")throw new g(422,`The fixture's library is its property's ${r}; order them on the property.`);let n=Ui(e.property,r),i=n.items.map(c=>st(n.element,c)??""),s=q_(i,o),a=new Map(n.items.map((c,l)=>[i[l],c]));s.every((c,l)=>c===i[l])||(e.property=n.write(s.map(c=>a.get(c))))}function fN(e,t,r){if(t.split(".").length!==3)throw new g(400,`"${t}" names no list nested in a row.`);let o=Ui(e.property,t),{element:n}=o;if(r.kind==="picks"){if(!Lu(n))throw new g(400,`"${t}" is not a list of picks.`);let l=new Map(o.items.map(u=>[st(n,u),u]));e.property=o.write(r.media_ids.map(u=>l.get(u)??{media:u}));return}if(n.type!=="object")return;let i=[...o.items],s=l=>{if(l===null)return;let u=i.findIndex(d=>st(n,d)===l);return u<0?void 0:i.splice(u,1)[0]},a=Hl(n),c=r.items.map((l,u)=>{let d=s(l.id)??(a===null?void 0:s(Mu(l.fields[a]))),f=`set_list "${t}"[${String(u)}]`;if(yr(d)){let S={};for(let[_,O]of Object.entries(l.fields)){let H=Object.hasOwn(n.fields,_)?n.fields[_]:void 0;if(H===void 0)throw new g(400,`${f}: the item declares no field "${_}".`);S[_]=Uv(H,O===""?null:O,`${f}.${_}`)}return{...d,...S}}let p=Object.fromEntries(Object.entries(l.fields).filter(([,S])=>S!==null)),m=Cu(n.fields,p,f);if(a!==null){if(st(n,m)===null)throw new g(400,`${f}: an item of this list is named by the ${a} it picks; pick one.`);return m}return{id:Nv(),...m}});e.property=o.write(c)}function Mi(e,t){let r=t.split(".");if(r.length!==3)throw new g(400,`"${t}" is in no row, so nothing can own its media.`);let[o,n,i]=r,{list:s}=rO(e,`${o}.${n}`),a=tO(s.element,o)[i];if(a===void 0||!nO(a))throw new g(400,`"${t}" is not an owned media field.`);let c=s.items.find(l=>st(s.element,l)===n);if(!yr(c))throw new g(404,`The property document holds no ${o} row "${n}".`);return{table:o,rowId:n,member:i,kind:a.type,heldId:o==="comparables"?ru(n):nu(n,i),held:c[i],write:l=>s.write(s.items.map(u=>u===c?{...c,[i]:l}:u))}}function pN(e,t){let r=Mi(e.property,t);r.held===null||r.held===void 0||(e.property=r.write(null))}function oO(e,t,r){let o=Mi(e.property,t);if(r===o.heldId&&o.held!==null&&o.held!==void 0)return;let n=e.media.staged.get(r);if(n===void 0)throw new g(404,`"${t}" holds no media "${r}": no such file was uploaded for it in the property's folder or staged in the content fixture named.`);if(n.kind!==o.kind)throw new g(415,`"${t}" holds ${o.kind==="image"?"an":"a"} ${o.kind}, and "${r}" is ${n.kind==="image"?"an":"a"} ${n.kind}.`);e.property=o.write(n.file),e.committed.add(r)}function mN(e,t,r,o,n){let i=e.media.adoptedMember(t,r);oO(e,`${i.table}.${o}.${i.member}`,n)}var po=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Zu={image:[".png",".jpg",".jpeg",".webp",".avif",".gif"],video:[".mp4",".webm",".mov"],document:[".pdf"]},gN=new Set(Object.values(Zu).flat());function aO(e){return Object.keys(Zu).find(r=>Zu[r].includes(e.toLowerCase()))??null}var hN={uploads:["image","video","document"],property_media:["image","video"],floor_plans:["image"],property_documents:["document","image","video"]},yN={uploads:["video","tour"],property_media:["video","tour"],property_documents:["video"]},iO=["property_media","floor_plans","property_documents"],cO=["file","poster","preview"],vN=[["contacts",["headshot","logo_dark","logo_light"]],["comparables",["photo"]]],Mv=e=>e.replace(/^property\./,""),En=e=>Array.isArray(e)?e:[],Ci=e=>po(e)?e.media??e.id:void 0,bt=e=>e.slice(0,e.lastIndexOf("/")+1);function Zi(e,t,r="this list"){let{name:o,type:n,bytes:i}=e;if(!ES(o,n))throw new g(415,rv(o,n)??`Got '${o}' as '${n}'; expected ${TS}.`);if(i.byteLength>ji)throw new g(413,`Got ${String(i.byteLength)} bytes; the cap is ${String(ji)} bytes (500 MB).`);let s=nv(i.subarray(0,tv),Pi(n));if(!s.ok)throw new g(415,s.detail);let a=M_(n),c=a==="tour"||a===null?null:a;if(c===null||!Zu[c].includes(Rt(o)))throw new g(415,`A fixture holds media files of these types: ${[...gN].join(", ")}. '${o}' is not one; add it to the property by hand if a template needs it.`);if(!t.includes(c))throw new g(415,`Got ${c==="image"?"an":"a"} ${c}; ${r} holds ${t.join(" or ")}.`);return c}function lO(e,t,r,o){let n=new Set([...En(t.uploads).map(Ci),...Object.keys(e.media)]),i=1,s=o?`${r}-1`:r;for(;n.has(s);)s=`${r}-${String(++i)}`;return s}function Vi(e){let t=e.slice(Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"))+1),r=t.lastIndexOf("."),o=(r>0?t.slice(0,r):t).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return o===""?"upload":o}function Li(e){let t=new Set;for(let r of En(e.uploads))if(po(r))for(let o of cO)typeof r[o]=="string"&&t.add(r[o]);for(let[r,o]of vN)for(let n of En(e[r]))if(po(n))for(let i of o)typeof n[i]=="string"&&t.add(n[i]);return t}async function Oa(e,t,r,o,n,i=new Set){let s=Li(r);for(let a=1;;a++){let c=`media/${a===1?o:`${o}-${String(a)}`}${n}`;if(!s.has(c)&&!i.has(c)&&await e.readText(`${t}${c}`)===null)return c}}var mo=e=>!e.startsWith("/")&&!e.split("/").includes("..");function uO(e,t,r){let o=Li(r),n=bt(e);return[...Li(t)].filter(i=>!o.has(i)&&mo(i)).map(i=>({path:`${n}${i.replace(/^\.\//,"")}`,remove:!0}))}function dO(e,t,r){let o={...e,uploads:[...En(e.uploads),t]};return r!=="uploads"&&(o[r]=[...En(e[r]),{media:t.id}]),o}async function fO(e,t,r){let{target:o}=r;if(!("list"in o))throw new Error("uploadSave: a slot's own file and a row's image are saved by ./owned-saves.ts");let n=Mv(o.list),i=hN[n];if(i===void 0)throw new g(400,`A file is uploaded into the uploads, the property's media, its floor plans or its documents, not "${o.list}".`);let s=Zi(r,i),{doc:a}=await at(t,e.property),c=lO(e,a,Vi(r.name),!1),l=bt(e.property),u=await Oa(t,l,a,c,Rt(r.name)),d=Vu(c,s,u);return{writes:[{path:`${l}${u}`,bytes:r.bytes},{path:e.property,text:ze(dO(a,d,n))}],media:c}}function Cv(e,t,r="this list"){let o=C_(e),n=Ns(e);if(o!=="video"&&o!=="tour"||n===null)throw new g(422,`'${e}' is no tour or video link this platform plays.`);if(!t.includes(o))throw new g(415,`Got a ${o}; ${r} holds ${t.length===0?"no link":t.join(" or ")}.`);return{kind:o,provider:n}}function Lv(e,t,{kind:r,provider:o}){return r==="video"?{id:e,kind:r,source:"link",url:t,provider:o,duration_ms:null}:{id:e,kind:r,url:t,provider:o}}function Vu(e,t,r){return t==="video"?{id:e,kind:t,source:"upload",file:r,duration_ms:null}:{id:e,kind:t,file:r}}async function pO(e,t,r){let o=Mv(r.list),n=yN[o];if(n===void 0)throw new g(400,`A link is added to the uploads, the property's media or its documents, not to "${r.list}".`);let i=Cv(r.url,n),{doc:s}=await at(t,e.property),a=lO(e,s,"link",!0),c=Lv(a,r.url,i);return{writes:[{path:e.property,text:ze(dO(s,c,o))}],media:a}}var bN={property_media:["hero","units.photos","commercial_spaces.photos"],floor_plans:["units.floor_plans","commercial_spaces.floor_plans"],property_documents:[]};function sO(e,t,r){let o={...e};for(let n of r)o[n]=En(e[n]).filter(i=>Ci(i)!==t);for(let n of r.flatMap(i=>bN[i])){if(n==="hero"){Ci(o.hero)===t&&(o.hero=null);continue}let[i,s]=n.split(".");Array.isArray(o[i])&&(o[i]=o[i].map(a=>{if(!po(a)||!Array.isArray(a[s]))return a;let c=a[s],l=c.filter(u=>Ci(po(u)&&"image"in u?u.image:u)!==t);return l.length===c.length?a:{...a,[s]:l}}))}return o}async function mO(e,t,r){let o=Mv(r.list),n=r.media;if(o!=="uploads"&&!iO.includes(o))throw new g(400,`An item is removed from the uploads, the property's media, its floor plans or its documents, not "${r.list}".`);let{doc:i}=await at(t,e.property),s=f=>En(i[f]).some(p=>Ci(p)===n);if(!s(o))throw new g(404,`The property's ${o} holds no media "${n}".`);if(o!=="uploads"){let f=sO(i,n,[o]);return{writes:[{path:e.property,text:ze(f)}]}}let a=En(i.uploads).find(f=>Ci(f)===n),c=sO({...i,uploads:En(i.uploads).filter(f=>f!==a)},n,iO.filter(s)),l=Li(c),u=bt(e.property),d=[];for(let f of cO){let p=po(a)?a[f]:void 0;typeof p=="string"&&!l.has(p)&&mo(p)&&d.push({path:`${u}${p.replace(/^\.\//,"")}`,remove:!0})}return{writes:[{path:e.property,text:ze(c)},...d]}}function gO(e){let t;try{t=JSON.parse(e)}catch(n){throw new g(400,`request body is not JSON: ${n instanceof Error?n.message:String(n)}`)}if(!po(t))throw new g(400,"A library change is a JSON object.");let{property:r,fixture:o}=t;if(t.kind==="link"){if(typeof t.url!="string")throw new g(400,"A link carries the URL.");if(typeof r=="string"&&typeof t.list=="string")return{kind:"link",property:r,list:t.list,url:t.url};if(typeof o=="string"&&typeof t.instance=="string"&&typeof t.slot=="string")return{kind:"link",fixture:o,instance:t.instance,slot:t.slot,url:t.url};throw new g(400,"A link names where it lands: a property and its list, or a content fixture, an instance and its slot.")}if(t.kind==="remove"){if(typeof r!="string"||typeof t.list!="string"||typeof t.media!="string")throw new g(400,"A removal names a property, a list and the media to remove from it.");return{kind:"remove",property:r,list:t.list,media:t.media}}throw new g(400,`A library change's kind is "link" or "remove".`)}var wN=["verb","unique","brief","none","reads"],LW=new Set(wN);function hO(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function yO(e){return!hO(e)||!Array.isArray(e.fills)?[]:e.fills.filter(hO).map(t=>({...t,kind:"fill"}))}var xN=["text","number","select","url","email","phone","date"],_N=new Set(xN);function $N(e){return _N.has(e)}function kN(e){return e.type===void 0||!$N(e.type)?!1:e.type!=="text"||e.size===void 0||e.size==="short"}var vO=new Set(["image","video","tour","document"]);function SN(e){return!(e!==null&&typeof e=="object"&&e.locked===!0)}function bO(e){let t=Object.values(e).filter(SN).map(n=>n!==null&&typeof n=="object"?n:{}),r=t.filter(n=>n.type!==void 0&&vO.has(n.type)),o=t.filter(n=>!(n.type!==void 0&&vO.has(n.type)));return r.length===1&&o.length<=2&&o.every(kN)}function IN(e,t){if(t==null)return null;let r=Hk(t,e);if(r===null)return null;let o=_i(t,r),n=o===void 0?null:Bn(o);if(o===void 0||n==null)return null;let i=Cs(o);return{table:t,member:r,value_type:n,...i!==void 0?{filter:i}:{}}}var Hi={kind:"owned"};function wO(e){return e===null?Hi:{kind:"picked",filter:e}}function Bi(e,t){if(e.from!==void 0)return wO(fn(e));let r=IN(e,t);return r===null?null:r.filter===void 0?Hi:wO(fn({type:e.type,from:r.filter.from}))}function xO(e,t){return Bi(e,t)??Hi}function ON(e,t,r){return Bi(t,r)??Bi({...t,source:e.source},r)}function RN(e,t,r){let o=Bi(t,r.itemTable);return o!==null?o:r.picksBy!==null&&t.source?.kind==="element"?{kind:"picked",filter:r.picksBy}:Bi({...t,source:e.source},r.listTable)??Hi}function jN(e,t){let r=Zv(e)?e.decisions:void 0;if(!Array.isArray(r))return null;let o=r.find(n=>{let i=Zv(n)?n.produces:void 0;return Array.isArray(i)&&i[0]===t});return yO(o).some(n=>n.verb==="pick")?W_(Zv(o)?o.of:void 0):null}function Zv(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function PN(e){let t=e.element;return t?.type==="object"?t.fields??{}:null}function Vv(e,t,r){let o=We(r);if(o===null)return null;let n=(Object.hasOwn(t,o.slot)?t[o.slot]:void 0)??(Object.hasOwn(e,o.slot)?e[o.slot]:void 0);return n?.type==="row"?Ml(n):null}function _O(e,t,r){let[o="",...n]=t.split("."),i=Object.hasOwn(e,o)?e[o]:void 0;if(i===void 0)return null;if(i.type==="list")return $O(e,i,n,{rowTable:Vv(e,e,i.source),inRecord:!1,picksBy:jN(r,o)});if(i.type==="object"){let[s,...a]=n,c=s===void 0?void 0:i.fields?.[s];return c===void 0||a.length>0?null:Hu(c,xO(c,Vv(e,i.fields??{},c.source)))}return n.length>0?null:Hu(i,xO(i,Vv(e,e,i.source)))}function $O(e,t,r,o){let[n,...i]=r;if(n===void 0){let u=t.element;return u===void 0?null:Hu(u,ON(t,u,o.rowTable)??Hi)}let s=PN(t),a=s?.[n];if(s===null||a===void 0)return null;let c=o.inRecord?o.rowTable:Mr({slots:e},t);if(a.type==="list")return $O(e,a,i,{rowTable:c,inRecord:!0,picksBy:null});if(i.length>0)return null;let l=bO(s)?RN(t,a,{itemTable:c,listTable:o.rowTable,picksBy:o.picksBy}):Bi(a,c)??(o.picksBy!==null&&a.source?.kind==="element"?{kind:"picked",filter:o.picksBy}:Hi);return Hu(a,l)}function Hu(e,t){return fn(e)===null?null:{declaration:e,offer:t}}var EN=new Set(["image","video","tour","document"]);function TN(e,t){let[r="",...o]=t.split("."),n=Object.hasOwn(e,r)?e[r]:void 0;for(let i of o)n=(n?.type==="list"?n.element??n:n)?.fields?.[i];return n}function AN(e,t){let r=t.lastIndexOf(".");if(r<=0)return{};let o=t.slice(0,r),n=TN(e,o),i=(n?.type==="list"?n.element??n:n)?.fields;return i===void 0?{container:o}:{container:o,siblings:i}}function Hv(e,t,r){let o=r.source;if(o?.kind!=="row"||o.slot===void 0)return null;let n=y$(e,AN(e,t),{slot:o.slot,field:o.field});if(n?.layer!=="home")return null;let{table:i,member:s}=n,a=_i(i,s);if(a===void 0||!EN.has(a.type)||a.from!==void 0)return null;let c=a.type;return Ce(r).includes(c)?{table:i,member:s,kind:c,home:Jn(i)}:null}var go=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ji=e=>Array.isArray(e)?e:[];function IO(e,t){let r=e.instances.find(o=>o.instanceId===t);if(r===void 0)throw new g(422,`The composition places no instance "${t}".`);return r}function OO(e,t){let r=IO(e,t.instance),[o="",...n]=t.slot.split("."),i=r.sectionSchema.slots[o],s=[];for(let d of n){if(i===void 0)break;s.push(i);let f=i.type==="list"?i.element:i;i=f?.type==="object"?f.fields?.[d]:void 0}if(i===void 0)throw new g(422,`Section "${r.section}" declares no slot "${t.slot}".`);s.push(i);let a=Hv(r.sectionSchema.slots,t.slot,i);if(a!==null)return[a.kind];let c=i.type==="list"&&i.element!==void 0?i.element:i;s.push(c);let l=Ce(c),u=s.some(d=>typeof d.from=="string"||Array.isArray(d.from)||d.source!==void 0&&d.source.kind!=="authored");if(l.length===0||u)throw new g(422,`"${t.slot}" of "${t.instance}" does not own its media: it ${l.length===0?"holds no media":"picks it"}.`);return l}function RO(e,t){let r=IO(e,t.instance),o=_O(r.sectionSchema.slots,t.slot)?.declaration,n=o===void 0?null:Hv(r.sectionSchema.slots,t.slot,o);if(n===null)throw new g(400,`"${t.slot}" of "${t.instance}" reads no row's own media, so it has nothing to adopt.`);return n}function Bv(e,t,r){let o=new Set([...Object.keys(e.media),...Ji(t.files).map(s=>go(s)?s.id:void 0)]),n=`${e.id}-${r}`,i=n;for(let s=2;o.has(i);s++)i=`${n}-${String(s)}`;return i}var zN=e=>`${e.id}/media/`;async function jO(e,t,r,o,n){let i=new Set(Ji(r.files).flatMap(s=>go(s)&&typeof s.file=="string"?[s.file]:[]));for(let s=1;;s++){let a=`${zN(t)}${s===1?o:`${o}-${String(s)}`}${n}`;if(!i.has(a)&&await e.readText(`${bt(t.file)}${a}`)===null)return a}}var Jv=(e,t)=>({...e,files:[...Ji(e.files),t]});async function PO(e,t,r,o){let n=OO(e,o.target).filter(l=>l!=="tour"),i=Zi(o,n,"this slot"),{doc:s}=await at(r,t.file),a=Bv(t,s,Vi(o.name)),c=await jO(r,t,s,a,Rt(o.name));return{writes:[{path:`${bt(t.file)}${c}`,bytes:o.bytes},{path:t.file,text:ze(Jv(s,Vu(a,i,c)))}],media:a}}async function EO(e,t,r){let{doc:o}=await at(t,e.property),n=Mi(o,r.target.owner),i=Zi(r,n.kind==="tour"?[]:[n.kind],"this field"),{doc:s}=await at(t,e.file),a=Bv(e,s,Vi(r.name)),c=await jO(t,e,s,a,Rt(r.name));return{writes:[{path:`${bt(e.file)}${c}`,bytes:r.bytes},{path:e.file,text:ze(Jv(s,Vu(a,i,c)))}],media:a}}async function TO(e,t,r,o){let n=new Set(o.flatMap(l=>l.op==="commit_media"||l.op==="adopt_media"?[l.media_id]:[]));if(n.size===0)return null;let{doc:i}=await at(t,e.file),s=bt(e.property),a=new Map,c=new Set;for(let l of Ji(i.files)){if(!go(l)||typeof l.id!="string"||!n.has(l.id))continue;let{id:u,kind:d,file:f}=l;if(typeof d!="string"||typeof f!="string"||!mo(f))continue;let p=await Oa(t,s,r,u,Rt(f),c);c.add(p),a.set(u,{kind:d,file:p,from:`${bt(e.file)}${f.replace(/^\.\//,"")}`})}return{staged:a,doc:i,settle(l){let u=Ji(i.files).filter(p=>!(go(p)&&typeof p.id=="string"&&l.has(p.id))),d={...i};u.length===0?delete d.files:d.files=u;let f=[...l].flatMap(p=>{let m=a.get(p);return m===void 0?[]:[{path:`${s}${m.file}`,from:m.from}]});return{doc:d,moves:f}}}}async function AO(e,t,r,o){let n=OO(e,o).filter(c=>c==="video"||c==="tour"),i=Cv(o.url,n,"this slot"),{doc:s}=await at(r,t.file),a=Bv(t,s,"link");return{writes:[{path:t.file,text:ze(Jv(s,Lv(a,o.url,i)))}],media:a}}function kO(e){let t=new Set,r=o=>{if(Array.isArray(o))for(let n of o)r(n);else if(go(o)){typeof o.media=="string"&&t.add(o.media);for(let n of Object.values(o))r(n)}};return r(e),t}var SO=["file","poster","preview"];function zO(e,t,r){let o=Ji(r.files);if(o.length===0)return{doc:r,removed:[]};let n=kO(t.content),i=kO(r.content),s=d=>go(d)&&typeof d.id=="string"&&n.has(d.id)&&!i.has(d.id);if(!o.some(s))return{doc:r,removed:[]};let a=o.filter(d=>!s(d)),c=new Set(a.flatMap(d=>go(d)?SO.map(f=>d[f]):[])),l=[];for(let d of o.filter(s))for(let f of SO){let p=d[f];typeof p!="string"||c.has(p)||!mo(p)||l.push({path:`${bt(e)}${p.replace(/^\.\//,"")}`,remove:!0})}let u={...r};return a.length===0?delete u.files:u.files=a,{doc:u,removed:l}}var FN="media/",DN=e=>e.startsWith(FN)&&mo(e);async function FO(e,t,r){let{doc:o}=await at(t,e.property),n=Mi(o,r.target.owner);Zi(r,n.kind==="tour"?[]:[n.kind],"this field");let i=bt(e.property),s=await Oa(t,i,o,Vi(r.name),Rt(r.name));return{writes:[{path:`${i}${s}`,bytes:r.bytes}],media:s,file:`${i}${s}`}}async function DO(e,t,r,o){let n=Li(r),i=bt(t),s=new Map;for(let a of o){if(a.op!=="commit_media"||s.has(a.media_id)||!DN(a.media_id)||n.has(a.media_id))continue;let c=aO(Rt(a.media_id));c===null||await e.readText(`${i}${a.media_id}`)===null||s.set(a.media_id,{kind:c,file:a.media_id})}return s}function Bu(e){return typeof e=="string"?e:e.url}function UO(e,t){let{facts:r}=e,o=a=>e.media[a],n=a=>a?.file===null||a?.file===void 0?"":t(Bu(a.file)),i=a=>a?.posterFile!==void 0?t(Bu(a.posterFile)):a?.posterUrl??"",s=[];for(let a of Fr(r,{kinds:["image"],from:["property.property_media","property.floor_plans"]})){let c=o(a.id);s.push({id:a.id,kind:"photo",name:c?.filename||a.id,size:"",src:n(c)})}for(let a of Fr(r,{kinds:["video"],from:[Ms]})){let c=a.provider??void 0;s.push({id:a.id,kind:"video",name:o(a.id)?.filename||a.name||a.id,size:"",src:i(o(a.id)),ready:!0,durationMs:a.duration_ms??null,...c===void 0?{}:{provider:c}})}for(let a of Fr(r,{kinds:["tour"],from:[Ms]}))s.push({id:a.id,kind:"tour",name:`${a.provider??"Tour"} ${a.id}`,size:"",src:i(o(a.id)),url:a.url??"",provider:a.provider??""});for(let a of Fr(r,{kinds:["document"],from:[Ms]})){let c=o(a.id)?.sizeBytes;s.push({id:a.id,kind:"document",name:a.name===""?a.id:a.name,size:"",src:"",mime:a.mime??"",...c===void 0?{}:{sizeBytes:c}})}return s}function MO(e){let t={};for(let[r,o]of Object.entries(Ze.pages)){let n=o.declaration;if(n.type!=="list"||Ce(n.element).length===0)continue;let i=`property.${r}`;t[i]=J_(e.facts,i)??[]}return t}function CO(e,t){let r={};for(let o of Object.keys(e.owned??{})){let n=e.media[o];n!==void 0&&(r[o]=n.file===null?n.url??"":t(Bu(n.file)))}return r}var NN=["headshot","logo_dark","logo_light"];function LO(e,t){return e.facts.contacts.map(r=>{let o={};for(let n of NN){let i=zt(r[n]),s=i===void 0?void 0:e.media[i]?.file;i!==void 0&&s!==null&&s!==void 0&&(o[i]=t(Bu(s)))}return{id:r.id,images:o}})}var UN=new Set(["image","video","tour","document","media"]),MN=["file","media","id"];function Ra(e,t){if(t==null)return t;if(UN.has(e.type)){if(typeof t!="object")return null;let n=t,i=MN.map(l=>n[l]).find(l=>typeof l=="string"&&l!=="");if(typeof i!="string")return null;if(e.type!=="image")return{file:i};let s=fo(n.crop),a=typeof n.mobile=="object"&&n.mobile!==null?fo(n.mobile.crop):null,c="floor"in n?{floor:typeof n.floor=="string"?n.floor:null}:{};return{...Au(i,s,a),...c}}if(e.type==="object")return NO(e.fields??{},t);if(e.type!=="list"||!Array.isArray(t))return t;let r=t,o=e.element;return o===void 0?r:o.type==="object"?r.map(n=>NO(o.fields??{},n)):r.map(n=>Ra(o,n))}function NO(e,t){if(typeof t!="object"||t===null)return t;let r={...t};for(let[o,n]of Object.entries(e))o in r&&(r[o]=Ra(n,r[o]));return r}function ZO(e,t,r){let o={...e};for(let[n,i]of Object.entries(r??{})){let s=t[n];s!==void 0&&(o[n]=Ra(s,i))}return o}function VO(e,t,r){let o=new Map(Object.entries(e.media));return{store:_I(o,{url:i=>t(i),crop:(i,s)=>t(i,{crop:s}),...r===void 0?{}:{content:r}}),records:$I(e.facts,o,void 0,e.owned),resolvePoi:i=>i}}function HO(e,t,r){let o=e.provenance[t]??{};return Object.fromEntries(Object.keys(r).map(n=>[n,o[n]??{kind:"empty"}]))}function BO(e,t){let r={},o=n=>n.source?.kind==="derived";for(let[n,i]of Object.entries(e)){if(i.type==="object"){for(let[s,a]of Object.entries(i.fields??{})){let c=He(n,s);o(a)&&(r[c]=My(t,c))}continue}o(i)&&(r[n]=t[n])}return r}var ho=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),CN=new Set(["image","video","tour","document","media"]);function KO(e,t){return Wv(e,Ra(e,t))}function Wv(e,t){if(t==null)return t;if(CN.has(e.type)){if(!ho(t)||typeof t.file!="string")return t;let r=ho(t.mobile)?t.mobile.crop:void 0;return{media:t.file,...t.crop===void 0?{}:{crop:t.crop},...r===void 0?{}:{mobile:{crop:r}}}}if(e.type==="object"&&ho(t))return JO(e.fields??{},t);if(e.type==="list"&&Array.isArray(t)&&e.element!==void 0){let r=e.element;return r.type==="object"?t.map(o=>ho(o)?JO(r.fields??{},o):o):t.map(o=>Wv(r,o))}return t}function JO(e,t){let r={...t};for(let[o,n]of Object.entries(e))o in r&&(r[o]=Wv(n,r[o]));return r}var WO=e=>e.source!==void 0&&e.source.kind!=="authored";function qO(e,t,r){let o=r?.scalar??{},n={};for(let[s,a]of Object.entries(t)){let c=e[s];if(c===void 0){n[s]=a;continue}if(c.type==="object"){if(!ho(a)){n[s]=a;continue}let u={};for(let[d,f]of Object.entries(a)){let p=c.fields?.[d];p!==void 0&&ir(p)&&o[`${s}.${d}`]!==!0||(u[d]=f)}Object.keys(u).length>0&&(n[s]=u);continue}if(ir(c)){o[s]===!0&&(n[s]=a);continue}let l=c.type==="list"?c.element:void 0;if(l?.type==="object"&&Array.isArray(a)&&WO(c)){let u=r?.items?.[s]??{};n[s]=a.map(d=>{if(!ho(d))return d;let f=typeof d.id=="string"?u[d.id]:void 0,p={};for(let[m,S]of Object.entries(d)){let _=l.fields?.[m];_!==void 0&&WO(_)&&f?.[m]!==!0||(p[m]=S)}return p});continue}n[s]=a}return r!==void 0&&Object.values(r).some(s=>ho(s)&&Object.keys(s).length>0)?{slots:n,slot_overrides:r}:{slots:n}}var wt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),LN={set_slot:!0,relink_slot:!0,toggle_section:!0,set_variant:!0,toggle_page:!0,set_value:!0,add_row:!0,remove_row:!0,pick:!0,unpick:!0,order:!0,set_list:!0,clear_media:!0,commit_media:!0,adopt_media:!0},QO={content:{ops:new Set(["set_slot","relink_slot","toggle_section","set_variant","toggle_page"]),max:200},everywhere:{ops:new Set(["add_row","remove_row","pick","unpick","order","set_value","set_list","commit_media","clear_media","adopt_media","set_slot","relink_slot"]),max:500}};function eR(e){let t;try{t=JSON.parse(e)}catch(c){throw new g(400,`request body is not JSON: ${c instanceof Error?c.message:String(c)}`)}if(!wt(t))throw new g(400,"A save is a JSON object.");let{batch:r,fixture:o,property:n}=t;if(r!=="content"&&r!=="everywhere")throw new g(400,`A save's batch is "content" or "everywhere".`);if(r==="content"&&typeof o!="string")throw new g(400,"A content save names its content fixture.");if(r==="everywhere"&&typeof n!="string")throw new g(400,"An Update everywhere save names its property.");if(o!==void 0&&typeof o!="string")throw new g(400,"A save's fixture is a name.");let{ops:i,max:s}=QO[r];if(!Array.isArray(t.ops)||t.ops.length===0||t.ops.length>s)throw new g(400,`A ${r} batch carries 1 to ${String(s)} ops.`);let a=t.ops.map((c,l)=>ZN(c,l,i,r));return r==="content"?{batch:r,fixture:o,ops:a}:{batch:r,property:n,...typeof o=="string"?{fixture:o}:{},ops:a}}function ZN(e,t,r,o){let n=`Op ${String(t+1)}`;if(!wt(e)||typeof e.op!="string"||!r.has(e.op))throw new g(400,`${n} is no op a ${o} batch carries.`);let i=e.op,s=LN[i];if(s!==!0)throw new g(422,`${n} is a "${i}", which the playground does not save: ${s}.`);let a=()=>{if(typeof e.section_instance_id!="string")throw new g(400,`${n} names a section instance.`);return e.section_instance_id},c=()=>{if(e.home!=="property"&&e.home!=="library")throw new g(400,`${n}'s home is "property" or "library".`);return e.home},l=()=>{if(typeof e.path!="string"||e.path==="")throw new g(400,`${n} names a fact path.`);return e.path},u=()=>{if(typeof e.slot_id!="string")throw new g(400,`${n} names a section instance and a slot.`);return e.slot_id};switch(i){case"set_slot":{if(!("value"in e))throw new g(400,`${n} carries the slot's value.`);let d=e.override===void 0?void 0:GO(e.override,`${n}'s override`);return{op:i,section_instance_id:a(),slot_id:u(),value:e.value,...d===void 0?{}:{override:d}}}case"relink_slot":return{op:i,section_instance_id:a(),slot_id:u(),target:GO(e.target,`${n}'s target`)};case"toggle_section":if(typeof e.enabled!="boolean")throw new g(400,`${n}'s enabled is a boolean.`);return{op:i,section_instance_id:a(),enabled:e.enabled};case"set_variant":if(typeof e.variant!="string")throw new g(400,`${n}'s variant is a string.`);return{op:i,section_instance_id:a(),variant:e.variant};case"toggle_page":if(typeof e.page_id!="string"||typeof e.enabled!="boolean")throw new g(400,`${n} names a page and whether it is enabled.`);return{op:i,page_id:e.page_id,enabled:e.enabled};case"set_value":if(!("value"in e))throw new g(400,`${n} carries its value.`);return{op:i,home:c(),path:l(),value:e.value};case"add_row":if(typeof e.temp_id!="string"||e.temp_id===""||e.temp_id.length>200)throw new g(400,`${n} carries its row's temp id.`);return{op:i,home:c(),path:l(),temp_id:e.temp_id,...e.value===void 0?{}:{value:e.value}};case"remove_row":case"clear_media":return{op:i,home:c(),path:l()};case"commit_media":if(typeof e.media_id!="string"||e.media_id==="")throw new g(400,`${n} names the staged media it commits.`);return{op:i,home:c(),path:l(),media_id:e.media_id};case"adopt_media":if(typeof e.instance_id!="string"||typeof e.slot!="string")throw new g(400,`${n} names a section instance and a slot.`);if(typeof e.media_id!="string"||e.media_id===""||typeof e.row_id!="string"||e.row_id==="")throw new g(400,`${n} names the slot's media and the row it adopts it onto.`);return{op:i,instance_id:e.instance_id,slot:e.slot,media_id:e.media_id,row_id:e.row_id};case"pick":case"unpick":if(typeof e.id!="string"||e.id==="")throw new g(400,`${n} names what it picks.`);return{op:i,path:l(),id:e.id};case"order":if(!Array.isArray(e.ids)||!e.ids.every(d=>typeof d=="string"&&d!==""))throw new g(400,`${n}'s ids are the list's item ids.`);return{op:i,home:c(),path:l(),ids:e.ids};case"set_list":return{op:i,home:c(),path:l(),list:VN(e.list,`${n}'s list`)}}}function VN(e,t){if(wt(e)&&e.kind==="picks"&&Array.isArray(e.media_ids)&&e.media_ids.every(r=>typeof r=="string"))return{kind:"picks",media_ids:e.media_ids};if(wt(e)&&e.kind==="items"&&Array.isArray(e.items))return{kind:"items",items:e.items.map(o=>{if(!wt(o)||!(o.id===null||typeof o.id=="string")||!wt(o.fields))throw new g(400,`${t}'s items are each an id (or null) and fields.`);return{id:o.id,fields:o.fields}})};throw new g(400,`${t} is picks or items.`)}function GO(e,t){if(!wt(e))throw new g(400,`${t} is no override target.`);switch(e.kind){case"scalar":case"order":return{kind:e.kind};case"item":if(typeof e.item_id!="string"||typeof e.field!="string")throw new g(400,`${t} names an item and its field.`);return{kind:"item",item_id:e.item_id,field:e.field};case"item_removed":if(typeof e.item_id!="string")throw new g(400,`${t} names the removed item.`);return{kind:"item_removed",item_id:e.item_id};default:throw new g(400,`${t} is no override target.`)}}function YO(e,t,r){let o=e.instances.find(i=>i.instanceId===t);if(o===void 0)throw new g(422,`The composition places no instance "${t}".`);let n=ui(o.sectionSchema.slots,r);if(n===void 0)throw new g(422,`Section "${o.section}" declares no slot "${r}".`);return n}function ze(e){return`${JSON.stringify(e,null,2)}
74
+ `}async function at(e,t){let r=await e.readText(t);if(r===null)throw new g(409,`"${t}" is gone; reload the playground.`);let o;try{o=JSON.parse(r)}catch(n){throw new g(409,`"${t}" does not parse as JSON (${n instanceof Error?n.message:String(n)}); fix the file, then edit again.`)}if(!wt(o))throw new g(409,`"${t}" is not a JSON object; fix the file, then edit again.`);return{doc:o}}var HN=new Set([...QO.content.ops,"set_slot","relink_slot"]),BN=e=>!HN.has(e.op);async function tR(e){let{template:t,property:r,store:o,ops:n}=e,i=d=>{if(e.fixture===void 0)throw new g(400,`This save ${d}, so it names the content fixture it saves into.`);return e.fixture},s=[],a=[...n],c=new Map,l=null;if(n.some(BN)){a=[];let{doc:d}=await at(o,r.property),f=n;n.some(P=>P.op==="adopt_media")&&i("adopts a file a slot owns");let p=e.fixture!==void 0&&n.some(P=>P.op==="commit_media"||P.op==="adopt_media")?await TO(e.fixture,o,d,f):null,m=n.some(P=>P.op==="commit_media")?await DO(o,r.property,d,f):new Map,_={staged:new Map([...m,...p?.staged??[]]),adoptedMember:(P,N)=>RO(t,{instance:P,slot:N})},O=QI(r,d,n,P=>a.push(P),_);c=O.rowIds;let H=ze(O.property);H!==ze(d)&&s.push({path:r.property,text:H});let F=p===null?new Set:new Set([...O.committed].filter(P=>p.staged.has(P)));if(p!==null&&F.size>0){let P=p.settle(F);s.push(...P.moves),l={before:p.doc,after:P.doc}}s.push(...uO(r.property,d,O.property))}let u=a.map(d=>d.op==="set_slot"?{...d,value:KO(YO(t,d.section_instance_id,d.slot_id),d.value)}:(d.op==="relink_slot"&&YO(t,d.section_instance_id,d.slot_id),d));if(u.length>0||l!==null){let d=i("relinks or sets a slot"),f=l?.before??(await at(o,d.file)).doc,p=l?.after??f,{doc:m,removed:S}=u.length===0?{doc:p,removed:[]}:zO(d.file,f,JN(t,p,u)),_=ze(m);_!==ze(f)&&s.unshift({path:d.file,text:_},...S)}return{writes:s,rowIds:c}}function JN(e,t,r){let o=wt(t.content)?t.content:{},n=e.instances.map(({instanceId:u})=>{let d=wt(o[u])?o[u]:{},f=typeof d.enabled=="boolean"?d.enabled:void 0,p=typeof d.variant=="string"?d.variant:void 0;return{instance_id:u,enabled:f??!0,slots:wt(d.slots)?d.slots:{},...wt(d.slot_overrides)?{slot_overrides:d.slot_overrides}:{},...p===void 0?{}:{variant:p},...f===void 0&&p===void 0?{}:{display_overrides:{...f===void 0?{}:{visibility:!0},...p===void 0?{}:{variant:!0}}}}}),i=Array.isArray(t.page_state)?t.page_state:void 0,s;try{s=WI({instances:n,...i===void 0?{}:{page_state:i}},r,{composition:WN(e),declaredVariants:new Map(e.instances.flatMap(u=>u.display.variant===null?[]:[[u.instanceId,u.display.variant]])),listsOfObjects:new Map(e.instances.map(u=>[u.instanceId,KN(u.sectionSchema.slots)]))})}catch(u){throw u instanceof Ia?new g(422,u.message):u}let a=new Set(r.flatMap(u=>"section_instance_id"in u?[u.section_instance_id]:[])),c={};for(let u of s.instances){if(!a.has(u.instance_id)){o[u.instance_id]!==void 0&&(c[u.instance_id]=o[u.instance_id]);continue}let d=e.instances.find(S=>S.instanceId===u.instance_id),{slots:f,slot_overrides:p}=qO(d.sectionSchema.slots,u.slots,u.slot_overrides),m={...Object.keys(f).length===0?{}:{slots:f},...p===void 0?{}:{slot_overrides:p},...u.display_overrides?.visibility===!0?{enabled:u.enabled}:{},...u.display_overrides?.variant===!0&&u.variant!==void 0?{variant:u.variant}:{}};Object.keys(m).length>0&&(c[u.instance_id]=XO(o[u.instance_id],m))}let l={...t};return Object.keys(c).length===0?delete l.content:l.content=XO(o,c),s.page_state!==void 0&&s.page_state.length>0&&(l.page_state=s.page_state),l}function WN(e){let t=new Map(e.instances.map(r=>[r.instanceId,r.display.required]));return{pages:e.pages.map(r=>({id:r.id,optional:r.optional===!0,sections:r.sections.map(o=>({instance_id:o.instanceId,required:t.get(o.instanceId)===!0}))}))}}function KN(e){let t=new Set;for(let[r,o]of Object.entries(e)){let{type:n,element:i}=o;n==="list"&&(i?.type==="object"||i?.type==="row")&&t.add(r)}return t}function XO(e,t){if(!wt(e))return t;let r={};for(let o of Object.keys(e))o in t&&(r[o]=t[o]);for(let[o,n]of Object.entries(t))o in r||(r[o]=n);return r}var Ju=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),qN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,GN=["file","poster","preview"],YN="property.json",XN={listing_intent:null,description:null};function rR(e){return{list:async t=>(await e.list(t)).map(r=>r.path),readBytes:async t=>(await e.readBytes(t))?.bytes??null}}function oR(e){let t;try{t=JSON.parse(e)}catch(i){throw new g(400,`request body is not JSON: ${i instanceof Error?i.message:String(i)}`)}if(!Ju(t))throw new g(400,"A fixture operation is a JSON object.");let{op:r,kind:o,name:n}=t;if(r!=="new"&&r!=="rename"&&r!=="duplicate"&&r!=="delete")throw new g(400,`A fixture operation's op is "new", "rename", "duplicate" or "delete".`);if(o!=="property"&&o!=="content")throw new g(400,`A fixture operation's kind is "property" or "content".`);if(typeof n!="string")throw new g(400,"A fixture operation names the fixture.");if(r==="new"){if(o==="property")return{op:r,kind:o,name:n};if(typeof t.property!="string")throw new g(400,"A new content fixture names the property it is on.");return{op:r,kind:o,name:n,property:t.property}}if(r==="delete")return{op:r,kind:o,name:n};if(typeof t.to!="string")throw new g(400,`A ${r} names the new name, as "to".`);return{op:r,kind:o,name:n,to:t.to}}var Tn=e=>e.slice(0,e.lastIndexOf("/")+1),Wu=e=>e.replace(/\/$/,"");async function iR(e,t,r){if(e===null)throw new g(409,"This template names no fixture list, so it has no fixtures to change; name one in template.ts.");let o=await QN(e,t),{op:n,kind:i,name:s}=r;if(r.op==="new")return nR(o,i,s),r.kind==="property"?tU(o,s):nU(o,s,r.property);if(n==="delete")return i==="property"?cU(o,s):aU(o,s);let a=r.to;return nR(o,i,a),n==="rename"?i==="property"?oU(o,s,a):rU(o,s,a):i==="property"?sU(o,s,a):iU(o,s,a)}async function QN(e,t){let r=await t.readText(e);if(r===null)throw new g(409,`The fixture list "${e}" is gone; reload the playground.`);let o;try{o=JSON.parse(r)}catch(i){throw new g(409,`The fixture list "${e}" does not parse as JSON (${i instanceof Error?i.message:String(i)}); fix it, then try again.`)}if(!Ju(o)||!Array.isArray(o.properties)||!Array.isArray(o.fixtures))throw new g(409,`The fixture list "${e}" does not list properties and fixtures; fix it, then try again.`);let n=await VI(i=>t.readText(i),e);return{reads:t,list:{path:e,doc:o,properties:o.properties,fixtures:o.fixtures},listing:n,units:HI(n)}}var eU={property:"property",content:"content fixture"};function nR({listing:e},t,r){if(!qN.test(r))throw new g(400,`"${r}" is not a name: a ${eU[t]}'s name is lowercase letters, digits and dashes, as "lake-house" is.`);if(t==="property"){if(e.properties.some(i=>jn(i)===r))throw new g(409,`There is already a property "${r}".`);return}let o=e.fixtures.find(i=>Rn(i)===r);if(o===void 0)return;let n=e.named.get(o);throw new g(409,`There is already a content fixture "${r}"${n===void 0?"":`, on the property "${jn(n)}"`}.`)}async function Wi({reads:e},t,r){for(let o of t)if(await e.readText(o)!==null)throw new g(409,`"${o}" is already there; move it, or choose another name.`);for(let o of r){let n=await e.list(Wu(o));if(n.length>0)throw new g(409,`"${o}" already holds "${n[0]}"; move it, or choose another name.`)}}function Ku({listing:e},t){let r=e.properties.find(o=>jn(o)===t);if(r===void 0)throw new g(404,`There is no property "${t}" (have: ${e.properties.map(jn).join(", ")||"none"}).`);return r}function Kv({listing:e},t){let r=e.fixtures.find(o=>Rn(o)===t);if(r===void 0)throw new g(404,`There is no content fixture "${t}" (have: ${e.fixtures.map(Rn).join(", ")||"none"}).`);return r}var sR=({listing:e},t)=>e.fixtures.filter(r=>e.named.get(r)===t);function aR(e,t){let r=e.listing.named.get(t);if(r===void 0)throw new g(409,`The content fixture "${Rn(t)}" names no property that resolves; fix "${t}", then try again.`);return jn(r)}async function yo({reads:e,units:t},r){let o=(await e.list(Wu(r.folder))).filter(n=>{let i=BI(n,t);return i!==null&&i.kind===r.kind&&i.key===r.key});return r.kind==="fixture"?[r.key,...o]:o}function Ki(e,t){let r=Tn(e.path);if(!t.startsWith(r))throw new g(409,`"${t}" is outside the fixture list's folder, so the list cannot name it.`);return t.slice(r.length)}function ja(e,t,r,o){return t.flatMap(n=>{let i=vt(e.path,n);return!("path"in i)||i.path!==r?[n]:o===null?[]:[o]})}function vr(e,t){return{path:e.path,text:ze({...e.doc,properties:t.properties??e.properties,fixtures:t.fixtures??e.fixtures})}}async function qv({reads:e},t){let r=await e.readText(t);if(r===null)throw new g(409,`"${t}" is gone; reload the playground.`);let o;try{o=JSON.parse(r)}catch(n){throw new g(409,`"${t}" does not parse as JSON (${n instanceof Error?n.message:String(n)}); fix the file, then try again.`)}if(!Ju(o))throw new g(409,`"${t}" is not a JSON object; fix the file, then try again.`);return o}function cR(e,t,r,o){if(!Array.isArray(e.files))return e;let n=Tn(t),i=e.files.map(s=>{if(!Ju(s))return s;let a={...s};for(let c of GN){let l=vt(t,s[c]);"path"in l&&l.path.startsWith(r)&&(a[c]=`${o}${l.path.slice(r.length)}`.slice(n.length))}return a});return{...e,files:i}}function lR(e,t){let r=Tn(e);if(!t.startsWith(r))throw new g(409,`"${t}" is not inside the folder of "${e}", so the content fixture cannot name it.`);return t.slice(r.length)}var uR=(e,t,r)=>e.map(o=>({path:`${r}${o.slice(t.length)}`,from:o}));async function dR({reads:e},t,r,o){let n=[];for(let i of t){let s=await e.readBytes(i);if(s===null)throw new g(409,`"${i}" is gone; reload the playground.`);n.push({path:`${o}${i.slice(r.length)}`,bytes:s})}return n}var fR=e=>e.map(t=>({path:t,remove:!0}));async function tU(e,t){let r=`${Tn(e.list.path)}properties/${t}/`,o=`${r}${YN}`;return await Wi(e,[],[r]),{writes:[{path:o,text:ze(XN)},vr(e.list,{properties:[...e.list.properties,Ki(e.list,o)]})],at:{property:t}}}async function nU(e,t,r){let o=Ku(e,r),n=`${Tn(e.list.path)}${t}.json`,i=Pn(n).folder;return await Wi(e,[n],[i]),{writes:[{path:n,text:ze({property:lR(n,o)})},vr(e.list,{fixtures:[...e.list.fixtures,Ki(e.list,n)]})],at:{property:r,content:t}}}async function rU(e,t,r){let o=Kv(e,t),n=Pn(o),i=`${Tn(o)}${r}.json`,s=Pn(i).folder;await Wi(e,[i],[s]);let a=cR(await qv(e,o),o,n.folder,s),c=(await yo(e,n)).filter(l=>l!==o);return{writes:[{path:i,text:ze(a)},...uR(c,n.folder,s),{path:o,remove:!0},vr(e.list,{fixtures:ja(e.list,e.list.fixtures,o,Ki(e.list,i))})],at:{property:aR(e,o),content:r}}}async function oU(e,t,r){let o=Ku(e,t),n=ka(o),i=`${Tn(Wu(n.folder))}${r}/`,s=`${i}${o.slice(n.folder.length)}`;await Wi(e,[],[i]);let a=[];for(let c of sR(e,o)){let l=await qv(e,c);a.push({path:c,text:ze({...l,property:lR(c,s)})})}return{writes:[...uR(await yo(e,n),n.folder,i),...a,vr(e.list,{properties:ja(e.list,e.list.properties,o,Ki(e.list,s))})],at:{property:r}}}async function iU(e,t,r){let o=Kv(e,t),n=Pn(o),i=`${Tn(o)}${r}.json`,s=Pn(i).folder;await Wi(e,[i],[s]);let a=cR(await qv(e,o),o,n.folder,s),c=(await yo(e,n)).filter(l=>l!==o);return{writes:[{path:i,text:ze(a)},...await dR(e,c,n.folder,s),vr(e.list,{fixtures:[...e.list.fixtures,Ki(e.list,i)]})],at:{property:aR(e,o),content:r}}}async function sU(e,t,r){let o=Ku(e,t),n=ka(o),i=`${Tn(Wu(n.folder))}${r}/`,s=`${i}${o.slice(n.folder.length)}`;return await Wi(e,[],[i]),{writes:[...await dR(e,await yo(e,n),n.folder,i),vr(e.list,{properties:[...e.list.properties,Ki(e.list,s)]})],at:{property:r}}}async function aU(e,t){let r=Kv(e,t),o=e.listing.named.get(r);return{writes:[...fR(await yo(e,Pn(r))),vr(e.list,{fixtures:ja(e.list,e.list.fixtures,r,null)})],at:o===void 0?null:{property:jn(o)}}}async function cU(e,t){let r=Ku(e,t),o=sR(e,r),n=await yo(e,ka(r));for(let s of o)n.push(...await yo(e,Pn(s)));let i=e.list.fixtures;for(let s of o)i=ja(e.list,i,s,null);return{writes:[...fR(n),vr(e.list,{properties:ja(e.list,e.list.properties,r,null),fixtures:i})],at:null}}var lU=/^(\d+(?:\.\d+)?)(in|mm)$/;function Gv(e){let t=lU.exec(e),[,r,o]=t??[];if(r===void 0||o===void 0)throw new Error(`malformed physical length: "${e}"`);let n=Number.parseFloat(r);return o==="mm"?n/25.4:n}function Pa(e){if(typeof e.width=="number"&&typeof e.height=="number")return{frameWidth:e.width,frameHeight:e.height,bleed:0,viewportWidth:e.width,viewportHeight:e.height,deviceScaleFactor:1,pixelWidth:e.width,pixelHeight:e.height,pointWidth:e.width/96*72,pointHeight:e.height/96*72,bleedPoints:0};let t=e,r=Gv(t.width),o=Gv(t.height),n=t.bleed===void 0?0:Gv(t.bleed),i=r*96,s=o*96,a=n*96,c=i+2*a,l=s+2*a,u=t.dpi/96;return{frameWidth:i,frameHeight:s,bleed:a,viewportWidth:c,viewportHeight:l,deviceScaleFactor:u,pixelWidth:Math.round(c*u),pixelHeight:Math.round(l*u),pointWidth:(r+2*n)*72,pointHeight:(o+2*n)*72,bleedPoints:n*72}}var qi="concrete-frame";function Ea(e){let t=Pa(e);return{"--frame-w":`${t.frameWidth}px`,"--frame-h":`${t.frameHeight}px`,"--frame-bleed":`${t.bleed}px`}}var dU={"image/png":"png","application/pdf":"pdf","application/zip":"zip"},fU=/[/\\:*?"<>|\x00-\x1f\x7f]/g;function pU(e){return e.replace(fU," ").replace(/\s+/g," ").trim()}function Ta(e){let t=[e.propertyAddress,e.templateDisplayName,e.pageLabel].map(r=>pU(r??"")).filter(r=>r.length>0).join(" - ");return t.length>0?t:"download"}function Gi(e){return`${Ta(e)}.${dU[e.mime]}`}var mU=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),qu=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function pR(e){let t=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),r=e.length,o=new Uint8Array(r+9+63>>>6<<6);o.set(e),o[r]=128;let n=new DataView(o.buffer),i=r*8;n.setUint32(o.length-8,Math.floor(i/4294967296)),n.setUint32(o.length-4,i>>>0);let s=new Uint32Array(64);for(let c=0;c<o.length;c+=64){for(let O=0;O<16;O++)s[O]=n.getUint32(c+O*4);for(let O=16;O<64;O++){let H=s[O-15],F=s[O-2],P=(H>>>7|H<<25)^(H>>>18|H<<14)^H>>>3,N=(F>>>17|F<<15)^(F>>>19|F<<13)^F>>>10;s[O]=N+s[O-7]+P+s[O-16]|0}let l=t[0],u=t[1],d=t[2],f=t[3],p=t[4],m=t[5],S=t[6],_=t[7];for(let O=0;O<64;O++){let H=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7),F=p&m^~p&S,P=_+H+F+mU[O]+s[O]|0,N=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),Q=l&u^l&d^u&d,J=N+Q|0;_=S,S=m,m=p,p=f+P|0,f=d,d=u,u=l,l=P+J|0}t[0]=t[0]+l|0,t[1]=t[1]+u|0,t[2]=t[2]+d|0,t[3]=t[3]+f|0,t[4]=t[4]+p|0,t[5]=t[5]+m|0,t[6]=t[6]+S|0,t[7]=t[7]+_|0}let a="";for(let c=0;c<8;c++){let l=t[c];a+=qu[l>>>24]+qu[l>>>16&255]+qu[l>>>8&255]+qu[l&255]}return a}var mR="probe";var gU={id:"website",label:nk.website,category:"website"};function Yv(e){let t=new Map(e.instances.map(r=>[r.instanceId,r.display.required]));return{output:e.output,pages:e.pages.map(r=>({id:r.id,label:r.label,...r.path===void 0?{}:{path:r.path},...r.direction===void 0?{}:{direction:r.direction},...r.optional===void 0?{}:{optional:r.optional},sections:r.sections.map(o=>({section:o.section,instance_id:o.instanceId,required:t.get(o.instanceId)===!0}))})),canvases:e.canvases}}function gR(e,t){if(e.output==="website")return xu(gU);let r=t===null?e.formats[0]:e.formats.find(o=>o.id===t);if(r===void 0)throw new g(404,`The template declares no format "${t??""}" (have: ${e.formats.map(o=>o.id).join(", ")}).`);return xu(r)}function Gu(e){let t=Object.entries(e.pages??{}).map(([r,o])=>({page_id:r,enabled:o.enabled}));return{instances:e.instances,...t.length===0?{}:{page_state:t}}}function hR(e,t,r){return{id:t.id,property_id:t.id,type:e.output,state:"active",format_id:r.id,site_slug:null,content_doc:{...Gu(t)},created_at:new Date(0).toISOString(),published_at:null,published_domain:null,has_outstanding_changes:!1,outstanding_change_reason:null}}function Xv(e){let t=new Map;for(let r of e.instances)if(!t.has(r.section)){if(r.version===void 0)throw new g(501,`The section "${r.section}" has no published shape here, so this playground opens no editor over it. Run \`concrete check\` for the reason.`);t.set(r.section,{instance:r,version:r.version})}return t}function yR(e,t,r){return{section_key:e,section_display_name:t.label,render_key:e,schema:{...r.schema},fill_spec:{...r.fillSpec}}}function vR(e){let t=new Map,r=new Map;for(let[n,{version:i}]of Xv(e))t.set(n,ek(i.schema,i.fillSpec)),r.set(n,{schema:i.schema});let o=Yv(e);return{composition:o,readGraph:Wl(o.pages,t),sections:r}}function bR(e){return Su(e.key,vR(e))}function wR(e,t){return bv(t.id,vR(e),Gu(t))}function Yu(e,t){return e.pages?.[t]?.enabled!==!1}function vo(e,t){return t.filter(r=>Yu(e,r.id))}function xR(e,t,r){let{template:o}=e,n=vo(r,o.pages);if(o.output==="website"){let l=n.map(u=>({page:u.id,path:u.path??"/"}));return{canvas:o.canvases.map(u=>({canvas:u.id,href:he.canvas(t,r.id,u.id,null)})),live:l.map(({page:u,path:d})=>({page:u,href:he.live(t,r.id,d)})),site:l.map(({page:u,path:d})=>({page:u,href:he.site(t,r.id,d)}))}}let i=o.canvases.flatMap(l=>o.formats.map(u=>({canvas:l.id,format:u.id,href:he.canvas(t,r.id,l.id,u.id)})));if(!(e.downloads==="made"||e.downloads==="shipped"&&r.capturable!==!1)||n.length===0)return{canvas:i};let a=e.downloads==="made"||o.output==="image",c=o.formats.map(l=>({format:l.id,href:he.download(t,r.id,{format:l.id}),pages:a?n.map(u=>({page:u.id,href:he.download(t,r.id,{format:l.id,page:u.id})})):[]}));return{canvas:i,download:c}}function hU(e){return typeof e=="string"&&e!==""?e:null}function yU(e){return{listingIntent:hU(e.listing_intent),units:e.units.length,photos:Fr(e,{kinds:["image"],from:["property.property_media"]}).length}}function vU(e){let t=JSON.stringify(e),r=3735928559,o=1103547991;for(let n=0;n<t.length;n++){let i=t.charCodeAt(n);r=Math.imul(r^i,2654435761),o=Math.imul(o^i,1597334677)}return r=Math.imul(r^r>>>16,2246822507)^Math.imul(o^o>>>13,3266489909),o=Math.imul(o^o>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),(4294967296*(2097151&o)+(r>>>0)).toString(16).padStart(14,"0")}function Qv(e,t,r){let o=Object.entries(r.pages??{}).flatMap(([n,i])=>i.enabled?[]:[n]);return{name:r.id,doc:vU(r.instances),...r.capturable===!1?{capturable:!1}:{},...o.length>0?{pagesOff:o}:{},addresses:xR(e,t,r)}}function eb(e,t){return e.fixtures.filter(r=>r.property===t.file)}function Aa(e,t,r){return{name:r.name,summary:yU(r.facts),content:eb(t,r).map(o=>Qv(e,r.name,o))}}var _R=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function tb(e){return"error"in e}function $R(e){let t=e("x-site-id"),r=e("x-timestamp"),o=e("x-signature"),n=e("idempotency-key");return!t||!_R.test(t)?{status:401,error:"unauthorized"}:!r||!o?{status:401,error:"unauthorized"}:!n||!_R.test(n)?{status:400,error:"idempotency_key_required"}:{siteId:t,timestamp:r,signature:o,idempotencyKey:n}}function kR(e){return e.length>16384?{status:413,error:"too_large"}:null}function SR(e,t){let r=Number(e);return Number.isFinite(r)&&Math.abs(t-r)<=300}function IR(e){let t;try{t=JSON.parse(e)}catch{return{status:400,error:"invalid_body"}}let r=t&&typeof t=="object"?t:{},o=r.fields;if(!o||typeof o!="object"||Array.isArray(o))return{status:400,error:"invalid_body"};let n=o.email,i=typeof n=="string"?n.trim():"";if(!i)return{status:400,error:"invalid_body"};let s=typeof r.source_url=="string"?r.source_url.slice(0,2048):null;return{fields:o,email:i,sourceUrl:s}}var Xu={siteId:"00000000-0000-4000-8000-00000000c0de",siteSecret:"706c617967726f756e642d6c6561642d666f726d2d6e6f7468696e672d6b657074"};function bo(e,t){return new Response(JSON.stringify(t),{status:e,headers:{"content-type":"application/json; charset=utf-8"}})}function bU(e){let t=new Uint8Array(new ArrayBuffer(e.length/2));for(let r=0;r<t.length;r++)t[r]=parseInt(e.slice(r*2,r*2+2),16);return t}async function wU(e){let t=await crypto.subtle.importKey("raw",bU(Xu.siteSecret),{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return[...new Uint8Array(await crypto.subtle.sign("HMAC",t,new TextEncoder().encode(e)))].map(o=>o.toString(16).padStart(2,"0")).join("")}async function OR(e,t=Math.floor(Date.now()/1e3)){if(e.method!=="POST")return bo(405,{error:"method_not_allowed"});let r=$R(s=>e.headers.get(s));if(tb(r))return bo(r.status,{error:r.error});let o=await e.text(),n=kR(o);if(n!==null)return bo(n.status,{error:n.error});if(r.siteId!==Xu.siteId||!SR(r.timestamp,t))return bo(401,{error:"unauthorized"});if(r.signature.toLowerCase()!==await wU(`${r.timestamp}.${o}`))return bo(401,{error:"unauthorized"});let i=IR(o);return tb(i)?bo(i.status,{error:i.error}):bo(200,{ok:!0})}var RR=155;function jR(e){let t=e&&typeof e=="object"?e:{},o=(t.site_meta&&typeof t.site_meta=="object"?t.site_meta:{}).description;return typeof o=="string"&&o.trim()?o.trim():null}function PR(e){let t=e?.address.street?.trim()??"",r=e?.address.display?.trim()??"",o=e?.address.unit?.trim()??"",n=e?.description?.trim()?e.description:null,i=t||r;return{streetAddress:i,titleAddress:o&&t?`${t}, ${o}`:i,displayAddress:r||t,description:n}}function nb(e,t){let{streetAddress:r,titleAddress:o,displayAddress:n,description:i}=PR(e);return{streetAddress:r,titleAddress:o,displayAddress:n,description:jR(t)??i,coverMediaId:zt(e?.hero)??null}}function ER(e,t){let r=e.trim();if(r.length<=t)return r;let o=r.slice(0,t-1),n=o.lastIndexOf(" ");return`${(n>0?o.slice(0,n):o).trimEnd()}\u2026`}function rb(e){let t=e.titleAddress||e.streetAddress||e.displayAddress||e.fallbackTitle,r=e.description&&e.description.trim()?e.description:e.displayAddress||t;return{siteTitle:t,orgName:e.orgName,description:ER(r,RR),siteName:e.orgName??"HomePages"}}function ob(e,t){return[e.siteTitle,t.href==="/"?null:t.label,e.orgName].filter(r=>!!r).join(" - ")}var Qu="data-tr-island",TR="__trCaptureHolds";var sb=`(function () {
2
75
  function CaptureIntersectionObserver(callback, options) {
3
76
  var opts = options || {};
4
77
  this.root = opts.root || null;
@@ -46,34 +119,34 @@ var us=/^(\d+(?:\.\d+)?)(in|mm)$/;function yn(e){let t=us.exec(e),[,n,r]=t??[];i
46
119
  return entries;
47
120
  };
48
121
  window.IntersectionObserver = CaptureIntersectionObserver;
49
- })();`,ps=`!!document.querySelector("[${$t}]")`,gn="__trIslandsReady",ms=`(async () => {
50
- const ready = window.${gn};
122
+ })();`,xU=`!!document.querySelector("[${Qu}]")`,ib="__trIslandsReady",_U=`(async () => {
123
+ const ready = window.${ib};
51
124
  if (ready === undefined) {
52
125
  throw new Error(
53
126
  "capture blocked: the page ships island markers but its host published no " +
54
- "window.${gn} \u2014 the island runtime never ran",
127
+ "window.${ib} \u2014 the island runtime never ran",
55
128
  );
56
129
  }
57
130
  await ready;
58
- })()`,Cd=`(() => {
59
- const holds = window.${Ur};
131
+ })()`,Iq=`(() => {
132
+ const holds = window.${TR};
60
133
  const keys = [...new Set(Array.from(
61
- document.querySelectorAll("[${$t}]"),
62
- (el) => el.getAttribute("${$t}"),
134
+ document.querySelectorAll("[${Qu}]"),
135
+ (el) => el.getAttribute("${Qu}"),
63
136
  ))];
64
137
  return JSON.stringify({ openHolds: holds ? holds.size : 0, islands: keys });
65
- })()`;var Kr=400;var hs=`(async () => {
138
+ })()`;var AR=400;var $U=`(async () => {
66
139
  await new Promise((resolve) => {
67
- setTimeout(resolve, ${Kr});
140
+ setTimeout(resolve, ${AR});
68
141
  });
69
142
  await new Promise((resolve) => {
70
143
  requestAnimationFrame(() => resolve(undefined));
71
144
  });
72
- })()`,qr=5,ys=`(async () => {
145
+ })()`,zR=5,kU=`(async () => {
73
146
  const frame = () => new Promise((resolve) => {
74
147
  requestAnimationFrame(() => resolve(undefined));
75
148
  });
76
- for (let pass = 0; pass < ${qr}; pass += 1) {
149
+ for (let pass = 0; pass < ${zR}; pass += 1) {
77
150
  const running = document.getAnimations().filter((animation) => {
78
151
  if (animation.playState === "finished" || animation.playState === "idle") return false;
79
152
  const timing = animation.effect && animation.effect.getComputedTiming();
@@ -90,71 +163,49 @@ var us=/^(\d+(?:\.\d+)?)(in|mm)$/;function yn(e){let t=us.exec(e),[,n,r]=t??[];i
90
163
  await frame();
91
164
  }
92
165
  await frame();
93
- })()`;function _(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function ce(e){return JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026")}function Vr(e,t="column"){return Et(e.id,{...Ze(e)},t)}function Et(e,t,n="column"){let r=Object.entries(t).map(([o,i])=>`${o}:${i}`).join(";");return{class:Ce,dataFormat:e,style:r,...n==="row"?{dataDirection:"row"}:{}}}function It(e,t,n="column"){let r=Vr(e,n),o=r.dataDirection===void 0?"":`data-direction="${r.dataDirection}" `;return`<div class="${_(r.class)}" data-format="${_(r.dataFormat)}" ${o}style="${_(r.style)}">${t.join("")}</div>`}function De(e){switch(e.destination){case"published":return gs(e);case"artifact":return bs(e);case"preview":return ws(e);case"canvas":return ks(e)}}function Br(e){return e.kind==="none"||Object.keys(e.islandMap).length===0?[]:[`<script>${bn}</script>`]}var Wr="html, body { margin: 0; padding: 0; }";function zr(e){let t=[`rel="${e.rel}"`,`href="${_(e.href)}"`];return e.sizes!==void 0&&t.push(`sizes="${_(e.sizes)}"`),e.type!==void 0&&t.push(`type="${_(e.type)}"`),`<link ${t.join(" ")} />`}function gs(e){let{meta:t}=e,n=['<meta charset="utf-8" />','<meta name="viewport" content="width=device-width, initial-scale=1" />',`<title>${_(t.title)}</title>`,`<meta name="description" content="${_(t.description)}" />`];t.canonical&&n.push(`<link rel="canonical" href="${_(t.canonical)}" />`);for(let o of t.icons??[])n.push(zr(o));n.push('<meta property="og:type" content="website" />'),t.siteName&&n.push(`<meta property="og:site_name" content="${_(t.siteName)}" />`),n.push(`<meta property="og:title" content="${_(t.title)}" />`),n.push(`<meta property="og:description" content="${_(t.description)}" />`),t.ogUrl&&n.push(`<meta property="og:url" content="${_(t.ogUrl)}" />`),t.ogImage&&(n.push(`<meta property="og:image" content="${_(t.ogImage)}" />`),t.ogImageWidth&&n.push(`<meta property="og:image:width" content="${t.ogImageWidth}" />`),t.ogImageHeight&&n.push(`<meta property="og:image:height" content="${t.ogImageHeight}" />`),t.ogImageType&&n.push(`<meta property="og:image:type" content="${_(t.ogImageType)}" />`),t.ogImageAlt&&n.push(`<meta property="og:image:alt" content="${_(t.ogImageAlt)}" />`),n.push('<meta name="twitter:card" content="summary_large_image" />'),n.push(`<meta name="twitter:title" content="${_(t.title)}" />`),n.push(`<meta name="twitter:description" content="${_(t.description)}" />`),n.push(`<meta name="twitter:image" content="${_(t.ogImage)}" />`)),n.push(...kn(e.stylesheets)),n.push(...xn(e.islands)),e.prefetchUrls&&e.prefetchUrls.length>0&&n.push(`<script type="speculationrules">${ce({prefetch:[{source:"list",urls:[...e.prefetchUrls]}]})}</script>`);let r=e.siteConfig?`
94
- <script type="application/json" id="concrete-site-config">${ce(e.siteConfig)}</script>`:"";return wn({lang:t.lang??"en",head:n,body:` <body class="concrete-root">
95
- ${e.root.bodyHtml}${r}${vn(e.islands,"viewport")}
96
- <script type="module" src="${_(e.analyticsJs.url)}"></script>
97
- </body>`})}function bs(e){let t=['<meta charset="utf-8" />'];e.title!==void 0&&t.push(`<title>${_(e.title)}</title>`),t.push(...kn(e.stylesheets));let n=[Wr,...Rs(e.root)];return t.push(Gr(n)),t.push(...Br(e.islands)),t.push(...xn(e.islands)),wn({lang:"en",head:t,body:` <body>${Ss(e.root)}${vn(e.islands,"eager")}</body>`})}function ws(e){let t=['<meta charset="utf-8" />','<meta name="viewport" content="width=device-width, initial-scale=1" />',`<title>${_(e.title)}</title>`,...e.icon===void 0?[]:[zr({rel:"icon",href:e.icon})],...kn(e.stylesheets),Gr([Wr,...e.extraCss??[]]),...e.capture===!0?Br(e.islands):[],...xn(e.islands)],n=(e.devScripts??[]).map(r=>`
98
- ${r}`).join("");return wn({lang:"en",head:t,body:` <body>
99
- ${e.root.bodyHtml}${vn(e.islands,e.capture===!0?"eager":"viewport")}${n}
100
- </body>`})}function ks(e){let t=e.stylesheets.hrefs.map(n=>`<link rel="stylesheet" href="${_(n)}">`).join("");return`<!doctype html>
166
+ })()`;function me(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function br(e){return JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026")}function FR(e,t="column"){return ed(e.id,{...Ea(e)},t)}function ed(e,t,r="column"){let o=Object.entries(t).map(([n,i])=>`${n}:${i}`).join(";");return{class:qi,dataFormat:e,style:o,...r==="row"?{dataDirection:"row"}:{}}}function td(e,t,r="column"){let o=FR(e,r),n=o.dataDirection===void 0?"":`data-direction="${o.dataDirection}" `;return`<div class="${me(o.class)}" data-format="${me(o.dataFormat)}" ${n}style="${me(o.style)}">${t.join("")}</div>`}function ab(e){switch(e.destination){case"published":return RU(e);case"capture":return jU(e);case"canvas":return PU(e)}}function SU(e){return e.kind==="none"||Object.keys(e.islandMap).length===0?[]:[`<script>${sb}</script>`]}var IU="html, body { margin: 0; padding: 0; }";function OU(e){let t=[`rel="${e.rel}"`,`href="${me(e.href)}"`];return e.sizes!==void 0&&t.push(`sizes="${me(e.sizes)}"`),e.type!==void 0&&t.push(`type="${me(e.type)}"`),`<link ${t.join(" ")} />`}function RU(e){let{meta:t}=e,r=['<meta charset="utf-8" />','<meta name="viewport" content="width=device-width, initial-scale=1" />',`<title>${me(t.title)}</title>`,`<meta name="description" content="${me(t.description)}" />`];t.canonical&&r.push(`<link rel="canonical" href="${me(t.canonical)}" />`);for(let n of t.icons??[])r.push(OU(n));r.push('<meta property="og:type" content="website" />'),t.siteName&&r.push(`<meta property="og:site_name" content="${me(t.siteName)}" />`),r.push(`<meta property="og:title" content="${me(t.title)}" />`),r.push(`<meta property="og:description" content="${me(t.description)}" />`),t.ogUrl&&r.push(`<meta property="og:url" content="${me(t.ogUrl)}" />`),t.ogImage&&(r.push(`<meta property="og:image" content="${me(t.ogImage)}" />`),t.ogImageWidth&&r.push(`<meta property="og:image:width" content="${t.ogImageWidth}" />`),t.ogImageHeight&&r.push(`<meta property="og:image:height" content="${t.ogImageHeight}" />`),t.ogImageType&&r.push(`<meta property="og:image:type" content="${me(t.ogImageType)}" />`),t.ogImageAlt&&r.push(`<meta property="og:image:alt" content="${me(t.ogImageAlt)}" />`),r.push('<meta name="twitter:card" content="summary_large_image" />'),r.push(`<meta name="twitter:title" content="${me(t.title)}" />`),r.push(`<meta name="twitter:description" content="${me(t.description)}" />`),r.push(`<meta name="twitter:image" content="${me(t.ogImage)}" />`)),r.push(...NR(e.stylesheets)),r.push(...UR(e.islands)),e.prefetchUrls&&e.prefetchUrls.length>0&&r.push(`<script type="speculationrules">${br({prefetch:[{source:"list",urls:[...e.prefetchUrls]}]})}</script>`);let o=e.siteConfig?`
167
+ <script type="application/json" id="concrete-site-config">${br(e.siteConfig)}</script>`:"";return DR({lang:t.lang??"en",head:r,body:` <body class="concrete-root">
168
+ ${e.root.bodyHtml}${o}${MR(e.islands,"viewport")}
169
+ `+(e.analyticsJs===void 0?"":` <script type="module" src="${me(e.analyticsJs.url)}"></script>
170
+ `)+" </body>"})}function jU(e){let t=['<meta charset="utf-8" />'];e.title!==void 0&&t.push(`<title>${me(e.title)}</title>`),t.push(...NR(e.stylesheets));let r=[IU,...zU(e.root)];return t.push(FU(r)),t.push(...SU(e.islands)),t.push(...UR(e.islands)),DR({lang:"en",head:t,body:` <body>${AU(e.root)}${MR(e.islands,"eager")}</body>`})}function PU(e){let t=e.stylesheets.hrefs.map(r=>`<link rel="stylesheet" href="${me(r)}">`).join("");return`<!doctype html>
101
171
  <html>
102
172
  <head>
103
173
  <meta charset="utf-8">
104
- <base href="${_(e.base)}">
174
+ <base href="${me(e.base)}">
105
175
  <!-- Cascade-layer order is fixed by FIRST declaration, document-wide. The
106
176
  kernel's document defaults must lose to everything a template declares,
107
177
  so their layer is pre-declared here, before any template stylesheet,
108
178
  pinning it below every layer those go on to declare. -->
109
179
  <style>@layer ${e.defaultsLayer};</style>
110
- ${t}${vs(e.islands)}
180
+ ${t}${TU(e.islands)}
111
181
  <style>${e.frameCss}</style>
112
182
  </head>
113
183
  <body>
114
- <div id="${_(e.root.id)}"${xs(e.root)}></div>
184
+ <div id="${me(e.root.id)}"${EU(e.root)}></div>
115
185
  </body>
116
- </html>`}function xs(e){if(!e.pageBox)return"";let t=Et(e.pageBox.formatId,e.pageBox.tokens,e.pageBox.direction);return` class="${_(t.class)}" data-format="${_(t.dataFormat)}"`+(t.dataDirection===void 0?"":` data-direction="${t.dataDirection}"`)+` style="${_(t.style)}"`}function vs(e){if(e.kind==="none"||Object.keys(e.islandMap).length===0)return"";let t=e.hostScriptSrc?`
117
- <script id="tr-island-host" type="module" src="${_(e.hostScriptSrc)}"></script>`:"";return`${Object.keys(e.importMap).length===0?"":`
118
- <script type="importmap">${ce({imports:e.importMap})}</script>`}
119
- <script>window.__TR_ISLAND_MAP=${ce(e.islandMap)};</script>
186
+ </html>`}function EU(e){if(!e.pageBox)return"";let t=ed(e.pageBox.formatId,e.pageBox.tokens,e.pageBox.direction);return` class="${me(t.class)}" data-format="${me(t.dataFormat)}"`+(t.dataDirection===void 0?"":` data-direction="${t.dataDirection}"`)+` style="${me(t.style)}"`}function TU(e){if(e.kind==="none"||Object.keys(e.islandMap).length===0)return"";let t=e.hostScriptSrc?`
187
+ <script id="tr-island-host" type="module" src="${me(e.hostScriptSrc)}"></script>`:"";return`${Object.keys(e.importMap).length===0?"":`
188
+ <script type="importmap">${br({imports:e.importMap})}</script>`}
189
+ <script>window.__TR_ISLAND_MAP=${br(e.islandMap)};</script>
120
190
  <!-- id is the contract the host's readiness gate keys off \u2014 it waits on THIS
121
191
  element's load event, not a timeout, so a slow cold first load still
122
- activates without a refresh. -->${t}`}function wn(e){let t=e.head.map(n=>` ${n}`).join(`
192
+ activates without a refresh. -->${t}`}function DR(e){let t=e.head.map(r=>` ${r}`).join(`
123
193
  `);return`<!doctype html>
124
- <html lang="${_(e.lang)}">
194
+ <html lang="${me(e.lang)}">
125
195
  <head>
126
196
  ${t}
127
197
  </head>
128
198
  ${e.body}
129
199
  </html>
130
- `}function Ss(e){return e.kind==="frame"?It(e.format,e.sectionHtml,e.direction):e.pages.map(t=>It(e.format,t.sectionHtml,t.direction)).join(`
131
- `)}function Rs(e){return e.kind!=="frameStack"?[]:[`body > .${Ce} { break-after: page; }`,`body > .${Ce}:last-child { break-after: auto; }`]}function kn(e){return e.kind==="links"?e.hrefs.map(t=>`<link rel="stylesheet" href="${_(t)}" />`):e.css.map(t=>`<style>${t}</style>`)}function Gr(e){let[t,...n]=e;return t===void 0?"<style></style>":n.length===0?`<style>${t}</style>`:`<style>${t}
132
- ${n.join(`
200
+ `}function AU(e){return e.kind==="frame"?td(e.format,e.sectionHtml,e.direction):e.pages.map(t=>td(e.format,t.sectionHtml,t.direction)).join(`
201
+ `)}function zU(e){return e.kind!=="frameStack"?[]:[`body > .${qi} { break-after: page; }`,`body > .${qi}:last-child { break-after: auto; }`]}function NR(e){return e.kind==="links"?e.hrefs.map(t=>`<link rel="stylesheet" href="${me(t)}" />`):e.css.map(t=>`<style>${t}</style>`)}function FU(e){let[t,...r]=e;return t===void 0?"<style></style>":r.length===0?`<style>${t}</style>`:`<style>${t}
202
+ ${r.join(`
133
203
  `)}
134
- </style>`}function xn(e){if(e.kind!=="bundles"||Object.keys(e.islandMap).length===0)return[];let t=[`<script type="importmap">${ce({imports:e.reactVendorMap})}</script>`];for(let n of[e.runtime.url,...Object.values(e.reactVendorMap),e.reactVendorCore.url])t.push(`<link rel="modulepreload" href="${_(n)}" />`);return t}function vn(e,t){if(e.kind==="none"||Object.keys(e.islandMap).length===0)return"";let n=ce(e.islandMap),r=t==="eager"?' window.__TR_ISLAND_SCHEDULE = "eager";':"";return e.kind==="bundles"?`
135
- <script>window.__TR_ISLAND_MAP=${n};${r}</script>
136
- <script type="module" src="${_(e.runtime.url)}"></script>`:`
137
- ${Os}
138
- <script>window.__TR_ISLAND_MAP = ${n};${r}</script>
139
- <script type="module" src="${_(e.bootstrapUrl)}"></script>`}var Os=`<script type="module">
140
- import RefreshRuntime from "/@react-refresh";
141
- RefreshRuntime.injectIntoGlobalHook(window);
142
- window.$RefreshReg$ = () => {};
143
- window.$RefreshSig$ = () => (type) => type;
144
- window.__vite_plugin_react_preamble_installed__ = true;
145
- </script>`;function Yr(){let e={};return new Proxy(e,{get:(t,n)=>typeof n!="string"||n in e||n==="then"||n==="toJSON"?e[n]:`#${n}`})}function Jr(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e))o!=null&&o!==""&&t.set(r,o);let n=t.toString();return n===""?"":`?${n}`}var Se={catalog:"api/catalog",render:"api/render",media:e=>`api/media${Jr({fixture:e})}`,capture:(e,t)=>`api/capture/${e}${Jr({fixture:t.fixture,format:t.format,page:t.page,canvas:t.canvas})}`,live:(e,t)=>`fixtures/${encodeURIComponent(e)}/live${t==="/"?"/":`${t}/`}`,hmr:"__hmr"};var _s=["text","number","select","image","list","poi","url","date","email","phone","address","video","tour","document","media"],$s=[],ac=[..._s,...$s];var Sn=["id","slot","index","def","value","present","enclosing"],At=["image","video","tour","document"];function C(e){return At.includes(e)}var Le={cutout:{label:"Background removed",kinds:["image"],site:"holder",options:{enclosed:{required:!1,type:"string",values:["clear","keep"]}}},autocrop:{label:"Cropped to its subject",kinds:["image"],site:"holder",options:{brief:{required:!0,type:"string"}}},probe:{label:"Probed",kinds:["image","video","document"],site:"kind",options:{}},understand:{label:"Understood",kinds:["image","video","document","tour"],site:"kind",options:{}},preview:{label:"Preview",kinds:["image","video","document"],site:"kind",options:{}},ladder:{label:"Renditions",kinds:["image","video","document"],site:"kind",options:{}},transcode:{label:"Transcoded",kinds:["video"],site:"kind",options:{}},poster:{label:"Poster",kinds:["video","document"],site:"kind",options:{}},rasterize:{label:"Pages rasterized",kinds:["document"],site:"kind",options:{}},fetch:{label:"Link fetched",kinds:["video","tour"],site:"kind",options:{}},tour_details:{label:"Tour details",kinds:["tour"],site:"kind",options:{}},crop:{label:"Cut to its crop",kinds:["image"],site:"place",options:{}}},Xr=Object.keys(Le),Es=Xr.filter(e=>Le[e].site==="holder"),lc=Xr.filter(e=>Le[e].site==="kind");function Is(e){return typeof e=="string"&&Object.hasOwn(Le,e)}function As(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;let{kind:t,verb:n}=e;return t==="process"&&Is(n)?e:null}function Rn(e){let t=Le[e.verb],n=Object.keys(t.options),r=n.length>0?`it takes ${n.map(o=>`\`${o}\``).join(", ")}`:"it takes none";for(let[o,i]of Object.entries(e)){if(o==="kind"||o==="verb"||i===void 0)continue;if(o==="reads")return`\`${e.verb}\` takes no \`reads\` \u2014 a process is about one media value, never the property`;let s=t.options[o];if(s===void 0){let a=o==="aspect"&&e.verb==="autocrop"?"; its aspect is the holder's `crop` \u2014 the aspect it locks, free form where it locks none":"";return`\`${e.verb}\` takes no option "${o}" \u2014 ${r}${a}`}if(s.values!==void 0){if(typeof i!="string"||!s.values.includes(i))return`\`${e.verb}\`'s \`${o}\` is one of ${s.values.map(a=>`"${a}"`).join(", ")}`;continue}if(typeof i!==s.type||typeof i=="string"&&i.trim()==="")return`\`${e.verb}\`'s \`${o}\` is a non-empty ${s.type}`}for(let[o,i]of Object.entries(t.options))if(i.required&&e[o]===void 0)return`\`${e.verb}\` requires \`${o}\``;return null}function X(e){let{type:t,kinds:n}=e;if(t==="media"){let r=Array.isArray(n)?n.filter(o=>typeof o=="string"&&C(o)):[];return r.length>0?r:At}return typeof t=="string"&&C(t)?[t]:[]}function On(e){let{kinds:t,process:n}=e;if(t!==void 0){if(e.type!=="media")return"declares `kinds` \u2014 only `media()` leaves its kind open; a kind's own builder fixes it";if(!Array.isArray(t)||t.length===0||!t.every(i=>typeof i=="string"&&C(i)))return`declares \`kinds\` ${JSON.stringify(t)} \u2014 a non-empty list of ${At.join(", ")}`}if(n===void 0)return null;let r=Es.map(i=>`process.${i}()`).join(", ");if(!Array.isArray(n)||n.length===0)return`declares \`process\` ${JSON.stringify(n)} \u2014 a non-empty list of processes (${r})`;let o=new Set;for(let i of n){let s=As(i);if(s===null)return`processes ${JSON.stringify(i)}, which is no process (${r})`;let{verb:a}=s,l=Le[a];if(l.site==="kind")return`processes "${a}", which every ${l.kinds.join(", ")} gets from birth on its kind's row \u2014 never a holder's to declare`;if(l.site==="place")return`processes "${a}", which every ${l.kinds.join(", ")} place gets wherever its value carries a crop \u2014 never a holder's to declare`;if(o.has(a))return`processes "${a}" twice \u2014 a holder declares each process once`;o.add(a);let d=Rn(s);if(d!==null)return`processes "${a}" with options that do not fit: ${d}`;let f=X(e).filter(p=>!l.kinds.includes(p));if(f.length>0)return`processes "${a}", which applies to ${l.kinds.join(", ")} and not to ${f.join(", ")}`}return null}var _n=["visibility","variant"];var js={matterport:{kind:"tour",label:"Matterport",pattern:/(^|\.)matterport\.com$/i,strategy:"api"},biganto:{kind:"tour",label:"Biganto",pattern:/(^|\.)biganto\.com$/i,strategy:"opengraph"},iguide:{kind:"tour",label:"iGUIDE",pattern:/(^|\.)youriguide\.com$/i,strategy:"opengraph"},kuula:{kind:"tour",label:"Kuula",pattern:/(^|\.)kuula\.co$/i,strategy:"opengraph"},momento360:{kind:"tour",label:"Momento360",pattern:/(^|\.)momento360\.com$/i,strategy:"opengraph"},cloudpano:{kind:"tour",label:"CloudPano",pattern:/(^|\.)cloudpano\.com$/i,strategy:"none"},asteroom:{kind:"tour",label:"Asteroom",pattern:/(^|\.)asteroom\.com$/i,strategy:"none"},zillow3d:{kind:"tour",label:"Zillow 3D Home",pattern:/(^|\.)zillow\.com$/i,path:/^\/view-3d-home\//i,strategy:"none"},youtube:{kind:"video",label:"YouTube",pattern:/(^|\.)(youtube\.com|youtu\.be)$/i,strategy:"oembed"},vimeo:{kind:"video",label:"Vimeo",pattern:/(^|\.)vimeo\.com$/i,strategy:"oembed"},zillow:{kind:"listing",label:"Zillow",pattern:/(^|\.)zillow\.com$/i,strategy:"none"},redfin:{kind:"listing",label:"Redfin",pattern:/(^|\.)redfin\.com$/i,strategy:"none"},dropbox:{kind:"file",label:"Dropbox",pattern:/(^|\.)dropbox\.com$/i,strategy:"none"},drive:{kind:"file",label:"Google Drive",pattern:/^drive\.google\.com$/i,strategy:"none"},maps:{kind:"map",label:"Google Maps",pattern:/(^|\.)google\.com$/i,path:/^\/maps(\/|$)/i,strategy:"none"}};function Zr(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!=="http:"&&t.protocol!=="https:")return null;for(let[n,r]of Object.entries(js))if(r.pattern.test(t.hostname)&&!(r.path&&!r.path.test(t.pathname)))return n;return null}var Ps="badge=0&autopause=0&player_id=0&title=0&byline=0&portrait=0&sidedock=0&vimeo_logo=0&pip=0&chromecast=0&quality_selector=0&progress_bar=1";function Qr(e){let t=e.trim();if(!t)return null;let n=Zr(t);if(n==="vimeo"){let r=t.match(/vimeo\.com\/(?:.*\/)?(\d+)/);return r?`https://player.vimeo.com/video/${r[1]}?${Ps}`:null}if(n==="youtube"){let r=t.match(/youtu\.be\/([A-Za-z0-9_-]{11})/)??t.match(/[?&]v=([A-Za-z0-9_-]{11})/)??t.match(/youtube\.com\/(?:embed|shorts)\/([A-Za-z0-9_-]{11})/);return r?`https://www.youtube.com/embed/${r[1]}?rel=0`:null}return null}function eo(e){let t=e.trim();if(!t)return null;let n=Zr(t);if(n==="matterport"){let r=new URL(t).searchParams.get("m");return r!==null&&/^[A-Za-z0-9]+$/.test(r)?`https://my.matterport.com/show/?m=${r}&nt=1`:null}return n!==null&&Ts.has(n)?t:null}var Ts=new Set(["biganto","iguide","kuula","momento360","cloudpano","asteroom","zillow3d"]);var Ms=["crop","cutout","mask_white","mask_black"];function En(e){return e!==null&&!(e.x<=0&&e.y<=0&&e.width>=1&&e.height>=1)}function Fs(e){return e.url!==null?e.url.replace(/^[a-z][a-z0-9+.-]*:\/\//i,""):e.key?.split("/").pop()??e.id}function In(e,t){let{id:n,renditions:r,...o}=e,i=e.kind==="image";return{...o,id:t.id,file:t.file,crop:i?t.crop:null,name:t.name!==null&&t.name!==""?t.name:Fs(e),renditions:{...r,crop:i?t.renditions.crop:null,cutout:i?t.renditions.cutout:null,mask_white:i?t.renditions.mask_white:null,mask_black:i?t.renditions.mask_black:null}}}function to(e){return e.url===null?"upload":"link"}function Z(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Qe(e){if(!Z(e))return!1;let{id:t,kind:n,renditions:r}=e;return typeof t=="string"&&typeof n=="string"&&C(n)&&Z(r)}function et(e){return Z(e)&&typeof e.id=="string"&&typeof e.file=="string"&&Z(e.renditions)&&!("kind"in e)&&!("picked"in e)}function jt(e){return Z(e)&&typeof e.file=="string"&&e.file!==""&&!et(e)&&!Qe(e)}function Re(e){return Z(e)&&typeof e.media=="string"&&e.media!==""}function fe(e){if(Z(e)){if(Re(e))return e.media;if(et(e)||Qe(e))return e.id;if(jt(e))return e.picked??e.file}}function D(e){if(Re(e))return e.media;if(jt(e))return e.file}function $n(e,t){if(Array.isArray(e))for(let n of e)$n(n,t);else if(et(e))t.has(e.id)||t.set(e.id,e);else if(Z(e)&&!Qe(e))for(let n of Object.values(e))$n(n,t)}function Pt(e){let t=new Map;for(let[n,r]of Object.entries(e))n!=="files"&&$n(r,t);return t}function Cs(e,t){return Object.hasOwn(e.files,t)?e.files[t]:void 0}function no(e,t){let n=Cs(t,e.file);return n===void 0?null:In(n,e)}function An(e){let t={};for(let[n,r]of Pt(e)){let o=no(r,e);o!==null&&(t[n]=o)}return t}function ro(e){return Object.hasOwn(e,"crop")||e.renditions!==void 0}function oo(e,t){let n=Object.hasOwn(t,"crop"),r=t.renditions??{},o=n?null:e.renditions,i=Object.fromEntries(Ms.map(s=>[s,Object.hasOwn(r,s)?r[s]??null:o?.[s]??null]));return{crop:n?t.crop??null:e.crop,renditions:i}}function Ds(e,t){if(e===null||e.kind!=="image"||!ro(t))return e;let n=oo({crop:e.crop,renditions:e.renditions},t);return{...e,crop:n.crop,renditions:{...e.renditions,...n.renditions}}}function jn(e,t){return ro(t)?{...e,...oo({crop:e.crop,renditions:e.renditions},t)}:e}function io(e,t){let n,r=i=>(n??=An(t),Object.hasOwn(n,i)?n[i]:null),o=i=>{if(Array.isArray(i))return i.flatMap(a=>{let l=o(a);return l===null&&a!==null?[]:[l]});if(!Z(i)||Qe(i))return i;if(et(i))return no(i,t);if(jt(i))return r(i.file);if(Re(i))return Ds(r(i.media),i);let s={};for(let[a,l]of Object.entries(i))s[a]=o(l);return s};return o(e)}function ue(e){if(Array.isArray(e))return e.map(ue);if(!Z(e))return e;if(Qe(e)||et(e))return{media:e.id};if(Re(e)){let{crop:n,renditions:r,...o}=e;return o}let t={};for(let[n,r]of Object.entries(e))t[n]=ue(r);return t}var tt="property.uploads";function so(e){if(typeof e=="string"&&e!=="")return[e];if(!(!Array.isArray(e)||e.length===0||!e.every(t=>typeof t=="string"&&t!=="")))return[...e]}function Pn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ls(e){if(fe(e)!==void 0||!Pn(e))return e;for(let t of Object.values(e))if(fe(t)!==void 0)return t}function Tn(e,t){let[n,...r]=t.split(".");if(n!=="property"||r.length===0)return null;let o=e;for(let i of r)if(o=Array.isArray(o)?o.find(s=>Pn(s)&&s.id===i):Pn(o)&&Object.hasOwn(o,i)?o[i]:void 0,o===void 0)return null;return Array.isArray(o)?o.flatMap(i=>{let s=Ls(i),a=fe(s);return a===void 0?[]:[{id:a,value:s}]}):null}function ao(e,t){return Tn(e,t)?.map(({id:n})=>n)??null}function Ns(e,t){let n=Pt(e),r=new Set,o=[];for(let i of so(t.from)??[])for(let{id:s,value:a}of Tn(e,i)??[]){if(r.has(s))continue;let l=n.get(s),d=l===void 0||!Object.hasOwn(e.files,l.file)?void 0:e.files[l.file];if(l===void 0||d===void 0||!t.kinds.includes(d.kind))continue;r.add(s);let f=Re(a)?jn(l,a):l;o.push({id:s,value:f,file:d,list:i})}return o}function Hs(e,t){return Ns(e,t).map(({value:n,file:r,list:o})=>({record:In(r,n),list:o}))}function Oe(e,t){return Hs(e,t).map(({record:n})=>n)}var R=class extends Error{constructor(n,r){super(r);this.status=n}status};function Us(e){return e.split("-").map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function lo(e){let{variant:t}=e;return{required:e.required,variant:t===null?null:{cases:t.cases.map(n=>({value:n,label:Us(n)})),locked:t.locked}}}function co(e){return Object.fromEntries(e.map(t=>[t.instance_id,{enabled:t.enabled,...t.variant===void 0?{}:{variant:t.variant}}]))}function uo(e){if(e==null)return{};if(typeof e!="object"||Array.isArray(e))throw new R(400,"A render request's display is an object keyed by instance id.");let t={};for(let[n,r]of Object.entries(e)){if(typeof r!="object"||r===null||Array.isArray(r))throw new R(400,`The display state of "${n}" is not an object.`);let{enabled:o,variant:i}=r;if(o!==void 0&&typeof o!="boolean")throw new R(400,`The display state of "${n}" has a non-boolean enabled.`);if(i!==void 0&&typeof i!="string")throw new R(400,`The display state of "${n}" has a non-string variant.`);t[n]={...o===void 0?{}:{enabled:o},...i===void 0?{}:{variant:i}}}return t}function fo(e,t){for(let[n,r]of Object.entries(t)){let o=e.instances.find(s=>s.instanceId===n);if(o===void 0)throw new R(400,`The composition places no instance "${n}".`);if(r.enabled===!1&&o.display.required)throw new R(400,`Section instance "${n}" is required and cannot be hidden.`);if(r.variant===void 0)continue;let i=o.display.variant;if(i===null)throw new R(400,`Section instance "${n}" declares no display variant.`);if(i.locked)throw new R(400,`Section instance "${n}" declares a locked variant, which the user cannot switch.`);if(!i.cases.includes(r.variant))throw new R(400,`"${r.variant}" is not a declared case of section instance "${n}" (declared: ${i.cases.join(", ")}).`)}}function Ks(e){return typeof e=="string"&&e!==""?e:null}function qs(e){return{listingIntent:Ks(e.listing_intent),units:e.units.length,photos:Oe(e,{kinds:["image"],from:["property.property_media"]}).length}}function Vs(e){let t=JSON.stringify(e),n=3735928559,r=1103547991;for(let o=0;o<t.length;o++){let i=t.charCodeAt(o);n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677)}return n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(16).padStart(14,"0")}function po(e){return{id:e.id,label:e.label,summary:qs(e.facts),doc:Vs(e.instances),display:co(e.instances)}}function mo(e,t){let n=e.replace(/\/+$/,"");return t==="/"?`${n}/`:`${n}${t}/`}function ho(e){let{pages:t,currentPageId:n,basePath:r}=e,o=t.find(a=>a.id===n);if(!o)throw new Error(`nav: page "${n}" is not one of the declared pages (${t.map(a=>a.id).join(", ")}).`);let i=[o,...t.filter(a=>a.id!==o.id&&a.enabled!==!1)],s={};for(let a of i)for(let l of a.sections)l.enabled===!1||l.key in s||(s[l.key]=a.id===o.id?`#${l.anchor}`:`${mo(r,a.path)}#${l.anchor}`);return{anchors:s,pages:t.filter(a=>a.enabled!==!1).map(a=>({id:a.id,label:a.label,href:mo(r,a.path),current:a.id===o.id}))}}function Tt(e,t){return e.pages?.[t]?.enabled!==!1}function Mn(e,t){return t.filter(n=>Tt(e,n.id))}var nt={base:"stylesheets/base.css",template:"stylesheets/template.css"},ne={frame:"__capture/frame",print:"__capture/print"};function yo(e){return new URLSearchParams(e).toString()}function Fn(e,t,n){return`${ne.frame}?${yo({fixture:e,page:t,format:n})}`}function go(e,t){return`${ne.print}?${yo({fixture:e,format:t})}`}var Bs=["autocomplete","manual_pinned","resolved"],wo=["street","unit","city","state","postal"],ot=[...wo,"latitude","longitude"];function _e(e){return ot.includes(e)}function rt(e){if(typeof e!="string")return null;let t=e.trim();return t===""?null:t}function bo(e,t){return typeof e=="number"&&Number.isFinite(e)&&Math.abs(e)<=t?e:null}function Q(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;let t=e,n=bo(t.latitude,90),r=bo(t.longitude,180),o=n!==null&&r!==null,i=t.source,s={street:rt(t.street),unit:rt(t.unit),city:rt(t.city),state:rt(t.state),postal:rt(t.postal),latitude:o?n:null,longitude:o?r:null,source:typeof i=="string"&&Bs.includes(i)?i:null};return o||wo.some(a=>s[a]!==null)?s:null}function ko(e,t){let n=Q(e);return n===null?null:n[t]}var Cn=Symbol.for("@homepages/concrete:row:of"),Dn=Symbol.for("@homepages/concrete:element:of");function Ne(e){return typeof e=="object"&&e!==null&&e.kind==="sibling"&&T(e.of)}function Ws(e,t){return e===t||I(e)&&I(t)&&e.key===t.key}function Mt(e,t){let n=[...e];for(let r of t??[])n.some(o=>Ws(o,r))||n.push(r);return n}function B(e){return typeof e=="object"&&e!==null&&"section"in e&&typeof e.section=="string"&&"slot"in e&&typeof e.slot=="string"}function Ln(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="row"&&"field"in e&&typeof e.field=="string"}function re(e){if(!Ln(e))return;let t=e[Cn];return typeof t=="object"&&t!==null?t:void 0}function W(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="element"}function xo(e){if(!W(e))return;let t=e[Dn];return typeof t=="object"&&t!==null?t:void 0}function I(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="home"&&"key"in e&&typeof e.key=="string"}function vo(e){return typeof e=="object"&&e!==null&&"head"in e&&typeof e.head=="object"&&"declaration"in e&&T(e.declaration)}function T(e){return typeof e=="object"&&e!==null&&"type"in e&&typeof e.type=="string"}function Ft(e,t){if(typeof e=="function")return{kind:"compute",fn:e,reads:[]};let n=t;if(e.requires===void 0)return{kind:"compute",fn:n,reads:[...e.reads]};if(!Array.isArray(e.requires)||e.requires.length===0)throw new Error("compute(): `requires` names at least one read \u2014 omit it when the value needs none.");return{kind:"compute",fn:n,reads:Mt(e.reads,e.requires),requires:[...e.requires]}}function L(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="compute"&&"fn"in e&&typeof e.fn=="function"}function Ct(e){return typeof e=="object"&&e!==null&&e.kind==="compute"&&typeof e.fn=="function"}var zs={write:new Set(["brief","reads","requires","none"]),pick:new Set(["brief","reads","requires","unique"]),find:new Set(["brief","reads","requires","none"])};function Nn(e,t){let n=`fill.${e}()`;if(typeof t.brief!="string"||t.brief.trim()==="")throw new Error(`${n}: \`brief\` is required \u2014 it is the whole instruction the model is given.`);let r=zs[e],o={kind:"fill",verb:e};for(let[s,a]of Object.entries(t)){if(!r.has(s))throw new Error(`${n}: "${s}" is not an option \u2014 it takes ${[...r].map(l=>`\`${l}\``).join(", ")}, and everything the model should know goes in the brief.`);if(s==="none"&&a!==void 0&&a!==!0)throw new Error(`${n}: \`none\` is \`true\` or absent \u2014 it admits the empty answer, and the brief's last sentence says when nothing is right.`);if(s==="unique"&&a!==void 0&&typeof a!="boolean")throw new Error(`${n}: \`unique\` is a boolean \u2014 \`false\` lets a pick repeat an element.`);if(s==="requires"&&a!==void 0&&(!Array.isArray(a)||a.length===0))throw new Error(`${n}: \`requires\` names at least one read \u2014 omit it when the fill needs none.`);a!==void 0&&(o[s]=s==="reads"||s==="requires"?[...a]:a)}let i=o.requires;return i!==void 0&&(o.reads=Mt(o.reads??[],i)),o}function Gs(e){return Nn("write",e)}function Ys(e){return Nn("pick",e)}function Js(e){return Nn("find",e)}var z={write:Gs,pick:Ys,find:Js};function G(e,t){if(ee(e))return[e];if(!Array.isArray(e)||!e.every(o=>typeof o=="object"&&o!==null))return;if(e.length===0)throw new Error(`${t} declares \`source: []\` \u2014 a list of fills names at least one fill, and a holder nothing fills declares no \`source\`.`);let n=e.filter(o=>!ee(o)).length;if(n===0)return e;let r=n<e.length?"a derivation beside a fill":n>1?"several derivations":"a derivation in a list";throw new Error(`${t}'s \`source\` lists ${r} \u2014 \`source\` takes one derivation (a fact, a slot, a row's member, the element, a \`compute()\`) or an ordered list of fills: a holder has one write path, and a derived value has no writer beside it.`)}function $e(e){return ee(e)||Array.isArray(e)&&e.length>0&&e.every(ee)}function ee(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="fill"&&"verb"in e&&(e.verb==="write"||e.verb==="pick"||e.verb==="find")&&"brief"in e&&typeof e.brief=="string"}var Dt=Symbol.for("@homepages/concrete:fill:declaration");function So(e){return $e(e)?{[Dt]:ee(e)?[e]:[...e]}:{}}function q(e){if(!(typeof e!="object"||e===null))return e[Dt]}var Ro=["Basement","Ground","1st floor","2nd floor","3rd floor","4th floor","Penthouse"];var He=new Map;function Un(e){He.set(e.home,e)}function _o(e){let t=He.get(e);if(t===void 0)throw new Error(`fact registry: the ${e} registry is not declared yet \u2014 import @homepages/template-contracts/fact-registry (or ./fact-keys, ./table-members) before reading it.`);return t}var $o=new Set(["text","select","email","phone","url","date"]);function Lt(e){switch(e.type){case"number":case"image":case"address":return e.type;case"list":return Xs(e.element);default:return $o.has(e.type)?"text":null}}function Xs(e){return e.type==="object"?"row_list":e.type==="image"?"image_list":e.type==="number"?"number_list":$o.has(e.type)?"text_list":null}function Zs(e){if(e.type!=="list")return!1;let t=e.element.type;return C(t)||t==="media"}function Eo(e){return Object.entries(e.pages).flatMap(([t,n])=>Zs(n.declaration)?[`${e.home}.${t}`]:[])}function Io(e){return Ct(e.source)}var Oo=new WeakMap;function Kn(e){let t=Oo.get(e);return t===void 0&&(t=Qs(e),Oo.set(e,t)),t}function Qs(e){let t=new Map;for(let[n,r]of Object.entries(e.pages)){let o=r.declaration;if(o.type==="list")continue;let i=`${e.home}.${n}`;if(o.type==="address"){t.set(i,{declaration:o,value_type:"address"});for(let s of ot)t.set(`${i}.${s}`,{declaration:o,value_type:qn(s)});continue}t.set(i,{declaration:o,value_type:ea(i,o)})}return t}function ea(e,t){if(t.type==="image")return"image";if(C(t.type)||t.type==="media")throw new Error(`fact registry: ${e} is a single ${t.type} \u2014 a top-level media fact is an image, the one media value a slot binds.`);return t.type==="number"?"number":"text"}function qn(e){return e==="latitude"||e==="longitude"?"number":"text"}function ta(e,t){if(t.type!=="list")return null;let n=t.element;return n.type==="object"?e:n.type==="row"?n.from.slice(n.from.indexOf(".")+1):null}var Hn;function Ao(){if(Hn!==void 0)return Hn;_o("library");let e=new Map;for(let t of He.values())for(let[n,r]of Object.entries(t.pages)){let o=ta(n,r.declaration);o!==null&&e.set(`${t.home}.${n}`,o)}return He.has("property")&&He.has("library")&&(Hn=e),e}function Vn(){return[...new Set(Ao().values())]}function E(e){return typeof e=="string"?Ao().get(e)??null:null}function Bn(e){return e?.kind==="home"?E(e.key):null}function Nt(e){for(let t of He.values()){let n=Object.hasOwn(t.pages,e)?t.pages[e]:void 0;if(n?.declaration.type==="list"&&n.declaration.element.type==="object")return t.home}throw new Error(`fact registry: no linked registry declares a table "${e}"`)}function Wn(e,t){let n=e.pages[t],r=n?.declaration.type==="list"?n.declaration.element:void 0;if(r?.type!=="object")throw new Error(`fact registry: the ${e.home} registry declares no list of objects "${t}"`);return r.fields}function zn(e){return Wn(_o(Nt(e)),e)}function Gn(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function oe(e,t){let n=Gn(zn(e),t);return n===void 0?void 0:Lt(n)}function Yn(e){if(typeof e!="string")return null;let t=e.lastIndexOf(".");if(t<=0)return null;let n=E(e.slice(0,t));if(n===null)return null;let r=e.slice(t+1);return oe(n,r)==="row_list"?{table:n,member:r}:null}function Ht(e){if(typeof e!="string")return null;let t=e.lastIndexOf(".");if(t<=0)return null;let n=e.slice(0,t),r=E(n);if(r===null)return null;let o=e.slice(t+1);return oe(r,o)===void 0?null:{table:r,tableKey:n,member:o}}var Ut=["type","label","from","source","locked","when"],jo=new Set(Ut),Kt=Symbol.for("@homepages/concrete:table-of");function qt(e,t){return Object.defineProperty(e,Kt,{value:t,enumerable:!1})}function st(e){if(typeof e!="object"||e===null)return null;let t=e[Kt];return typeof t=="string"?t:null}function na(e){return Object.keys(zn(e))}function it(e,t){return Object.freeze({kind:"row",field:t,[Cn]:e})}function ra(e,t){return new Proxy(it(e,t),{get(n,r,o){return typeof r=="string"&&!(r in n)&&_e(r)?it(e,`${t}.${r}`):Reflect.get(n,r,o)}})}var Po=Symbol.for("@homepages/concrete:row:definition");function N(e){let t=e[Po];return typeof t=="object"&&t!==null?t:e}var oa=new Set(["then","toJSON","$$typeof","asymmetricMatch","nodeType","tagName","@@iterator"]);function To(e,t,n=[]){let r=t===null?null:new Set(na(t)),o=new Proxy(e,{get(i,s,a){if(s===Po)return i;if(typeof s!="string")return Reflect.get(i,s,a);if(t!==null&&r!==null){let l=[t,...n],d=l.map(p=>p===t&&!r.has(s)?void 0:oe(p,s));if(d.every(p=>p===void 0))return Reflect.get(i,s,a);let f=d.findIndex(p=>p===void 0||p!==d[0]);if(f===-1)return d[0]==="address"?ra(o,s):it(o,s);if(s in i||jo.has(s))return Reflect.get(i,s,a);throw new Error(`row: "${String(i.label)}" reads the member "${s}", which its \`from\` table ${l[f]} ${d[f]===void 0?"lacks":"holds at another kind"} \u2014 every table a row names carries every member its readers read, at one kind.`)}return s in i||jo.has(s)?Reflect.get(i,s,a):oa.has(s)?void 0:it(o,s)}});return o}function Mo(e){let t=new Proxy(e,{get(n,r,o){return typeof r=="string"&&!(r in n)&&_e(r)?it(t,r):Reflect.get(n,r,o)}});return t}function Fo(e,t){let n=e.map(t);return n.some((r,o)=>r!==e[o])?n:void 0}function Co(e,t){let n=e.reads===void 0?void 0:Fo(e.reads,t),r=e.requires===void 0?void 0:Fo(e.requires,t);return n===void 0&&r===void 0?e:{...e,...n===void 0?{}:{reads:n},...r===void 0?{}:{requires:r}}}function ie(e,t){let n=N(e),r,o=n.source;if(o!==void 0)if(L(o)){let s=Co(o,t);s!==o&&(r={...n,source:s})}else{let s=t(o);s!==o&&(r={...n,source:s})}let i=q(n);if(i!==void 0){let s=!1,a=i.map(l=>{let d=Co(l,t);return d!==l&&(s=!0),d});s&&(r={...r??n,[Dt]:a})}return r??n}function Do(e){return t=>{let n=re(t);if(n===void 0)return t;let r=e.get(n);return r===void 0?t:{kind:"row",slot:r,field:t.field}}}var Lo=new Set(["row","address"]);function No(e){let t=new Map;for(let[n,r]of Object.entries(e))typeof r=="object"&&r!==null&&Lo.has(r.type)&&t.set(r,n);return t}function Ho(e,t,n){let r=[e.source];ie(e,o=>(r.push(o),o));for(let[o,i]of t)if(!(o===e||i===n))for(let s of Ut){let a=o[s];if(a!==void 0&&r.includes(a))return`${i}.${s}`}}function Uo(e){let t=e.slice(e.indexOf(".")+1);return`reads \`${e}\`, which is the row's own \`${t}\`, not a member \u2014 a row's ${Ut.map(n=>`\`${n}\``).join(", ")} are its slot definition's, and its table has no member named \`${t}\`.`}function pe(e){return Lo.has(e.type)?{...N(e)}:e}function Xn(e,t){for(let n of G(t,e)??[])if(!(n.verb!=="pick"||n.of===void 0))throw new Error(`${e}'s \`fill.pick\` states \`of\` \u2014 a pick chooses from its holder's \`from\`; remove \`of\` and name the candidates in \`from\`.`)}function ia(e){return B(e)?{kind:"section",section:e.section,slot:e.slot}:T(e)?{kind:"sibling",of:e}:I(e)?{kind:"home",key:e.key}:e}function Y(e){return at(e,ia)}function sa(e,t,n){if(!(t!==!0||n===void 0)){if(L(n)){if(n.requires!==void 0&&n.requires.length>0)return;throw new Error(`${e} is \`required\` and sourced by a \`compute()\` naming no \`requires\` \u2014 nothing to require. Name the reads the value cannot do without: \`compute({ reads, requires: [fact.property.address] }, \u2026)\`.`)}if(B(n)||T(n)||Ne(n))throw new Error(`${e} is \`required\` and mirrors another slot \u2014 a mirror requires its upstream; mark that slot \`required\` instead.`)}}function at(e,t){let n=e.source;sa(e.label??"a slot",e.required,n);let r=n!==void 0&&G(n,e.label??"a slot")===void 0;return{...e.locked===!0?{locked:!0}:{},...e.required===!0?{required:!0}:{},...r?{source:t(n)}:{},...So(n),...e.label!==void 0?{label:e.label}:{},...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...e.when!==void 0?{when:e.when}:{}}}function Jn(e){return t=>({type:"text",size:e,...Y(t),...t.cap!==void 0?{cap:t.cap}:{}})}var F={short:Jn("short"),medium:Jn("medium"),long:Jn("long")};function M(e){return{type:"number",...Y(e),...e.thousandsSep!==void 0?{thousandsSep:e.thousandsSep}:{},...e.decimals!==void 0?{decimals:e.decimals}:{},...e.maxDigits!==void 0?{maxDigits:e.maxDigits}:{}}}function aa(e){return{type:"select",...Y(e),...e.creatable!==void 0?{creatable:e.creatable}:{}}}function la(e){if(I(e.source))throw new Error(`select: "${e.label}" declares both \`from\` and a fact \`source\` \u2014 a select takes exactly one set of choices.`);return Xn(`select: "${e.label}"`,e.source),{type:"select",...Y(e),values:[...e.from],...e.creatable!==void 0?{creatable:e.creatable}:{}}}function da(e,t){if(ee(t.source)&&t.source.verb!=="pick")throw new Error(`select: a display entry is filled by \`fill.pick\` \u2014 the model picks one of its cases \u2014 never \`fill.${t.source.verb}\`.`);return Xn("select: a display entry",t.source),{cases:[...e],...t.locked===!0?{locked:!0}:{},...t.source!==void 0?{source:t.source}:{}}}function ca(e){if(Array.isArray(e))throw new Error("select: takes one options object \u2014 write the choices as `from`: `select({ from: [...], \u2026 })`.");if(e.options!==void 0)throw new Error("select: declares `options` \u2014 a select names its choices in `from`: `select({ from: [...], \u2026 })`.");return e.label===void 0&&Array.isArray(e.from)?da(e.from,e):e.from!==void 0?la(e):aa(e)}var lt=ca;function Ee(e){return{type:"url",...Y(e),...e.accepts!==void 0?{accepts:e.accepts}:{}}}function Zn(e){return{type:"date",...Y(e)}}function Ko(e){return{type:"email",...Y(e)}}function qo(e){return{type:"phone",...Y(e)}}function Vt(e={}){return Mo({type:"address",...Y(e)})}function Vo(e,t){let n=`${e}: "${t.label??e}"`;Xn(n,t.source);let r=On({type:e,kinds:t.kinds,process:t.process});if(r!==null)throw new Error(`${n} ${r}.`);let o=G(t.source,n),i=t.source!==void 0&&o===void 0&&!L(t.source);if(i&&t.from!==void 0)throw new Error(`${n} picks \`from\` a media list and declares a \`source\` \u2014 a slot bound to a fact holds what that fact holds.`);if((i||L(t.source))&&t.process!==void 0)throw new Error(`${n} declares \`process\` beside a \`source\` that derives its value \u2014 a derived slot holds what it derives from, processed where that is declared.`);if(o?.some(l=>l.verb==="pick")===!0&&t.from===void 0)throw new Error(`${n} is picked by a \`fill.pick\` and names no \`from\` \u2014 a pick chooses from its holder's \`from\` (\`from: fact.property.property_media\`); a media declaration without one owns its media.`);let a=ua(n,e,t.kinds,t.from)?.map(l=>I(l)?l.key:l);return{...a!==void 0?{from:a.length===1?a[0]:a}:{},...t.process!==void 0?{process:t.process.map(l=>({...l}))}:{}}}function ua(e,t,n,r){if(r===void 0)return;let o=Array.isArray(r)?r:[r];if(o.length===0)throw new Error(`${e} declares \`from: []\` \u2014 name the media list it picks from, or omit \`from\` and the declaration owns its media.`);let i=X({type:t,kinds:n}),s=new Set;for(let a of o){let l=typeof a=="object"&&a!==null&&!I(a),d=I(a)?a.key:l&&"declaration"in a?a.declaration:a;if(s.has(d))throw new Error(`${e} picks \`from\` one media list twice \u2014 each list is named once; a media value two lists hold is one candidate, attributed to the first.`);if(s.add(d),!l)continue;let f=X(d.element);if(f.length>0&&!i.some(p=>f.includes(p)))throw new Error(`${e} picks \`from\` a list of ${f.join(", ")}, whose items can never be ${i.join(" or ")} \u2014 each list it picks from holds items of its kinds.`)}return o}function se(e={}){return{type:"image",...Y(e),...e.crop!==void 0?{crop:e.crop}:{},...Vo("image",e)}}function Bt(e={}){return{type:"media",...Y(e),...e.kinds!==void 0?{kinds:[...e.kinds]}:{},...Vo("media",e)}}var er=Symbol.for("@homepages/concrete:object:declared-fields");function me(e){return e[er]}function tr(e,t){let n=me(t);return n!==void 0&&Object.defineProperty(e,er,{value:n,enumerable:!1}),e}var Bo="a label is a source, as a text slot takes one",Qn="`label: text.short({ cap: 60, source: fill.write({ reads, brief }) })`",fa=new Set(["type","size","cap","locked"]);function pa(e,t,n){if(typeof t=="string")throw new Error(`${e} declares the label ${JSON.stringify(t)} \u2014 ${Bo}: write \`label: compute(() => ${JSON.stringify(t)})\`.`);if(T(t)){let r=Object.entries(n).find(([,o])=>o===t);if(r===void 0)return ma(e,t);if(t.type!=="text"&&t.type!=="address")throw new Error(`${e} label names its field "${r[0]}", a "${t.type}" \u2014 a label names a text or an address field.`);return{field:r[0]}}if($e(t)){let r=ee(t)?`\`fill.${t.verb}\``:"list of fills";throw new Error(`${e} label is a bare ${r} \u2014 the label is the fill's holder, so it states the kind the fill writes: ${Qn}.`)}return F.short({locked:!0,source:t})}function ma(e,t){let n=q(t);if(n===void 0||n.some(s=>s.verb!=="write")||t.type!=="text")throw new Error(`${e} declares a slot as its label that is none of its fields \u2014 ${Bo}: write what that slot read as the label (\`label: comp.address.street\`, \`label: compute(() => "Listing agent")\`), a written label as ${Qn}; a title the user edits is a field, which the label names by its const.`);let r=Object.keys(t).filter(s=>!fa.has(s));if(r.length>0)throw new Error(`${e} label is a written text slot declaring ${r.map(s=>`\`${s}\``).join(", ")} \u2014 a label states only its kind and cap: ${Qn}; a title the user edits is a field, which the label names by its const.`);let{size:o,cap:i}=t;return F[o]({locked:!0,source:n.length===1?n[0]:n,...i!==void 0?{cap:i}:{}})}function ha(e){let{type:t,element:n}=e;if(t==="object")return"an object \u2014 an object never holds another; flatten its fields into this one";if(t==="list"&&n?.type==="object")return ya(e);if(t==="list"&&n?.type==="row")return"a list of rows \u2014 declare the selection at the top level instead"}var dt="declare the list at the top level instead";function ya(e){let t=q(e);if(t!==void 0&&t.some(o=>o.verb!=="pick")||t===void 0&&$e(e.source))return`a list of objects declaring a fill other than a pick \u2014 no fill but a pick writes a list inside an object; ${dt}`;let n=e.source;if(I(n))return`a list of objects sourced by the fact "${n.key}" \u2014 its items carry their own minted ids, so it lists a row's member, a \`compute()\` or authored items; ${dt}`;if(B(n)||Ne(n)||T(n))return`a list of objects sourced by another list slot \u2014 its items carry their own minted ids, so it lists a row's member, a \`compute()\` or authored items; ${dt}`;let r=e.element.fields;for(let[o,i]of Object.entries(r)){let s=ga(i,r);if(s!==void 0)return`a list of objects whose item field "${o}" is ${s}`}}function ga(e,t){if(e.type==="list"&&e.element?.type==="object")return"a list of objects \u2014 a list of objects nests one level; flatten the inner list's fields into this item or declare it beside the outer list";if(q(e)!==void 0)return`filled \u2014 no fill writes into a list inside an object; ${dt}`;let n=e.source;if(n===void 0)return;if(L(n))return`a \`compute()\` \u2014 an item of a list inside an object reads its element, or a row \`from\` its member; ${dt}`;let{kind:r,slot:o}=n;if(r==="element"&&e.type==="row"&&E(e.from)!==null)return"a table's row holding the element \u2014 the element of a list inside an object is a member's item: hold it in a row `from` that member (`row({ label, from: unit.floor_plans, source: entry })`)";if(r!=="element"&&!(e.type!=="row"&&r==="row"&&typeof o=="string"&&t[o]?.type==="row"))return"bound to something outside its item \u2014 an item of a list inside an object reads its element, a row `from` its member, or a row beside it"}function Ue(e){let t="object";if(e.source!==void 0)throw new Error(`${t} declares \`source\`, but an object is a pure container with no value of its own \u2014 declare it on the field that holds the value.`);if(Object.hasOwn(e.fields,"label")&&e.fields.label!==e.label)throw new Error(`${t} declares a field keyed "label" \u2014 the key is reserved for the object's label: write its source as \`label\`, beside \`fields\`.`);let n=Sn.find(f=>Object.hasOwn(e.fields,f));if(n!==void 0)throw new Error(`${t} field "${n}" is named like its binding's own \`${n}\` \u2014 a field is read straight off its object's binding, which owns ${Sn.map(f=>`\`${f}\``).join(", ")}. Rename the field.`);let r=e.label===void 0?void 0:pa(t,e.label,e.fields),o=r!==void 0&&!("type"in r)?r:void 0,i={...r===void 0||o!==void 0?{}:{label:r},...e.fields};if(Object.keys(i).length===0)throw new Error(`${t} declares no fields \u2014 an object groups at least one.`);for(let[f,p]of Object.entries(i)){let b=ha(p);if(b!==void 0)throw new Error(`${t} field "${f}" is ${b}.`);if(f!=="label"&&p.label===void 0)throw new Error(`${t} field "${f}" declares no \`label\` \u2014 every field of an object states the name the editor shows it by.`)}let s=No(i);for(let[f,p]of Object.entries(i)){let b=Ho(p,s);if(b!==void 0)throw new Error(`${t} field "${f}" ${Uo(b)}`)}let a=Do(s),l={};for(let[f,p]of Object.entries(i))l[f]=pe(ie(p,a));let d={type:"object",...e.locked===!0?{locked:!0}:{},...o!==void 0?{label:o}:{},fields:l,...e.when!==void 0?{when:e.when}:{}};return Object.defineProperty(d,er,{value:i,enumerable:!1}),d}function Wo(e){let t=e.indexOf("/");return t===-1?e:e.slice(t+1)}function Go(e,t=[]){let n=new Map;for(let s of e)for(let a of s.sections){let l=Wo(a.section);n.has(l)||n.set(l,a.instance_id)}let r=new Set(t.filter(s=>!s.enabled).map(s=>s.page_id)),o=s=>{let a=n.get(s);return a===void 0||e.filter(d=>d.sections.some(f=>f.instance_id===a)).every(d=>r.has(d.id))?void 0:a};function i(s,a){if(s.kind==="home")return{layer:"home",key:s.key};let l=s.section===Wo(a.section)?a.instanceId:o(s.section);return l===void 0?void 0:{layer:"section",instanceId:l,slot:s.slot}}return{readable:o,locate:i}}function Yo(e){if(e.type==="object")return null;let t=e.source;if(t===null||typeof t!="object")return null;let{kind:n,section:r,slot:o}=t;return n==="section"&&typeof r=="string"&&typeof o=="string"?{kind:"section",section:r,slot:o}:null}var ct=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function zt(e,t){if(Object.hasOwn(e,t))return e[t];let n=t.indexOf(".");if(n<=0)return;let r=e[t.slice(0,n)];if(r?.type!=="object"||!ct(r.fields))return;let o=t.slice(n+1);return Object.hasOwn(r.fields,o)?r.fields[o]:void 0}function ba(e,t,n){if(t.siblings!==void 0&&Object.hasOwn(t.siblings,n))return{path:t.container===void 0?n:`${t.container}.${n}`,def:t.siblings[n],sibling:!0};if(t.nested===!0)return;let r=zt(e,n);return r===void 0?void 0:{path:n,def:r,sibling:!1}}function Jo(e){return e==="row"||e==="address"}function ut(e,t,n){let r=ba(e,t,n);if(!(r===void 0||!Jo(r.def.type)))return{...r,kind:r.def.type}}function wa(e){return E(e.from)}function he(e){if(!Array.isArray(e.from)){let t=wa(e);return t===null?[]:[t]}return e.from.flatMap(t=>E(t)??[])}function ft(e,t){let n=new Set,r=[];for(let o of t){let i=e[o];for(let s of i){let a=Wt(s.id);a===null||n.has(a)||(n.add(a),r.push({id:a,table:o}))}}return r}function rr(e,t,n){if(t.length>1&&n!==null){let r=ft(e,t).find(o=>o.id===n);if(r!==void 0)return r.table}return t[0]??null}function ka(e){if(e===void 0)return;if(zo(e.source))return e;if(e.type!=="object"||!ct(e.fields))return;let t=Object.values(e.fields).filter(n=>zo(n.source));return t.length===1?t[0]:void 0}function or(e){let t=ka(e);return t?.type==="row"?he(t):[]}function zo(e){return ct(e)&&e.kind==="element"}function Xo(e,t){return xa(nr(e,e.section,e.slots,t,new Set))}function xa(e){return e.length===1?e[0]:null}function nr(e,t,n,r,o){let i=`${t??""}\0${r}`;if(o.has(i))return[];o.add(i);let s=zt(n,r);return s?.type==="row"?he(s):s?.type==="list"?va(e,t,n,s,o):[]}function va(e,t,n,r,o){let i=ct(r.source)?r.source:void 0;if(i===void 0||i.kind==="authored"||i.kind==="derived")return or(r.element);let s=Bn(i);if(s!==null)return[s];let{kind:a,section:l,slot:d}=i;if(a!=="section"||typeof l!="string"||typeof d!="string")return[];if(l===t)return nr(e,t,n,d,o);let f=e.sectionSlots?.(l);return f===void 0?[]:nr(e,l,f,d,o)}var Wt=e=>typeof e=="string"&&e!==""?e:null;function Ie(e,t=null){if(typeof e=="string")return t===null?null:Wt(e);let n=Sa(e);return n===null?null:Wt(e[n])}function Sa(e){return ct(e)?["id","media","file"].find(t=>Wt(e[t])!==null)??null:null}function Ra(e,t){if(I(e)){if(E(e.key)===null)throw new Error(`list: "${t}" is sourced by the fact "${e.key}", which is no table \u2014 a list's source is a table, a list slot, a list-valued member, a \`compute()\` or a fill; a list of the property's media is picked (\`fill.pick\`) from its item's \`from\`, or computed over a media list (\`compute({ reads: [fact.property.property_media] }, \u2026)\`).`);return{kind:"home",key:e.key}}if(B(e))return{kind:"section",section:e.section,slot:e.slot};if(T(e))return{kind:"sibling",of:e};if(re(e)!==void 0||L(e))return e;throw new Error(`list: "${t}" declares a source that is no list.`)}function ei(e){return I(e)?E(e.key):T(e)&&e.type==="list"?st(e):null}var Oa=new Set(["label","locked","placeholder","when","source"]);function _a(e){let t={};for(let[n,r]of Object.entries(e))Oa.has(n)||(t[n]=r);return t}function $a(e,t){if(I(e)&&E(e.key)!==null)return{type:"row",from:e.key,source:{kind:"element"}};for(let r of G(e,`list: "${t}"`)??[]){if(r.verb==="write")throw new Error(ti(t,"declares no `item`"));if(r.verb==="pick")throw new Error(sr(t,"declares no `item`"))}if($e(e))return{type:"poi"};if(T(e)&&e.type==="list")return Ea(e,t);let n=re(e);if(n!==void 0){let r=st(n);if(r!==null&&oe(r,e.field)==="image_list")return{type:"image"}}throw new Error(`list: "${t}" declares no \`item\`, and its source does not say what its elements are \u2014 declare \`item\`: a plain slot (\`item: image()\`), or a function of the element (\`item: (el) => object({ \u2026 })\`).`)}function ti(e,t){return`list: "${e}" is written by a \`fill.write\` and ${t} \u2014 the item is the kind every written element is: a value slot (\`item: text.short({ cap: 80 })\`), an object exactly one field of which holds the element (\`question: text.medium({ label: "Question", cap: 48, source: el })\`), or an object declared plainly whose members the write answers (\`item: object({ label: text.short({ label: "Unit" }), fields: { \u2026 } })\`).`}function ni(e){if(typeof e!="object"||e===null||e.type!=="object")return!1;let t=e.fields??{};return!Object.values(t).some(n=>W(n.source))}function Zo(e,t){if(e.type!=="object")return;let n=Object.entries(e.fields).filter(([,r])=>r.type!=="row"&&r.source?.kind==="element");if(n.length!==1)throw new Error(ti(t,n.length===0?"its object item holds the element in no field":`its object item holds the element in ${String(n.length)} fields (${n.map(([r])=>`"${r}"`).join(", ")}) \u2014 one field holds it`))}function Ea(e,t){let n=e.element;if(n===void 0||n.type==="object")throw new Error(`list: "${t}" lists the items of a list of objects \u2014 declare \`item\` to say what each item holds.`);return n.type==="row"?{type:"row",from:n.from,source:{kind:"element"}}:_a(n)}function sr(e,t){return`list: "${e}" is picked by a \`fill.pick\` and ${t} \u2014 the item holds the pick in the field holding its candidates: a candidate holder itself (\`item: image({ from: fact.property.property_media })\`, \`item: row({ label: "Agent", from: fact.property.contacts })\`), or an object exactly one field of which holds candidates and no source, which its siblings read by its const (\`const photo = image({ label: "Photo", from: fact.property.property_media }); object({ fields: { photo, caption: text.short({ label: "Caption", source: fill.write({ reads: [photo], brief }) }) } })\`).`}function ar(e){let t=N(e);return t.type==="row"?typeof t.from=="string":t.type==="select"?Array.isArray(t.values):typeof t.type=="string"&&(C(t.type)||t.type==="media")&&t.from!==void 0}function lr(e){return N(e).source===void 0&&q(e)===void 0}function ri(e,t){if(e.type!=="object")return ar(e)&&lr(e)?null:void 0;let n=me(e)??e.fields??{},r=Object.entries(n).filter(([,s])=>typeof s=="object"&&s!==null&&ar(s)&&lr(s)),o=r.filter(([,s])=>N(s).type!=="select"),i=o.length>0?o:r;if(i.length>1)throw new Error(`list: "${t}"'s item declares ${String(i.length)} fields with \`from\` and no source (${i.map(([s])=>`"${s}"`).join(", ")}) \u2014 a picked list's item holds its pick in exactly one; give the others a source of their own.`);return i.length===1?i[0][0]:void 0}function Qo(e){return{...pe(e),source:{kind:"element"}}}function ir(e,t){if(t===void 0)return null;let n=t===null?e:(me(e)??e.fields)[t],r=N(n);return r.type==="row"?E(r.from):null}function Ia(e,t){if(t===null)return Qo(e);let n=e,r=(me(e)??n.fields)[t],o=s=>s===r||typeof s=="object"&&s!==null&&N(s)===N(r)?{kind:"element"}:s,i={};for(let[s,a]of Object.entries(n.fields))i[s]=s===t?Qo(a):ie(a,o);return tr({...n,fields:i},n)}function Aa(e,t,n){let r=i=>{if(!W(i))return i;if(xo(i)!==t)throw new Error(`list: "${n}"'s item reads the element of another list \u2014 an element is read only inside its own list's item.`);return{kind:"element"}};if(e.type==="object"){let i=e,s={},a=!1;for(let[l,d]of Object.entries(i.fields))s[l]=pe(ie(d,r)),s[l]!==d&&(a=!0);return a?tr({...i,fields:s},i):i}return pe(ie(e,r))}function oi(e,t){let n=e.type==="object"?Object.entries(e.fields):[["",e]];for(let[r,o]of n){let i=o.source;if(i?.kind==="home")throw new Error(`list: "${t}"'s item${r===""?"":` field "${r}"`} is bound to the fact "${String(i.key)}", which is the same value in every item \u2014 read the element or a row's member instead; a property fact belongs in a fill's or a \`compute()\`'s \`reads\`.`)}}function ja(e,t){if(e.item===void 0)return $a(e.source,t);let n=new Set((G(e.source,`list: "${t}"`)??[]).map(l=>l.verb));if(n.has("pick")){let l=Pa(e.item,t);return n.has("write")&&Zo(l,t),l}let r={},o=Object.freeze({kind:"element",[Dn]:r,[Kt]:ei(e.source)}),i=typeof e.item=="function"?e.item(o):e.item;if(typeof i!="object"||i===null||typeof i.type!="string")throw new Error(`list: "${t}"'s item is no slot \u2014 return a value slot, a row or an object.`);if(i.type==="list")throw new Error(`list: "${t}"'s item is a list \u2014 a list's item is a value slot, a row or an object; a list never holds lists.`);if(i.type!=="object"&&q(i)!==void 0)throw new Error(`list: "${t}"'s item declares a fill \u2014 one decision produces the whole list, so the fill belongs on the list's \`source:\`; a field of an object item may carry its own.`);oi(i,t);let s=Aa(i,r,t);if(n.has("write")&&!ni(e.item)&&Zo(s,t),s.type==="object"||s.type==="row")return s;let a={...s};return delete a.locked,a}function Pa(e,t){if(typeof e=="function")throw new Error(sr(t,"declares its item as a function"));if(typeof e!="object"||e===null||typeof e.type!="string")throw new Error(`list: "${t}"'s item is no slot \u2014 return a value slot, a row or an object.`);let n=ri(e,t);if(n===void 0)throw new Error(sr(t,"its item declares no field with `from` and no source"));oi(e,t);let r=Ia(e,n);if(r.type==="object"||r.type==="row")return r;let o={...r};return delete o.locked,o}function Ta(e,t){let n=e.source;if(!(n===void 0||(G(n,"list")??[]).some(i=>i.verb==="pick"))||typeof e.item!="object"||e.item===null)return ei(n);let o=e.item;if(n===void 0){if(o.type!=="object")return ir(o,ar(o)?null:void 0);let i=Object.entries(me(o)??{}).filter(([,s])=>N(s).type==="row"&&lr(s));return i.length===1?ir(o,i[0][0]):null}return ir(o,ri(o,t))}function H(e){let t=e.label??"list",n=e.source,r=G(n,`list: "${t}"`),o=ni(e.item),i=r?.every(d=>d.verb==="pick"||d.verb==="write"&&o)===!0;if(r!==void 0&&e.max===void 0&&!i)throw new Error(`list: "${t}" is filled but declares no \`max\` \u2014 a fill is an open supply, so the list bounds it.`);for(let d of r??[])if(d.verb==="pick"&&d.of!==void 0)throw new Error(`list: "${t}"'s \`fill.pick\` states \`of\` \u2014 a list's pick chooses from its item's \`from\`; remove \`of\`.`);let s={type:"list",...at(e,d=>Ra(d,t)),element:ja(e,t),...e.min!==void 0?{min:e.min}:{},...e.max!==void 0?{max:e.max}:{}},a=L(n)?or(s.element):void 0,l=a===void 0?Ta(e,t):a.length===1?a[0]:null;return qt(s,l)}function Gt(e,t){if(t!==void 0&&(typeof t!="object"||t===null||Array.isArray(t)))throw new Error(`process.${e}(): takes an options object, or nothing.`);let n={kind:"process",verb:e};for(let[o,i]of Object.entries(t??{}))i!==void 0&&(n[o]=i);let r=Rn(n);if(r!==null)throw new Error(`process.${e}(): ${r}.`);return n}function Ma(e){return Gt("cutout",e)}function Fa(e){return Gt("autocrop",e)}function ae(e,t){return Gt(e,t)}function Ca(e){return ae("probe",e)}function Da(e){return ae("understand",e)}function La(e){return ae("preview",e)}function Na(e){return ae("ladder",e)}function Ha(e){return ae("transcode",e)}function Ua(e){return ae("poster",e)}function Ka(e){return ae("rasterize",e)}function qa(e){return ae("fetch",e)}function Va(e){return ae("tour_details",e)}function Ba(e){return Gt("crop",e)}var Wa={cutout:Ma,autocrop:Fa},Yt={...Wa,probe:Ca,understand:Da,preview:La,ladder:Na,transcode:Ha,poster:Ua,rasterize:Ka,fetch:qa,tour_details:Va,crop:Ba};function za(e,t="a list"){return`${e} is sourced by ${t} \u2014 a row's slot source names a row, which it mirrors. A list's first row is a \`compute()\` over the list: \`source: compute({ reads: [list] }, (rows) => rows[0] ?? null)\`.`}function Ga(e,t){if(I(e))throw new Error(`row: "${t}" is sourced by the fact "${e.key}" \u2014 a table is a row's \`from\`, never its source: \`row({ label, from: fact.${e.key} })\` holds its first row, which the user may re-pick.`);if(B(e))return{kind:"section",section:e.section,slot:e.slot};if(T(e))return{kind:"sibling",of:e};if(W(e)||L(e))return Object.freeze({...e});throw new Error(`row: "${t}" declares a source that is no element, slot, compute or pick.`)}function Ya(e,t){if(Array.isArray(e))return Ja(e,t);let n=I(e)?E(e.key):null;if(n!==null)return{key:e.key,tables:[n]};let r=re(e);if(r!==void 0){let o=`${String(N(r).from)}.${e.field}`;if(Yn(o)!==null)return{key:o,tables:[]}}throw new Error(e===void 0?`row: "${t}" declares no \`from\` \u2014 a row names its fact data: a table (\`row({ label, from: fact.property.contacts })\`) or a row's list-valued member (\`from: unit.floor_plans\`).`:`row: "${t}"'s \`from\` is ${I(e)?`the fact "${e.key}", which is not a table`:"no table or list-valued member"} \u2014 a row's \`from\` is a fact table (\`fact.property.contacts\`) or a table row's list-valued member (\`unit.floor_plans\`).`)}function Ja(e,t){if(e.length===0)throw new Error(`row: "${t}" declares \`from: []\` \u2014 a row names the table it is a row of.`);let n=[],r=[];for(let o of e){let i=I(o)?E(o.key):null;if(i===null)throw new Error(`row: "${t}"'s \`from\` lists ${I(o)?`the fact "${o.key}", which is not a table`:"something that is no table"} \u2014 a row's list of \`from\` names tables (\`[fact.property.contacts, \u2026]\`); a list-valued member is a row's only \`from\`.`);if(r.includes(i))throw new Error(`row: "${t}" names the ${i} table twice in \`from\` \u2014 each table is named once.`);n.push(o.key),r.push(i)}return{key:n.length===1?n[0]:n,tables:r}}function Xa(e,t,n){let r=st(T(e)||W(e)?e:void 0);if(!(r===null||t.includes(r)))throw new Error(`row: "${n}" is \`from\` the ${t.join(", ")} table${t.length===1?"":"s"} but its source holds a row of ${r} \u2014 a row's source yields a row of its own \`from\`.`)}function ii(e){let{key:t,tables:n}=Ya(e.from,e.label),r=n[0]??null;if(r===null&&!W(e.source))throw new Error(`row: "${e.label}" is \`from\` the list-valued member "${t}" but its source is no element \u2014 a row from a member holds an item of it, the element of the list over that member: \`source: entry\`.`);if(T(e.source)&&e.source.type==="list")throw new Error(za(`row: "${e.label}"`));let o=G(e.source,`row: "${e.label}"`);for(let a of o??[]){if(a.verb!=="pick")throw new Error(`row: "${e.label}" is filled by \`fill.${a.verb}\` \u2014 a row holds a row that exists, which only a \`fill.pick({ brief })\` out of its \`from\` yields.`);if(a.of!==void 0)throw new Error(`row: "${e.label}"'s \`fill.pick\` states \`of\` \u2014 a row's pick chooses from its \`from\`; remove \`of\`.`)}o===void 0&&e.source!==void 0&&r!==null&&Xa(e.source,n,e.label);let i=at(e,a=>Ga(a,e.label)),s=qt({type:"row",from:t,...i},r);return To(s,r,n.slice(1))}var Za=["property","library"];function le(e,t){if("label"in e)throw new Error("fact registry: a page head holds no `label` \u2014 the declaration states the fact's name");for(let n of["title","description"]){let r=e[n];if(typeof r=="string"&&r.trim()==="")throw new Error(`fact registry: a page declares an empty ${n}`)}return{head:e,declaration:t}}var Qa=new Set(["home","item"]);function ur(e,t,n){let r=typeof t=="object"&&t!==null?n.pages.get(t):void 0;if(r!==void 0)return{kind:"home",key:`${n.home}.${r}`};if(vo(t)){let i=n.pages.get(t);if(i===void 0)throw new Error(`${e} reads a page that is not one of this registry's \u2014 a registry reads its own facts by their page's const.`);return{kind:"home",key:`${n.home}.${i}`}}let o=Ne(t)?t.of:t;if(T(o)){let i=n.fields?.get(o);if(i===void 0)throw new Error(`${e} reads the declaration "${o.label??o.type}", which is not a field of the same item \u2014 a field reads its siblings by their consts, and a top-level fact by its page's const.`);return{kind:"item",field:i}}if(I(t)&&[...n.pages.values()].some(i=>t.key===`${n.home}.${i}`))return{kind:"home",key:t.key};if(I(t))throw new Error(`${e} is bound to the fact "${t.key}" \u2014 a registry declares the facts; it reads a sibling page by its const and binds none.`);if(B(t))throw new Error(`${e} reads a section's slot \u2014 a registry reads no section.`);if(W(t)&&n.picked===!0)return{kind:"element"};if(W(t))throw new Error(`${e} reads the element \u2014 a registry's list nothing picks is built by the user, so its item's fields read one another by const.`);if(re(t)!==void 0)throw new Error(`${e} reads the member "${t.field}" of a row that is not a field of the same item.`);if(Ln(t)&&typeof t.slot=="string")return{kind:"row",slot:t.slot,field:t.field};if(typeof t=="object"&&t!==null&&Qa.has(String(t.kind)))return t;throw new Error(`${e} declares a read a registry cannot answer.`)}function el(e,t,n){return Array.isArray(t)?t.length===1?dr(e,t[0],n):t.map(r=>dr(e,r,n)):dr(e,t,n)}function dr(e,t,n){let r=typeof t=="object"&&t!==null?n.pages.get(t):void 0,o=typeof t=="string"?t:r===void 0?void 0:`${n.home}.${r}`;if(o===void 0||!n.mediaLists.has(o))throw new Error(`${e} picks \`from\` something other than one of this registry's media lists \u2014 a media field picks from a list of media (the \`uploads\` page, a sorted list), by its const, or owns its media.`);return o}function fr(e,t,n){let r=t.reads.map(o=>ur(e,o,n));return t.requires===void 0?{kind:"compute",fn:t.fn,reads:r}:{kind:"compute",fn:t.fn,reads:r,requires:t.requires.map(o=>ur(e,o,n))}}function tl(e,t){if(t.when!==void 0)throw new Error(`${e} declares \`when\` \u2014 a registry has no display variant; a page is drawn when a template reads it.`);if(t.required!==void 0)throw new Error(`${e} declares \`required\` \u2014 a fact requires nothing on its own account; what a property must answer is what its templates require.`);if(t.type==="poi")throw new Error(`${e} is a poi \u2014 a place the platform builds is no fact.`)}function nl(e,t,n){let r=q(n)??[];if(t==="library"&&r.length>0)throw new Error(`${e} declares a fill \u2014 a library's facts are the org's own, and nothing fills them.`);if(r.some(o=>o.verb==="find"))throw new Error(`${e} declares a \`find\` \u2014 a home's fact is answered, written or picked, never looked up.`)}function rl(e,t){let{type:n,fields:r}=t;if(n!=="object"||r===void 0)return;let o=Object.entries(r).filter(([,i])=>i.type==="row");if(o.length>0)throw new Error(`${e} holds a picked row in ${o.map(([i])=>`"${i}"`).join(", ")} \u2014 a list picking rows declares the row as its item (\`item: row({ from })\`), whose members are the row's.`)}function ol(e){let t=new Map,n=e.fields;for(let r of[n,me(e)??{}])for(let[o,i]of Object.entries(r))typeof i=="object"&&i!==null&&t.set(i,o);return t}function pr(e,t,n){tl(e,t),nl(e,n.home,t);let r=pe(ie(t,o=>ur(e,o,n)));switch(r.from!==void 0&&(C(String(r.type))||r.type==="media")&&(r={...r,from:el(e,t.from,n)}),r.type){case"object":{let o={},i={...n,fields:ol(r)};for(let[s,a]of Object.entries(r.fields))o[s]=pr(`${e}.${s}`,a,i);r={...r,fields:o};break}case"list":{let o=r.max,i={home:n.home,pages:n.pages,mediaLists:n.mediaLists},s=q(t)?.some(l=>l.verb==="pick")===!0,a=pr(`${e}[]`,r.element,s?{...i,picked:!0}:i);rl(`${e}[]`,a),r={...r,element:a,...Ct(o)?{max:fr(`${e}.max`,o,i)}:{}};break}default:break}return r}function il(e,t,n,r){let o=`${e}.${t}`,i=pr(o,n.declaration,r);if(i.type==="object")throw new Error(`${o} is an object \u2014 a top-level fact is a value or a list; a group of fields is a list's item.`);if(i.label===void 0)throw new Error(`${o} declares no \`label\` \u2014 a top-level fact states the name its page and its Details section show it by.`);if(n.head===null)return{head:null,declaration:i};let{title:s,description:a}=n.head;return{head:{title:typeof s=="string"?s:fr(`${o}.title`,s,r),description:typeof a=="string"?a:fr(`${o}.description`,a,r)},declaration:i}}var sl=["home","pages"];function al(e){return"head"in e&&"declaration"in e}function ll(e){let t=e.element;return e.type==="list"&&typeof t?.type=="string"&&(C(t.type)||t.type==="media")}function ai(e,t){if(!Za.includes(e))throw new Error(`fact registry: "${e}" is not a home`);let n=new Map,r=new Set,o={};for(let[l,d]of Object.entries(t)){if(sl.includes(l))throw new Error(`fact registry: ${e} declares a page keyed "${l}", a registry's own key`);n.set(d,l);let f=al(d)?d:{head:null,declaration:d};o[l]=f,ll(f.declaration)&&r.add(`${e}.${l}`)}let i={home:e,pages:n,mediaLists:r},s={};for(let[l,d]of Object.entries(o))s[l]=il(e,l,d,i);let a={home:e,pages:s};for(let l of Object.keys(t))a[l]={kind:"home",key:`${e}.${l}`};return a}var dl=[{value:"for_sale",label:"For sale",icon:"tag",description:"List price, finance details, and a sold-ready layout."},{value:"for_rent",label:"For rent",icon:"key",description:"Monthly rent, lease terms, pets, and utilities."}],cl=["sold","active"],ul=["total","monthly"];function fl(e){return e==null?"active":"sold"}function pl(e){return e==="for_rent"?"monthly":"total"}var ml=6371e3;function hl(e,t,n,r){let o=l=>l*Math.PI/180,i=o(n-e),s=o(r-t),a=Math.sin(i/2)**2+Math.cos(o(e))*Math.cos(o(n))*Math.sin(s/2)**2;return 2*ml*Math.asin(Math.sqrt(a))}function yl(e,t){return e?.latitude==null||e.longitude==null||t?.latitude==null||t.longitude==null?null:Math.round(hl(t.latitude,t.longitude,e.latitude,e.longitude))}var gl=le({title:"Your contacts",description:"The people your listings name, with the headshots and logos they carry."},H({label:"Contacts",item:()=>{let e=F.short({label:"Name",cap:256});return Ue({label:e,fields:{headshot:se({label:"Headshot"}),name:e,title:F.short({label:"Title",cap:128}),org_name:F.short({label:"Organization",cap:256}),email:Ko({label:"Email"}),phone:qo({label:"Phone"}),website:Ee({label:"Website"}),address:Vt({label:"Address"}),bio:F.long({label:"Bio",cap:4e3}),logo_dark:se({label:"Logo for light backgrounds",process:[Yt.cutout()]}),logo_light:se({label:"Logo for dark backgrounds",process:[Yt.cutout()]}),instagram:Ee({label:"Instagram"}),linkedin:Ee({label:"LinkedIn"}),x:Ee({label:"X"}),facebook:Ee({label:"Facebook"})}})}})),Zt=ai("library",{contacts:gl});Un(Zt);var mr=le({title:"What\u2019s the address?",description:"We\u2019ll build your map and neighborhood details from this."},Vt({label:"Address"})),li=le({title:"For sale or for rent?",description:"This adjusts the pricing details we ask for."},lt({label:"Listing intent",from:[...dl]})),ye=le({title:"Add photos, docs, and links",description:"Everything you add helps fill and enrich your website."},H({label:"Uploads",item:Bt()})),hr=H({label:"Media",item:Bt({kinds:["image","video","tour"],from:ye}),source:z.pick({brief:"Does this upload show the property? It belongs when its name or account says it is a photograph, a rendering, a video or a virtual tour of the property: its building, rooms, grounds, amenities, surroundings or views. It does not belong when its name or account says it is a floor plan or another diagram; a logo, wordmark or brand graphic; a headshot, portrait or other photograph of a person or people; a flyer, ad, business card, slide or other image that is mostly text; a screenshot; a map; or a scanned document page. When neither its name nor its account says what it is, you cannot tell. Order what belongs as a walk through the property: aerial and street views first, then the approach and entry, then the interiors room by room (living spaces, kitchen and dining, bedrooms, bathrooms), then outdoor spaces, amenities, surroundings and views, with every shot of one space together. A video or tour sits with the space it shows, and one of the whole property comes first."})}),di=H({label:"Floor plans",item:se({label:"Floor plan",from:ye,process:[Yt.cutout({enclosed:"keep"})]}),source:z.pick({brief:"Is this upload exactly one floor plan? A floor plan is a top-down view of one floor of a dwelling's rooms and walls \u2014 drawn or rendered, flat or in 3D, at any size. It belongs when its name or account says it shows one floor plan, whatever title, figures or text are printed around it. It does not belong when its name or account says it holds two or more plans, or says it is something else: a building key or locator diagram (the building's outline with one unit shaded), a site, plot, parking or driveway diagram, a standalone legend, scale bar or north arrow, a logo, a photograph, or plain text. When neither its name nor its account says what it is, or how many plans it holds, you cannot tell. Order what belongs from the lowest floor to the highest; plans of several units go in the order the units are numbered, each unit's floors together."})}),bl=H({label:"Documents",item:Bt({kinds:["document","image","video"],from:ye}),source:z.pick({brief:"Does this upload set out the property's specifics? It belongs when its name or account says it records its figures, finances, terms, legal record, condition or plans: an offering memorandum, brochure, listing sheet, rent roll, financials, comparables, lease, survey, site plan, plan set, disclosure or report. It does not belong when its name or account says it is a photograph, rendering, video or tour showing the property; an image of floor plans or elevations; a logo; a photograph of people; an ad, sign or announcement; a map; or notes for whoever makes the marketing. When neither its name nor its account says what it is, you cannot tell. Order what belongs as a buyer reads it: the offering memorandum, brochure or listing sheet first, then the financials, rent roll and comparables, then the leases, legal record and disclosures, then the reports, surveys and plans."})}),wl=se({label:"Hero",from:hr,source:z.pick({brief:"Choose the single cover photo for the property's page. The cover is a wide banner above the property's address, so it must stand for the whole property at a glance. Only an image whose name or account says it is a photograph of the property can be chosen. Never choose a logo, wordmark or other brand graphic; an agent, team or company headshot; a flyer, ad, business card, slide or any image that is mostly text; a screenshot; a map; a scanned document or brochure page; or a floor plan or other diagram \u2014 nor an image whose name and account do not say what it is. Among the photographs of the property prefer, in order: a front exterior of the building; another exterior or aerial view; the widest, brightest shot of the main living space. Rank close-up details, bathrooms, utility spaces, empty rooms and anything that reads as a fragment rather than a place last: they are weaker covers, never excluded, so when they are the only photographs of the property, choose the best of them. If not one candidate is a photograph of the property, choose none: no banner beats a banner that is not the property."})}),kl=Ee({label:"Website"}),xl=`Is this floor plan labelled for this unit? Its label is read from its name and the text printed on it, never from the rooms drawn or any figures. It belongs when its label names this unit: the unit's label or a plain variant of it ("Unit 3", "#3", "Apt 3" and "Residence 3" all label "Unit 3"); a descriptor the unit's label carries in brackets, like "(PH)", may be left off. A plan labelling several units, such as a shared floor printed "Unit 1/2/3", belongs to each of them. It is excluded when it labels other units and not this one. When it labels no unit, you cannot tell. Order what belongs from the lowest floor to the highest.`,vl=`Is this photo labelled for this unit? Its label is read from its name, the text printed on it and a caption its account records, never from the rooms it shows, any figures, how much it looks like the unit or where it falls among the uploads. It belongs when its label names this unit: the unit's label or a plain variant of it ("Unit 3", "#3", "Apt 3" and "Residence 3" all label "Unit 3"); a descriptor the unit's label carries in brackets, like "(PH)", may be left off. A photo labelled for several units belongs to each of them. It is excluded when it labels other units and not this one. When it labels no unit, you cannot tell.`,Sl=[`List every dwelling the uploads present with its own specs printed \u2014 its beds, baths, square feet, asking price or rent written out for that dwelling: the home a listing describes, or each unit a building's documents name or number. A dwelling the uploads only name, picture or mark with a status, with no specs of its own, is not listed. A plan or row printed for several units ("Unit 4/6") lists each of those units, each with what is printed for it. A dwelling named in several uploads, or on several pages, is one item carrying everything they print for it. A unit-mix row standing for several unnamed units is not a dwelling; neither is a commercial space, a whole building, a comparable property, a market average or a portfolio total.`,"Every member is what an upload prints as text for that dwelling, and nothing else. An upload's own text, as its account quotes it (a document's or a sheet's content, an image's printed words), is what it prints; the account's description of what a drawing, a photo or a map shows (the rooms, the doors, the spaces) is never a member's source. Never count rooms; never compute, round or convert a figure; never carry one across from another dwelling, a unit-mix average or the building's totals; never add what is usual for a dwelling of its kind. A figure printed for a neighbourhood, a development or the building is never a dwelling's, and a count or fee is 0 only where the uploads print none for that dwelling. A member no upload prints for that dwelling is null, and a null is always better than a guess.",`label: the unit's own name as printed \u2014 its unit number or name ("201", "Residence 201", "4B", "Penthouse 501"), without a word marking its status ("model", "available") \u2014 and never its street address. A dwelling presented alone, with no unit name, is always labelled "Home", whatever name the uploads print for the home itself.`,"beds, baths, sqft: exactly as printed for that dwelling; a studio has one bedroom.",'price: the asking price or monthly rent as written for that dwelling, or its status word ("Sold", "Leased", "Request for Info").','floor: the floor of its building the dwelling sits on, as printed ("3", "PH", "Ground", "3 to 4"); never read off its unit number.',"hoa_monthly: the HOA, condo or strata fee printed per month for that dwelling. A fee printed for another period, or for the building, is null.",'parking: the number of parking spaces printed for that dwelling ("1 deeded space" is 1, "two-car garage" is 2). Parking printed with no count, or for the building, is null.',"lot_sqft: the lot size printed in square feet for that dwelling: a home's own lot. A lot in another unit, or the lot of a building several dwellings share, is null.",`amenities: a feature this dwelling has that the other dwellings in its building do not, in a few words as an upload states it, such as "Private roof deck", "Corner unit", "Harbor views". Check each one against the other dwellings: a feature printed for two of them, or for the building, is the building's and goes on no dwelling, however a sheet praises it; a routine fitting or finish, a note printed on a plan, or what its other members already say sets nothing apart. Most dwellings have none. Leave the list empty when nothing is this one's alone.`,"When the uploads present no dwelling with its own specs printed, return no items."].join(`
146
-
147
- `),Jt=F.short({label:"Unit"}),Rl=M({label:"Beds"}),Ol=M({label:"Baths",decimals:!0}),ci=M({label:"Sq ft",thousandsSep:!0}),ui=F.short({label:"Price",cap:40}),fi=F.short({label:"Building floor(s)",cap:20}),pi=M({label:"Parking spaces"}),mi=H({label:"Amenities",max:12,item:F.short({cap:40})});function hi(e,t){return H({label:"Floor plans",source:z.pick({reads:[e],brief:t}),item:Ue({fields:{image:se({label:"Floor plan",from:di}),floor:lt({label:"Floor",from:[...Ro],creatable:!0})}})})}function yi(e,t){return H({label:"Photos",source:z.pick({reads:[e],brief:t}),item:se({label:"Photo",from:hr})})}var _l=le({title:"Tell us about the units",description:"Add each unit\u2019s details and floor plans so they appear on your website."},H({label:"Units",source:z.write({reads:[ye],brief:Sl}),item:Ue({label:Jt,fields:{label:Jt,beds:Rl,baths:Ol,sqft:ci,price:ui,floor:fi,hoa_monthly:M({label:"Monthly HOA fee"}),parking:pi,lot_sqft:M({label:"Lot sq ft",thousandsSep:!0}),amenities:mi,floor_plans:hi(Jt,xl),photos:yi(Jt,vl)}})})),$l=`Is this floor plan labelled for this space? Its label is read from its name and the text printed on it, never from the rooms drawn or any figures. It belongs when its label names this space: the space's label or a plain variant of it ("Suite 200", "Ste 200" and "#200" all label "Suite 200"); a descriptor the space's label carries in brackets may be left off. A plan labelling several spaces belongs to each of them. It is excluded when it labels other spaces and not this one. When it labels no space, you cannot tell. Order what belongs from the lowest floor to the highest.`,El=`Is this photo labelled for this space? Its label is read from its name, the text printed on it and a caption its account records, never from what it shows, any figures, how much it looks like the space or where it falls among the uploads. It belongs when its label names this space: the space's label or a plain variant of it ("Suite 200", "Ste 200" and "#200" all label "Suite 200"); a descriptor the space's label carries in brackets may be left off. A photo labelled for several spaces belongs to each of them. It is excluded when it labels other spaces and not this one. When it labels no space, you cannot tell.`,Il=["List every commercial space the uploads present with its own specs printed \u2014 its use, square feet, rent or price written out for that space: each shop, office suite, restaurant or other non-residential space a building's documents name or number. A space the uploads only name, picture or mark with a status, with no specs of its own, is not listed. A space named in several uploads, or on several pages, is one item carrying everything they print for it. A dwelling is never a commercial space; neither is a whole building, a comparable property, a market average or a portfolio total.","Every member is what an upload prints as text for that space, and nothing else. An upload's own text, as its account quotes it (a document's or a sheet's content, an image's printed words), is what it prints; the account's description of what a drawing, a photo or a map shows is never a member's source. Never compute, round or convert a figure; never carry one across from another space or the building's totals; never add what is usual for a space of its kind. A member no upload prints for that space is null, and a null is always better than a guess.",`label: the space's own name as printed ("Retail A", "Suite 200", "Ground-floor restaurant"), without a word marking its status ("available", "leased"), and never its street address.`,'use: what the space is for, as printed ("Retail", "Office", "Restaurant").',"sqft: the square feet printed for that space.",'price: the rent or price as written for that space ("$45/SF/yr", "$8,500/mo"), or its status word ("Leased", "Call for pricing").','floor: the floor of its building the space sits on, as printed ("1", "Ground", "Mezzanine"); never read off its suite number.',"parking: the number of parking spaces printed for that space. Parking printed with no count, or for the building, is null.",`amenities: a feature this space has that the other spaces in its building do not, in a few words as an upload states it, such as "Corner frontage", "Drive-thru", "Grease trap". Check each one against the other spaces: a feature printed for two of them, or for the building, is the building's and goes on no space, however a sheet praises it; a routine fitting or finish, a note printed on a plan, or what its other members already say sets nothing apart. Most spaces have none. Leave the list empty when nothing is this one's alone.`,"When the uploads present no commercial space with its own specs printed, return no items."].join(`
148
-
149
- `),Xt=F.short({label:"Space"}),Al=le({title:"Tell us about the commercial spaces",description:"Add each space\u2019s details and floor plans so they appear on your website."},H({label:"Commercial spaces",source:z.write({reads:[ye],brief:Il}),item:Ue({label:Xt,fields:{label:Xt,use:F.short({label:"Use",cap:40}),sqft:ci,price:ui,floor:fi,parking:pi,amenities:mi,floor_plans:hi(Xt,$l),photos:yi(Xt,El)}})})),jl="List the comparable properties the uploads present: other properties an upload sets beside the property it markets, so that property's price and specs can be weighed against theirs. They appear as rows of a sales or rent comparables table, as panels with their own photo and figures, as numbered pins in a map legend, or as lines in a survey of recent trades. The property the uploads market is the one this request is for, whatever address they print for it; in a building, it is the building and every unit the uploads market in it. It is never a comparable, even where it appears in a comparables table or at the centre of a comparables map, and an upload presenting it or one of its units for itself, such as its listing sheet, brochure, price list or market history, presents no comparable. Another unit of its building is a comparable only where an upload sets it beside the property as one, such as a sister unit's earlier sale in a comps table. A market or area average, a portfolio total, or anything else that is not one property is not a comparable. Read every upload whole, including tables that continue onto the next page. Each figure is what an upload prints as text for that property, copied exactly, and a listing's remarks word for word: never counted off a floor plan, a photo or a map, never worked out from other figures (a price per unit times a unit count, a price over a size, the days between two dates, a yearly fee made monthly, an average of rows), and never carried over from a neighbouring row, a summary or the property itself. A studio has one bedroom. A property listed in several places is one item carrying every figure those places state. A figure no upload states for that property is null. When no upload sets another property beside the one it markets, return no items.",cr=Vt({label:"Address"}),si=Zn({label:"Sale date"}),Pl=le({title:"Which properties compare?",description:"Recently sold or listed homes like this one shape the pricing story."},H({label:"Comparables",max:50,source:z.write({reads:[ye,mr],brief:jl}),item:Ue({label:cr,fields:{address:cr,price:M({label:"Price"}),sale_date:si,beds:M({label:"Beds"}),baths:M({label:"Baths",decimals:!0}),sqft:M({label:"Sq ft"}),photo:se({label:"Photo"}),year_built:M({label:"Year built"}),lot_sqft:M({label:"Lot sq ft"}),stories:M({label:"Stories",decimals:!0}),units:M({label:"Units"}),hoa_monthly:M({label:"HOA per month"}),list_price:M({label:"List price"}),listed_date:Zn({label:"Listed date"}),mls_number:F.short({label:"MLS number"}),description:F.long({label:"Description"}),status:lt({label:"Status",from:[...cl],locked:!0,source:Ft({reads:[si]},e=>fl(e))}),distance_m:M({label:"Distance (m)",locked:!0,source:Ft({reads:[cr,mr]},(e,t)=>yl(e,t))}),price_period:lt({label:"Price period",from:[...ul],locked:!0,source:Ft({reads:[li]},e=>pl(e))})}})})),Tl=le({title:"Who\u2019s on this listing?",description:"Add the contacts for this property, and drag them into the order your marketing shows them."},H({label:"Contacts",min:1,max:12,source:z.pick({reads:[ye],brief:"Choose this listing's contacts from the library's contacts, judging each one's name, title, organisation, email and phone against the read uploads' names and accounts. A contact may be chosen only when an upload's name or account says it prints their email or phone, or their full name, as a contact for this listing \u2014 an agent, broker, or sales or leasing contact. A contact the uploads leave out, where their accounts name the listing's contacts, is not chosen. A shared organisation, a matching first name, or a name printed in another role (an architect, a photographer, a seller) is not evidence. When no upload's account names any contact, choose none. Order those chosen as the uploads present them for this listing, the first or most prominent first."}),item:ii({label:"Contact",from:Zt.contacts})})),de=ai("property",{address:mr,listing_intent:li,description:le({title:"Describe the property",description:"Talk it up like you would to a buyer, and our AI writes your website copy."},F.long({label:"Description"})),uploads:ye,property_media:hr,floor_plans:di,property_documents:bl,hero:wl,site_url:kl,units:_l,commercial_spaces:Al,contacts:Tl,comparables:Pl});Un(de);function pt(e){return Kn(de).has(e)}function Ml(e){let t=Kn(de).get(e);if(t===void 0)throw new Error(`fact registry: "${e}" names no property fact`);return t}function yr(e){return Ml(e).value_type}function Fl(){return Eo(de)}function gi(e){return typeof e=="string"&&Fl().includes(e)}function Cl(e){return typeof e=="string"?e:null}function Dl(e){let t=fe(e);return t===void 0?null:{media:t}}function bi(e,t){let[,n="",r]=e.split("."),o=t[n];switch(yr(`property.${n}`)){case"address":{let i=Q(o);return r===void 0?i:i===null?null:i[r]}case"image":return Dl(o);case"number":return typeof o=="number"?o:null;case"text":return Cl(o)}}function wi(e){return e!==null&&typeof e=="object"?e:null}function Ae(e){let t=wi(e);if(t?.kind!=="row")return null;let{slot:n,field:r}=t;return typeof n!="string"||n===""||typeof r!="string"||r===""?null:{slot:n,field:r}}function je(e){return Object.entries(e??{}).filter(([,t])=>t.type==="row"&&wi(t.source)?.kind==="element").map(([t])=>t)}function ki(e){let t=new Set(je(e)),n={};for(let[r,o]of Object.entries(e??{})){let i=Ae(o.source);i!==null&&t.has(i.slot)&&(n[r]=i.field)}return n}function Qt(e){return Wn(Nt(e)==="library"?Zt:de,e)}function Ll(e,t){return Gn(Qt(e),t)}function xi(e){return Object.keys(Qt(e))}function Si(e,t){if(t==="id")return{kind:"identity"};let n=t.indexOf("."),r=n===-1?t:t.slice(0,n),o=oe(e,r)??null;if(o===null)return{kind:"unknown",offers:xi(e)};if(n!==-1){let i=t.slice(n+1);return o!=="address"?{kind:"unknown",offers:xi(e)}:_e(i)?{kind:"member",value_type:qn(i),storable:vi(e,t)}:{kind:"unknown",offers:ot.map(s=>`${r}.${s}`)}}return{kind:"member",value_type:o,storable:vi(e,t)}}function vi(e,t){if(t===void 0){if(E(e)!==null)return!0;if(!pt(e))return!1;let r=e.slice(0,e.lastIndexOf("."));return!(pt(r)&&yr(r)==="address")}if(!Vn().includes(e))return!1;let n=Ll(e,t);return n!==void 0&&!Io(n)}function en(e,t){let n=Object.entries(Qt(e)).filter(([,o])=>Lt(o)==="address").map(([o])=>o);return t[e].map(o=>{let i={...o};for(let s of n)i[s]=Q(o[s]);return i})}function gr(e,t,n){let r=Si(e,n);if(r.kind==="identity")return t.id??null;if(r.kind==="unknown")return null;let o=n.indexOf(".");if(o===-1)return t[n]??null;let i=n.slice(o+1);return _e(i)?ko(t[n.slice(0,o)],i):null}function Ri(e,t,n){return en(e,n).find(r=>r.id===t)}function br(e,t,n,r){let o=Ri(e,t,r);return o===void 0?null:gr(e,o,n)}function tn(e,t,n,r={},o){let i=je(n);return Nl(e,t,ki(n),i,r,o)}function Nl(e,t,n,r,o,i){return(i===void 0?en(e,t):i.flatMap(a=>{let l=Ri(e,a,t);return l===void 0?[]:[l]})).map(a=>{let l={id:a.id};for(let d of r)l[d]=a.id;for(let[d,f]of Object.entries(n))l[d]=gr(e,a,f);for(let[d,f]of Object.entries(o))l[d]=f(p=>gr(e,a,p),a.id);return l})}function nn(e,t){if(pt(t))return bi(t,e);if(gi(t))return e[t.slice(9)];let n=E(t);if(n!==null)return en(n,e);let r=Ht(t);if(r!==null)return en(r.table,e).map(o=>o[r.member]??null)}function Oi(e,t){return e?.order?.[t]===!0}function wr(e,t){return e?.scalar?.[t]===!0}function Pe(e,t){return`${e}.${t}`}function Ke(e){let t=e.indexOf(".");return t<=0||t===e.length-1||e.includes(".",t+1)?null:{object:e.slice(0,t),field:e.slice(t+1)}}function kr(e,t){let n=Ke(t);if(n===null)return e[t];let r=e[n.object];return r!==null&&typeof r=="object"&&!Array.isArray(r)?r[n.field]:void 0}function _i(e,t){return{...e?.items?.[t]??{}}}function $i(e){if(e===null||typeof e!="object")return[];let t=e.reads;return Array.isArray(t)?t:[]}function Ei(e){let{kind:t,section:n,slot:r}=e??{};return t==="section"&&typeof n=="string"&&typeof r=="string"?{kind:t,section:n,slot:r}:null}function Ii(e){return $i(e).map((t,n)=>{let r=t??{},{kind:o,key:i,slot:s,field:a}=r;if(o==="home"&&typeof i=="string")return{kind:"home",key:i};if(o==="row"&&typeof s=="string"&&s!==""&&typeof a=="string")return{kind:"row",slot:s,field:a};if(o==="element")return{kind:"element"};let l=Ei(t);if(l!==null)return l;throw new Error(`reads[${String(n)}] is not a home, section, row or element ref: ${JSON.stringify(t)}`)})}function rn(e){return $i(e).flatMap(t=>Ei(t)??[])}function xr(e,t,n,r,o,i){let a=Ii(t).map(l=>{if(l.kind==="home")return nn(n,l.key);if(l.kind==="row"){if(o===void 0)throw new Error(`reads the row member "${l.field}" with no row in scope`);return o(l.field,l.slot)}if(l.kind==="element"){if(i===void 0)throw new Error("reads the element outside a list's item");return i()}return r?.(l)}).map(l=>io(l,n));return ue(e(...a))}function mt(e){let t=e.display;return t!==null&&typeof t=="object"?t:{}}var ht=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function yt(e){return e.type==="list"&&e.element!==void 0}function gt(e){return e.element?.type==="object"?e.element.fields??{}:void 0}function qe(e,t){if(typeof e=="string")return e===""?null:e;if(t!==null&&ht(e)){let n=e.id;if(typeof n=="string"&&n!=="")return n}return Ie(e,t)}function on(e,t,n){let[r]=t;if(r===void 0)return{table:null,id:qe(e,null),element:e};if(t.length>1)for(let o of t){let i=qe(e,o);if(i!==null&&ft(n,[o]).some(s=>s.id===i))return{table:o,id:i}}return{table:r,id:qe(e,r)}}function Ve(e,t,n){return e.table!==null?e.id===null?null:ue(br(e.table,e.id,t,n)):ht(e.element)?e.element[t]??null:null}function Hl(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return t.toString(16).padStart(8,"0")}function vr(e){let t=new Map;return e.map(n=>{let r=Ie(n,null)??`el_${Hl(JSON.stringify(n)??"undefined")}`,o=t.get(r)??0;return t.set(r,o+1),o===0?r:`${r}_${String(o)}`})}function bt(e,t){let{element:n,table:r,facts:o,computes:i}=t,s=n.type==="object"?n.fields??{}:void 0;return r!==null?s===void 0?e.map(a=>a.id):e.flatMap(({element:a,id:l})=>{let d=typeof a=="string"?a:l,[f]=ue(tn(r,o,s,i,[d]));return f===void 0?[]:[Ai({...f,id:l},s,o)]}):n.type==="row"?e.map(a=>a.id):s===void 0?e.map(a=>a.element):e.map(a=>Ai(Ul(a,s,i),s,o))}function ji(e){return yt(e)&&e.element?.type==="object"?e.element:void 0}function Pi(e,t,n){if(!Array.isArray(e))return e;let r=vr(e);return bt(e.map((o,i)=>({element:o,id:r[i]})),{element:t,table:null,facts:n,computes:{}})}function Ai(e,t,n){for(let[r,o]of Object.entries(t)){let i=ji(o);i!==void 0&&Object.hasOwn(e,r)&&(e[r]=Pi(e[r],i,n))}return e}function Ul({element:e,id:t,storedItem:n},r,o){let i=new Set(je(r)),s=l=>ht(e)?e[l]??null:null,a={id:t};for(let[l,d]of Object.entries(r)){if(i.has(l)){a[l]=t;continue}if(ht(d.source)&&d.source.kind==="element"){a[l]=e;continue}let f=Ae(d.source);f!==null&&i.has(f.slot)&&(a[l]=s(f.field))}for(let[l,d]of Object.entries(r)){let f=Ae(d.source);if(f===null||r[f.slot]?.type!=="address")continue;let p=Q(Object.hasOwn(a,f.slot)?a[f.slot]:n?.[f.slot]);a[l]=ht(p)?p[f.field]??null:null}for(let[l,d]of Object.entries(o))a[l]=d(s,e);return a}function Mi(e){if(e.source===null||e.source===void 0||typeof e.source!="object")return null;let t=e.source;return t.kind!=="derived"?null:typeof t.transform=="string"?{transform:t.transform}:null}function sn(e,t){let n=Array.isArray(e)?e:[];if(t!==null)return n.flatMap(o=>{let i=qe(o,t);return i===null?[]:[{element:i,id:i}]});let r=vr(n);return n.map((o,i)=>({element:o,id:r[i]}))}function Sr(e,t,n,r,o){let i={},s=new Set(je(t)),a={container:e,siblings:t??{},nested:o?.nested===!0},l=d=>{if(o===void 0)return;let f=ut(o.rows.slots,a,d);return f===void 0||f.sibling?void 0:o.rows.rows(f.path)};for(let[d,f]of Object.entries(t??{})){let p=Mi(f);p!==null&&(i[d]=(b,h)=>{let v=(A,P)=>{if(s.has(P))return b(A);let ve=l(P);return ve===void 0?void 0:Ve(ve,A,n)};return wt(p.transform,f.source,n,r,{slot_id:`${e}.${d}`},void 0,v,()=>h)?.value??null})}return i}function wt(e,t,n,r,o,i,s,a){let l=r?.computed[e];try{if(l===void 0)throw new Error(`derived handle "${e}" is not in the section's computed map`);return{value:xr(l,t,n,i,s,a)}}catch(d){return r?.log?.error({event:"derive_function_threw",section_key:r.section_key,...o,derived_handle:e,err:d},"derive: authored function threw or is missing; resolved to nothing"),null}}function Fi(e,t,n,r){let o=typeof n=="string"?n:"";return e.cases?.includes(o)===!0?o:(r?.log?.error({event:"display_compute_out_of_vocabulary",section_key:r.section_key,display_entry:t,answer:n},"display: source compute answered outside its declared cases; falling back to the first case"),null)}function Ci(e,t){return e?.[t]===!0}var Di=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function Li(e){return D(e)??null}function te(e,t){let n=Li(t);return n!==null?Li(e)===n?e:t:Array.isArray(t)?Array.isArray(e)?Vl(e,t):t:Di(t)&&Di(e)?ql(e,t):t}function ql(e,t){let n={};for(let[r,o]of Object.entries(t))n[r]=te(e[r],o);return n}function Vl(e,t){let n=new Map;for(let r of e){let o=Ie(r);if(o===null)continue;let i=n.get(o);i===void 0?n.set(o,[r]):i.push(r)}return t.map(r=>{let o=Ie(r),i=o===null?void 0:n.get(o);return i===void 0||i.length===0?r:te(i.shift(),r)})}var Bl=e=>typeof e=="string"&&e.startsWith("tmp_");function Wl(e,t){let n=[],r=new Map;for(let o of t){let i=o[e],s=typeof i=="string"?r.get(i):void 0;if(s===void 0){typeof i=="string"&&r.set(i,n.length),n.push(o);continue}n[s]={...o,...n[s]}}return n}function an(e,t,n,r,o,i){let s=i?{...e}:{};for(let[a,l]of Object.entries(t)){if(a===o){s[a]=l;continue}s[a]=n?.[a]===!0?e[a]:te(e[a],l)}for(let a of r)a in e&&(s[a]=e[a]);return s}function Rr(e){let t=e.membership??"table",n=e.idKey??"id",r=Wl(n,e.current);if(t==="table")return Gl({...e,idKey:n,current:r});let{freshSource:o,overrides:i,generatedFields:s}=e,a=new Map;for(let d of r){let f=d[n];typeof f=="string"&&a.set(f,d)}if(t==="source")return e.ordered===!0?zl(r,o,e,n):o.map(d=>{let f=d[n],p=typeof f=="string"?a.get(f):void 0;return p===void 0?d:an(p,d,i?.[f],s,n,!0)});let l=new Map;for(let d of o){let f=d[n];typeof f=="string"&&l.set(f,d)}return r.map(d=>{let f=d[n],p=typeof f=="string"?l.get(f):void 0;return p===void 0?d:an(d,p,i?.[f],s,n,!0)})}function zl(e,t,n,r){let o=new Map;for(let a of t){let l=a[r];typeof l=="string"&&o.set(l,a)}let i=[],s=new Set;for(let a of e){let l=a[r],d=typeof l=="string"?o.get(l):void 0;d===void 0||s.has(l)||(i.push(an(a,d,n.overrides?.[l],n.generatedFields,r,!0)),s.add(l))}for(let a of t){let l=a[r];typeof l=="string"&&s.has(l)||i.push(a)}return i}function Gl(e){let{current:t,freshSource:n,overrides:r,removed:o,generatedFields:i,idKey:s,ordered:a}=e,l=new Map;for(let b of n){let h=b[s];typeof h=="string"&&l.set(h,b)}let d=[],f=new Set;for(let b of t){let h=b[s];if(Bl(h)||typeof h!="string"){d.push(b);continue}let v=l.get(h);v!==void 0&&(d.push(an(b,v,r?.[h],i,s,!1)),f.add(h))}for(let b of n){let h=b[s];typeof h!="string"||f.has(h)||o?.[h]!==!0&&d.push(b)}if(a===!0)return d;let p=new Map;return n.forEach((b,h)=>{let v=b[s];typeof v=="string"&&p.set(v,h)}),d.map((b,h)=>{let v=b[s],A=typeof v=="string"?p.get(v):void 0;return{row:b,i:h,idx:A}}).sort((b,h)=>b.idx===void 0&&h.idx===void 0?b.i-h.i:b.idx===void 0?1:h.idx===void 0?-1:b.idx-h.idx).map(b=>b.row)}var _r="display.",U=(e,t)=>`${e} ${t}`,ln=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function Be(e,t){if(e===void 0)return;if(t===`${_r}visibility`)return e.enabled?"visible":"hidden";if(t===`${_r}variant`)return e.variant;if(Object.hasOwn(e.slots,t))return e.slots[t];let n=Ke(t);if(n===null)return;let r=e.slots[n.object];return ln(r)?r[n.field]:void 0}function Er(e){let t=Jl(e.sections);if(t.size===0)return{contentDoc:e.contentDoc,changed:!1,changes:[]};let n=new Map(e.contentDoc.instances.map(u=>[u.instance_id,{...u}])),r=new Set,o=u=>(r.has(u.instance_id)||(u.slots={...u.slots},r.add(u.instance_id)),u.slots),i=(u,c,k)=>{let x=Ke(c),O=o(u);if(x===null||Object.hasOwn(O,c)){O[c]=k;return}let S=O[x.object];O[x.object]={...ln(S)?S:{},[x.field]:k}},{facts:s}=e,a=u=>(e.typing?.get(u)??e.sections.get(u))?.localKey,l=(u,c)=>e.placement.locate({kind:"section",section:c.section,slot:c.slot},{instanceId:u,section:a(u)??""})?.instanceId,d=(u,c)=>l(u.instanceId,c),f=(u,c)=>Be(u===void 0?void 0:n.get(u),c),p=u=>e.typing?.get(u)??e.sections.get(u),b=u=>{let c=e.placement.readable(u);return c===void 0?void 0:p(c)?.schema.slots},h=(u,c)=>{let k=u===void 0?void 0:p(u);return k===void 0?null:Xo({section:k.localKey,slots:k.schema.slots??{},sectionSlots:b},c)},v=new Map,A=(u,c)=>({element:u.def.element??{},table:c,facts:s,computes:Sr(u.key,gt(u.def),s,u.section.bakeContext)}),P=(u,c,k,x)=>{let O=u.slots[c.key];return gt(c.def)===void 0?te(O,x):Rr({current:Array.isArray(O)?O:[],freshSource:x,overrides:_i(u.slot_overrides,c.key),generatedFields:[],membership:"source",ordered:Oi(u.slot_overrides,c.key)})},ve=(u,c,k)=>{let x=e.typing?.get(u)??e.sections.get(u),O=x===void 0?void 0:zt(x.schema.slots??{},c),S=f(u,c);if(O?.type==="address")return{value:Ve({table:null,id:null,element:Q(S)},k,s)};let $=typeof S=="string"&&S!==""?S:null,j=O===void 0?null:rr(s,he(O),$),V=v.get(U(u,c)),K=V!==void 0&&V.id===$?V:{table:j,id:$};if(!(K.table===null&&K.element===void 0&&K.id!==null))return{value:Ve(K,k,s)}},Je=(u,c)=>{let k=u.section.schema.slots??{},x=Ke(u.key),O=x===null?void 0:k[x.object]?.fields,S=x===null||O===void 0?{}:{container:x.object,siblings:O};return ut(k,S,c)?.path},_t=u=>(c,k)=>{let x=Je(u,k);return x===void 0?void 0:ve(u.instanceId,x,c)?.value},fn=(u,c)=>{if(c.kind==="reader"){let S=ve(c.instanceId,c.rowPath,c.field);return S===void 0?void 0:{value:te(Be(u,c.key),S.value)}}if(c.kind==="mirror"){let S=d(c,c.ref),$=f(S,c.ref.slot),j=h(c.instanceId,c.key);if(c.def.type==="row"){let K=on($,he(c.def),s);return v.set(U(c.instanceId,c.key),{...K,element:$}),{value:K.id}}if(c.def.type!=="list")return{value:te(Be(u,c.key),$??null)};let V=bt(sn(Array.isArray($)?$:[],j),A(c,j));return{value:P(u,c,j,V)}}let k=wt(c.transform,c.source,s,c.section.bakeContext,{slot_id:c.key},S=>f(d(c,S),S.slot),_t(c));if(c.def.type==="row"){let S=on(k?.value??null,he(c.def),s);return v.set(U(c.instanceId,c.key),S),{value:S.id}}if(yt(c.def)){let S=h(c.instanceId,c.key),$=bt(sn(k?.value??[],S),A(c,S));return{value:P(u,c,S,$)}}let x=c.def.type==="list",O=k===null?x?[]:null:k.value??(x?[]:null);return{value:te(Be(u,c.key),O)}},pn=u=>{let c=n.get(u.instanceId);if(c===void 0)return!1;if(u.kind==="display")return Yl(c,u,s,x=>f(d(u,x),x.slot),_t(u));if(u.kind!=="mirror"&&wr(c.slot_overrides,u.key))return!1;let k=fn(c,u);return k===void 0||Xl(Be(c,u.key),k.value)?!1:(i(c,u.key,k.value),!0)},Fe=[],w=new Set,y=new Set,m=u=>{let c=U(u.instanceId,u.key);if(!(w.has(c)||y.has(c))){y.add(c);for(let k of u.slotRefs){let x=d(u,k),O=x===void 0?void 0:t.get(U(x,k.slot));O!==void 0&&m(O)}if(u.kind==="derived"||u.kind==="display")for(let k of $r(u.source)){let x=Je(u,k),O=x===void 0?void 0:t.get(U(u.instanceId,x));O!==void 0&&m(O)}y.delete(c),w.add(c),pn(u)&&Fe.push({instance_id:u.instanceId,slot:u.key})}};for(let u of t.values())m(u);if(Fe.length===0)return{contentDoc:e.contentDoc,changed:!1,changes:Fe};let g=e.contentDoc.instances.map(u=>n.get(u.instance_id)??u);return{contentDoc:{...e.contentDoc,instances:g},changed:!0,changes:Fe}}function Yl(e,t,n,r,o){if(Ci(e.display_overrides,t.displayEntry))return!1;let i=wt(t.transform,t.source,n,t.section.bakeContext,{display_entry:t.displayEntry},r,o);if(i===null)return!1;let s=mt(t.section.schema)[t.displayEntry],a=s===void 0?null:Fi(s,t.displayEntry,i.value,t.section.bakeContext);if(a===null)return!1;if(t.displayEntry==="visibility"){let l=a!=="hidden";return e.enabled===l?!1:(e.enabled=l,!0)}return e.variant===a?!1:(e.variant=a,!0)}function Jl(e){let t=new Map;for(let[n,r]of e){let o=r.schema.slots??{},i=[];for(let[l,d]of Object.entries(o)){if(i.push({path:l,def:d,reader:{}}),d.type!=="object")continue;let f=d.fields??{};for(let[p,b]of Object.entries(f))i.push({path:Pe(l,p),def:b,reader:{container:l,siblings:f}})}for(let{path:l,def:d}of i){let f=Yo(d);if(f!==null){t.set(U(n,l),{kind:"mirror",instanceId:n,key:l,slotRefs:[f],section:r,ref:f,def:d});continue}let p=Or(d.source),b=rn(d.source);p===null||b.length===0||t.set(U(n,l),{kind:"derived",instanceId:n,key:l,slotRefs:b,section:r,transform:p,source:d.source,def:d})}let s=(l,d)=>{let f=ut(o,l,d)?.path,p=f===void 0?void 0:t.get(U(n,f));return p!==void 0&&(p.kind==="mirror"||p.kind==="derived")&&p.def.type==="row"?f:void 0};for(let l=!0;l;){l=!1;for(let{path:d,def:f,reader:p}of i){if(t.has(U(n,d)))continue;let b=Ae(f.source),h=b===null?void 0:s(p,b.slot);if(b!==null&&h!==void 0){t.set(U(n,d),{kind:"reader",instanceId:n,key:d,slotRefs:[{kind:"section",section:r.localKey,slot:h}],section:r,rowPath:h,field:b.field}),l=!0;continue}let v=Or(f.source);v===null||!$r(f.source).some(A=>s(p,A)!==void 0)||(t.set(U(n,d),{kind:"derived",instanceId:n,key:d,slotRefs:[],section:r,transform:v,source:f.source,def:f}),l=!0)}}let a=mt(r.schema);for(let l of _n){let d=a[l]?.source,f=Or(d),p=rn(d);if(f===null||p.length===0&&!$r(d).some(h=>s({},h)!==void 0))continue;let b=`${_r}${l}`;t.set(U(n,b),{kind:"display",instanceId:n,key:b,transform:f,source:d,slotRefs:p,section:r,displayEntry:l})}}return t}function $r(e){return(ln(e)&&Array.isArray(e.reads)?e.reads:[]).flatMap(n=>ln(n)&&n.kind==="row"&&typeof n.slot=="string"?[n.slot]:[])}function Or(e){if(e===null||typeof e!="object")return null;let{kind:t,transform:n}=e;return t==="derived"&&typeof n=="string"?n:null}function Xl(e,t){return JSON.stringify(e)===JSON.stringify(t)}function kt(e){return/^processed\/crops\/([^/]+)\//.exec(e)?.[1]??null}var Ql={responsiveFor:()=>Promise.resolve(null)};async function ge(e,t){try{let n=await e.ladder(t);return{responsiveFor:async r=>{try{return await n.responsiveFor(r)}catch{return null}}}}catch{return Ql}}var xt={id:"",url:"",filename:"",content_type:"",size_bytes:0,poster:""};async function ed(e,t,n){if(!t)return e;try{e.poster=await n.fileUrl(t)}catch(i){return n.log?.warn({media_id:e.id,err:i.message},"resolve-document-slot: preview presign failed; no poster"),e}let o=await(await ge(n,[t])).responsiveFor(t);return o&&(e.poster_responsive=o),e}async function be(e,t,n){if(e===null)return null;if(typeof e!="object")return xt;let r=e,o=D(r)??"";if(!o)return xt;let i=t.get(o);if(i===void 0)return n.log?.warn({media_id:o},"resolve-document-slot: no media the render may reach"),xt;let s=i.key;if(s===null)return n.log?.warn({media_id:o},"resolve-document-slot: media has no stored object"),xt;try{let l=(r.picked===null&&typeof r.name=="string"&&r.name!==""?r.name:null)??i.name,d={id:o,url:n.namedFileUrl?await n.namedFileUrl(s,l):await n.fileUrl(s),filename:l,content_type:i.mime??"",size_bytes:i.bytes??0,poster:""};return await ed(d,i.renditions.poster?.key??null,n)}catch(a){return n.log?.error({media_id:o,err:a.message},"resolve-document-slot: presign failed; soft-empty document"),xt}}var Ni=16/10;function Hi(e){if(e===null||typeof e!="object")return null;let t=e,[n,r,o,i]=["x","y","width","height"].map(s=>t[s]);return![n,r,o,i].every(s=>typeof s=="number"&&Number.isFinite(s))||n===0&&r===0&&o===1&&i===1?null:{x:n,y:r,width:o,height:i}}function we(e){if(e===null||typeof e!="object")return{mode:"free",aspect:Ni};let t=e,n=typeof t.aspect=="number"&&t.aspect>0?t.aspect:Ni,r=t.mobile?.aspect,o=typeof r=="number"&&r>0&&Math.abs(r-n)>1e-4?r:void 0;return{mode:t.mode==="free"?"free":"locked",aspect:n,...o===void 0?{}:{mobileAspect:o}}}function td(e,t){if(e===null||t===null)return e===t;let n=r=>Math.round(r*1e4)/1e4;return n(e.x)===n(t.x)&&n(e.y)===n(t.y)&&n(e.width)===n(t.width)&&n(e.height)===n(t.height)}function nd(e,t){if(e===null||!(e>0)||!(t>0))return null;let n=Math.min(1,t/e),r=Math.min(1,e/t),o={x:(1-n)/2,y:0,width:n,height:r};return td(o,{x:0,y:0,width:1,height:1})?null:o}function Ui(e,t,n,r){if(e!==null||n.mode==="free")return e;let o=r==="mobile"?n.mobileAspect:n.aspect;return o===void 0?null:nd(t,o)}function Te(){return{id:"",url:"",alt:""}}function Ki(e,t){let n=t===void 0?void 0:e.renditions[t==="white"?"mask_white":"mask_black"]?.key,r=En(e.crop)?e.renditions.crop?.key:void 0;return n??e.renditions.cutout?.key??r??e.key}async function Ir(e,t,n,r){if(t===void 0)return n.log?.warn({id:e},"resolve-media-id: no image media the render may reach; no media"),null;if(t.kind!=="image")return n.log?.warn({id:e,kind:t.kind},"resolve-media-id: media is not an image; no media"),null;try{let o=Ki(t,r?.mask);return{url:await n.servedUrl(o),source_key:o}}catch(o){return n.log?.error({id:e,err:o.message},"resolve-media-id: presign failed; no media"),null}}function qi(e){let t=e&&typeof e=="object"?e.key:void 0;return typeof t=="string"&&t.length>0?t:null}function Vi(e,t,n){let r=Hi(e.crop);return t===void 0?r:Ui(r,t.imageAspect,t.aspects,n)}function Bi(e,t,n){if(!En(n))return null;let r=e.renditions&&typeof e.renditions=="object"?e.renditions:{},o=qi(r.crop);return o!==null&&kt(o)===t?o:null}function Wi(e,t){return Bi(e,dn(e),Vi(e,t))}function zi(e,t){let n=e.mobile&&typeof e.mobile=="object"?e.mobile:t===void 0?null:{};return n===null?null:Bi(n,dn(e),Vi(n,t,"mobile"))}async function rd(e,t){try{return{url:await t.servedUrl(e)}}catch{return null}}function od(e,t,n){let r=dn(e),o=e.renditions&&typeof e.renditions=="object"?e.renditions:{},i=a=>{let l=qi(o[a]);return l!==null&&l.startsWith(`processed/cutout/${r}/`)?l:null};return(t===null?null:i(t==="white"?"mask_white":"mask_black"))??i("cutout")??(t===null?Wi(e,n):null)}function dn(e){return D(e)??""}async function We(e,t,n,r){if(e===null)return{value:null,desktopKey:null,mobileKey:null};if(!e||typeof e!="object")return{value:Te(),desktopKey:null,mobileKey:null};let o=e,i=typeof o.ar=="number"?o.ar:null,s=dn(o),a=o.mask==="white"||o.mask==="black"?o.mask:null,l=s?t.get(s):void 0,d=r===void 0?void 0:{aspects:r,imageAspect:id(l,i)},f=s?zi(o,d):null,p=f?await rd(f,n):null,b=typeof o.alt=="string"?o.alt:"",h=s?od(o,a,d):null,v,A;if(h){v={id:s,url:await n.servedUrl(h),alt:b},A=h;let P=await Ir(s,l,n);P&&P.url!==v.url&&(v.download_url=P.url)}else if(s){let P=await Ir(s,l,n,a?{mask:a}:void 0);if(!P)return{value:Te(),desktopKey:null,mobileKey:f};v={id:s,url:P.url,alt:b},A=P.source_key}else return{value:Te(),desktopKey:null,mobileKey:null};return{value:p?{...v,mobile:p}:v,desktopKey:A,mobileKey:p?f:null}}function id(e,t){return e?.kind==="image"&&e.width!==null&&e.height!==null&&e.width>0&&e.height>0?e.width/e.height:t!==null&&t>0?t:null}async function vt(e,t){let n=e.flatMap(o=>[o.desktopKey,o.mobileKey]).filter(o=>!!o),r=await ge(t,n);for(let o of e){if(!o.value)continue;let i=await r.responsiveFor(o.desktopKey);if(i&&(o.value.responsive=i),o.value.mobile&&o.mobileKey){let s=await r.responsiveFor(o.mobileKey);s&&(o.value.mobile={...o.value.mobile,responsive:s})}}}async function St(e,t,n,r){let o=await We(e,t,n,r);return await vt([o],n),o.value}var ze={id:"",url:"",poster:"",alt:""};async function sd(e,t,n){if(!t||!e.poster)return e;let o=await(await ge(n,[t])).responsiveFor(t);return o&&(e.poster_responsive=o),e}async function ke(e,t,n){if(e===null)return null;if(typeof e!="object")return ze;let r=e,o=D(r)??"";if(!o)return ze;let i=t.get(o);if(i===void 0)return n.log?.warn({media_id:o},"resolve-tour-slot: no tour media the render may reach"),ze;if(i.kind!=="tour")return n.log?.warn({media_id:o,kind:i.kind},"resolve-tour-slot: media is not a tour"),ze;try{let s=eo(i.url);if(s===null)return n.log?.warn({media_id:o},"resolve-tour-slot: tour link embeds nowhere"),ze;let a=i.renditions.poster?.key??null,l={id:o,url:s,poster:a?await n.fileUrl(a):"",alt:typeof r.alt=="string"?r.alt:"",provider:i.provider};return sd(l,a,n)}catch(s){return n.log?.error({media_id:o,err:s.message},"resolve-tour-slot: presign failed; soft-empty tour"),ze}}var Ge={id:"",url:"",poster:"",alt:""};async function Ar(e,t,n){if(!t||!e.poster)return e;let o=await(await ge(n,[t])).responsiveFor(t);return o&&(e.poster_responsive=o),e}async function xe(e,t,n){if(e===null)return null;if(typeof e!="object")return Ge;let r=e,o=D(r)??"";if(!o)return Ge;let i=t.get(o);if(i===void 0)return n.log?.warn({media_id:o},"resolve-video-slot: no video media the render may reach"),Ge;if(i.kind!=="video")return n.log?.warn({media_id:o,kind:i.kind},"resolve-video-slot: media is not a video"),Ge;let s=i.renditions.poster?.key??null,a=typeof r.alt=="string"?r.alt:"";try{if(to(i)==="link"){let p=i.url,b=Qr(p);if(!b)return n.log?.warn({media_id:o},"resolve-video-slot: link upload embeds nowhere"),Ge;let h={id:o,url:b,poster:s?await n.fileUrl(s):"",alt:a,source:"link"};return i.provider!==null&&(h.provider=i.provider),Ar(h,s,n)}let l=s?await n.fileUrl(s):"",d=i.renditions.encode;if(d===null)return n.log?.warn({media_id:o,state:i.state},"resolve-video-slot: no encode; poster-only"),i.state!=="failed"&&n.notePending?.({kind:"video",id:o}),Ar({id:o,url:"",poster:l,alt:a},s,n);let f={id:o,url:await n.fileUrl(d.key),poster:l,alt:a};return d.width!==null&&(f.width=d.width),d.height!==null&&(f.height=d.height),Ar(f,s,n)}catch(l){return n.log?.error({media_id:o,err:l.message},"resolve-video-slot: presign failed; soft-empty video"),Ge}}async function Ye(e,t,n,r){if(e===null||typeof e!="object")return null;let o=D(e);if(o===void 0)return null;let i=n.get(o);if(i===void 0)return r.log?.warn({media_id:o},"resolve-media-slot: no media the render may reach"),null;if(!X(t).includes(i.kind))return r.log?.warn({media_id:o,kind:i.kind},"resolve-media-slot: media is of a kind the slot does not hold"),null;let s={media:o};switch(i.kind){case"image":{let a=await St(e,n,r,we(t.crop));return a===null?null:{...a,kind:"image"}}case"video":{let a=await xe(s,n,r);return a===null?null:{...a,kind:"video"}}case"tour":{let a=await ke(s,n,r);return a===null?null:{...a,kind:"tour"}}case"document":{let a=await be(s,n,r);return a===null?null:{...a,kind:"document"}}}}function jr(e){return e==="image"?"image":e==="video"?"video":e==="tour"?"tour":e==="document"?"document":e==="media"?"media":e==="poi"?"poi":"scalar"}function Me(e){if(e?.type!=="list")return null;let t=e.element?.type==="object"?e.element?.fields:void 0;return t!=null?{kind:"record",fields:t}:{kind:"primitive",primitive:jr(e.element?.type)}}async function cn(e,t,n){if(!Array.isArray(e))return[];let r=Me(t);return r===null?e:r.kind==="record"?ad(e,r.fields,n):Gi(e,r.primitive,n,t.element)}async function Gi(e,t,n,r){switch(t){case"image":{let o=[];for(let i of e)o.push(await We(i,n.records,n.store,we(r?.crop)));return await vt(o,n.store),o.map(i=>i.value??Te())}case"video":return(await Promise.all(e.map(i=>xe(i,n.records,n.store)))).filter(i=>i!==null);case"tour":return(await Promise.all(e.map(i=>ke(i,n.records,n.store)))).filter(i=>i!==null);case"document":return(await Promise.all(e.map(i=>be(i,n.records,n.store)))).filter(i=>i!==null);case"media":return(await Promise.all(e.map(i=>Ye(i,r??{},n.records,n.store)))).filter(i=>i!==null);case"poi":return e.map(o=>n.resolvePoi(o));case"scalar":return e}}async function ad(e,t,n){if(!Object.values(t).some(Pr))return e;let r=[],o=await Yi(e,t,n,r);return await vt(r,n.store),o}async function Yi(e,t,n,r){let o=Object.entries(t).filter(([,s])=>Pr(s));if(o.length===0)return e;let i=[];for(let s of e){if(!s||typeof s!="object"||Array.isArray(s)){i.push(s);continue}let a={...s};for(let[l,d]of o)l in a&&(a[l]=await ld(a[l],d,n,r));i.push(a)}return i}function Pr(e){if(jr(e.type)!=="scalar")return!0;let t=Me(e);return t===null?!1:t.kind==="record"?Object.values(t.fields).some(Pr):t.primitive!=="scalar"}async function ld(e,t,n,r){if(Me(t)!==null)return dd(e,t,n,r);switch(jr(t.type)){case"image":{let o=await We(e,n.records,n.store,we(t.crop));return r.push(o),o.value}case"video":return xe(e,n.records,n.store);case"tour":return ke(e,n.records,n.store);case"document":return be(e,n.records,n.store);case"media":return Ye(e,t,n.records,n.store);case"poi":return n.resolvePoi(e);case"scalar":return e}}async function dd(e,t,n,r){if(!Array.isArray(e))return[];let o=Me(t);if(o===null)return e;if(o.kind==="record")return Yi(e,o.fields,n,r);if(o.primitive!=="image")return Gi(e,o.primitive,n,t.element);let i=[];for(let s of e)i.push(await We(s,n.records,n.store,we(t.element?.crop)));return r.push(...i),i.map(s=>s.value??Te())}function Tr(e){return new Map(Object.entries(e??{}))}async function Mr(e,t,n){if(t===void 0)return e;if(Me(t)!==null)return cn(e,t,n);switch(t.type){case"image":return St(e,n.records,n.store,we(t.crop));case"video":return xe(e,n.records,n.store);case"tour":return ke(e,n.records,n.store);case"document":return be(e,n.records,n.store);case"media":return Ye(e,t,n.records,n.store);case"poi":return n.resolvePoi(e);case"object":return cd(e,t,n);default:return e}}async function cd(e,t,n){if(t.fields==null||!e||typeof e!="object"||Array.isArray(e))return e;let[r]=await cn([e],{type:"list",element:{type:"object",fields:t.fields}},n);return r}var un=e=>e<0?0:e>1?1:e;function Cr(e){if(typeof e!="object"||e===null)return null;let{nx:t=0,ny:n=0,nw:r=1,nh:o=1}=e;if(![t,n,r,o].every(l=>typeof l=="number"&&Number.isFinite(l)))return null;let i=un(t),s=un(n),a={nx:i,ny:s,nw:Math.min(un(r),1-i),nh:Math.min(un(o),1-s)};return a.nw<=0||a.nh<=0||a.nx===0&&a.ny===0&&a.nw===1&&a.nh===1?null:a}var ud=/^processed\/crops\/([^/]+)\/(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)$/;function Ji(e,t){return`processed/crops/${e}/${t.nx}_${t.ny}_${t.nw}_${t.nh}`}function fd(e){let t=ud.exec(e);if(t===null||kt(e)===null)return null;let n=Cr({nx:Number(t[2]),ny:Number(t[3]),nw:Number(t[4]),nh:Number(t[5])});return n===null?null:{id:t[1],rect:n}}function Fr(e){return e==null?null:typeof e=="string"?e:e.url}function Xi(e,t={}){let n=t.url??(s=>s),r=new Map;for(let s of e.values())for(let a of[s.file,s.posterFile]){let l=Fr(a);l!==null&&r.set(l,a)}let o=s=>r.has(s)?n(s):s,i=s=>{let a=s===null?void 0:r.get(s);return a===void 0||typeof a=="string"||a.responsive===null?null:{...a.responsive,sources:a.responsive.sources.map(l=>({...l,srcset:pd(l.srcset,n)}))}};return{servedUrl:s=>{let a=fd(s);if(a===null)return Promise.resolve(o(s));let l=Fr(e.get(a.id)?.file);return l===null?Promise.reject(new Error(`no image "${a.id}" to crop`)):Promise.resolve(t.crop===void 0?n(l):t.crop(l,a.rect))},fileUrl:s=>Promise.resolve(o(s)),ladder:()=>Promise.resolve({responsiveFor:s=>Promise.resolve(i(s))})}}function pd(e,t){return e.split(",").map(n=>{let[r="",...o]=n.trim().split(/\s+/);return[t(r),...o].join(" ")}).join(", ")}function Zi(e,t,n){let r=Tr(e===null?null:An(e)),o=new Map;for(let i of t.values()){let s=Fr(i.file);s!==null&&i.sizeBytes!==void 0&&o.set(s,i.sizeBytes)}return new Map([...r].map(([i,s])=>{let a=s.bytes??(s.key===null?void 0:o.get(s.key)??n?.(s.key));return[i,a===void 0||a===s.bytes?s:{...s,bytes:a}]}))}async function Qi(e){let t={store:e.store,records:e.records,resolvePoi:r=>r},n={};for(let[r,o]of Object.entries(e.slots)){let i=e.declared[r];n[r]=await Mr(o,i,t)}return n}function Dr(e){return typeof e=="string"?e:e.url}function rs(e,t){let{facts:n}=e,r=a=>e.media[a],o=a=>a?.file===null||a?.file===void 0?"":t(Dr(a.file)),i=a=>a?.posterFile!==void 0?t(Dr(a.posterFile)):a?.posterUrl??"",s=[];for(let a of Oe(n,{kinds:["image"],from:["property.property_media","property.floor_plans"]})){let l=r(a.id);s.push({id:a.id,kind:"photo",name:l?.filename||a.id,size:"",src:o(l)})}for(let a of Oe(n,{kinds:["video"],from:[tt]})){let l=a.provider??void 0;s.push({id:a.id,kind:"video",name:r(a.id)?.filename||a.name||a.id,size:"",src:i(r(a.id)),ready:!0,durationMs:a.duration_ms??null,...l===void 0?{}:{provider:l}})}for(let a of Oe(n,{kinds:["tour"],from:[tt]}))s.push({id:a.id,kind:"tour",name:`${a.provider??"Tour"} ${a.id}`,size:"",src:i(r(a.id)),url:a.url??"",provider:a.provider??""});for(let a of Oe(n,{kinds:["document"],from:[tt]})){let l=r(a.id)?.sizeBytes;s.push({id:a.id,kind:"document",name:a.name===""?a.id:a.name,size:"",src:"",mime:a.mime??"",...l===void 0?{}:{sizeBytes:l}})}return s}function os(e){let t={};for(let[n,r]of Object.entries(de.pages)){let o=r.declaration;if(o.type!=="list"||X(o.element).length===0)continue;let i=`property.${n}`;t[i]=ao(e.facts,i)??[]}return t}var md=["headshot","logo_dark","logo_light"];function is(e,t){return e.facts.contacts.map(n=>{let r={};for(let o of md){let i=fe(n[o]),s=i===void 0?void 0:e.media[i]?.file;i!==void 0&&s!==null&&s!==void 0&&(r[i]=t(Dr(s)))}return{id:n.id,images:r}})}var Lr=e=>({x:e.nx,y:e.ny,width:e.nw,height:e.nh});function es(e){if(typeof e!="object"||e===null)return null;let{x:t,y:n,width:r,height:o}=e;return Cr({nx:t,ny:n,nw:r,nh:o})}function ts(e,t){return{key:Ji(e,t),mime:null,width:null,height:null,bytes:null,over:{crop:Lr(t),options:{}}}}var hd=new Set(["image","video","tour","document","media"]),yd=["file","media","id"];function Rt(e,t){if(t==null)return t;if(hd.has(e.type)){if(typeof t!="object")return null;let o=t,i=yd.map(d=>o[d]).find(d=>typeof d=="string"&&d!=="");if(typeof i!="string")return null;if(e.type!=="image")return{file:i};let s=es(o.crop),a=typeof o.mobile=="object"&&o.mobile!==null?es(o.mobile.crop):null,l="floor"in o?{floor:typeof o.floor=="string"?o.floor:null}:{};return{file:i,...s===null?{}:{crop:Lr(s),renditions:{crop:ts(i,s)}},...a===null?{}:{mobile:{crop:Lr(a),renditions:{crop:ts(i,a)}}},...l}}if(e.type==="object")return ns(e.fields??{},t);if(e.type!=="list"||!Array.isArray(t))return t;let n=t,r=e.element;return r===void 0?n:r.type==="object"?n.map(o=>ns(r.fields??{},o)):n.map(o=>Rt(r,o))}function ns(e,t){if(typeof t!="object"||t===null)return t;let n={...t};for(let[r,o]of Object.entries(e))r in n&&(n[r]=Rt(o,n[r]));return n}async function ss(e){let{instance:t,slots:n,fixture:r,session:o,assetUrl:i}=e,s={...t.slots},a={},l=r.provenance[t.instance_id]??{};for(let p of Object.keys(n))a[p]=l[p]??{kind:"empty"};for(let[p,b]of Object.entries(o??{})){let h=n[p];h!==void 0&&(s[p]=Rt(h,b),a[p]={kind:"session"})}let d=new Map(Object.entries(r.media)),f=Xi(d,{url:p=>i(p),crop:(p,b)=>i(p,{crop:b})});return{slots:await Qi({slots:s,declared:n,records:Zi(r.facts,d),store:f}),provenance:a}}function as(e,t){let n={},r=o=>o.source?.kind==="derived";for(let[o,i]of Object.entries(e)){if(i.type==="object"){for(let[s,a]of Object.entries(i.fields??{})){let l=Pe(o,s);r(a)&&(n[l]=kr(t,l))}continue}r(i)&&(n[o]=t[o])}return n}async function ds(e){let{template:t,fixture:n,session:r,display:o,computes:i}=e,s=new Map(t.instances.map(h=>[h.instanceId,h]));if(!Object.values(r).some(h=>Object.keys(h.slots??{}).length>0)&&Object.keys(o).length===0)return new Map(n.instances.map(h=>[h.instance_id,h]));let l=new Map,d=new Map;for(let h of n.settled){let v=s.get(h.instance_id);if(v===void 0)continue;let A=d.get(v.section);A===void 0&&d.set(v.section,A=i(v.section)),l.set(h.instance_id,await A)}let f={id:"fixture",sections:n.settled.flatMap(h=>{let v=s.get(h.instance_id);return v===void 0?[]:[{section:v.section,instance_id:h.instance_id}]})},{contentDoc:p}=Er({contentDoc:{instances:n.settled.map(h=>gd(h,s.get(h.instance_id),r,o))},facts:n.facts,sections:l,placement:Go([f])}),b=new Map;for(let h of p.instances){let v=s.get(h.instance_id);v!==void 0&&b.set(h.instance_id,bd(h,v))}return b}function gd(e,t,n,r){let o={...e.slots},i={},s=t?.sectionSchema.slots??{};for(let[p,b]of Object.entries(n[e.instance_id]?.slots??{})){let h=s[p];if(h===void 0)continue;let v=Rt(h,b);if(h.type==="object"&&ls(v)){let A=ls(o[p])?o[p]:{};for(let P of Object.keys(h.fields??{}))JSON.stringify(v[P])!==JSON.stringify(A[P])&&(i[`${p}.${P}`]=!0)}else i[p]=!0;o[p]=v}let a=r[e.instance_id],l={...e.display_overrides,...a?.enabled===void 0?{}:{visibility:!0},...a?.variant===void 0?{}:{variant:!0}},d=a?.variant??e.variant,f={scalar:i};return{instance_id:e.instance_id,enabled:a?.enabled??e.enabled,...d===void 0?{}:{variant:d},slots:o,slot_overrides:f,...Object.keys(l).length===0?{}:{display_overrides:l}}}function bd(e,t){let n={};for(let[r,o]of Object.entries(t.sectionSchema.slots)){let i=o.variant?.cases;i!==void 0&&(e.variant===void 0||!i.includes(e.variant))||(n[r]=e.slots[r])}return{instance_id:e.instance_id,section_key:t.section,enabled:e.enabled,...e.variant===void 0?{}:{variant:e.variant},slots:n}}var ls=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);var cs=1024*1024;function kd(e){let t=Xe(e),n=typeof e.width=="string"?`${e.width} \xD7 ${String(e.height)}`:void 0;return{id:e.id,label:e.label,cssWidth:t.viewportWidth,cssHeight:t.viewportHeight,bleed:t.bleed,pixelWidth:t.pixelWidth,pixelHeight:t.pixelHeight,...n===void 0?{}:{physical:n},tokens:{...Ze(e)}}}function xd(e,t){return new Response(t,{status:e,headers:{"content-type":"text/plain; charset=utf-8"}})}function Nr(e){return new Response(JSON.stringify(e),{headers:{"content-type":"application/json; charset=utf-8"}})}function Hr(e){return new Response(e,{headers:{"content-type":"text/html; charset=utf-8"}})}function vd(e){if(typeof e!="object"||e===null)return null;let t=e.status;return typeof t=="number"&&Number.isInteger(t)&&t>=400&&t<600?t:null}function Sd(e){if(e==null)return{};if(typeof e!="object"||Array.isArray(e))throw new R(400,"A render request's session is an object keyed by instance id.");let t={};for(let[n,r]of Object.entries(e)){let o=typeof r=="object"&&r!==null?r.slots:void 0;if(o!==void 0){if(typeof o!="object"||o===null||Array.isArray(o))throw new R(400,`The session of "${n}" has slots that are not an object keyed by slot id.`);t[n]={slots:o}}}return t}function Ot(e,t,n){let r=e.searchParams.get(t);if(r===null||r==="")throw new R(400,`${n} needs a ${t} parameter.`);return r}function Rd(e){return`<script>
150
- (function () {
151
- try {
152
- var src = new EventSource(${JSON.stringify(e)});
153
- ["source:changed", "stylesheet:changed", "fixtures:changed"].forEach(function (name) {
154
- src.addEventListener(name, function () { window.location.reload(); });
155
- });
156
- } catch (e) { /* no change channel; the page stays as it is */ }
157
- })();
158
- </script>`}function Od(e){if(e===Se.catalog||e==="api/media"||e.startsWith("api/capture/")||e===ne.frame||e===ne.print)return!0;let[t,n,r]=e.split("/").filter(Boolean);return t==="fixtures"&&n!==void 0&&r==="live"}function Fh(e){let{reader:t,assetUrl:n,renderer:r}=e,o=(e.base??"/").endsWith("/")?e.base??"/":`${e.base??"/"}/`,i=w=>/^([a-z][a-z0-9+.-]*:|\/)/i.test(w)?w:`${o}${w}`,s=()=>[nt.base,nt.template].map(w=>i(n(w)));async function a(w){let{fixtures:y}=await t.fixtures(),m=y.find(g=>g.id===w);if(m===void 0){let g=y.map(u=>u.id).join(", ")||"none";throw new R(404,`There is no fixture "${w}" (have: ${g}).`)}return m}function l(w,y){let m=w.instances.find(g=>g.instance_id===y);if(m===void 0)throw new R(400,`The composition places no instance "${y}".`);return m}function d(w,y,m,g,u){if(w.output!=="website")return{selfAnchor:g,anchors:Yr(),pages:[]};let c=new Map([...u].map(([S,$])=>[S,$.enabled])),k=w.pages.map(S=>({id:S.id,label:S.label,path:S.path??`/${S.id}`,sections:S.sections.map($=>({key:$.section,anchor:$.section,enabled:c.get($.instanceId)!==!1}))})),x=`${o}${Se.live(y.id,"/").replace(/\/$/,"")}`,O=ho({pages:k,currentPageId:m,basePath:x});return{selfAnchor:g,anchors:O.anchors,pages:O.pages}}async function f(w,y,m,g,u,c){let k=w.instances.find(hn=>hn.instanceId===g.instance_id);if(k===void 0)throw new Error(`The composition places no section "${g.section_key}".`);let x=u.get(g.instance_id)??g,{slots:O,provenance:S}=await ss({instance:x,slots:k.sectionSchema.slots,fixture:y,session:c,assetUrl:n}),$=d(w,y,m,x.section_key,u),j=x.variant,V=await r.section(x.section_key),K=r.renderToString(r.createElement(V,{slots:O,nav:$,variant:j??""}),{identifierPrefix:x.instance_id}),mn=as(k.sectionSchema.slots,g.slots),J={enabled:x.enabled,...j===void 0?{}:{variant:j}};return{html:K,resolvedProps:{slots:O,nav:$,variant:j},provenance:S,display:J,facts:y.facts,computed:mn}}async function p(w,y,m){let g=new Map(y.instances.map(c=>[c.instance_id,c])),u=[];for(let c of m.sections){let k=l(y,c.instanceId);k.enabled&&u.push((await f(w,y,m.id,k,g,void 0)).html)}return u}function b(w,y,m){let g=w.pages.find(u=>u.id===y);if(g===void 0)throw new R(m,`The template declares no page "${y}".`);return g}function h(w,y){if(w.output==="website")throw new R(404,`"${w.key}" is a website \u2014 captures are for rendered templates; open its pages live instead.`);let m=y===null?w.formats[0]:w.formats.find(g=>g.id===y);if(m===void 0)throw new R(404,`The template declares no format "${y??""}" (have: ${w.formats.map(g=>g.id).join(", ")}).`);return m}async function v(){let w=await t.islands(),y={wire:2,islands:{map:{...w.map},hostScript:w.canvasHost,importMap:{...w.importMap}},stylesheets:[nt.base,nt.template].map(c=>n(c))},m,g;try{m=await t.template(),g=await t.fixtures()}catch(c){return{...y,template:{key:"",name:"",output:"website",formats:[],pages:[],canvases:[],instances:[]},fixtures:[],capabilities:{hmr:t.live,capture:!1},error:c instanceof Error?c.message:String(c)}}let u=g.problems!==void 0&&g.fixtures.length===0?`No fixture could be rendered:
159
- ${g.problems}`:void 0;return{...y,template:{key:m.key,name:m.name,output:m.output,formats:m.output==="website"?[]:m.formats.map(kd),pages:m.pages.map(c=>({id:c.id,label:c.label,...c.path===void 0?{}:{path:c.path},...c.direction===void 0?{}:{direction:c.direction},instanceIds:c.sections.map(k=>k.instanceId)})),canvases:m.canvases.map(c=>({id:c.id,label:c.label,pages:[...c.pages]})),instances:m.instances.map(c=>({...c,display:lo(c.display)}))},fixtures:g.fixtures.map(po),capabilities:{hmr:t.live,capture:m.output!=="website"&&t.capture!==void 0},...u===void 0?{}:{error:u}}}async function A(w){if(w.method!=="POST")throw new R(405,`POST a render request to ${Se.render}.`);let y=await w.text();if(new TextEncoder().encode(y).byteLength>cs)throw new R(413,`request body exceeds ${cs} bytes`);let m;try{m=y===""?void 0:JSON.parse(y)}catch($){throw new R(400,`request body is not JSON: ${$ instanceof Error?$.message:String($)}`)}if(m===void 0||typeof m.page!="string"||typeof m.instance!="string"||typeof m.fixture!="string")throw new R(400,"A render request names a page, an instance and a fixture.");let g=Sd(m.session),u=uo(m.display),c=await t.template(),k=await a(m.fixture),x=b(c,m.page,400);fo(c,u);let O=l(k,m.instance),S=await ds({template:c,fixture:k,session:g,display:u,computes:t.computes.bind(t)});return f(c,k,x.id,O,S,g[O.instance_id]?.slots)}async function P(w){let y=await a(Ot(w,"fixture","api/media"));return{items:rs(y,n),contacts:is(y,n),lists:os(y)}}async function ve(w,y){let m=await t.template();if(m.output!=="website")throw new R(404,`"${m.key}" is a rendered ${m.output} template and has no live pages \u2014 preview it on the canvas.`);let g=m.pages.find(k=>k.path===y);if(g===void 0){let k=m.pages.map(x=>x.path??x.id).join(", ");throw new R(404,`The template declares no page at "${y}" (have: ${k}).`)}let u=await a(w),c=await p(m,u,g);return De({destination:"preview",root:{kind:"plain",bodyHtml:c.join(`
160
- `)},islands:(await t.islands()).documentLoader,stylesheets:{kind:"links",hrefs:s()},title:`${m.name} - ${g.label}`,extraCss:["html, body { background: #fff; }"],...t.live?{devScripts:[Rd(`${o}${Se.hmr}`)]}:{}})}function Je(w,y,m){let g=b(w,m,404);if(!Tt(y,g.id))throw new R(404,`The fixture "${y.id}" switches the page "${g.id}" off, so it has no capture.`);return g}async function _t(w){let y=ne.frame,m=await t.template(),g=h(m,w.searchParams.get("format")),u=await a(Ot(w,"fixture",y)),c=Je(m,u,Ot(w,"page",y));return De({destination:"artifact",root:{kind:"frame",format:g,sectionHtml:await p(m,u,c),...c.direction===void 0?{}:{direction:c.direction}},islands:(await t.islands()).documentLoader,stylesheets:{kind:"links",hrefs:s()},title:`${m.name} \u2014 ${c.id}`})}async function fn(w){let y=await t.template(),m=h(y,w.searchParams.get("format"));if(y.output!=="document")throw new R(404,`"${y.key}" is an ${y.output} template \u2014 a PDF is for the document class; download its pages as a zip.`);let g=await a(Ot(w,"fixture",ne.print)),u=[];for(let c of Mn(g,y.pages))u.push({sectionHtml:await p(y,g,c),...c.direction===void 0?{}:{direction:c.direction}});if(u.length===0)throw new R(404,`The fixture "${g.id}" switches every page off, so it has no PDF.`);return De({destination:"artifact",root:{kind:"frameStack",format:m,pages:u},islands:(await t.islands()).documentLoader,stylesheets:{kind:"links",hrefs:s()},title:`${y.name} \u2014 print`})}async function pn(w,y){let m=w;if(m!=="screenshot"&&m!=="bundle"&&m!=="print")throw new R(404,`There is no capture at ${y.pathname}.`);let g=Ot(y,"fixture",`api/capture/${m}`),u=await t.template(),c=h(u,y.searchParams.get("format")),k=await a(g),x,O,S;if(m==="screenshot"){let j=y.searchParams.get("page")??Mn(k,u.pages)[0]?.id;if(j===void 0)throw new R(404,`The fixture "${g}" leaves no page on.`);Je(u,k,j),x={kind:m,fixture:g,format:c,documents:[{path:Fn(g,j,c.id),page:j,name:`${j}.png`}]},O="image/png",S=`${u.key}-${j}-${c.id}.png`}else if(m==="bundle"){if(u.output!=="image")throw new R(404,`"${u.key}" is a ${u.output} template \u2014 the zip is for the image class; a document downloads its PDF.`);let j=y.searchParams.get("canvas"),V=j===null?u.canvases[0]:u.canvases.find(J=>J.id===j);if(V===void 0)throw new R(404,`The template declares no canvas "${j??""}".`);let K=V.pages.filter(J=>Tt(k,J));if(K.length===0)throw new R(404,`The fixture "${g}" switches every page of the canvas "${V.id}" off, so it has no zip.`);let mn=K.map(J=>({path:Fn(g,J,c.id),page:J,name:`${u.pages.find(hn=>hn.id===J)?.label||J}.png`}));x={kind:m,fixture:g,format:c,documents:mn},O="application/zip",S=`${u.key}-${c.id}.zip`}else{if(u.output!=="document")throw new R(404,`"${u.key}" is an ${u.output} template \u2014 a PDF is for the document class; download its pages as a zip.`);x={kind:m,fixture:g,format:c,documents:[{path:go(g,c.id),page:null,name:`${u.key}.pdf`}]},O="application/pdf",S=`${u.key}.pdf`}if(t.capture===void 0)throw new R(501,"This playground has no captures to give.");let $=await t.capture(x);return new Response(new Uint8Array($),{headers:{"content-type":O,"content-disposition":`attachment; filename="${encodeURIComponent(S)}"`}})}async function Fe(w,y,m){if(m===Se.render)return Nr(await A(w));if(w.method!=="GET"&&w.method!=="HEAD"&&Od(m))throw new R(405,`${m} only reads; the playground accepts no uploads and writes nothing.`);if(m===Se.catalog)return Nr(await v());if(m==="api/media")return Nr(await P(y));if(m.startsWith("api/capture/"))return pn(m.slice(12),y);if(m===ne.frame)return Hr(await _t(y));if(m===ne.print)return Hr(await fn(y));let[g,u,c,k,...x]=m.split("/").filter(Boolean);if(g==="fixtures"&&u!==void 0&&c==="live"){if(x.length>0)throw new R(404,`There is no route at ${y.pathname}.`);return Hr(await ve(decodeURIComponent(u),k===void 0?"/":`/${decodeURIComponent(k)}`))}return null}return{async handle(w){let y=new URL(w.url);if(!y.pathname.startsWith(o)&&`${y.pathname}/`!==o)return null;let m=y.pathname.slice(o.length);try{return await Fe(w,y,m)}catch(g){let u=vd(g);if(u===null)throw g;return xd(u,g instanceof Error?g.message:String(g))}}}}export{Fh as createHost};
204
+ </style>`}function UR(e){if(e.kind!=="bundles"||Object.keys(e.islandMap).length===0)return[];let t=[`<script type="importmap">${br({imports:e.reactVendorMap})}</script>`];for(let r of[e.runtime.url,...Object.values(e.reactVendorMap),e.reactVendorCore.url])t.push(`<link rel="modulepreload" href="${me(r)}" />`);return t}function MR(e,t){return e.kind==="none"||Object.keys(e.islandMap).length===0?"":`
205
+ <script>window.__TR_ISLAND_MAP=${br(e.islandMap)};${t==="eager"?' window.__TR_ISLAND_SCHEDULE = "eager";':""}</script>
206
+ <script type="module" src="${me(e.runtime.url)}"></script>`}function CR(e){return ab({destination:"published",root:{kind:"plain",bodyHtml:e.bodyHtml},islands:e.islands,stylesheets:{kind:"links",hrefs:[e.baseCss.url,e.templateCss.url]},meta:e.meta,...e.analyticsJs?{analyticsJs:e.analyticsJs}:{},...e.siteConfig?{siteConfig:e.siteConfig}:{},...e.prefetchUrls?{prefetchUrls:e.prefetchUrls}:{}})}var wo={width:1200,height:630,contentType:"image/jpeg",position:"attention",quality:82},LR="text/css; charset=utf-8",DU="application/javascript; charset=utf-8",NU="text/html; charset=utf-8",ZR=32,VR=180;function HR(e,t){if(!t.startsWith("/")||!t.endsWith("/"))throw new Error(`A ${e} starts and ends with "/", not "${t}".`);return t}async function cb(e){let t=HR("content base",e.contentBase),r=HR("build base",e.buildBase);if(!r.startsWith(t))throw new Error(`The build base "${r}" sits under the content base "${t}".`);if(!e.siteUrl.endsWith("/"))throw new Error(`A site's address ends with "/", not "${e.siteUrl}".`);let o=r.slice(t.length),n=rb(e.head),i=await MU(e,r,o),s=e.cover===null?null:await LU(e,e.cover),a=i.byFilename.get(e.binding.icons.ico.filename);if(a===void 0)throw new Error(`the build's root icon ${e.binding.icons.ico.filename} was not copied`);let c=e.pages.map(u=>({path:`${u.href.replace(/^\//,"")}index.html`,contentType:NU,immutable:!1,bytes:new TextEncoder().encode(ZU(e,n,u,{contentBase:t,buildBase:r,share:s}))})),l=new Map;for(let u of e.pages)for(let d of u.media)l.set(d.r2_path,d);return{files:[...i.files,{path:"favicon.ico",contentType:"image/x-icon",immutable:!1,bytes:a},...s===null?[]:[s.file],...c],media:[...l.values()]}}function UU(e,t){let r=c=>({ref:c,contentType:DU}),o=c=>({ref:c,contentType:Ry(c.filename)}),{ico:n,svg:i,png:s,apple_touch:a}=e.icons;return[{ref:e.base_css,contentType:LR},{ref:e.template_css,contentType:LR},...t&&e.analytics!==null?[r(e.analytics)]:[],...Object.values(e.islands).map(r),...e.island_runtime===null?[]:[r(e.island_runtime)],...Object.values(e.react_vendor??{}).map(r),...e.react_vendor_core===null?[]:[r(e.react_vendor_core)],o(n),...i===null?[]:[o(i)],...Object.values(s).map(o),o(a)]}async function MU(e,t,r){let{binding:o}=e;if(o.analytics===null)throw new Error("The binding is an image or a document template's (it names no visit beacon): a site is made from a website's build.");if(Object.keys(o.islands).length>0&&(o.island_runtime===null||o.react_vendor===null||o.react_vendor_core===null))throw new Error("The binding has islands but names no island runtime, React vendor or vendor core.");let i=new Map(xb(o).map(d=>[d.filename,d.path])),s=new Set(e.pages.flatMap(d=>d.buildFiles)),a=await Promise.all(UU(o,e.analytics).map(async({ref:d,contentType:f})=>{let p=await e.readBuildFile(i.get(d.filename));return{path:`${r}${d.filename}`,contentType:f,immutable:!0,bytes:CU(d.filename,p,t,s)}})),c=new Set(a.map(d=>d.path.slice(r.length))),l=await Promise.all([...s].filter(d=>!c.has(d)).map(async d=>({path:`${r}${d}`,contentType:Ry(d),immutable:!0,bytes:await e.readBuildFile(wr(d))}))),u=[...a,...l];return{files:u,byFilename:new Map(u.map(d=>[d.path.slice(r.length),d.bytes]))}}function CU(e,t,r,o){if(!fI(e))return t;let n=pI(e,new TextDecoder().decode(t),r);if(n.files.length===0)return t;for(let i of n.files)o.add(i);return new TextEncoder().encode(n.text)}async function LU(e,t){let r=await e.cutShareImage(await t.read(),{width:wo.width,height:wo.height});return{file:{path:`assets/og/${e.hash(t.key).slice(0,16)}.jpg`,contentType:wo.contentType,immutable:!0,bytes:r}}}function ZU(e,t,r,o){let{binding:n}=e,{contentBase:i,buildBase:s,share:a}=o,c=`${e.siteUrl}${r.href.replace(/^\//,"")}`,l=ob(t,r),u={title:l,description:t.description,canonical:c,ogUrl:c,siteName:t.siteName,icons:BR(n,i,s),...a===null?{}:{ogImage:`${e.siteUrl}${a.file.path}`,ogImageWidth:wo.width,ogImageHeight:wo.height,ogImageType:wo.contentType,ogImageAlt:l},lang:"en"};return CR({meta:u,bodyHtml:r.sections.join(`
207
+ `),baseCss:{url:`${s}${n.base_css.filename}`},templateCss:{url:`${s}${n.template_css.filename}`},...e.analytics&&n.analytics!==null?{analyticsJs:{url:`${s}${n.analytics.filename}`}}:{},islands:VU(n,s),...e.leads?{siteConfig:e.leads}:{},prefetchUrls:e.pages.filter(d=>d.id!==r.id).map(d=>`${i}${d.href.replace(/^\//,"")}`)})}function VU(e,t){let r=e.island_runtime,o=e.react_vendor_core;if(Object.keys(e.islands).length===0||r===null||o===null)return{kind:"none"};let n=s=>`${t}${s.filename}`,i=s=>Object.fromEntries(Object.keys(s).sort().map(a=>[a,n(s[a])]));return{kind:"bundles",runtime:{url:n(r)},islandMap:i(e.islands),reactVendorMap:i(e.react_vendor??{}),reactVendorCore:{url:n(o)}}}function BR(e,t,r){let{svg:o,png:n,apple_touch:i}=e.icons,s=[{rel:"icon",href:`${t}favicon.ico`,sizes:`${ZR}x${ZR}`}];o!==null&&s.push({rel:"icon",href:`${r}${o.filename}`,type:"image/svg+xml"});for(let a of Object.keys(n).sort((c,l)=>Number(c)-Number(l)))s.push({rel:"icon",href:`${r}${n[a].filename}`,sizes:`${a}x${a}`,type:"image/png"});return s.push({rel:"apple-touch-icon",href:`${r}${i.filename}`,sizes:`${VR}x${VR}`}),s}var HU=16;function JR(e){let t=new Map;return async r=>{let o=await e.binding(),n=nb(r.facts,null),i=e.shareImage===void 0||n.coverMediaId===null?null:r.coverUrl(n.coverMediaId),s={titleAddress:n.titleAddress,streetAddress:n.streetAddress,displayAddress:n.displayAddress,description:n.description,orgName:null,fallbackTitle:r.templateName},a=r.hash(JSON.stringify([r.pages,r.contentBase,r.buildBase,r.siteUrl,r.ingestBase,s,i,o])),c=t.get(a);if(c!==void 0)return t.delete(a),t.set(a,c),c;let l=e.shareImage,u=cb({pages:r.pages,contentBase:r.contentBase,buildBase:r.buildBase,siteUrl:r.siteUrl,head:s,binding:o,readBuildFile:d=>e.buildFile(d),cover:i===null||l===void 0?null:{key:i,async read(){let d=await l.read(i);if(d===null)throw new Error(`The cover photo at ${i} could not be read.`);return d}},cutShareImage:(d,f)=>l===void 0?Promise.reject(new Error("This playground cuts no share image.")):l.cut(d,f),hash:r.hash,leads:{...Xu,ingestBase:r.ingestBase},analytics:!1});return t.set(a,u),u.catch(()=>{t.get(a)===u&&t.delete(a)}),t.size>HU&&t.delete(t.keys().next().value),u}}function WR(e){return new Response(new Uint8Array(e.bytes),{headers:{"content-type":e.contentType,"cache-control":e.immutable?"public, max-age=31536000, immutable":"no-cache"}})}var nd=".png";function KR(e){if(e.length===0)return{page:null};let[t]=e;return e.length!==1||t===void 0||!t.endsWith(nd)||t.length===nd.length?null:{page:t.slice(0,-nd.length)}}function qR(e){let t=e.address;if(!R_(t))return null;let r=Oe(t);return r===null?null:hh(r).display}function GR(e){return`attachment; filename*=UTF-8''${encodeURIComponent(e)}`}function YR(e){let t=`${e.fixture}/${e.format}/`;return e.file.contentType==="application/pdf"?`${t}${cd.document}`:e.file.contentType==="application/zip"?`${t}${cd.bundle}`:`${t}${e.file.page??""}${nd}`}function XR(e,t,r){let o=`/properties/${encodeURIComponent(t)}/content/`,n=e.pathname.lastIndexOf(o);return`${n<0?e.pathname:`${e.pathname.slice(0,n)}/properties/${encodeURIComponent(r)}/content/${e.pathname.slice(n+o.length)}`}${e.search}`}function rd(e){return e.map(t=>` ${t.file}: ${t.message} (${t.rule})`).join(`
208
+ `)}var e0=1024*1024,za="assets",JU=8192,t0=e=>pR(new TextEncoder().encode(e)),n0=5;function WU(e){let t=Pa(e),r=typeof e.width=="string"?`${e.width} \xD7 ${String(e.height)}`:void 0;return{id:e.id,label:e.label,cssWidth:t.viewportWidth,cssHeight:t.viewportHeight,bleed:t.bleed,pixelWidth:t.pixelWidth,pixelHeight:t.pixelHeight,...r===void 0?{}:{physical:r},tokens:{...Ea(e)}}}function KU(e,t){return new Response(t,{status:e,headers:{"content-type":"text/plain; charset=utf-8"}})}function ct(e){return new Response(JSON.stringify(e),{headers:{"content-type":"application/json; charset=utf-8"}})}function qU(e){return new Response(JSON.stringify(e),{status:202,headers:{"content-type":"application/json; charset=utf-8"}})}function GU(e){if(typeof e!="object"||e===null)return null;let t=e.status;return typeof t=="number"&&Number.isInteger(t)&&t>=400&&t<600?t:null}function YU(e){let t;try{t=e===""?void 0:JSON.parse(e)}catch(n){throw new g(400,`request body is not JSON: ${n instanceof Error?n.message:String(n)}`)}let r=typeof t=="object"&&t!==null&&!Array.isArray(t)?t:null,o=r?.slots;if(r===null||typeof r.fixture!="string"||typeof r.section_key!="string"||typeof o!="object"||o===null||Array.isArray(o))throw new g(400,"A render request names a fixture and a section, and carries the section's slots.");for(let n of["instance_id","page_id","variant"])if(r[n]!==void 0&&typeof r[n]!="string")throw new g(400,`A render request's ${n} is a string.`);return{fixture:r.fixture,section_key:r.section_key,slots:o,...typeof r.instance_id=="string"?{instance_id:r.instance_id}:{},...typeof r.page_id=="string"?{page_id:r.page_id}:{},...typeof r.variant=="string"?{variant:r.variant}:{}}}async function od(e){let t=await e.text();if(new TextEncoder().encode(t).byteLength>e0)throw new g(413,`request body exceeds ${e0} bytes`);return t}function xo(e,t,r){let o=e.searchParams.get(t);if(o===null||o==="")throw new g(400,`${r} needs a ${t} parameter.`);return o}function XU(e){return Kl(e)!==null?!0:e===he.catalog||e===he.problems||e==="api/media"||e==="api/owned"||e==="api/bootstrap"||e==="api/requirements"||e==="api/facts"}function QU(e,t){let r=e.headers.get("x-forwarded-host")??e.headers.get("host");return r===null?t.origin:`${e.headers.get("x-forwarded-proto")?.split(",")[0]?.trim()??t.protocol.replace(/:$/,"")}://${r.split(",")[0].trim()}`}function eM(e){return JSON.stringify([e.operation,e.subject.property??null,e.subject.fixture??null,e.subject.format??null,e.subject.page??null,e.subject.file??null])}function tM(e){let t=new Set,r=[],o=e.filter(n=>n.finishedAt!==null).sort((n,i)=>Date.parse(i.finishedAt)-Date.parse(n.finishedAt));for(let n of o){let i=eM(n);t.has(i)||(t.add(i),n.state==="failed"&&r.push({kind:"job",job:n.id,operation:n.operation,subject:n.subject,message:n.error??"It failed."}))}return r}function nM(e,t,r){let o=new Map,n=new Map;for(let i of t){if(i.state!=="waiting"&&i.state!=="running")continue;let s=r(i.operation);if(s===void 0)continue;let{fixture:a,property:c}=i.subject;a!==void 0?o.has(a)||o.set(a,{label:s}):c!==void 0&&!n.has(c)&&n.set(c,{label:s})}return o.size===0&&n.size===0?e:e.map(i=>{let s=n.get(i.name);return{...i,...s===void 0?{}:{progress:s},content:i.content.map(a=>{let c=o.get(a.name);return c===void 0?a:{...a,progress:c}})}})}function rM(e){let t=e.searchParams.get("wait");if(t===null||t==="")return;let r=Number(t);if(!Number.isFinite(r)||r<0)throw new g(400,`A job's wait is a number of seconds, not "${t}".`);return Math.min(r,60)*1e3}function r0(e,t="/"){let{reader:r,assetUrl:o,renderer:n,saves:i,stylesheets:s,fixtures:a,jobs:c,downloads:l}=e,u=JR(e.site),d=t.endsWith("/")?t:`${t}/`,f=sv(t0),p=x=>t0(Tk(x,e.fixtureMediaPath)),m=new Map,S=(x,y)=>{m.delete(x),m.set(x,y),m.size>JU&&m.delete(m.keys().next().value)};async function _(x){return O(await a(),x)}function O(x,y){let w=x.fixtures,k=w.find($=>$.id===y);if(k===void 0){let $=w.map(Z=>Z.id).join(", ")||"none";throw new g(404,`There is no content fixture "${y}" (have: ${$}).`)}return k}async function H(x){return F(await a(),x)}function F(x,y){let w=x.properties.find(k=>k.name===y);if(w===void 0){let k=x.properties.map($=>$.name).join(", ")||"none";throw new g(404,`There is no property "${y}" (have: ${k}).`)}return w}function P(x,y){let w=x.properties.find(k=>k.file===y.property);if(w===void 0)throw new Error(`The content fixture "${y.id}" is on "${y.property}", which did not load.`);return w}function N(x,y){let w={...y.media};for(let k of eb(x,y))Object.assign(w,k.media);return{property:y.file,media:w}}function Q(x,y){let w=y.fixture===void 0?void 0:O(x,y.fixture),k=y.property===void 0?P(x,w):F(x,y.property);if(w!==void 0&&w.property!==k.file)throw new g(400,`The content fixture "${w.id}" is on the property "${P(x,w).name}", not "${k.name}".`);return{property:k,target:N(x,k),fixture:w}}function J(x,y){let w=x.instances.find(k=>k.instance_id===y);if(w===void 0)throw new g(400,`The composition places no instance "${y}".`);return w}function X(x,y,w,k){return{output:x.output,pages:x.pages,instances:y.instances.map($=>({instanceId:$.instance_id,values:$.slots,variant:$.variant,enabled:$.enabled})),pageEnabled:$=>Yu(y,$),section:async $=>{let Z=x.instances.find(pe=>pe.section===$);if(Z===void 0)throw new Error(`The composition places no section "${$}".`);let re=Z.version?.schema.anchor,{variant:W}=Z.display;return{schema:{slots:Z.sectionSchema.slots,anchor:typeof re=="string"?re:Z.section,...W===null?{}:{display:{variant:{cases:W.cases}}}},component:await n.section($)}},media:()=>VO(y,o,{contentBase:w.content,hash:p,listed:($,Z)=>{S($,Z),k?.($,Z)}})}}function K(x,y,w){let k=`${d}${he.output(P(y,w).name,w.id,x.output)}`;return{content:k,build:`${k}${za}/`}}function M(x,y,w){return{react:n,snapshot:X(x,y,w),contentBase:w.content,buildBase:w.build,kept:f}}async function V(x,y,w,k,$,Z){let re=x.instances.find(ge=>ge.instanceId===$.instance_id);if(re===void 0)throw new Error(`The composition places no section "${$.section_key}".`);let W=Z===void 0?void 0:{values:ZO({},re.sectionSchema.slots,Z.values),variant:Z.variant};return(await jv({...M(x,y,w),pageId:k,...W===void 0?{}:{over:{[$.instance_id]:W}}},$.instance_id)).html}async function le(x){if(!x.startsWith(d))return null;let y=Kl(x.slice(d.length));if(y===null||y.rest[0]!==za||y.rest.length<2||y.rest.includes(""))return null;let w=await r.template(),k=await a(),$=k.fixtures.find(ge=>ge.id===y.fixture);if($===void 0)return null;let Z=K(w,k,$);if(Z.content!==`${d}${he.output(y.property,y.fixture,w.output)}`||y.output!==er[w.output==="website"?"site":"download"])return null;let re=y.rest.slice(1);if(re.length===1)return{url:o(`${he.build}${encodeURIComponent(re[0])}`)};let W=`${Z.content}${za}/${re.map(encodeURIComponent).join("/")}`,pe=m.get(W);if(pe!==void 0)return pe;for(let ge of vo($,w.pages))await $a({...M(w,$,Z),pageId:ge.id}).catch(()=>{});return m.get(W)??null}function ae(x,y,w){let k=x.pages.find($=>$.id===y);if(k===void 0)throw new g(w,`The template declares no page "${y}".`);return k}function Se(x){return{template:x,downloads:x.output==="website"?null:l===!0?"made":r.shipped!==void 0?"shipped":null}}async function I(){let x=await Promise.all([r.islands(),s()]).then(([$,Z])=>({wire:7,islands:{map:{...$.map},hostScript:$.canvasHost,importMap:{...$.importMap}},stylesheets:[...Z]}),()=>({wire:7,islands:{map:{},hostScript:null,importMap:{}},stylesheets:[]})),y,w;try{y=await r.template(),w=await a()}catch($){return{...x,template:{key:"",name:"",output:"website",formats:[],pages:[],canvases:[]},properties:[],capabilities:{download:!1,save:!1,upload:!1},error:$ instanceof Error?$.message:String($)}}let k=w.violations.length>0&&w.properties.length===0?`No fixture could be loaded:
209
+ ${rd(w.violations)}`:void 0;return{...x,template:{key:y.key,name:y.name,output:y.output,formats:y.output==="website"?[]:y.formats.map(WU),pages:y.pages.map($=>({id:$.id,label:$.label,...$.path===void 0?{}:{path:$.path},...$.direction===void 0?{}:{direction:$.direction},instanceIds:$.sections.map(Z=>Z.instanceId)})),canvases:y.canvases.map($=>({id:$.id,label:$.label,pages:[...$.pages]}))},properties:nM(w.properties.map($=>Aa(Se(y),w,$)),c===void 0?[]:await c.list(),$=>c?.mark($)),capabilities:{download:Se(y).downloads!==null,save:i!==void 0,upload:i!==void 0},...k===void 0?{}:{error:k}}}async function E(){let x=c===void 0?[]:tM(await c.list()),y;try{await r.template(),y=await a()}catch(w){return{problems:[{kind:"template",file:null,message:w instanceof Error?w.message:String(w)},...x]}}return{problems:[...y.violations.map(w=>({kind:"fixture",rule:w.rule,file:w.file,...w.line===void 0?{}:{line:w.line},message:w.message})),...x]}}function ue(){if(c===void 0)throw new g(501,"This playground runs no jobs.");return c}async function fe(x,y,w){if(w===he.jobs){if(x.method!=="GET"&&x.method!=="HEAD")throw new g(405,`${he.jobs} only lists; an operation starts a job at its own address.`);return ct({jobs:c===void 0?[]:await c.list()})}let k=decodeURIComponent(w.slice(`${he.jobs}/`.length));if(k===""||k.includes("/"))throw new g(404,`There is no route at ${y.pathname}.`);let $;if(x.method==="DELETE")$=c===void 0?null:await c.cancel(k);else if(x.method==="GET"||x.method==="HEAD")$=c===void 0?null:await c.read(k,rM(y));else throw new g(405,"GET a job to read it, or DELETE it to cancel it.");if($===null)throw new g(404,`There is no job "${k}".`);return ct($)}async function Ie(x,y){if(x.method!=="POST")throw new g(405,"POST to start a probe.");let w=ue(),k=await _(xo(y,"fixture","api/probe")),$=await w.start({operation:mR,subject:{fixture:k.id},version:await e.version()});return qU($)}async function ye(x){if(x.method!=="POST")throw new g(405,`POST a render request to ${he.render}.`);let y=YU(await od(x)),w=await r.template(),k=await a(),$=O(k,y.fixture),Z=y.instance_id===void 0?$.instances.find(pe=>pe.section_key===y.section_key):J($,y.instance_id);if(Z===void 0||Z.section_key!==y.section_key)throw new g(400,`The composition places no section "${y.section_key}"${y.instance_id===void 0?"":` as "${y.instance_id}"`}.`);let re=y.page_id??(w.pages.length===1?w.pages[0].id:null);if(re===null)throw new g(400,"A render of a template with several pages names the page it renders on.");let W=ae(w,re,400);return{html:await V(w,$,K(w,k,$),W.id,Z,{values:y.slots,variant:y.variant})}}async function Fe(x){if(x.method!=="POST")throw new g(405,`POST a save to ${he.save}.`);if(i===void 0)throw new g(501,"This playground does not save: an edit stays in this browser until it reloads.");let y=eR(await od(x)),w=y.batch==="content"?{fixture:y.fixture}:{property:y.property,fixture:y.fixture};return An(i,w,(k,$)=>tR({template:k.template,property:$.target,fixture:$.fixture,store:k.reads,ops:y.ops}))}async function sn(x){if(x.method!=="POST")throw new g(405,`POST a library change to ${he.library}.`);if(i===void 0)throw new g(501,"This playground does not save: its library cannot change.");let y=gO(await od(x));return y.kind==="remove"?An(i,{property:y.property},({reads:w},k)=>mO(k.target,w,y)):"list"in y?An(i,{property:y.property},({reads:w},k)=>pO(k.target,w,y)):An(i,{fixture:y.fixture},({template:w,reads:k},$)=>AO(w,$.fixture,k,y))}async function an(x){if(x.method!=="POST")throw new g(405,`POST a fixture operation to ${he.fixtures}.`);if(i===void 0)throw new g(501,"This playground does not save, so its fixtures cannot change here.");let y=oR(await od(x));for(let w=1;;w+=1){let k=await i.current(),{writes:$,at:Z}=await iR(k.list,k.reads,y);if("moved"in await i.change(k.version,$)){if(w<n0)continue;throw new g(409,"The template kept changing while this change was made; reload the playground and try again.")}let W=await a(),pe=Se(await r.template());if(Z!==null&&(!W.properties.some(oe=>oe.name===Z.property)||Z.content!==void 0&&!W.fixtures.some(oe=>oe.id===Z.content))){let oe=Z.content===void 0?`property "${Z.property}"`:`content fixture "${Z.content}"`;throw new g(500,`The change was written, but the ${oe} does not load:
210
+ ${W.violations.length>0?rd(W.violations):"it is not listed"}`)}let ge=W.properties[0];return{properties:W.properties.map(oe=>Aa(pe,W,oe)),at:Z??(ge===void 0?null:{property:ge.name})}}}async function lt(x,y){if(x.method!=="POST")throw new g(405,"POST a file to api/upload.");if(i===void 0)throw new g(501,"This playground does not save: an upload has nowhere to land.");let w=xo(y,"name","api/upload"),k=Te=>y.searchParams.get(Te),$=k("property"),Z=k("fixture"),re=k("list"),W=k("owner"),pe=k("instance"),ge=k("slot"),oe=$!==null&&re!==null?{property:$,list:re}:$!==null&&W!==null?{property:$,owner:W,...Z===null?{}:{fixture:Z}}:Z!==null&&pe!==null&&ge!==null?{fixture:Z,instance:pe,slot:ge}:null;if(oe===null)throw new g(400,"An upload names where the file lands: a property and its list, a property's row owner (and the content fixture a slot stages it in), or a content fixture, an instance and its slot.");let ce=Number(x.headers.get("content-length")??"0");if(ce>ji)throw new g(413,`Got ${String(ce)} bytes; the cap is ${String(ji)} bytes (500 MB).`);let je={target:oe,name:w,type:x.headers.get("content-type")??"",bytes:new Uint8Array(await x.arrayBuffer())};return"instance"in oe?An(i,{fixture:oe.fixture},({template:Te,reads:ie},Yi)=>PO(Te,Yi.fixture,ie,{...je,target:oe})):"owner"in oe&&oe.fixture!==void 0?An(i,{property:oe.property,fixture:oe.fixture},({reads:Te},ie)=>EO(ie.fixture,Te,{...je,target:oe})):"owner"in oe?An(i,{property:oe.property},({reads:Te},ie)=>FO(ie.target,Te,{...je,target:oe})):An(i,{property:oe.property},({reads:Te},ie)=>fO(ie.target,Te,je))}async function An(x,y,w){for(let k=1;;k+=1){let $=await x.current(),Z=Se($.template),re=(be,Lt)=>Qv(Z,P(be,Lt).name,Lt),W=(be,Lt)=>JSON.stringify([re(be,Lt),Lt.facts,Object.keys(Lt.media).sort()]),pe=(be,Lt)=>JSON.stringify([Aa(Z,be,Lt),Lt.facts,Object.keys(Lt.media).sort()]),ge=new Map($.fixtures.fixtures.map(be=>[be.id,W($.fixtures,be)])),oe=new Map($.fixtures.properties.map(be=>[be.name,pe($.fixtures,be)])),ce=Q($.fixtures,y),je=await w($,ce),{writes:Te,media:ie,rowIds:Yi}="writes"in je?je:{writes:je},db=Yi===void 0||Yi.size===0?{}:{row_ids:Object.fromEntries(Yi)};if(Te.length===0)return{changed:[],properties:[],...db};if("moved"in await x.change($.version,Te)){if(k<n0)continue;throw new g(409,"The template kept changing while this save was made; reload the playground and edit again.")}let Ct=await a(),fb=ce.fixture===void 0?void 0:Ct.fixtures.find(be=>be.id===ce.fixture.id),pb=Ct.properties.find(be=>be.name===ce.property.name);if(pb===void 0||ce.fixture!==void 0&&fb===void 0){let be=ce.fixture===void 0?`property "${ce.property.name}"`:`content fixture "${ce.fixture.id}"`;throw new g(500,`The save was written, but the ${be} no longer resolves:
211
+ ${Ct.violations.length>0?rd(Ct.violations):"it is gone"}`)}let mb=Ct.fixtures.filter(be=>ge.get(be.id)!==W(Ct,be)).map(be=>re(Ct,be)),b0=Ct.properties.filter(be=>oe.get(be.name)!==pe(Ct,be)).map(be=>Aa(Z,Ct,be)),id=("file"in je?await x.served(je.file):void 0)??(ie===void 0?void 0:(fb?.media[ie]??pb.media[ie])?.file),gb=ce.fixture?.id;return{changed:[...mb.filter(be=>be.name===gb),...mb.filter(be=>be.name!==gb)],properties:b0,...db,...ie===void 0?{}:{media:ie},...id==null?{}:{url:o(io(id))}}}}async function l0(x){let y=await r.template(),w=await a(),k=O(w,xo(x,"fixture","api/bootstrap")),$=K(y,w,k),Z=gR(y,x.searchParams.get("format")),re=Xv(y),W=new Map(k.instances.map(ce=>[ce.instance_id,ce])),pe=await r.islands($.build),ge=Object.fromEntries(y.instances.map(ce=>[ce.instanceId,HO(k,ce.instanceId,ce.sectionSchema.slots)]));return{...await mv({deliverable:hR(y,k,Z),format:Z,composition:Yv(y),contentDoc:Gu(k),facts:k.facts,by:{},fillHolders:pv,contentFingerprint:null,sectionOf:ce=>{let je=re.get(ce);if(je===void 0)throw new g(500,`The composition places the section "${ce}", which the template does not declare.`);return yR(ce,je.instance,je.version)},computedOf:ce=>{let je=y.instances.find(ie=>ie.instanceId===ce.instance_id),Te=W.get(ce.instance_id);return Promise.resolve(je===void 0||Te===void 0?{}:BO(je.sectionSchema.slots,Te.slots))},render:async(ce,je,Te)=>{try{let ie=J(k,ce.instance_id);return{html:await V(y,k,$,Te.pageId,ie),render_error:null}}catch(ie){return{html:null,render_error:{code:"render_failed",message:ie instanceof Error?ie.message:String(ie)}}}}}),template:{key:y.key,display_name:y.name},bases:{content:$.content,build:$.build},islands:{map:{...pe.map},hostScript:pe.canvasHost,importMap:{...pe.importMap}},stylesheets:[...await s($.build)],provenance:ge}}async function u0(x){let y=await r.template(),w=x.searchParams.get("property");if(w!==null){if(x.searchParams.has("fixture"))throw new g(400,"api/requirements answers a property or a content fixture; name one.");let $=await H(w),Z=[bR(y)];return Ou("property",Z,Iu(Z,$.facts))}let k=await _(xo(x,"fixture","api/requirements"));return wv(wR(y,k),k.facts)}async function d0(x){let y=await H(xo(x,"property","api/facts")),w=x.searchParams.get("home")??"property";if(w==="property")return{facts:y.facts,by:{}};if(w==="library")return{facts:{files:y.facts.files,contacts:y.facts.contacts},by:{}};throw new g(400,`api/facts reads the property or the library, not "${w}".`)}async function f0(x){let y=await H(xo(x,"property","api/media"));return{items:UO(y,o),contacts:LO(y,o),lists:MO(y)}}async function p0(x){let y=await _(xo(x,"fixture","api/owned"));return{owned:CO(y,o)}}async function m0(x,y,w,k){let $=K(x,y,w),Z=[];for(let re of vo(w,x.pages)){let W=await $a({...M(x,w,$),pageId:re.id});Z.push({id:re.id,label:re.label,href:re.path===void 0||re.path==="/"?"/":`${re.path}/`,sections:W.map(pe=>pe.html),media:[],buildFiles:[...new Set(W.flatMap(pe=>pe.buildFiles))]})}return u({pages:Z,contentBase:$.content,buildBase:$.build,siteUrl:`${k}${$.content}`,ingestBase:`${d}api`,facts:w.facts,templateName:x.name,coverUrl:re=>{let W=w.media[re]?.file,pe=typeof W=="string"?W:W?.url??null;return pe===null?null:o(pe)},hash:p})}async function g0(x,y,w){let k=await r.template();if(k.output!=="website")throw new g(404,`"${k.key}" is a ${k.output} template and has no site; its output is its download.`);let $=await a(),Z=O($,w.fixture),re=P($,Z);if(w.property!==re.name)throw new g(404,`The content fixture "${Z.id}" is on the property "${re.name}", not "${w.property}".`);let{rest:W}=w;if(W.length===0||W.length===1&&W[0]!==""&&W[0]!=="favicon.ico")return new Response(null,{status:308,headers:{location:`${y.pathname}/${y.search}`}});let pe=await m0(k,$,Z,QU(x,y)),ge=W.join("/"),oe=pe.files.find(ie=>ie.path===(ge===""||ge.endsWith("/")?`${ge}index.html`:ge));if(oe!==void 0)return WR(oe);if(W[0]===za)return null;let ce=W.length===2&&W[1]===""?`/${W[0]}`:null,je=ce===null?void 0:k.pages.find(ie=>ie.path===ce);if(je!==void 0)throw new g(404,`The fixture "${Z.id}" switches the page "${je.id}" off, so its site has no page at "${ce}".`);let Te=vo(Z,k.pages).map(ie=>ie.path??ie.id).join(", ");throw new g(404,`The site has no page at ${y.pathname} (it has: ${Te}).`)}async function ub(x){let y=await r.template();if(y.output==="website")throw new g(404,`"${y.key}" is a website: it has no download. Open its site instead.`);let w=y.output,k=await a(),$=O(k,x.fixture),Z=P(k,$),re=x.format===null?y.formats[0]:y.formats.find(ie=>ie.id===x.format);if(re===void 0)throw new g(404,`The template declares no format "${x.format??""}" (have: ${y.formats.map(ie=>ie.id).join(", ")||"none"}).`);let W;if(x.page!==null){let ie=ae(y,x.page,404);if(!Yu($,ie.id))throw new g(404,`The fixture "${$.id}" switches the page "${ie.id}" off, so it has no image.`);W=[ie]}else if(W=vo($,y.pages),W.length===0)throw new g(404,`The fixture "${$.id}" switches every page off, so it has no download.`);let pe={propertyAddress:qR($.facts),templateDisplayName:y.name},ge=Object.fromEntries(y.pages.map(ie=>[ie.id,Gi({...pe,pageLabel:ie.label,mime:"image/png"})])),oe={title:Ta({...pe,pageLabel:null}),pageFilenames:ge},ce=W.length===1?W[0].id:null,je=x.page===null&&w==="document"?{name:Gi({...pe,pageLabel:null,mime:"application/pdf"}),contentType:"application/pdf",page:null}:x.page===null&&ce===null?{name:Gi({...pe,pageLabel:null,mime:"application/zip"}),contentType:"application/zip",page:null}:{name:ge[ce],contentType:"image/png",page:ce},Te={property:Z.name,fixture:$.id,format:re.id,...x.page===null?{}:{page:x.page}};return{template:y,held:k,fixture:$,format:re,output:w,pages:W,naming:oe,file:je,subject:Te}}async function h0(x){let y=await ub(x),{template:w,fixture:k}=y,$=K(w,y.held,k),Z=new Map,re={react:n,snapshot:X(w,k,$,(ge,oe)=>Z.set(ge,oe)),contentBase:$.content,buildBase:$.build,kept:f},W=[];for(let ge of y.pages){let oe=await $a({...re,pageId:ge.id});W.push({id:ge.id,sectionHtml:oe.map(ce=>ce.html),...ge.direction===void 0?{}:{direction:ge.direction}})}let pe=[...Z].filter(([ge])=>ge.startsWith($.content)).map(([ge,oe])=>({path:ge.slice($.content.length),url:(oe.master??oe).url,contentType:(oe.master??oe).contentType}));return{subject:y.subject,output:y.output,shoot:x.page===null?"download":"pages",format:y.format,pages:W,media:pe,binding:await r.binding(),naming:y.naming,bases:$,file:y.file}}async function y0(x,y){let w=KR(x.rest);if(w===null)throw new g(404,`There is no download at ${y.pathname}.`);let k=await ub({property:x.property,fixture:x.fixture,format:y.searchParams.get("format"),page:w.page});if(k.subject.property!==x.property)return new Response(null,{status:308,headers:{location:XR(y,x.property,k.subject.property)}});if(r.shipped===void 0)throw new g(501,"This playground makes no downloads.");let $=YR({fixture:k.fixture.id,format:k.format.id,file:k.file}),Z=await r.shipped($);if(Z===null)throw new g(404,`This publish shipped no ${$.slice($.indexOf("/")+1)} for the fixture "${k.fixture.id}", or a save since has changed it.`);return new Response(new Uint8Array(Z),{headers:{"content-type":k.file.contentType,"content-disposition":GR(k.file.name)}})}async function v0(x,y,w){if(w===he.jobs||w.startsWith(`${he.jobs}/`))return fe(x,y,w);if(w==="api/probe")return Ie(x,y);if(w===he.render)return ct(await ye(x));if(w===he.save)return ct(await Fe(x));if(w===he.library)return ct(await sn(x));if(w===he.fixtures)return ct(await an(x));if(w==="api/upload")return ct(await lt(x,y));if(w===he.leads)return OR(x);if(x.method!=="GET"&&x.method!=="HEAD"&&XU(w))throw new g(405,`${w} only reads; a change saves through ${he.save}.`);if(w===he.catalog)return ct(await I());if(w===he.problems)return ct(await E());if(w==="api/media")return ct(await f0(y));if(w==="api/owned")return ct(await p0(y));if(w==="api/bootstrap")return ct(await l0(y));if(w==="api/requirements")return ct(await u0(y));if(w==="api/facts")return ct(await d0(y));let k=Kl(w);return k?.output===er.download&&k.rest[0]!==za?y0(k,y):k?.output===er.site?g0(x,y,k):null}return{downloadInput:h0,contentFile:le,async handle(x){let y=new URL(x.url);if(!y.pathname.startsWith(d)&&`${y.pathname}/`!==d)return null;let w=y.pathname.slice(d.length);try{return await v0(x,y,w)}catch(k){let $=GU(k);if($===null)throw k;return KU($,k instanceof Error?k.message:String(k))}}}}var o0="manifest.json";function i0(e){if(e===null)return null;let t=vt(o0,e);return"path"in t?t.path:null}function s0(e,t){let r={};for(let[o,n]of e){let i=n.file===null?void 0:typeof n.file=="string"?n.file:n.file.url,s=i===void 0?void 0:t(i);r[o]=s===void 0?n:{...n,sizeBytes:s}}return r}function oM(e,t){return{name:e.name,file:e.file,facts:e.facts,media:s0(e.media,t)}}function iM(e,t){PI(e);let r=s0(e.media,t);return{id:e.id,facts:e.facts,media:r,instances:e.contentDoc.instances,provenance:e.provenance,file:e.module,property:e.property,...e.pages===void 0?{}:{pages:e.pages},...e.owned===void 0?{}:{owned:e.owned}}}async function sM(e,t){let{template:r}=e,o=new Map,n=[];for(let i of r.pages)for(let s of i.sections){let a=r.instances.find(d=>d.instanceId===s.instanceId);if(a?.version===void 0)throw new Error(`The composition places "${s.instanceId}" (${s.section}), whose section version the reader does not serve.`);let c=o.get(a.section);c===void 0&&(c=t.computesAt(e,a.section),o.set(a.section,c));let l=a.version.schema,u=a.version.fillSpec.decisions??[];n.push({key:a.section,instance:a.instanceId,section:{key:a.section,slots:l.slots??{},display:l.display??{},computed:(await c).bakeContext.computed??{},decisions:u}})}return n}function lb(e,t,r){return{readText:async o=>(await t.readText(o))?.text??null,async mediaFile(o){let n=await e.media(t,o);return n===null?null:(r!==void 0&&n.size!==void 0&&r.set(typeof n.file=="string"?n.file:n.file.url,n.size),n.file)}}}function a0(e){let{env:t,built:r,reader:o}=e,n=null,i=async s=>{let a=await r.readAt(s);if(a.fixtureList===null)return{properties:[],fixtures:[],violations:[]};let c=a.fixtureList,l=await sM(a,r),u=new Map,d=await UI({store:lb(t,s,u),list:c,listedIn:o0,placements:l}),f=await o.captured?.(),p=d.fixtures.map(S=>{let _=iM(S,O=>u.get(O));return f===void 0?_:{..._,capturable:f.has(S.id)}});return{properties:d.properties.map(S=>oM(S,_=>u.get(_))),fixtures:p,violations:d.violations}};return s=>{let a=`${s.version} ${String(t.mediaVersion?.()??0)}`;if(n?.version!==a){let c=i(s);n={version:a,fixtures:c},c.catch(()=>{n?.fixtures===c&&(n=null)})}return n.fixtures}}function c0(e){let t=dk(e),r=e.fixtures?a0({env:e,built:t,reader:t.reader}):null,o=r===null?void 0:{async current(){let n=await e.files.current(),[{template:i,fixtureList:s},a]=await Promise.all([t.readAt(n),r(n)]);return{version:n.version,template:i,fixtures:a,list:i0(s),reads:{...lb(e,n),...rR(n)}}},change:(n,i)=>e.files.change(n,i),async served(n){return(await e.media(await e.files.current(),n))?.file??null}};return r0({reader:t.reader,renderer:t.renderer,assetUrl:e.url,stylesheets:t.stylesheets,saves:o,fixtures:async()=>r===null?{properties:[],fixtures:[],violations:[]}:r(await e.files.current()),version:async()=>(await e.files.current()).version,jobs:e.jobs,site:t.site,downloads:e.downloads,fixtureMediaPath:e.fixtureMediaPath},e.base)}function qG(e){return c0($b(e))}export{qG as createHost};