halo-pc 1.0.25 → 1.0.26
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{Article-B85JcyzM.js → Article-BNacU3kR.js} +65 -71
- package/dist/{ArticleFooter-BCHVxIWa.js → ArticleFooter-Ya07aLYn.js} +17 -23
- package/dist/Autocomplete-Bud53PPx.js +48 -0
- package/dist/Autocomplete-CfE5ZKi2.js +49 -0
- package/dist/{Autocomplete-DUmzcj_9.js → Autocomplete-CyXE-g54.js} +1 -1
- package/dist/{CSharp-CLKgbbVS.js → CSharp-DQLgcbTQ.js} +1 -1
- package/dist/{Calender-DIjZoC1-.js → Calender-YujFxcgS.js} +1 -1
- package/dist/Callback-BaFg5U2u.js +20 -0
- package/dist/Cascader-C1kyNib7.js +41 -0
- package/dist/Cascader-D5PO9zK9.js +81 -0
- package/dist/Checkbox-CUtyT8l7.js +70 -0
- package/dist/{Checkbox-BJjYhPvp.js → Checkbox-Dkqh7eR4.js} +1 -1
- package/dist/Code-C160-nQS.js +54 -0
- package/dist/Code-DXkJ6x5_.js +4 -0
- package/dist/{Code-C5fE_bvq.js → Code-Dszcah6J.js} +1 -1
- package/dist/Code-pe9JMCAj.js +36 -0
- package/dist/Code.vue_vue_type_style_index_0_lang-B1dEEN-z.js +59 -0
- package/dist/Column-C3j98RGT.js +69 -0
- package/dist/Comment-DIrY0RiI.js +98 -0
- package/dist/Compare-5j7MYou6.js +38 -0
- package/dist/{Compare-DICZHIEn.js → Compare-DKLN4wT4.js} +18 -24
- package/dist/Copy-Go_1uhB5.js +43 -0
- package/dist/Custom-C00oYEFm.js +51 -0
- package/dist/{DataExport-f8caAI4D.js → DataExport-CFjE1loi.js} +1 -1
- package/dist/{DataExport.vue_vue_type_script_setup_true_lang-CbiPENFw.js → DataExport.vue_vue_type_script_setup_true_lang-yTe6V3Dn.js} +36 -41
- package/dist/{DataImport-CZaVBfZq.js → DataImport-BQ0rieu8.js} +1 -1
- package/dist/DataImport.vue_vue_type_script_setup_true_lang-LYppKTfv.js +172 -0
- package/dist/{Date-DtHzdllB.js → Date-C5WCVXDU.js} +1 -1
- package/dist/Date-uHiOL-PD.js +37 -0
- package/dist/DateRange-B-HjKQpJ.js +57 -0
- package/dist/{DateTime-G4F8DiCI.js → DateTime-BrsWm90_.js} +1 -1
- package/dist/DateTime-D4Ck5hBj.js +38 -0
- package/dist/{DateTimeRange-CG9K8X5b.js → DateTimeRange-DjIp1SAX.js} +11 -17
- package/dist/Daterange-DiZUFL_F.js +57 -0
- package/dist/{Decimal-iKOftOtx.js → Decimal-_6FobwTd.js} +1 -1
- package/dist/Delete-C46eSfMC.js +56 -0
- package/dist/{Detail-syloerEZ.js → Detail-BMbiENm0.js} +14 -20
- package/dist/Dictionary-Dga6kbof.js +55 -0
- package/dist/Email-PVk9gqfn.js +48 -0
- package/dist/{File-IQG0slBy.js → File-B9Q2QOa-.js} +22 -28
- package/dist/{Image-BRH98A7N.js → Image-CzOq81lm.js} +1 -1
- package/dist/{Index-CnqiNw5R.js → Index-BmVFh23J.js} +1 -1
- package/dist/Index-CfDvQD94.js +4 -0
- package/dist/Index-Cq20wsZC.js +173 -0
- package/dist/Index-DGiRkT-p.js +4 -0
- package/dist/{Index-CttpoRk-.js → Index-DJz-eVVd.js} +20 -25
- package/dist/{Index-BqseRji6.js → Index-DvfJmbPU.js} +1 -1
- package/dist/Index-DyK_nYp9.js +4 -0
- package/dist/Index-z5MnS_Wq.js +4 -0
- package/dist/{Index.vue_vue_type_script_setup_true_lang-Cx8eXCsw.js → Index.vue_vue_type_script_setup_true_lang-BpU5b5wU.js} +16 -22
- package/dist/{Index.vue_vue_type_script_setup_true_lang-C0QNQ1MJ.js → Index.vue_vue_type_script_setup_true_lang-ExArYWR3.js} +14 -20
- package/dist/{Install-BEeQqQzM.js → Install-CXj-qqao.js} +21 -27
- package/dist/Int-BG6MD24t.js +38 -0
- package/dist/Int-Dc7h_7Ga.js +41 -0
- package/dist/List-EDwPH8aL.js +73 -0
- package/dist/Maintaince-BqvMHxH0.js +14 -0
- package/dist/{Markdown-DR4rlU3-.js → Markdown-CdP4Uf3M.js} +1 -1
- package/dist/Month-8mDUGsOp.js +37 -0
- package/dist/{Month-BRuj2vZ-.js → Month-BUvqsSfA.js} +1 -1
- package/dist/Month-ClGd6IhI.js +38 -0
- package/dist/{Normal-B6h5U5-c.js → Normal-DUlWYlcs.js} +94 -99
- package/dist/Paging-D_ticCtb.js +94 -0
- package/dist/{PagingHeader-BEfi7NBv.js → PagingHeader-aZb0fGRv.js} +24 -30
- package/dist/{PagingRow-C-l9v-bo.js → PagingRow-_H7tCWDM.js} +20 -26
- package/dist/QueryApi-S0e3c6l0.js +13 -0
- package/dist/{Racebar-BdLTF_ZH.js → Racebar-DESsxoi9.js} +37 -42
- package/dist/{Radio-DVmzOE7P.js → Radio-ChF3_bX0.js} +1 -1
- package/dist/{Register-CQSkhKvF.js → Register-Du5lRabU.js} +70 -75
- package/dist/RichText-BJVvArGS.js +41 -0
- package/dist/{SearchFooter-CKOh4Fzz.js → SearchFooter-HjKH1gD5.js} +1 -1
- package/dist/{SearchFooter.vue_vue_type_style_index_0_lang-D6xp89r9.js → SearchFooter.vue_vue_type_style_index_0_lang-CeQ2BcOI.js} +1 -1
- package/dist/{SearchForm-WtocjgIQ.js → SearchForm-C-o0Orkp.js} +1 -1
- package/dist/{SearchForm.vue_vue_type_style_index_0_lang-DFqj7f23.js → SearchForm.vue_vue_type_style_index_0_lang-BijR_gZY.js} +40 -45
- package/dist/{Select-DuHwIGlP.js → Select-CYaWHcWs.js} +20 -26
- package/dist/{Select-RG1Hkpw4.js → Select-DgKzH1gD.js} +28 -34
- package/dist/{Select-CGC68XKI.js → Select-DrybbaWb.js} +1 -1
- package/dist/{Single-PROE_P9A.js → Single-B-253IzX.js} +106 -111
- package/dist/{Statistic-R1oy4jve.js → Statistic-B7Tib1eh.js} +24 -29
- package/dist/{Stock-Dzlxs_TK.js → Stock-BBcnzi6G.js} +1 -1
- package/dist/{Stock-zGPixaHC.js → Stock-DuyZiPxv.js} +1 -1
- package/dist/{Stock.vue_vue_type_style_index_0_lang-DAlvmXf0.js → Stock.vue_vue_type_style_index_0_lang-B6E5USSu.js} +24 -29
- package/dist/{Switch-y8TGQEHX.js → Switch-DP-_EUOK.js} +1 -1
- package/dist/{Table-D--KFpz3.js → Table-2jZ0ISz7.js} +68 -74
- package/dist/{Table-NDlPEOwH.js → Table-hHG9kq1I.js} +81 -85
- package/dist/Text-C70dFJLS.js +4 -0
- package/dist/{Text-BkKR1LPU.js → Text-RsldE1sr.js} +12 -18
- package/dist/{Text-DXGzwZnW.js → Text-lak-4VnA.js} +15 -21
- package/dist/Text.vue_vue_type_style_index_0_lang-BP6k7KJG.js +53 -0
- package/dist/TextLink-C-NU-oVe.js +59 -0
- package/dist/{Textarea-C4PlCQXP.js → Textarea-QGa_EKSl.js} +1 -1
- package/dist/Time-BgWPjGd1.js +37 -0
- package/dist/Timeline-CBWcOVdY.js +53 -0
- package/dist/Tree--dJKRJvG.js +117 -0
- package/dist/{Tree-DzfCEHVR.js → Tree-B2fZE9Qf.js} +107 -112
- package/dist/TreeNode-CxTzNQo9.js +37 -0
- package/dist/{Update-BzPazrMP.js → Update-BqQGp_9h.js} +12 -18
- package/dist/{UpdateChild-BvIiamkv.js → UpdateChild-DejVqKrE.js} +17 -23
- package/dist/Upload-9z5VIixQ.js +146 -0
- package/dist/Upload-tlSQp2Qu.js +67 -0
- package/dist/UploadApi-B2dxOS0T.js +13 -0
- package/dist/{Year-DJPzJlot.js → Year-CrN8Fl5U.js} +1 -1
- package/dist/Year-DNDyqe5X.js +41 -0
- package/dist/main-D3_7YhaK.js +15700 -0
- package/dist/main.js +35 -36
- package/esm/@types/CreatePcOptions.d.ts +15 -0
- package/esm/@types/index.d.ts +2 -0
- package/esm/coms/business/@types/CrudProps.d.ts +22 -0
- package/esm/coms/business/@types/DrawerProps.d.ts +14 -0
- package/esm/coms/business/@types/DriverProps.d.ts +63 -0
- package/esm/coms/business/@types/FormProps.d.ts +18 -0
- package/esm/coms/business/@types/index.d.ts +5 -0
- package/esm/coms/business/Crud.vue.d.ts +1 -1
- package/esm/coms/business/Drawer.vue.d.ts +1 -1
- package/esm/coms/business/Driver.vue.d.ts +1 -1
- package/esm/coms/business/Form.vue.d.ts +1 -1
- package/esm/coms/business/index.d.ts +1 -1
- package/esm/coms/commons/@types/TableProps.d.ts +22 -0
- package/esm/coms/commons/@types/index.d.ts +2 -0
- package/esm/coms/commons/Table.vue.d.ts +1 -1
- package/esm/coms/commons/index.d.ts +1 -1
- package/esm/coms/controls/@types/ControlProps.d.ts +26 -0
- package/esm/coms/controls/@types/index.d.ts +2 -0
- package/esm/coms/controls/Autocomplete.vue.d.ts +1 -1
- package/esm/coms/controls/Cascader.vue.d.ts +1 -1
- package/esm/coms/controls/Checkbox.vue.d.ts +1 -1
- package/esm/coms/controls/Code.vue.d.ts +1 -1
- package/esm/coms/controls/Color.vue.d.ts +1 -1
- package/esm/coms/controls/Compare.vue.d.ts +1 -1
- package/esm/coms/controls/Date.vue.d.ts +1 -1
- package/esm/coms/controls/DateRange.vue.d.ts +1 -1
- package/esm/coms/controls/DateTime.vue.d.ts +1 -1
- package/esm/coms/controls/DateTimeRange.vue.d.ts +1 -1
- package/esm/coms/controls/Decimal.vue.d.ts +1 -1
- package/esm/coms/controls/Email.vue.d.ts +1 -1
- package/esm/coms/controls/Index.vue.d.ts +1 -1
- package/esm/coms/controls/Int.vue.d.ts +1 -1
- package/esm/coms/controls/Markdown.vue.d.ts +1 -1
- package/esm/coms/controls/Month.vue.d.ts +1 -1
- package/esm/coms/controls/Password.vue.d.ts +1 -1
- package/esm/coms/controls/Progress.vue.d.ts +1 -1
- package/esm/coms/controls/Radio.vue.d.ts +1 -1
- package/esm/coms/controls/Rate.vue.d.ts +1 -1
- package/esm/coms/controls/RichText.vue.d.ts +1 -1
- package/esm/coms/controls/Select.vue.d.ts +1 -1
- package/esm/coms/controls/Switch.vue.d.ts +1 -1
- package/esm/coms/controls/Text.vue.d.ts +1 -1
- package/esm/coms/controls/Textarea.vue.d.ts +1 -1
- package/esm/coms/controls/Time.vue.d.ts +1 -1
- package/esm/coms/controls/Upload.vue.d.ts +1 -1
- package/esm/coms/controls/Year.vue.d.ts +1 -1
- package/esm/coms/controls/index.d.ts +1 -1
- package/esm/coms/globals/@types/WindowOptions.d.ts +38 -0
- package/esm/coms/globals/@types/WindowProps.d.ts +27 -0
- package/esm/coms/globals/@types/index.d.ts +3 -0
- package/esm/coms/globals/Window.vue.d.ts +1 -1
- package/esm/coms/globals/index.d.ts +1 -1
- package/esm/coms/layouts/@types/ITaskBar.d.ts +6 -0
- package/esm/coms/layouts/@types/index.d.ts +2 -0
- package/esm/coms/layouts/index.d.ts +1 -1
- package/esm/coms/lists/@types/ListProps.d.ts +15 -0
- package/esm/coms/lists/@types/index.d.ts +2 -0
- package/esm/coms/lists/Racebar.vue.d.ts +1 -1
- package/esm/coms/lists/Statistic.vue.d.ts +1 -1
- package/esm/coms/lists/Stock.vue.d.ts +1 -1
- package/esm/coms/lists/Timeline.vue.d.ts +1 -1
- package/esm/coms/lists/Tree.vue.d.ts +1 -1
- package/esm/coms/lists/index.d.ts +1 -1
- package/esm/coms/pages/@types/ColumnPageProps.d.ts +11 -0
- package/esm/coms/pages/@types/CustomPageProps.d.ts +11 -0
- package/esm/coms/pages/@types/DeletePageProps.d.ts +15 -0
- package/esm/coms/pages/@types/KeyboardType.d.ts +8 -0
- package/esm/coms/pages/@types/ListPageProps.d.ts +15 -0
- package/esm/coms/pages/@types/PageEmit.d.ts +22 -0
- package/esm/coms/pages/@types/PageProps.d.ts +14 -0
- package/esm/coms/pages/@types/PagingPageProps.d.ts +15 -0
- package/esm/coms/pages/@types/SchemaProps.d.ts +30 -0
- package/esm/coms/pages/@types/SinglePageProps.d.ts +15 -0
- package/esm/coms/pages/@types/index.d.ts +11 -0
- package/esm/coms/pages/Column.vue.d.ts +1 -1
- package/esm/coms/pages/Custom.vue.d.ts +1 -1
- package/esm/coms/pages/Delete.vue.d.ts +1 -1
- package/esm/coms/pages/List.vue.d.ts +1 -1
- package/esm/coms/pages/Paging.vue.d.ts +1 -1
- package/esm/coms/pages/Single.vue.d.ts +1 -1
- package/esm/coms/pages/index.d.ts +1 -1
- package/esm/coms/pagings/@types/PagingProps.d.ts +11 -0
- package/esm/coms/pagings/@types/index.d.ts +2 -0
- package/esm/coms/pagings/Article.vue.d.ts +1 -1
- package/esm/coms/pagings/Code.vue.d.ts +1 -1
- package/esm/coms/pagings/File.vue.d.ts +1 -1
- package/esm/coms/pagings/Index.vue.d.ts +1 -1
- package/esm/coms/pagings/Table.vue.d.ts +1 -1
- package/esm/coms/pagings/index.d.ts +1 -1
- package/esm/coms/panels/@types/OperationProps.d.ts +10 -0
- package/esm/coms/panels/@types/index.d.ts +2 -0
- package/esm/coms/panels/Operation.vue.d.ts +1 -1
- package/esm/coms/panels/index.d.ts +1 -1
- package/esm/coms/partials/@types/ArticleFooterEmit.d.ts +26 -0
- package/esm/coms/partials/@types/DetailEmit.d.ts +18 -0
- package/esm/coms/partials/@types/DetailProps.d.ts +22 -0
- package/esm/coms/partials/@types/PagingHeaderEmit.d.ts +34 -0
- package/esm/coms/partials/@types/PagingHeaderProps.d.ts +30 -0
- package/esm/coms/partials/@types/PagingRowEmit.d.ts +26 -0
- package/esm/coms/partials/@types/PagingRowProps.d.ts +22 -0
- package/esm/coms/partials/@types/TreeNodeProps.d.ts +22 -0
- package/esm/coms/partials/@types/UpdateChildEmit.d.ts +22 -0
- package/esm/coms/partials/@types/UpdateChildProps.d.ts +22 -0
- package/esm/coms/partials/@types/UpdateEmit.d.ts +14 -0
- package/esm/coms/partials/@types/UpdateProps.d.ts +22 -0
- package/esm/coms/partials/@types/index.d.ts +13 -0
- package/esm/coms/partials/ArticleFooter.vue.d.ts +1 -1
- package/esm/coms/partials/Detail.vue.d.ts +1 -1
- package/esm/coms/partials/PagingHeader.vue.d.ts +1 -1
- package/esm/coms/partials/PagingRow.vue.d.ts +1 -1
- package/esm/coms/partials/TreeNode.vue.d.ts +1 -1
- package/esm/coms/partials/Update.vue.d.ts +1 -1
- package/esm/coms/partials/UpdateChild.vue.d.ts +1 -1
- package/esm/coms/partials/index.d.ts +1 -1
- package/esm/coms/searches/@types/SearchProps.d.ts +10 -0
- package/esm/coms/searches/@types/index.d.ts +2 -0
- package/esm/coms/searches/Autocomplete.vue.d.ts +1 -1
- package/esm/coms/searches/Daterange.vue.d.ts +1 -1
- package/esm/coms/searches/Index.vue.d.ts +1 -1
- package/esm/coms/searches/Int.vue.d.ts +1 -1
- package/esm/coms/searches/Month.vue.d.ts +1 -1
- package/esm/coms/searches/Select.vue.d.ts +1 -1
- package/esm/coms/searches/Text.vue.d.ts +1 -1
- package/esm/coms/searches/index.d.ts +1 -1
- package/esm/coms/singles/@types/SingleProps.d.ts +15 -0
- package/esm/coms/singles/@types/index.d.ts +2 -0
- package/esm/coms/singles/Code.vue.d.ts +1 -1
- package/esm/coms/singles/Comment.vue.d.ts +1 -1
- package/esm/coms/singles/Index.vue.d.ts +1 -1
- package/esm/coms/singles/Normal.vue.d.ts +1 -1
- package/esm/coms/singles/Statistic.vue.d.ts +1 -1
- package/esm/coms/singles/Stock.vue.d.ts +1 -1
- package/esm/coms/singles/Table.vue.d.ts +1 -1
- package/esm/coms/singles/Tree.vue.d.ts +1 -1
- package/esm/coms/singles/index.d.ts +1 -1
- package/esm/coms/texts/Autocomplete.vue.d.ts +1 -1
- package/esm/coms/texts/CSharp.vue.d.ts +1 -1
- package/esm/coms/texts/Cascader.vue.d.ts +1 -1
- package/esm/coms/texts/Checkbox.vue.d.ts +1 -1
- package/esm/coms/texts/Code.vue.d.ts +1 -1
- package/esm/coms/texts/Color.vue.d.ts +1 -1
- package/esm/coms/texts/Compare.vue.d.ts +1 -1
- package/esm/coms/texts/Copy.vue.d.ts +1 -1
- package/esm/coms/texts/Date.vue.d.ts +1 -1
- package/esm/coms/texts/DateRange.vue.d.ts +1 -1
- package/esm/coms/texts/DateTime.vue.d.ts +1 -1
- package/esm/coms/texts/Decimal.vue.d.ts +1 -1
- package/esm/coms/texts/Dictionary.vue.d.ts +1 -1
- package/esm/coms/texts/Email.vue.d.ts +1 -1
- package/esm/coms/texts/Index.vue.d.ts +1 -1
- package/esm/coms/texts/Int.vue.d.ts +1 -1
- package/esm/coms/texts/Markdown.vue.d.ts +1 -1
- package/esm/coms/texts/Month.vue.d.ts +1 -1
- package/esm/coms/texts/Password.vue.d.ts +1 -1
- package/esm/coms/texts/Progress.vue.d.ts +1 -1
- package/esm/coms/texts/Radio.vue.d.ts +1 -1
- package/esm/coms/texts/Rate.vue.d.ts +1 -1
- package/esm/coms/texts/RichText.vue.d.ts +1 -1
- package/esm/coms/texts/Select.vue.d.ts +1 -1
- package/esm/coms/texts/Switch.vue.d.ts +1 -1
- package/esm/coms/texts/Text.vue.d.ts +1 -1
- package/esm/coms/texts/TextLink.vue.d.ts +1 -1
- package/esm/coms/texts/Textarea.vue.d.ts +1 -1
- package/esm/coms/texts/Upload.vue.d.ts +1 -1
- package/esm/coms/texts/Year.vue.d.ts +1 -1
- package/esm/main.d.ts +2 -2
- package/package.json +2 -2
- package/dist/Autocomplete-BA0pEA9T.js +0 -53
- package/dist/Autocomplete-C1MC46ef.js +0 -54
- package/dist/Callback-DmCRycGX.js +0 -26
- package/dist/Cascader-CQqLPpEF.js +0 -87
- package/dist/Cascader-DcM0THgE.js +0 -47
- package/dist/Checkbox-CLGuZoor.js +0 -76
- package/dist/Code-CVyrDYHh.js +0 -60
- package/dist/Code-CfODGNBF.js +0 -42
- package/dist/Code-D7kMH044.js +0 -4
- package/dist/Code.vue_vue_type_style_index_0_lang-CGIHkYJn.js +0 -65
- package/dist/Column-4XWgmnKg.js +0 -75
- package/dist/Comment-CNvy-1Iq.js +0 -104
- package/dist/Compare-wgk3D3EX.js +0 -44
- package/dist/Copy-C_EBpWht.js +0 -49
- package/dist/Custom-OUdFT-Z9.js +0 -57
- package/dist/DataImport.vue_vue_type_script_setup_true_lang-DIrLf0yN.js +0 -176
- package/dist/Date-B1jUMPdx.js +0 -43
- package/dist/DateRange-CXUIVfwU.js +0 -63
- package/dist/DateTime-6lhPVe1O.js +0 -44
- package/dist/Daterange-DbhWv06V.js +0 -63
- package/dist/Delete-BU-TdXZR.js +0 -62
- package/dist/Dictionary-DYPWj-d0.js +0 -59
- package/dist/Email-BTKIb--f.js +0 -54
- package/dist/Index-BJWMiDrx.js +0 -178
- package/dist/Index-C8CUkTm5.js +0 -4
- package/dist/Index-CBAGTH43.js +0 -4
- package/dist/Index-D3WQg1HZ.js +0 -4
- package/dist/Index-KxibedJH.js +0 -4
- package/dist/Int-Ae-gJbt5.js +0 -44
- package/dist/Int-BqZ6sIcn.js +0 -46
- package/dist/List-D8C_gyVz.js +0 -79
- package/dist/Maintaince-DdS89Bbv.js +0 -20
- package/dist/Month-BECDFWum.js +0 -44
- package/dist/Month-CnScc0mu.js +0 -43
- package/dist/Paging-CdUnYWJ1.js +0 -99
- package/dist/QueryApi-CwNeSXIs.js +0 -20
- package/dist/RichText-D-AaPwkx.js +0 -47
- package/dist/Text-DXGGbFhr.js +0 -4
- package/dist/Text.vue_vue_type_style_index_0_lang-CeWH48Pu.js +0 -59
- package/dist/TextLink-DYisoDVn.js +0 -65
- package/dist/Time-DxojKVPC.js +0 -43
- package/dist/Timeline-hBk2KUsH.js +0 -59
- package/dist/Tree-Dsrpy8UN.js +0 -122
- package/dist/TreeNode-BAZbs0jL.js +0 -42
- package/dist/Upload-Dt2pNqjv.js +0 -72
- package/dist/Upload-fnKNelcS.js +0 -150
- package/dist/UploadApi-D_HwEoQY.js +0 -20
- package/dist/Year-BUO5CKKv.js +0 -47
- package/dist/assets/clone-BZn0cTAu.js +0 -134
- package/dist/assets/file-saver-CwlpTZSc.js +0 -74
- package/dist/assets/liquidjs-C-LVcoaY.js +0 -2893
- package/dist/assets/moment-h96o7c8I.js +0 -2578
- package/dist/assets/sprintf-js-BPTdvBYM.js +0 -148
- package/dist/assets/underscore-B0BCaBxV.js +0 -1070
- package/dist/assets/underscore.string-DVXD2SZo.js +0 -425
- package/dist/assets/util-deprecate-Dzun97re.js +0 -28
- package/dist/main--j4fHmql.js +0 -9084
@@ -1,2893 +0,0 @@
|
|
1
|
-
class v {
|
2
|
-
constructor(e, s, r, i, n) {
|
3
|
-
this.kind = e, this.input = s, this.begin = r, this.end = i, this.file = n;
|
4
|
-
}
|
5
|
-
getText() {
|
6
|
-
return this.input.slice(this.begin, this.end);
|
7
|
-
}
|
8
|
-
getPosition() {
|
9
|
-
let [e, s] = [1, 1];
|
10
|
-
for (let r = 0; r < this.begin; r++)
|
11
|
-
this.input[r] === `
|
12
|
-
` ? (e++, s = 1) : s++;
|
13
|
-
return [e, s];
|
14
|
-
}
|
15
|
-
size() {
|
16
|
-
return this.end - this.begin;
|
17
|
-
}
|
18
|
-
}
|
19
|
-
class V {
|
20
|
-
liquidMethodMissing(e) {
|
21
|
-
}
|
22
|
-
}
|
23
|
-
const ct = Object.prototype.toString, ke = String.prototype.toLowerCase, je = Object.hasOwnProperty;
|
24
|
-
function O(t) {
|
25
|
-
return typeof t == "string";
|
26
|
-
}
|
27
|
-
function w(t) {
|
28
|
-
return typeof t == "function";
|
29
|
-
}
|
30
|
-
function dt(t) {
|
31
|
-
return t && w(t.then);
|
32
|
-
}
|
33
|
-
function X(t) {
|
34
|
-
return t && w(t.next) && w(t.throw) && w(t.return);
|
35
|
-
}
|
36
|
-
function ft(t) {
|
37
|
-
return t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
|
38
|
-
}
|
39
|
-
function u(t) {
|
40
|
-
return t = d(t), O(t) ? t : R(t) ? "" : k(t) ? t.map((e) => u(e)).join("") : String(t);
|
41
|
-
}
|
42
|
-
function ue(t) {
|
43
|
-
return t = d(t), k(t) ? t : O(t) && t.length > 0 ? [t] : gt(t) ? Array.from(t) : te(t) ? Object.keys(t).map((e) => [e, t[e]]) : [];
|
44
|
-
}
|
45
|
-
function T(t) {
|
46
|
-
return t = d(t), R(t) ? [] : k(t) ? t : [t];
|
47
|
-
}
|
48
|
-
function d(t) {
|
49
|
-
return t instanceof V && w(t.valueOf) ? t.valueOf() : t;
|
50
|
-
}
|
51
|
-
function ce(t) {
|
52
|
-
return typeof t == "number";
|
53
|
-
}
|
54
|
-
function Ue(t) {
|
55
|
-
return t && w(t.toLiquid) ? Ue(t.toLiquid()) : t;
|
56
|
-
}
|
57
|
-
function R(t) {
|
58
|
-
return t == null;
|
59
|
-
}
|
60
|
-
function pt(t) {
|
61
|
-
return t === void 0;
|
62
|
-
}
|
63
|
-
function k(t) {
|
64
|
-
return ct.call(t) === "[object Array]";
|
65
|
-
}
|
66
|
-
function gt(t) {
|
67
|
-
return te(t) && Symbol.iterator in t;
|
68
|
-
}
|
69
|
-
function be(t, e) {
|
70
|
-
t = t || {};
|
71
|
-
for (const s in t)
|
72
|
-
if (je.call(t, s) && e(t[s], s, t) === !1)
|
73
|
-
break;
|
74
|
-
return t;
|
75
|
-
}
|
76
|
-
function He(t) {
|
77
|
-
return t[t.length - 1];
|
78
|
-
}
|
79
|
-
function te(t) {
|
80
|
-
const e = typeof t;
|
81
|
-
return t !== null && (e === "object" || e === "function");
|
82
|
-
}
|
83
|
-
function We(t, e, s = 1) {
|
84
|
-
const r = [];
|
85
|
-
for (let i = t; i < e; i += s)
|
86
|
-
r.push(i);
|
87
|
-
return r;
|
88
|
-
}
|
89
|
-
function J(t, e, s = " ") {
|
90
|
-
return Ye(t, e, s, (r, i) => i + r);
|
91
|
-
}
|
92
|
-
function mt(t, e, s = " ") {
|
93
|
-
return Ye(t, e, s, (r, i) => r + i);
|
94
|
-
}
|
95
|
-
function Ye(t, e, s, r) {
|
96
|
-
t = String(t);
|
97
|
-
let i = e - t.length;
|
98
|
-
for (; i-- > 0; )
|
99
|
-
t = r(t, s);
|
100
|
-
return t;
|
101
|
-
}
|
102
|
-
function Je(t) {
|
103
|
-
return t;
|
104
|
-
}
|
105
|
-
function yt(t) {
|
106
|
-
return [...t].some((s) => s >= "a" && s <= "z") ? t.toUpperCase() : t.toLowerCase();
|
107
|
-
}
|
108
|
-
function wt(t, e) {
|
109
|
-
return t.length > e ? t.slice(0, e - 3) + "..." : t;
|
110
|
-
}
|
111
|
-
function xe(t, e) {
|
112
|
-
return t == null && e == null ? 0 : t == null ? 1 : e == null || (t = ke.call(t), e = ke.call(e), t < e) ? -1 : t > e ? 1 : 0;
|
113
|
-
}
|
114
|
-
function x(t) {
|
115
|
-
return function(...e) {
|
116
|
-
return t.call(this, ...e.map(d));
|
117
|
-
};
|
118
|
-
}
|
119
|
-
function de(t) {
|
120
|
-
return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
121
|
-
}
|
122
|
-
const _e = "__liquidClass__";
|
123
|
-
class B extends Error {
|
124
|
-
constructor(e, s) {
|
125
|
-
super(typeof e == "string" ? e : e.message), this.context = "", typeof e != "string" && Object.defineProperty(this, "originalError", { value: e, enumerable: !1 }), Object.defineProperty(this, "token", { value: s, enumerable: !1 }), Object.defineProperty(this, _e, { value: "LiquidError", enumerable: !1 });
|
126
|
-
}
|
127
|
-
update() {
|
128
|
-
Object.defineProperty(this, "context", { value: Lt(this.token), enumerable: !1 }), this.message = Ft(this.message, this.token), this.stack = this.message + `
|
129
|
-
` + this.context + `
|
130
|
-
` + this.stack, this.originalError && (this.stack += `
|
131
|
-
From ` + this.originalError.stack);
|
132
|
-
}
|
133
|
-
static is(e) {
|
134
|
-
return (e == null ? void 0 : e[_e]) === "LiquidError";
|
135
|
-
}
|
136
|
-
}
|
137
|
-
class Tt extends B {
|
138
|
-
constructor(e, s) {
|
139
|
-
super(e, s), this.name = "TokenizationError", super.update();
|
140
|
-
}
|
141
|
-
}
|
142
|
-
class kt extends B {
|
143
|
-
constructor(e, s) {
|
144
|
-
super(e, s), this.name = "ParseError", this.message = e.message, super.update();
|
145
|
-
}
|
146
|
-
}
|
147
|
-
class bt extends B {
|
148
|
-
constructor(e, s) {
|
149
|
-
super(e, s.token), this.name = "RenderError", this.message = e.message, super.update();
|
150
|
-
}
|
151
|
-
static is(e) {
|
152
|
-
return e.name === "RenderError";
|
153
|
-
}
|
154
|
-
}
|
155
|
-
class Qe extends B {
|
156
|
-
constructor(e) {
|
157
|
-
super(e[0], e[0].token), this.errors = e, this.name = "LiquidErrors";
|
158
|
-
const s = e.length > 1 ? "s" : "";
|
159
|
-
this.message = `${e.length} error${s} found`, super.update();
|
160
|
-
}
|
161
|
-
static is(e) {
|
162
|
-
return e.name === "LiquidErrors";
|
163
|
-
}
|
164
|
-
}
|
165
|
-
class xt extends B {
|
166
|
-
constructor(e, s) {
|
167
|
-
super(e, s), this.name = "UndefinedVariableError", this.message = e.message, super.update();
|
168
|
-
}
|
169
|
-
}
|
170
|
-
class _t extends Error {
|
171
|
-
constructor(e) {
|
172
|
-
super(`undefined variable: ${e}`), this.name = "InternalUndefinedVariableError", this.variableName = e;
|
173
|
-
}
|
174
|
-
}
|
175
|
-
class vt extends Error {
|
176
|
-
constructor(e) {
|
177
|
-
super(e), this.name = "AssertionError", this.message = e + "";
|
178
|
-
}
|
179
|
-
}
|
180
|
-
function Lt(t) {
|
181
|
-
const [e, s] = t.getPosition(), r = t.input.split(`
|
182
|
-
`), i = Math.max(e - 2, 1), n = Math.min(e + 3, r.length);
|
183
|
-
return We(i, n + 1).map((a) => {
|
184
|
-
const l = a === e ? ">> " : " ", h = J(String(a), String(n).length);
|
185
|
-
let c = `${l}${h}| `;
|
186
|
-
const p = a === e ? `
|
187
|
-
` + J("^", s + c.length) : "";
|
188
|
-
return c += r[a - 1], c += p, c;
|
189
|
-
}).join(`
|
190
|
-
`);
|
191
|
-
}
|
192
|
-
function Ft(t, e) {
|
193
|
-
e.file && (t += `, file:${e.file}`);
|
194
|
-
const [s, r] = e.getPosition();
|
195
|
-
return t += `, line:${s}, col:${r}`, t;
|
196
|
-
}
|
197
|
-
const f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 4, 4, 4, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 2, 8, 0, 0, 0, 0, 8, 0, 0, 0, 64, 0, 65, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 2, 2, 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], St = 1, H = 4, ve = 8, Ze = 16, Ot = 32, Rt = 64, Et = 128;
|
198
|
-
function Q(t) {
|
199
|
-
const e = t.charCodeAt(0);
|
200
|
-
return e >= 128 ? !f[e] : !!(f[e] & St);
|
201
|
-
}
|
202
|
-
f[160] = f[5760] = f[6158] = f[8192] = f[8193] = f[8194] = f[8195] = f[8196] = f[8197] = f[8198] = f[8199] = f[8200] = f[8201] = f[8202] = f[8232] = f[8233] = f[8239] = f[8287] = f[12288] = H;
|
203
|
-
f[8220] = f[8221] = Et;
|
204
|
-
function b(t, e) {
|
205
|
-
if (!t) {
|
206
|
-
const s = typeof e == "function" ? e() : e || `expect ${t} to be true`;
|
207
|
-
throw new vt(s);
|
208
|
-
}
|
209
|
-
}
|
210
|
-
function K(t, e = `unexpected ${JSON.stringify(t)}`) {
|
211
|
-
b(!t, e);
|
212
|
-
}
|
213
|
-
class zt extends V {
|
214
|
-
equals(e) {
|
215
|
-
return R(d(e));
|
216
|
-
}
|
217
|
-
gt() {
|
218
|
-
return !1;
|
219
|
-
}
|
220
|
-
geq() {
|
221
|
-
return !1;
|
222
|
-
}
|
223
|
-
lt() {
|
224
|
-
return !1;
|
225
|
-
}
|
226
|
-
leq() {
|
227
|
-
return !1;
|
228
|
-
}
|
229
|
-
valueOf() {
|
230
|
-
return null;
|
231
|
-
}
|
232
|
-
}
|
233
|
-
class se extends V {
|
234
|
-
equals(e) {
|
235
|
-
return e instanceof se ? !1 : (e = d(e), O(e) || k(e) ? e.length === 0 : te(e) ? Object.keys(e).length === 0 : !1);
|
236
|
-
}
|
237
|
-
gt() {
|
238
|
-
return !1;
|
239
|
-
}
|
240
|
-
geq() {
|
241
|
-
return !1;
|
242
|
-
}
|
243
|
-
lt() {
|
244
|
-
return !1;
|
245
|
-
}
|
246
|
-
leq() {
|
247
|
-
return !1;
|
248
|
-
}
|
249
|
-
valueOf() {
|
250
|
-
return "";
|
251
|
-
}
|
252
|
-
}
|
253
|
-
class Nt extends se {
|
254
|
-
equals(e) {
|
255
|
-
return e === !1 || R(d(e)) ? !0 : O(e) ? /^\s*$/.test(e) : super.equals(e);
|
256
|
-
}
|
257
|
-
}
|
258
|
-
class fe extends V {
|
259
|
-
constructor(e, s, r) {
|
260
|
-
super(), this.i = 0, this.length = e, this.name = `${r}-${s}`;
|
261
|
-
}
|
262
|
-
next() {
|
263
|
-
this.i++;
|
264
|
-
}
|
265
|
-
index0() {
|
266
|
-
return this.i;
|
267
|
-
}
|
268
|
-
index() {
|
269
|
-
return this.i + 1;
|
270
|
-
}
|
271
|
-
first() {
|
272
|
-
return this.i === 0;
|
273
|
-
}
|
274
|
-
last() {
|
275
|
-
return this.i === this.length - 1;
|
276
|
-
}
|
277
|
-
rindex() {
|
278
|
-
return this.length - this.i;
|
279
|
-
}
|
280
|
-
rindex0() {
|
281
|
-
return this.length - this.i - 1;
|
282
|
-
}
|
283
|
-
valueOf() {
|
284
|
-
return JSON.stringify(this);
|
285
|
-
}
|
286
|
-
}
|
287
|
-
class Le extends V {
|
288
|
-
constructor(e = () => "") {
|
289
|
-
super(), this.superBlockRender = e;
|
290
|
-
}
|
291
|
-
/**
|
292
|
-
* Provide parent access in child block by
|
293
|
-
* {{ block.super }}
|
294
|
-
*/
|
295
|
-
super() {
|
296
|
-
return this.superBlockRender();
|
297
|
-
}
|
298
|
-
}
|
299
|
-
function E(t) {
|
300
|
-
return t && w(t.equals) && w(t.gt) && w(t.geq) && w(t.lt) && w(t.leq);
|
301
|
-
}
|
302
|
-
const Fe = new zt(), Ge = {
|
303
|
-
true: !0,
|
304
|
-
false: !1,
|
305
|
-
nil: Fe,
|
306
|
-
null: Fe,
|
307
|
-
empty: new se(),
|
308
|
-
blank: new Nt()
|
309
|
-
};
|
310
|
-
function Se(t) {
|
311
|
-
const e = {};
|
312
|
-
for (const [s, r] of Object.entries(t)) {
|
313
|
-
let i = e;
|
314
|
-
for (let n = 0; n < s.length; n++) {
|
315
|
-
const o = s[n];
|
316
|
-
i[o] = i[o] || {}, n === s.length - 1 && Q(s[n]) && (i[o].needBoundary = !0), i = i[o];
|
317
|
-
}
|
318
|
-
i.data = r, i.end = !0;
|
319
|
-
}
|
320
|
-
return e;
|
321
|
-
}
|
322
|
-
var ee = function() {
|
323
|
-
return ee = Object.assign || function(e) {
|
324
|
-
for (var s, r = 1, i = arguments.length; r < i; r++) {
|
325
|
-
s = arguments[r];
|
326
|
-
for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (e[n] = s[n]);
|
327
|
-
}
|
328
|
-
return e;
|
329
|
-
}, ee.apply(this, arguments);
|
330
|
-
};
|
331
|
-
function F(t, e, s, r) {
|
332
|
-
function i(n) {
|
333
|
-
return n instanceof s ? n : new s(function(o) {
|
334
|
-
o(n);
|
335
|
-
});
|
336
|
-
}
|
337
|
-
return new (s || (s = Promise))(function(n, o) {
|
338
|
-
function a(c) {
|
339
|
-
try {
|
340
|
-
h(r.next(c));
|
341
|
-
} catch (p) {
|
342
|
-
o(p);
|
343
|
-
}
|
344
|
-
}
|
345
|
-
function l(c) {
|
346
|
-
try {
|
347
|
-
h(r.throw(c));
|
348
|
-
} catch (p) {
|
349
|
-
o(p);
|
350
|
-
}
|
351
|
-
}
|
352
|
-
function h(c) {
|
353
|
-
c.done ? n(c.value) : i(c.value).then(a, l);
|
354
|
-
}
|
355
|
-
h((r = r.apply(t, [])).next());
|
356
|
-
});
|
357
|
-
}
|
358
|
-
function N(t) {
|
359
|
-
return F(this, void 0, void 0, function* () {
|
360
|
-
if (!X(t))
|
361
|
-
return t;
|
362
|
-
let e, s = !1, r = "next";
|
363
|
-
do {
|
364
|
-
const i = t[r](e);
|
365
|
-
s = i.done, e = i.value, r = "next";
|
366
|
-
try {
|
367
|
-
X(e) && (e = N(e)), dt(e) && (e = yield e);
|
368
|
-
} catch (n) {
|
369
|
-
r = "throw", e = n;
|
370
|
-
}
|
371
|
-
} while (!s);
|
372
|
-
return e;
|
373
|
-
});
|
374
|
-
}
|
375
|
-
function D(t) {
|
376
|
-
if (!X(t))
|
377
|
-
return t;
|
378
|
-
let e, s = !1, r = "next";
|
379
|
-
do {
|
380
|
-
const i = t[r](e);
|
381
|
-
if (s = i.done, e = i.value, r = "next", X(e))
|
382
|
-
try {
|
383
|
-
e = D(e);
|
384
|
-
} catch (n) {
|
385
|
-
r = "throw", e = n;
|
386
|
-
}
|
387
|
-
} while (!s);
|
388
|
-
return e;
|
389
|
-
}
|
390
|
-
const Dt = /%([-_0^#:]+)?(\d+)?([EO])?(.)/;
|
391
|
-
function qt(t) {
|
392
|
-
return [31, Mt(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
393
|
-
}
|
394
|
-
function Xe(t) {
|
395
|
-
let e = 0;
|
396
|
-
for (let s = 0; s < t.getMonth(); ++s)
|
397
|
-
e += qt(t)[s];
|
398
|
-
return e + t.getDate();
|
399
|
-
}
|
400
|
-
function Oe(t, e) {
|
401
|
-
const s = Xe(t) + (e - t.getDay()), i = 7 - new Date(t.getFullYear(), 0, 1).getDay() + e;
|
402
|
-
return String(Math.floor((s - i) / 7) + 1);
|
403
|
-
}
|
404
|
-
function Mt(t) {
|
405
|
-
const e = t.getFullYear();
|
406
|
-
return !!(!(e & 3) && (e % 100 || e % 400 === 0 && e));
|
407
|
-
}
|
408
|
-
function It(t) {
|
409
|
-
const e = t.getDate();
|
410
|
-
if ([11, 12, 13].includes(e))
|
411
|
-
return "th";
|
412
|
-
switch (e % 10) {
|
413
|
-
case 1:
|
414
|
-
return "st";
|
415
|
-
case 2:
|
416
|
-
return "nd";
|
417
|
-
case 3:
|
418
|
-
return "rd";
|
419
|
-
default:
|
420
|
-
return "th";
|
421
|
-
}
|
422
|
-
}
|
423
|
-
function $t(t) {
|
424
|
-
return parseInt(t.getFullYear().toString().substring(0, 2), 10);
|
425
|
-
}
|
426
|
-
const Pt = {
|
427
|
-
d: 2,
|
428
|
-
e: 2,
|
429
|
-
H: 2,
|
430
|
-
I: 2,
|
431
|
-
j: 3,
|
432
|
-
k: 2,
|
433
|
-
l: 2,
|
434
|
-
L: 3,
|
435
|
-
m: 2,
|
436
|
-
M: 2,
|
437
|
-
S: 2,
|
438
|
-
U: 2,
|
439
|
-
W: 2
|
440
|
-
}, Ct = new Set("aAbBceklpP");
|
441
|
-
function Re(t, e) {
|
442
|
-
const s = Math.abs(t.getTimezoneOffset()), r = Math.floor(s / 60), i = s % 60;
|
443
|
-
return (t.getTimezoneOffset() > 0 ? "-" : "+") + J(r, 2, "0") + (e.flags[":"] ? ":" : "") + J(i, 2, "0");
|
444
|
-
}
|
445
|
-
const le = {
|
446
|
-
a: (t) => t.getShortWeekdayName(),
|
447
|
-
A: (t) => t.getLongWeekdayName(),
|
448
|
-
b: (t) => t.getShortMonthName(),
|
449
|
-
B: (t) => t.getLongMonthName(),
|
450
|
-
c: (t) => t.toLocaleString(),
|
451
|
-
C: (t) => $t(t),
|
452
|
-
d: (t) => t.getDate(),
|
453
|
-
e: (t) => t.getDate(),
|
454
|
-
H: (t) => t.getHours(),
|
455
|
-
I: (t) => String(t.getHours() % 12 || 12),
|
456
|
-
j: (t) => Xe(t),
|
457
|
-
k: (t) => t.getHours(),
|
458
|
-
l: (t) => String(t.getHours() % 12 || 12),
|
459
|
-
L: (t) => t.getMilliseconds(),
|
460
|
-
m: (t) => t.getMonth() + 1,
|
461
|
-
M: (t) => t.getMinutes(),
|
462
|
-
N: (t, e) => {
|
463
|
-
const s = Number(e.width) || 9, r = String(t.getMilliseconds()).slice(0, s);
|
464
|
-
return mt(r, s, "0");
|
465
|
-
},
|
466
|
-
p: (t) => t.getHours() < 12 ? "AM" : "PM",
|
467
|
-
P: (t) => t.getHours() < 12 ? "am" : "pm",
|
468
|
-
q: (t) => It(t),
|
469
|
-
s: (t) => Math.round(t.getTime() / 1e3),
|
470
|
-
S: (t) => t.getSeconds(),
|
471
|
-
u: (t) => t.getDay() || 7,
|
472
|
-
U: (t) => Oe(t, 0),
|
473
|
-
w: (t) => t.getDay(),
|
474
|
-
W: (t) => Oe(t, 1),
|
475
|
-
x: (t) => t.toLocaleDateString(),
|
476
|
-
X: (t) => t.toLocaleTimeString(),
|
477
|
-
y: (t) => t.getFullYear().toString().slice(2, 4),
|
478
|
-
Y: (t) => t.getFullYear(),
|
479
|
-
z: Re,
|
480
|
-
Z: (t, e) => t.getTimeZoneName() || Re(t, e),
|
481
|
-
t: () => " ",
|
482
|
-
n: () => `
|
483
|
-
`,
|
484
|
-
"%": () => "%"
|
485
|
-
};
|
486
|
-
le.h = le.b;
|
487
|
-
function Z(t, e) {
|
488
|
-
let s = "", r = e, i;
|
489
|
-
for (; i = Dt.exec(r); )
|
490
|
-
s += r.slice(0, i.index), r = r.slice(i.index + i[0].length), s += At(t, i);
|
491
|
-
return s + r;
|
492
|
-
}
|
493
|
-
function At(t, e) {
|
494
|
-
const [s, r = "", i, n, o] = e, a = le[o];
|
495
|
-
if (!a)
|
496
|
-
return s;
|
497
|
-
const l = {};
|
498
|
-
for (const L of r)
|
499
|
-
l[L] = !0;
|
500
|
-
let h = String(a(t, { flags: l, width: i, modifier: n })), c = Ct.has(o) ? " " : "0", p = i || Pt[o] || 0;
|
501
|
-
return l["^"] ? h = h.toUpperCase() : l["#"] && (h = yt(h)), l._ ? c = " " : l[0] && (c = "0"), l["-"] && (p = 0), J(h, p, c);
|
502
|
-
}
|
503
|
-
function Ke() {
|
504
|
-
return typeof Intl < "u" ? Intl.DateTimeFormat : void 0;
|
505
|
-
}
|
506
|
-
const Vt = 6e4, Bt = /([zZ]|([+-])(\d{2}):(\d{2}))$/, et = [
|
507
|
-
"January",
|
508
|
-
"February",
|
509
|
-
"March",
|
510
|
-
"April",
|
511
|
-
"May",
|
512
|
-
"June",
|
513
|
-
"July",
|
514
|
-
"August",
|
515
|
-
"September",
|
516
|
-
"October",
|
517
|
-
"November",
|
518
|
-
"December"
|
519
|
-
], jt = et.map((t) => t.slice(0, 3)), tt = [
|
520
|
-
"Sunday",
|
521
|
-
"Monday",
|
522
|
-
"Tuesday",
|
523
|
-
"Wednesday",
|
524
|
-
"Thursday",
|
525
|
-
"Friday",
|
526
|
-
"Saturday"
|
527
|
-
], Ut = tt.map((t) => t.slice(0, 3));
|
528
|
-
class S {
|
529
|
-
constructor(e, s, r) {
|
530
|
-
this.locale = s, this.DateTimeFormat = Ke(), this.date = new Date(e), this.timezoneFixed = r !== void 0, r === void 0 && (r = this.date.getTimezoneOffset()), this.timezoneOffset = O(r) ? S.getTimezoneOffset(r, this.date) : r, this.timezoneName = O(r) ? r : "";
|
531
|
-
const i = (this.date.getTimezoneOffset() - this.timezoneOffset) * Vt, n = this.date.getTime() + i;
|
532
|
-
this.displayDate = new Date(n);
|
533
|
-
}
|
534
|
-
getTime() {
|
535
|
-
return this.displayDate.getTime();
|
536
|
-
}
|
537
|
-
getMilliseconds() {
|
538
|
-
return this.displayDate.getMilliseconds();
|
539
|
-
}
|
540
|
-
getSeconds() {
|
541
|
-
return this.displayDate.getSeconds();
|
542
|
-
}
|
543
|
-
getMinutes() {
|
544
|
-
return this.displayDate.getMinutes();
|
545
|
-
}
|
546
|
-
getHours() {
|
547
|
-
return this.displayDate.getHours();
|
548
|
-
}
|
549
|
-
getDay() {
|
550
|
-
return this.displayDate.getDay();
|
551
|
-
}
|
552
|
-
getDate() {
|
553
|
-
return this.displayDate.getDate();
|
554
|
-
}
|
555
|
-
getMonth() {
|
556
|
-
return this.displayDate.getMonth();
|
557
|
-
}
|
558
|
-
getFullYear() {
|
559
|
-
return this.displayDate.getFullYear();
|
560
|
-
}
|
561
|
-
toLocaleString(e, s) {
|
562
|
-
return s != null && s.timeZone ? this.date.toLocaleString(e, s) : this.displayDate.toLocaleString(e, s);
|
563
|
-
}
|
564
|
-
toLocaleTimeString(e) {
|
565
|
-
return this.displayDate.toLocaleTimeString(e);
|
566
|
-
}
|
567
|
-
toLocaleDateString(e) {
|
568
|
-
return this.displayDate.toLocaleDateString(e);
|
569
|
-
}
|
570
|
-
getTimezoneOffset() {
|
571
|
-
return this.timezoneOffset;
|
572
|
-
}
|
573
|
-
getTimeZoneName() {
|
574
|
-
if (this.timezoneFixed)
|
575
|
-
return this.timezoneName;
|
576
|
-
if (this.DateTimeFormat)
|
577
|
-
return this.DateTimeFormat().resolvedOptions().timeZone;
|
578
|
-
}
|
579
|
-
getLongMonthName() {
|
580
|
-
var e;
|
581
|
-
return (e = this.format({ month: "long" })) !== null && e !== void 0 ? e : et[this.getMonth()];
|
582
|
-
}
|
583
|
-
getShortMonthName() {
|
584
|
-
var e;
|
585
|
-
return (e = this.format({ month: "short" })) !== null && e !== void 0 ? e : jt[this.getMonth()];
|
586
|
-
}
|
587
|
-
getLongWeekdayName() {
|
588
|
-
var e;
|
589
|
-
return (e = this.format({ weekday: "long" })) !== null && e !== void 0 ? e : tt[this.displayDate.getDay()];
|
590
|
-
}
|
591
|
-
getShortWeekdayName() {
|
592
|
-
var e;
|
593
|
-
return (e = this.format({ weekday: "short" })) !== null && e !== void 0 ? e : Ut[this.displayDate.getDay()];
|
594
|
-
}
|
595
|
-
valid() {
|
596
|
-
return !isNaN(this.getTime());
|
597
|
-
}
|
598
|
-
format(e) {
|
599
|
-
return this.DateTimeFormat && this.DateTimeFormat(this.locale, e).format(this.displayDate);
|
600
|
-
}
|
601
|
-
/**
|
602
|
-
* Create a Date object fixed to it's declared Timezone. Both
|
603
|
-
* - 2021-08-06T02:29:00.000Z and
|
604
|
-
* - 2021-08-06T02:29:00.000+08:00
|
605
|
-
* will always be displayed as
|
606
|
-
* - 2021-08-06 02:29:00
|
607
|
-
* regardless timezoneOffset in JavaScript realm
|
608
|
-
*
|
609
|
-
* The implementation hack:
|
610
|
-
* Instead of calling `.getMonth()`/`.getUTCMonth()` respect to `preserveTimezones`,
|
611
|
-
* we create a different Date to trick strftime, it's both simpler and more performant.
|
612
|
-
* Given that a template is expected to be parsed fewer times than rendered.
|
613
|
-
*/
|
614
|
-
static createDateFixedToTimezone(e, s) {
|
615
|
-
const r = e.match(Bt);
|
616
|
-
if (r && r[1] === "Z")
|
617
|
-
return new S(+new Date(e), s, 0);
|
618
|
-
if (r && r[2] && r[3] && r[4]) {
|
619
|
-
const [, , i, n, o] = r, a = (i === "+" ? -1 : 1) * (parseInt(n, 10) * 60 + parseInt(o, 10));
|
620
|
-
return new S(+new Date(e), s, a);
|
621
|
-
}
|
622
|
-
return new S(e, s);
|
623
|
-
}
|
624
|
-
static getTimezoneOffset(e, s) {
|
625
|
-
const r = s.toLocaleString("en-US", { timeZone: e }), i = s.toLocaleString("en-US", { timeZone: "UTC" }), n = new Date(r);
|
626
|
-
return (+new Date(i) - +n) / (60 * 1e3);
|
627
|
-
}
|
628
|
-
}
|
629
|
-
class he {
|
630
|
-
constructor(e, s) {
|
631
|
-
this.base = 0, this.message = `${e} limit exceeded`, this.limit = s;
|
632
|
-
}
|
633
|
-
use(e) {
|
634
|
-
b(this.base + e <= this.limit, this.message), this.base += e;
|
635
|
-
}
|
636
|
-
check(e) {
|
637
|
-
b(e <= this.limit, this.message);
|
638
|
-
}
|
639
|
-
}
|
640
|
-
class pe extends v {
|
641
|
-
constructor(e, [s, r], i, n, o, a, l, h) {
|
642
|
-
super(e, i, n, o, h), this.trimLeft = !1, this.trimRight = !1;
|
643
|
-
const c = i[s] === "-", p = i[r - 1] === "-";
|
644
|
-
let L = c ? s + 1 : s, Y = p ? r - 1 : r;
|
645
|
-
for (; L < Y && f[i.charCodeAt(L)] & H; )
|
646
|
-
L++;
|
647
|
-
for (; Y > L && f[i.charCodeAt(Y - 1)] & H; )
|
648
|
-
Y--;
|
649
|
-
this.contentRange = [L, Y], this.trimLeft = c || a, this.trimRight = p || l;
|
650
|
-
}
|
651
|
-
get content() {
|
652
|
-
return this.input.slice(this.contentRange[0], this.contentRange[1]);
|
653
|
-
}
|
654
|
-
}
|
655
|
-
class Ee extends pe {
|
656
|
-
constructor(e, s, r, i, n) {
|
657
|
-
const { trimTagLeft: o, trimTagRight: a, tagDelimiterLeft: l, tagDelimiterRight: h } = i, [c, p] = [s + l.length, r - h.length];
|
658
|
-
super(g.Tag, [c, p], e, s, r, o, a, n), this.tokenizer = new z(e, i.operators, n, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal tag syntax, tag name expected"), this.tokenizer.skipBlank();
|
659
|
-
}
|
660
|
-
get args() {
|
661
|
-
return this.tokenizer.input.slice(this.tokenizer.p, this.contentRange[1]);
|
662
|
-
}
|
663
|
-
}
|
664
|
-
class Ht extends pe {
|
665
|
-
constructor(e, s, r, i, n) {
|
666
|
-
const { trimOutputLeft: o, trimOutputRight: a, outputDelimiterLeft: l, outputDelimiterRight: h } = i, c = [s + l.length, r - h.length];
|
667
|
-
super(g.Output, c, e, s, r, o, a, n);
|
668
|
-
}
|
669
|
-
}
|
670
|
-
class ze extends v {
|
671
|
-
constructor(e, s, r, i) {
|
672
|
-
super(g.HTML, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.trimLeft = 0, this.trimRight = 0;
|
673
|
-
}
|
674
|
-
getContent() {
|
675
|
-
return this.input.slice(this.begin + this.trimLeft, this.end - this.trimRight);
|
676
|
-
}
|
677
|
-
}
|
678
|
-
class Wt extends v {
|
679
|
-
constructor(e, s, r, i) {
|
680
|
-
super(g.Number, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.content = Number(this.getText());
|
681
|
-
}
|
682
|
-
}
|
683
|
-
class ne extends v {
|
684
|
-
constructor(e, s, r, i) {
|
685
|
-
super(g.Word, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.content = this.getText();
|
686
|
-
}
|
687
|
-
}
|
688
|
-
class Yt extends v {
|
689
|
-
constructor(e, s, r, i) {
|
690
|
-
super(g.Literal, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.literal = this.getText(), this.content = Ge[this.literal];
|
691
|
-
}
|
692
|
-
}
|
693
|
-
const Ne = {
|
694
|
-
"==": 2,
|
695
|
-
"!=": 2,
|
696
|
-
">": 2,
|
697
|
-
"<": 2,
|
698
|
-
">=": 2,
|
699
|
-
"<=": 2,
|
700
|
-
contains: 2,
|
701
|
-
not: 1,
|
702
|
-
and: 0,
|
703
|
-
or: 0
|
704
|
-
}, Jt = {
|
705
|
-
"==": 0,
|
706
|
-
"!=": 0,
|
707
|
-
">": 0,
|
708
|
-
"<": 0,
|
709
|
-
">=": 0,
|
710
|
-
"<=": 0,
|
711
|
-
contains: 0,
|
712
|
-
not: 1,
|
713
|
-
and: 0,
|
714
|
-
or: 0
|
715
|
-
/* OperatorType.Binary */
|
716
|
-
};
|
717
|
-
class Qt extends v {
|
718
|
-
constructor(e, s, r, i) {
|
719
|
-
super(g.Operator, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.operator = this.getText();
|
720
|
-
}
|
721
|
-
getPrecedence() {
|
722
|
-
const e = this.getText();
|
723
|
-
return e in Ne ? Ne[e] : 1;
|
724
|
-
}
|
725
|
-
}
|
726
|
-
class De extends v {
|
727
|
-
constructor(e, s, r, i, n, o) {
|
728
|
-
super(g.PropertyAccess, r, i, n, o), this.variable = e, this.props = s;
|
729
|
-
}
|
730
|
-
}
|
731
|
-
class Zt extends v {
|
732
|
-
constructor(e, s, r, i, n, o) {
|
733
|
-
super(g.Filter, r, i, n, o), this.name = e, this.args = s;
|
734
|
-
}
|
735
|
-
}
|
736
|
-
class Gt extends v {
|
737
|
-
constructor(e, s, r, i, n, o) {
|
738
|
-
super(g.Hash, e, s, r, o), this.input = e, this.begin = s, this.end = r, this.name = i, this.value = n, this.file = o;
|
739
|
-
}
|
740
|
-
}
|
741
|
-
const Xt = /[\da-fA-F]/, qe = /[0-7]/, Me = {
|
742
|
-
b: "\b",
|
743
|
-
f: "\f",
|
744
|
-
n: `
|
745
|
-
`,
|
746
|
-
r: "\r",
|
747
|
-
t: " ",
|
748
|
-
v: "\v"
|
749
|
-
};
|
750
|
-
function Ie(t) {
|
751
|
-
const e = t.charCodeAt(0);
|
752
|
-
return e >= 97 ? e - 87 : e >= 65 ? e - 55 : e - 48;
|
753
|
-
}
|
754
|
-
function Kt(t) {
|
755
|
-
let e = "";
|
756
|
-
for (let s = 1; s < t.length - 1; s++) {
|
757
|
-
if (t[s] !== "\\") {
|
758
|
-
e += t[s];
|
759
|
-
continue;
|
760
|
-
}
|
761
|
-
if (Me[t[s + 1]] !== void 0)
|
762
|
-
e += Me[t[++s]];
|
763
|
-
else if (t[s + 1] === "u") {
|
764
|
-
let r = 0, i = s + 2;
|
765
|
-
for (; i <= s + 5 && Xt.test(t[i]); )
|
766
|
-
r = r * 16 + Ie(t[i++]);
|
767
|
-
s = i - 1, e += String.fromCharCode(r);
|
768
|
-
} else if (!qe.test(t[s + 1]))
|
769
|
-
e += t[++s];
|
770
|
-
else {
|
771
|
-
let r = s + 1, i = 0;
|
772
|
-
for (; r <= s + 3 && qe.test(t[r]); )
|
773
|
-
i = i * 8 + Ie(t[r++]);
|
774
|
-
s = r - 1, e += String.fromCharCode(i);
|
775
|
-
}
|
776
|
-
}
|
777
|
-
return e;
|
778
|
-
}
|
779
|
-
class es extends v {
|
780
|
-
constructor(e, s, r, i) {
|
781
|
-
super(g.Quoted, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.content = Kt(this.getText());
|
782
|
-
}
|
783
|
-
}
|
784
|
-
class ts extends v {
|
785
|
-
constructor(e, s, r, i, n, o) {
|
786
|
-
super(g.Range, e, s, r, o), this.input = e, this.begin = s, this.end = r, this.lhs = i, this.rhs = n, this.file = o;
|
787
|
-
}
|
788
|
-
}
|
789
|
-
class ss extends pe {
|
790
|
-
constructor(e, s, r, i, n) {
|
791
|
-
super(g.Tag, [s, r], e, s, r, !1, !1, n), this.tokenizer = new z(e, i.operators, n, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal liquid tag syntax"), this.tokenizer.skipBlank(), this.args = this.tokenizer.remaining();
|
792
|
-
}
|
793
|
-
}
|
794
|
-
class rs extends v {
|
795
|
-
constructor(e, s, r, i, n, o) {
|
796
|
-
super(g.FilteredValue, r, i, n, o), this.initial = e, this.filters = s, this.input = r, this.begin = i, this.end = n, this.file = o;
|
797
|
-
}
|
798
|
-
}
|
799
|
-
class is {
|
800
|
-
constructor() {
|
801
|
-
this.buffer = "";
|
802
|
-
}
|
803
|
-
write(e) {
|
804
|
-
this.buffer += u(e);
|
805
|
-
}
|
806
|
-
}
|
807
|
-
class ns {
|
808
|
-
constructor() {
|
809
|
-
throw this.buffer = "", this.stream = null, new Error("streaming not supported in browser");
|
810
|
-
}
|
811
|
-
}
|
812
|
-
class os {
|
813
|
-
constructor() {
|
814
|
-
this.buffer = "";
|
815
|
-
}
|
816
|
-
write(e) {
|
817
|
-
e = d(e), typeof e != "string" && this.buffer === "" ? this.buffer = e : this.buffer = u(this.buffer) + u(e);
|
818
|
-
}
|
819
|
-
}
|
820
|
-
class as {
|
821
|
-
renderTemplatesToNodeStream(e, s) {
|
822
|
-
const r = new ns();
|
823
|
-
return Promise.resolve().then(() => N(this.renderTemplates(e, s, r))).then(() => r.end(), (i) => r.error(i)), r.stream;
|
824
|
-
}
|
825
|
-
*renderTemplates(e, s, r) {
|
826
|
-
r || (r = s.opts.keepOutputType ? new os() : new is());
|
827
|
-
const i = [];
|
828
|
-
for (const n of e) {
|
829
|
-
s.renderLimit.check(performance.now());
|
830
|
-
try {
|
831
|
-
const o = yield n.render(s, r);
|
832
|
-
if (o && r.write(o), r.break || r.continue)
|
833
|
-
break;
|
834
|
-
} catch (o) {
|
835
|
-
const a = B.is(o) ? o : new bt(o, n);
|
836
|
-
if (s.opts.catchAllErrors)
|
837
|
-
i.push(a);
|
838
|
-
else
|
839
|
-
throw a;
|
840
|
-
}
|
841
|
-
}
|
842
|
-
if (i.length)
|
843
|
-
throw new Qe(i);
|
844
|
-
return r.buffer;
|
845
|
-
}
|
846
|
-
}
|
847
|
-
class ls {
|
848
|
-
constructor(e) {
|
849
|
-
this.postfix = [...cs(e)];
|
850
|
-
}
|
851
|
-
*evaluate(e, s) {
|
852
|
-
b(e, "unable to evaluate: context not defined");
|
853
|
-
const r = [];
|
854
|
-
for (const i of this.postfix)
|
855
|
-
if (ot(i)) {
|
856
|
-
const n = r.pop();
|
857
|
-
let o;
|
858
|
-
if (Jt[i.operator] === 1)
|
859
|
-
o = yield e.opts.operators[i.operator](n, e);
|
860
|
-
else {
|
861
|
-
const a = r.pop();
|
862
|
-
o = yield e.opts.operators[i.operator](a, n, e);
|
863
|
-
}
|
864
|
-
r.push(o);
|
865
|
-
} else
|
866
|
-
r.push(yield y(i, e, s));
|
867
|
-
return r[0];
|
868
|
-
}
|
869
|
-
valid() {
|
870
|
-
return !!this.postfix.length;
|
871
|
-
}
|
872
|
-
}
|
873
|
-
function* y(t, e, s = !1) {
|
874
|
-
if (t) {
|
875
|
-
if ("content" in t)
|
876
|
-
return t.content;
|
877
|
-
if (Qs(t))
|
878
|
-
return yield hs(t, e, s);
|
879
|
-
if (Zs(t))
|
880
|
-
return yield us(t, e);
|
881
|
-
}
|
882
|
-
}
|
883
|
-
function* hs(t, e, s) {
|
884
|
-
const r = [];
|
885
|
-
for (const i of t.props)
|
886
|
-
r.push(yield y(i, e, !1));
|
887
|
-
try {
|
888
|
-
if (t.variable) {
|
889
|
-
const i = yield y(t.variable, e, s);
|
890
|
-
return yield e._getFromScope(i, r);
|
891
|
-
} else
|
892
|
-
return yield e._get(r);
|
893
|
-
} catch (i) {
|
894
|
-
if (s && i.name === "InternalUndefinedVariableError")
|
895
|
-
return null;
|
896
|
-
throw new xt(i, t);
|
897
|
-
}
|
898
|
-
}
|
899
|
-
function st(t) {
|
900
|
-
return t.content;
|
901
|
-
}
|
902
|
-
function* us(t, e) {
|
903
|
-
const s = yield y(t.lhs, e), r = yield y(t.rhs, e);
|
904
|
-
return We(+s, +r + 1);
|
905
|
-
}
|
906
|
-
function* cs(t) {
|
907
|
-
const e = [];
|
908
|
-
for (const s of t)
|
909
|
-
if (ot(s)) {
|
910
|
-
for (; e.length && e[e.length - 1].getPrecedence() > s.getPrecedence(); )
|
911
|
-
yield e.pop();
|
912
|
-
e.push(s);
|
913
|
-
} else
|
914
|
-
yield s;
|
915
|
-
for (; e.length; )
|
916
|
-
yield e.pop();
|
917
|
-
}
|
918
|
-
function $(t, e) {
|
919
|
-
return !re(t, e);
|
920
|
-
}
|
921
|
-
function re(t, e) {
|
922
|
-
return t = d(t), e.opts.jsTruthy ? !t : t === !1 || t === void 0 || t === null;
|
923
|
-
}
|
924
|
-
const ds = {
|
925
|
-
"==": P,
|
926
|
-
"!=": (t, e) => !P(t, e),
|
927
|
-
">": (t, e) => E(t) ? t.gt(e) : E(e) ? e.lt(t) : d(t) > d(e),
|
928
|
-
"<": (t, e) => E(t) ? t.lt(e) : E(e) ? e.gt(t) : d(t) < d(e),
|
929
|
-
">=": (t, e) => E(t) ? t.geq(e) : E(e) ? e.leq(t) : d(t) >= d(e),
|
930
|
-
"<=": (t, e) => E(t) ? t.leq(e) : E(e) ? e.geq(t) : d(t) <= d(e),
|
931
|
-
contains: (t, e) => (t = d(t), k(t) ? t.some((s) => P(s, e)) : w(t == null ? void 0 : t.indexOf) ? t.indexOf(d(e)) > -1 : !1),
|
932
|
-
not: (t, e) => re(d(t), e),
|
933
|
-
and: (t, e, s) => $(d(t), s) && $(d(e), s),
|
934
|
-
or: (t, e, s) => $(d(t), s) || $(d(e), s)
|
935
|
-
};
|
936
|
-
function P(t, e) {
|
937
|
-
return E(t) ? t.equals(e) : E(e) ? e.equals(t) : (t = d(t), e = d(e), k(t) ? k(e) && fs(t, e) : t === e);
|
938
|
-
}
|
939
|
-
function fs(t, e) {
|
940
|
-
return t.length !== e.length ? !1 : !t.some((s, r) => !P(s, e[r]));
|
941
|
-
}
|
942
|
-
class oe {
|
943
|
-
constructor(e, s, r, i) {
|
944
|
-
this.key = e, this.value = s, this.next = r, this.prev = i;
|
945
|
-
}
|
946
|
-
}
|
947
|
-
class $e {
|
948
|
-
constructor(e, s = 0) {
|
949
|
-
this.limit = e, this.size = s, this.cache = {}, this.head = new oe("HEAD", null, null, null), this.tail = new oe("TAIL", null, null, null), this.head.next = this.tail, this.tail.prev = this.head;
|
950
|
-
}
|
951
|
-
write(e, s) {
|
952
|
-
if (this.cache[e])
|
953
|
-
this.cache[e].value = s;
|
954
|
-
else {
|
955
|
-
const r = new oe(e, s, this.head.next, this.head);
|
956
|
-
this.head.next.prev = r, this.head.next = r, this.cache[e] = r, this.size++, this.ensureLimit();
|
957
|
-
}
|
958
|
-
}
|
959
|
-
read(e) {
|
960
|
-
if (!this.cache[e])
|
961
|
-
return;
|
962
|
-
const { value: s } = this.cache[e];
|
963
|
-
return this.remove(e), this.write(e, s), s;
|
964
|
-
}
|
965
|
-
remove(e) {
|
966
|
-
const s = this.cache[e];
|
967
|
-
s.prev.next = s.next, s.next.prev = s.prev, delete this.cache[e], this.size--;
|
968
|
-
}
|
969
|
-
clear() {
|
970
|
-
this.head.next = this.tail, this.tail.prev = this.head, this.size = 0, this.cache = {};
|
971
|
-
}
|
972
|
-
ensureLimit() {
|
973
|
-
this.size > this.limit && this.remove(this.tail.prev.key);
|
974
|
-
}
|
975
|
-
}
|
976
|
-
function rt(t, e) {
|
977
|
-
const s = document.createElement("base");
|
978
|
-
s.href = t;
|
979
|
-
const r = document.getElementsByTagName("head")[0];
|
980
|
-
r.insertBefore(s, r.firstChild);
|
981
|
-
const i = document.createElement("a");
|
982
|
-
i.href = e;
|
983
|
-
const n = i.href;
|
984
|
-
return r.removeChild(s), n;
|
985
|
-
}
|
986
|
-
function ps(t, e, s) {
|
987
|
-
return t.length && He(t) !== "/" && (t += "/"), rt(t, e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/, (i, n, o) => {
|
988
|
-
const a = o.split("/").pop();
|
989
|
-
return /\.\w+$/.test(a) ? i : n + o + s;
|
990
|
-
});
|
991
|
-
}
|
992
|
-
function gs(t) {
|
993
|
-
return F(this, void 0, void 0, function* () {
|
994
|
-
return new Promise((e, s) => {
|
995
|
-
const r = new XMLHttpRequest();
|
996
|
-
r.onload = () => {
|
997
|
-
r.status >= 200 && r.status < 300 ? e(r.responseText) : s(new Error(r.statusText));
|
998
|
-
}, r.onerror = () => {
|
999
|
-
s(new Error("An error occurred whilst receiving the response."));
|
1000
|
-
}, r.open("GET", t), r.send();
|
1001
|
-
});
|
1002
|
-
});
|
1003
|
-
}
|
1004
|
-
function ms(t) {
|
1005
|
-
const e = new XMLHttpRequest();
|
1006
|
-
if (e.open("GET", t, !1), e.send(), e.status < 200 || e.status >= 300)
|
1007
|
-
throw new Error(e.statusText);
|
1008
|
-
return e.responseText;
|
1009
|
-
}
|
1010
|
-
function ys(t) {
|
1011
|
-
return F(this, void 0, void 0, function* () {
|
1012
|
-
return !0;
|
1013
|
-
});
|
1014
|
-
}
|
1015
|
-
function ws(t) {
|
1016
|
-
return !0;
|
1017
|
-
}
|
1018
|
-
function Ts(t) {
|
1019
|
-
return rt(t, ".");
|
1020
|
-
}
|
1021
|
-
const ks = "/";
|
1022
|
-
var bs = /* @__PURE__ */ Object.freeze({
|
1023
|
-
__proto__: null,
|
1024
|
-
resolve: ps,
|
1025
|
-
readFile: gs,
|
1026
|
-
readFileSync: ms,
|
1027
|
-
exists: ys,
|
1028
|
-
existsSync: ws,
|
1029
|
-
dirname: Ts,
|
1030
|
-
sep: ks
|
1031
|
-
});
|
1032
|
-
function xs(t, e, ...s) {
|
1033
|
-
return t = d(t), k(t) || O(t) ? t.length ? t : e : t === !1 && new Map(s).get("allow_false") ? !1 : re(t, this.context) ? e : t;
|
1034
|
-
}
|
1035
|
-
function Pe(t, e = 0) {
|
1036
|
-
return JSON.stringify(t, null, e);
|
1037
|
-
}
|
1038
|
-
function _s(t, e = 0) {
|
1039
|
-
const s = [];
|
1040
|
-
return JSON.stringify(t, function(r, i) {
|
1041
|
-
if (typeof i != "object" || i === null)
|
1042
|
-
return i;
|
1043
|
-
for (; s.length > 0 && s[s.length - 1] !== this; )
|
1044
|
-
s.pop();
|
1045
|
-
return s.includes(i) ? "[Circular]" : (s.push(i), i);
|
1046
|
-
}, e);
|
1047
|
-
}
|
1048
|
-
function vs(t) {
|
1049
|
-
return Number(t);
|
1050
|
-
}
|
1051
|
-
const Ls = {
|
1052
|
-
raw: !0,
|
1053
|
-
handler: Je
|
1054
|
-
};
|
1055
|
-
var it = {
|
1056
|
-
default: xs,
|
1057
|
-
raw: Ls,
|
1058
|
-
jsonify: Pe,
|
1059
|
-
to_integer: vs,
|
1060
|
-
json: Pe,
|
1061
|
-
inspect: _s
|
1062
|
-
};
|
1063
|
-
const Fs = {
|
1064
|
-
"&": "&",
|
1065
|
-
"<": "<",
|
1066
|
-
">": ">",
|
1067
|
-
'"': """,
|
1068
|
-
"'": "'"
|
1069
|
-
}, Ss = {
|
1070
|
-
"&": "&",
|
1071
|
-
"<": "<",
|
1072
|
-
">": ">",
|
1073
|
-
""": '"',
|
1074
|
-
"'": "'"
|
1075
|
-
};
|
1076
|
-
function ie(t) {
|
1077
|
-
return t = u(t), this.context.memoryLimit.use(t.length), t.replace(/&|<|>|"|'/g, (e) => Fs[e]);
|
1078
|
-
}
|
1079
|
-
function Os(t) {
|
1080
|
-
return ie.call(this, t);
|
1081
|
-
}
|
1082
|
-
function Rs(t) {
|
1083
|
-
return t = u(t), this.context.memoryLimit.use(t.length), t.replace(/&(amp|lt|gt|#34|#39);/g, (e) => Ss[e]);
|
1084
|
-
}
|
1085
|
-
function Es(t) {
|
1086
|
-
return ie.call(this, Rs.call(this, t));
|
1087
|
-
}
|
1088
|
-
function zs(t) {
|
1089
|
-
const e = u(t);
|
1090
|
-
return this.context.memoryLimit.use(e.length), e.replace(/\r?\n/gm, `<br />
|
1091
|
-
`);
|
1092
|
-
}
|
1093
|
-
function Ns(t) {
|
1094
|
-
const e = u(t);
|
1095
|
-
return this.context.memoryLimit.use(e.length), e.replace(/<script[\s\S]*?<\/script>|<style[\s\S]*?<\/style>|<.*?>|<!--[\s\S]*?-->/g, "");
|
1096
|
-
}
|
1097
|
-
var Ds = /* @__PURE__ */ Object.freeze({
|
1098
|
-
__proto__: null,
|
1099
|
-
escape: ie,
|
1100
|
-
xml_escape: Os,
|
1101
|
-
escape_once: Es,
|
1102
|
-
newline_to_br: zs,
|
1103
|
-
strip_html: Ns
|
1104
|
-
});
|
1105
|
-
class qs {
|
1106
|
-
constructor(e) {
|
1107
|
-
this.mapping = e, this.sep = "/";
|
1108
|
-
}
|
1109
|
-
exists(e) {
|
1110
|
-
return F(this, void 0, void 0, function* () {
|
1111
|
-
return this.existsSync(e);
|
1112
|
-
});
|
1113
|
-
}
|
1114
|
-
existsSync(e) {
|
1115
|
-
return !R(this.mapping[e]);
|
1116
|
-
}
|
1117
|
-
readFile(e) {
|
1118
|
-
return F(this, void 0, void 0, function* () {
|
1119
|
-
return this.readFileSync(e);
|
1120
|
-
});
|
1121
|
-
}
|
1122
|
-
readFileSync(e) {
|
1123
|
-
const s = this.mapping[e];
|
1124
|
-
if (R(s))
|
1125
|
-
throw new Error(`ENOENT: ${e}`);
|
1126
|
-
return s;
|
1127
|
-
}
|
1128
|
-
dirname(e) {
|
1129
|
-
const s = e.split(this.sep);
|
1130
|
-
return s.pop(), s.join(this.sep);
|
1131
|
-
}
|
1132
|
-
resolve(e, s, r) {
|
1133
|
-
if (s += r, e === ".")
|
1134
|
-
return s;
|
1135
|
-
const i = e.split(/\/+/);
|
1136
|
-
for (const n of s.split(this.sep))
|
1137
|
-
n === "." || n === "" || (n === ".." ? (i.length > 1 || i[0] !== "") && i.pop() : i.push(n));
|
1138
|
-
return i.join(this.sep);
|
1139
|
-
}
|
1140
|
-
}
|
1141
|
-
const U = {
|
1142
|
-
root: ["."],
|
1143
|
-
layouts: ["."],
|
1144
|
-
partials: ["."],
|
1145
|
-
relativeReference: !0,
|
1146
|
-
jekyllInclude: !1,
|
1147
|
-
cache: void 0,
|
1148
|
-
extname: "",
|
1149
|
-
fs: bs,
|
1150
|
-
dynamicPartials: !0,
|
1151
|
-
jsTruthy: !1,
|
1152
|
-
dateFormat: "%A, %B %-e, %Y at %-l:%M %P %z",
|
1153
|
-
locale: "",
|
1154
|
-
trimTagRight: !1,
|
1155
|
-
trimTagLeft: !1,
|
1156
|
-
trimOutputRight: !1,
|
1157
|
-
trimOutputLeft: !1,
|
1158
|
-
greedy: !0,
|
1159
|
-
tagDelimiterLeft: "{%",
|
1160
|
-
tagDelimiterRight: "%}",
|
1161
|
-
outputDelimiterLeft: "{{",
|
1162
|
-
outputDelimiterRight: "}}",
|
1163
|
-
preserveTimezones: !1,
|
1164
|
-
strictFilters: !1,
|
1165
|
-
strictVariables: !1,
|
1166
|
-
ownPropertyOnly: !0,
|
1167
|
-
lenientIf: !1,
|
1168
|
-
globals: {},
|
1169
|
-
keepOutputType: !1,
|
1170
|
-
operators: ds,
|
1171
|
-
memoryLimit: 1 / 0,
|
1172
|
-
parseLimit: 1 / 0,
|
1173
|
-
renderLimit: 1 / 0
|
1174
|
-
};
|
1175
|
-
function Ms(t) {
|
1176
|
-
var e, s;
|
1177
|
-
if (t.hasOwnProperty("root") && (t.hasOwnProperty("partials") || (t.partials = t.root), t.hasOwnProperty("layouts") || (t.layouts = t.root)), t.hasOwnProperty("cache")) {
|
1178
|
-
let r;
|
1179
|
-
typeof t.cache == "number" ? r = t.cache > 0 ? new $e(t.cache) : void 0 : typeof t.cache == "object" ? r = t.cache : r = t.cache ? new $e(1024) : void 0, t.cache = r;
|
1180
|
-
}
|
1181
|
-
return t = Object.assign(Object.assign(Object.assign({}, U), t.jekyllInclude ? { dynamicPartials: !1 } : {}), t), (!t.fs.dirname || !t.fs.sep) && t.relativeReference && (console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning"), t.relativeReference = !1), t.root = G(t.root), t.partials = G(t.partials), t.layouts = G(t.layouts), t.outputEscape = t.outputEscape && Is(t.outputEscape), t.locale || (t.locale = (s = (e = Ke()) === null || e === void 0 ? void 0 : e().resolvedOptions().locale) !== null && s !== void 0 ? s : "en-US"), t.templates && (t.fs = new qs(t.templates), t.relativeReference = !0, t.root = t.partials = t.layouts = "."), t;
|
1182
|
-
}
|
1183
|
-
function Is(t) {
|
1184
|
-
return t === "escape" ? ie : t === "json" ? it.json : (b(w(t), "`outputEscape` need to be of type string or function"), t);
|
1185
|
-
}
|
1186
|
-
function G(t) {
|
1187
|
-
let e = [];
|
1188
|
-
return k(t) && (e = t), O(t) && (e = [t]), e;
|
1189
|
-
}
|
1190
|
-
function $s(t, e) {
|
1191
|
-
let s = !1;
|
1192
|
-
for (let r = 0; r < t.length; r++) {
|
1193
|
-
const i = t[r];
|
1194
|
-
Ws(i) && (!s && i.trimLeft && Ps(t[r - 1], e.greedy), j(i) && (i.name === "raw" ? s = !0 : i.name === "endraw" && (s = !1)), !s && i.trimRight && Cs(t[r + 1], e.greedy));
|
1195
|
-
}
|
1196
|
-
}
|
1197
|
-
function Ps(t, e) {
|
1198
|
-
if (!t || !me(t))
|
1199
|
-
return;
|
1200
|
-
const s = e ? H : Ze;
|
1201
|
-
for (; f[t.input.charCodeAt(t.end - 1 - t.trimRight)] & s; )
|
1202
|
-
t.trimRight++;
|
1203
|
-
}
|
1204
|
-
function Cs(t, e) {
|
1205
|
-
if (!t || !me(t))
|
1206
|
-
return;
|
1207
|
-
const s = e ? H : Ze;
|
1208
|
-
for (; f[t.input.charCodeAt(t.begin + t.trimLeft)] & s; )
|
1209
|
-
t.trimLeft++;
|
1210
|
-
t.input.charAt(t.begin + t.trimLeft) === `
|
1211
|
-
` && t.trimLeft++;
|
1212
|
-
}
|
1213
|
-
class z {
|
1214
|
-
constructor(e, s = U.operators, r, i) {
|
1215
|
-
this.input = e, this.file = r, this.rawBeginAt = -1, this.p = i ? i[0] : 0, this.N = i ? i[1] : e.length, this.opTrie = Se(s), this.literalTrie = Se(Ge);
|
1216
|
-
}
|
1217
|
-
readExpression() {
|
1218
|
-
return new ls(this.readExpressionTokens());
|
1219
|
-
}
|
1220
|
-
*readExpressionTokens() {
|
1221
|
-
for (; this.p < this.N; ) {
|
1222
|
-
const e = this.readOperator();
|
1223
|
-
if (e) {
|
1224
|
-
yield e;
|
1225
|
-
continue;
|
1226
|
-
}
|
1227
|
-
const s = this.readValue();
|
1228
|
-
if (s) {
|
1229
|
-
yield s;
|
1230
|
-
continue;
|
1231
|
-
}
|
1232
|
-
return;
|
1233
|
-
}
|
1234
|
-
}
|
1235
|
-
readOperator() {
|
1236
|
-
this.skipBlank();
|
1237
|
-
const e = this.matchTrie(this.opTrie);
|
1238
|
-
if (e !== -1)
|
1239
|
-
return new Qt(this.input, this.p, this.p = e, this.file);
|
1240
|
-
}
|
1241
|
-
matchTrie(e) {
|
1242
|
-
let s = e, r = this.p, i;
|
1243
|
-
for (; s[this.input[r]] && r < this.N; )
|
1244
|
-
s = s[this.input[r++]], s.end && (i = s);
|
1245
|
-
return !i || i.needBoundary && Q(this.peek(r - this.p)) ? -1 : r;
|
1246
|
-
}
|
1247
|
-
readFilteredValue() {
|
1248
|
-
const e = this.p, s = this.readExpression();
|
1249
|
-
this.assert(s.valid(), `invalid value expression: ${this.snapshot()}`);
|
1250
|
-
const r = this.readFilters();
|
1251
|
-
return new rs(s, r, this.input, e, this.p, this.file);
|
1252
|
-
}
|
1253
|
-
readFilters() {
|
1254
|
-
const e = [];
|
1255
|
-
for (; ; ) {
|
1256
|
-
const s = this.readFilter();
|
1257
|
-
if (!s)
|
1258
|
-
return e;
|
1259
|
-
e.push(s);
|
1260
|
-
}
|
1261
|
-
}
|
1262
|
-
readFilter() {
|
1263
|
-
if (this.skipBlank(), this.end())
|
1264
|
-
return null;
|
1265
|
-
this.assert(this.peek() === "|", 'expected "|" before filter'), this.p++;
|
1266
|
-
const e = this.p, s = this.readIdentifier();
|
1267
|
-
if (!s.size())
|
1268
|
-
return this.assert(this.end(), "expected filter name"), null;
|
1269
|
-
const r = [];
|
1270
|
-
if (this.skipBlank(), this.peek() === ":")
|
1271
|
-
do {
|
1272
|
-
++this.p;
|
1273
|
-
const i = this.readFilterArg();
|
1274
|
-
i && r.push(i), this.skipBlank(), this.assert(this.end() || this.peek() === "," || this.peek() === "|", () => `unexpected character ${this.snapshot()}`);
|
1275
|
-
} while (this.peek() === ",");
|
1276
|
-
else if (!(this.peek() === "|" || this.end())) throw this.error('expected ":" after filter name');
|
1277
|
-
return new Zt(s.getText(), r, this.input, e, this.p, this.file);
|
1278
|
-
}
|
1279
|
-
readFilterArg() {
|
1280
|
-
const e = this.readValue();
|
1281
|
-
if (!e)
|
1282
|
-
return;
|
1283
|
-
if (this.skipBlank(), this.peek() !== ":")
|
1284
|
-
return e;
|
1285
|
-
++this.p;
|
1286
|
-
const s = this.readValue();
|
1287
|
-
return [e.getText(), s];
|
1288
|
-
}
|
1289
|
-
readTopLevelTokens(e = U) {
|
1290
|
-
const s = [];
|
1291
|
-
for (; this.p < this.N; ) {
|
1292
|
-
const r = this.readTopLevelToken(e);
|
1293
|
-
s.push(r);
|
1294
|
-
}
|
1295
|
-
return $s(s, e), s;
|
1296
|
-
}
|
1297
|
-
readTopLevelToken(e) {
|
1298
|
-
const { tagDelimiterLeft: s, outputDelimiterLeft: r } = e;
|
1299
|
-
return this.rawBeginAt > -1 ? this.readEndrawOrRawContent(e) : this.match(s) ? this.readTagToken(e) : this.match(r) ? this.readOutputToken(e) : this.readHTMLToken([s, r]);
|
1300
|
-
}
|
1301
|
-
readHTMLToken(e) {
|
1302
|
-
const s = this.p;
|
1303
|
-
for (; this.p < this.N && !e.some((r) => this.match(r)); )
|
1304
|
-
++this.p;
|
1305
|
-
return new ze(this.input, s, this.p, this.file);
|
1306
|
-
}
|
1307
|
-
readTagToken(e) {
|
1308
|
-
const { file: s, input: r } = this, i = this.p;
|
1309
|
-
if (this.readToDelimiter(e.tagDelimiterRight) === -1)
|
1310
|
-
throw this.error(`tag ${this.snapshot(i)} not closed`, i);
|
1311
|
-
const n = new Ee(r, i, this.p, e, s);
|
1312
|
-
return n.name === "raw" && (this.rawBeginAt = i), n;
|
1313
|
-
}
|
1314
|
-
readToDelimiter(e, s = !1) {
|
1315
|
-
for (this.skipBlank(); this.p < this.N; ) {
|
1316
|
-
if (s && this.peekType() & ve) {
|
1317
|
-
this.readQuoted();
|
1318
|
-
continue;
|
1319
|
-
}
|
1320
|
-
if (++this.p, this.rmatch(e))
|
1321
|
-
return this.p;
|
1322
|
-
}
|
1323
|
-
return -1;
|
1324
|
-
}
|
1325
|
-
readOutputToken(e = U) {
|
1326
|
-
const { file: s, input: r } = this, { outputDelimiterRight: i } = e, n = this.p;
|
1327
|
-
if (this.readToDelimiter(i, !0) === -1)
|
1328
|
-
throw this.error(`output ${this.snapshot(n)} not closed`, n);
|
1329
|
-
return new Ht(r, n, this.p, e, s);
|
1330
|
-
}
|
1331
|
-
readEndrawOrRawContent(e) {
|
1332
|
-
const { tagDelimiterLeft: s, tagDelimiterRight: r } = e, i = this.p;
|
1333
|
-
let n = this.readTo(s) - s.length;
|
1334
|
-
for (; this.p < this.N; ) {
|
1335
|
-
if (this.readIdentifier().getText() !== "endraw") {
|
1336
|
-
n = this.readTo(s) - s.length;
|
1337
|
-
continue;
|
1338
|
-
}
|
1339
|
-
for (; this.p <= this.N; ) {
|
1340
|
-
if (this.rmatch(r)) {
|
1341
|
-
const o = this.p;
|
1342
|
-
return i === n ? (this.rawBeginAt = -1, new Ee(this.input, i, o, e, this.file)) : (this.p = n, new ze(this.input, i, n, this.file));
|
1343
|
-
}
|
1344
|
-
if (this.rmatch(s))
|
1345
|
-
break;
|
1346
|
-
this.p++;
|
1347
|
-
}
|
1348
|
-
}
|
1349
|
-
throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`, i);
|
1350
|
-
}
|
1351
|
-
readLiquidTagTokens(e = U) {
|
1352
|
-
const s = [];
|
1353
|
-
for (; this.p < this.N; ) {
|
1354
|
-
const r = this.readLiquidTagToken(e);
|
1355
|
-
r && s.push(r);
|
1356
|
-
}
|
1357
|
-
return s;
|
1358
|
-
}
|
1359
|
-
readLiquidTagToken(e) {
|
1360
|
-
if (this.skipBlank(), this.end())
|
1361
|
-
return;
|
1362
|
-
const s = this.p;
|
1363
|
-
this.readToDelimiter(`
|
1364
|
-
`);
|
1365
|
-
const r = this.p;
|
1366
|
-
return new ss(this.input, s, r, e, this.file);
|
1367
|
-
}
|
1368
|
-
error(e, s = this.p) {
|
1369
|
-
return new Tt(e, new ne(this.input, s, this.N, this.file));
|
1370
|
-
}
|
1371
|
-
assert(e, s, r) {
|
1372
|
-
if (!e)
|
1373
|
-
throw this.error(typeof s == "function" ? s() : s, r);
|
1374
|
-
}
|
1375
|
-
snapshot(e = this.p) {
|
1376
|
-
return JSON.stringify(wt(this.input.slice(e, this.N), 32));
|
1377
|
-
}
|
1378
|
-
/**
|
1379
|
-
* @deprecated use #readIdentifier instead
|
1380
|
-
*/
|
1381
|
-
readWord() {
|
1382
|
-
return this.readIdentifier();
|
1383
|
-
}
|
1384
|
-
readIdentifier() {
|
1385
|
-
this.skipBlank();
|
1386
|
-
const e = this.p;
|
1387
|
-
for (; !this.end() && Q(this.peek()); )
|
1388
|
-
++this.p;
|
1389
|
-
return new ne(this.input, e, this.p, this.file);
|
1390
|
-
}
|
1391
|
-
readNonEmptyIdentifier() {
|
1392
|
-
const e = this.readIdentifier();
|
1393
|
-
return e.size() ? e : void 0;
|
1394
|
-
}
|
1395
|
-
readTagName() {
|
1396
|
-
return this.skipBlank(), this.input[this.p] === "#" ? this.input.slice(this.p, ++this.p) : this.readIdentifier().getText();
|
1397
|
-
}
|
1398
|
-
readHashes(e) {
|
1399
|
-
const s = [];
|
1400
|
-
for (; ; ) {
|
1401
|
-
const r = this.readHash(e);
|
1402
|
-
if (!r)
|
1403
|
-
return s;
|
1404
|
-
s.push(r);
|
1405
|
-
}
|
1406
|
-
}
|
1407
|
-
readHash(e) {
|
1408
|
-
this.skipBlank(), this.peek() === "," && ++this.p;
|
1409
|
-
const s = this.p, r = this.readNonEmptyIdentifier();
|
1410
|
-
if (!r)
|
1411
|
-
return;
|
1412
|
-
let i;
|
1413
|
-
this.skipBlank();
|
1414
|
-
const n = e ? "=" : ":";
|
1415
|
-
return this.peek() === n && (++this.p, i = this.readValue()), new Gt(this.input, s, this.p, r, i, this.file);
|
1416
|
-
}
|
1417
|
-
remaining() {
|
1418
|
-
return this.input.slice(this.p, this.N);
|
1419
|
-
}
|
1420
|
-
advance(e = 1) {
|
1421
|
-
this.p += e;
|
1422
|
-
}
|
1423
|
-
end() {
|
1424
|
-
return this.p >= this.N;
|
1425
|
-
}
|
1426
|
-
readTo(e) {
|
1427
|
-
for (; this.p < this.N; )
|
1428
|
-
if (++this.p, this.rmatch(e))
|
1429
|
-
return this.p;
|
1430
|
-
return -1;
|
1431
|
-
}
|
1432
|
-
readValue() {
|
1433
|
-
this.skipBlank();
|
1434
|
-
const e = this.p, s = this.readLiteral() || this.readQuoted() || this.readRange() || this.readNumber(), r = this.readProperties(!s);
|
1435
|
-
return r.length ? new De(s, r, this.input, e, this.p) : s;
|
1436
|
-
}
|
1437
|
-
readScopeValue() {
|
1438
|
-
this.skipBlank();
|
1439
|
-
const e = this.p, s = this.readProperties();
|
1440
|
-
if (s.length)
|
1441
|
-
return new De(void 0, s, this.input, e, this.p);
|
1442
|
-
}
|
1443
|
-
readProperties(e = !0) {
|
1444
|
-
const s = [];
|
1445
|
-
for (; ; ) {
|
1446
|
-
if (this.peek() === "[") {
|
1447
|
-
this.p++;
|
1448
|
-
const r = this.readValue() || new ne(this.input, this.p, this.p, this.file);
|
1449
|
-
this.assert(this.readTo("]") !== -1, "[ not closed"), s.push(r);
|
1450
|
-
continue;
|
1451
|
-
}
|
1452
|
-
if (e && !s.length) {
|
1453
|
-
const r = this.readNonEmptyIdentifier();
|
1454
|
-
if (r) {
|
1455
|
-
s.push(r);
|
1456
|
-
continue;
|
1457
|
-
}
|
1458
|
-
}
|
1459
|
-
if (this.peek() === "." && this.peek(1) !== ".") {
|
1460
|
-
this.p++;
|
1461
|
-
const r = this.readNonEmptyIdentifier();
|
1462
|
-
if (!r)
|
1463
|
-
break;
|
1464
|
-
s.push(r);
|
1465
|
-
continue;
|
1466
|
-
}
|
1467
|
-
break;
|
1468
|
-
}
|
1469
|
-
return s;
|
1470
|
-
}
|
1471
|
-
readNumber() {
|
1472
|
-
this.skipBlank();
|
1473
|
-
let e = !1, s = !1, r = 0;
|
1474
|
-
for (this.peekType() & Rt && r++; this.p + r <= this.N; )
|
1475
|
-
if (this.peekType(r) & Ot)
|
1476
|
-
s = !0, r++;
|
1477
|
-
else if (this.peek(r) === "." && this.peek(r + 1) !== ".") {
|
1478
|
-
if (e || !s)
|
1479
|
-
return;
|
1480
|
-
e = !0, r++;
|
1481
|
-
} else
|
1482
|
-
break;
|
1483
|
-
if (s && !Q(this.peek(r))) {
|
1484
|
-
const i = new Wt(this.input, this.p, this.p + r, this.file);
|
1485
|
-
return this.advance(r), i;
|
1486
|
-
}
|
1487
|
-
}
|
1488
|
-
readLiteral() {
|
1489
|
-
this.skipBlank();
|
1490
|
-
const e = this.matchTrie(this.literalTrie);
|
1491
|
-
if (e === -1)
|
1492
|
-
return;
|
1493
|
-
const s = new Yt(this.input, this.p, e, this.file);
|
1494
|
-
return this.p = e, s;
|
1495
|
-
}
|
1496
|
-
readRange() {
|
1497
|
-
this.skipBlank();
|
1498
|
-
const e = this.p;
|
1499
|
-
if (this.peek() !== "(")
|
1500
|
-
return;
|
1501
|
-
++this.p;
|
1502
|
-
const s = this.readValueOrThrow();
|
1503
|
-
this.p += 2;
|
1504
|
-
const r = this.readValueOrThrow();
|
1505
|
-
return ++this.p, new ts(this.input, e, this.p, s, r, this.file);
|
1506
|
-
}
|
1507
|
-
readValueOrThrow() {
|
1508
|
-
const e = this.readValue();
|
1509
|
-
return this.assert(e, () => `unexpected token ${this.snapshot()}, value expected`), e;
|
1510
|
-
}
|
1511
|
-
readQuoted() {
|
1512
|
-
this.skipBlank();
|
1513
|
-
const e = this.p;
|
1514
|
-
if (!(this.peekType() & ve))
|
1515
|
-
return;
|
1516
|
-
++this.p;
|
1517
|
-
let s = !1;
|
1518
|
-
for (; this.p < this.N && (++this.p, !(this.input[this.p - 1] === this.input[e] && !s)); )
|
1519
|
-
s ? s = !1 : this.input[this.p - 1] === "\\" && (s = !0);
|
1520
|
-
return new es(this.input, e, this.p, this.file);
|
1521
|
-
}
|
1522
|
-
*readFileNameTemplate(e) {
|
1523
|
-
const { outputDelimiterLeft: s } = e, r = [",", " ", s], i = new Set(r);
|
1524
|
-
for (; this.p < this.N && !i.has(this.peek()); )
|
1525
|
-
yield this.match(s) ? this.readOutputToken(e) : this.readHTMLToken(r);
|
1526
|
-
}
|
1527
|
-
match(e) {
|
1528
|
-
for (let s = 0; s < e.length; s++)
|
1529
|
-
if (e[s] !== this.input[this.p + s])
|
1530
|
-
return !1;
|
1531
|
-
return !0;
|
1532
|
-
}
|
1533
|
-
rmatch(e) {
|
1534
|
-
for (let s = 0; s < e.length; s++)
|
1535
|
-
if (e[e.length - 1 - s] !== this.input[this.p - 1 - s])
|
1536
|
-
return !1;
|
1537
|
-
return !0;
|
1538
|
-
}
|
1539
|
-
peekType(e = 0) {
|
1540
|
-
return this.p + e >= this.N ? 0 : f[this.input.charCodeAt(this.p + e)];
|
1541
|
-
}
|
1542
|
-
peek(e = 0) {
|
1543
|
-
return this.p + e >= this.N ? "" : this.input[this.p + e];
|
1544
|
-
}
|
1545
|
-
skipBlank() {
|
1546
|
-
for (; this.peekType() & H; )
|
1547
|
-
++this.p;
|
1548
|
-
}
|
1549
|
-
}
|
1550
|
-
class As {
|
1551
|
-
constructor(e, s) {
|
1552
|
-
this.handlers = {}, this.stopRequested = !1, this.tokens = e, this.parseToken = s;
|
1553
|
-
}
|
1554
|
-
on(e, s) {
|
1555
|
-
return this.handlers[e] = s, this;
|
1556
|
-
}
|
1557
|
-
trigger(e, s) {
|
1558
|
-
const r = this.handlers[e];
|
1559
|
-
return r ? (r.call(this, s), !0) : !1;
|
1560
|
-
}
|
1561
|
-
start() {
|
1562
|
-
this.trigger("start");
|
1563
|
-
let e;
|
1564
|
-
for (; !this.stopRequested && (e = this.tokens.shift()); ) {
|
1565
|
-
if (this.trigger("token", e) || j(e) && this.trigger(`tag:${e.name}`, e))
|
1566
|
-
continue;
|
1567
|
-
const s = this.parseToken(e, this.tokens);
|
1568
|
-
this.trigger("template", s);
|
1569
|
-
}
|
1570
|
-
return this.stopRequested || this.trigger("end"), this;
|
1571
|
-
}
|
1572
|
-
stop() {
|
1573
|
-
return this.stopRequested = !0, this;
|
1574
|
-
}
|
1575
|
-
}
|
1576
|
-
class ge {
|
1577
|
-
constructor(e) {
|
1578
|
-
this.token = e;
|
1579
|
-
}
|
1580
|
-
}
|
1581
|
-
class m extends ge {
|
1582
|
-
constructor(e, s, r) {
|
1583
|
-
super(e), this.name = e.name, this.liquid = r, this.tokenizer = e.tokenizer;
|
1584
|
-
}
|
1585
|
-
}
|
1586
|
-
class W {
|
1587
|
-
constructor(e, s) {
|
1588
|
-
this.hash = {};
|
1589
|
-
const r = new z(e, {});
|
1590
|
-
for (const i of r.readHashes(s))
|
1591
|
-
this.hash[i.name.content] = i.value;
|
1592
|
-
}
|
1593
|
-
*render(e) {
|
1594
|
-
const s = {};
|
1595
|
-
for (const r of Object.keys(this.hash))
|
1596
|
-
s[r] = this.hash[r] === void 0 ? !0 : yield y(this.hash[r], e);
|
1597
|
-
return s;
|
1598
|
-
}
|
1599
|
-
}
|
1600
|
-
function Vs(t) {
|
1601
|
-
return class extends m {
|
1602
|
-
constructor(e, s, r) {
|
1603
|
-
super(e, s, r), w(t.parse) && t.parse.call(this, e, s);
|
1604
|
-
}
|
1605
|
-
*render(e, s) {
|
1606
|
-
const r = yield new W(this.token.args).render(e);
|
1607
|
-
return yield t.render.call(this, e, s, r);
|
1608
|
-
}
|
1609
|
-
};
|
1610
|
-
}
|
1611
|
-
function Bs(t) {
|
1612
|
-
return k(t);
|
1613
|
-
}
|
1614
|
-
class nt {
|
1615
|
-
constructor(e, s, r, i) {
|
1616
|
-
this.name = e, this.handler = w(s) ? s : w(s == null ? void 0 : s.handler) ? s.handler : Je, this.raw = !w(s) && !!(s != null && s.raw), this.args = r, this.liquid = i;
|
1617
|
-
}
|
1618
|
-
*render(e, s) {
|
1619
|
-
const r = [];
|
1620
|
-
for (const i of this.args)
|
1621
|
-
Bs(i) ? r.push([i[0], yield y(i[1], s)]) : r.push(yield y(i, s));
|
1622
|
-
return yield this.handler.apply({ context: s, liquid: this.liquid }, [e, ...r]);
|
1623
|
-
}
|
1624
|
-
}
|
1625
|
-
class _ {
|
1626
|
-
/**
|
1627
|
-
* @param str the value to be valuated, eg.: "foobar" | truncate: 3
|
1628
|
-
*/
|
1629
|
-
constructor(e, s) {
|
1630
|
-
this.filters = [];
|
1631
|
-
const r = typeof e == "string" ? new z(e, s.options.operators).readFilteredValue() : e;
|
1632
|
-
this.initial = r.initial, this.filters = r.filters.map(({ name: i, args: n }) => new nt(i, this.getFilter(s, i), n, s));
|
1633
|
-
}
|
1634
|
-
*value(e, s) {
|
1635
|
-
s = s || e.opts.lenientIf && this.filters.length > 0 && this.filters[0].name === "default";
|
1636
|
-
let r = yield this.initial.evaluate(e, s);
|
1637
|
-
for (const i of this.filters)
|
1638
|
-
r = yield i.render(r, e);
|
1639
|
-
return r;
|
1640
|
-
}
|
1641
|
-
getFilter(e, s) {
|
1642
|
-
const r = e.filters[s];
|
1643
|
-
return b(r || !e.options.strictFilters, () => `undefined filter: ${s}`), r;
|
1644
|
-
}
|
1645
|
-
}
|
1646
|
-
class js extends ge {
|
1647
|
-
constructor(e, s) {
|
1648
|
-
var r;
|
1649
|
-
super(e);
|
1650
|
-
const i = new z(e.input, s.options.operators, e.file, e.contentRange);
|
1651
|
-
this.value = new _(i.readFilteredValue(), s);
|
1652
|
-
const n = this.value.filters, o = s.options.outputEscape;
|
1653
|
-
!(!((r = n[n.length - 1]) === null || r === void 0) && r.raw) && o && n.push(new nt(toString.call(o), o, [], s));
|
1654
|
-
}
|
1655
|
-
*render(e, s) {
|
1656
|
-
const r = yield this.value.value(e, !1);
|
1657
|
-
s.write(r);
|
1658
|
-
}
|
1659
|
-
}
|
1660
|
-
class Us extends ge {
|
1661
|
-
constructor(e) {
|
1662
|
-
super(e), this.str = e.getContent();
|
1663
|
-
}
|
1664
|
-
*render(e, s) {
|
1665
|
-
s.write(this.str);
|
1666
|
-
}
|
1667
|
-
}
|
1668
|
-
var A;
|
1669
|
-
(function(t) {
|
1670
|
-
t.Partials = "partials", t.Layouts = "layouts", t.Root = "root";
|
1671
|
-
})(A || (A = {}));
|
1672
|
-
class Hs {
|
1673
|
-
constructor(e) {
|
1674
|
-
if (this.options = e, e.relativeReference) {
|
1675
|
-
const s = e.fs.sep;
|
1676
|
-
b(s, "`fs.sep` is required for relative reference");
|
1677
|
-
const r = new RegExp(["." + s, ".." + s, "./", "../"].map((i) => ft(i)).join("|"));
|
1678
|
-
this.shouldLoadRelative = (i) => r.test(i);
|
1679
|
-
} else
|
1680
|
-
this.shouldLoadRelative = (s) => !1;
|
1681
|
-
this.contains = this.options.fs.contains || (() => !0);
|
1682
|
-
}
|
1683
|
-
*lookup(e, s, r, i) {
|
1684
|
-
const { fs: n } = this.options, o = this.options[s];
|
1685
|
-
for (const a of this.candidates(e, o, i, s !== A.Root))
|
1686
|
-
if (r ? n.existsSync(a) : yield n.exists(a))
|
1687
|
-
return a;
|
1688
|
-
throw this.lookupError(e, o);
|
1689
|
-
}
|
1690
|
-
*candidates(e, s, r, i) {
|
1691
|
-
const { fs: n, extname: o } = this.options;
|
1692
|
-
if (this.shouldLoadRelative(e) && r) {
|
1693
|
-
const a = n.resolve(this.dirname(r), e, o);
|
1694
|
-
for (const l of s)
|
1695
|
-
if (!i || this.contains(l, a)) {
|
1696
|
-
yield a;
|
1697
|
-
break;
|
1698
|
-
}
|
1699
|
-
}
|
1700
|
-
for (const a of s) {
|
1701
|
-
const l = n.resolve(a, e, o);
|
1702
|
-
(!i || this.contains(a, l)) && (yield l);
|
1703
|
-
}
|
1704
|
-
if (n.fallback !== void 0) {
|
1705
|
-
const a = n.fallback(e);
|
1706
|
-
a !== void 0 && (yield a);
|
1707
|
-
}
|
1708
|
-
}
|
1709
|
-
dirname(e) {
|
1710
|
-
const s = this.options.fs;
|
1711
|
-
return b(s.dirname, "`fs.dirname` is required for relative reference"), s.dirname(e);
|
1712
|
-
}
|
1713
|
-
lookupError(e, s) {
|
1714
|
-
const r = new Error("ENOENT");
|
1715
|
-
return r.message = `ENOENT: Failed to lookup "${e}" in "${s}"`, r.code = "ENOENT", r;
|
1716
|
-
}
|
1717
|
-
}
|
1718
|
-
class M {
|
1719
|
-
constructor(e) {
|
1720
|
-
this.liquid = e, this.cache = this.liquid.options.cache, this.fs = this.liquid.options.fs, this.parseFile = this.cache ? this._parseFileCached : this._parseFile, this.loader = new Hs(this.liquid.options), this.parseLimit = new he("parse length", e.options.parseLimit);
|
1721
|
-
}
|
1722
|
-
parse(e, s) {
|
1723
|
-
e = String(e), this.parseLimit.use(e.length);
|
1724
|
-
const i = new z(e, this.liquid.options.operators, s).readTopLevelTokens(this.liquid.options);
|
1725
|
-
return this.parseTokens(i);
|
1726
|
-
}
|
1727
|
-
parseTokens(e) {
|
1728
|
-
let s;
|
1729
|
-
const r = [], i = [];
|
1730
|
-
for (; s = e.shift(); )
|
1731
|
-
try {
|
1732
|
-
r.push(this.parseToken(s, e));
|
1733
|
-
} catch (n) {
|
1734
|
-
if (this.liquid.options.catchAllErrors)
|
1735
|
-
i.push(n);
|
1736
|
-
else
|
1737
|
-
throw n;
|
1738
|
-
}
|
1739
|
-
if (i.length)
|
1740
|
-
throw new Qe(i);
|
1741
|
-
return r;
|
1742
|
-
}
|
1743
|
-
parseToken(e, s) {
|
1744
|
-
try {
|
1745
|
-
if (j(e)) {
|
1746
|
-
const r = this.liquid.tags[e.name];
|
1747
|
-
return b(r, `tag "${e.name}" not found`), new r(e, s, this.liquid, this);
|
1748
|
-
}
|
1749
|
-
return Ys(e) ? new js(e, this.liquid) : new Us(e);
|
1750
|
-
} catch (r) {
|
1751
|
-
throw B.is(r) ? r : new kt(r, e);
|
1752
|
-
}
|
1753
|
-
}
|
1754
|
-
parseStream(e) {
|
1755
|
-
return new As(e, (s, r) => this.parseToken(s, r));
|
1756
|
-
}
|
1757
|
-
*_parseFileCached(e, s, r = A.Root, i) {
|
1758
|
-
const n = this.cache, o = this.loader.shouldLoadRelative(e) ? i + "," + e : r + ":" + e, a = yield n.read(o);
|
1759
|
-
if (a)
|
1760
|
-
return a;
|
1761
|
-
const l = this._parseFile(e, s, r, i), h = s ? yield l : N(l);
|
1762
|
-
n.write(o, h);
|
1763
|
-
try {
|
1764
|
-
return yield h;
|
1765
|
-
} catch (c) {
|
1766
|
-
throw n.remove(o), c;
|
1767
|
-
}
|
1768
|
-
}
|
1769
|
-
*_parseFile(e, s, r = A.Root, i) {
|
1770
|
-
const n = yield this.loader.lookup(e, r, s, i);
|
1771
|
-
return this.parse(s ? this.fs.readFileSync(n) : yield this.fs.readFile(n), n);
|
1772
|
-
}
|
1773
|
-
}
|
1774
|
-
var g;
|
1775
|
-
(function(t) {
|
1776
|
-
t[t.Number = 1] = "Number", t[t.Literal = 2] = "Literal", t[t.Tag = 4] = "Tag", t[t.Output = 8] = "Output", t[t.HTML = 16] = "HTML", t[t.Filter = 32] = "Filter", t[t.Hash = 64] = "Hash", t[t.PropertyAccess = 128] = "PropertyAccess", t[t.Word = 256] = "Word", t[t.Range = 512] = "Range", t[t.Quoted = 1024] = "Quoted", t[t.Operator = 2048] = "Operator", t[t.FilteredValue = 4096] = "FilteredValue", t[t.Delimited = 12] = "Delimited";
|
1777
|
-
})(g || (g = {}));
|
1778
|
-
function Ws(t) {
|
1779
|
-
return !!(q(t) & g.Delimited);
|
1780
|
-
}
|
1781
|
-
function ot(t) {
|
1782
|
-
return q(t) === g.Operator;
|
1783
|
-
}
|
1784
|
-
function me(t) {
|
1785
|
-
return q(t) === g.HTML;
|
1786
|
-
}
|
1787
|
-
function Ys(t) {
|
1788
|
-
return q(t) === g.Output;
|
1789
|
-
}
|
1790
|
-
function j(t) {
|
1791
|
-
return q(t) === g.Tag;
|
1792
|
-
}
|
1793
|
-
function Js(t) {
|
1794
|
-
return q(t) === g.Quoted;
|
1795
|
-
}
|
1796
|
-
function Qs(t) {
|
1797
|
-
return q(t) === g.PropertyAccess;
|
1798
|
-
}
|
1799
|
-
function Zs(t) {
|
1800
|
-
return q(t) === g.Range;
|
1801
|
-
}
|
1802
|
-
function q(t) {
|
1803
|
-
return t ? t.kind : -1;
|
1804
|
-
}
|
1805
|
-
class I {
|
1806
|
-
constructor(e = {}, s = U, r = {}, { memoryLimit: i, renderLimit: n } = {}) {
|
1807
|
-
var o, a, l, h, c;
|
1808
|
-
this.scopes = [{}], this.registers = {}, this.sync = !!r.sync, this.opts = s, this.globals = (o = r.globals) !== null && o !== void 0 ? o : s.globals, this.environments = te(e) ? e : Object(e), this.strictVariables = (a = r.strictVariables) !== null && a !== void 0 ? a : this.opts.strictVariables, this.ownPropertyOnly = (l = r.ownPropertyOnly) !== null && l !== void 0 ? l : s.ownPropertyOnly, this.memoryLimit = i ?? new he("memory alloc", (h = r.memoryLimit) !== null && h !== void 0 ? h : s.memoryLimit), this.renderLimit = n ?? new he("template render", performance.now() + ((c = r.renderLimit) !== null && c !== void 0 ? c : s.renderLimit));
|
1809
|
-
}
|
1810
|
-
getRegister(e) {
|
1811
|
-
return this.registers[e] = this.registers[e] || {};
|
1812
|
-
}
|
1813
|
-
setRegister(e, s) {
|
1814
|
-
return this.registers[e] = s;
|
1815
|
-
}
|
1816
|
-
saveRegister(...e) {
|
1817
|
-
return e.map((s) => [s, this.getRegister(s)]);
|
1818
|
-
}
|
1819
|
-
restoreRegister(e) {
|
1820
|
-
return e.forEach(([s, r]) => this.setRegister(s, r));
|
1821
|
-
}
|
1822
|
-
getAll() {
|
1823
|
-
return [this.globals, this.environments, ...this.scopes].reduce((e, s) => ee(e, s), {});
|
1824
|
-
}
|
1825
|
-
/**
|
1826
|
-
* @deprecated use `_get()` or `getSync()` instead
|
1827
|
-
*/
|
1828
|
-
get(e) {
|
1829
|
-
return this.getSync(e);
|
1830
|
-
}
|
1831
|
-
getSync(e) {
|
1832
|
-
return D(this._get(e));
|
1833
|
-
}
|
1834
|
-
*_get(e) {
|
1835
|
-
const s = this.findScope(e[0]);
|
1836
|
-
return yield this._getFromScope(s, e);
|
1837
|
-
}
|
1838
|
-
/**
|
1839
|
-
* @deprecated use `_get()` instead
|
1840
|
-
*/
|
1841
|
-
getFromScope(e, s) {
|
1842
|
-
return D(this._getFromScope(e, s));
|
1843
|
-
}
|
1844
|
-
*_getFromScope(e, s, r = this.strictVariables) {
|
1845
|
-
O(s) && (s = s.split("."));
|
1846
|
-
for (let i = 0; i < s.length; i++)
|
1847
|
-
if (e = yield Gs(e, s[i], this.ownPropertyOnly), r && pt(e))
|
1848
|
-
throw new _t(s.slice(0, i + 1).join("."));
|
1849
|
-
return e;
|
1850
|
-
}
|
1851
|
-
push(e) {
|
1852
|
-
return this.scopes.push(e);
|
1853
|
-
}
|
1854
|
-
pop() {
|
1855
|
-
return this.scopes.pop();
|
1856
|
-
}
|
1857
|
-
bottom() {
|
1858
|
-
return this.scopes[0];
|
1859
|
-
}
|
1860
|
-
spawn(e = {}) {
|
1861
|
-
return new I(e, this.opts, {
|
1862
|
-
sync: this.sync,
|
1863
|
-
globals: this.globals,
|
1864
|
-
strictVariables: this.strictVariables
|
1865
|
-
}, {
|
1866
|
-
renderLimit: this.renderLimit,
|
1867
|
-
memoryLimit: this.memoryLimit
|
1868
|
-
});
|
1869
|
-
}
|
1870
|
-
findScope(e) {
|
1871
|
-
for (let s = this.scopes.length - 1; s >= 0; s--) {
|
1872
|
-
const r = this.scopes[s];
|
1873
|
-
if (e in r)
|
1874
|
-
return r;
|
1875
|
-
}
|
1876
|
-
return e in this.environments ? this.environments : this.globals;
|
1877
|
-
}
|
1878
|
-
}
|
1879
|
-
function Gs(t, e, s) {
|
1880
|
-
if (t = Ue(t), R(t))
|
1881
|
-
return t;
|
1882
|
-
if (k(t) && e < 0)
|
1883
|
-
return t[t.length + +e];
|
1884
|
-
const r = Xs(t, e, s);
|
1885
|
-
return r === void 0 && t instanceof V ? t.liquidMethodMissing(e) : w(r) ? r.call(t) : e === "size" ? tr(t) : e === "first" ? Ks(t) : e === "last" ? er(t) : r;
|
1886
|
-
}
|
1887
|
-
function Xs(t, e, s) {
|
1888
|
-
if (!(s && !Object.hasOwnProperty.call(t, e) && !(t instanceof V)))
|
1889
|
-
return t[e];
|
1890
|
-
}
|
1891
|
-
function Ks(t) {
|
1892
|
-
return k(t) ? t[0] : t.first;
|
1893
|
-
}
|
1894
|
-
function er(t) {
|
1895
|
-
return k(t) ? t[t.length - 1] : t.last;
|
1896
|
-
}
|
1897
|
-
function tr(t) {
|
1898
|
-
if (t.hasOwnProperty("size") || t.size !== void 0)
|
1899
|
-
return t.size;
|
1900
|
-
if (k(t) || O(t))
|
1901
|
-
return t.length;
|
1902
|
-
if (typeof t == "object")
|
1903
|
-
return Object.keys(t).length;
|
1904
|
-
}
|
1905
|
-
var C;
|
1906
|
-
(function(t) {
|
1907
|
-
t[t.OUTPUT = 0] = "OUTPUT", t[t.STORE = 1] = "STORE";
|
1908
|
-
})(C || (C = {}));
|
1909
|
-
const sr = x(Math.abs), rr = x(Math.max), ir = x(Math.min), nr = x(Math.ceil), or = x((t, e, s = !1) => s ? Math.floor(t / e) : t / e), ar = x(Math.floor), lr = x((t, e) => t - e), hr = x((t, e) => t % e), ur = x((t, e) => t * e);
|
1910
|
-
function cr(t, e = 0) {
|
1911
|
-
t = d(t), e = d(e);
|
1912
|
-
const s = Math.pow(10, e);
|
1913
|
-
return Math.round(t * s) / s;
|
1914
|
-
}
|
1915
|
-
function dr(t, e) {
|
1916
|
-
return t = d(t), e = d(e), Number(t) + Number(e);
|
1917
|
-
}
|
1918
|
-
var fr = /* @__PURE__ */ Object.freeze({
|
1919
|
-
__proto__: null,
|
1920
|
-
abs: sr,
|
1921
|
-
at_least: rr,
|
1922
|
-
at_most: ir,
|
1923
|
-
ceil: nr,
|
1924
|
-
divided_by: or,
|
1925
|
-
floor: ar,
|
1926
|
-
minus: lr,
|
1927
|
-
modulo: hr,
|
1928
|
-
times: ur,
|
1929
|
-
round: cr,
|
1930
|
-
plus: dr
|
1931
|
-
});
|
1932
|
-
const pr = (t) => decodeURIComponent(u(t)).replace(/\+/g, " "), gr = (t) => encodeURIComponent(u(t)).replace(/%20/g, "+"), mr = (t) => encodeURIComponent(u(t)).replace(/%20/g, "+").replace(/[!'()*]/g, (e) => "%" + e.charCodeAt(0).toString(16).toUpperCase()), yr = (t) => encodeURI(u(t)).replace(/%5B/g, "[").replace(/%5D/g, "]"), Ce = /[^\p{M}\p{L}\p{Nd}]+/ug, wr = {
|
1933
|
-
raw: /\s+/g,
|
1934
|
-
default: Ce,
|
1935
|
-
pretty: /[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,
|
1936
|
-
ascii: /[^A-Za-z0-9]+/g,
|
1937
|
-
latin: Ce,
|
1938
|
-
none: null
|
1939
|
-
};
|
1940
|
-
function Tr(t, e = "default", s = !1) {
|
1941
|
-
t = u(t);
|
1942
|
-
const r = wr[e];
|
1943
|
-
return r && (e === "latin" && (t = kr(t)), t = t.replace(r, "-").replace(/^-|-$/g, "")), s ? t : t.toLowerCase();
|
1944
|
-
}
|
1945
|
-
function kr(t) {
|
1946
|
-
return t.replace(/[àáâãäå]/g, "a").replace(/[æ]/g, "ae").replace(/[ç]/g, "c").replace(/[èéêë]/g, "e").replace(/[ìíîï]/g, "i").replace(/[ð]/g, "d").replace(/[ñ]/g, "n").replace(/[òóôõöø]/g, "o").replace(/[ùúûü]/g, "u").replace(/[ýÿ]/g, "y").replace(/[ß]/g, "ss").replace(/[œ]/g, "oe").replace(/[þ]/g, "th").replace(/[ẞ]/g, "SS").replace(/[Œ]/g, "OE").replace(/[Þ]/g, "TH");
|
1947
|
-
}
|
1948
|
-
var br = /* @__PURE__ */ Object.freeze({
|
1949
|
-
__proto__: null,
|
1950
|
-
url_decode: pr,
|
1951
|
-
url_encode: gr,
|
1952
|
-
cgi_escape: mr,
|
1953
|
-
uri_escape: yr,
|
1954
|
-
slugify: Tr
|
1955
|
-
});
|
1956
|
-
const xr = x(function(t, e) {
|
1957
|
-
const s = T(t), r = e === void 0 ? " " : e, i = s.length * (1 + r.length);
|
1958
|
-
return this.context.memoryLimit.use(i), s.join(r);
|
1959
|
-
}), _r = x((t) => k(t) ? He(t) : ""), vr = x((t) => k(t) ? t[0] : ""), Lr = x(function(t) {
|
1960
|
-
const e = T(t);
|
1961
|
-
return this.context.memoryLimit.use(e.length), [...e].reverse();
|
1962
|
-
});
|
1963
|
-
function* Fr(t, e) {
|
1964
|
-
const s = [], r = T(t);
|
1965
|
-
this.context.memoryLimit.use(r.length);
|
1966
|
-
for (const i of r)
|
1967
|
-
s.push([
|
1968
|
-
i,
|
1969
|
-
e ? yield this.context._getFromScope(i, u(e).split("."), !1) : i
|
1970
|
-
]);
|
1971
|
-
return s.sort((i, n) => {
|
1972
|
-
const o = i[1], a = n[1];
|
1973
|
-
return o < a ? -1 : o > a ? 1 : 0;
|
1974
|
-
}).map((i) => i[0]);
|
1975
|
-
}
|
1976
|
-
function Sr(t, e) {
|
1977
|
-
const s = u(e), r = e === void 0 ? xe : (n, o) => xe(n[s], o[s]), i = T(t);
|
1978
|
-
return this.context.memoryLimit.use(i.length), [...i].sort(r);
|
1979
|
-
}
|
1980
|
-
const Or = (t) => t && t.length || 0;
|
1981
|
-
function* Rr(t, e) {
|
1982
|
-
const s = [], r = T(t);
|
1983
|
-
this.context.memoryLimit.use(r.length);
|
1984
|
-
for (const i of r)
|
1985
|
-
s.push(yield this.context._getFromScope(i, u(e), !1));
|
1986
|
-
return s;
|
1987
|
-
}
|
1988
|
-
function* Er(t, e) {
|
1989
|
-
let s = 0;
|
1990
|
-
const r = T(t);
|
1991
|
-
for (const i of r) {
|
1992
|
-
const n = Number(e ? yield this.context._getFromScope(i, u(e), !1) : i);
|
1993
|
-
s += Number.isNaN(n) ? 0 : n;
|
1994
|
-
}
|
1995
|
-
return s;
|
1996
|
-
}
|
1997
|
-
function zr(t) {
|
1998
|
-
const e = T(t);
|
1999
|
-
return this.context.memoryLimit.use(e.length), e.filter((s) => !R(d(s)));
|
2000
|
-
}
|
2001
|
-
function at(t, e = []) {
|
2002
|
-
const s = T(t), r = T(e);
|
2003
|
-
return this.context.memoryLimit.use(s.length + r.length), s.concat(r);
|
2004
|
-
}
|
2005
|
-
function Nr(t, e) {
|
2006
|
-
return at.call(this, t, [e]);
|
2007
|
-
}
|
2008
|
-
function Dr(t, e) {
|
2009
|
-
const s = T(t);
|
2010
|
-
this.context.memoryLimit.use(s.length);
|
2011
|
-
const r = [...s];
|
2012
|
-
return r.unshift(e), r;
|
2013
|
-
}
|
2014
|
-
function qr(t) {
|
2015
|
-
const e = [...T(t)];
|
2016
|
-
return e.pop(), e;
|
2017
|
-
}
|
2018
|
-
function Mr(t) {
|
2019
|
-
const e = T(t);
|
2020
|
-
this.context.memoryLimit.use(e.length);
|
2021
|
-
const s = [...e];
|
2022
|
-
return s.shift(), s;
|
2023
|
-
}
|
2024
|
-
function Ir(t, e, s = 1) {
|
2025
|
-
return t = d(t), R(t) ? [] : (k(t) || (t = u(t)), e = e < 0 ? t.length + e : e, this.context.memoryLimit.use(s), t.slice(e, e + s));
|
2026
|
-
}
|
2027
|
-
function* $r(t, e, s) {
|
2028
|
-
const r = [];
|
2029
|
-
t = T(t), this.context.memoryLimit.use(t.length);
|
2030
|
-
const i = new z(u(e)).readScopeValue();
|
2031
|
-
for (const n of t)
|
2032
|
-
r.push(yield y(i, this.context.spawn(n)));
|
2033
|
-
return t.filter((n, o) => s === void 0 ? $(r[o], this.context) : P(r[o], s));
|
2034
|
-
}
|
2035
|
-
function* Pr(t, e, s) {
|
2036
|
-
const r = [], i = new _(u(s), this.liquid), n = T(t);
|
2037
|
-
this.context.memoryLimit.use(n.length);
|
2038
|
-
for (const o of n)
|
2039
|
-
(yield i.value(this.context.spawn({ [e]: o }))) && r.push(o);
|
2040
|
-
return r;
|
2041
|
-
}
|
2042
|
-
function* Cr(t, e) {
|
2043
|
-
const s = /* @__PURE__ */ new Map();
|
2044
|
-
t = T(t);
|
2045
|
-
const r = new z(u(e)).readScopeValue();
|
2046
|
-
this.context.memoryLimit.use(t.length);
|
2047
|
-
for (const i of t) {
|
2048
|
-
const n = yield y(r, this.context.spawn(i));
|
2049
|
-
s.has(n) || s.set(n, []), s.get(n).push(i);
|
2050
|
-
}
|
2051
|
-
return [...s.entries()].map(([i, n]) => ({ name: i, items: n }));
|
2052
|
-
}
|
2053
|
-
function* Ar(t, e, s) {
|
2054
|
-
const r = /* @__PURE__ */ new Map(), i = new _(u(s), this.liquid);
|
2055
|
-
t = T(t), this.context.memoryLimit.use(t.length);
|
2056
|
-
for (const n of t) {
|
2057
|
-
const o = yield i.value(this.context.spawn({ [e]: n }));
|
2058
|
-
r.has(o) || r.set(o, []), r.get(o).push(n);
|
2059
|
-
}
|
2060
|
-
return [...r.entries()].map(([n, o]) => ({ name: n, items: o }));
|
2061
|
-
}
|
2062
|
-
function* Vr(t, e, s) {
|
2063
|
-
const r = new z(u(e)).readScopeValue(), i = T(t);
|
2064
|
-
for (const n of i) {
|
2065
|
-
const o = yield y(r, this.context.spawn(n));
|
2066
|
-
if (P(o, s))
|
2067
|
-
return n;
|
2068
|
-
}
|
2069
|
-
}
|
2070
|
-
function* Br(t, e, s) {
|
2071
|
-
const r = new _(u(s), this.liquid), i = T(t);
|
2072
|
-
for (const n of i)
|
2073
|
-
if (yield r.value(this.context.spawn({ [e]: n })))
|
2074
|
-
return n;
|
2075
|
-
}
|
2076
|
-
function jr(t) {
|
2077
|
-
t = d(t), this.context.memoryLimit.use(t.length);
|
2078
|
-
const e = {};
|
2079
|
-
return (t || []).filter((s) => je.call(e, String(s)) ? !1 : (e[String(s)] = !0, !0));
|
2080
|
-
}
|
2081
|
-
function Ur(t, e = 1) {
|
2082
|
-
if (t = d(t), R(t))
|
2083
|
-
return [];
|
2084
|
-
k(t) || (t = u(t)), this.context.memoryLimit.use(e);
|
2085
|
-
const s = [...t].sort(() => Math.random() - 0.5);
|
2086
|
-
return e === 1 ? s[0] : s.slice(0, e);
|
2087
|
-
}
|
2088
|
-
var Hr = /* @__PURE__ */ Object.freeze({
|
2089
|
-
__proto__: null,
|
2090
|
-
join: xr,
|
2091
|
-
last: _r,
|
2092
|
-
first: vr,
|
2093
|
-
reverse: Lr,
|
2094
|
-
sort: Fr,
|
2095
|
-
sort_natural: Sr,
|
2096
|
-
size: Or,
|
2097
|
-
map: Rr,
|
2098
|
-
sum: Er,
|
2099
|
-
compact: zr,
|
2100
|
-
concat: at,
|
2101
|
-
push: Nr,
|
2102
|
-
unshift: Dr,
|
2103
|
-
pop: qr,
|
2104
|
-
shift: Mr,
|
2105
|
-
slice: Ir,
|
2106
|
-
where: $r,
|
2107
|
-
where_exp: Pr,
|
2108
|
-
group_by: Cr,
|
2109
|
-
group_by_exp: Ar,
|
2110
|
-
find: Vr,
|
2111
|
-
find_exp: Br,
|
2112
|
-
uniq: jr,
|
2113
|
-
sample: Ur
|
2114
|
-
});
|
2115
|
-
function ye(t, e, s) {
|
2116
|
-
var r, i, n;
|
2117
|
-
const o = ((r = t == null ? void 0 : t.length) !== null && r !== void 0 ? r : 0) + ((i = e == null ? void 0 : e.length) !== null && i !== void 0 ? i : 0) + ((n = s == null ? void 0 : s.length) !== null && n !== void 0 ? n : 0);
|
2118
|
-
this.context.memoryLimit.use(o);
|
2119
|
-
const a = ht(t, this.context.opts, s);
|
2120
|
-
return a ? (e = d(e), e = R(e) ? this.context.opts.dateFormat : u(e), Z(a, e)) : t;
|
2121
|
-
}
|
2122
|
-
function Wr(t) {
|
2123
|
-
return ye.call(this, t, "%Y-%m-%dT%H:%M:%S%:z");
|
2124
|
-
}
|
2125
|
-
function Yr(t) {
|
2126
|
-
return ye.call(this, t, "%a, %d %b %Y %H:%M:%S %z");
|
2127
|
-
}
|
2128
|
-
function Jr(t, e, s) {
|
2129
|
-
return lt.call(this, t, "%b", e, s);
|
2130
|
-
}
|
2131
|
-
function Qr(t, e, s) {
|
2132
|
-
return lt.call(this, t, "%B", e, s);
|
2133
|
-
}
|
2134
|
-
function lt(t, e, s, r) {
|
2135
|
-
const i = ht(t, this.context.opts);
|
2136
|
-
if (!i)
|
2137
|
-
return t;
|
2138
|
-
if (s === "ordinal") {
|
2139
|
-
const n = i.getDate();
|
2140
|
-
return r === "US" ? Z(i, `${e} ${n}%q, %Y`) : Z(i, `${n}%q ${e} %Y`);
|
2141
|
-
}
|
2142
|
-
return Z(i, `%d ${e} %Y`);
|
2143
|
-
}
|
2144
|
-
function ht(t, e, s) {
|
2145
|
-
let r;
|
2146
|
-
const i = s ?? e.timezoneOffset, n = e.locale;
|
2147
|
-
return t = d(t), t === "now" || t === "today" ? r = new S(Date.now(), n, i) : ce(t) ? r = new S(t * 1e3, n, i) : O(t) ? /^\d+$/.test(t) ? r = new S(+t * 1e3, n, i) : e.preserveTimezones && s === void 0 ? r = S.createDateFixedToTimezone(t, n) : r = new S(t, n, i) : r = new S(t, n, i), r.valid() ? r : void 0;
|
2148
|
-
}
|
2149
|
-
var Zr = /* @__PURE__ */ Object.freeze({
|
2150
|
-
__proto__: null,
|
2151
|
-
date: ye,
|
2152
|
-
date_to_xmlschema: Wr,
|
2153
|
-
date_to_rfc822: Yr,
|
2154
|
-
date_to_string: Jr,
|
2155
|
-
date_to_long_string: Qr
|
2156
|
-
});
|
2157
|
-
const ae = /[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu, Ae = /[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;
|
2158
|
-
function Gr(t, e) {
|
2159
|
-
b(arguments.length === 2, "append expect 2 arguments");
|
2160
|
-
const s = u(t), r = u(e);
|
2161
|
-
return this.context.memoryLimit.use(s.length + r.length), s + r;
|
2162
|
-
}
|
2163
|
-
function Xr(t, e) {
|
2164
|
-
b(arguments.length === 2, "prepend expect 2 arguments");
|
2165
|
-
const s = u(t), r = u(e);
|
2166
|
-
return this.context.memoryLimit.use(s.length + r.length), r + s;
|
2167
|
-
}
|
2168
|
-
function Kr(t, e) {
|
2169
|
-
const s = u(t);
|
2170
|
-
return this.context.memoryLimit.use(s.length), e ? (e = de(u(e)), s.replace(new RegExp(`^[${e}]+`, "g"), "")) : s.replace(/^\s+/, "");
|
2171
|
-
}
|
2172
|
-
function ei(t) {
|
2173
|
-
const e = u(t);
|
2174
|
-
return this.context.memoryLimit.use(e.length), e.toLowerCase();
|
2175
|
-
}
|
2176
|
-
function ti(t) {
|
2177
|
-
const e = u(t);
|
2178
|
-
return this.context.memoryLimit.use(e.length), u(e).toUpperCase();
|
2179
|
-
}
|
2180
|
-
function si(t, e) {
|
2181
|
-
const s = u(t);
|
2182
|
-
return this.context.memoryLimit.use(s.length), s.split(u(e)).join("");
|
2183
|
-
}
|
2184
|
-
function ri(t, e) {
|
2185
|
-
const s = u(t);
|
2186
|
-
return this.context.memoryLimit.use(s.length), s.replace(u(e), "");
|
2187
|
-
}
|
2188
|
-
function ii(t, e) {
|
2189
|
-
const s = u(t);
|
2190
|
-
this.context.memoryLimit.use(s.length);
|
2191
|
-
const r = u(e), i = s.lastIndexOf(r);
|
2192
|
-
return i === -1 ? s : s.substring(0, i) + s.substring(i + r.length);
|
2193
|
-
}
|
2194
|
-
function ni(t, e) {
|
2195
|
-
return t = u(t), this.context.memoryLimit.use(t.length), e ? (e = de(u(e)), t.replace(new RegExp(`[${e}]+$`, "g"), "")) : t.replace(/\s+$/, "");
|
2196
|
-
}
|
2197
|
-
function oi(t, e) {
|
2198
|
-
const s = u(t);
|
2199
|
-
this.context.memoryLimit.use(s.length);
|
2200
|
-
const r = s.split(u(e));
|
2201
|
-
for (; r.length && r[r.length - 1] === ""; )
|
2202
|
-
r.pop();
|
2203
|
-
return r;
|
2204
|
-
}
|
2205
|
-
function ai(t, e) {
|
2206
|
-
const s = u(t);
|
2207
|
-
return this.context.memoryLimit.use(s.length), e ? (e = de(u(e)), s.replace(new RegExp(`^[${e}]+`, "g"), "").replace(new RegExp(`[${e}]+$`, "g"), "")) : s.trim();
|
2208
|
-
}
|
2209
|
-
function li(t) {
|
2210
|
-
const e = u(t);
|
2211
|
-
return this.context.memoryLimit.use(e.length), e.replace(/\r?\n/gm, "");
|
2212
|
-
}
|
2213
|
-
function hi(t) {
|
2214
|
-
return t = u(t), this.context.memoryLimit.use(t.length), t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
|
2215
|
-
}
|
2216
|
-
function ui(t, e, s) {
|
2217
|
-
const r = u(t);
|
2218
|
-
return this.context.memoryLimit.use(r.length), r.split(u(e)).join(s);
|
2219
|
-
}
|
2220
|
-
function ci(t, e, s) {
|
2221
|
-
const r = u(t);
|
2222
|
-
return this.context.memoryLimit.use(r.length), r.replace(u(e), s);
|
2223
|
-
}
|
2224
|
-
function di(t, e, s) {
|
2225
|
-
const r = u(t);
|
2226
|
-
this.context.memoryLimit.use(r.length);
|
2227
|
-
const i = u(e), n = r.lastIndexOf(i);
|
2228
|
-
if (n === -1)
|
2229
|
-
return r;
|
2230
|
-
const o = u(s);
|
2231
|
-
return r.substring(0, n) + o + r.substring(n + i.length);
|
2232
|
-
}
|
2233
|
-
function fi(t, e = 50, s = "...") {
|
2234
|
-
const r = u(t);
|
2235
|
-
return this.context.memoryLimit.use(r.length), r.length <= e ? t : r.substring(0, e - s.length) + s;
|
2236
|
-
}
|
2237
|
-
function pi(t, e = 15, s = "...") {
|
2238
|
-
const r = u(t);
|
2239
|
-
this.context.memoryLimit.use(r.length);
|
2240
|
-
const i = r.split(/\s+/);
|
2241
|
-
e <= 0 && (e = 1);
|
2242
|
-
let n = i.slice(0, e).join(" ");
|
2243
|
-
return i.length >= e && (n += s), n;
|
2244
|
-
}
|
2245
|
-
function gi(t) {
|
2246
|
-
const e = u(t);
|
2247
|
-
return this.context.memoryLimit.use(e.length), e.replace(/\s+/g, " ");
|
2248
|
-
}
|
2249
|
-
function mi(t, e) {
|
2250
|
-
const s = u(t);
|
2251
|
-
if (this.context.memoryLimit.use(s.length), t = s.trim(), !t)
|
2252
|
-
return 0;
|
2253
|
-
switch (e) {
|
2254
|
-
case "cjk":
|
2255
|
-
return (t.match(ae) || []).length + (t.match(Ae) || []).length;
|
2256
|
-
case "auto":
|
2257
|
-
return ae.test(t) ? t.match(ae).length + (t.match(Ae) || []).length : t.split(/\s+/).length;
|
2258
|
-
default:
|
2259
|
-
return t.split(/\s+/).length;
|
2260
|
-
}
|
2261
|
-
}
|
2262
|
-
function yi(t, e = "and") {
|
2263
|
-
switch (this.context.memoryLimit.use(t.length), t.length) {
|
2264
|
-
case 0:
|
2265
|
-
return "";
|
2266
|
-
case 1:
|
2267
|
-
return t[0];
|
2268
|
-
case 2:
|
2269
|
-
return `${t[0]} ${e} ${t[1]}`;
|
2270
|
-
default:
|
2271
|
-
return `${t.slice(0, -1).join(", ")}, ${e} ${t[t.length - 1]}`;
|
2272
|
-
}
|
2273
|
-
}
|
2274
|
-
var wi = /* @__PURE__ */ Object.freeze({
|
2275
|
-
__proto__: null,
|
2276
|
-
append: Gr,
|
2277
|
-
prepend: Xr,
|
2278
|
-
lstrip: Kr,
|
2279
|
-
downcase: ei,
|
2280
|
-
upcase: ti,
|
2281
|
-
remove: si,
|
2282
|
-
remove_first: ri,
|
2283
|
-
remove_last: ii,
|
2284
|
-
rstrip: ni,
|
2285
|
-
split: oi,
|
2286
|
-
strip: ai,
|
2287
|
-
strip_newlines: li,
|
2288
|
-
capitalize: hi,
|
2289
|
-
replace: ui,
|
2290
|
-
replace_first: ci,
|
2291
|
-
replace_last: di,
|
2292
|
-
truncate: fi,
|
2293
|
-
truncatewords: pi,
|
2294
|
-
normalize_whitespace: gi,
|
2295
|
-
number_of_words: mi,
|
2296
|
-
array_to_sentence_string: yi
|
2297
|
-
});
|
2298
|
-
const Ti = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Ds), fr), br), Hr), Zr), wi), it);
|
2299
|
-
class ki extends m {
|
2300
|
-
constructor(e, s, r) {
|
2301
|
-
super(e, s, r), this.key = this.tokenizer.readIdentifier().content, this.tokenizer.assert(this.key, "expected variable name"), this.tokenizer.skipBlank(), this.tokenizer.assert(this.tokenizer.peek() === "=", 'expected "="'), this.tokenizer.advance(), this.value = new _(this.tokenizer.readFilteredValue(), this.liquid);
|
2302
|
-
}
|
2303
|
-
*render(e) {
|
2304
|
-
e.bottom()[this.key] = yield this.value.value(e, this.liquid.options.lenientIf);
|
2305
|
-
}
|
2306
|
-
}
|
2307
|
-
const Ve = ["offset", "limit", "reversed"];
|
2308
|
-
class bi extends m {
|
2309
|
-
constructor(e, s, r, i) {
|
2310
|
-
super(e, s, r);
|
2311
|
-
const n = this.tokenizer.readIdentifier(), o = this.tokenizer.readIdentifier(), a = this.tokenizer.readValue();
|
2312
|
-
if (!n.size() || o.content !== "in" || !a)
|
2313
|
-
throw new Error(`illegal tag: ${e.getText()}`);
|
2314
|
-
this.variable = n.content, this.collection = a, this.hash = new W(this.tokenizer.remaining()), this.templates = [], this.elseTemplates = [];
|
2315
|
-
let l;
|
2316
|
-
const h = i.parseStream(s).on("start", () => l = this.templates).on("tag:else", (c) => {
|
2317
|
-
K(c.args), l = this.elseTemplates;
|
2318
|
-
}).on("tag:endfor", (c) => {
|
2319
|
-
K(c.args), h.stop();
|
2320
|
-
}).on("template", (c) => l.push(c)).on("end", () => {
|
2321
|
-
throw new Error(`tag ${e.getText()} not closed`);
|
2322
|
-
});
|
2323
|
-
h.start();
|
2324
|
-
}
|
2325
|
-
*render(e, s) {
|
2326
|
-
const r = this.liquid.renderer;
|
2327
|
-
let i = ue(yield y(this.collection, e));
|
2328
|
-
if (!i.length) {
|
2329
|
-
yield r.renderTemplates(this.elseTemplates, e, s);
|
2330
|
-
return;
|
2331
|
-
}
|
2332
|
-
const n = "continue-" + this.variable + "-" + this.collection.getText();
|
2333
|
-
e.push({ continue: e.getRegister(n) });
|
2334
|
-
const o = yield this.hash.render(e);
|
2335
|
-
e.pop(), i = (this.liquid.options.orderedFilterParameters ? Object.keys(o).filter((h) => Ve.includes(h)) : Ve.filter((h) => o[h] !== void 0)).reduce((h, c) => c === "offset" ? _i(h, o.offset) : c === "limit" ? vi(h, o.limit) : xi(h), i), e.setRegister(n, (o.offset || 0) + i.length);
|
2336
|
-
const l = { forloop: new fe(i.length, this.collection.getText(), this.variable) };
|
2337
|
-
e.push(l);
|
2338
|
-
for (const h of i) {
|
2339
|
-
if (l[this.variable] = h, yield r.renderTemplates(this.templates, e, s), s.break) {
|
2340
|
-
s.break = !1;
|
2341
|
-
break;
|
2342
|
-
}
|
2343
|
-
s.continue = !1, l.forloop.next();
|
2344
|
-
}
|
2345
|
-
e.pop();
|
2346
|
-
}
|
2347
|
-
}
|
2348
|
-
function xi(t) {
|
2349
|
-
return [...t].reverse();
|
2350
|
-
}
|
2351
|
-
function _i(t, e) {
|
2352
|
-
return t.slice(e);
|
2353
|
-
}
|
2354
|
-
function vi(t, e) {
|
2355
|
-
return t.slice(0, e);
|
2356
|
-
}
|
2357
|
-
class Li extends m {
|
2358
|
-
constructor(e, s, r, i) {
|
2359
|
-
for (super(e, s, r), this.templates = [], this.variable = this.readVariableName(); s.length; ) {
|
2360
|
-
const n = s.shift();
|
2361
|
-
if (j(n) && n.name === "endcapture")
|
2362
|
-
return;
|
2363
|
-
this.templates.push(i.parseToken(n, s));
|
2364
|
-
}
|
2365
|
-
throw new Error(`tag ${e.getText()} not closed`);
|
2366
|
-
}
|
2367
|
-
*render(e) {
|
2368
|
-
const r = yield this.liquid.renderer.renderTemplates(this.templates, e);
|
2369
|
-
e.bottom()[this.variable] = r;
|
2370
|
-
}
|
2371
|
-
readVariableName() {
|
2372
|
-
const e = this.tokenizer.readIdentifier().content;
|
2373
|
-
if (e)
|
2374
|
-
return e;
|
2375
|
-
const s = this.tokenizer.readQuoted();
|
2376
|
-
if (s)
|
2377
|
-
return st(s);
|
2378
|
-
throw this.tokenizer.error("invalid capture name");
|
2379
|
-
}
|
2380
|
-
}
|
2381
|
-
class Fi extends m {
|
2382
|
-
constructor(e, s, r, i) {
|
2383
|
-
super(e, s, r), this.branches = [], this.elseTemplates = [], this.value = new _(this.tokenizer.readFilteredValue(), this.liquid), this.elseTemplates = [];
|
2384
|
-
let n = [], o = 0;
|
2385
|
-
const a = i.parseStream(s).on("tag:when", (l) => {
|
2386
|
-
if (o > 0)
|
2387
|
-
return;
|
2388
|
-
n = [];
|
2389
|
-
const h = [];
|
2390
|
-
for (; !l.tokenizer.end(); )
|
2391
|
-
h.push(l.tokenizer.readValueOrThrow()), l.tokenizer.skipBlank(), l.tokenizer.peek() === "," ? l.tokenizer.readTo(",") : l.tokenizer.readTo("or");
|
2392
|
-
this.branches.push({
|
2393
|
-
values: h,
|
2394
|
-
templates: n
|
2395
|
-
});
|
2396
|
-
}).on("tag:else", () => {
|
2397
|
-
o++, n = this.elseTemplates;
|
2398
|
-
}).on("tag:endcase", () => a.stop()).on("template", (l) => {
|
2399
|
-
(n !== this.elseTemplates || o === 1) && n.push(l);
|
2400
|
-
}).on("end", () => {
|
2401
|
-
throw new Error(`tag ${e.getText()} not closed`);
|
2402
|
-
});
|
2403
|
-
a.start();
|
2404
|
-
}
|
2405
|
-
*render(e, s) {
|
2406
|
-
const r = this.liquid.renderer, i = d(yield this.value.value(e, e.opts.lenientIf));
|
2407
|
-
let n = !1;
|
2408
|
-
for (const o of this.branches)
|
2409
|
-
for (const a of o.values) {
|
2410
|
-
const l = yield y(a, e, e.opts.lenientIf);
|
2411
|
-
if (P(i, l)) {
|
2412
|
-
yield r.renderTemplates(o.templates, e, s), n = !0;
|
2413
|
-
break;
|
2414
|
-
}
|
2415
|
-
}
|
2416
|
-
n || (yield r.renderTemplates(this.elseTemplates, e, s));
|
2417
|
-
}
|
2418
|
-
}
|
2419
|
-
class Si extends m {
|
2420
|
-
constructor(e, s, r) {
|
2421
|
-
for (super(e, s, r); s.length; ) {
|
2422
|
-
const i = s.shift();
|
2423
|
-
if (j(i) && i.name === "endcomment")
|
2424
|
-
return;
|
2425
|
-
}
|
2426
|
-
throw new Error(`tag ${e.getText()} not closed`);
|
2427
|
-
}
|
2428
|
-
render() {
|
2429
|
-
}
|
2430
|
-
}
|
2431
|
-
class Oi extends m {
|
2432
|
-
constructor(e, s, r, i) {
|
2433
|
-
super(e, s, r);
|
2434
|
-
const n = this.tokenizer;
|
2435
|
-
for (this.file = we(n, this.liquid, i), this.currentFile = e.file; !n.end(); ) {
|
2436
|
-
n.skipBlank();
|
2437
|
-
const o = n.p, a = n.readIdentifier();
|
2438
|
-
if ((a.content === "with" || a.content === "for") && (n.skipBlank(), n.peek() !== ":")) {
|
2439
|
-
const l = n.readValue();
|
2440
|
-
if (l) {
|
2441
|
-
const h = n.p, c = n.readIdentifier();
|
2442
|
-
let p;
|
2443
|
-
c.content === "as" ? p = n.readIdentifier() : n.p = h, this[a.content] = { value: l, alias: p && p.content }, n.skipBlank(), n.peek() === "," && n.advance();
|
2444
|
-
continue;
|
2445
|
-
}
|
2446
|
-
}
|
2447
|
-
n.p = o;
|
2448
|
-
break;
|
2449
|
-
}
|
2450
|
-
this.hash = new W(n.remaining());
|
2451
|
-
}
|
2452
|
-
*render(e, s) {
|
2453
|
-
const { liquid: r, hash: i } = this, n = yield Te(this.file, e, r);
|
2454
|
-
b(n, () => `illegal file path "${n}"`);
|
2455
|
-
const o = e.spawn(), a = o.bottom();
|
2456
|
-
if (ee(a, yield i.render(e)), this.with) {
|
2457
|
-
const { value: l, alias: h } = this.with;
|
2458
|
-
a[h || n] = yield y(l, e);
|
2459
|
-
}
|
2460
|
-
if (this.for) {
|
2461
|
-
const { value: l, alias: h } = this.for, c = ue(yield y(l, e));
|
2462
|
-
a.forloop = new fe(c.length, l.getText(), h);
|
2463
|
-
for (const p of c) {
|
2464
|
-
a[h] = p;
|
2465
|
-
const L = yield r._parsePartialFile(n, o.sync, this.currentFile);
|
2466
|
-
yield r.renderer.renderTemplates(L, o, s), a.forloop.next();
|
2467
|
-
}
|
2468
|
-
} else {
|
2469
|
-
const l = yield r._parsePartialFile(n, o.sync, this.currentFile);
|
2470
|
-
yield r.renderer.renderTemplates(l, o, s);
|
2471
|
-
}
|
2472
|
-
}
|
2473
|
-
}
|
2474
|
-
function we(t, e, s) {
|
2475
|
-
if (e.options.dynamicPartials) {
|
2476
|
-
const n = t.readValue();
|
2477
|
-
if (t.assert(n, "illegal file path"), n.getText() === "none")
|
2478
|
-
return;
|
2479
|
-
if (Js(n)) {
|
2480
|
-
const o = s.parse(st(n));
|
2481
|
-
return Be(o);
|
2482
|
-
}
|
2483
|
-
return n;
|
2484
|
-
}
|
2485
|
-
const r = [...t.readFileNameTemplate(e.options)], i = Be(s.parseTokens(r));
|
2486
|
-
return i === "none" ? void 0 : i;
|
2487
|
-
}
|
2488
|
-
function Be(t) {
|
2489
|
-
return t.length === 1 && me(t[0].token) ? t[0].token.getContent() : t;
|
2490
|
-
}
|
2491
|
-
function* Te(t, e, s) {
|
2492
|
-
return typeof t == "string" ? t : Array.isArray(t) ? s.renderer.renderTemplates(t, e) : yield y(t, e);
|
2493
|
-
}
|
2494
|
-
class Ri extends m {
|
2495
|
-
constructor(e, s, r, i) {
|
2496
|
-
super(e, s, r);
|
2497
|
-
const { tokenizer: n } = e;
|
2498
|
-
this.file = we(n, this.liquid, i), this.currentFile = e.file;
|
2499
|
-
const o = n.p;
|
2500
|
-
n.readIdentifier().content === "with" ? (n.skipBlank(), n.peek() !== ":" ? this.withVar = n.readValue() : n.p = o) : n.p = o, this.hash = new W(n.remaining(), this.liquid.options.jekyllInclude);
|
2501
|
-
}
|
2502
|
-
*render(e, s) {
|
2503
|
-
const { liquid: r, hash: i, withVar: n } = this, { renderer: o } = r, a = yield Te(this.file, e, r);
|
2504
|
-
b(a, () => `illegal file path "${a}"`);
|
2505
|
-
const l = e.saveRegister("blocks", "blockMode");
|
2506
|
-
e.setRegister("blocks", {}), e.setRegister("blockMode", C.OUTPUT);
|
2507
|
-
const h = yield i.render(e);
|
2508
|
-
n && (h[a] = yield y(n, e));
|
2509
|
-
const c = yield r._parsePartialFile(a, e.sync, this.currentFile);
|
2510
|
-
e.push(e.opts.jekyllInclude ? { include: h } : h), yield o.renderTemplates(c, e, s), e.pop(), e.restoreRegister(l);
|
2511
|
-
}
|
2512
|
-
}
|
2513
|
-
class Ei extends m {
|
2514
|
-
constructor(e, s, r) {
|
2515
|
-
super(e, s, r), this.variable = this.tokenizer.readIdentifier().content;
|
2516
|
-
}
|
2517
|
-
render(e, s) {
|
2518
|
-
const r = e.environments;
|
2519
|
-
ce(r[this.variable]) || (r[this.variable] = 0), s.write(u(--r[this.variable]));
|
2520
|
-
}
|
2521
|
-
}
|
2522
|
-
class zi extends m {
|
2523
|
-
constructor(e, s, r) {
|
2524
|
-
super(e, s, r), this.candidates = [];
|
2525
|
-
const i = this.tokenizer.readValue();
|
2526
|
-
for (this.tokenizer.skipBlank(), i && (this.tokenizer.peek() === ":" ? (this.group = i, this.tokenizer.advance()) : this.candidates.push(i)); !this.tokenizer.end(); ) {
|
2527
|
-
const n = this.tokenizer.readValue();
|
2528
|
-
n && this.candidates.push(n), this.tokenizer.readTo(",");
|
2529
|
-
}
|
2530
|
-
this.tokenizer.assert(this.candidates.length, () => `empty candidates: "${e.getText()}"`);
|
2531
|
-
}
|
2532
|
-
*render(e, s) {
|
2533
|
-
const i = `cycle:${yield y(this.group, e)}:` + this.candidates.join(","), n = e.getRegister("cycle");
|
2534
|
-
let o = n[i];
|
2535
|
-
o === void 0 && (o = n[i] = 0);
|
2536
|
-
const a = this.candidates[o];
|
2537
|
-
return o = (o + 1) % this.candidates.length, n[i] = o, yield y(a, e);
|
2538
|
-
}
|
2539
|
-
}
|
2540
|
-
class Ni extends m {
|
2541
|
-
constructor(e, s, r, i) {
|
2542
|
-
super(e, s, r), this.branches = [];
|
2543
|
-
let n = [];
|
2544
|
-
i.parseStream(s).on("start", () => this.branches.push({
|
2545
|
-
value: new _(e.args, this.liquid),
|
2546
|
-
templates: n = []
|
2547
|
-
})).on("tag:elsif", (o) => {
|
2548
|
-
b(!this.elseTemplates, "unexpected elsif after else"), this.branches.push({
|
2549
|
-
value: new _(o.args, this.liquid),
|
2550
|
-
templates: n = []
|
2551
|
-
});
|
2552
|
-
}).on("tag:else", (o) => {
|
2553
|
-
K(o.args), b(!this.elseTemplates, "duplicated else"), n = this.elseTemplates = [];
|
2554
|
-
}).on("tag:endif", function(o) {
|
2555
|
-
K(o.args), this.stop();
|
2556
|
-
}).on("template", (o) => n.push(o)).on("end", () => {
|
2557
|
-
throw new Error(`tag ${e.getText()} not closed`);
|
2558
|
-
}).start();
|
2559
|
-
}
|
2560
|
-
*render(e, s) {
|
2561
|
-
const r = this.liquid.renderer;
|
2562
|
-
for (const { value: i, templates: n } of this.branches) {
|
2563
|
-
const o = yield i.value(e, e.opts.lenientIf);
|
2564
|
-
if ($(o, e)) {
|
2565
|
-
yield r.renderTemplates(n, e, s);
|
2566
|
-
return;
|
2567
|
-
}
|
2568
|
-
}
|
2569
|
-
yield r.renderTemplates(this.elseTemplates || [], e, s);
|
2570
|
-
}
|
2571
|
-
}
|
2572
|
-
class Di extends m {
|
2573
|
-
constructor(e, s, r) {
|
2574
|
-
super(e, s, r), this.variable = this.tokenizer.readIdentifier().content;
|
2575
|
-
}
|
2576
|
-
render(e, s) {
|
2577
|
-
const r = e.environments;
|
2578
|
-
ce(r[this.variable]) || (r[this.variable] = 0);
|
2579
|
-
const i = r[this.variable];
|
2580
|
-
r[this.variable]++, s.write(u(i));
|
2581
|
-
}
|
2582
|
-
}
|
2583
|
-
class qi extends m {
|
2584
|
-
constructor(e, s, r, i) {
|
2585
|
-
super(e, s, r), this.file = we(this.tokenizer, this.liquid, i), this.currentFile = e.file, this.args = new W(this.tokenizer.remaining()), this.templates = i.parseTokens(s);
|
2586
|
-
}
|
2587
|
-
*render(e, s) {
|
2588
|
-
const { liquid: r, args: i, file: n } = this, { renderer: o } = r;
|
2589
|
-
if (n === void 0) {
|
2590
|
-
e.setRegister("blockMode", C.OUTPUT), yield o.renderTemplates(this.templates, e, s);
|
2591
|
-
return;
|
2592
|
-
}
|
2593
|
-
const a = yield Te(this.file, e, r);
|
2594
|
-
b(a, () => `illegal file path "${a}"`);
|
2595
|
-
const l = yield r._parseLayoutFile(a, e.sync, this.currentFile);
|
2596
|
-
e.setRegister("blockMode", C.STORE);
|
2597
|
-
const h = yield o.renderTemplates(this.templates, e), c = e.getRegister("blocks");
|
2598
|
-
c[""] === void 0 && (c[""] = (p, L) => L.write(h)), e.setRegister("blockMode", C.OUTPUT), e.push(yield i.render(e)), yield o.renderTemplates(l, e, s), e.pop();
|
2599
|
-
}
|
2600
|
-
}
|
2601
|
-
class Mi extends m {
|
2602
|
-
constructor(e, s, r, i) {
|
2603
|
-
super(e, s, r), this.templates = [];
|
2604
|
-
const n = /\w+/.exec(e.args);
|
2605
|
-
for (this.block = n ? n[0] : ""; s.length; ) {
|
2606
|
-
const o = s.shift();
|
2607
|
-
if (j(o) && o.name === "endblock")
|
2608
|
-
return;
|
2609
|
-
const a = i.parseToken(o, s);
|
2610
|
-
this.templates.push(a);
|
2611
|
-
}
|
2612
|
-
throw new Error(`tag ${e.getText()} not closed`);
|
2613
|
-
}
|
2614
|
-
*render(e, s) {
|
2615
|
-
const r = this.getBlockRender(e);
|
2616
|
-
e.getRegister("blockMode") === C.STORE ? e.getRegister("blocks")[this.block] = r : yield r(new Le(), s);
|
2617
|
-
}
|
2618
|
-
getBlockRender(e) {
|
2619
|
-
const { liquid: s, templates: r } = this, i = e.getRegister("blocks")[this.block], n = function* (o, a) {
|
2620
|
-
e.push({ block: o }), yield s.renderer.renderTemplates(r, e, a), e.pop();
|
2621
|
-
};
|
2622
|
-
return i ? (o, a) => i(new Le(() => n(o, a)), a) : n;
|
2623
|
-
}
|
2624
|
-
}
|
2625
|
-
class Ii extends m {
|
2626
|
-
constructor(e, s, r) {
|
2627
|
-
for (super(e, s, r), this.tokens = []; s.length; ) {
|
2628
|
-
const i = s.shift();
|
2629
|
-
if (j(i) && i.name === "endraw")
|
2630
|
-
return;
|
2631
|
-
this.tokens.push(i);
|
2632
|
-
}
|
2633
|
-
throw new Error(`tag ${e.getText()} not closed`);
|
2634
|
-
}
|
2635
|
-
render() {
|
2636
|
-
return this.tokens.map((e) => e.getText()).join("");
|
2637
|
-
}
|
2638
|
-
}
|
2639
|
-
class $i extends fe {
|
2640
|
-
constructor(e, s, r, i) {
|
2641
|
-
super(e, r, i), this.length = e, this.cols = s;
|
2642
|
-
}
|
2643
|
-
row() {
|
2644
|
-
return Math.floor(this.i / this.cols) + 1;
|
2645
|
-
}
|
2646
|
-
col0() {
|
2647
|
-
return this.i % this.cols;
|
2648
|
-
}
|
2649
|
-
col() {
|
2650
|
-
return this.col0() + 1;
|
2651
|
-
}
|
2652
|
-
col_first() {
|
2653
|
-
return this.col0() === 0;
|
2654
|
-
}
|
2655
|
-
col_last() {
|
2656
|
-
return this.col() === this.cols;
|
2657
|
-
}
|
2658
|
-
}
|
2659
|
-
class Pi extends m {
|
2660
|
-
constructor(e, s, r, i) {
|
2661
|
-
super(e, s, r);
|
2662
|
-
const n = this.tokenizer.readIdentifier();
|
2663
|
-
this.tokenizer.skipBlank();
|
2664
|
-
const o = this.tokenizer.readIdentifier(), a = this.tokenizer.readValue();
|
2665
|
-
if (o.content !== "in" || !a)
|
2666
|
-
throw new Error(`illegal tag: ${e.getText()}`);
|
2667
|
-
this.variable = n.content, this.collection = a, this.args = new W(this.tokenizer.remaining()), this.templates = [];
|
2668
|
-
let l;
|
2669
|
-
const h = i.parseStream(s).on("start", () => l = this.templates).on("tag:endtablerow", () => h.stop()).on("template", (c) => l.push(c)).on("end", () => {
|
2670
|
-
throw new Error(`tag ${e.getText()} not closed`);
|
2671
|
-
});
|
2672
|
-
h.start();
|
2673
|
-
}
|
2674
|
-
*render(e, s) {
|
2675
|
-
let r = ue(yield y(this.collection, e));
|
2676
|
-
const i = yield this.args.render(e), n = i.offset || 0, o = i.limit === void 0 ? r.length : i.limit;
|
2677
|
-
r = r.slice(n, n + o);
|
2678
|
-
const a = i.cols || r.length, l = this.liquid.renderer, h = new $i(r.length, a, this.collection.getText(), this.variable), c = { tablerowloop: h };
|
2679
|
-
e.push(c);
|
2680
|
-
for (let p = 0; p < r.length; p++, h.next())
|
2681
|
-
c[this.variable] = r[p], h.col0() === 0 && (h.row() !== 1 && s.write("</tr>"), s.write(`<tr class="row${h.row()}">`)), s.write(`<td class="col${h.col()}">`), yield l.renderTemplates(this.templates, e, s), s.write("</td>");
|
2682
|
-
r.length && s.write("</tr>"), e.pop();
|
2683
|
-
}
|
2684
|
-
}
|
2685
|
-
class Ci extends m {
|
2686
|
-
constructor(e, s, r, i) {
|
2687
|
-
super(e, s, r), this.branches = [], this.elseTemplates = [];
|
2688
|
-
let n = [], o = 0;
|
2689
|
-
i.parseStream(s).on("start", () => this.branches.push({
|
2690
|
-
value: new _(e.args, this.liquid),
|
2691
|
-
test: re,
|
2692
|
-
templates: n = []
|
2693
|
-
})).on("tag:elsif", (a) => {
|
2694
|
-
if (o > 0) {
|
2695
|
-
n = [];
|
2696
|
-
return;
|
2697
|
-
}
|
2698
|
-
this.branches.push({
|
2699
|
-
value: new _(a.args, this.liquid),
|
2700
|
-
test: $,
|
2701
|
-
templates: n = []
|
2702
|
-
});
|
2703
|
-
}).on("tag:else", () => {
|
2704
|
-
o++, n = this.elseTemplates;
|
2705
|
-
}).on("tag:endunless", function() {
|
2706
|
-
this.stop();
|
2707
|
-
}).on("template", (a) => {
|
2708
|
-
(n !== this.elseTemplates || o === 1) && n.push(a);
|
2709
|
-
}).on("end", () => {
|
2710
|
-
throw new Error(`tag ${e.getText()} not closed`);
|
2711
|
-
}).start();
|
2712
|
-
}
|
2713
|
-
*render(e, s) {
|
2714
|
-
const r = this.liquid.renderer;
|
2715
|
-
for (const { value: i, test: n, templates: o } of this.branches) {
|
2716
|
-
const a = yield i.value(e, e.opts.lenientIf);
|
2717
|
-
if (n(a, e)) {
|
2718
|
-
yield r.renderTemplates(o, e, s);
|
2719
|
-
return;
|
2720
|
-
}
|
2721
|
-
}
|
2722
|
-
yield r.renderTemplates(this.elseTemplates, e, s);
|
2723
|
-
}
|
2724
|
-
}
|
2725
|
-
class Ai extends m {
|
2726
|
-
render(e, s) {
|
2727
|
-
s.break = !0;
|
2728
|
-
}
|
2729
|
-
}
|
2730
|
-
class Vi extends m {
|
2731
|
-
render(e, s) {
|
2732
|
-
s.continue = !0;
|
2733
|
-
}
|
2734
|
-
}
|
2735
|
-
class Bi extends m {
|
2736
|
-
constructor(e, s, r) {
|
2737
|
-
super(e, s, r), this.tokenizer.skipBlank(), this.tokenizer.end() || (this.value = new _(this.tokenizer.readFilteredValue(), this.liquid));
|
2738
|
-
}
|
2739
|
-
*render(e, s) {
|
2740
|
-
if (!this.value)
|
2741
|
-
return;
|
2742
|
-
const r = yield this.value.value(e, !1);
|
2743
|
-
s.write(r);
|
2744
|
-
}
|
2745
|
-
}
|
2746
|
-
class ji extends m {
|
2747
|
-
constructor(e, s, r, i) {
|
2748
|
-
super(e, s, r);
|
2749
|
-
const n = this.tokenizer.readLiquidTagTokens(this.liquid.options);
|
2750
|
-
this.templates = i.parseTokens(n);
|
2751
|
-
}
|
2752
|
-
*render(e, s) {
|
2753
|
-
yield this.liquid.renderer.renderTemplates(this.templates, e, s);
|
2754
|
-
}
|
2755
|
-
}
|
2756
|
-
class Ui extends m {
|
2757
|
-
constructor(e, s, r) {
|
2758
|
-
if (super(e, s, r), e.args.search(/\n\s*[^#\s]/g) !== -1)
|
2759
|
-
throw new Error("every line of an inline comment must start with a '#' character");
|
2760
|
-
}
|
2761
|
-
render() {
|
2762
|
-
}
|
2763
|
-
}
|
2764
|
-
const Hi = {
|
2765
|
-
assign: ki,
|
2766
|
-
for: bi,
|
2767
|
-
capture: Li,
|
2768
|
-
case: Fi,
|
2769
|
-
comment: Si,
|
2770
|
-
include: Ri,
|
2771
|
-
render: Oi,
|
2772
|
-
decrement: Ei,
|
2773
|
-
increment: Di,
|
2774
|
-
cycle: zi,
|
2775
|
-
if: Ni,
|
2776
|
-
layout: qi,
|
2777
|
-
block: Mi,
|
2778
|
-
raw: Ii,
|
2779
|
-
tablerow: Pi,
|
2780
|
-
unless: Ci,
|
2781
|
-
break: Ai,
|
2782
|
-
continue: Vi,
|
2783
|
-
echo: Bi,
|
2784
|
-
liquid: ji,
|
2785
|
-
"#": Ui
|
2786
|
-
};
|
2787
|
-
class ut {
|
2788
|
-
constructor(e = {}) {
|
2789
|
-
this.renderer = new as(), this.filters = {}, this.tags = {}, this.options = Ms(e), this.parser = new M(this), be(Hi, (s, r) => this.registerTag(r, s)), be(Ti, (s, r) => this.registerFilter(r, s));
|
2790
|
-
}
|
2791
|
-
parse(e, s) {
|
2792
|
-
return new M(this).parse(e, s);
|
2793
|
-
}
|
2794
|
-
_render(e, s, r) {
|
2795
|
-
const i = s instanceof I ? s : new I(s, this.options, r);
|
2796
|
-
return this.renderer.renderTemplates(e, i);
|
2797
|
-
}
|
2798
|
-
render(e, s, r) {
|
2799
|
-
return F(this, void 0, void 0, function* () {
|
2800
|
-
return N(this._render(e, s, Object.assign(Object.assign({}, r), { sync: !1 })));
|
2801
|
-
});
|
2802
|
-
}
|
2803
|
-
renderSync(e, s, r) {
|
2804
|
-
return D(this._render(e, s, Object.assign(Object.assign({}, r), { sync: !0 })));
|
2805
|
-
}
|
2806
|
-
renderToNodeStream(e, s, r = {}) {
|
2807
|
-
const i = new I(s, this.options, r);
|
2808
|
-
return this.renderer.renderTemplatesToNodeStream(e, i);
|
2809
|
-
}
|
2810
|
-
_parseAndRender(e, s, r) {
|
2811
|
-
const i = this.parse(e);
|
2812
|
-
return this._render(i, s, r);
|
2813
|
-
}
|
2814
|
-
parseAndRender(e, s, r) {
|
2815
|
-
return F(this, void 0, void 0, function* () {
|
2816
|
-
return N(this._parseAndRender(e, s, Object.assign(Object.assign({}, r), { sync: !1 })));
|
2817
|
-
});
|
2818
|
-
}
|
2819
|
-
parseAndRenderSync(e, s, r) {
|
2820
|
-
return D(this._parseAndRender(e, s, Object.assign(Object.assign({}, r), { sync: !0 })));
|
2821
|
-
}
|
2822
|
-
_parsePartialFile(e, s, r) {
|
2823
|
-
return new M(this).parseFile(e, s, A.Partials, r);
|
2824
|
-
}
|
2825
|
-
_parseLayoutFile(e, s, r) {
|
2826
|
-
return new M(this).parseFile(e, s, A.Layouts, r);
|
2827
|
-
}
|
2828
|
-
_parseFile(e, s, r, i) {
|
2829
|
-
return new M(this).parseFile(e, s, r, i);
|
2830
|
-
}
|
2831
|
-
parseFile(e, s) {
|
2832
|
-
return F(this, void 0, void 0, function* () {
|
2833
|
-
return N(new M(this).parseFile(e, !1, s));
|
2834
|
-
});
|
2835
|
-
}
|
2836
|
-
parseFileSync(e, s) {
|
2837
|
-
return D(new M(this).parseFile(e, !0, s));
|
2838
|
-
}
|
2839
|
-
*_renderFile(e, s, r) {
|
2840
|
-
const i = yield this._parseFile(e, r.sync, r.lookupType);
|
2841
|
-
return yield this._render(i, s, r);
|
2842
|
-
}
|
2843
|
-
renderFile(e, s, r) {
|
2844
|
-
return F(this, void 0, void 0, function* () {
|
2845
|
-
return N(this._renderFile(e, s, Object.assign(Object.assign({}, r), { sync: !1 })));
|
2846
|
-
});
|
2847
|
-
}
|
2848
|
-
renderFileSync(e, s, r) {
|
2849
|
-
return D(this._renderFile(e, s, Object.assign(Object.assign({}, r), { sync: !0 })));
|
2850
|
-
}
|
2851
|
-
renderFileToNodeStream(e, s, r) {
|
2852
|
-
return F(this, void 0, void 0, function* () {
|
2853
|
-
const i = yield this.parseFile(e);
|
2854
|
-
return this.renderToNodeStream(i, s, r);
|
2855
|
-
});
|
2856
|
-
}
|
2857
|
-
_evalValue(e, s) {
|
2858
|
-
const r = new _(e, this), i = s instanceof I ? s : new I(s, this.options);
|
2859
|
-
return r.value(i);
|
2860
|
-
}
|
2861
|
-
evalValue(e, s) {
|
2862
|
-
return F(this, void 0, void 0, function* () {
|
2863
|
-
return N(this._evalValue(e, s));
|
2864
|
-
});
|
2865
|
-
}
|
2866
|
-
evalValueSync(e, s) {
|
2867
|
-
return D(this._evalValue(e, s));
|
2868
|
-
}
|
2869
|
-
registerFilter(e, s) {
|
2870
|
-
this.filters[e] = s;
|
2871
|
-
}
|
2872
|
-
registerTag(e, s) {
|
2873
|
-
this.tags[e] = w(s) ? s : Vs(s);
|
2874
|
-
}
|
2875
|
-
plugin(e) {
|
2876
|
-
return e.call(this, ut);
|
2877
|
-
}
|
2878
|
-
express() {
|
2879
|
-
const e = this;
|
2880
|
-
let s = !0;
|
2881
|
-
return function(r, i, n) {
|
2882
|
-
if (s) {
|
2883
|
-
s = !1;
|
2884
|
-
const o = G(this.root);
|
2885
|
-
e.options.root.unshift(...o), e.options.layouts.unshift(...o), e.options.partials.unshift(...o);
|
2886
|
-
}
|
2887
|
-
e.renderFile(r, i).then((o) => n(null, o), n);
|
2888
|
-
};
|
2889
|
-
}
|
2890
|
-
}
|
2891
|
-
export {
|
2892
|
-
ut as L
|
2893
|
-
};
|