@ohos-ports/shopify 4.8.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -0
- package/bin/run.cmd +3 -0
- package/bin/run.js +11 -0
- package/dist/acorn-7M27BPGP.js +16 -0
- package/dist/analytics-3IIUBZ3B.js +1 -0
- package/dist/analytics-OOT5AB52.js +1 -0
- package/dist/angular-DW5TQVCM.js +4 -0
- package/dist/assets/graphiql/favicon.ico +0 -0
- package/dist/assets/graphiql/style.css +58 -0
- package/dist/assets/hydrogen/bundle/analyzer.html +2056 -0
- package/dist/assets/hydrogen/i18n/domains.ts +21 -0
- package/dist/assets/hydrogen/i18n/mock-i18n-types.ts +5 -0
- package/dist/assets/hydrogen/i18n/subdomains.ts +20 -0
- package/dist/assets/hydrogen/i18n/subfolders.ts +22 -0
- package/dist/assets/hydrogen/routes/locale-check.ts +16 -0
- package/dist/assets/hydrogen/starter/.cursor/rules/hydrogen-react-router.mdc +52 -0
- package/dist/assets/hydrogen/starter/.graphqlrc.ts +29 -0
- package/dist/assets/hydrogen/starter/AGENTS.md +5 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +2839 -0
- package/dist/assets/hydrogen/starter/CLAUDE.md +1 -0
- package/dist/assets/hydrogen/starter/README.md +45 -0
- package/dist/assets/hydrogen/starter/app/assets/favicon.svg +28 -0
- package/dist/assets/hydrogen/starter/app/components/AddToCartButton.tsx +37 -0
- package/dist/assets/hydrogen/starter/app/components/Aside.tsx +101 -0
- package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +197 -0
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +109 -0
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +300 -0
- package/dist/assets/hydrogen/starter/app/components/Footer.tsx +129 -0
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +231 -0
- package/dist/assets/hydrogen/starter/app/components/MockShopNotice.tsx +20 -0
- package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +174 -0
- package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +61 -0
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +150 -0
- package/dist/assets/hydrogen/starter/app/components/ProductImage.tsx +23 -0
- package/dist/assets/hydrogen/starter/app/components/ProductItem.tsx +44 -0
- package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +27 -0
- package/dist/assets/hydrogen/starter/app/components/SearchForm.tsx +68 -0
- package/dist/assets/hydrogen/starter/app/components/SearchFormPredictive.tsx +76 -0
- package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +161 -0
- package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +304 -0
- package/dist/assets/hydrogen/starter/app/entry.client.tsx +21 -0
- package/dist/assets/hydrogen/starter/app/entry.server.tsx +53 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerAddressMutations.ts +64 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerDetailsQuery.ts +40 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerOrderQuery.ts +90 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerOrdersQuery.ts +63 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerUpdateMutation.ts +25 -0
- package/dist/assets/hydrogen/starter/app/lib/context.ts +65 -0
- package/dist/assets/hydrogen/starter/app/lib/fragments.ts +242 -0
- package/dist/assets/hydrogen/starter/app/lib/orderFilters.ts +90 -0
- package/dist/assets/hydrogen/starter/app/lib/redirect.ts +23 -0
- package/dist/assets/hydrogen/starter/app/lib/search.ts +79 -0
- package/dist/assets/hydrogen/starter/app/lib/session.ts +72 -0
- package/dist/assets/hydrogen/starter/app/lib/variants.ts +46 -0
- package/dist/assets/hydrogen/starter/app/root.tsx +209 -0
- package/dist/assets/hydrogen/starter/app/routes/$.tsx +11 -0
- package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +78 -0
- package/dist/assets/hydrogen/starter/app/routes/[sitemap.xml].tsx +16 -0
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +177 -0
- package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +9 -0
- package/dist/assets/hydrogen/starter/app/routes/account._index.tsx +5 -0
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +516 -0
- package/dist/assets/hydrogen/starter/app/routes/account.orders.$id.tsx +222 -0
- package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +222 -0
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +133 -0
- package/dist/assets/hydrogen/starter/app/routes/account.tsx +97 -0
- package/dist/assets/hydrogen/starter/app/routes/account_.authorize.tsx +5 -0
- package/dist/assets/hydrogen/starter/app/routes/account_.login.tsx +17 -0
- package/dist/assets/hydrogen/starter/app/routes/account_.logout.tsx +11 -0
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +129 -0
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +175 -0
- package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +109 -0
- package/dist/assets/hydrogen/starter/app/routes/cart.$lines.tsx +70 -0
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +113 -0
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +161 -0
- package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +133 -0
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +122 -0
- package/dist/assets/hydrogen/starter/app/routes/discount.$code.tsx +48 -0
- package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +88 -0
- package/dist/assets/hydrogen/starter/app/routes/policies.$handle.tsx +93 -0
- package/dist/assets/hydrogen/starter/app/routes/policies._index.tsx +69 -0
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +232 -0
- package/dist/assets/hydrogen/starter/app/routes/search.tsx +426 -0
- package/dist/assets/hydrogen/starter/app/routes/sitemap.$type.$page[.xml].tsx +23 -0
- package/dist/assets/hydrogen/starter/app/routes.ts +9 -0
- package/dist/assets/hydrogen/starter/app/styles/app.css +645 -0
- package/dist/assets/hydrogen/starter/app/styles/reset.css +139 -0
- package/dist/assets/hydrogen/starter/customer-accountapi.generated.d.ts +543 -0
- package/dist/assets/hydrogen/starter/env.d.ts +7 -0
- package/dist/assets/hydrogen/starter/eslint.config.js +247 -0
- package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.jpg +0 -0
- package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.md +394 -0
- package/dist/assets/hydrogen/starter/guides/search/search.jpg +0 -0
- package/dist/assets/hydrogen/starter/guides/search/search.md +335 -0
- package/dist/assets/hydrogen/starter/package.json +62 -0
- package/dist/assets/hydrogen/starter/public/.gitkeep +0 -0
- package/dist/assets/hydrogen/starter/react-router.config.ts +13 -0
- package/dist/assets/hydrogen/starter/server.ts +59 -0
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +1342 -0
- package/dist/assets/hydrogen/starter/tsconfig.json +43 -0
- package/dist/assets/hydrogen/starter/vite.config.ts +44 -0
- package/dist/assets/hydrogen/tailwind/package.json +11 -0
- package/dist/assets/hydrogen/tailwind/tailwind.css +6 -0
- package/dist/assets/hydrogen/vanilla-extract/package.json +8 -0
- package/dist/assets/hydrogen/virtual-routes/assets/debug-network.css +609 -0
- package/dist/assets/hydrogen/virtual-routes/assets/favicon-dark.svg +20 -0
- package/dist/assets/hydrogen/virtual-routes/assets/favicon.svg +28 -0
- package/dist/assets/hydrogen/virtual-routes/assets/inter-variable-font.woff2 +0 -0
- package/dist/assets/hydrogen/virtual-routes/assets/jetbrainsmono-variable-font.woff2 +0 -0
- package/dist/assets/hydrogen/virtual-routes/assets/styles.css +249 -0
- package/dist/assets/hydrogen/virtual-routes/components/FlameChartWrapper.jsx +123 -0
- package/dist/assets/hydrogen/virtual-routes/components/HydrogenLogoBaseBW.jsx +32 -0
- package/dist/assets/hydrogen/virtual-routes/components/HydrogenLogoBaseColor.jsx +47 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconBanner.jsx +292 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconClose.jsx +38 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconDiscard.jsx +44 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconError.jsx +61 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconGithub.jsx +23 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconTwitter.jsx +21 -0
- package/dist/assets/hydrogen/virtual-routes/components/Layout.jsx +7 -0
- package/dist/assets/hydrogen/virtual-routes/components/RequestDetails.jsx +171 -0
- package/dist/assets/hydrogen/virtual-routes/components/RequestTable.jsx +91 -0
- package/dist/assets/hydrogen/virtual-routes/components/RequestWaterfall.jsx +151 -0
- package/dist/assets/hydrogen/virtual-routes/layout.jsx +33 -0
- package/dist/assets/hydrogen/virtual-routes/lib/useDebugNetworkServer.jsx +178 -0
- package/dist/assets/hydrogen/virtual-routes/routes/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx +37 -0
- package/dist/assets/hydrogen/virtual-routes/routes/graphiql.jsx +5 -0
- package/dist/assets/hydrogen/virtual-routes/routes/index.jsx +265 -0
- package/dist/assets/hydrogen/virtual-routes/routes/subrequest-profiler.jsx +243 -0
- package/dist/assets/hydrogen/virtual-routes/virtual-root-with-layout.jsx +63 -0
- package/dist/assets/hydrogen/virtual-routes/virtual-root.jsx +67 -0
- package/dist/assets/hydrogen/vite/package.json +13 -0
- package/dist/assets/hydrogen/vite/vite.config.js +43 -0
- package/dist/assets/speedscope/SourceCodePro-Regular.ttf.f546cbe0.woff2 +0 -0
- package/dist/assets/speedscope/demangle-cpp.1768f4cc.js +4 -0
- package/dist/assets/speedscope/favicon-16x16.f74b3187.png +0 -0
- package/dist/assets/speedscope/favicon-32x32.bc503437.png +0 -0
- package/dist/assets/speedscope/file-format-schema.json +324 -0
- package/dist/assets/speedscope/import.bcbb2033.js +123 -0
- package/dist/assets/speedscope/index.html +2 -0
- package/dist/assets/speedscope/perf-vertx-stacks-01-collapsed-all.2681da68.txt +199 -0
- package/dist/assets/speedscope/release.txt +3 -0
- package/dist/assets/speedscope/reset.8c46b7a1.css +2 -0
- package/dist/assets/speedscope/source-code-pro.52b1676f.css +2 -0
- package/dist/assets/speedscope/source-code-pro.LICENSE.md +93 -0
- package/dist/assets/speedscope/source-map.438fa06b.js +24 -0
- package/dist/assets/speedscope/speedscope.6f107512.js +193 -0
- package/dist/babel-I2RLWM7N.js +15 -0
- package/dist/bootstrap.d.ts +5 -0
- package/dist/bootstrap.js +3 -0
- package/dist/chokidar-5RWEYTNQ.js +1 -0
- package/dist/chunk-2AK44UYM.js +1 -0
- package/dist/chunk-2CIZE537.js +3 -0
- package/dist/chunk-2EAFYCCS.js +16 -0
- package/dist/chunk-2KD4LHRT.js +5 -0
- package/dist/chunk-2KGPH7YG.js +2 -0
- package/dist/chunk-2O224ZPO.js +3 -0
- package/dist/chunk-2XDUJQQN.js +12 -0
- package/dist/chunk-36ROOKQB.js +1 -0
- package/dist/chunk-3DCN3N23.js +4 -0
- package/dist/chunk-3JXPOOFV.js +836 -0
- package/dist/chunk-4QBJ5JBX.js +18 -0
- package/dist/chunk-4ZNV5YSL.js +1 -0
- package/dist/chunk-5HBIIYSK.js +1 -0
- package/dist/chunk-5L63PRJL.js +2 -0
- package/dist/chunk-5N6HNQQ5.js +8 -0
- package/dist/chunk-5SEEDOQ5.js +1 -0
- package/dist/chunk-636CTEW7.js +1 -0
- package/dist/chunk-67Z34HN5.js +5 -0
- package/dist/chunk-6BDAJ6UD.js +5 -0
- package/dist/chunk-6CXG3XLP.js +1 -0
- package/dist/chunk-6MWWJZFN.js +19 -0
- package/dist/chunk-6QDOCBD4.js +6 -0
- package/dist/chunk-6RQOEPEC.js +1 -0
- package/dist/chunk-72ZY3KTF.js +1 -0
- package/dist/chunk-742XXXGL.js +6 -0
- package/dist/chunk-773TIA5M.js +2 -0
- package/dist/chunk-7HFHL5SO.js +2 -0
- package/dist/chunk-7ISJRIPT.js +1 -0
- package/dist/chunk-7LWUHQIF.js +1 -0
- package/dist/chunk-7T6M7FAC.js +103 -0
- package/dist/chunk-7UNQOKZW.js +1 -0
- package/dist/chunk-7Y7AZRL3.js +10 -0
- package/dist/chunk-A6BMJISP.js +8 -0
- package/dist/chunk-AAK376RT.js +2 -0
- package/dist/chunk-AEUCDGTB.js +294 -0
- package/dist/chunk-AWUX36VG.js +1 -0
- package/dist/chunk-B4OMIONW.js +5 -0
- package/dist/chunk-BOAGJ6P5.js +1 -0
- package/dist/chunk-BWJIZYAG.js +1 -0
- package/dist/chunk-BZ73NV3L.js +2 -0
- package/dist/chunk-C3RUVXG2.js +6 -0
- package/dist/chunk-C4YLE3NS.js +64 -0
- package/dist/chunk-CEYIZC3M.js +2 -0
- package/dist/chunk-CIWKN4HF.js +7 -0
- package/dist/chunk-CRALWNNO.js +1 -0
- package/dist/chunk-CTNBSUVU.js +83 -0
- package/dist/chunk-CULTZLC4.js +1 -0
- package/dist/chunk-CX5CC6P5.js +1 -0
- package/dist/chunk-CX75OKZK.js +1 -0
- package/dist/chunk-DASVZTAX.js +359 -0
- package/dist/chunk-DPNZWBT5.js +1 -0
- package/dist/chunk-DX3JLOUA.js +4 -0
- package/dist/chunk-E55KS3GZ.js +1 -0
- package/dist/chunk-E5FXOLQO.js +17 -0
- package/dist/chunk-E6N4PZZR.js +7 -0
- package/dist/chunk-EB574SY6.js +6 -0
- package/dist/chunk-ET2CGROE.js +451 -0
- package/dist/chunk-EX5GVHGE.js +1 -0
- package/dist/chunk-F3NYCSXT.js +273 -0
- package/dist/chunk-F3TMLDLC.js +1 -0
- package/dist/chunk-F6X6OXXB.js +3 -0
- package/dist/chunk-FDBHQLFK.js +1 -0
- package/dist/chunk-FDYW3UQC.js +1 -0
- package/dist/chunk-FEDVVYK2.js +1 -0
- package/dist/chunk-FFSDGRAN.js +1 -0
- package/dist/chunk-FJ6F4XRV.js +28 -0
- package/dist/chunk-FKIVKNOV.js +2 -0
- package/dist/chunk-FOREMLFZ.js +1 -0
- package/dist/chunk-FUYDGK33.js +2 -0
- package/dist/chunk-FX3L344E.js +1 -0
- package/dist/chunk-G5XIGN5D.js +593 -0
- package/dist/chunk-GAYKYEIM.js +1 -0
- package/dist/chunk-GB3YC4TI.js +1 -0
- package/dist/chunk-GCN4O7HM.js +1 -0
- package/dist/chunk-GCY7LPEF.js +6 -0
- package/dist/chunk-GNBRCK7L.js +3 -0
- package/dist/chunk-GRPKF5ZB.js +1 -0
- package/dist/chunk-GRSF7456.js +1 -0
- package/dist/chunk-H2TQ4ODI.js +1 -0
- package/dist/chunk-H6XEESUN.js +4 -0
- package/dist/chunk-HB347DXT.js +2 -0
- package/dist/chunk-HFSCXTJQ.js +97 -0
- package/dist/chunk-HHN6KZXX.js +1 -0
- package/dist/chunk-HP64ZTEJ.js +6 -0
- package/dist/chunk-I5A6BPCP.js +1 -0
- package/dist/chunk-IARCMH7G.js +5 -0
- package/dist/chunk-IBI5UCJO.js +1 -0
- package/dist/chunk-IKUSLRGD.js +1 -0
- package/dist/chunk-IT4HYLTY.js +1 -0
- package/dist/chunk-IWOTLFOY.js +32 -0
- package/dist/chunk-J3JPJCWP.js +1 -0
- package/dist/chunk-J4T73EAS.js +8 -0
- package/dist/chunk-JD5P5RAJ.js +1 -0
- package/dist/chunk-JG4HH54Q.js +1 -0
- package/dist/chunk-JIYSCWCG.js +1 -0
- package/dist/chunk-JJZNUFPD.js +44 -0
- package/dist/chunk-JLGA3B7P.js +1 -0
- package/dist/chunk-JWRK5KLD.js +560 -0
- package/dist/chunk-JX7FYWPO.js +1 -0
- package/dist/chunk-K42WBNJQ.js +18 -0
- package/dist/chunk-KDU7VW3L.js +11 -0
- package/dist/chunk-KWVOJWO7.js +1 -0
- package/dist/chunk-LANUJ7LX.js +16 -0
- package/dist/chunk-LD6ZCTZ3.js +9 -0
- package/dist/chunk-LFOBYEWG.js +1 -0
- package/dist/chunk-LQ7ENG4V.js +1 -0
- package/dist/chunk-LUKQ5HLC.js +1 -0
- package/dist/chunk-M2XHIN57.js +4 -0
- package/dist/chunk-MNOQAXJW.js +3 -0
- package/dist/chunk-MPW2YJWU.js +31 -0
- package/dist/chunk-MYQUYU4U.js +2 -0
- package/dist/chunk-N65F7ET2.js +1 -0
- package/dist/chunk-N6RBRPGW.js +7 -0
- package/dist/chunk-N75VOJHO.js +15 -0
- package/dist/chunk-NBFMP5XQ.js +1 -0
- package/dist/chunk-NE3ZFSMS.js +1 -0
- package/dist/chunk-NGLMZYS7.js +278 -0
- package/dist/chunk-NHAUJWEG.js +1 -0
- package/dist/chunk-NILETICC.js +11 -0
- package/dist/chunk-NNZXKFOS.js +7 -0
- package/dist/chunk-NQK2VCDA.js +1 -0
- package/dist/chunk-NROVZETL.js +1 -0
- package/dist/chunk-NW6NUGN7.js +1 -0
- package/dist/chunk-O7DZXO3O.js +15 -0
- package/dist/chunk-OBYQSIYU.js +25 -0
- package/dist/chunk-OEG3N5PG.js +15 -0
- package/dist/chunk-OGBZTY2G.js +5 -0
- package/dist/chunk-OMHR423H.js +1 -0
- package/dist/chunk-OV6SRRXR.js +5 -0
- package/dist/chunk-OVV5YGKN.js +1 -0
- package/dist/chunk-OZL5FTT7.js +1 -0
- package/dist/chunk-OZMQ2EJB.js +1 -0
- package/dist/chunk-P2OI2P2M.js +1 -0
- package/dist/chunk-P57P7UAN.js +3 -0
- package/dist/chunk-PATTG7YZ.js +1 -0
- package/dist/chunk-PG5YNPJB.js +26 -0
- package/dist/chunk-PP4L2JJ6.js +3 -0
- package/dist/chunk-Q5JX23QU.js +1 -0
- package/dist/chunk-Q5KVMLBK.js +4 -0
- package/dist/chunk-Q5LIJGT7.js +12 -0
- package/dist/chunk-Q6ADIMJM.js +6 -0
- package/dist/chunk-Q7BOSHWX.js +7 -0
- package/dist/chunk-QERQARMC.js +1 -0
- package/dist/chunk-QOV43E26.js +1 -0
- package/dist/chunk-QTFUYKMF.js +1 -0
- package/dist/chunk-QTJCCOAG.js +20 -0
- package/dist/chunk-R6ICQT2D.js +1 -0
- package/dist/chunk-R7T3LYJL.js +3 -0
- package/dist/chunk-RJ5VF3QY.js +2 -0
- package/dist/chunk-RXQJCJDV.js +1 -0
- package/dist/chunk-S2TLBBSS.js +5 -0
- package/dist/chunk-S5FOQY35.js +1 -0
- package/dist/chunk-SYLHT42O.js +1 -0
- package/dist/chunk-T4AA6TSF.js +15 -0
- package/dist/chunk-T4QWK5GG.js +10 -0
- package/dist/chunk-T7KHS6RF.js +1 -0
- package/dist/chunk-T7PJDT5O.js +6 -0
- package/dist/chunk-TEY4LRY7.js +1 -0
- package/dist/chunk-TFBRVLDN.js +1 -0
- package/dist/chunk-TOLPNBZK.js +4 -0
- package/dist/chunk-TR4OWSEX.js +77 -0
- package/dist/chunk-TU47HMTL.js +1 -0
- package/dist/chunk-TUVDJ3PG.js +2 -0
- package/dist/chunk-TYMYIUIQ.js +1 -0
- package/dist/chunk-U2DWBZK2.js +1 -0
- package/dist/chunk-U53OLUOE.js +3 -0
- package/dist/chunk-UAETNFN4.js +1 -0
- package/dist/chunk-UAFEFKAQ.js +5 -0
- package/dist/chunk-ULRJDKWQ.js +1 -0
- package/dist/chunk-UOHNRH6E.js +7 -0
- package/dist/chunk-UZARYOLN.js +1 -0
- package/dist/chunk-VASGXHYA.js +1 -0
- package/dist/chunk-VD4XJ6BX.js +1 -0
- package/dist/chunk-VE35YELD.js +1 -0
- package/dist/chunk-VFM2KQRM.js +19 -0
- package/dist/chunk-VJEKDBGZ.js +1 -0
- package/dist/chunk-VKWPEFWQ.js +1 -0
- package/dist/chunk-VSDRNYA5.js +1 -0
- package/dist/chunk-VUMUCNI7.js +1 -0
- package/dist/chunk-VVZSYHDG.js +4 -0
- package/dist/chunk-VXEYO3ZP.js +1 -0
- package/dist/chunk-VYDSOAV4.js +9 -0
- package/dist/chunk-W6ST525S.js +99 -0
- package/dist/chunk-WBYAGS6B.js +6 -0
- package/dist/chunk-WGAFCKGD.js +1 -0
- package/dist/chunk-WYBTC356.js +1 -0
- package/dist/chunk-XF2KTEID.js +1 -0
- package/dist/chunk-XH5YGJQR.js +1 -0
- package/dist/chunk-XHKWITLA.js +1705 -0
- package/dist/chunk-XOCB4KNX.js +2 -0
- package/dist/chunk-XUUAKGEX.js +1 -0
- package/dist/chunk-XUYVJEZG.js +3 -0
- package/dist/chunk-Y47C3LSX.js +3 -0
- package/dist/chunk-Y5PRPHLQ.js +6 -0
- package/dist/chunk-YD2VQEN5.js +1 -0
- package/dist/chunk-YESGYUEL.js +1 -0
- package/dist/chunk-YEVGLC5X.js +1 -0
- package/dist/chunk-YFINLODF.js +375 -0
- package/dist/chunk-YKL3BLWC.js +46 -0
- package/dist/chunk-YLQ3LNNY.js +99 -0
- package/dist/chunk-YLXPYXQP.js +1 -0
- package/dist/chunk-YNDIZCD2.js +7 -0
- package/dist/chunk-YPWHD3NL.js +1 -0
- package/dist/chunk-YSAFHVV6.js +8 -0
- package/dist/chunk-YY6TFARF.js +1 -0
- package/dist/chunk-YZMY2CTU.js +10 -0
- package/dist/chunk-Z4AFEO36.js +1 -0
- package/dist/chunk-Z5WPP6ME.js +1 -0
- package/dist/chunk-Z65E4UAP.js +1 -0
- package/dist/chunk-ZDF5N422.js +1 -0
- package/dist/chunk-ZDRIQC7O.js +1 -0
- package/dist/chunk-ZH44BDUR.js +5 -0
- package/dist/chunk-ZI7LK3LW.js +11 -0
- package/dist/chunk-ZL5LU4U2.js +32 -0
- package/dist/chunk-ZYX7UHCQ.js +1 -0
- package/dist/chunk-ZZRFG6ME.js +317 -0
- package/dist/cli/commands/app/app-logs/sources.js +1 -0
- package/dist/cli/commands/app/build.js +1 -0
- package/dist/cli/commands/app/bulk/cancel.js +1 -0
- package/dist/cli/commands/app/bulk/execute.js +1 -0
- package/dist/cli/commands/app/bulk/status.js +1 -0
- package/dist/cli/commands/app/config/link.js +1 -0
- package/dist/cli/commands/app/config/pull.js +1 -0
- package/dist/cli/commands/app/config/use.js +1 -0
- package/dist/cli/commands/app/config/validate.js +1 -0
- package/dist/cli/commands/app/demo/watcher.js +1 -0
- package/dist/cli/commands/app/deploy.js +1 -0
- package/dist/cli/commands/app/dev/clean.js +1 -0
- package/dist/cli/commands/app/dev.js +1 -0
- package/dist/cli/commands/app/doctor/instructions.js +1 -0
- package/dist/cli/commands/app/doctor.js +1 -0
- package/dist/cli/commands/app/env/pull.js +1 -0
- package/dist/cli/commands/app/env/show.js +1 -0
- package/dist/cli/commands/app/execute.js +1 -0
- package/dist/cli/commands/app/function/build.js +1 -0
- package/dist/cli/commands/app/function/info.js +1 -0
- package/dist/cli/commands/app/function/replay.js +1 -0
- package/dist/cli/commands/app/function/run.js +1 -0
- package/dist/cli/commands/app/function/schema.js +1 -0
- package/dist/cli/commands/app/function/typegen.js +1 -0
- package/dist/cli/commands/app/generate/extension.js +1 -0
- package/dist/cli/commands/app/graphiql.js +1 -0
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -0
- package/dist/cli/commands/app/import-extensions.js +1 -0
- package/dist/cli/commands/app/info.js +1 -0
- package/dist/cli/commands/app/init.js +1 -0
- package/dist/cli/commands/app/logs.js +1 -0
- package/dist/cli/commands/app/release.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -0
- package/dist/cli/commands/app/versions/list.js +1 -0
- package/dist/cli/commands/app/webhook/trigger.js +1 -0
- package/dist/cli/commands/auth/login.d.ts +8 -0
- package/dist/cli/commands/auth/login.js +1 -0
- package/dist/cli/commands/auth/logout.d.ts +5 -0
- package/dist/cli/commands/auth/logout.js +1 -0
- package/dist/cli/commands/cache/clear.d.ts +6 -0
- package/dist/cli/commands/cache/clear.js +1 -0
- package/dist/cli/commands/config/autoupgrade/constants.d.ts +4 -0
- package/dist/cli/commands/config/autoupgrade/constants.js +1 -0
- package/dist/cli/commands/config/autoupgrade/off.d.ts +7 -0
- package/dist/cli/commands/config/autoupgrade/off.js +1 -0
- package/dist/cli/commands/config/autoupgrade/on.d.ts +7 -0
- package/dist/cli/commands/config/autoupgrade/on.js +1 -0
- package/dist/cli/commands/config/autoupgrade/status.d.ts +7 -0
- package/dist/cli/commands/config/autoupgrade/status.js +1 -0
- package/dist/cli/commands/debug/command-flags.d.ts +9 -0
- package/dist/cli/commands/debug/command-flags.js +1 -0
- package/dist/cli/commands/doc/fetch.d.ts +12 -0
- package/dist/cli/commands/doc/fetch.js +1 -0
- package/dist/cli/commands/doc/search.d.ts +13 -0
- package/dist/cli/commands/doc/search.js +1 -0
- package/dist/cli/commands/docs/generate.d.ts +21 -0
- package/dist/cli/commands/docs/generate.js +1 -0
- package/dist/cli/commands/doctor-release/doctor-release.d.ts +6 -0
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -0
- package/dist/cli/commands/doctor-release/theme/index.d.ts +14 -0
- package/dist/cli/commands/doctor-release/theme/index.js +1 -0
- package/dist/cli/commands/help.d.ts +13 -0
- package/dist/cli/commands/help.js +1 -0
- package/dist/cli/commands/kitchen-sink/async.d.ts +11 -0
- package/dist/cli/commands/kitchen-sink/async.js +1 -0
- package/dist/cli/commands/kitchen-sink/index.d.ts +12 -0
- package/dist/cli/commands/kitchen-sink/index.js +1 -0
- package/dist/cli/commands/kitchen-sink/prompts.d.ts +11 -0
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -0
- package/dist/cli/commands/kitchen-sink/static.d.ts +11 -0
- package/dist/cli/commands/kitchen-sink/static.js +1 -0
- package/dist/cli/commands/notifications/generate.d.ts +6 -0
- package/dist/cli/commands/notifications/generate.js +1 -0
- package/dist/cli/commands/notifications/list.d.ts +9 -0
- package/dist/cli/commands/notifications/list.js +1 -0
- package/dist/cli/commands/organization/list.js +1 -0
- package/dist/cli/commands/search.d.ts +14 -0
- package/dist/cli/commands/search.js +1 -0
- package/dist/cli/commands/send-analytics.d.ts +5 -0
- package/dist/cli/commands/send-analytics.js +1 -0
- package/dist/cli/commands/theme/check.js +1 -0
- package/dist/cli/commands/theme/console.js +1 -0
- package/dist/cli/commands/theme/delete.js +1 -0
- package/dist/cli/commands/theme/dev.js +1 -0
- package/dist/cli/commands/theme/duplicate.js +1 -0
- package/dist/cli/commands/theme/info.js +1 -0
- package/dist/cli/commands/theme/init.js +1 -0
- package/dist/cli/commands/theme/language-server.js +1 -0
- package/dist/cli/commands/theme/list.js +1 -0
- package/dist/cli/commands/theme/metafields/pull.js +1 -0
- package/dist/cli/commands/theme/open.js +1 -0
- package/dist/cli/commands/theme/package.js +1 -0
- package/dist/cli/commands/theme/preview.js +1 -0
- package/dist/cli/commands/theme/profile.js +1 -0
- package/dist/cli/commands/theme/publish.js +1 -0
- package/dist/cli/commands/theme/pull.js +1 -0
- package/dist/cli/commands/theme/push.js +1 -0
- package/dist/cli/commands/theme/rename.js +1 -0
- package/dist/cli/commands/theme/share.js +1 -0
- package/dist/cli/commands/upgrade.d.ts +7 -0
- package/dist/cli/commands/upgrade.js +1 -0
- package/dist/cli/commands/version.d.ts +5 -0
- package/dist/cli/commands/version.js +1 -0
- package/dist/cli/help.d.ts +38 -0
- package/dist/cli/help.js +2 -0
- package/dist/cli/services/commands/doc/fetch.d.ts +1 -0
- package/dist/cli/services/commands/doc/fetch.js +45 -0
- package/dist/cli/services/commands/doc/search.d.ts +1 -0
- package/dist/cli/services/commands/doc/search.js +47 -0
- package/dist/cli/services/commands/notifications.d.ts +2 -0
- package/dist/cli/services/commands/notifications.js +106 -0
- package/dist/cli/services/commands/search.d.ts +1 -0
- package/dist/cli/services/commands/search.js +7 -0
- package/dist/cli/services/commands/version.d.ts +1 -0
- package/dist/cli/services/commands/version.js +6 -0
- package/dist/cli/services/doctor-release/context.d.ts +16 -0
- package/dist/cli/services/doctor-release/context.js +11 -0
- package/dist/cli/services/doctor-release/theme/runner.d.ts +7 -0
- package/dist/cli/services/doctor-release/theme/runner.js +37 -0
- package/dist/cli/services/doctor-release/theme/tests/init.d.ts +11 -0
- package/dist/cli/services/doctor-release/theme/tests/init.js +34 -0
- package/dist/cli/services/doctor-release/theme/tests/push.d.ts +10 -0
- package/dist/cli/services/doctor-release/theme/tests/push.js +44 -0
- package/dist/cli/services/kitchen-sink/async.d.ts +1 -0
- package/dist/cli/services/kitchen-sink/async.js +65 -0
- package/dist/cli/services/kitchen-sink/prompts.d.ts +1 -0
- package/dist/cli/services/kitchen-sink/prompts.js +168 -0
- package/dist/cli/services/kitchen-sink/static.d.ts +1 -0
- package/dist/cli/services/kitchen-sink/static.js +201 -0
- package/dist/command-registry.d.ts +8 -0
- package/dist/command-registry.js +1 -0
- package/dist/conf-store-ASDCTDQ4.js +1 -0
- package/dist/configs/all.yml +280 -0
- package/dist/configs/nothing.yml +3 -0
- package/dist/configs/recommended.yml +258 -0
- package/dist/configs/theme-app-extension.yml +24 -0
- package/dist/custom-oclif-loader-BWAMUFQ4.js +1 -0
- package/dist/data/app_block_entry.json +13 -0
- package/dist/data/default_setting_values.json +24 -0
- package/dist/data/filters.json +6177 -0
- package/dist/data/latest.json +2 -0
- package/dist/data/local_block_entry.json +25 -0
- package/dist/data/manifest_theme.json +19 -0
- package/dist/data/manifest_theme_app_extension.json +10 -0
- package/dist/data/objects.json +20621 -0
- package/dist/data/preset.json +72 -0
- package/dist/data/preset_blocks.json +91 -0
- package/dist/data/section.json +208 -0
- package/dist/data/setting.json +1538 -0
- package/dist/data/settings.json +10 -0
- package/dist/data/shopify_system_translations.json +2766 -0
- package/dist/data/tags.json +1276 -0
- package/dist/data/targetted_block_entry.json +15 -0
- package/dist/data/theme_block.json +91 -0
- package/dist/data/theme_block_entry.json +14 -0
- package/dist/data/theme_settings.json +83 -0
- package/dist/data/translations.json +63 -0
- package/dist/deprecations-VBQV7Q4O.js +1 -0
- package/dist/devtools-37DE4MUR.js +1 -0
- package/dist/devtools-WAWU5KQL.js +1 -0
- package/dist/dist-FZLOAKU7.js +1 -0
- package/dist/dist-HTY6UHG5.js +1 -0
- package/dist/environments-HSTNEQRG.js +1 -0
- package/dist/error-2LZYKRMA.js +1 -0
- package/dist/error-handler-PIGEJ7BT.js +1 -0
- package/dist/estree-JV5M77BA.js +44 -0
- package/dist/flow-N4JYPYMQ.js +20 -0
- package/dist/fs-BJHNJDDK.js +1 -0
- package/dist/glimmer-JEV3BXHR.js +37 -0
- package/dist/graphql-DTF6MHYF.js +28 -0
- package/dist/hooks/did-you-mean.d.ts +1 -0
- package/dist/hooks/did-you-mean.js +1 -0
- package/dist/hooks/hydrogen-init.d.ts +7 -0
- package/dist/hooks/hydrogen-init.js +1 -0
- package/dist/hooks/plugin-plugins.d.ts +1 -0
- package/dist/hooks/plugin-plugins.js +1 -0
- package/dist/hooks/postrun.d.ts +1 -0
- package/dist/hooks/postrun.js +1 -0
- package/dist/hooks/prerun.d.ts +1 -0
- package/dist/hooks/prerun.js +2 -0
- package/dist/hooks/public-metadata.d.ts +1 -0
- package/dist/hooks/public-metadata.js +1 -0
- package/dist/hooks/sensitive-metadata.d.ts +1 -0
- package/dist/hooks/sensitive-metadata.js +1 -0
- package/dist/hooks/tunnel-provider.d.ts +1 -0
- package/dist/hooks/tunnel-provider.js +1 -0
- package/dist/hooks/tunnel-start.d.ts +1 -0
- package/dist/hooks/tunnel-start.js +1 -0
- package/dist/html-LVOJ3RQS.js +25 -0
- package/dist/http-proxy-node16-A6AKKRQH.js +38 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +120 -0
- package/dist/is-global-6SCOAJVG.js +1 -0
- package/dist/latest-version-LDWU5F7A.js +49 -0
- package/dist/lib-2BR2WN7L.js +1 -0
- package/dist/lib-M72BVWQ3.js +1 -0
- package/dist/lib-O5EZ4NVT.js +1 -0
- package/dist/lib-P3APEIHY.js +1 -0
- package/dist/local-PZWPRFU7.js +1 -0
- package/dist/markdown-J6CE6POI.js +62 -0
- package/dist/meriyah-PNQQZQYI.js +5 -0
- package/dist/metadata-VVBHB3HL.js +1 -0
- package/dist/morph-BMYYMQNX.js +30489 -0
- package/dist/multipart-parser-5NSSTW27.js +2 -0
- package/dist/node-package-manager-ETYQN7OM.js +1 -0
- package/dist/notifications-system-652OG5KL.js +1 -0
- package/dist/npa-A4YSCQ5Q.js +1 -0
- package/dist/open-KLSGXBIW.js +1 -0
- package/dist/os-7D6NT4O3.js +1 -0
- package/dist/out-53ABAVL7.js +1 -0
- package/dist/output-74VDGYJD.js +1 -0
- package/dist/path-MBXP7ZIC.js +1 -0
- package/dist/postcss-Q36SHOML.js +61 -0
- package/dist/prettier-EGVCP5CY.js +1 -0
- package/dist/source-map-E7FCCJL7.js +1 -0
- package/dist/system-P5QIJALL.js +1 -0
- package/dist/templates/ui-extensions/html/error.html.liquid +41 -0
- package/dist/templates/ui-extensions/html/post_purchase/index.html.liquid +44 -0
- package/dist/templates/ui-extensions/html/post_purchase/tunnel-error.html.liquid +41 -0
- package/dist/templates/ui-extensions/html/tunnel-error.html.liquid +55 -0
- package/dist/toml_patch_bg.wasm +0 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/typescript-5R4Y7PXE.js +1 -0
- package/dist/typescript-WYPDGPSV.js +21 -0
- package/dist/ui-H5I5YVKV.js +1 -0
- package/dist/upgrade-34HSYBXI.js +1 -0
- package/dist/vendor/esbuild-ohos/lib/main.js +2538 -0
- package/dist/vendor/esbuild-ohos/package.json +7 -0
- package/dist/version-EKXEAF6Q.js +1 -0
- package/dist/version-J2PYO6M5.js +1 -0
- package/dist/workerd-X4TGHEG3.js +18 -0
- package/dist/yaml-6KWCJ64X.js +159 -0
- package/dist/yoga.wasm +0 -0
- package/oclif.manifest.json +10100 -0
- package/package.json +153 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as r}from"./chunk-Q5KVMLBK.js";import{b as a}from"./chunk-2XDUJQQN.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var i=class extends a{static summary="Upgrades Shopify CLI.";static descriptionWithMarkdown="Upgrades Shopify CLI using your package manager.";static description=this.descriptionWithoutMarkdown();async run(){await r()}};export{i as a};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as d}from"./chunk-YY6TFARF.js";import{a as v}from"./chunk-ZYX7UHCQ.js";import{a as y}from"./chunk-GRPKF5ZB.js";import{p}from"./chunk-5SEEDOQ5.js";import{p as f,v as u}from"./chunk-GNBRCK7L.js";import{b as l,f as m}from"./chunk-YEVGLC5X.js";import{E as c,z as s}from"./chunk-YFINLODF.js";import{a as g}from"./chunk-CTNBSUVU.js";import{e as b,g as r}from"./chunk-VKWPEFWQ.js";r();r();async function w(o,t,i){let e=await v(o,{header:"Select a theme to publish",filter:{development:!1,live:!1,theme:t.theme}}),h=d({...e,role:"live"},o);!t.force&&!i&&!await c({message:`Do you want to make '${e.name}' the new live theme on ${o.storeFqdn}?`,confirmationMessage:`Yes, make '${e.name}' the new live theme`,cancellationMessage:"No, cancel publish"})||(await p(e.id,o),s({headline:t.environment?`Environment: ${t.environment}`:void 0,body:["The theme",...y(e),"is now live at",{link:{label:h,url:h}},{char:"."}]}))}var n=b(g(),1);var a=class extends u{static summary="Set a remote theme as the live theme.";static descriptionWithMarkdown=`Publishes an unpublished theme from your theme library.
|
|
2
|
+
|
|
3
|
+
If no theme ID is specified, then you're prompted to select the theme that you want to publish from the list of themes in your store.
|
|
4
|
+
|
|
5
|
+
You can run this command only in a directory that matches the [default Shopify theme folder structure](https://shopify.dev/docs/themes/tools/cli#directory-structure).
|
|
6
|
+
|
|
7
|
+
If you want to publish your local theme, then you need to run \`shopify theme push\` first. You're asked to confirm that you want to publish the specified theme. You can skip this confirmation using the \`--force\` flag.`;static description=this.descriptionWithoutMarkdown();static flags={...l,...f,force:m(n.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE"})),theme:m(n.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}))};static multiEnvironmentsFlags=["store","password","theme"];async command(t,i,e){await w(i,t,e)}};export{a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as m}from"./chunk-6BDAJ6UD.js";import{a as p}from"./chunk-UZARYOLN.js";import{a as n}from"./chunk-YESGYUEL.js";import{wa as r}from"./chunk-ZZRFG6ME.js";import{b as s}from"./chunk-YEVGLC5X.js";import{wb as e}from"./chunk-VFM2KQRM.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var i=class d extends p{static summary="Display app and extensions environment variables.";static descriptionWithMarkdown="Displays environment variables that can be used to deploy apps and app extensions.";static description=this.descriptionWithoutMarkdown();static flags={...s,...n};async run(){let{flags:t}=await this.parse(d),{app:a,remoteApp:l,organization:c}=await r({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return e(await m(a,l,c)),{app:a}}};export{i as a};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{c as J}from"./chunk-Y47C3LSX.js";import{b as F}from"./chunk-O7DZXO3O.js";import{a as ae}from"./chunk-7LWUHQIF.js";import{a as ne}from"./chunk-UZARYOLN.js";import{a as z}from"./chunk-YESGYUEL.js";import{B as Z,D as ee,d as K,e as Q,wa as te}from"./chunk-ZZRFG6ME.js";import{b as T,d as X,e as B}from"./chunk-XOCB4KNX.js";import{a as k}from"./chunk-NROVZETL.js";import{b as H,f as O}from"./chunk-YEVGLC5X.js";import{e as E}from"./chunk-3JXPOOFV.js";import{C as G,p as P,x as L,y as _}from"./chunk-Y5PRPHLQ.js";import{D as q,F as U,H as b,J as V,z as $}from"./chunk-YFINLODF.js";import{h as m}from"./chunk-BWJIZYAG.js";import{a as xe}from"./chunk-CTNBSUVU.js";import{Oa as j,Ta as h,Ua as R,Wa as D,X as f,_ as M,ka as w,qa as N,rb as W,wa as g,ya as v}from"./chunk-VFM2KQRM.js";import{e as Y}from"./chunk-R6ICQT2D.js";import{d as p,n as C}from"./chunk-773TIA5M.js";import{e as he,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();async function re(e,t,r,n={}){let{templates:a,groupOrder:i}=await e.templateSpecifications(t,n);return{templates:a.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:i}}d();d();async function ie(e,t){let r=e?.path??"",n=p(t,r);if(!await h(n))throw new m(`
|
|
2
|
+
The extension is not available for ${e?.value}`);return n}async function oe({name:e,app:t}){let r=M(e),n=p(t.directory,B.extensions.directoryName,r);if(await h(n))throw new m(`
|
|
3
|
+
A directory with this name (${r}) already exists.
|
|
4
|
+
Choose a new name for your extension.`);return await g(n),await N(p(n,T.lockFile)),n}function A(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function se(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,n=e.extensionTemplate.supportedFlavors.find(o=>o.value===r),a=await oe({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,s={directory:a,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:n,onGetTemplateRepository:e.onGetTemplateRepository??(async(o,c)=>{await J({repoUrl:o,destination:c,shallow:!0})})};return await we(s),{directory:C(a),extensionTemplate:e.extensionTemplate}}async function we(e){try{switch(e.type){case"theme":await ge(e);break;case"function":await ve(e);break;default:await Ee(e);break}let t=p(e.directory,T.lockFile);await v(t)}catch(t){throw await v(e.directory),t}}async function ge({directory:e,url:t,type:r,name:n,extensionFlavor:a,onGetTemplateRepository:i}){return w(async s=>{let o=await I(t,a,s,i);await F(o,e,{name:n,type:r,uid:E(f(n))})})}async function ve({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=A(i?.value),c=[];c.push({title:"Generating function extension",task:async()=>{if(await w(async l=>{let u=await I(t,i,l,s);await F(u,e,{name:a,handle:f(a),flavor:i?.value,uid:E(f(a))})}),o==="javascript"){let l=ce(i?.value??"rust");await le(e,l,"!(*.graphql)")}}}),o==="javascript"&&c.push({title:"Installing additional dependencies",task:async()=>{n.usesWorkspaces&&await P({packageManager:n.packageManager,directory:n.directory});let l=Fe(o);await _(l,{packageManager:n.packageManager,type:"prod",directory:n.usesWorkspaces?e:n.directory})}}),o==="javascript"&&c.push({title:"Building GraphQL types",task:async()=>{await Q({directory:e,isJavaScript:!0},{stdout:process.stdout,stderr:process.stderr,app:r})}}),await b(c)}async function Ee({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=A(i?.value),c=[{title:"Generating extension",task:async()=>{let l=ce(i?.value??"vanilla-js");await w(async u=>{let y=await I(t,i,u,s);await F(y,e,{srcFileExtension:l,name:a,handle:f(a),flavor:i?.value??"",uid:E(f(a))})}),o==="javascript"&&await le(e,l)}},{title:"Installing dependencies",task:async()=>{let l=n.packageManager;if(n.usesWorkspaces)A(i?.value)==="javascript"&&await P({packageManager:l,directory:n.directory});else{await Te(n.directory,i?.value);let u=p(e,"package.json"),y=await ke(u);await _(y,{packageManager:l,type:"prod",directory:n.directory}),await v(u)}}}];c.push({title:"Update shared type definition",task:async()=>{await ee(r)}}),await b(c)}function ce(e){return{"vanilla-js":"js",preact:"jsx",react:"jsx",typescript:"ts","typescript-react":"tsx",rust:"rs",wasm:"wasm",liquid:"liquid","config-only":""}[e]??"js"}function Fe(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${K}.0.0`}),t}async function le(e,t,r="*"){let n=await D(p(e,"src",r)),a=[];for(let i of n)a.push(j(i,`${i}.${t}`));await Promise.all(a)}async function Te(e,t){t==="typescript-react"&&await G(e,{"@types/react":X.reactTypes})}async function ke(e){if(!await h(e))return[];let t=await L(e);return Object.entries(t?.dependencies??{}).map(([r,n])=>({name:r,version:n}))}async function I(e,t,r,n){let a=p(r,"download");return await g(a),await n(e,a),ie(t,a)}d();function Pe(e,t=[]){let r=[...e.map(a=>({label:a.name,value:a.identifier,group:a.group||"Other",sortPriority:a.sortPriority??Number.MAX_SAFE_INTEGER})),...t.map(a=>({label:`${a.name} (limit reached)`,value:a.identifier,group:a.group||"Other",disabled:!0,sortPriority:a.sortPriority??Number.MAX_SAFE_INTEGER}))],n=(a,i)=>a.sortPriority===i.sortPriority?a.label.localeCompare(i.label):a.sortPriority-i.sortPriority;return r.sort(n)}var _e=async e=>{let t=e.extensionTemplates,r=e.templateType,n=e.extensionFlavor;if(!r){if(n&&(t=t.filter(c=>c.supportedFlavors.map(l=>l.value).includes(n))),t.length===0)throw new m("You have reached the limit for the number of extensions you can create.");r=await U({message:"Type of extension?",choices:Pe(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let a=t.find(c=>c.identifier===r),i=e.name||await pe(e.directory,a.defaultName),s=e.extensionFlavor??await be(a);return{extensionTemplate:a,extensionContent:{name:i,flavor:s}}};async function pe(e,t,r=1){let n=t.includes(" ")?" ":"-",a=r<=1?t:`${t}${n}${r}`,i=p(e,f(a));return R(i)?pe(e,t,r+1):V({message:"Name your extension:",defaultValue:a})}async function be(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:q({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var de=_e;async function Oe(e){let{app:t,developerPlatformClient:r,remoteApp:n,specifications:a,template:i}=e,s=a.map(ye=>ye.identifier),{templates:o,groupOrder:c}=await re(r,n,s,{requestedTemplate:i}),l=await Ae(o,c,a,t,e),u=await de(l);await Se(u,i);let y=Ce(u,t,e,r),fe=await se(y);Me(fe,e.project.packageManager)}async function Ae(e,t,r,n,a){let i=await Re(a.template,n,e,r);Ne(i,a.flavor);let{validTemplates:s,templatesOverlimit:o}=Ie(e,r,n);return{templateType:i?.identifier,name:a.name,extensionFlavor:a.flavor,directory:p(a.directory,"extensions"),app:n,extensionTemplates:s??[],unavailableExtensions:o??[],reset:a.reset,groupOrder:t}}function Ie(e,t,r){return ae(e,a=>!ue(r,t,a)?"validTemplates":"templatesOverlimit")}function ue(e,t,r){let n=r.type,a=t.find(s=>s.identifier===n||s.externalIdentifier===n);return e.extensionsForType({identifier:n,externalIdentifier:n}).length>=(a?.registrationLimit??1)}async function Se(e,t){let{extensionContent:r}=e;return k.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function Ce(e,t,r,n){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:n}}function Me(e,t){let r=je(e.extensionTemplate,e.directory,t);$(r)}function Ne(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(n=>n.value);if(!r.includes(t))throw new m("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}function je(e,t,r){let n={headline:["Your extension was created in",{filePath:t},{char:"."}],nextSteps:[],reference:[]};return e.type!=="function"&&n.nextSteps.push(["To preview this extension along with the rest of the project, run",{command:W(r,"shopify app dev")}]),e.supportLinks[0]&&n.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),n}async function Re(e,t,r,n){if(!e)return;let a=r.find(i=>i.identifier===e);if(!a){let i=await Y(),s=r.map(c=>c.identifier),o=i?"You might need to enable some flags on your Organization or App":void 0;throw new m(`Unknown extension type: ${e}.
|
|
5
|
+
The following extension types are supported: ${s.join(", ")}`,o)}if(ue(t,n,a))throw new m(`Invalid extension type: ${e}`,`You have reached the limit of extension(s) of type ${a.type} per app`);return a}var me=Oe;var x=he(xe(),1);var S=class e extends ne{static summary="Generate a new app Extension.";static descriptionWithMarkdown=`Generates a new [app extension](https://shopify.dev/docs/apps/build/app-extensions). For a list of app extensions that you can generate using this command, refer to [Supported extensions](https://shopify.dev/docs/apps/build/app-extensions/list-of-app-extensions).
|
|
6
|
+
|
|
7
|
+
Each new app extension is created in a folder under \`extensions/\`. To learn more about the extensions file structure, refer to [App structure](https://shopify.dev/docs/apps/build/cli-for-apps/app-structure) and the documentation for your extension.
|
|
8
|
+
`;static description=this.descriptionWithoutMarkdown();static flags={...H,...z,template:O(x.Flags.string({char:"t",hidden:!1,description:"Extension template",env:"SHOPIFY_FLAG_EXTENSION_TEMPLATE"})),name:O(x.Flags.string({char:"n",hidden:!1,description:"name of your Extension",env:"SHOPIFY_FLAG_NAME"})),"clone-url":x.Flags.string({hidden:!0,char:"u",description:"The Git URL to clone the function extensions templates from. Defaults to: https://github.com/Shopify/function-examples",env:"SHOPIFY_FLAG_CLONE_URL"}),flavor:x.Flags.string({hidden:!1,description:"Choose a starting template for your extension, where applicable. Required if non interactive when the selected extension template supports multiple flavors.",options:["vanilla-js","react","typescript","typescript-react","wasm","rust"],env:"SHOPIFY_FLAG_FLAVOR"})};async run(){let{flags:t}=await this.parse(e);await k.addPublicMetadata(()=>({cmd_scaffold_required_auth:!0,cmd_scaffold_template_custom:t["clone-url"]!==void 0,cmd_scaffold_type_owner:"@shopify/app"})),await Z(t.path);let{app:r,project:n,specifications:a,remoteApp:i,developerPlatformClient:s}=await te({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return await me({directory:t.path,reset:t.reset,name:t.name,cloneUrl:t["clone-url"],template:t.template,flavor:t.flavor,app:r,project:n,specifications:a,remoteApp:i,developerPlatformClient:s}),{app:r}}};export{S as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as n}from"./chunk-VKWPEFWQ.js";n();function i(e,r){let t=r.storeFqdn;return e.role==="live"?`https://${t}`:`https://${t}?preview_theme_id=${e.id}`}function s(e,r){return o(r.storeFqdn,`/themes/${e.id}/editor`)}function d(e){return o(e,"/online_store/preferences")}function o(e,r=""){return`https://${e}/admin${r}`}export{i as a,s as b,d as c};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{a as fo}from"./chunk-RJ5VF3QY.js";import{h as ho,k as po}from"./chunk-BWJIZYAG.js";import{a as Ic}from"./chunk-CX5CC6P5.js";import{Ab as Ve,Ra as Qr,Sa as cr,sb as Fe}from"./chunk-VFM2KQRM.js";import{f as mo}from"./chunk-R6ICQT2D.js";import{a as uo,b as lo}from"./chunk-DPNZWBT5.js";import{i as ar}from"./chunk-773TIA5M.js";import{c as g,e as Zr,g as u}from"./chunk-VKWPEFWQ.js";var kt=g(q=>{"use strict";u();Object.defineProperty(q,"__esModule",{value:!0});q.regexpCode=q.getEsmExportName=q.getProperty=q.safeStringify=q.stringify=q.strConcat=q.addCodeArg=q.str=q._=q.nil=q._Code=q.Name=q.IDENTIFIER=q._CodeOrName=void 0;var Ot=class{};q._CodeOrName=Ot;q.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ke=class extends Ot{constructor(e){if(super(),!q.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};q.Name=Ke;var se=class extends Ot{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof Ke&&(r[n.str]=(r[n.str]||0)+1),r),{})}};q._Code=se;q.nil=new se("");function Co(t,...e){let r=[t[0]],n=0;for(;n<e.length;)hn(r,e[n]),r.push(t[++n]);return new se(r)}q._=Co;var fn=new se("+");function Do(t,...e){let r=[Tt(t[0])],n=0;for(;n<e.length;)r.push(fn),hn(r,e[n]),r.push(fn,Tt(t[++n]));return zc(r),new se(r)}q.str=Do;function hn(t,e){e instanceof se?t.push(...e._items):e instanceof Ke?t.push(e):t.push(Uc(e))}q.addCodeArg=hn;function zc(t){let e=1;for(;e<t.length-1;){if(t[e]===fn){let r=Fc(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Fc(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Ke||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Ke))return`"${t}${e.slice(1)}`}function Vc(t,e){return e.emptyStr()?t:t.emptyStr()?e:Do`${t}${e}`}q.strConcat=Vc;function Uc(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Tt(Array.isArray(t)?t.join(","):t)}function Lc(t){return new se(Tt(t))}q.stringify=Lc;function Tt(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}q.safeStringify=Tt;function Kc(t){return typeof t=="string"&&q.IDENTIFIER.test(t)?new se(`.${t}`):Co`[${t}]`}q.getProperty=Kc;function Gc(t){if(typeof t=="string"&&q.IDENTIFIER.test(t))return new se(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}q.getEsmExportName=Gc;function Hc(t){return new se(t.toString())}q.regexpCode=Hc});var yn=g(Q=>{"use strict";u();Object.defineProperty(Q,"__esModule",{value:!0});Q.ValueScope=Q.ValueScopeName=Q.Scope=Q.varKinds=Q.UsedValueState=void 0;var Z=kt(),pn=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},fr;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(fr||(Q.UsedValueState=fr={}));Q.varKinds={const:new Z.Name("const"),let:new Z.Name("let"),var:new Z.Name("var")};var hr=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Z.Name?e:this.name(e)}name(e){return new Z.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Q.Scope=hr;var pr=class extends Z.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Z._)`.${new Z.Name(r)}[${n}]`}};Q.ValueScopeName=pr;var Wc=(0,Z._)`\n`,mn=class extends hr{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Wc:Z.nil}}get(){return this._scope}name(e){return new pr(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let s=this.toName(e),{prefix:o}=s,i=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[o];if(a){let d=a.get(i);if(d)return d}else a=this._values[o]=new Map;a.set(i,s);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=r.ref,s.setValue(r,{property:o,itemIndex:l}),s}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Z._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,s=>{if(s.value===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return s.value.code},r,n)}_reduceValues(e,r,n={},s){let o=Z.nil;for(let i in e){let a=e[i];if(!a)continue;let c=n[i]=n[i]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,fr.Started);let d=r(l);if(d){let f=this.opts.es5?Q.varKinds.var:Q.varKinds.const;o=(0,Z._)`${o}${f} ${l} = ${d};${this.opts._n}`}else if(d=s?.(l))o=(0,Z._)`${o}${d}${this.opts._n}`;else throw new pn(l);c.set(l,fr.Completed)})}return o}};Q.ValueScope=mn});var b=g(P=>{"use strict";u();Object.defineProperty(P,"__esModule",{value:!0});P.or=P.and=P.not=P.CodeGen=P.operators=P.varKinds=P.ValueScopeName=P.ValueScope=P.Scope=P.Name=P.regexpCode=P.stringify=P.getProperty=P.nil=P.strConcat=P.str=P._=void 0;var O=kt(),le=yn(),ke=kt();Object.defineProperty(P,"_",{enumerable:!0,get:function(){return ke._}});Object.defineProperty(P,"str",{enumerable:!0,get:function(){return ke.str}});Object.defineProperty(P,"strConcat",{enumerable:!0,get:function(){return ke.strConcat}});Object.defineProperty(P,"nil",{enumerable:!0,get:function(){return ke.nil}});Object.defineProperty(P,"getProperty",{enumerable:!0,get:function(){return ke.getProperty}});Object.defineProperty(P,"stringify",{enumerable:!0,get:function(){return ke.stringify}});Object.defineProperty(P,"regexpCode",{enumerable:!0,get:function(){return ke.regexpCode}});Object.defineProperty(P,"Name",{enumerable:!0,get:function(){return ke.Name}});var gr=yn();Object.defineProperty(P,"Scope",{enumerable:!0,get:function(){return gr.Scope}});Object.defineProperty(P,"ValueScope",{enumerable:!0,get:function(){return gr.ValueScope}});Object.defineProperty(P,"ValueScopeName",{enumerable:!0,get:function(){return gr.ValueScopeName}});Object.defineProperty(P,"varKinds",{enumerable:!0,get:function(){return gr.varKinds}});P.operators={GT:new O._Code(">"),GTE:new O._Code(">="),LT:new O._Code("<"),LTE:new O._Code("<="),EQ:new O._Code("==="),NEQ:new O._Code("!=="),NOT:new O._Code("!"),OR:new O._Code("||"),AND:new O._Code("&&"),ADD:new O._Code("+")};var Pe=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},_n=class extends Pe{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?le.varKinds.var:this.varKind,s=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=ot(this.rhs,e,r)),this}get names(){return this.rhs instanceof O._CodeOrName?this.rhs.names:{}}},mr=class extends Pe{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof O.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=ot(this.rhs,e,r),this}get names(){let e=this.lhs instanceof O.Name?{}:{...this.lhs.names};return _r(e,this.rhs)}},gn=class extends mr{constructor(e,r,n,s){super(e,n,s),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},$n=class extends Pe{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},vn=class extends Pe{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},wn=class extends Pe{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},En=class extends Pe{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=ot(this.code,e,r),this}get names(){return this.code instanceof O._CodeOrName?this.code.names:{}}},Rt=class extends Pe{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,s=n.length;for(;s--;){let o=n[s];o.optimizeNames(e,r)||(Jc(e,o.names),n.splice(s,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>We(e,r.names),{})}},Ne=class extends Rt{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Sn=class extends Rt{},st=class extends Ne{};st.kind="else";var Ge=class t extends Ne{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new st(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Mo(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=ot(this.condition,e,r),this}get names(){let e=super.names;return _r(e,this.condition),this.else&&We(e,this.else.names),e}};Ge.kind="if";var He=class extends Ne{};He.kind="for";var bn=class extends He{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=ot(this.iteration,e,r),this}get names(){return We(super.names,this.iteration.names)}},Pn=class extends He{constructor(e,r,n,s){super(),this.varKind=e,this.name=r,this.from=n,this.to=s}render(e){let r=e.es5?le.varKinds.var:this.varKind,{name:n,from:s,to:o}=this;return`for(${r} ${n}=${s}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=_r(super.names,this.from);return _r(e,this.to)}},yr=class extends He{constructor(e,r,n,s){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=ot(this.iterable,e,r),this}get names(){return We(super.names,this.iterable.names)}},jt=class extends Ne{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};jt.kind="func";var qt=class extends Rt{render(e){return"return "+super.render(e)}};qt.kind="return";var Nn=class extends Ne{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,s;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(s=this.finally)===null||s===void 0||s.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&We(e,this.catch.names),this.finally&&We(e,this.finally.names),e}},At=class extends Ne{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};At.kind="catch";var Ct=class extends Ne{render(e){return"finally"+super.render(e)}};Ct.kind="finally";var In=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
2
|
+
`:""},this._extScope=e,this._scope=new le.Scope({parent:e}),this._nodes=[new Sn]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,s){let o=this._scope.toName(r);return n!==void 0&&s&&(this._constants[o.str]=n),this._leafNode(new _n(e,o,n)),o}const(e,r,n){return this._def(le.varKinds.const,e,r,n)}let(e,r,n){return this._def(le.varKinds.let,e,r,n)}var(e,r,n){return this._def(le.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new mr(e,r,n))}add(e,r){return this._leafNode(new gn(e,P.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==O.nil&&this._leafNode(new En(e)),this}object(...e){let r=["{"];for(let[n,s]of e)r.length>1&&r.push(","),r.push(n),(n!==s||this.opts.es5)&&(r.push(":"),(0,O.addCodeArg)(r,s));return r.push("}"),new O._Code(r)}if(e,r,n){if(this._blockNode(new Ge(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Ge(e))}else(){return this._elseNode(new st)}endIf(){return this._endBlockNode(Ge,st)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new bn(e),r)}forRange(e,r,n,s,o=this.opts.es5?le.varKinds.var:le.varKinds.let){let i=this._scope.toName(e);return this._for(new Pn(o,i,r,n),()=>s(i))}forOf(e,r,n,s=le.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let i=r instanceof O.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,O._)`${i}.length`,a=>{this.var(o,(0,O._)`${i}[${a}]`),n(o)})}return this._for(new yr("of",s,o,r),()=>n(o))}forIn(e,r,n,s=this.opts.es5?le.varKinds.var:le.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,O._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new yr("in",s,o,r),()=>n(o))}endFor(){return this._endBlockNode(He)}label(e){return this._leafNode(new $n(e))}break(e){return this._leafNode(new vn(e))}return(e){let r=new qt;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(qt)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let s=new Nn;if(this._blockNode(s),this.code(e),r){let o=this.name("e");this._currNode=s.catch=new At(o),r(o)}return n&&(this._currNode=s.finally=new Ct,this.code(n)),this._endBlockNode(At,Ct)}throw(e){return this._leafNode(new wn(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=O.nil,n,s){return this._blockNode(new jt(e,r,n)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(jt)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Ge))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};P.CodeGen=In;function We(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function _r(t,e){return e instanceof O._CodeOrName?We(t,e.names):t}function ot(t,e,r){if(t instanceof O.Name)return n(t);if(!s(t))return t;return new O._Code(t._items.reduce((o,i)=>(i instanceof O.Name&&(i=n(i)),i instanceof O._Code?o.push(...i._items):o.push(i),o),[]));function n(o){let i=r[o.str];return i===void 0||e[o.str]!==1?o:(delete e[o.str],i)}function s(o){return o instanceof O._Code&&o._items.some(i=>i instanceof O.Name&&e[i.str]===1&&r[i.str]!==void 0)}}function Jc(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Mo(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,O._)`!${On(t)}`}P.not=Mo;var Yc=xo(P.operators.AND);function Bc(...t){return t.reduce(Yc)}P.and=Bc;var Xc=xo(P.operators.OR);function Zc(...t){return t.reduce(Xc)}P.or=Zc;function xo(t){return(e,r)=>e===O.nil?r:r===O.nil?e:(0,O._)`${On(e)} ${t} ${On(r)}`}function On(t){return t instanceof O.Name?t:(0,O._)`(${t})`}});var k=g(N=>{"use strict";u();Object.defineProperty(N,"__esModule",{value:!0});N.checkStrictMode=N.getErrorPath=N.Type=N.useFunc=N.setEvaluated=N.evaluatedPropsToName=N.mergeEvaluated=N.eachItem=N.unescapeJsonPointer=N.escapeJsonPointer=N.escapeFragment=N.unescapeFragment=N.schemaRefOrVal=N.schemaHasRulesButRef=N.schemaHasRules=N.checkUnknownRules=N.alwaysValidSchema=N.toHash=void 0;var C=b(),Qc=kt();function eu(t){let e={};for(let r of t)e[r]=!0;return e}N.toHash=eu;function tu(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Vo(t,e),!Uo(e,t.self.RULES.all))}N.alwaysValidSchema=tu;function Vo(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let s=n.RULES.keywords;for(let o in e)s[o]||Go(t,`unknown keyword: "${o}"`)}N.checkUnknownRules=Vo;function Uo(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}N.schemaHasRules=Uo;function ru(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}N.schemaHasRulesButRef=ru;function nu({topSchemaRef:t,schemaPath:e},r,n,s){if(!s){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,C._)`${r}`}return(0,C._)`${t}${e}${(0,C.getProperty)(n)}`}N.schemaRefOrVal=nu;function su(t){return Lo(decodeURIComponent(t))}N.unescapeFragment=su;function ou(t){return encodeURIComponent(kn(t))}N.escapeFragment=ou;function kn(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}N.escapeJsonPointer=kn;function Lo(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}N.unescapeJsonPointer=Lo;function iu(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}N.eachItem=iu;function zo({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(s,o,i,a)=>{let c=i===void 0?o:i instanceof C.Name?(o instanceof C.Name?t(s,o,i):e(s,o,i),i):o instanceof C.Name?(e(s,i,o),o):r(o,i);return a===C.Name&&!(c instanceof C.Name)?n(s,c):c}}N.mergeEvaluated={props:zo({mergeNames:(t,e,r)=>t.if((0,C._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,C._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,C._)`${r} || {}`).code((0,C._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,C._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,C._)`${r} || {}`),Rn(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Ko}),items:zo({mergeNames:(t,e,r)=>t.if((0,C._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,C._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,C._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,C._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Ko(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,C._)`{}`);return e!==void 0&&Rn(t,r,e),r}N.evaluatedPropsToName=Ko;function Rn(t,e,r){Object.keys(r).forEach(n=>t.assign((0,C._)`${e}${(0,C.getProperty)(n)}`,!0))}N.setEvaluated=Rn;var Fo={};function au(t,e){return t.scopeValue("func",{ref:e,code:Fo[e.code]||(Fo[e.code]=new Qc._Code(e.code))})}N.useFunc=au;var Tn;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Tn||(N.Type=Tn={}));function cu(t,e,r){if(t instanceof C.Name){let n=e===Tn.Num;return r?n?(0,C._)`"[" + ${t} + "]"`:(0,C._)`"['" + ${t} + "']"`:n?(0,C._)`"/" + ${t}`:(0,C._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,C.getProperty)(t).toString():"/"+kn(t)}N.getErrorPath=cu;function Go(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}N.checkStrictMode=Go});var Ie=g(jn=>{"use strict";u();Object.defineProperty(jn,"__esModule",{value:!0});var H=b(),uu={data:new H.Name("data"),valCxt:new H.Name("valCxt"),instancePath:new H.Name("instancePath"),parentData:new H.Name("parentData"),parentDataProperty:new H.Name("parentDataProperty"),rootData:new H.Name("rootData"),dynamicAnchors:new H.Name("dynamicAnchors"),vErrors:new H.Name("vErrors"),errors:new H.Name("errors"),this:new H.Name("this"),self:new H.Name("self"),scope:new H.Name("scope"),json:new H.Name("json"),jsonPos:new H.Name("jsonPos"),jsonLen:new H.Name("jsonLen"),jsonPart:new H.Name("jsonPart")};jn.default=uu});var Dt=g(W=>{"use strict";u();Object.defineProperty(W,"__esModule",{value:!0});W.extendErrors=W.resetErrorsCount=W.reportExtraError=W.reportError=W.keyword$DataError=W.keywordError=void 0;var R=b(),$r=k(),Y=Ie();W.keywordError={message:({keyword:t})=>(0,R.str)`must pass "${t}" keyword validation`};W.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,R.str)`"${t}" keyword must be ${e} ($data)`:(0,R.str)`"${t}" keyword is invalid ($data)`};function lu(t,e=W.keywordError,r,n){let{it:s}=t,{gen:o,compositeRule:i,allErrors:a}=s,c=Jo(t,e,r);n??(i||a)?Ho(o,c):Wo(s,(0,R._)`[${c}]`)}W.reportError=lu;function du(t,e=W.keywordError,r){let{it:n}=t,{gen:s,compositeRule:o,allErrors:i}=n,a=Jo(t,e,r);Ho(s,a),o||i||Wo(n,Y.default.vErrors)}W.reportExtraError=du;function fu(t,e){t.assign(Y.default.errors,e),t.if((0,R._)`${Y.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,R._)`${Y.default.vErrors}.length`,e),()=>t.assign(Y.default.vErrors,null)))}W.resetErrorsCount=fu;function hu({gen:t,keyword:e,schemaValue:r,data:n,errsCount:s,it:o}){if(s===void 0)throw new Error("ajv implementation error");let i=t.name("err");t.forRange("i",s,Y.default.errors,a=>{t.const(i,(0,R._)`${Y.default.vErrors}[${a}]`),t.if((0,R._)`${i}.instancePath === undefined`,()=>t.assign((0,R._)`${i}.instancePath`,(0,R.strConcat)(Y.default.instancePath,o.errorPath))),t.assign((0,R._)`${i}.schemaPath`,(0,R.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,R._)`${i}.schema`,r),t.assign((0,R._)`${i}.data`,n))})}W.extendErrors=hu;function Ho(t,e){let r=t.const("err",e);t.if((0,R._)`${Y.default.vErrors} === null`,()=>t.assign(Y.default.vErrors,(0,R._)`[${r}]`),(0,R._)`${Y.default.vErrors}.push(${r})`),t.code((0,R._)`${Y.default.errors}++`)}function Wo(t,e){let{gen:r,validateName:n,schemaEnv:s}=t;s.$async?r.throw((0,R._)`new ${t.ValidationError}(${e})`):(r.assign((0,R._)`${n}.errors`,e),r.return(!1))}var Je={keyword:new R.Name("keyword"),schemaPath:new R.Name("schemaPath"),params:new R.Name("params"),propertyName:new R.Name("propertyName"),message:new R.Name("message"),schema:new R.Name("schema"),parentSchema:new R.Name("parentSchema")};function Jo(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,R._)`{}`:pu(t,e,r)}function pu(t,e,r={}){let{gen:n,it:s}=t,o=[mu(s,r),yu(t,r)];return _u(t,e,o),n.object(...o)}function mu({errorPath:t},{instancePath:e}){let r=e?(0,R.str)`${t}${(0,$r.getErrorPath)(e,$r.Type.Str)}`:t;return[Y.default.instancePath,(0,R.strConcat)(Y.default.instancePath,r)]}function yu({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let s=n?e:(0,R.str)`${e}/${t}`;return r&&(s=(0,R.str)`${s}${(0,$r.getErrorPath)(r,$r.Type.Str)}`),[Je.schemaPath,s]}function _u(t,{params:e,message:r},n){let{keyword:s,data:o,schemaValue:i,it:a}=t,{opts:c,propertyName:l,topSchemaRef:d,schemaPath:f}=a;n.push([Je.keyword,s],[Je.params,typeof e=="function"?e(t):e||(0,R._)`{}`]),c.messages&&n.push([Je.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([Je.schema,i],[Je.parentSchema,(0,R._)`${d}${f}`],[Y.default.data,o]),l&&n.push([Je.propertyName,l])}});var Bo=g(it=>{"use strict";u();Object.defineProperty(it,"__esModule",{value:!0});it.boolOrEmptySchema=it.topBoolOrEmptySchema=void 0;var gu=Dt(),$u=b(),vu=Ie(),wu={message:"boolean schema is false"};function Eu(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Yo(t,!1):typeof r=="object"&&r.$async===!0?e.return(vu.default.data):(e.assign((0,$u._)`${n}.errors`,null),e.return(!0))}it.topBoolOrEmptySchema=Eu;function Su(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Yo(t)):r.var(e,!0)}it.boolOrEmptySchema=Su;function Yo(t,e){let{gen:r,data:n}=t,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,gu.reportError)(s,wu,void 0,e)}});var qn=g(at=>{"use strict";u();Object.defineProperty(at,"__esModule",{value:!0});at.getRules=at.isJSONType=void 0;var bu=["string","number","integer","boolean","null","object","array"],Pu=new Set(bu);function Nu(t){return typeof t=="string"&&Pu.has(t)}at.isJSONType=Nu;function Iu(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}at.getRules=Iu});var An=g(Re=>{"use strict";u();Object.defineProperty(Re,"__esModule",{value:!0});Re.shouldUseRule=Re.shouldUseGroup=Re.schemaHasRulesForType=void 0;function Ou({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Xo(t,n)}Re.schemaHasRulesForType=Ou;function Xo(t,e){return e.rules.some(r=>Zo(t,r))}Re.shouldUseGroup=Xo;function Zo(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Re.shouldUseRule=Zo});var Mt=g(J=>{"use strict";u();Object.defineProperty(J,"__esModule",{value:!0});J.reportTypeError=J.checkDataTypes=J.checkDataType=J.coerceAndCheckDataType=J.getJSONTypes=J.getSchemaTypes=J.DataType=void 0;var Tu=qn(),ku=An(),Ru=Dt(),S=b(),Qo=k(),ct;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(ct||(J.DataType=ct={}));function ju(t){let e=ei(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}J.getSchemaTypes=ju;function ei(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Tu.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}J.getJSONTypes=ei;function qu(t,e){let{gen:r,data:n,opts:s}=t,o=Au(e,s.coerceTypes),i=e.length>0&&!(o.length===0&&e.length===1&&(0,ku.schemaHasRulesForType)(t,e[0]));if(i){let a=Dn(e,n,s.strictNumbers,ct.Wrong);r.if(a,()=>{o.length?Cu(t,e,o):Mn(t)})}return i}J.coerceAndCheckDataType=qu;var ti=new Set(["string","number","integer","boolean","null"]);function Au(t,e){return e?t.filter(r=>ti.has(r)||e==="array"&&r==="array"):[]}function Cu(t,e,r){let{gen:n,data:s,opts:o}=t,i=n.let("dataType",(0,S._)`typeof ${s}`),a=n.let("coerced",(0,S._)`undefined`);o.coerceTypes==="array"&&n.if((0,S._)`${i} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>n.assign(s,(0,S._)`${s}[0]`).assign(i,(0,S._)`typeof ${s}`).if(Dn(e,s,o.strictNumbers),()=>n.assign(a,s))),n.if((0,S._)`${a} !== undefined`);for(let l of r)(ti.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),Mn(t),n.endIf(),n.if((0,S._)`${a} !== undefined`,()=>{n.assign(s,a),Du(t,a)});function c(l){switch(l){case"string":n.elseIf((0,S._)`${i} == "number" || ${i} == "boolean"`).assign(a,(0,S._)`"" + ${s}`).elseIf((0,S._)`${s} === null`).assign(a,(0,S._)`""`);return;case"number":n.elseIf((0,S._)`${i} == "boolean" || ${s} === null
|
|
3
|
+
|| (${i} == "string" && ${s} && ${s} == +${s})`).assign(a,(0,S._)`+${s}`);return;case"integer":n.elseIf((0,S._)`${i} === "boolean" || ${s} === null
|
|
4
|
+
|| (${i} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(a,(0,S._)`+${s}`);return;case"boolean":n.elseIf((0,S._)`${s} === "false" || ${s} === 0 || ${s} === null`).assign(a,!1).elseIf((0,S._)`${s} === "true" || ${s} === 1`).assign(a,!0);return;case"null":n.elseIf((0,S._)`${s} === "" || ${s} === 0 || ${s} === false`),n.assign(a,null);return;case"array":n.elseIf((0,S._)`${i} === "string" || ${i} === "number"
|
|
5
|
+
|| ${i} === "boolean" || ${s} === null`).assign(a,(0,S._)`[${s}]`)}}}function Du({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,S._)`${e} !== undefined`,()=>t.assign((0,S._)`${e}[${r}]`,n))}function Cn(t,e,r,n=ct.Correct){let s=n===ct.Correct?S.operators.EQ:S.operators.NEQ,o;switch(t){case"null":return(0,S._)`${e} ${s} null`;case"array":o=(0,S._)`Array.isArray(${e})`;break;case"object":o=(0,S._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=i((0,S._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=i();break;default:return(0,S._)`typeof ${e} ${s} ${t}`}return n===ct.Correct?o:(0,S.not)(o);function i(a=S.nil){return(0,S.and)((0,S._)`typeof ${e} == "number"`,a,r?(0,S._)`isFinite(${e})`:S.nil)}}J.checkDataType=Cn;function Dn(t,e,r,n){if(t.length===1)return Cn(t[0],e,r,n);let s,o=(0,Qo.toHash)(t);if(o.array&&o.object){let i=(0,S._)`typeof ${e} != "object"`;s=o.null?i:(0,S._)`!${e} || ${i}`,delete o.null,delete o.array,delete o.object}else s=S.nil;o.number&&delete o.integer;for(let i in o)s=(0,S.and)(s,Cn(i,e,r,n));return s}J.checkDataTypes=Dn;var Mu={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,S._)`{type: ${t}}`:(0,S._)`{type: ${e}}`};function Mn(t){let e=xu(t);(0,Ru.reportError)(e,Mu)}J.reportTypeError=Mn;function xu(t){let{gen:e,data:r,schema:n}=t,s=(0,Qo.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:t}}});var ni=g(vr=>{"use strict";u();Object.defineProperty(vr,"__esModule",{value:!0});vr.assignDefaults=void 0;var ut=b(),zu=k();function Fu(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let s in r)ri(t,s,r[s].default);else e==="array"&&Array.isArray(n)&&n.forEach((s,o)=>ri(t,o,s.default))}vr.assignDefaults=Fu;function ri(t,e,r){let{gen:n,compositeRule:s,data:o,opts:i}=t;if(r===void 0)return;let a=(0,ut._)`${o}${(0,ut.getProperty)(e)}`;if(s){(0,zu.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,ut._)`${a} === undefined`;i.useDefaults==="empty"&&(c=(0,ut._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,ut._)`${a} = ${(0,ut.stringify)(r)}`)}});var oe=g(A=>{"use strict";u();Object.defineProperty(A,"__esModule",{value:!0});A.validateUnion=A.validateArray=A.usePattern=A.callValidateCode=A.schemaProperties=A.allSchemaProperties=A.noPropertyInData=A.propertyInData=A.isOwnProperty=A.hasPropFunc=A.reportMissingProp=A.checkMissingProp=A.checkReportMissingProp=void 0;var M=b(),xn=k(),je=Ie(),Vu=k();function Uu(t,e){let{gen:r,data:n,it:s}=t;r.if(Fn(r,n,e,s.opts.ownProperties),()=>{t.setParams({missingProperty:(0,M._)`${e}`},!0),t.error()})}A.checkReportMissingProp=Uu;function Lu({gen:t,data:e,it:{opts:r}},n,s){return(0,M.or)(...n.map(o=>(0,M.and)(Fn(t,e,o,r.ownProperties),(0,M._)`${s} = ${o}`)))}A.checkMissingProp=Lu;function Ku(t,e){t.setParams({missingProperty:e},!0),t.error()}A.reportMissingProp=Ku;function si(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,M._)`Object.prototype.hasOwnProperty`})}A.hasPropFunc=si;function zn(t,e,r){return(0,M._)`${si(t)}.call(${e}, ${r})`}A.isOwnProperty=zn;function Gu(t,e,r,n){let s=(0,M._)`${e}${(0,M.getProperty)(r)} !== undefined`;return n?(0,M._)`${s} && ${zn(t,e,r)}`:s}A.propertyInData=Gu;function Fn(t,e,r,n){let s=(0,M._)`${e}${(0,M.getProperty)(r)} === undefined`;return n?(0,M.or)(s,(0,M.not)(zn(t,e,r))):s}A.noPropertyInData=Fn;function oi(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}A.allSchemaProperties=oi;function Hu(t,e){return oi(e).filter(r=>!(0,xn.alwaysValidSchema)(t,e[r]))}A.schemaProperties=Hu;function Wu({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:s,errorPath:o},it:i},a,c,l){let d=l?(0,M._)`${t}, ${e}, ${n}${s}`:e,f=[[je.default.instancePath,(0,M.strConcat)(je.default.instancePath,o)],[je.default.parentData,i.parentData],[je.default.parentDataProperty,i.parentDataProperty],[je.default.rootData,je.default.rootData]];i.opts.dynamicRef&&f.push([je.default.dynamicAnchors,je.default.dynamicAnchors]);let h=(0,M._)`${d}, ${r.object(...f)}`;return c!==M.nil?(0,M._)`${a}.call(${c}, ${h})`:(0,M._)`${a}(${h})`}A.callValidateCode=Wu;var Ju=(0,M._)`new RegExp`;function Yu({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:s}=e.code,o=s(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,M._)`${s.code==="new RegExp"?Ju:(0,Vu.useFunc)(t,s)}(${r}, ${n})`})}A.usePattern=Yu;function Bu(t){let{gen:e,data:r,keyword:n,it:s}=t,o=e.name("valid");if(s.allErrors){let a=e.let("valid",!0);return i(()=>e.assign(a,!1)),a}return e.var(o,!0),i(()=>e.break()),o;function i(a){let c=e.const("len",(0,M._)`${r}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:n,dataProp:l,dataPropType:xn.Type.Num},o),e.if((0,M.not)(o),a)})}}A.validateArray=Bu;function Xu(t){let{gen:e,schema:r,keyword:n,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,xn.alwaysValidSchema)(s,c))&&!s.opts.unevaluated)return;let i=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((c,l)=>{let d=t.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);e.assign(i,(0,M._)`${i} || ${a}`),t.mergeValidEvaluated(d,a)||e.if((0,M.not)(i))})),t.result(i,()=>t.reset(),()=>t.error(!0))}A.validateUnion=Xu});var ci=g($e=>{"use strict";u();Object.defineProperty($e,"__esModule",{value:!0});$e.validateKeywordUsage=$e.validSchemaType=$e.funcKeywordCode=$e.macroKeywordCode=void 0;var B=b(),Ye=Ie(),Zu=oe(),Qu=Dt();function el(t,e){let{gen:r,keyword:n,schema:s,parentSchema:o,it:i}=t,a=e.macro.call(i.self,s,o,i),c=ai(r,n,a);i.opts.validateSchema!==!1&&i.self.validateSchema(a,!0);let l=r.name("valid");t.subschema({schema:a,schemaPath:B.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}$e.macroKeywordCode=el;function tl(t,e){var r;let{gen:n,keyword:s,schema:o,parentSchema:i,$data:a,it:c}=t;nl(c,e);let l=!a&&e.compile?e.compile.call(c.self,o,i,c):e.validate,d=ai(n,s,l),f=n.let("valid");t.block$data(f,h),t.ok((r=e.valid)!==null&&r!==void 0?r:f);function h(){if(e.errors===!1)m(),e.modifying&&ii(t),_(()=>t.error());else{let $=e.async?y():p();e.modifying&&ii(t),_(()=>rl(t,$))}}function y(){let $=n.let("ruleErrs",null);return n.try(()=>m((0,B._)`await `),T=>n.assign(f,!1).if((0,B._)`${T} instanceof ${c.ValidationError}`,()=>n.assign($,(0,B._)`${T}.errors`),()=>n.throw(T))),$}function p(){let $=(0,B._)`${d}.errors`;return n.assign($,null),m(B.nil),$}function m($=e.async?(0,B._)`await `:B.nil){let T=c.opts.passContext?Ye.default.this:Ye.default.self,I=!("compile"in e&&!a||e.schema===!1);n.assign(f,(0,B._)`${$}${(0,Zu.callValidateCode)(t,d,T,I)}`,e.modifying)}function _($){var T;n.if((0,B.not)((T=e.valid)!==null&&T!==void 0?T:f),$)}}$e.funcKeywordCode=tl;function ii(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,B._)`${n.parentData}[${n.parentDataProperty}]`))}function rl(t,e){let{gen:r}=t;r.if((0,B._)`Array.isArray(${e})`,()=>{r.assign(Ye.default.vErrors,(0,B._)`${Ye.default.vErrors} === null ? ${e} : ${Ye.default.vErrors}.concat(${e})`).assign(Ye.default.errors,(0,B._)`${Ye.default.vErrors}.length`),(0,Qu.extendErrors)(t)},()=>t.error())}function nl({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function ai(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,B.stringify)(r)})}function sl(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}$e.validSchemaType=sl;function ol({schema:t,opts:e,self:r,errSchemaPath:n},s,o){if(Array.isArray(s.keyword)?!s.keyword.includes(o):s.keyword!==o)throw new Error("ajv implementation error");let i=s.dependencies;if(i?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${i.join(",")}`);if(s.validateSchema&&!s.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}$e.validateKeywordUsage=ol});var li=g(qe=>{"use strict";u();Object.defineProperty(qe,"__esModule",{value:!0});qe.extendSubschemaMode=qe.extendSubschemaData=qe.getSubschema=void 0;var ve=b(),ui=k();function il(t,{keyword:e,schemaProp:r,schema:n,schemaPath:s,errSchemaPath:o,topSchemaRef:i}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,ve._)`${t.schemaPath}${(0,ve.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,ve._)`${t.schemaPath}${(0,ve.getProperty)(e)}${(0,ve.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,ui.escapeFragment)(r)}`}}if(n!==void 0){if(s===void 0||o===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:i,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}qe.getSubschema=il;function al(t,e,{dataProp:r,dataPropType:n,data:s,dataTypes:o,propertyName:i}){if(s!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:l,dataPathArr:d,opts:f}=e,h=a.let("data",(0,ve._)`${e.data}${(0,ve.getProperty)(r)}`,!0);c(h),t.errorPath=(0,ve.str)`${l}${(0,ui.getErrorPath)(r,n,f.jsPropertySyntax)}`,t.parentDataProperty=(0,ve._)`${r}`,t.dataPathArr=[...d,t.parentDataProperty]}if(s!==void 0){let l=s instanceof ve.Name?s:a.let("data",s,!0);c(l),i!==void 0&&(t.propertyName=i)}o&&(t.dataTypes=o);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}qe.extendSubschemaData=al;function cl(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:o}){n!==void 0&&(t.compositeRule=n),s!==void 0&&(t.createErrors=s),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}qe.extendSubschemaMode=cl});var Vn=g((zy,di)=>{"use strict";u();di.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}});var hi=g((Vy,fi)=>{"use strict";u();var Ae=fi.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},s=r.post||function(){};wr(e,n,s,t,"",t)};Ae.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ae.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ae.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ae.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function wr(t,e,r,n,s,o,i,a,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,s,o,i,a,c,l);for(var d in n){var f=n[d];if(Array.isArray(f)){if(d in Ae.arrayKeywords)for(var h=0;h<f.length;h++)wr(t,e,r,f[h],s+"/"+d+"/"+h,o,s,d,n,h)}else if(d in Ae.propsKeywords){if(f&&typeof f=="object")for(var y in f)wr(t,e,r,f[y],s+"/"+d+"/"+ul(y),o,s,d,n,y)}else(d in Ae.keywords||t.allKeys&&!(d in Ae.skipKeywords))&&wr(t,e,r,f,s+"/"+d,o,s,d,n)}r(n,s,o,i,a,c,l)}}function ul(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var xt=g(ee=>{"use strict";u();Object.defineProperty(ee,"__esModule",{value:!0});ee.getSchemaRefs=ee.resolveUrl=ee.normalizeId=ee._getFullPath=ee.getFullPath=ee.inlineRef=void 0;var ll=k(),dl=Vn(),fl=hi(),hl=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function pl(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Un(t):e?pi(t)<=e:!1}ee.inlineRef=pl;var ml=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Un(t){for(let e in t){if(ml.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Un)||typeof r=="object"&&Un(r))return!0}return!1}function pi(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!hl.has(r)&&(typeof t[r]=="object"&&(0,ll.eachItem)(t[r],n=>e+=pi(n)),e===1/0))return 1/0}return e}function mi(t,e="",r){r!==!1&&(e=lt(e));let n=t.parse(e);return yi(t,n)}ee.getFullPath=mi;function yi(t,e){return t.serialize(e).split("#")[0]+"#"}ee._getFullPath=yi;var yl=/#\/?$/;function lt(t){return t?t.replace(yl,""):""}ee.normalizeId=lt;function _l(t,e,r){return r=lt(r),t.resolve(e,r)}ee.resolveUrl=_l;var gl=/^[a-z_][-a-z0-9._]*$/i;function $l(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,s=lt(t[r]||e),o={"":s},i=mi(n,s,!1),a={},c=new Set;return fl(t,{allKeys:!0},(f,h,y,p)=>{if(p===void 0)return;let m=i+h,_=o[p];typeof f[r]=="string"&&(_=$.call(this,f[r])),T.call(this,f.$anchor),T.call(this,f.$dynamicAnchor),o[h]=_;function $(I){let D=this.opts.uriResolver.resolve;if(I=lt(_?D(_,I):I),c.has(I))throw d(I);c.add(I);let E=this.refs[I];return typeof E=="string"&&(E=this.refs[E]),typeof E=="object"?l(f,E.schema,I):I!==lt(m)&&(I[0]==="#"?(l(f,a[I],I),a[I]=f):this.refs[I]=m),I}function T(I){if(typeof I=="string"){if(!gl.test(I))throw new Error(`invalid anchor "${I}"`);$.call(this,`#${I}`)}}}),a;function l(f,h,y){if(h!==void 0&&!dl(f,h))throw d(y)}function d(f){return new Error(`reference "${f}" resolves to more than one schema`)}}ee.getSchemaRefs=$l});var Vt=g(Ce=>{"use strict";u();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.getData=Ce.KeywordCxt=Ce.validateFunctionCode=void 0;var wi=Bo(),_i=Mt(),Kn=An(),Er=Mt(),vl=ni(),Ft=ci(),Ln=li(),v=b(),w=Ie(),wl=xt(),Oe=k(),zt=Dt();function El(t){if(bi(t)&&(Pi(t),Si(t))){Pl(t);return}Ei(t,()=>(0,wi.topBoolOrEmptySchema)(t))}Ce.validateFunctionCode=El;function Ei({gen:t,validateName:e,schema:r,schemaEnv:n,opts:s},o){s.code.es5?t.func(e,(0,v._)`${w.default.data}, ${w.default.valCxt}`,n.$async,()=>{t.code((0,v._)`"use strict"; ${gi(r,s)}`),bl(t,s),t.code(o)}):t.func(e,(0,v._)`${w.default.data}, ${Sl(s)}`,n.$async,()=>t.code(gi(r,s)).code(o))}function Sl(t){return(0,v._)`{${w.default.instancePath}="", ${w.default.parentData}, ${w.default.parentDataProperty}, ${w.default.rootData}=${w.default.data}${t.dynamicRef?(0,v._)`, ${w.default.dynamicAnchors}={}`:v.nil}}={}`}function bl(t,e){t.if(w.default.valCxt,()=>{t.var(w.default.instancePath,(0,v._)`${w.default.valCxt}.${w.default.instancePath}`),t.var(w.default.parentData,(0,v._)`${w.default.valCxt}.${w.default.parentData}`),t.var(w.default.parentDataProperty,(0,v._)`${w.default.valCxt}.${w.default.parentDataProperty}`),t.var(w.default.rootData,(0,v._)`${w.default.valCxt}.${w.default.rootData}`),e.dynamicRef&&t.var(w.default.dynamicAnchors,(0,v._)`${w.default.valCxt}.${w.default.dynamicAnchors}`)},()=>{t.var(w.default.instancePath,(0,v._)`""`),t.var(w.default.parentData,(0,v._)`undefined`),t.var(w.default.parentDataProperty,(0,v._)`undefined`),t.var(w.default.rootData,w.default.data),e.dynamicRef&&t.var(w.default.dynamicAnchors,(0,v._)`{}`)})}function Pl(t){let{schema:e,opts:r,gen:n}=t;Ei(t,()=>{r.$comment&&e.$comment&&Ii(t),kl(t),n.let(w.default.vErrors,null),n.let(w.default.errors,0),r.unevaluated&&Nl(t),Ni(t),ql(t)})}function Nl(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,v._)`${r}.evaluated`),e.if((0,v._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,v._)`${t.evaluated}.props`,(0,v._)`undefined`)),e.if((0,v._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,v._)`${t.evaluated}.items`,(0,v._)`undefined`))}function gi(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,v._)`/*# sourceURL=${r} */`:v.nil}function Il(t,e){if(bi(t)&&(Pi(t),Si(t))){Ol(t,e);return}(0,wi.boolOrEmptySchema)(t,e)}function Si({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function bi(t){return typeof t.schema!="boolean"}function Ol(t,e){let{schema:r,gen:n,opts:s}=t;s.$comment&&r.$comment&&Ii(t),Rl(t),jl(t);let o=n.const("_errs",w.default.errors);Ni(t,o),n.var(e,(0,v._)`${o} === ${w.default.errors}`)}function Pi(t){(0,Oe.checkUnknownRules)(t),Tl(t)}function Ni(t,e){if(t.opts.jtd)return $i(t,[],!1,e);let r=(0,_i.getSchemaTypes)(t.schema),n=(0,_i.coerceAndCheckDataType)(t,r);$i(t,r,!n,e)}function Tl(t){let{schema:e,errSchemaPath:r,opts:n,self:s}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Oe.schemaHasRulesButRef)(e,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function kl(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Oe.checkStrictMode)(t,"default is ignored in the schema root")}function Rl(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,wl.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function jl(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Ii({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:s}){let o=r.$comment;if(s.$comment===!0)t.code((0,v._)`${w.default.self}.logger.log(${o})`);else if(typeof s.$comment=="function"){let i=(0,v.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,v._)`${w.default.self}.opts.$comment(${o}, ${i}, ${a}.schema)`)}}function ql(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:s,opts:o}=t;r.$async?e.if((0,v._)`${w.default.errors} === 0`,()=>e.return(w.default.data),()=>e.throw((0,v._)`new ${s}(${w.default.vErrors})`)):(e.assign((0,v._)`${n}.errors`,w.default.vErrors),o.unevaluated&&Al(t),e.return((0,v._)`${w.default.errors} === 0`))}function Al({gen:t,evaluated:e,props:r,items:n}){r instanceof v.Name&&t.assign((0,v._)`${e}.props`,r),n instanceof v.Name&&t.assign((0,v._)`${e}.items`,n)}function $i(t,e,r,n){let{gen:s,schema:o,data:i,allErrors:a,opts:c,self:l}=t,{RULES:d}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Oe.schemaHasRulesButRef)(o,d))){s.block(()=>Ti(t,"$ref",d.all.$ref.definition));return}c.jtd||Cl(t,e),s.block(()=>{for(let h of d.rules)f(h);f(d.post)});function f(h){(0,Kn.shouldUseGroup)(o,h)&&(h.type?(s.if((0,Er.checkDataType)(h.type,i,c.strictNumbers)),vi(t,h),e.length===1&&e[0]===h.type&&r&&(s.else(),(0,Er.reportTypeError)(t)),s.endIf()):vi(t,h),a||s.if((0,v._)`${w.default.errors} === ${n||0}`))}}function vi(t,e){let{gen:r,schema:n,opts:{useDefaults:s}}=t;s&&(0,vl.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,Kn.shouldUseRule)(n,o)&&Ti(t,o.keyword,o.definition,e.type)})}function Cl(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Dl(t,e),t.opts.allowUnionTypes||Ml(t,e),xl(t,t.dataTypes))}function Dl(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Oi(t.dataTypes,r)||Gn(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Fl(t,e)}}function Ml(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Gn(t,"use allowUnionTypes to allow union type keyword")}function xl(t,e){let r=t.self.RULES.all;for(let n in r){let s=r[n];if(typeof s=="object"&&(0,Kn.shouldUseRule)(t.schema,s)){let{type:o}=s.definition;o.length&&!o.some(i=>zl(e,i))&&Gn(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function zl(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Oi(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Fl(t,e){let r=[];for(let n of t.dataTypes)Oi(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Gn(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Oe.checkStrictMode)(t,e,t.opts.strictTypes)}var Sr=class{constructor(e,r,n){if((0,Ft.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Oe.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",ki(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Ft.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",w.default.errors))}result(e,r,n){this.failResult((0,v.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,v.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,v._)`${r} !== undefined && (${(0,v.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?zt.reportExtraError:zt.reportError)(this,this.def.error,r)}$dataError(){(0,zt.reportError)(this,this.def.$dataError||zt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,zt.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=v.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=v.nil,r=v.nil){if(!this.$data)return;let{gen:n,schemaCode:s,schemaType:o,def:i}=this;n.if((0,v.or)((0,v._)`${s} === undefined`,r)),e!==v.nil&&n.assign(e,!0),(o.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==v.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:s,it:o}=this;return(0,v.or)(i(),a());function i(){if(n.length){if(!(r instanceof v.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,v._)`${(0,Er.checkDataTypes)(c,r,o.opts.strictNumbers,Er.DataType.Wrong)}`}return v.nil}function a(){if(s.validateSchema){let c=e.scopeValue("validate$data",{ref:s.validateSchema});return(0,v._)`!${c}(${r})`}return v.nil}}subschema(e,r){let n=(0,Ln.getSubschema)(this.it,e);(0,Ln.extendSubschemaData)(n,this.it,e),(0,Ln.extendSubschemaMode)(n,e);let s={...this.it,...n,items:void 0,props:void 0};return Il(s,r),s}mergeEvaluated(e,r){let{it:n,gen:s}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Oe.mergeEvaluated.props(s,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Oe.mergeEvaluated.items(s,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:s}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return s.if(r,()=>this.mergeEvaluated(e,v.Name)),!0}};Ce.KeywordCxt=Sr;function Ti(t,e,r,n){let s=new Sr(t,r,e);"code"in r?r.code(s,n):s.$data&&r.validate?(0,Ft.funcKeywordCode)(s,r):"macro"in r?(0,Ft.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,Ft.funcKeywordCode)(s,r)}var Vl=/^\/(?:[^~]|~0|~1)*$/,Ul=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ki(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let s,o;if(t==="")return w.default.rootData;if(t[0]==="/"){if(!Vl.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);s=t,o=w.default.rootData}else{let l=Ul.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let d=+l[1];if(s=l[2],s==="#"){if(d>=e)throw new Error(c("property/index",d));return n[e-d]}if(d>e)throw new Error(c("data",d));if(o=r[e-d],!s)return o}let i=o,a=s.split("/");for(let l of a)l&&(o=(0,v._)`${o}${(0,v.getProperty)((0,Oe.unescapeJsonPointer)(l))}`,i=(0,v._)`${i} && ${o}`);return i;function c(l,d){return`Cannot access ${l} ${d} levels up, current level is ${e}`}}Ce.getData=ki});var br=g(Wn=>{"use strict";u();Object.defineProperty(Wn,"__esModule",{value:!0});var Hn=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Wn.default=Hn});var Ut=g(Bn=>{"use strict";u();Object.defineProperty(Bn,"__esModule",{value:!0});var Jn=xt(),Yn=class extends Error{constructor(e,r,n,s){super(s||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Jn.resolveUrl)(e,r,n),this.missingSchema=(0,Jn.normalizeId)((0,Jn.getFullPath)(e,this.missingRef))}};Bn.default=Yn});var Nr=g(ie=>{"use strict";u();Object.defineProperty(ie,"__esModule",{value:!0});ie.resolveSchema=ie.getCompilingSchema=ie.resolveRef=ie.compileSchema=ie.SchemaEnv=void 0;var de=b(),Ll=br(),Be=Ie(),fe=xt(),Ri=k(),Kl=Vt(),dt=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,fe.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};ie.SchemaEnv=dt;function Zn(t){let e=ji.call(this,t);if(e)return e;let r=(0,fe.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:o}=this.opts,i=new de.CodeGen(this.scope,{es5:n,lines:s,ownProperties:o}),a;t.$async&&(a=i.scopeValue("Error",{ref:Ll.default,code:(0,de._)`require("ajv/dist/runtime/validation_error").default`}));let c=i.scopeName("validate");t.validateName=c;let l={gen:i,allErrors:this.opts.allErrors,data:Be.default.data,parentData:Be.default.parentData,parentDataProperty:Be.default.parentDataProperty,dataNames:[Be.default.data],dataPathArr:[de.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,de.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:de.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,de._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(t),(0,Kl.validateFunctionCode)(l),i.optimize(this.opts.code.optimize);let f=i.toString();d=`${i.scopeRefs(Be.default.scope)}return ${f}`,this.opts.code.process&&(d=this.opts.code.process(d,t));let y=new Function(`${Be.default.self}`,`${Be.default.scope}`,d)(this,this.scope.get());if(this.scope.value(c,{ref:y}),y.errors=null,y.schema=t.schema,y.schemaEnv=t,t.$async&&(y.$async=!0),this.opts.code.source===!0&&(y.source={validateName:c,validateCode:f,scopeValues:i._values}),this.opts.unevaluated){let{props:p,items:m}=l;y.evaluated={props:p instanceof de.Name?void 0:p,items:m instanceof de.Name?void 0:m,dynamicProps:p instanceof de.Name,dynamicItems:m instanceof de.Name},y.source&&(y.source.evaluated=(0,de.stringify)(y.evaluated))}return t.validate=y,t}catch(f){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),f}finally{this._compilations.delete(t)}}ie.compileSchema=Zn;function Gl(t,e,r){var n;r=(0,fe.resolveUrl)(this.opts.uriResolver,e,r);let s=t.refs[r];if(s)return s;let o=Jl.call(this,t,r);if(o===void 0){let i=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;i&&(o=new dt({schema:i,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=Hl.call(this,o)}ie.resolveRef=Gl;function Hl(t){return(0,fe.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Zn.call(this,t)}function ji(t){for(let e of this._compilations)if(Wl(e,t))return e}ie.getCompilingSchema=ji;function Wl(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Jl(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Pr.call(this,t,e)}function Pr(t,e){let r=this.opts.uriResolver.parse(e),n=(0,fe._getFullPath)(this.opts.uriResolver,r),s=(0,fe.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===s)return Xn.call(this,r,t);let o=(0,fe.normalizeId)(n),i=this.refs[o]||this.schemas[o];if(typeof i=="string"){let a=Pr.call(this,t,i);return typeof a?.schema!="object"?void 0:Xn.call(this,r,a)}if(typeof i?.schema=="object"){if(i.validate||Zn.call(this,i),o===(0,fe.normalizeId)(e)){let{schema:a}=i,{schemaId:c}=this.opts,l=a[c];return l&&(s=(0,fe.resolveUrl)(this.opts.uriResolver,s,l)),new dt({schema:a,schemaId:c,root:t,baseId:s})}return Xn.call(this,r,i)}}ie.resolveSchema=Pr;var Yl=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Xn(t,{baseId:e,schema:r,root:n}){var s;if(((s=t.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,Ri.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!Yl.has(a)&&l&&(e=(0,fe.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Ri.schemaHasRulesButRef)(r,this.RULES)){let a=(0,fe.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=Pr.call(this,n,a)}let{schemaId:i}=this.opts;if(o=o||new dt({schema:r,schemaId:i,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var qi=g((Qy,Bl)=>{Bl.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var es=g((e0,Mi)=>{"use strict";u();var Xl=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Ci=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function Qn(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var Zl=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Ai(t){return t.length=0,!0}function Ql(t,e,r){if(t.length){let n=Qn(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function ed(t){let e=0,r={error:!1,address:"",zone:""},n=[],s=[],o=!1,i=!1,a=Ql;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(o===!0&&(i=!0),!a(s,n,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(o=!0),n.push(":");continue}else if(l==="%"){if(!a(s,n,r))break;a=Ai}else{s.push(l);continue}}return s.length&&(a===Ai?r.zone=s.join(""):i?n.push(s.join("")):n.push(Qn(s))),r.address=n.join(""),r}function Di(t){if(td(t,":")<2)return{host:t,isIPV6:!1};let e=ed(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function td(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function rd(t){let e=t,r=[],n=-1,s=0;for(;s=e.length;){if(s===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(s===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(s===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}function nd(t,e){let r=e!==!0?escape:unescape;return t.scheme!==void 0&&(t.scheme=r(t.scheme)),t.userinfo!==void 0&&(t.userinfo=r(t.userinfo)),t.host!==void 0&&(t.host=r(t.host)),t.path!==void 0&&(t.path=r(t.path)),t.query!==void 0&&(t.query=r(t.query)),t.fragment!==void 0&&(t.fragment=r(t.fragment)),t}function sd(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Ci(r)){let n=Di(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=t.host}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}Mi.exports={nonSimpleDomain:Zl,recomposeAuthority:sd,normalizeComponentEncoding:nd,removeDotSegments:rd,isIPv4:Ci,isUUID:Xl,normalizeIPv6:Di,stringArrayToHexStripped:Qn}});var Ui=g((r0,Vi)=>{"use strict";u();var{isUUID:od}=es(),id=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,ad=["http","https","ws","wss","urn","urn:uuid"];function cd(t){return ad.indexOf(t)!==-1}function ts(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function xi(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function zi(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function ud(t){return t.secure=ts(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function ld(t){if((t.port===(ts(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function dd(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(id);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let s=`${n}:${e.nid||t.nid}`,o=rs(s);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function fd(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),s=`${r}:${e.nid||n}`,o=rs(s);o&&(t=o.serialize(t,e));let i=t,a=t.nss;return i.path=`${n||e.nid}:${a}`,e.skipEscape=!0,i}function hd(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!od(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function pd(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Fi={scheme:"http",domainHost:!0,parse:xi,serialize:zi},md={scheme:"https",domainHost:Fi.domainHost,parse:xi,serialize:zi},Ir={scheme:"ws",domainHost:!0,parse:ud,serialize:ld},yd={scheme:"wss",domainHost:Ir.domainHost,parse:Ir.parse,serialize:Ir.serialize},_d={scheme:"urn",parse:dd,serialize:fd,skipNormalize:!0},gd={scheme:"urn:uuid",parse:hd,serialize:pd,skipNormalize:!0},Or={http:Fi,https:md,ws:Ir,wss:yd,urn:_d,"urn:uuid":gd};Object.setPrototypeOf(Or,null);function rs(t){return t&&(Or[t]||Or[t.toLowerCase()])||void 0}Vi.exports={wsIsSecure:ts,SCHEMES:Or,isValidSchemeName:cd,getSchemeHandler:rs}});var Gi=g((s0,kr)=>{"use strict";u();var{normalizeIPv6:$d,removeDotSegments:Lt,recomposeAuthority:vd,normalizeComponentEncoding:Tr,isIPv4:wd,nonSimpleDomain:Ed}=es(),{SCHEMES:Sd,getSchemeHandler:Li}=Ui();function bd(t,e){return typeof t=="string"?t=we(Te(t,e),e):typeof t=="object"&&(t=Te(we(t,e),e)),t}function Pd(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},s=Ki(Te(t,n),Te(e,n),n,!0);return n.skipEscape=!0,we(s,n)}function Ki(t,e,r,n){let s={};return n||(t=Te(we(t,r),r),e=Te(we(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(s.scheme=e.scheme,s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=Lt(e.path||""),s.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=Lt(e.path||""),s.query=e.query):(e.path?(e.path[0]==="/"?s.path=Lt(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?s.path="/"+e.path:t.path?s.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:s.path=e.path,s.path=Lt(s.path)),s.query=e.query):(s.path=t.path,e.query!==void 0?s.query=e.query:s.query=t.query),s.userinfo=t.userinfo,s.host=t.host,s.port=t.port),s.scheme=t.scheme),s.fragment=e.fragment,s}function Nd(t,e,r){return typeof t=="string"?(t=unescape(t),t=we(Tr(Te(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=we(Tr(t,!0),{...r,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=we(Tr(Te(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=we(Tr(e,!0),{...r,skipEscape:!0})),t.toLowerCase()===e.toLowerCase()}function we(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),s=[],o=Li(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&s.push(r.scheme,":");let i=vd(r);if(i!==void 0&&(n.reference!=="suffix"&&s.push("//"),s.push(i),r.path&&r.path[0]!=="/"&&s.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!o||!o.absolutePath)&&(a=Lt(a)),i===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),s.push(a)}return r.query!==void 0&&s.push("?",r.query),r.fragment!==void 0&&s.push("#",r.fragment),s.join("")}var Id=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Te(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let o=t.match(Id);if(o){if(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5]),n.host)if(wd(n.host)===!1){let c=$d(n.host);n.host=c.host.toLowerCase(),s=c.isIPV6}else s=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let i=Li(r.scheme||n.scheme);if(!r.unicodeSupport&&(!i||!i.unicodeSupport)&&n.host&&(r.domainHost||i&&i.domainHost)&&s===!1&&Ed(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(a){n.error=n.error||"Host's domain name can not be converted to ASCII: "+a}(!i||i&&!i.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=unescape(n.host))),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),i&&i.parse&&i.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var ns={SCHEMES:Sd,normalize:bd,resolve:Pd,resolveComponent:Ki,equal:Nd,serialize:we,parse:Te};kr.exports=ns;kr.exports.default=ns;kr.exports.fastUri=ns});var Wi=g(ss=>{"use strict";u();Object.defineProperty(ss,"__esModule",{value:!0});var Hi=Gi();Hi.code='require("ajv/dist/runtime/uri").default';ss.default=Hi});var ta=g(L=>{"use strict";u();Object.defineProperty(L,"__esModule",{value:!0});L.CodeGen=L.Name=L.nil=L.stringify=L.str=L._=L.KeywordCxt=void 0;var Od=Vt();Object.defineProperty(L,"KeywordCxt",{enumerable:!0,get:function(){return Od.KeywordCxt}});var ft=b();Object.defineProperty(L,"_",{enumerable:!0,get:function(){return ft._}});Object.defineProperty(L,"str",{enumerable:!0,get:function(){return ft.str}});Object.defineProperty(L,"stringify",{enumerable:!0,get:function(){return ft.stringify}});Object.defineProperty(L,"nil",{enumerable:!0,get:function(){return ft.nil}});Object.defineProperty(L,"Name",{enumerable:!0,get:function(){return ft.Name}});Object.defineProperty(L,"CodeGen",{enumerable:!0,get:function(){return ft.CodeGen}});var Td=br(),Zi=Ut(),kd=qn(),Kt=Nr(),Rd=b(),Gt=xt(),Rr=Mt(),is=k(),Ji=qi(),jd=Wi(),Qi=(t,e)=>new RegExp(t,e);Qi.code="new RegExp";var qd=["removeAdditional","useDefaults","coerceTypes"],Ad=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Cd={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Dd={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Yi=200;function Md(t){var e,r,n,s,o,i,a,c,l,d,f,h,y,p,m,_,$,T,I,D,E,me,be,Yr,Br;let St=t.strict,Xr=(e=t.code)===null||e===void 0?void 0:e.optimize,ao=Xr===!0||Xr===void 0?1:Xr||0,co=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Qi,Nc=(s=t.uriResolver)!==null&&s!==void 0?s:jd.default;return{strictSchema:(i=(o=t.strictSchema)!==null&&o!==void 0?o:St)!==null&&i!==void 0?i:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:St)!==null&&c!==void 0?c:!0,strictTypes:(d=(l=t.strictTypes)!==null&&l!==void 0?l:St)!==null&&d!==void 0?d:"log",strictTuples:(h=(f=t.strictTuples)!==null&&f!==void 0?f:St)!==null&&h!==void 0?h:"log",strictRequired:(p=(y=t.strictRequired)!==null&&y!==void 0?y:St)!==null&&p!==void 0?p:!1,code:t.code?{...t.code,optimize:ao,regExp:co}:{optimize:ao,regExp:co},loopRequired:(m=t.loopRequired)!==null&&m!==void 0?m:Yi,loopEnum:(_=t.loopEnum)!==null&&_!==void 0?_:Yi,meta:($=t.meta)!==null&&$!==void 0?$:!0,messages:(T=t.messages)!==null&&T!==void 0?T:!0,inlineRefs:(I=t.inlineRefs)!==null&&I!==void 0?I:!0,schemaId:(D=t.schemaId)!==null&&D!==void 0?D:"$id",addUsedSchema:(E=t.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(me=t.validateSchema)!==null&&me!==void 0?me:!0,validateFormats:(be=t.validateFormats)!==null&&be!==void 0?be:!0,unicodeRegExp:(Yr=t.unicodeRegExp)!==null&&Yr!==void 0?Yr:!0,int32range:(Br=t.int32range)!==null&&Br!==void 0?Br:!0,uriResolver:Nc}}var Ht=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Md(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new Rd.ValueScope({scope:{},prefixes:Ad,es5:r,lines:n}),this.logger=Ld(e.logger);let s=e.validateFormats;e.validateFormats=!1,this.RULES=(0,kd.getRules)(),Bi.call(this,Cd,e,"NOT SUPPORTED"),Bi.call(this,Dd,e,"DEPRECATED","warn"),this._metaOpts=Vd.call(this),e.formats&&zd.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Fd.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),xd.call(this),e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,s=Ji;n==="id"&&(s={...Ji},s.id=s.$id,delete s.$id),r&&e&&this.addMetaSchema(s,s[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let s=n(r);return"$async"in n||(this.errors=n.errors),s}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return s.call(this,e,r);async function s(d,f){await o.call(this,d.$schema);let h=this._addSchema(d,f);return h.validate||i.call(this,h)}async function o(d){d&&!this.getSchema(d)&&await s.call(this,{$ref:d},!0)}async function i(d){try{return this._compileSchemaEnv(d)}catch(f){if(!(f instanceof Zi.default))throw f;return a.call(this,f),await c.call(this,f.missingSchema),i.call(this,d)}}function a({missingSchema:d,missingRef:f}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${f} cannot be resolved`)}async function c(d){let f=await l.call(this,d);this.refs[d]||await o.call(this,f.$schema),this.refs[d]||this.addSchema(f,d,r)}async function l(d){let f=this._loading[d];if(f)return f;try{return await(this._loading[d]=n(d))}finally{delete this._loading[d]}}}addSchema(e,r,n,s=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,n,s);return this}let o;if(typeof e=="object"){let{schemaId:i}=this.opts;if(o=e[i],o!==void 0&&typeof o!="string")throw new Error(`schema ${i} must be string`)}return r=(0,Gt.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,s,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let s=this.validate(n,e);if(!s&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return s}getSchema(e){let r;for(;typeof(r=Xi.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,s=new Kt.SchemaEnv({schema:{},schemaId:n});if(r=Kt.resolveSchema.call(this,s,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Xi.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,Gt.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Gd.call(this,n,r),!r)return(0,is.eachItem)(n,o=>os.call(this,o)),this;Wd.call(this,r);let s={...r,type:(0,Rr.getJSONTypes)(r.type),schemaType:(0,Rr.getJSONTypes)(r.schemaType)};return(0,is.eachItem)(n,s.type.length===0?o=>os.call(this,o,s):o=>s.type.forEach(i=>os.call(this,o,s,i))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let s=n.rules.findIndex(o=>o.keyword===e);s>=0&&n.rules.splice(s,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(s=>`${n}${s.instancePath} ${s.message}`).reduce((s,o)=>s+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let s of r){let o=s.split("/").slice(1),i=e;for(let a of o)i=i[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:l}=c.definition,d=i[a];l&&d&&(i[a]=ea(d))}}return e}_removeAllSchemas(e,r){for(let n in e){let s=e[n];(!r||r.test(n))&&(typeof s=="string"?delete e[n]:s&&!s.meta&&(this._cache.delete(s.schema),delete e[n]))}}_addSchema(e,r,n,s=this.opts.validateSchema,o=this.opts.addUsedSchema){let i,{schemaId:a}=this.opts;if(typeof e=="object")i=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;n=(0,Gt.normalizeId)(i||n);let l=Gt.getSchemaRefs.call(this,e,n);return c=new Kt.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),s&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Kt.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{Kt.compileSchema.call(this,e)}finally{this.opts=r}}};Ht.ValidationError=Td.default;Ht.MissingRefError=Zi.default;L.default=Ht;function Bi(t,e,r,n="error"){for(let s in t){let o=s;o in e&&this.logger[n](`${r}: option ${s}. ${t[o]}`)}}function Xi(t){return t=(0,Gt.normalizeId)(t),this.schemas[t]||this.refs[t]}function xd(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function zd(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Fd(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Vd(){let t={...this.opts};for(let e of qd)delete t[e];return t}var Ud={log(){},warn(){},error(){}};function Ld(t){if(t===!1)return Ud;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var Kd=/^[a-z_$][a-z0-9_$:-]*$/i;function Gd(t,e){let{RULES:r}=this;if((0,is.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Kd.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function os(t,e,r){var n;let s=e?.post;if(r&&s)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,i=s?o.post:o.rules.find(({type:c})=>c===r);if(i||(i={type:r,rules:[]},o.rules.push(i)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,Rr.getJSONTypes)(e.type),schemaType:(0,Rr.getJSONTypes)(e.schemaType)}};e.before?Hd.call(this,i,a,e.before):i.rules.push(a),o.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function Hd(t,e,r){let n=t.rules.findIndex(s=>s.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function Wd(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=ea(e)),t.validateSchema=this.compile(e,!0))}var Jd={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ea(t){return{anyOf:[t,Jd]}}});var ra=g(as=>{"use strict";u();Object.defineProperty(as,"__esModule",{value:!0});var Yd={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};as.default=Yd});var ia=g(Xe=>{"use strict";u();Object.defineProperty(Xe,"__esModule",{value:!0});Xe.callRef=Xe.getValidate=void 0;var Bd=Ut(),na=oe(),te=b(),ht=Ie(),sa=Nr(),jr=k(),Xd={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:s,schemaEnv:o,validateName:i,opts:a,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&s===l.baseId)return f();let d=sa.resolveRef.call(c,l,s,r);if(d===void 0)throw new Bd.default(n.opts.uriResolver,s,r);if(d instanceof sa.SchemaEnv)return h(d);return y(d);function f(){if(o===l)return qr(t,i,o,o.$async);let p=e.scopeValue("root",{ref:l});return qr(t,(0,te._)`${p}.validate`,l,l.$async)}function h(p){let m=oa(t,p);qr(t,m,p,p.$async)}function y(p){let m=e.scopeValue("schema",a.code.source===!0?{ref:p,code:(0,te.stringify)(p)}:{ref:p}),_=e.name("valid"),$=t.subschema({schema:p,dataTypes:[],schemaPath:te.nil,topSchemaRef:m,errSchemaPath:r},_);t.mergeEvaluated($),t.ok(_)}}};function oa(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,te._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Xe.getValidate=oa;function qr(t,e,r,n){let{gen:s,it:o}=t,{allErrors:i,schemaEnv:a,opts:c}=o,l=c.passContext?ht.default.this:te.nil;n?d():f();function d(){if(!a.$async)throw new Error("async schema referenced by sync schema");let p=s.let("valid");s.try(()=>{s.code((0,te._)`await ${(0,na.callValidateCode)(t,e,l)}`),y(e),i||s.assign(p,!0)},m=>{s.if((0,te._)`!(${m} instanceof ${o.ValidationError})`,()=>s.throw(m)),h(m),i||s.assign(p,!1)}),t.ok(p)}function f(){t.result((0,na.callValidateCode)(t,e,l),()=>y(e),()=>h(e))}function h(p){let m=(0,te._)`${p}.errors`;s.assign(ht.default.vErrors,(0,te._)`${ht.default.vErrors} === null ? ${m} : ${ht.default.vErrors}.concat(${m})`),s.assign(ht.default.errors,(0,te._)`${ht.default.vErrors}.length`)}function y(p){var m;if(!o.opts.unevaluated)return;let _=(m=r?.validate)===null||m===void 0?void 0:m.evaluated;if(o.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(o.props=jr.mergeEvaluated.props(s,_.props,o.props));else{let $=s.var("props",(0,te._)`${p}.evaluated.props`);o.props=jr.mergeEvaluated.props(s,$,o.props,te.Name)}if(o.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(o.items=jr.mergeEvaluated.items(s,_.items,o.items));else{let $=s.var("items",(0,te._)`${p}.evaluated.items`);o.items=jr.mergeEvaluated.items(s,$,o.items,te.Name)}}}Xe.callRef=qr;Xe.default=Xd});var aa=g(cs=>{"use strict";u();Object.defineProperty(cs,"__esModule",{value:!0});var Zd=ra(),Qd=ia(),ef=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Zd.default,Qd.default];cs.default=ef});var ca=g(us=>{"use strict";u();Object.defineProperty(us,"__esModule",{value:!0});var Ar=b(),De=Ar.operators,Cr={maximum:{okStr:"<=",ok:De.LTE,fail:De.GT},minimum:{okStr:">=",ok:De.GTE,fail:De.LT},exclusiveMaximum:{okStr:"<",ok:De.LT,fail:De.GTE},exclusiveMinimum:{okStr:">",ok:De.GT,fail:De.LTE}},tf={message:({keyword:t,schemaCode:e})=>(0,Ar.str)`must be ${Cr[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ar._)`{comparison: ${Cr[t].okStr}, limit: ${e}}`},rf={keyword:Object.keys(Cr),type:"number",schemaType:"number",$data:!0,error:tf,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Ar._)`${r} ${Cr[e].fail} ${n} || isNaN(${r})`)}};us.default=rf});var ua=g(ls=>{"use strict";u();Object.defineProperty(ls,"__esModule",{value:!0});var Wt=b(),nf={message:({schemaCode:t})=>(0,Wt.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Wt._)`{multipleOf: ${t}}`},sf={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:nf,code(t){let{gen:e,data:r,schemaCode:n,it:s}=t,o=s.opts.multipleOfPrecision,i=e.let("res"),a=o?(0,Wt._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${o}`:(0,Wt._)`${i} !== parseInt(${i})`;t.fail$data((0,Wt._)`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};ls.default=sf});var da=g(ds=>{"use strict";u();Object.defineProperty(ds,"__esModule",{value:!0});function la(t){let e=t.length,r=0,n=0,s;for(;n<e;)r++,s=t.charCodeAt(n++),s>=55296&&s<=56319&&n<e&&(s=t.charCodeAt(n),(s&64512)===56320&&n++);return r}ds.default=la;la.code='require("ajv/dist/runtime/ucs2length").default'});var fa=g(fs=>{"use strict";u();Object.defineProperty(fs,"__esModule",{value:!0});var Ze=b(),of=k(),af=da(),cf={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Ze.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Ze._)`{limit: ${t}}`},uf={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:cf,code(t){let{keyword:e,data:r,schemaCode:n,it:s}=t,o=e==="maxLength"?Ze.operators.GT:Ze.operators.LT,i=s.opts.unicode===!1?(0,Ze._)`${r}.length`:(0,Ze._)`${(0,of.useFunc)(t.gen,af.default)}(${r})`;t.fail$data((0,Ze._)`${i} ${o} ${n}`)}};fs.default=uf});var ha=g(hs=>{"use strict";u();Object.defineProperty(hs,"__esModule",{value:!0});var lf=oe(),df=k(),pt=b(),ff={message:({schemaCode:t})=>(0,pt.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,pt._)`{pattern: ${t}}`},hf={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:ff,code(t){let{gen:e,data:r,$data:n,schema:s,schemaCode:o,it:i}=t,a=i.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=i.opts.code,l=c.code==="new RegExp"?(0,pt._)`new RegExp`:(0,df.useFunc)(e,c),d=e.let("valid");e.try(()=>e.assign(d,(0,pt._)`${l}(${o}, ${a}).test(${r})`),()=>e.assign(d,!1)),t.fail$data((0,pt._)`!${d}`)}else{let c=(0,lf.usePattern)(t,s);t.fail$data((0,pt._)`!${c}.test(${r})`)}}};hs.default=hf});var pa=g(ps=>{"use strict";u();Object.defineProperty(ps,"__esModule",{value:!0});var Jt=b(),pf={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Jt.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Jt._)`{limit: ${t}}`},mf={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:pf,code(t){let{keyword:e,data:r,schemaCode:n}=t,s=e==="maxProperties"?Jt.operators.GT:Jt.operators.LT;t.fail$data((0,Jt._)`Object.keys(${r}).length ${s} ${n}`)}};ps.default=mf});var ma=g(ms=>{"use strict";u();Object.defineProperty(ms,"__esModule",{value:!0});var Yt=oe(),Bt=b(),yf=k(),_f={message:({params:{missingProperty:t}})=>(0,Bt.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Bt._)`{missingProperty: ${t}}`},gf={keyword:"required",type:"object",schemaType:"array",$data:!0,error:_f,code(t){let{gen:e,schema:r,schemaCode:n,data:s,$data:o,it:i}=t,{opts:a}=i;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(i.allErrors?l():d(),a.strictRequired){let y=t.parentSchema.properties,{definedProperties:p}=t.it;for(let m of r)if(y?.[m]===void 0&&!p.has(m)){let _=i.schemaEnv.baseId+i.errSchemaPath,$=`required property "${m}" is not defined at "${_}" (strictRequired)`;(0,yf.checkStrictMode)(i,$,i.opts.strictRequired)}}function l(){if(c||o)t.block$data(Bt.nil,f);else for(let y of r)(0,Yt.checkReportMissingProp)(t,y)}function d(){let y=e.let("missing");if(c||o){let p=e.let("valid",!0);t.block$data(p,()=>h(y,p)),t.ok(p)}else e.if((0,Yt.checkMissingProp)(t,r,y)),(0,Yt.reportMissingProp)(t,y),e.else()}function f(){e.forOf("prop",n,y=>{t.setParams({missingProperty:y}),e.if((0,Yt.noPropertyInData)(e,s,y,a.ownProperties),()=>t.error())})}function h(y,p){t.setParams({missingProperty:y}),e.forOf(y,n,()=>{e.assign(p,(0,Yt.propertyInData)(e,s,y,a.ownProperties)),e.if((0,Bt.not)(p),()=>{t.error(),e.break()})},Bt.nil)}}};ms.default=gf});var ya=g(ys=>{"use strict";u();Object.defineProperty(ys,"__esModule",{value:!0});var Xt=b(),$f={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,Xt.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Xt._)`{limit: ${t}}`},vf={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:$f,code(t){let{keyword:e,data:r,schemaCode:n}=t,s=e==="maxItems"?Xt.operators.GT:Xt.operators.LT;t.fail$data((0,Xt._)`${r}.length ${s} ${n}`)}};ys.default=vf});var Dr=g(_s=>{"use strict";u();Object.defineProperty(_s,"__esModule",{value:!0});var _a=Vn();_a.code='require("ajv/dist/runtime/equal").default';_s.default=_a});var ga=g($s=>{"use strict";u();Object.defineProperty($s,"__esModule",{value:!0});var gs=Mt(),K=b(),wf=k(),Ef=Dr(),Sf={message:({params:{i:t,j:e}})=>(0,K.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,K._)`{i: ${t}, j: ${e}}`},bf={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Sf,code(t){let{gen:e,data:r,$data:n,schema:s,parentSchema:o,schemaCode:i,it:a}=t;if(!n&&!s)return;let c=e.let("valid"),l=o.items?(0,gs.getSchemaTypes)(o.items):[];t.block$data(c,d,(0,K._)`${i} === false`),t.ok(c);function d(){let p=e.let("i",(0,K._)`${r}.length`),m=e.let("j");t.setParams({i:p,j:m}),e.assign(c,!0),e.if((0,K._)`${p} > 1`,()=>(f()?h:y)(p,m))}function f(){return l.length>0&&!l.some(p=>p==="object"||p==="array")}function h(p,m){let _=e.name("item"),$=(0,gs.checkDataTypes)(l,_,a.opts.strictNumbers,gs.DataType.Wrong),T=e.const("indices",(0,K._)`{}`);e.for((0,K._)`;${p}--;`,()=>{e.let(_,(0,K._)`${r}[${p}]`),e.if($,(0,K._)`continue`),l.length>1&&e.if((0,K._)`typeof ${_} == "string"`,(0,K._)`${_} += "_"`),e.if((0,K._)`typeof ${T}[${_}] == "number"`,()=>{e.assign(m,(0,K._)`${T}[${_}]`),t.error(),e.assign(c,!1).break()}).code((0,K._)`${T}[${_}] = ${p}`)})}function y(p,m){let _=(0,wf.useFunc)(e,Ef.default),$=e.name("outer");e.label($).for((0,K._)`;${p}--;`,()=>e.for((0,K._)`${m} = ${p}; ${m}--;`,()=>e.if((0,K._)`${_}(${r}[${p}], ${r}[${m}])`,()=>{t.error(),e.assign(c,!1).break($)})))}}};$s.default=bf});var $a=g(ws=>{"use strict";u();Object.defineProperty(ws,"__esModule",{value:!0});var vs=b(),Pf=k(),Nf=Dr(),If={message:"must be equal to constant",params:({schemaCode:t})=>(0,vs._)`{allowedValue: ${t}}`},Of={keyword:"const",$data:!0,error:If,code(t){let{gen:e,data:r,$data:n,schemaCode:s,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,vs._)`!${(0,Pf.useFunc)(e,Nf.default)}(${r}, ${s})`):t.fail((0,vs._)`${o} !== ${r}`)}};ws.default=Of});var va=g(Es=>{"use strict";u();Object.defineProperty(Es,"__esModule",{value:!0});var Zt=b(),Tf=k(),kf=Dr(),Rf={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Zt._)`{allowedValues: ${t}}`},jf={keyword:"enum",schemaType:"array",$data:!0,error:Rf,code(t){let{gen:e,data:r,$data:n,schema:s,schemaCode:o,it:i}=t;if(!n&&s.length===0)throw new Error("enum must have non-empty array");let a=s.length>=i.opts.loopEnum,c,l=()=>c??(c=(0,Tf.useFunc)(e,kf.default)),d;if(a||n)d=e.let("valid"),t.block$data(d,f);else{if(!Array.isArray(s))throw new Error("ajv implementation error");let y=e.const("vSchema",o);d=(0,Zt.or)(...s.map((p,m)=>h(y,m)))}t.pass(d);function f(){e.assign(d,!1),e.forOf("v",o,y=>e.if((0,Zt._)`${l()}(${r}, ${y})`,()=>e.assign(d,!0).break()))}function h(y,p){let m=s[p];return typeof m=="object"&&m!==null?(0,Zt._)`${l()}(${r}, ${y}[${p}])`:(0,Zt._)`${r} === ${m}`}}};Es.default=jf});var wa=g(Ss=>{"use strict";u();Object.defineProperty(Ss,"__esModule",{value:!0});var qf=ca(),Af=ua(),Cf=fa(),Df=ha(),Mf=pa(),xf=ma(),zf=ya(),Ff=ga(),Vf=$a(),Uf=va(),Lf=[qf.default,Af.default,Cf.default,Df.default,Mf.default,xf.default,zf.default,Ff.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Vf.default,Uf.default];Ss.default=Lf});var Ps=g(Qt=>{"use strict";u();Object.defineProperty(Qt,"__esModule",{value:!0});Qt.validateAdditionalItems=void 0;var Qe=b(),bs=k(),Kf={message:({params:{len:t}})=>(0,Qe.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Qe._)`{limit: ${t}}`},Gf={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Kf,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,bs.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Ea(t,n)}};function Ea(t,e){let{gen:r,schema:n,data:s,keyword:o,it:i}=t;i.items=!0;let a=r.const("len",(0,Qe._)`${s}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Qe._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,bs.alwaysValidSchema)(i,n)){let l=r.var("valid",(0,Qe._)`${a} <= ${e.length}`);r.if((0,Qe.not)(l),()=>c(l)),t.ok(l)}function c(l){r.forRange("i",e.length,a,d=>{t.subschema({keyword:o,dataProp:d,dataPropType:bs.Type.Num},l),i.allErrors||r.if((0,Qe.not)(l),()=>r.break())})}}Qt.validateAdditionalItems=Ea;Qt.default=Gf});var Ns=g(er=>{"use strict";u();Object.defineProperty(er,"__esModule",{value:!0});er.validateTuple=void 0;var Sa=b(),Mr=k(),Hf=oe(),Wf={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return ba(t,"additionalItems",e);r.items=!0,!(0,Mr.alwaysValidSchema)(r,e)&&t.ok((0,Hf.validateArray)(t))}};function ba(t,e,r=t.schema){let{gen:n,parentSchema:s,data:o,keyword:i,it:a}=t;d(s),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Mr.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),l=n.const("len",(0,Sa._)`${o}.length`);r.forEach((f,h)=>{(0,Mr.alwaysValidSchema)(a,f)||(n.if((0,Sa._)`${l} > ${h}`,()=>t.subschema({keyword:i,schemaProp:h,dataProp:h},c)),t.ok(c))});function d(f){let{opts:h,errSchemaPath:y}=a,p=r.length,m=p===f.minItems&&(p===f.maxItems||f[e]===!1);if(h.strictTuples&&!m){let _=`"${i}" is ${p}-tuple, but minItems or maxItems/${e} are not specified or different at path "${y}"`;(0,Mr.checkStrictMode)(a,_,h.strictTuples)}}}er.validateTuple=ba;er.default=Wf});var Pa=g(Is=>{"use strict";u();Object.defineProperty(Is,"__esModule",{value:!0});var Jf=Ns(),Yf={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Jf.validateTuple)(t,"items")};Is.default=Yf});var Ia=g(Os=>{"use strict";u();Object.defineProperty(Os,"__esModule",{value:!0});var Na=b(),Bf=k(),Xf=oe(),Zf=Ps(),Qf={message:({params:{len:t}})=>(0,Na.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Na._)`{limit: ${t}}`},eh={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Qf,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:s}=r;n.items=!0,!(0,Bf.alwaysValidSchema)(n,e)&&(s?(0,Zf.validateAdditionalItems)(t,s):t.ok((0,Xf.validateArray)(t)))}};Os.default=eh});var Oa=g(Ts=>{"use strict";u();Object.defineProperty(Ts,"__esModule",{value:!0});var ae=b(),xr=k(),th={message:({params:{min:t,max:e}})=>e===void 0?(0,ae.str)`must contain at least ${t} valid item(s)`:(0,ae.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,ae._)`{minContains: ${t}}`:(0,ae._)`{minContains: ${t}, maxContains: ${e}}`},rh={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:th,code(t){let{gen:e,schema:r,parentSchema:n,data:s,it:o}=t,i,a,{minContains:c,maxContains:l}=n;o.opts.next?(i=c===void 0?1:c,a=l):i=1;let d=e.const("len",(0,ae._)`${s}.length`);if(t.setParams({min:i,max:a}),a===void 0&&i===0){(0,xr.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){(0,xr.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,xr.alwaysValidSchema)(o,r)){let m=(0,ae._)`${d} >= ${i}`;a!==void 0&&(m=(0,ae._)`${m} && ${d} <= ${a}`),t.pass(m);return}o.items=!0;let f=e.name("valid");a===void 0&&i===1?y(f,()=>e.if(f,()=>e.break())):i===0?(e.let(f,!0),a!==void 0&&e.if((0,ae._)`${s}.length > 0`,h)):(e.let(f,!1),h()),t.result(f,()=>t.reset());function h(){let m=e.name("_valid"),_=e.let("count",0);y(m,()=>e.if(m,()=>p(_)))}function y(m,_){e.forRange("i",0,d,$=>{t.subschema({keyword:"contains",dataProp:$,dataPropType:xr.Type.Num,compositeRule:!0},m),_()})}function p(m){e.code((0,ae._)`${m}++`),a===void 0?e.if((0,ae._)`${m} >= ${i}`,()=>e.assign(f,!0).break()):(e.if((0,ae._)`${m} > ${a}`,()=>e.assign(f,!1).break()),i===1?e.assign(f,!0):e.if((0,ae._)`${m} >= ${i}`,()=>e.assign(f,!0)))}}};Ts.default=rh});var Ra=g(Ee=>{"use strict";u();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.validateSchemaDeps=Ee.validatePropertyDeps=Ee.error=void 0;var ks=b(),nh=k(),tr=oe();Ee.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,ks.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,ks._)`{property: ${t},
|
|
6
|
+
missingProperty: ${n},
|
|
7
|
+
depsCount: ${e},
|
|
8
|
+
deps: ${r}}`};var sh={keyword:"dependencies",type:"object",schemaType:"object",error:Ee.error,code(t){let[e,r]=oh(t);Ta(t,e),ka(t,r)}};function oh({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let s=Array.isArray(t[n])?e:r;s[n]=t[n]}return[e,r]}function Ta(t,e=t.schema){let{gen:r,data:n,it:s}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let i in e){let a=e[i];if(a.length===0)continue;let c=(0,tr.propertyInData)(r,n,i,s.opts.ownProperties);t.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),s.allErrors?r.if(c,()=>{for(let l of a)(0,tr.checkReportMissingProp)(t,l)}):(r.if((0,ks._)`${c} && (${(0,tr.checkMissingProp)(t,a,o)})`),(0,tr.reportMissingProp)(t,o),r.else())}}Ee.validatePropertyDeps=Ta;function ka(t,e=t.schema){let{gen:r,data:n,keyword:s,it:o}=t,i=r.name("valid");for(let a in e)(0,nh.alwaysValidSchema)(o,e[a])||(r.if((0,tr.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let c=t.subschema({keyword:s,schemaProp:a},i);t.mergeValidEvaluated(c,i)},()=>r.var(i,!0)),t.ok(i))}Ee.validateSchemaDeps=ka;Ee.default=sh});var qa=g(Rs=>{"use strict";u();Object.defineProperty(Rs,"__esModule",{value:!0});var ja=b(),ih=k(),ah={message:"property name must be valid",params:({params:t})=>(0,ja._)`{propertyName: ${t.propertyName}}`},ch={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:ah,code(t){let{gen:e,schema:r,data:n,it:s}=t;if((0,ih.alwaysValidSchema)(s,r))return;let o=e.name("valid");e.forIn("key",n,i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},o),e.if((0,ja.not)(o),()=>{t.error(!0),s.allErrors||e.break()})}),t.ok(o)}};Rs.default=ch});var qs=g(js=>{"use strict";u();Object.defineProperty(js,"__esModule",{value:!0});var zr=oe(),he=b(),uh=Ie(),Fr=k(),lh={message:"must NOT have additional properties",params:({params:t})=>(0,he._)`{additionalProperty: ${t.additionalProperty}}`},dh={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:lh,code(t){let{gen:e,schema:r,parentSchema:n,data:s,errsCount:o,it:i}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=i;if(i.props=!0,c.removeAdditional!=="all"&&(0,Fr.alwaysValidSchema)(i,r))return;let l=(0,zr.allSchemaProperties)(n.properties),d=(0,zr.allSchemaProperties)(n.patternProperties);f(),t.ok((0,he._)`${o} === ${uh.default.errors}`);function f(){e.forIn("key",s,_=>{!l.length&&!d.length?p(_):e.if(h(_),()=>p(_))})}function h(_){let $;if(l.length>8){let T=(0,Fr.schemaRefOrVal)(i,n.properties,"properties");$=(0,zr.isOwnProperty)(e,T,_)}else l.length?$=(0,he.or)(...l.map(T=>(0,he._)`${_} === ${T}`)):$=he.nil;return d.length&&($=(0,he.or)($,...d.map(T=>(0,he._)`${(0,zr.usePattern)(t,T)}.test(${_})`))),(0,he.not)($)}function y(_){e.code((0,he._)`delete ${s}[${_}]`)}function p(_){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){y(_);return}if(r===!1){t.setParams({additionalProperty:_}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,Fr.alwaysValidSchema)(i,r)){let $=e.name("valid");c.removeAdditional==="failing"?(m(_,$,!1),e.if((0,he.not)($),()=>{t.reset(),y(_)})):(m(_,$),a||e.if((0,he.not)($),()=>e.break()))}}function m(_,$,T){let I={keyword:"additionalProperties",dataProp:_,dataPropType:Fr.Type.Str};T===!1&&Object.assign(I,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(I,$)}}};js.default=dh});var Da=g(Cs=>{"use strict";u();Object.defineProperty(Cs,"__esModule",{value:!0});var fh=Vt(),Aa=oe(),As=k(),Ca=qs(),hh={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:s,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Ca.default.code(new fh.KeywordCxt(o,Ca.default,"additionalProperties"));let i=(0,Aa.allSchemaProperties)(r);for(let f of i)o.definedProperties.add(f);o.opts.unevaluated&&i.length&&o.props!==!0&&(o.props=As.mergeEvaluated.props(e,(0,As.toHash)(i),o.props));let a=i.filter(f=>!(0,As.alwaysValidSchema)(o,r[f]));if(a.length===0)return;let c=e.name("valid");for(let f of a)l(f)?d(f):(e.if((0,Aa.propertyInData)(e,s,f,o.opts.ownProperties)),d(f),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(c);function l(f){return o.opts.useDefaults&&!o.compositeRule&&r[f].default!==void 0}function d(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};Cs.default=hh});var Fa=g(Ds=>{"use strict";u();Object.defineProperty(Ds,"__esModule",{value:!0});var Ma=oe(),Vr=b(),xa=k(),za=k(),ph={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:s,it:o}=t,{opts:i}=o,a=(0,Ma.allSchemaProperties)(r),c=a.filter(m=>(0,xa.alwaysValidSchema)(o,r[m]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let l=i.strictSchema&&!i.allowMatchingProperties&&s.properties,d=e.name("valid");o.props!==!0&&!(o.props instanceof Vr.Name)&&(o.props=(0,za.evaluatedPropsToName)(e,o.props));let{props:f}=o;h();function h(){for(let m of a)l&&y(m),o.allErrors?p(m):(e.var(d,!0),p(m),e.if(d))}function y(m){for(let _ in l)new RegExp(m).test(_)&&(0,xa.checkStrictMode)(o,`property ${_} matches pattern ${m} (use allowMatchingProperties)`)}function p(m){e.forIn("key",n,_=>{e.if((0,Vr._)`${(0,Ma.usePattern)(t,m)}.test(${_})`,()=>{let $=c.includes(m);$||t.subschema({keyword:"patternProperties",schemaProp:m,dataProp:_,dataPropType:za.Type.Str},d),o.opts.unevaluated&&f!==!0?e.assign((0,Vr._)`${f}[${_}]`,!0):!$&&!o.allErrors&&e.if((0,Vr.not)(d),()=>e.break())})})}}};Ds.default=ph});var Va=g(Ms=>{"use strict";u();Object.defineProperty(Ms,"__esModule",{value:!0});var mh=k(),yh={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,mh.alwaysValidSchema)(n,r)){t.fail();return}let s=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),t.failResult(s,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Ms.default=yh});var Ua=g(xs=>{"use strict";u();Object.defineProperty(xs,"__esModule",{value:!0});var _h=oe(),gh={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:_h.validateUnion,error:{message:"must match a schema in anyOf"}};xs.default=gh});var La=g(zs=>{"use strict";u();Object.defineProperty(zs,"__esModule",{value:!0});var Ur=b(),$h=k(),vh={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Ur._)`{passingSchemas: ${t.passing}}`},wh={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:vh,code(t){let{gen:e,schema:r,parentSchema:n,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;let o=r,i=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(l),t.result(i,()=>t.reset(),()=>t.error(!0));function l(){o.forEach((d,f)=>{let h;(0,$h.alwaysValidSchema)(s,d)?e.var(c,!0):h=t.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c),f>0&&e.if((0,Ur._)`${c} && ${i}`).assign(i,!1).assign(a,(0,Ur._)`[${a}, ${f}]`).else(),e.if(c,()=>{e.assign(i,!0),e.assign(a,f),h&&t.mergeEvaluated(h,Ur.Name)})})}}};zs.default=wh});var Ka=g(Fs=>{"use strict";u();Object.defineProperty(Fs,"__esModule",{value:!0});var Eh=k(),Sh={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let s=e.name("valid");r.forEach((o,i)=>{if((0,Eh.alwaysValidSchema)(n,o))return;let a=t.subschema({keyword:"allOf",schemaProp:i},s);t.ok(s),t.mergeEvaluated(a)})}};Fs.default=Sh});var Wa=g(Vs=>{"use strict";u();Object.defineProperty(Vs,"__esModule",{value:!0});var Lr=b(),Ha=k(),bh={message:({params:t})=>(0,Lr.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Lr._)`{failingKeyword: ${t.ifClause}}`},Ph={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:bh,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Ha.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let s=Ga(n,"then"),o=Ga(n,"else");if(!s&&!o)return;let i=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),s&&o){let d=e.let("ifClause");t.setParams({ifClause:d}),e.if(a,l("then",d),l("else",d))}else s?e.if(a,l("then")):e.if((0,Lr.not)(a),l("else"));t.pass(i,()=>t.error(!0));function c(){let d=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(d)}function l(d,f){return()=>{let h=t.subschema({keyword:d},a);e.assign(i,a),t.mergeValidEvaluated(h,i),f?e.assign(f,(0,Lr._)`${d}`):t.setParams({ifClause:d})}}}};function Ga(t,e){let r=t.schema[e];return r!==void 0&&!(0,Ha.alwaysValidSchema)(t,r)}Vs.default=Ph});var Ja=g(Us=>{"use strict";u();Object.defineProperty(Us,"__esModule",{value:!0});var Nh=k(),Ih={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,Nh.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Us.default=Ih});var Ya=g(Ls=>{"use strict";u();Object.defineProperty(Ls,"__esModule",{value:!0});var Oh=Ps(),Th=Pa(),kh=Ns(),Rh=Ia(),jh=Oa(),qh=Ra(),Ah=qa(),Ch=qs(),Dh=Da(),Mh=Fa(),xh=Va(),zh=Ua(),Fh=La(),Vh=Ka(),Uh=Wa(),Lh=Ja();function Kh(t=!1){let e=[xh.default,zh.default,Fh.default,Vh.default,Uh.default,Lh.default,Ah.default,Ch.default,qh.default,Dh.default,Mh.default];return t?e.push(Th.default,Rh.default):e.push(Oh.default,kh.default),e.push(jh.default),e}Ls.default=Kh});var Ba=g(Ks=>{"use strict";u();Object.defineProperty(Ks,"__esModule",{value:!0});var F=b(),Gh={message:({schemaCode:t})=>(0,F.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,F._)`{format: ${t}}`},Hh={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Gh,code(t,e){let{gen:r,data:n,$data:s,schema:o,schemaCode:i,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:d,self:f}=a;if(!c.validateFormats)return;s?h():y();function h(){let p=r.scopeValue("formats",{ref:f.formats,code:c.code.formats}),m=r.const("fDef",(0,F._)`${p}[${i}]`),_=r.let("fType"),$=r.let("format");r.if((0,F._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(_,(0,F._)`${m}.type || "string"`).assign($,(0,F._)`${m}.validate`),()=>r.assign(_,(0,F._)`"string"`).assign($,m)),t.fail$data((0,F.or)(T(),I()));function T(){return c.strictSchema===!1?F.nil:(0,F._)`${i} && !${$}`}function I(){let D=d.$async?(0,F._)`(${m}.async ? await ${$}(${n}) : ${$}(${n}))`:(0,F._)`${$}(${n})`,E=(0,F._)`(typeof ${$} == "function" ? ${D} : ${$}.test(${n}))`;return(0,F._)`${$} && ${$} !== true && ${_} === ${e} && !${E}`}}function y(){let p=f.formats[o];if(!p){T();return}if(p===!0)return;let[m,_,$]=I(p);m===e&&t.pass(D());function T(){if(c.strictSchema===!1){f.logger.warn(E());return}throw new Error(E());function E(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function I(E){let me=E instanceof RegExp?(0,F.regexpCode)(E):c.code.formats?(0,F._)`${c.code.formats}${(0,F.getProperty)(o)}`:void 0,be=r.scopeValue("formats",{key:o,ref:E,code:me});return typeof E=="object"&&!(E instanceof RegExp)?[E.type||"string",E.validate,(0,F._)`${be}.validate`]:["string",E,be]}function D(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!d.$async)throw new Error("async format in sync schema");return(0,F._)`await ${$}(${n})`}return typeof _=="function"?(0,F._)`${$}(${n})`:(0,F._)`${$}.test(${n})`}}}};Ks.default=Hh});var Xa=g(Gs=>{"use strict";u();Object.defineProperty(Gs,"__esModule",{value:!0});var Wh=Ba(),Jh=[Wh.default];Gs.default=Jh});var Za=g(mt=>{"use strict";u();Object.defineProperty(mt,"__esModule",{value:!0});mt.contentVocabulary=mt.metadataVocabulary=void 0;mt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];mt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var ec=g(Hs=>{"use strict";u();Object.defineProperty(Hs,"__esModule",{value:!0});var Yh=aa(),Bh=wa(),Xh=Ya(),Zh=Xa(),Qa=Za(),Qh=[Yh.default,Bh.default,(0,Xh.default)(),Zh.default,Qa.metadataVocabulary,Qa.contentVocabulary];Hs.default=Qh});var rc=g(Kr=>{"use strict";u();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.DiscrError=void 0;var tc;(function(t){t.Tag="tag",t.Mapping="mapping"})(tc||(Kr.DiscrError=tc={}))});var sc=g(Js=>{"use strict";u();Object.defineProperty(Js,"__esModule",{value:!0});var yt=b(),Ws=rc(),nc=Nr(),ep=Ut(),tp=k(),rp={message:({params:{discrError:t,tagName:e}})=>t===Ws.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,yt._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},np={keyword:"discriminator",type:"object",schemaType:"object",error:rp,code(t){let{gen:e,data:r,schema:n,parentSchema:s,it:o}=t,{oneOf:i}=s;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,yt._)`${r}${(0,yt.getProperty)(a)}`);e.if((0,yt._)`typeof ${l} == "string"`,()=>d(),()=>t.error(!1,{discrError:Ws.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function d(){let y=h();e.if(!1);for(let p in y)e.elseIf((0,yt._)`${l} === ${p}`),e.assign(c,f(y[p]));e.else(),t.error(!1,{discrError:Ws.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function f(y){let p=e.name("valid"),m=t.subschema({keyword:"oneOf",schemaProp:y},p);return t.mergeEvaluated(m,yt.Name),p}function h(){var y;let p={},m=$(s),_=!0;for(let D=0;D<i.length;D++){let E=i[D];if(E?.$ref&&!(0,tp.schemaHasRulesButRef)(E,o.self.RULES)){let be=E.$ref;if(E=nc.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,be),E instanceof nc.SchemaEnv&&(E=E.schema),E===void 0)throw new ep.default(o.opts.uriResolver,o.baseId,be)}let me=(y=E?.properties)===null||y===void 0?void 0:y[a];if(typeof me!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);_=_&&(m||$(E)),T(me,D)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return p;function $({required:D}){return Array.isArray(D)&&D.includes(a)}function T(D,E){if(D.const)I(D.const,E);else if(D.enum)for(let me of D.enum)I(me,E);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function I(D,E){if(typeof D!="string"||D in p)throw new Error(`discriminator: "${a}" values must be unique strings`);p[D]=E}}}};Js.default=np});var oc=g((A_,sp)=>{sp.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Bs=g((x,Ys)=>{"use strict";u();Object.defineProperty(x,"__esModule",{value:!0});x.MissingRefError=x.ValidationError=x.CodeGen=x.Name=x.nil=x.stringify=x.str=x._=x.KeywordCxt=x.Ajv=void 0;var op=ta(),ip=ec(),ap=sc(),ic=oc(),cp=["/properties"],Gr="http://json-schema.org/draft-07/schema",_t=class extends op.default{_addVocabularies(){super._addVocabularies(),ip.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(ap.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(ic,cp):ic;this.addMetaSchema(e,Gr,!1),this.refs["http://json-schema.org/schema"]=Gr}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Gr)?Gr:void 0)}};x.Ajv=_t;Ys.exports=x=_t;Ys.exports.Ajv=_t;Object.defineProperty(x,"__esModule",{value:!0});x.default=_t;var up=Vt();Object.defineProperty(x,"KeywordCxt",{enumerable:!0,get:function(){return up.KeywordCxt}});var gt=b();Object.defineProperty(x,"_",{enumerable:!0,get:function(){return gt._}});Object.defineProperty(x,"str",{enumerable:!0,get:function(){return gt.str}});Object.defineProperty(x,"stringify",{enumerable:!0,get:function(){return gt.stringify}});Object.defineProperty(x,"nil",{enumerable:!0,get:function(){return gt.nil}});Object.defineProperty(x,"Name",{enumerable:!0,get:function(){return gt.Name}});Object.defineProperty(x,"CodeGen",{enumerable:!0,get:function(){return gt.CodeGen}});var lp=br();Object.defineProperty(x,"ValidationError",{enumerable:!0,get:function(){return lp.default}});var dp=Ut();Object.defineProperty(x,"MissingRefError",{enumerable:!0,get:function(){return dp.default}})});var fc=g(Se=>{"use strict";u();Object.defineProperty(Se,"__esModule",{value:!0});Se.formatNames=Se.fastFormats=Se.fullFormats=void 0;function $t(t,e){return{validate:t,compare:e}}Se.fullFormats={date:$t(uc,Qs),time:$t(lc,eo),"date-time":$t(mp,dc),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:gp,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:Pp,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:$p,int32:{type:"number",validate:Ep},int64:{type:"number",validate:Sp},float:{type:"number",validate:cc},double:{type:"number",validate:cc},password:!0,binary:!0};Se.fastFormats={...Se.fullFormats,date:$t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Qs),time:$t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,eo),"date-time":$t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,dc),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Se.formatNames=Object.keys(Se.fullFormats);function fp(t){return t%4===0&&(t%100!==0||t%400===0)}var hp=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,pp=[0,31,28,31,30,31,30,31,31,30,31,30,31];function uc(t){let e=hp.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],s=+e[3];return n>=1&&n<=12&&s>=1&&s<=(n===2&&fp(r)?29:pp[n])}function Qs(t,e){if(t&&e)return t>e?1:t<e?-1:0}var Xs=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function lc(t,e){let r=Xs.exec(t);if(!r)return!1;let n=+r[1],s=+r[2],o=+r[3],i=r[5];return(n<=23&&s<=59&&o<=59||n===23&&s===59&&o===60)&&(!e||i!=="")}function eo(t,e){if(!(t&&e))return;let r=Xs.exec(t),n=Xs.exec(e);if(r&&n)return t=r[1]+r[2]+r[3]+(r[4]||""),e=n[1]+n[2]+n[3]+(n[4]||""),t>e?1:t<e?-1:0}var Zs=/t|\s/i;function mp(t){let e=t.split(Zs);return e.length===2&&uc(e[0])&&lc(e[1],!0)}function dc(t,e){if(!(t&&e))return;let[r,n]=t.split(Zs),[s,o]=e.split(Zs),i=Qs(r,s);if(i!==void 0)return i||eo(n,o)}var yp=/\/|:/,_p=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function gp(t){return yp.test(t)&&_p.test(t)}var ac=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function $p(t){return ac.lastIndex=0,ac.test(t)}var vp=-(2**31),wp=2**31-1;function Ep(t){return Number.isInteger(t)&&t<=wp&&t>=vp}function Sp(t){return Number.isInteger(t)}function cc(){return!0}var bp=/[^\\]\\Z/;function Pp(t){if(bp.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var hc=g(vt=>{"use strict";u();Object.defineProperty(vt,"__esModule",{value:!0});vt.formatLimitDefinition=void 0;var Np=Bs(),pe=b(),Me=pe.operators,Hr={formatMaximum:{okStr:"<=",ok:Me.LTE,fail:Me.GT},formatMinimum:{okStr:">=",ok:Me.GTE,fail:Me.LT},formatExclusiveMaximum:{okStr:"<",ok:Me.LT,fail:Me.GTE},formatExclusiveMinimum:{okStr:">",ok:Me.GT,fail:Me.LTE}},Ip={message:({keyword:t,schemaCode:e})=>pe.str`should be ${Hr[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>pe._`{comparison: ${Hr[t].okStr}, limit: ${e}}`};vt.formatLimitDefinition={keyword:Object.keys(Hr),type:"string",schemaType:"string",$data:!0,error:Ip,code(t){let{gen:e,data:r,schemaCode:n,keyword:s,it:o}=t,{opts:i,self:a}=o;if(!i.validateFormats)return;let c=new Np.KeywordCxt(o,a.RULES.all.format.definition,"format");c.$data?l():d();function l(){let h=e.scopeValue("formats",{ref:a.formats,code:i.code.formats}),y=e.const("fmt",pe._`${h}[${c.schemaCode}]`);t.fail$data(pe.or(pe._`typeof ${y} != "object"`,pe._`${y} instanceof RegExp`,pe._`typeof ${y}.compare != "function"`,f(y)))}function d(){let h=c.schema,y=a.formats[h];if(!y||y===!0)return;if(typeof y!="object"||y instanceof RegExp||typeof y.compare!="function")throw new Error(`"${s}": format "${h}" does not define "compare" function`);let p=e.scopeValue("formats",{key:h,ref:y,code:i.code.formats?pe._`${i.code.formats}${pe.getProperty(h)}`:void 0});t.fail$data(f(p))}function f(h){return pe._`${h}.compare(${r}, ${n}) ${Hr[s].fail} 0`}},dependencies:["format"]};var Op=t=>(t.addKeyword(vt.formatLimitDefinition),t);vt.default=Op});var _c=g((rr,yc)=>{"use strict";u();Object.defineProperty(rr,"__esModule",{value:!0});var wt=fc(),Tp=hc(),to=b(),pc=new to.Name("fullFormats"),kp=new to.Name("fastFormats"),ro=(t,e={keywords:!0})=>{if(Array.isArray(e))return mc(t,e,wt.fullFormats,pc),t;let[r,n]=e.mode==="fast"?[wt.fastFormats,kp]:[wt.fullFormats,pc],s=e.formats||wt.formatNames;return mc(t,s,r,n),e.keywords&&Tp.default(t),t};ro.get=(t,e="full")=>{let n=(e==="fast"?wt.fastFormats:wt.fullFormats)[t];if(!n)throw new Error(`Unknown format "${t}"`);return n};function mc(t,e,r,n){var s,o;(s=(o=t.opts.code).formats)!==null&&s!==void 0||(o.formats=to._`require("ajv-formats/dist/formats").${n}`);for(let i of e)t.addFormat(i,r[i])}yc.exports=rr=ro;Object.defineProperty(rr,"__esModule",{value:!0});rr.default=ro});u();u();var bt;(function(t){t.Local="local",t.Production="production"})(bt||(bt={}));function Oc(t=process.env){return t[lo.serviceEnv]==="local"?bt.Local:bt.Production}function en(t=process.env){return Oc(t)===bt.Local}u();u();import{isDeepStrictEqual as jp}from"node:util";import gc from"node:process";import{Buffer as nr}from"node:buffer";import tt from"node:fs";import $c from"node:path";import sr from"node:crypto";import qp from"node:assert";import{EventEmitter as Ap}from"node:events";u();var Ue=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")},tn=new Set(["__proto__","prototype","constructor"]),Tc=new Set("0123456789");function ur(t){let e=[],r="",n="start",s=!1;for(let o of t)switch(o){case"\\":if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");s&&(r+=o),n="property",s=!s;break;case".":if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(s){s=!1,r+=o;break}if(tn.has(r))return[];e.push(r),r="",n="property";break;case"[":if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(s){s=!1,r+=o;break}if(n==="property"){if(tn.has(r))return[];e.push(r),r=""}n="index";break;case"]":if(n==="index"){e.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index");default:if(n==="index"&&!Tc.has(o))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),s&&(s=!1,r+="\\"),r+=o}switch(s&&(r+="\\"),n){case"property":{if(tn.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function rn(t,e){if(typeof e!="number"&&Array.isArray(t)){let r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function yo(t,e){if(rn(t,e))throw new Error("Cannot use string index")}function _o(t,e,r){if(!Ue(t)||typeof e!="string")return r===void 0?t:r;let n=ur(e);if(n.length===0)return r;for(let s=0;s<n.length;s++){let o=n[s];if(rn(t,o)?t=s===n.length-1?void 0:null:t=t[o],t==null){if(s!==n.length-1)return r;break}}return t===void 0?r:t}function nn(t,e,r){if(!Ue(t)||typeof e!="string")return t;let n=t,s=ur(e);for(let o=0;o<s.length;o++){let i=s[o];yo(t,i),o===s.length-1?t[i]=r:Ue(t[i])||(t[i]=typeof s[o+1]=="number"?[]:{}),t=t[i]}return n}function go(t,e){if(!Ue(t)||typeof e!="string")return!1;let r=ur(e);for(let n=0;n<r.length;n++){let s=r[n];if(yo(t,s),n===r.length-1)return delete t[s],!0;if(t=t[s],!Ue(t))return!1}}function $o(t,e){if(!Ue(t)||typeof e!="string")return!1;let r=ur(e);if(r.length===0)return!1;for(let n of r){if(!Ue(t)||!(n in t)||rn(t,n))return!1;t=t[n]}return!0}u();import xc from"node:path";u();import j from"node:fs";import{promisify as G}from"node:util";u();u();var kc=(t,e)=>{let{onError:r}=e;return function(...s){return t.apply(void 0,s).catch(r)}},ye=kc;u();var Rc=(t,e)=>{let{onError:r}=e;return function(...s){try{return t.apply(void 0,s)}catch(o){return r(o)}}},ue=Rc;u();u();var qc=(t,e)=>{let{isRetriable:r}=e;return function(s){let{timeout:o}=s,i=s.interval??250,a=Date.now()+o;return function c(...l){return t.apply(void 0,l).catch(d=>{if(!r(d)||Date.now()>=a)throw d;let f=Math.round(i*Math.random());return f>0?new Promise(y=>setTimeout(y,f)).then(()=>c.apply(void 0,l)):c.apply(void 0,l)})}}},_e=qc;u();var Ac=(t,e)=>{let{isRetriable:r}=e;return function(s){let{timeout:o}=s,i=Date.now()+o;return function(...c){for(;;)try{return t.apply(void 0,c)}catch(l){if(!r(l)||Date.now()>=i)throw l;continue}}}},ge=Ac;u();import wo from"node:process";u();var Pt={isChangeErrorOk:t=>{if(!Pt.isNodeError(t))return!1;let{code:e}=t;return e==="ENOSYS"||!vo&&(e==="EINVAL"||e==="EPERM")},isNodeError:t=>t instanceof Error,isRetriableError:t=>{if(!Pt.isNodeError(t))return!1;let{code:e}=t;return e==="EMFILE"||e==="ENFILE"||e==="EAGAIN"||e==="EBUSY"||e==="EACCESS"||e==="EACCES"||e==="EACCS"||e==="EPERM"},onChangeError:t=>{if(!Pt.isNodeError(t))throw t;if(!Pt.isChangeErrorOk(t))throw t}},sn=Pt;var Nt={onError:sn.onChangeError},X={onError:()=>{}},vo=wo.getuid?!wo.getuid():!1,U={isRetriable:sn.isRetriableError};var Cc={attempt:{chmod:ye(G(j.chmod),Nt),chown:ye(G(j.chown),Nt),close:ye(G(j.close),X),fsync:ye(G(j.fsync),X),mkdir:ye(G(j.mkdir),X),realpath:ye(G(j.realpath),X),stat:ye(G(j.stat),X),unlink:ye(G(j.unlink),X),chmodSync:ue(j.chmodSync,Nt),chownSync:ue(j.chownSync,Nt),closeSync:ue(j.closeSync,X),existsSync:ue(j.existsSync,X),fsyncSync:ue(j.fsync,X),mkdirSync:ue(j.mkdirSync,X),realpathSync:ue(j.realpathSync,X),statSync:ue(j.statSync,X),unlinkSync:ue(j.unlinkSync,X)},retry:{close:_e(G(j.close),U),fsync:_e(G(j.fsync),U),open:_e(G(j.open),U),readFile:_e(G(j.readFile),U),rename:_e(G(j.rename),U),stat:_e(G(j.stat),U),write:_e(G(j.write),U),writeFile:_e(G(j.writeFile),U),closeSync:ge(j.closeSync,U),fsyncSync:ge(j.fsyncSync,U),openSync:ge(j.openSync,U),readFileSync:ge(j.readFileSync,U),renameSync:ge(j.renameSync,U),statSync:ge(j.statSync,U),writeSync:ge(j.writeSync,U),writeFileSync:ge(j.writeFileSync,U)}},V=Cc;u();import Le from"node:process";var Eo="utf8",on=438,So=511;var bo={},Po=Le.geteuid?Le.geteuid():-1,No=Le.getegid?Le.getegid():-1;var Io=1e3,Oo=!!Le.getuid,Pm=Le.getuid?!Le.getuid():!1,an=128;u();var To=t=>t instanceof Error&&"code"in t;var cn=t=>typeof t=="string",lr=t=>t===void 0;u();u();import Mc from"node:path";u();u();import nt from"node:process";u();import ko from"node:process";var Ro=ko.platform==="linux",dr=ko.platform==="win32";u();var un=["SIGHUP","SIGINT","SIGTERM"];dr||un.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");Ro&&un.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var jo=un;var ln=class{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=e=>{if(!this.exited){this.exited=!0;for(let r of this.callbacks)r();e&&(dr&&e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"?nt.kill(nt.pid,"SIGTERM"):nt.kill(nt.pid,e))}},this.hook=()=>{nt.once("exit",()=>this.exit());for(let e of jo)try{nt.once(e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}},qo=new ln;var Dc=qo.register,Ao=Dc;var ne={store:{},create:t=>{let e=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),s=`.tmp-${Date.now().toString().slice(-10)}${e}`;return`${t}${s}`},get:(t,e,r=!0)=>{let n=ne.truncate(e(t));return n in ne.store?ne.get(t,e,r):(ne.store[n]=r,[n,()=>delete ne.store[n]])},purge:t=>{ne.store[t]&&(delete ne.store[t],V.attempt.unlink(t))},purgeSync:t=>{ne.store[t]&&(delete ne.store[t],V.attempt.unlinkSync(t))},purgeSyncAll:()=>{for(let t in ne.store)ne.purgeSync(t)},truncate:t=>{let e=Mc.basename(t);if(e.length<=an)return t;let r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!r)return t;let n=e.length-an;return`${t.slice(0,-e.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};Ao(ne.purgeSyncAll);var It=ne;function dn(t,e,r=bo){if(cn(r))return dn(t,e,{encoding:r});let s={timeout:r.timeout??Io},o=null,i=null,a=null;try{let c=V.attempt.realpathSync(t),l=!!c;t=c||t,[i,o]=It.get(t,r.tmpCreate||It.create,r.tmpPurge!==!1);let d=Oo&&lr(r.chown),f=lr(r.mode);if(l&&(d||f)){let h=V.attempt.statSync(t);h&&(r={...r},d&&(r.chown={uid:h.uid,gid:h.gid}),f&&(r.mode=h.mode))}if(!l){let h=xc.dirname(t);V.attempt.mkdirSync(h,{mode:So,recursive:!0})}a=V.retry.openSync(s)(i,"w",r.mode||on),r.tmpCreated&&r.tmpCreated(i),cn(e)?V.retry.writeSync(s)(a,e,0,r.encoding||Eo):lr(e)||V.retry.writeSync(s)(a,e,0,e.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?V.retry.fsyncSync(s)(a):V.attempt.fsync(a)),V.retry.closeSync(s)(a),a=null,r.chown&&(r.chown.uid!==Po||r.chown.gid!==No)&&V.attempt.chownSync(i,r.chown.uid,r.chown.gid),r.mode&&r.mode!==on&&V.attempt.chmodSync(i,r.mode);try{V.retry.renameSync(s)(i,t)}catch(h){if(!To(h)||h.code!=="ENAMETOOLONG")throw h;V.retry.renameSync(s)(i,It.truncate(t))}o(),i=null}finally{a&&V.attempt.closeSync(a),i&&It.purge(i)}}var wc=Zr(Bs(),1),Ec=Zr(_c(),1);u();var Rp=(t,e={})=>{if(typeof t!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof t}\``);let{wait:r=0,maxWait:n=Number.POSITIVE_INFINITY,before:s=!1,after:o=!0}=e;if(!s&&!o)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let i,a,c,l=function(...d){let f=this,h=()=>{i=void 0,a&&(clearTimeout(a),a=void 0),o&&(c=t.apply(f,d))},y=()=>{a=void 0,i&&(clearTimeout(i),i=void 0),o&&(c=t.apply(f,d))},p=s&&!i;return clearTimeout(i),i=setTimeout(h,r),n>0&&n!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout(y,n)),p&&(c=t.apply(f,d)),c};return fo(l,t),l.cancel=()=>{i&&(clearTimeout(i),i=void 0),a&&(clearTimeout(a),a=void 0)},l},no=Rp;var rt=Zr(Ic(),1),Wr=function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},z=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},et,xe,ce,ze,Cp=wc.default.default,Dp=Ec.default.default,vc="aes-256-cbc",Et=()=>Object.create(null),Mp=t=>t!=null,xp=(t,e)=>{let r=new Set(["undefined","symbol","function"]),n=typeof e;if(r.has(n))throw new TypeError(`Setting a value of type \`${n}\` for key \`${t}\` is not allowed as it's not supported by JSON`)},Jr="__internal__",so=`${Jr}.migrations.version`,or=class{constructor(e={}){Object.defineProperty(this,"path",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),et.set(this,void 0),xe.set(this,void 0),ce.set(this,void 0),ze.set(this,{}),Object.defineProperty(this,"_deserialize",{enumerable:!0,configurable:!0,writable:!0,value:i=>JSON.parse(i)}),Object.defineProperty(this,"_serialize",{enumerable:!0,configurable:!0,writable:!0,value:i=>JSON.stringify(i,void 0," ")});let r={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e};if(!r.cwd){if(!r.projectName)throw new Error("Please specify the `projectName` option.");r.cwd=uo(r.projectName,{suffix:r.projectSuffix}).config}if(Wr(this,ce,r,"f"),r.schema){if(typeof r.schema!="object")throw new TypeError("The `schema` option must be an object.");let i=new Cp({allErrors:!0,useDefaults:!0});Dp(i);let a={type:"object",properties:r.schema};Wr(this,et,i.compile(a),"f");for(let[c,l]of Object.entries(r.schema))l?.default&&(z(this,ze,"f")[c]=l.default)}r.defaults&&Wr(this,ze,{...z(this,ze,"f"),...r.defaults},"f"),r.serialize&&(this._serialize=r.serialize),r.deserialize&&(this._deserialize=r.deserialize),this.events=new Ap,Wr(this,xe,r.encryptionKey,"f");let n=r.fileExtension?`.${r.fileExtension}`:"";this.path=$c.resolve(r.cwd,`${r.configName??"config"}${n}`);let s=this.store,o=Object.assign(Et(),r.defaults,s);this._validate(o);try{qp.deepEqual(s,o)}catch{this.store=o}if(r.watch&&this._watch(),r.migrations){if(!r.projectVersion)throw new Error("Please specify the `projectVersion` option.");this._migrate(r.migrations,r.projectVersion,r.beforeEachMigration)}}get(e,r){if(z(this,ce,"f").accessPropertiesByDotNotation)return this._get(e,r);let{store:n}=this;return e in n?n[e]:r}set(e,r){if(typeof e!="string"&&typeof e!="object")throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!="object"&&r===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw new TypeError(`Please don't use the ${Jr} key, as it's used to manage this module internal operations.`);let{store:n}=this,s=(o,i)=>{xp(o,i),z(this,ce,"f").accessPropertiesByDotNotation?nn(n,o,i):n[o]=i};if(typeof e=="object"){let o=e;for(let[i,a]of Object.entries(o))s(i,a)}else s(e,r);this.store=n}has(e){return z(this,ce,"f").accessPropertiesByDotNotation?$o(this.store,e):e in this.store}reset(...e){for(let r of e)Mp(z(this,ze,"f")[r])&&this.set(r,z(this,ze,"f")[r])}delete(e){let{store:r}=this;z(this,ce,"f").accessPropertiesByDotNotation?go(r,e):delete r[e],this.store=r}clear(){this.store=Et();for(let e of Object.keys(z(this,ze,"f")))this.reset(e)}onDidChange(e,r){if(typeof e!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof r!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof r}`);return this._handleChange(()=>this.get(e),r)}onDidAnyChange(e){if(typeof e!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`);return this._handleChange(()=>this.store,e)}get size(){return Object.keys(this.store).length}get store(){try{let e=tt.readFileSync(this.path,z(this,xe,"f")?null:"utf8"),r=this._encryptData(e),n=this._deserialize(r);return this._validate(n),Object.assign(Et(),n)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),Et();if(z(this,ce,"f").clearInvalidConfig&&e.name==="SyntaxError")return Et();throw e}}set store(e){this._ensureDirectory(),this._validate(e),this._write(e),this.events.emit("change")}*[(et=new WeakMap,xe=new WeakMap,ce=new WeakMap,ze=new WeakMap,Symbol.iterator)](){for(let[e,r]of Object.entries(this.store))yield[e,r]}_encryptData(e){if(!z(this,xe,"f"))return e.toString();try{let r=e.slice(0,16),n=sr.pbkdf2Sync(z(this,xe,"f"),r.toString(),1e4,32,"sha512"),s=sr.createDecipheriv(vc,n,r);return nr.concat([s.update(nr.from(e.slice(17))),s.final()]).toString("utf8")}catch{}return e.toString()}_handleChange(e,r){let n=e(),s=()=>{let o=n,i=e();jp(i,o)||(n=i,r.call(this,i,o))};return this.events.on("change",s),()=>this.events.removeListener("change",s)}_validate(e){if(!z(this,et,"f")||z(this,et,"f").call(this,e)||!z(this,et,"f").errors)return;let n=z(this,et,"f").errors.map(({instancePath:s,message:o=""})=>`\`${s.slice(1)}\` ${o}`);throw new Error("Config schema violation: "+n.join("; "))}_ensureDirectory(){tt.mkdirSync($c.dirname(this.path),{recursive:!0})}_write(e){let r=this._serialize(e);if(z(this,xe,"f")){let n=sr.randomBytes(16),s=sr.pbkdf2Sync(z(this,xe,"f"),n.toString(),1e4,32,"sha512"),o=sr.createCipheriv(vc,s,n);r=nr.concat([n,nr.from(":"),o.update(nr.from(r)),o.final()])}if(gc.env.SNAP)tt.writeFileSync(this.path,r,{mode:z(this,ce,"f").configFileMode});else try{dn(this.path,r,{mode:z(this,ce,"f").configFileMode})}catch(n){if(n?.code==="EXDEV"){tt.writeFileSync(this.path,r,{mode:z(this,ce,"f").configFileMode});return}throw n}}_watch(){this._ensureDirectory(),tt.existsSync(this.path)||this._write(Et()),gc.platform==="win32"?tt.watch(this.path,{persistent:!1},no(()=>{this.events.emit("change")},{wait:100})):tt.watchFile(this.path,{persistent:!1},no(()=>{this.events.emit("change")},{wait:5e3}))}_migrate(e,r,n){let s=this._get(so,"0.0.0"),o=Object.keys(e).filter(a=>this._shouldPerformMigration(a,s,r)),i={...this.store};for(let a of o)try{n&&n(this,{fromVersion:s,toVersion:a,finalVersion:r,versions:o});let c=e[a];c?.(this),this._set(so,a),s=a,i={...this.store}}catch(c){throw this.store=i,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${c}`)}(this._isVersionInRangeFormat(s)||!rt.default.eq(s,r))&&this._set(so,r)}_containsReservedKey(e){return typeof e=="object"&&Object.keys(e)[0]===Jr?!0:typeof e!="string"?!1:z(this,ce,"f").accessPropertiesByDotNotation?!!e.startsWith(`${Jr}.`):!1}_isVersionInRangeFormat(e){return rt.default.clean(e)===null}_shouldPerformMigration(e,r,n){return this._isVersionInRangeFormat(e)?r!=="0.0.0"&&rt.default.satisfies(r,e)?!1:rt.default.satisfies(n,e):!(rt.default.lte(e,r)||rt.default.gt(e,n))}_get(e,r){return _o(this.store,e,r)}_set(e,r){let{store:n}=this;nn(n,e,r),this.store=n}};function zp(t){let e=t.replace(/^\uFEFF/,"");return JSON.parse(e)}var ir=class{config;constructor(e){this.config=new or({...e,clearInvalidConfig:!0,deserialize:zp})}get(e){try{return this.config.get(e)}catch(r){this.handleError(r,"get")}}set(e,r){try{this.config.set(e,r)}catch(n){this.handleError(n,"set")}}delete(e){try{this.config.delete(e)}catch(r){this.handleError(r,"delete")}}clear(){try{this.config.clear()}catch(e){this.handleError(e,"clear")}}handleError(e,r){throw this.isPermissionError()?new ho(`Failed to access local storage (${r}): ${e}`,this.tryMessage()):new po(`Unexpected error while accessing local storage at ${this.config.path} (${r}): ${e}`)}isPermissionError(){let e=Qr(this.config.path),r=Qr(ar(this.config.path)),n=cr(this.config.path);return!e||!r||n===!1}tryMessage(){let e=cr(this.config.path),r=cr(ar(this.config.path)),n=["Check that you have write permissions for",{filePath:this.config.path}];return(e===!1||r===!1)&&n.push("- The file is owned by a different user. This typically happens when Shopify CLI was previously run with elevated permissions (e.g., sudo)."),n.push(`
|
|
9
|
+
|
|
10
|
+
To resolve this, remove the Shopify CLI preferences folder:`),n.push({command:`rm -rf ${ar(this.config.path)}`}),n}};var Sc;function re(){return Sc??=new ir({projectName:`shopify-cli-kit${mo()?"-test":""}`}),Sc}function oo(){return en()?"devSessionStore":"sessionStore"}function io(){return en()?"currentDevSessionId":"currentSessionId"}function pg(t=re()){return Ve(Fe`Getting session store...`),t.get(oo())}function mg(t,e=re()){Ve(Fe`Setting session store...`),e.set(oo(),t)}function yg(t=re()){Ve(Fe`Removing session store...`),t.delete(oo())}function _g(t=re()){return Ve(Fe`Getting current session ID...`),t.get(io())}function gg(t,e=re()){Ve(Fe`Setting current session ID...`),e.set(io(),t)}function $g(t=re()){Ve(Fe`Removing current session ID...`),t.delete(io())}async function vg(t,e,r,n=re()){let s=Vp(t,n);if(s?.value!==void 0&&(r===void 0||Date.now()-s.timestamp<r))return s.value;let o=await e();return Fp(t,o,n),o}function Fp(t,e,r=re()){let n=r.get("cache")??{};n[t]={value:e,timestamp:Date.now()},r.set("cache",n)}function Vp(t,e=re()){return(e.get("cache")??{})[t]}function wg(t=re()){t.delete("cache")}function bc({days:t=0,hours:e=0,minutes:r=0,seconds:n=0}){return(t*24*60*60+e*60*60+r*60+n)*1e3}async function Eg(t,e,r,n=re()){let s=n.get("cache")??{},o=`most-recent-occurrence-${t}`,i=s[o];return i?.value!==void 0&&Date.now()-i.timestamp<bc(e)?!1:(await r(),s[o]={value:!0,timestamp:Date.now()},n.set("cache",s),!0)}async function Sg(t,e=re()){let{key:r,limit:n,timeout:s,task:o}=t,i=e.get("cache")??{},a=`rate-limited-occurrences-${r}`,c=i[a],l=Date.now();if(c?.value){let d=l-bc(s),f=c.value.filter(h=>h>=d);if(f.length>=n)return i[a]={value:f,timestamp:Date.now()},e.set("cache",i),!1;await o(),i[a]={value:[...f,l],timestamp:l}}else await o(),i[a]={value:[l],timestamp:l};return e.set("cache",i),!0}function bg(t=re()){return t.get("autoUpgradeEnabled")??!0}function Pg(t,e=re()){e.set("autoUpgradeEnabled",t)}function Pc(){return new ir({projectName:"shopify-cli-kit-partner-status"})}function Ng(t){return t&&Pc().get(t)?!0:null}function Ig(t){Pc().set(t,{status:!0,checkedAt:new Date().toISOString()})}export{bt as a,Oc as b,en as c,Bs as d,ir as e,pg as f,mg as g,yg as h,_g as i,gg as j,$g as k,vg as l,Fp as m,Vp as n,wg as o,bc as p,Eg as q,Sg as r,bg as s,Pg as t,Pc as u,Ng as v,Ig as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as E}from"./chunk-YEVGLC5X.js";import{b}from"./chunk-2XDUJQQN.js";import{Q as F,R as N}from"./chunk-YFINLODF.js";import{a as U}from"./chunk-CTNBSUVU.js";import{S as C,Ta as w,ma as O,xb as k}from"./chunk-VFM2KQRM.js";import{i as n}from"./chunk-B4OMIONW.js";import{j as R}from"./chunk-R6ICQT2D.js";import{d as u,f as P,g as x,h as g,n as T,q as y}from"./chunk-773TIA5M.js";import{e as H,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();d();var m=class{static description="Doctor test suite";context;assertions=[];registeredTests=[];async runSuite(t){this.context=t,this.registeredTests=[];let e=[];this.tests();for(let o of this.registeredTests){this.assertions=[];let s=Date.now();try{await o.fn(),e.push({name:o.name,status:this.hasFailures()?"failed":"passed",duration:Date.now()-s,assertions:[...this.assertions]})}catch(r){e.push({name:o.name,status:"failed",duration:Date.now()-s,assertions:[...this.assertions],error:r instanceof Error?r:new Error(String(r))})}}return e}test(t,e){this.registeredTests.push({name:t,fn:e})}tests(){}async run(t,e){let o=e?.cwd??this.context.workingDirectory,s=await F(t,{cwd:o,env:e?.env});return{command:t,exitCode:s.exitCode,stdout:s.stdout,stderr:s.stderr,output:String(s.stdout)+String(s.stderr),success:s.exitCode===0}}async runInteractive(t,e){let o=e?.cwd??this.context.workingDirectory,s=0;try{await N(t,{cwd:o,env:e?.env,stdin:"inherit"})}catch{s=1}return{command:t,exitCode:s,stdout:"",stderr:"",output:"",success:s===0}}assertSuccess(t,e){this.assertions.push({description:e??`Command succeeded: ${t.command}`,passed:t.success,expected:"exit code 0",actual:`exit code ${t.exitCode}`})}assertError(t,e,o){let s=!t.success;if(e){let h=(typeof e=="string"?new RegExp(e):e).test(t.output),c;s?h?c="matched":c=`output: ${t.output.slice(0,200)}`:c="command succeeded",this.assertions.push({description:o??`Command failed with expected error: ${e}`,passed:s&&h,expected:`failure with error matching ${e}`,actual:c})}else this.assertions.push({description:o??`Command failed: ${t.command}`,passed:s,expected:"non-zero exit code",actual:`exit code ${t.exitCode}`})}async assertFile(t,e,o){let s=g(t)?t:u(this.context.workingDirectory,t),r=x(this.context.workingDirectory,s);if(!await w(s)){this.assertions.push({description:o??`File exists: ${r}`,passed:!1,expected:"file exists",actual:"file not found"});return}if(e){let c=await O(s),D=(typeof e=="string"?new RegExp(e):e).test(c);this.assertions.push({description:o??`File ${r} matches ${e}`,passed:D,expected:`content matching ${e}`,actual:D?"matched":`content: ${c.slice(0,200)}...`})}else this.assertions.push({description:o??`File exists: ${r}`,passed:!0,expected:"file exists",actual:"file exists"})}async assertNoFile(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`File does not exist: ${s}`,passed:!r,expected:"file does not exist",actual:r?"file exists":"file does not exist"})}async assertDirectory(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`Directory exists: ${s}`,passed:r,expected:"directory exists",actual:r?"directory exists":"directory not found"})}assertOutput(t,e,o){let r=(typeof e=="string"?new RegExp(e):e).test(t.output);this.assertions.push({description:o??`Output matches ${e}`,passed:r,expected:`output matching ${e}`,actual:r?"matched":`output: ${t.output.slice(0,200)}`})}assertJson(t,e,o){try{let s=JSON.parse(t.stdout);if(e){let r=e(s);this.assertions.push({description:o??"Output is valid JSON matching validator",passed:r,expected:"valid JSON matching validator",actual:r?"matched":"validator returned false"})}else this.assertions.push({description:o??"Output is valid JSON",passed:!0,expected:"valid JSON",actual:"valid JSON"});return s}catch{this.assertions.push({description:o??"Output is valid JSON",passed:!1,expected:"valid JSON",actual:`invalid JSON: ${t.stdout.slice(0,100)}`});return}}assert(t,e){this.assertions.push({description:e,passed:t,expected:"true",actual:String(t)})}assertEqual(t,e,o){this.assertions.push({description:o,passed:t===e,expected:String(e),actual:String(t)})}hasFailures(){return this.assertions.some(t=>!t.passed)}};var p=class extends m{static description="Tests the theme init command creates a valid theme structure";themeName="";themePath="";tests(){this.test("init creates theme directory",async()=>{this.themeName=`doctor-theme-${C("creative")}`,this.themePath=u(this.context.workingDirectory,this.themeName);let t=await this.runInteractive(`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`);this.assertSuccess(t),this.context.themeName=this.themeName,this.context.themePath=this.themePath}),this.test("essential theme files exist",async()=>{let t=["layout/theme.liquid","config/settings_schema.json","templates/index.json"];await Promise.all(t.map(e=>this.assertFile(u(this.themePath,e))))}),this.test("theme directories exist",async()=>{let t=["sections","snippets","assets","locales"];await Promise.all(t.map(e=>this.assertDirectory(u(this.themePath,e))))}),this.test("layout/theme.liquid has valid content",async()=>{await this.assertFile(u(this.themePath,"layout/theme.liquid"),/<!doctype html>|<html|{{ content_for_header }}/i,"layout/theme.liquid contains expected Liquid markup")})}};d();var l=class extends m{static description="Tests pushing a theme to the store creates an unpublished theme";static requiresStore=!0;tests(){this.test("push creates unpublished theme",async()=>{if(!this.context.themePath){this.assert(!1,"Theme init did not complete successfully; themePath is missing in context");return}let t=this.context.themeName??"doctor-theme",e=`shopify theme push --unpublished --json --path ${this.context.themePath} -t ${t}`;this.context.environment&&(e+=` -e ${this.context.environment}`),this.context.store&&(e+=` -s ${this.context.store}`),this.context.password&&(e+=` --password ${this.context.password}`);let o=await this.run(e);this.assertSuccess(o);let s=this.assertJson(o,r=>typeof r.theme?.id=="number");s?.theme&&(this.assert(typeof s.theme.id=="number","Theme was created with a valid ID"),this.assertEqual(s.theme.role,"unpublished","Theme role is unpublished"),this.assert(s.theme.editor_url.includes("/admin/themes/"),"Editor URL is provided"),this.assert(s.theme.preview_url.includes("preview_theme_id="),"Preview URL is provided"),this.context.themeId=String(s.theme.id),this.context.data.editorUrl=s.theme.editor_url,this.context.data.previewUrl=s.theme.preview_url)})}};d();function _(i){return{workingDirectory:i.path??y(),environment:i.environment,store:i.store,password:i.password,data:{}}}d();var a=i=>k(i),v;function J(i){v=i}function G(i){if(!v)return i;let t=/\/[^\s,)]+/g;return i.replace(t,e=>T(e,v))}function A(i,t){a(""),a(n.bold(n.cyan(`Suite: ${i}`))),a(n.dim(t))}function j(i){a(n.bold(n.blue(`Running: ${i}`)))}function q(i){let t=`(${(i.duration/1e3).toFixed(2)}s)`;if(i.status==="passed"){a(n.bold(n.green(`PASSED: ${i.name} ${n.dim(t)}`)));for(let e of I(i.assertions))a(e)}else if(i.status==="failed"){a(n.red(`FAILED: ${i.name} ${n.dim(t)}`));for(let e of I(i.assertions))a(e);i.error&&a(n.red(` Error: ${G(i.error.message)}`))}else a(n.yellow(`SKIPPED: ${i.name}`))}function S(i){let t=i.filter(h=>h.status==="passed").length,e=i.filter(h=>h.status==="failed").length,o=i.filter(h=>h.status==="skipped").length,s=i.length,r=i.reduce((h,c)=>h+c.duration,0);a(""),a(n.bold("\u2500".repeat(40))),e>0?a(n.red(n.bold(`Doctor Complete: ${e}/${s} tests failed`))):a(n.green(n.bold(`Doctor Complete: ${t}/${s} tests passed`))),a(` Passed: ${n.green(String(t))}`),a(` Failed: ${n.red(String(e))}`),o>0&&a(` Skipped: ${n.yellow(String(o))}`),a(` Total time: ${n.dim(`${(r/1e3).toFixed(2)}s`)}`)}function I(i){return i.map(t=>{if(t.passed)return n.green(` [OK] ${t.description}`);{let e=` (expected: ${t.expected}, actual: ${t.actual})`;return n.red(` [FAIL] ${t.description}${e}`)}})}var Y=[p,l];async function L(i){let t=[],e=_(i);J(e.workingDirectory);for(let o of Y){let s=new o,r=o.description??"Test suite";A(o.name,r);let h=await s.runSuite(e);for(let c of h)if(j(c.name),q(c),t.push(c),c.status==="failed")return S(t),t}return S(t),t}var f=H(U(),1);var $=class i extends b{static description="Run all theme command doctor-release tests";static hidden=!0;static flags={...E,path:f.Flags.string({char:"p",description:"The path to run tests in. Defaults to current directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>P(t),default:async()=>y()}),environment:f.Flags.string({char:"e",description:"The environment to use from shopify.theme.toml (required for store-connected tests).",env:"SHOPIFY_FLAG_ENVIRONMENT",required:!0}),store:f.Flags.string({char:"s",description:"Store URL (overrides environment).",env:"SHOPIFY_FLAG_STORE"}),password:f.Flags.string({description:"Password from Theme Access app (overrides environment).",env:"SHOPIFY_FLAG_PASSWORD"})};async run(){if(!R())return;let{flags:t}=await this.parse(i);(await L({path:t.path,environment:t.environment,store:t.store,password:t.password})).some(s=>s.status==="failed")&&(process.exitCode=1)}};export{$ as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"./chunk-U2DWBZK2.js";import{a as e}from"./chunk-TEY4LRY7.js";import{a as o}from"./chunk-CIWKN4HF.js";import{b as i}from"./chunk-2XDUJQQN.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends i{static description="View all the available UI kit components";static hiddenAliases=["kitchen-sink all"];static hidden=!0;async run(){await o(),await e(),await s()}};export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as s,y as d,z as a}from"./chunk-YFINLODF.js";import{wb as r}from"./chunk-VFM2KQRM.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();function l(e){let i=e.status==="success"?{schemaVersion:1,...e.submission}:{schemaVersion:1,...e.submission,failure:e.failure};return JSON.stringify(i,null,2)}function p(e){return JSON.stringify({schemaVersion:1,outcomes:e.outcomes},null,2)}function D(e){f(e)}function R(e,i){return i.json?r(l(e)):e.status==="failed"?S(e):i.watch?d({headline:"Subscription migration operations.",body:e.submission.operations.map(({operation:o})=>c(o))}):f(e.submission),e.status==="failed"?1:0}function v(e,i){let o=e.outcomes.some(({status:n})=>n==="failed");return i.json?r(p(e)):o?s({headline:"Some subscription migration operations could not be canceled.",body:m(e.outcomes)}):a({headline:"Subscription migration operations canceled.",body:m(e.outcomes)}),o?1:0}function f(e){let i=e.action==="schedule"?"scheduled":"unscheduled";a({headline:`Subscription migrations ${i}.`,body:[`Shops: ${e.total}`,"Operation IDs:",...e.operations.map(({operation:o})=>o.id),"Save every operation ID. You will need them to check or cancel this submission."]})}function S(e){if(e.failure.type==="operations"){s({headline:"Some subscription migration operations failed.",body:["Failed operation IDs:",...e.failure.operationIds,"Terminal operation outcomes:",...e.submission.operations.map(({operation:o})=>c(o)),"Save every operation ID. You will need them to inspect this submission."]});return}let i=e.submission.operations.map(({operation:o})=>o.id);s({headline:i.length===0?"Subscription migration submission failed.":"Some subscription migration operations were accepted before submission failed.",body:[...i.length===0?["Accepted operation IDs: None."]:["Accepted operation IDs:",...i],`Batch index: ${e.failure.batchIndex}`,"Errors:",...e.failure.userErrors.map(({message:o})=>o),...i.length===0?[]:["Save every accepted operation ID. You will need them to check or cancel accepted operations."]]})}function m(e){let i=e.filter(n=>n.status==="success"),o=e.filter(n=>n.status==="failed");return[...i.length===0?["Canceled operations: None."]:["Canceled operations:",...i.map(({operation:n})=>c(n))],...o.length===0?[]:["Failed operations:",...o.map(({operationId:n,operation:u,userErrors:b})=>{let h=u?` (returned status: ${u.status})`:"";return`${n}: ${b.map(({message:g})=>g).join("; ")}${h}`})]]}function c(e){return`${e.id}: ${e.status} (${e.results.edges.length}/${e.total} settled)`}export{D as a,R as b,v as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as r}from"./chunk-VKWPEFWQ.js";r();var a={nextDeprecationDate:void 0};function o(){return a.nextDeprecationDate}function c(t){if(t.length<1)return;let e=D(Date.now(),t);if(!e)return;let n=o();(!n||e<n.getTime())&&(a.nextDeprecationDate=new Date(e))}function D(t,e){return e.map(i=>i.getTime()).sort().find(i=>i>t)}export{o as a,c as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as n}from"./chunk-XF2KTEID.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();var o=class extends Error{type;constructor(e,p){super(p),this.type=e}},i=r=>async()=>r,s=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var d="cloudflare",v=i({name:d});export{o as a,s as b,d as c,v as d};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as V}from"./chunk-E5FXOLQO.js";import{k as q,l as H,n as I}from"./chunk-7T6M7FAC.js";import{a as Y}from"./chunk-FDBHQLFK.js";import{b as L}from"./chunk-6MWWJZFN.js";import{a as p,b as w}from"./chunk-YY6TFARF.js";import{a as N}from"./chunk-Q5JX23QU.js";import{a as F}from"./chunk-ZYX7UHCQ.js";import{a as y,c as U}from"./chunk-GRPKF5ZB.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-5SEEDOQ5.js";import{r as k}from"./chunk-GNBRCK7L.js";import{aa as B}from"./chunk-F3NYCSXT.js";import{T as b,xa as a,ya as O}from"./chunk-3JXPOOFV.js";import{A as d,B as C,E as P,z as f}from"./chunk-YFINLODF.js";import{h as S}from"./chunk-BWJIZYAG.js";import{wb as $}from"./chunk-VFM2KQRM.js";import{f as T,q as l}from"./chunk-773TIA5M.js";import{e as z,g as v}from"./chunk-VKWPEFWQ.js";v();var A=z(B(),1);async function Te(e,t,r,o){let n=e.environment?.[0],s=t??await b(k({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:c}=await L(e.path??l(),m);if(c.length>0&&c.filter(J=>J.severity===A.Severity.ERROR).length>0)throw O(new S(n?`[${n}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}a("theme-service:push:setup"),Y({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,h=e.path?T(e.path):l();if(!await I(h)&&!await U(i,void 0,n,r))return;e.listing&&await q(h,e.listing);let u=await Z(s,e,r);u&&(a("theme-service:push:setup"),await W(u,s,{allowLive:e.allowLive??!1,environment:n,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:h,publish:e.publish??!1,listing:e.listing},o))}async function W(e,t,r,o){a("theme-service:push:file-system");let n=await j(e.id,t),s=H(r.path,{filters:r,listing:r.listing});a("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:h}=V(e,t,n,s,r,o);await h(),r.publish&&await D(e.id,t),await G(i,e,t,r)}function E(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,o){o.json?K(t,r,e,o.environment):o.publish?Q(r,e,o.environment):X(t,r,e,o.environment)}function K(e,t,r,o){let n={environment:o,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:w(e,t),preview_url:p(e,t)}};if(E(r)){let i=`${o?`[${o}] `:""}The theme '${e.name}' was pushed with errors`;n.theme.warning=i;let h={};for(let[u,m]of r.entries())!m.success&&m.errors?.asset&&(h[u]=m.errors.asset);Object.keys(h).length>0&&(n.theme.errors=h)}$(JSON.stringify(n))}function Q(e,t,r){let o=r?[{subdued:`Environment: ${r}
|
|
2
|
+
|
|
3
|
+
`}]:[];E(t)?d({body:[...o,`Your theme was published with errors and is now live at https://${e.storeFqdn}`]}):f({body:[...o,`Your theme is now live at https://${e.storeFqdn}`]})}function X(e,t,r,o){let n=o?[{subdued:`Environment: ${o}
|
|
4
|
+
|
|
5
|
+
`}]:[],s=E(r),i=[[{link:{label:"View your theme",url:p(e,t)}}],[{link:{label:"Customize your theme at the theme editor",url:w(e,t)}}]];s?d({body:[...n,"The theme",...y(e),"was pushed with errors"],nextSteps:i}):f({body:[...n,"The theme",...y(e),"was pushed successfully."],nextSteps:i})}async function Z(e,t,r){let{live:o,development:n,unpublished:s,theme:i,environment:h,developmentContext:u}=t;if(n)return new N(e).findOrCreate(u,g);if(s){let m=i??await _("Name of the new theme");return R({name:m,role:M},e)}else{let m=await F(e,{create:!0,header:"Select a theme to push to:",filter:{live:o,theme:i}});return await ee(m.role,t.allowLive,e.storeFqdn,h,r)?m:void 0}}async function ee(e,t,r,o,n){if(e===x){if(t)return!0;if(n)return C({headline:`Environment: ${o}`,body:[`Can't push theme files to the live theme on ${r}`,"Use the --allow-live flag to push to a live theme."]}),!1;let s={message:`Push theme files to the ${e} theme on ${r}?`,confirmationMessage:"Yes, confirm changes",cancellationMessage:"Cancel"};return P(s)}return!0}export{Te as a};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{c as g,g as s}from"./chunk-VKWPEFWQ.js";var t=g((u,o)=>{s();o.exports=function(e,l){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var i=e.length;if(i<=1)return e;var n="";if(i>4&&e[3]==="\\"){var f=e[2];(f==="?"||f===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),n="//")}var r=e.split(/[/\\]+/);return l!==!1&&r[r.length-1]===""&&r.pop(),n+r.join("/")}});export{t as a};
|
|
2
|
+
/*! Bundled license information:
|
|
3
|
+
|
|
4
|
+
normalize-path/index.js:
|
|
5
|
+
(*!
|
|
6
|
+
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
9
|
+
* Released under the MIT License.
|
|
10
|
+
*)
|
|
11
|
+
*/
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import{a as J}from"./chunk-FDBHQLFK.js";import{a as v}from"./chunk-YY6TFARF.js";import{a as E,b as C}from"./chunk-ZYX7UHCQ.js";import{a as p}from"./chunk-GRPKF5ZB.js";import{r as S}from"./chunk-5SEEDOQ5.js";import{p as h,r as D,v as N}from"./chunk-GNBRCK7L.js";import{b as q,c as F,f as O}from"./chunk-YEVGLC5X.js";import{T as b}from"./chunk-3JXPOOFV.js";import{B as m,E as T,W as d,z as w}from"./chunk-YFINLODF.js";import{a as P}from"./chunk-CTNBSUVU.js";import{wb as n}from"./chunk-VFM2KQRM.js";import{e as M,g as c}from"./chunk-VKWPEFWQ.js";c();c();async function x(t,o,e){let{name:r,verbose:u,noColor:l,json:a,force:A}=e,y=d()||A;if(J({verbose:u,noColor:l}),y&&!o){let i="A theme ID is required to duplicate a theme, specify one with the --theme flag";a?n(JSON.stringify({message:i,errors:[]})):m({body:[i]});return}let s=o?await C(t,o):await E(t,{header:"Select a theme to duplicate",filter:{theme:o}});if(!s){let i=`No theme with ID ${o} could be found. Use shopify theme list to find a theme ID.`;a?n(JSON.stringify({message:i,errors:[]})):m({body:[i]});return}if(s?.role==="development"){let i="Development themes can't be duplicated. Use shopify theme push to upload it to the store first.";a?n(JSON.stringify({message:i,errors:[]})):m({body:[i]});return}if(!y&&!await T({message:`Do you want to duplicate '${s.name}' on ${t.storeFqdn}?`,confirmationMessage:`Yes, duplicate '${s.name}'`,cancellationMessage:"No, cancel duplicate"}))return;let I=await S(s.id,r,t);a?j(s,t,I):Y(s,t,I)}function Y(t,o,e){if(e.userErrors&&e.userErrors.length>0){let r=e.userErrors.map(u=>u.message).join(", ");m({body:["The theme",...p(t),"could not be duplicated due to errors: ",{subdued:r},{char:"."},...e.requestId?[`
|
|
2
|
+
Request ID: `,{subdued:e.requestId}]:[]]})}else e.theme?w({body:["The theme",...p(t),"has been duplicated",{char:"."}],nextSteps:[[{link:{label:"View the duplicated theme",url:v(e.theme,o)}}]]}):m({body:["The theme",...p(t),"unexpectedly could not be duplicated",{char:"."},...e.requestId?[`
|
|
3
|
+
Request ID: `,{subdued:e.requestId}]:[]]})}function j(t,o,e){if(e.userErrors&&e.userErrors.length>0)n(JSON.stringify({message:`The theme '${t.name}' could not be duplicated due to errors`,errors:e.userErrors.map(r=>r.message),requestId:e.requestId}));else if(e.theme){let{id:r,name:u,role:l}=e.theme,a={theme:{id:r,name:u,role:l,shop:o.storeFqdn}};n(JSON.stringify(a))}else n(JSON.stringify({message:`The theme '${t.name}' unexpectedly could not be duplicated `,errors:[],requestId:e.requestId}))}var f=M(P(),1);var g=class t extends N{static summary="Duplicates a theme from your theme library.";static usage=["theme duplicate","theme duplicate --theme 10 --name 'New Theme'"];static descriptionWithMarkdown=`If you want to duplicate your local theme, you need to run \`shopify theme push\` first.
|
|
4
|
+
|
|
5
|
+
If no theme ID is specified, you're prompted to select the theme that you want to duplicate from the list of themes in your store. You're asked to confirm that you want to duplicate the specified theme.
|
|
6
|
+
|
|
7
|
+
Prompts and confirmations are not shown when duplicate is run in a CI environment or the \`--force\` flag is used, therefore you must specify a theme ID using the \`--theme\` flag.
|
|
8
|
+
|
|
9
|
+
You can optionally name the duplicated theme using the \`--name\` flag.
|
|
10
|
+
|
|
11
|
+
If you use the \`--json\` flag, then theme information is returned in JSON format, which can be used as a machine-readable input for scripts or continuous integration.
|
|
12
|
+
|
|
13
|
+
Sample JSON output:
|
|
14
|
+
|
|
15
|
+
\`\`\`json
|
|
16
|
+
{
|
|
17
|
+
"theme": {
|
|
18
|
+
"id": 108267175958,
|
|
19
|
+
"name": "A Duplicated Theme",
|
|
20
|
+
"role": "unpublished",
|
|
21
|
+
"shop": "mystore.myshopify.com"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
\`\`\`
|
|
25
|
+
|
|
26
|
+
\`\`\`json
|
|
27
|
+
{
|
|
28
|
+
"message": "The theme 'Summer Edition' could not be duplicated due to errors",
|
|
29
|
+
"errors": ["Maximum number of themes reached"],
|
|
30
|
+
"requestId": "12345-abcde-67890"
|
|
31
|
+
}
|
|
32
|
+
\`\`\``;static description=this.descriptionWithoutMarkdown();static flags={...q,...F,password:h.password,theme:O(f.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})),name:f.Flags.string({char:"n",description:"Name of the newly duplicated theme.",env:"SHOPIFY_FLAG_NAME"}),store:h.store,environment:h.environment,force:f.Flags.boolean({char:"f",description:"Force the duplicate operation to run without prompts or confirmations. Required if non interactive outside CI.",env:"SHOPIFY_FLAG_FORCE"})};static nonTTYFlagRequirements(){return[{flags:["force"],when:()=>!d()}]}async run(){let{flags:o}=await this.parse(t),e=D(o),r=await b(e,o.password);await x(r,o.theme,o)}};export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as m,d as f,e as p}from"./chunk-E55KS3GZ.js";import{d as c,f as w,j as T}from"./chunk-5SEEDOQ5.js";import{g as d}from"./chunk-GNBRCK7L.js";import{F as u}from"./chunk-YFINLODF.js";import{h as l}from"./chunk-BWJIZYAG.js";import{T as i}from"./chunk-VFM2KQRM.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();async function A(e,r){let n=await m(e),t=new p(r.filter),a=e.storeFqdn;if(t.any())return f(a,n,t)[0];let y=r.header??"",h=n.map(o=>{let S=o.id.toString()===d()?" [current]":"";return{value:async()=>o,label:`${o.name}${S}`,group:i(o.role)}});return r.create&&h.unshift(g(e)),(await u({message:y,choices:h}))()}async function B(e,r){return(await m(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await m(e),t=new p(r),a=e.storeFqdn;return t.any()?f(a,n,t):[]}function g(e){return{value:async()=>{let r=c,n=await w("Name of the new theme"),t=await T({name:n,role:r},e);if(!t)throw new l("The theme could not be created.");return t},label:"[Create a new theme]",group:i(c)}}export{A as a,B as b,C as c};
|