@platformos/codemirror-language-client 0.0.7 → 0.0.9
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/CHANGELOG.md +12 -0
- package/dist/esm/CodeMirrorLanguageClient.d.ts +60 -0
- package/dist/esm/CodeMirrorLanguageClient.js +80 -0
- package/dist/esm/CodeMirrorLanguageClient.js.map +1 -0
- package/dist/esm/LanguageClient.d.ts +112 -0
- package/dist/esm/LanguageClient.js +187 -0
- package/dist/esm/LanguageClient.js.map +1 -0
- package/dist/esm/extensions/client.d.ts +6 -0
- package/dist/esm/extensions/client.js +12 -0
- package/dist/esm/extensions/client.js.map +1 -0
- package/dist/esm/extensions/complete.d.ts +17 -0
- package/dist/esm/extensions/complete.js +202 -0
- package/dist/esm/extensions/complete.js.map +1 -0
- package/dist/esm/extensions/complete.spec.js +189 -0
- package/dist/esm/extensions/complete.spec.js.map +1 -0
- package/dist/esm/extensions/documentHighlights.d.ts +14 -0
- package/dist/esm/extensions/documentHighlights.js +78 -0
- package/dist/esm/extensions/documentHighlights.js.map +1 -0
- package/dist/esm/extensions/documentHighlights.spec.d.ts +1 -0
- package/dist/esm/extensions/documentHighlights.spec.js +99 -0
- package/dist/esm/extensions/documentHighlights.spec.js.map +1 -0
- package/dist/esm/extensions/hover.d.ts +18 -0
- package/dist/esm/extensions/hover.js +49 -0
- package/dist/esm/extensions/hover.js.map +1 -0
- package/dist/esm/extensions/hover.spec.d.ts +1 -0
- package/dist/esm/extensions/hover.spec.js +59 -0
- package/dist/esm/extensions/hover.spec.js.map +1 -0
- package/dist/esm/extensions/index.d.ts +6 -0
- package/dist/esm/extensions/index.js +7 -0
- package/dist/esm/extensions/index.js.map +1 -0
- package/dist/esm/extensions/lspLinter.d.ts +23 -0
- package/dist/esm/extensions/lspLinter.js +104 -0
- package/dist/esm/extensions/lspLinter.js.map +1 -0
- package/dist/esm/extensions/lspLinter.spec.d.ts +1 -0
- package/dist/esm/extensions/lspLinter.spec.js +141 -0
- package/dist/esm/extensions/lspLinter.spec.js.map +1 -0
- package/dist/esm/extensions/snippet.d.ts +19 -0
- package/dist/esm/extensions/snippet.js +25 -0
- package/dist/esm/extensions/snippet.js.map +1 -0
- package/dist/esm/extensions/snippet.spec.d.ts +1 -0
- package/dist/esm/extensions/snippet.spec.js +23 -0
- package/dist/esm/extensions/snippet.spec.js.map +1 -0
- package/dist/esm/extensions/textDocumentSync.d.ts +4 -0
- package/dist/esm/extensions/textDocumentSync.js +109 -0
- package/dist/esm/extensions/textDocumentSync.js.map +1 -0
- package/dist/esm/extensions/textDocumentSync.spec.d.ts +1 -0
- package/dist/esm/extensions/textDocumentSync.spec.js +163 -0
- package/dist/esm/extensions/textDocumentSync.spec.js.map +1 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/test/MockClient.d.ts +18 -0
- package/dist/esm/test/MockClient.js +63 -0
- package/dist/esm/test/MockClient.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildInfo +1 -0
- package/dist/esm/utils/simpleStateField.d.ts +3 -0
- package/dist/esm/utils/simpleStateField.js +17 -0
- package/dist/esm/utils/simpleStateField.js.map +1 -0
- package/dist/umd/CodeMirrorLanguageClient.d.ts +60 -0
- package/dist/umd/CodeMirrorLanguageClient.js +94 -0
- package/dist/umd/CodeMirrorLanguageClient.js.map +1 -0
- package/dist/umd/LanguageClient.d.ts +112 -0
- package/dist/umd/LanguageClient.js +202 -0
- package/dist/umd/LanguageClient.js.map +1 -0
- package/dist/umd/extensions/client.d.ts +6 -0
- package/dist/umd/extensions/client.js +25 -0
- package/dist/umd/extensions/client.js.map +1 -0
- package/dist/umd/extensions/complete.d.ts +17 -0
- package/dist/umd/extensions/complete.js +217 -0
- package/dist/umd/extensions/complete.js.map +1 -0
- package/dist/umd/extensions/documentHighlights.d.ts +14 -0
- package/dist/umd/extensions/documentHighlights.js +93 -0
- package/dist/umd/extensions/documentHighlights.js.map +1 -0
- package/dist/umd/extensions/hover.d.ts +18 -0
- package/dist/umd/extensions/hover.js +64 -0
- package/dist/umd/extensions/hover.js.map +1 -0
- package/dist/umd/extensions/index.d.ts +6 -0
- package/dist/umd/extensions/index.js +36 -0
- package/dist/umd/extensions/index.js.map +1 -0
- package/dist/umd/extensions/lspLinter.d.ts +23 -0
- package/dist/umd/extensions/lspLinter.js +119 -0
- package/dist/umd/extensions/lspLinter.js.map +1 -0
- package/dist/umd/extensions/snippet.d.ts +19 -0
- package/dist/umd/extensions/snippet.js +38 -0
- package/dist/umd/extensions/snippet.js.map +1 -0
- package/dist/umd/extensions/textDocumentSync.d.ts +4 -0
- package/dist/umd/extensions/textDocumentSync.js +122 -0
- package/dist/umd/extensions/textDocumentSync.js.map +1 -0
- package/dist/umd/index.d.ts +2 -0
- package/dist/umd/index.js +29 -0
- package/dist/umd/index.js.map +1 -0
- package/dist/umd/test/MockClient.d.ts +18 -0
- package/dist/umd/test/MockClient.js +77 -0
- package/dist/umd/test/MockClient.js.map +1 -0
- package/dist/umd/tsconfig.tsbuildInfo +1 -0
- package/dist/umd/utils/simpleStateField.d.ts +3 -0
- package/dist/umd/utils/simpleStateField.js +30 -0
- package/dist/umd/utils/simpleStateField.js.map +1 -0
- package/package.json +4 -4
- package/playground/src/index.html +2 -2
- package/playground/src/language-server-worker.ts +1 -5
- package/playground/src/playground.ts +65 -77
- package/playground/webpack.config.js +4 -6
- package/playground/dist/c79446f35d8df82b1201.7baf47407c339642d100.hot-update.json +0 -1
- package/playground/dist/c79446f35d8df82b1201.7e0989b9d82d407d3fa3.hot-update.json +0 -1
- package/playground/dist/index.html +0 -10
- package/playground/dist/language-server-worker.d.ts +0 -12
- package/playground/dist/main.7baf47407c339642d100.hot-update.js +0 -29
- package/playground/dist/main.7baf47407c339642d100.hot-update.js.map +0 -1
- package/playground/dist/main.7baf47407c339642d100.hot-update.json +0 -1
- package/playground/dist/main.7e0989b9d82d407d3fa3.hot-update.js +0 -29
- package/playground/dist/main.7e0989b9d82d407d3fa3.hot-update.js.map +0 -1
- package/playground/dist/main.7e0989b9d82d407d3fa3.hot-update.json +0 -1
- package/playground/dist/main.bundle.js +0 -59960
- package/playground/dist/main.bundle.js.map +0 -1
- package/playground/dist/src_language-server-worker_ts.7baf47407c339642d100.hot-update.js +0 -11
- package/playground/dist/src_language-server-worker_ts.7baf47407c339642d100.hot-update.js.map +0 -1
- package/playground/dist/src_language-server-worker_ts.7e0989b9d82d407d3fa3.hot-update.js +0 -11
- package/playground/dist/src_language-server-worker_ts.7e0989b9d82d407d3fa3.hot-update.js.map +0 -1
- package/playground/dist/src_language-server-worker_ts.bundle.js +0 -27934
- package/playground/dist/src_language-server-worker_ts.bundle.js.map +0 -1
- package/playground/dist/vendors-node_modules_cross-fetch_dist_browser-ponyfill_js-node_modules_line-column_lib_line-c-6a6d49.bundle.js +0 -100265
- package/playground/dist/vendors-node_modules_cross-fetch_dist_browser-ponyfill_js-node_modules_line-column_lib_line-c-6a6d49.bundle.js.map +0 -1
- /package/{playground/dist/playground.d.ts → dist/esm/extensions/complete.spec.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"src_language-server-worker_ts.bundle.js","mappings":";;;;;;;;;;;;;AAQgD;AAehD,MAAM,IAAI,GAAG,sgpDAAY,CAAC;AAC1B,MAAM,OAAO,GAAG,q06KAAe,CAAC;AAChC,MAAM,OAAO,GAAG,8rmcAAe,CAAC;AAChC,MAAM,kBAAkB,GAAG,0krOAA2B,CAAC;AACvD,MAAM,OAAO,GAAG,k8iGAAe,CAAC;AAEhC,MAAM,MAAM,GAAG,IAAqB,CAAC;AAErC,MAAM,UAAU,GAA+B,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;IAC1E,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,EAAE;IACZ,MAAM,EAAE,6EAAS;IACjB,OAAO,EAAE,WAAW;CACrB,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,qFAAa,CAAC,MAAM,CAAC,CAAC;AAEzC,MAAM,oBAAoB;IACxB,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QACxC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,GAAW;QACxB,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,aAAa,EAAE,GAAG,CAAoB,CAAC;IAC5E,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,GAAW;QAC7B,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,kBAAkB,EAAE,GAAG,CAAyB,CAAC;IACtF,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,GAAW;QACpB,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,EAAE,GAAG,CAAsB,CAAC;IAC1E,CAAC;CACF;AAED,mFAAW,CACT,MAAM,EACN;IACE,EAAE,EAAE,IAAI,oBAAoB,CAAC,UAAU,CAAC;IACxC,WAAW,EAAE;QACX,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO;QAC5B,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,IAAI;QACtB,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO;QAC5B,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO;QAChC,kBAAkB,EAAE,KAAK,IAAI,EAAE,CAAC,kBAAkB;KACnD;IACD,iBAAiB,EAAE;QACjB,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO;KAC7B;IACD,UAAU;IACV,GAAG,CAAC,OAAO;QACT,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;CACF,EACD,UAAU,CACX,CAAC;;;;;;;;;;;;AC9EW;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;;;;;;;;;;;ACfa;AACb;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iCAAiC,GAAG,iCAAiC;AACrE,sCAAsC,mBAAO,CAAC,yEAAa;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iCAAiC;AACjC;;;;;;;;;;;ACxDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B,GAAG,qBAAqB,GAAG,gBAAgB,GAAG,cAAc,GAAG,2BAA2B,GAAG,wBAAwB,GAAG,sBAAsB,GAAG,wBAAwB,GAAG,uBAAuB,GAAG,0BAA0B;AAC3P,iBAAiB,mBAAO,CAAC,yDAAQ;AACjC,0BAA0B,0BAA0B,mBAAO,CAAC,0FAA+B;AAC3F,uBAAuB;AACvB,wBAAwB;AACxB,sBAAsB;AACtB;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,gBAAgB;AAChB;AACA;AACA;AACA,qBAAqB;AACrB,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCa;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6BAA6B,GAAG,cAAc,GAAG,qBAAqB,GAAG,gBAAgB,GAAG,2BAA2B;AACvH,aAAa,mBAAO,CAAC,mEAAe;AACpC,aAAa,mBAAO,CAAC,uDAAS;AAC9B,aAAa,mBAAO,CAAC,yDAAU;AAC/B,gBAAgB,mBAAO,CAAC,2DAAW;AACnC,uDAAsD,EAAE,qCAAqC,yCAAyC,EAAC;AACvI,4CAA2C,EAAE,qCAAqC,8BAA8B,EAAC;AACjH,iDAAgD,EAAE,qCAAqC,mCAAmC,EAAC;AAC3H,0CAAyC,EAAE,qCAAqC,4BAA4B,EAAC;AAC7G,4BAA4B,mBAAO,CAAC,mFAAuB;AAC3D,yDAAwD,EAAE,qCAAqC,uDAAuD,EAAC;AACvJ;;;;;;;;;;;AC3Ba;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,YAAY,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B,GAAG,yBAAyB;AACvD,uBAAuB;AACvB,mBAAmB;AACnB,iBAAiB,mBAAO,CAAC,uEAAe;AACxC,kBAAkB,mBAAO,CAAC,2DAAW;AACrC,iBAAiB,mBAAO,CAAC,yDAAU;AACnC,gBAAgB,mBAAO,CAAC,uDAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB,yBAAyB,yBAAyB;AAC3E,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,kBAAkB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,kBAAkB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA,wBAAwB,WAAW;AACnC,wBAAwB,eAAe,GAAG,gBAAgB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,oDAAoD,QAAQ,mGAAmG;AAC/J,kDAAkD,QAAQ,mGAAmG;AAC7J;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,KAAK;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,SAAS;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACp7Ba;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB,qBAAqB;AACrB,mBAAmB;AACnB,uBAAuB;AACvB,eAAe;AACf,gBAAgB;AAChB,YAAY;AACZ,wBAAwB;AACxB,sBAAsB,mBAAO,CAAC,mEAAe;AAC7C,gBAAgB,mBAAO,CAAC,uDAAS;AACjC,gBAAgB,mBAAO,CAAC,uDAAS;AACjC,iBAAiB,mBAAO,CAAC,yDAAU;AACnC,kBAAkB,mBAAO,CAAC,2DAAW;AACrC,sBAAsB,mBAAO,CAAC,mEAAe;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB,sBAAsB,sBAAsB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,yDAAyD,oBAAoB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,6DAA6D,oBAAoB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,gFAAgF,UAAU,GAAG,cAAc;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,oFAAoF,UAAU,GAAG,cAAc,WAAW,kBAAkB,GAAG,qBAAqB;AACpK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,UAAU,WAAW,aAAa,GAAG,gBAAgB;AACtJ;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,EAAE,qBAAqB;AACrD;AACA;AACA,8BAA8B,EAAE,wBAAwB;AACxD;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,oEAAoE,GAAG,wBAAwB;AACxL;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,8BAA8B;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,+BAA+B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,oBAAoB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wCAAwC;AAC5D;AACA,8BAA8B,wCAAwC;AACtE,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,8DAA8D;AAClF,8BAA8B,8DAA8D;AAC5F,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,IAAI,EAAE;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU,IAAI;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3qCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gCAAgC,GAAG,qBAAqB,GAAG,uBAAuB,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,iBAAiB;AACxK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gBAAgB,iBAAiB,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gBAAgB,iBAAiB,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB,mBAAmB,mBAAmB;AACzD,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1Ga;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,gBAAgB;AAChB,cAAc;AACd,eAAe;AACf,gBAAgB;AAChB;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;;;;;;;;;;AC9BA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,KAAK,OAAO,KAAK;AAClC,sBAAsB,KAAK,OAAO,KAAK;AACvC;AACA;;AAEA;AACA;AACA,oBAAoB,MAAM;AAC1B,uBAAuB,QAAQ,OAAO,OAAO;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,wDAAwD;;AAE7E;AACA;AACA,MAAM,4DAA4D;AAClE;AACA,MAAM,4DAA4D;;AAElE;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sDAAsD,sBAAsB;AAC5E;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,sCAAsC;AACxD;AACA;AACA,0BAA0B,4CAA4C;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,+DAA+D;AACrE;AACA,MAAM,2DAA2D;AACjE;AACA,MAAM,2DAA2D;;AAEjE;AACA;AACA;AACA;AACA,wBAAwB,uEAAuE;AAC/F,wBAAwB,uEAAuE;;AAE/F;AACA;AACA;AACA;;AAEA,qBAAqB,gEAAgE;AACrF,mBAAmB,mEAAmE;AACtF;;AAEA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,iFAAiF,IAAI,kBAAkB,IAAI;AAC3G;AACA,oEAAoE,OAAO,sBAAsB,EAAE;AACnG;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,OAAO;AACxB,gBAAgB,OAAO;AACvB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,gBAAgB,+CAA+C;AAC/D,sCAAsC;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,2EAA2E,MAAM;AACjF;AACA;AACA;;AAEA,8EAA8E,IAAI,OAAO,MAAM;AAC/F,6DAA6D,MAAM;AACnE,6DAA6D,MAAM;;AAEnE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5mBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,eAAe,gBAAgB,gBAAgB;AAChD;;;;;;;;;;;ACVa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,gBAAgB,mBAAO,CAAC,6DAAS;AACjC,mCAAmC,MAAM;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B,wBAAwB,yBAAyB;AACjD,CAAC;AACD;AACA,wGAAwG,0CAA0C;AAClJ,MAAM,0BAA0B;AAChC;AACA,gCAAgC,MAAM;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B;AAC5B;;;;;;;;;;;AC1Ha;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,eAAe;AACf,sCAAsC,mBAAO,CAAC,qHAA6B;AAC3E,gBAAgB,mBAAO,CAAC,6DAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,qCAAqC,IAAI;AACzC;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;;;AC5Ea;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6BAA6B;AAC7B,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC7Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB,GAAG,oBAAoB;AAChD,gBAAgB,mBAAO,CAAC,2DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,mBAAmB,oBAAoB,oBAAoB;AAC5D;AACA;AACA;AACA,iFAAiF,IAAI;AACrF,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;AChDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACxDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,eAAe,mBAAO,CAAC,yDAAY;AACnC,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC,qBAAqB,mBAAO,CAAC,iFAAwB;AACrD;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,WAAW;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,WAAW;AAChD;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,uDAAuD,WAAW,KAAK,UAAU,uCAAuC,kBAAkB;AAC1I;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC/Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mCAAmC;AACnC,eAAe,mBAAO,CAAC,yDAAY;AACnC,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC,qBAAqB,mBAAO,CAAC,iFAAwB;AACrD;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,WAAW;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,WAAW;AAChD;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,uDAAuD,WAAW,KAAK,UAAU,uCAAuC,kBAAkB;AAC1I;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC/Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC,qBAAqB,mBAAO,CAAC,iFAAwB;AACrD,gBAAgB,mBAAO,CAAC,+DAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,kBAAkB;AAC7F;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,8FAA8F,SAAS;AACvG;AACA,2EAA2E,kBAAkB;AAC7F;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC5Ha;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC,qBAAqB,mBAAO,CAAC,iFAAwB;AACrD,gBAAgB,mBAAO,CAAC,+DAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,kBAAkB;AACnH;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,8FAA8F,SAAS;AACvG;AACA,iGAAiG,kBAAkB;AACnH;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC7Ga;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,4CAA4C,WAAW;AACvD,+DAA+D,SAAS;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC3Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC3Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC;AACpC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACjEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC7Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACnDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB,wBAAwB;AACxB,wBAAwB;AACxB,0BAA0B;AAC1B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,+DAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA,gEAAgE,MAAM;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB,0BAA0B,uBAAuB;AAC7E,YAAY,aAAa;AACzB,kDAAkD,eAAe;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB,GAAG,eAAe;AACpE;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B,YAAY,aAAa;AACzB,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA,YAAY,gBAAgB;AAC5B,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA,gEAAgE,eAAe;AAC/E;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,0CAA0C,yBAAyB;AACnE;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,IAAI,IAAI,MAAM;AAChD;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA,eAAe,OAAO,IAAI,WAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,MAAM;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5Ma;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,gFAAS;AACjC,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB,qBAAqB,iBAAiB;AAC3F;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5Fa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACl0Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0CAA0C;AAC1C,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,eAAe,mBAAO,CAAC,yDAAY;AACnC,gCAAgC,mBAAO,CAAC,sIAAyB;AACjE,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,WAAW,8BAA8B,gBAAgB;AAClI;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iHAAiH;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,WAAW,8BAA8B,aAAa;AACnI;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yHAAyH;AACzH;AACA;AACA;AACA;AACA,kHAAkH,WAAW,8BAA8B,aAAa;AACxK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oHAAoH;AACpH;AACA;AACA;AACA;AACA;AACA;AACA,0HAA0H;AAC1H;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC/Ja;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC;AACvC,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,eAAe,mBAAO,CAAC,yDAAY;AACnC,gCAAgC,mBAAO,CAAC,+KAAkE;AAC1G,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,YAAY;AAC9E;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACvDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,6BAA6B;AAC7B;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC9Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC;AACpC,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,oBAAoB,mBAAO,CAAC,yFAA4B;AACxD,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACtCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC;AACvC,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,oBAAoB,mBAAO,CAAC,yFAA4B;AACxD,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC3Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC3Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS,aAAa,wBAAwB,MAAM;AAC3G;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS,aAAa,wBAAwB,MAAM;AAC3G;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,iCAAiC,EAAE,eAAe;AAClG;AACA;AACA,yBAAyB;AACzB;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC7Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB,GAAG,iBAAiB;AACvC,gBAAgB,mBAAO,CAAC,wDAAU;AAClC,+BAA+B,mBAAO,CAAC,kGAAwB;AAC/D,wBAAwB,mBAAO,CAAC,oFAAiB;AACjD,mCAAmC,mBAAO,CAAC,0GAA4B;AACvE,0CAA0C,mBAAO,CAAC,wHAAmC;AACrF,yBAAyB,mBAAO,CAAC,sFAAkB;AACnD,gCAAgC,mBAAO,CAAC,oGAAyB;AACjE,yBAAyB,mBAAO,CAAC,sFAAkB;AACnD,yBAAyB,mBAAO,CAAC,sFAAkB;AACnD,0CAA0C,mBAAO,CAAC,wHAAmC;AACrF,4BAA4B,mBAAO,CAAC,4FAAqB;AACzD,8BAA8B,mBAAO,CAAC,gGAAuB;AAC7D,4BAA4B,mBAAO,CAAC,4FAAqB;AACzD,kDAAkD,mBAAO,CAAC,wIAA2C;AACrG,8CAA8C,mBAAO,CAAC,gIAAuC;AAC7F,yBAAyB,mBAAO,CAAC,sFAAkB;AACnD,6CAA6C,mBAAO,CAAC,8HAAsC;AAC3F,0CAA0C,mBAAO,CAAC,wHAAmC;AACrF,8BAA8B,mBAAO,CAAC,gGAAuB;AAC7D,2BAA2B,mBAAO,CAAC,0FAAoB;AACvD,+BAA+B,mBAAO,CAAC,kGAAwB;AAC/D,6BAA6B,mBAAO,CAAC,8FAAsB;AAC3D,4BAA4B,mBAAO,CAAC,4FAAqB;AACzD,+BAA+B,mBAAO,CAAC,kGAAwB;AAC/D,mCAAmC,mBAAO,CAAC,0GAA4B;AACvE,gCAAgC,mBAAO,CAAC,oGAAyB;AACjE,wBAAwB,mBAAO,CAAC,oFAAiB;AACjD,wCAAwC,mBAAO,CAAC,oHAAiC;AACjF,2CAA2C,mBAAO,CAAC,0HAAoC;AACvF,2BAA2B,mBAAO,CAAC,0FAAoB;AACvD,2BAA2B,mBAAO,CAAC,0FAAoB;AACvD,0BAA0B,mBAAO,CAAC,wFAAmB;AACrD,iCAAiC,mBAAO,CAAC,sGAA0B;AACnE,qCAAqC,mBAAO,CAAC,8GAA8B;AAC3E,uCAAuC,mBAAO,CAAC,kHAAgC;AAC/E,uBAAuB,mBAAO,CAAC,kFAAgB;AAC/C,uCAAuC,mBAAO,CAAC,kHAAgC;AAC/E,mCAAmC,mBAAO,CAAC,0GAA4B;AACvE,gDAAgD,mBAAO,CAAC,oIAAyC;AACjG,iCAAiC,mBAAO,CAAC,sGAA0B;AACnE,gCAAgC,mBAAO,CAAC,oGAAyB;AACjE,2BAA2B,mBAAO,CAAC,0FAAoB;AACvD,iCAAiC,mBAAO,CAAC,sGAA0B;AACnE,iCAAiC,mBAAO,CAAC,sGAA0B;AACnE,yBAAyB,mBAAO,CAAC,sFAAkB;AACnD,6CAA6C,mBAAO,CAAC,8HAAsC;AAC3F,gDAAgD,mBAAO,CAAC,oIAAyC;AACjG,wBAAwB,mBAAO,CAAC,oFAAiB;AACjD,8BAA8B,mBAAO,CAAC,gGAAuB;AAC7D,2BAA2B,mBAAO,CAAC,0FAAoB;AACvD,sCAAsC,mBAAO,CAAC,gHAA+B;AAC7E,2CAA2C,mBAAO,CAAC,0HAAoC;AACvF,6BAA6B,mBAAO,CAAC,8FAAsB;AAC3D,iCAAiC,mBAAO,CAAC,sGAA0B;AACnE,qBAAqB,mBAAO,CAAC,8EAAc;AAC3C,gCAAgC,mBAAO,CAAC,oGAAyB;AACjE,6BAA6B,mBAAO,CAAC,8FAAsB;AAC3D,8CAA8C,mBAAO,CAAC,gIAAuC;AAC7F,uBAAuB,mBAAO,CAAC,kFAAgB;AAC/C,4BAA4B,mBAAO,CAAC,4FAAqB;AACzD,6BAA6B,mBAAO,CAAC,8FAAsB;AAC3D,kCAAkC,mBAAO,CAAC,wGAA2B;AACrE,2BAA2B,mBAAO,CAAC,0FAAoB;AACvD,wBAAwB,mBAAO,CAAC,oFAAiB;AACjD,mCAAmC,mBAAO,CAAC,0GAA4B;AACvE,6BAA6B,mBAAO,CAAC,8FAAsB;AAC3D,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;ACrJa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,8BAA8B,mBAAO,CAAC,6GAAuB;AAC7D,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,MAAM;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC/Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB,oBAAoB;AACpB,eAAe,mBAAO,CAAC,yDAAY;AACnC,qBAAqB,mBAAO,CAAC,iFAAwB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,gCAAgC,UAAU;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,UAAU;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,UAAU,uBAAuB,SAAS,GAAG,aAAa;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACvFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,gBAAgB,mBAAO,CAAC,uEAAmB;AAC3C,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA;AACA,KAAK;AACL;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3Fa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B,yBAAyB,mBAAO,CAAC,6EAAsB;AACvD,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,aAAa;AACjD;AACA;AACA;AACA,iDAAiD;AACjD,kDAAkD;AAClD;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;AChEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC;AACvC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,8FAAS;AACjC,gBAAgB,mBAAO,CAAC,kEAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;ACtBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC;AACpC,gBAAgB,mBAAO,CAAC,8FAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,+BAA+B,IAAI,cAAc;AACrE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,iBAAiB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2CAA2C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,UAAU;AAC1F;AACA;AACA;AACA;AACA;AACA,gFAAgF,UAAU;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,cAAc,uBAAuB,QAAQ;AACnH;AACA;AACA;AACA;AACA;AACA,sEAAsE,cAAc,uBAAuB,QAAQ;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,OAAO;AACzE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxIa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mDAAmD;AACnD,gBAAgB,mBAAO,CAAC,8FAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;;;;;;;;;;ACzBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B;AAC9B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,8FAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,GAAG,SAAS,OAAO;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uBAAuB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;AC3Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,+BAA+B;AAC/B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,8FAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,gCAAgC,UAAU,WAAW,6BAA6B,eAAe;AACzH;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;;;;;;;;;;;AClEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kCAAkC;AAClC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,8FAAS;AACjC,gBAAgB,mBAAO,CAAC,kEAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,WAAW,oFAAoF,4BAA4B;AAC1L;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kCAAkC;AAClC,8BAA8B;AAC9B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,8FAAS;AACjC,gBAAgB,mBAAO,CAAC,kEAAa;AACrC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,0BAA0B;AACpD;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA,oCAAoC,aAAa,IAAI,WAAW;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;ACrDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,+BAA+B;AAC/B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,8FAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,GAAG;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;AACvD;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;AACvD;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;;;;;;;;;;;ACtEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kCAAkC;AAClC,gBAAgB,mBAAO,CAAC,8FAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uBAAuB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;ACrEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B;AAC9B,yBAAyB;AACzB,4BAA4B;AAC5B,qBAAqB;AACrB,iDAAiD;AACjD,4BAA4B;AAC5B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,6BAA6B,KAAK,GAAG,OAAO,6BAA6B;AAC9G,kCAAkC;AAClC;AACA,0BAA0B,qBAAqB,GAAG,qBAAqB;AACvE;AACA,0BAA0B,cAAc,GAAG,mBAAmB,GAAG,cAAc;AAC/E;AACA,qCAAqC,cAAc;AACnD,+CAA+C,cAAc,GAAG,mBAAmB,GAAG,eAAe,GAAG,cAAc;AACtH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6BAA6B;AAC7B,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC,+BAA+B,mBAAO,CAAC,mIAA+B;AACtE,oCAAoC,mBAAO,CAAC,6IAAoC;AAChF,2BAA2B,mBAAO,CAAC,2HAA2B;AAC9D,iCAAiC,mBAAO,CAAC,uIAAiC;AAC1E,2BAA2B,mBAAO,CAAC,2HAA2B;AAC9D,+BAA+B,mBAAO,CAAC,mIAA+B;AACtE,4CAA4C,mBAAO,CAAC,6JAA4C;AAChG,4BAA4B,mBAAO,CAAC,6HAA4B;AAChE,4BAA4B,mBAAO,CAAC,6HAA4B;AAChE,gBAAgB,mBAAO,CAAC,+DAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,UAAU;AAClE;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACnIa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;AACrC;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,MAAM;AACxC;AACA;AACA,6DAA6D,QAAQ;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,IAAI,GAAG,KAAK;AAC1E,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,KAAK;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,yBAAyB;AACzB;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,KAAK;AAC9D;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AClJa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,qBAAqB,mBAAO,CAAC,iFAAwB;AACrD,gBAAgB,mBAAO,CAAC,+DAAU;AAClC,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,iBAAiB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;AACnD;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACvDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kCAAkC;AAClC,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,oBAAoB,mBAAO,CAAC,yFAA4B;AACxD,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG,UAAU;AACnH;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACnCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qCAAqC;AACrC,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,oBAAoB,mBAAO,CAAC,yFAA4B;AACxD,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,2GAA2G,YAAY;AACvH;AACA;AACA;AACA,uGAAuG,QAAQ,mIAAmI;AAClP;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACpCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,oBAAoB,mBAAO,CAAC,oFAAW;AACvC,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,qBAAqB,mBAAO,CAAC,iFAAwB;AACrD;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,0DAA0D,UAAU;AACpE;AACA;AACA;AACA;AACA,6BAA6B,aAAa;AAC1C;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,cAAc;AAC/D;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,aAAa;AAC9D;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC3Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACzCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC,eAAe,mBAAO,CAAC,yDAAY;AACnC;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oHAAoH,SAAS,MAAM,QAAQ;AAC3I;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,6HAA6H,SAAS,MAAM,SAAS,mBAAmB,gBAAgB;AACxL,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACxFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC,sBAAsB,mBAAO,CAAC,iGAAe;AAC7C,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AChFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B,GAAG,8BAA8B;AAC5D,gBAAgB,mBAAO,CAAC,iEAAa;AACrC,uEAAuE,MAAM;AAC7E;AACA;AACA;AACA;AACA;AACA,wBAAwB,EAAE,cAAc;AACxC,wGAAwG,IAAI,IAAI,KAAK;AACrH,KAAK;AACL,CAAC;AACD,8BAA8B;AAC9B;AACA;AACA;AACA,8DAA8D,KAAK;AACnE,KAAK;AACL,CAAC;AACD,2BAA2B;AAC3B;;;;;;;;;;;ACtBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC5La;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iCAAiC;AACjC,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC,iCAAiC;AACjC;AACA;AACA;AACA;AACA,yDAAyD,sBAAsB,OAAO,sBAAsB;AAC5G;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iEAAiE,EAAE,kBAAkB;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,EAAE,kBAAkB;AAC7G;AACA,yBAAyB;AACzB;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACjEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6BAA6B;AAC7B,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C,sBAAsB,mBAAO,CAAC,iFAAwB;AACtD,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC7Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,+BAA+B;AAC/B,eAAe,mBAAO,CAAC,yDAAY;AACnC,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,SAAS;AACzF;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,2FAA2F,SAAS;AACpG;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF,SAAS;AAC7F;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0HAA0H;AAC1H;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC3Ga;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iCAAiC;AACjC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,eAAe,mBAAO,CAAC,yDAAY;AACnC,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,iBAAiB,mBAAO,CAAC,yEAAoB;AAC7C,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,UAAU;AAC3D;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,+CAA+C,oCAAoC;AACnF;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,4BAA4B,mBAAmB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA,iCAAiC;AACjC;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC7Ga;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yCAAyC;AACzC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,yCAAyC;AACzC;AACA;AACA;AACA;AACA,8DAA8D,gBAAgB,KAAK,gBAAgB;AACnG;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,YAAY,WAAW,SAAS,QAAQ,IAAI,WAAW,GAAG,kCAAkC,SAAS;AAChJ;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACzCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,eAAe,mBAAO,CAAC,yDAAY;AACnC,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,MAAM;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,iJAAiJ;AACjJ;AACA;AACA,iCAAiC,sCAAsC;AACvE;AACA;AACA;AACA;AACA;AACA,sCAAsC,eAAe,+CAA+C,cAAc;AAClH;AACA,2CAA2C,yCAAyC;AACpF;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACxFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iHAAiH,WAAW,QAAQ,kBAAkB,GAAG,qBAAqB;AAC9K;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA,iHAAiH,WAAW,QAAQ,kBAAkB,GAAG,qBAAqB;AAC9K;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,+CAA+C;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gDAAgD,KAAK,mDAAmD;AACnI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,0DAA0D,EAAE,0CAA0C,4CAA4C,IAAI;AAC5K;AACA,uBAAuB,iDAAiD,IAAI,+CAA+C;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7Pa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC,oBAAoB,mBAAO,CAAC,yFAA4B;AACxD,gBAAgB,mBAAO,CAAC,+DAAU;AAClC,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,oBAAoB;AACpB,wBAAwB;AACxB,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,oBAAoB;AACpB,wBAAwB;AACxB,wBAAwB;AACxB,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,cAAc;AAClE;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,4CAA4C,cAAc;AAC1D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrOa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,UAAU;AACzD;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACpCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,GAAG;AAC5E;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACpEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,iBAAiB,mBAAO,CAAC,yEAAoB;AAC7C,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,4CAA4C,GAAG;AAC/C;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACvDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB;AACA,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,UAAU;AAC9D;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACrCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC;AACvC,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,oBAAoB,mBAAO,CAAC,yFAA4B;AACxD,sBAAsB,mBAAO,CAAC,iFAAwB;AACtD,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG,UAAU;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC1Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0CAA0C;AAC1C,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,oBAAoB,mBAAO,CAAC,yFAA4B;AACxD,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,YAAY,+BAA+B,YAAY;AACzG;AACA;AACA;AACA;AACA,gDAAgD,YAAY;AAC5D;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2GAA2G,YAAY;AACvH;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC1Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iFAAwB;AAChD,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,WAAW;AACjD;AACA;AACA;AACA;AACA,6DAA6D,WAAW;AACxE;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC5Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,sDAAsD,SAAS;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,SAAS;AACrF;AACA,iCAAiC;AACjC;AACA,yBAAyB;AACzB;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5Ea;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,+DAAU;AAClC,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA;AACA,yEAAyE,SAAS;AAClF;AACA,iCAAiC;AACjC;AACA,yBAAyB;AACzB;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACtDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB,sBAAsB;AACtB,iBAAiB;AACjB,cAAc;AACd,uBAAuB;AACvB,6BAA6B;AAC7B,qBAAqB;AACrB,2BAA2B;AAC3B,sBAAsB;AACtB,4BAA4B;AAC5B,uBAAuB;AACvB,iDAAiD;AACjD,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,KAAK;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB,eAAe,mBAAO,CAAC,yDAAY;AACnC,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,kBAAkB;AAC1C,wBAAwB,qFAAqF;AAC7G;AACA;AACA;AACA,oEAAoE,YAAY;AAChF;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,8DAA8D,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA,gFAAgF,UAAU,aAAa,QAAQ;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,kEAAkE,YAAY;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,+BAA+B,UAAU;AACzC,+BAA+B,UAAU;AACzC;AACA;AACA,kCAAkC,KAAK;AACvC;AACA;;;;;;;;;;;AClGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC;AACpC,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,oBAAoB,mBAAO,CAAC,yFAA4B;AACxD,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG,UAAU;AACnH;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AClCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gCAAgC;AAChC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,sBAAsB,mBAAO,CAAC,iFAAwB;AACtD,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,yBAAyB,cAAc,qBAAqB;AACnG;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,mCAAmC,yBAAyB,mBAAmB,SAAS;AACxF;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACjFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iFAAwB;AAChD,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,qBAAqB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ,KAAK,OAAO,UAAU,SAAS;AAClF,sCAAsC,cAAc;AACpD,6BAA6B;AAC7B,yBAAyB;AACzB;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC5Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,MAAM;AAC1C;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC7Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACnCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,eAAe,mBAAO,CAAC,yDAAY;AACnC,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C,4BAA4B,mBAAO,CAAC,yGAAqB;AACzD,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2FAA2F;AACnH;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACjEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,qBAAqB;AACrB,eAAe,mBAAO,CAAC,yDAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+CAA+C;AACvF;AACA;AACA,uCAAuC,+CAA+C;AACtF;AACA;AACA,uCAAuC,+CAA+C;AACtF;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACzEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC;AACvC,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,iFAAwB;AAChD,oBAAoB,mBAAO,CAAC,yFAA4B;AACxD,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,iBAAiB,cAAc,uBAAuB,QAAQ,kBAAkB;AACpJ;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2GAA2G,YAAY;AACvH;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACjEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,eAAe,mBAAO,CAAC,yDAAY;AACnC,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,gBAAgB,mBAAO,CAAC,iEAAa;AACrC;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,KAAK,+CAA+C,cAAc;AAC3G;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,qDAAqD,YAAY,kBAAkB,cAAc;AACjG;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,iDAAiD,KAAK;AACtD;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACzEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,mBAAmB;AACnB;AACA;AACA,wCAAwC,YAAY;AACpD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACvCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,eAAe,mBAAO,CAAC,yDAAY;AACnC,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C,gBAAgB,mBAAO,CAAC,iEAAa;AACrC,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA,wBAAwB,0CAA0C;AAClE;AACA;AACA,oCAAoC,gCAAgC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,sCAAsC,uBAAuB;AAC7D;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB,8BAA8B,eAAe;AAC7F,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7Fa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,qBAAqB,mBAAO,CAAC,iFAAwB;AACrD,iBAAiB,mBAAO,CAAC,yEAAoB;AAC7C,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,+CAA+C,UAAU;AACzD;AACA;AACA;AACA,4CAA4C,UAAU;AACtD;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACrDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC,GAAG,sBAAsB;AAC7D,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,eAAe,mBAAO,CAAC,yDAAY;AACnC,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C,gBAAgB,mBAAO,CAAC,iEAAa;AACrC,2BAA2B,mBAAO,CAAC,qGAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,cAAc;AACd;AACA;AACA,sBAAsB;AACtB,YAAY,kDAAkD;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA,qCAAqC;AACrC;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA,oCAAoC;AACpC,YAAY,4CAA4C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AClJa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,iCAAiC;AAC1G,sCAAsC;AACtC,sBAAsB;AACtB,yBAAyB;AACzB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,iCAAiC,MAAM,OAAO;AAC9C,sBAAsB,KAAK;AAC3B,sBAAsB,QAAQ,UAAU;AACxC,oBAAoB,MAAM;AAC1B;AACA;AACA,yBAAyB,YAAY;AACrC;AACA,8BAA8B,qBAAqB,UAAU;AAC7D;AACA;AACA,iCAAiC,eAAe;AAChD;AACA;AACA;AACA,iFAAiF,eAAe;AAChG;AACA;AACA;AACA,kCAAkC,uBAAuB,EAAE,oBAAoB,EAAE,uBAAuB;AACxG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,QAAQ;AAC5E;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,yBAAyB;AAClE;AACA;AACA;AACA,6CAA6C,yBAAyB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,yBAAyB;AAC1D;AACA;AACA;AACA;AACA,oEAAoE,uBAAuB;AAC3F;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5Ha;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,iBAAiB,mBAAO,CAAC,sDAAQ;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,iBAAiB;AAC3D;AACA;AACA;AACA;AACA,qDAAqD,iBAAiB,QAAQ,2BAA2B;AACzG;AACA,oCAAoC,yBAAyB;AAC7D;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC5Fa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mCAAmC,GAAG,oCAAoC,GAAG,wCAAwC,GAAG,kCAAkC,GAAG,kCAAkC,GAAG,4BAA4B,GAAG,yCAAyC,GAAG,mCAAmC,GAAG,oBAAoB,GAAG,sBAAsB;AAChW,8BAA8B;AAC9B,mBAAmB;AACnB,qBAAqB,mBAAO,CAAC,qEAAY;AACzC,6BAA6B,mBAAO,CAAC,iFAAsB;AAC3D,eAAe,mBAAO,CAAC,qDAAQ;AAC/B,eAAe,mBAAO,CAAC,qDAAQ;AAC/B,gBAAgB,mBAAO,CAAC,uDAAS;AACjC,gBAAgB,mBAAO,CAAC,6DAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,mCAAmC;AACnC,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;;;;;;;;;;;ACzLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kCAAkC;AAClC,4BAA4B;AAC5B,gBAAgB,mBAAO,CAAC,wDAAU;AAClC,kBAAkB,mBAAO,CAAC,4DAAY;AACtC,gBAAgB,mBAAO,CAAC,8DAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,yBAAyB;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gBAAgB,YAAY;AAC5B,mBAAmB,MAAM;AACzB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,UAAU;AACV,QAAQ;AACR,YAAY;AACZ,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChJa;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB,0BAA0B,mBAAO,CAAC,qDAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;;;;;;;;;;;ACrFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB,gBAAgB,mBAAO,CAAC,6DAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe;AACf,qBAAqB,mBAAO,CAAC,6EAAc;AAC3C,gBAAgB,mBAAO,CAAC,6DAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB,GAAG,qBAAqB;AAC/C,uBAAuB;AACvB,gBAAgB,mBAAO,CAAC,2DAAa;AACrC,yBAAyB,mBAAO,CAAC,0FAAkB;AACnD,iDAAgD,EAAE,qCAAqC,0CAA0C,EAAC;AAClI,2BAA2B,mBAAO,CAAC,8FAAoB;AACvD,mDAAkD,EAAE,qCAAqC,8CAA8C,EAAC;AACxI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,EAAE;AACvD;AACA;;;;;;;;;;;ACzBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,iBAAiB,mBAAO,CAAC,sDAAQ;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,qBAAqB;AACrB;;;;;;;;;;;ACrFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,uBAAuB;AACvB;;;;;;;;;;;AC7Ea;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB,GAAG,eAAe,GAAG,uBAAuB,GAAG,qBAAqB,GAAG,uBAAuB,GAAG,oBAAoB;AAC7I,cAAc,mBAAO,CAAC,6DAAS;AAC/B,gDAA+C,EAAE,qCAAqC,gCAAgC,EAAC;AACvH,mBAAmB,mBAAO,CAAC,6EAAc;AACzC,mDAAkD,EAAE,qCAAqC,wCAAwC,EAAC;AAClI,iDAAgD,EAAE,qCAAqC,sCAAsC,EAAC;AAC9H,mDAAkD,EAAE,qCAAqC,wCAAwC,EAAC;AAClI,gBAAgB,mBAAO,CAAC,iEAAW;AACnC,2CAA0C,EAAE,qCAAqC,6BAA6B,EAAC;AAC/G,4BAA4B,mBAAO,CAAC,yFAAuB;AAC3D,oDAAmD,EAAE,qCAAqC,kDAAkD,EAAC;AAC7I;;;;;;;;;;;ACba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACRa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,oBAAoB,mBAAO,CAAC,oFAAW;AACvC;AACA;AACA;AACA,uEAAuE,QAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpBa;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB,GAAG,YAAY;AACnC,aAAa;AACb,+BAA+B,mBAAO,CAAC,qFAAwB;AAC/D,wBAAwB,mBAAO,CAAC,uEAAiB;AACjD,wBAAwB,mBAAO,CAAC,uEAAiB;AACjD,0BAA0B,mBAAO,CAAC,iFAAmB;AACrD,iBAAiB,mBAAO,CAAC,yDAAU;AACnC,0BAA0B,mBAAO,CAAC,qDAAQ;AAC1C,gBAAgB,mBAAO,CAAC,uDAAS;AACjC,gBAAgB,mBAAO,CAAC,6DAAS;AACjC,mBAAmB,mBAAO,CAAC,mEAAY;AACvC,aAAa,mBAAO,CAAC,iFAAsB;AAC3C,aAAa,mBAAO,CAAC,qFAAwB;AAC7C,aAAa,mBAAO,CAAC,+DAAU;AAC/B,aAAa,mBAAO,CAAC,uEAAiB;AACtC,aAAa,mBAAO,CAAC,+DAAa;AAClC,aAAa,mBAAO,CAAC,6DAAS;AAC9B,aAAa,mBAAO,CAAC,yDAAU;AAC/B,aAAa,mBAAO,CAAC,qDAAQ;AAC7B,aAAa,mBAAO,CAAC,uEAAiB;AACtC,YAAY,gBAAgB,mBAAO,CAAC,qDAAQ;AAC5C,aAAa,mBAAO,CAAC,+DAAa;AAClC,aAAa,mBAAO,CAAC,yEAAkB;AACvC,aAAa,mBAAO,CAAC,uDAAS;AAC9B,aAAa,mBAAO,CAAC,mEAAe;AACpC,aAAa,mBAAO,CAAC,uEAAiB;AACtC,aAAa,mBAAO,CAAC,iEAAc;AACnC,aAAa,mBAAO,CAAC,mEAAe;AACpC,aAAa,mBAAO,CAAC,qEAAgB;AACrC,aAAa,mBAAO,CAAC,2DAAW;AAChC,aAAa,mBAAO,CAAC,qFAAwB;AAC7C,kBAAkB,mBAAO,CAAC,qFAAwB;AAClD,gDAA+C,EAAE,qCAAqC,oCAAoC,EAAC;AAC3H,aAAa,mBAAO,CAAC,6EAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oCAAoC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpMa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,kBAAkB;AAClB,mBAAmB;AACnB,iBAAiB;AACjB,uBAAuB,mBAAO,CAAC,wEAAc;AAC7C,gBAAgB,mBAAO,CAAC,6DAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,GAAG,wBAAwB;AAC3C,kBAAkB;AAClB,gBAAgB,mBAAO,CAAC,8DAAU;AAClC,uBAAuB,mBAAO,CAAC,wEAAc;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gBAAgB;AAChB,gCAAgC,QAAQ;AACxC;;;;;;;;;;;ACrGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D;;;;;;;;;;;ACFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B;AAC9B,8BAA8B;AAC9B,gCAAgC;AAChC,8BAA8B;AAC9B,4BAA4B;AAC5B,uCAAuC;AACvC,oBAAoB;AACpB,sBAAsB;AACtB,0BAA0B;AAC1B,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,kEAAS;AACjC,gBAAgB,mBAAO,CAAC,sEAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,KAAK;AAC1E;AACA;AACA,2DAA2D,KAAK;AAChE;AACA;AACA;AACA,0CAA0C,SAAS,GAAG,kBAAkB;AACxE;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,KAAK;AAC1E;AACA;AACA,2DAA2D,KAAK;AAChE;AACA;AACA;AACA,mDAAmD,SAAS,GAAG,kBAAkB;AACjF;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,qEAAqE,KAAK;AAC1E;AACA;AACA,2DAA2D,KAAK;AAChE;AACA;AACA;AACA,4CAA4C,SAAS,GAAG,kBAAkB;AAC1E;AACA;AACA;AACA;AACA,2DAA2D,SAAS;AACpE;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS,cAAc,aAAa,QAAQ,WAAW;AAC3G;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,aAAa,QAAQ,aAAa;AACtF;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,SAAS,IAAI,8CAA8C;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4HAA4H,YAAY;AACxI;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/Na;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB,4BAA4B;AAC5B,kBAAkB,mBAAO,CAAC,4DAAY;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,iBAAiB;AACjB,YAAY,oCAAoC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,uCAAuC,YAAY;AACnD,qCAAqC,UAAU;AAC/C,iCAAiC,aAAa;AAC9C,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;AC9Fa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B,GAAG,uBAAuB;AACtD,8BAA8B;AAC9B,yBAAyB;AACzB,wBAAwB;AACxB,iCAAiC;AACjC,0BAA0B;AAC1B,sBAAsB;AACtB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,8DAAU;AAClC,oBAAoB,mBAAO,CAAC,gEAAc;AAC1C,oBAAoB,mBAAO,CAAC,gEAAc;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB,uBAAuB,uBAAuB;AACrE;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B,4BAA4B,4BAA4B;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtHa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa,GAAG,WAAW;AAC3B,gBAAgB;AAChB,YAAY;AACZ,eAAe;AACf,iBAAiB;AACjB,eAAe;AACf,gBAAgB;AAChB,cAAc;AACd,qBAAqB,mBAAO,CAAC,qEAAY;AACzC,uCAAsC,EAAE,qCAAqC,4BAA4B,EAAC;AAC1G,yCAAwC,EAAE,qCAAqC,8BAA8B,EAAC;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB,GAAG,sCAAsC,GAAG,sCAAsC;AAC1G,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,wBAAwB;AACxB;;;;;;;;;;;AC1Ba;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB,eAAe;AACf,iBAAiB;AACjB,iBAAiB;AACjB,qBAAqB;AACrB,uBAAuB;AACvB,qBAAqB;AACrB,uBAAuB;AACvB,wBAAwB;AACxB,iBAAiB;AACjB,yBAAyB;AACzB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,eAAe,mBAAO,CAAC,qDAAQ;AAC/B,0BAA0B,mBAAO,CAAC,qDAAQ;AAC1C,yBAAyB,mBAAO,CAAC,yEAAkB;AACnD,gBAAgB,mBAAO,CAAC,uDAAS;AACjC,kBAAkB,mBAAO,CAAC,2DAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvNa;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,iBAAiB;AACjB,oBAAoB;AACpB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,mEAAe;AACvC,0BAA0B,mBAAO,CAAC,qDAAQ;AAC1C,gBAAgB,mBAAO,CAAC,uDAAS;AACjC,gBAAgB,mBAAO,CAAC,mEAAe;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChFa;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB,GAAG,gBAAgB,GAAG,2BAA2B,GAAG,sBAAsB,GAAG,aAAa,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,sBAAsB,GAAG,mBAAmB,GAAG,oBAAoB;AAClO,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,uDAAsD,EAAE,qCAAqC,0CAA0C,EAAC;AACxI,aAAa,mBAAO,CAAC,mEAAe;AACpC,aAAa,mBAAO,CAAC,+FAA6B;AAClD,aAAa,mBAAO,CAAC,2FAA2B;AAChD,aAAa,mBAAO,CAAC,mFAAuB;AAC5C;AACA,oBAAoB;AACpB;AACA,mBAAmB;AACnB;AACA,sBAAsB;AACtB;AACA,mBAAmB;AACnB;AACA,qBAAqB;AACrB,aAAa;AACb;AACA;AACA;AACA;AACA,CAAC,qBAAqB,sBAAsB,sBAAsB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,eAAe,gBAAgB,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,mBAAmB,oBAAoB,oBAAoB;AAC5D;;;;;;;;;;;ACrDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,8BAA8B;AAC9D;AACA;AACA;AACA,gCAAgC,8BAA8B;AAC9D;AACA;AACA;AACA,gCAAgC,+BAA+B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,0CAA0C;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uCAAuC;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;;;;;;;;;;ACnFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe;AACf,gBAAgB,mBAAO,CAAC,yEAAW;AACnC,2CAA0C,EAAE,qCAAqC,6BAA6B,EAAC;AAC/G;;;;;;;;;;;ACLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D;;;;;;;;;;;ACFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D;;;;;;;;;;;ACFa;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,aAAa,mBAAO,CAAC,uEAAW;AAChC;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB,uBAAuB,uBAAuB;AACrE;;;;;;;;;;;ACxBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa;AACb,YAAY;AACZ,gBAAgB;AAChB,qBAAqB;AACrB,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,4BAA4B;AAC5B,6BAA6B;AAC7B,4BAA4B;AAC5B,qBAAqB;AACrB,kCAAkC;AAClC,eAAe,mBAAO,CAAC,sDAAS;AAChC,qBAAqB,mBAAO,CAAC,uEAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,iBAAiB,aAAa,QAAQ,eAAe,gBAAgB;AACjI;AACA,6CAA6C,iBAAiB,uBAAuB,gBAAgB;AACrG,qCAAqC,iBAAiB,uBAAuB,gBAAgB,+BAA+B,6BAA6B;AACzJ;AACA;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA,YAAY,uBAAuB;AACnC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,gCAAgC,UAAU;AAC1C;AACA;AACA;;;;;;;;;;;ACpLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe;AACf,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,+BAA+B;AAC/B,mBAAmB;AACnB,2CAA2C;AAC3C,0CAA0C;AAC1C,sBAAsB,mBAAO,CAAC,+EAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA,mDAAmD,gBAAgB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7Ca;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa,mBAAO,CAAC,+DAAU;AAC/B,aAAa,mBAAO,CAAC,6DAAS;AAC9B,aAAa,mBAAO,CAAC,mEAAY;AACjC,aAAa,mBAAO,CAAC,6DAAS;AAC9B,aAAa,mBAAO,CAAC,6DAAS;AAC9B,aAAa,mBAAO,CAAC,2DAAQ;AAC7B,aAAa,mBAAO,CAAC,iEAAW;AAChC,aAAa,mBAAO,CAAC,6DAAS;AAC9B;;;;;;;;;;;ACxBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACda;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACTa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe;AACf;AACA;AACA;AACA;;;;;;;;;;;ACNa;AACb;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,iBAAiB;AACjB,sCAAsC,mBAAO,CAAC,yEAAa;AAC3D;AACA,yDAAyD,WAAW;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,WAAW;AAC3D;AACA;;;;;;;;;;;ACnBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,EAAE;AACrF;AACA;;;;;;;;;;;ACtBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa;AACb,yBAAyB;AACzB,uBAAuB;AACvB,oBAAoB;AACpB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC,sDAAsD,eAAe;AACrE;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;;;;;;;;;ACrHa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,GAAG,mBAAmB;AACvC,eAAe,mBAAO,CAAC,kEAAU;AACjC,+CAA8C,EAAE,qCAAqC,gCAAgC,EAAC;AACtH,aAAa,mBAAO,CAAC,8DAAQ;AAC7B,6CAA4C,EAAE,qCAAqC,4BAA4B,EAAC;AAChH;;;;;;;;;;;ACPa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA,qCAAqC,gCAAgC;AACrE;AACA;AACA;AACA;AACA,6BAA6B,iCAAiC;AAC9D;AACA;AACA,0BAA0B,UAAU;AACpC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA,qCAAqC,gCAAgC;AACrE;AACA;AACA;AACA;AACA,6BAA6B,iCAAiC;AAC9D;AACA;AACA,0BAA0B,UAAU;AACpC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B,kCAAkC;AAClC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,qBAAqB,mBAAO,CAAC,0EAAY;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;;;;;;;;;;;ACjEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,uBAAuB,mBAAO,CAAC,+DAAiB;AAChD,gBAAgB,mBAAO,CAAC,uDAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,kBAAkB,mBAAO,CAAC,0DAAW;AACrC,iBAAiB,mBAAO,CAAC,wDAAU;AACnC,mBAAmB,mBAAO,CAAC,4DAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,yBAAyB;AACzB,2BAA2B;AAC3B,wBAAwB;AACxB,6BAA6B;AAC7B,sBAAsB;AACtB,wBAAwB;AACxB,uBAAuB;AACvB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,iDAAU;AAClC,gBAAgB,mBAAO,CAAC,uDAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,yDAAyD,IAAI;AAC7D;AACA;AACA;AACA;AACA,gFAAgF,UAAU;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,kFAAkF,YAAY;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,kFAAkF,iBAAiB;AACnG;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,kFAAkF,QAAQ;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,WAAW;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB,IAAI;AAC/D,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB,YAAY;AACZ,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,uDAAU;AAClC,iBAAiB,mBAAO,CAAC,wDAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,cAAc;AACd,cAAc;AACd,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB,IAAI,wBAAwB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,+BAA+B;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,aAAa;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,6BAA6B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,6BAA6B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,6BAA6B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,aAAa;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA,6CAA6C,+BAA+B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,aAAa;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,aAAa;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,aAAa;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,GAAG,IAAI;AACP;AACA,kBAAkB,qCAAqC;AACvD,kBAAkB,qCAAqC;AACvD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzca;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB,GAAG,oBAAoB,GAAG,sBAAsB,GAAG,uBAAuB,GAAG,kCAAkC,GAAG,0BAA0B,GAAG,2BAA2B,GAAG,uBAAuB;AAC3N,cAAc,mBAAO,CAAC,4DAAe;AACrC,mDAAkD,EAAE,qCAAqC,mCAAmC,EAAC;AAC7H,kBAAkB,mBAAO,CAAC,oEAAmB;AAC7C,uDAAsD,EAAE,qCAAqC,2CAA2C,EAAC;AACzI,2BAA2B,mBAAO,CAAC,0EAAsB;AACzD,sDAAqD,EAAE,qCAAqC,mDAAmD,EAAC;AAChJ,8DAA6D,EAAE,qCAAqC,2DAA2D,EAAC;AAChK,qBAAqB,mBAAO,CAAC,8DAAgB;AAC7C,mDAAkD,EAAE,qCAAqC,0CAA0C,EAAC;AACpI,kDAAiD,EAAE,qCAAqC,yCAAyC,EAAC;AAClI,gDAA+C,EAAE,qCAAqC,uCAAuC,EAAC;AAC9H,mDAAkD,EAAE,qCAAqC,0CAA0C,EAAC;AACpI,aAAa,mBAAO,CAAC,gDAAS;AAC9B;;;;;;;;;;;AC9Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,uBAAuB;AACvB,sBAAsB;AACtB,eAAe;AACf,oBAAoB;AACpB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,iEAAO;AAC/B,gBAAgB,mBAAO,CAAC,gDAAS;AACjC,gBAAgB,mBAAO,CAAC,sDAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,IAAI;AAC5D;AACA;AACA;;;;;;;;;;;AC3Ea;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wCAAwC;AACxC,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB,cAAc;AACd,mBAAmB;AACnB,kBAAkB;AAClB,gBAAgB;AAChB,eAAe;AACf,cAAc;AACd,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;AC/Ca;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,mBAAmB;AACnB,uCAAuC,mBAAO,CAAC,+FAAuC;AACtF,kBAAkB,mBAAO,CAAC,6FAA+B;AACzD,aAAa,mBAAO,CAAC,+FAAuC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,GAAG,eAAe,GAAG,kBAAkB;AACtD,6BAA6B;AAC7B,mBAAmB;AACnB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,mBAAmB,mBAAO,CAAC,6EAAY;AACvC,gBAAgB,mBAAO,CAAC,uEAAS;AACjC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF;AACrF;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS,SAAS,wBAAwB;AAC9F;AACA,8FAA8F;AAC9F;AACA,6EAA6E;AAC7E;AACA;AACA;AACA,0CAA0C,oCAAoC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA,0CAA0C,kCAAkC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,IAAI;AACjB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,IAAI;AACjB,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa,IAAI;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,4BAA4B;AACrD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,4DAA4D,SAAS,aAAa,UAAU;AAC5F;AACA;AACA;AACA;AACA,oCAAoC,kDAAkD;AACtF;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,YAAY;AACZ,qBAAqB,QAAQ;AAC7B,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,iBAAiB,iBAAiB,IAAI,iBAAiB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,2BAA2B;AACjD;AACA;AACA,sBAAsB,0BAA0B;AAChD;AACA;AACA;AACA;AACA,sBAAsB,0BAA0B;AAChD;AACA;AACA,sBAAsB,2BAA2B;AACjD;AACA,sBAAsB,wBAAwB;AAC9C;AACA,sBAAsB,8BAA8B;AACpD;AACA,sBAAsB,0CAA0C;AAChE;AACA,sBAAsB,yBAAyB;AAC/C;AACA,sBAAsB,0BAA0B;AAChD;AACA,sBAAsB,gCAAgC;AACtD;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA,sBAAsB,0BAA0B;AAChD;AACA,sBAAsB,yBAAyB;AAC/C;AACA,sBAAsB,0BAA0B;AAChD;AACA,sBAAsB,4BAA4B;AAClD;AACA,sBAAsB,0BAA0B;AAChD;AACA,sBAAsB,wBAAwB;AAC9C;AACA,sBAAsB,2BAA2B;AACjD;AACA,sBAAsB,uCAAuC;AAC7D;AACA,sBAAsB,0BAA0B;AAChD;AACA,sBAAsB,0BAA0B;AAChD;AACA,sBAAsB,0BAA0B;AAChD;AACA,sBAAsB,yBAAyB;AAC/C;AACA,sBAAsB,0BAA0B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS,KAAK,mBAAmB;AACnD;AACA,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF;AACnF;AACA;AACA,oDAAoD,sBAAsB;AAC1E;AACA,mDAAmD,KAAK;AACxD;AACA;AACA;AACA;AACA,wFAAwF;AACxF;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,2BAA2B;AACxF;AACA;AACA,6DAA6D,4CAA4C;AACzG;AACA;AACA,wDAAwD,KAAK;AAC7D;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT,CAAC;AACD;AACA;AACA;AACA;AACA,oCAAoC;AACpC,yBAAyB,gBAAgB;AACzC,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACv3Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;;;;;;;;;;;ACba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B,GAAG,uBAAuB;AACrD,oBAAoB,mBAAO,CAAC,2FAAa;AACzC,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;;;;;;;;;;;ACrBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB,GAAG,2BAA2B;AACrD,4BAA4B,mBAAO,CAAC,yGAAuB;AAC3D,uDAAsD,EAAE,qCAAqC,qDAAqD,EAAC;AACnJ,mDAAkD,EAAE,qCAAqC,iDAAiD,EAAC;AAC3I;;;;;;;;;;;ACNa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,mBAAmB,mBAAO,CAAC,iFAAgB;AAC3C,kCAAkC,mBAAO,CAAC,kHAA4B;AACtE,gBAAgB,mBAAO,CAAC,uFAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,mBAAmB,mBAAO,CAAC,iFAAgB;AAC3C,kCAAkC,mBAAO,CAAC,kHAA4B;AACtE,gBAAgB,mBAAO,CAAC,uFAAS;AACjC;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,yBAAyB;AAChE,qDAAqD,eAAe,WAAW,gBAAgB;AAC/F,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,oBAAoB,mBAAO,CAAC,qGAA0B;AACtD,kCAAkC,mBAAO,CAAC,kHAA4B;AACtE,gBAAgB,mBAAO,CAAC,uFAAS;AACjC;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,yBAAyB;AACpE,0GAA0G,mBAAmB;AAC7H,KAAK;AACL;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;;;;;;;;;;;ACxCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B,GAAG,sBAAsB,GAAG,mBAAmB;AACzE,oBAAoB,mBAAO,CAAC,mGAAe;AAC3C,+CAA8C,EAAE,qCAAqC,qCAAqC,EAAC;AAC3H,uBAAuB,mBAAO,CAAC,yGAAkB;AACjD,kDAAiD,EAAE,qCAAqC,2CAA2C,EAAC;AACpI,2BAA2B,mBAAO,CAAC,iHAAsB;AACzD,sDAAqD,EAAE,qCAAqC,mDAAmD,EAAC;AAChJ;;;;;;;;;;;ACTa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB,iBAAiB;AACjB,iBAAiB;AACjB,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;;;;;;;;;;;AC5Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;;;;;;;;;;;ACZa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B,GAAG,gBAAgB;AACjD,oBAAoB,mBAAO,CAAC,wFAAa;AACzC,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;;;;;;;;;;;AC9Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB,GAAG,gBAAgB,GAAG,8BAA8B;AAC3E,+BAA+B,mBAAO,CAAC,4GAA0B;AACjE,0DAAyD,EAAE,qCAAqC,2DAA2D,EAAC;AAC5J,4CAA2C,EAAE,qCAAqC,6CAA6C,EAAC;AAChI,kBAAkB,mBAAO,CAAC,wFAAa;AACvC,mDAAkD,EAAE,qCAAqC,uCAAuC,EAAC;AACjI;;;;;;;;;;;ACRa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B,uBAAuB;AACvB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,qCAAqC,mBAAO,CAAC,qHAA+B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B,mFAAmF,sDAAsD;AACzI;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,+BAA+B;AAC/B,8BAA8B;AAC9B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,qCAAqC,mBAAO,CAAC,qHAA+B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B,mFAAmF,sDAAsD;AACzI;AACA,wCAAwC,mBAAmB;AAC3D;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;ACzEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB,qCAAqC,mBAAO,CAAC,qHAA+B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;;;;;;;;;;;AC/Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB,GAAG,+BAA+B,GAAG,8BAA8B,GAAG,0BAA0B,GAAG,uBAAuB;AACnJ,2BAA2B,mBAAO,CAAC,8GAAsB;AACzD,mDAAkD,EAAE,qCAAqC,gDAAgD,EAAC;AAC1I,sDAAqD,EAAE,qCAAqC,mDAAmD,EAAC;AAChJ,gCAAgC,mBAAO,CAAC,wHAA2B;AACnE,0DAAyD,EAAE,qCAAqC,4DAA4D,EAAC;AAC7J,2DAA0D,EAAE,qCAAqC,6DAA6D,EAAC;AAC/J,0BAA0B,mBAAO,CAAC,4GAAqB;AACvD,qDAAoD,EAAE,qCAAqC,iDAAiD,EAAC;AAC7I;;;;;;;;;;;ACXa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,qBAAqB,mBAAO,CAAC,4EAAe;AAC5C,iBAAiB,mBAAO,CAAC,qFAAU;AACnC,oBAAoB,mBAAO,CAAC,2FAAa;AACzC;AACA,kBAAkB,8FAA8F,oJAAoJ,KAAK,gFAAgF,GAAG;AAC5V;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,IAAI;AAChE;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;;;;;;;;;;;ACrDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B,4BAA4B,mBAAO,CAAC,yGAAuB;AAC3D,uDAAsD,EAAE,qCAAqC,qDAAqD,EAAC;AACnJ;;;;;;;;;;;ACLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC;AACpC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,cAAc,mBAAO,CAAC,gFAAO;AAC7B;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,MAAM;AACN,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,MAAM;AACN,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,MAAM;AACN,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,aAAa;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA,2GAA2G,aAAa,WAAW;AACnI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,EAAE;AACnF;AACA;;;;;;;;;;;AC9Ya;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc;AACd,WAAW;AACX,cAAc;AACd;AACA;AACA;AACA,kEAAkE,KAAK;AACvE;AACA,2BAA2B,KAAK;AAChC;AACA;AACA;AACA,OAAO,MAAM;AACb,MAAM,OAAO;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,kBAAkB;AAClB,qBAAqB;AACrB;AACA;AACA;AACA;AACA,mCAAmC;AACnC,mCAAmC,aAAa;AAChD,mCAAmC,SAAS;AAC5C,mCAAmC,SAAS;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,6BAA6B;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,yCAAyC;AACzC;AACA,8CAA8C;AAC9C,0CAA0C;AAC1C;AACA;AACA;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA,uBAAuB;AACvB,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,6BAA6B;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9Oa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,GAAG,oCAAoC;AACrD,+BAA+B,mBAAO,CAAC,sHAA0B;AACjE,gEAA+D,EAAE,qCAAqC,iEAAiE,EAAC;AACxK,YAAY,mBAAO,CAAC,gFAAO;AAC3B,0CAAyC,EAAE,qCAAqC,wBAAwB,EAAC;AACzG;;;;;;;;;;;ACPa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6CAA6C;AAC7C,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,6CAA6C;AAC7C;;;;;;;;;;;ACnCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC;AACpC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC,oBAAoB,8BAA8B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6CAA6C;AAC7C,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,iBAAiB,mBAAO,CAAC,sFAAW;AACpC,+CAA+C,mBAAO,CAAC,+JAA6C;AACpG,oBAAoB,mBAAO,CAAC,yFAAuB;AACnD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,KAAK;AAC1D;AACA;AACA;AACA;AACA,gEAAgE,EAAE,OAAO;AACzE;AACA;AACA;AACA;AACA,8CAA8C,KAAK;AACnD;AACA;AACA;AACA;AACA,kBAAkB,yCAAyC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yCAAyC;AAC3D,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,6CAA6C;AAC7C;;;;;;;;;;;ACjIa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gCAAgC;AAChC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,qBAAqB,mBAAO,CAAC,+EAAkB;AAC/C,gBAAgB,mBAAO,CAAC,2EAAa;AACrC,iBAAiB,mBAAO,CAAC,sFAAW;AACpC,iBAAiB,mBAAO,CAAC,+FAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ,2FAA2F;AACxI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,2BAA2B,qBAAqB;AAChD,sEAAsE;AACtE;AACA;AACA;AACA;AACA,uBAAuB,MAAM;AAC7B;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,EAAE,OAAO;AAClF;AACA;AACA;AACA,wDAAwD,UAAU,MAAM,QAAQ;AAChF;AACA;AACA;AACA;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA,oBAAoB,uCAAuC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uCAAuC;AAC3D,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,EAAE,UAAU,GAAG,eAAe,EAAE;AAC7D;AACA;AACA,6BAA6B,UAAU;AACvC;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA,sDAAsD,eAAe,IAAI,eAAe;AACxF;AACA;;;;;;;;;;;ACzJa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8CAA8C;AAC9C,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,iBAAiB,mBAAO,CAAC,sFAAW;AACpC,iBAAiB,mBAAO,CAAC,+FAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,0BAA0B;AAChE,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,8BAA8B,KAAK;AACnC;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,EAAE,OAAO;AACzE;AACA;AACA;AACA;AACA,6CAA6C,KAAK,aAAa,KAAK;AACpE;AACA;AACA;AACA;AACA,oBAAoB,uCAAuC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uCAAuC;AAC3D,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;;;;;;;;;;ACtFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC;AACvC,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,iBAAiB,mBAAO,CAAC,6EAAc;AACvC,gBAAgB,mBAAO,CAAC,2EAAa;AACrC,iBAAiB,mBAAO,CAAC,sFAAW;AACpC,iBAAiB,mBAAO,CAAC,+FAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,sBAAsB,IAAI,EAAE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,IAAI,EAAE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,SAAS;AAC1G;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;ACpFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4CAA4C;AAC5C,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,iBAAiB,mBAAO,CAAC,6EAAc;AACvC,gBAAgB,mBAAO,CAAC,2EAAa;AACrC,iBAAiB,mBAAO,CAAC,sFAAW;AACpC,iBAAiB,mBAAO,CAAC,+FAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;ACpDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iCAAiC;AACjC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,iBAAiB,mBAAO,CAAC,6EAAc;AACvC,gBAAgB,mBAAO,CAAC,2EAAa;AACrC,iBAAiB,mBAAO,CAAC,sFAAW;AACpC,iBAAiB,mBAAO,CAAC,+FAAU;AACnC;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1Fa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4CAA4C;AAC5C,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,iCAAiC,gDAAgD;AACjF,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4CAA4C;AAC5C;;;;;;;;;;;ACvDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC;AACtC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,oBAAoB,mBAAO,CAAC,yFAAuB;AACnD,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,gCAAgC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sCAAsC;AACtC;;;;;;;;;;;AC9Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC;AACpC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,gBAAgB,mBAAO,CAAC,2EAAa;AACrC,iBAAiB,mBAAO,CAAC,sFAAW;AACpC,iBAAiB,mBAAO,CAAC,+FAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,MAAM;AAC7B;AACA;AACA,yCAAyC,iBAAiB;AAC1D;AACA,6BAA6B,iBAAiB;AAC9C;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uBAAuB;AACnC,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA,6DAA6D,aAAa,qBAAqB;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc;AAClB,IAAI;AACJ;AACA;AACA,IAAI;AACJ,IAAI;AACJ;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV,UAAU;AACV;AACA;AACA,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD,qCAAqC,qCAAqC;AAC1E;AACA;AACA,wEAAwE;AACxE;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA,wDAAwD,EAAE;AAC1D;AACA;AACA,uDAAuD,EAAE,EAAE,GAAG,SAAS;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA,qBAAqB,uBAAuB;AAC5C;AACA,qBAAqB,uBAAuB;AAC5C;AACA,qBAAqB,kBAAkB;AACvC;AACA,qBAAqB,UAAU,aAAa,EAAE;AAC9C;AACA,qBAAqB,SAAS;AAC9B;AACA,qBAAqB,QAAQ,SAAS,WAAW;AACjD;AACA;AACA;AACA;AACA;AACA,iBAAiB,IAAI,SAAS,KAAK,SAAS,OAAO,UAAU,EAAE;AAC/D;AACA;AACA,iBAAiB,IAAI,SAAS,KAAK;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,IAAI,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA,oBAAoB;AACpB;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA,KAAK;AACL,qBAAqB;AACrB;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA,sCAAsC;AACtC;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,qCAAqC;AACrC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB,YAAY,uBAAuB;AACnC;AACA;AACA,uBAAuB;AACvB;AACA;AACA,IAAI;AACJ,IAAI;AACJ,IAAI,cAAc;AAClB,IAAI,cAAc;AAClB,IAAI,cAAc;AAClB,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/Wa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yCAAyC;AACzC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,qBAAqB,mBAAO,CAAC,+EAAkB;AAC/C,iBAAiB,mBAAO,CAAC,sFAAW;AACpC,iBAAiB,mBAAO,CAAC,+FAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,wEAAwE,MAAM;AAC9E;AACA;AACA,yEAAyE,MAAM;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA,mBAAmB,MAAM;AACzB;AACA;AACA;AACA;AACA,wDAAwD,2DAA2D;AACnH;AACA;;;;;;;;;;;AC3Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gCAAgC;AAChC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,iBAAiB,mBAAO,CAAC,sFAAW;AACpC,iBAAiB,mBAAO,CAAC,+FAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,aAAa,iDAAiD,2DAA2D;AACvJ;AACA;AACA,gCAAgC;AAChC;;;;;;;;;;;AClCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC;AACvC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C,aAAa;AACb,SAAS;AACT;AACA;AACA,uCAAuC;AACvC;;;;;;;;;;;ACnCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gDAAgD;AAChD,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,iBAAiB,mBAAO,CAAC,sFAAW;AACpC,oBAAoB,mBAAO,CAAC,yFAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gDAAgD;AAChD;;;;;;;;;;;ACvDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qCAAqC;AACrC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,uBAAuB,mBAAO,CAAC,mFAAoB;AACnD,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,QAAQ,iIAAiI;AAC3O;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA,qCAAqC;AACrC;;;;;;;;;;;AC9Ea;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,iBAAiB,mBAAO,CAAC,gFAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA,iDAAiD;AACjD,CAAC,gCAAgC;AACjC,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,UAAU,EAAE,WAAW;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,kBAAkB;AAClB,iCAAiC,mBAAO,CAAC,oIAA4B;AACrE,wDAAuD,EAAE,qCAAqC,2DAA2D,EAAC;AAC1J,sBAAsB,aAAa,IAAI,aAAa;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kCAAkC;AAClC;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4CAA4C,GAAG,sCAAsC,GAAG,gDAAgD,GAAG,uCAAuC,GAAG,qCAAqC,GAAG,gCAAgC,GAAG,yCAAyC,GAAG,oCAAoC,GAAG,8CAA8C,GAAG,gCAAgC,GAAG,4CAA4C,GAAG,uCAAuC,GAAG,iCAAiC,GAAG,6CAA6C,GAAG,6CAA6C,GAAG,oCAAoC;AACxqB,qCAAqC,mBAAO,CAAC,qIAAgC;AAC7E,gEAA+D,EAAE,qCAAqC,uEAAuE,EAAC;AAC9K,8CAA8C,mBAAO,CAAC,uJAAyC;AAC/F,yEAAwE,EAAE,qCAAqC,yFAAyF,EAAC;AACzM,8CAA8C,mBAAO,CAAC,uJAAyC;AAC/F,yEAAwE,EAAE,qCAAqC,yFAAyF,EAAC;AACzM,kCAAkC,mBAAO,CAAC,+HAA6B;AACvE,6DAA4D,EAAE,qCAAqC,iEAAiE,EAAC;AACrK,wCAAwC,mBAAO,CAAC,2IAAmC;AACnF,mEAAkE,EAAE,qCAAqC,6EAA6E,EAAC;AACvL,6CAA6C,mBAAO,CAAC,qJAAwC;AAC7F,wEAAuE,EAAE,qCAAqC,uFAAuF,EAAC;AACtM,iCAAiC,mBAAO,CAAC,6HAA4B;AACrE,4DAA2D,EAAE,qCAAqC,+DAA+D,EAAC;AAClK,+CAA+C,mBAAO,CAAC,yJAA0C;AACjG,0EAAyE,EAAE,qCAAqC,2FAA2F,EAAC;AAC5M,qCAAqC,mBAAO,CAAC,qIAAgC;AAC7E,gEAA+D,EAAE,qCAAqC,uEAAuE,EAAC;AAC9K,0CAA0C,mBAAO,CAAC,+IAAqC;AACvF,qEAAoE,EAAE,qCAAqC,iFAAiF,EAAC;AAC7L,iCAAiC,mBAAO,CAAC,6HAA4B;AACrE,4DAA2D,EAAE,qCAAqC,+DAA+D,EAAC;AAClK,sCAAsC,mBAAO,CAAC,uIAAiC;AAC/E,iEAAgE,EAAE,qCAAqC,yEAAyE,EAAC;AACjL,wCAAwC,mBAAO,CAAC,2IAAmC;AACnF,mEAAkE,EAAE,qCAAqC,6EAA6E,EAAC;AACvL,iDAAiD,mBAAO,CAAC,6JAA4C;AACrG,4EAA2E,EAAE,qCAAqC,+FAA+F,EAAC;AAClN,uCAAuC,mBAAO,CAAC,yIAAkC;AACjF,kEAAiE,EAAE,qCAAqC,2EAA2E,EAAC;AACpL,6CAA6C,mBAAO,CAAC,qJAAwC;AAC7F,wEAAuE,EAAE,qCAAqC,uFAAuF,EAAC;AACtM;;;;;;;;;;;ACnCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,qCAAqC,mBAAO,CAAC,kHAA4B;AACzE,6CAA6C,mBAAO,CAAC,oHAAoC;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,eAAe;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,gEAAgE,kBAAkB;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;;;;;;;;;;;AC5Fa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,oDAAoD,mBAAO,CAAC,yKAAuD;AACnH,8CAA8C,mBAAO,CAAC,6JAAiD;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;;;;;;;;;;;AC5Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iDAAiD;AACjD,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,yCAAyC,mBAAO,CAAC,gHAAgC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;;;;;;;;;;;ACtDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2CAA2C;AAC3C,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,yCAAyC,mBAAO,CAAC,gHAAgC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa,MAAM;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;;;;;;;;;;;AChDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B,8BAA8B,mBAAO,CAAC,yGAAuB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,0BAA0B;AAC1B;;;;;;;;;;;ACvCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB,GAAG,0BAA0B;AAClD,2BAA2B,mBAAO,CAAC,uGAAsB;AACzD,sDAAqD,EAAE,qCAAqC,mDAAmD,EAAC;AAChJ,kBAAkB,mBAAO,CAAC,qFAAa;AACvC,iDAAgD,EAAE,qCAAqC,qCAAqC,EAAC;AAC7H;;;;;;;;;;;ACPa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B,uBAAuB;AACvB,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,IAAI;AACL;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,2BAA2B,YAAY;AACvC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,8BAA8B,mBAAO,CAAC,yGAAuB;AAC7D,8DAA8D,iHAAiH;AAC/K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,4FAA4F,KAAK;AACjG;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,8FAA8F,KAAK;AACnG;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;;;ACtGa;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB,8BAA8B,mBAAO,CAAC,wIAAsD;AAC5F,gBAAgB;AAChB;;;;;;;;;;;ACtCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc;AACd,uBAAuB;AACvB,qBAAqB,mBAAO,CAAC,4EAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW,MAAM,qBAAqB;AAC5D;AACA;AACA,sBAAsB,WAAW,MAAM,WAAW;AAClD;AACA,kBAAkB,WAAW;AAC7B;AACA;AACA,uEAAuE,sBAAsB,sBAAsB;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA,6BAA6B,EAAE,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,eAAe,QAAQ,eAAe,GAAG,WAAW;AAClG;AACA;AACA,8CAA8C,eAAe,QAAQ,WAAW;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,eAAe,WAAW,WAAW;AACnF;AACA;AACA,8CAA8C,eAAe,WAAW,qBAAqB;AAC7F;AACA;AACA,8CAA8C,eAAe,WAAW,WAAW;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,eAAe,WAAW,WAAW;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS,IAAI,QAAQ;AACxC;AACA,mEAAmE,SAAS,IAAI,QAAQ;AACxF;AACA;;;;;;;;;;;AClHa;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB,GAAG,cAAc;AACxC,yBAAyB,mBAAO,CAAC,8FAAoB;AACrD,0CAAyC,EAAE,qCAAqC,qCAAqC,EAAC;AACtH,mDAAkD,EAAE,qCAAqC,8CAA8C,EAAC;AACxI,aAAa,mBAAO,CAAC,kFAAc;AACnC;;;;;;;;;;;ACrBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kCAAkC,GAAG,uBAAuB;AAC5D,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,oBAAoB,mBAAO,CAAC,kGAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;;;;;;;;;;;ACzCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6CAA6C;AAC7C,uBAAuB,mBAAO,CAAC,+FAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA,6CAA6C;AAC7C;;;;;;;;;;;ACpBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gDAAgD;AAChD,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gDAAgD,GAAG,6CAA6C;AAChG,8CAA8C,mBAAO,CAAC,8JAAyC;AAC/F,yEAAwE,EAAE,qCAAqC,yFAAyF,EAAC;AACzM,iDAAiD,mBAAO,CAAC,oKAA4C;AACrG,4EAA2E,EAAE,qCAAqC,+FAA+F,EAAC;AAClN;;;;;;;;;;;ACPa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6BAA6B;AAC7B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,qBAAqB,mBAAO,CAAC,qEAAY;AACzC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,gBAAgB;AAChB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5Ea;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6BAA6B;AAC7B,8BAA8B,mBAAO,CAAC,+GAAyB;AAC/D,yDAAwD,EAAE,qCAAqC,yDAAyD,EAAC;AACzJ;;;;;;;;;;;ACLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6CAA6C,mBAAO,CAAC,oHAAoC;AACzF,mBAAmB,mBAAO,CAAC,wEAAa;AACxC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qCAAqC;AACzD,mGAAmG,QAAQ;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,EAAE,GAAG,EAAE;AAChE;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,uBAAuB;AACvB;;;;;;;;;;;AClKa;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,wBAAwB,mBAAO,CAAC,+FAAmB;AACnD,mDAAkD,EAAE,qCAAqC,6CAA6C,EAAC;AACvI,aAAa,mBAAO,CAAC,2EAAS;AAC9B;;;;;;;;;;;ACpBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB,GAAG,0BAA0B;AACrD,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA,0BAA0B;AAC1B;AACA,wBAAwB;AACxB;;;;;;;;;;;ACRa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gCAAgC;AAChC,sDAAsD,mBAAO,CAAC,4KAAyD;AACvH,yDAAyD,mBAAO,CAAC,kLAA4D;AAC7H;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;;;;;;;;;;;ACxBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gCAAgC;AAChC,iCAAiC,mBAAO,CAAC,kHAA4B;AACrE,4DAA2D,EAAE,qCAAqC,+DAA+D,EAAC;AAClK;;;;;;;;;;;ACLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mDAAmD;AACnD,yCAAyC,mBAAO,CAAC,gHAAgC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,GAAG;AACpC;AACA,yBAAyB,KAAK;AAC9B,2BAA2B,UAAU,GAAG;AACxC,yBAAyB;AACzB,wBAAwB,QAAQ;AAChC;AACA,oCAAoC,SAAS;AAC7C,wBAAwB;AACxB;AACA;AACA;AACA,mFAAmF,OAAO;AAC1F;AACA;AACA,wCAAwC,EAAE,IAAI,GAAG,KAAK;AACtD,4CAA4C,SAAS;AACrD,+BAA+B;AAC/B;AACA,4BAA4B,WAAW,8CAA8C,OAAO;AAC5F;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,aAAa;AACb;AACA,cAAc,OAAO,QAAQ;AAC7B,eAAe,MAAM,OAAO;AAC5B,aAAa,QAAQ,MAAM;AAC3B,aAAa,QAAQ,MAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,KAAK,QAAQ;AAC1C,4BAA4B,MAAM,MAAM;AACxC,mBAAmB;AACnB;AACA;AACA,oCAAoC,iBAAiB,IAAI;AACzD;AACA;AACA;AACA,8BAA8B,MAAM,KAAK;AACzC,4BAA4B,QAAQ,IAAI;AACxC;AACA;AACA;AACA;AACA;AACA,kCAAkC,IAAI,iBAAiB,MAAM;AAC7D,+DAA+D,MAAM;AACrE;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,gCAAgC;AAChC,uDAAuD,MAAM;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;;;;;;;;;;;ACxGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sDAAsD;AACtD,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,yCAAyC,mBAAO,CAAC,gHAAgC;AACjF,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qJAAqJ,kBAAkB;AACvK;AACA;AACA,qEAAqE,iBAAiB;AACtF;AACA;AACA;AACA,yJAAyJ,wCAAwC;AACjM;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,qBAAqB,mBAAO,CAAC,4EAAe;AAC5C,oBAAoB,mBAAO,CAAC,qFAAa;AACzC,0CAA0C,mBAAO,CAAC,+IAA6C;AAC/F,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,oCAAoC,mBAAO,CAAC,mIAAuC;AACnF,0CAA0C,mBAAO,CAAC,+IAA6C;AAC/F,sCAAsC,mBAAO,CAAC,uIAAyC;AACvF;AACA,8GAA8G;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;;;;;;;;;;ACrDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,sBAAsB,mBAAO,CAAC,uFAAiB;AAC/C,iDAAgD,EAAE,qCAAqC,yCAAyC,EAAC;AACjI;;;;;;;;;;;ACLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC;AACvC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,oBAAoB,mBAAO,CAAC,yFAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,uCAAuC;AACvC;;;;;;;;;;;ACrCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mCAAmC;AACnC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,oBAAoB,mBAAO,CAAC,yFAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,mCAAmC;AACnC;;;;;;;;;;;AC/Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kCAAkC;AAClC,iBAAiB,mBAAO,CAAC,6EAAc;AACvC,gBAAgB,mBAAO,CAAC,2EAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kCAAkC;AAClC;;;;;;;;;;;ACpCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC;AACvC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,iBAAiB,mBAAO,CAAC,6EAAc;AACvC,gBAAgB,mBAAO,CAAC,2EAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,uCAAuC;AACvC;;;;;;;;;;;ACzCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,iBAAiB,mBAAO,CAAC,6EAAc;AACvC,gBAAgB,mBAAO,CAAC,2EAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,4BAA4B;AAC5B;;;;;;;;;;;ACpCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iCAAiC;AACjC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,oBAAoB,mBAAO,CAAC,yFAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iCAAiC;AACjC;;;;;;;;;;;AC1Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yCAAyC;AACzC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,iBAAiB,mBAAO,CAAC,6EAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,yCAAyC;AACzC;;;;;;;;;;;ACpCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iCAAiC;AACjC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,iBAAiB,mBAAO,CAAC,6EAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iCAAiC;AACjC;;;;;;;;;;;AC5Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0CAA0C;AAC1C,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,qBAAqB,mBAAO,CAAC,+EAAkB;AAC/C,iBAAiB,mBAAO,CAAC,6EAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,sEAAsE;AACrI;AACA;AACA;AACA;AACA,4BAA4B,kEAAkE;AAC9F;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,0CAA0C;AAC1C;;;;;;;;;;;AC3Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iCAAiC;AACjC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,qBAAqB,mBAAO,CAAC,+EAAkB;AAC/C,iBAAiB,mBAAO,CAAC,6EAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,8CAA8C,kCAAkC;AAChF,aAAa;AACb;AACA;AACA;AACA,iCAAiC;AACjC;;;;;;;;;;;ACrDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B;AAC9B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,iBAAiB,mBAAO,CAAC,6EAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,8BAA8B;AAC9B;;;;;;;;;;;AC9Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kCAAkC;AAClC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,oBAAoB,mBAAO,CAAC,yFAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kCAAkC;AAClC;;;;;;;;;;;AC3Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2CAA2C;AAC3C,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,oBAAoB,mBAAO,CAAC,yFAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,2CAA2C;AAC3C;;;;;;;;;;;ACjCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gCAAgC;AAChC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,uBAAuB,mBAAO,CAAC,mFAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,gCAAgC;AAChC;;;;;;;;;;;ACxCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2CAA2C,GAAG,kCAAkC,GAAG,gCAAgC,GAAG,uCAAuC,GAAG,kCAAkC,GAAG,4BAA4B,GAAG,0CAA0C,GAAG,iCAAiC,GAAG,yCAAyC,GAAG,iCAAiC,GAAG,8BAA8B;AACna,+BAA+B,mBAAO,CAAC,mHAA0B;AACjE,0DAAyD,EAAE,qCAAqC,2DAA2D,EAAC;AAC5J,kCAAkC,mBAAO,CAAC,yHAA6B;AACvE,6DAA4D,EAAE,qCAAqC,iEAAiE,EAAC;AACrK,0CAA0C,mBAAO,CAAC,yIAAqC;AACvF,qEAAoE,EAAE,qCAAqC,iFAAiF,EAAC;AAC7L,kCAAkC,mBAAO,CAAC,yHAA6B;AACvE,6DAA4D,EAAE,qCAAqC,iEAAiE,EAAC;AACrK,2CAA2C,mBAAO,CAAC,2IAAsC;AACzF,sEAAqE,EAAE,qCAAqC,mFAAmF,EAAC;AAChM,6BAA6B,mBAAO,CAAC,+GAAwB;AAC7D,wDAAuD,EAAE,qCAAqC,uDAAuD,EAAC;AACtJ,mCAAmC,mBAAO,CAAC,2HAA8B;AACzE,8DAA6D,EAAE,qCAAqC,mEAAmE,EAAC;AACxK,wCAAwC,mBAAO,CAAC,qIAAmC;AACnF,mEAAkE,EAAE,qCAAqC,6EAA6E,EAAC;AACvL,iCAAiC,mBAAO,CAAC,uHAA4B;AACrE,4DAA2D,EAAE,qCAAqC,+DAA+D,EAAC;AAClK,mCAAmC,mBAAO,CAAC,2HAA8B;AACzE,8DAA6D,EAAE,qCAAqC,mEAAmE,EAAC;AACxK,4CAA4C,mBAAO,CAAC,6IAAuC;AAC3F,uEAAsE,EAAE,qCAAqC,qFAAqF,EAAC;AACnM;;;;;;;;;;;ACzBa;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,yBAAyB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,YAAY,GAAG,gBAAgB,GAAG,aAAa;AACrL,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6CAA4C,EAAE,qCAAqC,0CAA0C,EAAC;AAC9H,qDAAoD,EAAE,qCAAqC,4CAA4C,EAAC;AACxI,4CAA2C,EAAE,qCAAqC,yCAAyC,EAAC;AAC5H,kDAAiD,EAAE,qCAAqC,+CAA+C,EAAC;AACxI,aAAa,mBAAO,CAAC,iEAAS;AAC9B,2BAA2B,mBAAO,CAAC,2EAA6B;AAChE,yCAAwC,EAAE,qCAAqC,sCAAsC,EAAC;AACtH,cAAc,mBAAO,CAAC,uEAAS;AAC/B,4CAA2C,EAAE,qCAAqC,4BAA4B,EAAC;AAC/G,wCAAuC,EAAE,qCAAqC,wBAAwB,EAAC;AACvG,6CAA4C,EAAE,qCAAqC,6BAA6B,EAAC;AACjH,eAAe,mBAAO,CAAC,yEAAU;AACjC,+CAA8C,EAAE,qCAAqC,gCAAgC,EAAC;AACtH;;;;;;;;;;;AC/Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,sCAAsC,mBAAO,CAAC,8JAAqD;AACnG,gDAAgD,mBAAO,CAAC,kLAA+D;AACvH,8CAA8C,mBAAO,CAAC,8KAA6D;AACnH,yCAAyC,mBAAO,CAAC,wJAAkD;AACnG,uCAAuC,mBAAO,CAAC,oJAAgD;AAC/F,gBAAgB,mBAAO,CAAC,sEAAS;AACjC,6CAA6C,mBAAO,CAAC,4KAA4D;AACjH,gCAAgC,mBAAO,CAAC,sIAAyC;AACjF,kDAAkD,mBAAO,CAAC,sLAAiE;AAC3H,qCAAqC,mBAAO,CAAC,gJAA8C;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;;;;;;;;;;;AC5Fa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,sCAAsC,mBAAO,CAAC,qHAA6B;AAC3E,6CAA6C,mBAAO,CAAC,oHAAoC;AACzF,4BAA4B,mBAAO,CAAC,8FAAqB;AACzD,gCAAgC,mBAAO,CAAC,kIAAuC;AAC/E,qBAAqB,mBAAO,CAAC,qEAAY;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,IAAI;AACpD;AACA;AACA;AACA,2BAA2B;AAC3B;;;;;;;;;;;ACzKa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B;AAC9B,4BAA4B;AAC5B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;;;;;;;;;;;ACba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,+CAA+C;AAC/C,gBAAgB,mBAAO,CAAC,0EAAa;AACrC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,sCAAsC,mBAAO,CAAC,wIAA+B;AAC7E,yBAAyB,mBAAO,CAAC,4FAAsB;AACvD;AACA;AACA;AACA,KAAK,WAAW;AAChB;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA,mDAAmD,aAAa,cAAc,OAAO;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mCAAmC;AACnC,sCAAsC;AACtC,6BAA6B;AAC7B,yBAAyB;AACzB,uBAAuB;AACvB,gCAAgC;AAChC,8BAA8B;AAC9B,8BAA8B;AAC9B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,yCAAyC,mBAAO,CAAC,gHAAgC;AACjF,yBAAyB,mBAAO,CAAC,4FAAsB;AACvD,gBAAgB,mBAAO,CAAC,0EAAa;AACrC;AACA;AACA,8DAA8D,WAAW;AACzE;AACA;AACA,IAAI;AACJ;AACA;AACA,SAAS,aAAa;AACtB;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA,mBAAmB,KAAK;AACxB,wBAAwB,KAAK;AAC7B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6CAA6C;AAC7C,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,yBAAyB,mBAAO,CAAC,4FAAsB;AACvD,gBAAgB,mBAAO,CAAC,0EAAa;AACrC,sCAAsC,mBAAO,CAAC,wIAA+B;AAC7E;AACA;AACA;AACA,6BAA6B,WAAW;AACxC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B;AACA,QAAQ;AACR;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,mDAAmD,aAAa,aAAa;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9Fa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4CAA4C;AAC5C,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,sCAAsC,mBAAO,CAAC,qHAA6B;AAC3E,uBAAuB,mBAAO,CAAC,sFAAuB;AACtD,yBAAyB,mBAAO,CAAC,4FAAsB;AACvD,gBAAgB,mBAAO,CAAC,0EAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,sBAAsB;AACtD;AACA;AACA;AACA,gCAAgC,OAAO;AACvC,gCAAgC,OAAO;AACvC;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA,4CAA4C;AAC5C;;;;;;;;;;;AC9Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0CAA0C;AAC1C,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gBAAgB,mBAAO,CAAC,0EAAa;AACrC,sCAAsC,mBAAO,CAAC,wIAA+B;AAC7E,yBAAyB,mBAAO,CAAC,4FAAsB;AACvD;AACA;AACA,+CAA+C,WAAW;AAC1D,wCAAwC,WAAW;AACnD;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,aAAa,KAAK;AAClB;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC;AACtC,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,qBAAqB,mBAAO,CAAC,qEAAY;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kCAAkC;AAClC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,uBAAuB,mBAAO,CAAC,sFAAuB;AACtD,yBAAyB,mBAAO,CAAC,4FAAsB;AACvD,gBAAgB,mBAAO,CAAC,0EAAa;AACrC,sCAAsC,mBAAO,CAAC,kKAAyD;AACvG,yBAAyB,mBAAO,CAAC,4FAAsB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3Ea;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC;AACtC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,uBAAuB,mBAAO,CAAC,sFAAuB;AACtD,yBAAyB,mBAAO,CAAC,4FAAsB;AACvD,gBAAgB,mBAAO,CAAC,0EAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sCAAsC;AACtC;;;;;;;;;;;ACnCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6BAA6B;AAC7B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,uBAAuB,mBAAO,CAAC,sFAAuB;AACtD,yBAAyB,mBAAO,CAAC,4FAAsB;AACvD,gBAAgB,mBAAO,CAAC,0EAAa;AACrC,sCAAsC,mBAAO,CAAC,kKAAyD;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC;AACpC,2BAA2B;AAC3B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,uBAAuB,mBAAO,CAAC,sFAAuB;AACtD,yBAAyB,mBAAO,CAAC,4FAAsB;AACvD,gBAAgB,mBAAO,CAAC,0EAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,eAAe;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;AACA;AACA,0BAA0B,GAAG,cAAc,OAAO,4CAA4C;AAC9F;AACA;AACA;AACA,aAAa;AACb;AACA;;;;;;;;;;;AChEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6CAA6C;AAC7C,6BAA6B;AAC7B,sCAAsC,mBAAO,CAAC,qHAA6B;AAC3E,uBAAuB,mBAAO,CAAC,gFAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,WAAW;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;;;;;;;;;;;AC3Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB,qBAAqB;AACrB,mBAAmB;AACnB,4BAA4B;AAC5B,sBAAsB;AACtB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;;;;;;;;;;;AC9Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mCAAmC;AACnC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,oBAAoB,mBAAO,CAAC,mGAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;;;;;;;;;;;AC/Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wCAAwC;AACxC,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,sBAAsB,mBAAO,CAAC,kGAAgB;AAC9C;AACA;AACA;AACA;AACA,iDAAiD,gBAAgB,KAAK,YAAY;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;;;;;;;;;;;ACpCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC;AACvC,uBAAuB,mBAAO,CAAC,+FAA0B;AACzD,sBAAsB,mBAAO,CAAC,kGAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;;;;;;;;;;;AC1Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,GAAG,wCAAwC;AAClF,yCAAyC,mBAAO,CAAC,qJAAoC;AACrF,oEAAmE,EAAE,qCAAqC,+EAA+E,EAAC;AAC1L,wCAAwC,mBAAO,CAAC,mJAAmC;AACnF,mEAAkE,EAAE,qCAAqC,6EAA6E,EAAC;AACvL;;;;;;;;;;;ACPa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kCAAkC;AAClC;AACA;AACA,kCAAkC,MAAM,cAAc,EAAE,SAAS;AACjE;;;;;;;;;;;ACNa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB,eAAe;AACf,yCAAyC,mBAAO,CAAC,gHAAgC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,uCAAuC;AACvC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,oCAAoC,mBAAO,CAAC,oIAAuC;AACnF,uCAAuC,mBAAO,CAAC,0IAA0C;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;;;;;;;;;;;AC3Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iCAAiC;AACjC,yCAAyC,mBAAO,CAAC,gHAAgC;AACjF,uBAAuB,mBAAO,CAAC,+FAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4FAA4F,sDAAsD;AAClJ;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;;;;;;;;;;;ACxCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC;AACpC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,yCAAyC,mBAAO,CAAC,gHAAgC;AACjF,oBAAoB,mBAAO,CAAC,mFAAiB;AAC7C,cAAc,mBAAO,CAAC,6EAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,4FAA4F,sDAAsD;AAClJ;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,aAAa,QAAQ,aAAa;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,aAAa;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,aAAa;AACpD;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;ACrMa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,6BAA6B,mBAAO,CAAC,qHAA+B;AACpE,6BAA6B,mBAAO,CAAC,qHAA+B;AACpE,+BAA+B,mBAAO,CAAC,yHAAiC;AACxE,+BAA+B,mBAAO,CAAC,yHAAiC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;;;;;;;;;;ACpCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,yCAAyC,mBAAO,CAAC,gHAAgC;AACjF,oBAAoB,mBAAO,CAAC,mFAAiB;AAC7C,cAAc,mBAAO,CAAC,6EAAiB;AACvC;AACA;AACA;AACA;AACA,QAAQ,4BAA4B,MAAM;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,aAAa,QAAQ,aAAa;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,0BAA0B;AAC1B;;;;;;;;;;;ACnGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,yCAAyC,mBAAO,CAAC,gHAAgC;AACjF,oBAAoB,mBAAO,CAAC,mFAAiB;AAC7C,cAAc,mBAAO,CAAC,6EAAiB;AACvC,gBAAgB,mBAAO,CAAC,kFAAS;AACjC;AACA;AACA;AACA;AACA;AACA,oCAAoC,YAAY;AAChD;AACA;AACA,uBAAuB,0CAA0C;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,aAAa,QAAQ,aAAa;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;AAC/C;AACA;AACA,gCAAgC,+BAA+B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;;;;;;;;;AChTa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,yCAAyC,mBAAO,CAAC,gHAAgC;AACjF,oBAAoB,mBAAO,CAAC,mFAAiB;AAC7C,cAAc,mBAAO,CAAC,6EAAiB;AACvC,gBAAgB,mBAAO,CAAC,kFAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,eAAe,QAAQ,eAAe;AACnF;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;;;;;;;;;AChLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,yCAAyC,mBAAO,CAAC,gHAAgC;AACjF,oBAAoB,mBAAO,CAAC,mFAAiB;AAC7C,cAAc,mBAAO,CAAC,6EAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,sBAAsB,IAAI;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,eAAe,QAAQ,eAAe;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B;AAC5B;;;;;;;;;;;ACnGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5Ba;AACb;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB,GAAG,yBAAyB,GAAG,uBAAuB,GAAG,uBAAuB,GAAG,qBAAqB,GAAG,qBAAqB;AACrJ,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,qBAAqB;AACrB,qBAAqB;AACrB,uBAAuB;AACvB,uBAAuB;AACvB,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uHAAuH,cAAc;AACrI,4BAA4B,sCAAsC;AAClE;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;;;;;;;;;;AC5Ea;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,sBAAsB,mBAAO,CAAC,6DAAsB;AACpD,sCAAsC,mBAAO,CAAC,qHAA6B;AAC3E,6CAA6C,mBAAO,CAAC,oHAAoC;AACzF,gBAAgB,mBAAO,CAAC,kEAAU;AAClC,gBAAgB,mBAAO,CAAC,wEAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F,cAAc;AAC3G,SAAS;AACT;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,+CAA+C,IAAI;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,yCAAyC,+CAA+C,IAAI;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC,gEAAgE,mBAAmB;AACnF;AACA;AACA,gBAAgB,qCAAqC;AACrD;AACA;AACA;AACA;AACA;AACA,sFAAsF,KAAK;AAC3F;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,0FAA0F,KAAK;AAC/F;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,yBAAyB;AACzB;;;;;;;;;;;ACzMa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,oBAAoB,mBAAO,CAAC,oFAAe;AAC3C,+CAA8C,EAAE,qCAAqC,qCAAqC,EAAC;AAC3H;;;;;;;;;;;ACLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,KAAK;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;;;;;;;;;;AChCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,6BAA6B,mBAAO,CAAC,4FAAuB;AAC5D,sBAAsB,mBAAO,CAAC,oFAAgB;AAC9C,mBAAmB,mBAAO,CAAC,8EAAa;AACxC,sBAAsB,mBAAO,CAAC,oFAAgB;AAC9C,6BAA6B,mBAAO,CAAC,oGAA2B;AAChE,6BAA6B,mBAAO,CAAC,oHAAmC;AACxE,sBAAsB,mBAAO,CAAC,oFAAgB;AAC9C,qCAAqC,mBAAO,CAAC,kJAAkD;AAC/F,wBAAwB,mBAAO,CAAC,wFAAkB;AAClD,oBAAoB,mBAAO,CAAC,gFAAc;AAC1C,qBAAqB,mBAAO,CAAC,kFAAe;AAC5C,gBAAgB,mBAAO,CAAC,wEAAU;AAClC,8BAA8B,mBAAO,CAAC,wGAA6B;AACnE,sCAAsC,mBAAO,CAAC,sJAAoD;AAClG,yBAAyB,mBAAO,CAAC,kGAA0B;AAC3D,wBAAwB,mBAAO,CAAC,kGAA0B;AAC1D,gBAAgB,mBAAO,CAAC,kEAAU;AAClC,gBAAgB,mBAAO,CAAC,wEAAU;AAClC,cAAc,mBAAO,CAAC,0EAAc;AACpC,kBAAkB,mBAAO,CAAC,sEAAY;AACtC,2BAA2B,mBAAO,CAAC,8FAAoB;AACvD,wBAAwB,mBAAO,CAAC,wFAAiB;AACjD,eAAe,mBAAO,CAAC,sEAAQ;AAC/B,4BAA4B,mBAAO,CAAC,gGAAqB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0JAA0J;AAC7L;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,KAAK;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,8EAA8E,KAAK;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,YAAY;AACjD,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA,iDAAiD,KAAK;AACtD,iBAAiB;AACjB;AACA;AACA;AACA,6CAA6C;AAC7C,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA,sCAAsC,qCAAqC;AAC3E,iBAAiB;AACjB;AACA,sDAAsD,YAAY;AAClE,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,iEAAiE,cAAc;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc,cAAc,iBAAiB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,gBAAgB,+BAA+B;AAC/C,8DAA8D,iBAAiB;AAC/E,KAAK;AACL;AACA;AACA;AACA,gBAAgB,+BAA+B;AAC/C,gEAAgE,iBAAiB;AACjF,KAAK;AACL;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;;;ACplBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACVa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iCAAiC;AACjC,iBAAiB;AACjB,yBAAyB;AACzB,wBAAwB;AACxB,+BAA+B;AAC/B,iBAAiB;AACjB,0BAA0B;AAC1B,qBAAqB;AACrB,oBAAoB;AACpB,iCAAiC;AACjC;AACA;AACA,oBAAoB,IAAI,MAAM,iBAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wCAAwC;AAC9D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,IAAI,MAAM,EAAE;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,MAAM,IAAI,MAAM;AAC3D;AACA;;;;;;;;;;;ACxEa;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,GAAG,iCAAiC,GAAG,6BAA6B,GAAG,qCAAqC,GAAG,kCAAkC;AACxL,yBAAyB,mBAAO,CAAC,gFAAgB;AACjD;AACA;AACA;AACA;AACA,CAAC,iCAAiC,kCAAkC,kCAAkC;AACtG;AACA;AACA;AACA;AACA,CAAC,oCAAoC,qCAAqC,qCAAqC;AAC/G;AACA;AACA;AACA;AACA,CAAC,4BAA4B,6BAA6B,6BAA6B;AACvF;AACA;AACA;AACA;AACA,CAAC,gCAAgC,iCAAiC,iCAAiC;AACnG;AACA;AACA;AACA;AACA,CAAC,sCAAsC,uCAAuC,uCAAuC;AACrH;;;;;;;;;;;AC9Da;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;;;;;;;;;;;ACVa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gCAAgC;AAChC,iCAAiC;AACjC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,gCAAgC,mBAAO,CAAC,8FAAuB;AAC/D,oBAAoB,mBAAO,CAAC,+EAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCa;AACb;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,GAAG,eAAe,GAAG,YAAY;AAClD,2BAA2B,mBAAO,CAAC,2EAA6B;AAChE,wCAAuC,EAAE,qCAAqC,qCAAqC,EAAC;AACpH,2CAA0C,EAAE,qCAAqC,wCAAwC,EAAC;AAC1H,6CAA4C,EAAE,qCAAqC,0CAA0C,EAAC;AAC9H,aAAa,mBAAO,CAAC,6EAAY;AACjC,aAAa,mBAAO,CAAC,uEAAS;AAC9B,aAAa,mBAAO,CAAC,qEAAQ;AAC7B,aAAa,mBAAO,CAAC,+EAAa;AAClC;;;;;;;;;;;ACzBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB;AACA;AACA;AACA;;;;;;;;;;;ACNa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wCAAwC;AACxC,gCAAgC;AAChC,gCAAgC;AAChC,sCAAsC;AACtC,sCAAsC;AACtC,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,oCAAoC,mCAAmC;AACvE,oCAAoC,KAAK,WAAW,KAAK;AACzD,gCAAgC,KAAK;AACrC;AACA,6CAA6C,YAAY;AACzD,sBAAsB,QAAQ,EAAE,QAAQ,EAAE,QAAQ;AAClD;AACA,wCAAwC,YAAY;AACpD,gBAAgB,QAAQ,EAAE,QAAQ,EAAE,QAAQ;AAC5C;AACA;AACA,mBAAmB,MAAM,MAAM,YAAY,wCAAwC,QAAQ;AAC3F;AACA,wCAAwC;AACxC;AACA;AACA,8DAA8D;AAC9D,oCAAoC,KAAK;AACzC,4BAA4B;AAC5B;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,uBAAuB,QAAQ;AAC/B,uBAAuB,QAAQ;AAC/B,uBAAuB,SAAS;AAChC,cAAc,WAAW;AACzB,0BAA0B,IAAI;AAC9B,KAAK;AACL;AACA;AACA,mBAAmB,QAAQ,mBAAmB,yCAAyC,QAAQ,WAAW;AAC1G;AACA,KAAK;AACL;AACA;AACA,mBAAmB,QAAQ,mEAAmE,WAAW;AACzG;AACA,KAAK;AACL;AACA;AACA;AACA,sEAAsE,IAAI,mBAAmB;AAC7F,cAAc,KAAK,IAAI,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAK;AAC3B;AACA,0BAA0B,KAAK;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,SAAS,sBAAsB,QAAQ;AACzI;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5Ea;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B,GAAG,wBAAwB;AACrD,kBAAkB;AAClB,mBAAmB;AACnB,8BAA8B;AAC9B,uBAAuB;AACvB,uBAAuB;AACvB,wBAAwB;AACxB,8BAA8B;AAC9B,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,GAAG,oBAAoB,GAAG,sBAAsB,GAAG,wBAAwB,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,eAAe,GAAG,iBAAiB,GAAG,eAAe,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,mBAAmB;AAC7P,6BAA6B,mBAAO,CAAC,2EAA6B;AAClE;AACA,mBAAmB;AACnB;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA,eAAe;AACf;AACA,iBAAiB;AACjB;AACA,eAAe;AACf;AACA,mBAAmB;AACnB;AACA,iBAAiB;AACjB;AACA,wBAAwB;AACxB;AACA,sBAAsB;AACtB;AACA,oBAAoB;AACpB;AACA,kBAAkB;AAClB;;;;;;;;;;;AC7Ba;AACb;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe;AACf,uCAAuC,mBAAO,CAAC,wEAAiB;AAChE,eAAe;AACf;;;;;;;;;;;;;;;;;UCRA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA,qBAAqB;UACrB,mDAAmD,uBAAuB;UAC1E;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;;;;;WC7CA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;;;;;WCRA;WACA;WACA;WACA;WACA;;;;;WCJA;WACA;WACA;WACA;WACA;;;;;WCJA;;;;;WCAA;;;;;WCAA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;;;;;WCJA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;;WAED;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA,IAAI;WACJ;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,IAAI;WACJ;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA,2BAA2B;WAC3B,4BAA4B;WAC5B,2BAA2B;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,GAAG;;WAEH;WACA;WACA;WACA;WACA;WACA;WACA,oBAAoB,gBAAgB;WACpC;WACA;WACA;WACA,KAAK;WACL;WACA;WACA;WACA,GAAG;WACH;WACA;WACA;WACA,oBAAoB,gBAAgB;WACpC;WACA;WACA,GAAG;WACH;WACA;WACA,GAAG;WACH;WACA;WACA,GAAG;WACH;WACA;WACA;WACA,GAAG;WACH;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,GAAG;;WAEH;WACA;WACA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,GAAG;WACH;WACA;WACA;WACA,GAAG;;WAEH;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;WAEA,iBAAiB,qCAAqC;WACtD;;WAEA,gDAAgD;WAChD;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA,oBAAoB,iBAAiB;WACrC;WACA;WACA;WACA,GAAG;WACH;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA,GAAG;WACH,EAAE;WACF;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA,OAAO;WACP,MAAM;WACN,KAAK;WACL,IAAI;WACJ,GAAG;WACH;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA;;WAEA;WACA;;WAEA;;WAEA;WACA;WACA,EAAE;WACF;;WAEA;WACA;WACA;WACA,GAAG;WACH;;WAEA;WACA;WACA;WACA,GAAG;WACH;;WAEA;WACA;;WAEA;WACA;WACA,EAAE;;WAEF;WACA;;WAEA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA,oBAAoB,oBAAoB;WACxC;WACA;WACA;WACA;WACA,EAAE;;WAEF;WACA;WACA;WACA;WACA;WACA,IAAI;WACJ;;WAEA;WACA;WACA;WACA;WACA,KAAK;WACL;WACA,IAAI;WACJ;;WAEA;WACA;WACA,GAAG;WACH,EAAE;WACF;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,IAAI;WACJ,GAAG;WACH;WACA;WACA;WACA;;;;;WClYA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WClBA;;WAEA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,aAAa;WACb;WACA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,mBAAmB,2BAA2B;WAC9C;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,KAAK;WACL;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA,kBAAkB,cAAc;WAChC;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA,cAAc,MAAM;WACpB;WACA;WACA;WACA;WACA;WACA;WACA,cAAc,aAAa;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA,iBAAiB,4BAA4B;WAC7C;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,IAAI;WACJ;WACA;;WAEA;;WAEA;WACA;WACA;WACA;WACA,IAAI;WACJ;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;WACA;WACA,gBAAgB,4BAA4B;WAC5C;WACA;WACA;;WAEA;WACA;;WAEA;WACA;;WAEA;WACA;;WAEA;WACA,gBAAgB,4BAA4B;WAC5C;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,kBAAkB,uCAAuC;WACzD;WACA;WACA;WACA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA,mBAAmB,iCAAiC;WACpD;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,sBAAsB,uCAAuC;WAC7D;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,sBAAsB,sBAAsB;WAC5C;WACA;WACA,SAAS;WACT;WACA;WACA;WACA;WACA;WACA,WAAW;WACX,WAAW;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA,YAAY;WACZ;WACA;WACA;WACA;WACA;WACA;WACA,UAAU;WACV;WACA;WACA;WACA;WACA;WACA;WACA,WAAW;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA,mBAAmB,wCAAwC;WAC3D;WACA;WACA;WACA;WACA,MAAM;WACN;WACA;WACA;WACA;WACA;WACA,QAAQ;WACR,QAAQ;WACR;WACA;WACA;WACA;WACA;WACA;WACA,SAAS;WACT;WACA;WACA;WACA;WACA;WACA;WACA,OAAO;WACP;WACA;WACA;WACA;WACA;WACA,QAAQ;WACR;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE,IAAI;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,IAAI;WACJ;WACA;WACA,EAAE;WACF;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA,sCAAsC;WACtC;WACA;WACA,EAAE;WACF;;;;;WCnfA;WACA;WACA;WACA;;;;;UEHA;UACA;UACA","sources":["webpack:///./src/language-server-worker.ts","webpack:///../../liquid-html-parser/dist/conditional-comment.js","webpack:///../../liquid-html-parser/dist/errors.js","webpack:///../../liquid-html-parser/dist/grammar.js","webpack:///../../liquid-html-parser/dist/index.js","webpack:///../../liquid-html-parser/dist/stage-1-cst.js","webpack:///../../liquid-html-parser/dist/stage-2-ast.js","webpack:///../../liquid-html-parser/dist/types.js","webpack:///../../liquid-html-parser/dist/utils.js","webpack:///../../liquid-html-parser/grammar/liquid-html.ohm.js","webpack:///../../theme-check-common/dist/AbstractFileSystem.js","webpack:///../../theme-check-common/dist/AugmentedThemeDocset.js","webpack:///../../theme-check-common/dist/JSONValidator.js","webpack:///../../theme-check-common/dist/checks/app-block-missing-schema/index.js","webpack:///../../theme-check-common/dist/checks/app-block-valid-tags/index.js","webpack:///../../theme-check-common/dist/checks/asset-preload/index.js","webpack:///../../theme-check-common/dist/checks/asset-size-app-block-css/index.js","webpack:///../../theme-check-common/dist/checks/asset-size-app-block-javascript/index.js","webpack:///../../theme-check-common/dist/checks/asset-size-css/index.js","webpack:///../../theme-check-common/dist/checks/asset-size-javascript/index.js","webpack:///../../theme-check-common/dist/checks/block-id-usage/index.js","webpack:///../../theme-check-common/dist/checks/cdn-preconnect/index.js","webpack:///../../theme-check-common/dist/checks/content-for-header-modification/index.js","webpack:///../../theme-check-common/dist/checks/deprecate-bgsizes/index.js","webpack:///../../theme-check-common/dist/checks/deprecate-lazysizes/index.js","webpack:///../../theme-check-common/dist/checks/deprecated-filter/fixes.js","webpack:///../../theme-check-common/dist/checks/deprecated-filter/index.js","webpack:///../../theme-check-common/dist/checks/deprecated-fonts-on-sections-and-blocks/deprecated-fonts-data.js","webpack:///../../theme-check-common/dist/checks/deprecated-fonts-on-sections-and-blocks/index.js","webpack:///../../theme-check-common/dist/checks/deprecated-fonts-on-settings-schema/index.js","webpack:///../../theme-check-common/dist/checks/deprecated-tag/index.js","webpack:///../../theme-check-common/dist/checks/duplicate-content-for-arguments/index.js","webpack:///../../theme-check-common/dist/checks/duplicate-render-snippet-arguments/index.js","webpack:///../../theme-check-common/dist/checks/empty-block-content/index.js","webpack:///../../theme-check-common/dist/checks/hardcoded-routes/index.js","webpack:///../../theme-check-common/dist/checks/img-width-and-height/index.js","webpack:///../../theme-check-common/dist/checks/index.js","webpack:///../../theme-check-common/dist/checks/json-missing-block/index.js","webpack:///../../theme-check-common/dist/checks/json-missing-block/missing-block-utils.js","webpack:///../../theme-check-common/dist/checks/json-syntax-error/index.js","webpack:///../../theme-check-common/dist/checks/liquid-free-settings/index.js","webpack:///../../theme-check-common/dist/checks/liquid-html-syntax-error/checks/InvalidBooleanExpressions.js","webpack:///../../theme-check-common/dist/checks/liquid-html-syntax-error/checks/InvalidConditionalNode.js","webpack:///../../theme-check-common/dist/checks/liquid-html-syntax-error/checks/InvalidConditionalNodeParenthesis.js","webpack:///../../theme-check-common/dist/checks/liquid-html-syntax-error/checks/InvalidEchoValue.js","webpack:///../../theme-check-common/dist/checks/liquid-html-syntax-error/checks/InvalidFilterName.js","webpack:///../../theme-check-common/dist/checks/liquid-html-syntax-error/checks/InvalidLoopArguments.js","webpack:///../../theme-check-common/dist/checks/liquid-html-syntax-error/checks/InvalidLoopRange.js","webpack:///../../theme-check-common/dist/checks/liquid-html-syntax-error/checks/InvalidPipeSyntax.js","webpack:///../../theme-check-common/dist/checks/liquid-html-syntax-error/checks/MultipleAssignValues.js","webpack:///../../theme-check-common/dist/checks/liquid-html-syntax-error/checks/utils.js","webpack:///../../theme-check-common/dist/checks/liquid-html-syntax-error/index.js","webpack:///../../theme-check-common/dist/checks/matching-translations/index.js","webpack:///../../theme-check-common/dist/checks/missing-asset/index.js","webpack:///../../theme-check-common/dist/checks/missing-content-for-arguments/index.js","webpack:///../../theme-check-common/dist/checks/missing-render-snippet-arguments/index.js","webpack:///../../theme-check-common/dist/checks/missing-template/index.js","webpack:///../../theme-check-common/dist/checks/orphaned-snippet/index.js","webpack:///../../theme-check-common/dist/checks/pagination-size/index.js","webpack:///../../theme-check-common/dist/checks/parser-blocking-script/index.js","webpack:///../../theme-check-common/dist/checks/parser-blocking-script/suggestions.js","webpack:///../../theme-check-common/dist/checks/remote-asset/index.js","webpack:///../../theme-check-common/dist/checks/required-layout-theme-object/index.js","webpack:///../../theme-check-common/dist/checks/reserved-doc-param-names/index.js","webpack:///../../theme-check-common/dist/checks/schema-presets-block-order/index.js","webpack:///../../theme-check-common/dist/checks/schema-presets-static-blocks/index.js","webpack:///../../theme-check-common/dist/checks/static-stylesheet-and-javascript-tags/index.js","webpack:///../../theme-check-common/dist/checks/translation-key-exists/index.js","webpack:///../../theme-check-common/dist/checks/unclosed-html-element/index.js","webpack:///../../theme-check-common/dist/checks/undefined-object/index.js","webpack:///../../theme-check-common/dist/checks/unique-doc-param-names/index.js","webpack:///../../theme-check-common/dist/checks/unique-settings-id/index.js","webpack:///../../theme-check-common/dist/checks/unique-static-block-id/index.js","webpack:///../../theme-check-common/dist/checks/unknown-filter/index.js","webpack:///../../theme-check-common/dist/checks/unrecognized-content-for-arguments/index.js","webpack:///../../theme-check-common/dist/checks/unrecognized-render-snippet-arguments/index.js","webpack:///../../theme-check-common/dist/checks/unsupported-doc-tag/index.js","webpack:///../../theme-check-common/dist/checks/unused-assign/index.js","webpack:///../../theme-check-common/dist/checks/unused-doc-param/index.js","webpack:///../../theme-check-common/dist/checks/utils.js","webpack:///../../theme-check-common/dist/checks/valid-block-target/index.js","webpack:///../../theme-check-common/dist/checks/valid-content-for-argument-types/index.js","webpack:///../../theme-check-common/dist/checks/valid-content-for-arguments/index.js","webpack:///../../theme-check-common/dist/checks/valid-doc-param-types/index.js","webpack:///../../theme-check-common/dist/checks/valid-html-translation/index.js","webpack:///../../theme-check-common/dist/checks/valid-json/index.js","webpack:///../../theme-check-common/dist/checks/valid-local-blocks/index.js","webpack:///../../theme-check-common/dist/checks/valid-local-blocks/valid-block-utils.js","webpack:///../../theme-check-common/dist/checks/valid-render-snippet-argument-types/index.js","webpack:///../../theme-check-common/dist/checks/valid-schema-name/index.js","webpack:///../../theme-check-common/dist/checks/valid-schema/index.js","webpack:///../../theme-check-common/dist/checks/valid-settings-key/index.js","webpack:///../../theme-check-common/dist/checks/valid-static-block-type/index.js","webpack:///../../theme-check-common/dist/checks/valid-visible-if/index.js","webpack:///../../theme-check-common/dist/checks/valid-visible-if/visible-if-utils.js","webpack:///../../theme-check-common/dist/checks/variable-name/index.js","webpack:///../../theme-check-common/dist/context-utils.js","webpack:///../../theme-check-common/dist/disabled-checks/index.js","webpack:///../../theme-check-common/dist/find-root.js","webpack:///../../theme-check-common/dist/fixes/apply-fix-to-string.js","webpack:///../../theme-check-common/dist/fixes/autofix.js","webpack:///../../theme-check-common/dist/fixes/correctors/index.js","webpack:///../../theme-check-common/dist/fixes/correctors/json-corrector.js","webpack:///../../theme-check-common/dist/fixes/correctors/string-corrector.js","webpack:///../../theme-check-common/dist/fixes/index.js","webpack:///../../theme-check-common/dist/fixes/utils.js","webpack:///../../theme-check-common/dist/ignore.js","webpack:///../../theme-check-common/dist/index.js","webpack:///../../theme-check-common/dist/json.js","webpack:///../../theme-check-common/dist/jsonc/parse.js","webpack:///../../theme-check-common/dist/jsonc/types.js","webpack:///../../theme-check-common/dist/liquid-doc/arguments.js","webpack:///../../theme-check-common/dist/liquid-doc/liquidDoc.js","webpack:///../../theme-check-common/dist/liquid-doc/utils.js","webpack:///../../theme-check-common/dist/path.js","webpack:///../../theme-check-common/dist/tags/content-for.js","webpack:///../../theme-check-common/dist/to-schema.js","webpack:///../../theme-check-common/dist/to-source-code.js","webpack:///../../theme-check-common/dist/types.js","webpack:///../../theme-check-common/dist/types/schema-prop-factory.js","webpack:///../../theme-check-common/dist/types/schemas/index.js","webpack:///../../theme-check-common/dist/types/schemas/setting.js","webpack:///../../theme-check-common/dist/types/theme-liquid-docs.js","webpack:///../../theme-check-common/dist/types/theme-schemas.js","webpack:///../../theme-check-common/dist/utils/array.js","webpack:///../../theme-check-common/dist/utils/block.js","webpack:///../../theme-check-common/dist/utils/error.js","webpack:///../../theme-check-common/dist/utils/file-utils.js","webpack:///../../theme-check-common/dist/utils/index.js","webpack:///../../theme-check-common/dist/utils/indexBy.js","webpack:///../../theme-check-common/dist/utils/markup.js","webpack:///../../theme-check-common/dist/utils/memo.js","webpack:///../../theme-check-common/dist/utils/object.js","webpack:///../../theme-check-common/dist/utils/position.js","webpack:///../../theme-check-common/dist/utils/types.js","webpack:///../../theme-check-common/dist/visitor.js","webpack:///../../theme-check-common/dist/visitors/index.js","webpack:///../../theme-check-common/dist/visitors/json.js","webpack:///../../theme-check-common/dist/visitors/liquid.js","webpack:///../../theme-graph/dist/getWebComponentMap.js","webpack:///../../theme-graph/dist/graph/augment.js","webpack:///../../theme-graph/dist/graph/build.js","webpack:///../../theme-graph/dist/graph/module.js","webpack:///../../theme-graph/dist/graph/serialize.js","webpack:///../../theme-graph/dist/graph/traverse.js","webpack:///../../theme-graph/dist/index.js","webpack:///../../theme-graph/dist/toSourceCode.js","webpack:///../../theme-graph/dist/types.js","webpack:///../../theme-graph/dist/utils/index.js","webpack:///../../theme-language-server-browser/dist/index.js","webpack:///../../theme-language-server-common/dist/ClientCapabilities.js","webpack:///../../theme-language-server-common/dist/TypeSystem.js","webpack:///../../theme-language-server-common/dist/codeActions/BaseCodeActionsProvider.js","webpack:///../../theme-language-server-common/dist/codeActions/CodeActionsProvider.js","webpack:///../../theme-language-server-common/dist/codeActions/index.js","webpack:///../../theme-language-server-common/dist/codeActions/providers/FixAllProvider.js","webpack:///../../theme-language-server-common/dist/codeActions/providers/FixProvider.js","webpack:///../../theme-language-server-common/dist/codeActions/providers/SuggestionProvider.js","webpack:///../../theme-language-server-common/dist/codeActions/providers/index.js","webpack:///../../theme-language-server-common/dist/codeActions/providers/utils.js","webpack:///../../theme-language-server-common/dist/commands/BaseExecuteCommandProvider.js","webpack:///../../theme-language-server-common/dist/commands/ExecuteCommandProvider.js","webpack:///../../theme-language-server-common/dist/commands/index.js","webpack:///../../theme-language-server-common/dist/commands/providers/ApplyFixesProvider.js","webpack:///../../theme-language-server-common/dist/commands/providers/ApplySuggestionProvider.js","webpack:///../../theme-language-server-common/dist/commands/providers/RunChecksProvider.js","webpack:///../../theme-language-server-common/dist/commands/providers/index.js","webpack:///../../theme-language-server-common/dist/completions/CompletionsProvider.js","webpack:///../../theme-language-server-common/dist/completions/index.js","webpack:///../../theme-language-server-common/dist/completions/params/LiquidCompletionParams.js","webpack:///../../theme-language-server-common/dist/completions/params/fix.js","webpack:///../../theme-language-server-common/dist/completions/params/index.js","webpack:///../../theme-language-server-common/dist/completions/providers/ContentForBlockTypeCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/ContentForCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/ContentForParameterCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/FilterCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/FilterNamedParameterCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/HtmlAttributeCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/HtmlAttributeValueCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/HtmlTagCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/LiquidDocParamTypeCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/LiquidDocTagCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/LiquidTagsCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/ObjectAttributeCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/ObjectCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/RenderSnippetCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/RenderSnippetParameterCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/TranslationCompletionProvider.js","webpack:///../../theme-language-server-common/dist/completions/providers/common/CompletionItemProperties.js","webpack:///../../theme-language-server-common/dist/completions/providers/common/index.js","webpack:///../../theme-language-server-common/dist/completions/providers/data/contentForParameterCompletionOptions.js","webpack:///../../theme-language-server-common/dist/completions/providers/index.js","webpack:///../../theme-language-server-common/dist/css/CSSLanguageService.js","webpack:///../../theme-language-server-common/dist/definitions/DefinitionProvider.js","webpack:///../../theme-language-server-common/dist/definitions/providers/SchemaTranslationStringDefinitionProvider.js","webpack:///../../theme-language-server-common/dist/definitions/providers/TranslationStringDefinitionProvider.js","webpack:///../../theme-language-server-common/dist/diagnostics/DiagnosticsManager.js","webpack:///../../theme-language-server-common/dist/diagnostics/index.js","webpack:///../../theme-language-server-common/dist/diagnostics/offenseToDiagnostic.js","webpack:///../../theme-language-server-common/dist/diagnostics/runChecks.js","webpack:///../../theme-language-server-common/dist/docset/HtmlDocset.js","webpack:///../../theme-language-server-common/dist/docset/MarkdownRenderer.js","webpack:///../../theme-language-server-common/dist/docset/index.js","webpack:///../../theme-language-server-common/dist/documentHighlights/DocumentHighlightsProvider.js","webpack:///../../theme-language-server-common/dist/documentHighlights/providers/HtmlTagNameDocumentHighlightsProvider.js","webpack:///../../theme-language-server-common/dist/documentHighlights/providers/LiquidBlockTagDocumentHighlightsProvider.js","webpack:///../../theme-language-server-common/dist/documentHighlights/providers/index.js","webpack:///../../theme-language-server-common/dist/documentLinks/DocumentLinksProvider.js","webpack:///../../theme-language-server-common/dist/documentLinks/index.js","webpack:///../../theme-language-server-common/dist/documents/DocumentManager.js","webpack:///../../theme-language-server-common/dist/documents/index.js","webpack:///../../theme-language-server-common/dist/documents/types.js","webpack:///../../theme-language-server-common/dist/formatting/OnTypeFormattingProvider.js","webpack:///../../theme-language-server-common/dist/formatting/index.js","webpack:///../../theme-language-server-common/dist/formatting/providers/BracketsAutoclosingOnTypeFormattingProvider.js","webpack:///../../theme-language-server-common/dist/formatting/providers/HtmlElementAutoclosingOnTypeFormattingProvider.js","webpack:///../../theme-language-server-common/dist/hover/HoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/index.js","webpack:///../../theme-language-server-common/dist/hover/providers/ContentForArgumentHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/ContentForTypeHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/HtmlAttributeHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/HtmlAttributeValueHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/HtmlTagHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/LiquidDocTagHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/LiquidFilterArgumentHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/LiquidFilterHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/LiquidObjectAttributeHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/LiquidObjectHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/LiquidTagHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/RenderSnippetHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/RenderSnippetParameterHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/TranslationHoverProvider.js","webpack:///../../theme-language-server-common/dist/hover/providers/index.js","webpack:///../../theme-language-server-common/dist/index.js","webpack:///../../theme-language-server-common/dist/json/JSONContributions.js","webpack:///../../theme-language-server-common/dist/json/JSONLanguageService.js","webpack:///../../theme-language-server-common/dist/json/RequestContext.js","webpack:///../../theme-language-server-common/dist/json/completions/providers/BlockSettingsPropertyCompletionProvider.js","webpack:///../../theme-language-server-common/dist/json/completions/providers/BlockTypeCompletionProvider.js","webpack:///../../theme-language-server-common/dist/json/completions/providers/ReferencedBlockTypeCompletionProvider.js","webpack:///../../theme-language-server-common/dist/json/completions/providers/SchemaTranslationCompletionProvider.js","webpack:///../../theme-language-server-common/dist/json/completions/providers/SettingsPropertyCompletionProvider.js","webpack:///../../theme-language-server-common/dist/json/documentLinks/DocumentLinksProvider.js","webpack:///../../theme-language-server-common/dist/json/hover/providers/BlockSettingsHoverProvider.js","webpack:///../../theme-language-server-common/dist/json/hover/providers/SchemaTranslationHoverProvider.js","webpack:///../../theme-language-server-common/dist/json/hover/providers/SettingsHoverProvider.js","webpack:///../../theme-language-server-common/dist/json/hover/providers/TranslationPathHoverProvider.js","webpack:///../../theme-language-server-common/dist/json/schemaSettings.js","webpack:///../../theme-language-server-common/dist/json/utils.js","webpack:///../../theme-language-server-common/dist/linkedEditingRanges/LinkedEditingRangesProvider.js","webpack:///../../theme-language-server-common/dist/linkedEditingRanges/providers/EmptyHtmlTagLinkedRangesProvider.js","webpack:///../../theme-language-server-common/dist/linkedEditingRanges/providers/HtmlTagNameLinkedRangesProvider.js","webpack:///../../theme-language-server-common/dist/linkedEditingRanges/providers/index.js","webpack:///../../theme-language-server-common/dist/linkedEditingRanges/wordPattern.js","webpack:///../../theme-language-server-common/dist/progress.js","webpack:///../../theme-language-server-common/dist/rename/RenameProvider.js","webpack:///../../theme-language-server-common/dist/rename/providers/HtmlTagNameRenameProvider.js","webpack:///../../theme-language-server-common/dist/rename/providers/LiquidVariableRenameProvider.js","webpack:///../../theme-language-server-common/dist/renamed/RenameHandler.js","webpack:///../../theme-language-server-common/dist/renamed/handlers/AssetRenameHandler.js","webpack:///../../theme-language-server-common/dist/renamed/handlers/BlockRenameHandler.js","webpack:///../../theme-language-server-common/dist/renamed/handlers/SectionRenameHandler.js","webpack:///../../theme-language-server-common/dist/renamed/handlers/SnippetRenameHandler.js","webpack:///../../theme-language-server-common/dist/renamed/handlers/utils.js","webpack:///../../theme-language-server-common/dist/server/CachedFileSystem.js","webpack:///../../theme-language-server-common/dist/server/Configuration.js","webpack:///../../theme-language-server-common/dist/server/ThemeGraphManager.js","webpack:///../../theme-language-server-common/dist/server/index.js","webpack:///../../theme-language-server-common/dist/server/safe.js","webpack:///../../theme-language-server-common/dist/server/startServer.js","webpack:///../../theme-language-server-common/dist/settings/index.js","webpack:///../../theme-language-server-common/dist/translations.js","webpack:///../../theme-language-server-common/dist/types.js","webpack:///../../theme-language-server-common/dist/utils/array.js","webpack:///../../theme-language-server-common/dist/utils/debounce.js","webpack:///../../theme-language-server-common/dist/utils/htmlTagNames.js","webpack:///../../theme-language-server-common/dist/utils/index.js","webpack:///../../theme-language-server-common/dist/utils/isCovered.js","webpack:///../../theme-language-server-common/dist/utils/liquidDoc.js","webpack:///../../theme-language-server-common/dist/utils/node.js","webpack:///../../theme-language-server-common/dist/utils/uri.js","webpack:///../../theme-language-server-common/dist/version.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/chunk loaded","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/ensure chunk","webpack:///webpack/runtime/get javascript chunk filename","webpack:///webpack/runtime/get javascript update chunk filename","webpack:///webpack/runtime/get update manifest filename","webpack:///webpack/runtime/getFullHash","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///webpack/runtime/node module decorator","webpack:///webpack/runtime/hot module replacement","webpack:///webpack/runtime/publicPath","webpack:///webpack/runtime/importScripts chunk loading","webpack:///webpack/runtime/startup chunk dependencies","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"sourcesContent":["import {\n Dependencies,\n allChecks,\n getConnection,\n startServer,\n AbstractFileSystem,\n FileTuple,\n FileStat,\n} from '@shopify/theme-language-server-browser';\nimport { Connection } from 'vscode-languageserver';\n\n/**\n * These are replaced at build time by the contents of\n * @shopify/theme-check-docs-updater's DocsManager\n */\ndeclare global {\n export const WEBPACK_TAGS: any[];\n export const WEBPACK_FILTERS: any[];\n export const WEBPACK_OBJECTS: any[];\n export const WEBPACK_SYSTEM_TRANSLATIONS: any;\n export const WEBPACK_SCHEMAS: any;\n}\n\nconst tags = WEBPACK_TAGS;\nconst filters = WEBPACK_FILTERS;\nconst objects = WEBPACK_OBJECTS;\nconst systemTranslations = WEBPACK_SYSTEM_TRANSLATIONS;\nconst schemas = WEBPACK_SCHEMAS;\n\nconst worker = self as any as Worker;\n\nconst loadConfig: Dependencies['loadConfig'] = async (_uri, fileExists) => ({\n context: 'theme',\n settings: {},\n checks: allChecks,\n rootUri: 'browser:/',\n});\n\nconst connection = getConnection(worker);\n\nclass MainThreadFileSystem implements AbstractFileSystem {\n constructor(private connection: Connection) {\n this.connection = connection;\n }\n\n async readFile(uri: string) {\n return this.connection.sendRequest('fs/readFile', uri) as Promise<string>;\n }\n\n async readDirectory(uri: string) {\n return this.connection.sendRequest('fs/readDirectory', uri) as Promise<FileTuple[]>;\n }\n\n async stat(uri: string) {\n return this.connection.sendRequest('fs/stat', uri) as Promise<FileStat>;\n }\n}\n\nstartServer(\n worker,\n {\n fs: new MainThreadFileSystem(connection),\n themeDocset: {\n filters: async () => filters,\n tags: async () => tags,\n objects: async () => objects,\n liquidDrops: async () => objects,\n systemTranslations: async () => systemTranslations,\n },\n jsonValidationSet: {\n schemas: async () => schemas,\n },\n loadConfig,\n log(message) {\n console.info(message);\n },\n },\n connection,\n);\n\nexport {};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getConditionalComment = void 0;\nconst commentRegex = /(<!--\\[if[^\\]]*]>)((.|\\n)*)(<!\\[endif\\]-->)$/;\nconst getConditionalComment = (comment) => {\n const matches = comment.match(commentRegex);\n if (matches) {\n return {\n startTag: matches[1],\n body: matches[2].trim(),\n endTag: matches[4],\n };\n }\n};\nexports.getConditionalComment = getConditionalComment;\n//# sourceMappingURL=conditional-comment.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidHTMLASTParsingError = exports.LiquidHTMLCSTParsingError = void 0;\nconst line_column_1 = __importDefault(require(\"line-column\"));\nclass LiquidHTMLCSTParsingError extends SyntaxError {\n constructor(ohm) {\n super(ohm.shortMessage);\n this.name = 'LiquidHTMLParsingError';\n const input = ohm.input;\n const errorPos = ohm._rightmostFailurePosition;\n const lineCol = (0, line_column_1.default)(input).fromIndex(Math.min(errorPos, input.length - 1));\n // Plugging ourselves into @babel/code-frame since this is how\n // the babel parser can print where the parsing error occured.\n // https://github.com/prettier/prettier/blob/cd4a57b113177c105a7ceb94e71f3a5a53535b81/src/main/parser.js\n if (lineCol) {\n this.loc = {\n start: {\n line: lineCol.line,\n column: lineCol.col,\n },\n end: {\n line: lineCol.line,\n column: lineCol.col,\n },\n };\n }\n }\n}\nexports.LiquidHTMLCSTParsingError = LiquidHTMLCSTParsingError;\nclass LiquidHTMLASTParsingError extends SyntaxError {\n constructor(message, source, startIndex, endIndex, unclosed) {\n super(message);\n this.name = 'LiquidHTMLParsingError';\n this.unclosed = unclosed !== null && unclosed !== void 0 ? unclosed : null;\n const lc = (0, line_column_1.default)(source);\n const start = lc.fromIndex(startIndex);\n const end = lc.fromIndex(Math.min(endIndex, source.length - 1));\n // Plugging ourselves into @babel/code-frame since this is how\n // the babel parser can print where the parsing error occured.\n // https://github.com/prettier/prettier/blob/cd4a57b113177c105a7ceb94e71f3a5a53535b81/src/main/parser.js\n this.loc = {\n start: {\n line: start.line,\n column: start.col,\n },\n end: {\n line: end.line,\n column: end.col,\n },\n };\n }\n}\nexports.LiquidHTMLASTParsingError = LiquidHTMLASTParsingError;\n//# sourceMappingURL=errors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TAGS_WITHOUT_MARKUP = exports.VOID_ELEMENTS = exports.RAW_TAGS = exports.BLOCKS = exports.placeholderGrammars = exports.tolerantGrammars = exports.strictGrammars = exports.LiquidDocGrammar = exports.TextNodeGrammar = exports.liquidHtmlGrammars = void 0;\nconst ohm_js_1 = require(\"ohm-js\");\nexports.liquidHtmlGrammars = (0, ohm_js_1.grammars)(require('../grammar/liquid-html.ohm.js'));\nexports.TextNodeGrammar = exports.liquidHtmlGrammars['Helpers'];\nexports.LiquidDocGrammar = exports.liquidHtmlGrammars['LiquidDoc'];\nexports.strictGrammars = {\n Liquid: exports.liquidHtmlGrammars['StrictLiquid'],\n LiquidHTML: exports.liquidHtmlGrammars['StrictLiquidHTML'],\n LiquidStatement: exports.liquidHtmlGrammars['StrictLiquidStatement'],\n};\nexports.tolerantGrammars = {\n Liquid: exports.liquidHtmlGrammars['Liquid'],\n LiquidHTML: exports.liquidHtmlGrammars['LiquidHTML'],\n LiquidStatement: exports.liquidHtmlGrammars['LiquidStatement'],\n};\nexports.placeholderGrammars = {\n Liquid: exports.liquidHtmlGrammars['WithPlaceholderLiquid'],\n LiquidHTML: exports.liquidHtmlGrammars['WithPlaceholderLiquidHTML'],\n LiquidStatement: exports.liquidHtmlGrammars['WithPlaceholderLiquidStatement'],\n};\n// see ../../grammar/liquid-html.ohm for full list\nexports.BLOCKS = exports.strictGrammars.LiquidHTML.rules.blockName.body.factors[0].terms.map((x) => x.obj);\n// see ../../grammar/liquid-html.ohm for full list\nexports.RAW_TAGS = exports.strictGrammars.LiquidHTML.rules.liquidRawTag.body.terms\n .map((term) => term.args[0].obj)\n .concat('comment');\n// see ../../grammar/liquid-html.ohm for full list\nexports.VOID_ELEMENTS = exports.strictGrammars.LiquidHTML.rules.voidElementName.body.factors[0].terms.map((x) => x.args[0].obj);\nexports.TAGS_WITHOUT_MARKUP = [\n 'style',\n 'schema',\n 'javascript',\n 'else',\n 'break',\n 'continue',\n 'comment',\n 'raw',\n 'doc',\n];\n//# sourceMappingURL=grammar.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getConditionalComment = exports.BLOCKS = exports.VOID_ELEMENTS = exports.RAW_TAGS = exports.TAGS_WITHOUT_MARKUP = void 0;\n__exportStar(require(\"./stage-2-ast\"), exports);\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./errors\"), exports);\nvar grammar_1 = require(\"./grammar\");\nObject.defineProperty(exports, \"TAGS_WITHOUT_MARKUP\", { enumerable: true, get: function () { return grammar_1.TAGS_WITHOUT_MARKUP; } });\nObject.defineProperty(exports, \"RAW_TAGS\", { enumerable: true, get: function () { return grammar_1.RAW_TAGS; } });\nObject.defineProperty(exports, \"VOID_ELEMENTS\", { enumerable: true, get: function () { return grammar_1.VOID_ELEMENTS; } });\nObject.defineProperty(exports, \"BLOCKS\", { enumerable: true, get: function () { return grammar_1.BLOCKS; } });\nvar conditional_comment_1 = require(\"./conditional-comment\");\nObject.defineProperty(exports, \"getConditionalComment\", { enumerable: true, get: function () { return conditional_comment_1.getConditionalComment; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * This is the first stage of the parser.\n *\n * Input:\n * Source code: string\n *\n * Output:\n * Concrete Syntax Tree (CST): LiquidHtmlCST\n *\n * We use OhmJS's toAST method to turn the OhmJS nodes into an \"almost-AST.\" We\n * call that a Concrete Syntax Tree because it considers Open and Close nodes as\n * separate nodes.\n *\n * It is mostly \"flat.\"\n *\n * e.g.\n * {% if cond %}hi <em>there!</em>{% endif %}\n *\n * becomes\n * - LiquidTagOpen/if\n * condition: LiquidVariableExpression/cond\n * - TextNode/\"hi \"\n * - HtmlTagOpen/em\n * - TextNode/\"there!\"\n * - HtmlTagClose/em\n * - LiquidTagClose/if\n *\n * In the Concrete Syntax Tree, all nodes are siblings instead of having a\n * parent/children relationship.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidLiteralValues = exports.ConcreteNodeTypes = void 0;\nexports.toLiquidHtmlCST = toLiquidHtmlCST;\nexports.toLiquidCST = toLiquidCST;\nconst extras_1 = require(\"ohm-js/extras\");\nconst grammar_1 = require(\"./grammar\");\nconst errors_1 = require(\"./errors\");\nconst types_1 = require(\"./types\");\nvar ConcreteNodeTypes;\n(function (ConcreteNodeTypes) {\n ConcreteNodeTypes[\"HtmlDoctype\"] = \"HtmlDoctype\";\n ConcreteNodeTypes[\"HtmlComment\"] = \"HtmlComment\";\n ConcreteNodeTypes[\"HtmlRawTag\"] = \"HtmlRawTag\";\n ConcreteNodeTypes[\"HtmlVoidElement\"] = \"HtmlVoidElement\";\n ConcreteNodeTypes[\"HtmlSelfClosingElement\"] = \"HtmlSelfClosingElement\";\n ConcreteNodeTypes[\"HtmlTagOpen\"] = \"HtmlTagOpen\";\n ConcreteNodeTypes[\"HtmlTagClose\"] = \"HtmlTagClose\";\n ConcreteNodeTypes[\"AttrSingleQuoted\"] = \"AttrSingleQuoted\";\n ConcreteNodeTypes[\"AttrDoubleQuoted\"] = \"AttrDoubleQuoted\";\n ConcreteNodeTypes[\"AttrUnquoted\"] = \"AttrUnquoted\";\n ConcreteNodeTypes[\"AttrEmpty\"] = \"AttrEmpty\";\n ConcreteNodeTypes[\"LiquidVariableOutput\"] = \"LiquidVariableOutput\";\n ConcreteNodeTypes[\"LiquidRawTag\"] = \"LiquidRawTag\";\n ConcreteNodeTypes[\"LiquidTag\"] = \"LiquidTag\";\n ConcreteNodeTypes[\"LiquidTagOpen\"] = \"LiquidTagOpen\";\n ConcreteNodeTypes[\"LiquidTagClose\"] = \"LiquidTagClose\";\n ConcreteNodeTypes[\"TextNode\"] = \"TextNode\";\n ConcreteNodeTypes[\"YAMLFrontmatter\"] = \"YAMLFrontmatter\";\n ConcreteNodeTypes[\"LiquidVariable\"] = \"LiquidVariable\";\n ConcreteNodeTypes[\"LiquidFilter\"] = \"LiquidFilter\";\n ConcreteNodeTypes[\"NamedArgument\"] = \"NamedArgument\";\n ConcreteNodeTypes[\"LiquidLiteral\"] = \"LiquidLiteral\";\n ConcreteNodeTypes[\"VariableLookup\"] = \"VariableLookup\";\n ConcreteNodeTypes[\"BooleanExpression\"] = \"BooleanExpression\";\n ConcreteNodeTypes[\"String\"] = \"String\";\n ConcreteNodeTypes[\"Number\"] = \"Number\";\n ConcreteNodeTypes[\"Range\"] = \"Range\";\n ConcreteNodeTypes[\"Comparison\"] = \"Comparison\";\n ConcreteNodeTypes[\"Condition\"] = \"Condition\";\n ConcreteNodeTypes[\"AssignMarkup\"] = \"AssignMarkup\";\n ConcreteNodeTypes[\"ContentForMarkup\"] = \"ContentForMarkup\";\n ConcreteNodeTypes[\"CycleMarkup\"] = \"CycleMarkup\";\n ConcreteNodeTypes[\"ForMarkup\"] = \"ForMarkup\";\n ConcreteNodeTypes[\"RenderMarkup\"] = \"RenderMarkup\";\n ConcreteNodeTypes[\"PaginateMarkup\"] = \"PaginateMarkup\";\n ConcreteNodeTypes[\"RenderVariableExpression\"] = \"RenderVariableExpression\";\n ConcreteNodeTypes[\"RenderAliasExpression\"] = \"RenderAliasExpression\";\n ConcreteNodeTypes[\"ContentForNamedArgument\"] = \"ContentForNamedArgument\";\n ConcreteNodeTypes[\"LiquidDocParamNode\"] = \"LiquidDocParamNode\";\n ConcreteNodeTypes[\"LiquidDocParamNameNode\"] = \"LiquidDocParamNameNode\";\n ConcreteNodeTypes[\"LiquidDocDescriptionNode\"] = \"LiquidDocDescriptionNode\";\n ConcreteNodeTypes[\"LiquidDocExampleNode\"] = \"LiquidDocExampleNode\";\n ConcreteNodeTypes[\"LiquidDocPromptNode\"] = \"LiquidDocPromptNode\";\n})(ConcreteNodeTypes || (exports.ConcreteNodeTypes = ConcreteNodeTypes = {}));\nexports.LiquidLiteralValues = {\n nil: null,\n null: null,\n true: true,\n false: false,\n blank: '',\n empty: '',\n};\nconst markup = (i) => (tokens) => tokens[i].sourceString.trim();\nconst markupTrimEnd = (i) => (tokens) => tokens[i].sourceString.trimEnd();\nconst Grammars = {\n strict: grammar_1.strictGrammars,\n tolerant: grammar_1.tolerantGrammars,\n completion: grammar_1.placeholderGrammars,\n};\nfunction toLiquidHtmlCST(source, options = { mode: 'tolerant' }) {\n const grammars = Grammars[options.mode];\n const grammar = grammars.LiquidHTML;\n return toCST(source, grammars, grammar, [\n 'HelperMappings',\n 'LiquidMappings',\n 'LiquidHTMLMappings',\n ]);\n}\nfunction toLiquidCST(source, options = { mode: 'tolerant' }) {\n const grammars = Grammars[options.mode];\n const grammar = grammars.Liquid;\n return toCST(source, grammars, grammar, ['HelperMappings', 'LiquidMappings']);\n}\nfunction toCST(source /* the original file */, grammars, grammar, cstMappings, matchingSource = source /* for subtree parsing */, offset = 0 /* for subtree parsing location offsets */) {\n // When we switch parser, our locStart and locEnd functions must account\n // for the offset of the {% liquid %} markup\n const locStart = (tokens) => offset + tokens[0].source.startIdx;\n const locEnd = (tokens) => offset + tokens[tokens.length - 1].source.endIdx;\n const locEndSecondToLast = (tokens) => offset + tokens[tokens.length - 2].source.endIdx;\n const textNode = {\n type: ConcreteNodeTypes.TextNode,\n value: function () {\n return this.sourceString;\n },\n locStart,\n locEnd,\n source,\n };\n const res = grammar.match(matchingSource, 'Node');\n if (res.failed()) {\n throw new errors_1.LiquidHTMLCSTParsingError(res);\n }\n const HelperMappings = {\n Node: 0,\n TextNode: textNode,\n orderedListOf: 0,\n empty: () => null,\n nonemptyOrderedListOf: 0,\n nonemptyOrderedListOfBoth(nonemptyListOfA, _sep, nonemptyListOfB) {\n const self = this;\n return nonemptyListOfA\n .toAST(self.args.mapping)\n .concat(nonemptyListOfB.toAST(self.args.mapping));\n },\n };\n const LiquidMappings = {\n liquidNode: 0,\n liquidRawTag: 0,\n liquidRawTagImpl: {\n type: ConcreteNodeTypes.LiquidRawTag,\n name: 3,\n body: 9,\n children: (tokens) => {\n const nameNode = tokens[3];\n const rawMarkupStringNode = tokens[9];\n switch (nameNode.sourceString) {\n // {% schema %} parses its content as a string and should not be visited\n case 'schema':\n // {% raw %} accepts syntax errors, we shouldn't try to parse that\n case 'raw': {\n return toCST(source, grammars, grammar_1.TextNodeGrammar, ['HelperMappings'], rawMarkupStringNode.sourceString, offset + rawMarkupStringNode.source.startIdx);\n }\n // {% style %} actually parses its child nodes, so they are part of the AST\n // {% javascript %}, {% stylesheet %} don't, but we want to flag folks that\n // those are not supported in StaticStylesheetAndJavascriptTags, so we put\n // them in the AST\n default: {\n return toCST(source, grammars, grammars.Liquid, ['HelperMappings', 'LiquidMappings'], rawMarkupStringNode.sourceString, offset + rawMarkupStringNode.source.startIdx);\n }\n }\n },\n markup: 6,\n whitespaceStart: 1,\n whitespaceEnd: 7,\n delimiterWhitespaceStart: 11,\n delimiterWhitespaceEnd: 17,\n locStart,\n locEnd,\n source,\n blockStartLocStart: (tokens) => tokens[0].source.startIdx,\n blockStartLocEnd: (tokens) => tokens[8].source.endIdx,\n blockEndLocStart: (tokens) => tokens[10].source.startIdx,\n blockEndLocEnd: (tokens) => tokens[18].source.endIdx,\n },\n liquidBlockComment: {\n type: ConcreteNodeTypes.LiquidRawTag,\n name: 'comment',\n body: (tokens) => tokens[1].sourceString,\n children: (tokens) => {\n return toCST(source, grammars, grammar_1.TextNodeGrammar, ['HelperMappings'], tokens[1].sourceString, offset + tokens[1].source.startIdx);\n },\n whitespaceStart: (tokens) => tokens[0].children[1].sourceString,\n whitespaceEnd: (tokens) => tokens[0].children[7].sourceString,\n delimiterWhitespaceStart: (tokens) => tokens[2].children[1].sourceString,\n delimiterWhitespaceEnd: (tokens) => tokens[2].children[7].sourceString,\n locStart,\n locEnd,\n source,\n blockStartLocStart: (tokens) => tokens[0].source.startIdx,\n blockStartLocEnd: (tokens) => tokens[0].source.endIdx,\n blockEndLocStart: (tokens) => tokens[2].source.startIdx,\n blockEndLocEnd: (tokens) => tokens[2].source.endIdx,\n },\n liquidDoc: {\n type: ConcreteNodeTypes.LiquidRawTag,\n name: 'doc',\n body: (tokens) => tokens[1].sourceString,\n children: (tokens) => {\n const contentNode = tokens[1];\n return toLiquidDocAST(source, contentNode.sourceString, offset + contentNode.source.startIdx);\n },\n whitespaceStart: (tokens) => tokens[0].children[1].sourceString,\n whitespaceEnd: (tokens) => tokens[0].children[7].sourceString,\n delimiterWhitespaceStart: (tokens) => { var _a; return ((_a = tokens[2].children[1]) === null || _a === void 0 ? void 0 : _a.sourceString) || ''; },\n delimiterWhitespaceEnd: (tokens) => { var _a; return ((_a = tokens[2].children[7]) === null || _a === void 0 ? void 0 : _a.sourceString) || ''; },\n locStart,\n locEnd,\n source,\n blockStartLocStart: (tokens) => tokens[0].source.startIdx,\n blockStartLocEnd: (tokens) => tokens[0].source.endIdx,\n blockEndLocStart: (tokens) => tokens[2].source.startIdx,\n blockEndLocEnd: (tokens) => tokens[2].source.endIdx,\n },\n liquidInlineComment: {\n type: ConcreteNodeTypes.LiquidTag,\n name: 3,\n markup: markupTrimEnd(5),\n whitespaceStart: 1,\n whitespaceEnd: 6,\n locStart,\n locEnd,\n source,\n },\n liquidTagOpen: 0,\n liquidTagOpenStrict: 0,\n liquidTagOpenBaseCase: 0,\n liquidTagOpenRule: {\n type: ConcreteNodeTypes.LiquidTagOpen,\n name: 3,\n markup(nodes) {\n const markupNode = nodes[6];\n const nameNode = nodes[3];\n if (types_1.NamedTags.hasOwnProperty(nameNode.sourceString)) {\n return markupNode.toAST(this.args.mapping);\n }\n return markupNode.sourceString.trim();\n },\n whitespaceStart: 1,\n whitespaceEnd: 7,\n locStart,\n locEnd,\n source,\n },\n liquidTagOpenCapture: 0,\n liquidTagOpenForm: 0,\n liquidTagOpenFormMarkup: 0,\n liquidTagOpenFor: 0,\n liquidTagOpenForMarkup: {\n type: ConcreteNodeTypes.ForMarkup,\n variableName: 0,\n collection: 4,\n reversed: 6,\n args: 8,\n locStart,\n locEnd,\n source,\n },\n liquidTagBreak: 0,\n liquidTagContinue: 0,\n liquidTagOpenTablerow: 0,\n liquidTagOpenPaginate: 0,\n liquidTagOpenPaginateMarkup: {\n type: ConcreteNodeTypes.PaginateMarkup,\n collection: 0,\n pageSize: 4,\n args: 6,\n locStart,\n locEnd,\n source,\n },\n liquidTagOpenCase: 0,\n liquidTagOpenCaseMarkup: 0,\n liquidTagWhen: 0,\n liquidTagWhenMarkup: 0,\n liquidTagOpenIf: 0,\n liquidTagOpenUnless: 0,\n liquidTagElsif: 0,\n liquidTagElse: 0,\n liquidTagOpenConditionalMarkup: 0,\n condition: {\n type: ConcreteNodeTypes.Condition,\n relation: 0,\n expression: 2,\n locStart,\n locEnd,\n source,\n },\n comparison: {\n type: ConcreteNodeTypes.Comparison,\n comparator: 2,\n left: 0,\n right: 4,\n locStart,\n locEnd,\n source,\n },\n liquidTagClose: {\n type: ConcreteNodeTypes.LiquidTagClose,\n name: 4,\n whitespaceStart: 1,\n whitespaceEnd: 7,\n locStart,\n locEnd,\n source,\n },\n liquidTag: 0,\n liquidTagStrict: 0,\n liquidTagBaseCase: 0,\n liquidTagAssign: 0,\n liquidTagEcho: 0,\n liquidTagContentFor: 0,\n liquidTagCycle: 0,\n liquidTagIncrement: 0,\n liquidTagDecrement: 0,\n liquidTagRender: 0,\n liquidTagInclude: 0,\n liquidTagSection: 0,\n liquidTagSections: 0,\n liquidTagLayout: 0,\n liquidTagRule: {\n type: ConcreteNodeTypes.LiquidTag,\n name: 3,\n markup(nodes) {\n const markupNode = nodes[6];\n const nameNode = nodes[3];\n if (types_1.NamedTags.hasOwnProperty(nameNode.sourceString)) {\n return markupNode.toAST(this.args.mapping);\n }\n return markupNode.sourceString.trim();\n },\n whitespaceStart: 1,\n whitespaceEnd: 7,\n source,\n locStart,\n locEnd,\n },\n liquidTagLiquid: 0,\n liquidTagLiquidMarkup(tagMarkup) {\n return toCST(source, grammars, grammars.LiquidStatement, ['HelperMappings', 'LiquidMappings', 'LiquidStatement'], tagMarkup.sourceString, offset + tagMarkup.source.startIdx);\n },\n liquidTagEchoMarkup: 0,\n liquidTagSectionMarkup: 0,\n liquidTagSectionsMarkup: 0,\n liquidTagLayoutMarkup: 0,\n liquidTagAssignMarkup: {\n type: ConcreteNodeTypes.AssignMarkup,\n name: 0,\n value: 4,\n locStart,\n locEnd,\n source,\n },\n liquidTagCycleMarkup: {\n type: ConcreteNodeTypes.CycleMarkup,\n groupName: 0,\n args: 3,\n locStart,\n locEnd,\n source,\n },\n liquidTagContentForMarkup: {\n type: ConcreteNodeTypes.ContentForMarkup,\n contentForType: 0,\n args: 2,\n locStart,\n locEnd,\n source,\n },\n contentForType: 0,\n liquidTagRenderMarkup: {\n type: ConcreteNodeTypes.RenderMarkup,\n snippet: 0,\n variable: 1,\n alias: 2,\n renderArguments: 3,\n locStart,\n locEnd,\n source,\n },\n renderArguments: 1,\n completionModeRenderArguments: function (_0, namedArguments, _2, _3, _4, _5, variableLookup, _7) {\n const self = this;\n // variableLookup.sourceString can be '' when there are no incomplete params\n return namedArguments\n .toAST(self.args.mapping)\n .concat(variableLookup.sourceString === '' ? [] : variableLookup.toAST(self.args.mapping));\n },\n snippetExpression: 0,\n renderVariableExpression: {\n type: ConcreteNodeTypes.RenderVariableExpression,\n kind: 1,\n name: 3,\n locStart,\n locEnd,\n source,\n },\n renderAliasExpression: {\n type: ConcreteNodeTypes.RenderAliasExpression,\n value: 3,\n locStart,\n locEnd,\n source,\n },\n liquidDrop: {\n type: ConcreteNodeTypes.LiquidVariableOutput,\n markup: 3,\n whitespaceStart: 1,\n whitespaceEnd: 4,\n locStart,\n locEnd,\n source,\n },\n liquidDropCases: 0,\n liquidExpression: 0,\n liquidComplexExpression: 0,\n liquidDropBaseCase: (sw) => sw.sourceString.trimEnd(),\n liquidVariable: {\n type: ConcreteNodeTypes.LiquidVariable,\n expression: 0,\n filters: 1,\n rawSource: (tokens) => source.slice(locStart(tokens), tokens[tokens.length - 2].source.endIdx).trimEnd(),\n locStart,\n // The last node of this rule is a positive lookahead, we don't\n // want its endIdx, we want the endIdx of the previous one.\n locEnd: locEndSecondToLast,\n source,\n },\n liquidFilter: {\n type: ConcreteNodeTypes.LiquidFilter,\n name: 3,\n locStart,\n locEnd,\n source,\n args(nodes) {\n // Traditinally, this would get transformed into null or array. But\n // it's better if we have an empty array instead of null here.\n if (nodes[7].sourceString === '') {\n return [];\n }\n else {\n return nodes[7].toAST(this.args.mapping);\n }\n },\n },\n filterArguments: 0,\n arguments: 0,\n complexArguments: function (completeParams, _space1, _comma, _space2, incompleteParam) {\n const self = this;\n return completeParams\n .toAST(self.args.mapping)\n .concat(incompleteParam.sourceString === '' ? [] : incompleteParam.toAST(self.args.mapping));\n },\n simpleArgument: 0,\n tagArguments: 0,\n contentForTagArgument: 0,\n completionModeContentForTagArgument: function (namedArguments, _separator, variableLookup) {\n const self = this;\n return namedArguments\n .toAST(self.args.mapping)\n .concat(variableLookup.sourceString === '' ? [] : variableLookup.toAST(self.args.mapping));\n },\n positionalArgument: 0,\n namedArgument: {\n type: ConcreteNodeTypes.NamedArgument,\n name: 0,\n value: 4,\n locStart,\n locEnd,\n source,\n },\n contentForNamedArgument: {\n type: ConcreteNodeTypes.NamedArgument,\n name: (node) => node[0].sourceString + node[1].sourceString,\n value: 6,\n locStart,\n locEnd,\n source,\n },\n liquidBooleanExpression(initialCondition, subsequentConditions) {\n const initialConditionAst = initialCondition.toAST(this.args.mapping);\n const subsequentConditionAsts = subsequentConditions.toAST(this.args.mapping);\n // liquidBooleanExpression can capture too much. If there are no comparisons (e.g. `==`, `>`, etc.)\n // and we only have a single condition (i.e. no `and` or `or` operators), we can return the expression directly.\n if (subsequentConditionAsts.length === 0 &&\n initialConditionAst.expression.type !== ConcreteNodeTypes.Comparison) {\n return initialConditionAst.expression;\n }\n const asts = [initialConditionAst, ...subsequentConditionAsts];\n return {\n type: ConcreteNodeTypes.BooleanExpression,\n conditions: asts,\n locStart: asts.at(0).locStart,\n locEnd: asts.at(-1).locEnd,\n source,\n };\n },\n booleanExpressionCondition: {\n type: ConcreteNodeTypes.Condition,\n relation: null,\n expression: 0,\n locStart,\n locEnd,\n source,\n },\n booleanExpressionSubsequentCondition: {\n type: ConcreteNodeTypes.Condition,\n relation: 1,\n expression: 3,\n locStart,\n locEnd,\n source,\n },\n liquidString: 0,\n liquidDoubleQuotedString: {\n type: ConcreteNodeTypes.String,\n single: () => false,\n value: 1,\n locStart,\n locEnd,\n source,\n },\n liquidSingleQuotedString: {\n type: ConcreteNodeTypes.String,\n single: () => true,\n value: 1,\n locStart,\n locEnd,\n source,\n },\n liquidNumber: {\n type: ConcreteNodeTypes.Number,\n value: 0,\n locStart,\n locEnd,\n source,\n },\n liquidLiteral: {\n type: ConcreteNodeTypes.LiquidLiteral,\n value: (tokens) => {\n const keyword = tokens[0].sourceString;\n return exports.LiquidLiteralValues[keyword];\n },\n keyword: 0,\n locStart,\n locEnd,\n source,\n },\n liquidRange: {\n type: ConcreteNodeTypes.Range,\n start: 2,\n end: 6,\n locStart,\n locEnd,\n source,\n },\n liquidVariableLookup: {\n type: ConcreteNodeTypes.VariableLookup,\n name: 0,\n lookups: 1,\n locStart,\n locEnd,\n source,\n },\n variableSegmentAsLookupMarkup: 0,\n variableSegmentAsLookup: {\n type: ConcreteNodeTypes.VariableLookup,\n name: 0,\n lookups: () => [],\n locStart,\n locEnd,\n source,\n },\n lookup: 0,\n indexLookup: 3,\n dotLookup: {\n type: ConcreteNodeTypes.String,\n value: 3,\n locStart: (nodes) => offset + nodes[2].source.startIdx,\n locEnd: (nodes) => offset + nodes[nodes.length - 1].source.endIdx,\n source,\n },\n // trim on both sides\n tagMarkup: (n) => n.sourceString.trim(),\n };\n const LiquidStatement = {\n LiquidStatement: 0,\n liquidTagOpenRule: {\n type: ConcreteNodeTypes.LiquidTagOpen,\n name: 0,\n markup(nodes) {\n const markupNode = nodes[2];\n const nameNode = nodes[0];\n if (types_1.NamedTags.hasOwnProperty(nameNode.sourceString)) {\n return markupNode.toAST(this.args.mapping);\n }\n return markupNode.sourceString.trim();\n },\n whitespaceStart: null,\n whitespaceEnd: null,\n locStart,\n locEnd: locEndSecondToLast,\n source,\n },\n liquidTagClose: {\n type: ConcreteNodeTypes.LiquidTagClose,\n name: 1,\n whitespaceStart: null,\n whitespaceEnd: null,\n locStart,\n locEnd: locEndSecondToLast,\n source,\n },\n liquidTagRule: {\n type: ConcreteNodeTypes.LiquidTag,\n name: 0,\n markup(nodes) {\n const markupNode = nodes[2];\n const nameNode = nodes[0];\n if (types_1.NamedTags.hasOwnProperty(nameNode.sourceString)) {\n return markupNode.toAST(this.args.mapping);\n }\n return markupNode.sourceString.trim();\n },\n whitespaceStart: null,\n whitespaceEnd: null,\n locStart,\n locEnd: locEndSecondToLast,\n source,\n },\n liquidRawTagImpl: {\n type: ConcreteNodeTypes.LiquidRawTag,\n name: 0,\n body: 4,\n children(nodes) {\n return toCST(source, grammars, grammar_1.TextNodeGrammar, ['HelperMappings'], nodes[4].sourceString, offset + nodes[4].source.startIdx);\n },\n whitespaceStart: null,\n whitespaceEnd: null,\n delimiterWhitespaceStart: null,\n delimiterWhitespaceEnd: null,\n locStart,\n locEnd: locEndSecondToLast,\n source,\n blockStartLocStart: (tokens) => offset + tokens[0].source.startIdx,\n blockStartLocEnd: (tokens) => offset + tokens[2].source.endIdx,\n blockEndLocStart: (tokens) => offset + tokens[5].source.startIdx,\n blockEndLocEnd: (tokens) => offset + tokens[5].source.endIdx,\n },\n liquidBlockComment: {\n type: ConcreteNodeTypes.LiquidRawTag,\n name: 'comment',\n body: (tokens) => \n // We want this to behave like LiquidRawTag, so we have to do some\n // shenanigans to make it behave the same while also supporting\n // nested comments\n //\n // We're stripping the newline from the statementSep, that's why we\n // slice(1). Since statementSep = newline (space | newline)*\n tokens[1].sourceString.slice(1) + tokens[2].sourceString,\n children(tokens) {\n const commentSource = tokens[1].sourceString.slice(1) + tokens[2].sourceString;\n return toCST(source, grammars, grammar_1.TextNodeGrammar, ['HelperMappings'], commentSource, offset + tokens[1].source.startIdx + 1);\n },\n whitespaceStart: '',\n whitespaceEnd: '',\n delimiterWhitespaceStart: '',\n delimiterWhitespaceEnd: '',\n locStart,\n locEnd,\n source,\n blockStartLocStart: (tokens) => offset + tokens[0].source.startIdx,\n blockStartLocEnd: (tokens) => offset + tokens[0].source.endIdx,\n blockEndLocStart: (tokens) => offset + tokens[4].source.startIdx,\n blockEndLocEnd: (tokens) => offset + tokens[4].source.endIdx,\n },\n liquidInlineComment: {\n type: ConcreteNodeTypes.LiquidTag,\n name: 0,\n markup: markupTrimEnd(2),\n whitespaceStart: null,\n whitespaceEnd: null,\n locStart,\n locEnd: locEndSecondToLast,\n source,\n },\n };\n const LiquidHTMLMappings = {\n Node(frontmatter, nodes) {\n const self = this;\n const frontmatterNode = frontmatter.sourceString.length === 0 ? [] : [frontmatter.toAST(self.args.mapping)];\n return frontmatterNode.concat(nodes.toAST(self.args.mapping));\n },\n yamlFrontmatter: {\n type: ConcreteNodeTypes.YAMLFrontmatter,\n body: 2,\n locStart,\n locEnd,\n source,\n },\n HtmlDoctype: {\n type: ConcreteNodeTypes.HtmlDoctype,\n legacyDoctypeString: 4,\n locStart,\n locEnd,\n source,\n },\n HtmlComment: {\n type: ConcreteNodeTypes.HtmlComment,\n body: markup(1),\n locStart,\n locEnd,\n source,\n },\n HtmlRawTagImpl: {\n type: ConcreteNodeTypes.HtmlRawTag,\n name: (tokens) => tokens[0].children[1].sourceString,\n attrList(tokens) {\n const mappings = this.args.mapping;\n return tokens[0].children[2].toAST(mappings);\n },\n body: (tokens) => source.slice(tokens[0].source.endIdx, tokens[2].source.startIdx),\n children: (tokens) => {\n const rawMarkup = source.slice(tokens[0].source.endIdx, tokens[2].source.startIdx);\n return toCST(source, grammars, grammars.Liquid, ['HelperMappings', 'LiquidMappings'], rawMarkup, tokens[0].source.endIdx);\n },\n locStart,\n locEnd,\n source,\n blockStartLocStart: (tokens) => tokens[0].source.startIdx,\n blockStartLocEnd: (tokens) => tokens[0].source.endIdx,\n blockEndLocStart: (tokens) => tokens[2].source.startIdx,\n blockEndLocEnd: (tokens) => tokens[2].source.endIdx,\n },\n HtmlVoidElement: {\n type: ConcreteNodeTypes.HtmlVoidElement,\n name: 1,\n attrList: 3,\n locStart,\n locEnd,\n source,\n },\n HtmlSelfClosingElement: {\n type: ConcreteNodeTypes.HtmlSelfClosingElement,\n name: 1,\n attrList: 2,\n locStart,\n locEnd,\n source,\n },\n HtmlTagOpen: {\n type: ConcreteNodeTypes.HtmlTagOpen,\n name: 1,\n attrList: 2,\n locStart,\n locEnd,\n source,\n },\n HtmlTagClose: {\n type: ConcreteNodeTypes.HtmlTagClose,\n name: 1,\n locStart,\n locEnd,\n source,\n },\n leadingTagNamePart: 0,\n leadingTagNameTextNode: textNode,\n trailingTagNamePart: 0,\n trailingTagNameTextNode: textNode,\n tagName(leadingPart, trailingParts) {\n const mappings = this.args.mapping;\n return [leadingPart.toAST(mappings)].concat(trailingParts.toAST(mappings));\n },\n AttrUnquoted: {\n type: ConcreteNodeTypes.AttrUnquoted,\n name: 0,\n value: 2,\n locStart,\n locEnd,\n source,\n },\n AttrSingleQuoted: {\n type: ConcreteNodeTypes.AttrSingleQuoted,\n name: 0,\n value: 3,\n locStart,\n locEnd,\n source,\n },\n AttrDoubleQuoted: {\n type: ConcreteNodeTypes.AttrDoubleQuoted,\n name: 0,\n value: 3,\n locStart,\n locEnd,\n source,\n },\n attrEmpty: {\n type: ConcreteNodeTypes.AttrEmpty,\n name: 0,\n locStart,\n locEnd,\n source,\n },\n attrName: 0,\n attrNameTextNode: textNode,\n attrDoubleQuotedValue: 0,\n attrSingleQuotedValue: 0,\n attrUnquotedValue: 0,\n attrDoubleQuotedTextNode: textNode,\n attrSingleQuotedTextNode: textNode,\n attrUnquotedTextNode: textNode,\n };\n const defaultMappings = {\n HelperMappings,\n LiquidMappings,\n LiquidHTMLMappings,\n LiquidStatement,\n };\n const selectedMappings = cstMappings.reduce((mappings, key) => ({\n ...mappings,\n ...defaultMappings[key],\n }), {});\n return (0, extras_1.toAST)(res, selectedMappings);\n}\n/**\n * Builds an AST for LiquidDoc content.\n *\n * `toCST` includes mappings and logic that are not needed for LiquidDoc so we're separating this logic\n */\nfunction toLiquidDocAST(source, matchingSource, offset) {\n // When we switch parser, our locStart and locEnd functions must account\n // for the offset of the {% doc %} markup\n const locStart = (tokens) => offset + tokens[0].source.startIdx;\n const locEnd = (tokens) => offset + tokens[tokens.length - 1].source.endIdx;\n const res = grammar_1.LiquidDocGrammar.match(matchingSource, 'Node');\n if (res.failed()) {\n throw new errors_1.LiquidHTMLCSTParsingError(res);\n }\n /**\n * Reusable text node type\n */\n const textNode = () => ({\n type: ConcreteNodeTypes.TextNode,\n value: function () {\n return this.sourceString;\n },\n locStart,\n locEnd,\n source,\n });\n const LiquidDocMappings = {\n Node(implicitDescription, body) {\n const self = this;\n const implicitDescriptionNode = implicitDescription.sourceString.length === 0\n ? []\n : [implicitDescription.toAST(self.args.mapping)];\n return implicitDescriptionNode.concat(body.toAST(self.args.mapping));\n },\n ImplicitDescription: {\n type: ConcreteNodeTypes.LiquidDocDescriptionNode,\n name: 'description',\n locStart,\n locEnd,\n source,\n content: 0,\n isImplicit: true,\n isInline: true,\n },\n TextNode: textNode(),\n paramNode: {\n type: ConcreteNodeTypes.LiquidDocParamNode,\n name: 'param',\n locStart,\n locEnd,\n source,\n paramType: 2,\n paramName: 4,\n paramDescription: 8,\n },\n descriptionNode: {\n type: ConcreteNodeTypes.LiquidDocDescriptionNode,\n name: 'description',\n locStart,\n locEnd,\n source,\n content: 2,\n isImplicit: false,\n isInline: function () {\n return !this.children[1].sourceString.includes('\\n');\n },\n },\n descriptionContent: textNode(),\n paramType: 2,\n paramTypeContent: textNode(),\n paramName: {\n type: ConcreteNodeTypes.LiquidDocParamNameNode,\n content: 0,\n locStart,\n locEnd,\n source,\n required: true,\n },\n optionalParamName: {\n type: ConcreteNodeTypes.LiquidDocParamNameNode,\n content: 2,\n locStart,\n locEnd,\n source,\n required: false,\n },\n paramDescription: textNode(),\n exampleNode: {\n type: ConcreteNodeTypes.LiquidDocExampleNode,\n name: 'example',\n locStart,\n locEnd,\n source,\n content: 2,\n isInline: function () {\n return !this.children[1].sourceString.includes('\\n');\n },\n },\n promptNode: {\n type: ConcreteNodeTypes.LiquidDocPromptNode,\n name: 'prompt',\n locStart,\n locEnd,\n source,\n content: 1,\n },\n multilineTextContent: textNode(),\n textValue: textNode(),\n fallbackNode: textNode(),\n };\n return (0, extras_1.toAST)(res, LiquidDocMappings);\n}\n//# sourceMappingURL=stage-1-cst.js.map","\"use strict\";\n/**\n * This is the second stage of the parser.\n *\n * Input:\n * - A Concrete Syntax Tree (CST)\n *\n * Output:\n * - An Abstract Syntax Tree (AST)\n *\n * This stage traverses the flat tree we get from the previous stage and\n * establishes the parent/child relationship between the nodes.\n *\n * Recall the Liquid example we had in the first stage:\n * {% if cond %}hi <em>there!</em>{% endif %}\n *\n * Whereas the previous stage gives us this CST:\n * - LiquidTagOpen/if\n * condition: LiquidVariableExpression/cond\n * - TextNode/\"hi \"\n * - HtmlTagOpen/em\n * - TextNode/\"there!\"\n * - HtmlTagClose/em\n * - LiquidTagClose/if\n *\n * We now traverse all the nodes and turn that into a proper AST:\n * - LiquidTag/if\n * condition: LiquidVariableExpression\n * children:\n * - TextNode/\"hi \"\n * - HtmlElement/em\n * children:\n * - TextNode/\"there!\"\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RawMarkupKinds = void 0;\nexports.isBranchedTag = isBranchedTag;\nexports.toLiquidAST = toLiquidAST;\nexports.toLiquidHtmlAST = toLiquidHtmlAST;\nexports.getName = getName;\nexports.cstToAst = cstToAst;\nexports.walk = walk;\nexports.isLiquidHtmlNode = isLiquidHtmlNode;\nconst stage_1_cst_1 = require(\"./stage-1-cst\");\nconst types_1 = require(\"./types\");\nconst utils_1 = require(\"./utils\");\nconst errors_1 = require(\"./errors\");\nconst grammar_1 = require(\"./grammar\");\nconst stage_1_cst_2 = require(\"./stage-1-cst\");\n/**\n * The infered kind of raw markup\n * - `<script>` is javascript\n * - `<script type=\"application/json\">` is JSON\n * - `<style>` is css\n * - etc.\n */\nvar RawMarkupKinds;\n(function (RawMarkupKinds) {\n RawMarkupKinds[\"css\"] = \"css\";\n RawMarkupKinds[\"html\"] = \"html\";\n RawMarkupKinds[\"javascript\"] = \"javascript\";\n RawMarkupKinds[\"json\"] = \"json\";\n RawMarkupKinds[\"markdown\"] = \"markdown\";\n RawMarkupKinds[\"typescript\"] = \"typescript\";\n RawMarkupKinds[\"text\"] = \"text\";\n})(RawMarkupKinds || (exports.RawMarkupKinds = RawMarkupKinds = {}));\nfunction isBranchedTag(node) {\n return node.type === types_1.NodeTypes.LiquidTag && ['if', 'for', 'unless', 'case'].includes(node.name);\n}\nfunction isConcreteLiquidBranchDisguisedAsTag(node) {\n return node.type === stage_1_cst_1.ConcreteNodeTypes.LiquidTag && ['else', 'elsif', 'when'].includes(node.name);\n}\nfunction toLiquidAST(source, options = {\n allowUnclosedDocumentNode: true,\n mode: 'tolerant',\n}) {\n const cst = (0, stage_1_cst_2.toLiquidCST)(source, { mode: options.mode });\n const root = {\n type: types_1.NodeTypes.Document,\n source: source,\n _source: source, // this can get replaced somewhere else...\n children: cstToAst(cst, options),\n name: '#document',\n position: {\n start: 0,\n end: source.length,\n },\n };\n return root;\n}\nfunction toLiquidHtmlAST(source, options = {\n allowUnclosedDocumentNode: false,\n mode: 'tolerant',\n}) {\n const cst = (0, stage_1_cst_1.toLiquidHtmlCST)(source, { mode: options.mode });\n const root = {\n type: types_1.NodeTypes.Document,\n source: source,\n _source: source,\n children: cstToAst(cst, options),\n name: '#document',\n position: {\n start: 0,\n end: source.length,\n },\n };\n return root;\n}\nclass ASTBuilder {\n constructor(source) {\n this.ast = [];\n this.cursor = [];\n this.source = source;\n }\n // Returns the array to push nodes to.\n get current() {\n return (0, utils_1.deepGet)(this.cursor, this.ast);\n }\n // Returns the position of the current node in the array\n get currentPosition() {\n return (this.current || []).length - 1;\n }\n get parent() {\n if (this.cursor.length == 0)\n return undefined;\n return (0, utils_1.deepGet)((0, utils_1.dropLast)(1, this.cursor), this.ast);\n }\n get grandparent() {\n if (this.cursor.length < 4)\n return undefined;\n return (0, utils_1.deepGet)((0, utils_1.dropLast)(3, this.cursor), this.ast);\n }\n open(node) {\n this.current.push(node);\n this.cursor.push(this.currentPosition);\n this.cursor.push('children');\n if (isBranchedTag(node)) {\n this.open(toUnnamedLiquidBranch(node));\n }\n }\n push(node) {\n if (node.type === types_1.NodeTypes.LiquidBranch) {\n const previousBranch = this.findCloseableParentBranch(node);\n if (previousBranch) {\n previousBranch.blockEndPosition = { start: node.position.start, end: node.position.start };\n // close dangling open HTML nodes\n while (this.parent &&\n this.parent !== previousBranch &&\n this.parent.type === types_1.NodeTypes.HtmlElement) {\n // 0-length blockEndPosition at the position of the next branch\n this.parent.blockEndPosition = { start: node.position.start, end: node.position.start };\n this.closeParentWith(node);\n }\n // close the previous branch\n this.closeParentWith(node);\n }\n this.open(node);\n }\n else {\n this.current.push(node);\n }\n }\n close(node, nodeType) {\n var _a, _b;\n if (isLiquidBranch(this.parent)) {\n this.parent.blockEndPosition = { start: node.locStart, end: node.locStart };\n this.closeParentWith(node);\n }\n if (!this.parent) {\n throw new errors_1.LiquidHTMLASTParsingError(`Attempting to close ${nodeType} '${getName(node)}' before it was opened`, this.source, node.locStart, node.locEnd);\n }\n if (getName(this.parent) !== getName(node) || this.parent.type !== nodeType) {\n const suitableParent = this.findCloseableParentNode(node);\n if (this.parent.type === types_1.NodeTypes.HtmlElement && suitableParent) {\n // close dangling open HTML nodes\n while (this.parent !== suitableParent) {\n // 0-length end block position\n this.parent.blockEndPosition = { start: node.locStart, end: node.locStart };\n this.closeParentWith(node);\n }\n }\n else {\n throw new errors_1.LiquidHTMLASTParsingError(`Attempting to close ${nodeType} '${getName(node)}' before ${this.parent.type} '${getName(this.parent)}' was closed`, this.source, this.parent.position.start, node.locEnd, getUnclosed(this.parent));\n }\n }\n // The parent end is the end of the outer tag.\n this.parent.position.end = node.locEnd;\n this.parent.blockEndPosition = position(node);\n if (this.parent.type == types_1.NodeTypes.LiquidTag && node.type == stage_1_cst_1.ConcreteNodeTypes.LiquidTagClose) {\n this.parent.delimiterWhitespaceStart = (_a = node.whitespaceStart) !== null && _a !== void 0 ? _a : '';\n this.parent.delimiterWhitespaceEnd = (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : '';\n }\n this.cursor.pop();\n this.cursor.pop();\n }\n // This function performs the following tasks:\n // - Tries to find a parent branch to close when pushing a new branch.\n // - This is necessary because we allow unclosed HTML element nodes.\n // - The function traverses up the tree until it finds a LiquidBranch.\n // - If it encounters anything other than an Unclosed HTML Element, it throws.\n findCloseableParentBranch(next) {\n for (let index = this.cursor.length - 1; index > 0; index -= 2) {\n const parent = (0, utils_1.deepGet)(this.cursor.slice(0, index), this.ast);\n const parentProperty = this.cursor[index];\n const isUnclosedHtmlElement = parent.type === types_1.NodeTypes.HtmlElement && parentProperty === 'children';\n if (parent.type === types_1.NodeTypes.LiquidBranch) {\n return parent;\n }\n else if (!isUnclosedHtmlElement) {\n throw new errors_1.LiquidHTMLASTParsingError(`Attempting to open LiquidBranch '${next.name}' before ${parent.type} '${getName(parent)}' was closed`, this.source, parent.position.start, next.position.end);\n }\n }\n return null;\n }\n // Check if there's a parent in the ancestry that this node correctly closes\n findCloseableParentNode(current) {\n for (let index = this.cursor.length - 1; index > 0; index -= 2) {\n const parent = (0, utils_1.deepGet)(this.cursor.slice(0, index), this.ast);\n if (getName(parent) === getName(current) &&\n parent.type === types_1.NodeTypes.LiquidTag &&\n ['if', 'unless', 'case'].includes(parent.name)) {\n return parent;\n }\n else if (parent.type === types_1.NodeTypes.LiquidTag) {\n return null;\n }\n }\n return null;\n }\n // sets the parent's end position to the start of the next one.\n closeParentWith(next) {\n if (this.parent) {\n if ('locStart' in next) {\n this.parent.position.end = next.locStart;\n }\n else {\n this.parent.position.end = next.position.start;\n }\n }\n this.cursor.pop();\n this.cursor.pop();\n }\n}\nfunction isLiquidBranch(node) {\n return !!node && node.type === types_1.NodeTypes.LiquidBranch;\n}\nfunction getName(node) {\n if (!node)\n return null;\n switch (node.type) {\n case types_1.NodeTypes.HtmlElement:\n case types_1.NodeTypes.HtmlDanglingMarkerClose:\n case types_1.NodeTypes.HtmlSelfClosingElement:\n case stage_1_cst_1.ConcreteNodeTypes.HtmlTagClose:\n return node.name\n .map((part) => {\n if (part.type === types_1.NodeTypes.TextNode || part.type == stage_1_cst_1.ConcreteNodeTypes.TextNode) {\n return part.value;\n }\n else if (typeof part.markup === 'string') {\n return `{{${part.markup.trim()}}}`;\n }\n else {\n return `{{${part.markup.rawSource}}}`;\n }\n })\n .join('');\n case types_1.NodeTypes.AttrEmpty:\n case types_1.NodeTypes.AttrUnquoted:\n case types_1.NodeTypes.AttrDoubleQuoted:\n case types_1.NodeTypes.AttrSingleQuoted:\n // <a href=\"{{ hello }}\">\n return node.name\n .map((part) => {\n if (typeof part === 'string') {\n return part;\n }\n else {\n return part.source.slice(part.position.start, part.position.end);\n }\n })\n .join('');\n default:\n return node.name;\n }\n}\nfunction cstToAst(cst, options) {\n var _a;\n if (cst.length === 0)\n return [];\n const builder = buildAst(cst, options);\n if (!options.allowUnclosedDocumentNode && builder.cursor.length !== 0) {\n throw new errors_1.LiquidHTMLASTParsingError(`Attempting to end parsing before ${(_a = builder.parent) === null || _a === void 0 ? void 0 : _a.type} '${getName(builder.parent)}' was closed`, builder.source, builder.source.length - 1, builder.source.length, getUnclosed(builder.parent, builder.grandparent));\n }\n return builder.ast;\n}\nfunction buildAst(cst, options) {\n var _a, _b, _c, _d;\n const builder = new ASTBuilder(cst[0].source);\n for (let i = 0; i < cst.length; i++) {\n const node = cst[i];\n switch (node.type) {\n case stage_1_cst_1.ConcreteNodeTypes.TextNode: {\n builder.push(toTextNode(node));\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.LiquidVariableOutput: {\n builder.push(toLiquidVariableOutput(node));\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.LiquidTagOpen: {\n builder.open(toLiquidTag(node, { ...options, isBlockTag: true }));\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.LiquidTagClose: {\n builder.close(node, types_1.NodeTypes.LiquidTag);\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.LiquidTag: {\n builder.push(toLiquidTag(node, { ...options, isBlockTag: false }));\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.LiquidRawTag: {\n builder.push({\n type: types_1.NodeTypes.LiquidRawTag,\n markup: markup(node.name, node.markup),\n name: node.name,\n body: toRawMarkup(node, options),\n whitespaceStart: (_a = node.whitespaceStart) !== null && _a !== void 0 ? _a : '',\n whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : '',\n delimiterWhitespaceStart: (_c = node.delimiterWhitespaceStart) !== null && _c !== void 0 ? _c : '',\n delimiterWhitespaceEnd: (_d = node.delimiterWhitespaceEnd) !== null && _d !== void 0 ? _d : '',\n position: position(node),\n blockStartPosition: {\n start: node.blockStartLocStart,\n end: node.blockStartLocEnd,\n },\n blockEndPosition: {\n start: node.blockEndLocStart,\n end: node.blockEndLocEnd,\n },\n source: node.source,\n });\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.HtmlTagOpen: {\n builder.open(toHtmlElement(node, options));\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.HtmlTagClose: {\n if (isAcceptableDanglingMarkerClose(builder, cst, i, options.mode)) {\n builder.push(toHtmlDanglingMarkerClose(node, options));\n }\n else {\n builder.close(node, types_1.NodeTypes.HtmlElement);\n }\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.HtmlVoidElement: {\n builder.push(toHtmlVoidElement(node, options));\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.HtmlSelfClosingElement: {\n builder.push(toHtmlSelfClosingElement(node, options));\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.HtmlDoctype: {\n builder.push({\n type: types_1.NodeTypes.HtmlDoctype,\n legacyDoctypeString: node.legacyDoctypeString,\n position: position(node),\n source: node.source,\n });\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.HtmlComment: {\n builder.push({\n type: types_1.NodeTypes.HtmlComment,\n body: node.body,\n position: position(node),\n source: node.source,\n });\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.HtmlRawTag: {\n builder.push({\n type: types_1.NodeTypes.HtmlRawNode,\n name: node.name,\n body: toRawMarkup(node, options),\n attributes: toAttributes(node.attrList || [], options),\n position: position(node),\n source: node.source,\n blockStartPosition: {\n start: node.blockStartLocStart,\n end: node.blockStartLocEnd,\n },\n blockEndPosition: {\n start: node.blockEndLocStart,\n end: node.blockEndLocEnd,\n },\n });\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.AttrEmpty: {\n builder.push({\n type: types_1.NodeTypes.AttrEmpty,\n name: cstToAst(node.name, options),\n position: position(node),\n source: node.source,\n });\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.AttrSingleQuoted:\n case stage_1_cst_1.ConcreteNodeTypes.AttrDoubleQuoted:\n case stage_1_cst_1.ConcreteNodeTypes.AttrUnquoted: {\n const abstractNode = {\n type: node.type,\n name: cstToAst(node.name, options),\n position: position(node),\n source: node.source,\n // placeholders\n attributePosition: { start: -1, end: -1 },\n value: [],\n };\n const value = toAttributeValue(node.value, options);\n abstractNode.value = value;\n abstractNode.attributePosition = toAttributePosition(node, value);\n builder.push(abstractNode);\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.YAMLFrontmatter: {\n builder.push({\n type: types_1.NodeTypes.YAMLFrontmatter,\n body: node.body,\n position: position(node),\n source: node.source,\n });\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.LiquidDocParamNode: {\n builder.push({\n type: types_1.NodeTypes.LiquidDocParamNode,\n name: node.name,\n position: position(node),\n source: node.source,\n paramName: toTextNode(node.paramName.content),\n paramDescription: toNullableTextNode(node.paramDescription),\n paramType: toNullableTextNode(node.paramType),\n required: node.paramName.required,\n });\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.LiquidDocDescriptionNode: {\n builder.push({\n type: types_1.NodeTypes.LiquidDocDescriptionNode,\n name: node.name,\n position: position(node),\n source: node.source,\n content: toTextNode(node.content),\n isImplicit: node.isImplicit,\n isInline: node.isInline,\n });\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.LiquidDocExampleNode: {\n builder.push({\n type: types_1.NodeTypes.LiquidDocExampleNode,\n name: node.name,\n position: position(node),\n source: node.source,\n content: toTextNode(node.content),\n isInline: node.isInline,\n });\n break;\n }\n case stage_1_cst_1.ConcreteNodeTypes.LiquidDocPromptNode: {\n builder.push({\n type: types_1.NodeTypes.LiquidDocPromptNode,\n name: node.name,\n position: position(node),\n source: node.source,\n content: toTextNode(node.content),\n });\n break;\n }\n default: {\n (0, utils_1.assertNever)(node);\n }\n }\n }\n return builder;\n}\nfunction nameLength(names) {\n const start = names.at(0);\n const end = names.at(-1);\n return end.locEnd - start.locStart;\n}\nfunction toAttributePosition(node, value) {\n if (value.length === 0) {\n // This is bugged when there's whitespace on either side. But I don't\n // think it's worth solving.\n return {\n start: node.locStart + nameLength(node.name) + '='.length + '\"'.length,\n // name=\"\"\n // 012345678\n // 0 + 4 + 1 + 1\n // = 6\n end: node.locStart + nameLength(node.name) + '='.length + '\"'.length,\n // name=\"\"\n // 012345678\n // 0 + 4 + 1 + 2\n // = 6\n };\n }\n return {\n start: value[0].position.start,\n end: value[value.length - 1].position.end,\n };\n}\nfunction toAttributeValue(value, options) {\n return cstToAst(value, options);\n}\nfunction toAttributes(attrList, options) {\n return cstToAst(attrList, options);\n}\nfunction liquidTagBaseAttributes(node) {\n var _a, _b;\n return {\n type: types_1.NodeTypes.LiquidTag,\n position: position(node),\n whitespaceStart: (_a = node.whitespaceStart) !== null && _a !== void 0 ? _a : '',\n whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : '',\n blockStartPosition: position(node),\n source: node.source,\n };\n}\nfunction liquidBranchBaseAttributes(node) {\n var _a, _b;\n return {\n type: types_1.NodeTypes.LiquidBranch,\n children: [],\n position: position(node),\n whitespaceStart: (_a = node.whitespaceStart) !== null && _a !== void 0 ? _a : '',\n whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : '',\n blockStartPosition: position(node),\n blockEndPosition: { start: -1, end: -1 },\n source: node.source,\n };\n}\nfunction toLiquidTag(node, options) {\n if (typeof node.markup !== 'string') {\n return toNamedLiquidTag(node, options);\n }\n else if (isConcreteLiquidBranchDisguisedAsTag(node)) {\n // `elsif`, `else`, `case`, but with unparseable markup.\n return toNamedLiquidBranchBaseCase(node);\n }\n else if (options.isBlockTag) {\n return {\n name: node.name,\n markup: markup(node.name, node.markup),\n children: options.isBlockTag ? [] : undefined,\n ...liquidTagBaseAttributes(node),\n };\n }\n return {\n name: node.name,\n markup: markup(node.name, node.markup),\n ...liquidTagBaseAttributes(node),\n };\n}\nfunction toNamedLiquidTag(node, options) {\n switch (node.name) {\n case types_1.NamedTags.echo: {\n return {\n ...liquidTagBaseAttributes(node),\n name: types_1.NamedTags.echo,\n markup: toLiquidVariable(node.markup),\n };\n }\n case types_1.NamedTags.assign: {\n return {\n ...liquidTagBaseAttributes(node),\n name: types_1.NamedTags.assign,\n markup: toAssignMarkup(node.markup),\n };\n }\n case types_1.NamedTags.cycle: {\n return {\n ...liquidTagBaseAttributes(node),\n name: node.name,\n markup: toCycleMarkup(node.markup),\n };\n }\n case types_1.NamedTags.increment:\n case types_1.NamedTags.decrement: {\n return {\n ...liquidTagBaseAttributes(node),\n name: node.name,\n markup: toExpression(node.markup),\n };\n }\n case types_1.NamedTags.capture: {\n return {\n ...liquidTagBaseAttributes(node),\n name: node.name,\n markup: toExpression(node.markup),\n children: [],\n };\n }\n case types_1.NamedTags.content_for: {\n return {\n ...liquidTagBaseAttributes(node),\n name: node.name,\n markup: toContentForMarkup(node.markup),\n };\n }\n case types_1.NamedTags.include:\n case types_1.NamedTags.render: {\n return {\n ...liquidTagBaseAttributes(node),\n name: node.name,\n markup: toRenderMarkup(node.markup),\n };\n }\n case types_1.NamedTags.layout:\n case types_1.NamedTags.section: {\n return {\n ...liquidTagBaseAttributes(node),\n name: node.name,\n markup: toExpression(node.markup),\n };\n }\n case types_1.NamedTags.sections: {\n return {\n ...liquidTagBaseAttributes(node),\n name: node.name,\n markup: toExpression(node.markup),\n };\n }\n case types_1.NamedTags.form: {\n return {\n ...liquidTagBaseAttributes(node),\n name: node.name,\n markup: node.markup.map(toLiquidArgument),\n children: [],\n };\n }\n case types_1.NamedTags.tablerow:\n case types_1.NamedTags.for: {\n return {\n ...liquidTagBaseAttributes(node),\n name: node.name,\n markup: toForMarkup(node.markup),\n children: [],\n };\n }\n case types_1.NamedTags.paginate: {\n return {\n ...liquidTagBaseAttributes(node),\n name: node.name,\n markup: toPaginateMarkup(node.markup),\n children: [],\n };\n }\n case types_1.NamedTags.if:\n case types_1.NamedTags.unless: {\n return {\n ...liquidTagBaseAttributes(node),\n name: node.name,\n markup: toConditionalExpression(node.markup),\n blockEndPosition: { start: -1, end: -1 },\n children: [],\n };\n }\n case types_1.NamedTags.elsif: {\n return {\n ...liquidBranchBaseAttributes(node),\n name: node.name,\n markup: toConditionalExpression(node.markup),\n };\n }\n case types_1.NamedTags.case: {\n return {\n ...liquidTagBaseAttributes(node),\n name: node.name,\n markup: toExpression(node.markup),\n children: [],\n };\n }\n case types_1.NamedTags.when: {\n return {\n ...liquidBranchBaseAttributes(node),\n name: node.name,\n markup: node.markup.map(toExpression),\n };\n }\n case types_1.NamedTags.liquid: {\n return {\n ...liquidTagBaseAttributes(node),\n name: node.name,\n markup: cstToAst(node.markup, options),\n };\n }\n default: {\n return (0, utils_1.assertNever)(node);\n }\n }\n}\nfunction toNamedLiquidBranchBaseCase(node) {\n var _a, _b;\n return {\n name: node.name,\n type: types_1.NodeTypes.LiquidBranch,\n markup: node.name !== 'else' ? node.markup : '', // stripping superfluous else stuff...\n position: { start: node.locStart, end: node.locEnd },\n children: [],\n blockStartPosition: { start: node.locStart, end: node.locEnd },\n blockEndPosition: { start: -1, end: -1 },\n whitespaceStart: (_a = node.whitespaceStart) !== null && _a !== void 0 ? _a : '',\n whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : '',\n source: node.source,\n };\n}\nfunction toUnnamedLiquidBranch(parentNode) {\n return {\n type: types_1.NodeTypes.LiquidBranch,\n name: null,\n markup: '',\n position: { start: parentNode.position.end, end: parentNode.position.end },\n blockStartPosition: { start: parentNode.position.end, end: parentNode.position.end },\n blockEndPosition: { start: -1, end: -1 },\n children: [],\n whitespaceStart: '',\n whitespaceEnd: '',\n source: parentNode.source,\n };\n}\nfunction toAssignMarkup(node) {\n return {\n type: types_1.NodeTypes.AssignMarkup,\n name: node.name,\n value: toLiquidVariable(node.value),\n position: position(node),\n source: node.source,\n };\n}\nfunction toCycleMarkup(node) {\n return {\n type: types_1.NodeTypes.CycleMarkup,\n groupName: node.groupName ? toExpression(node.groupName) : null,\n args: node.args.map(toExpression),\n position: position(node),\n source: node.source,\n };\n}\nfunction toForMarkup(node) {\n return {\n type: types_1.NodeTypes.ForMarkup,\n variableName: node.variableName,\n collection: toExpression(node.collection),\n args: node.args.map(toNamedArgument),\n reversed: !!node.reversed,\n position: position(node),\n source: node.source,\n };\n}\nfunction toPaginateMarkup(node) {\n return {\n type: types_1.NodeTypes.PaginateMarkup,\n collection: toExpression(node.collection),\n pageSize: toExpression(node.pageSize),\n position: position(node),\n args: node.args ? node.args.map(toNamedArgument) : [],\n source: node.source,\n };\n}\nfunction toRawMarkup(node, options) {\n return {\n type: types_1.NodeTypes.RawMarkup,\n kind: toRawMarkupKind(node),\n nodes: cstToAst(node.children, options),\n value: node.body,\n position: {\n start: node.blockStartLocEnd,\n end: node.blockEndLocStart,\n },\n source: node.source,\n };\n}\nfunction toRawMarkupKind(node) {\n switch (node.type) {\n case stage_1_cst_1.ConcreteNodeTypes.HtmlRawTag:\n return toRawMarkupKindFromHtmlNode(node);\n case stage_1_cst_1.ConcreteNodeTypes.LiquidRawTag:\n return toRawMarkupKindFromLiquidNode(node);\n default:\n return (0, utils_1.assertNever)(node);\n }\n}\nconst liquidToken = /(\\{%|\\{\\{)-?/g;\nfunction toRawMarkupKindFromHtmlNode(node) {\n var _a;\n switch (node.name) {\n case 'script': {\n const scriptAttr = (_a = node.attrList) === null || _a === void 0 ? void 0 : _a.find((attr) => 'name' in attr &&\n typeof attr.name !== 'string' &&\n attr.name.length === 1 &&\n attr.name[0].type === stage_1_cst_1.ConcreteNodeTypes.TextNode &&\n attr.name[0].value === 'type');\n if (!scriptAttr ||\n !('value' in scriptAttr) ||\n scriptAttr.value.length === 0 ||\n scriptAttr.value[0].type !== stage_1_cst_1.ConcreteNodeTypes.TextNode) {\n return RawMarkupKinds.javascript;\n }\n const type = scriptAttr.value[0].value;\n if (type === 'text/markdown') {\n return RawMarkupKinds.markdown;\n }\n if (type === 'application/x-typescript') {\n return RawMarkupKinds.typescript;\n }\n if (type === 'text/html') {\n return RawMarkupKinds.html;\n }\n if ((type && (type.endsWith('json') || type.endsWith('importmap'))) ||\n type === 'speculationrules') {\n return RawMarkupKinds.json;\n }\n return RawMarkupKinds.javascript;\n }\n case 'style':\n if (liquidToken.test(node.body)) {\n return RawMarkupKinds.text;\n }\n return RawMarkupKinds.css;\n default:\n return RawMarkupKinds.text;\n }\n}\nfunction toRawMarkupKindFromLiquidNode(node) {\n switch (node.name) {\n case 'javascript':\n return RawMarkupKinds.javascript;\n case 'stylesheet':\n case 'style':\n if (liquidToken.test(node.body)) {\n return RawMarkupKinds.text;\n }\n return RawMarkupKinds.css;\n case 'schema':\n return RawMarkupKinds.json;\n default:\n return RawMarkupKinds.text;\n }\n}\nfunction toContentForMarkup(node) {\n return {\n type: types_1.NodeTypes.ContentForMarkup,\n contentForType: toExpression(node.contentForType),\n /**\n * When we're in completion mode we won't necessarily have valid named\n * arguments so we need to call toLiquidArgument instead of toNamedArgument.\n * We cast using `as` so that this doesn't affect the type system used in\n * other areas (like theme check) for a scenario that only occurs in\n * completion mode. This means that our types are *wrong* in completion mode\n * but this is the compromise we're making to get completions to work.\n */\n args: node.args.map(toLiquidArgument),\n position: position(node),\n source: node.source,\n };\n}\nfunction toRenderMarkup(node) {\n return {\n type: types_1.NodeTypes.RenderMarkup,\n snippet: toExpression(node.snippet),\n alias: toRenderAliasExpression(node.alias),\n variable: toRenderVariableExpression(node.variable),\n /**\n * When we're in completion mode we won't necessarily have valid named\n * arguments so we need to call toLiquidArgument instead of toNamedArgument.\n * We cast using `as` so that this doesn't affect the type system used in\n * other areas (like theme check) for a scenario that only occurs in\n * completion mode. This means that our types are *wrong* in completion mode\n * but this is the compromise we're making to get completions to work.\n */\n args: node.renderArguments.map(toLiquidArgument),\n position: position(node),\n source: node.source,\n };\n}\nfunction toRenderVariableExpression(node) {\n if (!node)\n return null;\n return {\n type: types_1.NodeTypes.RenderVariableExpression,\n kind: node.kind,\n name: toExpression(node.name),\n position: position(node),\n source: node.source,\n };\n}\nfunction toRenderAliasExpression(node) {\n if (!node)\n return null;\n return {\n type: types_1.NodeTypes.RenderAliasExpression,\n value: node.value,\n position: position(node),\n source: node.source,\n };\n}\nfunction toConditionalExpression(nodes) {\n if (nodes.length === 1) {\n return toComparisonOrExpression(nodes[0]);\n }\n const [first, second] = nodes;\n const [, ...rest] = nodes;\n return {\n type: types_1.NodeTypes.LogicalExpression,\n relation: second.relation,\n left: toComparisonOrExpression(first),\n right: toConditionalExpression(rest),\n position: {\n start: first.locStart,\n end: nodes[nodes.length - 1].locEnd,\n },\n source: first.source,\n };\n}\nfunction toComparisonOrExpression(node) {\n const expression = node.expression;\n switch (expression.type) {\n case stage_1_cst_1.ConcreteNodeTypes.Comparison:\n return toComparison(expression);\n default:\n return toExpression(expression);\n }\n}\nfunction toComparison(node) {\n return {\n type: types_1.NodeTypes.Comparison,\n comparator: node.comparator,\n left: toExpression(node.left),\n right: toExpression(node.right),\n position: position(node),\n source: node.source,\n };\n}\nfunction toLiquidVariableOutput(node) {\n var _a, _b;\n return {\n type: types_1.NodeTypes.LiquidVariableOutput,\n markup: typeof node.markup === 'string' ? node.markup : toLiquidVariable(node.markup),\n whitespaceStart: (_a = node.whitespaceStart) !== null && _a !== void 0 ? _a : '',\n whitespaceEnd: (_b = node.whitespaceEnd) !== null && _b !== void 0 ? _b : '',\n position: position(node),\n source: node.source,\n };\n}\nfunction toLiquidVariable(node) {\n return {\n type: types_1.NodeTypes.LiquidVariable,\n expression: toComplexExpression(node.expression),\n filters: node.filters.map(toFilter),\n position: position(node),\n rawSource: node.rawSource,\n source: node.source,\n };\n}\nfunction toComplexExpression(node) {\n switch (node.type) {\n case stage_1_cst_1.ConcreteNodeTypes.BooleanExpression: {\n return {\n type: types_1.NodeTypes.BooleanExpression,\n position: position(node),\n condition: toConditionalExpression(node.conditions),\n source: node.source,\n };\n }\n default: {\n return toExpression(node);\n }\n }\n}\nfunction toExpression(node) {\n switch (node.type) {\n case stage_1_cst_1.ConcreteNodeTypes.String: {\n return {\n type: types_1.NodeTypes.String,\n position: position(node),\n single: node.single,\n value: node.value,\n source: node.source,\n };\n }\n case stage_1_cst_1.ConcreteNodeTypes.Number: {\n return {\n type: types_1.NodeTypes.Number,\n position: position(node),\n value: node.value,\n source: node.source,\n };\n }\n case stage_1_cst_1.ConcreteNodeTypes.LiquidLiteral: {\n return {\n type: types_1.NodeTypes.LiquidLiteral,\n position: position(node),\n value: node.value,\n keyword: node.keyword,\n source: node.source,\n };\n }\n case stage_1_cst_1.ConcreteNodeTypes.Range: {\n return {\n type: types_1.NodeTypes.Range,\n start: toExpression(node.start),\n end: toExpression(node.end),\n position: position(node),\n source: node.source,\n };\n }\n case stage_1_cst_1.ConcreteNodeTypes.VariableLookup: {\n return {\n type: types_1.NodeTypes.VariableLookup,\n name: node.name,\n lookups: node.lookups.map(toExpression),\n position: position(node),\n source: node.source,\n };\n }\n default: {\n return (0, utils_1.assertNever)(node);\n }\n }\n}\nfunction toFilter(node) {\n return {\n type: types_1.NodeTypes.LiquidFilter,\n name: node.name,\n args: node.args.map(toLiquidArgument),\n position: position(node),\n source: node.source,\n };\n}\nfunction toLiquidArgument(node) {\n switch (node.type) {\n case stage_1_cst_1.ConcreteNodeTypes.NamedArgument: {\n return toNamedArgument(node);\n }\n default: {\n return toExpression(node);\n }\n }\n}\nfunction toNamedArgument(node) {\n return {\n type: types_1.NodeTypes.NamedArgument,\n name: node.name,\n value: toExpression(node.value),\n position: position(node),\n source: node.source,\n };\n}\nfunction toHtmlElement(node, options) {\n return {\n type: types_1.NodeTypes.HtmlElement,\n name: cstToAst(node.name, options),\n attributes: toAttributes(node.attrList || [], options),\n position: position(node),\n blockStartPosition: position(node),\n blockEndPosition: { start: -1, end: -1 },\n children: [],\n source: node.source,\n };\n}\nfunction toHtmlDanglingMarkerClose(node, options) {\n return {\n type: types_1.NodeTypes.HtmlDanglingMarkerClose,\n name: cstToAst(node.name, options),\n position: position(node),\n blockStartPosition: position(node),\n source: node.source,\n };\n}\nfunction toHtmlVoidElement(node, options) {\n return {\n type: types_1.NodeTypes.HtmlVoidElement,\n name: node.name,\n attributes: toAttributes(node.attrList || [], options),\n position: position(node),\n blockStartPosition: position(node),\n source: node.source,\n };\n}\nfunction toHtmlSelfClosingElement(node, options) {\n return {\n type: types_1.NodeTypes.HtmlSelfClosingElement,\n name: cstToAst(node.name, options),\n attributes: toAttributes(node.attrList || [], options),\n position: position(node),\n blockStartPosition: position(node),\n source: node.source,\n };\n}\nfunction toNullableTextNode(node) {\n if (!node || node.value === '')\n return null;\n return toTextNode(node);\n}\nfunction toTextNode(node) {\n return {\n type: types_1.NodeTypes.TextNode,\n value: node.value,\n position: position(node),\n source: node.source,\n };\n}\nfunction isAcceptableDanglingMarkerClose(builder, cst, currIndex, mode) {\n if (mode === 'completion') {\n const current = cst[currIndex];\n const parentIsOfCorrectName = builder.parent &&\n builder.parent.type === types_1.NodeTypes.HtmlElement &&\n getName(builder.parent) === getName(current);\n return !parentIsOfCorrectName;\n }\n return isAcceptableDanglingMarker(builder);\n}\n// This function checks that the builder.current node accepts dangling nodes.\n//\n// The current logic is:\n// - Grandparent node must be an if-like statement\n// - Parent node must be a LiquidBranch\nfunction isAcceptableDanglingMarker(builder) {\n const { parent, grandparent } = builder;\n if (!parent || !grandparent)\n return false;\n return (parent.type === types_1.NodeTypes.LiquidBranch &&\n grandparent.type === types_1.NodeTypes.LiquidTag &&\n ['if', 'unless', 'case'].includes(grandparent.name));\n}\n// checking that is a {% else %} or {% endif %}\nfunction isConcreteExceptionEnd(node) {\n return (!node ||\n node.type === stage_1_cst_1.ConcreteNodeTypes.LiquidTagClose ||\n isConcreteLiquidBranchDisguisedAsTag(node));\n}\nfunction markup(name, markup) {\n if (grammar_1.TAGS_WITHOUT_MARKUP.includes(name))\n return '';\n return markup;\n}\nfunction position(node) {\n return {\n start: node.locStart,\n end: node.locEnd,\n };\n}\nfunction walk(ast, fn, parentNode) {\n for (const key of Object.keys(ast)) {\n if (types_1.nonTraversableProperties.has(key)) {\n continue;\n }\n const value = ast[key];\n if (Array.isArray(value)) {\n value.filter(isLiquidHtmlNode).forEach((node) => walk(node, fn, ast));\n }\n else if (isLiquidHtmlNode(value)) {\n walk(value, fn, ast);\n }\n }\n fn(ast, parentNode);\n}\nfunction isLiquidHtmlNode(value) {\n return (value !== null &&\n typeof value === 'object' &&\n 'type' in value &&\n types_1.NodeTypes.hasOwnProperty(value.type));\n}\nfunction getUnclosed(node, parentNode) {\n var _a;\n if (!node)\n return undefined;\n if (getName(node) === null && parentNode) {\n node = parentNode;\n }\n return {\n type: node.type,\n name: (_a = getName(node)) !== null && _a !== void 0 ? _a : '',\n blockStartPosition: 'blockStartPosition' in node ? node.blockStartPosition : node.position,\n };\n}\n//# sourceMappingURL=stage-2-ast.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.nonTraversableProperties = exports.LoopNamedTags = exports.LiquidNodeTypes = exports.HtmlNodeTypes = exports.Comparators = exports.NamedTags = exports.NodeTypes = void 0;\nvar NodeTypes;\n(function (NodeTypes) {\n NodeTypes[\"Document\"] = \"Document\";\n NodeTypes[\"LiquidRawTag\"] = \"LiquidRawTag\";\n NodeTypes[\"LiquidTag\"] = \"LiquidTag\";\n NodeTypes[\"LiquidBranch\"] = \"LiquidBranch\";\n NodeTypes[\"LiquidVariableOutput\"] = \"LiquidVariableOutput\";\n NodeTypes[\"HtmlSelfClosingElement\"] = \"HtmlSelfClosingElement\";\n NodeTypes[\"HtmlVoidElement\"] = \"HtmlVoidElement\";\n NodeTypes[\"HtmlDoctype\"] = \"HtmlDoctype\";\n NodeTypes[\"HtmlComment\"] = \"HtmlComment\";\n NodeTypes[\"HtmlElement\"] = \"HtmlElement\";\n NodeTypes[\"HtmlDanglingMarkerClose\"] = \"HtmlDanglingMarkerClose\";\n NodeTypes[\"HtmlRawNode\"] = \"HtmlRawNode\";\n NodeTypes[\"AttrSingleQuoted\"] = \"AttrSingleQuoted\";\n NodeTypes[\"AttrDoubleQuoted\"] = \"AttrDoubleQuoted\";\n NodeTypes[\"AttrUnquoted\"] = \"AttrUnquoted\";\n NodeTypes[\"AttrEmpty\"] = \"AttrEmpty\";\n NodeTypes[\"TextNode\"] = \"TextNode\";\n NodeTypes[\"YAMLFrontmatter\"] = \"YAMLFrontmatter\";\n NodeTypes[\"LiquidVariable\"] = \"LiquidVariable\";\n NodeTypes[\"LiquidFilter\"] = \"LiquidFilter\";\n NodeTypes[\"NamedArgument\"] = \"NamedArgument\";\n NodeTypes[\"LiquidLiteral\"] = \"LiquidLiteral\";\n NodeTypes[\"BooleanExpression\"] = \"BooleanExpression\";\n NodeTypes[\"String\"] = \"String\";\n NodeTypes[\"Number\"] = \"Number\";\n NodeTypes[\"Range\"] = \"Range\";\n NodeTypes[\"VariableLookup\"] = \"VariableLookup\";\n NodeTypes[\"Comparison\"] = \"Comparison\";\n NodeTypes[\"LogicalExpression\"] = \"LogicalExpression\";\n NodeTypes[\"AssignMarkup\"] = \"AssignMarkup\";\n NodeTypes[\"ContentForMarkup\"] = \"ContentForMarkup\";\n NodeTypes[\"CycleMarkup\"] = \"CycleMarkup\";\n NodeTypes[\"ForMarkup\"] = \"ForMarkup\";\n NodeTypes[\"PaginateMarkup\"] = \"PaginateMarkup\";\n NodeTypes[\"RawMarkup\"] = \"RawMarkup\";\n NodeTypes[\"RenderMarkup\"] = \"RenderMarkup\";\n NodeTypes[\"RenderVariableExpression\"] = \"RenderVariableExpression\";\n NodeTypes[\"RenderAliasExpression\"] = \"RenderAliasExpression\";\n NodeTypes[\"LiquidDocDescriptionNode\"] = \"LiquidDocDescriptionNode\";\n NodeTypes[\"LiquidDocParamNode\"] = \"LiquidDocParamNode\";\n NodeTypes[\"LiquidDocExampleNode\"] = \"LiquidDocExampleNode\";\n NodeTypes[\"LiquidDocPromptNode\"] = \"LiquidDocPromptNode\";\n})(NodeTypes || (exports.NodeTypes = NodeTypes = {}));\n// These are officially supported with special node types\nvar NamedTags;\n(function (NamedTags) {\n NamedTags[\"assign\"] = \"assign\";\n NamedTags[\"capture\"] = \"capture\";\n NamedTags[\"case\"] = \"case\";\n NamedTags[\"content_for\"] = \"content_for\";\n NamedTags[\"cycle\"] = \"cycle\";\n NamedTags[\"decrement\"] = \"decrement\";\n NamedTags[\"echo\"] = \"echo\";\n NamedTags[\"elsif\"] = \"elsif\";\n NamedTags[\"for\"] = \"for\";\n NamedTags[\"form\"] = \"form\";\n NamedTags[\"if\"] = \"if\";\n NamedTags[\"include\"] = \"include\";\n NamedTags[\"increment\"] = \"increment\";\n NamedTags[\"layout\"] = \"layout\";\n NamedTags[\"liquid\"] = \"liquid\";\n NamedTags[\"paginate\"] = \"paginate\";\n NamedTags[\"render\"] = \"render\";\n NamedTags[\"section\"] = \"section\";\n NamedTags[\"sections\"] = \"sections\";\n NamedTags[\"tablerow\"] = \"tablerow\";\n NamedTags[\"unless\"] = \"unless\";\n NamedTags[\"when\"] = \"when\";\n})(NamedTags || (exports.NamedTags = NamedTags = {}));\nvar Comparators;\n(function (Comparators) {\n Comparators[\"CONTAINS\"] = \"contains\";\n Comparators[\"EQUAL\"] = \"==\";\n Comparators[\"GREATER_THAN\"] = \">\";\n Comparators[\"GREATER_THAN_OR_EQUAL\"] = \">=\";\n Comparators[\"LESS_THAN\"] = \"<\";\n Comparators[\"LESS_THAN_OR_EQUAL\"] = \"<=\";\n Comparators[\"NOT_EQUAL\"] = \"!=\";\n})(Comparators || (exports.Comparators = Comparators = {}));\nexports.HtmlNodeTypes = [\n NodeTypes.HtmlElement,\n NodeTypes.HtmlDanglingMarkerClose,\n NodeTypes.HtmlRawNode,\n NodeTypes.HtmlVoidElement,\n NodeTypes.HtmlSelfClosingElement,\n];\nexports.LiquidNodeTypes = [\n NodeTypes.LiquidTag,\n NodeTypes.LiquidVariableOutput,\n NodeTypes.LiquidBranch,\n NodeTypes.LiquidRawTag,\n];\nexports.LoopNamedTags = [NamedTags.for, NamedTags.tablerow];\n// Those properties create loops that would make walking infinite\nexports.nonTraversableProperties = new Set([\n 'parentNode',\n 'prev',\n 'next',\n 'firstChild',\n 'lastChild',\n]);\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertNever = assertNever;\nexports.locStart = locStart;\nexports.locEnd = locEnd;\nexports.deepGet = deepGet;\nexports.dropLast = dropLast;\nfunction assertNever(x) {\n throw new Error(`Unexpected object: ${x.type}`);\n}\nfunction locStart(node) {\n return node.position.start;\n}\nfunction locEnd(node) {\n return node.position.end;\n}\nfunction deepGet(path, obj) {\n return path.reduce((curr, k) => {\n if (curr && curr[k] !== undefined)\n return curr[k];\n return undefined;\n }, obj);\n}\nfunction dropLast(n, xs) {\n const result = [...xs];\n for (let i = 0; i < n; i++) {\n result.pop();\n }\n return result;\n}\n//# sourceMappingURL=utils.js.map","module.exports = String.raw`Helpers {\n Node = TextNode*\n TextNode = AnyExceptPlus<openControl>\n openControl = end\n\n empty = /* nothing */\n anyExcept<lit> = (~ lit any)\n anyExceptStar<lit> = (~ lit any)*\n anyExceptPlus<lit> = (~ lit any)+\n AnyExcept<lit> = (~ lit any)\n AnyExceptPlus<lit> = (~ lit any)+\n AnyExceptStar<lit> = (~ lit any)*\n identifierCharacter = alnum | \"_\" | \"-\"\n\n orderedListOf<a, b, sep> =\n | nonemptyOrderedListOf<a, b, sep>\n | emptyListOf<a, sep>\n nonemptyOrderedListOf<a, b, sep> =\n | nonemptyListOf<b, sep>\n | nonemptyOrderedListOfBoth<a, b, sep>\n | nonemptyListOf<a, sep>\n nonemptyOrderedListOfBoth<a, b, sep> =\n nonemptyListOf<a, sep> (sep nonemptyListOf<b, sep>)\n\n singleQuote = \"'\" | \"‘\" | \"’\"\n doubleQuote = \"\\\"\" | \"“\" | \"”\"\n controls = \"\\u{007F}\"..\"\\u{009F}\"\n noncharacters = \"\\u{FDD0}\"..\"\\u{FDEF}\"\n newline = \"\\r\"? \"\\n\"\n}\n\nLiquid <: Helpers {\n Node := (liquidNode | TextNode)*\n openControl := \"{{\" | \"{%\"\n endOfTagName = &(\"-%}\" | \"-}}\" | \"%}\" | \"}}\")\n endOfVarName = ~identifierCharacter\n endOfIdentifier = endOfTagName | endOfVarName\n\n liquidNode =\n \t| liquidDoc\n | liquidBlockComment\n | liquidRawTag\n | liquidDrop\n | liquidTagClose\n | liquidTagOpen\n | liquidTag\n | liquidInlineComment\n\n liquidTagStrict =\n | liquidTagAssign\n | liquidTagBreak\n | liquidTagContinue\n | liquidTagCycle\n | liquidTagContentFor\n | liquidTagDecrement\n | liquidTagEcho\n | liquidTagElse\n | liquidTagElsif\n | liquidTagInclude\n | liquidTagIncrement\n | liquidTagLayout\n | liquidTagLiquid\n | liquidTagRender\n | liquidTagSection\n | liquidTagSections\n | liquidTagWhen\n\n liquidTag =\n | liquidTagStrict\n | liquidTagBaseCase\n\n liquidTagOpenStrict =\n | liquidTagOpenCase\n | liquidTagOpenCapture\n | liquidTagOpenForm\n | liquidTagOpenFor\n | liquidTagOpenTablerow\n | liquidTagOpenIf\n | liquidTagOpenPaginate\n | liquidTagOpenUnless\n\n liquidTagOpen =\n | liquidTagOpenStrict\n | liquidTagOpenBaseCase\n\n liquidTagClose = \"{%\" \"-\"? space* \"end\" blockName space* tagMarkup \"-\"? \"%}\"\n\n // These two are the same but transformed differently\n liquidTagRule<name, markup> =\n \"{%\" \"-\"? space* (name endOfIdentifier) space* markup \"-\"? \"%}\"\n liquidTagOpenRule<name, markup> =\n \"{%\" \"-\"? space* (name endOfIdentifier) space* markup \"-\"? \"%}\"\n\n liquidTagBaseCase = liquidTagRule<liquidTagName, tagMarkup>\n\n liquidTagEcho = liquidTagRule<\"echo\", liquidTagEchoMarkup>\n liquidTagEchoMarkup = liquidVariable<delimTag>\n\n liquidTagAssign = liquidTagRule<\"assign\", liquidTagAssignMarkup>\n liquidTagAssignMarkup = variableSegment space* \"=\" space* liquidVariable<delimTag>\n\n liquidTagCycle = liquidTagRule<\"cycle\", liquidTagCycleMarkup>\n liquidTagCycleMarkup = (liquidExpression<delimTag> \":\")? space* nonemptyListOf<liquidExpression<delimTag>, argumentSeparator> space*\n\n liquidTagIncrement = liquidTagRule<\"increment\", variableSegmentAsLookupMarkup>\n liquidTagDecrement = liquidTagRule<\"decrement\", variableSegmentAsLookupMarkup>\n liquidTagOpenCapture = liquidTagOpenRule<\"capture\", variableSegmentAsLookupMarkup>\n variableSegmentAsLookupMarkup = variableSegmentAsLookup space*\n\n liquidTagSection = liquidTagRule<\"section\", liquidTagSectionMarkup>\n liquidTagSectionMarkup = liquidString<delimTag> space*\n\n liquidTagSections = liquidTagRule<\"sections\", liquidTagSectionsMarkup>\n liquidTagSectionsMarkup = liquidString<delimTag> space*\n\n liquidTagLayout = liquidTagRule<\"layout\", liquidTagLayoutMarkup>\n liquidTagLayoutMarkup = liquidExpression<delimTag> space*\n\n // We'll black hole the statement and switch parser in the cst builder\n // We do this because it's technically the same grammar (with minor redefinitions)\n // and it would be a huge chore and maintenance hell to rewrite all the rules with\n // hspace = \" \" | \"\\t\"\n //\n // The alternative is that this grammar parses the {% liquid tagMarkup %} as its own string,\n // and then we switch to the LiquidStatement grammar that\n // redefines liquidTagOpenRule, liquidTagRule, and space.\n liquidTagLiquid = liquidTagRule<\"liquid\", liquidTagLiquidMarkup>\n liquidTagLiquidMarkup = tagMarkup\n\n liquidTagContentFor = liquidTagRule<\"content_for\", liquidTagContentForMarkup>\n\n liquidTagContentForMarkup =\n contentForType (argumentSeparatorOptionalComma contentForTagArgument) (space* \",\")? space*\n\n contentForTagArgument = listOf<contentForNamedArgument<delimTag>, argumentSeparatorOptionalComma>\n completionModeContentForTagArgument = listOf<contentForNamedArgument<delimTag>, argumentSeparatorOptionalComma> (argumentSeparator? (liquidVariableLookup<delimTag>))?\n contentForNamedArgument<delim> = (variableSegment (\".\" variableSegment)*) space* \":\" space* (liquidExpression<delim>)\n\n contentForType = liquidString<delimTag>\n\n liquidTagInclude = liquidTagRule<\"include\", liquidTagRenderMarkup>\n liquidTagRender = liquidTagRule<\"render\", liquidTagRenderMarkup>\n liquidTagRenderMarkup =\n snippetExpression renderVariableExpression? renderAliasExpression? renderArguments\n\n renderArguments = (argumentSeparatorOptionalComma tagArguments) (space* \",\")? space*\n completionModeRenderArguments = (argumentSeparatorOptionalComma tagArguments) (space* \",\")? space* (argumentSeparator? liquidVariableLookup<delimTag> space*)?\n snippetExpression = liquidString<delimTag> | variableSegmentAsLookup\n renderVariableExpression = space+ (\"for\" | \"with\") space+ liquidExpression<delimTag>\n renderAliasExpression = space+ \"as\" space+ variableSegment\n\n liquidTagOpenBaseCase = liquidTagOpenRule<blockName, tagMarkup>\n\n liquidTagOpenForm = liquidTagOpenRule<\"form\", liquidTagOpenFormMarkup>\n liquidTagOpenFormMarkup = arguments<delimTag> (space* \",\")? space*\n\n liquidTagOpenFor = liquidTagOpenRule<\"for\", liquidTagOpenForMarkup>\n liquidTagOpenForMarkup =\n variableSegment space* \"in\" space* liquidExpression<delimTag>\n (space* \"reversed\")? argumentSeparatorOptionalComma\n tagArguments (space* \",\")? space*\n\n // It's the same, the difference is support for different named arguments<delim>\n liquidTagOpenTablerow = liquidTagOpenRule<\"tablerow\", liquidTagOpenForMarkup>\n\n liquidTagOpenCase = liquidTagOpenRule<\"case\", liquidTagOpenCaseMarkup>\n liquidTagOpenCaseMarkup = liquidExpression<delimTag> space*\n\n liquidTagWhen = liquidTagRule<\"when\", liquidTagWhenMarkup>\n liquidTagWhenMarkup = nonemptyListOf<liquidExpression<delimTag>, whenMarkupSep> space*\n whenMarkupSep = space* (\",\" | \"or\" ~identifier) space*\n\n liquidTagOpenIf = liquidTagOpenRule<\"if\", liquidTagOpenConditionalMarkup>\n liquidTagOpenUnless = liquidTagOpenRule<\"unless\", liquidTagOpenConditionalMarkup>\n liquidTagElsif = liquidTagRule<\"elsif\", liquidTagOpenConditionalMarkup>\n\n liquidTagBreak = liquidTagRule<\"break\", empty>\n liquidTagContinue = liquidTagRule<\"continue\", empty>\n liquidTagElse = liquidTagRule<\"else\", empty>\n\n liquidTagOpenConditionalMarkup = nonemptyListOf<condition<delimTag>, conditionSeparator> space*\n conditionSeparator = &logicalOperator\n condition<delim> = logicalOperator? space* (comparison<delim> | liquidExpression<delim>) space*\n logicalOperator = (\"and\" | \"or\") ~identifier\n comparison<delim> = liquidExpression<delim> space* comparator space* liquidExpression<delim>\n comparator =\n ( \"==\"\n | \"!=\"\n | \">=\"\n | \"<=\"\n | \">\"\n | \"<\")\n | (\"contains\" ~identifier)\n\n liquidTagOpenPaginate = liquidTagOpenRule<\"paginate\", liquidTagOpenPaginateMarkup>\n liquidTagOpenPaginateMarkup =\n liquidExpression<delimTag> space+ \"by\" space+ liquidExpression<delimTag> argumentSeparatorOptionalComma tagArguments (space* \",\")? space*\n\n liquidDrop = \"{{\" \"-\"? space* liquidDropCases \"-\"? \"}}\"\n liquidDropCases = liquidVariable<delimVO> | liquidDropBaseCase\n liquidDropBaseCase = anyExceptStar<delimVO>\n liquidInlineComment = \"{%\" \"-\"? space* \"#\" space? tagMarkup \"-\"? \"%}\"\n\n liquidRawTag =\n | liquidRawTagImpl<\"raw\">\n | liquidRawTagImpl<\"javascript\">\n | liquidRawTagImpl<\"schema\">\n | liquidRawTagImpl<\"stylesheet\">\n | liquidRawTagImpl<\"style\">\n liquidRawTagImpl<name> =\n \"{%\" \"-\"? space* (name endOfIdentifier) space* tagMarkup \"-\"? \"%}\"\n anyExceptStar<liquidRawTagClose<name>>\n \"{%\" \"-\"? space* \"end\" (name endOfIdentifier) space* \"-\"? \"%}\"\n liquidRawTagClose<name> =\n \"{%\" \"-\"? space* \"end\" (name endOfIdentifier) space* \"-\"? \"%}\"\n\n liquidBlockComment =\n commentBlockStart\n (liquidBlockComment | anyExceptPlus<(commentBlockStart | commentBlockEnd)>)*\n commentBlockEnd\n commentBlockStart = \"{%\" \"-\"? space* (\"comment\" endOfIdentifier) space* tagMarkup \"-\"? \"%}\"\n commentBlockEnd = \"{%\" \"-\"? space* (\"endcomment\" endOfIdentifier) space* tagMarkup \"-\"? \"%}\"\n\n liquidDoc =\n liquidDocStart\n liquidDocBody\n liquidDocEnd\n\n liquidDocStart = \"{%\" \"-\"? space* (\"doc\" endOfIdentifier) space* tagMarkup \"-\"? \"%}\"\n liquidDocEnd = \"{%\" \"-\"? space* (\"enddoc\" endOfIdentifier) space* tagMarkup \"-\"? \"%}\"\n liquidDocBody = anyExceptStar<(liquidDocStart | liquidDocEnd)>\n\n // In order for the grammar to \"fallback\" to the base case, this\n // rule must pass if and only if we support what we parse. This\n // implies that—since we don't support filters yet—we have a\n // positive lookahead on \"-}}\" or \"}}\" in the rule. We do this\n // because we'd otherwise positively match the following string\n // instead of falling back to the other rule:\n // {{ 'string' | some_filter }}\n liquidVariable<delim> = liquidComplexExpression<delim> liquidFilter<delim>* space* &delim\n\n liquidExpression<delim> =\n | liquidString<delim>\n | liquidNumber\n | liquidLiteral\n | liquidRange<delim>\n | liquidVariableLookup<delim>\n\n liquidComplexExpression<delim> =\n | liquidBooleanExpression<delim>\n | liquidExpression<delim>\n\n liquidBooleanExpression<delim> = booleanExpressionCondition<delim> listOf<booleanExpressionSubsequentCondition<delim>, conditionSeparator>\n\n // This might over-capture things since the conditions below can contain any ${\"`\"}liquidExpression${\"`\"}s.\n // We will need to clean this up in CST. If we restrict the conditions to only contain comparisons and\n // variable lookups, we can't support \"truthy\" expressions like ${\"`\"}{{ some_var and 'this' }}${\"`\"}\n booleanExpressionSubsequentCondition<delim> = space* logicalOperator space* (comparison<delim> | liquidExpression<delim>) space*\n booleanExpressionCondition<delim> = comparison<delim> | liquidExpression<delim>\n\n liquidString<delim> = liquidSingleQuotedString<delim> | liquidDoubleQuotedString<delim>\n liquidSingleQuotedString<delim> = \"'\" anyExceptStar<(\"'\"| delim)> \"'\"\n liquidDoubleQuotedString<delim> = \"\\\"\" anyExceptStar<(\"\\\"\"| delim)> \"\\\"\"\n\n liquidNumber = liquidFloat | liquidInteger\n liquidInteger = \"-\"? digit+\n liquidFloat = \"-\"? digit+ \".\" digit+\n\n liquidLiteral =\n ( \"true\"\n | \"false\"\n | \"blank\"\n | \"empty\"\n | \"nil\"\n | \"null\"\n ) endOfIdentifier\n\n liquidRange<delim> =\n \"(\" space* liquidExpression<delim> space* \"..\" space* liquidExpression<delim> space* \")\"\n\n liquidVariableLookup<delim> =\n | variableSegment lookup<delim>*\n | empty lookup<delim>+\n lookup<delim> =\n | indexLookup<delim>\n | dotLookup\n indexLookup<delim> = space* \"[\" space* liquidExpression<delim> space* \"]\"\n dotLookup = space* \".\" space* identifier\n\n liquidFilter<delim> = space* \"|\" space* identifier (space* \":\" space* arguments<delim> (space* \",\")?)?\n\n arguments<delim> = nonemptyOrderedListOf<positionalArgument<delim>, namedArgument<delim>, argumentSeparator>\n argumentSeparator = space* \",\" space*\n argumentSeparatorOptionalComma = space* \",\"? space*\n positionalArgument<delim> = liquidExpression<delim> ~(space* \":\")\n namedArgument<delim> = variableSegment space* \":\" space* liquidExpression<delim>\n tagArguments = listOf<namedArgument<delimTag>, argumentSeparatorOptionalComma>\n filterArguments<delim> =\n | complexArguments<delim>\n | simpleArgument<delim>\n complexArguments<delim> = arguments<delim> (space* \",\" space* simpleArgument<delim>)?\n simpleArgument<delim> = liquidVariableLookup<delim>\n\n variableSegment = (letter | \"_\") (~endOfTagName identifierCharacter)*\n variableSegmentAsLookup = variableSegment\n identifier = variableSegment \"?\"?\n\n tagMarkup = anyExceptStar<delimTag>\n\n liquidTagName =\n letter (alnum | \"_\")*\n\n blockName =\n // Shopify blocks\n ( \"form\"\n | \"paginate\"\n // Base blocks\n | \"capture\"\n | \"case\"\n | \"for\"\n | \"ifchanged\"\n | \"if\"\n | \"unless\"\n | \"tablerow\"\n ) endOfIdentifier\n\n delimTag = \"-%}\" | \"%}\"\n delimVO = \"-}}\" | \"}}\"\n}\n\nLiquidStatement <: Liquid {\n Node := listOf<LiquidStatement, statementSep> (space | newline)*\n\n // This is the big brains moment: we redefine space to exclude newlines.\n //\n // Which means that all our other Liquid rules can be reused\n // without modification(!)\n //\n // We don't need to maintain rules like this:\n // - liquidVariable<space>\n // - liquidExpression<space>\n // - variableLookup<space>\n // - ... long list of stuff that takes space as param\n // - liquidString<space>\n //\n // All we need is this little, VERY IMPORTANT, part right here that\n // make it so we can parse the same way in Liquid tags.\n //\n // I'm putting in this huge comment so that it's more obvious.\n space := \" \" | \"\\t\"\n\n LiquidStatement =\n | liquidBlockComment\n | liquidRawTag\n | liquidTagClose\n | liquidTagOpen\n | liquidTag\n | liquidInlineComment\n\n liquidTagOpenRule<name, markup>\n := (name ~identifierCharacter) space* markup &liquidStatementEnd\n\n liquidTagRule<name, markup>\n := (name ~identifierCharacter) space* markup &liquidStatementEnd\n\n liquidTagClose\n := \"end\" (blockName ~identifierCharacter) space* tagMarkup &liquidStatementEnd\n\n liquidRawTagImpl<name>\n := (name ~identifierCharacter) space* tagMarkup newline\n anyExceptStar<liquidRawTagClose<name>>\n \"end\" name space* &liquidStatementEnd\n\n liquidRawTagClose<name>\n := \"end\" name space* &liquidStatementEnd\n\n liquidBlockComment :=\n commentBlockStart statementSep\n (listOf<liquidCommentBlockStatement, statementSep> statementSep)?\n commentBlockEnd\n\n liquidCommentBlockStatement =\n | liquidBlockComment\n | nonTerminalCommentLine\n\n commentBlockStart\n := (\"comment\" ~identifierCharacter) space* tagMarkup\n\n commentBlockEnd\n := (\"endcomment\" ~identifierCharacter) space* tagMarkup\n\n nonTerminalCommentLine\n = ~commentBlockEnd anyExceptPlus<newline>\n\n liquidInlineComment\n := \"#\" space? tagMarkup &liquidStatementEnd\n\n tagMarkup := anyExceptStar<liquidStatementEnd>\n\n // trailing whitespace, newline, + anything else before the next tag\n statementSep = space* newline (space | newline)*\n\n liquidStatementEnd = newline | end\n delimTag := liquidStatementEnd\n}\n\nLiquidDoc <: Helpers {\n Node := ImplicitDescription (LiquidDocNode | TextNode)*\n LiquidDocNode =\n | paramNode\n | exampleNode\n | descriptionNode\n | promptNode\n | fallbackNode\n \n endOfDescription = strictSpace* openControl\n descriptionContent = anyExceptStar<endOfDescription>\n ImplicitDescription = descriptionContent\n \n // By default, space matches new lines as well. We override it here to make writing rules easier.\n strictSpace = \" \" | \"\\t\"\n // We use this as an escape hatch to stop matching TextNode and try again when one of these characters is encountered\n openControl:= strictSpace* (\"@\" | end)\n // List of supported tags we use to identify boundaries\n supportedTags = \"@prompt\" | \"@example\" | \"@description\" | \"@param\"\n\n\n paramNode = \"@param\" strictSpace* paramType? strictSpace* (optionalParamName | paramName) (strictSpace* \"-\")? strictSpace* paramDescription\n paramType = \"{\" strictSpace* paramTypeContent strictSpace* \"}\"\n paramTypeContent = anyExceptStar<(\"}\"| strictSpace)>\n\n paramName = textValue\n optionalParamName = \"[\" strictSpace* textValue strictSpace* \"]\"\n textValue = identifierCharacter+\n\n paramDescription = (~\"]\" anyExceptStar<endOfParam>)\n endOfParam = strictSpace* (newline | end)\n \n // Prompt node is system-controlled, so we don't strip the leading spaces to maintain indentation\n promptNode = \"@prompt\" multilineTextContent\n exampleNode = \"@example\" space* multilineTextContent\n descriptionNode = \"@description\" space* multilineTextContent\n\n // We want multilineTextContent to be free-form, so instead of terminating the match at \"@\" we explicitly look for a suppported tag\n // This means that malformed tags will be considered part of the multilineTextContent\n multilineTextContent = anyExceptStar<endOfMultilineText>\n endOfMultilineText = strictSpace* (supportedTags | end)\n\n fallbackNode = \"@\" anyExceptStar<endOfParam>\n}\n\nLiquidHTML <: Liquid {\n Node := yamlFrontmatter? (HtmlNode | liquidNode | TextNode)*\n openControl += \"<\"\n\n yamlFrontmatter =\n \"---\" newline anyExceptStar<\"---\"> \"---\" newline\n\n HtmlNode =\n | HtmlDoctype\n | HtmlComment\n | HtmlRawTag\n | HtmlVoidElement\n | HtmlSelfClosingElement\n | HtmlTagClose\n | HtmlTagOpen\n\n // https://html.spec.whatwg.org/multipage/syntax.html#the-doctype\n HtmlDoctype =\n #(\"<!\" caseInsensitive<\"doctype\"> space+ caseInsensitive<\"html\">) legacyDoctypeString? \">\"\n legacyDoctypeString\n = anyExceptPlus<\">\">\n\n HtmlComment = \"<!--\" #(anyExceptStar<\"-->\"> \"-->\")\n\n // These are black holes, we'll ignore what's in them\n HtmlRawTag =\n | HtmlRawTagImpl<\"script\">\n | HtmlRawTagImpl<\"style\">\n | HtmlRawTagImpl<\"svg\">\n\n HtmlRawTagImpl<name> =\n TagStart<name>\n (HtmlRawTagImpl<name> | AnyExceptPlus<(TagStart<name> | TagEnd<name>)>)*\n TagEnd<name>\n TagStart<name> = \"<\" name AttrList \">\"\n TagEnd<name> = \"</\" name \">\"\n\n HtmlVoidElement =\n #(\"<\" voidElementName &(space | \"/\" | \">\")) AttrList \"/\"? \">\"\n\n HtmlSelfClosingElement =\n #(\"<\" tagName) AttrList \"/>\"\n\n HtmlTagOpen =\n #(\"<\" tagName) AttrList \">\"\n\n HtmlTagClose =\n #(\"</\" tagName) \">\"\n\n tagName = leadingTagNamePart trailingTagNamePart*\n\n // The difference here is that the first text part must start\n // with a letter, but trailing text parts don't have that\n // requirement\n leadingTagNamePart =\n | liquidDrop\n | leadingTagNameTextNode\n\n trailingTagNamePart =\n | liquidDrop\n | trailingTagNameTextNode\n\n leadingTagNameTextNode = letter (alnum | \"-\" | \":\")*\n trailingTagNameTextNode = (alnum | \"-\" | \":\")+\n\n AttrList = Attr*\n\n Attr =\n AttrSingleQuoted | AttrDoubleQuoted | AttrUnquoted | liquidNode | attrEmpty\n\n attrEmpty = attrName\n\n AttrUnquoted = attrName \"=\" attrUnquotedValue\n AttrSingleQuoted = attrName \"=\" singleQuote #(attrSingleQuotedValue singleQuote)\n AttrDoubleQuoted = attrName \"=\" doubleQuote #(attrDoubleQuotedValue doubleQuote)\n\n attrName = (liquidDrop | attrNameTextNode)+\n\n // https://html.spec.whatwg.org/#attributes-2\n attrNameTextNode = anyExceptPlus<(space | quotes | \"=\" | \">\" | \"/>\" | \"{{\" | \"{%\" | controls | noncharacters)>\n attrUnquotedValue = (liquidDrop | attrUnquotedTextNode)*\n attrSingleQuotedValue = (liquidNode | attrSingleQuotedTextNode)*\n attrDoubleQuotedValue = (liquidNode | attrDoubleQuotedTextNode)*\n\n attrUnquotedTextNode = anyExceptPlus<(space | quotes | \"=\" | \"<\" | \">\" | \"${\"`\"}\" | \"{{\" | \"{%\")>\n attrSingleQuotedTextNode = anyExceptPlus<(singleQuote | \"{{\" | \"{%\")>\n attrDoubleQuotedTextNode = anyExceptPlus<(doubleQuote | \"{{\" | \"{%\")>\n\n quotes = singleQuote | doubleQuote\n\n // https://www.w3.org/TR/2011/WD-html-markup-20110113/syntax.html#void-element\n voidElementName =\n ( caseInsensitive<\"area\">\n | caseInsensitive<\"base\">\n | caseInsensitive<\"br\">\n | caseInsensitive<\"col\">\n | caseInsensitive<\"command\">\n | caseInsensitive<\"embed\">\n | caseInsensitive<\"hr\">\n | caseInsensitive<\"img\">\n | caseInsensitive<\"input\">\n | caseInsensitive<\"keygen\">\n | caseInsensitive<\"link\">\n | caseInsensitive<\"meta\">\n | caseInsensitive<\"param\">\n | caseInsensitive<\"source\">\n | caseInsensitive<\"track\">\n | caseInsensitive<\"wbr\">\n ) ~identifierCharacter\n}\n\nStrictLiquid <: Liquid {\n liquidTag := liquidTagStrict\n liquidTagOpen := liquidTagOpenStrict\n}\n\nStrictLiquidStatement <: LiquidStatement {\n liquidTag := liquidTagStrict\n liquidTagOpen := liquidTagOpenStrict\n}\n\nStrictLiquidHTML <: LiquidHTML {\n liquidTag := liquidTagStrict\n liquidTagOpen := liquidTagOpenStrict\n}\n\nWithPlaceholderLiquid <: Liquid {\n liquidFilter<delim> := space* \"|\" space* identifier (space* \":\" space* filterArguments<delim> (space* \",\")?)?\n liquidTagContentForMarkup :=\n contentForType (argumentSeparatorOptionalComma completionModeContentForTagArgument) (space* \",\")? space*\n liquidTagRenderMarkup :=\n snippetExpression renderVariableExpression? renderAliasExpression? completionModeRenderArguments\n liquidTagName := (letter | \"█\") (alnum | \"_\")*\n variableSegment := (letter | \"_\" | \"█\") (identifierCharacter | \"█\")*\n liquidDoc :=\n liquidDocStart\n liquidDocBody\n liquidDocEnd?\n}\n\nWithPlaceholderLiquidStatement <: LiquidStatement {\n liquidFilter<delim> := space* \"|\" space* identifier (space* \":\" space* filterArguments<delim> (space* \",\")?)?\n liquidTagContentForMarkup :=\n contentForType (argumentSeparatorOptionalComma completionModeContentForTagArgument) (space* \",\")? space*\n liquidTagRenderMarkup :=\n snippetExpression renderVariableExpression? renderAliasExpression? completionModeRenderArguments\n liquidTagName := (letter | \"█\") (alnum | \"_\")*\n variableSegment := (letter | \"_\" | \"█\") (identifierCharacter | \"█\")*\n liquidDoc :=\n liquidDocStart\n liquidDocBody\n liquidDocEnd?\n}\n\nWithPlaceholderLiquidHTML <: LiquidHTML {\n liquidFilter<delim> := space* \"|\" space* identifier (space* \":\" space* filterArguments<delim> (space* \",\")?)?\n liquidTagContentForMarkup :=\n contentForType (argumentSeparatorOptionalComma completionModeContentForTagArgument) (space* \",\")? space*\n liquidTagRenderMarkup :=\n snippetExpression renderVariableExpression? renderAliasExpression? completionModeRenderArguments\n liquidTagName := (letter | \"█\") (alnum | \"_\")*\n variableSegment := (letter | \"_\" | \"█\") (identifierCharacter | \"█\")*\n leadingTagNameTextNode := (letter | \"█\") (alnum | \"-\" | \":\" | \"█\")*\n trailingTagNameTextNode := (alnum | \"-\" | \":\" | \"█\")+\n liquidDoc :=\n liquidDocStart\n liquidDocBody\n liquidDocEnd?\n}\n`;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FileType = void 0;\nvar FileType;\n(function (FileType) {\n FileType[FileType[\"Unknown\"] = 0] = \"Unknown\";\n FileType[FileType[\"File\"] = 1] = \"File\";\n FileType[FileType[\"Directory\"] = 2] = \"Directory\";\n FileType[FileType[\"SymbolicLink\"] = 64] = \"SymbolicLink\";\n})(FileType || (exports.FileType = FileType = {}));\n//# sourceMappingURL=AbstractFileSystem.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AugmentedThemeDocset = void 0;\nconst utils_1 = require(\"./utils\");\nconst toFilterEntry = (name) => ({ name });\nconst aliasedFilters = [\n ['camelcase', 'camelize'],\n ['handle', 'handleize'],\n ['t', 'translate'],\n];\nconst toAliasedFilterEntry = (entries) => ([alias, baseName]) => {\n const baseEntry = entries.find((entry) => entry.name === baseName);\n if (!baseEntry) {\n return toFilterEntry(alias);\n }\n return {\n ...baseEntry,\n name: alias,\n };\n};\nconst undocumentedFilters = [\n '_online_store_editor_live_setting',\n 'addresses_url',\n 'app_block_path?',\n 'app_block_path_for',\n 'app_extension_path?',\n 'app_snippet_path?',\n 'cancel_customer_order_link',\n 'debug',\n 'delete_customer_address_link',\n 'dev_shop?',\n 'distance_from',\n 'edit_customer_address_link',\n 'encode_url_component',\n 'excerpt',\n 'format_code',\n 'global_block_type?',\n 'h',\n 'handle_from',\n 'installments_pricing',\n 'link_to_theme',\n 'login_button',\n 'login_url',\n 'logout_url',\n 'pad_spaces',\n 'paragraphize',\n 'recover_password_link',\n 'recover_url',\n 'register_url',\n 'registration_uuid_from',\n 'root_account_url',\n 'sentence',\n 'theme_url',\n 'unit',\n 'weight',\n];\nconst undocumentedObjectEntryKeys = [\n 'locale',\n 'direction',\n 'skip_to_content_link',\n 'checkout_html_classes',\n 'checkout_stylesheets',\n 'checkout_scripts',\n 'content_for_logo',\n 'breadcrumb',\n 'order_summary_toggle',\n 'content_for_order_summary',\n 'alternative_payment_methods',\n 'content_for_footer',\n 'tracking_code',\n];\nconst toObjectEntry = (name, access, returnType) => ({\n name,\n ...(access && { access }),\n ...(returnType && { return_type: returnType }),\n});\nconst undocumentedObjects = ['customer_address', 'product_variant'];\nconst legacyCheckoutEntries = undocumentedObjectEntryKeys.map((objectKey) => toObjectEntry(objectKey, { global: false, parents: [], template: [] }, [\n { type: 'string', name: '' },\n]));\nconst toTagEntry = (name) => ({ name });\nconst undocumentedTags = ['elsif', 'ifchanged', 'when', 'schema'];\nclass AugmentedThemeDocset {\n constructor(themeDocset) {\n this.themeDocset = themeDocset;\n this.isAugmented = true;\n this.filters = (0, utils_1.memo)(async () => {\n const officialFilters = await this.themeDocset.filters();\n return [\n ...officialFilters,\n ...aliasedFilters.map(toAliasedFilterEntry(officialFilters)),\n ...undocumentedFilters.map(toFilterEntry),\n ];\n });\n this.objects = (0, utils_1.memo)(async () => {\n return [\n ...(await this.themeDocset.objects()),\n ...undocumentedObjects.map((obj) => toObjectEntry(obj)),\n ...legacyCheckoutEntries,\n ];\n });\n this.liquidDrops = (0, utils_1.memo)(async () => {\n return (await this.themeDocset.objects()).filter((obj) => {\n if (!obj.access) {\n return true;\n }\n if (obj.deprecated) {\n return false;\n }\n // objects that are accessible outside Global context\n return !obj.access.global || (obj.access.global && obj.access.parents.length > 0);\n });\n });\n this.tags = (0, utils_1.memo)(async () => {\n return [...(await this.themeDocset.tags()), ...undocumentedTags.map(toTagEntry)];\n });\n this.systemTranslations = (0, utils_1.memo)(async () => {\n return this.themeDocset.systemTranslations();\n });\n }\n}\nexports.AugmentedThemeDocset = AugmentedThemeDocset;\n//# sourceMappingURL=AugmentedThemeDocset.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JSONValidator = void 0;\nexports.isValid = isValid;\nconst vscode_json_languageservice_1 = require(\"vscode-json-languageservice\");\nconst utils_1 = require(\"./utils\");\nclass JSONValidator {\n static async create(jsonValidationSet, config) {\n if (!jsonValidationSet)\n return;\n return new JSONValidator(await jsonValidationSet.schemas(config.context));\n }\n constructor(schemas) {\n /**\n * Will return an array of diagnostics for the given source code and JSON string.\n *\n * It's up to the caller to determine where in the file those should be.\n * (presumably by doing some offset logic)\n */\n this.validate = async (uri, jsonString) => {\n const jsonTextDocument = vscode_json_languageservice_1.TextDocument.create(uri, 'json', 0, jsonString);\n const diagnostics = await this.getOffsetDiagnostics(jsonTextDocument);\n return diagnostics.map((diagnostic) => ({\n message: diagnostic.message,\n startIndex: jsonTextDocument.offsetAt(diagnostic.range.start),\n endIndex: jsonTextDocument.offsetAt(diagnostic.range.end),\n }));\n };\n this.isValid = async (uri, jsonString) => {\n return isValid(this.service, uri, jsonString);\n };\n this.schemas = (0, utils_1.indexBy)((x) => x.uri, schemas);\n this.service = (0, vscode_json_languageservice_1.getLanguageService)({\n schemaRequestService: this.getSchemaForURI.bind(this),\n workspaceContext: {\n resolveRelativePath: (relativePath, resource) => {\n const url = new URL(relativePath, resource);\n return url.toString();\n },\n },\n });\n this.service.configure({\n schemas: schemas.map((schemaDefinition) => ({\n uri: schemaDefinition.uri,\n fileMatch: schemaDefinition.fileMatch,\n })),\n });\n }\n async getOffsetDiagnostics(jsonTextDocument) {\n const jsonDocument = this.service.parseJSONDocument(jsonTextDocument);\n return this.service.doValidation(jsonTextDocument, jsonDocument, {\n schemaValidation: 'error',\n trailingCommas: 'ignore',\n comments: 'ignore',\n });\n }\n async getSchemaForURI(uri) {\n var _a;\n const schema = (_a = this.schemas[uri]) === null || _a === void 0 ? void 0 : _a.schema;\n if (!schema)\n return `No schema for '${uri}' found`;\n return schema;\n }\n}\nexports.JSONValidator = JSONValidator;\n/** We'll reuse this in the language server */\nasync function isValid(service, uri, jsonString) {\n const jsonTextDocument = vscode_json_languageservice_1.TextDocument.create(uri, 'json', 0, jsonString);\n const jsonDocument = service.parseJSONDocument(jsonTextDocument);\n const diagnostics = await service.doValidation(jsonTextDocument, jsonDocument, {\n schemaValidation: 'error',\n trailingCommas: 'ignore',\n comments: 'ignore',\n });\n return diagnostics.every((diagnostic) => diagnostic.severity !== 1);\n}\n//# sourceMappingURL=JSONValidator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AppBlockMissingSchema = void 0;\nconst types_1 = require(\"../../types\");\nexports.AppBlockMissingSchema = {\n meta: {\n code: 'AppBlockMissingSchema',\n name: 'Missing schema definitions in theme app extensions app blocks should be avoided',\n docs: {\n description: 'Report missing schema definitions in theme app extensions app blocks',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/app-block-missing-schema',\n },\n severity: types_1.Severity.ERROR,\n type: types_1.SourceCodeType.LiquidHtml,\n schema: {},\n targets: [types_1.ConfigTarget.ThemeAppExtension],\n },\n create(context) {\n let foundSchema = false;\n const relativePath = context.toRelativePath(context.file.uri);\n /**\n * Theme app extension blocks are the only types of files that can have a\n * schema defined in them.\n */\n if (!relativePath.startsWith('blocks/')) {\n return {};\n }\n return {\n async LiquidRawTag(node) {\n if (node.name == 'schema')\n foundSchema = true;\n },\n async onCodePathEnd() {\n if (!foundSchema) {\n context.report({\n message: `The schema does not exist`,\n startIndex: 0,\n endIndex: 0,\n });\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AppBlockValidTags = exports.ForbiddenTag = void 0;\nconst types_1 = require(\"../../types\");\nvar ForbiddenTag;\n(function (ForbiddenTag) {\n ForbiddenTag[\"JavaScript\"] = \"javascript\";\n ForbiddenTag[\"StyleSheet\"] = \"stylesheet\";\n ForbiddenTag[\"Include\"] = \"include\";\n ForbiddenTag[\"Layout\"] = \"layout\";\n ForbiddenTag[\"Section\"] = \"section\";\n ForbiddenTag[\"Sections\"] = \"sections\";\n})(ForbiddenTag || (exports.ForbiddenTag = ForbiddenTag = {}));\nconst isForbiddenTag = (value) => {\n return Object.values(ForbiddenTag).includes(value);\n};\nconst buildErrorMessage = (tag) => `Theme app extension blocks cannot contain '${tag}' tags`;\nexports.AppBlockValidTags = {\n meta: {\n code: 'AppBlockValidTags',\n name: 'App Block Valid Tags',\n docs: {\n description: 'Identifies forbidden Liquid tags in theme app extension app block and app embed block code.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/app-block-valid-tags',\n recommended: false,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [types_1.ConfigTarget.ThemeAppExtension],\n },\n create(context) {\n const handleForbiddenTags = async (node) => {\n if (isForbiddenTag(node.name)) {\n // When a forbidden tag is used to define a block section\n // with an end tag, highlight the whole section\n const endIndex = node.blockEndPosition ? node.blockEndPosition.end : node.position.end;\n const startIndex = node.blockStartPosition.start;\n const message = buildErrorMessage(node.name);\n return context.report({ message, startIndex, endIndex });\n }\n };\n return {\n LiquidRawTag: handleForbiddenTags,\n LiquidTag: handleForbiddenTags,\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AssetPreload = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../utils\");\nfunction isPreload(attr) {\n return ((0, utils_1.isAttr)(attr, 'rel') &&\n attr.value.some((node) => node.type === liquid_html_parser_1.NodeTypes.TextNode && node.value === 'preload'));\n}\nexports.AssetPreload = {\n meta: {\n code: 'AssetPreload',\n name: 'Prevent Manual Preloading of Assets',\n docs: {\n description: 'This check is aimed at discouraging the manual preloading of assets and encourages the use of appropriate Shopify filters.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-preload',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async HtmlVoidElement(node) {\n var _a;\n const preloadLinkAttr = node.attributes.find((attr) => (0, utils_1.isValuedHtmlAttribute)(attr) && isPreload(attr));\n if (node.name === 'link' && preloadLinkAttr) {\n const asAttr = node.attributes\n .filter(utils_1.isValuedHtmlAttribute)\n .find((attr) => (0, utils_1.isAttr)(attr, 'as'));\n const assetType = (_a = asAttr === null || asAttr === void 0 ? void 0 : asAttr.value.find((node) => (0, utils_1.isNodeOfType)(liquid_html_parser_1.NodeTypes.TextNode, node))) === null || _a === void 0 ? void 0 : _a.value;\n let message = '';\n if (assetType === 'style') {\n message =\n 'For better performance, prefer using the preload argument of the stylesheet_tag filter';\n }\n else if (assetType === 'image') {\n message =\n 'For better performance, prefer using the preload argument of the image_tag filter';\n }\n else {\n message = 'For better performance, prefer using the preload_tag filter';\n }\n context.report({\n message,\n startIndex: node.position.start,\n endIndex: node.position.end,\n });\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AssetSizeAppBlockCSS = void 0;\nconst json_1 = require(\"../../json\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../utils\");\nconst file_utils_1 = require(\"../../utils/file-utils\");\nconst schema = {\n thresholdInBytes: types_1.SchemaProp.number(100000),\n};\nexports.AssetSizeAppBlockCSS = {\n meta: {\n code: 'AssetSizeAppBlockCSS',\n name: 'Asset Size App Block CSS',\n docs: {\n description: 'This check is aimed at preventing large CSS bundles from being included via Theme App Extensions.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-app-block-css',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema,\n targets: [types_1.ConfigTarget.ThemeAppExtension],\n },\n create(context) {\n if (!context.fileSize) {\n return {};\n }\n return {\n async LiquidRawTag(node) {\n if (node.name !== 'schema')\n return;\n const schema = (0, json_1.parseJSON)(node.body.value);\n if ((0, utils_1.isError)(schema))\n return;\n const stylesheet = schema.stylesheet;\n if (!stylesheet)\n return;\n const relativePath = `assets/${stylesheet}`;\n const thresholdInBytes = context.settings.thresholdInBytes;\n const startIndex = node.body.position.start + node.body.value.indexOf(stylesheet);\n const endIndex = startIndex + stylesheet.length;\n const fileExists = await (0, file_utils_1.doesFileExist)(context, relativePath);\n if (!fileExists) {\n context.report({\n message: `'${stylesheet}' does not exist.`,\n startIndex: startIndex,\n endIndex: endIndex,\n });\n return;\n }\n const [fileExceedsThreshold, fileSize] = await (0, file_utils_1.doesFileExceedThreshold)(context, relativePath, thresholdInBytes);\n if (fileExceedsThreshold) {\n context.report({\n message: `The file size for '${stylesheet}' (${fileSize} B) exceeds the configured threshold (${thresholdInBytes} B)`,\n startIndex: startIndex,\n endIndex: endIndex,\n });\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AssetSizeAppBlockJavaScript = void 0;\nconst json_1 = require(\"../../json\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../utils\");\nconst file_utils_1 = require(\"../../utils/file-utils\");\nconst schema = {\n thresholdInBytes: types_1.SchemaProp.number(10000),\n};\nexports.AssetSizeAppBlockJavaScript = {\n meta: {\n code: 'AssetSizeAppBlockJavaScript',\n name: 'Asset Size App Block JavaScript',\n docs: {\n description: 'This check is aimed at preventing large JavaScript bundles from being included via Theme App Extensions.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-app-block-javascript',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema,\n targets: [types_1.ConfigTarget.ThemeAppExtension],\n },\n create(context) {\n if (!context.fileSize) {\n return {};\n }\n return {\n async LiquidRawTag(node) {\n if (node.name !== 'schema')\n return;\n const schema = (0, json_1.parseJSON)(node.body.value);\n if ((0, utils_1.isError)(schema))\n return;\n const javascript = schema.javascript;\n if (!javascript)\n return;\n const relativePath = `assets/${javascript}`;\n const thresholdInBytes = context.settings.thresholdInBytes;\n const startIndex = node.body.position.start + node.body.value.indexOf(javascript);\n const endIndex = startIndex + javascript.length;\n const fileExists = await (0, file_utils_1.doesFileExist)(context, relativePath);\n if (!fileExists) {\n context.report({\n message: `'${javascript}' does not exist.`,\n startIndex: startIndex,\n endIndex: endIndex,\n });\n return;\n }\n const [fileExceedsThreshold, fileSize] = await (0, file_utils_1.doesFileExceedThreshold)(context, relativePath, thresholdInBytes);\n if (fileExceedsThreshold) {\n context.report({\n message: `The file size for '${javascript}' (${fileSize} B) exceeds the configured threshold (${thresholdInBytes} B)`,\n startIndex: startIndex,\n endIndex: endIndex,\n });\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AssetSizeCSS = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../utils\");\nconst file_utils_1 = require(\"../../utils/file-utils\");\nconst utils_2 = require(\"../utils\");\nconst schema = {\n thresholdInBytes: types_1.SchemaProp.number(100000),\n};\nfunction isTextNode(node) {\n return node.type === liquid_html_parser_1.NodeTypes.TextNode;\n}\nfunction isLiquidVariableOutput(node) {\n return node.type === liquid_html_parser_1.NodeTypes.LiquidVariableOutput;\n}\nfunction isLiquidVariable(node) {\n return typeof node !== 'string' && node.type === liquid_html_parser_1.NodeTypes.LiquidVariable;\n}\nfunction isString(node) {\n return node.type === liquid_html_parser_1.NodeTypes.String;\n}\nexports.AssetSizeCSS = {\n meta: {\n code: 'AssetSizeCSS',\n aliases: ['AssetSizeCSSStylesheetTag'],\n name: 'Prevent Large CSS bundles',\n docs: {\n description: 'This check is aimed at preventing large CSS bundles for speed.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-css',\n recommended: false,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema,\n targets: [],\n },\n create(context) {\n if (!context.fileSize) {\n return {};\n }\n const thresholdInBytes = context.settings.thresholdInBytes;\n async function checkRemoteAssetSize(url, position) {\n if (await (0, file_utils_1.hasRemoteAssetSizeExceededThreshold)(url, thresholdInBytes)) {\n context.report({\n message: `The CSS file size exceeds the threshold of ${thresholdInBytes} bytes`,\n startIndex: position.start,\n endIndex: position.end,\n });\n }\n }\n async function checkThemeAssetSize(srcValue, position) {\n if (await (0, file_utils_1.hasLocalAssetSizeExceededThreshold)(context, `assets/${srcValue}`, thresholdInBytes)) {\n context.report({\n message: `The CSS file size exceeds the threshold of ${thresholdInBytes} bytes`,\n startIndex: position.start,\n endIndex: position.end,\n });\n }\n }\n return {\n async HtmlVoidElement(node) {\n if (node.name !== 'link')\n return;\n const relIsStylesheet = node.attributes\n .filter(utils_2.isValuedHtmlAttribute)\n .find((attr) => (0, utils_2.isAttr)(attr, 'rel') && (0, utils_2.valueIncludes)(attr, 'stylesheet'));\n if (!relIsStylesheet)\n return;\n const href = node.attributes\n .filter(utils_2.isValuedHtmlAttribute)\n .find((attr) => (0, utils_2.isAttr)(attr, 'href'));\n if (!href)\n return;\n if (href.value.length !== 1)\n return;\n /* This ensures that the link entered is a text and not anything else like http//..{}\n This also checks if the value starts with 'http://', 'https://' or '//' to ensure its a valid link. */\n if (isTextNode(href.value[0]) && /(https?:)?\\/\\//.test(href.value[0].value)) {\n const url = href.value[0].value;\n await checkRemoteAssetSize(url, href.attributePosition);\n }\n /* This code checks if we have a link with a liquid variable\n and that its a string with one filter, `asset_url`. This is done to ensure our .css link is\n entered with a 'asset_url' to produce valid output. */\n if (isLiquidVariableOutput(href.value[0]) &&\n isLiquidVariable(href.value[0].markup) &&\n isString(href.value[0].markup.expression) &&\n href.value[0].markup.filters.length === 1 &&\n href.value[0].markup.filters[0].name === 'asset_url') {\n const assetName = href.value[0].markup.expression.value;\n await checkThemeAssetSize(assetName, href.attributePosition);\n }\n },\n async LiquidFilter(node, ancestors) {\n if (node.name !== 'stylesheet_tag')\n return;\n const liquidVariableParent = (0, utils_1.last)(ancestors);\n if (!liquidVariableParent || !(0, utils_2.isNodeOfType)(liquid_html_parser_1.NodeTypes.LiquidVariable, liquidVariableParent))\n return;\n if (liquidVariableParent.expression.type !== liquid_html_parser_1.NodeTypes.String)\n return;\n /* This code ensures we have a liquid variable with 1 expression, 1 filter, and that it is a valid http link.\n This is done to ensure a valid http link is entered with 1 filter being the `stylesheet_tag` for valid output. */\n if (liquidVariableParent.expression.value[0].length == 1 &&\n liquidVariableParent.filters.length == 1 &&\n /(https?:)?\\/\\//.test(liquidVariableParent.expression.value)) {\n const url = liquidVariableParent.expression.value;\n await checkRemoteAssetSize(url, liquidVariableParent.expression.position);\n }\n /* This code ensures we have a liquid variable with 1 expression, 2 filters being asset_url and stylesheet_tag\n This is done to ensure a .css file has the 'asset_url' and 'stylesheet_tag' to produce the appropriate output. */\n if (liquidVariableParent.expression.value[0].length == 1 &&\n liquidVariableParent.filters.length == 2 &&\n liquidVariableParent.filters[0].name === 'asset_url' &&\n liquidVariableParent.filters[1].name === 'stylesheet_tag') {\n const css = liquidVariableParent.expression.value;\n await checkThemeAssetSize(css, liquidVariableParent.position);\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AssetSizeJavaScript = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../utils\");\nconst file_utils_1 = require(\"../../utils/file-utils\");\nconst utils_2 = require(\"../utils\");\nconst schema = {\n thresholdInBytes: types_1.SchemaProp.number(10000),\n};\nfunction isTextNode(node) {\n return node.type === liquid_html_parser_1.NodeTypes.TextNode;\n}\nfunction isLiquidVariableOutput(node) {\n return node.type === liquid_html_parser_1.NodeTypes.LiquidVariableOutput;\n}\nfunction isLiquidVariable(node) {\n return typeof node !== 'string' && node.type === liquid_html_parser_1.NodeTypes.LiquidVariable;\n}\nfunction isString(node) {\n return node.type === liquid_html_parser_1.NodeTypes.String;\n}\nexports.AssetSizeJavaScript = {\n meta: {\n code: 'AssetSizeJavaScript',\n name: 'Prevent Large JavaScript bundles',\n docs: {\n description: 'This check is aimed at preventing large JavaScript bundles for speed.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-javascript',\n recommended: false,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema,\n targets: [],\n },\n create(context) {\n if (!context.fileSize) {\n return {};\n }\n const thresholdInBytes = context.settings.thresholdInBytes;\n async function checkRemoteAssetSize(url, position) {\n if (await (0, file_utils_1.hasRemoteAssetSizeExceededThreshold)(url, thresholdInBytes)) {\n context.report({\n message: `JavaScript on every page load exceeds compressed size threshold (${thresholdInBytes} Bytes), consider using the import on interaction pattern.`,\n startIndex: position.start,\n endIndex: position.end,\n });\n }\n }\n async function checkThemeAssetSize(srcValue, position) {\n if (await (0, file_utils_1.hasLocalAssetSizeExceededThreshold)(context, `assets/${srcValue}`, thresholdInBytes)) {\n context.report({\n message: `JavaScript on every page load exceeds compressed size threshold (${thresholdInBytes} Bytes), consider using the import on interaction pattern.`,\n startIndex: position.start,\n endIndex: position.end,\n });\n }\n }\n return {\n async HtmlRawNode(node) {\n if (node.name !== 'script')\n return;\n const src = node.attributes\n .filter(utils_2.isValuedHtmlAttribute)\n .find((attr) => (0, utils_2.isAttr)(attr, 'src'));\n if (!src)\n return;\n if (src.value.length !== 1)\n return;\n if (isTextNode(src.value[0]) && /(https?:)?\\/\\//.test(src.value[0].value)) {\n const url = src.value[0].value;\n await checkRemoteAssetSize(url, src.attributePosition);\n }\n if (isLiquidVariableOutput(src.value[0]) &&\n isLiquidVariable(src.value[0].markup) &&\n isString(src.value[0].markup.expression) &&\n src.value[0].markup.filters.length === 1 &&\n src.value[0].markup.filters[0].name === 'asset_url') {\n const assetName = src.value[0].markup.expression.value;\n await checkThemeAssetSize(assetName, src.attributePosition);\n }\n },\n async LiquidFilter(node, ancestors) {\n if (node.name !== 'script_tag')\n return;\n const liquidVariableParent = (0, utils_1.last)(ancestors);\n if (!liquidVariableParent || !(0, utils_2.isNodeOfType)(liquid_html_parser_1.NodeTypes.LiquidVariable, liquidVariableParent))\n return;\n if (liquidVariableParent.expression.type !== liquid_html_parser_1.NodeTypes.String)\n return;\n if (liquidVariableParent.expression.value[0].length == 1 &&\n liquidVariableParent.filters.length == 1 &&\n /(https?:)?\\/\\//.test(liquidVariableParent.expression.value)) {\n const url = liquidVariableParent.expression.value;\n await checkRemoteAssetSize(url, liquidVariableParent.expression.position);\n }\n if (liquidVariableParent.expression.value[0].length == 1 &&\n liquidVariableParent.filters.length == 2 &&\n liquidVariableParent.filters[0].name === 'asset_url' &&\n liquidVariableParent.filters[1].name === 'script_tag') {\n const js = liquidVariableParent.expression.value;\n await checkThemeAssetSize(js, liquidVariableParent.position);\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BlockIdUsage = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nexports.BlockIdUsage = {\n meta: {\n code: 'BlockIdUsage',\n name: 'Do not rely on `block.id` in if/else/unless/case',\n docs: {\n description: 'The ID is dynamically generated by Shopify and is subject to change. You should avoid relying on a literal value of this ID.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/block-id-usage',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n // BAD: {% if block.id == \"123\" %}\n // BAD: {% if block.id == some_variable %}\n // BAD: {% if block[id] == \"id\" or block.id %}\n // FINE: <div data-block-id=\"{{ block.id }}\">\n // FINE: document.querySelector(`[data-block-id=\"${block.id}\"]`)\n async Comparison(node, ancesors) {\n if (node.comparator === '==' &&\n node.left.type === liquid_html_parser_1.NodeTypes.VariableLookup &&\n isUsingBlockId(node.left)) {\n reportWarning(context, node.position);\n }\n },\n // BAD {% case block.id %}\n async VariableLookup(node, ancestors) {\n const parentNode = ancestors.at(-1);\n if ((parentNode === null || parentNode === void 0 ? void 0 : parentNode.type) === liquid_html_parser_1.NodeTypes.LiquidTag && parentNode.name === 'case') {\n if (isUsingBlockId(node)) {\n reportWarning(context, node.position);\n }\n }\n },\n };\n },\n};\nfunction isUsingBlockId(node) {\n return (node.type == liquid_html_parser_1.NodeTypes.VariableLookup &&\n node.name === 'block' &&\n node.lookups[0] &&\n node.lookups[0].type === liquid_html_parser_1.NodeTypes.String &&\n node.lookups[0].value === 'id');\n}\nfunction reportWarning(context, position) {\n context.report({\n message: 'The ID is dynamically generated by Shopify and is subject to change. You should avoid relying on a literal value of this ID.',\n startIndex: position.start,\n endIndex: position.end,\n });\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CdnPreconnect = void 0;\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../utils\");\nexports.CdnPreconnect = {\n meta: {\n code: 'CdnPreconnect',\n name: 'CDN Preconnect',\n docs: {\n description: \"This check is aimed at signaling the redundant preconnect to Shopify's CDN\",\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/cdn-preconnect',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async HtmlVoidElement(node) {\n if (node.name !== 'link')\n return;\n const isPreconnect = node.attributes\n .filter(utils_1.isValuedHtmlAttribute)\n .some((attr) => (0, utils_1.isAttr)(attr, 'rel') && (0, utils_1.valueIncludes)(attr, 'preconnect'));\n if (!isPreconnect)\n return;\n const isShopifyCdn = node.attributes\n .filter(utils_1.isValuedHtmlAttribute)\n .some((attr) => (0, utils_1.isAttr)(attr, 'href') && (0, utils_1.valueIncludes)(attr, '.+cdn.shopify.com.+'));\n if (!isShopifyCdn)\n return;\n context.report({\n message: 'Preconnecting to cdn.shopify.com is unnecessary and can lead to worse performance',\n startIndex: node.position.start,\n endIndex: node.position.end,\n });\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContentForHeaderModification = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../utils\");\nfunction isLiquidTagAssign(node) {\n return node.name === 'assign' && typeof node.markup !== 'string';\n}\nfunction isLiquidTagCapture(node) {\n return node.name === 'capture' && typeof node.markup !== 'string';\n}\nfunction isLiquidTagEcho(node) {\n return node.name === 'echo' && typeof node.markup !== 'string';\n}\nexports.ContentForHeaderModification = {\n meta: {\n code: 'ContentForHeaderModification',\n name: 'Do not depend on the content of content_for_header',\n docs: {\n description: 'Do not rely on the content of content_for_header as it might change in the future, which could cause your Liquid code behavior to change.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/content-for-header-modification',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n function checkContentForHeader(node, position) {\n if ((0, utils_1.isNodeOfType)(liquid_html_parser_1.NodeTypes.VariableLookup, node) && node.name === 'content_for_header') {\n context.report({\n message: 'Do not rely on the content of `content_for_header`',\n startIndex: position.start,\n endIndex: position.end,\n });\n }\n }\n return {\n async LiquidTag(node) {\n if (isLiquidTagAssign(node)) {\n checkContentForHeader(node.markup.value.expression, node.position);\n }\n else if (isLiquidTagEcho(node)) {\n checkContentForHeader(node.markup.expression, node.position);\n }\n else if (isLiquidTagCapture(node) && node.children) {\n for (const child of node.children) {\n if (child.type === liquid_html_parser_1.NodeTypes.LiquidVariableOutput && typeof child.markup !== 'string') {\n checkContentForHeader(child.markup.expression, child.position);\n }\n }\n }\n },\n async LiquidVariableOutput(node) {\n if (typeof node.markup === 'string')\n return;\n if (node.markup.filters.length) {\n checkContentForHeader(node.markup.expression, node.position);\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeprecateBgsizes = void 0;\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../utils\");\nexports.DeprecateBgsizes = {\n meta: {\n code: 'DeprecateBgsizes',\n name: 'Deprecate Bgsizes',\n docs: {\n description: 'This check is aimed at discouraging the use of the lazySizes bgset plugin.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecate-bgsizes',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async HtmlElement(node) {\n const classAttributeWithLazyload = node.attributes\n .filter(utils_1.isValuedHtmlAttribute)\n .find((attr) => (0, utils_1.isAttr)(attr, 'class') && (0, utils_1.valueIncludes)(attr, 'lazyload'));\n if (classAttributeWithLazyload) {\n const attr = classAttributeWithLazyload;\n context.report({\n message: 'Use the native loading=\"lazy\" attribute instead of lazysizes',\n startIndex: attr.attributePosition.start,\n endIndex: attr.attributePosition.end,\n });\n }\n const dataBgsetAttr = node.attributes.find((attr) => (0, utils_1.isValuedHtmlAttribute)(attr) && (0, utils_1.isAttr)(attr, 'data-bgset'));\n if (dataBgsetAttr) {\n context.report({\n message: 'Use the CSS imageset attribute instead of data-bgset',\n startIndex: dataBgsetAttr.position.start,\n endIndex: dataBgsetAttr.position.end,\n });\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeprecateLazysizes = void 0;\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../utils\");\nfunction showsLazysizesUsage(attr) {\n return (0, utils_1.isAttr)(attr, 'data-srcset') || (0, utils_1.isAttr)(attr, 'data-sizes');\n}\nexports.DeprecateLazysizes = {\n meta: {\n code: 'DeprecateLazysizes',\n name: 'Deprecate Lazysizes',\n docs: {\n description: 'This check is aimed at discouraging the use of the lazysizes JavaScript library',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecate-lazysizes',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async HtmlVoidElement(node) {\n if (node.name !== 'img')\n return;\n const attributes = node.attributes.filter(utils_1.isHtmlAttribute);\n const hasSrc = attributes.some((attr) => (0, utils_1.isAttr)(attr, 'src'));\n const hasNativeLoading = attributes.some((attr) => (0, utils_1.isAttr)(attr, 'loading'));\n if (hasSrc && hasNativeLoading)\n return;\n const hasLazyloadClass = node.attributes\n .filter(utils_1.isValuedHtmlAttribute)\n .some((attr) => (0, utils_1.isAttr)(attr, 'class') && (0, utils_1.valueIncludes)(attr, 'lazyload'));\n if (!hasLazyloadClass)\n return;\n const hasLazysizesAttribute = node.attributes\n .filter(utils_1.isValuedHtmlAttribute)\n .some(showsLazysizesUsage);\n if (!hasLazysizesAttribute)\n return;\n context.report({\n message: 'Use the native loading=\"lazy\" attribute instead of lazysizes',\n startIndex: node.position.start,\n endIndex: node.position.end,\n });\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fixHexToRgba = fixHexToRgba;\nexports.suggestImgTagFix = suggestImgTagFix;\nexports.suggestImgUrlFix = suggestImgUrlFix;\nexports.suggestImageUrlFix = suggestImageUrlFix;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst utils_1 = require(\"../utils\");\n/**\n * Width and height values cannot exceed this maximum size.\n */\nconst MAX_SIZE = 5760;\nconst NAMED_SIZES = {\n pico: 16,\n icon: 32,\n thumb: 50,\n small: 100,\n compact: 160,\n medium: 240,\n large: 480,\n grande: 600,\n original: 1024,\n};\nfunction fixHexToRgba(node) {\n /**\n * Cannot fix invalid usage.\n *\n * The `hex_to_rgba` filter is only valid with zero or one argument (`alpha`).\n */\n if (node.args.length > 1)\n return;\n const { start, end } = getFilterSourceStartAndEnd(node);\n const alpha = getExpressionArgumentValue(node, 0);\n let fixedFilter;\n if (alpha) {\n fixedFilter = ` color_to_rgb | color_modify: 'alpha', ${alpha}`;\n }\n else {\n fixedFilter = ' color_to_rgb';\n }\n return (corrector) => corrector.replace(start, end, fixedFilter);\n}\nfunction suggestImgTagFix(node) {\n const message = \"Replace 'img_tag' with 'image_tag'.\";\n const alt = getExpressionArgumentValue(node, 0);\n const cssClass = getExpressionArgumentValue(node, 1);\n const sizeStr = getExpressionArgumentValue(node, 2);\n const { width, height } = getImageSize(sizeStr, { width: -1, height: -1 });\n const { start, end } = getFilterSourceStartAndEnd(node);\n const imageUrlParameters = ensureImageValue({ width, height });\n const imageTagParameters = {\n width,\n height,\n alt: strValue(alt),\n class: strValue(cssClass),\n };\n const imageUrlFilter = buildFilterString('image_url', imageUrlParameters);\n const imageTagFilter = buildFilterString('image_tag', imageTagParameters);\n return [\n {\n message,\n fix: (corrector) => {\n const insert = `${imageUrlFilter} |${imageTagFilter}`;\n corrector.replace(start, end, insert);\n },\n },\n ];\n}\nfunction suggestImgUrlFix(node) {\n const message = \"Replace 'img_url' with 'image_url'.\";\n const cropNode = getNamedArgumentNode(node, 'crop');\n const formatNode = getNamedArgumentNode(node, 'format');\n const scaleNode = getNamedArgumentNode(node, 'scale');\n const sizeStr = getExpressionArgumentValue(node, 0);\n const sizeNode = node.args.at(0);\n /**\n * Cannot fix when 'scale' or 'size' node are variable lookups.\n */\n if (isVariableLookup(scaleNode === null || scaleNode === void 0 ? void 0 : scaleNode.value) || isVariableLookup(sizeNode)) {\n return;\n }\n const { width, height } = ensureImageValue(scaleImage(node, getImageSize(sizeStr)));\n const { start, end } = getFilterSourceStartAndEnd(node);\n const parameters = { width, height };\n if (isStringLiteral(cropNode === null || cropNode === void 0 ? void 0 : cropNode.value)) {\n parameters['crop'] = strValue(cropNode.value.value);\n }\n if (isStringLiteral(formatNode === null || formatNode === void 0 ? void 0 : formatNode.value)) {\n parameters['format'] = strValue(formatNode.value.value);\n }\n if (isVariableLookup(formatNode === null || formatNode === void 0 ? void 0 : formatNode.value)) {\n parameters['format'] = formatNode.value.name;\n }\n return [\n {\n message,\n fix: (corrector) => {\n const insert = buildFilterString('image_url', parameters);\n corrector.replace(start, end, insert);\n },\n },\n ];\n}\nfunction suggestImageUrlFix(filter, node) {\n const message = `Replace '${filter}' with 'image_url'.`;\n const sizeStr = getExpressionArgumentValue(node, 0);\n const { width, height } = ensureImageValue(getImageSize(sizeStr));\n const { start, end } = getFilterSourceStartAndEnd(node);\n return [\n {\n message,\n fix: (corrector) => {\n const insert = buildFilterString('image_url', { width, height });\n corrector.replace(start, end, insert);\n },\n },\n ];\n}\nfunction getImageSize(size, imageSize = { width: 100, height: 100 }) {\n if (!size)\n return { ...imageSize };\n if (size in NAMED_SIZES) {\n const s = NAMED_SIZES[size];\n return { width: s, height: s };\n }\n const [width, height] = size.split('x').map((s) => parseInt(s));\n return ensureImageSizeLimit({ width, height });\n}\nfunction scaleImage(node, imageSize) {\n const scale = parseInt(getNamedArgumentValue(node, 'scale') || '0') || 1;\n return ensureImageSizeLimit({\n width: imageSize.width * scale,\n height: imageSize.height * scale,\n });\n}\nfunction ensureImageSizeLimit(imageSize) {\n return {\n width: Math.min(imageSize.width, MAX_SIZE),\n height: Math.min(imageSize.height, MAX_SIZE),\n };\n}\nfunction ensureImageValue(imageSize) {\n let { width, height } = imageSize;\n const isImageSizeUnset = (!height || height === -1) && (!width || width === -1);\n /**\n * If `image_url` is missing a width or height, we default to width=100, as\n * the documentation mention an error is returned if neither are specified\n * (interestingly, `image_url` doesn't actually fail during runtime tests).\n *\n * That default value is widely mentioned in the documentation and we've\n * confirmed that in runtime tests.\n */\n if (isImageSizeUnset) {\n width = 100;\n }\n return { width, height };\n}\nfunction getExpressionArgumentValue(node, index) {\n const arg = node.args.at(index);\n if (isNumberLiteral(arg) || isStringLiteral(arg)) {\n return arg.value;\n }\n}\nfunction getNamedArgumentValue(node, propertyName) {\n const argumentNode = getNamedArgumentNode(node, propertyName);\n const valueNode = argumentNode === null || argumentNode === void 0 ? void 0 : argumentNode.value;\n if (isNumberLiteral(valueNode) || isStringLiteral(valueNode)) {\n return valueNode.value;\n }\n}\nfunction getNamedArgumentNode(node, argName) {\n const args = node.args;\n return args.find((arg) => (0, utils_1.isNodeOfType)(liquid_html_parser_1.NodeTypes.NamedArgument, arg) && arg.name === argName);\n}\nfunction buildFilterString(filter, filterParameters) {\n const parameters = Object.entries(filterParameters)\n .filter(([_key, value]) => value && value !== -1)\n .map(([key, value]) => `${key}: ${value}`)\n .join(', ');\n if (!parameters) {\n return ` ${filter}`;\n }\n return ` ${filter}: ${parameters}`;\n}\nfunction getFilterSourceStartAndEnd(node) {\n const position = node.position;\n const pipePosition = node.source.slice(position.start).indexOf('|');\n return {\n start: position.start + pipePosition + 1,\n end: position.end,\n };\n}\nfunction strValue(value) {\n return value ? `'${value}'` : null;\n}\nfunction isVariableLookup(exp) {\n return (0, utils_1.isNodeOfType)(liquid_html_parser_1.NodeTypes.VariableLookup, exp);\n}\nfunction isStringLiteral(exp) {\n return (0, utils_1.isNodeOfType)(liquid_html_parser_1.NodeTypes.String, exp);\n}\nfunction isNumberLiteral(exp) {\n return (0, utils_1.isNodeOfType)(liquid_html_parser_1.NodeTypes.Number, exp);\n}\n//# sourceMappingURL=fixes.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeprecatedFilter = void 0;\nconst types_1 = require(\"../../types\");\nconst fixes_1 = require(\"./fixes\");\nexports.DeprecatedFilter = {\n meta: {\n code: 'DeprecatedFilter',\n aliases: ['DeprecatedFilters'],\n name: 'Deprecated Filter',\n docs: {\n description: 'Discourages using deprecated filters in themes.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-filter',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n if (!context.themeDocset) {\n return {};\n }\n return {\n LiquidFilter: async (node) => {\n const filters = await context.themeDocset.filters();\n const deprecatedFilter = filters.find((f) => {\n return f.deprecated && f.name === node.name;\n });\n if (!deprecatedFilter) {\n return;\n }\n const recommendedFilterName = findRecommendedAlternative(deprecatedFilter);\n const recommendedFilter = filters.find((f) => f.name === recommendedFilterName);\n const message = deprecatedFilterMessage(deprecatedFilter, recommendedFilter);\n const suggest = deprecatedFilterSuggestion(node);\n const fix = deprecatedFilterFix(node);\n context.report({\n message,\n suggest,\n fix,\n startIndex: node.position.start + 1,\n endIndex: node.position.end,\n });\n },\n };\n },\n};\nfunction deprecatedFilterSuggestion(node) {\n const filter = node.name;\n switch (filter) {\n case 'img_tag':\n return (0, fixes_1.suggestImgTagFix)(node);\n case 'img_url':\n return (0, fixes_1.suggestImgUrlFix)(node);\n case 'article_img_url':\n case 'collection_img_url':\n case 'product_img_url':\n /**\n * These filters rely on the usage of the `image_url`\n * filter as the fix.\n */\n return (0, fixes_1.suggestImageUrlFix)(filter, node);\n case 'currency_selector':\n /**\n * Cannot be fixed.\n *\n * Deprecated without a direct replacement because the\n * currency form has also been deprecated. The currency\n * form was replaced by the localization form.\n */\n return;\n }\n}\nfunction deprecatedFilterFix(node) {\n const filter = node.name;\n if (filter === 'hex_to_rgba') {\n return (0, fixes_1.fixHexToRgba)(node);\n }\n}\nfunction deprecatedFilterMessage(deprecated, recommended) {\n if (recommended) {\n return `Deprecated filter '${deprecated.name}', consider using '${recommended.name}'.`;\n }\n return `Deprecated filter '${deprecated.name}'.`;\n}\nfunction findRecommendedAlternative(deprecatedFilter) {\n const reason = deprecatedFilter.deprecation_reason;\n const match = reason === null || reason === void 0 ? void 0 : reason.match(/replaced by \\[`(.+?)`\\]/);\n return match === null || match === void 0 ? void 0 : match[1];\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEPRECATED_FONT_HANDLES = void 0;\nexports.DEPRECATED_FONT_HANDLES = new Set([\n 'agmena_i3',\n 'agmena_i4',\n 'agmena_i6',\n 'agmena_i7',\n 'agmena_n3',\n 'agmena_n4',\n 'agmena_n6',\n 'agmena_n7',\n 'akko_i2',\n 'akko_i3',\n 'akko_i4',\n 'akko_i5',\n 'akko_i7',\n 'akko_i9',\n 'akko_n2',\n 'akko_n3',\n 'akko_n4',\n 'akko_n5',\n 'akko_n7',\n 'akko_n9',\n 'alfie_n4',\n 'americana_i4',\n 'americana_n4',\n 'americana_n7',\n 'americana_n8',\n 'antique_olive_i4',\n 'antique_olive_n3',\n 'antique_olive_n4',\n 'antique_olive_n7',\n 'antique_olive_n9',\n 'armata_n4',\n 'avenir_next_i1',\n 'avenir_next_i2',\n 'avenir_next_i3',\n 'avenir_next_i4',\n 'avenir_next_i5',\n 'avenir_next_i6',\n 'avenir_next_i7',\n 'avenir_next_i8',\n 'avenir_next_n1',\n 'avenir_next_n2',\n 'avenir_next_n3',\n 'avenir_next_n4',\n 'avenir_next_n5',\n 'avenir_next_n6',\n 'avenir_next_n7',\n 'avenir_next_n8',\n 'avenir_next_rounded_i4',\n 'avenir_next_rounded_i5',\n 'avenir_next_rounded_i6',\n 'avenir_next_rounded_i7',\n 'avenir_next_rounded_n4',\n 'avenir_next_rounded_n5',\n 'avenir_next_rounded_n6',\n 'avenir_next_rounded_n7',\n 'azbuka_i3',\n 'azbuka_i4',\n 'azbuka_i5',\n 'azbuka_i6',\n 'azbuka_i7',\n 'azbuka_n2',\n 'azbuka_n3',\n 'azbuka_n4',\n 'azbuka_n5',\n 'azbuka_n6',\n 'azbuka_n7',\n 'azbuka_n8',\n 'azbuka_n9',\n 'basic_commercial_i3',\n 'basic_commercial_i4',\n 'basic_commercial_i7',\n 'basic_commercial_i8',\n 'basic_commercial_n3',\n 'basic_commercial_n4',\n 'basic_commercial_n7',\n 'basic_commercial_n8',\n 'basic_commercial_soft_rounded_n4',\n 'basic_commercial_soft_rounded_n7',\n 'basic_commercial_soft_rounded_n9',\n 'baskerville_no_2_i4',\n 'baskerville_no_2_i7',\n 'baskerville_no_2_n4',\n 'baskerville_no_2_n7',\n 'bauer_bodoni_i4',\n 'bauer_bodoni_i7',\n 'bauer_bodoni_i9',\n 'bauer_bodoni_n4',\n 'bauer_bodoni_n7',\n 'bauer_bodoni_n9',\n 'beefcakes_i4',\n 'beefcakes_n4',\n 'bembo_book_i4',\n 'bembo_book_i7',\n 'bembo_book_n4',\n 'bembo_book_n7',\n 'bernhard_modern_i4',\n 'bernhard_modern_i7',\n 'bernhard_modern_n4',\n 'bernhard_modern_n7',\n 'bio_rhyme_n2',\n 'bio_rhyme_n3',\n 'bio_rhyme_n4',\n 'bio_rhyme_n5',\n 'bio_rhyme_n6',\n 'bio_rhyme_n7',\n 'bio_rhyme_n8',\n 'bodoni_poster_i9',\n 'bodoni_poster_n9',\n 'burlingame_i1',\n 'burlingame_i2',\n 'burlingame_i3',\n 'burlingame_i4',\n 'burlingame_i5',\n 'burlingame_i6',\n 'burlingame_i7',\n 'burlingame_i8',\n 'burlingame_i9',\n 'burlingame_n1',\n 'burlingame_n2',\n 'burlingame_n3',\n 'burlingame_n4',\n 'burlingame_n5',\n 'burlingame_n6',\n 'burlingame_n7',\n 'burlingame_n8',\n 'burlingame_n9',\n 'cachet_i1',\n 'cachet_i2',\n 'cachet_i3',\n 'cachet_i4',\n 'cachet_i5',\n 'cachet_i6',\n 'cachet_i7',\n 'cachet_i8',\n 'cachet_n1',\n 'cachet_n2',\n 'cachet_n3',\n 'cachet_n4',\n 'cachet_n5',\n 'cachet_n6',\n 'cachet_n7',\n 'cachet_n8',\n 'cardamon_i4',\n 'cardamon_i5',\n 'cardamon_i6',\n 'cardamon_i7',\n 'cardamon_n4',\n 'cardamon_n5',\n 'cardamon_n6',\n 'cardamon_n7',\n 'carter_sans_i4',\n 'carter_sans_i5',\n 'carter_sans_i6',\n 'carter_sans_i7',\n 'carter_sans_n4',\n 'carter_sans_n5',\n 'carter_sans_n6',\n 'carter_sans_n7',\n 'caslon_bold_i4',\n 'caslon_bold_n4',\n 'caslon_old_face_i4',\n 'caslon_old_face_n4',\n 'caslon_old_face_n7',\n 'centaur_i4',\n 'centaur_i7',\n 'centaur_n4',\n 'centaur_n7',\n 'century_gothic_i4',\n 'century_gothic_i7',\n 'century_gothic_n4',\n 'century_gothic_n7',\n 'chong_modern_i3',\n 'chong_modern_i4',\n 'chong_modern_i7',\n 'chong_modern_n3',\n 'chong_modern_n4',\n 'chong_modern_n7',\n 'claire_news_n3',\n 'claire_news_n7',\n 'cooper_bt_i2',\n 'cooper_bt_i5',\n 'cooper_bt_i7',\n 'cooper_bt_i9',\n 'cooper_bt_n2',\n 'cooper_bt_n5',\n 'cooper_bt_n7',\n 'cooper_bt_n9',\n 'daytona_i2',\n 'daytona_i3',\n 'daytona_i4',\n 'daytona_i6',\n 'daytona_i7',\n 'daytona_n2',\n 'daytona_n3',\n 'daytona_n4',\n 'daytona_n6',\n 'daytona_n7',\n 'din_neuzeit_grotesk_n3',\n 'din_neuzeit_grotesk_n7',\n 'din_next_i2',\n 'din_next_i3',\n 'din_next_i4',\n 'din_next_i5',\n 'din_next_i7',\n 'din_next_i8',\n 'din_next_i9',\n 'din_next_n2',\n 'din_next_n3',\n 'din_next_n4',\n 'din_next_n5',\n 'din_next_n7',\n 'din_next_n8',\n 'din_next_n9',\n 'din_next_slab_i2',\n 'din_next_slab_i3',\n 'din_next_slab_i4',\n 'din_next_slab_i5',\n 'din_next_slab_i7',\n 'din_next_slab_i8',\n 'din_next_slab_i9',\n 'din_next_slab_n2',\n 'din_next_slab_n3',\n 'din_next_slab_n4',\n 'din_next_slab_n5',\n 'din_next_slab_n7',\n 'din_next_slab_n8',\n 'din_next_slab_n9',\n 'electra_i4',\n 'electra_i7',\n 'electra_n4',\n 'electra_n7',\n 'eurostile_next_i2',\n 'eurostile_next_i3',\n 'eurostile_next_i4',\n 'eurostile_next_i6',\n 'eurostile_next_i7',\n 'eurostile_next_n2',\n 'eurostile_next_n3',\n 'eurostile_next_n4',\n 'eurostile_next_n6',\n 'eurostile_next_n7',\n 'fette_gotisch_n4',\n 'ff_meta_i1',\n 'ff_meta_i2',\n 'ff_meta_i3',\n 'ff_meta_i4',\n 'ff_meta_i5',\n 'ff_meta_i6',\n 'ff_meta_i7',\n 'ff_meta_i9',\n 'ff_meta_n1',\n 'ff_meta_n2',\n 'ff_meta_n3',\n 'ff_meta_n4',\n 'ff_meta_n5',\n 'ff_meta_n6',\n 'ff_meta_n7',\n 'ff_meta_n9',\n 'ff_meta_serif_i3',\n 'ff_meta_serif_i4',\n 'ff_meta_serif_i5',\n 'ff_meta_serif_i7',\n 'ff_meta_serif_i8',\n 'ff_meta_serif_i9',\n 'ff_meta_serif_n3',\n 'ff_meta_serif_n4',\n 'ff_meta_serif_n5',\n 'ff_meta_serif_n7',\n 'ff_meta_serif_n8',\n 'ff_meta_serif_n9',\n 'ff_tisa_i2',\n 'ff_tisa_i3',\n 'ff_tisa_i4',\n 'ff_tisa_i5',\n 'ff_tisa_i7',\n 'ff_tisa_i8',\n 'ff_tisa_i9',\n 'ff_tisa_n2',\n 'ff_tisa_n3',\n 'ff_tisa_n4',\n 'ff_tisa_n5',\n 'ff_tisa_n7',\n 'ff_tisa_n8',\n 'ff_tisa_n9',\n 'ff_tisa_sans_i2',\n 'ff_tisa_sans_i3',\n 'ff_tisa_sans_i4',\n 'ff_tisa_sans_i5',\n 'ff_tisa_sans_i7',\n 'ff_tisa_sans_i8',\n 'ff_tisa_sans_i9',\n 'ff_tisa_sans_n2',\n 'ff_tisa_sans_n3',\n 'ff_tisa_sans_n4',\n 'ff_tisa_sans_n5',\n 'ff_tisa_sans_n7',\n 'ff_tisa_sans_n8',\n 'ff_tisa_sans_n9',\n 'ff_unit_i2',\n 'ff_unit_i3',\n 'ff_unit_i4',\n 'ff_unit_i5',\n 'ff_unit_i7',\n 'ff_unit_i8',\n 'ff_unit_i9',\n 'ff_unit_n2',\n 'ff_unit_n3',\n 'ff_unit_n4',\n 'ff_unit_n5',\n 'ff_unit_n7',\n 'ff_unit_n8',\n 'ff_unit_n9',\n 'ff_unit_rounded_i3',\n 'ff_unit_rounded_i4',\n 'ff_unit_rounded_i5',\n 'ff_unit_rounded_i7',\n 'ff_unit_rounded_i8',\n 'ff_unit_rounded_i9',\n 'ff_unit_rounded_n3',\n 'ff_unit_rounded_n4',\n 'ff_unit_rounded_n5',\n 'ff_unit_rounded_n7',\n 'ff_unit_rounded_n8',\n 'ff_unit_rounded_n9',\n 'ff_unit_slab_i2',\n 'ff_unit_slab_i3',\n 'ff_unit_slab_i4',\n 'ff_unit_slab_i5',\n 'ff_unit_slab_i7',\n 'ff_unit_slab_i8',\n 'ff_unit_slab_i9',\n 'ff_unit_slab_n2',\n 'ff_unit_slab_n3',\n 'ff_unit_slab_n4',\n 'ff_unit_slab_n5',\n 'ff_unit_slab_n7',\n 'ff_unit_slab_n8',\n 'ff_unit_slab_n9',\n 'friz_quadrata_i4',\n 'friz_quadrata_i7',\n 'friz_quadrata_n4',\n 'friz_quadrata_n7',\n 'frutiger_serif_i3',\n 'frutiger_serif_i4',\n 'frutiger_serif_i5',\n 'frutiger_serif_i7',\n 'frutiger_serif_i8',\n 'frutiger_serif_n3',\n 'frutiger_serif_n4',\n 'frutiger_serif_n5',\n 'frutiger_serif_n7',\n 'frutiger_serif_n8',\n 'fs_kim_i4',\n 'fs_kim_i5',\n 'fs_kim_i7',\n 'fs_kim_i8',\n 'fs_kim_i9',\n 'fs_kim_n4',\n 'fs_kim_n5',\n 'fs_kim_n7',\n 'fs_kim_n8',\n 'fs_kim_n9',\n 'fs_koopman_i1',\n 'fs_koopman_i3',\n 'fs_koopman_i4',\n 'fs_koopman_i5',\n 'fs_koopman_i7',\n 'fs_koopman_i8',\n 'fs_koopman_i9',\n 'fs_koopman_n1',\n 'fs_koopman_n3',\n 'fs_koopman_n4',\n 'fs_koopman_n5',\n 'fs_koopman_n7',\n 'fs_koopman_n8',\n 'fs_koopman_n9',\n 'fs_siena_i1',\n 'fs_siena_i2',\n 'fs_siena_i3',\n 'fs_siena_i4',\n 'fs_siena_i5',\n 'fs_siena_i6',\n 'fs_siena_i7',\n 'fs_siena_n1',\n 'fs_siena_n2',\n 'fs_siena_n3',\n 'fs_siena_n4',\n 'fs_siena_n5',\n 'fs_siena_n6',\n 'fs_siena_n7',\n 'futura_black_n4',\n 'futura_n3',\n 'futura_n4',\n 'futura_n5',\n 'futura_n6',\n 'futura_n7',\n 'futura_n8',\n 'futura_n9',\n 'futura_o3',\n 'futura_o4',\n 'futura_o5',\n 'futura_o6',\n 'futura_o7',\n 'futura_o8',\n 'geometric_415_i4',\n 'geometric_415_i6',\n 'geometric_415_i7',\n 'geometric_415_n4',\n 'geometric_415_n6',\n 'geometric_415_n7',\n 'georgia_pro_i3',\n 'georgia_pro_i4',\n 'georgia_pro_i6',\n 'georgia_pro_i7',\n 'georgia_pro_i9',\n 'georgia_pro_n3',\n 'georgia_pro_n4',\n 'georgia_pro_n6',\n 'georgia_pro_n7',\n 'georgia_pro_n9',\n 'gill_sans_nova_i1',\n 'gill_sans_nova_i2',\n 'gill_sans_nova_i3',\n 'gill_sans_nova_i4',\n 'gill_sans_nova_i5',\n 'gill_sans_nova_i6',\n 'gill_sans_nova_i7',\n 'gill_sans_nova_n1',\n 'gill_sans_nova_n2',\n 'gill_sans_nova_n3',\n 'gill_sans_nova_n4',\n 'gill_sans_nova_n5',\n 'gill_sans_nova_n6',\n 'gill_sans_nova_n7',\n 'gill_sans_nova_n8',\n 'gill_sans_nova_n9',\n 'glegoo_n4',\n 'glegoo_n7',\n 'goudy_old_style_i4',\n 'goudy_old_style_i7',\n 'goudy_old_style_n4',\n 'goudy_old_style_n7',\n 'goudy_old_style_n8',\n 'harmonia_sans_i3',\n 'harmonia_sans_i4',\n 'harmonia_sans_i6',\n 'harmonia_sans_i7',\n 'harmonia_sans_i9',\n 'harmonia_sans_n3',\n 'harmonia_sans_n4',\n 'harmonia_sans_n6',\n 'harmonia_sans_n7',\n 'harmonia_sans_n9',\n 'helvetica_n3',\n 'helvetica_n4',\n 'helvetica_n7',\n 'helvetica_n9',\n 'helvetica_o3',\n 'helvetica_o4',\n 'helvetica_o7',\n 'helvetica_o9',\n 'hope_sans_i1',\n 'hope_sans_i2',\n 'hope_sans_i3',\n 'hope_sans_i4',\n 'hope_sans_i6',\n 'hope_sans_i7',\n 'hope_sans_n1',\n 'hope_sans_n2',\n 'hope_sans_n3',\n 'hope_sans_n4',\n 'hope_sans_n6',\n 'hope_sans_n7',\n 'humanist_521_i2',\n 'humanist_521_i4',\n 'humanist_521_i7',\n 'humanist_521_n2',\n 'humanist_521_n4',\n 'humanist_521_n7',\n 'humanist_521_n8',\n 'humanist_521_n9',\n 'itc_avant_garde_gothic_n2',\n 'itc_avant_garde_gothic_n4',\n 'itc_avant_garde_gothic_n5',\n 'itc_avant_garde_gothic_n6',\n 'itc_avant_garde_gothic_n7',\n 'itc_avant_garde_gothic_o2',\n 'itc_avant_garde_gothic_o4',\n 'itc_avant_garde_gothic_o5',\n 'itc_avant_garde_gothic_o6',\n 'itc_avant_garde_gothic_o7',\n 'itc_benguiat_i4',\n 'itc_benguiat_i5',\n 'itc_benguiat_i7',\n 'itc_benguiat_n4',\n 'itc_benguiat_n5',\n 'itc_benguiat_n7',\n 'itc_berkeley_old_style_i4',\n 'itc_berkeley_old_style_i5',\n 'itc_berkeley_old_style_i7',\n 'itc_berkeley_old_style_i9',\n 'itc_berkeley_old_style_n4',\n 'itc_berkeley_old_style_n5',\n 'itc_berkeley_old_style_n7',\n 'itc_berkeley_old_style_n9',\n 'itc_bodoni_seventytwo_i4',\n 'itc_bodoni_seventytwo_i7',\n 'itc_bodoni_seventytwo_n4',\n 'itc_bodoni_seventytwo_n7',\n 'itc_bodoni_twelve_i4',\n 'itc_bodoni_twelve_i7',\n 'itc_bodoni_twelve_n4',\n 'itc_bodoni_twelve_n7',\n 'itc_caslon_no_224_i4',\n 'itc_caslon_no_224_i5',\n 'itc_caslon_no_224_i7',\n 'itc_caslon_no_224_i9',\n 'itc_caslon_no_224_n4',\n 'itc_caslon_no_224_n5',\n 'itc_caslon_no_224_n7',\n 'itc_caslon_no_224_n9',\n 'itc_charter_i4',\n 'itc_charter_i7',\n 'itc_charter_i9',\n 'itc_charter_n4',\n 'itc_charter_n7',\n 'itc_charter_n9',\n 'itc_cheltenham_i3',\n 'itc_cheltenham_i4',\n 'itc_cheltenham_i7',\n 'itc_cheltenham_i9',\n 'itc_cheltenham_n3',\n 'itc_cheltenham_n4',\n 'itc_cheltenham_n7',\n 'itc_cheltenham_n9',\n 'itc_clearface_i4',\n 'itc_clearface_i7',\n 'itc_clearface_i8',\n 'itc_clearface_i9',\n 'itc_clearface_n4',\n 'itc_clearface_n7',\n 'itc_clearface_n8',\n 'itc_clearface_n9',\n 'itc_conduit_i2',\n 'itc_conduit_i3',\n 'itc_conduit_i4',\n 'itc_conduit_i5',\n 'itc_conduit_i7',\n 'itc_conduit_i8',\n 'itc_conduit_i9',\n 'itc_conduit_n2',\n 'itc_conduit_n3',\n 'itc_conduit_n4',\n 'itc_conduit_n5',\n 'itc_conduit_n7',\n 'itc_conduit_n8',\n 'itc_conduit_n9',\n 'itc_esprit_i4',\n 'itc_esprit_i5',\n 'itc_esprit_i7',\n 'itc_esprit_i9',\n 'itc_esprit_n4',\n 'itc_esprit_n5',\n 'itc_esprit_n7',\n 'itc_esprit_n9',\n 'itc_founders_caslon_i4',\n 'itc_founders_caslon_n4',\n 'itc_franklin_gothic_i4',\n 'itc_franklin_gothic_i5',\n 'itc_franklin_gothic_i7',\n 'itc_franklin_gothic_i9',\n 'itc_franklin_gothic_n4',\n 'itc_franklin_gothic_n5',\n 'itc_franklin_gothic_n7',\n 'itc_franklin_gothic_n9',\n 'itc_galliard_i4',\n 'itc_galliard_i7',\n 'itc_galliard_i8',\n 'itc_galliard_i9',\n 'itc_galliard_n4',\n 'itc_galliard_n7',\n 'itc_galliard_n8',\n 'itc_galliard_n9',\n 'itc_gamma_i4',\n 'itc_gamma_i5',\n 'itc_gamma_i7',\n 'itc_gamma_i8',\n 'itc_gamma_n4',\n 'itc_gamma_n5',\n 'itc_gamma_n7',\n 'itc_gamma_n8',\n 'itc_goudy_sans_i4',\n 'itc_goudy_sans_i5',\n 'itc_goudy_sans_i7',\n 'itc_goudy_sans_i9',\n 'itc_goudy_sans_n4',\n 'itc_goudy_sans_n5',\n 'itc_goudy_sans_n7',\n 'itc_goudy_sans_n9',\n 'itc_johnston_i3',\n 'itc_johnston_i5',\n 'itc_johnston_i7',\n 'itc_johnston_n3',\n 'itc_johnston_n5',\n 'itc_johnston_n7',\n 'itc_mendoza_roman_i4',\n 'itc_mendoza_roman_i5',\n 'itc_mendoza_roman_i7',\n 'itc_mendoza_roman_n4',\n 'itc_mendoza_roman_n5',\n 'itc_mendoza_roman_n7',\n 'itc_modern_no_216_i3',\n 'itc_modern_no_216_i5',\n 'itc_modern_no_216_i7',\n 'itc_modern_no_216_i8',\n 'itc_modern_no_216_n3',\n 'itc_modern_no_216_n5',\n 'itc_modern_no_216_n7',\n 'itc_modern_no_216_n8',\n 'itc_new_baskerville_i4',\n 'itc_new_baskerville_i6',\n 'itc_new_baskerville_i7',\n 'itc_new_baskerville_i9',\n 'itc_new_baskerville_n4',\n 'itc_new_baskerville_n6',\n 'itc_new_baskerville_n7',\n 'itc_new_baskerville_n9',\n 'itc_new_esprit_i4',\n 'itc_new_esprit_i5',\n 'itc_new_esprit_i7',\n 'itc_new_esprit_i8',\n 'itc_new_esprit_n4',\n 'itc_new_esprit_n5',\n 'itc_new_esprit_n7',\n 'itc_new_esprit_n8',\n 'itc_new_veljovic_i3',\n 'itc_new_veljovic_i4',\n 'itc_new_veljovic_i5',\n 'itc_new_veljovic_i7',\n 'itc_new_veljovic_i9',\n 'itc_new_veljovic_n3',\n 'itc_new_veljovic_n4',\n 'itc_new_veljovic_n5',\n 'itc_new_veljovic_n7',\n 'itc_new_veljovic_n9',\n 'itc_novarese_i4',\n 'itc_novarese_i5',\n 'itc_novarese_i7',\n 'itc_novarese_n4',\n 'itc_novarese_n5',\n 'itc_novarese_n7',\n 'itc_novarese_n9',\n 'itc_officina_sans_i4',\n 'itc_officina_sans_i5',\n 'itc_officina_sans_i7',\n 'itc_officina_sans_i8',\n 'itc_officina_sans_i9',\n 'itc_officina_sans_n4',\n 'itc_officina_sans_n5',\n 'itc_officina_sans_n7',\n 'itc_officina_sans_n8',\n 'itc_officina_sans_n9',\n 'itc_officina_serif_i4',\n 'itc_officina_serif_i5',\n 'itc_officina_serif_i7',\n 'itc_officina_serif_i8',\n 'itc_officina_serif_i9',\n 'itc_officina_serif_n4',\n 'itc_officina_serif_n5',\n 'itc_officina_serif_n7',\n 'itc_officina_serif_n8',\n 'itc_officina_serif_n9',\n 'itc_stepp_i3',\n 'itc_stepp_i5',\n 'itc_stepp_i7',\n 'itc_stepp_i9',\n 'itc_stepp_n3',\n 'itc_stepp_n4',\n 'itc_stepp_n7',\n 'itc_stepp_n9',\n 'itc_stone_humanist_i5',\n 'itc_stone_humanist_i6',\n 'itc_stone_humanist_i7',\n 'itc_stone_humanist_n5',\n 'itc_stone_humanist_n6',\n 'itc_stone_humanist_n7',\n 'itc_stone_informal_i4',\n 'itc_stone_informal_i6',\n 'itc_stone_informal_i7',\n 'itc_stone_informal_n4',\n 'itc_stone_informal_n6',\n 'itc_stone_informal_n7',\n 'itc_stone_sans_ii_i3',\n 'itc_stone_sans_ii_i4',\n 'itc_stone_sans_ii_i5',\n 'itc_stone_sans_ii_i6',\n 'itc_stone_sans_ii_i7',\n 'itc_stone_sans_ii_i8',\n 'itc_stone_sans_ii_n3',\n 'itc_stone_sans_ii_n4',\n 'itc_stone_sans_ii_n5',\n 'itc_stone_sans_ii_n6',\n 'itc_stone_sans_ii_n7',\n 'itc_stone_sans_ii_n8',\n 'itc_stone_serif_i4',\n 'itc_stone_serif_i6',\n 'itc_stone_serif_i7',\n 'itc_stone_serif_n4',\n 'itc_stone_serif_n6',\n 'itc_stone_serif_n7',\n 'itc_tapioca_n5',\n 'joanna_nova_i1',\n 'joanna_nova_i2',\n 'joanna_nova_i3',\n 'joanna_nova_i4',\n 'joanna_nova_i5',\n 'joanna_nova_i6',\n 'joanna_nova_i7',\n 'joanna_nova_i8',\n 'joanna_nova_i9',\n 'joanna_nova_n1',\n 'joanna_nova_n2',\n 'joanna_nova_n3',\n 'joanna_nova_n4',\n 'joanna_nova_n5',\n 'joanna_nova_n6',\n 'joanna_nova_n7',\n 'joanna_nova_n8',\n 'joanna_nova_n9',\n 'joanna_sans_nova_i1',\n 'joanna_sans_nova_i2',\n 'joanna_sans_nova_i3',\n 'joanna_sans_nova_i4',\n 'joanna_sans_nova_i5',\n 'joanna_sans_nova_i7',\n 'joanna_sans_nova_i8',\n 'joanna_sans_nova_i9',\n 'joanna_sans_nova_n1',\n 'joanna_sans_nova_n2',\n 'joanna_sans_nova_n3',\n 'joanna_sans_nova_n4',\n 'joanna_sans_nova_n5',\n 'joanna_sans_nova_n7',\n 'joanna_sans_nova_n8',\n 'joanna_sans_nova_n9',\n 'kairos_i1',\n 'kairos_i2',\n 'kairos_i3',\n 'kairos_i4',\n 'kairos_i5',\n 'kairos_i7',\n 'kairos_i8',\n 'kairos_i9',\n 'kairos_n1',\n 'kairos_n2',\n 'kairos_n3',\n 'kairos_n4',\n 'kairos_n5',\n 'kairos_n7',\n 'kairos_n8',\n 'kairos_n9',\n 'laurentian_i4',\n 'laurentian_i6',\n 'laurentian_n4',\n 'laurentian_n6',\n 'laurentian_n7',\n 'libelle_n4',\n 'linotype_didot_i4',\n 'linotype_didot_i7',\n 'linotype_didot_n4',\n 'linotype_didot_n7',\n 'linotype_gianotten_i3',\n 'linotype_gianotten_i4',\n 'linotype_gianotten_i5',\n 'linotype_gianotten_i7',\n 'linotype_gianotten_i8',\n 'linotype_gianotten_n3',\n 'linotype_gianotten_n4',\n 'linotype_gianotten_n5',\n 'linotype_gianotten_n7',\n 'linotype_gianotten_n8',\n 'linotype_gianotten_n9',\n 'linotype_really_i5',\n 'linotype_really_i6',\n 'linotype_really_n5',\n 'linotype_really_n6',\n 'linotype_syntax_serif_i3',\n 'linotype_syntax_serif_i4',\n 'linotype_syntax_serif_i5',\n 'linotype_syntax_serif_i7',\n 'linotype_syntax_serif_i8',\n 'linotype_syntax_serif_i9',\n 'linotype_syntax_serif_n3',\n 'linotype_syntax_serif_n4',\n 'linotype_syntax_serif_n5',\n 'linotype_syntax_serif_n7',\n 'linotype_syntax_serif_n8',\n 'linotype_syntax_serif_n9',\n 'lobster_n4',\n 'lucia_n4',\n 'luthersche_fraktur_n4',\n 'madera_i1',\n 'madera_i2',\n 'madera_i3',\n 'madera_i4',\n 'madera_i5',\n 'madera_i6',\n 'madera_i7',\n 'madera_i8',\n 'madera_n1',\n 'madera_n2',\n 'madera_n3',\n 'madera_n4',\n 'madera_n5',\n 'madera_n6',\n 'madera_n7',\n 'madera_n8',\n 'malabar_i4',\n 'malabar_i7',\n 'malabar_i9',\n 'malabar_n4',\n 'malabar_n7',\n 'malabar_n9',\n 'mariposa_sans_i4',\n 'mariposa_sans_n4',\n 'mariposa_sans_n5',\n 'mariposa_sans_n7',\n 'mariposa_sans_n9',\n 'megrim_n4',\n 'melior_i4',\n 'melior_i7',\n 'melior_n4',\n 'melior_n7',\n 'memphis_i3',\n 'memphis_i5',\n 'memphis_i7',\n 'memphis_n3',\n 'memphis_n5',\n 'memphis_n7',\n 'memphis_n8',\n 'memphis_soft_rounded_n5',\n 'memphis_soft_rounded_n7',\n 'memphis_soft_rounded_n8',\n 'mentor_sans_i3',\n 'mentor_sans_i4',\n 'mentor_sans_i7',\n 'mentor_sans_i9',\n 'mentor_sans_n3',\n 'mentor_sans_n4',\n 'mentor_sans_n7',\n 'mentor_sans_n9',\n 'metro_nova_i2',\n 'metro_nova_i3',\n 'metro_nova_i4',\n 'metro_nova_i5',\n 'metro_nova_i7',\n 'metro_nova_i8',\n 'metro_nova_i9',\n 'metro_nova_n2',\n 'metro_nova_n3',\n 'metro_nova_n4',\n 'metro_nova_n5',\n 'metro_nova_n7',\n 'metro_nova_n8',\n 'metro_nova_n9',\n 'modern_no_20_i4',\n 'modern_no_20_n4',\n 'monotype_baskerville_i4',\n 'monotype_baskerville_i6',\n 'monotype_baskerville_i7',\n 'monotype_baskerville_n4',\n 'monotype_baskerville_n6',\n 'monotype_baskerville_n7',\n 'monotype_bodoni_i4',\n 'monotype_bodoni_i5',\n 'monotype_bodoni_i7',\n 'monotype_bodoni_i8',\n 'monotype_bodoni_i9',\n 'monotype_bodoni_n4',\n 'monotype_bodoni_n5',\n 'monotype_bodoni_n7',\n 'monotype_bodoni_n8',\n 'monotype_bodoni_n9',\n 'monotype_century_old_style_i5',\n 'monotype_century_old_style_i7',\n 'monotype_century_old_style_n5',\n 'monotype_century_old_style_n7',\n 'monotype_goudy_i4',\n 'monotype_goudy_i7',\n 'monotype_goudy_modern_i4',\n 'monotype_goudy_modern_i7',\n 'monotype_goudy_modern_n4',\n 'monotype_goudy_modern_n7',\n 'monotype_goudy_n4',\n 'monotype_goudy_n7',\n 'monotype_goudy_n8',\n 'monotype_italian_old_style_i4',\n 'monotype_italian_old_style_i7',\n 'monotype_italian_old_style_n4',\n 'monotype_italian_old_style_n7',\n 'monotype_new_clarendon_n5',\n 'monotype_new_clarendon_n7',\n 'monotype_news_gothic_i4',\n 'monotype_news_gothic_i7',\n 'monotype_news_gothic_n4',\n 'monotype_news_gothic_n7',\n 'monotype_sabon_i4',\n 'monotype_sabon_i6',\n 'monotype_sabon_n4',\n 'monotype_sabon_n6',\n 'mouse_memoirs_n4',\n 'mundo_sans_i2',\n 'mundo_sans_i3',\n 'mundo_sans_i4',\n 'mundo_sans_i5',\n 'mundo_sans_i7',\n 'mundo_sans_i8',\n 'mundo_sans_i9',\n 'mundo_sans_n2',\n 'mundo_sans_n3',\n 'mundo_sans_n4',\n 'mundo_sans_n5',\n 'mundo_sans_n7',\n 'mundo_sans_n8',\n 'mundo_sans_n9',\n 'neo_sans_i3',\n 'neo_sans_i4',\n 'neo_sans_i5',\n 'neo_sans_i7',\n 'neo_sans_i8',\n 'neo_sans_i9',\n 'neo_sans_n3',\n 'neo_sans_n4',\n 'neo_sans_n5',\n 'neo_sans_n7',\n 'neo_sans_n8',\n 'neo_sans_n9',\n 'neue_aachen_i1',\n 'neue_aachen_i2',\n 'neue_aachen_i3',\n 'neue_aachen_i4',\n 'neue_aachen_i5',\n 'neue_aachen_i6',\n 'neue_aachen_i7',\n 'neue_aachen_i8',\n 'neue_aachen_i9',\n 'neue_aachen_n1',\n 'neue_aachen_n2',\n 'neue_aachen_n3',\n 'neue_aachen_n4',\n 'neue_aachen_n5',\n 'neue_aachen_n6',\n 'neue_aachen_n7',\n 'neue_aachen_n8',\n 'neue_aachen_n9',\n 'neue_frutiger_1450_i3',\n 'neue_frutiger_1450_i4',\n 'neue_frutiger_1450_i6',\n 'neue_frutiger_1450_i7',\n 'neue_frutiger_1450_n3',\n 'neue_frutiger_1450_n4',\n 'neue_frutiger_1450_n6',\n 'neue_frutiger_1450_n7',\n 'neue_haas_unica_i1',\n 'neue_haas_unica_i2',\n 'neue_haas_unica_i3',\n 'neue_haas_unica_i4',\n 'neue_haas_unica_i5',\n 'neue_haas_unica_i6',\n 'neue_haas_unica_i7',\n 'neue_haas_unica_i8',\n 'neue_haas_unica_i9',\n 'neue_haas_unica_n1',\n 'neue_haas_unica_n2',\n 'neue_haas_unica_n3',\n 'neue_haas_unica_n4',\n 'neue_haas_unica_n5',\n 'neue_haas_unica_n6',\n 'neue_haas_unica_n7',\n 'neue_haas_unica_n8',\n 'neue_haas_unica_n9',\n 'neue_plak_i2',\n 'neue_plak_i3',\n 'neue_plak_i4',\n 'neue_plak_i6',\n 'neue_plak_i7',\n 'neue_plak_i9',\n 'neue_plak_n2',\n 'neue_plak_n3',\n 'neue_plak_n4',\n 'neue_plak_n6',\n 'neue_plak_n7',\n 'neue_plak_n9',\n 'neue_swift_i3',\n 'neue_swift_i4',\n 'neue_swift_i5',\n 'neue_swift_i6',\n 'neue_swift_i7',\n 'neue_swift_n3',\n 'neue_swift_n4',\n 'neue_swift_n5',\n 'neue_swift_n6',\n 'neue_swift_n7',\n 'neuzeit_office_i4',\n 'neuzeit_office_i7',\n 'neuzeit_office_n4',\n 'neuzeit_office_n7',\n 'neuzeit_office_soft_rounded_n4',\n 'neuzeit_office_soft_rounded_n7',\n 'neuzeit_s_n4',\n 'neuzeit_s_n9',\n 'new_century_schoolbook_i4',\n 'new_century_schoolbook_i7',\n 'new_century_schoolbook_n4',\n 'new_century_schoolbook_n7',\n 'news_702_i4',\n 'news_702_i7',\n 'news_702_n4',\n 'news_702_n7',\n 'news_705_i4',\n 'news_705_i7',\n 'news_705_n4',\n 'news_705_n7',\n 'news_cycle_n4',\n 'news_cycle_n7',\n 'news_gothic_no_2_i2',\n 'news_gothic_no_2_i3',\n 'news_gothic_no_2_i4',\n 'news_gothic_no_2_i5',\n 'news_gothic_no_2_i7',\n 'news_gothic_no_2_i8',\n 'news_gothic_no_2_n2',\n 'news_gothic_no_2_n3',\n 'news_gothic_no_2_n4',\n 'news_gothic_no_2_n5',\n 'news_gothic_no_2_n7',\n 'news_gothic_no_2_n8',\n 'news_plantin_i4',\n 'news_plantin_i7',\n 'news_plantin_n4',\n 'news_plantin_n7',\n 'noticia_text_i4',\n 'noticia_text_i7',\n 'noticia_text_n4',\n 'noticia_text_n7',\n 'optima_nova_i3',\n 'optima_nova_i4',\n 'optima_nova_i5',\n 'optima_nova_i6',\n 'optima_nova_i7',\n 'optima_nova_i8',\n 'optima_nova_i9',\n 'optima_nova_n3',\n 'optima_nova_n4',\n 'optima_nova_n5',\n 'optima_nova_n6',\n 'optima_nova_n7',\n 'optima_nova_n8',\n 'optima_nova_n9',\n 'oxygen_n3',\n 'oxygen_n4',\n 'oxygen_n7',\n 'parma_i4',\n 'parma_n4',\n 'parma_n7',\n 'perpetua_i4',\n 'perpetua_i7',\n 'perpetua_n4',\n 'perpetua_n7',\n 'plantin_i3',\n 'plantin_i4',\n 'plantin_i6',\n 'plantin_i7',\n 'plantin_n3',\n 'plantin_n4',\n 'plantin_n6',\n 'plantin_n7',\n 'pmn_caecilia_i3',\n 'pmn_caecilia_i4',\n 'pmn_caecilia_i7',\n 'pmn_caecilia_i9',\n 'pmn_caecilia_n3',\n 'pmn_caecilia_n4',\n 'pmn_caecilia_n7',\n 'pmn_caecilia_n9',\n 'prata_n4',\n 'pt_mono_n4',\n 'pt_sans_narrow_n4',\n 'pt_sans_narrow_n7',\n 'quattrocento_n4',\n 'quattrocento_n7',\n 'quire_sans_i1',\n 'quire_sans_i2',\n 'quire_sans_i3',\n 'quire_sans_i4',\n 'quire_sans_i5',\n 'quire_sans_i6',\n 'quire_sans_i7',\n 'quire_sans_i8',\n 'quire_sans_i9',\n 'quire_sans_n1',\n 'quire_sans_n2',\n 'quire_sans_n3',\n 'quire_sans_n4',\n 'quire_sans_n5',\n 'quire_sans_n6',\n 'quire_sans_n7',\n 'quire_sans_n8',\n 'quire_sans_n9',\n 'really_no_2_i3',\n 'really_no_2_i4',\n 'really_no_2_i5',\n 'really_no_2_i6',\n 'really_no_2_i7',\n 'really_no_2_i8',\n 'really_no_2_i9',\n 'really_no_2_n3',\n 'really_no_2_n4',\n 'really_no_2_n5',\n 'really_no_2_n6',\n 'really_no_2_n7',\n 'really_no_2_n8',\n 'really_no_2_n9',\n 'righteous_n4',\n 'rockwell_i4',\n 'rockwell_i7',\n 'rockwell_n4',\n 'rockwell_n7',\n 'rockwell_n8',\n 'sabon_next_i4',\n 'sabon_next_i6',\n 'sabon_next_i7',\n 'sabon_next_i8',\n 'sabon_next_i9',\n 'sabon_next_n4',\n 'sabon_next_n6',\n 'sabon_next_n7',\n 'sabon_next_n8',\n 'sabon_next_n9',\n 'sackers_square_gothic_n4',\n 'sagrantino_n4',\n 'scene_i3',\n 'scene_i4',\n 'scene_i5',\n 'scene_i7',\n 'scene_i8',\n 'scene_i9',\n 'scene_n3',\n 'scene_n4',\n 'scene_n5',\n 'scene_n7',\n 'scene_n8',\n 'scene_n9',\n 'scherzo_i4',\n 'scherzo_i6',\n 'scherzo_i7',\n 'scherzo_n4',\n 'scherzo_n6',\n 'scherzo_n7',\n 'slabo_13px_n4',\n 'slate_i2',\n 'slate_i3',\n 'slate_i4',\n 'slate_i5',\n 'slate_i7',\n 'slate_i9',\n 'slate_n2',\n 'slate_n3',\n 'slate_n4',\n 'slate_n5',\n 'slate_n7',\n 'slate_n9',\n 'soho_gothic_i2',\n 'soho_gothic_i3',\n 'soho_gothic_i4',\n 'soho_gothic_i5',\n 'soho_gothic_i7',\n 'soho_gothic_i8',\n 'soho_gothic_i9',\n 'soho_gothic_n2',\n 'soho_gothic_n3',\n 'soho_gothic_n4',\n 'soho_gothic_n5',\n 'soho_gothic_n7',\n 'soho_gothic_n8',\n 'soho_gothic_n9',\n 'soho_i1',\n 'soho_i2',\n 'soho_i3',\n 'soho_i4',\n 'soho_i5',\n 'soho_i6',\n 'soho_i7',\n 'soho_i8',\n 'soho_i9',\n 'soho_n1',\n 'soho_n2',\n 'soho_n3',\n 'soho_n4',\n 'soho_n5',\n 'soho_n6',\n 'soho_n7',\n 'soho_n8',\n 'soho_n9',\n 'stempel_schneidler_i3',\n 'stempel_schneidler_i4',\n 'stempel_schneidler_i5',\n 'stempel_schneidler_i7',\n 'stempel_schneidler_i8',\n 'stempel_schneidler_n3',\n 'stempel_schneidler_n4',\n 'stempel_schneidler_n5',\n 'stempel_schneidler_n7',\n 'stempel_schneidler_n8',\n 'swiss_721_i1',\n 'swiss_721_i2',\n 'swiss_721_i4',\n 'swiss_721_i5',\n 'swiss_721_i7',\n 'swiss_721_i8',\n 'swiss_721_i9',\n 'swiss_721_n1',\n 'swiss_721_n2',\n 'swiss_721_n4',\n 'swiss_721_n5',\n 'swiss_721_n7',\n 'swiss_721_n8',\n 'swiss_721_n9',\n 'swiss_721_rounded_n7',\n 'swiss_721_rounded_n9',\n 'tiemann_n3',\n 'tiemann_n4',\n 'tinos_i4',\n 'tinos_i7',\n 'tinos_n4',\n 'tinos_n7',\n 'trade_gothic_n3',\n 'trade_gothic_n4',\n 'trade_gothic_n7',\n 'trade_gothic_next_i3',\n 'trade_gothic_next_i4',\n 'trade_gothic_next_i7',\n 'trade_gothic_next_i8',\n 'trade_gothic_next_n3',\n 'trade_gothic_next_n4',\n 'trade_gothic_next_n7',\n 'trade_gothic_next_n8',\n 'trade_gothic_o3',\n 'trade_gothic_o4',\n 'trade_gothic_o7',\n 'twentieth_century_i3',\n 'twentieth_century_i5',\n 'twentieth_century_i7',\n 'twentieth_century_i8',\n 'twentieth_century_i9',\n 'twentieth_century_n3',\n 'twentieth_century_n4',\n 'twentieth_century_n5',\n 'twentieth_century_n6',\n 'twentieth_century_n7',\n 'twentieth_century_n8',\n 'twentieth_century_n9',\n 'univers_next_i1',\n 'univers_next_i2',\n 'univers_next_i3',\n 'univers_next_i4',\n 'univers_next_i5',\n 'univers_next_i6',\n 'univers_next_i7',\n 'univers_next_i8',\n 'univers_next_i9',\n 'univers_next_n1',\n 'univers_next_n2',\n 'univers_next_n3',\n 'univers_next_n4',\n 'univers_next_n5',\n 'univers_next_n6',\n 'univers_next_n7',\n 'univers_next_n8',\n 'univers_next_n9',\n 'univers_next_typewriter_i4',\n 'univers_next_typewriter_i7',\n 'univers_next_typewriter_n4',\n 'univers_next_typewriter_n7',\n 'unna_i4',\n 'unna_i7',\n 'unna_n4',\n 'unna_n7',\n 'vala_n4',\n 'varela_n4',\n 'varela_round_n4',\n 'verdana_pro_i3',\n 'verdana_pro_i4',\n 'verdana_pro_i6',\n 'verdana_pro_i7',\n 'verdana_pro_i9',\n 'verdana_pro_n3',\n 'verdana_pro_n4',\n 'verdana_pro_n6',\n 'verdana_pro_n7',\n 'verdana_pro_n9',\n 'vidaloka_n4',\n 'volkhov_i4',\n 'vollkorn_i5',\n 'volkhov_i7',\n 'vollkorn_i8',\n 'volkhov_n4',\n 'volkhov_n7',\n 'vollkorn_i4',\n 'vollkorn_i6',\n 'vollkorn_i7',\n 'vollkorn_i9',\n 'vollkorn_n4',\n 'vollkorn_n5',\n 'vollkorn_n6',\n 'vollkorn_n7',\n 'vollkorn_n8',\n 'vollkorn_n9',\n 'waza_n4',\n 'wola_n4',\n 'ysobel_i3',\n 'ysobel_i4',\n 'ysobel_i6',\n 'ysobel_i7',\n 'ysobel_n3',\n 'ysobel_n4',\n 'ysobel_n6',\n 'ysobel_n7',\n 'zurich_extended_n4',\n 'zurich_extended_n7',\n 'zurich_extended_n8',\n 'zurich_extended_n9',\n 'zurich_i3',\n 'zurich_i4',\n 'zurich_i7',\n 'zurich_i8',\n 'zurich_n3',\n 'zurich_n4',\n 'zurich_n7',\n 'zurich_n8',\n 'zurich_n9',\n]);\n//# sourceMappingURL=deprecated-fonts-data.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeprecatedFontsOnSectionsAndBlocks = void 0;\nconst to_schema_1 = require(\"../../to-schema\");\nconst types_1 = require(\"../../types\");\nconst json_1 = require(\"../../json\");\nconst deprecated_fonts_data_1 = require(\"./deprecated-fonts-data\");\nexports.DeprecatedFontsOnSectionsAndBlocks = {\n meta: {\n code: 'DeprecatedFontsOnSectionsAndBlocks',\n name: 'Check for deprecated fonts in section and block schema settings values',\n docs: {\n description: 'Warns on deprecated fonts in section and block schema settings values.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-fonts-on-sections-and-blocks',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async LiquidRawTag(node) {\n if (node.name !== 'schema' || node.body.kind !== 'json') {\n return;\n }\n const schema = await (0, to_schema_1.getSchema)(context);\n const { validSchema, ast } = schema !== null && schema !== void 0 ? schema : {};\n if (!validSchema || validSchema instanceof Error)\n return;\n if (!ast || ast instanceof Error)\n return;\n const offset = node.blockStartPosition.end;\n // 1st: check schema settings for deprecated fonts\n checkSchemaSettingsForDeprecatedFonts(validSchema, offset, ast, context);\n // 2nd: check local blocks settings for deprecated fonts\n checkLocalBlocksSettingsForDeprecatedFonts(validSchema, offset, ast, context);\n // 3rd: check preset settings for deprecated fonts\n await checkPresetsForDeprecatedFonts(validSchema, offset, ast, context);\n // 4th: check schema default (sections only) for deprecated fonts\n if ('default' in validSchema) {\n await checkSchemaDefaultForDeprecatedFonts(validSchema, offset, ast, context);\n }\n },\n };\n },\n};\nfunction checkSchemaSettingsForDeprecatedFonts(schema, offset, ast, context) {\n const settings = schema.settings;\n if (!settings)\n return;\n checkSettingsForDeprecatedFonts(settings, offset, ast, ['settings'], context);\n}\nfunction checkSettingsForDeprecatedFonts(settings, offset, ast, warningAstPath, context) {\n settings.forEach((setting, index) => {\n if (setting.type === 'font_picker' &&\n setting.default &&\n deprecated_fonts_data_1.DEPRECATED_FONT_HANDLES.has(setting.default)) {\n const currentPath = warningAstPath.concat([String(index), 'default']);\n reportWarning(context, offset, ast, currentPath, `setting '${setting.id}' is using deprecated font '${setting.default}'`);\n }\n });\n}\nfunction checkLocalBlocksSettingsForDeprecatedFonts(schema, offset, ast, context) {\n const blocks = schema.blocks;\n if (!blocks)\n return;\n blocks.forEach((block, index) => {\n if ('settings' in block && block.settings) {\n checkSettingsForDeprecatedFonts(block.settings, offset, ast, ['blocks', String(index), 'settings'], context);\n }\n });\n}\nasync function checkPresetsForDeprecatedFonts(schema, offset, ast, context) {\n var _a;\n const presets = schema.presets;\n if (!presets)\n return;\n for (const [preset_index, preset] of presets.entries()) {\n const warningAstPath = ['presets', String(preset_index)];\n await checkSettingsAndBlocksForDeprecatedFonts((_a = preset.settings) !== null && _a !== void 0 ? _a : {}, 'blocks' in preset ? preset.blocks : undefined, schema, offset, ast, warningAstPath, context);\n }\n}\nasync function checkSettingsAndBlocksForDeprecatedFonts(settings, blocks, schema, offset, ast, warningAstPath, context) {\n // check settings for deprecated fonts\n if (settings && typeof settings === 'object') {\n Object.entries(settings).forEach(([settingKey, settingValue]) => {\n var _a;\n if (isFontPickerType((_a = schema.settings) !== null && _a !== void 0 ? _a : [], settingKey) &&\n deprecated_fonts_data_1.DEPRECATED_FONT_HANDLES.has(settingValue)) {\n const currentPath = warningAstPath.concat(['settings', settingKey]);\n reportWarning(context, offset, ast, currentPath, `setting '${settingKey}' is using deprecated font '${settingValue}'`);\n }\n });\n }\n // check blocks for deprecated fonts\n if (blocks) {\n await checkBlocksForDeprecatedFonts(blocks, schema, offset, ast, context, warningAstPath);\n }\n}\nasync function checkBlocksForDeprecatedFonts(blocks, schema, offset, ast, context, nodePath) {\n var _a, _b, _c, _d;\n const iterator = Array.isArray(blocks) ? blocks.entries() : Object.entries(blocks);\n for (const [keyOrIndex, block] of iterator) {\n const currentPath = nodePath.concat(['blocks', String(keyOrIndex)]);\n // we'll need the schema to verify that the setting is a font_picker type\n // local blocks don't have a schema coming from the another theme file, we need to get it from the schema of the section\n // look in the schema blocks for the block type, if this block has a name, it's a local block, otherwise, it's a theme block\n let validSchema = null;\n (_a = schema.blocks) === null || _a === void 0 ? void 0 : _a.forEach((schemaBlock) => {\n if (schemaBlock.type === block.type && 'name' in schemaBlock) {\n validSchema = schemaBlock;\n }\n });\n if (!validSchema) {\n const blockSchema = await ((_b = context.getBlockSchema) === null || _b === void 0 ? void 0 : _b.call(context, block.type));\n if (!blockSchema || blockSchema instanceof Error)\n continue;\n validSchema = blockSchema.validSchema;\n if (!validSchema || validSchema instanceof Error)\n continue;\n }\n // block_value is the hash which can have settings, blocks, etc.\n for (const [settingKey, settingValue] of Object.entries((_c = block.settings) !== null && _c !== void 0 ? _c : {})) {\n if (settingValue && deprecated_fonts_data_1.DEPRECATED_FONT_HANDLES.has(settingValue)) {\n // Check if the setting is a font_picker\n const isFontPickerSetting = isFontPickerType((_d = validSchema.settings) !== null && _d !== void 0 ? _d : [], settingKey);\n if (isFontPickerSetting) {\n reportWarning(context, offset, ast, currentPath.concat(['settings', settingKey]), `setting '${settingKey}' is using deprecated font '${settingValue}'`);\n }\n }\n }\n if ('blocks' in block && block.blocks) {\n await checkBlocksForDeprecatedFonts(block.blocks, schema, offset, ast, context, currentPath);\n }\n }\n}\nasync function checkSchemaDefaultForDeprecatedFonts(schema, offset, ast, context) {\n var _a;\n const defaultValues = schema.default;\n if (!defaultValues || typeof defaultValues !== 'object')\n return;\n const warningAstPath = ['default'];\n await checkSettingsAndBlocksForDeprecatedFonts((_a = defaultValues.settings) !== null && _a !== void 0 ? _a : {}, 'blocks' in defaultValues ? defaultValues.blocks : undefined, schema, offset, ast, warningAstPath, context);\n}\nfunction isFontPickerType(settings, settingKey) {\n return settings.some((setting) => setting.id === settingKey && setting.type === 'font_picker');\n}\nfunction reportWarning(context, offset, ast, ast_path, message, fullHighlight = true) {\n const node = (0, json_1.nodeAtPath)(ast, ast_path);\n const startIndex = fullHighlight ? offset + (0, json_1.getLocStart)(node) : offset + (0, json_1.getLocEnd)(node) - 1; // start to finish of the node or last char of the node\n const endIndex = offset + (0, json_1.getLocEnd)(node);\n context.report({\n message: message,\n startIndex,\n endIndex,\n });\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeprecatedFontsOnSettingsSchema = void 0;\nconst types_1 = require(\"../../types\");\nconst json_1 = require(\"../../json\");\nconst deprecated_fonts_data_1 = require(\"../deprecated-fonts-on-sections-and-blocks/deprecated-fonts-data\");\nexports.DeprecatedFontsOnSettingsSchema = {\n meta: {\n code: 'DeprecatedFontsOnSettingsSchema',\n name: 'Check for deprecated fonts in settings_schema settings values',\n docs: {\n description: 'Warns on deprecated fonts in settings_schema settings values.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-fonts-on-settings-schema',\n },\n type: types_1.SourceCodeType.JSON,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n const relativePath = context.toRelativePath(context.file.uri);\n if (relativePath !== 'config/settings_schema.json')\n return {};\n return {\n async Property(node) {\n if (node.key.value === 'settings' && (0, types_1.isArrayNode)(node.value)) {\n for (const setting of node.value.children) {\n if ((0, types_1.isObjectNode)(setting)) {\n const typeProperty = setting.children.find((prop) => prop.key.value === 'type');\n if (typeProperty &&\n typeProperty.value.type === 'Literal' &&\n typeProperty.value.value === 'font_picker') {\n // Check if this font_picker has a default value that's deprecated\n const defaultProperty = setting.children.find((prop) => prop.key.value === 'default');\n if (defaultProperty &&\n defaultProperty.value.type === 'Literal' &&\n typeof defaultProperty.value.value === 'string') {\n const defaultFont = defaultProperty.value.value;\n if (deprecated_fonts_data_1.DEPRECATED_FONT_HANDLES.has(defaultFont)) {\n context.report({\n message: `The font \"${defaultFont}\" is deprecated`,\n startIndex: (0, json_1.getLocStart)(defaultProperty.value),\n endIndex: (0, json_1.getLocEnd)(defaultProperty.value),\n });\n }\n }\n }\n }\n }\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeprecatedTag = void 0;\nconst types_1 = require(\"../../types\");\nexports.DeprecatedTag = {\n meta: {\n code: 'DeprecatedTag',\n aliases: ['DeprecatedTags'],\n name: 'Deprecated Tag',\n docs: {\n description: 'This check is aimed at eliminating the use of deprecated tags.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-tag',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async LiquidTag(node) {\n if (node.name === 'include') {\n const start = node.source.substring(node.position.start);\n const includeStartIndex = start.indexOf('include');\n const includeEndIndex = includeStartIndex + 'include'.length;\n const includeStart = node.position.start + includeStartIndex;\n const includeEnd = node.position.start + includeEndIndex;\n context.report({\n message: `Use the 'render' tag instead of 'include'`,\n startIndex: includeStart,\n endIndex: includeEnd,\n suggest: [\n {\n message: `Replace 'include' with 'render'`,\n fix: (corrector) => {\n corrector.replace(includeStart, includeEnd, 'render');\n },\n },\n ],\n });\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DuplicateContentForArguments = void 0;\nconst types_1 = require(\"../../types\");\nconst arguments_1 = require(\"../../liquid-doc/arguments\");\nexports.DuplicateContentForArguments = {\n meta: {\n code: 'DuplicateContentForArguments',\n name: 'Duplicate ContentFor Arguments',\n docs: {\n description: 'This check ensures that no duplicate argument names are provided when rendering a static block.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-content-for-arguments',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async ContentForMarkup(node) {\n const blockName = (0, arguments_1.getBlockName)(node);\n if (!blockName)\n return;\n const encounteredArgNames = new Set();\n const duplicateArgs = [];\n for (const param of node.args) {\n if (encounteredArgNames.has(param.name)) {\n duplicateArgs.push(param);\n }\n encounteredArgNames.add(param.name);\n }\n (0, arguments_1.reportDuplicateArguments)(context, node, duplicateArgs, blockName);\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DuplicateRenderSnippetArguments = void 0;\nconst types_1 = require(\"../../types\");\nconst arguments_1 = require(\"../../liquid-doc/arguments\");\nexports.DuplicateRenderSnippetArguments = {\n meta: {\n code: 'DuplicateRenderSnippetArguments',\n name: 'Duplicate Render Snippet Arguments',\n aliases: ['DuplicateRenderSnippetParams'],\n docs: {\n description: 'This check ensures that no duplicate argument names are provided when rendering a snippet.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-render-snippet-arguments',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async RenderMarkup(node) {\n var _a;\n const snippetName = (0, arguments_1.getSnippetName)(node);\n if (!snippetName)\n return;\n const encounteredArgNames = new Set();\n const duplicateArgs = [];\n if ((_a = node.alias) === null || _a === void 0 ? void 0 : _a.value) {\n encounteredArgNames.add(node.alias.value);\n }\n for (const param of node.args) {\n if (encounteredArgNames.has(param.name)) {\n duplicateArgs.push(param);\n }\n encounteredArgNames.add(param.name);\n }\n (0, arguments_1.reportDuplicateArguments)(context, node, duplicateArgs, snippetName);\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EmptyBlockContent = void 0;\nconst types_1 = require(\"../../types\");\nconst to_schema_1 = require(\"../../to-schema\");\nexports.EmptyBlockContent = {\n meta: {\n code: 'EmptyBlockContent',\n name: 'Prevent empty block content',\n docs: {\n description: 'This check exists to warn you when the blocks array at the root level of the schema is empty.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/empty-block-content',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n let isContentForBlocksLocationSet = false;\n let contentForBlocksLocation = { start: 0, end: 0 };\n return {\n async LiquidTag(node) {\n if (node.name !== 'content_for')\n return;\n const nodeMarkup = node.markup;\n if (typeof nodeMarkup === 'object' && nodeMarkup.contentForType.value === 'blocks') {\n contentForBlocksLocation.start = node.blockStartPosition.start;\n contentForBlocksLocation.end = node.blockStartPosition.end;\n isContentForBlocksLocationSet = true;\n }\n },\n async onCodePathEnd() {\n const schema = await (0, to_schema_1.getSchema)(context);\n const { validSchema, ast } = schema !== null && schema !== void 0 ? schema : {};\n if (!validSchema || validSchema instanceof Error)\n return;\n if (!ast || ast instanceof Error)\n return;\n const blocks = validSchema.blocks;\n if (isContentForBlocksLocationSet && !blocks) {\n context.report({\n message: `The 'content_for \"blocks\"' tag is present, but the blocks array is not defined.`,\n startIndex: contentForBlocksLocation.start,\n endIndex: contentForBlocksLocation.end,\n });\n }\n else if (isContentForBlocksLocationSet && blocks && blocks.length === 0) {\n context.report({\n message: `The 'content_for \"blocks\"' tag is present, but the blocks array is empty.`,\n startIndex: contentForBlocksLocation.start,\n endIndex: contentForBlocksLocation.end,\n });\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HardcodedRoutes = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../utils\");\nconst ROUTES = {\n '/': 'root_url',\n '/account': 'account_url',\n '/account/addresses': 'account_addresses_url',\n '/account/login': 'account_login_url',\n '/account/logout': 'account_logout_url',\n '/account/recover': 'account_recover_url',\n '/account/register': 'account_register_url',\n '/cart': 'cart_url',\n '/cart/add': 'cart_add_url',\n '/cart/change': 'cart_change_url',\n '/cart/clear': 'cart_clear_url',\n '/cart/update': 'cart_update_url',\n '/collections': 'collections_url',\n '/collections/all': 'all_products_collection_url',\n '/customer_authentication/login': 'storefront_login_url',\n '/recommendations/products': 'product_recommendations_url',\n '/search': 'search_url',\n '/search/suggest': 'predictive_search_url',\n};\nconst HARDCODED_ROUTES = Object.keys(ROUTES).reverse();\nexports.HardcodedRoutes = {\n meta: {\n code: 'HardcodedRoutes',\n name: 'Hardcoded Routes',\n docs: {\n description: 'This check encourages using the routes object instead of hardcoding URLs.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/hardcoded-routes',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async HtmlElement(node) {\n // checks for hardcoded routes in href and action attributes\n const attrWithHardcodedRoute = node.attributes\n .filter(utils_1.isValuedHtmlAttribute)\n .find((attr) => ((0, utils_1.isAttr)(attr, 'action') || (0, utils_1.isAttr)(attr, 'href')) && hardcodedRoute(attr));\n if (attrWithHardcodedRoute) {\n const attr = attrWithHardcodedRoute;\n const route = hardcodedRoute(attr);\n const routeURL = ROUTES[route];\n const startIndex = attr.attributePosition.start;\n const endIndex = startIndex + route.length;\n context.report({\n message: `Use routes object {{ routes.${routeURL} }} instead of hardcoding ${route}`,\n startIndex,\n endIndex,\n });\n }\n },\n async LiquidFilter(node) {\n // checks for hardcoded routes in link_to values {{ 'Cart' | link_to: '/cart' }}\n if (node.name !== 'link_to')\n return;\n const linkToArg = node.args[0];\n const linkToValue = linkToArg.type === 'String' ? linkToArg.value : '';\n const route = HARDCODED_ROUTES.find((route) => route === '/' ? route === linkToValue : linkToValue.startsWith(route));\n if (route) {\n const routeURL = ROUTES[route];\n // we add 1 to the start index to exclude the quotes\n const startIndex = linkToArg.position.start + 1;\n context.report({\n message: `Use routes object {{ routes.${routeURL} }} instead of hardcoding ${route}`,\n startIndex,\n endIndex: startIndex + route.length,\n });\n }\n },\n };\n },\n};\nfunction hardcodedRoute(attr) {\n if (!(0, utils_1.isNodeOfType)(liquid_html_parser_1.NodeTypes.TextNode, attr.value[0]))\n return;\n const value = attr.value[0].value;\n return HARDCODED_ROUTES.find((route) => route === '/' ? route === value && attr.value.length === 1 : value.startsWith(route));\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImgWidthAndHeight = void 0;\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../utils\");\nexports.ImgWidthAndHeight = {\n meta: {\n code: 'ImgWidthAndHeight',\n name: 'Width and height attributes on image tags',\n docs: {\n description: 'This check is aimed at eliminating content layout shift in themes by enforcing the use of the width and height attributes on img tags.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/img-width-and-height',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async HtmlVoidElement(node) {\n if (node.name === 'img') {\n const widthAttr = node.attributes.find((attr) => (0, utils_1.isValuedHtmlAttribute)(attr) && (0, utils_1.isAttr)(attr, 'width'));\n const heightAttr = node.attributes.find((attr) => (0, utils_1.isValuedHtmlAttribute)(attr) && (0, utils_1.isAttr)(attr, 'height'));\n let missingAttributes = [];\n if (!widthAttr) {\n missingAttributes.push('width');\n }\n if (!heightAttr) {\n missingAttributes.push('height');\n }\n if (missingAttributes.length > 0) {\n const attributeWord = missingAttributes.length === 1 ? 'attribute' : 'attributes';\n context.report({\n message: `Missing ${missingAttributes.join(' and ')} ${attributeWord} on img tag`,\n startIndex: node.position.start,\n endIndex: node.position.end,\n });\n }\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.recommended = exports.allChecks = void 0;\nconst types_1 = require(\"../types\");\nconst app_block_valid_tags_1 = require(\"./app-block-valid-tags\");\nconst asset_preload_1 = require(\"./asset-preload\");\nconst asset_size_app_block_css_1 = require(\"./asset-size-app-block-css\");\nconst asset_size_app_block_javascript_1 = require(\"./asset-size-app-block-javascript\");\nconst asset_size_css_1 = require(\"./asset-size-css\");\nconst asset_size_javascript_1 = require(\"./asset-size-javascript\");\nconst block_id_usage_1 = require(\"./block-id-usage\");\nconst cdn_preconnect_1 = require(\"./cdn-preconnect\");\nconst content_for_header_modification_1 = require(\"./content-for-header-modification\");\nconst deprecate_bgsizes_1 = require(\"./deprecate-bgsizes\");\nconst deprecate_lazysizes_1 = require(\"./deprecate-lazysizes\");\nconst deprecated_filter_1 = require(\"./deprecated-filter\");\nconst deprecated_fonts_on_sections_and_blocks_1 = require(\"./deprecated-fonts-on-sections-and-blocks\");\nconst deprecated_fonts_on_settings_schema_1 = require(\"./deprecated-fonts-on-settings-schema\");\nconst deprecated_tag_1 = require(\"./deprecated-tag\");\nconst duplicate_render_snippet_arguments_1 = require(\"./duplicate-render-snippet-arguments\");\nconst duplicate_content_for_arguments_1 = require(\"./duplicate-content-for-arguments\");\nconst empty_block_content_1 = require(\"./empty-block-content\");\nconst hardcoded_routes_1 = require(\"./hardcoded-routes\");\nconst img_width_and_height_1 = require(\"./img-width-and-height\");\nconst json_missing_block_1 = require(\"./json-missing-block\");\nconst json_syntax_error_1 = require(\"./json-syntax-error\");\nconst liquid_free_settings_1 = require(\"./liquid-free-settings\");\nconst liquid_html_syntax_error_1 = require(\"./liquid-html-syntax-error\");\nconst matching_translations_1 = require(\"./matching-translations\");\nconst missing_asset_1 = require(\"./missing-asset\");\nconst missing_content_for_arguments_1 = require(\"./missing-content-for-arguments\");\nconst missing_render_snippet_arguments_1 = require(\"./missing-render-snippet-arguments\");\nconst missing_template_1 = require(\"./missing-template\");\nconst orphaned_snippet_1 = require(\"./orphaned-snippet\");\nconst pagination_size_1 = require(\"./pagination-size\");\nconst parser_blocking_script_1 = require(\"./parser-blocking-script\");\nconst schema_presets_block_order_1 = require(\"./schema-presets-block-order\");\nconst schema_presets_static_blocks_1 = require(\"./schema-presets-static-blocks\");\nconst remote_asset_1 = require(\"./remote-asset\");\nconst required_layout_theme_object_1 = require(\"./required-layout-theme-object\");\nconst reserved_doc_param_names_1 = require(\"./reserved-doc-param-names\");\nconst static_stylesheet_and_javascript_tags_1 = require(\"./static-stylesheet-and-javascript-tags\");\nconst translation_key_exists_1 = require(\"./translation-key-exists\");\nconst unclosed_html_element_1 = require(\"./unclosed-html-element\");\nconst undefined_object_1 = require(\"./undefined-object\");\nconst unique_doc_param_names_1 = require(\"./unique-doc-param-names\");\nconst unique_static_block_id_1 = require(\"./unique-static-block-id\");\nconst unknown_filter_1 = require(\"./unknown-filter\");\nconst unrecognized_content_for_arguments_1 = require(\"./unrecognized-content-for-arguments\");\nconst unrecognized_render_snippet_arguments_1 = require(\"./unrecognized-render-snippet-arguments\");\nconst unused_assign_1 = require(\"./unused-assign\");\nconst unsupported_doc_tag_1 = require(\"./unsupported-doc-tag\");\nconst unused_doc_param_1 = require(\"./unused-doc-param\");\nconst valid_content_for_arguments_1 = require(\"./valid-content-for-arguments\");\nconst valid_content_for_argument_types_1 = require(\"./valid-content-for-argument-types\");\nconst valid_block_target_1 = require(\"./valid-block-target\");\nconst valid_html_translation_1 = require(\"./valid-html-translation\");\nconst valid_json_1 = require(\"./valid-json\");\nconst valid_doc_param_types_1 = require(\"./valid-doc-param-types\");\nconst valid_local_blocks_1 = require(\"./valid-local-blocks\");\nconst valid_render_snippet_argument_types_1 = require(\"./valid-render-snippet-argument-types\");\nconst valid_schema_1 = require(\"./valid-schema\");\nconst valid_schema_name_1 = require(\"./valid-schema-name\");\nconst valid_settings_key_1 = require(\"./valid-settings-key\");\nconst valid_static_block_type_1 = require(\"./valid-static-block-type\");\nconst valid_visible_if_1 = require(\"./valid-visible-if\");\nconst variable_name_1 = require(\"./variable-name\");\nconst app_block_missing_schema_1 = require(\"./app-block-missing-schema\");\nconst unique_settings_id_1 = require(\"./unique-settings-id\");\nexports.allChecks = [\n app_block_valid_tags_1.AppBlockValidTags,\n asset_preload_1.AssetPreload,\n asset_size_app_block_css_1.AssetSizeAppBlockCSS,\n asset_size_app_block_javascript_1.AssetSizeAppBlockJavaScript,\n asset_size_css_1.AssetSizeCSS,\n asset_size_javascript_1.AssetSizeJavaScript,\n block_id_usage_1.BlockIdUsage,\n cdn_preconnect_1.CdnPreconnect,\n content_for_header_modification_1.ContentForHeaderModification,\n deprecate_bgsizes_1.DeprecateBgsizes,\n deprecate_lazysizes_1.DeprecateLazysizes,\n deprecated_filter_1.DeprecatedFilter,\n deprecated_fonts_on_sections_and_blocks_1.DeprecatedFontsOnSectionsAndBlocks,\n deprecated_fonts_on_settings_schema_1.DeprecatedFontsOnSettingsSchema,\n deprecated_tag_1.DeprecatedTag,\n duplicate_content_for_arguments_1.DuplicateContentForArguments,\n duplicate_render_snippet_arguments_1.DuplicateRenderSnippetArguments,\n empty_block_content_1.EmptyBlockContent,\n hardcoded_routes_1.HardcodedRoutes,\n img_width_and_height_1.ImgWidthAndHeight,\n json_missing_block_1.JSONMissingBlock,\n json_syntax_error_1.JSONSyntaxError,\n liquid_free_settings_1.LiquidFreeSettings,\n liquid_html_syntax_error_1.LiquidHTMLSyntaxError,\n matching_translations_1.MatchingTranslations,\n missing_asset_1.MissingAsset,\n missing_content_for_arguments_1.MissingContentForArguments,\n missing_render_snippet_arguments_1.MissingRenderSnippetArguments,\n missing_template_1.MissingTemplate,\n app_block_missing_schema_1.AppBlockMissingSchema,\n orphaned_snippet_1.OrphanedSnippet,\n pagination_size_1.PaginationSize,\n parser_blocking_script_1.ParserBlockingScript,\n schema_presets_block_order_1.SchemaPresetsBlockOrder,\n schema_presets_static_blocks_1.SchemaPresetsStaticBlocks,\n remote_asset_1.RemoteAsset,\n required_layout_theme_object_1.RequiredLayoutThemeObject,\n reserved_doc_param_names_1.ReservedDocParamNames,\n static_stylesheet_and_javascript_tags_1.StaticStylesheetAndJavascriptTags,\n translation_key_exists_1.TranslationKeyExists,\n unclosed_html_element_1.UnclosedHTMLElement,\n undefined_object_1.UndefinedObject,\n unique_doc_param_names_1.UniqueDocParamNames,\n unique_settings_id_1.UniqueSettingIds,\n unique_static_block_id_1.UniqueStaticBlockId,\n unknown_filter_1.UnknownFilter,\n unrecognized_content_for_arguments_1.UnrecognizedContentForArguments,\n unrecognized_render_snippet_arguments_1.UnrecognizedRenderSnippetArguments,\n unsupported_doc_tag_1.UnsupportedDocTag,\n unused_assign_1.UnusedAssign,\n unused_doc_param_1.UnusedDocParam,\n valid_block_target_1.ValidBlockTarget,\n valid_html_translation_1.ValidHTMLTranslation,\n valid_content_for_arguments_1.ValidContentForArguments,\n valid_content_for_argument_types_1.ValidContentForArgumentTypes,\n valid_json_1.ValidJSON,\n valid_doc_param_types_1.ValidDocParamTypes,\n valid_local_blocks_1.ValidLocalBlocks,\n valid_render_snippet_argument_types_1.ValidRenderSnippetArgumentTypes,\n valid_schema_1.ValidSchema,\n valid_settings_key_1.ValidSettingsKey,\n valid_static_block_type_1.ValidStaticBlockType,\n valid_visible_if_1.ValidVisibleIf,\n valid_visible_if_1.ValidVisibleIfSettingsSchema,\n variable_name_1.VariableName,\n valid_schema_name_1.ValidSchemaName,\n];\n/**\n * The recommended checks is populated by all checks with the following conditions:\n * - meta.docs.recommended: true\n * - Either no meta.targets list exist or if it does exist then Recommended is a target\n */\nexports.recommended = exports.allChecks.filter((check) => {\n const isRecommended = check.meta.docs.recommended;\n const isValidTarget = !check.meta.targets ||\n !check.meta.targets.length ||\n check.meta.targets.includes(types_1.ConfigTarget.Recommended);\n return isRecommended && isValidTarget;\n});\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JSONMissingBlock = void 0;\nconst to_schema_1 = require(\"../../to-schema\");\nconst types_1 = require(\"../../types\");\nconst missing_block_utils_1 = require(\"./missing-block-utils\");\nexports.JSONMissingBlock = {\n meta: {\n code: 'JSONMissingBlock',\n name: 'Check for missing blocks types in JSON templates',\n docs: {\n description: 'This check ensures that JSON templates contain valid block types.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-missing-block',\n },\n type: types_1.SourceCodeType.JSON,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n const relativePath = context.toRelativePath(context.file.uri);\n if (!relativePath.startsWith('templates/'))\n return {};\n return {\n async onCodePathEnd() {\n const schema = await (0, to_schema_1.getSchemaFromJSON)(context);\n const { ast } = schema !== null && schema !== void 0 ? schema : {};\n if (!ast || ast instanceof Error)\n return;\n if (!schema)\n return;\n const sections = schema.parsed.sections;\n if (!sections)\n return;\n await Promise.all(Object.entries(sections).map(async ([sectionKey, section]) => {\n if ((0, missing_block_utils_1.isPropertyNode)(section) &&\n 'blocks' in section &&\n (0, missing_block_utils_1.isPropertyNode)(section.blocks) &&\n 'type' in section) {\n await (0, missing_block_utils_1.getAllBlocks)(ast, 0, section.type, section.blocks, ['sections', sectionKey, 'blocks'], context);\n }\n }));\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPropertyNode = isPropertyNode;\nexports.getAllBlocks = getAllBlocks;\nconst json_1 = require(\"../../json\");\nconst file_utils_1 = require(\"../../utils/file-utils\");\nfunction isPropertyNode(node) {\n return typeof node === 'object' && node !== null;\n}\nfunction isNestedBlock(currentPath) {\n return currentPath.filter((segment) => segment === 'blocks').length > 1;\n}\nfunction reportWarning(message, offset, astNode, context) {\n context.report({\n message,\n startIndex: offset + (0, json_1.getLocStart)(astNode),\n endIndex: offset + (0, json_1.getLocEnd)(astNode),\n });\n}\nasync function validateBlockFileExistence(blockType, context) {\n if (blockType === '@theme' || blockType === '@app') {\n return true;\n }\n const blockPath = `blocks/${blockType}.liquid`;\n return await (0, file_utils_1.doesFileExist)(context, blockPath);\n}\nasync function getThemeBlocks(sectionType, currentPath, context) {\n var _a, _b;\n const themeBlocks = [];\n if (!sectionType)\n return themeBlocks;\n const schema = isNestedBlock(currentPath)\n ? await ((_a = context.getBlockSchema) === null || _a === void 0 ? void 0 : _a.call(context, sectionType))\n : await ((_b = context.getSectionSchema) === null || _b === void 0 ? void 0 : _b.call(context, sectionType));\n if (!schema || schema instanceof Error)\n return themeBlocks;\n const { validSchema } = schema;\n if (!validSchema || validSchema instanceof Error)\n return themeBlocks;\n if (Array.isArray(validSchema.blocks)) {\n validSchema.blocks.forEach((block) => {\n if (!('name' in block) && block.type !== '@app') {\n themeBlocks.push(block.type);\n }\n });\n }\n return themeBlocks;\n}\nasync function validateBlock(blockType, blockStatic, blockPath, ancestorType, currentPath, offset, context) {\n const themeBlocks = await getThemeBlocks(ancestorType, currentPath, context);\n if (themeBlocks.length === 0)\n return;\n const exists = await validateBlockFileExistence(blockType, context);\n if (!exists) {\n reportWarning(`Theme block 'blocks/${blockType}.liquid' does not exist.`, offset, blockPath, context);\n }\n else if (blockStatic) {\n // Static blocks are not required to be in the schema blocks array\n return;\n }\n else {\n const isPrivateBlock = blockType.startsWith('_');\n const schemaIncludesAtTheme = themeBlocks.includes('@theme');\n const schemaIncludesBlockType = themeBlocks.includes(blockType);\n if (!isPrivateBlock ? schemaIncludesBlockType || schemaIncludesAtTheme : schemaIncludesBlockType) {\n return;\n }\n else {\n const location = isNestedBlock(currentPath) ? 'blocks' : 'sections';\n reportWarning(`Block type '${blockType}' is not allowed in '${location}/${ancestorType}.liquid'.`, offset, blockPath, context);\n }\n }\n}\nasync function getAllBlocks(ast, offset, ancestorType, blocks, currentPath, context) {\n await Promise.all(Object.entries(blocks).map(async ([blockKey, block]) => {\n if (block.type) {\n const typePath = currentPath.concat(blockKey, 'type');\n const blockPath = (0, json_1.nodeAtPath)(ast, typePath);\n if (blockPath) {\n await validateBlock(block.type, block.static, blockPath, ancestorType, currentPath, offset, context);\n }\n }\n if ('blocks' in block) {\n await getAllBlocks(ast, offset, block.type, block.blocks, currentPath.concat(blockKey, 'blocks'), context);\n }\n }));\n}\n//# sourceMappingURL=missing-block-utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JSONSyntaxError = void 0;\nconst parse_1 = require(\"../../jsonc/parse\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../utils\");\nfunction cleanErrorMessage(error) {\n const message = 'rawMessage' in error ? error.rawMessage : error.message;\n return message.replace(/\\s+at \\d+:\\d+/, '');\n}\nexports.JSONSyntaxError = {\n meta: {\n code: 'JSONSyntaxError',\n name: 'Enforce valid JSON',\n docs: {\n description: 'This check exists to prevent invalid JSON files in themes.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-syntax-error',\n },\n type: types_1.SourceCodeType.JSON,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n deprecated: true,\n },\n create(context) {\n if (context.validateJSON)\n return {}; // If available, we'll use the JSON validator instead\n const error = context.file.ast;\n if (!(0, utils_1.isError)(error))\n return {};\n return {\n async onCodePathStart(file) {\n if (file.ast instanceof parse_1.JSONCParseErrors) {\n for (const error of file.ast.errors) {\n context.report({\n message: jsoncParseErrorMessage(error.error),\n startIndex: error.offset,\n endIndex: error.offset + error.length,\n });\n }\n }\n else {\n context.report({\n message: cleanErrorMessage(error),\n startIndex: 0,\n endIndex: file.source.length,\n });\n }\n },\n };\n },\n};\nfunction jsoncParseErrorMessage(errorType) {\n switch (errorType) {\n case 1 /* ParseErrorCode.InvalidSymbol */:\n return 'Invalid symbol';\n case 2 /* ParseErrorCode.InvalidNumberFormat */:\n return 'Invalid number format';\n case 3 /* ParseErrorCode.PropertyNameExpected */:\n return 'Property name expected';\n case 4 /* ParseErrorCode.ValueExpected */:\n return 'Expecting a value';\n case 5 /* ParseErrorCode.ColonExpected */:\n return 'Expecting a colon after a property name (:)';\n case 6 /* ParseErrorCode.CommaExpected */:\n return 'Expecting a comma';\n case 7 /* ParseErrorCode.CloseBraceExpected */:\n return 'Expecting a closing brace (})';\n case 8 /* ParseErrorCode.CloseBracketExpected */:\n return 'Expecting a closing bracket (])';\n case 9 /* ParseErrorCode.EndOfFileExpected */:\n return 'Expecting end of file';\n case 10 /* ParseErrorCode.InvalidCommentToken */:\n return 'Invalid comment token';\n case 11 /* ParseErrorCode.UnexpectedEndOfComment */:\n return 'Unexpected end of comment';\n case 12 /* ParseErrorCode.UnexpectedEndOfString */:\n return 'Unexpected end of string';\n case 13 /* ParseErrorCode.UnexpectedEndOfNumber */:\n return 'Unexpected end of number';\n case 14 /* ParseErrorCode.InvalidUnicode */:\n return 'Invalid unicode';\n case 15 /* ParseErrorCode.InvalidEscapeCharacter */:\n return 'Invalid escape character';\n case 16 /* ParseErrorCode.InvalidCharacter */:\n return 'Invalid character';\n default:\n return 'Something went wrong with this JSON';\n }\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidFreeSettings = void 0;\nconst to_source_code_1 = require(\"../../to-source-code\");\nconst types_1 = require(\"../../types\");\nconst visitor_1 = require(\"../../visitor\");\nexports.LiquidFreeSettings = {\n meta: {\n code: 'LiquidFreeSettings',\n name: 'Check for liquid free settings values',\n docs: {\n description: 'Ensures settings values are liquid free.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-free-settings',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async LiquidRawTag(node) {\n if (node.name !== 'schema' || node.body.kind !== 'json') {\n return;\n }\n const jsonString = node.source.slice(node.blockStartPosition.end, node.blockEndPosition.start);\n const jsonFile = (0, to_source_code_1.toJSONAST)(jsonString);\n if (jsonFile instanceof Error)\n return;\n (0, visitor_1.visit)(jsonFile, {\n Property(schemaNode, ancestors) {\n if (isInArrayWithParentKey(ancestors, 'settings') && isLiteralNode(schemaNode.value)) {\n const { value, loc } = schemaNode.value;\n const propertyValue = schemaNode.key.value;\n if (typeof value === 'string' &&\n propertyValue !== 'visible_if' &&\n value.includes('{%') &&\n value.includes('%}')) {\n context.report({\n message: 'Settings values cannot contain liquid logic.',\n startIndex: node.blockStartPosition.end + loc.start.offset,\n endIndex: node.blockStartPosition.end + loc.end.offset,\n });\n }\n }\n },\n });\n },\n };\n },\n};\nfunction isLiteralNode(node) {\n return node.type === 'Literal';\n}\nfunction isInArrayWithParentKey(ancestors, parentKey) {\n return ancestors.some((ancestor, index) => {\n var _a;\n const parent = ancestors[index - 1];\n return ((ancestor.type === 'Array' || ancestor.type === 'Object') &&\n (parent === null || parent === void 0 ? void 0 : parent.type) === 'Property' &&\n ((_a = parent.key) === null || _a === void 0 ? void 0 : _a.value) === parentKey);\n });\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.detectInvalidBooleanExpressions = detectInvalidBooleanExpressions;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst utils_1 = require(\"./utils\");\nconst utils_2 = require(\"../../utils\");\nfunction detectInvalidBooleanExpressions(node, ancestors) {\n if ((0, utils_2.isWithinRawTagThatDoesNotParseItsContents)(ancestors))\n return;\n const condition = node.condition;\n if (condition.type !== liquid_html_parser_1.NodeTypes.Comparison && condition.type !== liquid_html_parser_1.NodeTypes.LogicalExpression) {\n return;\n }\n return {\n message: utils_1.INVALID_SYNTAX_MESSAGE,\n startIndex: node.position.start,\n endIndex: node.position.end,\n fix: (corrector) => {\n corrector.replace(node.position.start, node.position.end, node.source.slice(condition.left.position.start, condition.left.position.end));\n },\n };\n}\n//# sourceMappingURL=InvalidBooleanExpressions.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.detectInvalidConditionalNode = detectInvalidConditionalNode;\nconst utils_1 = require(\"./utils\");\nconst TOKEN_PATTERNS = {\n logical: /^(and|or)$/,\n comparison: /^(==|!=|>=|<=|>|<|contains)$/,\n invalid: /^[@#$&]$/,\n literal: /^(['\"][^'\"]*['\"]|\\d+(?:\\.\\d+)?|true|false|nil|empty|blank)$/,\n};\nfunction classifyToken(value) {\n for (const [type, pattern] of Object.entries(TOKEN_PATTERNS)) {\n if (pattern.test(value)) {\n return type;\n }\n }\n return 'variable';\n}\nfunction detectInvalidConditionalNode(node) {\n if (!('name' in node) || !node.name)\n return;\n if (!['if', 'elsif', 'unless'].includes(String(node.name)))\n return;\n const markup = node.markup;\n if (typeof markup !== 'string' || !markup.trim())\n return;\n const issue = analyzeConditionalExpression(markup);\n if (!issue)\n return;\n const openingTagRange = node.blockStartPosition || node.position;\n const openingTag = node.source.slice(openingTagRange.start, openingTagRange.end);\n const markupOffsetInOpening = openingTag.indexOf(markup);\n if (markupOffsetInOpening < 0)\n return;\n const startIndex = openingTagRange.start + markupOffsetInOpening;\n const endIndex = startIndex + markup.length;\n return {\n message: `${utils_1.INVALID_SYNTAX_MESSAGE}: ${issue.message}`,\n startIndex,\n endIndex,\n fix: (corrector) => {\n corrector.replace(startIndex, endIndex, issue.fix);\n },\n };\n}\nfunction isValueToken(token) {\n return token.type === 'literal' || token.type === 'variable';\n}\nfunction isOperatorToken(token) {\n return token.type === 'logical' || token.type === 'comparison';\n}\nfunction checkInvalidStartingToken(tokens) {\n const firstToken = tokens[0];\n if (firstToken.type === 'invalid' || firstToken.type === 'comparison') {\n return {\n message: `Conditional cannot start with '${firstToken.value}'. Use a variable or value instead`,\n fix: 'false',\n };\n }\n return null;\n}\nfunction checkTrailingTokensAfterComparison(tokens) {\n const COMPARISON_LENGTH = 3;\n const minTokensForTrailing = COMPARISON_LENGTH + 1;\n for (let i = 0; i <= tokens.length - minTokensForTrailing; i++) {\n const [v1, op, v2] = tokens.slice(i, i + 3);\n const remaining = tokens.slice(i + 3);\n if (isValueToken(v1) && op.type === 'comparison' && isValueToken(v2)) {\n if (remaining.length > 0) {\n if (remaining[0].type !== 'logical') {\n const validExpr = tokens\n .slice(0, i + 3)\n .map((t) => t.value)\n .join(' ');\n const junk = remaining.map((t) => t.value).join(' ');\n const containsLogicalOperators = /&&|\\|\\|/.test(junk);\n if (containsLogicalOperators) {\n return {\n message: `Conditional is invalid. Anything after '${validExpr}' will be ignored. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,\n fix: validExpr,\n };\n }\n else {\n return {\n message: `Conditional is invalid. Anything after '${validExpr}' will be ignored`,\n fix: validExpr,\n };\n }\n }\n }\n }\n }\n return null;\n}\nfunction checkLaxParsingIssues(tokens) {\n var _a;\n for (let i = 0; i < tokens.length - 1; i++) {\n const current = tokens[i];\n const next = tokens[i + 1];\n if (current.type === 'literal' && !isOperatorToken(next)) {\n const remaining = tokens.slice(i + 1);\n const hasUnknownOperator = ((_a = remaining[0]) === null || _a === void 0 ? void 0 : _a.type) === 'variable' && remaining.some(isOperatorToken);\n if (!hasUnknownOperator) {\n const ignored = remaining.map((t) => t.value).join(' ');\n const containsLogicalOperators = /&&|\\|\\|/.test(ignored);\n if (containsLogicalOperators) {\n return {\n message: `Expression stops at truthy value '${current.value}', and will ignore: '${ignored}'. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,\n fix: current.value,\n };\n }\n else {\n return {\n message: `Expression stops at truthy value '${current.value}', and will ignore: '${ignored}'`,\n fix: current.value,\n };\n }\n }\n }\n }\n return null;\n}\nfunction analyzeConditionalExpression(markup) {\n const trimmed = markup.trim();\n if (!trimmed)\n return null;\n const tokens = (0, utils_1.getValuesInMarkup)(trimmed).map(({ value }) => ({\n value,\n type: classifyToken(value),\n }));\n if (tokens.length === 0)\n return null;\n return (checkInvalidStartingToken(tokens) ||\n checkTrailingTokensAfterComparison(tokens) ||\n checkLaxParsingIssues(tokens));\n}\n//# sourceMappingURL=InvalidConditionalNode.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.detectConditionalNodeUnsupportedParenthesis = detectConditionalNodeUnsupportedParenthesis;\nconst utils_1 = require(\"./utils\");\nfunction detectConditionalNodeUnsupportedParenthesis(node) {\n if (!['if', 'elsif', 'unless'].includes(node.name))\n return;\n if (typeof node.markup !== 'string' || !node.markup.trim())\n return;\n const markupIndex = node.source.indexOf(node.markup, node.position.start);\n const fragments = (0, utils_1.getFragmentsInMarkup)(node.markup);\n const badFragments = fragments.filter((fragment) => (0, utils_1.doesFragmentContainUnsupportedParentheses)(fragment.value));\n if (badFragments.length) {\n return {\n message: utils_1.INVALID_SYNTAX_MESSAGE,\n startIndex: markupIndex,\n endIndex: markupIndex + node.markup.length,\n fix: (corrector) => {\n for (const fragment of badFragments) {\n corrector.replace(markupIndex + fragment.index, markupIndex + fragment.index + fragment.value.length, fragment.value.replace(/[\\(\\)]/g, ''));\n }\n },\n };\n }\n}\n//# sourceMappingURL=InvalidConditionalNodeParenthesis.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.detectInvalidEchoValue = detectInvalidEchoValue;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst utils_1 = require(\"./utils\");\nfunction detectInvalidEchoValue(node) {\n var _a;\n // We've broken it up into two groups:\n // 1. The variable(s)\n // 2. The filter section (non-captured)\n const ECHO_MARKUP_REGEX = /([^|]*)(?:\\s*\\|\\s*.*)?$/m;\n if (node.type === liquid_html_parser_1.NodeTypes.LiquidTag && node.name !== 'echo') {\n return;\n }\n const markup = node.markup;\n if (typeof markup !== 'string' ||\n // echo tags and variable outputs without markup are strict-valid:\n // e.g. {{ }}, {% echo %}, and {% liquid echo %}\n !markup) {\n return;\n }\n const match = markup.match(ECHO_MARKUP_REGEX);\n if (!match) {\n return;\n }\n const [, echoValue] = match;\n const firstEchoValue = (_a = (0, utils_1.getValuesInMarkup)(echoValue).at(0)) === null || _a === void 0 ? void 0 : _a.value;\n if (!firstEchoValue) {\n const startIndex = node.source.indexOf(markup, node.position.start);\n const endIndex = startIndex + markup.length;\n return {\n message: utils_1.INVALID_SYNTAX_MESSAGE,\n startIndex,\n endIndex,\n fix: (corrector) => {\n corrector.replace(startIndex, endIndex, 'blank');\n },\n };\n }\n const removalIndices = (source, startingIndex) => {\n const offset = source.indexOf(markup, startingIndex);\n return {\n startIndex: offset + firstEchoValue.length,\n endIndex: offset + echoValue.trimEnd().length,\n };\n };\n const { startIndex, endIndex } = removalIndices(node.source, node.position.start);\n if (endIndex <= startIndex) {\n return;\n }\n return {\n message: utils_1.INVALID_SYNTAX_MESSAGE,\n startIndex,\n endIndex,\n fix: (corrector) => {\n corrector.replace(startIndex, endIndex, '');\n },\n };\n}\n//# sourceMappingURL=InvalidEchoValue.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.detectInvalidFilterName = detectInvalidFilterName;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst utils_1 = require(\"./utils\");\nasync function detectInvalidFilterName(node, filters) {\n if (!filters) {\n return [];\n }\n if (node.type === liquid_html_parser_1.NodeTypes.LiquidVariableOutput) {\n if (typeof node.markup !== 'string') {\n return [];\n }\n return detectInvalidFilterNameInMarkup(node, node.markup, filters);\n }\n if (node.type === liquid_html_parser_1.NodeTypes.LiquidTag) {\n if (node.name === liquid_html_parser_1.NamedTags.echo && typeof node.markup !== 'string') {\n return [];\n }\n if (node.name === liquid_html_parser_1.NamedTags.assign && typeof node.markup !== 'string') {\n return [];\n }\n if (typeof node.markup === 'string' &&\n (node.name === liquid_html_parser_1.NamedTags.echo || node.name === liquid_html_parser_1.NamedTags.assign)) {\n return detectInvalidFilterNameInMarkup(node, node.markup, filters);\n }\n }\n return [];\n}\nasync function detectInvalidFilterNameInMarkup(node, markup, filters) {\n var _a;\n const knownFilters = filters;\n const trimmedMarkup = markup.trim();\n const problems = [];\n const filterPattern = /\\|\\s*([a-zA-Z][a-zA-Z0-9_]*)/g;\n const matches = Array.from(trimmedMarkup.matchAll(filterPattern));\n for (const match of matches) {\n const filterName = match[1];\n if (!knownFilters.some((filter) => filter.name === filterName)) {\n continue;\n }\n const filterEndIndex = match.index + match[0].length;\n const afterFilter = trimmedMarkup.slice(filterEndIndex);\n // This regex finds invalid trailing characters after a filter name using lookaheads:\n // 1. Skip valid syntax like \": parameter\" or \"| nextfilter\"\n // 2. Capture any junk characters that shouldn't be there\n // 3. Stop before valid boundaries like colons or pipes\n // e.g. \"upcase xyz\" finds \"xyz\", but \"upcase | downcase\" is ignored as valid\n const invalidSegment = (_a = afterFilter.match(/^(?!\\s*(?::|$|\\|\\s*[a-zA-Z]|\\|\\s*\\||\\s*\\|\\s*(?:[}%]|$)))([^:|]+?)(?=\\s*(?::|$|\\|))/)) === null || _a === void 0 ? void 0 : _a[1];\n if (!invalidSegment) {\n continue;\n }\n const markupStartInSource = node.source.indexOf(markup, node.position.start);\n const trailingStartInSource = markupStartInSource + filterEndIndex;\n const trailingEndInSource = trailingStartInSource + invalidSegment.length;\n problems.push({\n message: `${utils_1.INVALID_SYNTAX_MESSAGE} Filter '${filterName}' has trailing characters '${invalidSegment}' that should be removed.`,\n startIndex: trailingStartInSource,\n endIndex: trailingEndInSource,\n fix: (corrector) => {\n corrector.replace(trailingStartInSource, trailingEndInSource, '');\n },\n });\n }\n return problems;\n}\n//# sourceMappingURL=InvalidFilterName.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.detectInvalidLoopArguments = detectInvalidLoopArguments;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst utils_1 = require(\"./utils\");\nconst utils_2 = require(\"../../utils\");\nfunction detectInvalidLoopArguments(node, tags = []) {\n if (node.type === liquid_html_parser_1.NodeTypes.LiquidTag && !(0, utils_2.isLoopLiquidTag)(node)) {\n return;\n }\n let markup = node.markup;\n if (!markup) {\n return;\n }\n if (typeof markup !== 'string') {\n markup = markup.source.slice(markup.position.start, markup.position.end);\n }\n const fragments = (0, utils_1.getFragmentsInMarkup)(markup);\n // The first three fragments are: `<variable> in <array>`\n // If they haven't started typing the tag, we don't want to report an error.\n if (fragments.length <= 3) {\n return;\n }\n const markupIndex = node.source.indexOf(markup, node.position.start);\n let startIndex = markupIndex + fragments.at(3).index;\n let endIndex = markupIndex + fragments.at(-1).index + fragments.at(-1).value.length;\n const filteredFragments = [];\n // Positional arguments are ignored if they come after invalid positional args or named args\n let noMorePositionalArguments = false;\n const invalidFragments = [];\n for (let i = 3; i < fragments.length; i++) {\n const fragment = fragments[i];\n if ((0, utils_1.doesFragmentContainUnsupportedParentheses)(fragment.value)) {\n noMorePositionalArguments = true;\n invalidFragments.push(fragment.value);\n continue;\n }\n const keyValuePair = (0, utils_1.fragmentKeyValuePair)(fragment.value);\n // Named arg is found\n if (keyValuePair) {\n noMorePositionalArguments = true;\n if (!isSupportedTagArgument(tags, node.name, keyValuePair.key, false)) {\n invalidFragments.push(fragment.value);\n continue;\n }\n }\n // Unsupported positional arg is found\n else if (noMorePositionalArguments ||\n !isSupportedTagArgument(tags, node.name, fragment.value, true)) {\n noMorePositionalArguments = true;\n invalidFragments.push(fragment.value);\n continue;\n }\n filteredFragments.push(fragment.value);\n }\n if (invalidFragments.length === 0) {\n return;\n }\n return {\n message: `Arguments must be provided in the format \\`${node.name} in <array> <positional arguments> <named arguments>\\`. Invalid/Unknown arguments: ${invalidFragments.join(', ')}`,\n startIndex,\n endIndex,\n fix: (corrector) => {\n corrector.replace(startIndex, endIndex, filteredFragments.join(' '));\n },\n };\n}\nfunction isSupportedTagArgument(tags, tagName, key, positional) {\n var _a, _b;\n return (((_b = (_a = tags\n .find((tag) => tag.name === tagName)) === null || _a === void 0 ? void 0 : _a.parameters) === null || _b === void 0 ? void 0 : _b.some((parameter) => parameter.name === key && parameter.positional === positional)) || false);\n}\n//# sourceMappingURL=InvalidLoopArguments.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.INVALID_LOOP_RANGE_MESSAGE = void 0;\nexports.detectInvalidLoopRange = detectInvalidLoopRange;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst utils_1 = require(\"./utils\");\nconst utils_2 = require(\"../../utils\");\nexports.INVALID_LOOP_RANGE_MESSAGE = 'Ranges must be in the format `(<start>..<end>)`. The start and end of the range must be whole numbers or variables.';\nfunction detectInvalidLoopRange(node) {\n if (node.type === liquid_html_parser_1.NodeTypes.LiquidTag && !(0, utils_2.isLoopLiquidTag)(node)) {\n return;\n }\n const markup = node.markup;\n if (!markup) {\n return;\n }\n if (typeof markup === 'string') {\n return validateMarkup(node, markup);\n }\n if (markup.collection.type === liquid_html_parser_1.NodeTypes.Range) {\n return validateMarkup(node, node.source.slice(markup.collection.position.start, markup.collection.position.end));\n }\n}\nfunction validateMarkup(node, markup) {\n const match = (0, utils_1.getRangeMatch)(markup);\n if (!match || match.index === undefined) {\n return;\n }\n const [fullMatch, start, , end] = match;\n let startCleaned = start;\n let endCleaned = end;\n if (!isNaN(Number(start)) && Number(start) % 1 !== 0) {\n startCleaned = `${Math.trunc(Number(start))}`;\n }\n if (!isNaN(Number(end)) && Number(end) % 1 !== 0) {\n endCleaned = `${Math.trunc(Number(end))}`;\n }\n const expectedRangeMarkup = `(${startCleaned}..${endCleaned})`;\n if (markup.slice(match.index, match.index + fullMatch.length) === expectedRangeMarkup) {\n return;\n }\n const markupIndex = node.source.indexOf(markup, node.position.start);\n const startIndex = markupIndex + match.index;\n const endIndex = startIndex + fullMatch.length;\n return {\n message: exports.INVALID_LOOP_RANGE_MESSAGE,\n startIndex,\n endIndex,\n fix: (corrector) => {\n corrector.replace(startIndex, endIndex, expectedRangeMarkup);\n },\n };\n}\n//# sourceMappingURL=InvalidLoopRange.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.detectInvalidPipeSyntax = detectInvalidPipeSyntax;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst utils_1 = require(\"./utils\");\nasync function detectInvalidPipeSyntax(node) {\n if (node.type === liquid_html_parser_1.NodeTypes.LiquidVariableOutput) {\n if (typeof node.markup !== 'string') {\n return [];\n }\n return detectPipeSyntaxInMarkup(node, node.markup);\n }\n if (node.type === liquid_html_parser_1.NodeTypes.LiquidTag) {\n if (node.name === liquid_html_parser_1.NamedTags.echo && typeof node.markup !== 'string') {\n return [];\n }\n if (node.name === liquid_html_parser_1.NamedTags.assign && typeof node.markup !== 'string') {\n return [];\n }\n if (typeof node.markup === 'string' &&\n (node.name === liquid_html_parser_1.NamedTags.echo || node.name === liquid_html_parser_1.NamedTags.assign)) {\n return detectPipeSyntaxInMarkup(node, node.markup);\n }\n }\n return [];\n}\nasync function detectPipeSyntaxInMarkup(node, markup) {\n const problems = [];\n const trimmedMarkup = markup.trim();\n // Check for multiple consecutive pipes\n const extraPipesPattern = /(\\|\\s*){2,}/g;\n const extraPipesMatches = Array.from(trimmedMarkup.matchAll(extraPipesPattern));\n for (const match of extraPipesMatches) {\n const markupStartInSource = node.source.indexOf(markup, node.position.start);\n if (markupStartInSource === -1) {\n continue;\n }\n const problemStartInSource = markupStartInSource + match.index;\n const problemEndInSource = problemStartInSource + match[0].length;\n problems.push({\n message: `${utils_1.INVALID_SYNTAX_MESSAGE}. Remove extra \\`|\\` character(s).`,\n startIndex: problemStartInSource,\n endIndex: problemEndInSource,\n fix: (corrector) => {\n corrector.replace(problemStartInSource, problemEndInSource, '| ');\n },\n });\n }\n // Check for trailing pipes\n const trailingPipePattern = /\\s*\\|\\s*$/;\n const trailingPipeMatch = trimmedMarkup.match(trailingPipePattern);\n if (trailingPipeMatch) {\n const markupStartInSource = node.source.indexOf(markup, node.position.start);\n if (markupStartInSource === -1) {\n return problems;\n }\n const trailingPipeStartInMarkup = trailingPipeMatch.index;\n const problemStartInSource = markupStartInSource + trailingPipeStartInMarkup;\n const problemEndInSource = problemStartInSource + trailingPipeMatch[0].length;\n problems.push({\n message: `${utils_1.INVALID_SYNTAX_MESSAGE}. Remove the trailing \\`|\\` character.`,\n startIndex: problemStartInSource,\n endIndex: problemEndInSource,\n fix: (corrector) => {\n corrector.replace(problemStartInSource, problemEndInSource, '');\n },\n });\n }\n return problems;\n}\n//# sourceMappingURL=InvalidPipeSyntax.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.detectMultipleAssignValues = detectMultipleAssignValues;\nconst utils_1 = require(\"./utils\");\nfunction detectMultipleAssignValues(node) {\n var _a;\n // Using a regex to match the markup like we do in Shopify/liquid\n // https://github.com/Shopify/liquid/blob/9bb7fbf123e6e2bd61e00189b1c83159f375d3f3/lib/liquid/tags/assign.rb#L21\n //\n // We've broken it up into four groups:\n // 1. The variable name\n // 2. The assignment operator\n // 3. The value section\n // 4. The filter section (non-captured)\n const ASSIGN_MARKUP_REGEX = /([^=]+)(=\\s*)([^|]+)(?:\\s*\\|\\s*.*)?$/m;\n if (node.name !== 'assign') {\n return;\n }\n const markup = node.markup;\n if (typeof markup !== 'string') {\n return;\n }\n const match = markup.match(ASSIGN_MARKUP_REGEX);\n if (!match) {\n return;\n }\n // If we have a markup 'foo = \"123\" something | upcase: 123', we have the following groups\n const [\n // 'foo = \"123\" something | upcase: 123'\n _fullMatch, \n // 'foo '\n assignmentVariable, \n // '= '\n assignmentOperator, \n // '\"123\" something'\n assignmentValue,] = match;\n const firstAssignmentValue = (_a = (0, utils_1.getValuesInMarkup)(assignmentValue).at(0)) === null || _a === void 0 ? void 0 : _a.value;\n if (!firstAssignmentValue) {\n return;\n }\n const removalIndices = (source, startingIndex) => {\n const offset = source.indexOf(markup, startingIndex);\n return {\n startIndex: offset +\n assignmentVariable.length +\n assignmentOperator.length +\n firstAssignmentValue.length,\n endIndex: offset +\n assignmentVariable.length +\n assignmentOperator.length +\n assignmentValue.trimEnd().length,\n };\n };\n const { startIndex, endIndex } = removalIndices(node.source, node.position.start);\n if (endIndex <= startIndex) {\n return;\n }\n if (endIndex <= startIndex) {\n return;\n }\n return {\n message: utils_1.INVALID_SYNTAX_MESSAGE,\n startIndex,\n endIndex,\n fix: (corrector) => {\n corrector.replace(startIndex, endIndex, '');\n },\n };\n}\n//# sourceMappingURL=MultipleAssignValues.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.INVALID_SYNTAX_MESSAGE = void 0;\nexports.getValuesInMarkup = getValuesInMarkup;\nexports.getFragmentsInMarkup = getFragmentsInMarkup;\nexports.getRangeMatch = getRangeMatch;\nexports.doesFragmentContainUnsupportedParentheses = doesFragmentContainUnsupportedParentheses;\nexports.fragmentKeyValuePair = fragmentKeyValuePair;\nexports.INVALID_SYNTAX_MESSAGE = 'Syntax is not supported';\nfunction getValuesInMarkup(markup) {\n return [...markup.matchAll(new RegExp(VALUE_PATTERN, 'g'))].map((match) => ({\n value: match[0],\n index: match.index,\n }));\n}\nconst DOUBLE_QUOTED_STRING = `\"[^\"]*\"`;\nconst SINGLE_QUOTED_STRING = `'[^']*'`;\n// Lax parser does NOT complain about leading/trailing spaces inside ranges (e.g. `(1 .. 10 )`) and\n// within the parenthesis (e.g. `( 1 .. 10 )`), but fails to render the liquid when using the gem.\n// Strict parser does NOT complain, but still renders it.\n// To avoid any issues, we will remove extra spaces.\nconst RANGE_MARKUP_COMPONENT_REGEX = `\\\\s*(-?\\\\d+(?:\\\\.\\\\d+)?|\\\\w+(?:\\\\.\\\\w+)*)\\\\s*`;\nconst RANGE_MARKUP_REGEX = `\\\\(\\\\s*${RANGE_MARKUP_COMPONENT_REGEX}(\\\\.{2,})\\\\s*${RANGE_MARKUP_COMPONENT_REGEX}\\\\s*\\\\)`;\nconst REGULAR_TOKEN = `[^\\\\s,]+`; // tokens separated by commas or spaces\n// Quoted strings pattern (combination of double and single quoted)\nconst QUOTED_STRING = `(${DOUBLE_QUOTED_STRING}|${SINGLE_QUOTED_STRING})`;\n// Value pattern for key-value pairs (can be quoted, parenthesized, or regular token)\nconst VALUE_PATTERN = `(${QUOTED_STRING}|${RANGE_MARKUP_REGEX}|${REGULAR_TOKEN})`;\n// Key-value pair pattern\nconst KEY_VALUE_PAIR = `(\\\\S+):\\\\s*${VALUE_PATTERN}`;\nconst MARKUP_FRAGMENTS_PATTERN = new RegExp(`${QUOTED_STRING}|${RANGE_MARKUP_REGEX}|${KEY_VALUE_PAIR}|${REGULAR_TOKEN}`, 'g');\nfunction getFragmentsInMarkup(markup) {\n return [...markup.matchAll(MARKUP_FRAGMENTS_PATTERN)].map((match) => ({\n value: match[0],\n index: match.index,\n }));\n}\nfunction getRangeMatch(markup) {\n return markup.match(RANGE_MARKUP_REGEX);\n}\nfunction doesFragmentContainUnsupportedParentheses(fragment) {\n if (getRangeMatch(fragment)) {\n return false;\n }\n return fragment.includes('(') || fragment.includes(')');\n}\nfunction fragmentKeyValuePair(fragment) {\n const match = fragment.match(new RegExp(KEY_VALUE_PAIR));\n if (!match) {\n return;\n }\n const [, key, value] = match;\n return {\n key,\n value,\n };\n}\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidHTMLSyntaxError = void 0;\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../utils\");\nconst MultipleAssignValues_1 = require(\"./checks/MultipleAssignValues\");\nconst InvalidBooleanExpressions_1 = require(\"./checks/InvalidBooleanExpressions\");\nconst InvalidEchoValue_1 = require(\"./checks/InvalidEchoValue\");\nconst InvalidConditionalNode_1 = require(\"./checks/InvalidConditionalNode\");\nconst InvalidLoopRange_1 = require(\"./checks/InvalidLoopRange\");\nconst InvalidLoopArguments_1 = require(\"./checks/InvalidLoopArguments\");\nconst InvalidConditionalNodeParenthesis_1 = require(\"./checks/InvalidConditionalNodeParenthesis\");\nconst InvalidFilterName_1 = require(\"./checks/InvalidFilterName\");\nconst InvalidPipeSyntax_1 = require(\"./checks/InvalidPipeSyntax\");\nconst utils_2 = require(\"../utils\");\nfunction isParsingErrorWithLocation(error) {\n return 'name' in error && error.name === 'LiquidHTMLParsingError' && 'loc' in error;\n}\nfunction cleanErrorMessage(message, highlight) {\n return message\n .replace(/Line \\d+, col \\d+:\\s+/, 'SyntaxError: ')\n .replace(/(?!<expected \".+\",) not .*/, ` not \"${highlight}\"`);\n}\nexports.LiquidHTMLSyntaxError = {\n meta: {\n code: 'LiquidHTMLSyntaxError',\n aliases: ['SyntaxError', 'HtmlParsingError'],\n name: 'Prevent LiquidHTML Syntax Errors',\n docs: {\n description: 'This check exists to inform the user of Liquid HTML syntax errors.',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n var _a, _b;\n const ast = context.file.ast;\n const filtersPromise = (_a = context.themeDocset) === null || _a === void 0 ? void 0 : _a.filters();\n const tagsPromise = (_b = context.themeDocset) === null || _b === void 0 ? void 0 : _b.tags();\n if (!(0, utils_1.isError)(ast)) {\n return {\n async BooleanExpression(node, ancestors) {\n if ((0, utils_2.isWithinRawTagThatDoesNotParseItsContents)(ancestors))\n return;\n const problem = (0, InvalidBooleanExpressions_1.detectInvalidBooleanExpressions)(node, ancestors);\n if (!problem) {\n return;\n }\n context.report(problem);\n },\n async LiquidTag(node, ancestors) {\n if ((0, utils_2.isWithinRawTagThatDoesNotParseItsContents)(ancestors))\n return;\n const problems = [\n (0, MultipleAssignValues_1.detectMultipleAssignValues)(node),\n (0, InvalidEchoValue_1.detectInvalidEchoValue)(node),\n (0, InvalidLoopRange_1.detectInvalidLoopRange)(node),\n (0, InvalidLoopArguments_1.detectInvalidLoopArguments)(node, await tagsPromise),\n ].filter(Boolean);\n // Fixers for `detectConditionalNodeUnsupportedParenthesis` and `detectInvalidConditionalNode` consume\n // the whole node markup, so we MUST not run both.\n const conditionalNodeProblem = (0, InvalidConditionalNodeParenthesis_1.detectConditionalNodeUnsupportedParenthesis)(node) || (0, InvalidConditionalNode_1.detectInvalidConditionalNode)(node);\n if (conditionalNodeProblem) {\n problems.push(conditionalNodeProblem);\n }\n problems.forEach(context.report);\n const filterProblems = await (0, InvalidFilterName_1.detectInvalidFilterName)(node, await filtersPromise);\n if (filterProblems.length > 0) {\n filterProblems.forEach((filterProblem) => context.report(filterProblem));\n }\n const pipeProblems = await (0, InvalidPipeSyntax_1.detectInvalidPipeSyntax)(node);\n if (pipeProblems.length > 0) {\n pipeProblems.forEach((pipeProblem) => context.report(pipeProblem));\n }\n },\n async LiquidBranch(node, ancestors) {\n if ((0, utils_2.isWithinRawTagThatDoesNotParseItsContents)(ancestors))\n return;\n const problem = (0, InvalidConditionalNode_1.detectInvalidConditionalNode)(node);\n if (!problem) {\n return;\n }\n context.report(problem);\n },\n async LiquidVariableOutput(node, ancestors) {\n if ((0, utils_2.isWithinRawTagThatDoesNotParseItsContents)(ancestors))\n return;\n const filterProblems = await (0, InvalidFilterName_1.detectInvalidFilterName)(node, await filtersPromise);\n if (filterProblems.length > 0) {\n filterProblems.forEach((problem) => context.report(problem));\n }\n const pipeProblems = await (0, InvalidPipeSyntax_1.detectInvalidPipeSyntax)(node);\n if (pipeProblems.length > 0) {\n pipeProblems.forEach((pipeProblem) => context.report(pipeProblem));\n }\n const problem = (0, InvalidEchoValue_1.detectInvalidEchoValue)(node);\n if (problem) {\n context.report(problem);\n }\n },\n };\n }\n return {\n async onCodePathStart(file) {\n if (isParsingErrorWithLocation(ast)) {\n const { start, end } = ast.loc;\n const startIndex = (0, utils_1.getOffset)(file.source, start.line, start.column);\n let endIndex = (0, utils_1.getOffset)(file.source, end.line, end.column);\n if (startIndex === endIndex)\n endIndex += 1;\n const highlight = file.source.slice(startIndex, endIndex);\n context.report({\n message: cleanErrorMessage(ast.message, highlight),\n startIndex,\n endIndex: endIndex,\n });\n }\n else {\n context.report({\n message: ast.message,\n startIndex: 0,\n endIndex: file.source.length,\n });\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MatchingTranslations = void 0;\nconst types_1 = require(\"../../types\");\nconst PLURALIZATION_KEYS = new Set(['zero', 'one', 'two', 'few', 'many', 'other']);\nexports.MatchingTranslations = {\n meta: {\n code: 'MatchingTranslations',\n name: 'Translation files should have the same keys',\n docs: {\n description: 'TODO',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/matching-translations',\n },\n type: types_1.SourceCodeType.JSON,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n // State\n const defaultTranslations = new Set();\n const missingTranslations = new Set();\n const nodesByPath = new Map();\n const file = context.file;\n const fileUri = file.uri;\n const relativePath = context.toRelativePath(fileUri);\n const ast = file.ast;\n const isLocaleFile = relativePath.startsWith('locales/');\n const isDefaultTranslationsFile = fileUri.endsWith('.default.json') || fileUri.endsWith('.default.schema.json');\n const isSchemaTranslationFile = fileUri.endsWith('.schema.json');\n if (!isLocaleFile || isDefaultTranslationsFile || ast instanceof Error) {\n // No need to lint a file that isn't a translation file, we return an\n // empty object as the check for those.\n return {};\n }\n // Helpers\n const hasDefaultTranslations = () => defaultTranslations.size > 0;\n const isTerminalNode = ({ type }) => type === 'Literal';\n const isPluralizationNode = (node) => PLURALIZATION_KEYS.has(node.key.value);\n const isShopifyPath = (path) => path.startsWith('shopify.');\n const hasDefaultTranslation = (translationPath) => { var _a; return (_a = defaultTranslations.has(translationPath)) !== null && _a !== void 0 ? _a : false; };\n const isPluralizationPath = (path) => [...PLURALIZATION_KEYS].some((key) => path.endsWith(key));\n const jsonPaths = (json) => {\n const keys = Object.keys(json);\n return keys.reduce((acc, key) => {\n if (typeof json[key] !== 'object') {\n return acc.concat(key);\n }\n const childJson = json[key];\n const childPaths = jsonPaths(childJson);\n return acc.concat(childPaths.map((path) => `${key}.${path}`));\n }, []);\n };\n const objectPath = (nodes) => {\n return nodes\n .filter((node) => node.type === 'Property')\n .reduce((acc, val) => acc.concat(val.key.value), [])\n .join('.');\n };\n const countCommonParts = (arrayA, arrayB) => {\n const minLength = Math.min(arrayA.length, arrayB.length);\n for (let i = 0; i < minLength; i++) {\n if (arrayA[i] !== arrayB[i]) {\n return i;\n }\n }\n return minLength;\n };\n const closestTranslationKey = (translationKey) => {\n var _a;\n const translationKeyParts = translationKey.split('.');\n let closestMatch = '';\n let maxCommonParts = 0;\n for (const path of nodesByPath.keys()) {\n const pathParts = path.split('.');\n const commonParts = countCommonParts(pathParts, translationKeyParts);\n if (commonParts > maxCommonParts) {\n maxCommonParts = commonParts;\n closestMatch = path;\n }\n }\n return (_a = nodesByPath.get(closestMatch)) !== null && _a !== void 0 ? _a : ast;\n };\n return {\n async onCodePathStart() {\n const getDefaultTranslations = isSchemaTranslationFile\n ? context.getDefaultSchemaTranslations\n : context.getDefaultTranslations;\n const defaultTranslationPaths = await getDefaultTranslations().then(jsonPaths);\n defaultTranslationPaths.forEach(Set.prototype.add, defaultTranslations);\n // At the `onCodePathStart`, we assume that all translations are missing,\n // and remove translation paths while traversing through the file.\n defaultTranslationPaths.forEach(Set.prototype.add, missingTranslations);\n },\n async Property(node, ancestors) {\n const path = objectPath(ancestors.concat(node));\n nodesByPath.set(path, node);\n if (!hasDefaultTranslations())\n return;\n if (isPluralizationNode(node))\n return;\n if (!isTerminalNode(node.value))\n return;\n if (isShopifyPath(path))\n return;\n if (hasDefaultTranslation(path)) {\n // As `path` is present, we remove it from the\n // `missingTranslationsPerFile` bucket.\n missingTranslations.delete(path);\n return;\n }\n context.report({\n message: `A default translation for '${path}' does not exist`,\n startIndex: node.loc.start.offset,\n endIndex: node.loc.end.offset,\n suggest: [\n {\n message: 'Delete unneeded translation key',\n fix(corrector) {\n corrector.remove(path);\n },\n },\n ],\n });\n },\n async onCodePathEnd() {\n missingTranslations.forEach((path) => {\n const closest = closestTranslationKey(path);\n if (isPluralizationPath(path))\n return;\n if (isShopifyPath(path))\n return;\n context.report({\n message: `The translation for '${path}' is missing`,\n startIndex: closest.loc.start.offset,\n endIndex: closest.loc.end.offset,\n fix(corrector) {\n corrector.add(path, 'TODO');\n },\n });\n });\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MissingAsset = void 0;\nconst types_1 = require(\"../../types\");\nconst file_utils_1 = require(\"../../utils/file-utils\");\nconst utils_1 = require(\"../utils\");\nexports.MissingAsset = {\n meta: {\n code: 'MissingAsset',\n name: 'Avoid rendering missing asset files',\n docs: {\n description: 'Reports missing asset files',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-asset',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async LiquidVariable(node) {\n if (node.filters.length === 0 || node.filters[0].name !== 'asset_url') {\n return;\n }\n if (!(0, utils_1.isLiquidString)(node.expression))\n return;\n let expression = node.expression;\n let originalAssetPath = `assets/${expression.value}`;\n let assetPath = originalAssetPath;\n let fileExists = await (0, file_utils_1.doesFileExist)(context, assetPath);\n if (fileExists)\n return;\n if (assetPath.endsWith('.scss.css')) {\n assetPath = assetPath.replace('.scss.css', '.scss.liquid');\n fileExists = await (0, file_utils_1.doesFileExist)(context, assetPath);\n if (fileExists)\n return;\n }\n if (assetPath.endsWith('.js') || assetPath.endsWith('.css')) {\n assetPath += '.liquid';\n fileExists = await (0, file_utils_1.doesFileExist)(context, assetPath);\n if (fileExists)\n return;\n }\n context.report({\n message: `'${originalAssetPath}' does not exist`,\n startIndex: expression.position.start,\n endIndex: expression.position.end,\n });\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MissingContentForArguments = void 0;\nconst types_1 = require(\"../../types\");\nconst arguments_1 = require(\"../../liquid-doc/arguments\");\nexports.MissingContentForArguments = {\n meta: {\n code: 'MissingContentForArguments',\n name: 'Missing ContentFor Arguments',\n docs: {\n description: 'This check ensures that all required arguments are provided when rendering a static block.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-content-for-arguments',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async ContentForMarkup(node) {\n const blockName = (0, arguments_1.getBlockName)(node);\n if (!blockName)\n return;\n const liquidDocParameters = await (0, arguments_1.getLiquidDocParams)(context, `blocks/${blockName}.liquid`);\n if (!liquidDocParameters)\n return;\n const providedParams = new Map(node.args.map((arg) => [arg.name, arg]));\n const missingRequiredParams = Array.from(liquidDocParameters.values()).filter((p) => p.required && !providedParams.has(p.name));\n (0, arguments_1.reportMissingArguments)(context, node, missingRequiredParams, blockName);\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MissingRenderSnippetArguments = void 0;\nconst types_1 = require(\"../../types\");\nconst arguments_1 = require(\"../../liquid-doc/arguments\");\nexports.MissingRenderSnippetArguments = {\n meta: {\n code: 'MissingRenderSnippetArguments',\n name: 'Missing Render Snippet Arguments',\n aliases: ['MissingRenderSnippetParams'],\n docs: {\n description: 'This check ensures that all required arguments are provided when rendering a snippet.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-render-snippet-arguments',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async RenderMarkup(node) {\n const snippetName = (0, arguments_1.getSnippetName)(node);\n if (!snippetName)\n return;\n const liquidDocParameters = await (0, arguments_1.getLiquidDocParams)(context, `snippets/${snippetName}.liquid`);\n if (!liquidDocParameters)\n return;\n const providedParams = new Map(node.args.map((arg) => [arg.name, arg]));\n const missingRequiredParams = Array.from(liquidDocParameters.values()).filter((p) => { var _a; return p.required && !providedParams.has(p.name) && p.name !== ((_a = node.alias) === null || _a === void 0 ? void 0 : _a.value); });\n (0, arguments_1.reportMissingArguments)(context, node, missingRequiredParams, snippetName);\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MissingTemplate = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst minimatch_1 = require(\"minimatch\");\nconst types_1 = require(\"../../types\");\nconst file_utils_1 = require(\"../../utils/file-utils\");\nconst schema = {\n ignoreMissing: types_1.SchemaProp.array(types_1.SchemaProp.string(), []),\n};\nexports.MissingTemplate = {\n meta: {\n code: 'MissingTemplate',\n name: 'Avoid rendering missing templates',\n docs: {\n description: 'Reports missing include/render/section liquid file',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-template',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema,\n targets: [],\n },\n create(context) {\n const isNamedLiquidTag = (tag) => typeof tag.markup !== 'string';\n function isIgnored(relativePath) {\n return context.settings.ignoreMissing.some((pattern) => (0, minimatch_1.minimatch)(relativePath, pattern));\n }\n async function maybeReportMissing(relativePath, { position }) {\n const fileExists = await (0, file_utils_1.doesFileExist)(context, relativePath);\n if (fileExists || isIgnored(relativePath))\n return;\n context.report({\n message: `'${relativePath}' does not exist`,\n startIndex: position.start,\n endIndex: position.end,\n });\n }\n return {\n async RenderMarkup(node) {\n if (node.snippet.type === liquid_html_parser_1.NodeTypes.VariableLookup)\n return;\n const snippet = node.snippet;\n const relativePath = `snippets/${snippet.value}.liquid`;\n await maybeReportMissing(relativePath, snippet);\n },\n async LiquidTag(node) {\n if (!isNamedLiquidTag(node))\n return;\n if (node.name !== liquid_html_parser_1.NamedTags.section)\n return;\n const markup = node.markup;\n const relativePath = `sections/${markup.value}.liquid`;\n await maybeReportMissing(relativePath, markup);\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OrphanedSnippet = void 0;\nconst to_schema_1 = require(\"../../to-schema\");\nconst types_1 = require(\"../../types\");\nexports.OrphanedSnippet = {\n meta: {\n code: 'OrphanedSnippet',\n name: 'Prevent orphaned snippets',\n docs: {\n description: 'This check exists to prevent orphaned snippets in themes.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/orphaned-snippet',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async onCodePathEnd() {\n const { getReferences } = context;\n if (!getReferences) {\n return;\n }\n const fileUri = context.file.uri;\n if ((0, to_schema_1.isSnippet)(fileUri)) {\n const references = await getReferences(fileUri);\n if (references.length === 0) {\n context.report({\n message: `This snippet is not referenced by any other files`,\n startIndex: 0,\n endIndex: 1,\n });\n }\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PaginationSize = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../utils\");\nconst utils_2 = require(\"../utils\");\nconst json_1 = require(\"../../json\");\nconst schema = {\n minSize: types_1.SchemaProp.number(1),\n maxSize: types_1.SchemaProp.number(250),\n};\nexports.PaginationSize = {\n meta: {\n code: 'PaginationSize',\n name: 'Ensure paginate tags are used with performant sizes',\n docs: {\n description: 'This check is aimed at keeping response times low.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/pagination-size',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema,\n targets: [],\n },\n create(context) {\n const minSize = context.settings.minSize;\n const maxSize = context.settings.maxSize;\n let schemaSettings = [];\n const pageSizeLookups = [];\n function checkPageSize(pageSizeNode, value, message = `Pagination size must be a positive integer between ${minSize} and ${maxSize}.`) {\n if (minSize <= value && value <= maxSize)\n return;\n context.report({\n message,\n startIndex: pageSizeNode.position.start,\n endIndex: pageSizeNode.position.end,\n });\n }\n return {\n async LiquidTag(node) {\n if (typeof node.markup === 'string' || node.name !== 'paginate')\n return;\n const pageSizeNode = node.markup.pageSize;\n if ((0, utils_2.isNodeOfType)(liquid_html_parser_1.NodeTypes.VariableLookup, pageSizeNode)) {\n pageSizeLookups.push(pageSizeNode);\n }\n else if ((0, utils_2.isNodeOfType)(liquid_html_parser_1.NodeTypes.Number, pageSizeNode)) {\n checkPageSize(pageSizeNode, Number(pageSizeNode.value));\n }\n },\n async LiquidRawTag(node) {\n if (node.name === 'schema') {\n const schema = (0, json_1.parseJSON)(node.body.value);\n if ((0, utils_1.isError)(schema))\n return;\n if (schema.settings && Array.isArray(schema.settings)) {\n schemaSettings = schema.settings;\n }\n }\n },\n async onCodePathEnd() {\n pageSizeLookups.forEach((pageSizeVariableLookup) => {\n // Kind of assumes that you're using settings of some sort.\n const lastLookup = (0, utils_1.last)(pageSizeVariableLookup.lookups);\n if (lastLookup === undefined)\n return;\n if (lastLookup.type !== liquid_html_parser_1.NodeTypes.String)\n return;\n const settingId = lastLookup.value;\n const setting = schemaSettings.find((setting) => setting.id === settingId);\n if (setting === undefined)\n return;\n if (setting.default === undefined) {\n context.report({\n message: `Default pagination size should be defined in the section settings.`,\n startIndex: pageSizeVariableLookup.position.start,\n endIndex: pageSizeVariableLookup.position.end,\n });\n return;\n }\n checkPageSize(pageSizeVariableLookup, setting.default, `This setting's default value should be between ${minSize} and ${maxSize} but is currently ${setting.default}.`);\n });\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParserBlockingScript = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../utils\");\nconst utils_2 = require(\"../utils\");\nconst suggestions_1 = require(\"./suggestions\");\nexports.ParserBlockingScript = {\n meta: {\n code: 'ParserBlockingScript',\n aliases: ['ParserBlockingScriptTag'],\n name: 'Avoid parser blocking scripts',\n docs: {\n description: 'They are bad ok?',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/parser-blocking-javascript',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n // {{ 'asset' | asset_url | script_tag }}\n LiquidFilter: async (node, ancestors) => {\n if (node.name !== 'script_tag')\n return;\n const filterString = node.source.slice(node.position.start, node.position.end);\n const offset = filterString.indexOf('script_tag');\n const parentNode = (0, utils_1.last)(ancestors);\n const grandParentNode = (0, utils_1.last)(ancestors, -1);\n context.report({\n message: 'The script_tag filter is parser-blocking. Use a <script> tag with async or defer for better performance',\n startIndex: node.position.start + offset,\n endIndex: node.position.end,\n suggest: grandParentNode &&\n grandParentNode.type === liquid_html_parser_1.NodeTypes.LiquidVariableOutput &&\n parentNode &&\n parentNode.type === liquid_html_parser_1.NodeTypes.LiquidVariable &&\n (0, utils_1.last)(parentNode.filters) === node\n ? [\n (0, suggestions_1.liquidFilterSuggestion)('defer', node, parentNode, grandParentNode),\n (0, suggestions_1.liquidFilterSuggestion)('async', node, parentNode, grandParentNode),\n ]\n : undefined,\n });\n },\n // <script src=\"...\">\n HtmlRawNode: async (node) => {\n if (node.name !== 'script') {\n return;\n }\n const hasSrc = node.attributes\n .filter(utils_2.isValuedHtmlAttribute)\n .some((attr) => (0, utils_2.isAttr)(attr, 'src'));\n if (!hasSrc) {\n return;\n }\n const hasDeferOrAsync = node.attributes\n .filter(utils_2.isHtmlAttribute)\n .some((attr) => (0, utils_2.isAttr)(attr, 'async') || (0, utils_2.isAttr)(attr, 'defer'));\n const isTypeModule = node.attributes\n .filter(utils_2.isValuedHtmlAttribute)\n .some((attr) => (0, utils_2.isAttr)(attr, 'type') &&\n ((0, utils_2.hasAttributeValueOf)(attr, 'module') || (0, utils_2.hasAttributeValueOf)(attr, 'importmap')));\n if (hasDeferOrAsync || isTypeModule) {\n return;\n }\n context.report({\n message: 'Avoid parser blocking scripts by adding `defer` or `async` on this tag',\n startIndex: node.position.start,\n endIndex: node.position.end,\n suggest: [(0, suggestions_1.scriptTagSuggestion)('defer', node), (0, suggestions_1.scriptTagSuggestion)('async', node)],\n });\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.scriptTagSuggestion = exports.liquidFilterSuggestion = void 0;\nconst utils_1 = require(\"../../utils\");\nconst suggestionMessage = (attr) => `Use an HTML script tag with the ${attr} attribute instead`;\nconst liquidFilterSuggestion = (attr, node, parentNode, grandParentNode) => ({\n message: suggestionMessage(attr),\n fix(corrector) {\n var _a, _b;\n const expression = node.source.slice(parentNode.expression.position.start, (_b = (_a = (0, utils_1.last)(parentNode.filters, -1)) === null || _a === void 0 ? void 0 : _a.position.end) !== null && _b !== void 0 ? _b : node.position.start);\n const url = `{{ ${expression} }}`;\n corrector.replace(grandParentNode.position.start, grandParentNode.position.end, `<script src=\"${url}\" ${attr}></script>`);\n },\n});\nexports.liquidFilterSuggestion = liquidFilterSuggestion;\nconst scriptTagSuggestion = (attr, node) => ({\n message: suggestionMessage(attr),\n fix(corrector) {\n corrector.insert(node.blockStartPosition.end - 1, ` ${attr}`);\n },\n});\nexports.scriptTagSuggestion = scriptTagSuggestion;\n//# sourceMappingURL=suggestions.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RemoteAsset = void 0;\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../utils\");\nconst utils_2 = require(\"../../utils\");\nconst RESOURCE_TAGS = ['img', 'link', 'source', 'script'];\nconst SHOPIFY_CDN_DOMAINS = ['fonts.shopifycdn.com', 'cdn.shopify.com'];\nconst TAGNAMES = ['stylesheet_tag', 'script_tag', 'image_tag', 'img_tag'];\nconst DEPRECATED = ['product_img_url', 'article_img_url', 'collection_img_url', 'img_url'];\nconst NON_DEPRECATED = [\n 'asset_url',\n 'image_url',\n 'asset_img_url',\n 'file_img_url',\n 'file_url',\n 'global_asset_url',\n 'shopify_asset_url',\n 'external_video_url',\n 'font_url',\n];\nconst LIQUID_OBJECT = 'canonical_url';\nfunction isLiquidVariableOutput(node) {\n return node.type === types_1.LiquidHtmlNodeTypes.LiquidVariableOutput;\n}\nfunction isLiquidVariable(node) {\n return typeof node !== 'string' && node.type === types_1.LiquidHtmlNodeTypes.LiquidVariable;\n}\nfunction isUrlHostedbyShopify(url, allowedDomains = []) {\n if (/^\\/cdn\\//.test(url)) {\n return true;\n }\n try {\n const urlObj = new URL(url);\n return [...SHOPIFY_CDN_DOMAINS, ...allowedDomains].includes(urlObj.hostname);\n }\n catch (_error) {\n // Return false for any invalid URLs (missing protocol, malformed URLs, invalid characters etc.)\n // Since we're validating if URLs are Shopify-hosted, any invalid URL should return false\n return false;\n }\n}\nfunction valueIsDefinitelyNotShopifyHosted(attr, allowedDomains = []) {\n return attr.value.some((node) => {\n if (node.type === types_1.LiquidHtmlNodeTypes.TextNode && /^(https?:)?\\/\\//.test(node.value)) {\n if (!isUrlHostedbyShopify(node.value, allowedDomains)) {\n return true;\n }\n }\n if (isLiquidVariableOutput(node)) {\n const variable = node.markup;\n if (isLiquidVariable(variable)) {\n const expression = variable.expression;\n if (expression.type === types_1.LiquidHtmlNodeTypes.String && /^https?:\\/\\//.test(expression.value)) {\n if (!isUrlHostedbyShopify(expression.value, allowedDomains)) {\n return true;\n }\n }\n }\n }\n return false;\n });\n}\nfunction valueIsShopifyHosted(attr) {\n const ASSET_URL_FILTER_NAMES = [...DEPRECATED, ...NON_DEPRECATED];\n const ASSET_URL_OBJECT_NAMES = [LIQUID_OBJECT];\n return attr.value.some((node) => {\n if (!isLiquidVariableOutput(node))\n return false;\n if (!isLiquidVariable(node.markup))\n return false;\n const includesFilter = node.markup.filters.some((filter) => ASSET_URL_FILTER_NAMES.includes(filter.name));\n if (includesFilter)\n return true;\n if ((0, utils_1.isNodeOfType)(types_1.LiquidHtmlNodeTypes.VariableLookup, node.markup.expression)) {\n if (node.markup.expression.name\n ? ASSET_URL_OBJECT_NAMES.includes(node.markup.expression.name)\n : false)\n return true;\n }\n return false;\n });\n}\n// Takes a list of allowed domains, and normalises them into an expected domain: www.domain.com -> domain.com for equality checks.\nfunction normaliseAllowedDomains(allowedDomains) {\n return allowedDomains\n .map((domain) => {\n try {\n const url = new URL(domain);\n // Hostname can still return www. from https://www.domain.com we want it to be https://www.domain.com -> domain.com\n return url.hostname.replace(/^www\\./, '');\n }\n catch (_error) {\n // we shouldn't return the malformed domain - should be strict and stick to web standards (new URL validation).\n return undefined;\n }\n })\n .filter((domain) => domain !== undefined);\n}\nconst schema = {\n allowedDomains: types_1.SchemaProp.array(types_1.SchemaProp.string()).optional(),\n};\nexports.RemoteAsset = {\n meta: {\n code: 'RemoteAsset',\n aliases: ['AssetUrlFilters'],\n name: 'Remote Asset',\n docs: {\n description: 'This check is aimed at eliminating unnecessary HTTP connections.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/remote-asset',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema,\n targets: [],\n },\n create(context) {\n const allowedDomains = normaliseAllowedDomains(context.settings.allowedDomains || []);\n function checkHtmlNode(node) {\n if (!RESOURCE_TAGS.includes(node.name))\n return;\n const urlAttribute = node.attributes\n .filter(utils_1.isValuedHtmlAttribute)\n .find((attr) => (0, utils_1.isAttr)(attr, 'src') || (0, utils_1.isAttr)(attr, 'href'));\n if (!urlAttribute)\n return;\n const isShopifyUrl = urlAttribute.value\n .filter((node) => node.type === types_1.LiquidHtmlNodeTypes.TextNode)\n .some((textNode) => isUrlHostedbyShopify(textNode.value, allowedDomains));\n if (isShopifyUrl)\n return;\n const hasDefinitelyARemoteAssetUrl = valueIsDefinitelyNotShopifyHosted(urlAttribute, allowedDomains);\n if (hasDefinitelyARemoteAssetUrl) {\n context.report({\n message: 'Asset should be served by the Shopify CDN for better performance.',\n startIndex: urlAttribute.position.start,\n endIndex: urlAttribute.position.end,\n });\n return;\n }\n const hasShopifyHostedValue = valueIsShopifyHosted(urlAttribute);\n if (hasShopifyHostedValue)\n return;\n context.report({\n message: 'Use one of the asset_url filters to serve assets for better performance.',\n startIndex: urlAttribute.position.start,\n endIndex: urlAttribute.position.end,\n });\n }\n function checkLiquidFilter(node, ancestors) {\n const tagName = node.name;\n if (!TAGNAMES.includes(tagName))\n return;\n const parentNode = (0, utils_2.last)(ancestors);\n if (!parentNode || !(0, utils_1.isNodeOfType)(types_1.LiquidHtmlNodeTypes.LiquidVariable, parentNode))\n return;\n const hasAsset = parentNode.filters.some((filter) => DEPRECATED.includes(filter.name) || NON_DEPRECATED.includes(filter.name));\n if (hasAsset)\n return;\n const urlNode = parentNode.expression;\n if (urlNode.type === types_1.LiquidHtmlNodeTypes.String &&\n !isUrlHostedbyShopify(urlNode.value, allowedDomains)) {\n context.report({\n message: 'Asset should be served by the Shopify CDN for better performance.',\n startIndex: urlNode.position.start,\n endIndex: urlNode.position.end,\n });\n }\n context.report({\n message: `Use one of the asset_url filters to serve assets for better performance.`,\n startIndex: parentNode.expression.position.start,\n endIndex: node.position.end,\n });\n }\n return {\n async HtmlVoidElement(node) {\n checkHtmlNode(node);\n },\n async HtmlRawNode(node) {\n checkHtmlNode(node);\n },\n async LiquidFilter(node, ancestors) {\n checkLiquidFilter(node, ancestors);\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RequiredLayoutThemeObject = void 0;\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../utils\");\nexports.RequiredLayoutThemeObject = {\n meta: {\n code: 'RequiredLayoutThemeObject',\n name: 'Prevent missing required objects in theme.liquid',\n docs: {\n description: 'This check prevents missing {{ content_for_header }} and {{ content_for_layout }} objects in layout/theme.liquid.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/required-layout-theme-object',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [types_1.ConfigTarget.All, types_1.ConfigTarget.Recommended],\n },\n create(context) {\n if (context.toRelativePath(context.file.uri) !== 'layout/theme.liquid') {\n return {};\n }\n const requiredObjects = ['content_for_header', 'content_for_layout'];\n const foundObjects = new Set();\n let headTag;\n let bodyTag;\n function checkVariableUsage(node) {\n if (node.name && requiredObjects.includes(node.name)) {\n foundObjects.add(node.name);\n }\n }\n return {\n async VariableLookup(node) {\n checkVariableUsage(node);\n },\n async HtmlElement(node) {\n if ((0, utils_1.isHtmlTag)(node, 'head')) {\n headTag = node;\n }\n else if ((0, utils_1.isHtmlTag)(node, 'body')) {\n bodyTag = node;\n }\n },\n async onCodePathEnd() {\n var _a, _b;\n for (const requiredObject of requiredObjects) {\n if (!foundObjects.has(requiredObject)) {\n const message = `The required object '{{ ${requiredObject} }}' is missing in layout/theme.liquid`;\n const insertionNode = requiredObject === 'content_for_header' ? headTag : bodyTag;\n const fixInsertPosition = insertionNode === null || insertionNode === void 0 ? void 0 : insertionNode.blockEndPosition.start;\n context.report({\n message,\n startIndex: (_a = insertionNode === null || insertionNode === void 0 ? void 0 : insertionNode.position.start) !== null && _a !== void 0 ? _a : 0,\n endIndex: (_b = insertionNode === null || insertionNode === void 0 ? void 0 : insertionNode.position.end) !== null && _b !== void 0 ? _b : 0,\n fix: fixInsertPosition !== undefined\n ? (corrector) => corrector.insert(fixInsertPosition, `{{ ${requiredObject} }}`)\n : undefined,\n });\n }\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReservedDocParamNames = void 0;\nconst types_1 = require(\"../../types\");\nconst to_schema_1 = require(\"../../to-schema\");\nconst content_for_1 = require(\"../../tags/content-for\");\nexports.ReservedDocParamNames = {\n meta: {\n code: 'ReservedDocParamNames',\n name: 'Valid doc parameter names',\n docs: {\n description: 'This check exists to ensure any parameter names defined in LiquidDoc do not collide with reserved words.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/reserved-doc-param-names',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n if (!(0, to_schema_1.isBlock)(context.file.uri)) {\n return {};\n }\n const defaultParameterNames = [\n ...content_for_1.REQUIRED_CONTENT_FOR_ARGUMENTS,\n ...content_for_1.RESERVED_CONTENT_FOR_ARGUMENTS,\n ];\n return {\n async LiquidDocParamNode(node) {\n const paramName = node.paramName.value;\n if (defaultParameterNames.includes(paramName)) {\n reportWarning(context, `The parameter name is not supported because it's a reserved argument for 'content_for' tags.`, node.paramName);\n }\n },\n };\n },\n};\nfunction reportWarning(context, message, node) {\n context.report({\n message,\n startIndex: node.position.start,\n endIndex: node.position.end,\n });\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SchemaPresetsBlockOrder = void 0;\nconst json_1 = require(\"../../json\");\nconst to_schema_1 = require(\"../../to-schema\");\nconst types_1 = require(\"../../types\");\nexports.SchemaPresetsBlockOrder = {\n meta: {\n code: 'SchemaPresetsBlockOrder',\n name: 'Gives recommendations and validations for block_order',\n docs: {\n description: 'Gives recommendations and validations for block_order for preset blocks as a hash.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/schema-presets-block-order',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async LiquidRawTag(node) {\n if (node.name !== 'schema' || node.body.kind !== 'json') {\n return;\n }\n const offset = node.blockStartPosition.end;\n const schema = await (0, to_schema_1.getSchema)(context);\n const { validSchema, ast } = schema !== null && schema !== void 0 ? schema : {};\n if (!validSchema || validSchema instanceof Error)\n return;\n if (!ast || ast instanceof Error)\n return;\n const presets = validSchema.presets;\n if (!presets)\n return;\n presets.forEach((preset, index) => {\n if ('blocks' in preset && preset.blocks) {\n checkBlockOrder(preset, context, offset, ast, ['presets', String(index)]);\n }\n });\n },\n };\n },\n};\nfunction checkBlockOrder(node, context, offset, ast, ast_path) {\n if ('blocks' in node && typeof node.blocks == 'object' && node.blocks) {\n const blockOrder = 'block_order' in node ? node.block_order : undefined;\n // check 1: is block_order missing?\n if (!blockOrder) {\n if (shouldHaveBlockOrder(node)) {\n reportWarning(context, offset, ast, ast_path, `block_order is missing`, false);\n }\n }\n // check 2: are items in block_order present in blocks?\n blockOrder === null || blockOrder === void 0 ? void 0 : blockOrder.forEach((block_id, index) => {\n if (!node.blocks || (!Array.isArray(node.blocks) && !node.blocks[block_id])) {\n const warning_ast_path = ast_path.concat(['block_order']).concat([String(index)]);\n reportWarning(context, offset, ast, warning_ast_path, `block '${block_id}' is missing from 'blocks'`);\n }\n });\n // check 3: are items in blocks correctly in block_order?\n for (const [block_id, block] of Object.entries(node.blocks)) {\n if (block.static) {\n // if static block is in the block_order, that's an error\n if (Array.isArray(blockOrder) && blockOrder.includes(block_id)) {\n const warning_ast_path = ast_path.concat(['block_order']);\n reportWarning(context, offset, ast, warning_ast_path, `static block '${block_id}' cannot be in the block_order`);\n }\n }\n else {\n // if non-static block is not in the block_order, that's a potential mistake\n if (Array.isArray(blockOrder) && !blockOrder.includes(block_id)) {\n const warning_ast_path = ast_path.concat(['block_order']);\n reportWarning(context, offset, ast, warning_ast_path, `block '${block_id}' is missing from the block_order`);\n }\n }\n //recursive check for nested blocks\n if (block.blocks) {\n ast_path.push('blocks', block_id); // so we'll get ['presets', 0, 'blocks', 'my_block1'] for example to do nodeAtPath(schema.ast, ast_path)\n checkBlockOrder(block, context, offset, ast, ast_path);\n }\n }\n }\n}\nfunction shouldHaveBlockOrder(node) {\n if ('blocks' in node &&\n typeof node.blocks === 'object' &&\n node.blocks !== null &&\n !Array.isArray(node.blocks)) {\n return Object.entries(node.blocks).some(([_blockId, block]) => {\n // If static is undefined or false, it's considered non-static\n return block.static !== true;\n });\n }\n return false;\n}\nfunction reportWarning(context, offset, ast, ast_path, message, fullHighlight = true) {\n const node = (0, json_1.nodeAtPath)(ast, ast_path);\n const startIndex = fullHighlight ? offset + (0, json_1.getLocStart)(node) : offset + (0, json_1.getLocEnd)(node) - 1; // start to finish of the node or last char of the node\n const endIndex = offset + (0, json_1.getLocEnd)(node);\n context.report({\n message: message,\n startIndex,\n endIndex,\n });\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SchemaPresetsStaticBlocks = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst json_1 = require(\"../../json\");\nconst to_schema_1 = require(\"../../to-schema\");\nconst types_1 = require(\"../../types\");\nconst markup_1 = require(\"../../utils/markup\");\nexports.SchemaPresetsStaticBlocks = {\n meta: {\n code: 'SchemaPresetsStaticBlocks',\n name: 'Ensure the preset static blocks are used in the liquid',\n docs: {\n description: 'Warns if a preset static block does not have a corresponding content_for \"block\" tag.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/schema-presets-static-blocks',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n let contentForBlockList = [];\n let staticBlockList = [];\n let offset = 0;\n function checkStaticBlocks() {\n staticBlockList.forEach((block) => {\n if (!contentForBlockList.some((contentBlock) => contentBlock.id === block.id && contentBlock.type === block.type)) {\n context.report({\n message: `Static block ${block.id} is missing a corresponding content_for \"block\" tag.`,\n startIndex: block.startIndex,\n endIndex: block.endIndex,\n });\n }\n });\n }\n return {\n async LiquidTag(node) {\n var _a, _b;\n // Early return if not a content_for block tag\n if (node.name !== liquid_html_parser_1.NamedTags.content_for || !(0, markup_1.isContentForBlock)(node.markup))\n return;\n // Extract id and type from markup args\n const idValue = (_a = node.markup.args.find((arg) => arg.name === 'id')) === null || _a === void 0 ? void 0 : _a.value;\n const typeArg = (_b = node.markup.args.find((arg) => arg.name === 'type')) === null || _b === void 0 ? void 0 : _b.value;\n if (!typeArg || typeArg.type !== liquid_html_parser_1.NodeTypes.String) {\n return; // covered by VariableContentForArguments\n }\n const typeValue = typeArg.value;\n // Add to list if valid string id\n if ((idValue === null || idValue === void 0 ? void 0 : idValue.type) === liquid_html_parser_1.NodeTypes.String) {\n contentForBlockList.push({ id: idValue.value, type: typeValue });\n }\n },\n async LiquidRawTag(node) {\n // when we get the schema tag, get the list of static blocks from each preset\n if (node.name === 'schema' && node.body.kind === 'json') {\n offset = node.blockStartPosition.end;\n const schema = await (0, to_schema_1.getSchema)(context);\n const { validSchema, ast } = schema !== null && schema !== void 0 ? schema : {};\n if (!validSchema || validSchema instanceof Error)\n return;\n if (!ast || ast instanceof Error)\n return;\n const presets = validSchema.presets;\n if (!presets)\n return;\n presets.forEach((preset, index) => {\n if ('blocks' in preset && preset.blocks) {\n let ast_path = ['presets', index, 'blocks'];\n // blocks as an array\n if (Array.isArray(preset.blocks)) {\n preset.blocks.forEach((block, block_index) => {\n if (block.static === true && block.id) {\n let node = (0, json_1.nodeAtPath)(ast, ast_path.concat([block_index]));\n staticBlockList.push({\n id: block.id,\n type: block.type,\n startIndex: offset + (0, json_1.getLocStart)(node),\n endIndex: offset + (0, json_1.getLocEnd)(node),\n });\n }\n });\n }\n // blocks as an object\n else if (typeof preset.blocks === 'object') {\n Object.entries(preset.blocks).forEach(([block_id, block]) => {\n if (block.static === true) {\n let node = (0, json_1.nodeAtPath)(ast, ast_path.concat(block_id));\n staticBlockList.push({\n id: block_id,\n type: block.type,\n startIndex: offset + (0, json_1.getLocStart)(node),\n endIndex: offset + (0, json_1.getLocEnd)(node),\n });\n }\n });\n }\n }\n });\n }\n },\n async onCodePathEnd() {\n checkStaticBlocks();\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StaticStylesheetAndJavascriptTags = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nexports.StaticStylesheetAndJavascriptTags = {\n meta: {\n code: 'StaticStylesheetAndJavascriptTags',\n name: 'Reports non static stylesheet and javascript tags',\n docs: {\n description: 'Reports the usage of Liquid within {% stylesheet %} and {% javascript %} tags, which should only contain static content.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/static-stylesheet-and-javascript-tags',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async LiquidRawTag(node) {\n if (node.name !== 'stylesheet' && node.name !== 'javascript') {\n return;\n }\n const liquidNodes = node.body.nodes.filter((childNode) => childNode.type === liquid_html_parser_1.NodeTypes.LiquidVariableOutput ||\n childNode.type === liquid_html_parser_1.NodeTypes.LiquidTag ||\n childNode.type === liquid_html_parser_1.NodeTypes.LiquidRawTag);\n for (const liquidNode of liquidNodes) {\n const tagType = node.name === 'stylesheet' ? 'CSS' : 'JavaScript';\n const liquidType = liquidNode.type === liquid_html_parser_1.NodeTypes.LiquidVariableOutput ? 'variable' : 'tag';\n context.report({\n message: `Liquid ${liquidType} found in ${tagType} block. {% ${node.name} %} tags should only contain static ${tagType} code.`,\n startIndex: liquidNode.position.start,\n endIndex: liquidNode.position.end,\n });\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TranslationKeyExists = void 0;\nconst json_1 = require(\"../../json\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../utils\");\nfunction keyExists(key, pointer) {\n for (const token of key.split('.')) {\n if (typeof pointer !== 'object') {\n return false;\n }\n if (!pointer.hasOwnProperty(token)) {\n return false;\n }\n pointer = pointer[token];\n }\n return true;\n}\nexports.TranslationKeyExists = {\n meta: {\n code: 'TranslationKeyExists',\n name: 'Reports missing translation keys',\n docs: {\n description: 'Reports missing translation keys',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/translation-key-exists',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n const nodes = [];\n let schemaLocales;\n return {\n async LiquidVariable(node) {\n if (node.expression.type !== 'String') {\n return;\n }\n if (!node.filters.some(({ name }) => ['t', 'translate'].includes(name))) {\n return;\n }\n nodes.push({\n translationKey: node.expression.value,\n startIndex: node.expression.position.start,\n endIndex: node.expression.position.end,\n });\n },\n async LiquidRawTag(node) {\n var _a;\n if (node.name !== 'schema' || node.body.kind !== 'json') {\n return;\n }\n const defaultLocale = await context.getDefaultLocale();\n const schema = (0, json_1.parseJSON)(node.body.value);\n if ((0, utils_1.isError)(schema) && schema instanceof SyntaxError)\n return;\n schemaLocales = (_a = schema.locales) === null || _a === void 0 ? void 0 : _a[defaultLocale];\n },\n async onCodePathEnd() {\n var _a;\n const defaultTranslations = await context.getDefaultTranslations();\n const defaultLocale = await context.getDefaultLocale();\n const systemTranslations = await ((_a = context.themeDocset) === null || _a === void 0 ? void 0 : _a.systemTranslations());\n const systemTranslationsKeys = Object.keys(systemTranslations !== null && systemTranslations !== void 0 ? systemTranslations : {});\n if (!defaultTranslations && systemTranslationsKeys.length === 0)\n return;\n nodes.forEach(({ translationKey, startIndex, endIndex }) => {\n if (keyExists(translationKey, defaultTranslations) ||\n keyExists(translationKey, schemaLocales) ||\n systemTranslationsKeys.includes(translationKey)) {\n return;\n }\n let message = `'${translationKey}' does not have a matching entry in 'locales/${defaultLocale}.default.json'`;\n if (schemaLocales) {\n message += ` or '${context.toRelativePath(context.file.uri)}'`;\n }\n context.report({\n message,\n startIndex,\n endIndex,\n });\n });\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UnclosedHTMLElement = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../utils\");\nconst utils_2 = require(\"../utils\");\nexports.UnclosedHTMLElement = {\n meta: {\n code: 'UnclosedHTMLElement',\n aliases: ['UnclosedHTMLElement'],\n name: 'Unclosed HTML Element',\n docs: {\n description: 'Warns you of unbalanced HTML tags in branching code',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unclosed-html-element',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n /**\n * Algorithm explanation:\n *\n * When we have unclosed nodes, we have something a bit like this:\n *\n * <grandparent>\n * {% if condition %}\n * <unclosed1>\n * {% else %}\n * <unclosed2>\n * {% endif %}\n *\n * {% if condition %}\n * </unclosed1>\n * {% else %}\n * </unclosed2>\n * {% endif %}\n * </grandparent>\n *\n * When things are proper, we can see the following:\n * - unclosed nodes must have the same parent condition,\n * - unclosed nodes must have the same grandparent node.\n *\n * So what we can do is create stacks of unclosed nodes grouped by\n * - parent condition, and\n * - grandparent node.\n *\n * Thus we have\n * - the stackByGrandparent Map which is the index by grandparent node\n * - the Stacks object which is a by-condition-identifier index of open/close nodes\n *\n * When we're done with the file, we verify that the stacks push and\n * pop to the empty stack. When it isn't, then we have a problem to\n * report.\n */\n const stacksByGrandparent = new Map();\n return {\n async HtmlElement(node, ancestors) {\n if (isClosed(node))\n return;\n const [branch, index] = (0, utils_1.findLastAndIndex)(ancestors, utils_2.isLiquidBranch);\n if (!branch)\n return;\n const parent = ancestors[index - 1];\n const grandparent = ancestors[index - 2];\n if (!parent || !grandparent || parent.type !== liquid_html_parser_1.NodeTypes.LiquidTag)\n return;\n if (!stacksByGrandparent.has(grandparent)) {\n stacksByGrandparent.set(grandparent, {\n open: new Map(),\n close: new Map(),\n identifiers: new Set(),\n });\n }\n const stacks = stacksByGrandparent.get(grandparent);\n const identifier = getConditionIdentifier(branch, parent);\n stacks.identifiers.add(identifier);\n if (!stacks.open.has(identifier))\n stacks.open.set(identifier, []);\n stacks.open.get(identifier).push(node);\n },\n async HtmlDanglingMarkerClose(node, ancestors) {\n const [branch, index] = (0, utils_1.findLastAndIndex)(ancestors, utils_2.isLiquidBranch);\n if (!branch)\n return;\n const parent = ancestors[index - 1];\n const grandparent = ancestors[index - 2];\n if (!parent || !grandparent || parent.type !== liquid_html_parser_1.NodeTypes.LiquidTag)\n return;\n if (!stacksByGrandparent.has(grandparent)) {\n stacksByGrandparent.set(grandparent, {\n open: new Map(),\n close: new Map(),\n identifiers: new Set(),\n });\n }\n const stacks = stacksByGrandparent.get(grandparent);\n const identifier = getConditionIdentifier(branch, parent);\n stacks.identifiers.add(identifier);\n if (!stacks.close.has(identifier))\n stacks.close.set(identifier, []);\n stacks.close.get(identifier).push(node);\n },\n async onCodePathEnd() {\n var _a, _b;\n for (const [grandparent, stacks] of stacksByGrandparent) {\n for (const identifier of stacks.identifiers) {\n const openNodes = (_a = stacks.open.get(identifier)) !== null && _a !== void 0 ? _a : [];\n const closeNodes = (_b = stacks.close.get(identifier)) !== null && _b !== void 0 ? _b : [];\n // We sort them in the order they are found in the file because we\n // otherwise don't have an order guarantee with everything running\n // async.\n const nodes = []\n .concat(openNodes, closeNodes)\n .sort((a, b) => a.position.start - b.position.start);\n // If everything is balanced,\n // Then we're going to push on open and pop when the close match.\n // If a close doesn't match,\n // Then we'll push it onto the stack and everything after won't match.\n const stack = [];\n for (const node of nodes) {\n if (node.type === liquid_html_parser_1.NodeTypes.HtmlElement) {\n stack.push(node);\n }\n else if (stack.length > 0 &&\n getName(node) === getName(stack.at(-1)) &&\n stack.at(-1).type === liquid_html_parser_1.NodeTypes.HtmlElement &&\n node.type === liquid_html_parser_1.NodeTypes.HtmlDanglingMarkerClose) {\n stack.pop();\n }\n else {\n stack.push(node);\n }\n }\n // At the end, whatever is left in the stack is a reported offense.\n for (const node of stack) {\n if (node.type === liquid_html_parser_1.NodeTypes.HtmlDanglingMarkerClose) {\n context.report({\n message: `Closing tag does not have a matching opening tag for condition \\`${identifier}\\` in ${grandparent.type} '${getName(grandparent)}'`,\n startIndex: node.position.start,\n endIndex: node.position.end,\n });\n }\n else {\n context.report({\n message: `Opening tag does not have a matching closing tag for condition \\`${identifier}\\` in ${grandparent.type} '${getName(grandparent)}'`,\n startIndex: node.blockStartPosition.start,\n endIndex: node.blockStartPosition.end,\n });\n }\n }\n }\n }\n },\n };\n },\n};\nfunction isClosed(node) {\n return node.blockEndPosition.start !== node.blockEndPosition.end;\n}\nfunction getConditionIdentifier(branch, parent) {\n if (branch.name === null) {\n switch (parent.name) {\n case liquid_html_parser_1.NamedTags.if:\n return getConditionIdentifierForMarkup(parent.markup);\n case liquid_html_parser_1.NamedTags.unless:\n return negateIdentifier(getConditionIdentifierForMarkup(parent.markup));\n default:\n return '??';\n }\n }\n switch (branch.name) {\n case 'else':\n switch (parent.name) {\n case liquid_html_parser_1.NamedTags.if:\n return negateIdentifier(getConditionIdentifierForMarkup(parent.markup));\n case liquid_html_parser_1.NamedTags.unless:\n return getConditionIdentifierForMarkup(parent.markup);\n case liquid_html_parser_1.NamedTags.case:\n return `case ${getConditionIdentifierForMarkup(parent.markup)}`;\n default:\n return '??';\n }\n case liquid_html_parser_1.NamedTags.elsif:\n return getConditionIdentifierForMarkup(branch.markup);\n case liquid_html_parser_1.NamedTags.when:\n if (parent.name !== liquid_html_parser_1.NamedTags.case)\n return '??';\n return `case ${getConditionIdentifierForMarkup(parent.markup)} == ${getConditionIdentifierForWhenMarkup(branch.markup)}`;\n default:\n return '??';\n }\n}\nfunction getConditionIdentifierForWhenMarkup(conditions) {\n if (typeof conditions === 'string')\n return conditions;\n return conditions.map(getConditionIdentifierForMarkup).join(' or ');\n}\nfunction getConditionIdentifierForMarkup(condition) {\n var _a;\n if (typeof condition === 'string')\n return condition;\n switch (condition.type) {\n case liquid_html_parser_1.NodeTypes.String:\n return `'` + condition.value + `'`;\n case liquid_html_parser_1.NodeTypes.LiquidLiteral:\n if (condition.value === null)\n return 'null';\n return condition.value.toString();\n case liquid_html_parser_1.NodeTypes.Number:\n return condition.value;\n case liquid_html_parser_1.NodeTypes.VariableLookup:\n return `${(_a = condition.name) !== null && _a !== void 0 ? _a : ''}${condition.lookups.map((expression) => `[${getConditionIdentifierForMarkup(expression)}]`)}`;\n case liquid_html_parser_1.NodeTypes.Range:\n return `(${getConditionIdentifierForMarkup(condition.start)}..${getConditionIdentifierForMarkup(condition.end)})`;\n case liquid_html_parser_1.NodeTypes.Comparison:\n return [\n getConditionIdentifierForMarkup(condition.left),\n condition.comparator,\n getConditionIdentifierForMarkup(condition.right),\n ].join(' ');\n case liquid_html_parser_1.NodeTypes.LogicalExpression:\n return [\n getConditionIdentifierForMarkup(condition.left),\n condition.relation,\n getConditionIdentifierForMarkup(condition.right),\n ].join(' ');\n default: {\n return (0, utils_1.assertNever)(condition);\n }\n }\n}\nfunction negateIdentifier(conditionIdentifier) {\n return conditionIdentifier.startsWith('-')\n ? conditionIdentifier.slice(1)\n : `-${conditionIdentifier}`;\n}\nfunction getName(node) {\n if (node.type === liquid_html_parser_1.NodeTypes.HtmlElement || node.type === liquid_html_parser_1.NodeTypes.HtmlDanglingMarkerClose) {\n if (node.name.length === 0)\n return '';\n return node.source.slice(node.name.at(0).position.start, node.name.at(-1).position.end);\n }\n else if (node.type === liquid_html_parser_1.NodeTypes.LiquidTag) {\n return node.name;\n }\n else {\n return node.type;\n }\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UndefinedObject = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../utils\");\nconst liquidDoc_1 = require(\"../../liquid-doc/liquidDoc\");\nconst utils_2 = require(\"../utils\");\nexports.UndefinedObject = {\n meta: {\n code: 'UndefinedObject',\n name: 'Undefined Object',\n docs: {\n description: 'This check exists to identify references to undefined Liquid objects.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/undefined-object',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n const relativePath = context.toRelativePath(context.file.uri);\n const ast = context.file.ast;\n if ((0, utils_1.isError)(ast))\n return {};\n /**\n * Skip this check when a snippet does not have the presence of doc tags.\n */\n if (relativePath.startsWith('snippets/') && !(0, liquidDoc_1.hasLiquidDoc)(ast))\n return {};\n /**\n * Skip this check when definitions for global objects are unavailable.\n */\n if (!context.themeDocset) {\n return {};\n }\n const themeDocset = context.themeDocset;\n const scopedVariables = new Map();\n const fileScopedVariables = new Set();\n const variables = [];\n function indexVariableScope(variableName, scope) {\n var _a;\n if (!variableName)\n return;\n const indexedScope = (_a = scopedVariables.get(variableName)) !== null && _a !== void 0 ? _a : [];\n scopedVariables.set(variableName, indexedScope.concat(scope));\n }\n return {\n async LiquidDocParamNode(node) {\n var _a;\n const paramName = (_a = node.paramName) === null || _a === void 0 ? void 0 : _a.value;\n if (paramName) {\n fileScopedVariables.add(paramName);\n }\n },\n async LiquidTag(node, ancestors) {\n var _a, _b, _c, _d;\n if ((0, utils_2.isWithinRawTagThatDoesNotParseItsContents)(ancestors))\n return;\n if (isLiquidTagAssign(node)) {\n indexVariableScope(node.markup.name, {\n start: node.blockStartPosition.end,\n });\n }\n if (isLiquidTagCapture(node)) {\n indexVariableScope(node.markup.name, {\n start: (_a = node.blockEndPosition) === null || _a === void 0 ? void 0 : _a.end,\n });\n }\n /**\n * {% form 'cart', cart %}\n * {{ form }}\n * {% endform %}\n */\n if (['form', 'paginate'].includes(node.name)) {\n indexVariableScope(node.name, {\n start: node.blockStartPosition.end,\n end: (_b = node.blockEndPosition) === null || _b === void 0 ? void 0 : _b.start,\n });\n }\n /* {% layout none %} */\n if (node.name === 'layout') {\n indexVariableScope('none', {\n start: node.position.start,\n end: node.position.end,\n });\n }\n /* {% increment var %} */\n if ((isLiquidTagIncrement(node) || isLiquidTagDecrement(node)) &&\n node.markup.name !== null) {\n indexVariableScope(node.markup.name, {\n start: node.position.start,\n });\n }\n /**\n * {% for x in y %}\n * {{ forloop }}\n * {{ x }}\n * {% endfor %}\n */\n if (isLiquidForTag(node) || isLiquidTableRowTag(node)) {\n indexVariableScope(node.markup.variableName, {\n start: node.blockStartPosition.end,\n end: (_c = node.blockEndPosition) === null || _c === void 0 ? void 0 : _c.start,\n });\n indexVariableScope(node.name === 'for' ? 'forloop' : 'tablerowloop', {\n start: node.blockStartPosition.end,\n end: (_d = node.blockEndPosition) === null || _d === void 0 ? void 0 : _d.start,\n });\n }\n },\n async VariableLookup(node, ancestors) {\n if ((0, utils_2.isWithinRawTagThatDoesNotParseItsContents)(ancestors))\n return;\n const parent = (0, utils_1.last)(ancestors);\n if (isLiquidTag(parent) && isLiquidTagCapture(parent))\n return;\n variables.push(node);\n },\n async onCodePathEnd() {\n const objects = await globalObjects(themeDocset, relativePath);\n objects.forEach((obj) => fileScopedVariables.add(obj.name));\n variables.forEach((variable) => {\n if (!variable.name)\n return;\n const isVariableDefined = isDefined(variable.name, variable.position, fileScopedVariables, scopedVariables);\n if (isVariableDefined)\n return;\n context.report({\n message: `Unknown object '${variable.name}' used.`,\n startIndex: variable.position.start,\n endIndex: variable.position.end,\n });\n });\n },\n };\n },\n};\nasync function globalObjects(themeDocset, relativePath) {\n const objects = await themeDocset.objects();\n const contextualObjects = getContextualObjects(relativePath);\n const globalObjects = objects.filter(({ access, name }) => {\n return (contextualObjects.includes(name) ||\n !access ||\n access.global === true ||\n access.template.length > 0);\n });\n return globalObjects;\n}\nfunction getContextualObjects(relativePath) {\n if (relativePath.startsWith('layout/checkout.liquid')) {\n return [\n 'locale',\n 'direction',\n 'skip_to_content_link',\n 'checkout_html_classes',\n 'checkout_stylesheets',\n 'checkout_scripts',\n 'content_for_logo',\n 'breadcrumb',\n 'order_summary_toggle',\n 'content_for_order_summary',\n 'alternative_payment_methods',\n 'content_for_footer',\n 'tracking_code',\n ];\n }\n if (relativePath.startsWith('sections/')) {\n return ['section', 'predictive_search', 'recommendations', 'comment'];\n }\n if (relativePath.startsWith('blocks/')) {\n return ['app', 'section', 'recommendations', 'block'];\n }\n if (relativePath.startsWith('snippets/')) {\n return ['app'];\n }\n return [];\n}\nfunction isDefined(variableName, variablePosition, fileScopedVariables, scopedVariables) {\n /**\n * Check if the variable is defined in the file\n */\n if (fileScopedVariables.has(variableName)) {\n return true;\n }\n /**\n * Check if the variable is defined within a specific scope\n */\n const scopes = scopedVariables.get(variableName);\n /**\n * If no specific scopes exist (and it wasn't defined in the file), it's undefined\n */\n if (!scopes) {\n return false;\n }\n /**\n * Check if the variable's usage position falls within any of the defined scopes\n */\n return scopes.some((scope) => isDefinedInScope(variablePosition, scope));\n}\nfunction isDefinedInScope(variablePosition, scope) {\n const start = variablePosition.start;\n const isVariableAfterScopeStart = !scope.start || start > scope.start;\n const isVariableBeforeScopeEnd = !scope.end || start < scope.end;\n return isVariableAfterScopeStart && isVariableBeforeScopeEnd;\n}\nfunction isLiquidTag(node) {\n return (node === null || node === void 0 ? void 0 : node.type) === liquid_html_parser_1.NodeTypes.LiquidTag;\n}\nfunction isLiquidTagCapture(node) {\n return node.name === liquid_html_parser_1.NamedTags.capture;\n}\nfunction isLiquidTagAssign(node) {\n return node.name === liquid_html_parser_1.NamedTags.assign && typeof node.markup !== 'string';\n}\nfunction isLiquidForTag(node) {\n return node.name === liquid_html_parser_1.NamedTags.for && typeof node.markup !== 'string';\n}\nfunction isLiquidTableRowTag(node) {\n return node.name === liquid_html_parser_1.NamedTags.tablerow && typeof node.markup !== 'string';\n}\nfunction isLiquidTagIncrement(node) {\n return node.name === liquid_html_parser_1.NamedTags.increment && typeof node.markup !== 'string';\n}\nfunction isLiquidTagDecrement(node) {\n return node.name === liquid_html_parser_1.NamedTags.decrement && typeof node.markup !== 'string';\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UniqueDocParamNames = void 0;\nconst types_1 = require(\"../../types\");\nexports.UniqueDocParamNames = {\n meta: {\n code: 'UniqueDocParamNames',\n name: 'Unique doc parameter names',\n docs: {\n description: 'This check exists to ensure any parameter names defined in the `doc` tag are unique.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unique-doc-param-names',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n const definedLiquidDocParamNames = new Set();\n return {\n async LiquidDocParamNode(node) {\n const paramName = node.paramName.value;\n if (!definedLiquidDocParamNames.has(paramName)) {\n definedLiquidDocParamNames.add(paramName);\n return;\n }\n context.report({\n message: `The parameter '${paramName}' is defined more than once.`,\n startIndex: node.paramName.position.start,\n endIndex: node.paramName.position.end,\n });\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UniqueSettingIds = void 0;\nconst types_1 = require(\"../../types\");\nexports.UniqueSettingIds = {\n meta: {\n code: 'UniqueSettingId',\n name: 'Prevent duplicate Ids in setting_schema',\n docs: {\n description: 'This check is aimed at eliminating duplicate Ids in settings_schema.json',\n recommended: true,\n // url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema',\n },\n type: types_1.SourceCodeType.JSON,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async onCodePathEnd(file) {\n if ((0, types_1.isArrayNode)(file.ast)) {\n const settingIds = [];\n /* Find and loop through all of our nodes that have an id value and find their key value */\n for (const child of file.ast.children) {\n if ((0, types_1.isObjectNode)(child) && child.children) {\n const settingsNode = child.children.find((node) => node.key.value === 'settings');\n if (settingsNode && settingsNode.value && (0, types_1.isArrayNode)(settingsNode.value)) {\n for (const setting of settingsNode.value.children) {\n if ((0, types_1.isObjectNode)(setting) && setting.children) {\n const idNode = setting.children.find((node) => node.key.value === 'id');\n if ((0, types_1.isPropertyNode)(idNode)) {\n settingIds.push(idNode);\n }\n }\n }\n }\n }\n }\n /* Check for dupes */\n const idMap = new Map();\n for (const node of settingIds) {\n if ((0, types_1.isLiteralNode)(node.value)) {\n const id = node.value.value;\n if (typeof id === 'string') {\n if (!idMap.has(id)) {\n idMap.set(id, []);\n }\n idMap.get(id).push(node);\n }\n }\n }\n const duplicates = Array.from(idMap.entries()).filter(([_, nodes]) => nodes.length > 1);\n if (duplicates.length > 0) {\n for (const [id, nodes] of duplicates) {\n const lastNodeFound = nodes[nodes.length - 1];\n context.report({\n message: `Duplicate setting id found: \"${id}\"`,\n startIndex: lastNodeFound.loc.start.offset,\n endIndex: lastNodeFound.loc.end.offset,\n });\n }\n }\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UniqueStaticBlockId = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst markup_1 = require(\"../../utils/markup\");\nexports.UniqueStaticBlockId = {\n meta: {\n code: 'UniqueStaticBlockId',\n name: 'Prevent use of duplicated ids for blocks rendered statically',\n docs: {\n description: 'This check is aimed at preventing the use of duplicated ids for blocks rendered statically.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unique-static-block-id',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n const usedIds = new Set();\n const idRegex = /id:\\s*[\"'](\\S+)[\"']/;\n return {\n async LiquidTag(node) {\n if (node.name !== liquid_html_parser_1.NamedTags.content_for) {\n return;\n }\n if (!(0, markup_1.isContentForBlock)(node.markup)) {\n return;\n }\n const idNode = node.markup.args.find((arg) => arg.name === 'id');\n if (!idNode) {\n return; // covered by VariableContentForArguments\n }\n const idValueNode = idNode.value;\n if (idValueNode.type !== liquid_html_parser_1.NodeTypes.String) {\n return; // covered by VariableContentForArguments\n }\n const id = idValueNode.value;\n if (usedIds.has(id)) {\n context.report({\n message: `The id '${id}' is already being used by another static block`,\n startIndex: idValueNode.position.start,\n endIndex: idValueNode.position.end,\n suggest: [],\n });\n }\n else {\n usedIds.add(id);\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UnknownFilter = void 0;\n// src/checks/unknown-filter/index.ts\nconst types_1 = require(\"../../types\");\nexports.UnknownFilter = {\n meta: {\n code: 'UnknownFilter',\n name: 'Prevent use of unknown filters',\n docs: {\n description: 'This check is aimed at preventing the use of unknown filters.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unknown-filter',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n if (!context.themeDocset) {\n return {};\n }\n return {\n async LiquidFilter(node) {\n const knownFilters = await context.themeDocset.filters();\n if (!knownFilters.some((filter) => filter.name === node.name)) {\n context.report({\n message: `Unknown filter '${node.name}' used.`,\n startIndex: node.position.start + 1,\n endIndex: node.position.end,\n });\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UnrecognizedContentForArguments = void 0;\nconst types_1 = require(\"../../types\");\nconst arguments_1 = require(\"../../liquid-doc/arguments\");\nconst content_for_1 = require(\"../../tags/content-for\");\nexports.UnrecognizedContentForArguments = {\n meta: {\n code: 'UnrecognizedContentForArguments',\n name: 'Unrecognized ContentFor Arguments',\n docs: {\n description: 'This check ensures that no unknown arguments are used when rendering a static block.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unrecognized-content-for-arguments',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n const DEFAULT_CONTENT_FOR_ARGS = new Set([\n ...content_for_1.RESERVED_CONTENT_FOR_ARGUMENTS,\n ...content_for_1.REQUIRED_CONTENT_FOR_ARGUMENTS,\n ]);\n return {\n async ContentForMarkup(node) {\n const blockName = (0, arguments_1.getBlockName)(node);\n if (!blockName)\n return;\n const liquidDocParameters = await (0, arguments_1.getLiquidDocParams)(context, `blocks/${blockName}.liquid`);\n if (!liquidDocParameters)\n return;\n const unknownProvidedParams = node.args\n .filter((p) => !liquidDocParameters.has(p.name))\n .filter((p) => !DEFAULT_CONTENT_FOR_ARGS.has(p.name))\n .filter((p) => !p.name.startsWith(content_for_1.CLOSEST_ARGUMENT));\n (0, arguments_1.reportUnknownArguments)(context, node, unknownProvidedParams, blockName);\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UnrecognizedRenderSnippetArguments = void 0;\nconst types_1 = require(\"../../types\");\nconst arguments_1 = require(\"../../liquid-doc/arguments\");\nexports.UnrecognizedRenderSnippetArguments = {\n meta: {\n code: 'UnrecognizedRenderSnippetArguments',\n name: 'Unrecognized Render Snippet Arguments',\n aliases: ['UnrecognizedRenderSnippetParams'],\n docs: {\n description: 'This check ensures that no unknown arguments are used when rendering a snippet.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unrecognized-render-snippet-arguments',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n function reportUnknownAliases(node, liquidDocParameters, snippetName) {\n const alias = node.alias;\n const variable = node.variable;\n if (alias && !liquidDocParameters.has(alias.value) && variable) {\n const startIndex = variable.position.start + 1;\n context.report({\n message: `Unknown argument '${alias.value}' in render tag for snippet '${snippetName}'.`,\n startIndex: startIndex,\n endIndex: alias.position.end,\n suggest: [\n {\n message: `Remove '${alias.value}'`,\n fix: (fixer) => {\n if (variable) {\n return fixer.remove(variable.position.start, alias.position.end);\n }\n },\n },\n ],\n });\n }\n }\n return {\n async RenderMarkup(node) {\n const snippetName = (0, arguments_1.getSnippetName)(node);\n if (!snippetName)\n return;\n const liquidDocParameters = await (0, arguments_1.getLiquidDocParams)(context, `snippets/${snippetName}.liquid`);\n if (!liquidDocParameters)\n return;\n const unknownProvidedParams = node.args.filter((p) => !liquidDocParameters.has(p.name));\n reportUnknownAliases(node, liquidDocParameters, snippetName);\n (0, arguments_1.reportUnknownArguments)(context, node, unknownProvidedParams, snippetName);\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UnsupportedDocTag = void 0;\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../liquid-doc/utils\");\nexports.UnsupportedDocTag = {\n meta: {\n code: 'UnsupportedDocTag',\n name: 'Prevent unsupported doc tag usage',\n docs: {\n description: 'This check exists to prevent use of `doc` tag outside of snippet file.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unsupported-doc-tag',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n const docTagName = 'doc';\n if ((0, utils_1.filePathSupportsLiquidDoc)(context.file.uri)) {\n return {};\n }\n return {\n async LiquidRawTag(node) {\n if (node.name !== docTagName) {\n return;\n }\n context.report({\n message: `The \\`${docTagName}\\` tag can only be used within a snippet or block.`,\n startIndex: node.position.start,\n endIndex: node.position.end,\n suggest: [\n {\n message: `Remove unsupported \\`${docTagName}\\` tag`,\n fix: (corrector) => corrector.remove(node.position.start, node.position.end),\n },\n ],\n });\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UnusedAssign = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../utils\");\nexports.UnusedAssign = {\n meta: {\n code: 'UnusedAssign',\n name: 'Prevent unused assigns',\n docs: {\n description: 'This check exists to prevent bloat in themes by surfacing variable definitions that are not used.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-assign',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n const assignedVariables = new Map();\n const usedVariables = new Set();\n function checkVariableUsage(node) {\n if (node.type === liquid_html_parser_1.NodeTypes.VariableLookup) {\n usedVariables.add(node.name);\n }\n }\n return {\n async LiquidTag(node, ancestors) {\n if ((0, utils_1.isWithinRawTagThatDoesNotParseItsContents)(ancestors))\n return;\n if (isLiquidTagAssign(node)) {\n assignedVariables.set(node.markup.name, node);\n }\n else if (isLiquidTagCapture(node) && node.markup.name) {\n assignedVariables.set(node.markup.name, node);\n }\n },\n async VariableLookup(node, ancestors) {\n if ((0, utils_1.isWithinRawTagThatDoesNotParseItsContents)(ancestors))\n return;\n const parentNode = ancestors.at(-1);\n if (parentNode && isLiquidTagCapture(parentNode)) {\n return;\n }\n checkVariableUsage(node);\n },\n async onCodePathEnd() {\n for (const [variable, node] of assignedVariables.entries()) {\n if (!usedVariables.has(variable) && !variable.startsWith('_')) {\n context.report({\n message: `The variable '${variable}' is assigned but not used`,\n startIndex: isLiquidTagCapture(node)\n ? node.blockStartPosition.start\n : node.position.start,\n endIndex: isLiquidTagCapture(node) ? node.blockStartPosition.end : node.position.end,\n suggest: [\n {\n message: `Remove the unused variable '${variable}'`,\n fix: (corrector) => corrector.remove(node.position.start, node.position.end),\n },\n ],\n });\n }\n }\n },\n };\n },\n};\nfunction isLiquidTagAssign(node) {\n return node.name === 'assign' && typeof node.markup !== 'string';\n}\nfunction isLiquidTagCapture(node) {\n return (node.type == liquid_html_parser_1.NodeTypes.LiquidTag && node.name === 'capture' && typeof node.markup !== 'string');\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UnusedDocParam = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../utils\");\nexports.UnusedDocParam = {\n meta: {\n code: 'UnusedDocParam',\n name: 'Prevent unused doc parameters',\n docs: {\n description: 'This check exists to ensure any parameters defined in the `doc` tag are used within the snippet.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-doc-param',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n const definedLiquidDocParams = new Map();\n const usedVariables = new Set();\n return {\n async LiquidDocParamNode(node) {\n definedLiquidDocParams.set(node.paramName.value, node);\n },\n async VariableLookup(node, ancestors) {\n if (node.type === liquid_html_parser_1.NodeTypes.VariableLookup &&\n node.name &&\n !(0, utils_1.isLoopScopedVariable)(node.name, ancestors)) {\n usedVariables.add(node.name);\n }\n },\n async onCodePathEnd() {\n for (const [variable, node] of definedLiquidDocParams.entries()) {\n if (!usedVariables.has(variable)) {\n context.report({\n message: `The parameter '${variable}' is defined but not used in this file.`,\n startIndex: node.position.start,\n endIndex: node.position.end,\n suggest: [\n {\n message: `Remove unused parameter '${variable}'`,\n fix: (corrector) => corrector.remove(node.position.start, node.position.end),\n },\n ],\n });\n }\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isNodeOfType = isNodeOfType;\nexports.isLiquidBranch = isLiquidBranch;\nexports.isHtmlTag = isHtmlTag;\nexports.isAttr = isAttr;\nexports.isHtmlAttribute = isHtmlAttribute;\nexports.isValuedHtmlAttribute = isValuedHtmlAttribute;\nexports.valueIncludes = valueIncludes;\nexports.hasAttributeValueOf = hasAttributeValueOf;\nexports.isLiquidString = isLiquidString;\nexports.isLoopScopedVariable = isLoopScopedVariable;\nexports.isLoopLiquidTag = isLoopLiquidTag;\nexports.isWithinRawTagThatDoesNotParseItsContents = isWithinRawTagThatDoesNotParseItsContents;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nfunction isNodeOfType(type, node) {\n return (node === null || node === void 0 ? void 0 : node.type) === type;\n}\nfunction isLiquidBranch(node) {\n return isNodeOfType(liquid_html_parser_1.NodeTypes.LiquidBranch, node);\n}\nfunction isHtmlTag(node, name) {\n return (node.name.length === 1 &&\n node.name[0].type === liquid_html_parser_1.NodeTypes.TextNode &&\n node.name[0].value === name &&\n !!node.blockEndPosition);\n}\nfunction isAttr(attr, name) {\n return (attr.name.length === 1 &&\n isNodeOfType(liquid_html_parser_1.NodeTypes.TextNode, attr.name[0]) &&\n attr.name[0].value === name);\n}\nfunction isHtmlAttribute(attr) {\n return [\n liquid_html_parser_1.NodeTypes.AttrUnquoted,\n liquid_html_parser_1.NodeTypes.AttrDoubleQuoted,\n liquid_html_parser_1.NodeTypes.AttrSingleQuoted,\n liquid_html_parser_1.NodeTypes.AttrEmpty,\n ].some((type) => isNodeOfType(type, attr));\n}\nfunction isValuedHtmlAttribute(attr) {\n return [liquid_html_parser_1.NodeTypes.AttrUnquoted, liquid_html_parser_1.NodeTypes.AttrDoubleQuoted, liquid_html_parser_1.NodeTypes.AttrSingleQuoted].some((type) => isNodeOfType(type, attr));\n}\nfunction valueIncludes(attr, word) {\n const regex = new RegExp(`(^|\\\\s)${word}(\\\\s|$)`, 'g');\n return attr.value\n .filter((node) => isNodeOfType(liquid_html_parser_1.NodeTypes.TextNode, node))\n .some((valueNode) => regex.test(valueNode.value));\n}\nfunction hasAttributeValueOf(attr, value) {\n return (attr.value.length === 1 &&\n isNodeOfType(liquid_html_parser_1.NodeTypes.TextNode, attr.value[0]) &&\n attr.value[0].value === value);\n}\nfunction isLiquidString(node) {\n return node.type === liquid_html_parser_1.NodeTypes.String;\n}\nfunction isLoopScopedVariable(variableName, ancestors) {\n return ancestors.some((ancestor) => ancestor.type === liquid_html_parser_1.NodeTypes.LiquidTag &&\n isLoopLiquidTag(ancestor) &&\n typeof ancestor.markup !== 'string' &&\n ancestor.markup.variableName === variableName);\n}\nfunction isLoopLiquidTag(tag) {\n return liquid_html_parser_1.LoopNamedTags.includes(tag.name);\n}\nconst RawTagsThatDoNotParseTheirContents = ['raw', 'stylesheet', 'javascript', 'schema'];\nfunction isRawTagThatDoesNotParseItsContent(node) {\n return (node.type === liquid_html_parser_1.NodeTypes.LiquidRawTag && RawTagsThatDoNotParseTheirContents.includes(node.name));\n}\nfunction isWithinRawTagThatDoesNotParseItsContents(ancestors) {\n return ancestors.some(isRawTagThatDoesNotParseItsContent);\n}\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidBlockTarget = void 0;\nconst json_1 = require(\"../../json\");\nconst to_schema_1 = require(\"../../to-schema\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../utils\");\nexports.ValidBlockTarget = {\n meta: {\n code: 'ValidBlockTarget',\n name: 'Validate block targeting in presets',\n docs: {\n description: 'Ensures block types only reference valid block types and respect parent-child relationships',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-target',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async LiquidRawTag(node) {\n if (node.name !== 'schema' || node.body.kind !== 'json')\n return;\n const offset = node.blockStartPosition.end;\n const schema = await (0, to_schema_1.getSchema)(context);\n const { validSchema, ast } = schema !== null && schema !== void 0 ? schema : {};\n if (!validSchema || validSchema instanceof Error)\n return;\n if (!ast || ast instanceof Error)\n return;\n if (!schema)\n return;\n const { staticBlockDefs } = schema;\n const { rootLevelThemeBlocks, rootLevelLocalBlocks, presetLevelBlocks, defaultLevelBlocks, } = (0, utils_1.getBlocks)(validSchema);\n if (rootLevelLocalBlocks.length > 0)\n return;\n let errorsInRootLevelBlocks = false;\n await Promise.all(rootLevelThemeBlocks.map(async ({ node, path }) => {\n const typeNode = (0, json_1.nodeAtPath)(ast, path);\n const exists = await (0, utils_1.validateBlockFileExistence)(node.type, context);\n if (!exists) {\n errorsInRootLevelBlocks = true;\n (0, utils_1.reportWarning)(blockDoesNotExistError(node.type), offset, typeNode, context);\n }\n }));\n if (errorsInRootLevelBlocks)\n return;\n for (const [depthStr, blocks] of Object.entries(presetLevelBlocks)) {\n const depth = parseInt(depthStr, 10);\n if (depth === 0) {\n await Promise.all(blocks.map(async ({ node, path }) => {\n const typeNode = (0, json_1.nodeAtPath)(ast, path);\n const blockId = 'id' in node ? node.id : path.at(-2);\n const isStaticBlock = !!node.static;\n if ((0, utils_1.isInvalidPresetBlock)(blockId, node, rootLevelThemeBlocks, staticBlockDefs)) {\n const errorMessage = isStaticBlock\n ? `Could not find a static block of type \"${node.type}\" with id \"${blockId}\" in this file.`\n : reportMissingThemeBlockDefinitionError(node);\n (0, utils_1.reportWarning)(errorMessage, offset, typeNode, context);\n }\n const exists = await (0, utils_1.validateBlockFileExistence)(node.type, context);\n if (exists) {\n if ('blocks' in node && node.blocks) {\n await (0, utils_1.validateNestedBlocks)(context, node, node.blocks, path.slice(0, -1), offset, ast);\n }\n }\n else {\n (0, utils_1.reportWarning)(blockDoesNotExistError(node.type), offset, typeNode, context);\n }\n }));\n }\n }\n await Promise.all(defaultLevelBlocks.map(async ({ node, path }) => {\n const typeNode = (0, json_1.nodeAtPath)(ast, path);\n if ((0, utils_1.isInvalidDefaultBlock)(node, rootLevelThemeBlocks)) {\n (0, utils_1.reportWarning)(reportMissingThemeBlockDefinitionError(node), offset, typeNode, context);\n }\n const exists = await (0, utils_1.validateBlockFileExistence)(node.type, context);\n if (!exists) {\n (0, utils_1.reportWarning)(blockDoesNotExistError(node.type), offset, typeNode, context);\n }\n }));\n },\n };\n },\n};\nfunction reportMissingThemeBlockDefinitionError(node) {\n const isPrivateBlockType = node.type.startsWith('_');\n return isPrivateBlockType\n ? `Theme block type \"${node.type}\" is a private block so it must be explicitly allowed in \"blocks\" at the root of this schema.`\n : `Theme block type \"${node.type}\" must be allowed in \"blocks\" at the root of this schema.`;\n}\nfunction blockDoesNotExistError(name) {\n return `Theme block 'blocks/${name}.liquid' does not exist.`;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidContentForArgumentTypes = void 0;\nconst types_1 = require(\"../../types\");\nconst arguments_1 = require(\"../../liquid-doc/arguments\");\nexports.ValidContentForArgumentTypes = {\n meta: {\n code: 'ValidContentForArgumentTypes',\n name: 'Valid ContentFor Argument Types',\n docs: {\n description: 'This check ensures that arguments passed to static blocks match the expected types defined in the liquidDoc header if present.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-content-for-argument-types',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async ContentForMarkup(node) {\n const blockName = (0, arguments_1.getBlockName)(node);\n if (!blockName)\n return;\n const liquidDocParameters = await (0, arguments_1.getLiquidDocParams)(context, `blocks/${blockName}.liquid`);\n if (!liquidDocParameters)\n return;\n const typeMismatchParams = (0, arguments_1.findTypeMismatchParams)(liquidDocParameters, node.args);\n (0, arguments_1.reportTypeMismatches)(context, typeMismatchParams, liquidDocParameters);\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidContentForArguments = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst content_for_1 = require(\"../../tags/content-for\");\nexports.ValidContentForArguments = {\n meta: {\n code: 'ValidContentForArguments',\n name: 'Prevent the use of invalid arguments to the content_for tag',\n docs: {\n description: 'This check is aimed at preventing the use of invalid arguments for the content_for tag.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-content-for-arguments',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n const validationStrategies = {\n blocks: (node) => {\n const problematicArguments = node.args.filter((arg) => !arg.name.startsWith(content_for_1.CLOSEST_ARGUMENT));\n for (const arg of problematicArguments) {\n context.report({\n message: `{% content_for \"blocks\" %} only accepts 'closest.*' arguments`,\n startIndex: arg.position.start,\n endIndex: arg.position.end,\n });\n }\n },\n block: (node) => {\n // Make sure the id and string arguments are present and are strings\n for (const requiredArgumentName of content_for_1.REQUIRED_CONTENT_FOR_ARGUMENTS) {\n const arg = node.args.find((arg) => arg.name === requiredArgumentName);\n if (!arg) {\n context.report({\n message: `{% content_for \"block\" %} requires a '${requiredArgumentName}' argument`,\n startIndex: node.position.start,\n endIndex: node.position.end,\n suggest: [],\n });\n continue;\n }\n const argValueNode = arg.value;\n if (argValueNode.type !== liquid_html_parser_1.NodeTypes.String) {\n context.report({\n message: `The '${requiredArgumentName}' argument should be a string`,\n startIndex: argValueNode.position.start,\n endIndex: argValueNode.position.end,\n suggest: [],\n });\n }\n }\n const problematicArguments = node.args.filter((arg) => content_for_1.RESERVED_CONTENT_FOR_ARGUMENTS.includes(arg.name));\n for (const arg of problematicArguments) {\n context.report({\n message: `{% content_for \"block\" %} doesn't support '${arg.name}' because it's a reserved argument.`,\n startIndex: arg.position.start,\n endIndex: arg.position.end,\n });\n }\n },\n };\n return {\n async LiquidTag(node) {\n if (node.name !== 'content_for' || typeof node.markup === 'string') {\n return;\n }\n /** \"block\", \"blocks\", etc. */\n const contentForType = node.markup.contentForType.value;\n const validate = validationStrategies[contentForType];\n if (!validate) {\n return;\n }\n validate(node.markup);\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidDocParamTypes = void 0;\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../liquid-doc/utils\");\nexports.ValidDocParamTypes = {\n meta: {\n code: 'ValidDocParamTypes',\n name: 'Valid doc parameter types',\n docs: {\n description: 'This check exists to ensure any parameter types defined in the `doc` tag are valid.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-doc-param-types',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n if (!context.themeDocset) {\n return {};\n }\n // To avoid recalculating valid param types during theme-check, constructing\n // the promise beforehand.\n const validParamTypesPromise = context\n .themeDocset.liquidDrops()\n .then((entries) => new Set((0, utils_1.getValidParamTypes)(entries).keys()));\n return {\n async LiquidDocParamNode(node) {\n if (!node.paramType) {\n return;\n }\n const parsedParamType = (0, utils_1.parseParamType)(await validParamTypesPromise, node.paramType.value);\n if (parsedParamType) {\n return;\n }\n context.report({\n message: `The parameter type '${node.paramType.value}' is not supported.`,\n // Index is offset to include the curly brackets around the param type\n startIndex: node.paramType.position.start - 1,\n endIndex: node.paramType.position.end + 1,\n suggest: [\n {\n message: 'Remove invalid parameter type',\n fix: (corrector) => {\n if (!node.paramType)\n return;\n corrector.replace(node.position.start, node.position.end, node.source.slice(node.position.start, node.position.end).replace(\n // We could have padded spaces around + inside the param type\n // e.g. `{ string }`, `{string}`, or ` { string } `\n /\\s*\\{\\s*[^\\s]+\\s*\\}\\s*/, ' '));\n },\n },\n ],\n });\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidHTMLTranslation = void 0;\nconst types_1 = require(\"../../types\");\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nexports.ValidHTMLTranslation = {\n meta: {\n code: 'ValidHTMLTranslation',\n name: 'Valid HTML Translation',\n docs: {\n description: 'This check exists to prevent invalid HTML inside translations.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-html-translation',\n recommended: true,\n },\n type: types_1.SourceCodeType.JSON,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n // We ignore non-`locales/` json files.\n const relativePath = context.toRelativePath(context.file.uri);\n if (!relativePath.startsWith('locales/'))\n return {};\n return {\n async Literal(node) {\n const htmlRegex = /<[^>]+>/;\n if (typeof node.value !== 'string' || !htmlRegex.test(node.value))\n return;\n try {\n (0, liquid_html_parser_1.toLiquidHtmlAST)(node.value);\n }\n catch (error) {\n const loc = node.loc;\n const problem = {\n message: `${error}.`,\n startIndex: loc.start.offset,\n endIndex: loc.end.offset,\n };\n context.report(problem);\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidJSON = void 0;\nconst types_1 = require(\"../../types\");\nexports.ValidJSON = {\n meta: {\n code: 'ValidJSON',\n aliases: ['ValidJson'],\n name: 'Enforce valid JSON',\n docs: {\n description: 'This check exists to prevent invalid JSON files in themes. Will check against schema if available.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-syntax-error',\n },\n type: types_1.SourceCodeType.JSON,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n if (!context.validateJSON)\n return {};\n const validateJSON = context.validateJSON;\n return {\n async onCodePathStart(file) {\n const problems = await validateJSON(file.uri, file.source);\n if (!problems)\n return;\n for (const problem of problems) {\n context.report(problem);\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidLocalBlocks = void 0;\nconst types_1 = require(\"../../types\");\nconst json_1 = require(\"../../json\");\nconst to_schema_1 = require(\"../../to-schema\");\nconst to_schema_2 = require(\"../../to-schema\");\nconst valid_block_utils_1 = require(\"./valid-block-utils\");\nexports.ValidLocalBlocks = {\n meta: {\n code: 'ValidLocalBlocks',\n name: 'Prevent mixing static and local blocks in non-theme sections',\n docs: {\n description: 'Ensures sections without theme block support do not mix static and local blocks',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-local-blocks',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async LiquidRawTag(node) {\n if (node.name !== 'schema' || node.body.kind !== 'json')\n return;\n const offset = node.blockStartPosition.end;\n const schema = await (0, to_schema_1.getSchema)(context);\n const { validSchema, ast } = schema !== null && schema !== void 0 ? schema : {};\n if (!validSchema || validSchema instanceof Error)\n return;\n if (!ast || ast instanceof Error)\n return;\n if (!schema)\n return;\n const { staticBlockLocations, localBlockLocations, themeBlockLocations, hasRootLevelThemeBlocks, } = (0, valid_block_utils_1.getBlocks)(validSchema);\n if ((0, to_schema_2.isSection)(context.file.uri)) {\n if (staticBlockLocations.length > 0 && localBlockLocations.length > 0) {\n staticBlockLocations.forEach((blockWithPath) => {\n const astNode = (0, json_1.nodeAtPath)(ast, blockWithPath.path);\n (0, valid_block_utils_1.reportWarning)(`Sections cannot use static theme blocks together with locally scoped blocks.`, offset, astNode, context);\n });\n }\n if (hasRootLevelThemeBlocks &&\n localBlockLocations.length > 0 &&\n themeBlockLocations.length > 0) {\n localBlockLocations.forEach((blockWithPath) => {\n const astNode = (0, json_1.nodeAtPath)(ast, blockWithPath.path);\n (0, valid_block_utils_1.reportWarning)('Sections cannot use theme blocks together with locally scoped blocks.', offset, astNode, context);\n });\n }\n }\n if ((0, to_schema_2.isBlock)(context.file.uri)) {\n if (localBlockLocations.length > 0) {\n localBlockLocations.forEach((blockWithPath) => {\n const astNode = (0, json_1.nodeAtPath)(ast, blockWithPath.path);\n (0, valid_block_utils_1.reportWarning)('Local scoped blocks are not supported in theme blocks.', offset, astNode, context);\n });\n }\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getBlocks = getBlocks;\nexports.reportWarning = reportWarning;\nconst json_1 = require(\"../../json\");\nfunction getBlocks(validSchema) {\n const staticBlockLocations = [];\n const localBlockLocations = [];\n const themeBlockLocations = [];\n const rootLevelBlocks = validSchema.blocks;\n const presets = validSchema.presets;\n function categorizeBlock(block, currentPath, inPreset = false) {\n if (!block)\n return;\n const hasStatic = 'static' in block;\n const hasName = 'name' in block;\n if (hasStatic) {\n staticBlockLocations.push({ node: block, path: currentPath.concat('type') });\n }\n else if (hasName && !inPreset) {\n localBlockLocations.push({ node: block, path: currentPath.concat('type') });\n }\n else if (block.type !== '@app') {\n themeBlockLocations.push({ node: block, path: currentPath.concat('type') });\n }\n if ('blocks' in block) {\n if (Array.isArray(block.blocks)) {\n block.blocks.forEach((nestedBlock, index) => {\n categorizeBlock(nestedBlock, currentPath.concat('blocks', String(index)), inPreset);\n });\n }\n else if (typeof block.blocks === 'object' && block.blocks !== null) {\n Object.entries(block.blocks).forEach(([key, nestedBlock]) => {\n categorizeBlock(nestedBlock, currentPath.concat('blocks', key), inPreset);\n });\n }\n }\n }\n if (Array.isArray(rootLevelBlocks)) {\n rootLevelBlocks.forEach((block, index) => {\n categorizeBlock(block, ['blocks', String(index)]);\n });\n }\n if (presets) {\n presets.forEach((preset, presetIndex) => {\n if ('blocks' in preset && preset.blocks) {\n if (Array.isArray(preset.blocks)) {\n preset.blocks.forEach((block, blockIndex) => {\n categorizeBlock(block, ['presets', String(presetIndex), 'blocks', String(blockIndex)], true);\n });\n }\n else if (typeof preset.blocks === 'object') {\n Object.entries(preset.blocks).forEach(([key, block]) => {\n categorizeBlock(block, ['presets', String(presetIndex), 'blocks', key], true);\n });\n }\n }\n });\n }\n return {\n staticBlockLocations,\n localBlockLocations,\n themeBlockLocations,\n hasRootLevelThemeBlocks: themeBlockLocations.some((block) => block.path[0] === 'blocks'),\n };\n}\nfunction reportWarning(message, offset, astNode, context) {\n context.report({\n message,\n startIndex: offset + (0, json_1.getLocStart)(astNode),\n endIndex: offset + (0, json_1.getLocEnd)(astNode),\n });\n}\n//# sourceMappingURL=valid-block-utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidRenderSnippetArgumentTypes = void 0;\nconst types_1 = require(\"../../types\");\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst utils_1 = require(\"../../liquid-doc/utils\");\nconst arguments_1 = require(\"../../liquid-doc/arguments\");\nexports.ValidRenderSnippetArgumentTypes = {\n meta: {\n code: 'ValidRenderSnippetArgumentTypes',\n name: 'Valid Render Snippet Argument Types',\n aliases: ['ValidRenderSnippetParamTypes'],\n docs: {\n description: 'This check ensures that arguments passed to snippet match the expected types defined in the liquidDoc header if present.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-render-snippet-argument-types',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema: {},\n targets: [],\n },\n create(context) {\n /**\n * Checks for type mismatches when alias is used with `for` or `with` syntax.\n * This can be refactored at a later date to share more code with regular named arguments as they are both backed by LiquidExpression nodes.\n *\n * E.g. {% render 'card' with 123 as title %}\n */\n function findAndReportAliasType(node, liquidDocParameters) {\n var _a, _b, _c;\n if (node.alias &&\n ((_a = node.variable) === null || _a === void 0 ? void 0 : _a.name) &&\n node.variable.name.type !== liquid_html_parser_1.NodeTypes.VariableLookup) {\n const paramIsDefinedWithType = (_c = (_b = liquidDocParameters\n .get(node.alias.value)) === null || _b === void 0 ? void 0 : _b.type) === null || _c === void 0 ? void 0 : _c.toLowerCase();\n if (paramIsDefinedWithType) {\n const providedParamType = (0, utils_1.inferArgumentType)(node.variable.name);\n if (!(0, utils_1.isTypeCompatible)(paramIsDefinedWithType, providedParamType)) {\n const suggestions = (0, arguments_1.generateTypeMismatchSuggestions)(paramIsDefinedWithType, node.variable.name.position.start, node.variable.name.position.end);\n context.report({\n message: `Type mismatch for argument '${node.alias.value}': expected ${paramIsDefinedWithType}, got ${providedParamType}`,\n startIndex: node.variable.name.position.start,\n endIndex: node.variable.name.position.end,\n suggest: suggestions,\n });\n }\n }\n }\n }\n return {\n async RenderMarkup(node) {\n const snippetName = (0, arguments_1.getSnippetName)(node);\n if (!snippetName)\n return;\n const liquidDocParameters = await (0, arguments_1.getLiquidDocParams)(context, `snippets/${snippetName}.liquid`);\n if (!liquidDocParameters)\n return;\n findAndReportAliasType(node, liquidDocParameters);\n const typeMismatchParams = (0, arguments_1.findTypeMismatchParams)(liquidDocParameters, node.args);\n (0, arguments_1.reportTypeMismatches)(context, typeMismatchParams, liquidDocParameters);\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidSchemaName = void 0;\nconst json_1 = require(\"../../json\");\nconst to_schema_1 = require(\"../../to-schema\");\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../../utils\");\nconst MAX_SCHEMA_NAME_LENGTH = 25;\nexports.ValidSchemaName = {\n meta: {\n code: 'ValidSchemaName',\n name: 'Enforce valid schema name',\n docs: {\n description: 'This check is aimed at ensuring a valid schema name.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema-name',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async LiquidRawTag(node) {\n if (node.name !== 'schema' || node.body.kind !== 'json') {\n return;\n }\n const offset = node.blockStartPosition.end;\n const schema = await (0, to_schema_1.getSchema)(context);\n const { validSchema, ast } = schema !== null && schema !== void 0 ? schema : {};\n if (!validSchema || validSchema instanceof Error)\n return;\n if (!ast || ast instanceof Error)\n return;\n const name = validSchema.name;\n if (!name)\n return;\n // We can make this type assertion because we know the schema is valid\n const nameNode = (0, json_1.nodeAtPath)(ast, ['name']);\n const startIndex = offset + (0, json_1.getLocStart)(nameNode);\n const endIndex = offset + (0, json_1.getLocEnd)(nameNode);\n if (name.startsWith('t:')) {\n const defaultLocale = await context.getDefaultLocale();\n const key = name.replace('t:', '');\n const defaultTranslations = await context.getDefaultSchemaTranslations();\n const translation = (0, utils_1.deepGet)(defaultTranslations, key.split('.'));\n if (translation === undefined) {\n context.report({\n message: `'${name}' does not have a matching entry in 'locales/${defaultLocale}.default.schema.json'`,\n startIndex,\n endIndex,\n });\n }\n if (translation !== undefined && translation.length > MAX_SCHEMA_NAME_LENGTH) {\n context.report({\n message: `Schema name '${translation}' from 'locales/${defaultLocale}.default.schema.json' is too long (max 25 characters)`,\n startIndex,\n endIndex,\n });\n }\n }\n else if (name.length > MAX_SCHEMA_NAME_LENGTH) {\n context.report({\n message: `Schema name '${name}' is too long (max 25 characters)`,\n startIndex,\n endIndex,\n });\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidSchema = void 0;\nconst types_1 = require(\"../../types\");\nexports.ValidSchema = {\n meta: {\n code: 'ValidSchema',\n name: 'Prevent invalid JSON in {% schema %} tags',\n docs: {\n description: 'This check is aimed at eliminating JSON errors in schema tags.',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async LiquidRawTag(node) {\n if (node.name !== 'schema' || node.body.kind !== 'json' || !context.validateJSON) {\n return;\n }\n const jsonString = node.source.slice(node.blockStartPosition.end, node.blockEndPosition.start);\n const problems = await context.validateJSON(context.file.uri, jsonString);\n if (!problems)\n return;\n for (const problem of problems) {\n context.report({\n message: problem.message,\n startIndex: node.blockStartPosition.end + problem.startIndex,\n endIndex: node.blockStartPosition.end + problem.endIndex,\n });\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidSettingsKey = void 0;\nconst types_1 = require(\"../../types\");\nconst json_1 = require(\"../../json\");\nconst to_schema_1 = require(\"../../to-schema\");\nconst utils_1 = require(\"../../utils\");\nexports.ValidSettingsKey = {\n meta: {\n code: 'ValidSettingsKey',\n name: 'Validate settings key in presets',\n docs: {\n description: 'Ensures settings key only references valid settings defined in its respective schema',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-settings-key',\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async LiquidRawTag(node) {\n var _a;\n if (node.name !== 'schema' || node.body.kind !== 'json')\n return;\n const offset = node.blockStartPosition.end;\n const schema = await (0, to_schema_1.getSchema)(context);\n const { validSchema, ast } = schema !== null && schema !== void 0 ? schema : {};\n if (!validSchema || validSchema instanceof Error)\n return;\n if (!ast || ast instanceof Error)\n return;\n const { rootLevelLocalBlocks, presetLevelBlocks } = (0, utils_1.getBlocks)(validSchema);\n // Check if presets settings match schema-level settings\n if (validSchema.presets) {\n for (let i = 0; i < validSchema.presets.length; i++) {\n const settingsNode = (0, json_1.nodeAtPath)(ast, ['presets', i, 'settings']);\n validateSettingsKey(context, offset, settingsNode, validSchema.settings);\n }\n }\n if ((0, to_schema_1.isSectionSchema)(schema) && 'default' in validSchema && validSchema.default) {\n // Check if default settings match schema-level settings\n const settingsNode = (0, json_1.nodeAtPath)(ast, ['default', 'settings']);\n validateSettingsKey(context, offset, settingsNode, validSchema.settings);\n // Check if default block settings match the settings defined in the block file's schema\n (_a = validSchema.default.blocks) === null || _a === void 0 ? void 0 : _a.forEach((block, i) => {\n const settingsNode = (0, json_1.nodeAtPath)(ast, ['default', 'blocks', i, 'settings']);\n validateReferencedBlock(context, offset, settingsNode, rootLevelLocalBlocks, block);\n });\n }\n // Check if preset block settings match the settings defined in the block file's schema\n for (const [_depthStr, blocks] of Object.entries(presetLevelBlocks)) {\n blocks.forEach(({ node: blockNode, path }) => {\n const settingsNode = (0, json_1.nodeAtPath)(ast, path.slice(0, -1).concat('settings'));\n validateReferencedBlock(context, offset, settingsNode, rootLevelLocalBlocks, blockNode);\n });\n }\n },\n };\n },\n};\nasync function validateReferencedBlock(context, offset, settingsNode, localBlocks, referencedBlock) {\n var _a;\n if (localBlocks.length > 0) {\n const localBlock = localBlocks.find((localBlock) => localBlock.node.type === referencedBlock.type);\n if (!localBlock)\n return;\n const localBlockNode = localBlock.node;\n validateSettingsKey(context, offset, settingsNode, localBlockNode.settings);\n }\n else {\n const blockSchema = await ((_a = context.getBlockSchema) === null || _a === void 0 ? void 0 : _a.call(context, referencedBlock.type));\n const { validSchema: validBlockSchema } = blockSchema !== null && blockSchema !== void 0 ? blockSchema : {};\n if (!validBlockSchema || validBlockSchema instanceof Error)\n return;\n validateSettingsKey(context, offset, settingsNode, validBlockSchema.settings, referencedBlock);\n }\n}\nfunction validateSettingsKey(context, offset, settingsNode, validSettings, blockNode) {\n if (!settingsNode || settingsNode.type !== 'Object')\n return;\n for (const setting of settingsNode.children) {\n const settingExists = validSettings === null || validSettings === void 0 ? void 0 : validSettings.find((validSetting) => (validSetting === null || validSetting === void 0 ? void 0 : validSetting.id) === setting.key.value);\n if (!settingExists) {\n const errorMessage = blockNode\n ? `Setting '${setting.key.value}' does not exist in 'blocks/${blockNode.type}.liquid'.`\n : `Setting '${setting.key.value}' does not exist in schema.`;\n (0, utils_1.reportWarning)(errorMessage, offset, setting.key, context);\n }\n }\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidStaticBlockType = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst file_utils_1 = require(\"../../utils/file-utils\");\nconst markup_1 = require(\"../../utils/markup\");\nexports.ValidStaticBlockType = {\n meta: {\n code: 'ValidStaticBlockType',\n name: 'Prevent use of type that is not valid for static blocks',\n docs: {\n description: 'This check is aimed at preventing the use of an invalid type for blocks rendered statically.',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-static-block-type',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n },\n create(context) {\n return {\n async LiquidTag(node) {\n if (node.name !== 'content_for') {\n return;\n }\n if (!(0, markup_1.isContentForBlock)(node.markup)) {\n return;\n }\n const typeArg = node.markup.args.find((arg) => arg.name === 'type');\n if (!typeArg) {\n return; // covered by VariableContentForArguments\n }\n const typeArgValueNode = typeArg.value;\n if (typeArgValueNode.type !== liquid_html_parser_1.NodeTypes.String) {\n return; // covered by VariableContentForArguments\n }\n const blockName = typeArgValueNode.value;\n const relativePath = `blocks/${blockName}.liquid`;\n const fileExists = await (0, file_utils_1.doesFileExist)(context, relativePath);\n if (!fileExists) {\n context.report({\n message: `'blocks/${blockName}.liquid' does not exist`,\n startIndex: typeArgValueNode.position.start,\n endIndex: typeArgValueNode.position.end,\n suggest: [],\n });\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidVisibleIfSettingsSchema = exports.ValidVisibleIf = void 0;\nconst types_1 = require(\"../../types\");\nconst json_1 = require(\"../../json\");\nconst to_schema_1 = require(\"../../to-schema\");\nconst utils_1 = require(\"../../utils\");\nconst visible_if_utils_1 = require(\"./visible-if-utils\");\n// Note that unlike most other files in the `checks` directory, this exports two\n// checks: one for Liquid files and one for 'config/settings_schema.json'. They\n// perform the same check using the same logic (modulo differences extracting\n// the schema and determining warning start and end indices).\nconst meta = {\n code: 'ValidVisibleIf',\n name: 'Validate visible_if expressions',\n docs: {\n description: 'Ensures visible_if expressions are well-formed and only reference settings keys that are defined',\n recommended: true,\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-visible-if',\n },\n severity: types_1.Severity.ERROR,\n schema: {},\n targets: [],\n};\nexports.ValidVisibleIf = {\n meta: { ...meta, type: types_1.SourceCodeType.LiquidHtml },\n create(context) {\n return {\n async LiquidRawTag(node) {\n var _a;\n if (node.name !== 'schema' || node.body.kind !== 'json')\n return;\n const schema = await (0, to_schema_1.getSchema)(context);\n const { validSchema, ast } = schema !== null && schema !== void 0 ? schema : {};\n if (!validSchema ||\n validSchema instanceof Error ||\n !((_a = validSchema.settings) === null || _a === void 0 ? void 0 : _a.some((setting) => 'visible_if' in setting)) ||\n !ast ||\n ast instanceof Error) {\n return;\n }\n const offset = node.blockStartPosition.end;\n const settings = Object.fromEntries((await (0, visible_if_utils_1.getGlobalSettings)(context)).map((s) => [s, true]));\n const currentFileSettings = Object.fromEntries(validSchema.settings.map((setting) => [setting.id, true]));\n const vars = { settings };\n if ((0, to_schema_1.isSectionSchema)(schema)) {\n vars.section = { settings: currentFileSettings };\n }\n else if ((0, to_schema_1.isBlockSchema)(schema)) {\n vars.block = { settings: currentFileSettings };\n }\n for (const [i, setting] of validSchema.settings.entries()) {\n if (!('visible_if' in setting) || typeof setting.visible_if !== 'string')\n continue;\n const visibleIfNode = (0, json_1.nodeAtPath)(ast, ['settings', i, 'visible_if']);\n const varLookupsOrWarning = (0, visible_if_utils_1.getVariableLookupsInExpression)(setting.visible_if);\n if (varLookupsOrWarning === null)\n continue;\n if ('warning' in varLookupsOrWarning) {\n (0, utils_1.reportWarning)(varLookupsOrWarning.warning, offset, visibleIfNode, context);\n continue;\n }\n const report = (message, lookup) => {\n if (typeof message === 'string') {\n context.report({\n message,\n // the JSONNode start location returned by `getLocStart`\n // includes the opening quotation mark — whereas when we parse\n // the inner expression, 0 is the location _inside_ the quotes.\n // we add 1 to the offsets to compensate.\n startIndex: offset + (0, json_1.getLocStart)(visibleIfNode) + lookup.position.start + visible_if_utils_1.offsetAdjust + 1,\n endIndex: offset + (0, json_1.getLocStart)(visibleIfNode) + lookup.position.end + visible_if_utils_1.offsetAdjust + 1,\n });\n }\n };\n for (const lookup of varLookupsOrWarning) {\n if (lookup.name === 'section' && (0, to_schema_1.isBlockSchema)(schema)) {\n //no-op, we don't know what section this block will be used in, so we can't validate that the setting exists\n }\n else if (lookup.name === 'section' && !(0, to_schema_1.isSectionSchema)(schema)) {\n report(`Invalid visible_if: can't refer to \"section\" when not in a section or block file.`, lookup);\n }\n else if (lookup.name === 'block' && !(0, to_schema_1.isBlockSchema)(schema)) {\n report(`Invalid visible_if: can't refer to \"block\" when not in a block file.`, lookup);\n }\n else {\n report((0, visible_if_utils_1.validateLookup)(lookup, vars), lookup);\n }\n }\n }\n },\n };\n },\n};\nexports.ValidVisibleIfSettingsSchema = {\n meta: { ...meta, type: types_1.SourceCodeType.JSON },\n create(context) {\n const relativePath = context.toRelativePath(context.file.uri);\n if (relativePath !== 'config/settings_schema.json')\n return {};\n return {\n async Property(node) {\n if (node.key.value !== 'visible_if' || node.value.type !== 'Literal')\n return;\n const visibleIfExpression = node.value.value;\n if (typeof visibleIfExpression !== 'string')\n return;\n const offset = node.value.loc.start.offset;\n const varLookupsOrWarning = (0, visible_if_utils_1.getVariableLookupsInExpression)(visibleIfExpression);\n if (varLookupsOrWarning === null)\n return;\n if ('warning' in varLookupsOrWarning) {\n context.report({\n message: varLookupsOrWarning.warning,\n startIndex: node.value.loc.start.offset,\n endIndex: node.value.loc.end.offset,\n });\n return;\n }\n const settings = Object.fromEntries((await (0, visible_if_utils_1.getGlobalSettings)(context)).map((s) => [s, true]));\n const vars = { settings };\n const report = (message, lookup) => {\n if (typeof message === 'string') {\n context.report({\n message,\n startIndex: offset + lookup.position.start + visible_if_utils_1.offsetAdjust + 1,\n endIndex: offset + lookup.position.end + visible_if_utils_1.offsetAdjust + 1,\n });\n }\n };\n for (const lookup of varLookupsOrWarning) {\n // settings_schema.json can't reference `section` or `block`.\n if (lookup.name === 'section') {\n report(`Invalid visible_if: can't refer to \"section\" when not in a section file.`, lookup);\n }\n else if (lookup.name === 'block') {\n report(`Invalid visible_if: can't refer to \"block\" when not in a block file.`, lookup);\n }\n else {\n report((0, visible_if_utils_1.validateLookup)(lookup, vars), lookup);\n }\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.offsetAdjust = exports.adjustedSuffix = exports.adjustedPrefix = exports.variableExpressionMatcher = void 0;\nexports.getVariableLookupsInExpression = getVariableLookupsInExpression;\nexports.validateLookup = validateLookup;\nexports.getGlobalSettings = getGlobalSettings;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst json_1 = require(\"../../json\");\nconst visitor_1 = require(\"../../visitor\");\nexports.variableExpressionMatcher = /{{(.+?)}}/;\nexports.adjustedPrefix = '{% if ';\nexports.adjustedSuffix = ' %}{% endif %}';\nexports.offsetAdjust = '{{'.length - exports.adjustedPrefix.length;\nfunction getVariableLookupsInExpression(expression) {\n // As of February 2025, parsers other than LiquidJS don't yet support\n // expressions in {{ variable }} tags. So we have to do something a little\n // gnarly — before parsing it we extract the expression from within the tag\n // and plunk it into an `{% if <expression> %}{% endif %}` statement instead.\n // This requires us to adjust the reported character ranges and offer slightly\n // less useful messages on syntax errors, but otherwise should behave\n // similarly to a proper `{{ <expression> }}` syntax whenever it lands.\n const match = exports.variableExpressionMatcher.exec(expression);\n if (match == null) {\n return {\n warning: `Invalid visible_if expression. It should take the form \"{{ <expression> }}\".`,\n };\n }\n const unwrappedExpression = match[1];\n const adjustedExpression = `${exports.adjustedPrefix}${unwrappedExpression}${exports.adjustedSuffix}`;\n try {\n const innerAst = (0, liquid_html_parser_1.toLiquidHtmlAST)(adjustedExpression, {\n mode: 'strict',\n allowUnclosedDocumentNode: false,\n });\n if (innerAst.children.length !== 1) {\n throw new Error('Unexpected child count for DocumentNode');\n }\n const ifTag = innerAst.children[0];\n if (ifTag.type !== 'LiquidTag' || ifTag.name !== 'if') {\n throw new Error(\"Expected DocumentNode to contain 'if' tag\");\n }\n const expressionNode = ifTag.markup;\n if (typeof expressionNode === 'string') {\n return {\n warning: `Invalid visible_if expression.`,\n };\n }\n if (expressionNode.type === liquid_html_parser_1.NodeTypes.LiquidLiteral &&\n ['true', 'false'].includes(expressionNode.keyword)) {\n // Those are OK\n return null;\n }\n const vars = (0, visitor_1.visit)(ifTag, {\n VariableLookup: (node) => node,\n });\n if (vars.length === 0) {\n return {\n warning: `visible_if expression contains no references to any settings. This is likely an error.`,\n };\n }\n return vars;\n }\n catch (error) {\n if (error instanceof SyntaxError) {\n // Because of our hackish approach, the underlying error is likely to\n // include an incorrect character range and/or mention {% if %} tags.\n // Squelch the details and just report it as a simple syntax error.\n return { warning: 'Syntax error: cannot parse visible_if expression.' };\n }\n return { warning: String(error) };\n }\n}\nfunction validateLookup(lookup, vars) {\n const normalized = getNormalizedLookups(lookup);\n const poppedSegments = [];\n let scope = vars;\n while (normalized.length > 0) {\n const segment = normalized.shift();\n poppedSegments.push(segment);\n // \"noUncheckedIndexedAccess\" is false in our tsconfig.json\n const next = scope[segment];\n if (!next) {\n return `Invalid variable: \"${poppedSegments.join('.')}\" was not found.`;\n }\n if (typeof next === 'boolean') {\n if (normalized.length > 0) {\n return `Invalid variable: \"${poppedSegments.join('.')}\" refers to a variable, but is being used here as a namespace.`;\n }\n return null;\n }\n scope = next;\n }\n // note this is the reverse of the above similar-looking case\n return `Invalid variable: \"${poppedSegments.join('.')}\" refers to a namespace, but is being used here as a variable.`;\n}\nfunction getNormalizedLookups(lookup) {\n const nestedLookups = lookup.lookups.map((lookup) => {\n if (lookup.type !== liquid_html_parser_1.NodeTypes.String) {\n throw new Error(`Expected lookups to be String nodes: ${JSON.stringify(lookup)}`);\n }\n return lookup.value;\n });\n return [lookup.name, ...nestedLookups];\n}\nasync function getGlobalSettings(context) {\n const globalSettings = [];\n try {\n const uri = context.toUri('config/settings_schema.json');\n const settingsFile = await context.fs.readFile(uri);\n const settings = (0, json_1.parseJSON)(settingsFile);\n if (Array.isArray(settings)) {\n for (const group of settings) {\n if ('settings' in group && Array.isArray(group.settings)) {\n globalSettings.push(...group.settings.map((setting) => setting.id).filter((id) => id));\n }\n }\n }\n }\n catch (e) {\n console.error('Error fetching global settings:', e);\n // ignore absent or malformed settings schema\n }\n return globalSettings;\n}\n//# sourceMappingURL=visible-if-utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VariableName = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst types_1 = require(\"../../types\");\nconst lodash_1 = require(\"lodash\");\nconst pascalCase = (string) => {\n const camelCased = (0, lodash_1.camelCase)(string);\n return camelCased.charAt(0).toUpperCase() + camelCased.slice(1);\n};\nconst isLiquidTagAssign = (node) => {\n return node.name === 'assign' && typeof node.markup !== 'string';\n};\nconst isLiquidTagCapture = (node) => {\n return (node.type == liquid_html_parser_1.NodeTypes.LiquidTag && node.name === 'capture' && typeof node.markup !== 'string');\n};\nconst formatTypes = {\n camelCase: lodash_1.camelCase,\n PascalCase: pascalCase,\n snake_case: lodash_1.snakeCase,\n 'kebab-case': lodash_1.kebabCase,\n};\nconst schema = {\n format: types_1.SchemaProp.string('snake_case'),\n};\n// It's impossible to make an idempotent rule that works for all cases. We\n// have to accept whatever spacing the user has input as valid.\n// This function strips dash/underscores around digits so that we can at least\n// make sure that the variable name is in the \"correct\" format. (e.g. snake case)\nconst collapseNumberSpacing = (varName) => varName.replace(/[-_]?\\d[-_]?/g, '');\nexports.VariableName = {\n meta: {\n code: 'VariableName',\n name: 'Invalid variable naming format',\n docs: {\n description: 'This check is aimed at using certain variable naming conventions',\n url: 'https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/variable-name',\n recommended: true,\n },\n type: types_1.SourceCodeType.LiquidHtml,\n severity: types_1.Severity.WARNING,\n schema,\n targets: [],\n },\n create(context) {\n const formatter = (node) => {\n if (!node.markup.name) {\n return {\n valid: false,\n };\n }\n const formatter = formatTypes[context.settings.format];\n const suggestion = formatter(node.markup.name);\n return {\n valid: collapseNumberSpacing(node.markup.name) === collapseNumberSpacing(suggestion),\n suggestion,\n };\n };\n const reportHandler = (node) => {\n return context.report({\n message: `The variable '${node.markup.name}' uses wrong naming format`,\n startIndex: node.markup.position.start,\n endIndex: node.markup.position.end,\n suggest: [\n {\n message: `Change variable '${node.markup.name}' to '${formatter(node).suggestion}'`,\n fix: (corrector) => {\n const { position, name, source } = node.markup;\n return corrector.replace(position.start, position.end, source\n .slice(position.start, position.end)\n .replace(name, formatter(node).suggestion));\n },\n },\n ],\n });\n };\n return {\n async LiquidTag(node) {\n if (isLiquidTagAssign(node)) {\n if (!formatter(node).valid) {\n reportHandler(node);\n }\n }\n else if (isLiquidTagCapture(node) && node.markup.name) {\n if (!formatter(node).valid) {\n reportHandler(node);\n }\n }\n },\n };\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeGetMetafieldDefinitions = exports.FETCHED_METAFIELD_CATEGORIES = exports.makeGetDefaultSchemaTranslations = exports.makeGetDefaultTranslations = exports.makeGetDefaultSchemaLocale = exports.makeGetDefaultLocale = exports.makeGetDefaultSchemaLocaleFileUri = exports.makeGetDefaultLocaleFileUri = exports.makeFileSize = exports.makeFileExists = void 0;\nexports.recursiveReadDirectory = recursiveReadDirectory;\nexports.isDirectory = isDirectory;\nconst vscode_uri_1 = require(\"vscode-uri\");\nconst AbstractFileSystem_1 = require(\"./AbstractFileSystem\");\nconst json_1 = require(\"./json\");\nconst path_1 = require(\"./path\");\nconst types_1 = require(\"./types\");\nconst utils_1 = require(\"./utils\");\nconst makeFileExists = (fs) => async function fileExists(uri) {\n try {\n await fs.stat(uri);\n return true;\n }\n catch (e) {\n return false;\n }\n};\nexports.makeFileExists = makeFileExists;\nconst makeFileSize = (fs) => async function fileSize(uri) {\n try {\n const stats = await fs.stat(uri);\n return stats.size;\n }\n catch (error) {\n return 0;\n }\n};\nexports.makeFileSize = makeFileSize;\nexports.makeGetDefaultLocaleFileUri = getDefaultLocaleFileUriFactoryFactory('default.json');\nexports.makeGetDefaultSchemaLocaleFileUri = getDefaultLocaleFileUriFactoryFactory('.default.schema.json');\nfunction getDefaultLocaleFileUriFactoryFactory(postfix = '.default.json') {\n return function getDefaultLocaleFileUriFactory(fs) {\n return (rootUri) => getDefaultLocaleFile(fs, rootUri, postfix);\n };\n}\nexports.makeGetDefaultLocale = getDefaultLocaleFactoryFactory('.default.json');\nexports.makeGetDefaultSchemaLocale = getDefaultLocaleFactoryFactory('.default.schema.json');\nfunction getDefaultLocaleFactoryFactory(postfix = '.default.json') {\n return function getDefaultLocaleFactory(fs, rootUri) {\n return cached(() => getDefaultLocale(fs, rootUri, postfix));\n };\n}\nexports.makeGetDefaultTranslations = getDefaultTranslationsFactoryFactory('.default.json');\nexports.makeGetDefaultSchemaTranslations = getDefaultTranslationsFactoryFactory('.default.schema.json');\n// prettier-ignore\nfunction getDefaultTranslationsFactoryFactory(postfix = '.default.json') {\n return function getDefaultTranslationsFactory(fs, theme, rootUri) {\n return cached(() => getDefaultTranslations(fs, theme, rootUri, postfix));\n };\n}\nasync function getDefaultLocaleFile(fs, rootUri, postfix = '.default.json') {\n var _a;\n const files = await fs.readDirectory((0, path_1.join)(rootUri, 'locales'));\n return (_a = files.find(([uri]) => uri.endsWith(postfix))) === null || _a === void 0 ? void 0 : _a[0];\n}\nasync function getDefaultLocale(fs, rootUri, postfix) {\n try {\n const defaultLocaleFile = await getDefaultLocaleFile(fs, rootUri, postfix);\n if (!defaultLocaleFile)\n return 'en';\n const defaultLocaleFileName = vscode_uri_1.Utils.basename(vscode_uri_1.URI.parse(defaultLocaleFile));\n return defaultLocaleFileName.split('.')[0];\n }\n catch (error) {\n console.error(error);\n return 'en';\n }\n}\nasync function getDefaultTranslations(fs, theme, rootUri, postfix) {\n try {\n const bufferTranslations = getDefaultTranslationsFromBuffer(theme, postfix);\n if (bufferTranslations)\n return bufferTranslations;\n const defaultLocaleFile = await getDefaultLocaleFile(fs, rootUri, postfix);\n if (!defaultLocaleFile)\n return {};\n const defaultTranslationsFile = await fs.readFile(defaultLocaleFile);\n return (0, json_1.parseJSON)(defaultTranslationsFile, {});\n }\n catch (error) {\n console.error(error);\n return {};\n }\n}\n/** It might be that you have an open buffer, we prefer translations from there if available */\nfunction getDefaultTranslationsFromBuffer(theme, postfix) {\n const defaultTranslationsSourceCode = theme.find((sourceCode) => sourceCode.type === types_1.SourceCodeType.JSON &&\n sourceCode.uri.match(/locales/) &&\n sourceCode.uri.endsWith(postfix));\n if (!defaultTranslationsSourceCode)\n return undefined;\n const translations = (0, json_1.parseJSON)(defaultTranslationsSourceCode.source);\n if ((0, utils_1.isError)(translations))\n return undefined;\n return translations;\n}\nfunction cached(fn) {\n let cachedPromise;\n return async (...args) => {\n if (!cachedPromise)\n cachedPromise = fn(...args);\n return cachedPromise;\n };\n}\nasync function recursiveReadDirectory(fs, uri, filter) {\n const allFiles = await fs.readDirectory(uri);\n const files = allFiles.filter((ft) => !isIgnored(ft) && (isDirectory(ft) || filter(ft)));\n const results = await Promise.all(files.map((ft) => {\n if (isDirectory(ft)) {\n return recursiveReadDirectory(fs, ft[0], filter);\n }\n else {\n return Promise.resolve([ft[0]]);\n }\n }));\n return results.flat();\n}\nfunction isDirectory([_, type]) {\n return type === AbstractFileSystem_1.FileType.Directory;\n}\nconst ignoredFolders = ['.git', 'node_modules', 'dist', 'build', 'tmp', 'vendor'];\nfunction isIgnored([uri, type]) {\n return type === AbstractFileSystem_1.FileType.Directory && ignoredFolders.some((folder) => uri.endsWith(folder));\n}\nexports.FETCHED_METAFIELD_CATEGORIES = [\n 'article',\n 'blog',\n 'collection',\n 'company',\n 'company_location',\n 'location',\n 'market',\n 'order',\n 'page',\n 'product',\n 'variant',\n 'shop',\n];\nconst makeGetMetafieldDefinitions = (fs) => async function (rootUri) {\n const definitions = {\n article: [],\n blog: [],\n collection: [],\n company: [],\n company_location: [],\n location: [],\n market: [],\n order: [],\n page: [],\n product: [],\n variant: [],\n shop: [],\n };\n try {\n const content = await fs.readFile((0, path_1.join)(rootUri, '.shopify', 'metafields.json'));\n const json = (0, json_1.parseJSON)(content);\n if ((0, utils_1.isError)(json))\n return definitions;\n return exports.FETCHED_METAFIELD_CATEGORIES.reduce((definitions, group) => {\n try {\n definitions[group] = json[group].map((definition) => ({\n key: definition.key,\n name: definition.name,\n namespace: definition.namespace,\n description: definition.description,\n type: {\n category: definition.type.category,\n name: definition.type.name,\n },\n }));\n }\n catch (error) {\n // If there are errors in the file, we ignore it\n }\n return definitions;\n }, definitions);\n }\n catch (err) {\n return definitions;\n }\n};\nexports.makeGetMetafieldDefinitions = makeGetMetafieldDefinitions;\n//# sourceMappingURL=context-utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createDisabledChecksModule = createDisabledChecksModule;\nexports.findNextLinePosition = findNextLinePosition;\nconst types_1 = require(\"../types\");\nconst visitor_1 = require(\"../visitor\");\nconst utils_1 = require(\"../utils\");\nfunction createDisabledChecksModule() {\n const SPECIFIC_CHECK_NOT_DEFINED = '@all';\n const INLINE_COMMENT_TAG = '#';\n const disabledChecks = new Map();\n function determineRanges(file, value, node) {\n const [_, command, checksJoined] = value.trim().match(/^(?:theme\\-check\\-(disable-next-line|disable|enable)) ?(.*)/) || [];\n const checks = checksJoined ? checksJoined.split(/,[ ]*/) : [SPECIFIC_CHECK_NOT_DEFINED];\n checks.forEach((check) => {\n const disabledRanges = disabledChecks.get(file.uri);\n if (command === 'disable-next-line' && !(0, utils_1.isError)(file.ast)) {\n const nextLinePosition = findNextLinePosition(file.ast, node);\n if (nextLinePosition) {\n if (!disabledRanges.has(check)) {\n disabledRanges.set(check, []);\n }\n disabledRanges.get(check).push({\n from: nextLinePosition.start,\n to: nextLinePosition.end,\n });\n }\n }\n if (command === 'disable') {\n if (!disabledRanges.has(check)) {\n disabledRanges.set(check, []);\n }\n disabledRanges.get(check).push({ from: node.position.end });\n }\n if (command === 'enable') {\n let disabledRangesForCheck = disabledRanges.get(check);\n if (disabledRangesForCheck) {\n disabledRangesForCheck[disabledRangesForCheck.length - 1].to = node.position.start;\n }\n else {\n if (check === SPECIFIC_CHECK_NOT_DEFINED) {\n for (let ranges of disabledRanges.values()) {\n for (let range of ranges) {\n if (!range.to) {\n range.to = node.position.start;\n }\n }\n }\n }\n }\n }\n });\n }\n const DisabledChecksVisitor = {\n meta: { schema: {} },\n create: ({ file }) => ({\n async onCodePathStart() {\n disabledChecks.set(file.uri, new Map());\n },\n async LiquidRawTag(node) {\n if (node.name !== 'comment') {\n return;\n }\n determineRanges(file, node.body.value, node);\n },\n async LiquidTag(node) {\n if (typeof node.markup !== 'string' || node.name !== INLINE_COMMENT_TAG) {\n return;\n }\n determineRanges(file, node.markup, node);\n },\n }),\n };\n function isDisabled(offense) {\n const ranges = [SPECIFIC_CHECK_NOT_DEFINED, offense.check].flatMap((check) => {\n if (!disabledChecks.has(offense.uri)) {\n return [];\n }\n if (!disabledChecks.get(offense.uri).has(check)) {\n return [];\n }\n return disabledChecks.get(offense.uri).get(check);\n });\n return ranges.some((range) => offense.start.index >= range.from && (!range.to || offense.end.index <= range.to));\n }\n return {\n DisabledChecksVisitor,\n isDisabled,\n };\n}\nfunction findNextLinePosition(ast, node) {\n const [currentNode, ancestors] = (0, visitor_1.findCurrentNode)(ast, node.position.end);\n const parentNode = ancestors.at(-1);\n const grandParentNode = ancestors.at(-2);\n let nextNode = getNextNode(parentNode, currentNode);\n /*\n * If there is no \"next\" node, assume they mean the parent block's next node.\n *\n * E.g. The following disables check for `elsif` tag\n *\n * {% if condition %}\n * {% #theme-check-disable-next-line %}\n * {% elsif other_condition %}\n * {{ prouduct }}\n * {% endif %}\n *\n * NOTE: We don't want to do this recursively since it doesn't make sense to go\n * past 1 depth.\n */\n if (!nextNode) {\n if (parentNode) {\n nextNode = getNextNode(grandParentNode, parentNode);\n }\n if (!nextNode) {\n return;\n }\n }\n /*\n * If the node contains children nodes, we don't want to disable checks for them.\n * We want to keep it exclusively to the tag itself.\n */\n if ('blockStartPosition' in nextNode) {\n return nextNode.blockStartPosition;\n }\n return nextNode.position;\n}\nfunction getNextNode(parentNode, node) {\n if (!parentNode) {\n return;\n }\n let siblingNodes = [];\n // Could be sibling nodes within a `liquid` tag\n if (parentNode.type === types_1.LiquidHtmlNodeTypes.LiquidTag && Array.isArray(parentNode.markup)) {\n siblingNodes = parentNode.markup;\n }\n else if ('children' in parentNode) {\n siblingNodes = parentNode.children || [];\n }\n const currentNodeIdx = siblingNodes.findIndex((c) => c === node);\n if (currentNodeIdx === -1)\n return;\n const nextNode = siblingNodes.at(currentNodeIdx + 1);\n return nextNode;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findRoot = findRoot;\nconst path = __importStar(require(\"./path\"));\nasync function isRoot(dir, fileExists) {\n return or(fileExists(path.join(dir, 'shopify.extension.toml')), // for theme-app-extensions\n fileExists(path.join(dir, '.theme-check.yml')), \n // Maybe the root of the workspace has an assets + snippets directory, we'll accept that\n and(fileExists(path.join(dir, '.git')), fileExists(path.join(dir, 'assets')), fileExists(path.join(dir, 'snippets'))), \n // zip files and TAEs might not have config files, but they should have an\n // assets & snippets directory but in case they do specify a .theme-check.yml a\n // couple of directories up, we should respect that\n and(fileExists(path.join(dir, 'assets')), fileExists(path.join(dir, 'snippets')), not(fileExists(path.join(path.dirname(dir), '.theme-check.yml'))), not(fileExists(path.join(path.dirname(path.dirname(dir)), '.theme-check.yml')))));\n}\nasync function and(...promises) {\n const bools = await Promise.all(promises);\n return bools.reduce((a, b) => a && b, true);\n}\nasync function or(...promises) {\n const bools = await Promise.all(promises);\n return bools.reduce((a, b) => a || b, false);\n}\nasync function not(ap) {\n const a = await ap;\n return !a;\n}\n/**\n * Returns the \"root\" of a theme or theme app extension. The root is the\n * directory that contains a `.theme-check.yml` file, a `.git` directory, or a\n * `shopify.extension.toml` file.\n *\n * There are cases where .theme-check.yml is not defined and we have to infer the root.\n * We'll assume that the root is the directory that contains a `snippets` directory.\n *\n * So you can think of this function as the function that infers where a .theme-check.yml\n * should be.\n *\n * Note: that this is not the theme root. The config file might have a `root` entry in it\n * that points to somewhere else.\n */\nasync function findRoot(curr, fileExists) {\n const currIsRoot = await isRoot(curr, fileExists);\n if (currIsRoot) {\n return curr;\n }\n const dir = path.dirname(curr);\n const currIsAbsoluteRoot = dir === curr;\n if (currIsAbsoluteRoot) {\n return null; // Root not found.\n }\n return findRoot(dir, fileExists);\n}\n//# sourceMappingURL=find-root.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.applyFixToString = applyFixToString;\nconst utils_1 = require(\"./utils\");\n// First iteration imported @codemirror/state to do this but it's kind of\n// a gross dependency. I asked chatGPT to make me something similar and,\n// after a couple of prompts, was surprised to like the result.\n//\n// So here goes:\n// A neat and mean (Source, Fix) => Source function :)\nfunction applyFixToString(source, fix) {\n // Create a copy of the original string to store the modified result\n let newStr = source;\n // Initialize an offset variable to keep track of the changes in index\n // due to previous fixes. This is necessary because each modification\n // is assumed to be to the original document, and we need to account for\n // the index drift caused by previous fixes.\n let offset = 0;\n // Sort modifications by startIndex in ascending order to ensure that\n // modifications with lower indices are applied first. This helps to\n // maintain the correct index positions for subsequent modifications.\n const sortedFixes = (0, utils_1.flattenFixes)(fix).sort((a, b) => a.startIndex - b.startIndex);\n // Verify that the fixes are valid and do not overlap\n for (let i = 0; i < sortedFixes.length - 1; i++) {\n const currentFix = sortedFixes[i];\n const nextFix = sortedFixes[i + 1];\n // Check if the current fix overlaps with the next fix\n if (currentFix.endIndex > nextFix.startIndex) {\n throw new Error('Overlapping ranges are not allowed');\n }\n }\n for (const fix of sortedFixes) {\n // Drift-adjust the fix location\n const startIndex = fix.startIndex + offset;\n const endIndex = fix.endIndex + offset;\n // Throw an error if either startIndex or endIndex are out of bounds.\n if (startIndex < 0 ||\n startIndex > newStr.length ||\n endIndex < startIndex ||\n endIndex > newStr.length) {\n throw new Error('Fix description is going overboard');\n }\n // Perform the modification at the drift-adjusted location\n newStr = newStr.slice(0, startIndex) + fix.insert + newStr.slice(endIndex);\n // Account for \"index drift\" as the modifications are applied.\n offset += fix.insert.length - (endIndex - startIndex);\n }\n return newStr;\n}\n//# sourceMappingURL=apply-fix-to-string.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.autofix = autofix;\nconst correctors_1 = require(\"./correctors\");\nconst utils_1 = require(\"./utils\");\n/**\n * Takes a theme, list of offenses and a fixApplicator and runs all the\n * safe ones on the theme.\n *\n * Note that offense.fix is assumed to be safe, unlike offense.suggest\n * options.\n */\nasync function autofix(sourceCodes, offenses, applyFixes) {\n const fixableOffenses = offenses.filter((offense) => 'fix' in offense && !!offense.fix);\n const promises = [];\n for (const sourceCode of sourceCodes) {\n const sourceCodeOffenses = fixableOffenses.filter((offense) => offense.uri === sourceCode.uri);\n if (sourceCodeOffenses.length === 0) {\n continue;\n }\n const corrector = (0, correctors_1.createCorrector)(sourceCode.type, sourceCode.source);\n for (const offense of sourceCodeOffenses) {\n // I'm being slightly too clever for TypeScript here...\n offense.fix(corrector);\n }\n promises.push(applyFixes(sourceCode, (0, utils_1.flattenFixes)(corrector.fix)));\n }\n await Promise.all(promises);\n}\n//# sourceMappingURL=autofix.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StringCorrector = exports.JSONCorrector = void 0;\nexports.createCorrector = createCorrector;\nconst types_1 = require(\"../../types\");\nconst json_corrector_1 = require(\"./json-corrector\");\nObject.defineProperty(exports, \"JSONCorrector\", { enumerable: true, get: function () { return json_corrector_1.JSONCorrector; } });\nconst string_corrector_1 = require(\"./string-corrector\");\nObject.defineProperty(exports, \"StringCorrector\", { enumerable: true, get: function () { return string_corrector_1.StringCorrector; } });\nfunction createCorrector(sourceCodeType, source) {\n switch (sourceCodeType) {\n case types_1.SourceCodeType.JSON: {\n return new json_corrector_1.JSONCorrector(source);\n }\n case types_1.SourceCodeType.LiquidHtml: {\n return new string_corrector_1.StringCorrector(source);\n }\n default: {\n return assertNever(sourceCodeType);\n }\n }\n}\nfunction assertNever(x) {\n throw new Error(`Case statement not exhausted: ${x}`);\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JSONCorrector = void 0;\nconst lodash_1 = require(\"lodash\");\n// This function mutates json. So use it in a reducer and consider it a\n// fire and forget.\nfunction applyPatch(json, operation) {\n switch (operation.type) {\n case 'add': {\n return (0, lodash_1.set)(json, operation.path, operation.value);\n }\n case 'remove': {\n (0, lodash_1.unset)(json, operation.path);\n return json;\n }\n }\n}\n/**\n * The JSONCorrector collects patches and then creates a Fix object\n * that represents the application of all the collected patches on the\n * source document.\n *\n * Fixes are assumed to not be overlapping.\n */\nclass JSONCorrector {\n constructor(source) {\n this.source = source;\n this.patches = [];\n }\n /**\n * corrector.fix is the data representation of all the changes to source.\n */\n get fix() {\n if (this.patches.length === 0)\n return [];\n const json = this.patches.reduce(applyPatch, JSON.parse(this.source));\n return {\n startIndex: 0,\n endIndex: this.source.length,\n insert: JSON.stringify(json, null, 2),\n };\n }\n /**\n * Add value at dot delited JSON path\n *\n * @example\n * corrector.add('missing.key', 'TO DO')\n */\n add(path, value) {\n this.patches.push({\n type: 'add',\n path,\n value,\n });\n }\n /**\n * Replace a value at dot delited JSON path.\n *\n * @example\n * corrector.replace('missing.key', 'TO DO')\n */\n replace(path, value) {\n this.patches.push({\n type: 'remove',\n path,\n }, {\n type: 'add',\n path,\n value,\n });\n }\n /**\n * Remove key from JSON object\n *\n * @example\n * corrector.remove('unneeded.key')\n */\n remove(path) {\n this.patches.push({\n type: 'remove',\n path,\n });\n }\n}\nexports.JSONCorrector = JSONCorrector;\n//# sourceMappingURL=json-corrector.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StringCorrector = void 0;\n/**\n * The corrector is a helper that collects Fix objects. At the end we\n * collect those fix objects and apply them on the source code to obtain a\n * \"fixed\" file.\n *\n * We cannot fix on overlapping ranges.\n *\n * All fix are assumed to be on the file without modifications. The\n * FixApplicator should take care of knowing where to apply fixes as the\n * changes are applied.\n */\nclass StringCorrector {\n constructor(source) {\n this.source = source;\n this.fix = [];\n }\n /**\n * insert text before the given index\n *\n * @example\n * corrector.insert(\n * node.position.start,\n * node.position.start,\n * 'prefix node with this content'\n * )\n *\n * corrector.insert(\n * node.position.end,\n * node.position.end,\n * 'suffix node with this content (since position.end is excluded)'\n * )\n */\n insert(index, text) {\n this.fix.push({\n startIndex: index,\n endIndex: index,\n insert: text,\n });\n }\n /**\n * replace text between start (included) and end (excluded) with text.\n *\n * @example\n * corrector.replace(\n * node.position.start,\n * node.position.end,\n * 'ho ho ho',\n * );\n */\n replace(start, end, text) {\n this.fix.push({\n startIndex: start,\n endIndex: end,\n insert: text,\n });\n }\n /**\n * remove text between start (included) and end (excluded)\n *\n * @example\n * corrector.remove(\n * node.position.start,\n * node.position.end,\n * )\n */\n remove(start, end) {\n this.fix.push({\n startIndex: start,\n endIndex: end,\n insert: '',\n });\n }\n}\nexports.StringCorrector = StringCorrector;\n//# sourceMappingURL=string-corrector.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.applyFixToString = exports.autofix = exports.createCorrector = exports.JSONCorrector = exports.StringCorrector = exports.flattenFixes = void 0;\nvar utils_1 = require(\"./utils\");\nObject.defineProperty(exports, \"flattenFixes\", { enumerable: true, get: function () { return utils_1.flattenFixes; } });\nvar correctors_1 = require(\"./correctors\");\nObject.defineProperty(exports, \"StringCorrector\", { enumerable: true, get: function () { return correctors_1.StringCorrector; } });\nObject.defineProperty(exports, \"JSONCorrector\", { enumerable: true, get: function () { return correctors_1.JSONCorrector; } });\nObject.defineProperty(exports, \"createCorrector\", { enumerable: true, get: function () { return correctors_1.createCorrector; } });\nvar autofix_1 = require(\"./autofix\");\nObject.defineProperty(exports, \"autofix\", { enumerable: true, get: function () { return autofix_1.autofix; } });\nvar apply_fix_to_string_1 = require(\"./apply-fix-to-string\");\nObject.defineProperty(exports, \"applyFixToString\", { enumerable: true, get: function () { return apply_fix_to_string_1.applyFixToString; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenFixes = flattenFixes;\nfunction flattenFixes(fix) {\n if (!Array.isArray(fix))\n return [fix];\n return fix.flatMap(flattenFixes);\n}\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isIgnored = isIgnored;\nconst minimatch_1 = require(\"minimatch\");\nfunction isIgnored(uri, config, checkDef) {\n const ignorePatterns = [...checkIgnorePatterns(checkDef, config), ...asArray(config.ignore)].map((pattern) => pattern\n .replace(/^\\//, config.rootUri + '/') // \"absolute patterns\" are config.rootUri matches\n .replace(/^([^\\/])/, '**/$1') // \"relative patterns\" are \"**/${pattern}\"\n .replace(/\\/\\*$/, '/**'));\n return ignorePatterns.some((pattern) => (0, minimatch_1.minimatch)(uri, pattern));\n}\nfunction checkIgnorePatterns(checkDef, config) {\n var _a;\n if (!checkDef)\n return [];\n return asArray((_a = config.settings[checkDef.meta.code]) === null || _a === void 0 ? void 0 : _a.ignore);\n}\nfunction asArray(x) {\n return x !== null && x !== void 0 ? x : [];\n}\n//# sourceMappingURL=ignore.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getBlockName = exports.path = void 0;\nexports.check = check;\nconst AugmentedThemeDocset_1 = require(\"./AugmentedThemeDocset\");\nconst JSONValidator_1 = require(\"./JSONValidator\");\nconst context_utils_1 = require(\"./context-utils\");\nconst disabled_checks_1 = require(\"./disabled-checks\");\nconst ignore_1 = require(\"./ignore\");\nconst path = __importStar(require(\"./path\"));\nconst types_1 = require(\"./types\");\nconst utils_1 = require(\"./utils\");\nconst visitors_1 = require(\"./visitors\");\n__exportStar(require(\"./AbstractFileSystem\"), exports);\n__exportStar(require(\"./AugmentedThemeDocset\"), exports);\n__exportStar(require(\"./checks\"), exports);\n__exportStar(require(\"./context-utils\"), exports);\n__exportStar(require(\"./find-root\"), exports);\n__exportStar(require(\"./fixes\"), exports);\n__exportStar(require(\"./ignore\"), exports);\n__exportStar(require(\"./json\"), exports);\n__exportStar(require(\"./JSONValidator\"), exports);\nexports.path = __importStar(require(\"./path\"));\n__exportStar(require(\"./to-schema\"), exports);\n__exportStar(require(\"./to-source-code\"), exports);\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./utils/error\"), exports);\n__exportStar(require(\"./utils/indexBy\"), exports);\n__exportStar(require(\"./utils/memo\"), exports);\n__exportStar(require(\"./utils/types\"), exports);\n__exportStar(require(\"./utils/object\"), exports);\n__exportStar(require(\"./visitor\"), exports);\n__exportStar(require(\"./liquid-doc/liquidDoc\"), exports);\nvar arguments_1 = require(\"./liquid-doc/arguments\");\nObject.defineProperty(exports, \"getBlockName\", { enumerable: true, get: function () { return arguments_1.getBlockName; } });\n__exportStar(require(\"./liquid-doc/utils\"), exports);\nconst defaultErrorHandler = (_error) => {\n // Silently ignores errors by default.\n};\nasync function check(theme, config, injectedDependencies) {\n var _a;\n const pipelines = [];\n const offenses = [];\n const { fs } = injectedDependencies;\n const { rootUri } = config;\n const dependencies = {\n ...injectedDependencies,\n mode: config.context,\n fileExists: (0, context_utils_1.makeFileExists)(fs),\n fileSize: (0, context_utils_1.makeFileSize)(fs),\n getDefaultLocale: (0, context_utils_1.makeGetDefaultLocale)(fs, rootUri),\n getDefaultTranslations: (0, context_utils_1.makeGetDefaultTranslations)(fs, theme, rootUri),\n getDefaultSchemaLocale: (0, context_utils_1.makeGetDefaultSchemaLocale)(fs, rootUri),\n getDefaultSchemaTranslations: (0, context_utils_1.makeGetDefaultSchemaTranslations)(fs, theme, rootUri),\n getMetafieldDefinitions: (_a = injectedDependencies.getMetafieldDefinitions) !== null && _a !== void 0 ? _a : (0, context_utils_1.makeGetMetafieldDefinitions)(fs),\n };\n const { DisabledChecksVisitor, isDisabled } = (0, disabled_checks_1.createDisabledChecksModule)();\n const jsonValidator = await JSONValidator_1.JSONValidator.create(dependencies.jsonValidationSet, config);\n const validateJSON = jsonValidator === null || jsonValidator === void 0 ? void 0 : jsonValidator.validate;\n // We're memozing those deps here because they shouldn't change within a run.\n if (dependencies.themeDocset && !dependencies.themeDocset.isAugmented) {\n dependencies.themeDocset = new AugmentedThemeDocset_1.AugmentedThemeDocset(dependencies.themeDocset);\n }\n for (const type of Object.values(types_1.SourceCodeType)) {\n switch (type) {\n case types_1.SourceCodeType.JSON: {\n const files = filesOfType(type, theme);\n const checkDefs = checksOfType(type, config.checks);\n for (const file of files) {\n for (const checkDef of checkDefs) {\n if ((0, ignore_1.isIgnored)(file.uri, config, checkDef))\n continue;\n const check = createCheck(checkDef, file, config, offenses, dependencies, validateJSON);\n pipelines.push(checkJSONFile(check, file));\n }\n }\n break;\n }\n case types_1.SourceCodeType.LiquidHtml: {\n const files = filesOfType(type, theme);\n const checkDefs = [DisabledChecksVisitor, ...checksOfType(type, config.checks)];\n for (const file of files) {\n for (const checkDef of checkDefs) {\n if ((0, ignore_1.isIgnored)(file.uri, config, checkDef))\n continue;\n const check = createCheck(checkDef, file, config, offenses, dependencies, validateJSON);\n pipelines.push(checkLiquidFile(check, file));\n }\n }\n break;\n }\n }\n }\n const onRejected = config.onError || defaultErrorHandler;\n await Promise.all(pipelines.map((pipeline) => pipeline.catch(onRejected)));\n return offenses.filter((offense) => !isDisabled(offense));\n}\nfunction createContext(check, file, offenses, config, dependencies, validateJSON) {\n const checkSettings = config.settings[check.meta.code];\n return {\n ...dependencies,\n validateJSON,\n settings: createSettings(checkSettings, check.meta.schema),\n toUri: (relativePath) => path.join(config.rootUri, ...relativePath.split('/')),\n toRelativePath: (uri) => path.relative(uri, config.rootUri),\n report(problem) {\n var _a;\n offenses.push({\n type: check.meta.type,\n check: check.meta.code,\n message: problem.message,\n uri: file.uri,\n severity: (_a = checkSettings === null || checkSettings === void 0 ? void 0 : checkSettings.severity) !== null && _a !== void 0 ? _a : check.meta.severity,\n start: (0, utils_1.getPosition)(file.source, problem.startIndex),\n end: (0, utils_1.getPosition)(file.source, problem.endIndex),\n fix: problem.fix,\n suggest: problem.suggest,\n });\n },\n file,\n };\n}\nfunction createSettings(checkSettings, schema) {\n var _a;\n const settings = {};\n for (const [key, schemaProp] of Object.entries(schema)) {\n settings[key] = (_a = checkSettings === null || checkSettings === void 0 ? void 0 : checkSettings[key]) !== null && _a !== void 0 ? _a : schemaProp.defaultValue();\n }\n return settings;\n}\nfunction checksOfType(type, checks) {\n return checks.filter((def) => def.meta.type === type);\n}\nfunction createCheck(check, file, config, offenses, dependencies, validateJSON) {\n const context = createContext(check, file, offenses, config, dependencies, validateJSON);\n return check.create(context);\n}\nfunction filesOfType(type, sourceCodes) {\n return sourceCodes.filter((file) => file.type === type);\n}\nasync function checkJSONFile(check, file) {\n if (check.onCodePathStart)\n await check.onCodePathStart(file);\n if (file.ast instanceof Error)\n return;\n if (Object.keys(check).length > 0)\n await (0, visitors_1.visitJSON)(file.ast, check);\n if (check.onCodePathEnd)\n await check.onCodePathEnd(file);\n}\nasync function checkLiquidFile(check, file) {\n if (check.onCodePathStart)\n await check.onCodePathStart(file);\n if (file.ast instanceof Error)\n return;\n if (Object.keys(check).length > 0)\n await (0, visitors_1.visitLiquid)(file.ast, check);\n if (check.onCodePathEnd)\n await check.onCodePathEnd(file);\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseJSON = parseJSON;\nexports.nodeAtPath = nodeAtPath;\nexports.getLocStart = getLocStart;\nexports.getLocEnd = getLocEnd;\nconst jsonc_parser_1 = require(\"jsonc-parser\");\nconst utils_1 = require(\"./utils\");\nconst PARSE_OPTS = {\n disallowComments: false,\n allowTrailingComma: true,\n allowEmptyContent: false,\n};\nfunction parseJSON(source, defaultValue, isStrict) {\n try {\n /**\n * The jsonc-parser is fault-tolerant and typically returns a valid\n * result. However, it also mutates the 'errors' array with any\n * errors it encounters during parsing.\n */\n const errors = [];\n const result = (0, jsonc_parser_1.parse)(source, errors, PARSE_OPTS);\n if (errors.length && isStrict) {\n throw errors[0];\n }\n return result;\n }\n catch (error) {\n if (defaultValue !== undefined)\n return defaultValue;\n return (0, utils_1.asError)(error);\n }\n}\n/**\n * Given a known path to a property and an ast, returns the AST node at that path.\n *\n * @example\n * const nameNode = nodeAtPath(ast, ['name'])! as LiteralNode;\n * const blocksNode = nodeAtPath(ast, ['blocks'])! as ArrayNode;\n * const someDeepNode = nodeAtPath(ast, ['blocks', 0, 'settings', 'someDeepKey'])! as LiteralNode;\n */\nfunction nodeAtPath(node, path) {\n return path.reduce((acc, key) => {\n if (!acc)\n return;\n switch (acc.type) {\n case 'Object': {\n const property = acc.children.find((child) => child.key.value === key);\n if (!property)\n return;\n return property.value;\n }\n case 'Array': {\n return acc.children[key];\n }\n case 'Literal': {\n // You're probably going too deep\n return;\n }\n case 'Identifier': {\n // This is for keys, shouldn't get there\n return;\n }\n case 'Property': {\n // This is for keys, shouldn't get there\n return;\n }\n }\n }, node);\n}\n/** Given a JSONNode, returns the start offset of the node in the source string. */\nfunction getLocStart(node) {\n var _a, _b;\n return (_b = (_a = node.loc) === null || _a === void 0 ? void 0 : _a.start.offset) !== null && _b !== void 0 ? _b : 0;\n}\n/** Given a JSONNode, returns the end offset of the node in the source string. */\nfunction getLocEnd(node) {\n var _a, _b;\n return (_b = (_a = node.loc) === null || _a === void 0 ? void 0 : _a.end.offset) !== null && _b !== void 0 ? _b : 0;\n}\n//# sourceMappingURL=json.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.location = exports.JSONCParseErrors = void 0;\nexports.toJSONNode = toJSONNode;\nconst utils_1 = require(\"../utils\");\nconst jsonc_parser_1 = require(\"jsonc-parser\");\nclass JSONCParseErrors extends Error {\n constructor(message, errors) {\n super(message);\n this.errors = errors;\n }\n}\nexports.JSONCParseErrors = JSONCParseErrors;\n/**\n * At some point, we started supporting JSONC. Theme Check 2 was built on top of\n * `json-to-ast` which does not support comments.\n *\n * This little adapter here will take a tree we get from `jsonc-parser` and\n * convert it to the shape of `json-to-ast`.\n *\n * The `json-to-ast` types feel much better to use than the ones from `jsonc-parser`\n * and we don't need to rewrite all our downstream code.\n */\nfunction toJSONNode(source) {\n const errors = [];\n const tree = (0, jsonc_parser_1.parseTree)(source, errors, {\n allowTrailingComma: true,\n disallowComments: false,\n });\n if (errors.length || tree === undefined) {\n throw new JSONCParseErrors('Failed to parse JSONC', errors);\n }\n return jsoncToJsonAst(tree);\n}\nfunction jsoncToJsonAst(node) {\n switch (node.type) {\n case 'object': {\n return objectToObjectNode(node);\n }\n case 'property': {\n return propertyToPropertyNode(node);\n }\n case 'array': {\n return arrayToArrayNode(node);\n }\n case 'boolean':\n case 'null':\n case 'number':\n case 'string': {\n return valueToLiteralNode(node);\n }\n default: {\n (0, utils_1.assertNever)(node.type);\n }\n }\n}\nfunction objectToObjectNode(node) {\n var _a;\n return {\n type: 'Object',\n children: ((_a = node.children) !== null && _a !== void 0 ? _a : []).map(jsoncToJsonAst),\n loc: (0, exports.location)(node.offset, node.offset + node.length),\n };\n}\nfunction arrayToArrayNode(node) {\n return {\n type: 'Array',\n children: node.children.map(jsoncToJsonAst),\n loc: (0, exports.location)(node.offset, node.offset + node.length),\n };\n}\nfunction propertyToPropertyNode(node) {\n return {\n type: 'Property',\n key: identifierToIdentifierNode(node.children[0]),\n value: jsoncToJsonAst(node.children[1]),\n loc: (0, exports.location)(node.offset, node.offset + node.length),\n };\n}\nfunction identifierToIdentifierNode(node) {\n return {\n type: 'Identifier',\n value: node.value,\n raw: JSON.stringify(node.value),\n loc: (0, exports.location)(node.offset, node.offset + node.length),\n };\n}\nfunction valueToLiteralNode(node) {\n return {\n type: 'Literal',\n value: node.value,\n raw: JSON.stringify(node.value),\n loc: (0, exports.location)(node.offset, node.offset + node.length),\n };\n}\nconst location = (start, end) => ({\n start: position(start),\n end: position(end),\n});\nexports.location = location;\nconst position = (offset) => ({ offset });\n//# sourceMappingURL=parse.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reportUnknownArguments = reportUnknownArguments;\nexports.reportMissingArguments = reportMissingArguments;\nexports.reportDuplicateArguments = reportDuplicateArguments;\nexports.findTypeMismatchParams = findTypeMismatchParams;\nexports.reportTypeMismatches = reportTypeMismatches;\nexports.generateTypeMismatchSuggestions = generateTypeMismatchSuggestions;\nexports.getBlockName = getBlockName;\nexports.getSnippetName = getSnippetName;\nexports.getLiquidDocParams = getLiquidDocParams;\nexports.makeRemoveArgumentCorrector = makeRemoveArgumentCorrector;\nexports.makeAddArgumentCorrector = makeAddArgumentCorrector;\n/**\n * Helper methods shared between `render` tag and `content_for` tag to report\n * errors when LiquidDoc exists\n */\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst utils_1 = require(\"./utils\");\nconst utils_2 = require(\"../checks/utils\");\n/**\n * Report error when unknown arguments are provided for `content_for` tag or `render` tag\n */\nfunction reportUnknownArguments(context, node, unknownProvidedArgs, name) {\n let errorOwnerMessage = '';\n if (node.type === liquid_html_parser_1.NodeTypes.ContentForMarkup) {\n errorOwnerMessage = ` in content_for tag for static block '${name}'`;\n }\n else if (node.type === liquid_html_parser_1.NodeTypes.RenderMarkup) {\n errorOwnerMessage = ` in render tag for snippet '${name}'`;\n }\n for (const arg of unknownProvidedArgs) {\n context.report({\n message: `Unknown argument '${arg.name}'${errorOwnerMessage}.`,\n startIndex: arg.position.start,\n endIndex: arg.position.end,\n suggest: [\n {\n message: `Remove '${arg.name}'`,\n fix: makeRemoveArgumentCorrector(node, arg),\n },\n ],\n });\n }\n}\n/**\n * Report error when missing arguments are provided for `content_for` tag or `render` tag\n */\nfunction reportMissingArguments(context, node, missingRequiredArgs, name) {\n let errorOwnerMessage = '';\n if (node.type === liquid_html_parser_1.NodeTypes.ContentForMarkup) {\n errorOwnerMessage = ` in content_for tag for static block '${name}'`;\n }\n else if (node.type === liquid_html_parser_1.NodeTypes.RenderMarkup) {\n errorOwnerMessage = ` in render tag for snippet '${name}'`;\n }\n for (const arg of missingRequiredArgs) {\n context.report({\n message: `Missing required argument '${arg.name}'${errorOwnerMessage}.`,\n startIndex: node.position.start,\n endIndex: node.position.end,\n suggest: [\n {\n message: `Add required argument '${arg.name}'`,\n fix: makeAddArgumentCorrector(node, arg),\n },\n ],\n });\n }\n}\nfunction reportDuplicateArguments(context, node, duplicateArgs, name) {\n let errorOwnerMessage = '';\n if (node.type === liquid_html_parser_1.NodeTypes.ContentForMarkup) {\n errorOwnerMessage = ` in content_for tag for static block '${name}'`;\n }\n else if (node.type === liquid_html_parser_1.NodeTypes.RenderMarkup) {\n errorOwnerMessage = ` in render tag for snippet '${name}'`;\n }\n for (const arg of duplicateArgs) {\n context.report({\n message: `Duplicate argument '${arg.name}'${errorOwnerMessage}.`,\n startIndex: arg.position.start,\n endIndex: arg.position.end,\n suggest: [\n {\n message: `Remove duplicate argument '${arg.name}'`,\n fix: makeRemoveArgumentCorrector(node, arg),\n },\n ],\n });\n }\n}\n/**\n * Find type mismatch between the arguments provided for `content_for` tag and `render` tag\n * and their associated file's LiquidDoc\n */\nfunction findTypeMismatchParams(liquidDocParameters, providedParams) {\n const typeMismatchParams = [];\n for (const arg of providedParams) {\n if (arg.value.type === liquid_html_parser_1.NodeTypes.VariableLookup) {\n continue;\n }\n const liquidDocParamDef = liquidDocParameters.get(arg.name);\n if (liquidDocParamDef && liquidDocParamDef.type) {\n const paramType = liquidDocParamDef.type.toLowerCase();\n const supportedTypes = Object.keys(utils_1.BasicParamTypes).map((type) => type.toLowerCase());\n if (!supportedTypes.includes(paramType)) {\n continue;\n }\n if (!(0, utils_1.isTypeCompatible)(paramType, (0, utils_1.inferArgumentType)(arg.value))) {\n typeMismatchParams.push(arg);\n }\n }\n }\n return typeMismatchParams;\n}\n/**\n * Report error if the type mismatches between LiquidDoc and provided arguments\n */\nfunction reportTypeMismatches(context, typeMismatchArgs, liquidDocParameters) {\n for (const arg of typeMismatchArgs) {\n const paramDef = liquidDocParameters.get(arg.name);\n if (!paramDef || !paramDef.type)\n continue;\n const expectedType = paramDef.type.toLowerCase();\n const actualType = (0, utils_1.inferArgumentType)(arg.value);\n const suggestions = generateTypeMismatchSuggestions(expectedType, arg.value.position.start, arg.value.position.end);\n context.report({\n message: `Type mismatch for argument '${arg.name}': expected ${expectedType}, got ${actualType}`,\n startIndex: arg.value.position.start,\n endIndex: arg.value.position.end,\n suggest: suggestions,\n });\n }\n}\n/**\n * Generates suggestions for type mismatches based on the expected type and node positions\n */\nfunction generateTypeMismatchSuggestions(expectedType, startPosition, endPosition) {\n const defaultValue = (0, utils_1.getDefaultValueForType)(expectedType);\n const suggestions = [];\n // Only add the \"replace with default\" suggestion if the default is not an empty string\n if (defaultValue !== '') {\n suggestions.push({\n message: `Replace with default value '${defaultValue}' for ${expectedType}`,\n fix: (fixer) => {\n return fixer.replace(startPosition, endPosition, defaultValue);\n },\n });\n }\n // Always include the \"remove value\" suggestion\n suggestions.push({\n message: `Remove value`,\n fix: (fixer) => {\n return fixer.remove(startPosition, endPosition);\n },\n });\n return suggestions;\n}\nfunction isLastArg(node, arg) {\n return (node.args.length == 1 || arg.position.start == node.args[node.args.length - 1].position.start);\n}\nfunction getBlockName(node) {\n var _a;\n if (node.contentForType.value !== 'block') {\n return;\n }\n const contentForTypeArg = (_a = node.args.find((arg) => arg.name == 'type')) === null || _a === void 0 ? void 0 : _a.value;\n if (!contentForTypeArg || !(0, utils_2.isLiquidString)(contentForTypeArg)) {\n return;\n }\n return contentForTypeArg.value;\n}\nfunction getSnippetName(node) {\n if (!(0, utils_2.isLiquidString)(node.snippet)) {\n return;\n }\n return node.snippet.value;\n}\nasync function getLiquidDocParams(context, relativePath) {\n var _a;\n const docDefinition = context.getDocDefinition && (await context.getDocDefinition(relativePath));\n if (!((_a = docDefinition === null || docDefinition === void 0 ? void 0 : docDefinition.liquidDoc) === null || _a === void 0 ? void 0 : _a.parameters)) {\n return;\n }\n return new Map(docDefinition.liquidDoc.parameters.map((p) => [p.name, p]));\n}\nfunction makeRemoveArgumentCorrector(node, arg) {\n return (fixer) => {\n const sourceBeforeArg = node.source.slice(node.position.start, arg.position.start);\n const matches = sourceBeforeArg.match(/,\\s*/g);\n const lastCommaMatch = matches === null || matches === void 0 ? void 0 : matches[matches.length - 1];\n let startPos = lastCommaMatch\n ? arg.position.start - (lastCommaMatch.length - 1)\n : arg.position.start;\n if (isLastArg(node, arg)) {\n // Remove the leading comma if it's the last parameter\n startPos -= 1;\n }\n const sourceAfterArg = node.source.substring(arg.position.end, node.position.end);\n const trailingCommaMatch = sourceAfterArg.match(/\\s*,/);\n if (trailingCommaMatch) {\n return fixer.remove(startPos, arg.position.end + trailingCommaMatch[0].length);\n }\n return fixer.remove(startPos, arg.position.end);\n };\n}\nfunction makeAddArgumentCorrector(node, arg) {\n return (fixer) => {\n const paramToAdd = `, ${arg.name}: ${(0, utils_1.getDefaultValueForType)(arg.type)}`;\n if (node.args.length == 0) {\n return fixer.insert(node.position.end - 1, paramToAdd);\n }\n const lastArg = node.args[node.args.length - 1];\n const sourceAfterLastArg = node.source.substring(lastArg.position.end, node.position.end);\n const trailingCommaAndWhitespaceMatch = sourceAfterLastArg.match(/\\s*,\\s*/);\n if (trailingCommaAndWhitespaceMatch) {\n // IF there is already a trailing comma after the last arg, we want to find it and replace it with our own while stripping whitespace\n return fixer.replace(lastArg.position.end, lastArg.position.end + trailingCommaAndWhitespaceMatch[0].length, `${paramToAdd} `);\n }\n return fixer.insert(lastArg.position.end, paramToAdd);\n };\n}\n//# sourceMappingURL=arguments.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hasLiquidDoc = hasLiquidDoc;\nexports.extractDocDefinition = extractDocDefinition;\nconst visitor_1 = require(\"../visitor\");\nfunction hasLiquidDoc(snippet) {\n let foundDocTag = false;\n (0, visitor_1.visit)(snippet, {\n LiquidRawTag(node) {\n if (node.name === 'doc')\n foundDocTag = true;\n },\n });\n return foundDocTag;\n}\nfunction extractDocDefinition(uri, ast) {\n let hasDocTag = false;\n const nodes = (0, visitor_1.visit)(ast, {\n LiquidRawTag(node) {\n if (node.name === 'doc')\n hasDocTag = true;\n return undefined;\n },\n LiquidDocParamNode(node) {\n var _a, _b, _c, _d;\n return {\n name: node.paramName.value,\n description: (_b = (_a = node.paramDescription) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : null,\n type: (_d = (_c = node.paramType) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : null,\n required: node.required,\n nodeType: 'param',\n };\n },\n LiquidDocExampleNode(node) {\n return {\n content: handleMultilineIndentation(node.content.value.trim()),\n nodeType: 'example',\n };\n },\n LiquidDocDescriptionNode(node) {\n return {\n content: handleMultilineIndentation(node.content.value.trim()),\n nodeType: 'description',\n };\n },\n });\n if (!hasDocTag)\n return { uri };\n const { parameters, examples, description } = nodes.reduce((acc, node) => {\n if (node.nodeType === 'param') {\n acc.parameters.push(node);\n }\n else if (node.nodeType === 'example') {\n acc.examples.push(node);\n }\n else if (node.nodeType === 'description' && !acc.description) {\n acc.description = node;\n }\n return acc;\n }, {\n parameters: [],\n examples: [],\n description: undefined,\n });\n return {\n uri,\n liquidDoc: {\n ...(parameters.length && { parameters }),\n ...(examples.length && { examples }),\n ...(description && { description }),\n },\n };\n}\nfunction handleMultilineIndentation(text) {\n const lines = text.split('\\n');\n if (lines.length <= 1)\n return text;\n const nonEmptyLines = lines.slice(1).filter((line) => line.trim().length > 0);\n const indentLengths = nonEmptyLines.map((line) => {\n const match = line.match(/^\\s*/);\n return match ? match[0].length : 0;\n });\n if (indentLengths.length === 0)\n return text;\n const minIndent = Math.min(...indentLengths);\n return [\n lines[0],\n ...lines.slice(1).map((line) => {\n if (line.trim().length === 0)\n return line; // Skip empty lines\n return line.slice(minIndent);\n }),\n ].join('\\n');\n}\n//# sourceMappingURL=liquidDoc.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SupportedDocTagTypes = exports.BasicParamTypes = void 0;\nexports.getDefaultValueForType = getDefaultValueForType;\nexports.inferArgumentType = inferArgumentType;\nexports.isTypeCompatible = isTypeCompatible;\nexports.filePathSupportsLiquidDoc = filePathSupportsLiquidDoc;\nexports.getValidParamTypes = getValidParamTypes;\nexports.parseParamType = parseParamType;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst utils_1 = require(\"../utils\");\nconst to_schema_1 = require(\"../to-schema\");\nconst to_schema_2 = require(\"../to-schema\");\n/**\n * The base set of supported param types for LiquidDoc.\n *\n * This is used in conjunction with objects defined in [liquid docs](https://shopify.dev/docs/api/liquid/objects)\n * to determine ALL supported param types for LiquidDoc.\n *\n * References `getValidParamTypes`\n */\nvar BasicParamTypes;\n(function (BasicParamTypes) {\n BasicParamTypes[\"String\"] = \"string\";\n BasicParamTypes[\"Number\"] = \"number\";\n BasicParamTypes[\"Boolean\"] = \"boolean\";\n BasicParamTypes[\"Object\"] = \"object\";\n})(BasicParamTypes || (exports.BasicParamTypes = BasicParamTypes = {}));\nvar SupportedDocTagTypes;\n(function (SupportedDocTagTypes) {\n SupportedDocTagTypes[\"Param\"] = \"param\";\n SupportedDocTagTypes[\"Example\"] = \"example\";\n SupportedDocTagTypes[\"Description\"] = \"description\";\n})(SupportedDocTagTypes || (exports.SupportedDocTagTypes = SupportedDocTagTypes = {}));\n/**\n * Provides a default completion value for an argument / parameter of a given type.\n */\nfunction getDefaultValueForType(type) {\n switch (type === null || type === void 0 ? void 0 : type.toLowerCase()) {\n case BasicParamTypes.String:\n return \"''\";\n case BasicParamTypes.Number:\n return '0';\n case BasicParamTypes.Boolean:\n return 'false';\n case BasicParamTypes.Object: // Objects don't have a sensible default value (maybe `theme`?)\n default:\n return '';\n }\n}\n/**\n * Casts the value of a LiquidNamedArgument to a string representing the type of the value.\n */\nfunction inferArgumentType(arg) {\n switch (arg.type) {\n case liquid_html_parser_1.NodeTypes.String:\n return BasicParamTypes.String;\n case liquid_html_parser_1.NodeTypes.Number:\n return BasicParamTypes.Number;\n case liquid_html_parser_1.NodeTypes.LiquidLiteral:\n return BasicParamTypes.Boolean;\n case liquid_html_parser_1.NodeTypes.Range:\n case liquid_html_parser_1.NodeTypes.VariableLookup:\n return BasicParamTypes.Object;\n default:\n // This ensures that we have a case for every possible type for arg.value\n return (0, utils_1.assertNever)(arg);\n }\n}\n/**\n * Checks if the provided argument type is compatible with the expected type.\n * Makes certain types more permissive:\n * - Boolean accepts any value, since everything is truthy / falsy in Liquid\n */\nfunction isTypeCompatible(expectedType, actualType) {\n const normalizedExpectedType = expectedType.toLowerCase();\n if (normalizedExpectedType === BasicParamTypes.Boolean) {\n return true;\n }\n return normalizedExpectedType === actualType;\n}\n/**\n * Checks if the provided file path supports the LiquidDoc tag.\n */\nfunction filePathSupportsLiquidDoc(uri) {\n return (0, to_schema_1.isSnippet)(uri) || (0, to_schema_2.isBlock)(uri);\n}\n/**\n * Dynamically generates a map of LiquidDoc param types using object entries from\n * [liquid docs](https://shopify.dev/docs/api/liquid/objects).\n *\n * This is used in conjunction with the base set of supported param.\n *\n * References `BasicParamTypes`\n */\nfunction getValidParamTypes(objectEntries) {\n const paramTypes = new Map([\n [BasicParamTypes.String, undefined],\n [BasicParamTypes.Number, undefined],\n [BasicParamTypes.Boolean, undefined],\n [\n BasicParamTypes.Object,\n 'A generic type used to represent any liquid object or primitive value.',\n ],\n ]);\n objectEntries.forEach((obj) => paramTypes.set(obj.name, obj.summary || obj.description));\n return paramTypes;\n}\nfunction parseParamType(validParamTypes, value) {\n const paramTypeMatch = value.match(/^([a-z_]+)(\\[\\])?$/);\n if (!paramTypeMatch)\n return undefined;\n const extractedParamType = paramTypeMatch[1];\n const isArrayType = !!paramTypeMatch[2];\n if (!validParamTypes.has(extractedParamType))\n return undefined;\n return [extractedParamType, isArrayType];\n}\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Utils = exports.URI = void 0;\nexports.relative = relative;\nexports.join = join;\nexports.resolve = resolve;\nexports.normalize = normalize;\nexports.dirname = dirname;\nexports.basename = basename;\nexports.fsPath = fsPath;\nconst vscode_uri_1 = require(\"vscode-uri\");\nObject.defineProperty(exports, \"URI\", { enumerable: true, get: function () { return vscode_uri_1.URI; } });\nObject.defineProperty(exports, \"Utils\", { enumerable: true, get: function () { return vscode_uri_1.Utils; } });\nfunction relative(uri, rootUri) {\n return normalize(uri)\n .replace(rootUri, '')\n .replace(/\\\\\\\\/g, '/') // We expect forward slash paths (windows path get normalized)\n .replace(/^\\/+/, '');\n}\nfunction join(rootUri, ...paths) {\n return normalize(vscode_uri_1.Utils.joinPath(asUri(rootUri), ...paths));\n}\nfunction resolve(uri, path) {\n return normalize(vscode_uri_1.Utils.resolvePath(asUri(uri), path));\n}\nfunction normalize(uri) {\n const normalized = asUri(uri).toString(true);\n // On Windows machines, paths use backslash ('\\') as separator\n // This causes issues since backslashes in glob patterns are treated as escape characters\n // and in various URI contexts, forward slashes are expected\n // We replace all backslashes with forward slashes for cross-platform consistency\n return normalized.replace(/\\\\/g, '/');\n}\nfunction dirname(uri) {\n return normalize(vscode_uri_1.Utils.dirname(asUri(uri)));\n}\nfunction basename(uri, ext) {\n const base = vscode_uri_1.Utils.basename(asUri(uri));\n return ext ? base.replace(new RegExp(`${ext.replace(/\\./g, '\\\\.')}$`), '') : base;\n}\nfunction fsPath(uri) {\n return asUri(uri).fsPath;\n}\nfunction asUri(uri) {\n return vscode_uri_1.URI.isUri(uri) ? uri : vscode_uri_1.URI.parse(uri);\n}\n//# sourceMappingURL=path.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CLOSEST_ARGUMENT = exports.REQUIRED_CONTENT_FOR_ARGUMENTS = exports.RESERVED_CONTENT_FOR_ARGUMENTS = void 0;\nexports.RESERVED_CONTENT_FOR_ARGUMENTS = [\n 'attributes',\n 'block',\n 'blocks',\n 'class',\n 'context',\n 'inherit',\n 'resource',\n 'resources',\n 'schema',\n 'section',\n 'sections',\n 'settings',\n 'snippet',\n 'snippets',\n 'src',\n 'style',\n 'styles',\n 'template',\n 'templates',\n];\nexports.REQUIRED_CONTENT_FOR_ARGUMENTS = ['id', 'type'];\nexports.CLOSEST_ARGUMENT = 'closest.';\n//# sourceMappingURL=content-for.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toSchema = toSchema;\nexports.isBlock = isBlock;\nexports.isSection = isSection;\nexports.isSnippet = isSnippet;\nexports.isBlockSchema = isBlockSchema;\nexports.isSectionSchema = isSectionSchema;\nexports.toBlockSchema = toBlockSchema;\nexports.toSectionSchema = toSectionSchema;\nexports.toAppBlockSchema = toAppBlockSchema;\nexports.getSchema = getSchema;\nexports.getSchemaFromJSON = getSchemaFromJSON;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst json_1 = require(\"./json\");\nconst path = __importStar(require(\"./path\"));\nconst to_source_code_1 = require(\"./to-source-code\");\nconst types_1 = require(\"./types\");\nconst visitor_1 = require(\"./visitor\");\nasync function toSchema(mode, uri, sourceCode, isValidSchema, isStrict = true) {\n if (sourceCode.type !== types_1.SourceCodeType.LiquidHtml)\n return undefined;\n switch (true) {\n case mode === 'app' && isBlock(uri):\n return toAppBlockSchema(uri, sourceCode.ast, isStrict);\n case mode === 'theme' && isBlock(uri):\n return toBlockSchema(uri, sourceCode.ast, isValidSchema, isStrict);\n case mode === 'theme' && isSection(uri):\n return toSectionSchema(uri, sourceCode.ast, isValidSchema, isStrict);\n default:\n return undefined;\n }\n}\nfunction isBlock(uri) {\n return path.dirname(uri).endsWith('blocks');\n}\nfunction isSection(uri) {\n return path.dirname(uri).endsWith('sections');\n}\nfunction isSnippet(uri) {\n return path.dirname(uri).endsWith('snippets');\n}\nfunction isBlockSchema(schema) {\n return (schema === null || schema === void 0 ? void 0 : schema.type) === types_1.ThemeSchemaType.Block;\n}\nfunction isSectionSchema(schema) {\n return (schema === null || schema === void 0 ? void 0 : schema.type) === types_1.ThemeSchemaType.Section;\n}\nasync function toValidSchema(uri, schemaNode, parsed, isValidSchema) {\n if (!isValidSchema)\n return new Error('No JSON validator provided');\n if (schemaNode instanceof Error)\n return parsed;\n if (await isValidSchema(uri, schemaNode.body.value)) {\n return parsed;\n }\n else {\n return new Error('Invalid schema');\n }\n}\nasync function toBlockSchema(uri, liquidAst, isValidSchema, isStrict) {\n const name = path.basename(uri, '.liquid');\n const schemaNode = toSchemaNode(liquidAst);\n const staticBlockDefs = toStaticBlockDefs(liquidAst);\n const parsed = toParsed(schemaNode, isStrict);\n const ast = toAst(schemaNode);\n return {\n type: types_1.ThemeSchemaType.Block,\n validSchema: await toValidSchema(uri, schemaNode, parsed, isValidSchema),\n offset: schemaNode instanceof Error ? 0 : schemaNode.blockStartPosition.end,\n name,\n parsed,\n ast,\n value: schemaNode instanceof Error ? '' : schemaNode.body.value,\n staticBlockDefs,\n };\n}\n// Coincidentally very similar right now... but could be different in the future\n// given there might be a plan to support folders in the blocks folder.\n// e.g. if we start having a stricter \"parsed\" object / ways to get settings.\nasync function toSectionSchema(uri, liquidAst, isValidSchema, isStrict) {\n const name = path.basename(uri, '.liquid');\n const schemaNode = toSchemaNode(liquidAst);\n const staticBlockDefs = toStaticBlockDefs(liquidAst);\n const parsed = toParsed(schemaNode, isStrict);\n const ast = toAst(schemaNode);\n return {\n type: types_1.ThemeSchemaType.Section,\n validSchema: await toValidSchema(uri, schemaNode, parsed, isValidSchema),\n offset: schemaNode instanceof Error ? 0 : schemaNode.blockStartPosition.end,\n name,\n parsed,\n ast,\n value: schemaNode instanceof Error ? '' : schemaNode.body.value,\n staticBlockDefs,\n };\n}\n// validSchema not implemented yet. You can still `visit` the ast.\nasync function toAppBlockSchema(uri, liquidAst, isStrict) {\n const name = path.basename(uri, '.liquid');\n const schemaNode = toSchemaNode(liquidAst);\n const parsed = toParsed(schemaNode, isStrict);\n const ast = toAst(schemaNode);\n return {\n type: types_1.ThemeSchemaType.AppBlock,\n offset: schemaNode instanceof Error ? 0 : schemaNode.blockStartPosition.end,\n name,\n parsed,\n ast,\n value: schemaNode instanceof Error ? '' : schemaNode.body.value,\n };\n}\nfunction toSchemaNode(ast) {\n var _a;\n if (ast instanceof Error)\n return ast;\n return ((_a = (0, visitor_1.visit)(ast, {\n LiquidRawTag(node) {\n if (node.name === 'schema') {\n return node;\n }\n },\n })[0]) !== null && _a !== void 0 ? _a : new Error('No schema tag found'));\n}\nfunction toStaticBlockDefs(ast) {\n if (ast instanceof Error)\n return [];\n return (0, visitor_1.visit)(ast, {\n LiquidTag(node) {\n if (node.name !== liquid_html_parser_1.NamedTags.content_for)\n return;\n if (typeof node.markup === 'string')\n return;\n const contentForMarkup = node.markup;\n if (contentForMarkup.contentForType.value !== 'block')\n return;\n const type = contentForMarkup.args.find((x) => x.name === 'type');\n const id = contentForMarkup.args.find((x) => x.name === 'id');\n if (!type || !id)\n return;\n if (type.value.type !== liquid_html_parser_1.NodeTypes.String)\n return;\n if (id.value.type !== liquid_html_parser_1.NodeTypes.String)\n return;\n return {\n type: type.value.value,\n id: id.value.value,\n };\n },\n });\n}\nfunction getSchema(context) {\n var _a, _b;\n const name = path.basename(context.file.uri, '.liquid');\n switch (true) {\n case isBlock(context.file.uri):\n return (_a = context.getBlockSchema) === null || _a === void 0 ? void 0 : _a.call(context, name);\n case isSection(context.file.uri):\n return (_b = context.getSectionSchema) === null || _b === void 0 ? void 0 : _b.call(context, name);\n default:\n return undefined;\n }\n}\nasync function getSchemaFromJSON(context) {\n const originalSource = context.file.source;\n const parsed = (0, json_1.parseJSON)(originalSource);\n const ast = (0, to_source_code_1.toJSONAST)(originalSource);\n return {\n parsed,\n ast,\n };\n}\nfunction toParsed(schemaNode, isStrict) {\n if (schemaNode instanceof Error)\n return schemaNode;\n return (0, json_1.parseJSON)(schemaNode.body.value, undefined, isStrict);\n}\nfunction toAst(schemaNode) {\n if (schemaNode instanceof Error)\n return schemaNode;\n return (0, to_source_code_1.toJSONAST)(schemaNode.body.value);\n}\n//# sourceMappingURL=to-schema.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toLiquidHTMLAST = toLiquidHTMLAST;\nexports.toJSONAST = toJSONAST;\nexports.toSourceCode = toSourceCode;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst parse_1 = require(\"./jsonc/parse\");\nconst path = __importStar(require(\"./path\"));\nconst types_1 = require(\"./types\");\nconst error_1 = require(\"./utils/error\");\nfunction toLiquidHTMLAST(source) {\n try {\n return (0, liquid_html_parser_1.toLiquidHtmlAST)(source);\n }\n catch (error) {\n return (0, error_1.asError)(error);\n }\n}\nfunction toJSONAST(source) {\n try {\n return (0, parse_1.toJSONNode)(source);\n }\n catch (error) {\n return (0, error_1.asError)(error);\n }\n}\nfunction toSourceCode(uri, source, version) {\n const isLiquid = uri.endsWith('.liquid');\n if (isLiquid) {\n return {\n uri: path.normalize(uri),\n source,\n type: types_1.SourceCodeType.LiquidHtml,\n ast: toLiquidHTMLAST(source),\n version,\n };\n }\n else {\n return {\n uri: path.normalize(uri),\n source,\n type: types_1.SourceCodeType.JSON,\n ast: toJSONAST(source),\n version,\n };\n }\n}\n//# sourceMappingURL=to-source-code.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConfigTarget = exports.Severity = exports.LiquidHtmlNodeTypes = exports.SourceCodeType = exports.Modes = exports.isLiteralNode = exports.isValueNode = exports.isPropertyNode = exports.isArrayNode = exports.isObjectNode = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nObject.defineProperty(exports, \"LiquidHtmlNodeTypes\", { enumerable: true, get: function () { return liquid_html_parser_1.NodeTypes; } });\n__exportStar(require(\"./jsonc/types\"), exports);\n__exportStar(require(\"./types/schema-prop-factory\"), exports);\n__exportStar(require(\"./types/theme-liquid-docs\"), exports);\n__exportStar(require(\"./types/theme-schemas\"), exports);\nconst isObjectNode = (node) => (node === null || node === void 0 ? void 0 : node.type) === 'Object';\nexports.isObjectNode = isObjectNode;\nconst isArrayNode = (node) => (node === null || node === void 0 ? void 0 : node.type) === 'Array';\nexports.isArrayNode = isArrayNode;\nconst isPropertyNode = (node) => (node === null || node === void 0 ? void 0 : node.type) === 'Property';\nexports.isPropertyNode = isPropertyNode;\nconst isValueNode = (node) => (node === null || node === void 0 ? void 0 : node.type) === 'Value';\nexports.isValueNode = isValueNode;\nconst isLiteralNode = (node) => (node === null || node === void 0 ? void 0 : node.type) === 'Literal';\nexports.isLiteralNode = isLiteralNode;\nexports.Modes = ['theme', 'app'];\nvar SourceCodeType;\n(function (SourceCodeType) {\n SourceCodeType[\"JSON\"] = \"JSON\";\n SourceCodeType[\"LiquidHtml\"] = \"LiquidHtml\";\n})(SourceCodeType || (exports.SourceCodeType = SourceCodeType = {}));\n/** The severity determines the icon and color of diagnostics */\nvar Severity;\n(function (Severity) {\n Severity[Severity[\"ERROR\"] = 0] = \"ERROR\";\n Severity[Severity[\"WARNING\"] = 1] = \"WARNING\";\n Severity[Severity[\"INFO\"] = 2] = \"INFO\";\n})(Severity || (exports.Severity = Severity = {}));\n/** The yaml configurations to target checks */\nvar ConfigTarget;\n(function (ConfigTarget) {\n ConfigTarget[\"All\"] = \"all\";\n ConfigTarget[\"Recommended\"] = \"recommended\";\n ConfigTarget[\"ThemeAppExtension\"] = \"theme-app-extension\";\n})(ConfigTarget || (exports.ConfigTarget = ConfigTarget = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SchemaProp = void 0;\nclass SchemaProp {\n constructor(options) {\n this.options = options;\n }\n /** Creates a string setting definition */\n static string(defaultValue) {\n return new SchemaProp({ type: 'string', defaultValue });\n }\n /** Creates a number setting definition */\n static number(defaultValue) {\n return new SchemaProp({ type: 'number', defaultValue });\n }\n /** Creates a boolean setting definition */\n static boolean(defaultValue) {\n return new SchemaProp({ type: 'boolean', defaultValue });\n }\n /**\n * Creates an object setting definition\n *\n * Usage:\n * ```\n * const schema = {\n * user: SchemaProp.object({\n * age: SchemaProp.number(),\n * name: SchemaProp.string(),\n * })\n * };\n * ```\n *\n * @returns a schema property definition for an object type\n */\n static object(\n /** The schema of the object's properties */\n properties, defaultValue) {\n const schema = new SchemaProp({ type: 'object', defaultValue, properties });\n return schema;\n }\n /**\n * Creates an array setting definition\n *\n * Usage:\n * ```\n * const schema = {\n * numbers: SchemaProp.array(SchemaProp.number(), [0, 1]),\n * strings: SchemaProp.array(SchemaProp.string(), [\"foo\", \"bar\"]),\n * users: SchemaProp.array(SchemaProp.object({\n * name: SchemaProp.string(),\n * age: SchemaProp.number(),\n * })),\n * };\n * ```\n *\n * @param itemType the type of the items in the array\n * @returns a schema property definition for an object type\n */\n static array(\n /** The schema prop type of the items in the array */\n itemType, defaultValue) {\n const schema = new SchemaProp({ type: 'array', defaultValue, itemType });\n return schema;\n }\n /**\n * A schema prop can be optional, making the setting T | undefined.\n *\n * Usage:\n * ```\n * const Schema = {\n * age: SchemaProp.number().optional(),\n * }\n * ```\n */\n optional() {\n this.options.optional = true;\n return this;\n }\n defaultValue() {\n return this.options.defaultValue;\n }\n}\nexports.SchemaProp = SchemaProp;\n//# sourceMappingURL=schema-prop-factory.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Setting = void 0;\nvar setting_1 = require(\"./setting\");\nObject.defineProperty(exports, \"Setting\", { enumerable: true, get: function () { return setting_1.Setting; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=setting.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=theme-liquid-docs.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ThemeSchemaType = void 0;\n__exportStar(require(\"./schemas\"), exports);\nvar ThemeSchemaType;\n(function (ThemeSchemaType) {\n ThemeSchemaType[\"AppBlock\"] = \"app-block\";\n ThemeSchemaType[\"Block\"] = \"block\";\n ThemeSchemaType[\"Section\"] = \"section\";\n})(ThemeSchemaType || (exports.ThemeSchemaType = ThemeSchemaType = {}));\n//# sourceMappingURL=theme-schemas.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.first = first;\nexports.last = last;\nexports.findLast = findLast;\nexports.findLastIndex = findLastIndex;\nexports.findLastAndIndex = findLastAndIndex;\nfunction first(arr) {\n return arr[0];\n}\nfunction last(arr, offset = 0) {\n return arr[arr.length - 1 + offset];\n}\nfunction findLast(array, pred) {\n return array[findLastIndex(array, pred)];\n}\nfunction findLastIndex(array, pred) {\n for (let i = array.length - 1; i >= 0; i--) {\n if (pred(array[i]))\n return i;\n }\n return -1;\n}\nfunction findLastAndIndex(array, pred) {\n const index = findLastIndex(array, pred);\n return [array[index], index];\n}\n//# sourceMappingURL=array.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getBlocks = getBlocks;\nexports.isInvalidPresetBlock = isInvalidPresetBlock;\nexports.isInvalidDefaultBlock = isInvalidDefaultBlock;\nexports.validateNestedBlocks = validateNestedBlocks;\nexports.reportWarning = reportWarning;\nexports.validateBlockFileExistence = validateBlockFileExistence;\nconst json_1 = require(\"../json\");\nconst file_utils_1 = require(\"./file-utils\");\nfunction getBlocks(validSchema) {\n var _a, _b;\n const rootLevelThemeBlocks = [];\n const rootLevelLocalBlocks = [];\n const presetLevelBlocks = {};\n const defaultLevelBlocks = [];\n const rootLevelBlocks = validSchema.blocks;\n const presets = validSchema.presets;\n // Helper function to categorize blocks\n function categorizeRootLevelBlocks(block, index) {\n if (!block)\n return;\n const hasName = 'name' in block;\n if (hasName) {\n rootLevelLocalBlocks.push({\n node: block,\n path: ['blocks', String(index), 'type'],\n });\n }\n else if (block.type !== '@app') {\n rootLevelThemeBlocks.push({\n node: block,\n path: ['blocks', String(index), 'type'],\n });\n }\n }\n function categorizePresetLevelBlocks(block, currentPath, depth = 0) {\n if (!block)\n return;\n if (!presetLevelBlocks[depth]) {\n presetLevelBlocks[depth] = [];\n }\n presetLevelBlocks[depth].push({\n node: block,\n path: currentPath.concat('type'),\n });\n if ('blocks' in block) {\n if (Array.isArray(block.blocks)) {\n block.blocks.forEach((nestedBlock, index) => {\n categorizePresetLevelBlocks(nestedBlock, currentPath.concat('blocks', String(index)), depth + 1);\n });\n }\n else if (typeof block.blocks === 'object' && block.blocks !== null) {\n Object.entries(block.blocks).forEach(([key, nestedBlock]) => {\n categorizePresetLevelBlocks(nestedBlock, currentPath.concat('blocks', key), depth + 1);\n });\n }\n }\n }\n function categorizeDefaultLevelBlocks(block, index) {\n const hasName = 'name' in block;\n if (hasName) {\n defaultLevelBlocks.push({\n node: block,\n path: ['default', 'blocks', String(index), 'type'],\n });\n }\n }\n if (Array.isArray(rootLevelBlocks)) {\n rootLevelBlocks.forEach((block, index) => {\n categorizeRootLevelBlocks(block, index);\n });\n }\n if (presets) {\n presets.forEach((preset, presetIndex) => {\n if ('blocks' in preset && preset.blocks) {\n if (Array.isArray(preset.blocks)) {\n preset.blocks.forEach((block, blockIndex) => {\n categorizePresetLevelBlocks(block, ['presets', String(presetIndex), 'blocks', String(blockIndex)], 0);\n });\n }\n else if (typeof preset.blocks === 'object') {\n Object.entries(preset.blocks).forEach(([key, block]) => {\n categorizePresetLevelBlocks(block, ['presets', String(presetIndex), 'blocks', key], 0);\n });\n }\n }\n });\n }\n if ('default' in validSchema) {\n (_b = (_a = validSchema.default) === null || _a === void 0 ? void 0 : _a.blocks) === null || _b === void 0 ? void 0 : _b.forEach((block, index) => {\n categorizeDefaultLevelBlocks(block, index);\n });\n }\n return {\n rootLevelThemeBlocks,\n rootLevelLocalBlocks,\n presetLevelBlocks,\n defaultLevelBlocks,\n };\n}\nfunction isInvalidPresetBlock(blockId, blockNode, rootLevelThemeBlocks, staticBlockDefs) {\n if (blockNode.static) {\n return !staticBlockDefs.some((block) => block.type === blockNode.type && block.id === blockId);\n }\n const isPrivateBlockType = blockNode.type.startsWith('_');\n const isThemeInRootLevel = rootLevelThemeBlocks.some((block) => block.node.type === '@theme');\n const needsExplicitRootBlock = isPrivateBlockType || !isThemeInRootLevel;\n const isPresetInRootLevel = rootLevelThemeBlocks.some((block) => block.node.type === blockNode.type);\n return !isPresetInRootLevel && needsExplicitRootBlock;\n}\nfunction isInvalidDefaultBlock(blockNode, rootLevelThemeBlocks) {\n const isPrivateBlockType = blockNode.type.startsWith('_');\n const isThemeInRootLevel = rootLevelThemeBlocks.some((block) => block.node.type === '@theme');\n const needsExplicitRootBlock = isPrivateBlockType || !isThemeInRootLevel;\n const isDefaultInRootLevel = rootLevelThemeBlocks.some((block) => block.node.type === blockNode.type);\n return !isDefaultInRootLevel && needsExplicitRootBlock;\n}\nasync function validateBlockTargeting(nestedBlock, nestedPath, context, parentNode, rootLevelThemeBlocks, allowedBlockTypes, offset, ast, staticBlockDefs = []) {\n const typeNode = (0, json_1.nodeAtPath)(ast, nestedPath);\n const blockId = 'id' in nestedBlock ? nestedBlock.id : nestedPath.at(-2);\n if (typeNode) {\n if (isInvalidPresetBlock(blockId, nestedBlock, rootLevelThemeBlocks, staticBlockDefs)) {\n const isStaticBlock = !!nestedBlock.static;\n const isPrivateBlock = nestedBlock.type.startsWith('_');\n const errorMessage = isStaticBlock\n ? `Could not find a static block of type \"${nestedBlock.type}\" with id \"${blockId}\" in \"blocks/${parentNode.type}.liquid\".`\n : isPrivateBlock\n ? `Private block type \"${nestedBlock.type}\" is not allowed in \"${parentNode.type}\" blocks.`\n : `Block type \"${nestedBlock.type}\" is not allowed in \"${parentNode.type}\" blocks. Allowed types are: ${allowedBlockTypes.join(', ')}.`;\n reportWarning(errorMessage, offset, typeNode, context);\n }\n const exists = await validateBlockFileExistence(nestedBlock.type, context);\n if (!exists) {\n reportWarning(`Theme block 'blocks/${nestedBlock.type}.liquid' does not exist.`, offset, typeNode, context);\n }\n }\n if ('blocks' in nestedBlock && nestedBlock.blocks) {\n validateNestedBlocks(context, nestedBlock, nestedBlock.blocks, nestedPath.slice(0, -1), offset, ast);\n }\n}\nasync function validateNestedBlocks(context, parentNode, nestedBlocks, currentPath, offset, ast) {\n var _a;\n if (!nestedBlocks)\n return;\n const parentSchema = await ((_a = context.getBlockSchema) === null || _a === void 0 ? void 0 : _a.call(context, parentNode.type));\n if (!parentSchema || parentSchema instanceof Error)\n return;\n const { validSchema, staticBlockDefs } = parentSchema;\n if (!validSchema || validSchema instanceof Error)\n return;\n const { rootLevelThemeBlocks } = getBlocks(validSchema);\n const allowedBlockTypes = rootLevelThemeBlocks.map((block) => block.node.type);\n if (Array.isArray(nestedBlocks)) {\n Promise.all(nestedBlocks.map((nestedBlock, index) => {\n const nestedPath = currentPath.concat(['blocks', String(index), 'type']);\n return validateBlockTargeting(nestedBlock, nestedPath, context, parentNode, rootLevelThemeBlocks, allowedBlockTypes, offset, ast, staticBlockDefs);\n }));\n }\n else if (typeof nestedBlocks === 'object') {\n Promise.all(Object.entries(nestedBlocks).map(([key, nestedBlock]) => {\n const nestedPath = currentPath.concat(['blocks', key, 'type']);\n return validateBlockTargeting(nestedBlock, nestedPath, context, parentNode, rootLevelThemeBlocks, allowedBlockTypes, offset, ast, staticBlockDefs);\n }));\n }\n}\nfunction reportWarning(message, offset, astNode, context) {\n context.report({\n message,\n startIndex: offset + (0, json_1.getLocStart)(astNode),\n endIndex: offset + (0, json_1.getLocEnd)(astNode),\n });\n}\nasync function validateBlockFileExistence(blockType, context) {\n if (blockType === '@theme' || blockType === '@app') {\n return true;\n }\n const blockPath = `blocks/${blockType}.liquid`;\n return await (0, file_utils_1.doesFileExist)(context, blockPath);\n}\n//# sourceMappingURL=block.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isError = isError;\nexports.asError = asError;\nconst PARSE_ERROR_MESSAGES = {\n [1 /* ParseErrorCode.InvalidSymbol */]: 'Invalid symbol found in the input.',\n [2 /* ParseErrorCode.InvalidNumberFormat */]: 'Invalid number format detected.',\n [3 /* ParseErrorCode.PropertyNameExpected */]: 'Property name expected but not found.',\n [4 /* ParseErrorCode.ValueExpected */]: 'A value was expected but not found.',\n [5 /* ParseErrorCode.ColonExpected */]: 'Colon `:` expected after the property name.',\n [6 /* ParseErrorCode.CommaExpected */]: 'Comma `,` expected between elements and properties.',\n [7 /* ParseErrorCode.CloseBraceExpected */]: 'Closing brace `}` expected.',\n [8 /* ParseErrorCode.CloseBracketExpected */]: 'Closing bracket `]` expected.',\n [9 /* ParseErrorCode.EndOfFileExpected */]: 'End of file expected.',\n [10 /* ParseErrorCode.InvalidCommentToken */]: 'Invalid comment token found.',\n [11 /* ParseErrorCode.UnexpectedEndOfComment */]: 'Unexpected end of comment.',\n [12 /* ParseErrorCode.UnexpectedEndOfString */]: 'Unexpected end of string.',\n [13 /* ParseErrorCode.UnexpectedEndOfNumber */]: 'Unexpected end of number.',\n [14 /* ParseErrorCode.InvalidUnicode */]: 'Invalid Unicode escape sequence.',\n [15 /* ParseErrorCode.InvalidEscapeCharacter */]: 'Invalid escape character found.',\n [16 /* ParseErrorCode.InvalidCharacter */]: 'Invalid character found in the input.',\n};\nfunction isError(error) {\n return error instanceof Error;\n}\nfunction asError(error) {\n if (error instanceof Error) {\n return error;\n }\n if (typeof error === 'string') {\n return new Error(error);\n }\n if (error && typeof error === 'object' && 'error' in error) {\n return new Error(getParseErrorMessage(error));\n }\n if (error && typeof error.toString === 'function') {\n return new Error(error.toString());\n }\n return new Error('An unknown error occurred');\n}\nfunction getParseErrorMessage(parseError) {\n return PARSE_ERROR_MESSAGES[parseError.error] || 'Unknown parse error.';\n}\n//# sourceMappingURL=error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.doesFileExist = doesFileExist;\nexports.doesFileExceedThreshold = doesFileExceedThreshold;\nexports.getFileSize = getFileSize;\nexports.hasRemoteAssetSizeExceededThreshold = hasRemoteAssetSizeExceededThreshold;\nexports.hasLocalAssetSizeExceededThreshold = hasLocalAssetSizeExceededThreshold;\nconst cross_fetch_1 = require(\"cross-fetch\");\nasync function doesFileExist(context, relativePath) {\n const uri = context.toUri(relativePath);\n return await context.fileExists(uri);\n}\nasync function doesFileExceedThreshold(context, relativePath, thresholdInBytes) {\n const uri = context.toUri(relativePath);\n if (!context.fileSize)\n return [false, 0];\n const fileSize = await context.fileSize(uri);\n return [fileSize > thresholdInBytes, fileSize];\n}\nasync function getFileSize(url) {\n try {\n const response = await (0, cross_fetch_1.fetch)(url, { method: 'HEAD' });\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n const fileSize = response.headers.get('Content-Length');\n if (fileSize === null)\n return 0;\n return parseFloat(fileSize);\n }\n catch (error) {\n return 0;\n }\n}\nasync function hasRemoteAssetSizeExceededThreshold(url, thresholdInBytes) {\n const fileSize = await getFileSize(url);\n return fileSize > thresholdInBytes;\n}\nasync function hasLocalAssetSizeExceededThreshold(context, relativePath, thresholdInBytes) {\n const fileExists = await doesFileExist(context, relativePath);\n if (!fileExists)\n return false;\n const [fileExceedsThreshold, _fileSize] = await doesFileExceedThreshold(context, relativePath, thresholdInBytes);\n return fileExceedsThreshold;\n}\n//# sourceMappingURL=file-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./object\"), exports);\n__exportStar(require(\"./array\"), exports);\n__exportStar(require(\"./position\"), exports);\n__exportStar(require(\"./error\"), exports);\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./memo\"), exports);\n__exportStar(require(\"./indexBy\"), exports);\n__exportStar(require(\"./block\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.indexBy = indexBy;\n/**\n * Returns an Record representation of the collection indexed by keyFn. Assumes\n * the key function returns unique results.\n */\nfunction indexBy(keyFn, collection) {\n const record = {};\n for (const item of collection) {\n record[keyFn(item)] = item;\n }\n return record;\n}\n//# sourceMappingURL=indexBy.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isContentForBlock = isContentForBlock;\nfunction isContentForBlock(nodeMarkup) {\n if (typeof nodeMarkup === 'string') {\n return false;\n }\n return nodeMarkup.contentForType.value === 'block';\n}\n//# sourceMappingURL=markup.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.memo = memo;\nexports.memoize = memoize;\nconst Unset = Symbol('Unset');\n/** Returns a cached version of a function. Only caches one result. */\nfunction memo(fn) {\n let cachedValue = Unset;\n const memoedFunction = (...args) => {\n if (cachedValue === Unset) {\n cachedValue = fn(...args);\n }\n return cachedValue;\n };\n memoedFunction.clearCache = () => {\n cachedValue = Unset;\n };\n return memoedFunction;\n}\n/**\n * Returns a function that is cached-by-keyFn(argument)\n *\n * e.g.\n *\n * const expensiveFunction = (thing: Thing) => ...\n * const thingToString = (thing: Thing): string => ...\n * const fastOnSubsequentCalls = memoize(\n * expensiveFunction,\n * thingToString,\n * );\n *\n * // slow first run\n * fastOnSubsequentCalls(thing1);\n *\n * // fast subsequent ones\n * fastOnSubsequentCalls(thing1);\n * fastOnSubsequentCalls(thing1);\n */\nfunction memoize(fn, keyFn) {\n let cache = {};\n const memoedFunction = (...args) => {\n const key = keyFn(...args);\n if (!cache[key]) {\n cache[key] = fn(...args);\n }\n return cache[key];\n };\n memoedFunction.force = (...args) => {\n memoedFunction.invalidate(...args);\n return memoedFunction(...args);\n };\n memoedFunction.invalidate = (...args) => {\n const key = keyFn(...args);\n delete cache[key];\n };\n memoedFunction.clearCache = () => {\n cache = {};\n };\n return memoedFunction;\n}\n//# sourceMappingURL=memo.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deepGet = deepGet;\nfunction deepGet(obj, path) {\n return path.reduce((acc, key) => acc === null || acc === void 0 ? void 0 : acc[key], obj);\n}\n//# sourceMappingURL=object.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getPosition = getPosition;\nexports.getOffset = getOffset;\nconst line_column_1 = __importDefault(require(\"line-column\"));\nfunction getPosition(source, index) {\n const lineCol = (0, line_column_1.default)(source, { origin: 0 }).fromIndex(Math.min(index, source.length - 1));\n return {\n index,\n line: lineCol ? lineCol.line : -1,\n character: lineCol ? lineCol.col : -1,\n };\n}\nfunction getOffset(source, line, column) {\n return (0, line_column_1.default)(source, { origin: 1 }).toIndex(line, column);\n}\n//# sourceMappingURL=position.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertNever = assertNever;\n/**\n * assertNever(x: never);\n *\n * You use this in the default case of switch statements to make sure you\n * exhaust your discriminated union.\n *\n * If you don't, typescript is going to complain that assertNever is being\n * called with a non-never value.\n *\n * @example\n * switch (fruit.type) {\n * case BANANA: // ...\n * case APPLE: // ...\n * default: return assertNever(fruit.type);\n * }\n */\nfunction assertNever(x) {\n throw new Error(`We should never reach this code, you are missing a case for ${x}`);\n}\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.visit = visit;\nexports.forEachChildNodes = forEachChildNodes;\nexports.findCurrentNode = findCurrentNode;\nexports.findJSONNode = findJSONNode;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nfunction isNode(x) {\n return x !== null && typeof x === 'object' && typeof x.type === 'string';\n}\n/**\n * @example\n *\n * const links = visit<'LiquidHTML', DocumentLink>(liquidAST, {\n * 'LiquidTag': (node, ancestors) => {\n * if (node.name === 'render' || node.name === 'include') {\n * return DocumentLink.create(...);\n * }\n * },\n * })\n *\n * Note: this is the ChatGPT-rewritten version of the recursive method.\n * If you want to refactor it, just ask it to do it for you :P\n */\nfunction visit(node, visitor) {\n const results = [];\n const stack = [{ node, lineage: [] }];\n const pushStack = (node, lineage) => stack.push({ node, lineage });\n while (stack.length > 0) {\n // Visit current node\n const { node, lineage } = stack.pop();\n const visitNode = visitor[node.type];\n const result = visitNode ? visitNode(node, lineage) : undefined;\n if (Array.isArray(result)) {\n results.push(...result);\n }\n else if (result !== undefined) {\n results.push(result);\n }\n // Enqueue child nodes\n forEachChildNodes(node, lineage.concat(node), pushStack);\n }\n return results;\n}\nfunction forEachChildNodes(node, lineage, execute) {\n for (const value of Object.values(node)) {\n if (Array.isArray(value)) {\n for (let i = value.length - 1; i >= 0; i--) {\n execute(value[i], lineage);\n }\n }\n else if (isNode(value)) {\n execute(value, lineage);\n }\n }\n}\nfunction findCurrentNode(ast, cursorPosition) {\n let prev;\n let current = ast;\n let ancestors = [];\n while (current !== prev) {\n prev = current;\n forEachChildNodes(current, ancestors.concat(current), (child, lineage) => {\n if (isUnclosed(child) ||\n (isCovered(child, cursorPosition) && size(child) <= size(current))) {\n current = child;\n ancestors = lineage;\n }\n });\n }\n return [current, ancestors];\n}\nfunction isCovered(node, offset) {\n switch (node.type) {\n // `product.█title` should cover `title`\n case liquid_html_parser_1.NodeTypes.String:\n // `if █cond` should cover `cond`\n case liquid_html_parser_1.NodeTypes.VariableLookup:\n // `if █cond and other` should cover `cond`\n case liquid_html_parser_1.NodeTypes.LogicalExpression:\n // `if █cond < other` should cover `cond`\n case liquid_html_parser_1.NodeTypes.Comparison:\n return node.position.start <= offset && offset <= node.position.end;\n // default case avoids ambiguity by having the cursor in the [excluded, included] range\n default:\n return node.position.start < offset && offset <= node.position.end;\n }\n}\nfunction size(node) {\n return node.position.end - node.position.start;\n}\nfunction isUnclosed(node) {\n var _a;\n if ('blockEndPosition' in node) {\n return ((_a = node.blockEndPosition) === null || _a === void 0 ? void 0 : _a.end) === -1;\n }\n else if ('children' in node) {\n return node.children.length > 0;\n }\n return false;\n}\nfunction findJSONNode(ast, cursorPosition) {\n let prev;\n let current = ast;\n let ancestors = [];\n const offset = cursorPosition;\n while (current !== prev) {\n prev = current;\n forEachChildNodes(current, ancestors.concat(current), (child, lineage) => {\n if (child.loc.start.offset <= offset && offset < child.loc.end.offset) {\n current = child;\n ancestors = lineage;\n }\n });\n }\n return [current, ancestors];\n}\n//# sourceMappingURL=visitor.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.visitJSON = exports.visitLiquid = void 0;\nvar liquid_1 = require(\"./liquid\");\nObject.defineProperty(exports, \"visitLiquid\", { enumerable: true, get: function () { return liquid_1.visitLiquid; } });\nvar json_1 = require(\"./json\");\nObject.defineProperty(exports, \"visitJSON\", { enumerable: true, get: function () { return json_1.visitJSON; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.visitJSON = visitJSON;\nfunction isJSONNode(thing) {\n return !!thing && typeof thing === 'object' && 'type' in thing;\n}\nconst nonTraversableProperties = new Set(['loc']);\nasync function visitJSON(node, check) {\n const stack = [{ node, ancestors: [] }];\n let method;\n while (stack.length > 0) {\n const { node, ancestors } = stack.pop();\n const lineage = ancestors.concat(node);\n method = check[node.type];\n if (method)\n await method(node, ancestors);\n for (const key in node) {\n if (!node.hasOwnProperty(key) || nonTraversableProperties.has(key)) {\n continue;\n }\n const value = node[key];\n if (Array.isArray(value)) {\n for (let i = value.length - 1; i >= 0; i--) {\n const item = value[i];\n if (isJSONNode(item)) {\n stack.push({ node: item, ancestors: lineage });\n }\n }\n }\n else if (isJSONNode(value)) {\n stack.push({ node: value, ancestors: lineage });\n }\n }\n method = check[`${node.type}:exit`];\n if (method)\n await method(node, ancestors);\n }\n}\n//# sourceMappingURL=json.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.visitLiquid = visitLiquid;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nfunction isLiquidHtmlNode(thing) {\n return !!thing && typeof thing === 'object' && 'type' in thing;\n}\nasync function visitLiquid(node, check) {\n const stack = [{ node, ancestors: [] }];\n let method;\n while (stack.length > 0) {\n const { node, ancestors } = stack.pop();\n const lineage = ancestors.concat(node);\n method = check[node.type];\n if (method)\n await method(node, ancestors);\n for (const key in node) {\n if (!node.hasOwnProperty(key) || liquid_html_parser_1.nonTraversableProperties.has(key)) {\n continue;\n }\n const value = node[key];\n if (Array.isArray(value)) {\n for (let i = value.length - 1; i >= 0; i--) {\n const item = value[i];\n if (isLiquidHtmlNode(item)) {\n stack.push({ node: item, ancestors: lineage });\n }\n }\n }\n else if (isLiquidHtmlNode(value)) {\n stack.push({ node: value, ancestors: lineage });\n }\n }\n method = check[`${node.type}:exit`];\n if (method)\n await method(node, ancestors);\n }\n}\n//# sourceMappingURL=liquid.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getWebComponentMap = getWebComponentMap;\nexports.findWebComponentReferences = findWebComponentReferences;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst acorn_walk_1 = require(\"acorn-walk\");\n/**\n * Regular expression for web component names\n *\n * Based on the HTML specification for valid custom element names.\n *\n * https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n */\nconst wcre = /^[a-z][-.\\d_a-z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]*([-][-.\\d_a-z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]*)$/u;\n/**\n * Find all the web component definitions from the JavaScript files in the\n * assets directory.\n *\n * From those, we'll be able to map `<custom-element-name>` to the definition in\n * the corresponding asset file.\n */\nasync function getWebComponentMap(rootUri, { fs, getSourceCode }) {\n const webComponentDefs = new Map();\n const assetRoot = theme_check_common_1.path.join(rootUri, 'assets');\n const jsFiles = await (0, theme_check_common_1.recursiveReadDirectory)(fs, assetRoot, ([fileName]) => fileName.endsWith('.js'));\n await Promise.all(jsFiles.map((uri) => findWebComponentReferences(uri, assetRoot, getSourceCode, webComponentDefs)));\n return webComponentDefs;\n}\nasync function findWebComponentReferences(uri, assetRoot, getSourceCode, result) {\n const sourceCode = await getSourceCode(uri);\n if (sourceCode.type !== 'javascript') {\n return;\n }\n const ast = sourceCode.ast;\n if (ast instanceof Error) {\n return;\n }\n for (const node of ast.body) {\n (0, acorn_walk_1.ancestor)(node, {\n Literal(node, _state, ancestors) {\n if (typeof node.value === 'string' && wcre.test(node.value)) {\n // Making sure we're looking at customElements.define calls\n const parentNode = ancestors.at(-2);\n if (!parentNode)\n return;\n if (parentNode.type !== 'CallExpression')\n return;\n const callee = parentNode.callee;\n if (callee.type !== 'MemberExpression')\n return;\n const property = callee.property;\n if (property.type !== 'Identifier')\n return;\n if (property.name !== 'define')\n return;\n result.set(node.value, {\n assetName: theme_check_common_1.path.relative(uri, assetRoot),\n range: [property.start, node.end],\n });\n }\n return null;\n },\n });\n }\n}\n//# sourceMappingURL=getWebComponentMap.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.augmentDependencies = augmentDependencies;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst toSourceCode_1 = require(\"../toSourceCode\");\nconst utils_1 = require(\"../utils\");\nfunction augmentDependencies(rootUri, ideps) {\n var _a;\n return {\n fs: ideps.fs,\n getBlockSchema: (0, theme_check_common_1.memoize)(ideps.getBlockSchema, utils_1.identity),\n getSectionSchema: (0, theme_check_common_1.memoize)(ideps.getSectionSchema, utils_1.identity),\n // parse at most once\n getSourceCode: (0, theme_check_common_1.memoize)((_a = ideps.getSourceCode) !== null && _a !== void 0 ? _a : async function defaultGetSourceCode(uri) {\n const contents = await ideps.fs.readFile(uri);\n return (0, toSourceCode_1.toSourceCode)(uri, contents);\n }, utils_1.identity),\n getWebComponentDefinitionReference: ideps.getWebComponentDefinitionReference,\n getThemeBlockNames: (0, theme_check_common_1.memo)(() => (0, theme_check_common_1.recursiveReadDirectory)(ideps.fs, theme_check_common_1.path.join(rootUri, 'blocks'), ([uri]) => uri.endsWith('.liquid')).then((uris) => uris.map((uri) => theme_check_common_1.path.basename(uri, '.liquid')))),\n };\n}\n//# sourceMappingURL=augment.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildThemeGraph = buildThemeGraph;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst augment_1 = require(\"./augment\");\nconst module_1 = require(\"./module\");\nconst traverse_1 = require(\"./traverse\");\nasync function buildThemeGraph(rootUri, ideps, entryPoints) {\n const deps = (0, augment_1.augmentDependencies)(rootUri, ideps);\n entryPoints =\n entryPoints !== null && entryPoints !== void 0 ? entryPoints : (await (0, theme_check_common_1.recursiveReadDirectory)(deps.fs, rootUri, ([uri]) => {\n // Templates are entry points in the theme graph.\n const isTemplateFile = uri.startsWith(theme_check_common_1.path.join(rootUri, 'templates'));\n // Since any section file can be rendered directly by the Section Rendering API,\n // we consider all section files as entry points.\n const isSectionFile = uri.startsWith(theme_check_common_1.path.join(rootUri, 'sections')) && uri.endsWith('.liquid');\n return isTemplateFile || isSectionFile;\n }));\n const graph = {\n entryPoints: [],\n modules: {},\n rootUri,\n };\n graph.entryPoints = entryPoints\n .map((uri) => (0, module_1.getModule)(graph, uri))\n .filter((x) => x !== undefined);\n await Promise.all(graph.entryPoints.map((entry) => (0, traverse_1.traverseModule)(entry, graph, deps)));\n return graph;\n}\n//# sourceMappingURL=build.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getModule = getModule;\nexports.getTemplateModule = getTemplateModule;\nexports.getThemeBlockModule = getThemeBlockModule;\nexports.getSectionModule = getSectionModule;\nexports.getSectionGroupModule = getSectionGroupModule;\nexports.getAssetModule = getAssetModule;\nexports.getSnippetModule = getSnippetModule;\nexports.getLayoutModule = getLayoutModule;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst types_1 = require(\"../types\");\nconst utils_1 = require(\"../utils\");\n/**\n * We're using a ModuleCache to prevent race conditions with traverse.\n *\n * e.g. if we have two modules that depend on the same 'assets/foo.js' file and\n * that they somehow depend on it before it gets traversed (and thus added to the\n * graphs' modules record), we want to avoid creating two different module objects\n * that represent the same file.\n *\n * We're using a WeakMap<ThemeGraph> to cache modules so that if the theme graph\n * gets garbage collected, the module cache will also be garbage collected.\n *\n * This allows us to have a module cache without changing the API of the\n * ThemeGraph (no need for a `visited` property on modules, etc.)\n */\nconst ModuleCache = new WeakMap();\nfunction getModule(themeGraph, uri) {\n const cache = getCache(themeGraph);\n if (cache.has(uri)) {\n return cache.get(uri);\n }\n const relativePath = theme_check_common_1.path.relative(uri, themeGraph.rootUri);\n switch (true) {\n case relativePath.startsWith('assets'): {\n return getAssetModule(themeGraph, theme_check_common_1.path.basename(uri));\n }\n case relativePath.startsWith('blocks'): {\n return getThemeBlockModule(themeGraph, theme_check_common_1.path.basename(uri, '.liquid'));\n }\n case relativePath.startsWith('layout'): {\n return getLayoutModule(themeGraph, theme_check_common_1.path.basename(uri, '.liquid'));\n }\n case relativePath.startsWith('sections'): {\n if (relativePath.endsWith('.json')) {\n return getSectionGroupModule(themeGraph, theme_check_common_1.path.basename(uri, '.json'));\n }\n return getSectionModule(themeGraph, theme_check_common_1.path.basename(uri, '.liquid'));\n }\n case relativePath.startsWith('snippets'): {\n return getSnippetModule(themeGraph, theme_check_common_1.path.basename(uri, '.liquid'));\n }\n case relativePath.startsWith('templates'): {\n return getTemplateModule(themeGraph, uri);\n }\n }\n}\nfunction getTemplateModule(themeGraph, uri) {\n const extension = (0, utils_1.extname)(uri);\n switch (extension) {\n case 'json': {\n return module(themeGraph, {\n type: \"JSON\" /* ModuleType.Json */,\n kind: \"template\" /* JsonModuleKind.Template */,\n dependencies: [],\n references: [],\n uri: uri,\n });\n }\n case 'liquid': {\n return module(themeGraph, {\n type: \"Liquid\" /* ModuleType.Liquid */,\n kind: \"template\" /* LiquidModuleKind.Template */,\n dependencies: [],\n references: [],\n uri: uri,\n });\n }\n default: {\n throw new Error(`Unknown template type for ${uri}`);\n }\n }\n}\nfunction getThemeBlockModule(themeGraph, blockType) {\n const uri = theme_check_common_1.path.join(themeGraph.rootUri, 'blocks', `${blockType}.liquid`);\n return module(themeGraph, {\n type: \"Liquid\" /* ModuleType.Liquid */,\n kind: \"block\" /* LiquidModuleKind.Block */,\n dependencies: [],\n references: [],\n uri,\n });\n}\nfunction getSectionModule(themeGraph, sectionType) {\n const uri = theme_check_common_1.path.join(themeGraph.rootUri, 'sections', `${sectionType}.liquid`);\n return module(themeGraph, {\n type: \"Liquid\" /* ModuleType.Liquid */,\n kind: \"section\" /* LiquidModuleKind.Section */,\n dependencies: [],\n references: [],\n uri,\n });\n}\nfunction getSectionGroupModule(themeGraph, sectionGroupType) {\n const uri = theme_check_common_1.path.join(themeGraph.rootUri, 'sections', `${sectionGroupType}.json`);\n return module(themeGraph, {\n type: \"JSON\" /* ModuleType.Json */,\n kind: \"section-group\" /* JsonModuleKind.SectionGroup */,\n dependencies: [],\n references: [],\n uri,\n });\n}\nfunction getAssetModule(themeGraph, asset) {\n const extension = (0, utils_1.extname)(asset);\n let type = undefined;\n if (types_1.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(extension)) {\n type = \"Image\" /* ModuleType.Image */;\n }\n else if (extension === 'js') {\n type = \"JavaScript\" /* ModuleType.JavaScript */;\n }\n else if (extension === 'css') {\n type = \"CSS\" /* ModuleType.Css */;\n }\n else if (extension === 'svg') {\n type = \"SVG\" /* ModuleType.Svg */;\n }\n if (!type) {\n return undefined;\n }\n return module(themeGraph, {\n type,\n kind: 'unused',\n dependencies: [],\n references: [],\n uri: theme_check_common_1.path.join(themeGraph.rootUri, 'assets', asset),\n });\n}\nfunction getSnippetModule(themeGraph, snippet) {\n const uri = theme_check_common_1.path.join(themeGraph.rootUri, 'snippets', `${snippet}.liquid`);\n return module(themeGraph, {\n type: \"Liquid\" /* ModuleType.Liquid */,\n kind: \"snippet\" /* LiquidModuleKind.Snippet */,\n uri: uri,\n dependencies: [],\n references: [],\n });\n}\nfunction getLayoutModule(themeGraph, layoutName = 'theme') {\n if (layoutName === false)\n return undefined;\n if (layoutName === undefined)\n layoutName = 'theme';\n const uri = theme_check_common_1.path.join(themeGraph.rootUri, 'layout', `${layoutName}.liquid`);\n return module(themeGraph, {\n type: \"Liquid\" /* ModuleType.Liquid */,\n kind: \"layout\" /* LiquidModuleKind.Layout */,\n uri: uri,\n dependencies: [],\n references: [],\n });\n}\nfunction getCache(themeGraph) {\n if (!ModuleCache.has(themeGraph)) {\n ModuleCache.set(themeGraph, new Map());\n }\n return ModuleCache.get(themeGraph);\n}\nfunction module(themeGraph, mod) {\n const cache = getCache(themeGraph);\n if (!cache.has(mod.uri)) {\n cache.set(mod.uri, mod);\n }\n return cache.get(mod.uri);\n}\n//# sourceMappingURL=module.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serializeThemeGraph = serializeThemeGraph;\nfunction serializeThemeGraph(graph) {\n const nodes = Object.values(graph.modules).map((module) => ({\n uri: module.uri,\n type: module.type,\n kind: module.kind,\n ...('exists' in module ? { exists: module.exists } : {}),\n }));\n const edges = Object.values(graph.modules).flatMap((module) => module.dependencies);\n return {\n rootUri: graph.rootUri,\n nodes,\n edges,\n };\n}\n//# sourceMappingURL=serialize.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.traverseModule = traverseModule;\nexports.bind = bind;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst utils_1 = require(\"../utils\");\nconst module_1 = require(\"./module\");\nasync function traverseModule(module, themeGraph, deps) {\n // If the module is already traversed, skip it\n if (themeGraph.modules[module.uri]) {\n return;\n }\n // Signal to all users that the file is being traversed\n // This will prevent multiple traversals of the same file\n themeGraph.modules[module.uri] = module;\n // Check if the module exists on disk\n module.exists = await (0, utils_1.exists)(deps.fs, module.uri);\n // If the module doesn't exist, we can't traverse it\n if (!module.exists) {\n return;\n }\n switch (module.type) {\n case \"Liquid\" /* ModuleType.Liquid */: {\n return traverseLiquidModule(module, themeGraph, deps);\n }\n case \"JSON\" /* ModuleType.Json */: {\n return traverseJsonModule(module, themeGraph, deps);\n }\n case \"JavaScript\" /* ModuleType.JavaScript */: {\n return; // TODO graph import/exports ?\n }\n case \"CSS\" /* ModuleType.Css */:\n case \"SVG\" /* ModuleType.Svg */:\n case \"Image\" /* ModuleType.Image */: {\n return; // Nothing to do??\n }\n default: {\n return (0, utils_1.assertNever)(module);\n }\n }\n}\nasync function traverseLiquidModule(module, themeGraph, deps) {\n const sourceCode = await deps.getSourceCode(module.uri);\n if (sourceCode.ast instanceof Error)\n return; // can't visit what you can't parse\n const visitor = {\n // {{ 'theme.js' | asset_url }}\n // {{ 'image.png' | asset_img_url }}\n // {{ 'icon.svg' | inline_asset_content }}\n LiquidFilter: (node, ancestors) => {\n if (['asset_url', 'asset_img_url', 'inline_asset_content'].includes(node.name)) {\n const parentNode = ancestors[ancestors.length - 1];\n if (parentNode.type !== liquid_html_parser_1.NodeTypes.LiquidVariable)\n return;\n if (parentNode.expression.type !== liquid_html_parser_1.NodeTypes.String)\n return;\n if (parentNode.filters[0] !== node)\n return;\n const asset = parentNode.expression.value;\n const module = (0, module_1.getAssetModule)(themeGraph, asset);\n if (!module)\n return;\n return {\n target: module,\n sourceRange: [parentNode.position.start, parentNode.position.end],\n };\n }\n },\n // {% content_for 'block', type: 'staticBlockName', id: 'id' %}\n ContentForMarkup: (node, ancestors) => {\n const parentNode = ancestors.at(-1);\n if (node.contentForType.value !== 'block')\n return;\n const blockTypeArg = node.args.find((arg) => arg.name === 'type');\n if (!blockTypeArg)\n return;\n const blockTypeValue = blockTypeArg.value;\n if (blockTypeValue.type !== liquid_html_parser_1.NodeTypes.String)\n return;\n const blockType = blockTypeValue.value;\n return {\n target: (0, module_1.getThemeBlockModule)(themeGraph, blockType),\n sourceRange: [parentNode.position.start, node.position.end],\n };\n },\n // <custom-element></custom-element>\n HtmlElement: (node) => {\n if (node.name.length !== 1)\n return;\n if (node.name[0].type !== liquid_html_parser_1.NodeTypes.TextNode)\n return;\n const nodeNameNode = node.name[0];\n const nodeName = nodeNameNode.value;\n if (!nodeName.includes('-'))\n return; // skip non-custom-elements\n const result = deps.getWebComponentDefinitionReference(nodeName);\n if (!result)\n return;\n const { assetName, range } = result;\n const module = (0, module_1.getAssetModule)(themeGraph, assetName);\n if (!module)\n return;\n return {\n target: module,\n sourceRange: [node.blockStartPosition.start, nodeNameNode.position.end],\n targetRange: range,\n };\n },\n // {% render 'snippet' %}\n RenderMarkup: (node, ancestors) => {\n const snippet = node.snippet;\n const tag = ancestors.at(-1);\n if (!(0, utils_1.isString)(snippet) && snippet.type === liquid_html_parser_1.NodeTypes.String) {\n return {\n target: (0, module_1.getSnippetModule)(themeGraph, snippet.value),\n sourceRange: [tag.position.start, tag.position.end],\n };\n }\n },\n LiquidTag: (node) => {\n switch (node.name) {\n // {% sections 'section-group' %}\n case liquid_html_parser_1.NamedTags.sections: {\n if (!(0, utils_1.isString)(node.markup)) {\n const sectionGroupType = node.markup.value;\n return {\n target: (0, module_1.getSectionGroupModule)(themeGraph, sectionGroupType),\n sourceRange: [node.position.start, node.position.end],\n };\n }\n }\n // {% section 'section' %}\n case liquid_html_parser_1.NamedTags.section: {\n if (!(0, utils_1.isString)(node.markup)) {\n const sectionType = node.markup.value;\n return {\n target: (0, module_1.getSectionModule)(themeGraph, sectionType),\n sourceRange: [node.position.start, node.position.end],\n };\n }\n }\n }\n },\n };\n const references = (0, theme_check_common_1.visit)(sourceCode.ast, visitor);\n for (const reference of references) {\n bind(module, reference.target, {\n sourceRange: reference.sourceRange,\n targetRange: reference.targetRange,\n });\n }\n const modules = (0, utils_1.unique)(references.map((ref) => ref.target));\n const promises = modules.map((mod) => traverseModule(mod, themeGraph, deps));\n // Look at schema references if any\n if (module.kind === \"section\" /* LiquidModuleKind.Section */) {\n const sectionName = theme_check_common_1.path.basename(module.uri, '.liquid');\n const sectionSchema = await deps.getSectionSchema(sectionName);\n promises.push(traverseLiquidSchema(sectionSchema, module, themeGraph, deps));\n }\n else if (module.kind === \"block\" /* LiquidModuleKind.Block */) {\n const blockName = theme_check_common_1.path.basename(module.uri, '.liquid');\n const blockSchema = await deps.getBlockSchema(blockName);\n promises.push(traverseLiquidSchema(blockSchema, module, themeGraph, deps));\n }\n return Promise.all(promises);\n}\nasync function traverseLiquidSchema(schema, module, themeGraph, deps) {\n if (!schema)\n return;\n const isSection = module.kind === \"section\" /* LiquidModuleKind.Section */;\n const hasLocalBlocks = isSection && (await (0, utils_1.acceptsLocalBlocks)(theme_check_common_1.path.basename(module.uri, '.liquid'), deps));\n if (hasLocalBlocks)\n return;\n const { ast, validSchema } = schema;\n if (validSchema instanceof Error || ast instanceof Error)\n return;\n const promises = [];\n // Traverse the blocks\n if (validSchema.blocks) {\n promises.push(traverseSchemaBlocks(schema, module, ast, validSchema.blocks, themeGraph, deps));\n }\n // Traverse the presets\n if (validSchema.presets) {\n promises.push(traverseSchemaPresets(schema, module, ast, validSchema.presets, themeGraph, deps));\n }\n // Traverse section.default if it exists\n if ('default' in validSchema && validSchema.default) {\n promises.push(traverseSchemaDefault(schema, module, ast, validSchema.default, themeGraph, deps));\n }\n return Promise.all(promises);\n}\nasync function traverseSchemaBlocks(schema, module, ast, blocks, themeGraph, deps) {\n const promises = [];\n for (const [i, blockDef] of Object.entries(blocks)) {\n const nodePath = ['blocks', i];\n const node = (0, theme_check_common_1.nodeAtPath)(ast, nodePath);\n const typeProperty = node.children.find((child) => child.key.value === 'type');\n if (!typeProperty)\n continue;\n const sourceRange = [\n schema.offset + typeProperty.loc.start.offset,\n schema.offset + typeProperty.loc.end.offset,\n ];\n // blocks: [{ \"type\": \"@theme\" }, { \"type\": \"custom-block\" }]\n switch (blockDef.type) {\n case '@theme': {\n const publicBlocks = await deps\n .getThemeBlockNames()\n .then((blocks) => blocks.filter((name) => !name.startsWith('_')));\n for (const publicBlock of publicBlocks) {\n const blockModule = (0, module_1.getThemeBlockModule)(themeGraph, theme_check_common_1.path.basename(publicBlock, '.liquid'));\n bind(module, blockModule, { sourceRange, type: 'indirect' });\n promises.push(traverseModule(blockModule, themeGraph, deps));\n }\n break;\n }\n case '@app': {\n break;\n }\n default: {\n const blockModule = (0, module_1.getThemeBlockModule)(themeGraph, blockDef.type);\n bind(module, blockModule, { sourceRange });\n promises.push(traverseModule(blockModule, themeGraph, deps));\n }\n }\n }\n return Promise.all(promises);\n}\nasync function traverseSchemaPresets(schema, module, ast, presets, themeGraph, deps) {\n const promises = [];\n for (const [i, preset] of presets.entries()) {\n if (!('blocks' in preset))\n continue;\n // Iterate over array entries or object entries depending on how the blocks are defined\n const iterator = Array.isArray(preset.blocks)\n ? preset.blocks.entries()\n : Object.entries(preset.blocks);\n for (const [keyOrIndex, block] of iterator) {\n const nodePath = ['presets', i, 'blocks', keyOrIndex];\n const node = (0, theme_check_common_1.nodeAtPath)(ast, nodePath);\n const blockModule = (0, module_1.getThemeBlockModule)(themeGraph, block.type);\n if (!blockModule)\n continue;\n const typeProperty = node.children.find((child) => child.key.value === 'type');\n if (!typeProperty)\n continue;\n const sourceRange = [\n schema.offset + typeProperty.loc.start.offset,\n schema.offset + typeProperty.loc.end.offset,\n ];\n bind(module, blockModule, { sourceRange, type: 'preset' });\n promises.push(traverseModule(blockModule, themeGraph, deps));\n if (block.blocks) {\n promises.push(traverseSchemaPresetBlock(schema, module, ast, block.blocks, nodePath, themeGraph, deps));\n }\n }\n }\n return Promise.all(promises);\n}\nasync function traverseSchemaPresetBlock(schema, module, ast, blocks, parentPath, themeGraph, deps) {\n const promises = [];\n // Iterate over array entries or object entries depending on how the blocks are defined\n const iterator = Array.isArray(blocks) ? blocks.entries() : Object.entries(blocks);\n for (const [keyOrIndex, block] of iterator) {\n const nodePath = [...parentPath, 'blocks', keyOrIndex];\n const node = (0, theme_check_common_1.nodeAtPath)(ast, nodePath);\n const blockModule = (0, module_1.getThemeBlockModule)(themeGraph, block.type);\n if (!blockModule)\n continue;\n const typeProperty = node.children.find((child) => child.key.value === 'type');\n if (!typeProperty)\n continue;\n const sourceRange = [\n schema.offset + typeProperty.loc.start.offset,\n schema.offset + typeProperty.loc.end.offset,\n ];\n bind(module, blockModule, { sourceRange, type: 'preset' });\n promises.push(traverseModule(blockModule, themeGraph, deps));\n if (block.blocks) {\n promises.push(traverseSchemaPresetBlock(schema, module, ast, block.blocks, nodePath, themeGraph, deps));\n }\n }\n return Promise.all(promises);\n}\nasync function traverseSchemaDefault(schema, module, ast, preset, themeGraph, deps) {\n const promises = [];\n if (!('blocks' in preset))\n return;\n // Iterate over array entries or object entries depending on how the blocks are defined\n const iterator = Array.isArray(preset.blocks)\n ? preset.blocks.entries()\n : Object.entries(preset.blocks);\n for (const [keyOrIndex, block] of iterator) {\n const nodePath = ['default', 'blocks', keyOrIndex];\n const node = (0, theme_check_common_1.nodeAtPath)(ast, nodePath);\n const blockModule = (0, module_1.getThemeBlockModule)(themeGraph, block.type);\n if (!blockModule)\n continue;\n const typeProperty = node.children.find((child) => child.key.value === 'type');\n if (!typeProperty)\n continue;\n const sourceRange = [\n schema.offset + typeProperty.loc.start.offset,\n schema.offset + typeProperty.loc.end.offset,\n ];\n bind(module, blockModule, { sourceRange, type: 'preset' });\n promises.push(traverseModule(blockModule, themeGraph, deps));\n }\n return Promise.all(promises);\n}\nasync function traverseJsonModule(module, themeGraph, deps) {\n const sourceCode = await deps.getSourceCode(module.uri);\n if (sourceCode.type !== theme_check_common_1.SourceCodeType.JSON)\n throw (0, utils_1.unexpected)();\n const ast = sourceCode.ast;\n if (ast instanceof Error)\n return; // can't visit what you can't parse\n switch (module.kind) {\n case \"template\" /* JsonModuleKind.Template */: {\n // Should only happen once per template\n const template = (0, theme_check_common_1.parseJSON)(sourceCode.source);\n const promises = [];\n for (const [key, section] of Object.entries(template.sections)) {\n const sectionType = section.type;\n const path = ['sections', key];\n const node = (0, theme_check_common_1.nodeAtPath)(ast, path);\n const sectionModule = (0, module_1.getSectionModule)(themeGraph, sectionType);\n const typeProperty = node.children.find((child) => child.key.value === 'type');\n const start = typeProperty.loc.start.offset;\n const end = typeProperty.loc.end.offset;\n const sourceRange = [start, end];\n // Link the template to the section\n bind(module, sectionModule, { sourceRange });\n promises.push(\n // Traverse the section themeselves\n traverseModule(sectionModule, themeGraph, deps), \n // Link the blocks used in the section to the template\n traverseSectionReferences(module, ast, path, section, themeGraph, deps));\n }\n // Link the template to the layout\n const layout = template.layout;\n const layoutModule = (0, module_1.getLayoutModule)(themeGraph, template.layout);\n if (layoutModule) {\n let sourceRange = undefined;\n let indirect = true;\n if (layout !== false && layout !== undefined) {\n const layoutPath = ['layout'];\n const node = (0, theme_check_common_1.nodeAtPath)(ast, layoutPath);\n sourceRange = [node.loc.start.offset, node.loc.end.offset];\n indirect = false; // this is a direct reference to the layout\n }\n bind(module, layoutModule, { sourceRange, type: 'indirect' });\n promises.push(traverseModule(layoutModule, themeGraph, deps));\n }\n return Promise.all(promises);\n }\n case \"section-group\" /* JsonModuleKind.SectionGroup */: {\n const sectionGroup = (0, theme_check_common_1.parseJSON)(sourceCode.source);\n const promises = [];\n for (const [key, section] of Object.entries(sectionGroup.sections)) {\n const sectionType = section.type;\n const path = ['sections', key];\n const node = (0, theme_check_common_1.nodeAtPath)(ast, path);\n const sectionModule = (0, module_1.getSectionModule)(themeGraph, sectionType);\n const typeProperty = node.children.find((child) => child.key.value === 'type');\n const start = typeProperty.loc.start.offset;\n const end = typeProperty.loc.end.offset;\n const sourceRange = [start, end];\n // Link the template to the section\n bind(module, sectionModule, { sourceRange });\n promises.push(\n // Traverse the section themeselves\n traverseModule(sectionModule, themeGraph, deps), \n // Link the blocks used in the section to the template\n traverseSectionReferences(module, ast, path, section, themeGraph, deps));\n }\n return Promise.all(promises);\n }\n default: {\n return (0, utils_1.assertNever)(module.kind);\n }\n }\n}\n/**\n * Traverses the actual references contained inside Template.Template['sections'] and Template.SectionGroup['sections'].\n *\n * Does nothing if the mode is not `GraphMode.Production`.\n */\nasync function traverseSectionReferences(source, // template or section group\nsourceAst, nodePath = [], section, themeGraph, deps) {\n if (!section.blocks)\n return;\n const sectionHasLocalBlocks = await (0, utils_1.acceptsLocalBlocks)(section.type, deps);\n if (sectionHasLocalBlocks)\n return;\n const promises = [];\n for (const [key, block] of Object.entries(section.blocks)) {\n const blockType = block.type;\n const blockModule = (0, module_1.getThemeBlockModule)(themeGraph, blockType);\n const path = [...nodePath, 'blocks', key];\n const node = (0, theme_check_common_1.nodeAtPath)(sourceAst, path);\n const typeProperty = node.children.find((child) => child.key.value === 'type');\n const start = typeProperty.loc.start.offset;\n const end = typeProperty.loc.end.offset;\n const sourceRange = [start, end];\n // Link the template to the block\n bind(source, blockModule, { sourceRange });\n promises.push(\n // Traverse the block themselves\n traverseModule(blockModule, themeGraph, deps), \n // Traverse the block references\n traverseBlockReferences(source, sourceAst, path, block, themeGraph, deps));\n }\n return Promise.all(promises);\n}\nasync function traverseBlockReferences(source, // template or section group\nsourceAst, nodePath = [], block, themeGraph, deps) {\n if (!block.blocks)\n return;\n const promises = [];\n for (const [key, childBlock] of Object.entries(block.blocks)) {\n const childBlockType = childBlock.type;\n const childBlockModule = (0, module_1.getThemeBlockModule)(themeGraph, childBlockType);\n const path = [...nodePath, 'blocks', key];\n const node = (0, theme_check_common_1.nodeAtPath)(sourceAst, path);\n const typeProperty = node.children.find((child) => child.key.value === 'type');\n const start = typeProperty.loc.start.offset;\n const end = typeProperty.loc.end.offset;\n const sourceRange = [start, end];\n // Link the template/section group to the block\n bind(source, childBlockModule, { sourceRange });\n promises.push(\n // Traverse the child block themselves\n traverseModule(childBlockModule, themeGraph, deps), \n // Traverse the child block references\n traverseBlockReferences(source, sourceAst, path, childBlock, themeGraph, deps));\n }\n return Promise.all(promises);\n}\n/**\n * The bind method is the method that links two modules together.\n *\n * It adds the dependency to the source module's dependencies and the target module's references.\n *\n * This function mutates the source and target modules.\n */\nfunction bind(source, target, { sourceRange, targetRange, type = 'direct', // the type of dependency, can be 'direct', 'indirect' or 'preset'\n } = {}) {\n const dependency = {\n source: { uri: source.uri, range: sourceRange },\n target: { uri: target.uri, range: targetRange },\n type: type,\n };\n source.dependencies.push(dependency);\n target.references.push(dependency);\n}\n//# sourceMappingURL=traverse.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toSvgSourceCode = exports.toSourceCode = exports.toJsSourceCode = exports.toCssSourceCode = exports.findWebComponentReferences = exports.getWebComponentMap = exports.serializeThemeGraph = exports.buildThemeGraph = void 0;\nvar build_1 = require(\"./graph/build\");\nObject.defineProperty(exports, \"buildThemeGraph\", { enumerable: true, get: function () { return build_1.buildThemeGraph; } });\nvar serialize_1 = require(\"./graph/serialize\");\nObject.defineProperty(exports, \"serializeThemeGraph\", { enumerable: true, get: function () { return serialize_1.serializeThemeGraph; } });\nvar getWebComponentMap_1 = require(\"./getWebComponentMap\");\nObject.defineProperty(exports, \"getWebComponentMap\", { enumerable: true, get: function () { return getWebComponentMap_1.getWebComponentMap; } });\nObject.defineProperty(exports, \"findWebComponentReferences\", { enumerable: true, get: function () { return getWebComponentMap_1.findWebComponentReferences; } });\nvar toSourceCode_1 = require(\"./toSourceCode\");\nObject.defineProperty(exports, \"toCssSourceCode\", { enumerable: true, get: function () { return toSourceCode_1.toCssSourceCode; } });\nObject.defineProperty(exports, \"toJsSourceCode\", { enumerable: true, get: function () { return toSourceCode_1.toJsSourceCode; } });\nObject.defineProperty(exports, \"toSourceCode\", { enumerable: true, get: function () { return toSourceCode_1.toSourceCode; } });\nObject.defineProperty(exports, \"toSvgSourceCode\", { enumerable: true, get: function () { return toSourceCode_1.toSvgSourceCode; } });\n__exportStar(require(\"./types\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCssSourceCode = toCssSourceCode;\nexports.toSvgSourceCode = toSvgSourceCode;\nexports.toJsSourceCode = toJsSourceCode;\nexports.parseJs = parseJs;\nexports.toSourceCode = toSourceCode;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst acorn_1 = require(\"acorn\");\nconst types_1 = require(\"./types\");\nconst utils_1 = require(\"./utils\");\nasync function toCssSourceCode(uri, source) {\n return {\n type: 'css',\n uri,\n source,\n ast: new Error('File parsing not implemented yet'), // Placeholder for CSS parsing\n };\n}\nasync function toSvgSourceCode(uri, source) {\n return {\n type: 'svg',\n uri,\n source,\n ast: new Error('File parsing not implemented yet'), // Placeholder for SVG parsing\n };\n}\nasync function toImageSourceCode(uri, source) {\n return {\n type: 'image',\n uri,\n source,\n ast: new Error('Image files are not parsed'),\n };\n}\nasync function toJsSourceCode(uri, source) {\n return {\n type: 'javascript',\n uri,\n source,\n ast: parseJs(source),\n };\n}\nfunction parseJs(source) {\n try {\n return (0, acorn_1.parse)(source, {\n ecmaVersion: 'latest',\n sourceType: 'module',\n });\n }\n catch (error) {\n return (0, theme_check_common_1.asError)(error);\n }\n}\nasync function toSourceCode(uri, source) {\n const extension = (0, utils_1.extname)(uri);\n if (extension === 'json' || extension === 'liquid') {\n return (0, theme_check_common_1.toSourceCode)(uri, source);\n }\n else if (extension === 'js') {\n return toJsSourceCode(uri, source);\n }\n else if (extension === 'css') {\n return toCssSourceCode(uri, source);\n }\n else if (extension === 'svg') {\n return toCssSourceCode(uri, source);\n }\n else if (types_1.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(extension)) {\n return toImageSourceCode(uri, source);\n }\n else {\n throw new Error(`Unknown source code type for ${uri}`);\n }\n}\n//# sourceMappingURL=toSourceCode.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SUPPORTED_ASSET_IMAGE_EXTENSIONS = void 0;\nexports.SUPPORTED_ASSET_IMAGE_EXTENSIONS = [\n 'jpg',\n 'jpeg',\n 'png',\n 'gif',\n 'webp',\n 'heic',\n 'ico',\n];\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.identity = void 0;\nexports.unique = unique;\nexports.assertNever = assertNever;\nexports.unexpected = unexpected;\nexports.isString = isString;\nexports.extname = extname;\nexports.exists = exists;\nexports.acceptsLocalBlocks = acceptsLocalBlocks;\nfunction unique(array) {\n return [...new Set(array)];\n}\nfunction assertNever(module) {\n throw new Error(`Unknown module type ${module}`);\n}\nfunction unexpected() {\n return new Error('Unexpected code path encountered');\n}\nconst identity = (x) => x;\nexports.identity = identity;\nfunction isString(x) {\n return typeof x === 'string';\n}\nfunction extname(uri) {\n return uri.split('.').pop() || '';\n}\nasync function exists(fs, uri) {\n return fs\n .stat(uri)\n .then(() => true)\n .catch(() => false);\n}\nasync function acceptsLocalBlocks(sectionType, deps) {\n var _a;\n const sectionSchema = await deps.getSectionSchema(sectionType).catch((_) => undefined);\n if (!sectionSchema) {\n return new Error('Section does not exist');\n }\n const validSchema = sectionSchema.validSchema;\n if (validSchema instanceof Error) {\n return validSchema;\n }\n return ((_a = validSchema.blocks) !== null && _a !== void 0 ? _a : []).some((block) => {\n return block.type && 'name' in block && block.name;\n });\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getConnection = getConnection;\nexports.startServer = startServer;\nconst theme_language_server_common_1 = require(\"@shopify/theme-language-server-common\");\nconst browser_1 = require(\"vscode-languageserver/browser\");\n__exportStar(require(\"@shopify/theme-language-server-common\"), exports);\nfunction getConnection(worker) {\n const reader = new browser_1.BrowserMessageReader(worker);\n const writer = new browser_1.BrowserMessageWriter(worker);\n return (0, browser_1.createConnection)(reader, writer);\n}\n// This is where you do the worker.postMessage stuff?\n// Or is this where we accept the worker.postMessage stuff?\n// Yeah I think this is where you _accept_ the worker.postMessage stuff\nfunction startServer(worker, dependencies, connection = getConnection(worker)) {\n (0, theme_language_server_common_1.startServer)(connection, dependencies);\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ClientCapabilities = void 0;\nclass ClientCapabilities {\n constructor() {\n this.capabilities = {};\n this.initializationOptions = {};\n }\n setup(capabilities, initializationOptions = {}) {\n this.capabilities = capabilities;\n this.initializationOptions = initializationOptions;\n }\n get hasWorkspaceConfigurationSupport() {\n var _a, _b;\n return !!((_b = (_a = this.capabilities) === null || _a === void 0 ? void 0 : _a.workspace) === null || _b === void 0 ? void 0 : _b.configuration);\n }\n get hasApplyEditSupport() {\n var _a, _b;\n return !!((_b = (_a = this.capabilities) === null || _a === void 0 ? void 0 : _a.workspace) === null || _b === void 0 ? void 0 : _b.applyEdit);\n }\n get hasWorkspaceFoldersSupport() {\n var _a, _b;\n return !!((_b = (_a = this.capabilities) === null || _a === void 0 ? void 0 : _a.workspace) === null || _b === void 0 ? void 0 : _b.workspaceFolders);\n }\n get hasDidChangeConfigurationDynamicRegistrationSupport() {\n var _a, _b, _c;\n return !!((_c = (_b = (_a = this.capabilities) === null || _a === void 0 ? void 0 : _a.workspace) === null || _b === void 0 ? void 0 : _b.didChangeConfiguration) === null || _c === void 0 ? void 0 : _c.dynamicRegistration);\n }\n get hasDidChangeWatchedFilesDynamicRegistrationSupport() {\n var _a, _b, _c;\n return !!((_c = (_b = (_a = this.capabilities) === null || _a === void 0 ? void 0 : _a.workspace) === null || _b === void 0 ? void 0 : _b.didChangeWatchedFiles) === null || _c === void 0 ? void 0 : _c.dynamicRegistration);\n }\n get hasShowDocumentSupport() {\n var _a, _b;\n return !!((_b = (_a = this.capabilities) === null || _a === void 0 ? void 0 : _a.window) === null || _b === void 0 ? void 0 : _b.showDocument);\n }\n get hasProgressSupport() {\n var _a, _b;\n return !!((_b = (_a = this.capabilities) === null || _a === void 0 ? void 0 : _a.window) === null || _b === void 0 ? void 0 : _b.workDoneProgress);\n }\n initializationOption(key, defaultValue) {\n var _a;\n // { 'themeCheck.checkOnSave': true }\n const direct = (_a = this.initializationOptions) === null || _a === void 0 ? void 0 : _a[key];\n if (direct !== undefined)\n return direct;\n // { themeCheck: { checkOnSave: true } }\n const nested = pathGet(this.initializationOptions, key);\n if (nested !== undefined)\n return nested;\n // fallback\n return defaultValue;\n }\n}\nexports.ClientCapabilities = ClientCapabilities;\nfunction pathGet(obj, key) {\n const path = key.split('.');\n return path.reduce((acc, subpath) => acc === null || acc === void 0 ? void 0 : acc[subpath], obj);\n}\n//# sourceMappingURL=ClientCapabilities.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Unknown = exports.Untyped = exports.TypeSystem = void 0;\nexports.docsetEntryReturnType = docsetEntryReturnType;\nexports.isArrayType = isArrayType;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst settings_1 = require(\"./settings\");\nconst utils_1 = require(\"./utils\");\nconst theme_check_common_2 = require(\"@shopify/theme-check-common\");\nclass TypeSystem {\n constructor(themeDocset, getThemeSettingsSchemaForURI, getMetafieldDefinitions) {\n this.themeDocset = themeDocset;\n this.getThemeSettingsSchemaForURI = getThemeSettingsSchemaForURI;\n this.getMetafieldDefinitions = getMetafieldDefinitions;\n /**\n * An indexed representation of objects.json by name\n *\n * e.g. objectMap['product'] returns the product ObjectEntry.\n */\n this.objectMap = async (uri, ast) => {\n var _a, _b, _c, _d;\n const [objectMap, themeSettingProperties, metafieldDefinitionsObjectMap] = await Promise.all([\n this._objectMap(),\n this.themeSettingProperties(uri),\n this.metafieldDefinitionsObjectMap(uri),\n ]);\n // Here we shallow mutate `settings.properties` to have the properties made\n // available by settings_schema.json\n const result = {\n ...objectMap,\n settings: {\n ...((_a = objectMap.settings) !== null && _a !== void 0 ? _a : {}),\n properties: themeSettingProperties,\n },\n ...customMetafieldTypeEntries(objectMap['metafield']),\n ...metafieldDefinitionsObjectMap,\n };\n // For each metafield definition fetched, we need to override existing types with `metafields` property\n // to `${category}_metafield`.\n //\n // WARNING: Since we aren't cloning the object, we are mutating the original type for all themes in\n // the workspace. However, this is fine since these changes are not unique to a theme.\n for (let category of theme_check_common_1.FETCHED_METAFIELD_CATEGORIES) {\n if (!result[category])\n continue;\n let metafieldsProperty = (_b = result[category].properties) === null || _b === void 0 ? void 0 : _b.find((prop) => prop.name === 'metafields');\n if (!metafieldsProperty)\n continue;\n metafieldsProperty.return_type = [{ type: `${category}_metafields`, name: '' }];\n }\n // Deal with sections/file.liquid section.settings by infering the type from the {% schema %}\n if (/[\\/\\\\]sections[\\/\\\\]/.test(uri) && result.section) {\n result.section = JSON.parse(JSON.stringify(result.section)); // easy deep clone\n const settings = (_c = result.section.properties) === null || _c === void 0 ? void 0 : _c.find((x) => x.name === 'settings');\n if (!settings || !settings.return_type)\n return result;\n settings.return_type = [{ type: 'section_settings', name: '' }];\n result.section_settings = {\n name: 'section_settings',\n access: {\n global: false,\n parents: [],\n template: [],\n },\n properties: schemaSettingsAsProperties(ast),\n return_type: [],\n };\n }\n // Deal with blocks/files.liquid block.settings in a similar fashion\n if (/[\\/\\\\]blocks[\\/\\\\]/.test(uri) && result.block) {\n result.block = JSON.parse(JSON.stringify(result.block)); // easy deep clone\n const settings = (_d = result.block.properties) === null || _d === void 0 ? void 0 : _d.find((x) => x.name === 'settings');\n if (!settings || !settings.return_type)\n return result;\n settings.return_type = [{ type: 'block_settings', name: '' }];\n result.block_settings = {\n name: 'block_settings',\n access: {\n global: false,\n parents: [],\n template: [],\n },\n properties: schemaSettingsAsProperties(ast),\n return_type: [],\n };\n }\n return result;\n };\n // This is the big one we reuse (memoized)\n this._objectMap = (0, utils_1.memo)(async () => {\n const entries = await this.objectEntries();\n return entries.reduce((map, entry) => {\n map[entry.name] = entry;\n return map;\n }, {});\n });\n /** An indexed representation of filters.json by name */\n this.filtersMap = (0, utils_1.memo)(async () => {\n const entries = await this.filterEntries();\n return entries.reduce((map, entry) => {\n map[entry.name] = entry;\n return map;\n }, {});\n });\n this.filterEntries = (0, utils_1.memo)(async () => {\n return this.themeDocset.filters();\n });\n this.objectEntries = (0, utils_1.memo)(async () => {\n return this.themeDocset.objects();\n });\n /**\n * The seedSymbolsTable contains all the global variables.\n *\n * This lets us have the ambient type of things first, but if someone\n * reassigns product, then we'll be able to change the type of product on\n * the appropriate range.\n *\n * This is not memo'ed because we would otherwise need to clone the thing.\n */\n this.seedSymbolsTable = async (uri) => {\n const [globalVariables, contextualVariables] = await Promise.all([\n this.globalVariables(),\n this.contextualVariables(uri),\n ]);\n return globalVariables.concat(contextualVariables).reduce((table, objectEntry) => {\n var _a;\n var _b;\n (_a = table[_b = objectEntry.name]) !== null && _a !== void 0 ? _a : (table[_b] = []);\n table[objectEntry.name].push({\n identifier: objectEntry.name,\n type: objectEntryType(objectEntry),\n range: [0],\n });\n return table;\n }, {});\n };\n this.globalVariables = (0, utils_1.memo)(async () => {\n const entries = await this.objectEntries();\n return entries.filter((entry) => !entry.access || entry.access.global === true || entry.access.template.length > 0);\n });\n this.contextualVariables = async (uri) => {\n const entries = await this.objectEntries();\n const contextualEntries = getContextualEntries(uri);\n return entries.filter((entry) => contextualEntries.includes(entry.name));\n };\n }\n async inferType(thing, partialAst, uri) {\n const [objectMap, filtersMap, symbolsTable] = await Promise.all([\n this.objectMap(uri, partialAst),\n this.filtersMap(),\n this.symbolsTable(partialAst, uri),\n ]);\n return inferType(thing, symbolsTable, objectMap, filtersMap);\n }\n async availableVariables(partialAst, partial, node, uri) {\n const [objectMap, filtersMap, symbolsTable] = await Promise.all([\n this.objectMap(uri, partialAst),\n this.filtersMap(),\n this.symbolsTable(partialAst, uri),\n ]);\n return Object.entries(symbolsTable)\n .filter(([key, typeRanges]) => key.startsWith(partial) &&\n typeRanges.some((typeRange) => isCorrectTypeRange(typeRange, node)))\n .map(([identifier, typeRanges]) => {\n var _a;\n const typeRange = (0, utils_1.findLast)(typeRanges, (typeRange) => isCorrectTypeRange(typeRange, node));\n const type = resolveTypeRangeType(typeRange.type, symbolsTable, objectMap, filtersMap);\n const entry = (_a = objectMap[isArrayType(type) ? type.valueType : type]) !== null && _a !== void 0 ? _a : {};\n return {\n entry: { ...entry, name: identifier },\n type,\n };\n });\n }\n async themeSettingProperties(uri) {\n const themeSettingsSchema = await this.getThemeSettingsSchemaForURI(uri);\n const categories = themeSettingsSchema.filter(settings_1.isSettingsCategory);\n const result = [];\n for (const category of categories) {\n const inputSettings = category.settings.filter(settings_1.isInputSetting);\n for (const setting of inputSettings) {\n result.push({\n name: setting.id,\n summary: '', // TODO, this should lookup the locale file for settings... setting.label\n description: '', // TODO , this should lookup the locale file as well... setting.info,\n return_type: settingReturnType(setting),\n access: {\n global: false,\n parents: [],\n template: [],\n },\n });\n }\n }\n return result;\n }\n async metafieldDefinitionsObjectMap(uri) {\n let result = {};\n const metafieldDefinitionMap = await this.getMetafieldDefinitions(uri);\n for (let [category, definitions] of Object.entries(metafieldDefinitionMap)) {\n // Metafield definitions need to be grouped by their namespace\n let metafieldNamespaces = new Map();\n for (let definition of definitions) {\n if (!metafieldNamespaces.has(definition.namespace)) {\n metafieldNamespaces.set(definition.namespace, []);\n }\n metafieldNamespaces.get(definition.namespace).push({\n name: definition.key,\n description: definition.description,\n return_type: metafieldReturnType(definition.type.name),\n });\n }\n let metafieldGroupProperties = [];\n for (let [namespace, namespaceProperties] of metafieldNamespaces) {\n const metafieldCategoryNamespaceHandle = `${category}_metafield_${namespace}`;\n // Since the namespace can be shared by multiple categories, we need to make sure the return_type\n // handle is unique across all categories\n metafieldGroupProperties.push({\n name: namespace,\n return_type: [{ type: metafieldCategoryNamespaceHandle, name: '' }],\n access: {\n global: false,\n parents: [],\n template: [],\n },\n });\n result[metafieldCategoryNamespaceHandle] = {\n name: metafieldCategoryNamespaceHandle,\n properties: namespaceProperties,\n access: {\n global: false,\n parents: [],\n template: [],\n },\n };\n }\n const metafieldCategoryHandle = `${category}_metafields`;\n result[metafieldCategoryHandle] = {\n name: metafieldCategoryHandle,\n properties: metafieldGroupProperties,\n access: {\n global: false,\n parents: [],\n template: [],\n },\n };\n }\n return result;\n }\n async symbolsTable(partialAst, uri) {\n const seedSymbolsTable = await this.seedSymbolsTable(uri);\n return buildSymbolsTable(partialAst, seedSymbolsTable, await this.themeDocset.liquidDrops());\n }\n}\nexports.TypeSystem = TypeSystem;\nconst SECTION_FILE_REGEX = /sections[\\/\\\\][^.\\\\\\/]*\\.liquid$/;\nconst BLOCK_FILE_REGEX = /blocks[\\/\\\\][^.\\\\\\/]*\\.liquid$/;\nconst SNIPPET_FILE_REGEX = /snippets[\\/\\\\][^.\\\\\\/]*\\.liquid$/;\nconst LAYOUT_FILE_REGEX = /layout[\\/\\\\]checkout\\.liquid$/;\nfunction getContextualEntries(uri) {\n const normalizedUri = theme_check_common_1.path.normalize(uri);\n if (LAYOUT_FILE_REGEX.test(normalizedUri)) {\n return [\n 'locale',\n 'direction',\n 'skip_to_content_link',\n 'checkout_html_classes',\n 'checkout_stylesheets',\n 'checkout_scripts',\n 'content_for_logo',\n 'breadcrumb',\n 'order_summary_toggle',\n 'content_for_order_summary',\n 'alternative_payment_methods',\n 'content_for_footer',\n 'tracking_code',\n ];\n }\n if (SECTION_FILE_REGEX.test(normalizedUri)) {\n return ['section', 'predictive_search', 'recommendations', 'comment'];\n }\n if (BLOCK_FILE_REGEX.test(normalizedUri)) {\n return ['app', 'section', 'recommendations', 'block'];\n }\n if (SNIPPET_FILE_REGEX.test(normalizedUri)) {\n return ['app'];\n }\n return [];\n}\n/** Untyped is for declared variables without a type (like `any`) */\nexports.Untyped = 'untyped';\n/** Unknown is for variables that don't exist, type would come from context (e.g. snippet var without LiquidDoc) */\nexports.Unknown = 'unknown';\nconst String = 'string';\nconst arrayType = (valueType) => ({\n kind: 'array',\n valueType,\n});\nconst lazyVariable = (node, offset) => ({\n kind: liquid_html_parser_1.NodeTypes.LiquidVariable,\n node,\n offset,\n});\nconst LazyDeconstructedExpression = (node, offset) => ({\n kind: 'deconstructed',\n node,\n offset,\n});\nfunction buildSymbolsTable(partialAst, seedSymbolsTable, liquidDrops) {\n const typeRanges = (0, theme_check_common_2.visit)(partialAst, {\n // {% assign x = foo.x | filter %}\n AssignMarkup(node) {\n return {\n identifier: node.name,\n type: lazyVariable(node.value, node.position.start),\n range: [node.position.end],\n };\n },\n // {% doc %}\n // @param {string} name - your name\n // {% enddoc %}\n LiquidDocParamNode(node) {\n return {\n identifier: node.paramName.value,\n type: inferLiquidDocParamType(node, liquidDrops),\n range: [node.position.end],\n };\n },\n // This also covers tablerow\n ForMarkup(node, ancestors) {\n var _a;\n const parentNode = ancestors.at(-1);\n return {\n identifier: node.variableName,\n type: LazyDeconstructedExpression(node.collection, node.position.start),\n range: [parentNode.blockStartPosition.end, end((_a = parentNode.blockEndPosition) === null || _a === void 0 ? void 0 : _a.end)],\n };\n },\n // {% capture foo %}\n // ...\n // {% endcapture}\n LiquidTag(node) {\n var _a, _b;\n if (node.name === 'capture' && typeof node.markup !== 'string') {\n return {\n identifier: node.markup.name,\n type: String,\n range: [node.position.end],\n };\n }\n else if (['form', 'paginate'].includes(node.name)) {\n return {\n identifier: node.name,\n type: node.name,\n range: [node.blockStartPosition.end, end((_a = node.blockEndPosition) === null || _a === void 0 ? void 0 : _a.end)],\n };\n }\n else if (['for', 'tablerow'].includes(node.name)) {\n return {\n identifier: node.name + 'loop',\n type: node.name + 'loop',\n range: [node.blockStartPosition.end, end((_b = node.blockEndPosition) === null || _b === void 0 ? void 0 : _b.end)],\n };\n }\n else if (isLiquidTagIncrement(node) || isLiquidTagDecrement(node)) {\n if (node.markup.name === null)\n return;\n return {\n identifier: node.markup.name,\n type: 'number',\n range: [node.position.start],\n };\n }\n else if (node.name === 'layout') {\n return {\n identifier: 'none',\n type: 'keyword',\n range: [node.position.start, node.position.end],\n };\n }\n },\n });\n return typeRanges\n .sort(({ range: [startA] }, { range: [startB] }) => startA - startB)\n .reduce((table, typeRange) => {\n var _a;\n var _b;\n (_a = table[_b = typeRange.identifier]) !== null && _a !== void 0 ? _a : (table[_b] = []);\n table[typeRange.identifier].push(typeRange);\n return table;\n }, seedSymbolsTable);\n}\n/**\n * Given a TypeRange['type'] (which may be lazy), resolve its type recursively.\n *\n * The output is a fully resolved PseudoType | ArrayType. Which means we\n * could use it to power completions.\n */\nfunction resolveTypeRangeType(typeRangeType, symbolsTable, objectMap, filtersMap) {\n if (typeof typeRangeType === 'string') {\n return typeRangeType;\n }\n switch (typeRangeType.kind) {\n case 'array': {\n return typeRangeType;\n }\n case 'deconstructed': {\n const arrayType = inferType(typeRangeType.node, symbolsTable, objectMap, filtersMap);\n if (typeof arrayType === 'string') {\n return exports.Untyped;\n }\n else {\n return arrayType.valueType;\n }\n }\n default: {\n return inferType(typeRangeType.node, symbolsTable, objectMap, filtersMap);\n }\n }\n}\nfunction inferType(thing, symbolsTable, objectMap, filtersMap) {\n var _a, _b;\n if (typeof thing === 'string') {\n return (_b = (_a = objectMap[thing]) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : exports.Untyped;\n }\n switch (thing.type) {\n case liquid_html_parser_1.NodeTypes.Number: {\n return 'number';\n }\n case liquid_html_parser_1.NodeTypes.String: {\n return 'string';\n }\n case liquid_html_parser_1.NodeTypes.LiquidLiteral: {\n return 'boolean';\n }\n case liquid_html_parser_1.NodeTypes.BooleanExpression: {\n return 'boolean';\n }\n case liquid_html_parser_1.NodeTypes.Range: {\n return arrayType('number');\n }\n // The type of the assign markup is the type of the right hand side.\n // {% assign x = y.property | filter1 | filter2 %}\n case liquid_html_parser_1.NodeTypes.AssignMarkup: {\n return inferType(thing.value, symbolsTable, objectMap, filtersMap);\n }\n // A variable lookup is expression[.lookup]*\n // {{ y.property }}\n case liquid_html_parser_1.NodeTypes.VariableLookup: {\n return inferLookupType(thing, symbolsTable, objectMap, filtersMap);\n }\n // A variable is the VariableLookup + Filters\n // The type is the return value of the last filter\n // {{ y.property | filter1 | filter2 }}\n case liquid_html_parser_1.NodeTypes.LiquidVariable: {\n if (thing.filters.length > 0) {\n const lastFilter = thing.filters.at(-1);\n if (lastFilter.name === 'default') {\n // default filter is a special case, we need to return the type of the expression\n // instead of the filter.\n if (lastFilter.args.length > 0 && lastFilter.args[0].type !== liquid_html_parser_1.NodeTypes.NamedArgument) {\n return inferType(lastFilter.args[0], symbolsTable, objectMap, filtersMap);\n }\n }\n const filterEntry = filtersMap[lastFilter.name];\n return filterEntry ? filterEntryReturnType(filterEntry) : exports.Untyped;\n }\n else {\n return inferType(thing.expression, symbolsTable, objectMap, filtersMap);\n }\n }\n default: {\n return exports.Untyped;\n }\n }\n}\nfunction inferLiquidDocParamType(node, liquidDrops) {\n var _a;\n const paramTypeValue = (_a = node.paramType) === null || _a === void 0 ? void 0 : _a.value;\n if (!paramTypeValue)\n return exports.Untyped;\n const validParamTypes = (0, theme_check_common_1.getValidParamTypes)(liquidDrops);\n const parsedParamType = (0, theme_check_common_1.parseParamType)(new Set(validParamTypes.keys()), paramTypeValue);\n if (!parsedParamType)\n return exports.Untyped;\n const [type, isArray] = parsedParamType;\n let transformedParamType;\n // BasicParamTypes.Object does not map to any specific type in the type system.\n if (type === theme_check_common_1.BasicParamTypes.Object) {\n transformedParamType = exports.Untyped;\n }\n else {\n transformedParamType = type;\n }\n if (isArray) {\n return arrayType(transformedParamType);\n }\n return transformedParamType;\n}\nfunction inferLookupType(thing, symbolsTable, objectMap, filtersMap) {\n // we return the type of the drop, so a.b.c\n const node = thing;\n // We don't complete global lookups. It's too much of an edge case.\n if (node.name === null)\n return exports.Untyped;\n /**\n * curr stores the type of the variable lookup starting at the beginning.\n *\n * It starts as the type of the top-level identifier, and the we\n * recursively change it to the return type of the lookups.\n *\n * So, for x.images.first.src we do:\n * - curr = infer type of x | x\n * - curr = x.images -> ArrayType<image> | x.images\n * - curr = images.first -> image | x.images.first\n * - curr = first.src -> string | x.images.first.src\n *\n * Once were done iterating, the type of the lookup is curr.\n */\n let curr = inferIdentifierType(node, symbolsTable, objectMap, filtersMap);\n for (let lookup of node.lookups) {\n // Here we redefine curr to be the returnType of the lookup.\n // e.g. images[0] -> image\n // e.g. images.first -> image\n // e.g. images.size -> number\n if (isArrayType(curr)) {\n curr = inferArrayTypeLookupType(curr, lookup);\n }\n // e.g. product.featured_image -> image\n // e.g. product.images -> ArrayType<images>\n // e.g. product.name -> string\n else {\n curr = inferPseudoTypePropertyType(curr, lookup, objectMap);\n }\n // Early return\n if (curr === exports.Untyped) {\n return exports.Untyped;\n }\n }\n return curr;\n}\n/**\n * Given a VariableLookup node, infer the type of its root (position-relative).\n *\n * e.g. for the following\n * {% assign x = product %}\n * {{ x.images.first }}\n *\n * This function infers the type of `x`.\n */\nfunction inferIdentifierType(node, symbolsTable, objectMap, filtersMap) {\n // The name of a variable\n const identifier = node.name;\n // We don't complete the global access edge case\n // e.g. {{ ['all_products'] }}\n if (!identifier) {\n return exports.Untyped;\n }\n const typeRanges = symbolsTable[identifier];\n if (!typeRanges) {\n return exports.Unknown;\n }\n const typeRange = (0, utils_1.findLast)(typeRanges, (tr) => isCorrectTypeRange(tr, node));\n return typeRange\n ? resolveTypeRangeType(typeRange.type, symbolsTable, objectMap, filtersMap)\n : exports.Unknown;\n}\n/**\n * infers the type of a lookup on an ArrayType\n * - images[0] becomes 'image'\n * - images[index] becomes 'image'\n * - images.first becomes 'image'\n * - images.last becomes 'image'\n * - images.size becomes 'number'\n * - anything else becomes 'untyped'\n */\nfunction inferArrayTypeLookupType(curr, lookup) {\n // images[0]\n // images[index]\n if (lookup.type === liquid_html_parser_1.NodeTypes.Number || lookup.type === liquid_html_parser_1.NodeTypes.VariableLookup) {\n return curr.valueType;\n }\n // images.first\n // images.last\n // images.size\n // anything else is undef\n else if (lookup.type === liquid_html_parser_1.NodeTypes.String) {\n switch (lookup.value) {\n case 'first':\n case 'last': {\n return curr.valueType;\n }\n case 'size': {\n return 'number';\n }\n default: {\n return exports.Unknown;\n }\n }\n }\n // images[true]\n // images[(0..2)]\n else {\n return exports.Untyped;\n }\n}\nfunction inferPseudoTypePropertyType(curr, // settings\nlookup, objectMap) {\n var _a;\n const parentEntry = objectMap[curr];\n // When doing a non string lookup, we don't really know the type. e.g.\n // products[0]\n // products[true]\n // products[(0..10)]\n if (lookup.type !== liquid_html_parser_1.NodeTypes.String) {\n return exports.Untyped;\n }\n // When we don't have docs for the parent entry\n if (!parentEntry) {\n // It might be that the parent entry is a string.\n // We do support a couple of properties for those\n if (curr === 'string') {\n switch (lookup.value) {\n // some_string.first\n // some_string.last\n case 'first':\n case 'last':\n return 'string';\n // some_string.size\n case 'size':\n return 'number';\n default: {\n // For the string type, any property access other than first/last/size\n // is unknown. This is different from an untyped/any object where any\n // property access would return untyped.\n // String is a known type with specific properties, so accessing\n // undefined properties returns an unknown.\n return exports.Unknown;\n }\n }\n }\n // Or it might be that the parent entry is untyped, so its subproperty\n // could also be untyped (kind of like if `foo` is `any`, then `foo.bar` is `any`)\n return exports.Untyped;\n }\n const propertyName = lookup.value;\n const property = (_a = parentEntry.properties) === null || _a === void 0 ? void 0 : _a.find((property) => property.name === propertyName);\n // When the propety is not known, return Untyped. e.g.\n // product.foo\n // product.bar\n if (!property) {\n // Debating between returning Untyped or Unknown here\n // Might be that we have outdated docs. Prob better to return Untyped.\n return exports.Untyped;\n }\n // When the property is known & we have docs for it, return its type. e.g.\n // product.image\n // product.images\n return objectEntryType(property);\n}\nfunction filterEntryReturnType(entry) {\n return docsetEntryReturnType(entry, 'string');\n}\nfunction objectEntryType(entry) {\n return docsetEntryReturnType(entry, entry.name);\n}\n/**\n * This function converts the return_type property in one of the .json\n * files into a PseudoType or ArrayType.\n */\nfunction docsetEntryReturnType(entry, defaultValue) {\n const returnTypes = entry.return_type;\n if (returnTypes && returnTypes.length > 0) {\n const returnType = returnTypes[0];\n if (isArrayReturnType(returnType)) {\n return arrayType(returnType.array_value);\n }\n else {\n return returnType.type;\n }\n }\n return defaultValue;\n}\nfunction isArrayReturnType(rt) {\n return rt.type === 'array';\n}\nfunction isArrayType(thing) {\n return typeof thing !== 'string';\n}\n/** Assumes findLast */\nfunction isCorrectTypeRange(typeRange, node) {\n const [start, end] = typeRange.range;\n if (end && node.position.start > end)\n return false;\n return node.position.start > start;\n}\nfunction end(offset) {\n if (offset === -1)\n return undefined;\n return offset;\n}\nfunction isLiquidTagIncrement(node) {\n return node.name === liquid_html_parser_1.NamedTags.increment && typeof node.markup !== 'string';\n}\nfunction isLiquidTagDecrement(node) {\n return node.name === liquid_html_parser_1.NamedTags.decrement && typeof node.markup !== 'string';\n}\nfunction settingReturnType(setting) {\n switch (setting.type) {\n // basic settings\n case 'checkbox':\n return [{ type: 'boolean', name: '' }];\n case 'range':\n case 'number':\n return [{ type: 'number', name: '' }];\n case 'radio':\n case 'select':\n case 'text':\n case 'textarea':\n return [{ type: 'string', name: '' }];\n // specialized settings\n case 'article':\n return [{ type: 'article', name: '' }];\n case 'blog':\n return [{ type: 'blog', name: '' }];\n case 'collection':\n return [{ type: 'collection', name: '' }];\n case 'collection_list':\n return [{ type: 'array', array_value: 'collection' }];\n case 'color':\n return [{ type: 'color', name: '' }];\n case 'color_background':\n return [{ type: 'string', name: '' }];\n case 'color_scheme':\n return [{ type: 'color_scheme', name: '' }];\n // TODO ??\n case 'color_scheme_group':\n return [];\n case 'font_picker':\n return [{ type: 'font', name: '' }];\n case 'html':\n return [{ type: 'string', name: '' }];\n case 'image_picker':\n return [{ type: 'image', name: '' }];\n case 'inline_richtext':\n return [{ type: 'string', name: '' }];\n case 'link_list':\n return [{ type: 'linklist', name: '' }];\n case 'liquid':\n return [{ type: 'string', name: '' }];\n case 'page':\n return [{ type: 'page', name: '' }];\n case 'product':\n return [{ type: 'product', name: '' }];\n case 'product_list':\n return [{ type: 'array', array_value: 'product' }];\n case 'richtext':\n return [{ type: 'string', name: '' }];\n case 'text_alignment':\n return [{ type: 'string', name: '' }];\n case 'url':\n return [{ type: 'string', name: '' }];\n case 'video':\n return [{ type: 'video', name: '' }];\n case 'video_url':\n return [{ type: 'string', name: '' }];\n default:\n return [];\n }\n}\nconst METAFIELD_TYPE_TO_TYPE = Object.freeze({\n single_line_text_field: String,\n multi_line_text_field: String,\n url_reference: String,\n date: String,\n date_time: String,\n number_integer: 'number',\n number_decimal: 'number',\n product_reference: 'product',\n collection_reference: 'collection',\n variant_reference: 'variant',\n page_reference: 'page',\n boolean: 'boolean',\n color: 'color',\n weight: 'measurement',\n volume: 'measurement',\n dimension: 'measurement',\n rating: 'rating',\n money: 'money',\n json: exports.Untyped,\n metaobject_reference: 'metaobject',\n mixed_reference: exports.Untyped,\n rich_text_field: exports.Untyped,\n file_reference: exports.Untyped,\n});\nconst REFERENCE_TYPE_METAFIELDS = Object.entries(METAFIELD_TYPE_TO_TYPE)\n .filter(([metafieldType, _type]) => metafieldType.endsWith('_reference'))\n .map(([_metafieldType, type]) => type);\nfunction metafieldReturnType(metafieldType) {\n var _a;\n let isArray = metafieldType.startsWith('list.');\n if (isArray) {\n metafieldType = metafieldType.split('.')[1];\n }\n let type = 'metafield_' + ((_a = METAFIELD_TYPE_TO_TYPE[metafieldType]) !== null && _a !== void 0 ? _a : exports.Untyped);\n if (isArray) {\n return [{ type: `${type}_array`, name: '' }];\n }\n return [{ type: type, name: '' }];\n}\n// The default `metafield` type has an untyped `value` property.\n// We need to create new metafield types with the labels `metafield_x` and `metafield_x_array`\n// where x is the type of metafield inside the `value` property. The metafields ending with `x_array`\n// is where the value is an array of type x.\nconst customMetafieldTypeEntries = (0, utils_1.memo)((baseMetafieldEntry) => {\n if (!baseMetafieldEntry)\n return {};\n return [\n ...new Set([...Object.values(METAFIELD_TYPE_TO_TYPE), ...theme_check_common_1.FETCHED_METAFIELD_CATEGORIES]),\n ].reduce((map, type) => {\n var _a, _b;\n {\n const metafieldEntry = JSON.parse(JSON.stringify(baseMetafieldEntry)); // easy deep clone\n const metafieldValueProp = (_a = metafieldEntry.properties) === null || _a === void 0 ? void 0 : _a.find((prop) => prop.name === 'value');\n if (metafieldValueProp) {\n metafieldValueProp.return_type = [{ type: type, name: '' }];\n metafieldValueProp.description = '';\n metafieldEntry.name = `metafield_${type}`;\n map[metafieldEntry.name] = metafieldEntry;\n }\n }\n {\n const metafieldArrayEntry = JSON.parse(JSON.stringify(baseMetafieldEntry)); // easy deep clone\n const metafieldArrayValueProp = (_b = metafieldArrayEntry.properties) === null || _b === void 0 ? void 0 : _b.find((prop) => prop.name === 'value');\n if (metafieldArrayValueProp) {\n // A metafield definition using a list of references does not use an array, but a separate type of collection.\n // For auto-completion purposes, we can't use the array type\n // https://shopify.dev/docs/api/liquid/objects/metafield#metafield-determining-the-length-of-a-list-metafield\n if (REFERENCE_TYPE_METAFIELDS.includes(type)) {\n metafieldArrayValueProp.return_type = [{ type: 'untyped', name: '' }];\n }\n else {\n metafieldArrayValueProp.return_type = [{ type: 'array', name: '', array_value: type }];\n }\n metafieldArrayValueProp.description = '';\n metafieldArrayEntry.name = `metafield_${type}_array`;\n map[metafieldArrayEntry.name] = metafieldArrayEntry;\n }\n }\n return map;\n }, {});\n});\nfunction schemaSettingsAsProperties(ast) {\n if (ast.type !== liquid_html_parser_1.NodeTypes.Document)\n return [];\n try {\n const source = ast._source; // (the unfixed source)\n const start = /\\{%\\s*schema\\s*%\\}/m.exec(source);\n const end = /\\{%\\s*endschema\\s*%\\}/m.exec(source);\n if (!start || !end)\n return [];\n const schema = source.slice(start.index + start[0].length, end.index);\n const json = (0, theme_check_common_1.parseJSON)(schema);\n if ((0, theme_check_common_1.isError)(json) || !('settings' in json) || !Array.isArray(json.settings))\n return [];\n const result = [];\n const inputSettings = json.settings.filter(settings_1.isInputSetting);\n for (const setting of inputSettings) {\n result.push({\n name: setting.id,\n summary: '', // TODO, this should lookup the locale file for settings... setting.label\n description: '', // TODO , this should lookup the locale file as well... setting.info,\n return_type: settingReturnType(setting),\n access: {\n global: false,\n parents: [],\n template: [],\n },\n });\n }\n return result;\n }\n catch (_) {\n return [];\n }\n}\n//# sourceMappingURL=TypeSystem.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaseCodeActionsProvider = void 0;\nclass BaseCodeActionsProvider {\n constructor(documentManager, diagnosticsManager) {\n this.documentManager = documentManager;\n this.diagnosticsManager = diagnosticsManager;\n }\n get kind() {\n return this.constructor.kind;\n }\n}\nexports.BaseCodeActionsProvider = BaseCodeActionsProvider;\n//# sourceMappingURL=BaseCodeActionsProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CodeActionsProvider = exports.CodeActionKinds = void 0;\nconst providers_1 = require(\"./providers\");\nexports.CodeActionKinds = Array.from(new Set([providers_1.FixAllProvider.kind, providers_1.FixProvider.kind, providers_1.SuggestionProvider.kind]));\nclass CodeActionsProvider {\n constructor(documentManager, diagnosticsManager) {\n this.providers = [\n new providers_1.FixAllProvider(documentManager, diagnosticsManager),\n new providers_1.FixProvider(documentManager, diagnosticsManager),\n new providers_1.SuggestionProvider(documentManager, diagnosticsManager),\n ];\n }\n codeActions(params) {\n const only = params.context.only;\n return this.providers\n .filter((provider) => !only || only.some((kind) => provider.kind.startsWith(kind)))\n .flatMap((provider) => provider.codeActions(params));\n }\n}\nexports.CodeActionsProvider = CodeActionsProvider;\n//# sourceMappingURL=CodeActionsProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CodeActionKinds = exports.CodeActionsProvider = void 0;\nvar CodeActionsProvider_1 = require(\"./CodeActionsProvider\");\nObject.defineProperty(exports, \"CodeActionsProvider\", { enumerable: true, get: function () { return CodeActionsProvider_1.CodeActionsProvider; } });\nObject.defineProperty(exports, \"CodeActionKinds\", { enumerable: true, get: function () { return CodeActionsProvider_1.CodeActionKinds; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FixAllProvider = void 0;\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst commands_1 = require(\"../../commands\");\nconst BaseCodeActionsProvider_1 = require(\"../BaseCodeActionsProvider\");\nconst utils_1 = require(\"./utils\");\n/**\n * FixAllProvider is a `source.fixAll` code action provider.\n *\n * It is different from FixProvider in the sense where this won't appear on\n * top of diagnostics, but rather can be executed in different contexts.\n * Unlike FixProvider, it is also cursor position independent.\n *\n * Folks can have this run automatically on save with the following config:\n *\n * \"[liquid]\": {\n * \"editor.codeActionsOnSave\": {\n * \"source.fixAll\": true,\n * }\n * },\n *\n * Or as as 'Right click > Source Actions...' request\n */\nclass FixAllProvider extends BaseCodeActionsProvider_1.BaseCodeActionsProvider {\n codeActions(params) {\n const { uri } = params.textDocument;\n const document = this.documentManager.get(uri);\n const diagnostics = this.diagnosticsManager.get(uri);\n if (!document || !diagnostics)\n return [];\n const { anomalies, version } = diagnostics;\n const fixableAnomalies = anomalies.filter(utils_1.isFixable);\n if (fixableAnomalies.length === 0)\n return [];\n return quickfixAllAction(uri, version, fixableAnomalies);\n }\n}\nexports.FixAllProvider = FixAllProvider;\nFixAllProvider.kind = vscode_languageserver_1.CodeActionKind.SourceFixAll;\n/**\n * @returns code action to fix all offenses in a file\n * @example Fix all auto-fixable problems\n */\nfunction quickfixAllAction(uri, version, fixableAnomalies) {\n const ids = fixableAnomalies.map((a) => a.id);\n const diagnostics = fixableAnomalies.map((a) => a.diagnostic);\n return [\n (0, utils_1.toCodeAction)(`Fix all auto-fixable problems`, (0, commands_1.applyFixCommand)(uri, version, ids), diagnostics, FixAllProvider.kind),\n ];\n}\n//# sourceMappingURL=FixAllProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FixProvider = void 0;\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst commands_1 = require(\"../../commands\");\nconst BaseCodeActionsProvider_1 = require(\"../BaseCodeActionsProvider\");\nconst utils_1 = require(\"./utils\");\nclass FixProvider extends BaseCodeActionsProvider_1.BaseCodeActionsProvider {\n codeActions(params) {\n const { uri } = params.textDocument;\n const document = this.documentManager.get(uri);\n const diagnostics = this.diagnosticsManager.get(uri);\n if (!document || !diagnostics)\n return [];\n const { textDocument } = document;\n const { anomalies, version } = diagnostics;\n const start = textDocument.offsetAt(params.range.start);\n const end = textDocument.offsetAt(params.range.end);\n const fixableAnomalies = anomalies.filter(utils_1.isFixable);\n const anomaliesUnderCursor = fixableAnomalies.filter((anomaly) => (0, utils_1.isInRange)(anomaly, start, end));\n if (anomaliesUnderCursor.length === 0)\n return [];\n return [\n ...quickfixCursorActions(uri, version, anomaliesUnderCursor),\n ...quickfixSameTypeActions(uri, version, anomaliesUnderCursor, fixableAnomalies),\n ...quickfixAllAction(uri, version, fixableAnomalies),\n ];\n }\n}\nexports.FixProvider = FixProvider;\nFixProvider.kind = vscode_languageserver_1.CodeActionKind.QuickFix;\n/**\n * @returns code actions to fix only one of the offenses under the cursor\n * @example Fix this ParserBlockingScript problem: '...'\n */\nfunction quickfixCursorActions(uri, version, anomaliesUnderCursor) {\n return anomaliesUnderCursor.map(({ offense, diagnostic, id }) => {\n return (0, utils_1.toCodeAction)(`Fix this ${offense.check} problem: ${offense.message}`, (0, commands_1.applyFixCommand)(uri, version, [id]), [diagnostic], FixProvider.kind, true);\n });\n}\n/**\n * @returns code actions to fix all offenses of a particular type\n * @example Fix all ParserBlockingScript problems\n */\nfunction quickfixSameTypeActions(uri, version, anomaliesUnderCursor, fixableAnomalies) {\n const checks = new Set(anomaliesUnderCursor.map((anomaly) => anomaly.offense.check));\n return Array.from(checks).flatMap((check) => {\n const checkAnomalies = fixableAnomalies.filter(({ offense }) => offense.check === check);\n // We don't want to show this one if there's only one of this type.\n if (checkAnomalies.length < 2)\n return [];\n const ids = checkAnomalies.map((a) => a.id);\n const diagnostics = checkAnomalies.map((a) => a.diagnostic);\n return (0, utils_1.toCodeAction)(`Fix all ${check} problems`, (0, commands_1.applyFixCommand)(uri, version, ids), diagnostics, FixProvider.kind);\n });\n}\n/**\n * @returns code action to fix all offenses of a particular type\n * @example Fix all auto-fixable problems\n */\nfunction quickfixAllAction(uri, version, fixableAnomalies) {\n const ids = fixableAnomalies.map((a) => a.id);\n const diagnostics = fixableAnomalies.map((a) => a.diagnostic);\n const checks = new Set(diagnostics.map((a) => a.code));\n // We don't want to this one if there's only one type of problems\n if (checks.size < 2)\n return [];\n return [\n (0, utils_1.toCodeAction)(`Fix all auto-fixable problems`, (0, commands_1.applyFixCommand)(uri, version, ids), diagnostics, FixProvider.kind),\n ];\n}\n//# sourceMappingURL=FixProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SuggestionProvider = void 0;\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst providers_1 = require(\"../../commands/providers\");\nconst BaseCodeActionsProvider_1 = require(\"../BaseCodeActionsProvider\");\nconst utils_1 = require(\"./utils\");\nclass SuggestionProvider extends BaseCodeActionsProvider_1.BaseCodeActionsProvider {\n codeActions(params) {\n const { uri } = params.textDocument;\n const document = this.documentManager.get(uri);\n const diagnostics = this.diagnosticsManager.get(uri);\n if (!document || !diagnostics)\n return [];\n const { textDocument } = document;\n const { anomalies, version } = diagnostics;\n const start = textDocument.offsetAt(params.range.start);\n const end = textDocument.offsetAt(params.range.end);\n const suggestibleAnomalies = anomalies.filter(isSuggestible);\n const anomaliesUnderCursor = suggestibleAnomalies.filter((anomaly) => (0, utils_1.isInRange)(anomaly, start, end));\n if (anomaliesUnderCursor.length === 0)\n return [];\n return quickfixCursorActions(uri, version, anomaliesUnderCursor);\n }\n}\nexports.SuggestionProvider = SuggestionProvider;\nSuggestionProvider.kind = vscode_languageserver_1.CodeActionKind.QuickFix;\n/**\n * @returns all Offense.suggest code actions for the offenses under the cursor\n * @example Suggestion: Add the `defer` HTML attribute\n */\nfunction quickfixCursorActions(uri, version, anomaliesUnderCursor) {\n return anomaliesUnderCursor.flatMap(({ offense, diagnostic, id }) => {\n return offense.suggest.map((suggestion, suggestionId) => (0, utils_1.toCodeAction)(`Suggestion: ${suggestion.message}`, (0, providers_1.applySuggestionCommand)(uri, version, id, suggestionId), [diagnostic], SuggestionProvider.kind));\n });\n}\nfunction isSuggestible(anomaly) {\n const { offense } = anomaly;\n return 'suggest' in offense && offense.suggest !== undefined;\n}\n//# sourceMappingURL=SuggestionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SuggestionProvider = exports.FixAllProvider = exports.FixProvider = void 0;\nvar FixProvider_1 = require(\"./FixProvider\");\nObject.defineProperty(exports, \"FixProvider\", { enumerable: true, get: function () { return FixProvider_1.FixProvider; } });\nvar FixAllProvider_1 = require(\"./FixAllProvider\");\nObject.defineProperty(exports, \"FixAllProvider\", { enumerable: true, get: function () { return FixAllProvider_1.FixAllProvider; } });\nvar SuggestionProvider_1 = require(\"./SuggestionProvider\");\nObject.defineProperty(exports, \"SuggestionProvider\", { enumerable: true, get: function () { return SuggestionProvider_1.SuggestionProvider; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCodeAction = toCodeAction;\nexports.isInRange = isInRange;\nexports.isFixable = isFixable;\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\n// They have an awkard API for creating them, so we have this helper here\n// to make it a bit more straightforward.\nfunction toCodeAction(title, command, diagnostics, kind, isPreferred = false) {\n const codeAction = vscode_languageserver_1.CodeAction.create(title, command, kind);\n codeAction.diagnostics = diagnostics;\n codeAction.isPreferred = isPreferred;\n return codeAction;\n}\n/**\n * The range is either the selection or cursor position, an offense is in\n * range if the selection and offense overlap in any way.\n */\nfunction isInRange({ offense }, start, end) {\n const offenseStart = offense.start.index;\n const offenseEnd = offense.end.index;\n const isOutOfRange = offenseEnd < start || offenseStart > end;\n return !isOutOfRange;\n}\nfunction isFixable(anomaly) {\n const { offense } = anomaly;\n return 'fix' in offense && offense.fix !== undefined;\n}\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaseExecuteCommandProvider = void 0;\nclass BaseExecuteCommandProvider {\n constructor(documentManager, diagnosticsManager, clientCapabilities, connection) {\n this.documentManager = documentManager;\n this.diagnosticsManager = diagnosticsManager;\n this.clientCapabilities = clientCapabilities;\n this.connection = connection;\n }\n}\nexports.BaseExecuteCommandProvider = BaseExecuteCommandProvider;\n//# sourceMappingURL=BaseExecuteCommandProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExecuteCommandProvider = exports.Commands = void 0;\nconst providers_1 = require(\"./providers\");\nexports.Commands = [\n providers_1.ApplyFixesProvider.command,\n providers_1.ApplySuggestionProvider.command,\n providers_1.RunChecksProvider.command,\n];\nfunction isKnownCommand(command) {\n return exports.Commands.includes(command);\n}\nclass ExecuteCommandProvider {\n constructor(documentManager, diagnosticsManager, clientCapabilities, runChecks, connection) {\n this.commands = {\n [providers_1.ApplyFixesProvider.command]: new providers_1.ApplyFixesProvider(documentManager, diagnosticsManager, clientCapabilities, connection),\n [providers_1.ApplySuggestionProvider.command]: new providers_1.ApplySuggestionProvider(documentManager, diagnosticsManager, clientCapabilities, connection),\n [providers_1.RunChecksProvider.command]: new providers_1.RunChecksProvider(documentManager, diagnosticsManager, clientCapabilities, connection, runChecks),\n };\n }\n async execute(params) {\n var _a;\n if (!isKnownCommand(params.command))\n return;\n const provider = this.commands[params.command];\n const args = (_a = params.arguments) !== null && _a !== void 0 ? _a : [];\n await provider.execute(...args);\n }\n}\nexports.ExecuteCommandProvider = ExecuteCommandProvider;\n//# sourceMappingURL=ExecuteCommandProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.applyFixCommand = exports.Commands = exports.ExecuteCommandProvider = void 0;\nvar ExecuteCommandProvider_1 = require(\"./ExecuteCommandProvider\");\nObject.defineProperty(exports, \"ExecuteCommandProvider\", { enumerable: true, get: function () { return ExecuteCommandProvider_1.ExecuteCommandProvider; } });\nObject.defineProperty(exports, \"Commands\", { enumerable: true, get: function () { return ExecuteCommandProvider_1.Commands; } });\nvar providers_1 = require(\"./providers\");\nObject.defineProperty(exports, \"applyFixCommand\", { enumerable: true, get: function () { return providers_1.applyFixCommand; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ApplyFixesProvider = void 0;\nexports.applyFixCommand = applyFixCommand;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst BaseExecuteCommandProvider_1 = require(\"../BaseExecuteCommandProvider\");\n/**\n * The ApplyFixesProvider is responsible for handling the `themeCheck/applyFixes` command.\n *\n * To create a command, use the `applyFixCommand` function.\n * The provider will execute the command with the given arguments.\n *\n * ApplyFixesProvider collects the text edits represented by the targeted offenses' `.fix` property,\n * applies them, and forwards the result to the client using the 'workspace/applyEdit' request.\n */\nclass ApplyFixesProvider extends BaseExecuteCommandProvider_1.BaseExecuteCommandProvider {\n async execute(uri, version, ids) {\n if (!this.clientCapabilities.hasApplyEditSupport)\n return;\n const diagnostics = this.diagnosticsManager.get(uri);\n const document = this.documentManager.get(uri);\n if (!document || !diagnostics)\n return;\n if (document.version !== version || diagnostics.version !== version)\n return;\n const anomalies = ids\n .map((id) => diagnostics.anomalies[id])\n .filter((anomaly) => !!anomaly.offense.fix);\n const fixes = anomalies.map((anomaly) => anomaly.offense.fix);\n const corrector = (0, theme_check_common_1.createCorrector)(document.type, document.source);\n for (const collectFixes of fixes) {\n collectFixes(corrector);\n }\n const { textDocument } = document;\n const textDocumentEdit = vscode_languageserver_1.TextDocumentEdit.create({ uri: textDocument.uri, version: textDocument.version }, toTextEdits(document.textDocument, corrector.fix));\n await this.connection.sendRequest(vscode_languageserver_1.ApplyWorkspaceEditRequest.type, {\n edit: {\n documentChanges: [textDocumentEdit],\n },\n });\n // Clean up state diagnostics when we're done\n const offenses = diagnostics.anomalies.map((a) => a.offense);\n const fixedOffenses = anomalies.map((a) => a.offense);\n const remainingOffenses = offenses.filter((offense) => !fixedOffenses.includes(offense));\n this.diagnosticsManager.set(uri, diagnostics.version, remainingOffenses);\n }\n}\nexports.ApplyFixesProvider = ApplyFixesProvider;\nApplyFixesProvider.command = 'themeCheck/applyFixes';\n/**\n * applyFixCommand creates an LSP Command that the client can call\n */\nfunction applyFixCommand(uri, version, ids) {\n return vscode_languageserver_1.Command.create('applyFixes', ApplyFixesProvider.command, uri, version, ids);\n}\nfunction toTextEdit(document, fixDesc) {\n return {\n newText: fixDesc.insert,\n range: {\n start: document.positionAt(fixDesc.startIndex),\n end: document.positionAt(fixDesc.endIndex),\n },\n };\n}\nfunction toTextEdits(document, fix) {\n return (0, theme_check_common_1.flattenFixes)(fix).map((fixDesc) => toTextEdit(document, fixDesc));\n}\n//# sourceMappingURL=ApplyFixesProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ApplySuggestionProvider = void 0;\nexports.applySuggestionCommand = applySuggestionCommand;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst BaseExecuteCommandProvider_1 = require(\"../BaseExecuteCommandProvider\");\n/**\n * The ApplySuggestionProvider is responsible for handling the `themeCheck/applySuggestion` command.\n *\n * To create a command, use the `applySuggestionCommand` function.\n * The provider will execute the command with the given arguments.\n *\n * ApplySuggestionProvider collects the text edits represented by the targeted offense' `.suggest` property,\n * applies them, and forwards the result to the client using the 'workspace/applyEdit' request.\n */\nclass ApplySuggestionProvider extends BaseExecuteCommandProvider_1.BaseExecuteCommandProvider {\n async execute(uri, version, anomalyId, suggestionIndex) {\n var _a;\n if (!this.clientCapabilities.hasApplyEditSupport)\n return;\n const diagnostics = this.diagnosticsManager.get(uri);\n const document = this.documentManager.get(uri);\n if (!document || !diagnostics)\n return;\n if (document.version !== version || diagnostics.version !== version)\n return;\n const anomaly = diagnostics.anomalies[anomalyId];\n if (!anomaly)\n return;\n const offense = anomaly.offense;\n const suggestion = (_a = offense.suggest) === null || _a === void 0 ? void 0 : _a[suggestionIndex];\n if (!suggestion)\n return;\n // Collect text edits\n const corrector = (0, theme_check_common_1.createCorrector)(document.type, document.source);\n suggestion.fix(corrector);\n // Suggest -> TextDocumentEdit\n const { textDocument } = document;\n const textDocumentEdit = vscode_languageserver_1.TextDocumentEdit.create({ uri: textDocument.uri, version: textDocument.version }, toTextEdits(document.textDocument, corrector.fix));\n await this.connection.sendRequest(vscode_languageserver_1.ApplyWorkspaceEditRequest.type, {\n label: `Apply suggestion: ${suggestion.message}`,\n edit: {\n documentChanges: [textDocumentEdit],\n },\n });\n // Clean up state diagnostics when we're done\n const offenses = diagnostics.anomalies.map((a) => a.offense);\n const fixedOffense = offense;\n const remainingOffenses = offenses.filter((offense) => offense !== fixedOffense);\n this.diagnosticsManager.set(uri, diagnostics.version, remainingOffenses);\n }\n}\nexports.ApplySuggestionProvider = ApplySuggestionProvider;\nApplySuggestionProvider.command = 'themeCheck/applySuggestion';\n/**\n * applySuggestionCommand creates an LSP Command that the client can call\n */\nfunction applySuggestionCommand(uri, version, anomalyId, suggestionIndex) {\n return vscode_languageserver_1.Command.create('applySuggestion', ApplySuggestionProvider.command, uri, version, anomalyId, suggestionIndex);\n}\nfunction toTextEdits(document, fix) {\n return (0, theme_check_common_1.flattenFixes)(fix).map((fixDesc) => toTextEdit(document, fixDesc));\n}\nfunction toTextEdit(document, fixDesc) {\n return {\n newText: fixDesc.insert,\n range: {\n start: document.positionAt(fixDesc.startIndex),\n end: document.positionAt(fixDesc.endIndex),\n },\n };\n}\n//# sourceMappingURL=ApplySuggestionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RunChecksProvider = void 0;\nconst BaseExecuteCommandProvider_1 = require(\"../BaseExecuteCommandProvider\");\n/**\n * The RunChecksProvider runs theme check on all open files.\n *\n * It is triggered by the cmd+p command in the VS Code extension and is\n * otherwise not used internally, which is why there is no\n * `runChecksCommand` method.\n *\n * This will be useful in a world where `checkOnSave`, `checkOnChange`,\n * `checkOnOpen` are all false.\n */\nclass RunChecksProvider extends BaseExecuteCommandProvider_1.BaseExecuteCommandProvider {\n constructor(documentManager, diagnosticsManager, clientCapabilities, connection, runChecks) {\n super(documentManager, diagnosticsManager, clientCapabilities, connection);\n this.documentManager = documentManager;\n this.diagnosticsManager = diagnosticsManager;\n this.clientCapabilities = clientCapabilities;\n this.connection = connection;\n this.runChecks = runChecks;\n }\n async execute() {\n const openDocuments = this.documentManager.openDocuments;\n const triggerURIs = openDocuments.map((sourceCode) => sourceCode.uri);\n this.runChecks(triggerURIs);\n }\n}\nexports.RunChecksProvider = RunChecksProvider;\nRunChecksProvider.command = 'themeCheck/runChecks';\n//# sourceMappingURL=RunChecksProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RunChecksProvider = exports.ApplySuggestionProvider = exports.applySuggestionCommand = exports.ApplyFixesProvider = exports.applyFixCommand = void 0;\nvar ApplyFixesProvider_1 = require(\"./ApplyFixesProvider\");\nObject.defineProperty(exports, \"applyFixCommand\", { enumerable: true, get: function () { return ApplyFixesProvider_1.applyFixCommand; } });\nObject.defineProperty(exports, \"ApplyFixesProvider\", { enumerable: true, get: function () { return ApplyFixesProvider_1.ApplyFixesProvider; } });\nvar ApplySuggestionProvider_1 = require(\"./ApplySuggestionProvider\");\nObject.defineProperty(exports, \"applySuggestionCommand\", { enumerable: true, get: function () { return ApplySuggestionProvider_1.applySuggestionCommand; } });\nObject.defineProperty(exports, \"ApplySuggestionProvider\", { enumerable: true, get: function () { return ApplySuggestionProvider_1.ApplySuggestionProvider; } });\nvar RunChecksProvider_1 = require(\"./RunChecksProvider\");\nObject.defineProperty(exports, \"RunChecksProvider\", { enumerable: true, get: function () { return RunChecksProvider_1.RunChecksProvider; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompletionsProvider = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst TypeSystem_1 = require(\"../TypeSystem\");\nconst params_1 = require(\"./params\");\nconst providers_1 = require(\"./providers\");\nclass CompletionsProvider {\n constructor({ documentManager, themeDocset, getMetafieldDefinitions, getTranslationsForURI = async () => ({}), getSnippetNamesForURI = async () => [], getThemeSettingsSchemaForURI = async () => [], getDocDefinitionForURI = async (uri, _relativePath) => ({ uri }), getThemeBlockNames = async (_rootUri, _includePrivate) => [], log = () => { }, }) {\n this.providers = [];\n this.documentManager = documentManager;\n this.themeDocset = themeDocset;\n this.log = log;\n const typeSystem = new TypeSystem_1.TypeSystem(themeDocset, getThemeSettingsSchemaForURI, getMetafieldDefinitions);\n this.providers = [\n new providers_1.ContentForCompletionProvider(),\n new providers_1.ContentForBlockTypeCompletionProvider(getThemeBlockNames),\n new providers_1.ContentForParameterCompletionProvider(getDocDefinitionForURI),\n new providers_1.HtmlTagCompletionProvider(),\n new providers_1.HtmlAttributeCompletionProvider(documentManager),\n new providers_1.HtmlAttributeValueCompletionProvider(),\n new providers_1.LiquidTagsCompletionProvider(themeDocset),\n new providers_1.ObjectCompletionProvider(typeSystem),\n new providers_1.ObjectAttributeCompletionProvider(typeSystem, getThemeSettingsSchemaForURI),\n new providers_1.FilterCompletionProvider(typeSystem),\n new providers_1.TranslationCompletionProvider(documentManager, getTranslationsForURI),\n new providers_1.RenderSnippetCompletionProvider(getSnippetNamesForURI),\n new providers_1.RenderSnippetParameterCompletionProvider(getDocDefinitionForURI),\n new providers_1.FilterNamedParameterCompletionProvider(themeDocset),\n new providers_1.LiquidDocTagCompletionProvider(),\n new providers_1.LiquidDocParamTypeCompletionProvider(themeDocset),\n ];\n }\n async completions(params) {\n const uri = params.textDocument.uri;\n const document = this.documentManager.get(uri);\n // Supports only Liquid resources\n if ((document === null || document === void 0 ? void 0 : document.type) !== theme_check_common_1.SourceCodeType.LiquidHtml) {\n return [];\n }\n try {\n const liquidParams = (0, params_1.createLiquidCompletionParams)(document, params);\n const promises = this.providers.map((p) => p.completions(liquidParams));\n const results = await Promise.all(promises);\n return results.flat();\n }\n catch (err) {\n this.log(`[SERVER] CompletionsProvider error: ${err}`);\n return [];\n }\n }\n}\nexports.CompletionsProvider = CompletionsProvider;\n//# sourceMappingURL=CompletionsProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompletionsProvider = void 0;\nvar CompletionsProvider_1 = require(\"./CompletionsProvider\");\nObject.defineProperty(exports, \"CompletionsProvider\", { enumerable: true, get: function () { return CompletionsProvider_1.CompletionsProvider; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createLiquidCompletionParams = createLiquidCompletionParams;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst fix_1 = require(\"./fix\");\nfunction createLiquidCompletionParams(sourceCode, params) {\n const { textDocument } = sourceCode;\n const cursor = textDocument.offsetAt(params.position);\n const completionContext = getCompletionContext(sourceCode, cursor);\n return {\n ...params,\n completionContext,\n document: sourceCode,\n };\n}\nfunction getCompletionContext(sourceCode, cursor) {\n const partialAst = parsePartial(sourceCode, cursor);\n if (!partialAst) {\n return undefined;\n }\n const [node, ancestors] = findCurrentNode(partialAst, cursor);\n return {\n partialAst,\n ancestors,\n node,\n };\n}\n/**\n * This function will return an AST of the entire file up until the cursor\n * position.\n *\n * So if you accept that we use █ to represent the cursor, and a have a file that\n * looks like this:\n *\n * <div>\n * {% assign x = product %}\n * {% assign y = x | plus: 20 %}\n * {% assign z = █ %}\n * <span>\n * this content is not part of the partial tree\n * </span>\n * </div>\n *\n * Then the contents of the file up until the cursor position is this:\n *\n * <div>\n * {% assign x = product %}\n * {% assign y = x | plus: 20 %}\n * {% assign z = █\n *\n * Then we'll use `fix(sourceCode, cursorPosition)` to make it parseable.\n * Fixed output:\n *\n * <div>\n * {% assign x = product %}\n * {% assign y = x | plus: 20 %}\n * {% assign z = █%}\n *\n * Then we'll parse this with `allowUnclosedDocumentNode` and\n * `mode: completion` to allow parsing of placeholder characters (█)\n *\n * The result is a partial AST whose last-most node is probably the one\n * under the cursor.\n */\nfunction parsePartial(sourceCode, cursorPosition) {\n let fixedSource;\n try {\n fixedSource = (0, fix_1.fix)(sourceCode.source, cursorPosition);\n const ast = (0, liquid_html_parser_1.toLiquidHtmlAST)(fixedSource, {\n allowUnclosedDocumentNode: true,\n mode: 'completion',\n });\n ast._source = sourceCode.source;\n return ast;\n }\n catch (err) {\n // We swallow errors here, because we gracefully accept that and\n // simply don't offer completions when that happens.\n return undefined;\n }\n}\nclass Finder {\n constructor(ast) {\n this.stack = [ast];\n }\n get current() {\n return last(this.stack);\n }\n get parent() {\n return this.stack.at(-2);\n }\n set current(node) {\n this.stack.push(node);\n }\n}\n/**\n * @returns the node at the cursor position and its ancestry.\n *\n * Undefined when you're not really on a node (there's nothing to complete)\n */\nfunction findCurrentNode(partialAst, cursor) {\n // The current node is the \"last\" node in the AST.\n const finder = new Finder(partialAst);\n let current = { ...partialAst };\n // Our objective:\n // Finding the \"last-most node\" in the partial AST.\n //\n // Context:\n // A generic visitor doesn't quite work in this context because we\n // cannot trust the position, blockStartPosition, blockEndPosition of\n // nodes when we use `allowUnclosedDocumentNode`. You see, these\n // properties are updated when the nodes are closed. An {% if cond %}\n // node without its closing {% endif %} would have its position.end be\n // the one of the starting block. Which means that any children it may\n // have wouldn't be covered.\n //\n // How we do it:\n // We define logic per node type. For example, HTML tags will do this:\n // - If the node is closed (<a>child</a>),\n // then there's nothing to complete.\n // We return undefined\n // - If the node has children,\n // then we visit the last children\n // - If the node has attributes,\n // then we visit the last attribute\n // - If the node has a name,\n // then we visit the last name node (<a--{{ product.id }}>)\n //\n // It's different per node type, because each node type has a different\n // concept of child node and because they have to be traversed in a\n // specific order.\n while (finder.current !== undefined && current !== finder.current) {\n current = finder.current;\n switch (current.type) {\n case liquid_html_parser_1.NodeTypes.Document: {\n if (hasNonEmptyArrayProperty(current, 'children')) {\n finder.current = last(current.children);\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.HtmlRawNode:\n case liquid_html_parser_1.NodeTypes.HtmlVoidElement:\n case liquid_html_parser_1.NodeTypes.HtmlDanglingMarkerClose:\n case liquid_html_parser_1.NodeTypes.HtmlSelfClosingElement:\n case liquid_html_parser_1.NodeTypes.HtmlElement: {\n if (isCompletedTag(current)) {\n finder.current = undefined;\n }\n else if (hasNonEmptyArrayProperty(current, 'children')) {\n finder.current = last(current.children);\n }\n else if (hasNonEmptyArrayProperty(current, 'attributes')) {\n finder.current = last(current.attributes);\n }\n else if (hasNonEmptyArrayProperty(current, 'name') &&\n isCoveredExcluded(cursor, current.blockStartPosition)) {\n finder.current = last(current.name);\n }\n else if (typeof current.name === 'string' &&\n isCoveredExcluded(cursor, current.blockStartPosition)) {\n /* break */\n }\n else {\n finder.current = undefined; // there's nothing to complete\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.LiquidTag: {\n if (isLiquidLiquidTag(finder.current) ||\n isCoveredExcluded(cursor, current.blockStartPosition) || // wouldn't want to complete {% if cond %} after the }.\n (isInLiquidLiquidTagContext(finder) && isCovered(cursor, current.blockStartPosition))) {\n if (hasNonNullProperty(current, 'markup') && typeof current.markup !== 'string') {\n finder.current = Array.isArray(current.markup) ? current.markup.at(-1) : current.markup;\n }\n else {\n // Exits the loop and the node is the thing to complete\n // (presumably name or something else)\n // finder.current = finder.current;\n }\n }\n else if (isIncompleteBlockTag(current)) {\n finder.current = last(current.children);\n }\n else {\n finder.current = undefined; // we're done and there's nothing to complete\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.LiquidBranch:\n if (isCovered(cursor, current.blockStartPosition) && typeof current.markup !== 'string') {\n finder.current = Array.isArray(current.markup) ? current.markup.at(-1) : current.markup;\n }\n else if (hasNonEmptyArrayProperty(current, 'children')) {\n finder.current = last(current.children);\n }\n else {\n finder.current = undefined; // there's nothing to complete\n }\n break;\n case liquid_html_parser_1.NodeTypes.LiquidRawTag:\n if (current.name === 'doc' && current.body.nodes.length > 0) {\n finder.current = current.body.nodes.at(-1);\n }\n break;\n case liquid_html_parser_1.NodeTypes.AttrDoubleQuoted:\n case liquid_html_parser_1.NodeTypes.AttrSingleQuoted:\n case liquid_html_parser_1.NodeTypes.AttrEmpty:\n case liquid_html_parser_1.NodeTypes.AttrUnquoted: {\n const lastNameNode = last(current.name); // there's at least one... guaranteed.\n if (isCovered(cursor, lastNameNode.position)) {\n finder.current = lastNameNode;\n }\n else if (current.type !== liquid_html_parser_1.NodeTypes.AttrEmpty &&\n isCovered(cursor, current.attributePosition) &&\n isNotEmpty(current.value)) {\n finder.current = last(current.value);\n }\n else {\n finder.current = undefined;\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.YAMLFrontmatter:\n case liquid_html_parser_1.NodeTypes.HtmlDoctype:\n case liquid_html_parser_1.NodeTypes.HtmlComment:\n case liquid_html_parser_1.NodeTypes.RawMarkup: {\n break;\n }\n case liquid_html_parser_1.NodeTypes.LiquidVariableOutput: {\n if (typeof current.markup !== 'string') {\n finder.current = current.markup;\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.LiquidVariable: {\n if (isNotEmpty(current.filters)) {\n finder.current = last(current.filters);\n }\n else {\n finder.current = current.expression;\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.LiquidFilter: {\n if (isNotEmpty(current.args)) {\n finder.current = last(current.args);\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.VariableLookup: {\n if (hasNonEmptyArrayProperty(current, 'lookups') &&\n last(current.lookups).type === liquid_html_parser_1.NodeTypes.VariableLookup) {\n finder.current = last(current.lookups);\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.AssignMarkup: {\n finder.current = current.value;\n break;\n }\n case liquid_html_parser_1.NodeTypes.ForMarkup: {\n if (isCovered(cursor, current.collection.position)) {\n finder.current = current.collection;\n }\n else if (isNotEmpty(current.args) && isCovered(cursor, last(current.args).position)) {\n finder.current = last(current.args);\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.NamedArgument: {\n if (isCovered(cursor, current.value.position)) {\n finder.current = current.value;\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.Comparison: {\n finder.current = current.right;\n break;\n }\n case liquid_html_parser_1.NodeTypes.LogicalExpression: {\n finder.current = current.right;\n break;\n }\n case liquid_html_parser_1.NodeTypes.CycleMarkup: {\n if (isNotEmpty(current.args)) {\n finder.current = last(current.args);\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.PaginateMarkup: {\n if (isNotEmpty(current.args)) {\n finder.current = last(current.args);\n }\n else if (isCovered(cursor, current.collection.position)) {\n finder.current = current.collection;\n }\n else if (isCovered(cursor, current.pageSize.position)) {\n finder.current = current.pageSize;\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.ContentForMarkup: {\n if (isNotEmpty(current.args)) {\n finder.current = last(current.args);\n }\n else if (isCovered(cursor, current.contentForType.position)) {\n finder.current = current.contentForType;\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.RenderMarkup: {\n if (isNotEmpty(current.args)) {\n finder.current = last(current.args);\n }\n else if (current.variable && isCovered(cursor, current.variable.position)) {\n finder.current = current.variable;\n }\n else if (current.snippet && isCovered(cursor, current.snippet.position)) {\n finder.current = current.snippet;\n }\n break;\n }\n case liquid_html_parser_1.NodeTypes.RenderVariableExpression: {\n finder.current = current.name;\n break;\n }\n case liquid_html_parser_1.NodeTypes.Range: {\n // This means you can't complete the start range as a variable...\n // is this bad?\n finder.current = current.end;\n break;\n }\n // If you end up on any of these. You're done.\n // That's the current node.\n case liquid_html_parser_1.NodeTypes.TextNode:\n case liquid_html_parser_1.NodeTypes.LiquidLiteral:\n case liquid_html_parser_1.NodeTypes.BooleanExpression:\n case liquid_html_parser_1.NodeTypes.String:\n case liquid_html_parser_1.NodeTypes.Number:\n case liquid_html_parser_1.NodeTypes.LiquidDocParamNode:\n case liquid_html_parser_1.NodeTypes.LiquidDocExampleNode:\n case liquid_html_parser_1.NodeTypes.LiquidDocDescriptionNode:\n case liquid_html_parser_1.NodeTypes.LiquidDocPromptNode:\n case liquid_html_parser_1.NodeTypes.RenderAliasExpression: {\n break;\n }\n default: {\n return assertNever(current);\n }\n }\n }\n return [finder.stack.pop(), finder.stack];\n}\nfunction hasNonNullProperty(thing, property) {\n return thing !== null && property in thing && !!thing[property];\n}\nfunction isIncompleteBlockTag(thing) {\n return (hasNonEmptyArrayProperty(thing, 'children') &&\n (!hasNonNullProperty(thing, 'blockEndPosition') ||\n (thing.blockEndPosition.start === -1 && thing.blockEndPosition.end === -1)));\n}\nfunction isCompletedTag(thing) {\n return (hasNonNullProperty(thing, 'blockEndPosition') &&\n thing.blockEndPosition.start !== -1 &&\n thing.blockEndPosition.end !== -1);\n}\nfunction hasNonEmptyArrayProperty(thing, property) {\n return (thing !== null &&\n property in thing &&\n Array.isArray(thing[property]) &&\n !isEmpty(thing[property]));\n}\nfunction isInLiquidLiquidTagContext(finder) {\n return finder.stack.some(isLiquidLiquidTag);\n}\nfunction isLiquidLiquidTag(node) {\n if (!node)\n return false;\n return node.type === liquid_html_parser_1.NodeTypes.LiquidTag && node.name === 'liquid';\n}\nfunction isCoveredExcluded(cursor, position) {\n return position.start <= cursor && cursor < position.end;\n}\nfunction isCovered(cursor, position) {\n return position.start <= cursor && cursor <= position.end;\n}\nfunction isNotEmpty(x) {\n return x.length > 0;\n}\nfunction isEmpty(x) {\n return x.length === 0;\n}\nfunction last(x) {\n return x[x.length - 1];\n}\nfunction assertNever(x) {\n throw new Error(`This function should never be called, but was called with ${x}`);\n}\n//# sourceMappingURL=LiquidCompletionParams.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CURSOR = void 0;\nexports.fix = fix;\nexports.CURSOR = '█';\nconst SINGLE_QUOTE = `'`;\nconst DOUBLE_QUOTE = `\"`;\nconst HTML_TOKENS = ['<', '>'];\nconst SHOULD_IGNORE_HTML_TOKENS = [SINGLE_QUOTE, DOUBLE_QUOTE, '{{', '{%'];\nconst QUOTES = [SINGLE_QUOTE, DOUBLE_QUOTE];\nconst CONTROL_TOKENS = ['{{', '{%', '<'];\nconst TokenPairs = {\n \"'\": \"'\",\n '\"': '\"',\n '{{': '}}',\n '{%': '%}',\n '<': '>',\n '[': ']',\n '(': ')',\n};\n/**\n * Fix the source code and return the new fixed source with the new absolute\n * position\n *\n * @param source - source code\n * @param position - absolute position\n *\n * @returns new fixed source\n */\nfunction fix(source, position = source.length) {\n const fixer = new Fixer(source, position);\n return fixer.fix();\n}\nclass Fixer {\n constructor(source, position) {\n /**\n * A list of quotes, <, [, etc. We'll pass through that list to determine\n * what needs to be closed at the end.\n */\n this.tokens = [];\n /**\n * A stack of closing tokens such that when we're done we simply pop\n * everything out into the string to get a fixed string.\n */\n this.stack = [];\n this.cursor = 0;\n this.markup = source.slice(0, position);\n }\n /**\n * This is cool, so bear with me.\n *\n * We'll scan the entire string up to the cursor position and turn that\n * into a list of tokens\n *\n * input:\n * `<a href=\"hi'\" other=\"{{ 'there'`\n *\n * output:\n * - <\n * - \"\n * - '\n * - \"\n * - \"\n * - {{\n * - '\n * - '\n * - }}\n * - \"\n *\n * Then we take that output, and we turn it into a stack\n * (open tokens push, close tokens pop)\n *\n * stack evolution:\n * - < # open tag\n * - < \" # add quote\n * - < \" # (single quote is ignored)\n * - < # close quote\n * - < \" # open new quote\n * - < \" {{ # open liquid variable output\n * - < \" {{ ' # open liquid string in variable output\n * - < \" {{ # close liquid string in variable output\n *\n * then we pop the close characters of that stack onto the string and\n * have a fixed string\n *\n * - <a href=\"hi'\" other=\"{{ 'there' # start\n * - <a href=\"hi'\" other=\"{{ 'there'}} # pop close {{\n * - <a href=\"hi'\" other=\"{{ 'there'}}\" # pop close \"\n * - <a href=\"hi'\" other=\"{{ 'there'}}\"> # pop close <\n *\n * And there we go, we have a fixed string.\n */\n fix() {\n this.scanTokens();\n this.buildStack();\n let markup = this.markup;\n if (this.shouldIncludeCursorPlaceholder()) {\n markup += exports.CURSOR;\n }\n while (this.stack.length !== 0) {\n markup += this.stack.pop();\n }\n return markup;\n }\n buildStack() {\n for (let token of this.tokens) {\n if (this.shouldPanic(token)) {\n while (token !== this.stack.pop()) { }\n }\n else if (this.shouldSkipToken(token)) {\n /* do nothing */\n }\n else if (this.isClosingToken(token)) {\n this.stack.pop();\n }\n else {\n const closingToken = TokenPairs[token];\n if (closingToken) {\n this.stack.push(closingToken);\n }\n }\n }\n }\n isClosingToken(token) {\n return this.current === token;\n }\n shouldPanic(token) {\n const isInStringContext = QUOTES.includes(this.current);\n return isInStringContext && this.stack.at(-2) === token;\n }\n shouldSkipToken(token) {\n const current = this.current;\n const isInTextContext = !current;\n const isInStringContext = QUOTES.includes(current);\n const isInLiquidContext = this.stack.includes('}}') || this.stack.includes('%}');\n return ((isInTextContext && !CONTROL_TOKENS.includes(token)) ||\n (isInStringContext && !CONTROL_TOKENS.includes(token) && !QUOTES.includes(token)) ||\n (isInLiquidContext && token === '<') ||\n (current === SINGLE_QUOTE && token === DOUBLE_QUOTE) ||\n (current === DOUBLE_QUOTE && token === SINGLE_QUOTE) ||\n (SHOULD_IGNORE_HTML_TOKENS.includes(current) && HTML_TOKENS.includes(token)));\n }\n scanTokens() {\n while (!this.isAtEnd()) {\n const character = this.peek();\n switch (character) {\n case DOUBLE_QUOTE:\n case SINGLE_QUOTE:\n case '(':\n case ')':\n case '[':\n case ']': {\n this.pushToken(character);\n break;\n }\n case '{': {\n if (this.matchNext('%')) {\n this.pushToken('{%');\n }\n else if (this.matchNext('{')) {\n this.pushToken('{{');\n }\n break;\n }\n case '%': {\n if (this.matchNext('}')) {\n this.pushToken('%}');\n }\n break;\n }\n case '}': {\n if (this.matchNext('}')) {\n this.pushToken('}}');\n }\n break;\n }\n case '<': {\n if (this.testNext(/[a-z{\\/]/i)) {\n this.pushToken('<');\n }\n break;\n }\n case '>': {\n this.pushToken('>');\n break;\n }\n default: {\n /* do nothing */\n }\n }\n this.advance();\n }\n }\n shouldIncludeCursorPlaceholder() {\n var _a, _b;\n const prevCharacter = (_a = this.markup.at(-1)) !== null && _a !== void 0 ? _a : '';\n const prevPrevCharacter = (_b = this.markup.at(-2)) !== null && _b !== void 0 ? _b : '';\n const isInLiquidContext = this.stack.includes('%}') || this.stack.includes('}}');\n const isInHtmlContext = this.current === '>';\n const isInStringContext = QUOTES.includes(this.current);\n return ((isInStringContext && this.stack.at(-2) === '>' && QUOTES.includes(prevCharacter)) ||\n (isInHtmlContext &&\n (/\\s/.test(prevCharacter) ||\n prevCharacter === '<' ||\n (prevPrevCharacter === '<' && prevCharacter === '/') ||\n (prevPrevCharacter === '%' && prevCharacter === '}'))) ||\n (isInLiquidContext &&\n ((!isInStringContext && [' ', '\\t', '\\n', '.', '{', '[', ','].includes(prevCharacter)) ||\n (isInStringContext && prevPrevCharacter === '['))));\n }\n get current() {\n return this.stack.at(-1);\n }\n advance() {\n this.cursor += 1;\n }\n matchNext(character) {\n if (this.peekNext() !== character)\n return false;\n this.cursor++;\n return true;\n }\n testNext(regex) {\n return regex.test(this.peekNext());\n }\n peek(cursor = this.cursor) {\n return this.markup[cursor];\n }\n peekNext(cursor = this.cursor) {\n return this.markup[cursor + 1];\n }\n pushToken(token) {\n this.tokens.push(token);\n }\n isAtEnd() {\n return this.cursor >= this.markup.length;\n }\n}\n//# sourceMappingURL=fix.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CURSOR = exports.createLiquidCompletionParams = void 0;\nvar LiquidCompletionParams_1 = require(\"./LiquidCompletionParams\");\nObject.defineProperty(exports, \"createLiquidCompletionParams\", { enumerable: true, get: function () { return LiquidCompletionParams_1.createLiquidCompletionParams; } });\nvar fix_1 = require(\"./fix\");\nObject.defineProperty(exports, \"CURSOR\", { enumerable: true, get: function () { return fix_1.CURSOR; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContentForBlockTypeCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nclass ContentForBlockTypeCompletionProvider {\n constructor(getThemeBlockNames) {\n this.getThemeBlockNames = getThemeBlockNames;\n }\n async completions(params) {\n if (!params.completionContext)\n return [];\n const { document } = params;\n const doc = document.textDocument;\n const { node, ancestors } = params.completionContext;\n const parentNode = ancestors.at(-1);\n const grandParentNode = ancestors.at(-2);\n if (!node ||\n !parentNode ||\n !grandParentNode ||\n node.type !== liquid_html_parser_1.NodeTypes.String ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.NamedArgument ||\n parentNode.name !== 'type' ||\n grandParentNode.type !== liquid_html_parser_1.NodeTypes.ContentForMarkup ||\n grandParentNode.contentForType.value !== 'block') {\n return [];\n }\n return (await this.getThemeBlockNames(doc.uri, false)).map((blockName) => ({\n label: blockName,\n kind: vscode_languageserver_1.CompletionItemKind.EnumMember,\n insertText: blockName,\n }));\n }\n}\nexports.ContentForBlockTypeCompletionProvider = ContentForBlockTypeCompletionProvider;\n//# sourceMappingURL=ContentForBlockTypeCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContentForCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nclass ContentForCompletionProvider {\n constructor() { }\n async completions(params) {\n if (!params.completionContext)\n return [];\n const { document } = params;\n const doc = document.textDocument;\n const { node, ancestors } = params.completionContext;\n const parentNode = ancestors.at(-1);\n if (!node ||\n !parentNode ||\n node.type !== liquid_html_parser_1.NodeTypes.String ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.ContentForMarkup) {\n return [];\n }\n const options = [\n {\n keyword: 'block',\n description: 'Renders a static theme block within `sections` or `theme blocks`.\\n',\n syntax: \"content_for 'block', type: '$1', id: '$2'\",\n },\n {\n keyword: 'blocks',\n description: `Renders block elements within sections or other blocks as configured in the JSON template or section groups.\nSee [theme blocks](https://shopify.dev/docs/storefronts/themes/architecture/blocks/theme-blocks)\nto see how to create theme blocks that can be used this way.\\n`,\n syntax: `content_for 'blocks'`,\n },\n ];\n const partial = node.value;\n const isInLiquidLiquidTag = ancestors.some((node) => node.type === liquid_html_parser_1.NodeTypes.LiquidTag && node.name === 'liquid');\n const startPosition = node.position.start + 1; // after the quote\n const endPosition = indexOf(document.source, \n // We want to maintain trailing whitespace to whatever it was before the completion\n isInLiquidLiquidTag ? / *\\n/g : /\\s*-?%}/gm, startPosition + partial.length);\n const hasMarkup = document.source\n .slice(startPosition + partial.length, endPosition)\n .replace(/^['\"]/, '')\n .trim() !== '';\n const shouldCompleteSyntax = endPosition !== -1 && !hasMarkup;\n return options\n .filter(({ keyword }) => keyword.startsWith(partial))\n .map(({ keyword, description, syntax }) => {\n const item = {\n label: keyword,\n kind: vscode_languageserver_1.CompletionItemKind.Keyword,\n insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText,\n documentation: {\n kind: 'markdown',\n value: description,\n },\n };\n if (shouldCompleteSyntax) {\n const snippetText = getSnippetText(node, syntax);\n item.insertTextFormat = vscode_languageserver_1.InsertTextFormat.Snippet;\n item.textEdit = vscode_languageserver_1.TextEdit.replace(vscode_languageserver_1.Range.create(doc.positionAt(startPosition), doc.positionAt(endPosition)), snippetText);\n }\n return item;\n });\n }\n}\nexports.ContentForCompletionProvider = ContentForCompletionProvider;\nfunction getSnippetText(node, syntax) {\n // Language clients don't like it when the text edit starts before the word being completed\n // So we make the snippet text start with the word being completed\n return (syntax\n .replace(/^content_for '/, '')\n // use the same quote type as the original string everywhere in the snippet\n .replace(node.single ? /\"/g : /'/g, node.single ? \"'\" : '\"'));\n}\n/**\n * String.prototype.indexOf does not accept RegExp args...\n * String.prototype.search does not accept fromIndex args...\n *\n * We want both.\n */\nfunction indexOf(string, searchValue, fromIndex) {\n searchValue.lastIndex = fromIndex;\n const match = searchValue.exec(string);\n return match ? match.index : -1;\n}\n//# sourceMappingURL=ContentForCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContentForParameterCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst params_1 = require(\"../params\");\nconst contentForParameterCompletionOptions_1 = require(\"./data/contentForParameterCompletionOptions\");\nconst liquidDoc_1 = require(\"../../utils/liquidDoc\");\n/**\n * Offers completions for parameters for the `content_for` tag after a user has\n * specificied the type.\n *\n * @example {% content_for \"block\", █ %}\n */\nclass ContentForParameterCompletionProvider {\n constructor(getDocDefinitionForURI) {\n this.getDocDefinitionForURI = getDocDefinitionForURI;\n }\n async completions(params) {\n var _a;\n if (!params.completionContext)\n return [];\n const { node, ancestors } = params.completionContext;\n const parentNode = ancestors.at(-1);\n const parentIsContentFor = (parentNode === null || parentNode === void 0 ? void 0 : parentNode.type) == liquid_html_parser_1.NodeTypes.ContentForMarkup;\n const nodeIsVariableLookup = (node === null || node === void 0 ? void 0 : node.type) == liquid_html_parser_1.NodeTypes.VariableLookup;\n if (!parentIsContentFor || !nodeIsVariableLookup) {\n return [];\n }\n if (!node.name || node.lookups.length > 0) {\n return [];\n }\n const completionItems = this.staticCompletions(node, parentNode.contentForType.value == 'blocks', params.document);\n if (parentNode.contentForType.value === 'block') {\n const typeArg = (_a = parentNode.args.find((arg) => arg.name === 'type')) === null || _a === void 0 ? void 0 : _a.value;\n if ((typeArg === null || typeArg === void 0 ? void 0 : typeArg.type) === liquid_html_parser_1.NodeTypes.String) {\n const snippetDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, 'blocks', typeArg.value);\n completionItems.push(...this.liquidDocParameterCompletions(node, params.document, snippetDefinition));\n }\n }\n // We need to find out existing params in the content_for tag so we don't offer it again for completion\n const existingParams = parentNode.args\n .filter((arg) => arg.type === liquid_html_parser_1.NodeTypes.NamedArgument)\n .map((arg) => arg.name);\n return completionItems.filter((item) => !existingParams.includes(item.label));\n }\n textEdit(node, document, name, textTemplate = `${name}: '$1'`) {\n var _a, _b;\n const remainingText = document.source.slice(node.position.end);\n // Match all the way up to the termination of the parameter which could be\n // another parameter (`,`), filter (`|`), or the end of a liquid statement.\n const match = remainingText.match(/^(.*?)\\s*(?=,|\\||-?\\}\\}|-?\\%\\})|^(.*)$/);\n const offset = match ? match[0].trimEnd().length : remainingText.length;\n const existingParameterOffset = (_b = (_a = remainingText.match(/[^a-zA-Z]/)) === null || _a === void 0 ? void 0 : _a.index) !== null && _b !== void 0 ? _b : remainingText.length;\n let start = document.textDocument.positionAt(node.position.start);\n let end = document.textDocument.positionAt(node.position.end + offset);\n let newText = name === 'closest' ? `${name}.` : textTemplate;\n let format = name === 'closest' ? vscode_languageserver_1.InsertTextFormat.PlainText : vscode_languageserver_1.InsertTextFormat.Snippet;\n // If the cursor is inside the parameter or at the end and it's the same\n // value as the one we're offering a completion for then we want to restrict\n // the insert to just the name of the parameter.\n // e.g. `{% content_for \"block\", t█ype: \"button\" %}` and we're offering `type`\n if (node.name + remainingText.slice(0, existingParameterOffset) == name) {\n newText = name;\n format = vscode_languageserver_1.InsertTextFormat.PlainText;\n end = document.textDocument.positionAt(node.position.end + existingParameterOffset);\n }\n // If the cursor is at the beginning of the string we can consider all\n // options and should not replace any text.\n // e.g. `{% content_for \"block\", █type: \"button\" %}`\n // e.g. `{% content_for \"block\", █ %}`\n if (node.name === params_1.CURSOR) {\n end = start;\n // If we're inserting text in front of an existing parameter then we need\n // to add a comma to separate them.\n if (existingParameterOffset > 0) {\n newText += ', ';\n }\n }\n return {\n textEdit: vscode_languageserver_1.TextEdit.replace({\n start,\n end,\n }, newText),\n format,\n };\n }\n staticCompletions(node, isTypeBlocks, document) {\n let options = contentForParameterCompletionOptions_1.DEFAULT_COMPLETION_OPTIONS;\n const partial = node.name.replace(params_1.CURSOR, '');\n if (isTypeBlocks) {\n options = {\n closest: contentForParameterCompletionOptions_1.DEFAULT_COMPLETION_OPTIONS.closest,\n };\n }\n return Object.entries(options)\n .filter(([keyword, _description]) => keyword.startsWith(partial))\n .map(([keyword, description]) => {\n const { textEdit, format } = this.textEdit(node, document, keyword);\n return {\n label: keyword,\n kind: vscode_languageserver_1.CompletionItemKind.Keyword,\n documentation: {\n kind: 'markdown',\n value: description,\n },\n insertTextFormat: format,\n textEdit,\n };\n });\n }\n liquidDocParameterCompletions(node, document, docDefinition) {\n var _a;\n return (((_a = docDefinition === null || docDefinition === void 0 ? void 0 : docDefinition.liquidDoc) === null || _a === void 0 ? void 0 : _a.parameters) || []).map((liquidDocParam) => {\n const { textEdit, format } = this.textEdit(node, document, liquidDocParam.name, (0, liquidDoc_1.getParameterCompletionTemplate)(liquidDocParam.name, liquidDocParam.type));\n return {\n label: liquidDocParam.name,\n kind: vscode_languageserver_1.CompletionItemKind.Keyword,\n documentation: {\n kind: 'markdown',\n value: liquidDocParam.description || '',\n },\n insertTextFormat: format,\n textEdit,\n };\n });\n }\n}\nexports.ContentForParameterCompletionProvider = ContentForParameterCompletionProvider;\n//# sourceMappingURL=ContentForParameterCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FilterCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst TypeSystem_1 = require(\"../../TypeSystem\");\nconst utils_1 = require(\"../../utils\");\nconst params_1 = require(\"../params\");\nconst common_1 = require(\"./common\");\nclass FilterCompletionProvider {\n constructor(typeSystem) {\n this.typeSystem = typeSystem;\n this.options = (0, utils_1.memoize)(async (inputType) => {\n const filterEntries = await this.typeSystem.filterEntries();\n const options = filterEntries\n .filter((entry) => { var _a; return (_a = entry.syntax) === null || _a === void 0 ? void 0 : _a.startsWith(inputType); })\n .sort(common_1.sortByName);\n // Case we take \"anything\" as argument\n if (inputType === 'variable') {\n const entriesWithoutSyntax = filterEntries.filter((entry) => !entry.syntax);\n return options.concat(entriesWithoutSyntax).sort(common_1.sortByName);\n }\n // Case there doesn't exist filter entries for that type\n if (options.length === 0) {\n return filterEntries.sort(common_1.sortByName);\n }\n const untypedOptions = await this.options('variable');\n // We show 'array' options before 'untyped' options because they feel\n // like better options.\n return [...options, ...untypedOptions.map(deprioritized)];\n }, (inputType) => inputType);\n }\n async completions(params) {\n if (!params.completionContext)\n return [];\n const { partialAst, node, ancestors } = params.completionContext;\n if (!node || node.type !== liquid_html_parser_1.NodeTypes.LiquidFilter) {\n return [];\n }\n if (node.args.length > 0) {\n // We only do name completion\n return [];\n }\n // We'll fake a LiquidVariable\n let parentVariable = ancestors.at(-1);\n if (!parentVariable ||\n parentVariable.type !== liquid_html_parser_1.NodeTypes.LiquidVariable ||\n parentVariable.filters.at(-1) !== node) {\n return []; // something went wrong...\n }\n // We'll infer the type of the variable up to the last filter (excluding this one)\n parentVariable = { ...parentVariable }; // soft clone\n parentVariable.filters = parentVariable.filters.slice(0, -1); // remove last one\n const inputType = await this.typeSystem.inferType(parentVariable, partialAst, params.textDocument.uri);\n const partial = node.name.replace(params_1.CURSOR, '');\n const options = await this.options((0, TypeSystem_1.isArrayType)(inputType) ? 'array' : inputType);\n return options\n .filter(({ name }) => name.startsWith(partial))\n .map((entry) => {\n const { textEdit, format } = this.textEdit(node, params.document, entry);\n return (0, common_1.createCompletionItem)(entry, {\n kind: vscode_languageserver_1.CompletionItemKind.Function,\n insertTextFormat: format,\n textEdit,\n }, 'filter');\n });\n }\n textEdit(node, document, entry) {\n var _a, _b;\n const remainingText = document.source.slice(node.position.end);\n // Match all the way up to the termination of the filter which could be\n // another filter (`|`), or the end of a liquid statement.\n const matchEndOfFilter = remainingText.match(/^(.*?)\\s*(?=\\||-?\\}\\}|-?\\%\\})|^(.*)$/);\n const endOffset = matchEndOfFilter ? matchEndOfFilter[1].length : remainingText.length;\n // The start position for a LiquidFilter node includes the `|`. We need to\n // ignore the pipe and any spaces for our starting position.\n const pipeRegex = new RegExp(`(\\\\s*\\\\|\\\\s*)(?:${node.name}(?:\\\\}|\\\\%)\\\\})`);\n const matchFilterPipe = node.source.match(pipeRegex);\n const startOffet = matchFilterPipe ? matchFilterPipe[1].length : 0;\n let start = document.textDocument.positionAt(node.position.start + startOffet);\n let end = document.textDocument.positionAt(node.position.end + endOffset);\n const { insertText, insertStyle } = appendRequiredParemeters(entry);\n let newText = insertText;\n let format = insertStyle;\n // If the cursor is inside the filter or at the end and it's the same\n // value as the one we're offering a completion for then we want to restrict\n // the insert to just the name of the filter.\n // e.g. `{{ product | imag█e_url: crop: 'center' }}` and we're offering `imag█e_url`\n const existingFilterOffset = (_b = (_a = remainingText.match(/[^a-zA-Z_]/)) === null || _a === void 0 ? void 0 : _a.index) !== null && _b !== void 0 ? _b : remainingText.length;\n if (node.name + remainingText.slice(0, existingFilterOffset) === entry.name) {\n newText = entry.name;\n format = vscode_languageserver_1.InsertTextFormat.PlainText;\n end = document.textDocument.positionAt(node.position.end + existingFilterOffset);\n }\n // If the cursor is at the beginning of the string we can consider all\n // options and should not replace any text.\n // e.g. `{{ product | █image_url: crop: 'center' }}`\n // e.g. `{{ product | █ }}`\n if (node.name === params_1.CURSOR) {\n end = start;\n }\n return {\n textEdit: vscode_languageserver_1.TextEdit.replace({\n start,\n end,\n }, newText),\n format,\n };\n }\n}\nexports.FilterCompletionProvider = FilterCompletionProvider;\nfunction deprioritized(entry) {\n return { ...entry, deprioritized: true };\n}\nfunction appendRequiredParemeters(entry) {\n var _a;\n let insertText = entry.name;\n let insertStyle = vscode_languageserver_1.InsertTextFormat.PlainText;\n if (!((_a = entry === null || entry === void 0 ? void 0 : entry.parameters) === null || _a === void 0 ? void 0 : _a.length)) {\n return { insertText, insertStyle };\n }\n const requiredPositionalParams = entry.parameters\n .filter((p) => p.required && p.positional)\n .map(formatParameter);\n const requiredNamedParams = entry.parameters\n .filter((p) => p.required && !p.positional)\n .map(formatParameter);\n if (requiredPositionalParams.length) {\n insertText += `: ${requiredPositionalParams.join(', ')}`;\n insertStyle = vscode_languageserver_1.InsertTextFormat.Snippet;\n }\n if (requiredNamedParams.length) {\n insertText += `: ${requiredNamedParams.join(', ')}`;\n insertStyle = vscode_languageserver_1.InsertTextFormat.Snippet;\n }\n return {\n insertText,\n insertStyle,\n };\n}\nfunction formatParameter(parameter, index) {\n let cursorLocation = '';\n if (parameter.positional) {\n cursorLocation = `$\\{${index + 1}:${parameter.name}\\}`;\n }\n else {\n cursorLocation = `$${index + 1}`;\n }\n if (parameter.types[0] === 'string') {\n cursorLocation = `'${cursorLocation}'`;\n }\n return parameter.positional ? cursorLocation : `${parameter.name}: ${cursorLocation}`;\n}\n//# sourceMappingURL=FilterCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FilterNamedParameterCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst params_1 = require(\"../params\");\nconst common_1 = require(\"./common\");\nclass FilterNamedParameterCompletionProvider {\n constructor(themeDocset) {\n this.themeDocset = themeDocset;\n }\n async completions(params) {\n if (!params.completionContext)\n return [];\n const { node } = params.completionContext;\n if (!node || node.type !== liquid_html_parser_1.NodeTypes.VariableLookup) {\n return [];\n }\n if (!node.name || node.lookups.length > 0) {\n // We only do top level in this one.\n return [];\n }\n const partial = node.name.replace(params_1.CURSOR, '');\n const currentContext = params.completionContext.ancestors.at(-1);\n if (!currentContext || (currentContext === null || currentContext === void 0 ? void 0 : currentContext.type) !== liquid_html_parser_1.NodeTypes.LiquidFilter) {\n return [];\n }\n const filters = await this.themeDocset.filters();\n const foundFilter = filters.find((f) => f.name === currentContext.name);\n if (!(foundFilter === null || foundFilter === void 0 ? void 0 : foundFilter.parameters)) {\n return [];\n }\n const filteredOptions = foundFilter.parameters.filter((p) => !p.positional && p.name.startsWith(partial));\n return filteredOptions.map(({ description, name, types }) => {\n const { textEdit, format } = this.textEdit(node, params.document, name, types[0]);\n return (0, common_1.createCompletionItem)({\n name,\n description,\n }, {\n kind: vscode_languageserver_1.CompletionItemKind.TypeParameter,\n insertTextFormat: format,\n // We want to force these options to appear first in the list given\n // the context that they are being requested in.\n sortText: `1${name}`,\n textEdit,\n }, 'filter', Array.isArray(types) ? types[0] : 'unknown');\n });\n }\n textEdit(node, document, name, type) {\n var _a, _b;\n const remainingText = document.source.slice(node.position.end);\n // Match all the way up to the termination of the parameter which could be\n // another parameter (`,`), filter (`|`), or the end of a liquid statement.\n const match = remainingText.match(/^(.*?)\\s*(?=,|\\||-?\\}\\}|-?\\%\\})|^(.*)$/);\n const offset = match ? match[0].length : remainingText.length;\n const existingParameterOffset = (_b = (_a = remainingText.match(/[^a-zA-Z]/)) === null || _a === void 0 ? void 0 : _a.index) !== null && _b !== void 0 ? _b : remainingText.length;\n let start = document.textDocument.positionAt(node.position.start);\n let end = document.textDocument.positionAt(node.position.end + offset);\n let newText = type === 'string' ? `${name}: '$1'` : `${name}: `;\n let format = type === 'string' ? vscode_languageserver_1.InsertTextFormat.Snippet : vscode_languageserver_1.InsertTextFormat.PlainText;\n // If the cursor is inside the parameter or at the end and it's the same\n // value as the one we're offering a completion for then we want to restrict\n // the insert to just the name of the parameter.\n // e.g. `{{ product | image_url: cr█op: 'center' }}` and we're offering `crop`\n if (node.name + remainingText.slice(0, existingParameterOffset) == name) {\n newText = name;\n format = vscode_languageserver_1.InsertTextFormat.PlainText;\n end = document.textDocument.positionAt(node.position.end + existingParameterOffset);\n }\n // If the cursor is at the beginning of the string we can consider all\n // options and should not replace any text.\n // e.g. `{{ product | image_url: █crop: 'center' }}`\n // e.g. `{{ product | image_url: █ }}`\n if (node.name === '█') {\n end = start;\n }\n return {\n textEdit: vscode_languageserver_1.TextEdit.replace({\n start,\n end,\n }, newText),\n format,\n };\n }\n}\nexports.FilterNamedParameterCompletionProvider = FilterNamedParameterCompletionProvider;\n//# sourceMappingURL=FilterNamedParameterCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HtmlAttributeCompletionProvider = void 0;\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst docset_1 = require(\"../../docset\");\nconst utils_1 = require(\"../../utils\");\nconst params_1 = require(\"../params\");\nconst common_1 = require(\"./common\");\nclass HtmlAttributeCompletionProvider {\n constructor(documentManager) {\n this.documentManager = documentManager;\n }\n async completions(params) {\n if (!params.completionContext)\n return [];\n const { node, ancestors } = params.completionContext;\n const parentNode = (0, utils_1.findLast)(ancestors, utils_1.isAttrEmpty);\n const grandParentNode = (0, utils_1.findLast)(ancestors, utils_1.isNamedHtmlElementNode);\n const document = this.documentManager.get(params.textDocument.uri);\n if (!node || !parentNode || !grandParentNode || !document) {\n return [];\n }\n if (!(0, utils_1.isTextNode)(node) || !(0, utils_1.isAttrEmpty)(parentNode) || !(0, utils_1.isNamedHtmlElementNode)(grandParentNode)) {\n return [];\n }\n const grandParentNodeName = (0, utils_1.getCompoundName)(grandParentNode);\n const name = node.value;\n const partial = name.replace(params_1.CURSOR, '');\n const options = getOptions(partial, grandParentNodeName);\n const attributeTagRange = this.attributeTagRange(node, document);\n const hasExistingAttributeValue = this.hasExistingAttributeValue(attributeTagRange, document);\n const hasLiquidTag = this.hasLiquidTag(attributeTagRange, document);\n return options.sort(common_1.sortByName).map((tag) => {\n return toCompletionItem(tag, attributeTagRange, hasExistingAttributeValue, hasLiquidTag);\n });\n }\n hasExistingAttributeValue(attributeTagRange, document) {\n return /^\\s*=/.test(document.source.slice(document.textDocument.offsetAt(attributeTagRange.end)));\n }\n hasLiquidTag(attributeTagRange, document) {\n return /^(?:\\{%|\\{\\{)/.test(document.source.slice(document.textDocument.offsetAt(attributeTagRange.end)));\n }\n // Find the range of the attribute partial. If the attribute contains any liquid code, the range\n // will end before the first character of the liquid block.\n attributeTagRange(node, document) {\n var _a, _b;\n if (node.type === 'TextNode' && node.value === params_1.CURSOR) {\n // If you try to auto-complete with no provided attribute tag,\n // we will not try to override the subsequent character.\n // E.g. <a href=\"\" █>\n return {\n start: document.textDocument.positionAt(node.position.start),\n end: document.textDocument.positionAt(node.position.start),\n };\n }\n const sourcePartialPastCursor = document.source.slice(node.position.end);\n const attributeEndOffset = (_b = (_a = sourcePartialPastCursor.match(/[\\s=]|\\{%|\\{\\{|>/)) === null || _a === void 0 ? void 0 : _a.index) !== null && _b !== void 0 ? _b : sourcePartialPastCursor.length;\n return {\n start: document.textDocument.positionAt(node.position.start),\n end: document.textDocument.positionAt(node.position.end + attributeEndOffset),\n };\n }\n}\nexports.HtmlAttributeCompletionProvider = HtmlAttributeCompletionProvider;\nfunction getOptions(partial, parentNodeName) {\n var _a;\n const tag = docset_1.HtmlData.tags.find((tag) => tag.name === parentNodeName);\n const parentAttributes = (_a = tag === null || tag === void 0 ? void 0 : tag.attributes) !== null && _a !== void 0 ? _a : [];\n return [...parentAttributes, ...docset_1.HtmlData.globalAttributes].filter((x) => x.name.startsWith(partial));\n}\nfunction toCompletionItem(tag, attributeTagRange, hasExistingAttributeValue, hasLiquidTag) {\n const attributeWithValue = !tag.valueSet || tag.valueSet !== 'v';\n const insertSnippet = attributeWithValue && !hasExistingAttributeValue && !hasLiquidTag;\n return {\n label: tag.name,\n kind: vscode_languageserver_1.CompletionItemKind.Value,\n insertTextFormat: insertSnippet ? vscode_languageserver_1.InsertTextFormat.Snippet : vscode_languageserver_1.InsertTextFormat.PlainText,\n textEdit: vscode_languageserver_1.TextEdit.replace(attributeTagRange, insertSnippet ? `${tag.name}=\"$1\"$0` : tag.name),\n documentation: {\n kind: 'markdown',\n value: (0, docset_1.renderHtmlEntry)(tag),\n },\n };\n}\n//# sourceMappingURL=HtmlAttributeCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HtmlAttributeValueCompletionProvider = void 0;\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst docset_1 = require(\"../../docset\");\nconst utils_1 = require(\"../../utils\");\nconst params_1 = require(\"../params\");\nconst common_1 = require(\"./common\");\nclass HtmlAttributeValueCompletionProvider {\n constructor() { }\n async completions(params) {\n var _a, _b;\n if (!params.completionContext)\n return [];\n const { node, ancestors } = params.completionContext;\n const attributeNode = (0, utils_1.findLast)(ancestors, utils_1.isHtmlAttribute);\n const tagNode = (0, utils_1.findLast)(ancestors, utils_1.isNamedHtmlElementNode);\n if (!node ||\n !attributeNode ||\n !tagNode ||\n !(0, utils_1.isTextNode)(node) ||\n !(0, utils_1.isHtmlAttribute)(attributeNode) ||\n !(0, utils_1.isNamedHtmlElementNode)(tagNode) ||\n (0, utils_1.isAttrEmpty)(attributeNode) ||\n !attributeNode.value.includes(node)) {\n return [];\n }\n const tagName = (0, utils_1.getCompoundName)(tagNode);\n const attrName = (0, utils_1.getCompoundName)(attributeNode);\n const name = node.value;\n const partial = name.replace(params_1.CURSOR, '');\n const tagEntry = docset_1.HtmlData.tags.find((tag) => tag.name === tagName);\n const attribute = (_a = docset_1.HtmlData.globalAttributes.find((attr) => attr.name === attrName)) !== null && _a !== void 0 ? _a : tagEntry === null || tagEntry === void 0 ? void 0 : tagEntry.attributes.find((attr) => attr.name === attrName);\n const valueSetName = attribute === null || attribute === void 0 ? void 0 : attribute.valueSet;\n const valueSetEntry = docset_1.HtmlData.valueSets.find((valueSet) => valueSet.name === valueSetName);\n const options = ((_b = valueSetEntry === null || valueSetEntry === void 0 ? void 0 : valueSetEntry.values) !== null && _b !== void 0 ? _b : []).filter((value) => value.name.startsWith(partial));\n return options\n .sort(common_1.sortByName)\n .map((option) => toCompletionItem(option, attribute && 'references' in attribute ? attribute : tagEntry));\n }\n}\nexports.HtmlAttributeValueCompletionProvider = HtmlAttributeValueCompletionProvider;\nfunction toCompletionItem(value, parentEntry) {\n return {\n label: value.name,\n kind: vscode_languageserver_1.CompletionItemKind.Value,\n documentation: {\n kind: 'markdown',\n value: (0, docset_1.renderHtmlEntry)(value, parentEntry),\n },\n };\n}\n//# sourceMappingURL=HtmlAttributeValueCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HtmlTagCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst docset_1 = require(\"../../docset\");\nconst utils_1 = require(\"../../utils\");\nconst params_1 = require(\"../params\");\nconst common_1 = require(\"./common\");\nclass HtmlTagCompletionProvider {\n constructor() { }\n async completions(params) {\n if (!params.completionContext)\n return [];\n const { node, ancestors } = params.completionContext;\n const parentNode = ancestors.at(-1);\n const grandParentNode = ancestors.at(-2);\n if (node && node.type === liquid_html_parser_1.NodeTypes.HtmlVoidElement) {\n const options = docset_1.HtmlData.tags.filter((tag) => tag.name === node.name);\n return options.map(toCompletionItem);\n }\n if (!node || !parentNode || !(0, utils_1.isTextNode)(node) || !canComplete(node, parentNode)) {\n return [];\n }\n const name = node.value;\n const partial = name.replace(params_1.CURSOR, '');\n const options = getOptions(partial, parentNode, grandParentNode);\n return options.sort(common_1.sortByName).map(toCompletionItem);\n }\n}\nexports.HtmlTagCompletionProvider = HtmlTagCompletionProvider;\nfunction canComplete(node, parentNode) {\n return (isElementOrDanglingClose(parentNode) &&\n parentNode.name.includes(node) &&\n parentNode.name.length === 1);\n}\nfunction getOptions(partial, parentNode, grandParentNode) {\n if (parentNode.type === liquid_html_parser_1.NodeTypes.HtmlDanglingMarkerClose) {\n return grandParentCloseOption(grandParentNode);\n }\n const grandParentName = getGrandParentName(grandParentNode);\n return docset_1.HtmlData.tags\n .filter((tag) => tag.name.startsWith(partial))\n .concat(grandParentName && partial === ''\n ? {\n name: '/' + grandParentName,\n description: '',\n attributes: [],\n references: [],\n }\n : []);\n}\nfunction toCompletionItem(tag) {\n return {\n label: tag.name,\n kind: vscode_languageserver_1.CompletionItemKind.Property,\n documentation: {\n kind: 'markdown',\n value: (0, docset_1.renderHtmlEntry)(tag),\n },\n };\n}\nfunction grandParentCloseOption(grandParentNode) {\n var _a;\n const grandParentName = getGrandParentName(grandParentNode);\n if (grandParentName) {\n return [\n (_a = docset_1.HtmlData.tags.find((tag) => tag.name === grandParentName)) !== null && _a !== void 0 ? _a : {\n name: grandParentName,\n description: '',\n attributes: [],\n references: [],\n },\n ];\n }\n else {\n return [];\n }\n}\nfunction getGrandParentName(grandParentNode) {\n if (grandParentNode &&\n grandParentNode.type === liquid_html_parser_1.NodeTypes.HtmlElement &&\n grandParentNode.name.length === 1 &&\n (0, utils_1.isTextNode)(grandParentNode.name[0])) {\n return grandParentNode.name[0].value.replace(params_1.CURSOR, '');\n }\n}\nfunction isElementOrDanglingClose(node) {\n return [liquid_html_parser_1.NodeTypes.HtmlElement, liquid_html_parser_1.NodeTypes.HtmlDanglingMarkerClose].includes(node.type);\n}\n//# sourceMappingURL=HtmlTagCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidDocParamTypeCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst theme_check_common_2 = require(\"@shopify/theme-check-common\");\nclass LiquidDocParamTypeCompletionProvider {\n constructor(themeDocset) {\n this.themeDocset = themeDocset;\n }\n async completions(params) {\n if (!params.completionContext)\n return [];\n if (!(0, theme_check_common_1.filePathSupportsLiquidDoc)(params.document.uri))\n return [];\n const { node, ancestors } = params.completionContext;\n const parentNode = ancestors.at(-1);\n if (!node ||\n !parentNode ||\n node.type !== liquid_html_parser_1.NodeTypes.TextNode ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.LiquidRawTag ||\n parentNode.name !== 'doc') {\n return [];\n }\n /**\n * We need to make sure we're trying to code complete after\n * the param tag's `{` character.\n *\n * We will be removing any spaces in case there are any formatting issues.\n */\n const fragments = node.value.split(' ').filter(Boolean);\n if (fragments.length > 2 ||\n fragments[0] !== `@${theme_check_common_2.SupportedDocTagTypes.Param}` ||\n !/^\\{[a-zA-Z]*$/.test(fragments[1])) {\n return [];\n }\n const liquidDrops = await this.themeDocset.liquidDrops();\n return Array.from((0, theme_check_common_2.getValidParamTypes)(liquidDrops)).map(([label, description]) => {\n const documentation = description\n ? {\n kind: vscode_languageserver_1.MarkupKind.Markdown,\n value: description,\n }\n : undefined;\n return {\n label,\n kind: vscode_languageserver_1.CompletionItemKind.EnumMember,\n insertText: label,\n documentation,\n };\n });\n }\n}\nexports.LiquidDocParamTypeCompletionProvider = LiquidDocParamTypeCompletionProvider;\n//# sourceMappingURL=LiquidDocParamTypeCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidDocTagCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst liquidDoc_1 = require(\"../../utils/liquidDoc\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nclass LiquidDocTagCompletionProvider {\n constructor() { }\n async completions(params) {\n var _a;\n if (!params.completionContext)\n return [];\n if (!(0, theme_check_common_1.filePathSupportsLiquidDoc)(params.document.uri))\n return [];\n const { node, ancestors } = params.completionContext;\n const parentNode = ancestors.at(-1);\n if (!node ||\n !parentNode ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.LiquidRawTag ||\n parentNode.name !== 'doc') {\n return [];\n }\n switch (node.type) {\n case liquid_html_parser_1.NodeTypes.TextNode:\n if (!node.value.startsWith('@')) {\n return [];\n }\n return this.createCompletionItems(node.value);\n case liquid_html_parser_1.NodeTypes.LiquidDocDescriptionNode:\n case liquid_html_parser_1.NodeTypes.LiquidDocExampleNode:\n case liquid_html_parser_1.NodeTypes.LiquidDocPromptNode:\n // These nodes accept free-form text, so we only suggest completions if the last line starts with '@'\n const lastLine = (_a = node.content.value.split('\\n').at(-1)) === null || _a === void 0 ? void 0 : _a.trim();\n if (!(lastLine === null || lastLine === void 0 ? void 0 : lastLine.startsWith('@'))) {\n return [];\n }\n return this.createCompletionItems(lastLine);\n default:\n return [];\n }\n }\n createCompletionItems(userInput) {\n // Need to offset the '@' symbol by 1\n const offsetInput = userInput.slice(1);\n const entries = Object.entries(liquidDoc_1.SUPPORTED_LIQUID_DOC_TAG_HANDLES).filter(([label]) => !offsetInput || label.startsWith(offsetInput));\n return entries.map(([label, { description, example, template }]) => {\n const item = {\n label,\n kind: vscode_languageserver_1.CompletionItemKind.EnumMember,\n documentation: {\n kind: vscode_languageserver_1.MarkupKind.Markdown,\n value: (0, liquidDoc_1.formatLiquidDocTagHandle)(label, description, example),\n },\n insertText: template,\n insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet,\n };\n return item;\n });\n }\n}\nexports.LiquidDocTagCompletionProvider = LiquidDocTagCompletionProvider;\n//# sourceMappingURL=LiquidDocTagCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidTagsCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst utils_1 = require(\"../../utils\");\nconst params_1 = require(\"../params\");\nconst common_1 = require(\"./common\");\nclass LiquidTagsCompletionProvider {\n constructor(themeDocset) {\n this.themeDocset = themeDocset;\n }\n async completions(params) {\n if (!params.completionContext)\n return [];\n const { node, ancestors } = params.completionContext;\n if (!node || node.type !== liquid_html_parser_1.NodeTypes.LiquidTag) {\n return [];\n }\n if (typeof node.markup !== 'string' || node.markup !== '') {\n return [];\n }\n const partial = node.name.replace(params_1.CURSOR, '');\n const blockParent = findParentNode(partial, ancestors);\n const tags = await this.themeDocset.tags();\n return tags\n .filter(({ name }) => name.startsWith(partial))\n .sort(common_1.sortByName)\n .map(toCompletionItem(params, node, ancestors, partial))\n .concat(blockParent && `end${blockParent.name}`.startsWith(partial)\n ? {\n label: `end${blockParent.name}`,\n kind: vscode_languageserver_1.CompletionItemKind.Keyword,\n sortText: `!end${blockParent.name}`, // we want this first.\n }\n : []);\n }\n}\nexports.LiquidTagsCompletionProvider = LiquidTagsCompletionProvider;\nfunction findParentNode(partial, ancestors) {\n if (!'end'.startsWith(partial))\n return;\n const potentialParentName = partial.replace(/^e(nd?)?/, '');\n const parentNode = ancestors.at(-1);\n const grandParentNode = ancestors.at(-2);\n // This covers the scenario where we have an open liquid tag as a parent\n //\n // e.g.\n // {% liquid\n // echo 'hello'\n // %}\n //\n // In that scenario, we have the following tree:\n //\n // type: Document\n // children:\n // - LiquidTag#liquid\n if (parentNode && parentNode.type === 'LiquidTag' && parentNode.name === liquid_html_parser_1.NamedTags.liquid) {\n return;\n }\n // This covers the scenario where we have a dangling conditional tag\n //\n // e.g.\n // {% if cond %}\n // hello\n // {% end %}\n //\n // In that scenario, we have the following tree:\n //\n // type: Document\n // children:\n // - LiquidTag#if\n // children:\n // - LiquidBranch\n // children:\n // - TextNode#hello\n // - LiquidTag#end\n if (parentNode &&\n parentNode.type === 'LiquidBranch' &&\n grandParentNode &&\n grandParentNode.type === 'LiquidTag' &&\n grandParentNode.name.startsWith(potentialParentName)) {\n return grandParentNode;\n }\n // This covers the scenario where we have a dangling block tag\n //\n // e.g.\n // {% form \"cart\", cart %}\n // hello\n // {% end %}\n //\n // In that scenario, we have the following tree:\n //\n // type: Document\n // children:\n // - LiquidTag#form\n // children:\n // - TextNode#hello\n // - LiquidTag#end\n if (parentNode &&\n parentNode.type === 'LiquidTag' &&\n parentNode.name.startsWith(potentialParentName)) {\n return parentNode;\n }\n // This covers the case where a raw tag is being parsed as a LiquidTag\n // because of the missing endtag.\n //\n // e.g.\n // {% comment %}\n // hello\n // {% end %}\n //\n // In that scenario, we have the following tree:\n //\n // type: Document\n // children:\n // - LiquidTag#comment\n // - TextNode#hello\n // - LiquidTag#end\n let previousNode;\n if (parentNode &&\n 'children' in parentNode &&\n Array.isArray(parentNode.children) &&\n (previousNode = (0, utils_1.findLast)(parentNode.children, (node) => node.type === 'LiquidTag' &&\n node.name.startsWith(potentialParentName) &&\n (liquid_html_parser_1.BLOCKS.includes(node.name) || liquid_html_parser_1.RAW_TAGS.includes(node.name))))) {\n return previousNode;\n }\n}\nfunction toCompletionItem(params, node, ancestors, partial) {\n const { textDocument, source } = params.document;\n /** Are we in a {% liquid %} context? Where new lines imply new tags? */\n const isInLiquidLiquidTag = ancestors.some(isLiquidLiquidTag);\n /** 0-indexed offset of cursor position */\n const cursorOffset = textDocument.offsetAt(params.position);\n /** Position of where the start of the word being completed is */\n const startOfPartial = textDocument.positionAt(cursorOffset - partial.length);\n /** Position of the rightmost position in the doc... in {% partial %} it would be after '%}' */\n const endOfBlockStart = findEndOfBlockStart(params, node, isInLiquidLiquidTag);\n /** whitespaceStart is '-' or '' depending on if it strips whitespace to the left of the tag */\n const whitespaceStart = node.whitespaceStart;\n /** whitespaceEnd is '-' or '' depending on if it strips whitespace to the right of the tag */\n const whitespaceEnd = inferWhitespaceEnd(textDocument, endOfBlockStart, params, whitespaceStart, source, isInLiquidLiquidTag);\n return (tag) => {\n const extraProperties = {\n kind: vscode_languageserver_1.CompletionItemKind.Keyword,\n insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText,\n };\n if (shouldSnippetComplete(params, endOfBlockStart)) {\n extraProperties.insertTextFormat = vscode_languageserver_1.InsertTextFormat.Snippet;\n extraProperties.insertTextMode = vscode_languageserver_1.InsertTextMode.adjustIndentation;\n extraProperties.textEdit = vscode_languageserver_1.TextEdit.replace(vscode_languageserver_1.Range.create(startOfPartial, endOfBlockStart), toSnippetCompleteText(tag, node, params, whitespaceStart, whitespaceEnd, textDocument, isInLiquidLiquidTag));\n }\n return (0, common_1.createCompletionItem)(tag, extraProperties, 'tag');\n };\n}\n/**\n * Turns out it's hard to tell if something needs an `end$tag` or not.\n *\n * The safest way to guess that something shouldn't be completed is to check whether markup already exists.\n *\n * Probably shouldn't snippet complete:\n * {% if| cond %}{% endif %}\n * {% render| 'product' %}\n *\n * Probably should snippet complete:\n * {% if| %}\n * {% render| %}\n *\n * It's not perfect, but it covers swapping if for unless and so on.\n */\nfunction shouldSnippetComplete(params, endOfBlockStart) {\n const { completionContext } = params;\n const { node, ancestors } = completionContext !== null && completionContext !== void 0 ? completionContext : {};\n if (!node || !ancestors || node.type !== liquid_html_parser_1.NodeTypes.LiquidTag)\n return false;\n /**\n * If the tag has non-empty markup, we can assume that the name is being\n * edited. So adding the close tag would be very weird.\n *\n * User replaces `if` with `unless`.\n *\n * Input\n * {% if some_cond %}\n * {% endif %}\n *\n * ❌ Stuff we DON'T want:\n * {% unless some_cond %}\n * expression\n * {% endunless %}\n * {% endif %}\n *\n * ✅ Stuff we DO want:\n * {% unless some_cond %}\n * {% endif %}\n *\n * We'll solve the negate condition differently.\n */\n const markup = existingMarkup(params, endOfBlockStart);\n return markup.trim() === '';\n}\nfunction toSnippetCompleteText(tag, node, params, whitespaceStart, whitespaceEnd, textDocument, isInLiquidLiquidTag) {\n let snippet = toSnippet(tag);\n if (shouldInline(textDocument, params, node, isInLiquidLiquidTag)) {\n // Then we need to remove the newlines from the snippet\n snippet = snippet.replace(/\\n\\s*/g, '');\n }\n if (isInLiquidLiquidTag) {\n // then we need to get rid of all the {% and %} from the snippet\n snippet = snippet.replace(/\\{%-?[ \\t]*/g, '').replace(/[ \\t]*-?%\\}/g, '');\n }\n if (tag.syntax_keywords) {\n // Then we need to replace the keywords from the snippet with ${n:keyword}\n let i = 1;\n for (const { keyword } of tag.syntax_keywords) {\n if (keyword.includes('expression') ||\n keyword.includes('code') ||\n keyword.includes('content')) {\n // first_expression, second_expression, javascript_code,\n // forloop_content... we don't want those. Just the cursor position.\n snippet = snippet.replace(keyword, `\\$${i}`);\n }\n else {\n snippet = snippet.replace(keyword, `\\${${i}:${keyword}}`);\n }\n i++;\n }\n }\n // We need to add the whitespace stripping characters to the snippet if there are any to add\n snippet = withCorrectWhitespaceStrippingCharacters(snippet, whitespaceStart, whitespaceEnd);\n if (isInLiquidLiquidTag) {\n return snippet.trimStart();\n }\n else {\n // VS Code doesn't like it when the snippet starts before the word\n // being completed. So the completion item we offer starts off after\n // the {%-?\\s part.\n return snippet.slice(2 + whitespaceStart.length + 1);\n }\n}\nfunction toSnippet(tag) {\n // Some of those are exceptional and we don't really want to use the same syntax used on shopify.dev\n switch (tag.name) {\n case 'echo':\n return '{% echo $1 %}';\n case 'cycle':\n return \"{% cycle '$1', '$2'$3 %}\";\n case 'content_for':\n return \"{% content_for '$1'$2 %}\";\n case 'render':\n return \"{% render '$1'$2 %}\";\n case 'elsif':\n return '{% elsif ${1:condition} %}';\n case 'else':\n return '{% else %}';\n case 'doc':\n return '{% doc %}\\n $0\\n{% enddoc %}';\n }\n if (tag.syntax) {\n return tag.syntax;\n }\n else if (isBlockTag(tag.name)) {\n return `{% ${tag.name}$1 %}\\n $2\\n{% end${tag.name} %}`;\n }\n else {\n return `{% ${tag.name}$1 %}`;\n }\n}\n/**\n * If the tag is on a new line, then we can use the snippet with newline.\n * If there's more content on that line, then we inline the snippet in one line.\n */\nfunction shouldInline(textDocument, params, node, isInLiquidLiquidTag) {\n if (isInLiquidLiquidTag)\n return false;\n const endPosition = textDocument.positionAt(node.blockStartPosition.start);\n const startPosition = vscode_languageserver_1.Position.create(endPosition.line, 0);\n const textBeforeTag = textDocument.getText(vscode_languageserver_1.Range.create(startPosition, endPosition));\n return textBeforeTag.trim() !== '';\n}\n/**\n * We mirror the whitespace stripping of the start tag.\n * {% if -%} => {% if -%}{%- endif %}\n */\nfunction withCorrectWhitespaceStrippingCharacters(snippet, whitespaceStart, whitespaceEnd) {\n var _a, _b;\n let starti = 0;\n let endi = 0;\n let countOfEndTags = (_b = (_a = snippet.match(/%\\}/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n snippet = snippet\n .replace(/\\{%/g, () => {\n if (starti++ === 0) {\n // mirror outside stripping\n return '{%' + whitespaceStart;\n }\n else {\n // mirror inside stripping\n return '{%' + whitespaceEnd;\n }\n })\n .replace(/%\\}/g, () => {\n if (countOfEndTags > 1 && endi++ === countOfEndTags - 1) {\n // mirror outside stripping\n return whitespaceStart + '%}';\n }\n else {\n // mirror inside stripping\n return whitespaceEnd + '%}';\n }\n });\n return snippet;\n}\nfunction findEndOfBlockStart(context, node, isInLiquidLiquidTag) {\n const doc = context.document.textDocument;\n const source = context.document.source;\n const start = node.position.start;\n if (isInLiquidLiquidTag) {\n return doc.positionAt(source.indexOf('\\n', start));\n }\n const end = source.indexOf('%}', start);\n const endOpen = source.indexOf('{%', start + 2);\n const isThere = end !== -1 && (endOpen === -1 || end < endOpen);\n if (isThere) {\n // %} => + 2\n return doc.positionAt(end + 2);\n }\n else {\n // return cursor position.\n return context.position;\n }\n}\nfunction existingMarkup(params, endOfBlockStart) {\n const { document } = params;\n const { source, textDocument } = document;\n return source\n .slice(textDocument.offsetAt(params.position), textDocument.offsetAt(endOfBlockStart))\n .replace(/-?%\\}/, '');\n}\n// We're trying to infer if we should trim the whitespace to the right given what the user has already written\n// {% if| => ''\n// {%- if| => '-'\n// {%- if| %} => ''\n// {%- if| -%} => '-'\n// {% if| -%} => '-'\n// {% liquid\n// if| => ''\n// %}\nfunction inferWhitespaceEnd(textDocument, endOfBlockStart, params, whitespaceStart, source, isInLiquidLiquidTag) {\n if (isInLiquidLiquidTag) {\n return '';\n }\n else if (textDocument.offsetAt(endOfBlockStart) === textDocument.offsetAt(params.position)) {\n return whitespaceStart; // if the %} wasn't auto inserted, copy whatever was there on the other side\n }\n else if (source.charAt(textDocument.offsetAt(endOfBlockStart) - 3) === '-') {\n return '-';\n }\n else {\n return '';\n }\n}\nfunction isLiquidLiquidTag(parent) {\n return parent.type === liquid_html_parser_1.NodeTypes.LiquidTag && parent.name === liquid_html_parser_1.NamedTags.liquid;\n}\nfunction isBlockTag(name) {\n return liquid_html_parser_1.BLOCKS.includes(name);\n}\n//# sourceMappingURL=LiquidTagsCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ObjectAttributeCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst TypeSystem_1 = require(\"../../TypeSystem\");\nconst params_1 = require(\"../params\");\nconst common_1 = require(\"./common\");\nconst ArrayCoreProperties = ['size', 'first', 'last'];\nconst StringCoreProperties = ['size'];\nclass ObjectAttributeCompletionProvider {\n constructor(typeSystem, getThemeSettingsSchema) {\n this.typeSystem = typeSystem;\n this.getThemeSettingsSchema = getThemeSettingsSchema;\n }\n async completions(params) {\n var _a;\n if (!params.completionContext)\n return [];\n const { partialAst, node } = params.completionContext;\n if (!node || node.type !== liquid_html_parser_1.NodeTypes.VariableLookup) {\n return [];\n }\n if (node.lookups.length === 0) {\n // We only do lookups in this one\n return [];\n }\n const lastLookup = node.lookups.at(-1);\n if (lastLookup.type !== liquid_html_parser_1.NodeTypes.String) {\n // We don't complete numbers, or variable lookups\n return [];\n }\n const partial = lastLookup.value.replace(params_1.CURSOR, '');\n // Fake a VariableLookup up to the last one.\n const parentLookup = { ...node };\n parentLookup.lookups = [...parentLookup.lookups];\n parentLookup.lookups.pop();\n const parentType = await this.typeSystem.inferType(parentLookup, partialAst, params.textDocument.uri);\n if ((0, TypeSystem_1.isArrayType)(parentType)) {\n return completionItems(ArrayCoreProperties.map((name) => ({ name })), partial);\n }\n else if (parentType === 'string') {\n return completionItems(StringCoreProperties.map((name) => ({ name })), partial);\n }\n const objectMap = await this.typeSystem.objectMap(params.textDocument.uri, partialAst);\n const parentTypeProperties = ((_a = objectMap[parentType]) === null || _a === void 0 ? void 0 : _a.properties) || [];\n return completionItems(parentTypeProperties, partial);\n }\n}\nexports.ObjectAttributeCompletionProvider = ObjectAttributeCompletionProvider;\nfunction completionItems(options, partial) {\n return options\n .filter(({ name }) => name.startsWith(partial))\n .sort(common_1.sortByName)\n .map(toPropertyCompletionItem);\n}\nfunction toPropertyCompletionItem(object) {\n return (0, common_1.createCompletionItem)(object, { kind: vscode_languageserver_1.CompletionItemKind.Variable });\n}\n//# sourceMappingURL=ObjectAttributeCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ObjectCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst params_1 = require(\"../params\");\nconst common_1 = require(\"./common\");\nclass ObjectCompletionProvider {\n constructor(typeSystem) {\n this.typeSystem = typeSystem;\n }\n async completions(params) {\n if (!params.completionContext)\n return [];\n const { partialAst, node, ancestors } = params.completionContext;\n const parentNode = ancestors.at(-1);\n if (!node || node.type !== liquid_html_parser_1.NodeTypes.VariableLookup) {\n return [];\n }\n if (!node.name || node.lookups.length > 0) {\n // We only do top level in this one.\n return [];\n }\n // ContentFor and Render uses VariableLookup to support completion of NamedParams.\n if ((parentNode === null || parentNode === void 0 ? void 0 : parentNode.type) === liquid_html_parser_1.NodeTypes.ContentForMarkup ||\n (parentNode === null || parentNode === void 0 ? void 0 : parentNode.type) === liquid_html_parser_1.NodeTypes.RenderMarkup) {\n return [];\n }\n const partial = node.name.replace(params_1.CURSOR, '');\n const options = await this.typeSystem.availableVariables(partialAst, partial, node, params.textDocument.uri);\n return options.map(({ entry, type }) => (0, common_1.createCompletionItem)(entry, { kind: vscode_languageserver_1.CompletionItemKind.Variable }, 'object', type));\n }\n}\nexports.ObjectCompletionProvider = ObjectCompletionProvider;\n//# sourceMappingURL=ObjectCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RenderSnippetCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nclass RenderSnippetCompletionProvider {\n constructor(getSnippetNamesForURI = async () => []) {\n this.getSnippetNamesForURI = getSnippetNamesForURI;\n }\n async completions(params) {\n if (!params.completionContext)\n return [];\n const { node, ancestors } = params.completionContext;\n const parentNode = ancestors.at(-1);\n if (!node ||\n !parentNode ||\n node.type !== liquid_html_parser_1.NodeTypes.String ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.RenderMarkup) {\n return [];\n }\n const options = await this.getSnippetNamesForURI(params.textDocument.uri);\n const partial = node.value;\n return options\n .filter((option) => option.startsWith(partial))\n .map((option) => ({\n label: option,\n kind: vscode_languageserver_1.CompletionItemKind.Snippet,\n documentation: {\n kind: 'markdown',\n value: `snippets/${option}.liquid`,\n },\n }));\n }\n}\nexports.RenderSnippetCompletionProvider = RenderSnippetCompletionProvider;\n//# sourceMappingURL=RenderSnippetCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RenderSnippetParameterCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst params_1 = require(\"../params\");\nconst liquidDoc_1 = require(\"../../utils/liquidDoc\");\nclass RenderSnippetParameterCompletionProvider {\n constructor(getDocDefinitionForURI) {\n this.getDocDefinitionForURI = getDocDefinitionForURI;\n }\n async completions(params) {\n var _a, _b;\n if (!params.completionContext)\n return [];\n const { node, ancestors } = params.completionContext;\n const parentNode = ancestors.at(-1);\n if (!node ||\n !parentNode ||\n node.type !== liquid_html_parser_1.NodeTypes.VariableLookup ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.RenderMarkup ||\n parentNode.snippet.type !== 'String') {\n return [];\n }\n const userInputStr = ((_a = node.name) === null || _a === void 0 ? void 0 : _a.replace(params_1.CURSOR, '')) || '';\n const snippetDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, 'snippets', parentNode.snippet.value);\n const liquidDocParams = (_b = snippetDefinition === null || snippetDefinition === void 0 ? void 0 : snippetDefinition.liquidDoc) === null || _b === void 0 ? void 0 : _b.parameters;\n if (!liquidDocParams) {\n return [];\n }\n let offset = node.name === params_1.CURSOR ? 1 : 0;\n let start = params.document.textDocument.positionAt(node.position.start);\n let end = params.document.textDocument.positionAt(node.position.end - offset);\n // We need to find out existing params in the render tag so we don't offer it again for completion\n const existingRenderParams = parentNode.args\n .filter((arg) => arg.type === liquid_html_parser_1.NodeTypes.NamedArgument)\n .map((arg) => arg.name);\n return liquidDocParams\n .filter((liquidDocParam) => !existingRenderParams.includes(liquidDocParam.name))\n .filter((liquidDocParam) => liquidDocParam.name.startsWith(userInputStr))\n .map((liquidDocParam) => {\n return {\n label: liquidDocParam.name,\n kind: vscode_languageserver_1.CompletionItemKind.Property,\n documentation: {\n kind: vscode_languageserver_1.MarkupKind.Markdown,\n value: (0, liquidDoc_1.formatLiquidDocParameter)(liquidDocParam, true),\n },\n textEdit: vscode_languageserver_1.TextEdit.replace(vscode_languageserver_1.Range.create(start, end), (0, liquidDoc_1.getParameterCompletionTemplate)(liquidDocParam.name, liquidDocParam.type)),\n insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet,\n };\n });\n }\n}\nexports.RenderSnippetParameterCompletionProvider = RenderSnippetParameterCompletionProvider;\n//# sourceMappingURL=RenderSnippetParameterCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TranslationCompletionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst translations_1 = require(\"../../translations\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nclass TranslationCompletionProvider {\n constructor(documentManager, getTranslationsForURI) {\n this.documentManager = documentManager;\n this.getTranslationsForURI = getTranslationsForURI;\n }\n async completions(params) {\n if (!params.completionContext)\n return [];\n const { node, ancestors } = params.completionContext;\n const parentNode = ancestors.at(-1);\n const document = this.documentManager.get(params.textDocument.uri);\n if (!node ||\n node.type !== liquid_html_parser_1.NodeTypes.String ||\n !parentNode ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.LiquidVariable ||\n !document) {\n return [];\n }\n const ast = document.ast;\n const textDocument = document.textDocument;\n const translations = await this.getTranslationsForURI(params.textDocument.uri);\n const partial = node.value;\n // We only want to show standard translations to complete if the translation\n // is prefixed by shopify. Otherwise it's too noisy.\n const options = (0, translations_1.translationOptions)(translations).filter((option) => { var _a; return !((_a = option.path[0]) === null || _a === void 0 ? void 0 : _a.startsWith('shopify')) || partial.startsWith('shopify'); });\n const [_currentNode, realAncestors] = ast instanceof Error\n ? [null, []]\n : (0, theme_check_common_1.findCurrentNode)(ast, textDocument.offsetAt(params.position));\n // That part feels kind of gross, let me explain...\n // When we complete translations, we also want to append the `| t` after the\n // string, but we should only ever do that if the variable didn't _already_ have that.\n // But since our completion engine works on incomplete code, we need to temporarily\n // fetch the real node to do the optional | t completion.\n const realParentNode = realAncestors.at(-1);\n let shouldAppendTranslateFilter = (realParentNode === null || realParentNode === void 0 ? void 0 : realParentNode.type) === liquid_html_parser_1.NodeTypes.LiquidVariable && (realParentNode === null || realParentNode === void 0 ? void 0 : realParentNode.filters.length) === 0;\n const quote = node.single ? \"'\" : '\"';\n let postFix = quote + ' | t';\n let replaceRange;\n if (shouldAppendTranslateFilter) {\n postFix = quote + ' | t';\n replaceRange = {\n start: textDocument.positionAt(node.position.start + 1), // minus the quote characters\n end: textDocument.positionAt(node.position.end), // including quote\n };\n }\n else {\n postFix = '';\n replaceRange = {\n start: textDocument.positionAt(node.position.start + 1), // minus the quote characters\n end: textDocument.positionAt(node.position.end - 1), // excluding quote\n };\n }\n const insertTextStartIndex = partial.lastIndexOf('.') + 1;\n return options.map(({ path, translation }) => {\n var _a;\n const params = (0, translations_1.extractParams)(typeof translation === 'string' ? translation : (_a = Object.values(translation)[0]) !== null && _a !== void 0 ? _a : '');\n const parameters = (0, translations_1.paramsString)(params);\n return {\n label: quote + path.join('.') + quote + ' | t', // don't want the count here because it feels noisy(?)\n insertText: path.join('.').slice(insertTextStartIndex), // for editors that don't support textEdit\n kind: vscode_languageserver_1.CompletionItemKind.Field,\n textEdit: vscode_languageserver_1.TextEdit.replace(replaceRange, path.join('.') + postFix + (shouldAppendTranslateFilter ? parameters : '')),\n documentation: {\n kind: 'markdown',\n value: (0, translations_1.renderTranslation)(translation),\n },\n };\n });\n }\n}\nexports.TranslationCompletionProvider = TranslationCompletionProvider;\n//# sourceMappingURL=TranslationCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createCompletionItem = createCompletionItem;\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst docset_1 = require(\"../../../docset\");\n// ASCII tokens that make a string appear lower in the list.\n//\n// It's setup so that we can show array filters before \"global\" filters,\n// and similarly array deprecated filters before \"global\" deprecated\n// filters.\nvar SortTokens;\n(function (SortTokens) {\n SortTokens[\"normal\"] = \"\";\n SortTokens[\"deprioritized\"] = \"{\";\n SortTokens[\"deprecated\"] = \"|\";\n SortTokens[\"deprecatedAndDeprioritized\"] = \"}\";\n})(SortTokens || (SortTokens = {}));\nfunction createCompletionItem(entry, extraProperties = {}, docsetEntryType, entryType) {\n // prettier-ignore\n const sortToken = entry.deprecated\n ? entry.deprioritized\n ? SortTokens.deprecatedAndDeprioritized\n : SortTokens.deprecated\n : entry.deprioritized\n ? SortTokens.deprioritized\n : SortTokens.normal;\n return {\n label: entry.name,\n sortText: `${sortToken}${entry.name}`,\n ...documentationProperties(entry, docsetEntryType, entryType),\n ...deprecatedProperties(entry),\n ...extraProperties,\n };\n}\nfunction documentationProperties(entry, docsetEntryType, entryType) {\n const value = (0, docset_1.render)(entry, entryType, docsetEntryType);\n return {\n documentation: {\n kind: 'markdown',\n value,\n },\n };\n}\nfunction deprecatedProperties(entry) {\n if (!entry.deprecated)\n return {};\n const tags = [vscode_languageserver_1.CompletionItemTag.Deprecated];\n return {\n tags,\n };\n}\n//# sourceMappingURL=CompletionItemProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createCompletionItem = void 0;\nexports.sortByName = sortByName;\nvar CompletionItemProperties_1 = require(\"./CompletionItemProperties\");\nObject.defineProperty(exports, \"createCompletionItem\", { enumerable: true, get: function () { return CompletionItemProperties_1.createCompletionItem; } });\nfunction sortByName({ name: nameA }, { name: nameB }) {\n if (nameA < nameB) {\n return -1;\n }\n if (nameA > nameB) {\n return 1;\n }\n // names must be equal\n return 0;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_COMPLETION_OPTIONS = void 0;\n/**\n * These definitions are not currently available in the generated Liquid Docs\n * so we're hardcoding them here in the interim.\n */\nexports.DEFAULT_COMPLETION_OPTIONS = {\n type: \"The type (name) of an existing theme block in your theme’s /blocks folder. Only applicable when `content_type` is 'block'.\",\n id: \"A unique identifier and literal string within the section or block that contains the static blocks. Only applicable when `content_type` is 'block'.\",\n closest: 'A path that provides a way to access the closest resource of a given type.',\n};\n//# sourceMappingURL=contentForParameterCompletionOptions.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidDocParamTypeCompletionProvider = exports.LiquidDocTagCompletionProvider = exports.RenderSnippetParameterCompletionProvider = exports.RenderSnippetCompletionProvider = exports.TranslationCompletionProvider = exports.ObjectCompletionProvider = exports.ObjectAttributeCompletionProvider = exports.LiquidTagsCompletionProvider = exports.FilterNamedParameterCompletionProvider = exports.FilterCompletionProvider = exports.HtmlAttributeValueCompletionProvider = exports.HtmlAttributeCompletionProvider = exports.HtmlTagCompletionProvider = exports.ContentForParameterCompletionProvider = exports.ContentForBlockTypeCompletionProvider = exports.ContentForCompletionProvider = void 0;\nvar ContentForCompletionProvider_1 = require(\"./ContentForCompletionProvider\");\nObject.defineProperty(exports, \"ContentForCompletionProvider\", { enumerable: true, get: function () { return ContentForCompletionProvider_1.ContentForCompletionProvider; } });\nvar ContentForBlockTypeCompletionProvider_1 = require(\"./ContentForBlockTypeCompletionProvider\");\nObject.defineProperty(exports, \"ContentForBlockTypeCompletionProvider\", { enumerable: true, get: function () { return ContentForBlockTypeCompletionProvider_1.ContentForBlockTypeCompletionProvider; } });\nvar ContentForParameterCompletionProvider_1 = require(\"./ContentForParameterCompletionProvider\");\nObject.defineProperty(exports, \"ContentForParameterCompletionProvider\", { enumerable: true, get: function () { return ContentForParameterCompletionProvider_1.ContentForParameterCompletionProvider; } });\nvar HtmlTagCompletionProvider_1 = require(\"./HtmlTagCompletionProvider\");\nObject.defineProperty(exports, \"HtmlTagCompletionProvider\", { enumerable: true, get: function () { return HtmlTagCompletionProvider_1.HtmlTagCompletionProvider; } });\nvar HtmlAttributeCompletionProvider_1 = require(\"./HtmlAttributeCompletionProvider\");\nObject.defineProperty(exports, \"HtmlAttributeCompletionProvider\", { enumerable: true, get: function () { return HtmlAttributeCompletionProvider_1.HtmlAttributeCompletionProvider; } });\nvar HtmlAttributeValueCompletionProvider_1 = require(\"./HtmlAttributeValueCompletionProvider\");\nObject.defineProperty(exports, \"HtmlAttributeValueCompletionProvider\", { enumerable: true, get: function () { return HtmlAttributeValueCompletionProvider_1.HtmlAttributeValueCompletionProvider; } });\nvar FilterCompletionProvider_1 = require(\"./FilterCompletionProvider\");\nObject.defineProperty(exports, \"FilterCompletionProvider\", { enumerable: true, get: function () { return FilterCompletionProvider_1.FilterCompletionProvider; } });\nvar FilterNamedParameterCompletionProvider_1 = require(\"./FilterNamedParameterCompletionProvider\");\nObject.defineProperty(exports, \"FilterNamedParameterCompletionProvider\", { enumerable: true, get: function () { return FilterNamedParameterCompletionProvider_1.FilterNamedParameterCompletionProvider; } });\nvar LiquidTagsCompletionProvider_1 = require(\"./LiquidTagsCompletionProvider\");\nObject.defineProperty(exports, \"LiquidTagsCompletionProvider\", { enumerable: true, get: function () { return LiquidTagsCompletionProvider_1.LiquidTagsCompletionProvider; } });\nvar ObjectAttributeCompletionProvider_1 = require(\"./ObjectAttributeCompletionProvider\");\nObject.defineProperty(exports, \"ObjectAttributeCompletionProvider\", { enumerable: true, get: function () { return ObjectAttributeCompletionProvider_1.ObjectAttributeCompletionProvider; } });\nvar ObjectCompletionProvider_1 = require(\"./ObjectCompletionProvider\");\nObject.defineProperty(exports, \"ObjectCompletionProvider\", { enumerable: true, get: function () { return ObjectCompletionProvider_1.ObjectCompletionProvider; } });\nvar TranslationCompletionProvider_1 = require(\"./TranslationCompletionProvider\");\nObject.defineProperty(exports, \"TranslationCompletionProvider\", { enumerable: true, get: function () { return TranslationCompletionProvider_1.TranslationCompletionProvider; } });\nvar RenderSnippetCompletionProvider_1 = require(\"./RenderSnippetCompletionProvider\");\nObject.defineProperty(exports, \"RenderSnippetCompletionProvider\", { enumerable: true, get: function () { return RenderSnippetCompletionProvider_1.RenderSnippetCompletionProvider; } });\nvar RenderSnippetParameterCompletionProvider_1 = require(\"./RenderSnippetParameterCompletionProvider\");\nObject.defineProperty(exports, \"RenderSnippetParameterCompletionProvider\", { enumerable: true, get: function () { return RenderSnippetParameterCompletionProvider_1.RenderSnippetParameterCompletionProvider; } });\nvar LiquidDocTagCompletionProvider_1 = require(\"./LiquidDocTagCompletionProvider\");\nObject.defineProperty(exports, \"LiquidDocTagCompletionProvider\", { enumerable: true, get: function () { return LiquidDocTagCompletionProvider_1.LiquidDocTagCompletionProvider; } });\nvar LiquidDocParamTypeCompletionProvider_1 = require(\"./LiquidDocParamTypeCompletionProvider\");\nObject.defineProperty(exports, \"LiquidDocParamTypeCompletionProvider\", { enumerable: true, get: function () { return LiquidDocParamTypeCompletionProvider_1.LiquidDocParamTypeCompletionProvider; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CSSLanguageService = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_css_languageservice_1 = require(\"vscode-css-languageservice\");\nconst vscode_languageserver_textdocument_1 = require(\"vscode-languageserver-textdocument\");\nclass CSSLanguageService {\n constructor(documentManager) {\n this.documentManager = documentManager;\n this.service = null;\n }\n async setup(clientCapabilities) {\n this.service = (0, vscode_css_languageservice_1.getCSSLanguageService)({\n clientCapabilities,\n });\n }\n async completions(params) {\n const service = this.service;\n if (!service)\n return null;\n const documents = this.getDocuments(params, service);\n if (!documents)\n return null;\n const [stylesheetTextDocument, stylesheetDocument] = documents;\n return service.doComplete(stylesheetTextDocument, params.position, stylesheetDocument);\n }\n async diagnostics(params) {\n const service = this.service;\n if (!service)\n return [];\n const documents = this.getDocuments(params, service);\n if (!documents)\n return [];\n const [stylesheetTextDocument, stylesheetDocument] = documents;\n return service.doValidation(stylesheetTextDocument, stylesheetDocument);\n }\n async hover(params) {\n const service = this.service;\n if (!service)\n return null;\n const documents = this.getDocuments(params, service);\n if (!documents)\n return null;\n const [stylesheetTextDocument, stylesheetDocument] = documents;\n return service.doHover(stylesheetTextDocument, params.position, stylesheetDocument);\n }\n getDocuments(params, service) {\n const document = this.documentManager.get(params.textDocument.uri);\n if (!document)\n return null;\n switch (document.type) {\n case theme_check_common_1.SourceCodeType.JSON: {\n return null;\n }\n case theme_check_common_1.SourceCodeType.LiquidHtml: {\n if (document.ast instanceof Error)\n return null;\n const textDocument = document.textDocument;\n let offset = 0;\n let isDiagnostics = false;\n if ('position' in params && params.position.line !== 0 && params.position.character !== 0) {\n offset = textDocument.offsetAt(params.position);\n }\n else {\n const stylesheetIndex = document.source.indexOf('{% stylesheet %}');\n offset = stylesheetIndex;\n isDiagnostics = true;\n }\n const [node, ancestors] = (0, theme_check_common_1.findCurrentNode)(document.ast, offset);\n let stylesheetTag = [...ancestors].find((node) => node.type === liquid_html_parser_1.NodeTypes.LiquidRawTag && node.name === 'stylesheet');\n if (isDiagnostics && 'children' in node && node.children) {\n stylesheetTag = node.children.find((node) => node.type === liquid_html_parser_1.NodeTypes.LiquidRawTag && node.name === 'stylesheet');\n }\n if (!stylesheetTag)\n return null;\n const schemaLineNumber = textDocument.positionAt(stylesheetTag.blockStartPosition.end).line;\n // Hacking away \"same line numbers\" here by prefixing the file with newlines\n // This way params.position will be at the same line number in this fake jsonTextDocument\n // Which means that the completions will be at the same line number in the Liquid document\n const stylesheetString = Array(schemaLineNumber).fill('\\n').join('') +\n stylesheetTag.source\n .slice(stylesheetTag.blockStartPosition.end, stylesheetTag.blockEndPosition.start)\n .replace(/\\n$/, ''); // Remove trailing newline so parsing errors don't show up on `{% endstylesheet %}`\n const stylesheetTextDocument = vscode_languageserver_textdocument_1.TextDocument.create(textDocument.uri, 'json', textDocument.version, stylesheetString);\n const stylesheetDocument = service.parseStylesheet(stylesheetTextDocument);\n return [stylesheetTextDocument, stylesheetDocument];\n }\n }\n }\n}\nexports.CSSLanguageService = CSSLanguageService;\n//# sourceMappingURL=CSSLanguageService.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DefinitionProvider = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst SchemaTranslationStringDefinitionProvider_1 = require(\"./providers/SchemaTranslationStringDefinitionProvider\");\nconst TranslationStringDefinitionProvider_1 = require(\"./providers/TranslationStringDefinitionProvider\");\nclass DefinitionProvider {\n constructor(documentManager, getDefaultLocaleSourceCode, getDefaultSchemaLocaleSourceCode) {\n this.documentManager = documentManager;\n this.providers = [\n new TranslationStringDefinitionProvider_1.TranslationStringDefinitionProvider(documentManager, getDefaultLocaleSourceCode),\n new SchemaTranslationStringDefinitionProvider_1.SchemaTranslationStringDefinitionProvider(documentManager, getDefaultSchemaLocaleSourceCode),\n ];\n }\n async definitions(params) {\n const sourceCode = this.documentManager.get(params.textDocument.uri);\n if (!sourceCode ||\n sourceCode.type !== theme_check_common_1.SourceCodeType.LiquidHtml ||\n sourceCode.ast instanceof Error) {\n return null;\n }\n const { textDocument } = sourceCode;\n const [node, ancestors] = (0, theme_check_common_1.findCurrentNode)(sourceCode.ast, textDocument.offsetAt(params.position));\n const results = await Promise.all(this.providers.map((provider) => provider.definitions(params, node, ancestors))).then((res) => res.flat());\n return results.length > 0 ? results : null;\n }\n}\nexports.DefinitionProvider = DefinitionProvider;\n//# sourceMappingURL=DefinitionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SchemaTranslationStringDefinitionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nclass SchemaTranslationStringDefinitionProvider {\n constructor(documentManager, getDefaultSchemaLocaleSourceCode) {\n this.documentManager = documentManager;\n this.getDefaultSchemaLocaleSourceCode = getDefaultSchemaLocaleSourceCode;\n }\n async definitions(params, node, ancestors) {\n const sourceCode = this.documentManager.get(params.textDocument.uri);\n if (!sourceCode || sourceCode.type !== theme_check_common_1.SourceCodeType.LiquidHtml)\n return [];\n // We want text inside {% schema %}\n if (node.type !== liquid_html_parser_1.NodeTypes.TextNode)\n return [];\n const schemaTag = ancestors.find(isSchemaTag);\n if (!schemaTag) {\n return [];\n }\n const schema = await sourceCode.getSchema();\n if (!schema || schema.ast instanceof Error)\n return [];\n // Now we need to find the location of the translation in the translation file\n const defaultLocaleFile = await this.getDefaultSchemaLocaleSourceCode(params.textDocument.uri);\n if (!defaultLocaleFile ||\n defaultLocaleFile.type !== theme_check_common_1.SourceCodeType.JSON ||\n defaultLocaleFile.ast instanceof Error) {\n return [];\n }\n const documentOffset = sourceCode.textDocument.offsetAt(params.position);\n const offset = documentOffset - schema.offset;\n const [jNode, _jAncestors] = (0, theme_check_common_1.findJSONNode)(schema.ast, offset);\n if (jNode.type !== 'Literal')\n return [];\n if (typeof jNode.value !== 'string' || !jNode.value.startsWith('t:'))\n return [];\n const translationKey = jNode.value.slice(2).trim();\n const translationNode = (0, theme_check_common_1.nodeAtPath)(defaultLocaleFile.ast, translationKey.split('.'));\n if (!translationNode)\n return [];\n const targetRange = vscode_languageserver_protocol_1.Range.create(defaultLocaleFile.textDocument.positionAt(translationNode.loc.start.offset), defaultLocaleFile.textDocument.positionAt(translationNode.loc.end.offset));\n const originRange = vscode_languageserver_protocol_1.Range.create(sourceCode.textDocument.positionAt(schema.offset + jNode.loc.start.offset), sourceCode.textDocument.positionAt(schema.offset + jNode.loc.end.offset));\n return [\n vscode_languageserver_protocol_1.LocationLink.create(defaultLocaleFile.textDocument.uri, targetRange, targetRange, originRange),\n ];\n }\n}\nexports.SchemaTranslationStringDefinitionProvider = SchemaTranslationStringDefinitionProvider;\nfunction isSchemaTag(node) {\n return node.type === liquid_html_parser_1.NodeTypes.LiquidRawTag && node.name === 'schema';\n}\n//# sourceMappingURL=SchemaTranslationStringDefinitionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TranslationStringDefinitionProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nclass TranslationStringDefinitionProvider {\n constructor(documentManager, getDefaultLocaleSourceCode) {\n this.documentManager = documentManager;\n this.getDefaultLocaleSourceCode = getDefaultLocaleSourceCode;\n }\n async definitions(params, node, ancestors) {\n var _a;\n const doc = (_a = this.documentManager.get(params.textDocument.uri)) === null || _a === void 0 ? void 0 : _a.textDocument;\n if (!doc)\n return [];\n // We want {{ node | t }}\n if (node.type !== liquid_html_parser_1.NodeTypes.String)\n return [];\n const parent = ancestors.at(-1);\n if (!parent || parent.type !== liquid_html_parser_1.NodeTypes.LiquidVariable)\n return [];\n // Making sure node is the expression\n if (parent.expression !== node)\n return [];\n // We're looking for {{ '...' | t }} or {{ '...' | translate }}\n if (parent.filters.length === 0 || !['t', 'translate'].includes(parent.filters[0].name)) {\n return [];\n }\n // Now we need to find the location of the translation in the translation file\n const defaultLocaleFile = await this.getDefaultLocaleSourceCode(params.textDocument.uri);\n if (!defaultLocaleFile ||\n defaultLocaleFile.type !== theme_check_common_1.SourceCodeType.JSON ||\n defaultLocaleFile.ast instanceof Error) {\n return [];\n }\n const translationKey = node.value;\n const translationNode = (0, theme_check_common_1.nodeAtPath)(defaultLocaleFile.ast, translationKey.split('.'));\n if (!translationNode)\n return [];\n const targetRange = vscode_languageserver_protocol_1.Range.create(defaultLocaleFile.textDocument.positionAt(translationNode.loc.start.offset), defaultLocaleFile.textDocument.positionAt(translationNode.loc.end.offset));\n const originRange = vscode_languageserver_protocol_1.Range.create(doc.positionAt(node.position.start), doc.positionAt(node.position.end));\n return [\n vscode_languageserver_protocol_1.LocationLink.create(defaultLocaleFile.textDocument.uri, targetRange, targetRange, originRange),\n ];\n }\n}\nexports.TranslationStringDefinitionProvider = TranslationStringDefinitionProvider;\n//# sourceMappingURL=TranslationStringDefinitionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagnosticsManager = void 0;\nconst offenseToDiagnostic_1 = require(\"./offenseToDiagnostic\");\nclass DiagnosticsManager {\n constructor(connection) {\n this.connection = connection;\n this.diagnostics = new Map();\n }\n get(uri) {\n return this.diagnostics.get(uri);\n }\n set(uri, version, offenses) {\n const anomalies = offenses.map((offense, index) => ({\n offense,\n diagnostic: (0, offenseToDiagnostic_1.offenseToDiagnostic)(offense),\n id: index,\n }));\n this.diagnostics.set(uri, {\n uri,\n version,\n anomalies,\n });\n this.connection.sendDiagnostics({\n uri,\n version,\n diagnostics: anomalies.map((a) => a.diagnostic),\n });\n }\n clear(uri) {\n this.diagnostics.delete(uri);\n this.connection.sendDiagnostics({\n uri,\n version: undefined,\n diagnostics: [],\n });\n }\n}\nexports.DiagnosticsManager = DiagnosticsManager;\n//# sourceMappingURL=DiagnosticsManager.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeRunChecks = exports.DiagnosticsManager = void 0;\nvar DiagnosticsManager_1 = require(\"./DiagnosticsManager\");\nObject.defineProperty(exports, \"DiagnosticsManager\", { enumerable: true, get: function () { return DiagnosticsManager_1.DiagnosticsManager; } });\nvar runChecks_1 = require(\"./runChecks\");\nObject.defineProperty(exports, \"makeRunChecks\", { enumerable: true, get: function () { return runChecks_1.makeRunChecks; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.offenseToDiagnostic = offenseToDiagnostic;\nexports.offenseSeverity = offenseSeverity;\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst checkToDocsUrl = theme_check_common_1.allChecks.reduce((acc, checkDescription) => {\n const url = checkDescription.meta.docs.url;\n const code = checkDescription.meta.code;\n if (url !== undefined) {\n acc[code] = url;\n }\n return acc;\n}, {});\nfunction offenseToDiagnostic(offense) {\n const diagnostic = vscode_languageserver_1.Diagnostic.create(diagnosticRange(offense), offense.message, diagnosticSeverity(offense), offense.check, 'theme-check');\n const url = checkToDocsUrl[offense.check];\n if (url) {\n diagnostic.codeDescription = { href: url };\n }\n return diagnostic;\n}\nfunction diagnosticRange({ start, end }) {\n return {\n start: {\n line: start.line,\n character: start.character,\n },\n end: {\n line: end.line,\n character: end.character,\n },\n };\n}\nfunction diagnosticSeverity(offense) {\n switch (offense.severity) {\n case theme_check_common_1.Severity.INFO: {\n return vscode_languageserver_1.DiagnosticSeverity.Information;\n }\n case theme_check_common_1.Severity.WARNING: {\n return vscode_languageserver_1.DiagnosticSeverity.Warning;\n }\n case theme_check_common_1.Severity.ERROR: {\n return vscode_languageserver_1.DiagnosticSeverity.Error;\n }\n default: {\n return (0, theme_check_common_1.assertNever)(offense.severity);\n }\n }\n}\nfunction offenseSeverity(diagnostic) {\n switch (diagnostic.severity) {\n case vscode_languageserver_1.DiagnosticSeverity.Hint:\n case vscode_languageserver_1.DiagnosticSeverity.Information: {\n return theme_check_common_1.Severity.INFO;\n }\n case vscode_languageserver_1.DiagnosticSeverity.Warning: {\n return theme_check_common_1.Severity.WARNING;\n }\n case vscode_languageserver_1.DiagnosticSeverity.Error: {\n return theme_check_common_1.Severity.ERROR;\n }\n default: {\n return theme_check_common_1.Severity.INFO;\n }\n }\n}\n//# sourceMappingURL=offenseToDiagnostic.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeRunChecks = makeRunChecks;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst offenseToDiagnostic_1 = require(\"./offenseToDiagnostic\");\nfunction makeRunChecks(documentManager, diagnosticsManager, { fs, loadConfig, themeDocset, jsonValidationSet, getMetafieldDefinitions, cssLanguageService, themeGraphManager, }) {\n return async function runChecks(triggerURIs) {\n // This function takes an array of triggerURIs so that we can correctly\n // recheck on file renames that came from out of bounds in a\n // workspaces.\n //\n // e.g. if a user renames\n // theme1/snippets/a.liquid to\n // theme1/snippets/b.liquid\n //\n // then we recheck theme1\n const fileExists = (0, theme_check_common_1.makeFileExists)(fs);\n const rootURIs = await Promise.all(triggerURIs.map((uri) => (0, theme_check_common_1.findRoot)(uri, fileExists)));\n const deduplicatedRootURIs = new Set(rootURIs.filter((x) => !!x));\n await Promise.all([...deduplicatedRootURIs].map(runChecksForRoot));\n return;\n async function runChecksForRoot(configFileRootUri) {\n const config = await loadConfig(configFileRootUri, fs);\n const theme = documentManager.theme(config.rootUri);\n const cssOffenses = cssLanguageService\n ? await Promise.all(theme.map((sourceCode) => getCSSDiagnostics(cssLanguageService, sourceCode))).then((offenses) => offenses.flat())\n : [];\n const themeOffenses = await (0, theme_check_common_1.check)(theme, config, {\n fs,\n themeDocset,\n jsonValidationSet,\n getMetafieldDefinitions,\n async getReferences(uri) {\n if (!themeGraphManager)\n return [];\n return themeGraphManager.getReferences(uri);\n },\n // TODO should do something for app blocks?\n async getBlockSchema(name) {\n // We won't preload here. If it's available, we'll give it. Otherwise expect nothing.\n const uri = theme_check_common_1.path.join(config.rootUri, 'blocks', `${name}.liquid`);\n const doc = documentManager.get(uri);\n if ((doc === null || doc === void 0 ? void 0 : doc.type) !== theme_check_common_1.SourceCodeType.LiquidHtml)\n return undefined;\n const schema = await doc.getSchema();\n return schema;\n },\n async getSectionSchema(name) {\n // We won't preload here. If it's available, we'll give it. Otherwise expect nothing.\n const uri = theme_check_common_1.path.join(config.rootUri, 'sections', `${name}.liquid`);\n const doc = documentManager.get(uri);\n if ((doc === null || doc === void 0 ? void 0 : doc.type) !== theme_check_common_1.SourceCodeType.LiquidHtml)\n return undefined;\n const schema = await doc.getSchema();\n return schema;\n },\n async getDocDefinition(relativePath) {\n const uri = theme_check_common_1.path.join(config.rootUri, relativePath);\n const doc = documentManager.get(uri);\n if ((doc === null || doc === void 0 ? void 0 : doc.type) !== theme_check_common_1.SourceCodeType.LiquidHtml)\n return undefined;\n return doc.getLiquidDoc();\n },\n });\n const offenses = [...themeOffenses, ...cssOffenses];\n // We iterate over the theme files (as opposed to offenses) because if\n // there were offenses before, we need to send an empty array to clear\n // them.\n for (const sourceCode of theme) {\n const sourceCodeOffenses = offenses.filter((offense) => offense.uri === sourceCode.uri);\n diagnosticsManager.set(sourceCode.uri, sourceCode.version, sourceCodeOffenses);\n }\n }\n };\n}\nasync function getCSSDiagnostics(cssLanguageService, sourceCode) {\n if (sourceCode.type !== theme_check_common_1.SourceCodeType.LiquidHtml) {\n return [];\n }\n const diagnostics = await cssLanguageService.diagnostics({\n textDocument: { uri: sourceCode.uri },\n });\n return diagnostics\n .map((diagnostic) => ({\n check: 'css',\n message: diagnostic.message,\n end: {\n index: sourceCode.textDocument.offsetAt(diagnostic.range.end),\n line: diagnostic.range.end.line,\n character: diagnostic.range.end.character,\n },\n start: {\n index: sourceCode.textDocument.offsetAt(diagnostic.range.start),\n line: diagnostic.range.start.line,\n character: diagnostic.range.start.character,\n },\n severity: (0, offenseToDiagnostic_1.offenseSeverity)(diagnostic),\n uri: sourceCode.uri,\n type: theme_check_common_1.SourceCodeType.LiquidHtml,\n }))\n .filter((offense) => offense.severity !== theme_check_common_1.Severity.INFO);\n}\n//# sourceMappingURL=runChecks.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HtmlData = void 0;\nconst htmlData = __importStar(require(\"@vscode/web-custom-data/data/browsers.html-data.json\"));\nexports.HtmlData = htmlData;\n//# sourceMappingURL=HtmlDocset.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.render = render;\nexports.renderHtmlEntry = renderHtmlEntry;\nconst TypeSystem_1 = require(\"../TypeSystem\");\nconst HORIZONTAL_SEPARATOR = '\\n\\n---\\n\\n';\nfunction render(entry, returnType, docsetEntryType) {\n return [title(entry, returnType), docsetEntryBody(entry, returnType, docsetEntryType)]\n .filter(Boolean)\n .join('\\n');\n}\nfunction renderHtmlEntry(entry, parentEntry) {\n return [title(entry, TypeSystem_1.Unknown), htmlEntryBody(entry, parentEntry)].join('\\n');\n}\nfunction title(entry, returnType) {\n returnType = returnType !== null && returnType !== void 0 ? returnType : (0, TypeSystem_1.docsetEntryReturnType)(entry, TypeSystem_1.Unknown);\n if ((0, TypeSystem_1.isArrayType)(returnType)) {\n return `### ${entry.name}: \\`${returnType.valueType}[]\\``;\n }\n else if (returnType !== TypeSystem_1.Unknown) {\n return `### ${entry.name}: \\`${returnType}\\``;\n }\n return `### ${entry.name}`;\n}\nfunction sanitize(s) {\n return s === null || s === void 0 ? void 0 : s.replace(/(^|\\n+)>/g, ' ').replace(/>/g, '>').replace(/</g, '<').replace(/\\]\\(\\//g, '](https://shopify.dev/').trim();\n}\nfunction docsetEntryBody(entry, returnType, docsetEntryType) {\n return [\n syntax(entry),\n entry.deprecation_reason,\n entry.summary,\n entry.description,\n shopifyDevReference(entry, returnType, docsetEntryType),\n ]\n .map(sanitize)\n .filter(Boolean)\n .join(HORIZONTAL_SEPARATOR);\n}\nfunction htmlEntryBody(entry, parentEntry) {\n return [description(entry), references(entry), references(parentEntry)]\n .filter(Boolean)\n .join(HORIZONTAL_SEPARATOR);\n}\nfunction syntax(entry) {\n if (!('syntax' in entry) || !entry.syntax) {\n return undefined;\n }\n // TagEntry entries already have liquid tags as a part of the syntax\n // explanation so we can return them directly.\n if (entry.syntax.startsWith('{%')) {\n return `\\`\\`\\`liquid\\n${entry.syntax}\\n\\`\\`\\``;\n }\n // Wrap the syntax in liquid tags to ensure we get proper syntax highlighting\n // if it's available.\n return `\\`\\`\\`liquid\\n{{ ${entry.syntax} }}\\n\\`\\`\\``;\n}\nfunction description(entry) {\n if (!entry.description || typeof entry.description === 'string') {\n return entry.description;\n }\n return entry.description.value;\n}\nconst shopifyDevRoot = `https://shopify.dev/docs/api/liquid`;\nfunction shopifyDevReference(entry, returnType, docsetEntryType) {\n switch (docsetEntryType) {\n case 'tag': {\n if (entry.name === 'else' && 'category' in entry) {\n return `[Shopify Reference](${shopifyDevRoot}/tags/${entry.category}-${entry.name})`;\n }\n else if ('category' in entry) {\n return `[Shopify Reference](${shopifyDevRoot}/tags/${entry.name})`;\n }\n else {\n return undefined;\n }\n }\n case 'object': {\n if (!returnType) {\n return `[Shopify Reference](${shopifyDevRoot}/objects/${entry.name})`;\n }\n else if ((0, TypeSystem_1.isArrayType)(returnType)) {\n return `[Shopify Reference](${shopifyDevRoot}/objects/${returnType.valueType})`;\n }\n else if ('access' in entry) {\n return `[Shopify Reference](${shopifyDevRoot}/objects/${returnType})`;\n }\n else {\n return undefined;\n }\n }\n case 'filter': {\n if ('category' in entry) {\n return `[Shopify Reference](${shopifyDevRoot}/filters/${entry.name})`;\n }\n else {\n return undefined;\n }\n }\n default: {\n return undefined;\n }\n }\n}\nfunction references(entry) {\n if (!entry || !('references' in entry) || !entry.references || entry.references.length === 0) {\n return undefined;\n }\n if (entry.references.length === 1) {\n const [ref] = entry.references;\n return `[${ref.name}](${ref.url})`;\n }\n return [`#### Learn more`, entry.references.map((ref) => `- [${ref.name}](${ref.url})`)].join('\\n\\n');\n}\n//# sourceMappingURL=MarkdownRenderer.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.renderHtmlEntry = exports.render = void 0;\nvar MarkdownRenderer_1 = require(\"./MarkdownRenderer\");\nObject.defineProperty(exports, \"render\", { enumerable: true, get: function () { return MarkdownRenderer_1.render; } });\nObject.defineProperty(exports, \"renderHtmlEntry\", { enumerable: true, get: function () { return MarkdownRenderer_1.renderHtmlEntry; } });\n__exportStar(require(\"./HtmlDocset\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DocumentHighlightsProvider = exports.PREVENT_DEFAULT = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst theme_check_common_2 = require(\"@shopify/theme-check-common\");\nconst providers_1 = require(\"./providers\");\n/**\n * The default behaviour for documentHighlights is to highlight every occurence\n * of the word under the cursor. We want to prevent that since it doesn't really\n * make sense in our context. We don't want to highlight every occurence of\n * `assign` when you put your cursor over it.\n */\nexports.PREVENT_DEFAULT = [];\n/**\n * Informs the client to highlight ranges in a document.\n *\n * This is a pretty abstract concept, but you could use it to highlight all\n * instances of a variable in a template, to highlight the matching\n * opening/closing liquid tags, html tags, etc.\n */\nclass DocumentHighlightsProvider {\n constructor(documentManager) {\n this.documentManager = documentManager;\n this.providers = [\n new providers_1.HtmlTagNameDocumentHighlightsProvider(documentManager),\n new providers_1.LiquidBlockTagDocumentHighlightsProvider(documentManager),\n ];\n }\n async documentHighlights(params) {\n var _a;\n const document = this.documentManager.get(params.textDocument.uri);\n if (!document || document.type !== theme_check_common_1.SourceCodeType.LiquidHtml || document.ast instanceof Error) {\n return exports.PREVENT_DEFAULT;\n }\n const [currentNode, ancestors] = (0, theme_check_common_2.findCurrentNode)(document.ast, document.textDocument.offsetAt(params.position));\n const promises = this.providers.map((p) => p.documentHighlights(currentNode, ancestors, params).catch(() => null));\n const results = await Promise.all(promises);\n return (_a = results.find(Boolean)) !== null && _a !== void 0 ? _a : exports.PREVENT_DEFAULT;\n }\n}\nexports.DocumentHighlightsProvider = DocumentHighlightsProvider;\n//# sourceMappingURL=DocumentHighlightsProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HtmlTagNameDocumentHighlightsProvider = void 0;\nconst htmlTagNames_1 = require(\"../../utils/htmlTagNames\");\nclass HtmlTagNameDocumentHighlightsProvider {\n constructor(documentManager) {\n this.documentManager = documentManager;\n }\n async documentHighlights(node, ancestors, params) {\n var _a;\n const textDocument = (_a = this.documentManager.get(params.textDocument.uri)) === null || _a === void 0 ? void 0 : _a.textDocument;\n if (!textDocument)\n return null;\n const ranges = (0, htmlTagNames_1.getHtmlElementNameRanges)(node, ancestors, params, textDocument);\n if (!ranges)\n return null;\n return ranges.map((range) => ({ range }));\n }\n}\nexports.HtmlTagNameDocumentHighlightsProvider = HtmlTagNameDocumentHighlightsProvider;\n//# sourceMappingURL=HtmlTagNameDocumentHighlightsProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidBlockTagDocumentHighlightsProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nclass LiquidBlockTagDocumentHighlightsProvider {\n constructor(documentManager) {\n this.documentManager = documentManager;\n }\n async documentHighlights(node, ancestors, params) {\n var _a;\n const textDocument = (_a = this.documentManager.get(params.textDocument.uri)) === null || _a === void 0 ? void 0 : _a.textDocument;\n if (!textDocument)\n return null;\n if (isLiquidBranch(node)) {\n node = ancestors.at(-1);\n }\n if (!isLiquidBlock(node) || !node.blockEndPosition) {\n return null;\n }\n const nameOffset = node.source.indexOf(node.name, node.blockStartPosition.start);\n const endblockNameOffset = node.source.indexOf('end' + node.name, node.blockEndPosition.start);\n const ranges = [\n vscode_languageserver_1.Range.create(textDocument.positionAt(nameOffset), textDocument.positionAt(nameOffset + node.name.length)),\n vscode_languageserver_1.Range.create(textDocument.positionAt(endblockNameOffset), \n // \"end\" is 3 characters, end$name is 3 + node.name.length.\n textDocument.positionAt(endblockNameOffset + 3 + node.name.length)),\n ];\n // highlighting the elsif/else branches as well\n if (isLiquidTag(node) && node.children && node.children.every(isLiquidBranch)) {\n for (const branch of node.children.filter((x) => x.name !== null)) {\n const branchNameOffset = node.source.indexOf(branch.name, branch.blockStartPosition.start);\n ranges.push(vscode_languageserver_1.Range.create(textDocument.positionAt(branchNameOffset), textDocument.positionAt(branchNameOffset + branch.name.length)));\n }\n }\n return ranges.map((range) => ({ range }));\n }\n}\nexports.LiquidBlockTagDocumentHighlightsProvider = LiquidBlockTagDocumentHighlightsProvider;\nfunction isLiquidBranch(node) {\n return node.type === liquid_html_parser_1.NodeTypes.LiquidBranch;\n}\nfunction isLiquidBlock(node) {\n return node.type === liquid_html_parser_1.NodeTypes.LiquidTag || node.type === liquid_html_parser_1.NodeTypes.LiquidRawTag;\n}\nfunction isLiquidTag(node) {\n return node.type === liquid_html_parser_1.NodeTypes.LiquidTag;\n}\n//# sourceMappingURL=LiquidBlockTagDocumentHighlightsProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidBlockTagDocumentHighlightsProvider = exports.HtmlTagNameDocumentHighlightsProvider = void 0;\nvar HtmlTagNameDocumentHighlightsProvider_1 = require(\"./HtmlTagNameDocumentHighlightsProvider\");\nObject.defineProperty(exports, \"HtmlTagNameDocumentHighlightsProvider\", { enumerable: true, get: function () { return HtmlTagNameDocumentHighlightsProvider_1.HtmlTagNameDocumentHighlightsProvider; } });\nvar LiquidBlockTagDocumentHighlightsProvider_1 = require(\"./LiquidBlockTagDocumentHighlightsProvider\");\nObject.defineProperty(exports, \"LiquidBlockTagDocumentHighlightsProvider\", { enumerable: true, get: function () { return LiquidBlockTagDocumentHighlightsProvider_1.LiquidBlockTagDocumentHighlightsProvider; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DocumentLinksProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst vscode_uri_1 = require(\"vscode-uri\");\nconst theme_check_common_2 = require(\"@shopify/theme-check-common\");\nclass DocumentLinksProvider {\n constructor(documentManager, findThemeRootURI) {\n this.documentManager = documentManager;\n this.findThemeRootURI = findThemeRootURI;\n }\n async documentLinks(uriString) {\n const sourceCode = this.documentManager.get(uriString);\n if (!sourceCode ||\n sourceCode.type !== theme_check_common_1.SourceCodeType.LiquidHtml ||\n sourceCode.ast instanceof Error) {\n return [];\n }\n const rootUri = await this.findThemeRootURI(uriString);\n if (!rootUri) {\n return [];\n }\n const visitor = documentLinksVisitor(sourceCode.textDocument, vscode_uri_1.URI.parse(rootUri));\n return (0, theme_check_common_2.visit)(sourceCode.ast, visitor);\n }\n}\nexports.DocumentLinksProvider = DocumentLinksProvider;\nfunction documentLinksVisitor(textDocument, root) {\n return {\n LiquidTag(node) {\n // {% render 'snippet' %}\n // {% include 'snippet' %}\n if ((node.name === 'render' || node.name === 'include') &&\n typeof node.markup !== 'string' &&\n isLiquidString(node.markup.snippet)) {\n const snippet = node.markup.snippet;\n return vscode_languageserver_1.DocumentLink.create(range(textDocument, snippet), vscode_uri_1.Utils.resolvePath(root, 'snippets', snippet.value + '.liquid').toString());\n }\n // {% section 'section' %}\n if (node.name === 'section' &&\n typeof node.markup !== 'string' &&\n isLiquidString(node.markup)) {\n const sectionName = node.markup;\n return vscode_languageserver_1.DocumentLink.create(range(textDocument, sectionName), vscode_uri_1.Utils.resolvePath(root, 'sections', sectionName.value + '.liquid').toString());\n }\n // {% content_for 'block', type: 'block_name' %}\n if (node.name === liquid_html_parser_1.NamedTags.content_for && typeof node.markup !== 'string') {\n const typeArg = node.markup.args.find((arg) => arg.name === 'type');\n if (typeArg && typeArg.value.type === 'String') {\n return vscode_languageserver_1.DocumentLink.create(range(textDocument, typeArg.value), vscode_uri_1.Utils.resolvePath(root, 'blocks', typeArg.value.value + '.liquid').toString());\n }\n }\n },\n // {{ 'theme.js' | asset_url }}\n LiquidVariable(node) {\n if (node.filters.length === 0 || node.filters[0].name !== 'asset_url') {\n return;\n }\n if (!isLiquidString(node.expression)) {\n return;\n }\n const expression = node.expression;\n return vscode_languageserver_1.DocumentLink.create(range(textDocument, node.expression), vscode_uri_1.Utils.resolvePath(root, 'assets', expression.value).toString());\n },\n };\n}\nfunction range(textDocument, node) {\n const start = textDocument.positionAt(node.position.start + 1);\n const end = textDocument.positionAt(node.position.end - 1);\n return vscode_languageserver_1.Range.create(start, end);\n}\nfunction isLiquidString(node) {\n return node.type === liquid_html_parser_1.NodeTypes.String;\n}\n//# sourceMappingURL=DocumentLinksProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DocumentLinksProvider = void 0;\nvar DocumentLinksProvider_1 = require(\"./DocumentLinksProvider\");\nObject.defineProperty(exports, \"DocumentLinksProvider\", { enumerable: true, get: function () { return DocumentLinksProvider_1.DocumentLinksProvider; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DocumentManager = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_textdocument_1 = require(\"vscode-languageserver-textdocument\");\nconst progress_1 = require(\"../progress\");\nconst theme_check_common_2 = require(\"@shopify/theme-check-common\");\nconst sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));\nclass DocumentManager {\n constructor(fs, connection, clientCapabilities, getModeForUri, isValidSchema) {\n this.fs = fs;\n this.connection = connection;\n this.clientCapabilities = clientCapabilities;\n this.getModeForUri = getModeForUri;\n this.isValidSchema = isValidSchema;\n /**\n * The preload method is used to pre-load and pre-parse all the files in the\n * theme. It is smart and only will load files that are not already in the\n * DocumentManager.\n *\n * Files that are loaded from the AbstractFileSystem will have a version of `undefined`.\n */\n this.preload = (0, theme_check_common_1.memoize)(async (rootUri) => {\n if (!this.fs)\n throw new Error('Cannot call preload without a FileSystem');\n const { fs, connection, clientCapabilities } = this;\n const progress = progress_1.Progress.create(connection, clientCapabilities, `preload#${rootUri}`);\n progress.start('Initializing Liquid LSP');\n // We'll only load the files that aren't already in the store. No need to\n // parse a file we already parsed.\n const filesToLoad = await (0, theme_check_common_1.recursiveReadDirectory)(this.fs, rootUri, ([uri]) => /\\.(liquid|json)$/.test(uri) && !this.sourceCodes.has(uri));\n progress.report(10, 'Preloading files');\n let [i, n] = [0, filesToLoad.length];\n await Promise.all(filesToLoad.map(async (file) => {\n // This is what is important, we are loading the file from the file system\n // And setting their initial version to `undefined` to mean \"on disk\".\n try {\n this.set(file, await fs.readFile(file), undefined);\n }\n catch (error) {\n console.error('Failed to preload', file, error);\n }\n // This is just doing progress reporting\n if (++i % 10 === 0) {\n const message = `Preloading files [${i}/${n}]`;\n progress.report((0, progress_1.percent)(i, n, 10), message);\n }\n }));\n progress.end('Completed');\n }, (rootUri) => rootUri);\n this.sourceCodes = new Map();\n this.recentlyRenamed = new Set();\n }\n open(uri, source, version) {\n return this.set(uri, source, version);\n }\n change(uri, source, version) {\n return this.set(uri, source, version);\n }\n async changeFromDisk(uri) {\n if (!this.fs)\n throw new Error('Cannot call changeFromDisk without a FileSystem');\n this.change(uri, await this.fs.readFile(uri), undefined);\n }\n close(uri) {\n const sourceCode = this.sourceCodes.get(uri);\n if (!sourceCode)\n return;\n return this.set(uri, sourceCode.source, undefined);\n }\n delete(uri) {\n return this.sourceCodes.delete(uri);\n }\n rename(oldUri, newUri) {\n this.trackRename(oldUri, newUri);\n const sourceCode = this.sourceCodes.get(oldUri);\n if (!sourceCode)\n return;\n this.sourceCodes.delete(oldUri);\n this.set(newUri, sourceCode.source, sourceCode.version);\n }\n theme(root, includeFilesFromDisk = false) {\n return [...this.sourceCodes.values()]\n .filter((sourceCode) => sourceCode.uri.startsWith(root))\n .filter((sourceCode) => includeFilesFromDisk || sourceCode.version !== undefined);\n }\n get openDocuments() {\n return [...this.sourceCodes.values()].filter((sourceCode) => sourceCode.version !== undefined);\n }\n get(uri) {\n return this.sourceCodes.get(theme_check_common_1.path.normalize(uri));\n }\n has(uri) {\n return this.sourceCodes.has(theme_check_common_1.path.normalize(uri));\n }\n /** Used to prevent cache busting twice for the same operation */\n hasRecentRename(uri) {\n return this.recentlyRenamed.has(uri);\n }\n clearRecentRename(uri) {\n this.recentlyRenamed.delete(uri);\n }\n set(uri, source, version) {\n uri = theme_check_common_1.path.normalize(uri);\n // We only support json and liquid files.\n if (!/\\.(json|liquid)$/.test(uri) || /\\.(s?css|js).liquid$/.test(uri)) {\n return;\n }\n this.sourceCodes.set(uri, this.augmentedSourceCode(uri, source, version));\n }\n augmentedSourceCode(uri, source, version) {\n var _a;\n const sourceCode = (0, theme_check_common_1.toSourceCode)(uri, source, version);\n const textDocument = vscode_languageserver_textdocument_1.TextDocument.create(uri, sourceCode.type, (_a = sourceCode.version) !== null && _a !== void 0 ? _a : 0, // create doesn't let us put undefined here.\n sourceCode.source);\n switch (sourceCode.type) {\n case theme_check_common_1.SourceCodeType.JSON:\n return {\n ...sourceCode,\n textDocument,\n };\n case theme_check_common_1.SourceCodeType.LiquidHtml:\n return {\n ...sourceCode,\n textDocument,\n /** Lazy and only computed once per file version */\n getSchema: (0, theme_check_common_1.memo)(async () => {\n if (!this.getModeForUri || !this.isValidSchema)\n return undefined;\n const mode = await this.getModeForUri(uri);\n return (0, theme_check_common_1.toSchema)(mode, uri, sourceCode, this.isValidSchema, false);\n }),\n /** Lazy and only computed once per file version */\n getLiquidDoc: (0, theme_check_common_1.memo)(async () => {\n const ast = sourceCode.ast;\n if ((0, theme_check_common_1.isError)(ast))\n return undefined;\n return (0, theme_check_common_2.extractDocDefinition)(uri, ast);\n }),\n };\n default:\n return (0, theme_check_common_1.assertNever)(sourceCode);\n }\n }\n /**\n * The workspace/onDidRenameFile notification is sent when a file is renamed in the workspace (via a user gesture)\n * The workspace/onDidChangeWatchedFiles notification is sent when a file is renamed on disk (via a file system event)\n *\n * The order is not guaranteed, but it seems to be true that onDidRenameFile happens before onDidChangeWatchedFiles.\n *\n * In the off-chance that the order is reversed, we'll have the sleep timer to clean up the state.\n */\n trackRename(oldUri, newUri) {\n this.recentlyRenamed.add(oldUri);\n this.recentlyRenamed.add(newUri);\n sleep(2000).then(() => {\n this.clearRecentRename(oldUri);\n this.clearRecentRename(newUri);\n });\n }\n}\nexports.DocumentManager = DocumentManager;\n//# sourceMappingURL=DocumentManager.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DocumentManager = void 0;\nvar DocumentManager_1 = require(\"./DocumentManager\");\nObject.defineProperty(exports, \"DocumentManager\", { enumerable: true, get: function () { return DocumentManager_1.DocumentManager; } });\n__exportStar(require(\"./types\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isJsonSourceCode = exports.isLiquidSourceCode = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst isLiquidSourceCode = (file) => file.type === theme_check_common_1.SourceCodeType.LiquidHtml;\nexports.isLiquidSourceCode = isLiquidSourceCode;\nconst isJsonSourceCode = (file) => file.type === theme_check_common_1.SourceCodeType.JSON;\nexports.isJsonSourceCode = isJsonSourceCode;\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OnTypeFormattingProvider = void 0;\nconst BracketsAutoclosingOnTypeFormattingProvider_1 = require(\"./providers/BracketsAutoclosingOnTypeFormattingProvider\");\nconst HtmlElementAutoclosingOnTypeFormattingProvider_1 = require(\"./providers/HtmlElementAutoclosingOnTypeFormattingProvider\");\nclass OnTypeFormattingProvider {\n constructor(documentManager, setCursorPosition = async () => { }) {\n this.documentManager = documentManager;\n this.setCursorPosition = setCursorPosition;\n this.providers = [\n new BracketsAutoclosingOnTypeFormattingProvider_1.BracketsAutoclosingOnTypeFormattingProvider(),\n new HtmlElementAutoclosingOnTypeFormattingProvider_1.HtmlElementAutoclosingOnTypeFormattingProvider(setCursorPosition),\n ];\n }\n async onTypeFormatting(params) {\n var _a;\n const document = this.documentManager.get(params.textDocument.uri);\n if (!document)\n return null;\n const results = this.providers.map((provider) => provider.onTypeFormatting(document, params));\n return (_a = results.find((result) => result !== null)) !== null && _a !== void 0 ? _a : null;\n }\n}\nexports.OnTypeFormattingProvider = OnTypeFormattingProvider;\n//# sourceMappingURL=OnTypeFormattingProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OnTypeFormattingProvider = void 0;\nvar OnTypeFormattingProvider_1 = require(\"./OnTypeFormattingProvider\");\nObject.defineProperty(exports, \"OnTypeFormattingProvider\", { enumerable: true, get: function () { return OnTypeFormattingProvider_1.OnTypeFormattingProvider; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BracketsAutoclosingOnTypeFormattingProvider = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nclass BracketsAutoclosingOnTypeFormattingProvider {\n /**\n * This very complex piece of code here exists to provide a good autoclosing UX.\n *\n * The story is kind of long so here goes...\n *\n * What we want:\n * 1. Basic autoclosing of {{, {% with the corresponding pair (and spaces)\n * - user types: {{\n * - user sees: {{ | }} (with cursor position at |)\n * 2. Autoclosing of {{- with -}}, {%- with -%}\n * - user types: {{-\n * - user sees: {{- | -}} (with cursor at |)\n * 3. User adds whitespace stripping on one side of the braces of an existing tag\n * - user types: - at | in `{{| drop }}`\n * - user sees: {{- drop }}\n *\n * Why we can't do it with autoclosingPairs:\n * - VS Code's settings accepts autoclosingPairs and autocloseBefore\n * - autoclosingPairs is a set of pairs that should be autoclosed (e.g. ['{%', '%}'])\n * - autocloseBefore is a character set of 'allowed next characters' that would cause a closing pair\n * - If we put a space (' ') the autoclosingPairs set, then (3) from above becomes funky:\n * - assume autoclosingPairs = {|}, {{|}}, {{ | }}\n * - user types: a space at | in `{{| drop }}`\n * - user sees: {{ }}drop }}\n * - This happens because the space is an autocloseBefore character, it sees a space after the cursor\n * so it closes '{{ ' with ' }}' at the cursor position, resulting in '{{ }}drop }}'\n * - Something similar happens if we include the `-` in the autoclosing pairs\n * - This is annoying!\n *\n * So our solution is the following:\n * 1. We change the pairs to include the closing space (this way our cursor remains where we want it to be)\n * - {{| }}\n * - {%| %}\n * 2. We add this OnTypeFormattingProvider that does the following \"fixes\":\n * - {{| }} into {{ | }}\n * - {{ -| }} into {{- | -}}\n * - {%| %} into {% | %}\n * - {% -| %} into {%- | -%}\n *\n * This lets us avoid the unnecessary close and accomplish 1, 2 and 3 :)\n *\n * Fallback for editor.onTypeFormatting: false is to let the user type the `-` on both sides manually\n */\n onTypeFormatting(document, params) {\n const textDocument = document.textDocument;\n const ch = params.ch;\n // position is position of cursor so 1 ahead of char\n const { line, character } = params.position;\n // This is an early return to avoid doing currentLine.at(-1);\n if ((ch === ' ' && character <= 2) || character <= 1)\n return null;\n const currentLineRange = vscode_languageserver_protocol_1.Range.create(vscode_languageserver_protocol_1.Position.create(line, 0), vscode_languageserver_protocol_1.Position.create(line + 1, 0));\n const currentLine = textDocument.getText(currentLineRange);\n const charIdx = ch === ' ' ? character - 2 : character - 1;\n const char = currentLine.at(charIdx);\n switch (char) {\n // here we fix {{| }} with {{ | }}\n // here we fix {%| %} with {% | %}\n case '{':\n case '%': {\n const chars = currentLine.slice(charIdx - 1, charIdx + 4);\n if (chars === '{{ }}' || chars === '{% %}') {\n return [vscode_languageserver_protocol_1.TextEdit.insert(vscode_languageserver_protocol_1.Position.create(line, charIdx + 1), ' ')];\n }\n }\n // here we fix {{ -| }} to {{- | -}}\n // here we fix {% -| }} to {%- | -%}\n case '-': {\n // remember 0-index means 4th char\n if (charIdx < 3)\n return null;\n const chars = currentLine.slice(charIdx - 3, charIdx + 4);\n if (chars === '{{ - }}' || chars === '{% - %}') {\n // Here we're being clever and doing the {{- -}} if the first character\n // you type is a `-`, leaving your cursor in the middle :)\n return [\n // Start with\n // {{ - }}\n // ^ start replace\n // ^ end replace (excluded)\n // Replace with '- ', get\n // {{- }}\n vscode_languageserver_protocol_1.TextEdit.replace(vscode_languageserver_protocol_1.Range.create(vscode_languageserver_protocol_1.Position.create(line, charIdx - 1), vscode_languageserver_protocol_1.Position.create(line, charIdx + 1)), '- '),\n // Start with\n // {{ - }}\n // ^ char\n // ^ insertion point\n // Insert ' ' , get\n // {{ - -}}\n // Both together and you get {{- -}} with your cursor in the middle\n vscode_languageserver_protocol_1.TextEdit.insert(vscode_languageserver_protocol_1.Position.create(line, charIdx + 2), '-'),\n ];\n }\n }\n }\n return null;\n }\n}\nexports.BracketsAutoclosingOnTypeFormattingProvider = BracketsAutoclosingOnTypeFormattingProvider;\n//# sourceMappingURL=BracketsAutoclosingOnTypeFormattingProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HtmlElementAutoclosingOnTypeFormattingProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst defer = (fn) => setTimeout(fn, 10);\n/**\n * This class is responsible for closing dangling HTML elements.\n *\n * Say user types <script>, then we'd want `</script>` to be inserted.\n *\n * Thing is we want to do that only if the `</script>` isn't already present in the file.\n * If the user goes to edit `<script>` and types `>`, we don't want to insert `</script>` again.\n *\n * The \"trick\" we use here is to only add the `</script>` part if the\n * document.ast is an instance of LiquidHTMLASTParsingError and that the\n * unclosed element is of the correct name.\n *\n * @example:\n * ```html\n * <div id=\"main\">\n * <div id=\"inner\">|\n * </div>\n * ```\n * - The user just finished typing `<div id=\"inner\">` inside the div#main.\n * - This parses as though the div#inner is closed and div#main isn't.\n * - That's OK.\n * - This makes a LiquidHTMLASTParsingError with unclosed div (the div#main).\n * - Since\n * - the cursor is at the end of a div, and\n * - the unclosed element is a div,\n * Then we can insert one automatically after the cursor and fix the AST.\n *\n * ```html\n * <div id=\"main\">\n * <div id=\"inner\">|</div>\n * </div>\n * ```\n */\nclass HtmlElementAutoclosingOnTypeFormattingProvider {\n constructor(setCursorPosition) {\n this.setCursorPosition = setCursorPosition;\n }\n onTypeFormatting(document, params) {\n const textDocument = document.textDocument;\n const ch = params.ch;\n // position is position of cursor so 1 ahead of char\n const { line, character } = params.position;\n switch (ch) {\n // here we fix `>` with `</$unclosed>`\n case '>': {\n const ast = document.ast;\n if (ast instanceof liquid_html_parser_1.LiquidHTMLASTParsingError &&\n ast.unclosed &&\n ast.unclosed.type === liquid_html_parser_1.NodeTypes.HtmlElement &&\n (ast.unclosed.blockStartPosition.end === textDocument.offsetAt(params.position) ||\n shouldClose(ast.unclosed, nodeAtCursor(textDocument, params.position)))) {\n defer(() => this.setCursorPosition(textDocument, params.position));\n return [vscode_languageserver_protocol_1.TextEdit.insert(vscode_languageserver_protocol_1.Position.create(line, character), `</${ast.unclosed.name}>`)];\n }\n else if (!(ast instanceof Error)) {\n // Even though we accept dangling <div>s inside {% if condition %}, we prefer to auto-insert the </div>\n const [node] = (0, theme_check_common_1.findCurrentNode)(ast, textDocument.offsetAt(params.position));\n if (isDanglingHtmlElement(node)) {\n defer(() => this.setCursorPosition(textDocument, params.position));\n return [vscode_languageserver_protocol_1.TextEdit.insert(vscode_languageserver_protocol_1.Position.create(line, character), `</${(0, liquid_html_parser_1.getName)(node)}>`)];\n }\n }\n }\n }\n return null;\n }\n}\nexports.HtmlElementAutoclosingOnTypeFormattingProvider = HtmlElementAutoclosingOnTypeFormattingProvider;\nfunction nodeAtCursor(textDocument, position) {\n var _a;\n const text = textDocument.getText(vscode_languageserver_protocol_1.Range.create(vscode_languageserver_protocol_1.Position.create(0, 0), position));\n try {\n const ast = (0, liquid_html_parser_1.toLiquidHtmlAST)(text, {\n allowUnclosedDocumentNode: true,\n mode: 'tolerant',\n });\n const [node, ancestors] = (0, theme_check_common_1.findCurrentNode)(ast, textDocument.offsetAt(position));\n if (((_a = ancestors.at(-1)) === null || _a === void 0 ? void 0 : _a.type) === liquid_html_parser_1.NodeTypes.HtmlElement)\n return ancestors.at(-1);\n if (node.type === liquid_html_parser_1.NodeTypes.LiquidBranch)\n return ancestors.at(-1);\n return node;\n }\n catch {\n return null;\n }\n}\nfunction shouldClose(unclosed, node) {\n if (node === null || !('blockStartPosition' in node))\n return false;\n return ([liquid_html_parser_1.NodeTypes.HtmlElement, liquid_html_parser_1.NodeTypes.LiquidTag, liquid_html_parser_1.NodeTypes.HtmlRawNode].includes(unclosed.type) &&\n (0, liquid_html_parser_1.getName)(node) === unclosed.name);\n}\nfunction isDanglingHtmlElement(node) {\n return (node !== null &&\n node.type === liquid_html_parser_1.NodeTypes.HtmlElement &&\n node.blockEndPosition.start === node.blockEndPosition.end);\n}\n//# sourceMappingURL=HtmlElementAutoclosingOnTypeFormattingProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HoverProvider = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst TypeSystem_1 = require(\"../TypeSystem\");\nconst providers_1 = require(\"./providers\");\nconst HtmlAttributeValueHoverProvider_1 = require(\"./providers/HtmlAttributeValueHoverProvider\");\nconst theme_check_common_2 = require(\"@shopify/theme-check-common\");\nconst LiquidDocTagHoverProvider_1 = require(\"./providers/LiquidDocTagHoverProvider\");\nconst ContentForArgumentHoverProvider_1 = require(\"./providers/ContentForArgumentHoverProvider\");\nconst ContentForTypeHoverProvider_1 = require(\"./providers/ContentForTypeHoverProvider\");\nclass HoverProvider {\n constructor(documentManager, themeDocset, getMetafieldDefinitions, getTranslationsForURI = async () => ({}), getSettingsSchemaForURI = async () => [], getDocDefinitionForURI = async () => undefined) {\n this.documentManager = documentManager;\n this.themeDocset = themeDocset;\n this.getMetafieldDefinitions = getMetafieldDefinitions;\n this.getTranslationsForURI = getTranslationsForURI;\n this.getSettingsSchemaForURI = getSettingsSchemaForURI;\n this.getDocDefinitionForURI = getDocDefinitionForURI;\n this.providers = [];\n const typeSystem = new TypeSystem_1.TypeSystem(themeDocset, getSettingsSchemaForURI, getMetafieldDefinitions);\n this.providers = [\n new ContentForArgumentHoverProvider_1.ContentForArgumentHoverProvider(getDocDefinitionForURI),\n new ContentForTypeHoverProvider_1.ContentForTypeHoverProvider(getDocDefinitionForURI),\n new providers_1.LiquidTagHoverProvider(themeDocset),\n new providers_1.LiquidFilterArgumentHoverProvider(themeDocset),\n new providers_1.LiquidFilterHoverProvider(themeDocset),\n new providers_1.LiquidObjectHoverProvider(typeSystem),\n new providers_1.LiquidObjectAttributeHoverProvider(typeSystem),\n new providers_1.HtmlTagHoverProvider(),\n new providers_1.HtmlAttributeHoverProvider(),\n new HtmlAttributeValueHoverProvider_1.HtmlAttributeValueHoverProvider(),\n new providers_1.TranslationHoverProvider(getTranslationsForURI, documentManager),\n new providers_1.RenderSnippetHoverProvider(getDocDefinitionForURI),\n new providers_1.RenderSnippetParameterHoverProvider(getDocDefinitionForURI),\n new LiquidDocTagHoverProvider_1.LiquidDocTagHoverProvider(documentManager),\n ];\n }\n async hover(params) {\n var _a;\n const uri = params.textDocument.uri;\n const document = this.documentManager.get(uri);\n // Supports only Liquid resources\n if ((document === null || document === void 0 ? void 0 : document.type) !== theme_check_common_1.SourceCodeType.LiquidHtml || document.ast instanceof Error) {\n return null;\n }\n const [currentNode, ancestors] = (0, theme_check_common_2.findCurrentNode)(document.ast, document.textDocument.offsetAt(params.position));\n const promises = this.providers.map((p) => p.hover(currentNode, ancestors, params));\n const results = await Promise.all(promises);\n return (_a = results.find(Boolean)) !== null && _a !== void 0 ? _a : null;\n }\n}\nexports.HoverProvider = HoverProvider;\n//# sourceMappingURL=HoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HoverProvider = void 0;\nvar HoverProvider_1 = require(\"./HoverProvider\");\nObject.defineProperty(exports, \"HoverProvider\", { enumerable: true, get: function () { return HoverProvider_1.HoverProvider; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContentForArgumentHoverProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst liquidDoc_1 = require(\"../../utils/liquidDoc\");\nclass ContentForArgumentHoverProvider {\n constructor(getDocDefinitionForURI) {\n this.getDocDefinitionForURI = getDocDefinitionForURI;\n }\n async hover(currentNode, ancestors, params) {\n var _a, _b;\n const parentNode = ancestors.at(-1);\n if (currentNode.type !== liquid_html_parser_1.NodeTypes.NamedArgument ||\n !parentNode ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.ContentForMarkup ||\n parentNode.contentForType.type !== liquid_html_parser_1.NodeTypes.String) {\n return null;\n }\n const blockName = (0, theme_check_common_1.getBlockName)(parentNode);\n if (!blockName) {\n return null;\n }\n const docDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, 'blocks', blockName);\n const hoverArgument = (_b = (_a = docDefinition === null || docDefinition === void 0 ? void 0 : docDefinition.liquidDoc) === null || _a === void 0 ? void 0 : _a.parameters) === null || _b === void 0 ? void 0 : _b.find((argument) => argument.name === currentNode.name);\n if (!hoverArgument) {\n return null;\n }\n return {\n contents: {\n kind: 'markdown',\n value: (0, liquidDoc_1.formatLiquidDocParameter)(hoverArgument, true),\n },\n };\n }\n}\nexports.ContentForArgumentHoverProvider = ContentForArgumentHoverProvider;\n//# sourceMappingURL=ContentForArgumentHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContentForTypeHoverProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst liquidDoc_1 = require(\"../../utils/liquidDoc\");\nclass ContentForTypeHoverProvider {\n constructor(getDocDefinitionForURI) {\n this.getDocDefinitionForURI = getDocDefinitionForURI;\n }\n async hover(currentNode, ancestors, params) {\n const parentNode = ancestors.at(-1);\n const grandParentNode = ancestors.at(-2);\n if (currentNode.type !== liquid_html_parser_1.NodeTypes.String ||\n !parentNode ||\n !grandParentNode ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.NamedArgument ||\n parentNode.name !== 'type' ||\n grandParentNode.type !== liquid_html_parser_1.NodeTypes.ContentForMarkup) {\n return null;\n }\n const blockName = currentNode.value;\n const docDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, 'blocks', blockName);\n return {\n contents: {\n kind: 'markdown',\n value: (0, liquidDoc_1.formatLiquidDocContentMarkdown)(blockName, docDefinition),\n },\n };\n }\n}\nexports.ContentForTypeHoverProvider = ContentForTypeHoverProvider;\n//# sourceMappingURL=ContentForTypeHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HtmlAttributeHoverProvider = void 0;\nconst docset_1 = require(\"../../docset\");\nconst utils_1 = require(\"../../utils\");\nclass HtmlAttributeHoverProvider {\n async hover(currentNode, ancestors) {\n var _a;\n const attributeNode = ancestors.at(-1);\n const tagNode = (0, utils_1.findLast)(ancestors, utils_1.isNamedHtmlElementNode);\n if (!attributeNode ||\n !tagNode ||\n !(0, utils_1.isTextNode)(currentNode) ||\n !(0, utils_1.isHtmlAttribute)(attributeNode) ||\n !attributeNode.name.includes(currentNode) ||\n attributeNode.name.length > 1 ||\n !(0, utils_1.isNamedHtmlElementNode)(tagNode)) {\n return null;\n }\n const name = currentNode.value;\n const tagName = (0, utils_1.getCompoundName)(tagNode);\n const tagEntry = docset_1.HtmlData.tags.find((tag) => tag.name === tagName);\n const tagEntryAttributes = (tagEntry === null || tagEntry === void 0 ? void 0 : tagEntry.attributes) || [];\n const attribute = (_a = docset_1.HtmlData.globalAttributes.find((attr) => attr.name === name)) !== null && _a !== void 0 ? _a : tagEntryAttributes.find((attr) => attr.name === name);\n if (!attribute) {\n return null;\n }\n return {\n contents: {\n kind: 'markdown',\n value: (0, docset_1.renderHtmlEntry)(attribute, 'references' in attribute ? undefined : tagEntry),\n },\n };\n }\n}\nexports.HtmlAttributeHoverProvider = HtmlAttributeHoverProvider;\n//# sourceMappingURL=HtmlAttributeHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HtmlAttributeValueHoverProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst docset_1 = require(\"../../docset\");\nconst utils_1 = require(\"../../utils\");\nclass HtmlAttributeValueHoverProvider {\n async hover(currentNode, ancestors) {\n var _a;\n const attributeNode = (0, utils_1.findLast)(ancestors, utils_1.isHtmlAttribute);\n const tagNode = (0, utils_1.findLast)(ancestors, utils_1.isNamedHtmlElementNode);\n if (!(0, utils_1.isTextNode)(currentNode) ||\n !attributeNode ||\n !tagNode ||\n !(0, utils_1.isHtmlAttribute)(attributeNode) ||\n !(0, utils_1.isNamedHtmlElementNode)(tagNode) ||\n attributeNode.type === liquid_html_parser_1.NodeTypes.AttrEmpty ||\n attributeNode.value.length !== 1 ||\n !attributeNode.value.includes(currentNode)) {\n return null;\n }\n const valueName = currentNode.value;\n const attrName = (0, utils_1.getCompoundName)(attributeNode);\n const tagName = (0, utils_1.getCompoundName)(tagNode);\n const tagEntry = docset_1.HtmlData.tags.find((tag) => tag.name === tagName);\n const attribute = (_a = docset_1.HtmlData.globalAttributes.find((attr) => attr.name === attrName)) !== null && _a !== void 0 ? _a : tagEntry === null || tagEntry === void 0 ? void 0 : tagEntry.attributes.find((attr) => attr.name === attrName);\n const valueSetName = attribute === null || attribute === void 0 ? void 0 : attribute.valueSet;\n const valueSetEntry = docset_1.HtmlData.valueSets.find((valueSet) => valueSet.name === valueSetName);\n const valueEntry = valueSetEntry === null || valueSetEntry === void 0 ? void 0 : valueSetEntry.values.find((value) => value.name === valueName);\n if (!valueEntry) {\n return null;\n }\n return {\n contents: {\n kind: 'markdown',\n value: (0, docset_1.renderHtmlEntry)(valueEntry, (attribute === null || attribute === void 0 ? void 0 : attribute.references) ? attribute : tagEntry),\n },\n };\n }\n}\nexports.HtmlAttributeValueHoverProvider = HtmlAttributeValueHoverProvider;\n//# sourceMappingURL=HtmlAttributeValueHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HtmlTagHoverProvider = void 0;\nconst docset_1 = require(\"../../docset\");\nconst utils_1 = require(\"../../utils\");\nclass HtmlTagHoverProvider {\n async hover(currentNode, ancestors) {\n let name;\n const parentNode = ancestors.at(-1);\n if ((0, utils_1.isNamedHtmlElementNode)(currentNode) && typeof currentNode.name === 'string') {\n name = currentNode.name;\n }\n else if ((0, utils_1.isTextNode)(currentNode) &&\n parentNode &&\n (0, utils_1.isNamedHtmlElementNode)(parentNode) &&\n typeof parentNode.name !== 'string' &&\n parentNode.name.includes(currentNode) &&\n parentNode.name.length === 1) {\n name = currentNode.value;\n }\n if (!name) {\n return null;\n }\n const entry = docset_1.HtmlData.tags.find((tag) => tag.name === name);\n if (!entry) {\n return null;\n }\n return {\n contents: {\n kind: 'markdown',\n value: (0, docset_1.renderHtmlEntry)(entry),\n },\n };\n }\n}\nexports.HtmlTagHoverProvider = HtmlTagHoverProvider;\n//# sourceMappingURL=HtmlTagHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidDocTagHoverProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst liquidDoc_1 = require(\"../../utils/liquidDoc\");\nclass LiquidDocTagHoverProvider {\n constructor(documentManager) {\n this.documentManager = documentManager;\n }\n async hover(currentNode, ancestors, params) {\n var _a;\n const parentNode = ancestors.at(-1);\n if (currentNode.type !== liquid_html_parser_1.NodeTypes.LiquidDocParamNode &&\n currentNode.type !== liquid_html_parser_1.NodeTypes.LiquidDocDescriptionNode &&\n currentNode.type !== liquid_html_parser_1.NodeTypes.LiquidDocExampleNode) {\n return null;\n }\n const document = (_a = this.documentManager.get(params.textDocument.uri)) === null || _a === void 0 ? void 0 : _a.textDocument;\n // We only want to provide hover when we are on the exact tag name\n // If the cursor is passed that but still within the tag node, we ignore it\n //\n // E.g.\n // Provide hover: @para█m name - description\n // Don't provide hover: @param █name - description\n if (document &&\n document.offsetAt(params.position) > currentNode.position.start + currentNode.name.length) {\n return null;\n }\n const docTagData = liquidDoc_1.SUPPORTED_LIQUID_DOC_TAG_HANDLES[currentNode.name];\n if (!docTagData) {\n return null;\n }\n return {\n contents: {\n kind: vscode_languageserver_1.MarkupKind.Markdown,\n value: (0, liquidDoc_1.formatLiquidDocTagHandle)(currentNode.name, docTagData.description, docTagData.example),\n },\n };\n }\n}\nexports.LiquidDocTagHoverProvider = LiquidDocTagHoverProvider;\n//# sourceMappingURL=LiquidDocTagHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidFilterArgumentHoverProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst docset_1 = require(\"../../docset\");\nclass LiquidFilterArgumentHoverProvider {\n constructor(themeDocset) {\n this.themeDocset = themeDocset;\n }\n async hover(currentNode, ancestors) {\n var _a;\n const parentNode = ancestors.at(-1);\n if (!parentNode ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.LiquidFilter ||\n currentNode.type !== liquid_html_parser_1.NodeTypes.NamedArgument) {\n return null;\n }\n const parentName = parentNode.name;\n const entries = await this.themeDocset.filters();\n const entry = entries.find((entry) => entry.name === parentName);\n if (!entry) {\n return null;\n }\n const argument = (_a = entry.parameters) === null || _a === void 0 ? void 0 : _a.find((argument) => argument.name === currentNode.name);\n if (!argument) {\n return null;\n }\n return {\n contents: {\n kind: 'markdown',\n value: (0, docset_1.render)(argument, undefined, 'filter'),\n },\n };\n }\n}\nexports.LiquidFilterArgumentHoverProvider = LiquidFilterArgumentHoverProvider;\n//# sourceMappingURL=LiquidFilterArgumentHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidFilterHoverProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst docset_1 = require(\"../../docset\");\nclass LiquidFilterHoverProvider {\n constructor(themeDocset) {\n this.themeDocset = themeDocset;\n }\n async hover(currentNode) {\n if (currentNode.type !== liquid_html_parser_1.NodeTypes.LiquidFilter) {\n return null;\n }\n const name = currentNode.name;\n const entries = await this.themeDocset.filters();\n const entry = entries.find((entry) => entry.name === name);\n if (!entry) {\n return null;\n }\n return {\n contents: {\n kind: 'markdown',\n value: (0, docset_1.render)(entry, undefined, 'filter'),\n },\n };\n }\n}\nexports.LiquidFilterHoverProvider = LiquidFilterHoverProvider;\n//# sourceMappingURL=LiquidFilterHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidObjectAttributeHoverProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst TypeSystem_1 = require(\"../../TypeSystem\");\nconst docset_1 = require(\"../../docset\");\nclass LiquidObjectAttributeHoverProvider {\n constructor(typeSystem) {\n this.typeSystem = typeSystem;\n }\n async hover(currentNode, ancestors, params) {\n var _a, _b;\n const parentNode = ancestors.at(-1);\n const uri = params.textDocument.uri;\n if (currentNode.type !== liquid_html_parser_1.NodeTypes.String ||\n !parentNode ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.VariableLookup ||\n !parentNode.lookups.includes(currentNode)) {\n return null;\n }\n const lookupIndex = parentNode.lookups.findIndex((lookup) => lookup === currentNode);\n const node = {\n ...parentNode,\n lookups: parentNode.lookups.slice(0, lookupIndex),\n };\n const objectMap = await this.typeSystem.objectMap(uri, ancestors[0]);\n const parentType = await this.typeSystem.inferType(node, ancestors[0], uri);\n if ((0, TypeSystem_1.isArrayType)(parentType) || parentType === 'string' || parentType === TypeSystem_1.Untyped) {\n const nodeType = await this.typeSystem.inferType({ ...parentNode, lookups: parentNode.lookups.slice(0, lookupIndex + 1) }, ancestors[0], uri);\n // 2D arrays and unknown types are not supported\n if ((0, TypeSystem_1.isArrayType)(nodeType) || nodeType === TypeSystem_1.Unknown)\n return null;\n // We want want `## first: `nodeType` with the docs of the nodeType\n const entry = { ...((_a = objectMap[nodeType]) !== null && _a !== void 0 ? _a : {}), name: currentNode.value };\n return {\n contents: {\n kind: 'markdown',\n value: (0, docset_1.render)(entry, nodeType),\n },\n };\n }\n const parentEntry = objectMap[parentType];\n if (!parentEntry) {\n return null;\n }\n const parentTypeProperties = ((_b = objectMap[parentType]) === null || _b === void 0 ? void 0 : _b.properties) || [];\n const entry = parentTypeProperties.find((p) => p.name === currentNode.value);\n if (!entry) {\n return null;\n }\n return {\n contents: {\n kind: 'markdown',\n value: (0, docset_1.render)(entry),\n },\n };\n }\n}\nexports.LiquidObjectAttributeHoverProvider = LiquidObjectAttributeHoverProvider;\n//# sourceMappingURL=LiquidObjectAttributeHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidObjectHoverProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst TypeSystem_1 = require(\"../../TypeSystem\");\nconst docset_1 = require(\"../../docset\");\nclass LiquidObjectHoverProvider {\n constructor(typeSystem) {\n this.typeSystem = typeSystem;\n }\n async hover(currentNode, ancestors, params) {\n var _a;\n if (currentNode.type !== liquid_html_parser_1.NodeTypes.VariableLookup &&\n currentNode.type !== liquid_html_parser_1.NodeTypes.AssignMarkup) {\n return null;\n }\n if (!currentNode.name) {\n return null;\n }\n let node = currentNode;\n if (node.type === liquid_html_parser_1.NodeTypes.VariableLookup) {\n node = {\n ...currentNode,\n lookups: [],\n };\n }\n const type = await this.typeSystem.inferType(node, ancestors[0], params.textDocument.uri);\n const objectMap = await this.typeSystem.objectMap(params.textDocument.uri, ancestors[0]);\n const entry = objectMap[(0, TypeSystem_1.isArrayType)(type) ? type.valueType : type];\n if (type === TypeSystem_1.Unknown) {\n return null;\n }\n if (!entry) {\n const entryByName = (_a = objectMap[currentNode.name]) !== null && _a !== void 0 ? _a : {};\n return {\n contents: {\n kind: 'markdown',\n value: (0, docset_1.render)({\n ...entryByName,\n name: currentNode.name,\n }, type, 'object'),\n },\n };\n }\n return {\n contents: {\n kind: 'markdown',\n value: (0, docset_1.render)({ ...entry, name: currentNode.name }, type, 'object'),\n },\n };\n }\n}\nexports.LiquidObjectHoverProvider = LiquidObjectHoverProvider;\n//# sourceMappingURL=LiquidObjectHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidTagHoverProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst docset_1 = require(\"../../docset\");\nclass LiquidTagHoverProvider {\n constructor(themeDocset) {\n this.themeDocset = themeDocset;\n }\n async hover(currentNode) {\n if (currentNode.type !== liquid_html_parser_1.NodeTypes.LiquidTag &&\n currentNode.type !== liquid_html_parser_1.NodeTypes.LiquidRawTag &&\n currentNode.type !== liquid_html_parser_1.NodeTypes.LiquidBranch) {\n return null;\n }\n const name = currentNode.name;\n const entries = await this.themeDocset.tags();\n const entry = entries.find((entry) => entry.name === name);\n if (!entry) {\n return null;\n }\n return {\n contents: {\n kind: 'markdown',\n value: (0, docset_1.render)(entry, undefined, 'tag'),\n },\n };\n }\n}\nexports.LiquidTagHoverProvider = LiquidTagHoverProvider;\n//# sourceMappingURL=LiquidTagHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RenderSnippetHoverProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst liquidDoc_1 = require(\"../../utils/liquidDoc\");\nclass RenderSnippetHoverProvider {\n constructor(getDocDefinitionForURI) {\n this.getDocDefinitionForURI = getDocDefinitionForURI;\n }\n async hover(currentNode, ancestors, params) {\n const parentNode = ancestors.at(-1);\n if (currentNode.type !== liquid_html_parser_1.NodeTypes.String ||\n !parentNode ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.RenderMarkup) {\n return null;\n }\n const snippetName = currentNode.value;\n const docDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, 'snippets', snippetName);\n return {\n contents: {\n kind: 'markdown',\n value: (0, liquidDoc_1.formatLiquidDocContentMarkdown)(snippetName, docDefinition),\n },\n };\n }\n}\nexports.RenderSnippetHoverProvider = RenderSnippetHoverProvider;\n//# sourceMappingURL=RenderSnippetHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RenderSnippetParameterHoverProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst liquidDoc_1 = require(\"../../utils/liquidDoc\");\nclass RenderSnippetParameterHoverProvider {\n constructor(getDocDefinitionForURI) {\n this.getDocDefinitionForURI = getDocDefinitionForURI;\n }\n async hover(currentNode, ancestors, params) {\n var _a, _b;\n const parentNode = ancestors.at(-1);\n if (currentNode.type !== liquid_html_parser_1.NodeTypes.NamedArgument ||\n !parentNode ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.RenderMarkup ||\n parentNode.snippet.type !== liquid_html_parser_1.NodeTypes.String) {\n return null;\n }\n const docDefinition = await this.getDocDefinitionForURI(params.textDocument.uri, 'snippets', parentNode.snippet.value);\n const paramName = currentNode.name;\n const hoveredParameter = (_b = (_a = docDefinition === null || docDefinition === void 0 ? void 0 : docDefinition.liquidDoc) === null || _a === void 0 ? void 0 : _a.parameters) === null || _b === void 0 ? void 0 : _b.find((parameter) => parameter.name === paramName);\n if (!hoveredParameter) {\n return null;\n }\n return {\n contents: {\n kind: 'markdown',\n value: (0, liquidDoc_1.formatLiquidDocParameter)(hoveredParameter, true),\n },\n };\n }\n}\nexports.RenderSnippetParameterHoverProvider = RenderSnippetParameterHoverProvider;\n//# sourceMappingURL=RenderSnippetParameterHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TranslationHoverProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst translations_1 = require(\"../../translations\");\nclass TranslationHoverProvider {\n constructor(getTranslationsForUri, documentManager) {\n this.getTranslationsForUri = getTranslationsForUri;\n this.documentManager = documentManager;\n }\n async hover(currentNode, ancestors, params) {\n var _a;\n const parentNode = ancestors.at(-1);\n if (currentNode.type !== liquid_html_parser_1.NodeTypes.String ||\n !parentNode ||\n parentNode.type !== liquid_html_parser_1.NodeTypes.LiquidVariable) {\n return null;\n }\n if (!parentNode.filters[0] || !['t', 'translate'].includes(parentNode.filters[0].name)) {\n return null;\n }\n const translations = await this.getTranslationsForUri(params.textDocument.uri);\n const translation = (0, translations_1.translationValue)(currentNode.value, translations);\n const document = (_a = this.documentManager.get(params.textDocument.uri)) === null || _a === void 0 ? void 0 : _a.textDocument;\n if (!translation || !document) {\n return null;\n }\n return {\n contents: {\n kind: 'markdown',\n value: (0, translations_1.renderTranslation)(translation),\n },\n range: {\n start: document.positionAt(currentNode.position.start),\n end: document.positionAt(currentNode.position.end),\n },\n };\n }\n}\nexports.TranslationHoverProvider = TranslationHoverProvider;\n//# sourceMappingURL=TranslationHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RenderSnippetParameterHoverProvider = exports.RenderSnippetHoverProvider = exports.TranslationHoverProvider = exports.HtmlAttributeValueHoverProvider = exports.HtmlAttributeHoverProvider = exports.HtmlTagHoverProvider = exports.LiquidObjectAttributeHoverProvider = exports.LiquidObjectHoverProvider = exports.LiquidFilterArgumentHoverProvider = exports.LiquidFilterHoverProvider = exports.LiquidTagHoverProvider = void 0;\nvar LiquidTagHoverProvider_1 = require(\"./LiquidTagHoverProvider\");\nObject.defineProperty(exports, \"LiquidTagHoverProvider\", { enumerable: true, get: function () { return LiquidTagHoverProvider_1.LiquidTagHoverProvider; } });\nvar LiquidFilterHoverProvider_1 = require(\"./LiquidFilterHoverProvider\");\nObject.defineProperty(exports, \"LiquidFilterHoverProvider\", { enumerable: true, get: function () { return LiquidFilterHoverProvider_1.LiquidFilterHoverProvider; } });\nvar LiquidFilterArgumentHoverProvider_1 = require(\"./LiquidFilterArgumentHoverProvider\");\nObject.defineProperty(exports, \"LiquidFilterArgumentHoverProvider\", { enumerable: true, get: function () { return LiquidFilterArgumentHoverProvider_1.LiquidFilterArgumentHoverProvider; } });\nvar LiquidObjectHoverProvider_1 = require(\"./LiquidObjectHoverProvider\");\nObject.defineProperty(exports, \"LiquidObjectHoverProvider\", { enumerable: true, get: function () { return LiquidObjectHoverProvider_1.LiquidObjectHoverProvider; } });\nvar LiquidObjectAttributeHoverProvider_1 = require(\"./LiquidObjectAttributeHoverProvider\");\nObject.defineProperty(exports, \"LiquidObjectAttributeHoverProvider\", { enumerable: true, get: function () { return LiquidObjectAttributeHoverProvider_1.LiquidObjectAttributeHoverProvider; } });\nvar HtmlTagHoverProvider_1 = require(\"./HtmlTagHoverProvider\");\nObject.defineProperty(exports, \"HtmlTagHoverProvider\", { enumerable: true, get: function () { return HtmlTagHoverProvider_1.HtmlTagHoverProvider; } });\nvar HtmlAttributeHoverProvider_1 = require(\"./HtmlAttributeHoverProvider\");\nObject.defineProperty(exports, \"HtmlAttributeHoverProvider\", { enumerable: true, get: function () { return HtmlAttributeHoverProvider_1.HtmlAttributeHoverProvider; } });\nvar HtmlAttributeValueHoverProvider_1 = require(\"./HtmlAttributeValueHoverProvider\");\nObject.defineProperty(exports, \"HtmlAttributeValueHoverProvider\", { enumerable: true, get: function () { return HtmlAttributeValueHoverProvider_1.HtmlAttributeValueHoverProvider; } });\nvar TranslationHoverProvider_1 = require(\"./TranslationHoverProvider\");\nObject.defineProperty(exports, \"TranslationHoverProvider\", { enumerable: true, get: function () { return TranslationHoverProvider_1.TranslationHoverProvider; } });\nvar RenderSnippetHoverProvider_1 = require(\"./RenderSnippetHoverProvider\");\nObject.defineProperty(exports, \"RenderSnippetHoverProvider\", { enumerable: true, get: function () { return RenderSnippetHoverProvider_1.RenderSnippetHoverProvider; } });\nvar RenderSnippetParameterHoverProvider_1 = require(\"./RenderSnippetParameterHoverProvider\");\nObject.defineProperty(exports, \"RenderSnippetParameterHoverProvider\", { enumerable: true, get: function () { return RenderSnippetParameterHoverProvider_1.RenderSnippetParameterHoverProvider; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SourceCodeType = exports.FileType = exports.allChecks = exports.recommendedChecks = exports.startServer = exports.parseJSON = exports.memo = exports.debounce = exports.visit = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nObject.defineProperty(exports, \"allChecks\", { enumerable: true, get: function () { return theme_check_common_1.allChecks; } });\nObject.defineProperty(exports, \"recommendedChecks\", { enumerable: true, get: function () { return theme_check_common_1.recommended; } });\nObject.defineProperty(exports, \"FileType\", { enumerable: true, get: function () { return theme_check_common_1.FileType; } });\nObject.defineProperty(exports, \"SourceCodeType\", { enumerable: true, get: function () { return theme_check_common_1.SourceCodeType; } });\n__exportStar(require(\"./types\"), exports);\nvar theme_check_common_2 = require(\"@shopify/theme-check-common\");\nObject.defineProperty(exports, \"visit\", { enumerable: true, get: function () { return theme_check_common_2.visit; } });\nvar utils_1 = require(\"./utils\");\nObject.defineProperty(exports, \"debounce\", { enumerable: true, get: function () { return utils_1.debounce; } });\nObject.defineProperty(exports, \"memo\", { enumerable: true, get: function () { return utils_1.memo; } });\nObject.defineProperty(exports, \"parseJSON\", { enumerable: true, get: function () { return utils_1.parseJSON; } });\nvar server_1 = require(\"./server\");\nObject.defineProperty(exports, \"startServer\", { enumerable: true, get: function () { return server_1.startServer; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JSONContributions = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst BlockTypeCompletionProvider_1 = require(\"./completions/providers/BlockTypeCompletionProvider\");\nconst ReferencedBlockTypeCompletionProvider_1 = require(\"./completions/providers/ReferencedBlockTypeCompletionProvider\");\nconst SchemaTranslationCompletionProvider_1 = require(\"./completions/providers/SchemaTranslationCompletionProvider\");\nconst SchemaTranslationHoverProvider_1 = require(\"./hover/providers/SchemaTranslationHoverProvider\");\nconst TranslationPathHoverProvider_1 = require(\"./hover/providers/TranslationPathHoverProvider\");\nconst utils_1 = require(\"./utils\");\nconst SettingsPropertyCompletionProvider_1 = require(\"./completions/providers/SettingsPropertyCompletionProvider\");\nconst SettingsHoverProvider_1 = require(\"./hover/providers/SettingsHoverProvider\");\nconst BlockSettingsPropertyCompletionProvider_1 = require(\"./completions/providers/BlockSettingsPropertyCompletionProvider\");\nconst BlockSettingsHoverProvider_1 = require(\"./hover/providers/BlockSettingsHoverProvider\");\n/** The getInfoContribution API will only fallback if we return undefined synchronously */\nconst SKIP_CONTRIBUTION = undefined;\n/**\n * I'm not a fan of how json-languageservice does its feature contributions. It's too different\n * from everything else we do in here.\n *\n * Instead, we'll have this little adapter that makes the completions and hover providers feel\n * a bit more familiar.\n */\nclass JSONContributions {\n constructor(documentManager, getDefaultSchemaTranslations, getThemeBlockNames, getThemeBlockSchema) {\n this.documentManager = documentManager;\n this.hoverProviders = [\n new TranslationPathHoverProvider_1.TranslationPathHoverProvider(),\n new SchemaTranslationHoverProvider_1.SchemaTranslationHoverProvider(getDefaultSchemaTranslations),\n new SettingsHoverProvider_1.SettingsHoverProvider(getDefaultSchemaTranslations),\n new BlockSettingsHoverProvider_1.BlockSettingsHoverProvider(getDefaultSchemaTranslations, getThemeBlockSchema),\n ];\n this.completionProviders = [\n new SchemaTranslationCompletionProvider_1.SchemaTranslationsCompletionProvider(getDefaultSchemaTranslations),\n new BlockTypeCompletionProvider_1.BlockTypeCompletionProvider(getThemeBlockNames),\n new ReferencedBlockTypeCompletionProvider_1.ReferencedBlockTypeCompletionProvider(getThemeBlockNames, getThemeBlockSchema),\n new BlockSettingsPropertyCompletionProvider_1.BlockSettingsPropertyCompletionProvider(getDefaultSchemaTranslations, getThemeBlockSchema),\n new SettingsPropertyCompletionProvider_1.SettingsPropertyCompletionProvider(getDefaultSchemaTranslations),\n ];\n }\n getInfoContribution(uri, location) {\n const doc = this.documentManager.get(uri);\n if (!doc)\n return SKIP_CONTRIBUTION;\n const context = this.getContext(doc);\n const provider = this.hoverProviders.find((p) => p.canHover(context, location));\n if (!provider)\n return SKIP_CONTRIBUTION;\n return provider.hover(context, location);\n }\n async collectPropertyCompletions(uri, location, \n // Don't know what those three are for.\n _currentWord, _addValue, _isLast, result) {\n const doc = this.documentManager.get(uri);\n if (!doc || doc.ast instanceof Error)\n return;\n const items = await Promise.all(this.completionProviders\n .filter((provider) => provider.completeProperty)\n .map((provider) => provider.completeProperty(this.getContext(doc), location)));\n for (const item of items.flat()) {\n result.add(item);\n }\n }\n async collectValueCompletions(uri, location, propertyKey, result) {\n const doc = this.documentManager.get(uri);\n if (!doc || doc.ast instanceof Error)\n return;\n const items = await Promise.all(this.completionProviders\n .filter((provider) => provider.completeValue)\n .map((provider) => provider.completeValue(this.getContext(doc), location.concat(propertyKey))));\n for (const item of items.flat()) {\n result.add(item);\n }\n }\n /** I'm not sure we want to do anything with that... but TS requires us to have it */\n async collectDefaultCompletions(_uri, _result) { }\n getContext(doc) {\n const context = {\n doc,\n };\n if (doc.type === theme_check_common_1.SourceCodeType.LiquidHtml && !(doc.ast instanceof Error)) {\n const schema = (0, utils_1.findSchemaNode)(doc.ast);\n if (!schema)\n return SKIP_CONTRIBUTION;\n const jsonString = schema === null || schema === void 0 ? void 0 : schema.source.slice(schema.blockStartPosition.end, schema.blockEndPosition.start);\n context.schema = schema;\n context.parsed = (0, theme_check_common_1.parseJSON)(jsonString);\n }\n return context;\n }\n}\nexports.JSONContributions = JSONContributions;\n//# sourceMappingURL=JSONContributions.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JSONLanguageService = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_json_languageservice_1 = require(\"vscode-json-languageservice\");\nconst vscode_languageserver_textdocument_1 = require(\"vscode-languageserver-textdocument\");\nconst JSONContributions_1 = require(\"./JSONContributions\");\nconst DocumentLinksProvider_1 = require(\"./documentLinks/DocumentLinksProvider\");\nconst vscode_uri_1 = require(\"vscode-uri\");\nclass JSONLanguageService {\n constructor(documentManager, jsonValidationSet, getDefaultSchemaTranslations, getModeForURI, getThemeBlockNames, getThemeBlockSchema, findThemeRootURI) {\n this.documentManager = documentManager;\n this.jsonValidationSet = jsonValidationSet;\n this.getDefaultSchemaTranslations = getDefaultSchemaTranslations;\n this.getModeForURI = getModeForURI;\n this.getThemeBlockNames = getThemeBlockNames;\n this.getThemeBlockSchema = getThemeBlockSchema;\n this.findThemeRootURI = findThemeRootURI;\n this.initialize = () => { };\n this.isValidSchema = async (uri, jsonString) => {\n await this.initialized;\n const mode = await this.getModeForURI(uri);\n const service = this.services[mode];\n if (!service)\n return false;\n return (0, theme_check_common_1.isValid)(service, uri, jsonString);\n };\n this.services = Object.fromEntries(theme_check_common_1.Modes.map((mode) => [mode, null]));\n this.schemas = {};\n this.initialized = new Promise((resolve) => {\n this.initialize = resolve;\n });\n }\n async setup(clientCapabilities) {\n const promises = theme_check_common_1.Modes.map(async (mode) => {\n const schemas = await this.jsonValidationSet.schemas(mode);\n for (const schema of schemas) {\n this.schemas[schema.uri] = schema;\n }\n if (!schemas.length)\n return;\n const service = (0, vscode_json_languageservice_1.getLanguageService)({\n clientCapabilities,\n // Map URIs to schemas without making network requests. Removes the\n // network dependency.\n schemaRequestService: this.getSchemaForURI.bind(this),\n // This is how we make sure that our \"$ref\": \"./inputSettings.json\" in\n // our JSON schemas resolve correctly.\n workspaceContext: {\n resolveRelativePath: (relativePath, resource) => {\n const url = new URL(relativePath, resource);\n return url.toString();\n },\n },\n contributions: [\n new JSONContributions_1.JSONContributions(this.documentManager, this.getDefaultSchemaTranslations, this.getThemeBlockNames, this.getThemeBlockSchema),\n ],\n });\n service.configure({\n // This is what we use to map file names to JSON schemas. Without\n // this, we'd need folks to use the `$schema` field in their JSON\n // blobs. That ain't fun nor is going to happen.\n schemas: schemas.map((schemaDefinition) => ({\n uri: schemaDefinition.uri,\n fileMatch: schemaDefinition.fileMatch,\n })),\n });\n this.services[mode] = service;\n });\n await Promise.all(promises);\n this.initialize();\n }\n async completions(params) {\n await this.initialized;\n const mode = await this.getModeForURI(params.textDocument.uri);\n const service = this.services[mode];\n if (!service)\n return null;\n const documents = this.getDocuments(params, service);\n if (!documents)\n return null;\n const [jsonTextDocument, jsonDocument] = documents;\n return service.doComplete(jsonTextDocument, params.position, jsonDocument);\n }\n async hover(params) {\n await this.initialized;\n const mode = await this.getModeForURI(params.textDocument.uri);\n const service = this.services[mode];\n if (!service)\n return null;\n const documents = this.getDocuments(params, service);\n if (!documents)\n return null;\n const [jsonTextDocument, jsonDocument] = documents;\n return service.doHover(jsonTextDocument, params.position, jsonDocument);\n }\n async documentLinks(params) {\n await this.initialized;\n const rootUri = await this.findThemeRootURI(params.textDocument.uri);\n if (!rootUri)\n return [];\n const document = this.documentManager.get(params.textDocument.uri);\n if (!document)\n return [];\n switch (document.type) {\n case theme_check_common_1.SourceCodeType.JSON: {\n if (document.ast instanceof Error)\n return [];\n const visitor = (0, DocumentLinksProvider_1.createJSONDocumentLinksVisitor)(document.textDocument, vscode_uri_1.URI.parse(rootUri));\n return (0, theme_check_common_1.visit)(document.ast, visitor);\n }\n case theme_check_common_1.SourceCodeType.LiquidHtml: {\n if (document.ast instanceof Error)\n return [];\n const textDocument = document.textDocument;\n const links = [];\n const schema = await document.getSchema();\n if (schema && !(schema.ast instanceof Error)) {\n const visitor = (0, DocumentLinksProvider_1.createJSONDocumentLinksVisitor)(textDocument, vscode_uri_1.URI.parse(rootUri), schema.offset);\n const schemaLinks = (0, theme_check_common_1.visit)(schema.ast, visitor);\n links.push(...schemaLinks);\n }\n return links;\n }\n default:\n return [];\n }\n }\n getDocuments(params, service) {\n const document = this.documentManager.get(params.textDocument.uri);\n if (!document)\n return null;\n switch (document.type) {\n case theme_check_common_1.SourceCodeType.JSON: {\n const jsonTextDocument = document.textDocument;\n const jsonDocument = service.parseJSONDocument(jsonTextDocument);\n return [jsonTextDocument, jsonDocument];\n }\n case theme_check_common_1.SourceCodeType.LiquidHtml: {\n if (document.ast instanceof Error)\n return null;\n const textDocument = document.textDocument;\n const offset = textDocument.offsetAt(params.position);\n const [_, ancestors] = (0, theme_check_common_1.findCurrentNode)(document.ast, offset);\n const schema = ancestors.find((node) => node.type === liquid_html_parser_1.NodeTypes.LiquidRawTag && node.name === 'schema');\n if (!schema)\n return null;\n const schemaLineNumber = textDocument.positionAt(schema.blockStartPosition.end).line;\n // Hacking away \"same line numbers\" here by prefixing the file with newlines\n // This way params.position will be at the same line number in this fake jsonTextDocument\n // Which means that the completions will be at the same line number in the Liquid document\n const jsonString = Array(schemaLineNumber).fill('\\n').join('') +\n schema.source.slice(schema.blockStartPosition.end, schema.blockEndPosition.start);\n const jsonTextDocument = vscode_languageserver_textdocument_1.TextDocument.create(textDocument.uri, 'json', textDocument.version, jsonString);\n const jsonDocument = service.parseJSONDocument(jsonTextDocument);\n return [jsonTextDocument, jsonDocument];\n }\n }\n }\n async getSchemaForURI(uri) {\n var _a;\n const schema = (_a = this.schemas[uri]) === null || _a === void 0 ? void 0 : _a.schema;\n if (!schema)\n return `Could not get schema for '${uri}'`;\n return schema;\n }\n}\nexports.JSONLanguageService = JSONLanguageService;\n//# sourceMappingURL=JSONLanguageService.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isLiquidRequestContext = isLiquidRequestContext;\nexports.isJSONRequestContext = isJSONRequestContext;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nfunction isLiquidRequestContext(context) {\n const { doc, schema, parsed } = context;\n return (doc.type === theme_check_common_1.SourceCodeType.LiquidHtml && !!schema && !(0, theme_check_common_1.isError)(doc.ast) && !(0, theme_check_common_1.isError)(parsed));\n}\nfunction isJSONRequestContext(context) {\n const { doc } = context;\n return doc.type === theme_check_common_1.SourceCodeType.JSON && !(0, theme_check_common_1.isError)(doc.ast);\n}\n//# sourceMappingURL=RequestContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BlockSettingsPropertyCompletionProvider = void 0;\nconst utils_1 = require(\"../../utils\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst BlockTypeCompletionProvider_1 = require(\"./BlockTypeCompletionProvider\");\nconst schemaSettings_1 = require(\"../../schemaSettings\");\n/**\n * The BlockSettingsPropertyCompletionProvider offers value completions of the\n * `presets.[].(recursive blocks.[]).settings` keys and `defaults.blocks.[].settings` keys inside\n * `{% schema %}` tags.\n *\n * @example\n * {% schema %}\n * {\n * \"presets\": [\n * {\n * \"blocks\": [\n * {\n * \"type\": \"block-type\",\n * \"settings\": {\n * \"█\"\n * }\n * },\n * ]\n * },\n * ],\n * \"default\": {\n * \"blocks\": [\n * {\n * \"type\": \"block-type\",\n * \"settings\": {\n * \"█\"\n * }\n * },\n * ]\n * }\n * }\n * {% endschema %}\n */\nclass BlockSettingsPropertyCompletionProvider {\n constructor(getDefaultSchemaTranslations, getThemeBlockSchema) {\n this.getDefaultSchemaTranslations = getDefaultSchemaTranslations;\n this.getThemeBlockSchema = getThemeBlockSchema;\n }\n async completeProperty(context, path) {\n var _a, _b;\n const { doc } = context;\n if (doc.type !== theme_check_common_1.SourceCodeType.LiquidHtml)\n return [];\n // section files can have schemas with `presets` and `default`\n // block files can have schemas with `presets` only\n if (!((0, utils_1.isSectionFile)(doc.uri) &&\n (isPresetsBlocksSettingsPath(path) || isDefaultBlocksSettingsPath(path))) &&\n !((0, utils_1.isBlockFile)(doc.uri) && isPresetsBlocksSettingsPath(path))) {\n return [];\n }\n const schema = await doc.getSchema();\n if (!schema || !(0, BlockTypeCompletionProvider_1.isSectionOrBlockSchema)(schema) || (0, theme_check_common_1.isError)(schema.parsed)) {\n return [];\n }\n const blockType = (0, theme_check_common_1.deepGet)(schema.parsed, [...path.slice(0, -1), 'type']);\n if (!blockType) {\n return [];\n }\n const translations = await this.getDefaultSchemaTranslations(doc.textDocument.uri);\n const localBlock = (0, schemaSettings_1.getSectionBlockByName)(schema.parsed, blockType);\n if (localBlock) {\n if (localBlock.settings) {\n return (0, schemaSettings_1.schemaSettingsPropertyCompletionItems)(localBlock.settings, translations);\n }\n }\n else {\n const blockOriginSchema = await this.getThemeBlockSchema(doc.uri, blockType);\n if (!blockOriginSchema ||\n (0, theme_check_common_1.isError)(blockOriginSchema.parsed) ||\n !(0, BlockTypeCompletionProvider_1.isSectionOrBlockSchema)(blockOriginSchema)) {\n return [];\n }\n if (!((_a = blockOriginSchema.parsed) === null || _a === void 0 ? void 0 : _a.settings) ||\n !Array.isArray((_b = blockOriginSchema.parsed) === null || _b === void 0 ? void 0 : _b.settings)) {\n return [];\n }\n return (0, schemaSettings_1.schemaSettingsPropertyCompletionItems)(blockOriginSchema.parsed.settings, translations);\n }\n return [];\n }\n}\nexports.BlockSettingsPropertyCompletionProvider = BlockSettingsPropertyCompletionProvider;\n// `blocks` can be nested within other `blocks`\n// We need to ensure the last leg of the path is { \"blocks\": [{ \"settings\": { \"█\" } }] }\nfunction isPresetsBlocksSettingsPath(path) {\n return path.at(0) === 'presets' && path.at(-3) === 'blocks' && path.at(-1) === 'settings';\n}\n// `blocks` inside `default` can't be nested within other `blocks`\nfunction isDefaultBlocksSettingsPath(path) {\n return path.at(0) === 'default' && path.at(1) === 'blocks' && path.at(3) === 'settings';\n}\n//# sourceMappingURL=BlockSettingsPropertyCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BlockTypeCompletionProvider = void 0;\nexports.createBlockNameCompletionItems = createBlockNameCompletionItems;\nexports.isBlockDefinitionPath = isBlockDefinitionPath;\nexports.isPresetBlockPath = isPresetBlockPath;\nexports.isBlockTypePath = isBlockTypePath;\nexports.hasLocalBlockDefinitions = hasLocalBlockDefinitions;\nexports.isLocalBlockDefinition = isLocalBlockDefinition;\nexports.isSectionOrBlockSchema = isSectionOrBlockSchema;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst RequestContext_1 = require(\"../../RequestContext\");\nconst utils_1 = require(\"../../utils\");\n/**\n * The BlockTypeCompletionProvider offers value completions of the\n * `blocks.[].type` property inside section and theme block `{% schema %}` tags.\n *\n * @example\n * {% schema %}\n * {\n * \"blocks\": [\n * { \"type\": \"█\" },\n * ]\n * }\n * {% endschema %}\n */\nclass BlockTypeCompletionProvider {\n constructor(getThemeBlockNames) {\n this.getThemeBlockNames = getThemeBlockNames;\n }\n async completeValue(context, path) {\n if (!(0, utils_1.isSectionOrBlockFile)(context.doc.uri) ||\n !(0, RequestContext_1.isLiquidRequestContext)(context) ||\n !isBlockDefinitionPath(path)) {\n return [];\n }\n const { doc } = context;\n const schema = await doc.getSchema();\n // Can't complete if we can't parse the schema\n if (!schema || (0, theme_check_common_1.isError)(schema.parsed) || !isSectionOrBlockSchema(schema)) {\n return [];\n }\n // Local blocks have their type defined in the schema, there's nothing to complete\n if (hasLocalBlockDefinitions(schema))\n return [];\n const blockNames = await this.getThemeBlockNames(doc.uri, true);\n return createBlockNameCompletionItems(blockNames);\n }\n}\nexports.BlockTypeCompletionProvider = BlockTypeCompletionProvider;\nfunction createBlockNameCompletionItems(blockNames) {\n return blockNames.map((name) => ({\n kind: vscode_languageserver_protocol_1.CompletionItemKind.Value,\n label: `\"${name}\"`,\n insertText: `\"${name}\"`,\n }));\n}\nfunction isBlockDefinitionPath(path) {\n return path.at(0) === 'blocks';\n}\nfunction isPresetBlockPath(path) {\n return path.at(0) === 'presets';\n}\nfunction isBlockTypePath(path) {\n // We have these cases to support:\n // - top level blocks.[].type\n // - presets.[](recursive .blocks.[].type)\n // - presets.[](recursive .blocks.{}.type)\n const topLevel = path.at(0);\n if (topLevel !== 'blocks' && topLevel !== 'presets')\n return false;\n if (path.length < 4)\n return false; // minimum path length\n const [shouldBeBlocks, _idOrIndex, shouldBeType] = path.slice(-3);\n return shouldBeBlocks === 'blocks' && shouldBeType === 'type';\n}\nfunction hasLocalBlockDefinitions(schema) {\n if (schema.type !== theme_check_common_1.ThemeSchemaType.Section || (0, theme_check_common_1.isError)(schema.parsed))\n return false;\n const blocks = (0, theme_check_common_1.deepGet)(schema.parsed, ['blocks']);\n if (!blocks || !Array.isArray(blocks))\n return false;\n return blocks.some((block) => block && block.name !== undefined);\n}\nfunction isLocalBlockDefinition(schema, blockTypePath) {\n if (schema.type !== theme_check_common_1.ThemeSchemaType.Section)\n return false;\n const blockNamePath = [...blockTypePath.slice(0, -1), 'name'];\n const name = (0, theme_check_common_1.deepGet)(schema.parsed, blockNamePath);\n return name !== undefined;\n}\nconst SectionOrBlockSchemaTypes = [theme_check_common_1.ThemeSchemaType.Section, theme_check_common_1.ThemeSchemaType.Block];\nfunction isSectionOrBlockSchema(schema) {\n return SectionOrBlockSchemaTypes.includes(schema.type);\n}\n//# sourceMappingURL=BlockTypeCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReferencedBlockTypeCompletionProvider = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst RequestContext_1 = require(\"../../RequestContext\");\nconst utils_1 = require(\"../../utils\");\nconst BlockTypeCompletionProvider_1 = require(\"./BlockTypeCompletionProvider\");\n/**\n * The ReferencedBlockTypeCompletionProvider offers value completions of the\n * `presets.[](recursive .blocks.[]).type` value and `default.blocks.[].type` value inside\n * section and theme block `{% schema %}` tags.\n *\n * @example\n * {% schema %}\n * {\n * \"presets\": [\n * {\n * \"blocks\": [\n * { \"type\": \"█\" },\n * ]\n * },\n * ],\n * \"default\": {\n * \"blocks\": [\n * { \"type\": \"█\" },\n * ]\n * }\n * }\n * {% endschema %}\n */\nclass ReferencedBlockTypeCompletionProvider {\n constructor(getThemeBlockNames, getThemeBlockSchema) {\n this.getThemeBlockNames = getThemeBlockNames;\n this.getThemeBlockSchema = getThemeBlockSchema;\n }\n async completeValue(context, path) {\n if (!(0, utils_1.isSectionOrBlockFile)(context.doc.uri) ||\n !(0, RequestContext_1.isLiquidRequestContext)(context) ||\n !isBlockTypePath(path)) {\n return [];\n }\n const { doc } = context;\n const schema = await doc.getSchema();\n if (!schema || (0, theme_check_common_1.isError)(schema.parsed) || !(0, BlockTypeCompletionProvider_1.isSectionOrBlockSchema)(schema)) {\n return [];\n }\n let parsedBlockSchema = schema.parsed;\n if (isNestedBlockPath(path)) {\n const parentBlockName = getParentBlockName(schema.parsed, path);\n if (!parentBlockName) {\n return [];\n }\n const parentBlockSchema = await this.getThemeBlockSchema(doc.uri, parentBlockName);\n if (!parentBlockSchema ||\n (0, theme_check_common_1.isError)(parentBlockSchema.parsed) ||\n !(0, BlockTypeCompletionProvider_1.isSectionOrBlockSchema)(parentBlockSchema)) {\n return [];\n }\n parsedBlockSchema = parentBlockSchema.parsed;\n }\n const blocks = parsedBlockSchema.blocks || [];\n const blockGroups = {\n themeBlocks: false,\n specificBlockNames: [],\n };\n blocks.forEach((block) => {\n if (block.type === '@theme') {\n blockGroups.themeBlocks = true;\n }\n else if (!block.type.startsWith('@')) {\n blockGroups.specificBlockNames.push(block.type);\n }\n });\n let blockNames = blockGroups.specificBlockNames;\n if (blockGroups.themeBlocks) {\n blockNames.push(...(await this.getThemeBlockNames(doc.uri, false)));\n }\n return (0, BlockTypeCompletionProvider_1.createBlockNameCompletionItems)(blockNames);\n }\n}\nexports.ReferencedBlockTypeCompletionProvider = ReferencedBlockTypeCompletionProvider;\n// `blocks` can be nested within other `blocks`\n// We need to ensure the last leg of the path is { \"blocks\": [{ \"type\": \"█\" }] }\nfunction isBlockTypePath(path) {\n return ((path.at(0) === 'presets' || path.at(0) === 'default') &&\n path.at(-3) === 'blocks' &&\n path.at(-1) === 'type');\n}\nfunction isNestedBlockPath(path) {\n return path.at(-5) === 'blocks' && path.at(-3) === 'blocks' && path.at(-1) === 'type';\n}\nfunction getParentBlockName(parsedSchema, path) {\n return (0, theme_check_common_1.deepGet)(parsedSchema, [...path.slice(0, -3), 'type']);\n}\n//# sourceMappingURL=ReferencedBlockTypeCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SchemaTranslationsCompletionProvider = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_json_languageservice_1 = require(\"vscode-json-languageservice\");\nconst translations_1 = require(\"../../../translations\");\nconst RequestContext_1 = require(\"../../RequestContext\");\nconst utils_1 = require(\"../../utils\");\nclass SchemaTranslationsCompletionProvider {\n constructor(getDefaultSchemaTranslations) {\n this.getDefaultSchemaTranslations = getDefaultSchemaTranslations;\n }\n async completeValue(context, path) {\n var _a;\n if (!(0, utils_1.isSectionOrBlockFile)(context.doc.uri) || !(0, RequestContext_1.isLiquidRequestContext)(context)) {\n return [];\n }\n const { doc, parsed } = context;\n const label = (0, theme_check_common_1.deepGet)(parsed, path);\n if (!label || typeof label !== 'string' || !label.startsWith('t:')) {\n return [];\n }\n const partial = (_a = /^t:(.*)/.exec(label)) === null || _a === void 0 ? void 0 : _a[1];\n if (partial === undefined)\n return [];\n const translations = await this.getDefaultSchemaTranslations(doc.uri);\n // We'll let the frontend do the filtering. But we'll only include shopify\n // translations if the shopify prefix is present\n const options = (0, translations_1.translationOptions)(translations);\n return options.map((option) => {\n const tLabel = `t:${option.path.join('.')}`;\n return {\n label: tLabel,\n kind: vscode_json_languageservice_1.CompletionItemKind.Value,\n filterText: `\"${tLabel}\"`,\n insertText: `\"${tLabel}\"`,\n insertTextFormat: 1,\n documentation: {\n kind: 'markdown',\n value: (0, translations_1.renderTranslation)(option.translation),\n },\n };\n });\n }\n}\nexports.SchemaTranslationsCompletionProvider = SchemaTranslationsCompletionProvider;\n//# sourceMappingURL=SchemaTranslationCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SettingsPropertyCompletionProvider = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst utils_1 = require(\"../../utils\");\nconst BlockTypeCompletionProvider_1 = require(\"./BlockTypeCompletionProvider\");\nconst schemaSettings_1 = require(\"../../schemaSettings\");\n/**\n * The SettingsPropertyCompletionProvider offers property completions for:\n * - `presets.[].settings.[]` objects inside `{% schema %}` tag in sections and blocks\n * - `default.settings` object inside `{% schema %}` tag in sections\n *\n * @example\n * {% schema %}\n * {\n * \"presets\": [\n * {\n * \"settings\": [\n * { \"█\" },\n * ]\n * },\n * ],\n * \"default\": {\n * \"settings\": {\n * \"█\"\n * }\n * }\n * }\n * {% endschema %}\n */\nclass SettingsPropertyCompletionProvider {\n constructor(getDefaultSchemaTranslations) {\n this.getDefaultSchemaTranslations = getDefaultSchemaTranslations;\n }\n async completeProperty(context, path) {\n const { doc } = context;\n if (doc.type !== theme_check_common_1.SourceCodeType.LiquidHtml)\n return [];\n // section files can have schemas with `presets` and `default`\n // block files can have schemas with `presets` only\n if (!((0, utils_1.isSectionFile)(doc.uri) && (isPresetSettingsPath(path) || isDefaultSettingsPath(path))) &&\n !((0, utils_1.isBlockFile)(doc.uri) && isPresetSettingsPath(path))) {\n return [];\n }\n const schema = await doc.getSchema();\n if (!schema || !(0, BlockTypeCompletionProvider_1.isSectionOrBlockSchema)(schema) || (0, theme_check_common_1.isError)(schema.parsed)) {\n return [];\n }\n const parsedSchema = schema.parsed;\n if (!(parsedSchema === null || parsedSchema === void 0 ? void 0 : parsedSchema.settings) || !Array.isArray(parsedSchema.settings)) {\n return [];\n }\n const translations = await this.getDefaultSchemaTranslations(doc.textDocument.uri);\n return (0, schemaSettings_1.schemaSettingsPropertyCompletionItems)(parsedSchema.settings, translations);\n }\n}\nexports.SettingsPropertyCompletionProvider = SettingsPropertyCompletionProvider;\nfunction isPresetSettingsPath(path) {\n return path.length === 3 && path.at(0) === 'presets' && path.at(2) === 'settings';\n}\nfunction isDefaultSettingsPath(path) {\n return path.length === 2 && path.at(0) === 'default' && path.at(1) === 'settings';\n}\n//# sourceMappingURL=SettingsPropertyCompletionProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createJSONDocumentLinksVisitor = createJSONDocumentLinksVisitor;\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst vscode_uri_1 = require(\"vscode-uri\");\nfunction createJSONDocumentLinksVisitor(textDocument, root, offset = 0) {\n const visitor = {\n Property(node, ancestors) {\n const origin = jsonPropertyOriginDirectory(ancestors);\n if (!origin)\n return;\n if (!(node.key.value === 'type' &&\n node.value.type === 'Literal' &&\n typeof node.value.value === 'string')) {\n return;\n }\n if (origin === 'blocks' && ['@app', '@theme'].includes(node.value.value)) {\n return;\n }\n return vscode_languageserver_1.DocumentLink.create(range(textDocument, node.value, offset), vscode_uri_1.Utils.resolvePath(root, origin, node.value.value + '.liquid').toString());\n },\n };\n return visitor;\n}\nfunction range(textDocument, node, offset) {\n // +1 and -1 to exclude the quotes\n const start = textDocument.positionAt(offset + node.loc.start.offset + 1);\n const end = textDocument.positionAt(offset + node.loc.end.offset - 1);\n return vscode_languageserver_1.Range.create(start, end);\n}\nfunction jsonPropertyOriginDirectory(ancestors) {\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const ancestor = ancestors[i];\n if (ancestor.type === 'Property') {\n if (ancestor.key.value === 'blocks') {\n return 'blocks';\n }\n if (ancestor.key.value === 'sections') {\n return 'sections';\n }\n }\n }\n return undefined;\n}\n//# sourceMappingURL=DocumentLinksProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BlockSettingsHoverProvider = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst translations_1 = require(\"../../../translations\");\nconst RequestContext_1 = require(\"../../RequestContext\");\nconst utils_1 = require(\"../../utils\");\nconst BlockTypeCompletionProvider_1 = require(\"../../completions/providers/BlockTypeCompletionProvider\");\nconst schemaSettings_1 = require(\"../../schemaSettings\");\nclass BlockSettingsHoverProvider {\n constructor(getDefaultSchemaTranslations, getThemeBlockSchema) {\n this.getDefaultSchemaTranslations = getDefaultSchemaTranslations;\n this.getThemeBlockSchema = getThemeBlockSchema;\n }\n canHover(context, path) {\n return ((0, utils_1.isSectionOrBlockFile)(context.doc.uri) &&\n (0, RequestContext_1.isLiquidRequestContext)(context) &&\n path.length !== 0 &&\n isBlocksSettingsPath(path));\n }\n async hover(context, path) {\n if (!this.canHover(context, path))\n return [];\n const { doc } = context;\n const schema = await doc.getSchema();\n if (!isValidSchema(schema))\n return [];\n const blockType = (0, theme_check_common_1.deepGet)(schema.parsed, [...path.slice(0, -2), 'type']);\n if (!blockType)\n return [];\n const sectionBlock = (0, schemaSettings_1.getSectionBlockByName)(schema.parsed, blockType);\n let label;\n if (sectionBlock) {\n if (!hasValidSettings(sectionBlock.settings))\n return [];\n label = getSettingLabelById(sectionBlock.settings, path.at(-1));\n }\n else {\n const themeBlockSchema = await this.getThemeBlockSchema(doc.uri, blockType);\n if (!isValidSchema(themeBlockSchema))\n return [];\n if (!hasValidSettings(themeBlockSchema.parsed.settings))\n return [];\n label = getSettingLabelById(themeBlockSchema.parsed.settings, path.at(-1));\n }\n if (!label)\n return [];\n if (!label.startsWith('t:')) {\n return [label];\n }\n const translations = await this.getDefaultSchemaTranslations(doc.uri);\n const value = (0, translations_1.translationValue)(label.substring(2), translations);\n if (!value)\n return [];\n return [(0, translations_1.renderTranslation)(value)];\n }\n}\nexports.BlockSettingsHoverProvider = BlockSettingsHoverProvider;\nfunction isBlocksSettingsPath(path) {\n return ((path.at(0) === 'presets' || path.at(0) === 'default') &&\n path.at(-4) === 'blocks' &&\n path.at(-2) === 'settings' &&\n path.at(-1) !== undefined &&\n typeof path.at(-1) === 'string');\n}\nfunction isValidSchema(schema) {\n return !!schema && !(0, theme_check_common_1.isError)(schema.parsed) && (0, BlockTypeCompletionProvider_1.isSectionOrBlockSchema)(schema);\n}\nfunction hasValidSettings(settings) {\n return settings !== undefined && Array.isArray(settings);\n}\nfunction getSettingLabelById(settings, id) {\n var _a;\n return (_a = settings.find((setting) => setting.id === id)) === null || _a === void 0 ? void 0 : _a.label;\n}\n//# sourceMappingURL=BlockSettingsHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SchemaTranslationHoverProvider = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst translations_1 = require(\"../../../translations\");\nconst RequestContext_1 = require(\"../../RequestContext\");\nconst utils_1 = require(\"../../utils\");\nclass SchemaTranslationHoverProvider {\n constructor(getDefaultSchemaTranslations) {\n this.getDefaultSchemaTranslations = getDefaultSchemaTranslations;\n }\n canHover(context, path) {\n const label = (0, theme_check_common_1.deepGet)(context.parsed, path);\n return ((0, utils_1.isSectionOrBlockFile)(context.doc.uri) &&\n (0, RequestContext_1.isLiquidRequestContext)(context) &&\n path.length !== 0 &&\n label &&\n typeof label === 'string' &&\n label.startsWith('t:'));\n }\n async hover(context, path) {\n if (!this.canHover(context, path))\n return [];\n // Can assert is a string because of `canHover` check above\n const label = (0, theme_check_common_1.deepGet)(context.parsed, path);\n return this.getDefaultSchemaTranslations(context.doc.uri).then((translations) => {\n const path = label.slice(2); // remove `t:`\n const value = (0, translations_1.translationValue)(path, translations);\n if (!value)\n return undefined;\n return [(0, translations_1.renderTranslation)(value)];\n });\n }\n}\nexports.SchemaTranslationHoverProvider = SchemaTranslationHoverProvider;\n//# sourceMappingURL=SchemaTranslationHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SettingsHoverProvider = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst translations_1 = require(\"../../../translations\");\nconst RequestContext_1 = require(\"../../RequestContext\");\nconst utils_1 = require(\"../../utils\");\nconst BlockTypeCompletionProvider_1 = require(\"../../completions/providers/BlockTypeCompletionProvider\");\nclass SettingsHoverProvider {\n constructor(getDefaultSchemaTranslations) {\n this.getDefaultSchemaTranslations = getDefaultSchemaTranslations;\n }\n canHover(context, path) {\n return ((0, utils_1.isSectionOrBlockFile)(context.doc.uri) &&\n (0, RequestContext_1.isLiquidRequestContext)(context) &&\n path.length !== 0 &&\n (isPresetsSettingsPath(path) || isDefaultSettingsPath(path)));\n }\n async hover(context, path) {\n if (!this.canHover(context, path))\n return [];\n const { doc } = context;\n const label = await getSettingsLabel(doc, path.at(-1));\n if (!label)\n return [];\n if (!label.startsWith('t:')) {\n return [label];\n }\n return this.getDefaultSchemaTranslations(doc.uri).then((translations) => {\n const path = label.substring(2);\n const value = (0, translations_1.translationValue)(path, translations);\n if (!value)\n return undefined;\n return [(0, translations_1.renderTranslation)(value)];\n });\n }\n}\nexports.SettingsHoverProvider = SettingsHoverProvider;\nfunction isPresetsSettingsPath(path) {\n return (path.at(0) === 'presets' &&\n path.at(2) === 'settings' &&\n path.at(3) !== undefined &&\n typeof path.at(3) === 'string');\n}\nfunction isDefaultSettingsPath(path) {\n return (path.at(0) === 'default' &&\n path.at(1) === 'settings' &&\n path.at(2) !== undefined &&\n typeof path.at(2) === 'string');\n}\nasync function getSettingsLabel(doc, label) {\n var _a;\n const schema = await doc.getSchema();\n if (!schema ||\n !(0, BlockTypeCompletionProvider_1.isSectionOrBlockSchema)(schema) ||\n (0, theme_check_common_1.isError)(schema.parsed) ||\n schema.parsed.settings === undefined ||\n !Array.isArray(schema.parsed.settings)) {\n return;\n }\n return (_a = schema.parsed.settings.find((setting) => (setting === null || setting === void 0 ? void 0 : setting.id) === label)) === null || _a === void 0 ? void 0 : _a.label;\n}\n//# sourceMappingURL=SettingsHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TranslationPathHoverProvider = void 0;\nexports.contextualizedLabel = contextualizedLabel;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst translations_1 = require(\"../../../translations\");\nconst RequestContext_1 = require(\"../../RequestContext\");\nconst utils_1 = require(\"../../utils\");\nclass TranslationPathHoverProvider {\n constructor() {\n this.filePatterns = [/^.*\\/locales\\/[^\\/]*\\.json$/];\n }\n canHover(context, path) {\n return ((0, utils_1.fileMatch)(context.doc.uri, this.filePatterns) &&\n path.length > 0 &&\n (0, RequestContext_1.isJSONRequestContext)(context));\n }\n async hover(context, path) {\n // Redundant use for type assertion\n if (!this.canHover(context, path))\n return [];\n const { doc } = context;\n const ast = doc.ast;\n const node = (0, theme_check_common_1.nodeAtPath)(ast, path);\n switch (true) {\n // Because the JSON language service doesn't support composition of hover info,\n // We have to hardcode the docs for the translation file schema here.\n case ['zero', 'one', 'two', 'few', 'many', 'other'].includes(path.at(-1)): {\n if (!node || node.type !== 'Literal' || typeof node.value !== 'string') {\n return [`Pluralized translations should have a string value`];\n }\n return [contextualizedLabel(doc.uri, path.slice(0, -1), node.value)];\n }\n case path.at(-1).toString().endsWith('_html'): {\n if (!node || node.type !== 'Literal' || typeof node.value !== 'string') {\n return [`Translations ending in '_html' should have a string value`];\n }\n return [\n contextualizedLabel(doc.uri, path, node.value),\n `The '_html' suffix prevents the HTML content from being escaped.`,\n ];\n }\n default: {\n if (!node || node.type !== 'Literal' || typeof node.value !== 'string') {\n return [`Translation group: ${path.join('.')}`];\n }\n return [contextualizedLabel(doc.uri, path, node.value)];\n }\n }\n }\n}\nexports.TranslationPathHoverProvider = TranslationPathHoverProvider;\nfunction contextualizedLabel(uri, str, value) {\n if (uri.includes('.schema')) {\n return marked(`\"t:${str.join('.')}\"`, 'json');\n }\n else {\n const params = (0, translations_1.extractParams)(value);\n return marked(`{{ '${str.join('.')}' | t${(0, translations_1.paramsString)(params)} }}`, 'liquid');\n }\n}\nfunction marked(value, language = 'liquid') {\n return { language, value };\n}\n//# sourceMappingURL=TranslationPathHoverProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.schemaSettingsPropertyCompletionItems = schemaSettingsPropertyCompletionItems;\nexports.getSectionBlockByName = getSectionBlockByName;\nconst vscode_json_languageservice_1 = require(\"vscode-json-languageservice\");\nconst translations_1 = require(\"../translations\");\nfunction schemaSettingsPropertyCompletionItems(parsedSettings, translations) {\n return parsedSettings\n .filter((setting) => setting.id)\n .map((setting) => {\n let docValue = '';\n if (setting.label) {\n if (setting.label.startsWith('t:')) {\n const translation = (0, translations_1.translationValue)(setting.label.substring(2), translations);\n if (translation) {\n docValue = (0, translations_1.renderTranslation)(translation);\n }\n }\n else {\n docValue = setting.label;\n }\n }\n const completionText = setting.id ? `\"${setting.id}\"` : '';\n return {\n kind: vscode_json_languageservice_1.CompletionItemKind.Property,\n label: completionText,\n insertText: completionText,\n documentation: {\n kind: vscode_json_languageservice_1.MarkupKind.Markdown,\n value: docValue,\n },\n };\n });\n}\n/*\n * JSONCompletionProviders have to be more fault tolerant since there can be errors\n * while typing the schema. This is why parsedSchemas (untyped) are used instead of\n * validSchemas (typed).\n */\nfunction getSectionBlockByName(parsedSchema = {}, blockName) {\n var _a, _b;\n return (_b = (_a = parsedSchema.blocks) === null || _a === void 0 ? void 0 : _a.filter((block) => 'name' in block)) === null || _b === void 0 ? void 0 : _b.find((block) => block.type === blockName);\n}\n//# sourceMappingURL=schemaSettings.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fileMatch = fileMatch;\nexports.isSectionFile = isSectionFile;\nexports.isBlockFile = isBlockFile;\nexports.isSectionOrBlockFile = isSectionOrBlockFile;\nexports.findSchemaNode = findSchemaNode;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nfunction fileMatch(uri, patterns) {\n return patterns.some((pattern) => pattern.test(uri));\n}\nfunction isSectionFile(uri) {\n return /\\/sections\\/[^/]*\\.liquid$/.test(uri);\n}\nfunction isBlockFile(uri) {\n return /\\/blocks\\/[^/]*\\.liquid$/.test(uri);\n}\nfunction isSectionOrBlockFile(uri) {\n return isSectionFile(uri) || isBlockFile(uri);\n}\nfunction findSchemaNode(ast) {\n const nodes = (0, theme_check_common_1.visit)(ast, {\n LiquidRawTag(node) {\n if (node.name === 'schema') {\n return node;\n }\n },\n });\n return nodes[0];\n}\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LinkedEditingRangesProvider = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst theme_check_common_2 = require(\"@shopify/theme-check-common\");\nconst providers_1 = require(\"./providers\");\nclass LinkedEditingRangesProvider {\n constructor(documentManager) {\n this.documentManager = documentManager;\n this.providers = [\n new providers_1.HtmlTagNameLinkedRangesProvider(documentManager),\n new providers_1.EmptyHtmlTagLinkedRangesProvider(documentManager),\n ];\n }\n async linkedEditingRanges(params) {\n var _a;\n const document = this.documentManager.get(params.textDocument.uri);\n if (!document || document.type !== theme_check_common_1.SourceCodeType.LiquidHtml) {\n return null;\n }\n let currentNode = null;\n let ancestors = null;\n if (!(document.ast instanceof Error)) {\n [currentNode, ancestors] = (0, theme_check_common_2.findCurrentNode)(document.ast, document.textDocument.offsetAt(params.position));\n }\n const promises = this.providers.map((p) => p.linkedEditingRanges(currentNode, ancestors, params).catch(() => null));\n const results = await Promise.all(promises);\n return (_a = results.find(Boolean)) !== null && _a !== void 0 ? _a : null;\n }\n}\nexports.LinkedEditingRangesProvider = LinkedEditingRangesProvider;\n//# sourceMappingURL=LinkedEditingRangesProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EmptyHtmlTagLinkedRangesProvider = void 0;\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst wordPattern_1 = require(\"../wordPattern\");\nclass EmptyHtmlTagLinkedRangesProvider {\n constructor(documentManager) {\n this.documentManager = documentManager;\n }\n async linkedEditingRanges(node, ancestors, { textDocument: { uri }, position }) {\n // We're strictly checking for <></> and cursor in either branch, that's a parse error\n // ... but it's fine because <></> is rather easy to find.\n if (node !== null || ancestors !== null)\n return null;\n const document = this.documentManager.get(uri);\n const textDocument = document === null || document === void 0 ? void 0 : document.textDocument;\n if (!document || !textDocument)\n return null;\n const openRange = vscode_languageserver_1.Range.create(vscode_languageserver_1.Position.create(position.line, position.character - 1), vscode_languageserver_1.Position.create(position.line, position.character + 1));\n if (!['<>', '< '].includes(textDocument.getText(openRange)))\n return null;\n const closeOffset = document.source.indexOf('</>', textDocument.offsetAt(position));\n if (closeOffset === -1)\n return null;\n const afterSlashOffset = closeOffset + 2;\n const afterSlashPosition = textDocument.positionAt(afterSlashOffset);\n return {\n ranges: [\n vscode_languageserver_1.Range.create(position, position),\n vscode_languageserver_1.Range.create(afterSlashPosition, afterSlashPosition),\n ],\n wordPattern: wordPattern_1.htmlElementNameWordPattern,\n };\n }\n}\nexports.EmptyHtmlTagLinkedRangesProvider = EmptyHtmlTagLinkedRangesProvider;\n//# sourceMappingURL=EmptyHtmlTagLinkedRangesProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HtmlTagNameLinkedRangesProvider = void 0;\nconst htmlTagNames_1 = require(\"../../utils/htmlTagNames\");\nconst wordPattern_1 = require(\"../wordPattern\");\nclass HtmlTagNameLinkedRangesProvider {\n constructor(documentManager) {\n this.documentManager = documentManager;\n }\n async linkedEditingRanges(node, ancestors, params) {\n var _a;\n if (!node || !ancestors)\n return null;\n const textDocument = (_a = this.documentManager.get(params.textDocument.uri)) === null || _a === void 0 ? void 0 : _a.textDocument;\n if (!textDocument)\n return null;\n const ranges = (0, htmlTagNames_1.getHtmlElementNameRanges)(node, ancestors, params, textDocument);\n if (!ranges)\n return null;\n return {\n ranges,\n wordPattern: wordPattern_1.htmlElementNameWordPattern,\n };\n }\n}\nexports.HtmlTagNameLinkedRangesProvider = HtmlTagNameLinkedRangesProvider;\n//# sourceMappingURL=HtmlTagNameLinkedRangesProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HtmlTagNameLinkedRangesProvider = exports.EmptyHtmlTagLinkedRangesProvider = void 0;\nvar EmptyHtmlTagLinkedRangesProvider_1 = require(\"./EmptyHtmlTagLinkedRangesProvider\");\nObject.defineProperty(exports, \"EmptyHtmlTagLinkedRangesProvider\", { enumerable: true, get: function () { return EmptyHtmlTagLinkedRangesProvider_1.EmptyHtmlTagLinkedRangesProvider; } });\nvar HtmlTagNameLinkedRangesProvider_1 = require(\"./HtmlTagNameLinkedRangesProvider\");\nObject.defineProperty(exports, \"HtmlTagNameLinkedRangesProvider\", { enumerable: true, get: function () { return HtmlTagNameLinkedRangesProvider_1.HtmlTagNameLinkedRangesProvider; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.htmlElementNameWordPattern = void 0;\nconst nameCharStart = '[a-zA-Z]';\nconst nameChar = '[a-zA-Z0-9-]';\nexports.htmlElementNameWordPattern = `${nameCharStart}${nameChar}*`;\n//# sourceMappingURL=wordPattern.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Progress = void 0;\nexports.percent = percent;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\n/**\n * A short hand for handling progress reporting to the language client.\n *\n * It handles all the LSP protocol details for you.\n *\n * @example\n * const progress = Progress.create(connection, capabilities, progressToken);\n * await progress.start('Starting progress');\n * await progress.report(50, 'Halfway there');\n * await progress.end('Finished');\n */\nclass Progress {\n constructor(connection, progressToken) {\n this.connection = connection;\n this.progressToken = progressToken;\n }\n static create(connection, capabilities, progressToken) {\n if (!connection || !capabilities || !capabilities.hasProgressSupport) {\n // If you don't have a connection, we give you a mock that doesn't do anything.\n return {\n start: async () => { },\n report: async () => { },\n end: async () => { },\n };\n }\n return new Progress(connection, progressToken);\n }\n async start(title) {\n await this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, {\n token: this.progressToken,\n });\n await this.connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this.progressToken, {\n kind: 'begin',\n title,\n });\n }\n async report(percentage, message) {\n await this.connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this.progressToken, {\n kind: 'report',\n message,\n percentage,\n });\n }\n async end(message) {\n await this.connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this.progressToken, {\n kind: 'end',\n message,\n });\n }\n}\nexports.Progress = Progress;\n/**\n * Given a current/total and an offset, report the percent complete\n * @param current - number of items processed from total\n * @param total - total number of items\n * @param offset - offset % to start at\n *\n * @example\n * const offset = 50 // Start at 50%\n * const current = 0\n * const total = 100 // files or whatever\n * percent(0, total, offset) // 50 %\n * percent(50, total, offset) // 75 %\n * percent(100, total, offset) // 100 %\n */\nfunction percent(current, total, offset = 0) {\n return Math.round(offset + (current / total) * (100 - offset));\n}\n//# sourceMappingURL=progress.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RenameProvider = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst theme_check_common_2 = require(\"@shopify/theme-check-common\");\nconst HtmlTagNameRenameProvider_1 = require(\"./providers/HtmlTagNameRenameProvider\");\nconst LiquidVariableRenameProvider_1 = require(\"./providers/LiquidVariableRenameProvider\");\n/**\n * RenameProvider is responsible for providing rename support for the theme language server.\n *\n * Rename is a pretty abstract concept, it can be renaming a tag name, a variable, a class name, etc.\n */\nclass RenameProvider {\n constructor(connection, clientCapabilities, documentManager, findThemeRootURI) {\n this.documentManager = documentManager;\n this.providers = [\n new HtmlTagNameRenameProvider_1.HtmlTagNameRenameProvider(documentManager),\n new LiquidVariableRenameProvider_1.LiquidVariableRenameProvider(connection, clientCapabilities, documentManager, findThemeRootURI),\n ];\n }\n /** Prepare is for telling if you can rename this thing or not, and what text to rename */\n async prepare(params) {\n var _a;\n const [currentNode, ancestors] = this.nodes(params);\n if (currentNode === null || ancestors === null) {\n return null;\n }\n const promises = this.providers.map((provider) => provider\n .prepare(currentNode, ancestors, params)\n .catch(() => null));\n const results = await Promise.all(promises);\n return (_a = results.find(Boolean)) !== null && _a !== void 0 ? _a : null;\n }\n /** Rename is for actually renaming something */\n async rename(params) {\n var _a;\n const [currentNode, ancestors] = this.nodes(params);\n if (currentNode === null || ancestors === null) {\n return null;\n }\n const promises = this.providers.map((provider) => provider\n .rename(currentNode, ancestors, params)\n .catch(() => null));\n const results = await Promise.all(promises);\n return (_a = results.find(Boolean)) !== null && _a !== void 0 ? _a : null;\n }\n /** a helper for getting the node under the cursor and its ancestry */\n nodes(params) {\n const document = this.documentManager.get(params.textDocument.uri);\n if (!document || document.type !== theme_check_common_1.SourceCodeType.LiquidHtml) {\n return [null, null];\n }\n if (!(document.ast instanceof Error)) {\n return (0, theme_check_common_2.findCurrentNode)(document.ast, document.textDocument.offsetAt(params.position));\n }\n return [null, null];\n }\n}\nexports.RenameProvider = RenameProvider;\n//# sourceMappingURL=RenameProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HtmlTagNameRenameProvider = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst htmlTagNames_1 = require(\"../../utils/htmlTagNames\");\nclass HtmlTagNameRenameProvider {\n constructor(documentManager) {\n this.documentManager = documentManager;\n }\n async prepare(node, ancestors, params) {\n var _a;\n const textDocument = (_a = this.documentManager.get(params.textDocument.uri)) === null || _a === void 0 ? void 0 : _a.textDocument;\n if (!textDocument || !node || !ancestors)\n return null;\n const ranges = (0, htmlTagNames_1.getHtmlElementNameRanges)(node, ancestors, params, textDocument);\n if (!ranges || !ranges[0])\n return null;\n return {\n range: ranges[0],\n placeholder: textDocument.getText(ranges[0]),\n };\n }\n async rename(node, ancestors, params) {\n var _a;\n const textDocument = (_a = this.documentManager.get(params.textDocument.uri)) === null || _a === void 0 ? void 0 : _a.textDocument;\n if (!textDocument || !node || !ancestors)\n return null;\n const ranges = (0, htmlTagNames_1.getHtmlElementNameRanges)(node, ancestors, params, textDocument);\n if (!ranges)\n return null;\n const textDocumentEdit = vscode_languageserver_protocol_1.TextDocumentEdit.create({ uri: textDocument.uri, version: textDocument.version }, toTextEdits(ranges, params.newName));\n return {\n documentChanges: [textDocumentEdit],\n };\n }\n}\nexports.HtmlTagNameRenameProvider = HtmlTagNameRenameProvider;\nfunction toTextEdits(ranges, newText) {\n return ranges.map((range) => vscode_languageserver_protocol_1.TextEdit.replace(range, newText));\n}\n//# sourceMappingURL=HtmlTagNameRenameProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquidVariableRenameProvider = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst documents_1 = require(\"../../documents\");\nconst uri_1 = require(\"../../utils/uri\");\nclass LiquidVariableRenameProvider {\n constructor(connection, clientCapabilities, documentManager, findThemeRootURI) {\n this.connection = connection;\n this.clientCapabilities = clientCapabilities;\n this.documentManager = documentManager;\n this.findThemeRootURI = findThemeRootURI;\n }\n async prepare(node, ancestors, params) {\n const document = this.documentManager.get(params.textDocument.uri);\n const textDocument = document === null || document === void 0 ? void 0 : document.textDocument;\n if (!textDocument || !node || !ancestors)\n return null;\n if (!supportedTags(node, ancestors))\n return null;\n const oldName = variableName(node);\n const offsetOfVariableNameEnd = node.position.start + oldName.length;\n // The cursor could be past the end of the variable name\n if (textDocument.offsetAt(params.position) > offsetOfVariableNameEnd)\n return null;\n return {\n range: vscode_languageserver_1.Range.create(textDocument.positionAt(node.position.start), textDocument.positionAt(offsetOfVariableNameEnd)),\n placeholder: oldName,\n };\n }\n async rename(node, ancestors, params) {\n const document = this.documentManager.get(params.textDocument.uri);\n const rootUri = await this.findThemeRootURI(params.textDocument.uri);\n const textDocument = document === null || document === void 0 ? void 0 : document.textDocument;\n if (!rootUri || !textDocument || !node || !ancestors)\n return null;\n if (document.ast instanceof Error)\n return null;\n if (!supportedTags(node, ancestors))\n return null;\n const oldName = variableName(node);\n const scope = variableNameBlockScope(oldName, ancestors);\n const replaceRange = textReplaceRange(oldName, textDocument, scope);\n let liquidDocParamUpdated = false;\n const ranges = (0, theme_check_common_1.visit)(document.ast, {\n VariableLookup: replaceRange,\n AssignMarkup: replaceRange,\n ForMarkup: replaceRange,\n TextNode: (node, ancestors) => {\n var _a;\n if (((_a = ancestors.at(-1)) === null || _a === void 0 ? void 0 : _a.type) !== liquid_html_parser_1.NodeTypes.LiquidDocParamNode)\n return;\n liquidDocParamUpdated = true;\n return replaceRange(node, ancestors);\n },\n });\n if (this.clientCapabilities.hasApplyEditSupport && liquidDocParamUpdated) {\n const themeFiles = this.documentManager.theme(rootUri, true);\n const liquidSourceCodes = themeFiles.filter(documents_1.isLiquidSourceCode);\n const name = (0, uri_1.snippetName)(params.textDocument.uri);\n updateRenderTags(this.connection, liquidSourceCodes, name, oldName, params.newName);\n }\n const textDocumentEdit = vscode_languageserver_protocol_1.TextDocumentEdit.create({ uri: textDocument.uri, version: textDocument.version }, ranges.map((range) => vscode_languageserver_protocol_1.TextEdit.replace(range, params.newName)));\n return {\n documentChanges: [textDocumentEdit],\n };\n }\n}\nexports.LiquidVariableRenameProvider = LiquidVariableRenameProvider;\nfunction supportedTags(node, ancestors) {\n return (node.type === liquid_html_parser_1.NodeTypes.AssignMarkup ||\n node.type === liquid_html_parser_1.NodeTypes.VariableLookup ||\n node.type === liquid_html_parser_1.NodeTypes.ForMarkup ||\n isLiquidDocParamNameNode(node, ancestors));\n}\nfunction isLiquidDocParamNameNode(node, ancestors) {\n const parentNode = ancestors.at(-1);\n return (!!parentNode &&\n parentNode.type === liquid_html_parser_1.NodeTypes.LiquidDocParamNode &&\n parentNode.paramName === node &&\n node.type === liquid_html_parser_1.NodeTypes.TextNode);\n}\nfunction variableName(node) {\n var _a, _b;\n switch (node.type) {\n case liquid_html_parser_1.NodeTypes.VariableLookup:\n case liquid_html_parser_1.NodeTypes.AssignMarkup:\n return (_a = node.name) !== null && _a !== void 0 ? _a : '';\n case liquid_html_parser_1.NodeTypes.ForMarkup:\n return (_b = node.variableName) !== null && _b !== void 0 ? _b : '';\n case liquid_html_parser_1.NodeTypes.TextNode:\n return node.value;\n default:\n return '';\n }\n}\n/*\n * Find the scope where the variable name is used. Looks at defined in `tablerow` and `for` tags.\n */\nfunction variableNameBlockScope(variableName, ancestors) {\n let scopedAncestor;\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const ancestor = ancestors[i];\n if (ancestor.type === liquid_html_parser_1.NodeTypes.LiquidTag &&\n (ancestor.name === liquid_html_parser_1.NamedTags.tablerow || ancestor.name === liquid_html_parser_1.NamedTags.for) &&\n typeof ancestor.markup !== 'string' &&\n ancestor.markup.variableName === variableName) {\n scopedAncestor = ancestor;\n break;\n }\n }\n if (!scopedAncestor || !scopedAncestor.blockEndPosition)\n return;\n return {\n start: scopedAncestor.blockStartPosition.start,\n end: scopedAncestor.blockEndPosition.end,\n };\n}\nfunction textReplaceRange(oldName, textDocument, selectedVariableScope) {\n return (node, ancestors) => {\n if (variableName(node) !== oldName)\n return;\n const ancestorScope = variableNameBlockScope(oldName, ancestors);\n if ((ancestorScope === null || ancestorScope === void 0 ? void 0 : ancestorScope.start) !== (selectedVariableScope === null || selectedVariableScope === void 0 ? void 0 : selectedVariableScope.start) ||\n (ancestorScope === null || ancestorScope === void 0 ? void 0 : ancestorScope.end) !== (selectedVariableScope === null || selectedVariableScope === void 0 ? void 0 : selectedVariableScope.end)) {\n return;\n }\n return vscode_languageserver_1.Range.create(textDocument.positionAt(node.position.start), textDocument.positionAt(node.position.start + oldName.length));\n };\n}\nasync function updateRenderTags(connection, liquidSourceCodes, snippetName, oldParamName, newParamName) {\n var _a;\n const editLabel = `Rename snippet parameter '${oldParamName}' to '${newParamName}'`;\n const annotationId = 'renameSnippetParameter';\n const workspaceEdit = {\n documentChanges: [],\n changeAnnotations: {\n [annotationId]: {\n label: editLabel,\n needsConfirmation: false,\n },\n },\n };\n for (const sourceCode of liquidSourceCodes) {\n if (sourceCode.ast instanceof Error)\n continue;\n const textDocument = sourceCode.textDocument;\n const edits = (0, theme_check_common_1.visit)(sourceCode.ast, {\n RenderMarkup(node) {\n var _a;\n if (node.snippet.type !== liquid_html_parser_1.NodeTypes.String || node.snippet.value !== snippetName) {\n return;\n }\n const renamedNameParamNode = node.args.find((arg) => arg.name === oldParamName);\n if (renamedNameParamNode) {\n return {\n newText: `${newParamName}: `,\n range: vscode_languageserver_1.Range.create(textDocument.positionAt(renamedNameParamNode.position.start), textDocument.positionAt(renamedNameParamNode.value.position.start)),\n };\n }\n if (((_a = node.alias) === null || _a === void 0 ? void 0 : _a.value) === oldParamName && node.variable) {\n // `as variable` is not captured in our liquid parser yet,\n // so we have to check it manually and replace it\n const aliasMatch = /as\\s+([^\\s,]+)/g;\n const match = aliasMatch.exec(node.source.slice(node.position.start, node.position.end));\n if (!match)\n return;\n return {\n newText: `as ${newParamName}`,\n range: vscode_languageserver_1.Range.create(textDocument.positionAt(node.position.start + match.index), textDocument.positionAt(node.position.start + match.index + match[0].length)),\n };\n }\n },\n });\n if (edits.length === 0)\n continue;\n workspaceEdit.documentChanges.push({\n textDocument: {\n uri: textDocument.uri,\n version: (_a = sourceCode.version) !== null && _a !== void 0 ? _a : null /* null means file from disk in this API */,\n },\n annotationId,\n edits,\n });\n }\n if (workspaceEdit.documentChanges.length === 0) {\n console.error('Nothing to do!');\n return;\n }\n await connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, {\n label: editLabel,\n edit: workspaceEdit,\n });\n}\n//# sourceMappingURL=LiquidVariableRenameProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RenameHandler = void 0;\nconst AssetRenameHandler_1 = require(\"./handlers/AssetRenameHandler\");\nconst BlockRenameHandler_1 = require(\"./handlers/BlockRenameHandler\");\nconst SectionRenameHandler_1 = require(\"./handlers/SectionRenameHandler\");\nconst SnippetRenameHandler_1 = require(\"./handlers/SnippetRenameHandler\");\n/**\n * The RenameHandler is responsible for handling workspace/didRenameFiles notifications.\n *\n * Stuff we'll handle:\n * - When a snippet is renamed, then we'll change all the render calls\n * - When an asset is renamed, then we'll change the asset_url calls\n * - etc.\n */\nclass RenameHandler {\n constructor(connection, capabilities, documentManager, findThemeRootURI) {\n this.handlers = [\n new SnippetRenameHandler_1.SnippetRenameHandler(documentManager, connection, capabilities, findThemeRootURI),\n new AssetRenameHandler_1.AssetRenameHandler(documentManager, connection, capabilities, findThemeRootURI),\n new BlockRenameHandler_1.BlockRenameHandler(documentManager, connection, capabilities, findThemeRootURI),\n new SectionRenameHandler_1.SectionRenameHandler(documentManager, connection, capabilities, findThemeRootURI),\n ];\n }\n async onDidRenameFiles(params) {\n try {\n const promises = this.handlers.map((handler) => handler.onDidRenameFiles(params));\n await Promise.all(promises);\n }\n catch (error) {\n console.error(error);\n return;\n }\n }\n}\nexports.RenameHandler = RenameHandler;\n//# sourceMappingURL=RenameHandler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AssetRenameHandler = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst documents_1 = require(\"../../documents\");\nconst uri_1 = require(\"../../utils/uri\");\n/**\n * The AssetRenameHandler will handle asset renames.\n *\n * We'll change all the `| asset_url` that reference the old asset:\n * {{ 'oldName.js' | asset_url }} -> {{ 'newName.js' | asset_url }}\n *\n * We'll do that for `.(css|js).liquid` files as well\n *\n * We'll do this by visiting all the liquid files in the theme and looking for\n * string | asset_url Variable nodes that reference the old asset. We'll then create a\n * WorkspaceEdit that changes the references to the new asset.\n */\nclass AssetRenameHandler {\n constructor(documentManager, connection, capabilities, findThemeRootURI) {\n this.documentManager = documentManager;\n this.connection = connection;\n this.capabilities = capabilities;\n this.findThemeRootURI = findThemeRootURI;\n }\n async onDidRenameFiles(params) {\n var _a;\n if (!this.capabilities.hasApplyEditSupport)\n return;\n const relevantRenames = params.files.filter((file) => (0, uri_1.isAsset)(file.oldUri) && (0, uri_1.isAsset)(file.newUri));\n // Only preload if you have something to do (folder renames are not supported)\n if (relevantRenames.length !== 1)\n return;\n const rename = relevantRenames[0];\n const rootUri = await this.findThemeRootURI(theme_check_common_1.path.dirname(params.files[0].oldUri));\n if (!rootUri)\n return;\n await this.documentManager.preload(rootUri);\n const theme = this.documentManager.theme(rootUri, true);\n const liquidSourceCodes = theme.filter(documents_1.isLiquidSourceCode);\n const oldAssetName = (0, uri_1.assetName)(rename.oldUri);\n const newAssetName = (0, uri_1.assetName)(rename.newUri);\n const editLabel = `Rename asset '${oldAssetName}' to '${newAssetName}'`;\n const annotationId = 'renameAsset';\n const workspaceEdit = {\n documentChanges: [],\n changeAnnotations: {\n [annotationId]: {\n label: editLabel,\n needsConfirmation: false,\n },\n },\n };\n for (const sourceCode of liquidSourceCodes) {\n if (sourceCode.ast instanceof Error)\n continue;\n const textDocument = sourceCode.textDocument;\n const edits = (0, theme_check_common_1.visit)(sourceCode.ast, {\n LiquidVariable(node) {\n if (node.filters.length === 0)\n return;\n if (node.expression.type !== liquid_html_parser_1.NodeTypes.String)\n return;\n if (node.filters[0].name !== 'asset_url')\n return;\n const assetName = node.expression.value;\n if (assetName !== oldAssetName)\n return;\n return {\n newText: newAssetName,\n range: vscode_languageserver_protocol_1.Range.create(textDocument.positionAt(node.expression.position.start + 1), // +1 to skip the opening quote\n textDocument.positionAt(node.expression.position.end - 1)),\n };\n },\n });\n if (edits.length === 0)\n continue;\n workspaceEdit.documentChanges.push({\n textDocument: {\n uri: textDocument.uri,\n version: (_a = sourceCode.version) !== null && _a !== void 0 ? _a : null /* null means file from disk in this API */,\n },\n annotationId,\n edits,\n });\n }\n if (workspaceEdit.documentChanges.length === 0) {\n console.error('Nothing to do!');\n return;\n }\n await this.connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, {\n label: editLabel,\n edit: workspaceEdit,\n });\n }\n}\nexports.AssetRenameHandler = AssetRenameHandler;\n//# sourceMappingURL=AssetRenameHandler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BlockRenameHandler = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst documents_1 = require(\"../../documents\");\nconst uri_1 = require(\"../../utils/uri\");\nconst utils_1 = require(\"./utils\");\nconst annotationId = 'renameBlock';\n/**\n * The BlockRenameHandler will handle block renames.\n *\n * Whenever a block gets renamed, a lot of things need to happen:\n * 1. References in files with a {% schema %} must be changed\n * 2. References in template files must be changed\n * 3. References in section groups must be changed\n * 4. References in {% content_for \"block\", type: \"oldName\" %} must be changed\n *\n * Things we're not doing:\n * 5. If isPublic(oldName) && isPrivate(newName) && \"schema.blocks\" accepts \"@theme\",\n * Then the block should be added to the \"blocks\" array\n *\n * Reasoning: this is more noisy than useful. a now-private block\n * could be used by a preset, template or section group. Doing a\n * toil-free rename would require visiting all preset, templates and\n * section groups to see if a parent that uses the new block name\n * was supporting \"@theme\" blocks. It's a lot. It's O(S*(S+T+SG)) where\n * S is the number of sections, T is the number of templates and SG is the\n * number of section groups. It's not worth it.\n *\n * This stuff is complicated enough as it is 😅.\n */\nclass BlockRenameHandler {\n constructor(documentManager, connection, capabilities, findThemeRootURI) {\n this.documentManager = documentManager;\n this.connection = connection;\n this.capabilities = capabilities;\n this.findThemeRootURI = findThemeRootURI;\n }\n async onDidRenameFiles(params) {\n if (!this.capabilities.hasApplyEditSupport)\n return;\n const relevantRenames = params.files.filter((file) => (0, uri_1.isBlock)(file.oldUri) && (0, uri_1.isBlock)(file.newUri));\n // Only preload if you have something to do (folder renames not supported yet).\n if (relevantRenames.length !== 1)\n return;\n const rename = relevantRenames[0];\n const rootUri = await this.findThemeRootURI(theme_check_common_1.path.dirname(params.files[0].oldUri));\n if (!rootUri)\n return;\n await this.documentManager.preload(rootUri);\n const theme = this.documentManager.theme(rootUri, true);\n const liquidFiles = theme.filter(documents_1.isLiquidSourceCode);\n const sectionsAndBlocks = liquidFiles.filter((file) => (0, uri_1.isBlock)(file.uri) || (0, uri_1.isSection)(file.uri));\n const templates = theme.filter(documents_1.isJsonSourceCode).filter((file) => (0, uri_1.isTemplate)(file.uri));\n const sectionGroups = theme.filter(documents_1.isJsonSourceCode).filter((file) => (0, uri_1.isSectionGroup)(file.uri));\n const oldBlockName = (0, uri_1.blockName)(rename.oldUri);\n const newBlockName = (0, uri_1.blockName)(rename.newUri);\n const editLabel = `Rename block '${oldBlockName}' to '${newBlockName}'`;\n const workspaceEdit = {\n documentChanges: [],\n changeAnnotations: {\n [annotationId]: {\n label: editLabel,\n needsConfirmation: false,\n },\n },\n };\n // We need to keep track of sections that have local blocks, because we\n // shouldn't rename those. Only uses of \"@theme\" or specifically named blocks\n // should be renamed when the blocks/*.liquid file is renamed.\n const sectionsWithLocalBlocks = new Set();\n const sectionAndBlocksChanges = await Promise.all(sectionsAndBlocks.map(this.getSchemaChanges(sectionsWithLocalBlocks, oldBlockName, newBlockName)));\n // All the templates/*.json files need to be updated with the new block name\n // when the old block name wasn't a local block.\n const [templateChanges, sectionGroupChanges, contentForChanges] = await Promise.all([\n Promise.all(templates.map(this.getTemplateChanges(oldBlockName, newBlockName, sectionsWithLocalBlocks))),\n Promise.all(sectionGroups.map(this.getSectionGroupChanges(oldBlockName, newBlockName, sectionsWithLocalBlocks))),\n Promise.all(liquidFiles.map(this.getContentForChanges(oldBlockName, newBlockName))),\n ]);\n for (const docChange of [\n ...sectionAndBlocksChanges,\n ...templateChanges,\n ...sectionGroupChanges,\n ]) {\n if (docChange !== null) {\n workspaceEdit.documentChanges.push(docChange);\n }\n }\n // Because contentForChanges could make a change to an existing document, we need\n // to group the edits together by document. Or else we might have index\n // drifting issues.\n for (const docChange of contentForChanges) {\n if (docChange !== null) {\n const existingDocChange = workspaceEdit.documentChanges.find((dc) => dc.textDocument.uri === (docChange === null || docChange === void 0 ? void 0 : docChange.textDocument.uri));\n if (existingDocChange) {\n existingDocChange.edits.push(...docChange.edits);\n }\n else {\n workspaceEdit.documentChanges.push(docChange);\n }\n }\n }\n if (workspaceEdit.documentChanges.length === 0) {\n console.error('Nothing to do!');\n return;\n }\n await this.connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, {\n label: editLabel,\n edit: workspaceEdit,\n });\n }\n getSchemaChanges(sectionsWithLocalBlocks, oldBlockName, newBlockName) {\n return async (sourceCode) => {\n if (sourceCode.ast instanceof Error)\n return null;\n const textDocument = sourceCode.textDocument;\n const schema = await sourceCode.getSchema();\n if (!(0, theme_check_common_1.isBlockSchema)(schema) && !(0, theme_check_common_1.isSectionSchema)(schema))\n return null;\n if ((0, theme_check_common_1.isError)(schema.validSchema) || (0, theme_check_common_1.isError)(schema.ast))\n return null;\n const { validSchema, ast, offset } = schema;\n const edits = [];\n if (validSchema.blocks) {\n for (let i = 0; i < validSchema.blocks.length; i++) {\n const blockDef = validSchema.blocks[i];\n if (isLocalBlock(blockDef)) {\n // If the section has a local blocks, we shouldn't rename\n // anything in this file.\n if ((0, theme_check_common_1.isSectionSchema)(schema)) {\n sectionsWithLocalBlocks.add(schema.name);\n }\n return null;\n }\n if (blockDef.type !== oldBlockName)\n continue;\n const node = (0, theme_check_common_1.nodeAtPath)(ast, ['blocks', i, 'type']);\n edits.push({\n annotationId,\n newText: newBlockName,\n range: vscode_languageserver_protocol_1.Range.create(textDocument.positionAt(offset + node.loc.start.offset + 1), textDocument.positionAt(offset + node.loc.end.offset - 1)),\n });\n }\n }\n const presetEdits = (presetBlock, path) => {\n if (!presetBlock || !('blocks' in presetBlock))\n return [];\n if (Array.isArray(presetBlock.blocks)) {\n return presetBlock.blocks.flatMap((block, index) => {\n const edits = presetEdits(block, [...path, 'blocks', index]);\n if (block.type === oldBlockName) {\n const node = (0, theme_check_common_1.nodeAtPath)(ast, [...path, 'blocks', index, 'type']);\n edits.push({\n annotationId,\n newText: newBlockName,\n range: vscode_languageserver_protocol_1.Range.create(textDocument.positionAt(offset + node.loc.start.offset + 1), textDocument.positionAt(offset + node.loc.end.offset - 1)),\n });\n }\n return edits;\n });\n }\n else if (typeof presetBlock.blocks === 'object') {\n return Object.entries(presetBlock.blocks).flatMap(([key, block]) => {\n const edits = presetEdits(block, [...path, 'blocks', key]);\n if (block.type === oldBlockName) {\n const node = (0, theme_check_common_1.nodeAtPath)(ast, [...path, 'blocks', key, 'type']);\n edits.push({\n annotationId,\n newText: newBlockName,\n range: vscode_languageserver_protocol_1.Range.create(textDocument.positionAt(offset + node.loc.start.offset + 1), textDocument.positionAt(offset + node.loc.end.offset - 1)),\n });\n }\n return edits;\n });\n }\n else {\n return [];\n }\n };\n if (validSchema.presets) {\n edits.push(...validSchema.presets.flatMap((preset, i) => presetEdits(preset, ['presets', i])));\n }\n if (edits.length === 0)\n return null;\n return documentChanges(sourceCode, edits);\n };\n }\n getTemplateChanges(oldBlockName, newBlockName, sectionsWithLocalBlocks) {\n return async (sourceCode) => {\n // assuming that the JSON is valid...\n const { textDocument, ast, source } = sourceCode;\n const parsed = (0, theme_check_common_1.parseJSON)(source);\n if (!parsed || (0, theme_check_common_1.isError)(parsed) || (0, theme_check_common_1.isError)(ast))\n return null;\n const getBlocksEdits = getBlocksEditsFactory(oldBlockName, newBlockName, textDocument, ast);\n const edits = !(0, utils_1.isValidTemplate)(parsed)\n ? []\n : Object.entries(parsed.sections).flatMap(([key, section]) => {\n if ('blocks' in section &&\n !!section.blocks &&\n !sectionsWithLocalBlocks.has(section.type) // don't rename local blocks\n ) {\n return getBlocksEdits(section.blocks, ['sections', key, 'blocks']);\n }\n else {\n return [];\n }\n });\n if (edits.length === 0)\n return null;\n return documentChanges(sourceCode, edits);\n };\n }\n getSectionGroupChanges(oldBlockName, newBlockName, sectionsWithLocalBlocks) {\n return async (sourceCode) => {\n const { textDocument, ast, source } = sourceCode;\n const parsed = (0, theme_check_common_1.parseJSON)(source);\n if (!parsed || (0, theme_check_common_1.isError)(parsed) || (0, theme_check_common_1.isError)(ast))\n return null;\n const getBlocksEdits = getBlocksEditsFactory(oldBlockName, newBlockName, textDocument, ast);\n const edits = !(0, utils_1.isValidSectionGroup)(parsed)\n ? []\n : Object.entries(parsed.sections).flatMap(([key, section]) => {\n if ('blocks' in section &&\n !!section.blocks &&\n !sectionsWithLocalBlocks.has(section.type) // don't rename local blocks\n ) {\n return getBlocksEdits(section.blocks, ['sections', key, 'blocks']);\n }\n else {\n return [];\n }\n });\n if (edits.length === 0)\n return null;\n return documentChanges(sourceCode, edits);\n };\n }\n getContentForChanges(oldBlockName, newBlockName) {\n return async (sourceCode) => {\n const { textDocument, ast } = sourceCode;\n if ((0, theme_check_common_1.isError)(ast))\n return null;\n const edits = (0, theme_check_common_1.visit)(ast, {\n LiquidTag(node) {\n if (node.name !== 'content_for')\n return;\n if (typeof node.markup === 'string')\n return;\n if (node.markup.contentForType.value !== 'block')\n return;\n const typeNode = node.markup.args.find((arg) => arg.name === 'type');\n if (!typeNode ||\n typeNode.value.type !== liquid_html_parser_1.NodeTypes.String ||\n typeNode.value.value !== oldBlockName) {\n return;\n }\n return {\n annotationId,\n newText: newBlockName,\n range: vscode_languageserver_protocol_1.Range.create(textDocument.positionAt(typeNode.value.position.start + 1), textDocument.positionAt(typeNode.value.position.end - 1)),\n };\n },\n });\n if (edits.length === 0)\n return null;\n return documentChanges(sourceCode, edits);\n };\n }\n}\nexports.BlockRenameHandler = BlockRenameHandler;\nfunction isLocalBlock(blockDef) {\n return 'name' in blockDef && typeof blockDef.name === 'string';\n}\nfunction getBlocksEditsFactory(oldBlockName, newBlockName, textDocument, ast) {\n return function getBlocksEdits(blocks, path) {\n if (!blocks)\n return [];\n return Object.entries(blocks).flatMap(([key, block]) => {\n const edits = getBlocksEdits(block.blocks, [...path, key, 'blocks']);\n if (block.type === oldBlockName) {\n const node = (0, theme_check_common_1.nodeAtPath)(ast, [...path, key, 'type']);\n edits.push({\n annotationId,\n newText: newBlockName,\n range: vscode_languageserver_protocol_1.Range.create(textDocument.positionAt(node.loc.start.offset + 1), textDocument.positionAt(node.loc.end.offset - 1)),\n });\n }\n return edits;\n });\n };\n}\nfunction documentChanges(sourceCode, edits) {\n var _a;\n return {\n textDocument: {\n uri: sourceCode.uri,\n version: (_a = sourceCode.version) !== null && _a !== void 0 ? _a : null /* null means file from disk in this API */,\n },\n edits,\n };\n}\n//# sourceMappingURL=BlockRenameHandler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SectionRenameHandler = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst documents_1 = require(\"../../documents\");\nconst uri_1 = require(\"../../utils/uri\");\nconst utils_1 = require(\"./utils\");\nconst annotationId = 'renameSection';\n/**\n * The SectionRenameHandler will handle section renames\n *\n * Whenever a section gets renamed, a lot of things need to happen:\n * 2. References in template files must be changed\n * 3. References in section groups must be changed\n * 4. References like {% section \"oldName\" %} must be changed\n */\nclass SectionRenameHandler {\n constructor(documentManager, connection, capabilities, findThemeRootURI) {\n this.documentManager = documentManager;\n this.connection = connection;\n this.capabilities = capabilities;\n this.findThemeRootURI = findThemeRootURI;\n }\n async onDidRenameFiles(params) {\n if (!this.capabilities.hasApplyEditSupport)\n return;\n const relevantRenames = params.files.filter((file) => (0, uri_1.isSection)(file.oldUri) && (0, uri_1.isSection)(file.newUri));\n // Only preload if you have something to do (folder renames not supported yet).\n if (relevantRenames.length !== 1)\n return;\n const rename = relevantRenames[0];\n const rootUri = await this.findThemeRootURI(theme_check_common_1.path.dirname(params.files[0].oldUri));\n if (!rootUri)\n return;\n await this.documentManager.preload(rootUri);\n const theme = this.documentManager.theme(rootUri, true);\n const liquidFiles = theme.filter(documents_1.isLiquidSourceCode);\n const templates = theme.filter(documents_1.isJsonSourceCode).filter((file) => (0, uri_1.isTemplate)(file.uri));\n const sectionGroups = theme.filter(documents_1.isJsonSourceCode).filter((file) => (0, uri_1.isSectionGroup)(file.uri));\n const oldSectionName = (0, uri_1.sectionName)(rename.oldUri);\n const newSectionName = (0, uri_1.sectionName)(rename.newUri);\n const editLabel = `Rename section '${oldSectionName}' to '${newSectionName}'`;\n const workspaceEdit = {\n documentChanges: [],\n changeAnnotations: {\n [annotationId]: {\n label: editLabel,\n needsConfirmation: false,\n },\n },\n };\n // All the templates/*.json files need to be updated with the new block name\n // when the old block name wasn't a local block.\n const [templateChanges, sectionGroupChanges, sectionTagChanges] = await Promise.all([\n Promise.all(templates.map(this.getTemplateChanges(oldSectionName, newSectionName))),\n Promise.all(sectionGroups.map(this.getSectionGroupChanges(oldSectionName, newSectionName))),\n Promise.all(liquidFiles.map(this.getSectionTagChanges(oldSectionName, newSectionName))),\n ]);\n for (const docChange of [...templateChanges, ...sectionGroupChanges]) {\n if (docChange !== null) {\n workspaceEdit.documentChanges.push(docChange);\n }\n }\n // Because section tag changes could make a change to an existing document,\n // we need to group the edits together by document. Or else we might have\n // index drifting issues.\n for (const docChange of sectionTagChanges) {\n if (docChange !== null) {\n const existingDocChange = workspaceEdit.documentChanges.find((dc) => dc.textDocument.uri === (docChange === null || docChange === void 0 ? void 0 : docChange.textDocument.uri));\n if (existingDocChange) {\n existingDocChange.edits.push(...docChange.edits);\n }\n else {\n workspaceEdit.documentChanges.push(docChange);\n }\n }\n }\n if (workspaceEdit.documentChanges.length === 0) {\n console.error('Nothing to do!');\n return;\n }\n await this.connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, {\n label: editLabel,\n edit: workspaceEdit,\n });\n }\n getTemplateChanges(oldSectionName, newSectionName) {\n return async (sourceCode) => {\n const { textDocument, ast, source } = sourceCode;\n const parsed = (0, theme_check_common_1.parseJSON)(source);\n if (!parsed || (0, theme_check_common_1.isError)(parsed) || (0, theme_check_common_1.isError)(ast))\n return null;\n const edits = !(0, utils_1.isValidTemplate)(parsed)\n ? []\n : Object.entries(parsed.sections)\n .filter(([_key, section]) => section.type === oldSectionName)\n .map(([key]) => {\n const node = (0, theme_check_common_1.nodeAtPath)(ast, ['sections', key, 'type']);\n return {\n annotationId,\n newText: newSectionName,\n range: vscode_languageserver_protocol_1.Range.create(textDocument.positionAt(node.loc.start.offset + 1), textDocument.positionAt(node.loc.end.offset - 1)),\n };\n });\n if (edits.length === 0)\n return null;\n return documentChanges(sourceCode, edits);\n };\n }\n // Awfully similar except for the isValidSectionGroup check and the types of the objects.\n // Feels like a coincidence that the types are so similar. I'm not sure this should be DRY'd up.\n getSectionGroupChanges(oldSectionName, newSectionName) {\n return async (sourceCode) => {\n const { textDocument, ast, source } = sourceCode;\n const parsed = (0, theme_check_common_1.parseJSON)(source);\n if (!parsed || (0, theme_check_common_1.isError)(parsed) || (0, theme_check_common_1.isError)(ast))\n return null;\n const edits = !(0, utils_1.isValidSectionGroup)(parsed)\n ? []\n : Object.entries(parsed.sections)\n .filter(([_key, section]) => section.type === oldSectionName)\n .map(([key]) => {\n const node = (0, theme_check_common_1.nodeAtPath)(ast, ['sections', key, 'type']);\n return {\n annotationId,\n newText: newSectionName,\n range: vscode_languageserver_protocol_1.Range.create(textDocument.positionAt(node.loc.start.offset + 1), textDocument.positionAt(node.loc.end.offset - 1)),\n };\n });\n if (edits.length === 0)\n return null;\n return documentChanges(sourceCode, edits);\n };\n }\n getSectionTagChanges(oldSectionName, newSectionName) {\n return async (sourceCode) => {\n const { textDocument, ast } = sourceCode;\n if ((0, theme_check_common_1.isError)(ast))\n return null;\n const edits = (0, theme_check_common_1.visit)(ast, {\n LiquidTag(node) {\n if (node.name !== 'section')\n return;\n if (typeof node.markup === 'string')\n return;\n // Note the type assertion to the LHS of the expression.\n // The type assertions above are enough for this to be true.\n // But I'm making the explicit annotation here to make it clear.\n const typeNode = node.markup;\n if (typeNode.value !== oldSectionName)\n return;\n return {\n annotationId,\n newText: newSectionName,\n range: vscode_languageserver_protocol_1.Range.create(textDocument.positionAt(typeNode.position.start + 1), textDocument.positionAt(typeNode.position.end - 1)),\n };\n },\n });\n if (edits.length === 0)\n return null;\n return documentChanges(sourceCode, edits);\n };\n }\n}\nexports.SectionRenameHandler = SectionRenameHandler;\nfunction documentChanges(sourceCode, edits) {\n var _a;\n return {\n textDocument: {\n uri: sourceCode.uri,\n version: (_a = sourceCode.version) !== null && _a !== void 0 ? _a : null /* null means file from disk in this API */,\n },\n edits,\n };\n}\n//# sourceMappingURL=SectionRenameHandler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SnippetRenameHandler = void 0;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst documents_1 = require(\"../../documents\");\nconst uri_1 = require(\"../../utils/uri\");\n/**\n * The SnippetRenameHandler will handle snippet renames.\n *\n * We'll change all the render and include tags that reference the old snippet\n * to reference the new snippet.\n *\n * {% render 'oldName' %} -> {% render 'newName' %}\n *\n * We'll do this by visiting all the liquid files in the theme and looking for\n * render and include tags that reference the old snippet. We'll then create a\n * WorkspaceEdit that changes the references to the new snippet.\n */\nclass SnippetRenameHandler {\n constructor(documentManager, connection, capabilities, findThemeRootURI) {\n this.documentManager = documentManager;\n this.connection = connection;\n this.capabilities = capabilities;\n this.findThemeRootURI = findThemeRootURI;\n }\n async onDidRenameFiles(params) {\n var _a;\n if (!this.capabilities.hasApplyEditSupport)\n return;\n const relevantRenames = params.files.filter((file) => (0, uri_1.isSnippet)(file.oldUri) && (0, uri_1.isSnippet)(file.newUri));\n // Only preload if you have something to do (folder renames are not supported)\n if (relevantRenames.length !== 1)\n return;\n const rename = relevantRenames[0];\n const rootUri = await this.findThemeRootURI(theme_check_common_1.path.dirname(params.files[0].oldUri));\n if (!rootUri)\n return;\n await this.documentManager.preload(rootUri);\n const theme = this.documentManager.theme(rootUri, true);\n const liquidSourceCodes = theme.filter(documents_1.isLiquidSourceCode);\n const oldSnippetName = (0, uri_1.snippetName)(rename.oldUri);\n const newSnippetName = (0, uri_1.snippetName)(rename.newUri);\n const editLabel = `Rename snippet '${oldSnippetName}' to '${newSnippetName}'`;\n const annotationId = 'renameSnippet';\n const workspaceEdit = {\n documentChanges: [],\n changeAnnotations: {\n [annotationId]: {\n label: editLabel,\n needsConfirmation: false,\n },\n },\n };\n for (const sourceCode of liquidSourceCodes) {\n if (sourceCode.ast instanceof Error)\n continue;\n const textDocument = sourceCode.textDocument;\n const edits = (0, theme_check_common_1.visit)(sourceCode.ast, {\n LiquidTag(node) {\n if (node.name !== liquid_html_parser_1.NamedTags.render && node.name !== liquid_html_parser_1.NamedTags.include) {\n return;\n }\n if (typeof node.markup === 'string') {\n return;\n }\n const snippet = node.markup.snippet;\n if (snippet.type === liquid_html_parser_1.NodeTypes.String && snippet.value === oldSnippetName) {\n return {\n newText: `${newSnippetName}`,\n range: vscode_languageserver_protocol_1.Range.create(textDocument.positionAt(snippet.position.start + 1), // +1 to skip the opening quote\n textDocument.positionAt(snippet.position.end - 1)),\n };\n }\n },\n });\n if (edits.length === 0)\n continue;\n workspaceEdit.documentChanges.push({\n textDocument: {\n uri: textDocument.uri,\n version: (_a = sourceCode.version) !== null && _a !== void 0 ? _a : null /* null means file from disk in this API */,\n },\n annotationId,\n edits,\n });\n }\n if (workspaceEdit.documentChanges.length === 0) {\n console.error('Nothing to do!');\n return;\n }\n await this.connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, {\n label: editLabel,\n edit: workspaceEdit,\n });\n }\n}\nexports.SnippetRenameHandler = SnippetRenameHandler;\n//# sourceMappingURL=SnippetRenameHandler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isValidTemplate = isValidTemplate;\nexports.isValidSectionGroup = isValidSectionGroup;\n// this is very very optimistic...\nfunction isValidTemplate(parsed) {\n return (typeof parsed === 'object' &&\n parsed !== null &&\n 'sections' in parsed &&\n 'order' in parsed &&\n Array.isArray(parsed.order));\n}\nfunction isValidSectionGroup(parsed) {\n return (typeof parsed === 'object' &&\n parsed !== null &&\n 'sections' in parsed &&\n 'order' in parsed &&\n Array.isArray(parsed.order));\n}\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CachedFileSystem = void 0;\nclass CachedFileSystem {\n constructor(fs) {\n this.readFile = cachedByUri(fs.readFile.bind(fs));\n this.readDirectory = cachedByUri(fs.readDirectory.bind(fs));\n this.stat = cachedByUri(fs.stat.bind(fs));\n }\n}\nexports.CachedFileSystem = CachedFileSystem;\nfunction cachedByUri(fn) {\n const cache = new Map();\n function cached(uri) {\n if (!cache.has(uri)) {\n // I'm intentionally leaving this comment here for debugging purposes :)\n // console.error('cache miss', fn.name, uri);\n cache.set(uri, fn(uri));\n }\n return cache.get(uri);\n }\n cached.invalidate = (uri) => {\n // I'm intentionally leaving this comment here for debugging purposes :)\n // console.error('cache invalidate', fn.name, uri);\n cache.delete(uri);\n };\n return cached;\n}\n//# sourceMappingURL=CachedFileSystem.js.map","\"use strict\";\nvar _a, _b, _c, _d;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Configuration = exports.ConfigurationKeys = exports.PRELOAD_ON_BOOT = exports.CHECK_ON_CHANGE = exports.CHECK_ON_SAVE = exports.CHECK_ON_OPEN = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nexports.CHECK_ON_OPEN = 'themeCheck.checkOnOpen';\nexports.CHECK_ON_SAVE = 'themeCheck.checkOnSave';\nexports.CHECK_ON_CHANGE = 'themeCheck.checkOnChange';\nexports.PRELOAD_ON_BOOT = 'themeCheck.preloadOnBoot';\nexports.ConfigurationKeys = [\n exports.CHECK_ON_OPEN,\n exports.CHECK_ON_SAVE,\n exports.CHECK_ON_CHANGE,\n exports.PRELOAD_ON_BOOT,\n];\nclass Configuration {\n constructor(connection, capabilities) {\n this.connection = connection;\n this.capabilities = capabilities;\n this[_a] = true;\n this[_b] = true;\n this[_c] = true;\n this[_d] = true;\n this.fetchConfiguration = (0, theme_check_common_1.memo)(async () => {\n if (!this.capabilities.hasWorkspaceConfigurationSupport)\n return;\n const configs = await this.connection.workspace.getConfiguration(exports.ConfigurationKeys.map((key) => ({ section: key })));\n for (let i = 0; i < exports.ConfigurationKeys.length; i++) {\n const key = exports.ConfigurationKeys[i];\n if (configs[i] !== null) {\n this[key] = configs[i];\n }\n }\n });\n this.registerDidChangeCapability = (0, theme_check_common_1.memo)(async () => {\n if (!this.capabilities.hasDidChangeConfigurationDynamicRegistrationSupport)\n return;\n return this.connection.client.register(vscode_languageserver_1.DidChangeConfigurationNotification.type);\n });\n this.registerDidChangeWatchedFilesNotification = async (options) => {\n if (!this.capabilities.hasDidChangeWatchedFilesDynamicRegistrationSupport)\n return;\n return this.connection.client.register(vscode_languageserver_1.DidChangeWatchedFilesNotification.type, options);\n };\n this.connection = connection;\n this.capabilities = capabilities;\n }\n setup() {\n this[exports.CHECK_ON_OPEN] = this.capabilities.initializationOption(exports.CHECK_ON_OPEN, true);\n this[exports.CHECK_ON_SAVE] = this.capabilities.initializationOption(exports.CHECK_ON_SAVE, true);\n this[exports.CHECK_ON_CHANGE] = this.capabilities.initializationOption(exports.CHECK_ON_CHANGE, true);\n this[exports.PRELOAD_ON_BOOT] = this.capabilities.initializationOption(exports.PRELOAD_ON_BOOT, true);\n }\n async shouldCheckOnOpen() {\n await this.fetchConfiguration();\n return this[exports.CHECK_ON_OPEN];\n }\n async shouldCheckOnSave() {\n await this.fetchConfiguration();\n return this[exports.CHECK_ON_SAVE];\n }\n async shouldCheckOnChange() {\n await this.fetchConfiguration();\n return this[exports.CHECK_ON_CHANGE];\n }\n async shouldPreloadOnBoot() {\n await this.fetchConfiguration();\n return this[exports.PRELOAD_ON_BOOT];\n }\n clearCache() {\n this.fetchConfiguration.clearCache();\n }\n}\nexports.Configuration = Configuration;\n_a = exports.CHECK_ON_OPEN, _b = exports.CHECK_ON_SAVE, _c = exports.CHECK_ON_CHANGE, _d = exports.PRELOAD_ON_BOOT;\n//# sourceMappingURL=Configuration.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ThemeGraphManager = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst theme_graph_1 = require(\"@shopify/theme-graph\");\nconst vscode_json_languageservice_1 = require(\"vscode-json-languageservice\");\nconst vscode_languageserver_textdocument_1 = require(\"vscode-languageserver-textdocument\");\nconst types_1 = require(\"../types\");\nconst utils_1 = require(\"../utils\");\nclass ThemeGraphManager {\n constructor(connection, documentManager, fs, findThemeRootURI) {\n this.connection = connection;\n this.documentManager = documentManager;\n this.fs = fs;\n this.findThemeRootURI = findThemeRootURI;\n this.graphs = new Map();\n this.operationQueue = [];\n this.processQueue = (0, utils_1.debounce)(async () => {\n const operations = [...new Set(this.operationQueue.splice(0, this.operationQueue.length))];\n if (operations.length === 0)\n return;\n const anyUri = operations[0];\n const rootUri = await this.findThemeRootURI(anyUri);\n if (!rootUri)\n return;\n const graph = await this.graphs.get(rootUri);\n if (!graph)\n return;\n this.graphs.delete(rootUri);\n await this.getThemeGraphForURI(rootUri);\n this.connection.sendNotification(types_1.ThemeGraphDidUpdateNotification.type, { uri: rootUri });\n }, 500);\n this.buildThemeGraph = async (rootUri, entryPoints) => {\n const { documentManager } = this;\n await documentManager.preload(rootUri);\n const dependencies = await this.graphDependencies(rootUri);\n return (0, theme_graph_1.buildThemeGraph)(rootUri, dependencies, entryPoints);\n };\n this.getSourceCode = async (uri) => {\n const doc = this.documentManager.get(uri);\n if (doc)\n return doc;\n const source = await this.fs.readFile(uri);\n return (0, theme_graph_1.toSourceCode)(uri, source);\n };\n }\n async getThemeGraphForURI(uri) {\n const rootUri = await this.findThemeRootURI(uri);\n if (!rootUri) {\n return undefined;\n }\n if (!this.graphs.has(rootUri)) {\n this.graphs.set(rootUri, this.buildThemeGraph(rootUri));\n }\n return this.graphs.get(rootUri);\n }\n async getReferences(uri, offset, { includeIndirect = true, includePreset = true } = {}) {\n const graph = await this.getThemeGraphForURI(uri);\n if (!graph)\n return [];\n const module = graph.modules[uri];\n if (!module)\n return [];\n const includedTypes = [\n 'direct',\n includeIndirect ? 'indirect' : undefined,\n includePreset ? 'preset' : undefined,\n ];\n const refs = module.references.filter((dep) => includedTypes.includes(dep.type));\n return Promise.all(refs.map(async (ref) => {\n const [source, target] = await Promise.all([\n this.augmentedLocation(ref.source),\n this.augmentedLocation(ref.target),\n ]);\n return {\n ...ref,\n source: source,\n target: target,\n };\n }));\n }\n async getDependencies(uri, offset, { includeIndirect = true, includePreset = true } = {}) {\n var _a;\n const graph = await this.getThemeGraphForURI(uri);\n if (!graph)\n return [];\n let module = graph.modules[uri];\n if (!module) {\n // If the module is not found, we might be dealing with dead code.\n // dead code doesn't show up in the graph, but it might still have dependencies.\n // So we're building a smaller graph with that file as entry point to figure\n // out what it depends on.\n const deadCodeGraph = await this.buildThemeGraph(graph.rootUri, [uri]);\n module = deadCodeGraph.modules[uri];\n }\n // If the module is still not found, we return an empty array.\n if (!module)\n return [];\n const includedTypes = [\n 'direct',\n includeIndirect ? 'indirect' : undefined,\n includePreset ? 'preset' : undefined,\n ];\n const deps = (_a = module.dependencies.filter((dep) => includedTypes.includes(dep.type))) !== null && _a !== void 0 ? _a : [];\n return Promise.all(deps.map(async (dep) => {\n const [source, target] = await Promise.all([\n this.augmentedLocation(dep.source),\n this.augmentedLocation(dep.target),\n ]);\n return {\n ...dep,\n source: source,\n target: target,\n };\n }));\n }\n async augmentedLocation(loc) {\n var _a;\n const sourceCode = await this.getSourceCode(loc.uri).catch(() => undefined);\n const { uri, range } = loc;\n if (!sourceCode || !range)\n return { exists: !!sourceCode, ...loc };\n let doc = (_a = this.documentManager.get(loc.uri)) === null || _a === void 0 ? void 0 : _a.textDocument;\n if (!doc) {\n doc = vscode_languageserver_textdocument_1.TextDocument.create(sourceCode.uri, sourceCode.type, 0, sourceCode.source);\n }\n return {\n uri: uri,\n range: range,\n excerpt: sourceCode.source.slice(range[0], range[1]),\n position: vscode_json_languageservice_1.Range.create(doc.positionAt(range[0]), doc.positionAt(range[0])),\n exists: true, // implicit since sourceCode exists\n };\n }\n async deadCode(rootUri) {\n const graph = await this.getThemeGraphForURI(rootUri);\n if (!graph)\n return [];\n const files = await (0, theme_check_common_1.recursiveReadDirectory)(this.fs, rootUri, ([uri]) => ['assets', 'blocks', 'layout', 'sections', 'snippets', 'templates'].some((dir) => uri.startsWith(theme_check_common_1.path.join(rootUri, dir))) &&\n (uri.endsWith('.liquid') ||\n uri.endsWith('.json') ||\n uri.endsWith('.js') ||\n uri.endsWith('.css')));\n const unusedFiles = new Set();\n for (const file of files) {\n if (!graph.modules[file]) {\n unusedFiles.add(file);\n }\n }\n return Array.from(unusedFiles).sort();\n }\n async rename(oldUri, newUri) {\n this.operationQueue.push(oldUri);\n this.operationQueue.push(newUri);\n this.processQueue();\n }\n async change(uri) {\n this.operationQueue.push(uri);\n this.processQueue();\n }\n async create(uri) {\n this.operationQueue.push(uri);\n this.processQueue();\n }\n async delete(uri) {\n this.operationQueue.push(uri);\n this.processQueue();\n }\n getWebComponentMap(rootUri) {\n const { fs, getSourceCode } = this;\n return (0, theme_graph_1.getWebComponentMap)(rootUri, { fs, getSourceCode });\n }\n async graphDependencies(rootUri) {\n const { documentManager, fs, getSourceCode } = this;\n const webComponentDefs = await this.getWebComponentMap(rootUri);\n return {\n fs: fs,\n getSourceCode: getSourceCode,\n async getBlockSchema(name) {\n const blockUri = theme_check_common_1.path.join(rootUri, 'blocks', `${name}.liquid`);\n const doc = documentManager.get(blockUri);\n if (!doc || doc.type !== theme_check_common_1.SourceCodeType.LiquidHtml) {\n return;\n }\n return (await doc.getSchema());\n },\n async getSectionSchema(name) {\n const sectionUri = theme_check_common_1.path.join(rootUri, 'sections', `${name}.liquid`);\n const doc = documentManager.get(sectionUri);\n if (!doc || doc.type !== theme_check_common_1.SourceCodeType.LiquidHtml) {\n return;\n }\n return (await doc.getSchema());\n },\n getWebComponentDefinitionReference(customElementName) {\n return webComponentDefs.get(customElementName);\n },\n };\n }\n}\nexports.ThemeGraphManager = ThemeGraphManager;\n//# sourceMappingURL=ThemeGraphManager.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startServer = void 0;\nvar startServer_1 = require(\"./startServer\");\nObject.defineProperty(exports, \"startServer\", { enumerable: true, get: function () { return startServer_1.startServer; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.safe = void 0;\n/**\n * This function wraps a function that might throw an error and handles it by\n * returning the default value instead.\n *\n * There are cases, such as fs.readDirectory, that might throw an error if the\n * directory doesn't exist. Since there _is_ a difference between a directory that\n * doesn't exist and a directory that is empty, we don't want to change the API\n * of fs.readDirectory either.\n *\n * In such cases, we can use this helper to wrap the function and gracefully handle\n * the error by returning a default value instead.\n *\n * @param fn\n * @param defaultReturnValue\n *\n * @example\n * const getThemeBlockNames = safe(async function () { ... }, []);\n */\nconst safe = (fn, defaultReturnValue) => {\n return async function safeFn(...args) {\n try {\n return await fn(...args);\n }\n catch (error) {\n return defaultReturnValue;\n }\n };\n};\nexports.safe = safe;\n//# sourceMappingURL=safe.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startServer = startServer;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst ClientCapabilities_1 = require(\"../ClientCapabilities\");\nconst codeActions_1 = require(\"../codeActions\");\nconst commands_1 = require(\"../commands\");\nconst completions_1 = require(\"../completions\");\nconst CSSLanguageService_1 = require(\"../css/CSSLanguageService\");\nconst DefinitionProvider_1 = require(\"../definitions/DefinitionProvider\");\nconst diagnostics_1 = require(\"../diagnostics\");\nconst DocumentHighlightsProvider_1 = require(\"../documentHighlights/DocumentHighlightsProvider\");\nconst documentLinks_1 = require(\"../documentLinks\");\nconst documents_1 = require(\"../documents\");\nconst formatting_1 = require(\"../formatting\");\nconst hover_1 = require(\"../hover\");\nconst JSONLanguageService_1 = require(\"../json/JSONLanguageService\");\nconst LinkedEditingRangesProvider_1 = require(\"../linkedEditingRanges/LinkedEditingRangesProvider\");\nconst RenameProvider_1 = require(\"../rename/RenameProvider\");\nconst RenameHandler_1 = require(\"../renamed/RenameHandler\");\nconst types_1 = require(\"../types\");\nconst utils_1 = require(\"../utils\");\nconst uri_1 = require(\"../utils/uri\");\nconst version_1 = require(\"../version\");\nconst CachedFileSystem_1 = require(\"./CachedFileSystem\");\nconst Configuration_1 = require(\"./Configuration\");\nconst safe_1 = require(\"./safe\");\nconst ThemeGraphManager_1 = require(\"./ThemeGraphManager\");\nconst defaultLogger = () => { };\n/**\n * The `git:` VFS does not support the `fs.readDirectory` call and makes most things break.\n * `git` URIs are the ones you'd encounter when doing a git diff in VS Code. They're not\n * real files, they're just a way to represent changes in a git repository. As such, I don't\n * think we want to sync those in our document manager or try to offer document links, etc.\n *\n * A middleware would be nice but it'd be a bit of a pain to implement.\n */\nconst hasUnsupportedDocument = (params) => {\n return ('textDocument' in params &&\n 'uri' in params.textDocument &&\n typeof params.textDocument.uri === 'string' &&\n (params.textDocument.uri.startsWith('git:') || params.textDocument.uri.startsWith('output:')));\n};\n/**\n * This code runs in node and the browser, it can't talk to the file system\n * or make requests. Stuff like that should be injected.\n *\n * In browser, theme-check-js wants these things:\n * - fileExists(path)\n * - defaultTranslations\n *\n * Which means we gotta provide 'em from here too!\n */\nfunction startServer(connection, { fs: injectedFs, loadConfig: injectedLoadConfig, log = defaultLogger, jsonValidationSet, themeDocset: remoteThemeDocset, fetchMetafieldDefinitionsForURI, }) {\n const fs = new CachedFileSystem_1.CachedFileSystem(injectedFs);\n const fileExists = (0, theme_check_common_1.makeFileExists)(fs);\n const loadConfig = (0, theme_check_common_1.memoize)(injectedLoadConfig, (uri) => uri);\n const clientCapabilities = new ClientCapabilities_1.ClientCapabilities();\n const configuration = new Configuration_1.Configuration(connection, clientCapabilities);\n const documentManager = new documents_1.DocumentManager(fs, connection, clientCapabilities, getModeForURI, isValidSchema);\n const themeGraphManager = new ThemeGraphManager_1.ThemeGraphManager(connection, documentManager, fs, findThemeRootURI);\n const diagnosticsManager = new diagnostics_1.DiagnosticsManager(connection);\n const documentLinksProvider = new documentLinks_1.DocumentLinksProvider(documentManager, findThemeRootURI);\n const codeActionsProvider = new codeActions_1.CodeActionsProvider(documentManager, diagnosticsManager);\n const onTypeFormattingProvider = new formatting_1.OnTypeFormattingProvider(documentManager, async function setCursorPosition(textDocument, position) {\n if (!clientCapabilities.hasShowDocumentSupport)\n return;\n connection.sendRequest(vscode_languageserver_1.ShowDocumentRequest.type, {\n uri: textDocument.uri,\n takeFocus: true,\n selection: {\n start: position,\n end: position,\n },\n });\n });\n const linkedEditingRangesProvider = new LinkedEditingRangesProvider_1.LinkedEditingRangesProvider(documentManager);\n const documentHighlightProvider = new DocumentHighlightsProvider_1.DocumentHighlightsProvider(documentManager);\n const renameProvider = new RenameProvider_1.RenameProvider(connection, clientCapabilities, documentManager, findThemeRootURI);\n const renameHandler = new RenameHandler_1.RenameHandler(connection, clientCapabilities, documentManager, findThemeRootURI);\n async function findThemeRootURI(uri) {\n const rootUri = await (0, theme_check_common_1.findRoot)(uri, fileExists);\n if (!rootUri)\n return null;\n const config = await loadConfig(rootUri, fs);\n return config.rootUri;\n }\n const getMetafieldDefinitionsForRootUri = (0, theme_check_common_1.memoize)((0, theme_check_common_1.makeGetMetafieldDefinitions)(fs), (rootUri) => rootUri);\n const getMetafieldDefinitions = async (uri) => {\n const rootUri = await findThemeRootURI(uri);\n if (!rootUri) {\n return {};\n }\n return getMetafieldDefinitionsForRootUri(rootUri);\n };\n // These are augmented here so that the caching is maintained over different runs.\n const themeDocset = new theme_check_common_1.AugmentedThemeDocset(remoteThemeDocset);\n const cssLanguageService = new CSSLanguageService_1.CSSLanguageService(documentManager);\n const runChecks = (0, utils_1.debounce)((0, diagnostics_1.makeRunChecks)(documentManager, diagnosticsManager, {\n fs,\n loadConfig,\n themeDocset,\n jsonValidationSet,\n getMetafieldDefinitions,\n cssLanguageService,\n themeGraphManager,\n }), 100);\n const getTranslationsForURI = async (uri) => {\n const rootURI = await findThemeRootURI(uri);\n if (!rootURI)\n return {};\n const theme = documentManager.theme(rootURI);\n const getDefaultTranslations = (0, theme_check_common_1.makeGetDefaultTranslations)(fs, theme, rootURI);\n const [defaultTranslations, shopifyTranslations] = await Promise.all([\n getDefaultTranslations(),\n themeDocset.systemTranslations(),\n ]);\n return { ...shopifyTranslations, ...defaultTranslations };\n };\n const getSchemaTranslationsForURI = async (uri) => {\n const rootURI = await findThemeRootURI(uri);\n if (!rootURI)\n return {};\n const theme = documentManager.theme(rootURI);\n const getDefaultSchemaTranslations = (0, theme_check_common_1.makeGetDefaultSchemaTranslations)(fs, theme, rootURI);\n return getDefaultSchemaTranslations();\n };\n const getDocDefinitionForURI = async (uri, category, name) => {\n const rootUri = await findThemeRootURI(uri);\n if (!rootUri)\n return undefined;\n const fileUri = theme_check_common_1.path.join(rootUri, category, `${name}.liquid`);\n const file = documentManager.get(fileUri);\n if (!file || file.type !== theme_check_common_1.SourceCodeType.LiquidHtml || (0, theme_check_common_1.isError)(file.ast)) {\n return undefined;\n }\n return file.getLiquidDoc();\n };\n const snippetFilter = ([uri]) => /\\.liquid$/.test(uri) && /snippets/.test(uri);\n const getSnippetNamesForURI = (0, safe_1.safe)(async (uri) => {\n const rootUri = await findThemeRootURI(uri);\n if (!rootUri)\n return [];\n const snippetUris = await (0, theme_check_common_1.recursiveReadDirectory)(fs, rootUri, snippetFilter);\n return snippetUris.map(uri_1.snippetName);\n }, []);\n const getThemeSettingsSchemaForURI = (0, safe_1.safe)(async (uri) => {\n const rootUri = await findThemeRootURI(uri);\n if (!rootUri)\n return [];\n const settingsSchemaUri = theme_check_common_1.path.join(rootUri, 'config', 'settings_schema.json');\n const contents = await fs.readFile(settingsSchemaUri);\n const json = (0, theme_check_common_1.parseJSON)(contents);\n if ((0, theme_check_common_1.isError)(json) || !Array.isArray(json)) {\n throw new Error('Settings JSON file not in correct format');\n }\n return json;\n }, []);\n async function getModeForURI(uri) {\n const rootUri = await (0, theme_check_common_1.findRoot)(uri, fileExists);\n if (!rootUri)\n return 'theme';\n const config = await loadConfig(rootUri, fs);\n return config.context;\n }\n const getThemeBlockNames = (0, safe_1.safe)(async (uri, includePrivate) => {\n const rootUri = await findThemeRootURI(uri);\n if (!rootUri)\n return [];\n const blocks = await fs.readDirectory(theme_check_common_1.path.join(rootUri, 'blocks'));\n const blockNames = blocks.map(([uri]) => theme_check_common_1.path.basename(uri, '.liquid'));\n if (includePrivate) {\n return blockNames;\n }\n return blockNames.filter((blockName) => !blockName.startsWith('_'));\n }, []);\n async function getThemeBlockSchema(uri, name) {\n const rootUri = await findThemeRootURI(uri);\n if (!rootUri)\n return;\n const blockUri = theme_check_common_1.path.join(rootUri, 'blocks', `${name}.liquid`);\n const doc = documentManager.get(blockUri);\n if (!doc || doc.type !== theme_check_common_1.SourceCodeType.LiquidHtml) {\n return;\n }\n return doc.getSchema();\n }\n // Defined as a function to solve a circular dependency (doc manager & json\n // lang service both need each other)\n async function isValidSchema(uri, jsonString) {\n return jsonLanguageService.isValidSchema(uri, jsonString);\n }\n const getDefaultLocaleFileUri = (0, theme_check_common_1.makeGetDefaultLocaleFileUri)(fs);\n async function getDefaultLocaleSourceCode(uri) {\n var _a;\n const rootUri = await findThemeRootURI(uri);\n if (!rootUri)\n return null;\n const defaultLocaleFileUri = await getDefaultLocaleFileUri(rootUri);\n if (!defaultLocaleFileUri)\n return null;\n return (_a = documentManager.get(defaultLocaleFileUri)) !== null && _a !== void 0 ? _a : null;\n }\n const getDefaultSchemaLocaleFileUri = (0, theme_check_common_1.makeGetDefaultSchemaLocaleFileUri)(fs);\n async function getDefaultSchemaLocaleSourceCode(uri) {\n var _a;\n const rootUri = await findThemeRootURI(uri);\n if (!rootUri)\n return null;\n const defaultLocaleFileUri = await getDefaultSchemaLocaleFileUri(rootUri);\n if (!defaultLocaleFileUri)\n return null;\n return (_a = documentManager.get(defaultLocaleFileUri)) !== null && _a !== void 0 ? _a : null;\n }\n const definitionsProvider = new DefinitionProvider_1.DefinitionProvider(documentManager, getDefaultLocaleSourceCode, getDefaultSchemaLocaleSourceCode);\n const jsonLanguageService = new JSONLanguageService_1.JSONLanguageService(documentManager, jsonValidationSet, getSchemaTranslationsForURI, getModeForURI, getThemeBlockNames, getThemeBlockSchema, findThemeRootURI);\n const completionsProvider = new completions_1.CompletionsProvider({\n documentManager,\n themeDocset,\n getTranslationsForURI,\n getSnippetNamesForURI,\n getThemeSettingsSchemaForURI,\n log,\n getThemeBlockNames,\n getMetafieldDefinitions,\n getDocDefinitionForURI,\n });\n const hoverProvider = new hover_1.HoverProvider(documentManager, themeDocset, getMetafieldDefinitions, getTranslationsForURI, getThemeSettingsSchemaForURI, getDocDefinitionForURI);\n const executeCommandProvider = new commands_1.ExecuteCommandProvider(documentManager, diagnosticsManager, clientCapabilities, runChecks, connection);\n const fetchMetafieldDefinitionsForWorkspaceFolders = async (folders) => {\n if (!fetchMetafieldDefinitionsForURI)\n return;\n for (let folder of folders) {\n const mode = await getModeForURI(folder.uri);\n if (mode === 'theme') {\n fetchMetafieldDefinitionsForURI(folder.uri);\n }\n }\n };\n connection.onInitialize((params) => {\n clientCapabilities.setup(params.capabilities, params.initializationOptions);\n cssLanguageService.setup(params.capabilities);\n jsonLanguageService.setup(params.capabilities);\n configuration.setup();\n const fileOperationRegistrationOptions = {\n filters: [\n {\n pattern: {\n glob: '**/*.{liquid,json}',\n },\n },\n {\n pattern: {\n glob: '**/assets/*',\n },\n },\n ],\n };\n const result = {\n capabilities: {\n textDocumentSync: {\n change: vscode_languageserver_1.TextDocumentSyncKind.Full,\n save: true,\n openClose: true,\n },\n codeActionProvider: {\n codeActionKinds: [...codeActions_1.CodeActionKinds],\n },\n completionProvider: {\n triggerCharacters: ['.', '{{ ', '{% ', '<', '/', '[', '\"', \"'\", ':', '@'],\n },\n definitionProvider: true,\n documentOnTypeFormattingProvider: {\n firstTriggerCharacter: ' ',\n moreTriggerCharacter: ['{', '%', '-', '>'],\n },\n documentLinkProvider: {\n resolveProvider: false,\n workDoneProgress: false,\n },\n documentHighlightProvider: true,\n linkedEditingRangeProvider: true,\n renameProvider: {\n prepareProvider: true,\n },\n executeCommandProvider: {\n commands: [...commands_1.Commands],\n },\n hoverProvider: {\n workDoneProgress: false,\n },\n workspace: {\n workspaceFolders: {\n supported: true,\n changeNotifications: true,\n },\n fileOperations: {\n didRename: fileOperationRegistrationOptions,\n },\n },\n },\n serverInfo: {\n name: 'theme-language-server',\n version: version_1.VERSION,\n },\n };\n return result;\n });\n connection.onInitialized(() => {\n log(`[SERVER] Let's roll!`);\n configuration.fetchConfiguration();\n configuration.registerDidChangeCapability();\n configuration.registerDidChangeWatchedFilesNotification({\n watchers: [\n {\n globPattern: '**/.theme-check.yml',\n },\n {\n globPattern: '**/.shopify/*',\n },\n {\n globPattern: '**/*.liquid',\n },\n {\n globPattern: '**/{locales,sections,templates,customers}/*.json',\n },\n {\n globPattern: '**/config/settings_{data,schema}.json',\n },\n ],\n });\n if (clientCapabilities.hasWorkspaceFoldersSupport) {\n connection.workspace.getWorkspaceFolders().then(async (folders) => {\n if (!folders)\n return;\n fetchMetafieldDefinitionsForWorkspaceFolders(folders);\n });\n connection.workspace.onDidChangeWorkspaceFolders(async (params) => {\n fetchMetafieldDefinitionsForWorkspaceFolders(params.added);\n });\n }\n });\n connection.onDidChangeConfiguration((_params) => {\n configuration.clearCache();\n });\n connection.onDidOpenTextDocument(async (params) => {\n if (hasUnsupportedDocument(params))\n return;\n const { uri, text, version } = params.textDocument;\n documentManager.open(uri, text, version);\n if (await configuration.shouldCheckOnOpen()) {\n runChecks([uri]);\n }\n // The objective at the time of writing this is to make {Asset,Snippet}Rename\n // fast when you eventually need it.\n //\n // I'm choosing the textDocument/didOpen notification as a hook because\n // I'm not sure we have a better solution than this. Yes we have the\n // initialize request with the workspace folders, but you might have opened\n // an app folder. The root of a theme app extension would probably be\n // at ${workspaceRoot}/extensions/${appExtensionName}. It'd be hard to\n // figure out from the initialize request params.\n //\n // If we open a file that we know is liquid, then we can kind of guarantee\n // we'll find a theme root and we'll preload that.\n if (await configuration.shouldPreloadOnBoot()) {\n const rootUri = await findThemeRootURI(uri);\n if (rootUri) {\n documentManager.preload(rootUri);\n }\n }\n });\n connection.onDidChangeTextDocument(async (params) => {\n if (hasUnsupportedDocument(params))\n return;\n const { uri, version } = params.textDocument;\n documentManager.change(uri, params.contentChanges[0].text, version);\n if (await configuration.shouldCheckOnChange()) {\n runChecks([uri]);\n }\n else {\n // The diagnostics may be stale! Clear em!\n diagnosticsManager.clear(params.textDocument.uri);\n }\n });\n connection.onDidSaveTextDocument(async (params) => {\n if (hasUnsupportedDocument(params))\n return;\n const { uri } = params.textDocument;\n if (await configuration.shouldCheckOnSave()) {\n runChecks([uri]);\n }\n });\n connection.onDidCloseTextDocument((params) => {\n if (hasUnsupportedDocument(params))\n return;\n const { uri } = params.textDocument;\n documentManager.close(uri);\n diagnosticsManager.clear(uri);\n });\n connection.onDocumentLinks(async (params) => {\n if (hasUnsupportedDocument(params))\n return [];\n const [liquidLinks, jsonLinks] = await Promise.all([\n documentLinksProvider.documentLinks(params.textDocument.uri),\n jsonLanguageService.documentLinks(params),\n ]);\n return [...liquidLinks, ...jsonLinks];\n });\n connection.onDefinition(async (params) => {\n if (hasUnsupportedDocument(params))\n return [];\n return definitionsProvider.definitions(params);\n });\n connection.onCodeAction(async (params) => {\n return codeActionsProvider.codeActions(params);\n });\n connection.onExecuteCommand(async (params) => {\n await executeCommandProvider.execute(params);\n });\n connection.onCompletion(async (params) => {\n var _a, _b;\n if (hasUnsupportedDocument(params))\n return [];\n return ((_b = (_a = (await cssLanguageService.completions(params))) !== null && _a !== void 0 ? _a : (await jsonLanguageService.completions(params))) !== null && _b !== void 0 ? _b : (await completionsProvider.completions(params)));\n });\n connection.onHover(async (params) => {\n var _a, _b;\n if (hasUnsupportedDocument(params))\n return null;\n return ((_b = (_a = (await cssLanguageService.hover(params))) !== null && _a !== void 0 ? _a : (await jsonLanguageService.hover(params))) !== null && _b !== void 0 ? _b : (await hoverProvider.hover(params)));\n });\n connection.onDocumentOnTypeFormatting(async (params) => {\n if (hasUnsupportedDocument(params))\n return null;\n return onTypeFormattingProvider.onTypeFormatting(params);\n });\n connection.onDocumentHighlight(async (params) => {\n if (hasUnsupportedDocument(params))\n return [];\n return documentHighlightProvider.documentHighlights(params);\n });\n connection.onPrepareRename(async (params) => {\n if (hasUnsupportedDocument(params))\n return null;\n return renameProvider.prepare(params);\n });\n connection.onRenameRequest(async (params) => {\n if (hasUnsupportedDocument(params))\n return null;\n return renameProvider.rename(params);\n });\n connection.languages.onLinkedEditingRange(async (params) => {\n if (hasUnsupportedDocument(params))\n return null;\n return linkedEditingRangesProvider.linkedEditingRanges(params);\n });\n connection.workspace.onDidRenameFiles(async (params) => {\n const triggerUris = params.files.map((fileRename) => fileRename.newUri);\n // Behold the cache invalidation monster\n for (const { oldUri, newUri } of params.files) {\n // When a file is renamed, we paste the content of the old file into the\n // new file in the document manager. We don't need to invalidate preload\n // because that's the only thing that changed.\n documentManager.rename(oldUri, newUri);\n // When a file is renamed, readDirectory to the parent folder is invalidated.\n fs.readDirectory.invalidate(theme_check_common_1.path.dirname(oldUri));\n fs.readDirectory.invalidate(theme_check_common_1.path.dirname(newUri));\n // When a file is renamed, readFile and stat for both the old and new URIs are invalidated.\n fs.readFile.invalidate(oldUri);\n fs.readFile.invalidate(newUri);\n fs.stat.invalidate(oldUri);\n fs.stat.invalidate(newUri);\n themeGraphManager.rename(oldUri, newUri);\n }\n // We should complete refactors before running theme check\n await renameHandler.onDidRenameFiles(params);\n // MissingAssets/MissingSnippet should be rerun when a file is deleted\n // since the file rename might cause an error.\n runChecks.force(triggerUris);\n });\n /**\n * onDidChangeWatchedFiles is triggered by file operations (in or out of the editor).\n *\n * For in-editor changes, happens redundantly with\n * - onDidCreateFiles\n * - onDidRenameFiles\n * - onDidDeleteFiles\n * - onDidSaveTextDocument\n *\n * Not redundant for operations that happen outside of the editor\n * - git pull, checkout, reset, stash pop, etc.\n * - shopify theme metafields pull\n * - etc.\n *\n * It always runs and onDid* will never fire without a corresponding onDidChangeWatchedFiles.\n *\n * This is why the bulk of the cache invalidation logic is in this handler.\n */\n connection.onDidChangeWatchedFiles(async (params) => {\n var _a;\n if (params.changes.length === 0)\n return;\n const triggerUris = params.changes.map((change) => change.uri);\n const updates = [];\n for (const change of params.changes) {\n // Theme Check config changes should clear the config cache\n if (change.uri.endsWith('.theme-check.yml')) {\n loadConfig.clearCache();\n continue;\n }\n // Rename cache invalidation is handled by onDidRenameFiles\n if (documentManager.hasRecentRename(change.uri)) {\n documentManager.clearRecentRename(change.uri);\n continue;\n }\n switch (change.type) {\n case vscode_languageserver_1.FileChangeType.Created:\n // A created file invalidates readDirectory, readFile and stat\n fs.readDirectory.invalidate(theme_check_common_1.path.dirname(change.uri));\n fs.readFile.invalidate(change.uri);\n fs.stat.invalidate(change.uri);\n themeGraphManager.create(change.uri);\n // If a file is created under out feet, we update its contents.\n updates.push(documentManager.changeFromDisk(change.uri));\n break;\n case vscode_languageserver_1.FileChangeType.Changed:\n // A changed file invalidates readFile and stat (but not readDirectory)\n fs.readFile.invalidate(change.uri);\n fs.stat.invalidate(change.uri);\n themeGraphManager.change(change.uri);\n // If the file is not open, we update its contents in the doc manager\n // If it is open, then we don't need to update it because the document manager\n // will have the version from the editor.\n if (((_a = documentManager.get(change.uri)) === null || _a === void 0 ? void 0 : _a.version) === undefined) {\n updates.push(documentManager.changeFromDisk(change.uri));\n }\n break;\n case vscode_languageserver_1.FileChangeType.Deleted:\n // A deleted file invalides readDirectory, readFile, and stat\n fs.readDirectory.invalidate(theme_check_common_1.path.dirname(change.uri));\n fs.readFile.invalidate(change.uri);\n fs.stat.invalidate(change.uri);\n themeGraphManager.delete(change.uri);\n // If a file is deleted, it's removed from the document manager\n documentManager.delete(change.uri);\n break;\n }\n if (change.uri.endsWith('metafields.json')) {\n updates.push(findThemeRootURI(change.uri).then((rootUri) => {\n if (rootUri) {\n getMetafieldDefinitionsForRootUri.invalidate(rootUri);\n }\n }));\n }\n }\n await Promise.all(updates);\n // MissingAssets/MissingSnippet should be rerun when a file is deleted\n // since an error might be introduced (and vice versa).\n runChecks.force(triggerUris);\n });\n connection.onRequest(types_1.ThemeGraphReferenceRequest.type, async (params) => {\n if (hasUnsupportedDocument(params))\n return [];\n const { uri, offset, includeIndirect } = params;\n return themeGraphManager.getReferences(uri, offset, { includeIndirect }).catch((_) => []);\n });\n connection.onRequest(types_1.ThemeGraphDependenciesRequest.type, async (params) => {\n if (hasUnsupportedDocument(params))\n return [];\n const { uri, offset, includeIndirect } = params;\n return themeGraphManager.getDependencies(uri, offset, { includeIndirect }).catch((_) => []);\n });\n connection.onRequest(types_1.ThemeGraphRootRequest.type, async (params) => {\n if (hasUnsupportedDocument(params))\n return '';\n const { uri } = params;\n const rootUri = await findThemeRootURI(uri).catch((_) => undefined);\n if (!rootUri || theme_check_common_1.path.dirname(rootUri) === rootUri) {\n console.error(uri);\n }\n return rootUri;\n });\n connection.onRequest(types_1.ThemeGraphDeadCodeRequest.type, async (params) => {\n if (hasUnsupportedDocument(params))\n return [];\n const { uri } = params;\n const rootUri = await findThemeRootURI(uri);\n if (!rootUri)\n return [];\n const deadFiles = await themeGraphManager.deadCode(rootUri);\n return deadFiles;\n });\n connection.listen();\n}\n//# sourceMappingURL=startServer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isSettingsCategory = isSettingsCategory;\nexports.isInputSetting = isInputSetting;\nfunction isSettingsCategory(x) {\n return 'settings' in x;\n}\nfunction isInputSetting(x) {\n return 'id' in x && 'type' in x && 'label' in x;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PluralizedTranslationKeys = void 0;\nexports.renderKey = renderKey;\nexports.renderTranslation = renderTranslation;\nexports.translationValue = translationValue;\nexports.isPluralizedTranslation = isPluralizedTranslation;\nexports.toOptions = toOptions;\nexports.translationOptions = translationOptions;\nexports.extractParams = extractParams;\nexports.paramsString = paramsString;\nexports.PluralizedTranslationKeys = ['one', 'few', 'many', 'two', 'zero', 'other'];\nfunction renderKey(translation, key) {\n if (translation[key]) {\n return `\\`${key}:\\` ${translation[key]}`;\n }\n}\nfunction renderTranslation(translation) {\n if (typeof translation === 'string')\n return translation;\n return [\n renderKey(translation, 'zero'),\n renderKey(translation, 'one'),\n renderKey(translation, 'two'),\n renderKey(translation, 'few'),\n renderKey(translation, 'many'),\n renderKey(translation, 'other'),\n ]\n .filter(Boolean)\n .join('\\n\\n---\\n\\n');\n}\nfunction translationValue(path, translations) {\n const parts = path.split('.');\n let current = translations;\n for (const key of parts) {\n if (!current || typeof current === 'string') {\n return undefined;\n }\n current = current[key];\n }\n return current;\n}\nfunction isPluralizedTranslation(translations) {\n return Object.keys(translations).every((key) => exports.PluralizedTranslationKeys.includes(key));\n}\nfunction toOptions(prefix, translations) {\n return Object.entries(translations).flatMap(([path, translation]) => {\n if (typeof translation === 'string' || isPluralizedTranslation(translation)) {\n return [{ path: prefix.concat(path), translation }];\n }\n else {\n return toOptions(prefix.concat(path), translation);\n }\n });\n}\nfunction translationOptions(translations) {\n return toOptions([], translations);\n}\nfunction extractParams(value) {\n const regex = /\\{\\{([^}]+?)\\}\\}/g;\n const results = [];\n let current;\n while ((current = regex.exec(value)) !== null) {\n results.push(current[1].trim());\n }\n return results;\n}\nfunction paramsString(params) {\n if (params.length === 0)\n return '';\n return `: ` + params.map((param) => `${param}: ${param}`).join(', ');\n}\n//# sourceMappingURL=translations.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ThemeGraphDidUpdateNotification = exports.ThemeGraphDeadCodeRequest = exports.ThemeGraphRootRequest = exports.ThemeGraphDependenciesRequest = exports.ThemeGraphReferenceRequest = void 0;\nconst rpc = __importStar(require(\"vscode-jsonrpc\"));\nvar ThemeGraphReferenceRequest;\n(function (ThemeGraphReferenceRequest) {\n ThemeGraphReferenceRequest.method = 'themeGraph/references';\n ThemeGraphReferenceRequest.type = new rpc.RequestType(ThemeGraphReferenceRequest.method);\n})(ThemeGraphReferenceRequest || (exports.ThemeGraphReferenceRequest = ThemeGraphReferenceRequest = {}));\nvar ThemeGraphDependenciesRequest;\n(function (ThemeGraphDependenciesRequest) {\n ThemeGraphDependenciesRequest.method = 'themeGraph/dependencies';\n ThemeGraphDependenciesRequest.type = new rpc.RequestType(ThemeGraphDependenciesRequest.method);\n})(ThemeGraphDependenciesRequest || (exports.ThemeGraphDependenciesRequest = ThemeGraphDependenciesRequest = {}));\nvar ThemeGraphRootRequest;\n(function (ThemeGraphRootRequest) {\n ThemeGraphRootRequest.method = 'themeGraph/rootUri';\n ThemeGraphRootRequest.type = new rpc.RequestType(ThemeGraphRootRequest.method);\n})(ThemeGraphRootRequest || (exports.ThemeGraphRootRequest = ThemeGraphRootRequest = {}));\nvar ThemeGraphDeadCodeRequest;\n(function (ThemeGraphDeadCodeRequest) {\n ThemeGraphDeadCodeRequest.method = 'themeGraph/deadCode';\n ThemeGraphDeadCodeRequest.type = new rpc.RequestType(ThemeGraphDeadCodeRequest.method);\n})(ThemeGraphDeadCodeRequest || (exports.ThemeGraphDeadCodeRequest = ThemeGraphDeadCodeRequest = {}));\nvar ThemeGraphDidUpdateNotification;\n(function (ThemeGraphDidUpdateNotification) {\n ThemeGraphDidUpdateNotification.method = 'themeGraph/onDidChangeTree';\n ThemeGraphDidUpdateNotification.type = new rpc.NotificationType(ThemeGraphDidUpdateNotification.method);\n})(ThemeGraphDidUpdateNotification || (exports.ThemeGraphDidUpdateNotification = ThemeGraphDidUpdateNotification = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findLast = findLast;\n// Array.prototype.findLast is only available in es2023. Which feels too new?\nfunction findLast(array, pred) {\n for (let i = array.length - 1; i >= 0; i--) {\n if (pred(array[i]))\n return array[i];\n }\n}\n//# sourceMappingURL=array.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.debounce = debounce;\n/**\n * debounce(fn, ms)\n *\n * A debounced function only executes once after a timer has expired. Repeated\n * call to the debounced function before its timer has expired result in a delayed\n * execution of the function.\n *\n * This is useful in cases where you have an \"expensive\" function that you only want\n * to execute after the user is idle for a little bit.\n *\n * e.g. Run theme check after the user has stopped typing for at least 100ms.\n *\n * The debounced function has the same type signature as its argument.\n *\n * The input function must return void (or else you might \"bomb\" when you resolve).\n *\n * @param fn a function that should be debounced\n * @param ms milliseconds after last function call for it to execute\n * @returns a function that will execute on the trailing edge of a timer with the last argument it was called with\n */\nfunction debounce(fn, ms) {\n let timeoutId = null;\n let force = false; // force use a certain set of arguments in the next call\n const debouncedFn = (...args) => {\n if (timeoutId !== null && force)\n return;\n if (timeoutId !== null)\n clearTimeout(timeoutId);\n timeoutId = setTimeout(async () => {\n await Promise.resolve(fn(...args));\n timeoutId = null;\n force = false;\n }, ms);\n };\n debouncedFn.force = (...args) => {\n debouncedFn(...args);\n force = true;\n };\n return debouncedFn;\n}\n//# sourceMappingURL=debounce.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getHtmlElementNameRanges = getHtmlElementNameRanges;\nexports.isDanglingOpenHtmlElement = isDanglingOpenHtmlElement;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nconst vscode_languageserver_1 = require(\"vscode-languageserver\");\nconst isCovered_1 = require(\"./isCovered\");\nfunction getHtmlElementNameRanges(node, ancestors, params, textDocument) {\n let htmlElementNode = null;\n // Try parent node as HTML Element\n // <name> case\n const parentNode = ancestors.at(-1);\n if (parentNode &&\n parentNode.type === liquid_html_parser_1.NodeTypes.HtmlElement &&\n parentNode.name.length > 0 &&\n (0, isCovered_1.isCovered)(textDocument.offsetAt(params.position), {\n start: parentNode.name[0].position.start,\n end: parentNode.name.at(-1).position.end,\n })) {\n htmlElementNode = parentNode;\n }\n // </name> case\n if (node.type === liquid_html_parser_1.NodeTypes.HtmlElement &&\n node.name.length > 0 &&\n (0, isCovered_1.isCovered)(textDocument.offsetAt(params.position), node.blockEndPosition)) {\n htmlElementNode = node;\n }\n if (!htmlElementNode || isDanglingOpenHtmlElement(htmlElementNode))\n return null;\n const nameNodes = htmlElementNode.name;\n const firstNode = nameNodes.at(0);\n const lastNode = nameNodes.at(-1);\n const startRange = vscode_languageserver_1.Range.create(textDocument.positionAt(firstNode.position.start), textDocument.positionAt(lastNode.position.end));\n const endRange = vscode_languageserver_1.Range.create(\n // </ means offset 2 characters\n textDocument.positionAt(htmlElementNode.blockEndPosition.start + 2), textDocument.positionAt(htmlElementNode.blockEndPosition.end - 1));\n return [startRange, endRange];\n}\nfunction isDanglingOpenHtmlElement(node) {\n return (node.type === liquid_html_parser_1.NodeTypes.HtmlElement && node.blockEndPosition.start === node.blockEndPosition.end);\n}\n//# sourceMappingURL=htmlTagNames.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseJSON = exports.memoize = exports.memo = void 0;\nvar theme_check_common_1 = require(\"@shopify/theme-check-common\");\nObject.defineProperty(exports, \"memo\", { enumerable: true, get: function () { return theme_check_common_1.memo; } });\nObject.defineProperty(exports, \"memoize\", { enumerable: true, get: function () { return theme_check_common_1.memoize; } });\nObject.defineProperty(exports, \"parseJSON\", { enumerable: true, get: function () { return theme_check_common_1.parseJSON; } });\n__exportStar(require(\"./debounce\"), exports);\n__exportStar(require(\"./array\"), exports);\n__exportStar(require(\"./node\"), exports);\n__exportStar(require(\"./isCovered\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isCovered = isCovered;\nfunction isCovered(offset, range) {\n return range.start <= offset && offset <= range.end;\n}\n//# sourceMappingURL=isCovered.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SUPPORTED_LIQUID_DOC_TAG_HANDLES = void 0;\nexports.formatLiquidDocParameter = formatLiquidDocParameter;\nexports.formatLiquidDocTagHandle = formatLiquidDocTagHandle;\nexports.getParameterCompletionTemplate = getParameterCompletionTemplate;\nexports.formatLiquidDocContentMarkdown = formatLiquidDocContentMarkdown;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nfunction formatLiquidDocParameter({ name, type, description, required }, heading = false) {\n const nameStr = required ? `\\`${name}\\`` : `\\`${name}\\` (Optional)`;\n const typeStr = type ? `: ${type}` : '';\n if (heading) {\n const descStr = description ? `\\n\\n${description}` : '';\n return `### ${nameStr}${typeStr}${descStr}`;\n }\n const descStr = description ? ` - ${description}` : '';\n return `- ${nameStr}${typeStr}${descStr}`;\n}\nfunction formatLiquidDocTagHandle(label, description, example) {\n return `### @${label}\\n\\n${description}\\n\\n` + `**Example**\\n\\n\\`\\`\\`liquid\\n${example}\\n\\`\\`\\``;\n}\nexports.SUPPORTED_LIQUID_DOC_TAG_HANDLES = {\n [theme_check_common_1.SupportedDocTagTypes.Param]: {\n description: 'Provides information about a parameter for the snippet.\\n' +\n `- The type of parameter is optional and can be ${Object.values(theme_check_common_1.BasicParamTypes)\n .map((type) => `\\`${type}\\``)\n .join(', ')}\\n` +\n ` or liquid object that isn't exclusively a global object in our [API Docs](https://shopify.dev/docs/api/liquid/objects)\\n` +\n '- An optional parameter is denoted by square brackets around the parameter name\\n' +\n '- The description is optional Markdown text',\n example: '{% doc %}\\n' +\n \" @param {string} name - The person's name\\n\" +\n \" @param {number} [fav_num] - The person's favorite number\\n\" +\n \" @param {product} prod - The person's chosen product\\n\" +\n '{% enddoc %}\\n',\n template: `param {$2} $1$0`,\n },\n [theme_check_common_1.SupportedDocTagTypes.Example]: {\n description: 'Provides an example on how to use the snippet.',\n example: '{% doc %}\\n' + ' @example {% render \"snippet-name\", arg1: \"value\" %}\\n' + '{% enddoc %}\\n',\n template: `example $0`,\n },\n [theme_check_common_1.SupportedDocTagTypes.Description]: {\n description: 'Provides information on what the snippet does.',\n example: '{% doc %}\\n' + ' @description This snippet renders a product image.\\n' + '{% enddoc %}\\n',\n template: `description $0`,\n },\n};\nfunction getParameterCompletionTemplate(name, type) {\n const paramDefaultValue = (0, theme_check_common_1.getDefaultValueForType)(type);\n const valueTemplate = paramDefaultValue === \"''\" ? `'$1'$0` : `\\${1:${paramDefaultValue}}$0`;\n return `${name}: ${valueTemplate}`;\n}\nfunction formatLiquidDocContentMarkdown(name, docDefinition) {\n var _a, _b, _c;\n const liquidDoc = docDefinition === null || docDefinition === void 0 ? void 0 : docDefinition.liquidDoc;\n if (!liquidDoc) {\n return `### ${name}`;\n }\n const parts = [`### ${name}`];\n if (liquidDoc.description) {\n const description = liquidDoc.description.content;\n parts.push('', '**Description:**', '\\n', description);\n }\n if ((_a = liquidDoc.parameters) === null || _a === void 0 ? void 0 : _a.length) {\n const parameters = liquidDoc.parameters\n .map((param) => formatLiquidDocParameter(param))\n .join('\\n');\n parts.push('', '**Parameters:**', parameters);\n }\n if ((_b = liquidDoc.examples) === null || _b === void 0 ? void 0 : _b.length) {\n const examples = (_c = liquidDoc.examples) === null || _c === void 0 ? void 0 : _c.map(({ content }) => `\\`\\`\\`liquid\\n${content}\\n\\`\\`\\``).join('\\n');\n parts.push('', '**Examples:**', examples);\n }\n return parts.join('\\n');\n}\n//# sourceMappingURL=liquidDoc.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HtmlAttributeTypes = exports.HtmlElementTypes = void 0;\nexports.isTextNode = isTextNode;\nexports.isAttrEmpty = isAttrEmpty;\nexports.isNamedHtmlElementNode = isNamedHtmlElementNode;\nexports.getCompoundName = getCompoundName;\nexports.isHtmlAttribute = isHtmlAttribute;\nexports.isNamedLiquidTag = isNamedLiquidTag;\nexports.isLiquidVariableOutput = isLiquidVariableOutput;\nconst liquid_html_parser_1 = require(\"@shopify/liquid-html-parser\");\nexports.HtmlElementTypes = [\n liquid_html_parser_1.NodeTypes.HtmlElement,\n liquid_html_parser_1.NodeTypes.HtmlDanglingMarkerClose,\n liquid_html_parser_1.NodeTypes.HtmlSelfClosingElement,\n liquid_html_parser_1.NodeTypes.HtmlVoidElement,\n liquid_html_parser_1.NodeTypes.HtmlRawNode,\n];\nexports.HtmlAttributeTypes = [\n liquid_html_parser_1.NodeTypes.AttrUnquoted,\n liquid_html_parser_1.NodeTypes.AttrDoubleQuoted,\n liquid_html_parser_1.NodeTypes.AttrSingleQuoted,\n liquid_html_parser_1.NodeTypes.AttrEmpty,\n];\nfunction isTextNode(node) {\n return node.type === liquid_html_parser_1.NodeTypes.TextNode;\n}\nfunction isAttrEmpty(node) {\n return node.type === liquid_html_parser_1.NodeTypes.AttrEmpty;\n}\nfunction isNamedHtmlElementNode(node) {\n return exports.HtmlElementTypes.includes(node.type);\n}\nfunction getCompoundName(node) {\n if (typeof node.name === 'string')\n return node.name;\n const names = node.name;\n if (names.length === 0 || names.length > 1 || !isTextNode(names[0])) {\n return 'unknown';\n }\n return names[0].value;\n}\nfunction isHtmlAttribute(node) {\n return exports.HtmlAttributeTypes.some((type) => node.type === type);\n}\nfunction isNamedLiquidTag(node, name) {\n return node.type === liquid_html_parser_1.NodeTypes.LiquidTag && node.name === name && typeof node.markup !== 'string';\n}\nfunction isLiquidVariableOutput(node) {\n return node.type === liquid_html_parser_1.NodeTypes.LiquidVariableOutput && typeof node.markup !== 'string';\n}\n//# sourceMappingURL=node.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTemplate = exports.templateName = exports.isSectionGroup = exports.sectionGroupName = exports.isSection = exports.sectionName = exports.isBlock = exports.blockName = exports.isAsset = exports.assetName = exports.isSnippet = exports.snippetName = void 0;\nconst theme_check_common_1 = require(\"@shopify/theme-check-common\");\nconst snippetName = (uri) => theme_check_common_1.path.basename(uri, '.liquid');\nexports.snippetName = snippetName;\nconst isSnippet = (uri) => /\\bsnippets(\\\\|\\/)[^\\\\\\/]*\\.liquid/.test(uri);\nexports.isSnippet = isSnippet;\n// asset urls have their `.liquid`` removed (if present) and require the other extension */\nconst assetName = (uri) => theme_check_common_1.path.basename(uri, '.liquid');\nexports.assetName = assetName;\nconst isAsset = (uri) => /\\bassets(\\\\|\\/)[^\\\\\\/]/.test(uri);\nexports.isAsset = isAsset;\nconst blockName = (uri) => theme_check_common_1.path.basename(uri, '.liquid');\nexports.blockName = blockName;\nconst isBlock = (uri) => /\\bblocks(\\\\|\\/)[^\\\\\\/]/.test(uri);\nexports.isBlock = isBlock;\nconst sectionName = (uri) => theme_check_common_1.path.basename(uri, '.liquid');\nexports.sectionName = sectionName;\nconst isSection = (uri) => /\\bsections(\\\\|\\/)[^\\\\\\/]/.test(uri) && /.liquid$/.test(uri);\nexports.isSection = isSection;\nconst sectionGroupName = (uri) => theme_check_common_1.path.basename(uri, '.json');\nexports.sectionGroupName = sectionGroupName;\nconst isSectionGroup = (uri) => /\\bsections(\\\\|\\/)[^\\\\\\/]/.test(uri) && /.json$/.test(uri);\nexports.isSectionGroup = isSectionGroup;\nconst templateName = (uri) => theme_check_common_1.path.basename(uri, '.json');\nexports.templateName = templateName;\nconst isTemplate = (uri) => /\\btemplates(\\\\|\\/)[^\\\\\\/]/.test(uri);\nexports.isTemplate = isTemplate;\n//# sourceMappingURL=uri.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = void 0;\nconst package_json_1 = __importDefault(require(\"../package.json\"));\nexports.VERSION = package_json_1.default.version;\n//# sourceMappingURL=version.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar execOptions = { id: moduleId, module: module, factory: __webpack_modules__[moduleId], require: __webpack_require__ };\n\t__webpack_require__.i.forEach(function(handler) { handler(execOptions); });\n\tmodule = execOptions.module;\n\texecOptions.factory.call(module.exports, module, module.exports, execOptions.require);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// expose the module cache\n__webpack_require__.c = __webpack_module_cache__;\n\n// expose the module execution interceptor\n__webpack_require__.i = [];\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [\"vendors-node_modules_cross-fetch_dist_browser-ponyfill_js-node_modules_line-column_lib_line-c-6a6d49\"], () => (__webpack_require__(\"./src/language-server-worker.ts\")))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".bundle.js\";\n};","// This function allow to reference all chunks\n__webpack_require__.hu = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".\" + __webpack_require__.h() + \".hot-update.js\";\n};","__webpack_require__.hmrF = () => (\"c79446f35d8df82b1201.\" + __webpack_require__.h() + \".hot-update.json\");","__webpack_require__.h = () => (\"dd1332ce1d9a02f8d4b7\")","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","var currentModuleData = {};\nvar installedModules = __webpack_require__.c;\n\n// module and require creation\nvar currentChildModule;\nvar currentParents = [];\n\n// status\nvar registeredStatusHandlers = [];\nvar currentStatus = \"idle\";\n\n// while downloading\nvar blockingPromises = 0;\nvar blockingPromisesWaiting = [];\n\n// The update info\nvar currentUpdateApplyHandlers;\nvar queuedInvalidatedModules;\n\n__webpack_require__.hmrD = currentModuleData;\n\n__webpack_require__.i.push(function (options) {\n\tvar module = options.module;\n\tvar require = createRequire(options.require, options.id);\n\tmodule.hot = createModuleHotObject(options.id, module);\n\tmodule.parents = currentParents;\n\tmodule.children = [];\n\tcurrentParents = [];\n\toptions.require = require;\n});\n\n__webpack_require__.hmrC = {};\n__webpack_require__.hmrI = {};\n\nfunction createRequire(require, moduleId) {\n\tvar me = installedModules[moduleId];\n\tif (!me) return require;\n\tvar fn = function (request) {\n\t\tif (me.hot.active) {\n\t\t\tif (installedModules[request]) {\n\t\t\t\tvar parents = installedModules[request].parents;\n\t\t\t\tif (parents.indexOf(moduleId) === -1) {\n\t\t\t\t\tparents.push(moduleId);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentParents = [moduleId];\n\t\t\t\tcurrentChildModule = request;\n\t\t\t}\n\t\t\tif (me.children.indexOf(request) === -1) {\n\t\t\t\tme.children.push(request);\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.warn(\n\t\t\t\t\"[HMR] unexpected require(\" +\n\t\t\t\t\trequest +\n\t\t\t\t\t\") from disposed module \" +\n\t\t\t\t\tmoduleId\n\t\t\t);\n\t\t\tcurrentParents = [];\n\t\t}\n\t\treturn require(request);\n\t};\n\tvar createPropertyDescriptor = function (name) {\n\t\treturn {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: true,\n\t\t\tget: function () {\n\t\t\t\treturn require[name];\n\t\t\t},\n\t\t\tset: function (value) {\n\t\t\t\trequire[name] = value;\n\t\t\t}\n\t\t};\n\t};\n\tfor (var name in require) {\n\t\tif (Object.prototype.hasOwnProperty.call(require, name) && name !== \"e\") {\n\t\t\tObject.defineProperty(fn, name, createPropertyDescriptor(name));\n\t\t}\n\t}\n\tfn.e = function (chunkId, fetchPriority) {\n\t\treturn trackBlockingPromise(require.e(chunkId, fetchPriority));\n\t};\n\treturn fn;\n}\n\nfunction createModuleHotObject(moduleId, me) {\n\tvar _main = currentChildModule !== moduleId;\n\tvar hot = {\n\t\t// private stuff\n\t\t_acceptedDependencies: {},\n\t\t_acceptedErrorHandlers: {},\n\t\t_declinedDependencies: {},\n\t\t_selfAccepted: false,\n\t\t_selfDeclined: false,\n\t\t_selfInvalidated: false,\n\t\t_disposeHandlers: [],\n\t\t_main: _main,\n\t\t_requireSelf: function () {\n\t\t\tcurrentParents = me.parents.slice();\n\t\t\tcurrentChildModule = _main ? undefined : moduleId;\n\t\t\t__webpack_require__(moduleId);\n\t\t},\n\n\t\t// Module API\n\t\tactive: true,\n\t\taccept: function (dep, callback, errorHandler) {\n\t\t\tif (dep === undefined) hot._selfAccepted = true;\n\t\t\telse if (typeof dep === \"function\") hot._selfAccepted = dep;\n\t\t\telse if (typeof dep === \"object\" && dep !== null) {\n\t\t\t\tfor (var i = 0; i < dep.length; i++) {\n\t\t\t\t\thot._acceptedDependencies[dep[i]] = callback || function () {};\n\t\t\t\t\thot._acceptedErrorHandlers[dep[i]] = errorHandler;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thot._acceptedDependencies[dep] = callback || function () {};\n\t\t\t\thot._acceptedErrorHandlers[dep] = errorHandler;\n\t\t\t}\n\t\t},\n\t\tdecline: function (dep) {\n\t\t\tif (dep === undefined) hot._selfDeclined = true;\n\t\t\telse if (typeof dep === \"object\" && dep !== null)\n\t\t\t\tfor (var i = 0; i < dep.length; i++)\n\t\t\t\t\thot._declinedDependencies[dep[i]] = true;\n\t\t\telse hot._declinedDependencies[dep] = true;\n\t\t},\n\t\tdispose: function (callback) {\n\t\t\thot._disposeHandlers.push(callback);\n\t\t},\n\t\taddDisposeHandler: function (callback) {\n\t\t\thot._disposeHandlers.push(callback);\n\t\t},\n\t\tremoveDisposeHandler: function (callback) {\n\t\t\tvar idx = hot._disposeHandlers.indexOf(callback);\n\t\t\tif (idx >= 0) hot._disposeHandlers.splice(idx, 1);\n\t\t},\n\t\tinvalidate: function () {\n\t\t\tthis._selfInvalidated = true;\n\t\t\tswitch (currentStatus) {\n\t\t\t\tcase \"idle\":\n\t\t\t\t\tcurrentUpdateApplyHandlers = [];\n\t\t\t\t\tObject.keys(__webpack_require__.hmrI).forEach(function (key) {\n\t\t\t\t\t\t__webpack_require__.hmrI[key](\n\t\t\t\t\t\t\tmoduleId,\n\t\t\t\t\t\t\tcurrentUpdateApplyHandlers\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t\tsetStatus(\"ready\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"ready\":\n\t\t\t\t\tObject.keys(__webpack_require__.hmrI).forEach(function (key) {\n\t\t\t\t\t\t__webpack_require__.hmrI[key](\n\t\t\t\t\t\t\tmoduleId,\n\t\t\t\t\t\t\tcurrentUpdateApplyHandlers\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"prepare\":\n\t\t\t\tcase \"check\":\n\t\t\t\tcase \"dispose\":\n\t\t\t\tcase \"apply\":\n\t\t\t\t\t(queuedInvalidatedModules = queuedInvalidatedModules || []).push(\n\t\t\t\t\t\tmoduleId\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// ignore requests in error states\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\n\t\t// Management API\n\t\tcheck: hotCheck,\n\t\tapply: hotApply,\n\t\tstatus: function (l) {\n\t\t\tif (!l) return currentStatus;\n\t\t\tregisteredStatusHandlers.push(l);\n\t\t},\n\t\taddStatusHandler: function (l) {\n\t\t\tregisteredStatusHandlers.push(l);\n\t\t},\n\t\tremoveStatusHandler: function (l) {\n\t\t\tvar idx = registeredStatusHandlers.indexOf(l);\n\t\t\tif (idx >= 0) registeredStatusHandlers.splice(idx, 1);\n\t\t},\n\n\t\t// inherit from previous dispose call\n\t\tdata: currentModuleData[moduleId]\n\t};\n\tcurrentChildModule = undefined;\n\treturn hot;\n}\n\nfunction setStatus(newStatus) {\n\tcurrentStatus = newStatus;\n\tvar results = [];\n\n\tfor (var i = 0; i < registeredStatusHandlers.length; i++)\n\t\tresults[i] = registeredStatusHandlers[i].call(null, newStatus);\n\n\treturn Promise.all(results).then(function () {});\n}\n\nfunction unblock() {\n\tif (--blockingPromises === 0) {\n\t\tsetStatus(\"ready\").then(function () {\n\t\t\tif (blockingPromises === 0) {\n\t\t\t\tvar list = blockingPromisesWaiting;\n\t\t\t\tblockingPromisesWaiting = [];\n\t\t\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\t\t\tlist[i]();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction trackBlockingPromise(promise) {\n\tswitch (currentStatus) {\n\t\tcase \"ready\":\n\t\t\tsetStatus(\"prepare\");\n\t\t/* fallthrough */\n\t\tcase \"prepare\":\n\t\t\tblockingPromises++;\n\t\t\tpromise.then(unblock, unblock);\n\t\t\treturn promise;\n\t\tdefault:\n\t\t\treturn promise;\n\t}\n}\n\nfunction waitForBlockingPromises(fn) {\n\tif (blockingPromises === 0) return fn();\n\treturn new Promise(function (resolve) {\n\t\tblockingPromisesWaiting.push(function () {\n\t\t\tresolve(fn());\n\t\t});\n\t});\n}\n\nfunction hotCheck(applyOnUpdate) {\n\tif (currentStatus !== \"idle\") {\n\t\tthrow new Error(\"check() is only allowed in idle status\");\n\t}\n\treturn setStatus(\"check\")\n\t\t.then(__webpack_require__.hmrM)\n\t\t.then(function (update) {\n\t\t\tif (!update) {\n\t\t\t\treturn setStatus(applyInvalidatedModules() ? \"ready\" : \"idle\").then(\n\t\t\t\t\tfunction () {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn setStatus(\"prepare\").then(function () {\n\t\t\t\tvar updatedModules = [];\n\t\t\t\tcurrentUpdateApplyHandlers = [];\n\n\t\t\t\treturn Promise.all(\n\t\t\t\t\tObject.keys(__webpack_require__.hmrC).reduce(function (\n\t\t\t\t\t\tpromises,\n\t\t\t\t\t\tkey\n\t\t\t\t\t) {\n\t\t\t\t\t\t__webpack_require__.hmrC[key](\n\t\t\t\t\t\t\tupdate.c,\n\t\t\t\t\t\t\tupdate.r,\n\t\t\t\t\t\t\tupdate.m,\n\t\t\t\t\t\t\tpromises,\n\t\t\t\t\t\t\tcurrentUpdateApplyHandlers,\n\t\t\t\t\t\t\tupdatedModules\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn promises;\n\t\t\t\t\t}, [])\n\t\t\t\t).then(function () {\n\t\t\t\t\treturn waitForBlockingPromises(function () {\n\t\t\t\t\t\tif (applyOnUpdate) {\n\t\t\t\t\t\t\treturn internalApply(applyOnUpdate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn setStatus(\"ready\").then(function () {\n\t\t\t\t\t\t\treturn updatedModules;\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n}\n\nfunction hotApply(options) {\n\tif (currentStatus !== \"ready\") {\n\t\treturn Promise.resolve().then(function () {\n\t\t\tthrow new Error(\n\t\t\t\t\"apply() is only allowed in ready status (state: \" +\n\t\t\t\t\tcurrentStatus +\n\t\t\t\t\t\")\"\n\t\t\t);\n\t\t});\n\t}\n\treturn internalApply(options);\n}\n\nfunction internalApply(options) {\n\toptions = options || {};\n\n\tapplyInvalidatedModules();\n\n\tvar results = currentUpdateApplyHandlers.map(function (handler) {\n\t\treturn handler(options);\n\t});\n\tcurrentUpdateApplyHandlers = undefined;\n\n\tvar errors = results\n\t\t.map(function (r) {\n\t\t\treturn r.error;\n\t\t})\n\t\t.filter(Boolean);\n\n\tif (errors.length > 0) {\n\t\treturn setStatus(\"abort\").then(function () {\n\t\t\tthrow errors[0];\n\t\t});\n\t}\n\n\t// Now in \"dispose\" phase\n\tvar disposePromise = setStatus(\"dispose\");\n\n\tresults.forEach(function (result) {\n\t\tif (result.dispose) result.dispose();\n\t});\n\n\t// Now in \"apply\" phase\n\tvar applyPromise = setStatus(\"apply\");\n\n\tvar error;\n\tvar reportError = function (err) {\n\t\tif (!error) error = err;\n\t};\n\n\tvar outdatedModules = [];\n\tresults.forEach(function (result) {\n\t\tif (result.apply) {\n\t\t\tvar modules = result.apply(reportError);\n\t\t\tif (modules) {\n\t\t\t\tfor (var i = 0; i < modules.length; i++) {\n\t\t\t\t\toutdatedModules.push(modules[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\treturn Promise.all([disposePromise, applyPromise]).then(function () {\n\t\t// handle errors in accept handlers and self accepted module load\n\t\tif (error) {\n\t\t\treturn setStatus(\"fail\").then(function () {\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}\n\n\t\tif (queuedInvalidatedModules) {\n\t\t\treturn internalApply(options).then(function (list) {\n\t\t\t\toutdatedModules.forEach(function (moduleId) {\n\t\t\t\t\tif (list.indexOf(moduleId) < 0) list.push(moduleId);\n\t\t\t\t});\n\t\t\t\treturn list;\n\t\t\t});\n\t\t}\n\n\t\treturn setStatus(\"idle\").then(function () {\n\t\t\treturn outdatedModules;\n\t\t});\n\t});\n}\n\nfunction applyInvalidatedModules() {\n\tif (queuedInvalidatedModules) {\n\t\tif (!currentUpdateApplyHandlers) currentUpdateApplyHandlers = [];\n\t\tObject.keys(__webpack_require__.hmrI).forEach(function (key) {\n\t\t\tqueuedInvalidatedModules.forEach(function (moduleId) {\n\t\t\t\t__webpack_require__.hmrI[key](\n\t\t\t\t\tmoduleId,\n\t\t\t\t\tcurrentUpdateApplyHandlers\n\t\t\t\t);\n\t\t\t});\n\t\t});\n\t\tqueuedInvalidatedModules = undefined;\n\t\treturn true;\n\t}\n}","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","// no baseURI\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = __webpack_require__.hmrS_importScripts = __webpack_require__.hmrS_importScripts || {\n\t\"src_language-server-worker_ts\": 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunk\"] = self[\"webpackChunk\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\nfunction loadUpdateChunk(chunkId, updatedModulesList) {\n\tvar success = false;\n\tself[\"webpackHotUpdate\"] = (_, moreModules, runtime) => {\n\t\tfor(var moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\tcurrentUpdate[moduleId] = moreModules[moduleId];\n\t\t\t\tif(updatedModulesList) updatedModulesList.push(moduleId);\n\t\t\t}\n\t\t}\n\t\tif(runtime) currentUpdateRuntime.push(runtime);\n\t\tsuccess = true;\n\t};\n\t// start update chunk loading\n\timportScripts(__webpack_require__.p + __webpack_require__.hu(chunkId));\n\tif(!success) throw new Error(\"Loading update chunk failed for unknown reason\");\n}\n\nvar currentUpdateChunks;\nvar currentUpdate;\nvar currentUpdateRemovedChunks;\nvar currentUpdateRuntime;\nfunction applyHandler(options) {\n\tif (__webpack_require__.f) delete __webpack_require__.f.importScriptsHmr;\n\tcurrentUpdateChunks = undefined;\n\tfunction getAffectedModuleEffects(updateModuleId) {\n\t\tvar outdatedModules = [updateModuleId];\n\t\tvar outdatedDependencies = {};\n\n\t\tvar queue = outdatedModules.map(function (id) {\n\t\t\treturn {\n\t\t\t\tchain: [id],\n\t\t\t\tid: id\n\t\t\t};\n\t\t});\n\t\twhile (queue.length > 0) {\n\t\t\tvar queueItem = queue.pop();\n\t\t\tvar moduleId = queueItem.id;\n\t\t\tvar chain = queueItem.chain;\n\t\t\tvar module = __webpack_require__.c[moduleId];\n\t\t\tif (\n\t\t\t\t!module ||\n\t\t\t\t(module.hot._selfAccepted && !module.hot._selfInvalidated)\n\t\t\t)\n\t\t\t\tcontinue;\n\t\t\tif (module.hot._selfDeclined) {\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"self-declined\",\n\t\t\t\t\tchain: chain,\n\t\t\t\t\tmoduleId: moduleId\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (module.hot._main) {\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"unaccepted\",\n\t\t\t\t\tchain: chain,\n\t\t\t\t\tmoduleId: moduleId\n\t\t\t\t};\n\t\t\t}\n\t\t\tfor (var i = 0; i < module.parents.length; i++) {\n\t\t\t\tvar parentId = module.parents[i];\n\t\t\t\tvar parent = __webpack_require__.c[parentId];\n\t\t\t\tif (!parent) continue;\n\t\t\t\tif (parent.hot._declinedDependencies[moduleId]) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: \"declined\",\n\t\t\t\t\t\tchain: chain.concat([parentId]),\n\t\t\t\t\t\tmoduleId: moduleId,\n\t\t\t\t\t\tparentId: parentId\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (outdatedModules.indexOf(parentId) !== -1) continue;\n\t\t\t\tif (parent.hot._acceptedDependencies[moduleId]) {\n\t\t\t\t\tif (!outdatedDependencies[parentId])\n\t\t\t\t\t\toutdatedDependencies[parentId] = [];\n\t\t\t\t\taddAllToSet(outdatedDependencies[parentId], [moduleId]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tdelete outdatedDependencies[parentId];\n\t\t\t\toutdatedModules.push(parentId);\n\t\t\t\tqueue.push({\n\t\t\t\t\tchain: chain.concat([parentId]),\n\t\t\t\t\tid: parentId\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\ttype: \"accepted\",\n\t\t\tmoduleId: updateModuleId,\n\t\t\toutdatedModules: outdatedModules,\n\t\t\toutdatedDependencies: outdatedDependencies\n\t\t};\n\t}\n\n\tfunction addAllToSet(a, b) {\n\t\tfor (var i = 0; i < b.length; i++) {\n\t\t\tvar item = b[i];\n\t\t\tif (a.indexOf(item) === -1) a.push(item);\n\t\t}\n\t}\n\n\t// at begin all updates modules are outdated\n\t// the \"outdated\" status can propagate to parents if they don't accept the children\n\tvar outdatedDependencies = {};\n\tvar outdatedModules = [];\n\tvar appliedUpdate = {};\n\n\tvar warnUnexpectedRequire = function warnUnexpectedRequire(module) {\n\t\tconsole.warn(\n\t\t\t\"[HMR] unexpected require(\" + module.id + \") to disposed module\"\n\t\t);\n\t};\n\n\tfor (var moduleId in currentUpdate) {\n\t\tif (__webpack_require__.o(currentUpdate, moduleId)) {\n\t\t\tvar newModuleFactory = currentUpdate[moduleId];\n\t\t\t/** @type {TODO} */\n\t\t\tvar result = newModuleFactory\n\t\t\t\t? getAffectedModuleEffects(moduleId)\n\t\t\t\t: {\n\t\t\t\t\t\ttype: \"disposed\",\n\t\t\t\t\t\tmoduleId: moduleId\n\t\t\t\t\t};\n\t\t\t/** @type {Error|false} */\n\t\t\tvar abortError = false;\n\t\t\tvar doApply = false;\n\t\t\tvar doDispose = false;\n\t\t\tvar chainInfo = \"\";\n\t\t\tif (result.chain) {\n\t\t\t\tchainInfo = \"\\nUpdate propagation: \" + result.chain.join(\" -> \");\n\t\t\t}\n\t\t\tswitch (result.type) {\n\t\t\t\tcase \"self-declined\":\n\t\t\t\t\tif (options.onDeclined) options.onDeclined(result);\n\t\t\t\t\tif (!options.ignoreDeclined)\n\t\t\t\t\t\tabortError = new Error(\n\t\t\t\t\t\t\t\"Aborted because of self decline: \" +\n\t\t\t\t\t\t\t\tresult.moduleId +\n\t\t\t\t\t\t\t\tchainInfo\n\t\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"declined\":\n\t\t\t\t\tif (options.onDeclined) options.onDeclined(result);\n\t\t\t\t\tif (!options.ignoreDeclined)\n\t\t\t\t\t\tabortError = new Error(\n\t\t\t\t\t\t\t\"Aborted because of declined dependency: \" +\n\t\t\t\t\t\t\t\tresult.moduleId +\n\t\t\t\t\t\t\t\t\" in \" +\n\t\t\t\t\t\t\t\tresult.parentId +\n\t\t\t\t\t\t\t\tchainInfo\n\t\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"unaccepted\":\n\t\t\t\t\tif (options.onUnaccepted) options.onUnaccepted(result);\n\t\t\t\t\tif (!options.ignoreUnaccepted)\n\t\t\t\t\t\tabortError = new Error(\n\t\t\t\t\t\t\t\"Aborted because \" + moduleId + \" is not accepted\" + chainInfo\n\t\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"accepted\":\n\t\t\t\t\tif (options.onAccepted) options.onAccepted(result);\n\t\t\t\t\tdoApply = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"disposed\":\n\t\t\t\t\tif (options.onDisposed) options.onDisposed(result);\n\t\t\t\t\tdoDispose = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error(\"Unexception type \" + result.type);\n\t\t\t}\n\t\t\tif (abortError) {\n\t\t\t\treturn {\n\t\t\t\t\terror: abortError\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (doApply) {\n\t\t\t\tappliedUpdate[moduleId] = newModuleFactory;\n\t\t\t\taddAllToSet(outdatedModules, result.outdatedModules);\n\t\t\t\tfor (moduleId in result.outdatedDependencies) {\n\t\t\t\t\tif (__webpack_require__.o(result.outdatedDependencies, moduleId)) {\n\t\t\t\t\t\tif (!outdatedDependencies[moduleId])\n\t\t\t\t\t\t\toutdatedDependencies[moduleId] = [];\n\t\t\t\t\t\taddAllToSet(\n\t\t\t\t\t\t\toutdatedDependencies[moduleId],\n\t\t\t\t\t\t\tresult.outdatedDependencies[moduleId]\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (doDispose) {\n\t\t\t\taddAllToSet(outdatedModules, [result.moduleId]);\n\t\t\t\tappliedUpdate[moduleId] = warnUnexpectedRequire;\n\t\t\t}\n\t\t}\n\t}\n\tcurrentUpdate = undefined;\n\n\t// Store self accepted outdated modules to require them later by the module system\n\tvar outdatedSelfAcceptedModules = [];\n\tfor (var j = 0; j < outdatedModules.length; j++) {\n\t\tvar outdatedModuleId = outdatedModules[j];\n\t\tvar module = __webpack_require__.c[outdatedModuleId];\n\t\tif (\n\t\t\tmodule &&\n\t\t\t(module.hot._selfAccepted || module.hot._main) &&\n\t\t\t// removed self-accepted modules should not be required\n\t\t\tappliedUpdate[outdatedModuleId] !== warnUnexpectedRequire &&\n\t\t\t// when called invalidate self-accepting is not possible\n\t\t\t!module.hot._selfInvalidated\n\t\t) {\n\t\t\toutdatedSelfAcceptedModules.push({\n\t\t\t\tmodule: outdatedModuleId,\n\t\t\t\trequire: module.hot._requireSelf,\n\t\t\t\terrorHandler: module.hot._selfAccepted\n\t\t\t});\n\t\t}\n\t}\n\n\tvar moduleOutdatedDependencies;\n\n\treturn {\n\t\tdispose: function () {\n\t\t\tcurrentUpdateRemovedChunks.forEach(function (chunkId) {\n\t\t\t\tdelete installedChunks[chunkId];\n\t\t\t});\n\t\t\tcurrentUpdateRemovedChunks = undefined;\n\n\t\t\tvar idx;\n\t\t\tvar queue = outdatedModules.slice();\n\t\t\twhile (queue.length > 0) {\n\t\t\t\tvar moduleId = queue.pop();\n\t\t\t\tvar module = __webpack_require__.c[moduleId];\n\t\t\t\tif (!module) continue;\n\n\t\t\t\tvar data = {};\n\n\t\t\t\t// Call dispose handlers\n\t\t\t\tvar disposeHandlers = module.hot._disposeHandlers;\n\t\t\t\tfor (j = 0; j < disposeHandlers.length; j++) {\n\t\t\t\t\tdisposeHandlers[j].call(null, data);\n\t\t\t\t}\n\t\t\t\t__webpack_require__.hmrD[moduleId] = data;\n\n\t\t\t\t// disable module (this disables requires from this module)\n\t\t\t\tmodule.hot.active = false;\n\n\t\t\t\t// remove module from cache\n\t\t\t\tdelete __webpack_require__.c[moduleId];\n\n\t\t\t\t// when disposing there is no need to call dispose handler\n\t\t\t\tdelete outdatedDependencies[moduleId];\n\n\t\t\t\t// remove \"parents\" references from all children\n\t\t\t\tfor (j = 0; j < module.children.length; j++) {\n\t\t\t\t\tvar child = __webpack_require__.c[module.children[j]];\n\t\t\t\t\tif (!child) continue;\n\t\t\t\t\tidx = child.parents.indexOf(moduleId);\n\t\t\t\t\tif (idx >= 0) {\n\t\t\t\t\t\tchild.parents.splice(idx, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// remove outdated dependency from module children\n\t\t\tvar dependency;\n\t\t\tfor (var outdatedModuleId in outdatedDependencies) {\n\t\t\t\tif (__webpack_require__.o(outdatedDependencies, outdatedModuleId)) {\n\t\t\t\t\tmodule = __webpack_require__.c[outdatedModuleId];\n\t\t\t\t\tif (module) {\n\t\t\t\t\t\tmoduleOutdatedDependencies =\n\t\t\t\t\t\t\toutdatedDependencies[outdatedModuleId];\n\t\t\t\t\t\tfor (j = 0; j < moduleOutdatedDependencies.length; j++) {\n\t\t\t\t\t\t\tdependency = moduleOutdatedDependencies[j];\n\t\t\t\t\t\t\tidx = module.children.indexOf(dependency);\n\t\t\t\t\t\t\tif (idx >= 0) module.children.splice(idx, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tapply: function (reportError) {\n\t\t\t// insert new code\n\t\t\tfor (var updateModuleId in appliedUpdate) {\n\t\t\t\tif (__webpack_require__.o(appliedUpdate, updateModuleId)) {\n\t\t\t\t\t__webpack_require__.m[updateModuleId] = appliedUpdate[updateModuleId];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// run new runtime modules\n\t\t\tfor (var i = 0; i < currentUpdateRuntime.length; i++) {\n\t\t\t\tcurrentUpdateRuntime[i](__webpack_require__);\n\t\t\t}\n\n\t\t\t// call accept handlers\n\t\t\tfor (var outdatedModuleId in outdatedDependencies) {\n\t\t\t\tif (__webpack_require__.o(outdatedDependencies, outdatedModuleId)) {\n\t\t\t\t\tvar module = __webpack_require__.c[outdatedModuleId];\n\t\t\t\t\tif (module) {\n\t\t\t\t\t\tmoduleOutdatedDependencies =\n\t\t\t\t\t\t\toutdatedDependencies[outdatedModuleId];\n\t\t\t\t\t\tvar callbacks = [];\n\t\t\t\t\t\tvar errorHandlers = [];\n\t\t\t\t\t\tvar dependenciesForCallbacks = [];\n\t\t\t\t\t\tfor (var j = 0; j < moduleOutdatedDependencies.length; j++) {\n\t\t\t\t\t\t\tvar dependency = moduleOutdatedDependencies[j];\n\t\t\t\t\t\t\tvar acceptCallback =\n\t\t\t\t\t\t\t\tmodule.hot._acceptedDependencies[dependency];\n\t\t\t\t\t\t\tvar errorHandler =\n\t\t\t\t\t\t\t\tmodule.hot._acceptedErrorHandlers[dependency];\n\t\t\t\t\t\t\tif (acceptCallback) {\n\t\t\t\t\t\t\t\tif (callbacks.indexOf(acceptCallback) !== -1) continue;\n\t\t\t\t\t\t\t\tcallbacks.push(acceptCallback);\n\t\t\t\t\t\t\t\terrorHandlers.push(errorHandler);\n\t\t\t\t\t\t\t\tdependenciesForCallbacks.push(dependency);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (var k = 0; k < callbacks.length; k++) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcallbacks[k].call(null, moduleOutdatedDependencies);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tif (typeof errorHandlers[k] === \"function\") {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\terrorHandlers[k](err, {\n\t\t\t\t\t\t\t\t\t\t\tmoduleId: outdatedModuleId,\n\t\t\t\t\t\t\t\t\t\t\tdependencyId: dependenciesForCallbacks[k]\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} catch (err2) {\n\t\t\t\t\t\t\t\t\t\tif (options.onErrored) {\n\t\t\t\t\t\t\t\t\t\t\toptions.onErrored({\n\t\t\t\t\t\t\t\t\t\t\t\ttype: \"accept-error-handler-errored\",\n\t\t\t\t\t\t\t\t\t\t\t\tmoduleId: outdatedModuleId,\n\t\t\t\t\t\t\t\t\t\t\t\tdependencyId: dependenciesForCallbacks[k],\n\t\t\t\t\t\t\t\t\t\t\t\terror: err2,\n\t\t\t\t\t\t\t\t\t\t\t\toriginalError: err\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (!options.ignoreErrored) {\n\t\t\t\t\t\t\t\t\t\t\treportError(err2);\n\t\t\t\t\t\t\t\t\t\t\treportError(err);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif (options.onErrored) {\n\t\t\t\t\t\t\t\t\t\toptions.onErrored({\n\t\t\t\t\t\t\t\t\t\t\ttype: \"accept-errored\",\n\t\t\t\t\t\t\t\t\t\t\tmoduleId: outdatedModuleId,\n\t\t\t\t\t\t\t\t\t\t\tdependencyId: dependenciesForCallbacks[k],\n\t\t\t\t\t\t\t\t\t\t\terror: err\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (!options.ignoreErrored) {\n\t\t\t\t\t\t\t\t\t\treportError(err);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Load self accepted modules\n\t\t\tfor (var o = 0; o < outdatedSelfAcceptedModules.length; o++) {\n\t\t\t\tvar item = outdatedSelfAcceptedModules[o];\n\t\t\t\tvar moduleId = item.module;\n\t\t\t\ttry {\n\t\t\t\t\titem.require(moduleId);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tif (typeof item.errorHandler === \"function\") {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\titem.errorHandler(err, {\n\t\t\t\t\t\t\t\tmoduleId: moduleId,\n\t\t\t\t\t\t\t\tmodule: __webpack_require__.c[moduleId]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch (err1) {\n\t\t\t\t\t\t\tif (options.onErrored) {\n\t\t\t\t\t\t\t\toptions.onErrored({\n\t\t\t\t\t\t\t\t\ttype: \"self-accept-error-handler-errored\",\n\t\t\t\t\t\t\t\t\tmoduleId: moduleId,\n\t\t\t\t\t\t\t\t\terror: err1,\n\t\t\t\t\t\t\t\t\toriginalError: err\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!options.ignoreErrored) {\n\t\t\t\t\t\t\t\treportError(err1);\n\t\t\t\t\t\t\t\treportError(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (options.onErrored) {\n\t\t\t\t\t\t\toptions.onErrored({\n\t\t\t\t\t\t\t\ttype: \"self-accept-errored\",\n\t\t\t\t\t\t\t\tmoduleId: moduleId,\n\t\t\t\t\t\t\t\terror: err\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!options.ignoreErrored) {\n\t\t\t\t\t\t\treportError(err);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn outdatedModules;\n\t\t}\n\t};\n}\n__webpack_require__.hmrI.importScripts = function (moduleId, applyHandlers) {\n\tif (!currentUpdate) {\n\t\tcurrentUpdate = {};\n\t\tcurrentUpdateRuntime = [];\n\t\tcurrentUpdateRemovedChunks = [];\n\t\tapplyHandlers.push(applyHandler);\n\t}\n\tif (!__webpack_require__.o(currentUpdate, moduleId)) {\n\t\tcurrentUpdate[moduleId] = __webpack_require__.m[moduleId];\n\t}\n};\n__webpack_require__.hmrC.importScripts = function (\n\tchunkIds,\n\tremovedChunks,\n\tremovedModules,\n\tpromises,\n\tapplyHandlers,\n\tupdatedModulesList\n) {\n\tapplyHandlers.push(applyHandler);\n\tcurrentUpdateChunks = {};\n\tcurrentUpdateRemovedChunks = removedChunks;\n\tcurrentUpdate = removedModules.reduce(function (obj, key) {\n\t\tobj[key] = false;\n\t\treturn obj;\n\t}, {});\n\tcurrentUpdateRuntime = [];\n\tchunkIds.forEach(function (chunkId) {\n\t\tif (\n\t\t\t__webpack_require__.o(installedChunks, chunkId) &&\n\t\t\tinstalledChunks[chunkId] !== undefined\n\t\t) {\n\t\t\tpromises.push(loadUpdateChunk(chunkId, updatedModulesList));\n\t\t\tcurrentUpdateChunks[chunkId] = true;\n\t\t} else {\n\t\t\tcurrentUpdateChunks[chunkId] = false;\n\t\t}\n\t});\n\tif (__webpack_require__.f) {\n\t\t__webpack_require__.f.importScriptsHmr = function (chunkId, promises) {\n\t\t\tif (\n\t\t\t\tcurrentUpdateChunks &&\n\t\t\t\t__webpack_require__.o(currentUpdateChunks, chunkId) &&\n\t\t\t\t!currentUpdateChunks[chunkId]\n\t\t\t) {\n\t\t\t\tpromises.push(loadUpdateChunk(chunkId));\n\t\t\t\tcurrentUpdateChunks[chunkId] = true;\n\t\t\t}\n\t\t};\n\t}\n};\n\n__webpack_require__.hmrM = () => {\n\tif (typeof fetch === \"undefined\") throw new Error(\"No browser support: need fetch API\");\n\treturn fetch(__webpack_require__.p + __webpack_require__.hmrF()).then((response) => {\n\t\tif(response.status === 404) return; // no update available\n\t\tif(!response.ok) throw new Error(\"Failed to fetch update manifest \" + response.statusText);\n\t\treturn response.json();\n\t});\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn __webpack_require__.e(\"vendors-node_modules_cross-fetch_dist_browser-ponyfill_js-node_modules_line-column_lib_line-c-6a6d49\").then(next);\n};","","// module cache are used so entry inlining is disabled\n// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n",""],"names":[],"sourceRoot":""}
|