palettecn 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +10 -0
- package/dist/web/nitro.json +17 -0
- package/dist/web/public/assets/abap-BdvmRIgS.js +1 -0
- package/dist/web/public/assets/actionscript-3-et0rQaqm.js +1 -0
- package/dist/web/public/assets/ada-DPgrustg.js +1 -0
- package/dist/web/public/assets/andromeeda-DJl1yeV_.js +1 -0
- package/dist/web/public/assets/angular-html-Dm7s7tSx.js +1 -0
- package/dist/web/public/assets/angular-ts-B_ywTULt.js +1 -0
- package/dist/web/public/assets/apache-CFpsYX8S.js +1 -0
- package/dist/web/public/assets/apex-CN5n6pbI.js +1 -0
- package/dist/web/public/assets/apl-Dm11wHHc.js +1 -0
- package/dist/web/public/assets/applescript-JrY23hsL.js +1 -0
- package/dist/web/public/assets/ara-DR83hn3A.js +1 -0
- package/dist/web/public/assets/asciidoc-Dpu9XLB1.js +1 -0
- package/dist/web/public/assets/asm-BYI3A31V.js +1 -0
- package/dist/web/public/assets/astro-DP1naDCT.js +1 -0
- package/dist/web/public/assets/aurora-x-Nav5jnoQ.js +1 -0
- package/dist/web/public/assets/awk-BIoTx_w6.js +1 -0
- package/dist/web/public/assets/ayu-dark-H5QV5J7K.js +1 -0
- package/dist/web/public/assets/ayu-light-BrwTNGnU.js +1 -0
- package/dist/web/public/assets/ayu-mirage-Bg6FpF5w.js +1 -0
- package/dist/web/public/assets/ballerina-BFvDNd4T.js +1 -0
- package/dist/web/public/assets/bat-DtQkx7Ny.js +1 -0
- package/dist/web/public/assets/beancount-BIjKALa1.js +1 -0
- package/dist/web/public/assets/berry-BPkDN_EZ.js +1 -0
- package/dist/web/public/assets/bibtex-Dur2CNW6.js +1 -0
- package/dist/web/public/assets/bicep-BMz1bZ7m.js +1 -0
- package/dist/web/public/assets/bird2-91rdr9s7.js +1 -0
- package/dist/web/public/assets/blade-DD5O596X.js +1 -0
- package/dist/web/public/assets/bsl-FmB7U2qd.js +1 -0
- package/dist/web/public/assets/bundle-mjs-Bso3xn9x.js +1 -0
- package/dist/web/public/assets/c-DqqBLLyl.js +1 -0
- package/dist/web/public/assets/c3-CJTbEooS.js +1 -0
- package/dist/web/public/assets/cadence-C0GI7BZZ.js +1 -0
- package/dist/web/public/assets/cairo-B5JMmIC0.js +1 -0
- package/dist/web/public/assets/catppuccin-frappe-D76-cUjK.js +1 -0
- package/dist/web/public/assets/catppuccin-latte-DUHNJ_6_.js +1 -0
- package/dist/web/public/assets/catppuccin-macchiato-CFhPH2wd.js +1 -0
- package/dist/web/public/assets/catppuccin-mocha-BRD0cvUW.js +1 -0
- package/dist/web/public/assets/chunk-FRKYWMV7-DUkk3w4h.js +122 -0
- package/dist/web/public/assets/clarity-KgUVrNfC.js +1 -0
- package/dist/web/public/assets/clojure-BhQuoGIG.js +1 -0
- package/dist/web/public/assets/cmake-CA59gUFQ.js +1 -0
- package/dist/web/public/assets/cobol-CCFShgGZ.js +1 -0
- package/dist/web/public/assets/codeowners-CD36YqjJ.js +1 -0
- package/dist/web/public/assets/codeql-CrMosKUt.js +1 -0
- package/dist/web/public/assets/coffee-C-Mn3tBT.js +1 -0
- package/dist/web/public/assets/common-lisp-DYnOjAFz.js +1 -0
- package/dist/web/public/assets/components-DiZ1dSl3.js +77 -0
- package/dist/web/public/assets/coq-BaHtq3Qt.js +1 -0
- package/dist/web/public/assets/cpp-D8Y73ItU.js +1 -0
- package/dist/web/public/assets/crystal-CnXWqbxx.js +1 -0
- package/dist/web/public/assets/csharp-D6sghVPa.js +1 -0
- package/dist/web/public/assets/css-CUGjdPw_.js +1 -0
- package/dist/web/public/assets/csv-DuxyxUAI.js +1 -0
- package/dist/web/public/assets/cue-D9NRAX0_.js +1 -0
- package/dist/web/public/assets/cypher-HJRdtilF.js +1 -0
- package/dist/web/public/assets/d-B4Ont7_X.js +1 -0
- package/dist/web/public/assets/dark-plus-DZSBycyp.js +1 -0
- package/dist/web/public/assets/dart-Dp4asavE.js +1 -0
- package/dist/web/public/assets/dax-DBUubp6S.js +1 -0
- package/dist/web/public/assets/desktop-DQ0n6zIQ.js +1 -0
- package/dist/web/public/assets/diff-CFHlrffC.js +1 -0
- package/dist/web/public/assets/docker-BuefmsF5.js +1 -0
- package/dist/web/public/assets/dotenv-BKTsUQ_r.js +1 -0
- package/dist/web/public/assets/dracula-MOn9qacs.js +1 -0
- package/dist/web/public/assets/dracula-soft-C4r_sC_D.js +1 -0
- package/dist/web/public/assets/dream-maker-BNdv5lLS.js +1 -0
- package/dist/web/public/assets/edge-C-Mi8Oda.js +1 -0
- package/dist/web/public/assets/elixir-CTS5wQtX.js +1 -0
- package/dist/web/public/assets/elm-rM310x8D.js +1 -0
- package/dist/web/public/assets/emacs-lisp-D9FIGRtM.js +1 -0
- package/dist/web/public/assets/erb-oaGjGVGO.js +1 -0
- package/dist/web/public/assets/erlang-q4Mkyw3m.js +1 -0
- package/dist/web/public/assets/everforest-dark-CNa2QFRn.js +1 -0
- package/dist/web/public/assets/everforest-light-DRbUDqJT.js +1 -0
- package/dist/web/public/assets/fennel-DpqQTaVZ.js +1 -0
- package/dist/web/public/assets/field-1-Ujza0S5j.js +1 -0
- package/dist/web/public/assets/fish-hyk5x6Q4.js +1 -0
- package/dist/web/public/assets/fluent-DMll-MGX.js +1 -0
- package/dist/web/public/assets/fortran-fixed-form-BmdfKovV.js +1 -0
- package/dist/web/public/assets/fortran-free-form-MCAifii4.js +1 -0
- package/dist/web/public/assets/fsharp-DLlBn9Nl.js +1 -0
- package/dist/web/public/assets/gdresource-BzFzBRli.js +1 -0
- package/dist/web/public/assets/gdscript-D3R4J0Cv.js +1 -0
- package/dist/web/public/assets/gdshader-BAubtqqN.js +1 -0
- package/dist/web/public/assets/genie-BnIIX2pC.js +1 -0
- package/dist/web/public/assets/gherkin-CL3NUuB1.js +1 -0
- package/dist/web/public/assets/git-commit-BYPE8h85.js +1 -0
- package/dist/web/public/assets/git-rebase-Bmmgf6eN.js +1 -0
- package/dist/web/public/assets/github-dark-default-C6I2oE4c.js +1 -0
- package/dist/web/public/assets/github-dark-dimmed-DEqwxg6D.js +1 -0
- package/dist/web/public/assets/github-dark-high-contrast-DDt3j0cs.js +1 -0
- package/dist/web/public/assets/github-dark-oLN6SDKl.js +1 -0
- package/dist/web/public/assets/github-light-DaN-N2Gj.js +1 -0
- package/dist/web/public/assets/github-light-default-B3EwMbS7.js +1 -0
- package/dist/web/public/assets/github-light-high-contrast-Cl9D0f_e.js +1 -0
- package/dist/web/public/assets/gleam-Cvj8QRtQ.js +1 -0
- package/dist/web/public/assets/glimmer-js-CahbROb1.js +1 -0
- package/dist/web/public/assets/glimmer-ts-JMFYNbot.js +1 -0
- package/dist/web/public/assets/global-XWAvxWcA.css +2 -0
- package/dist/web/public/assets/glsl-BCuCNM3V.js +1 -0
- package/dist/web/public/assets/gn-DxCHSEMl.js +1 -0
- package/dist/web/public/assets/gnuplot-CkGXHK7B.js +1 -0
- package/dist/web/public/assets/go-B_NLCuTj.js +1 -0
- package/dist/web/public/assets/graphql-RXOfHGfI.js +1 -0
- package/dist/web/public/assets/groovy-DVge8oRs.js +1 -0
- package/dist/web/public/assets/gruvbox-dark-hard-BwZz1yni.js +1 -0
- package/dist/web/public/assets/gruvbox-dark-medium-Bqy6jkuO.js +1 -0
- package/dist/web/public/assets/gruvbox-dark-soft-DjUvyUfH.js +1 -0
- package/dist/web/public/assets/gruvbox-light-hard-BTLmfPdm.js +1 -0
- package/dist/web/public/assets/gruvbox-light-medium-DeWqsWs6.js +1 -0
- package/dist/web/public/assets/gruvbox-light-soft-BL8ld-1F.js +1 -0
- package/dist/web/public/assets/hack-BBQpwyf_.js +1 -0
- package/dist/web/public/assets/haml-mWELc9kh.js +1 -0
- package/dist/web/public/assets/handlebars-COrUo8cC.js +1 -0
- package/dist/web/public/assets/haskell-DRmM8XlQ.js +1 -0
- package/dist/web/public/assets/haxe-BEhq8ZEr.js +1 -0
- package/dist/web/public/assets/hcl-B5ZIaGS0.js +1 -0
- package/dist/web/public/assets/highlighted-body-TPN3WLV5-YJgGFx4e.js +1 -0
- package/dist/web/public/assets/hjson-B9uRLqIO.js +1 -0
- package/dist/web/public/assets/hlsl-Hv1kKjrS.js +1 -0
- package/dist/web/public/assets/horizon-ClXGBjWw.js +1 -0
- package/dist/web/public/assets/horizon-bright-CvUCr3ux.js +1 -0
- package/dist/web/public/assets/houston-NqkqG60q.js +1 -0
- package/dist/web/public/assets/html-cmigv1ou.js +1 -0
- package/dist/web/public/assets/html-derivative-B3me0pSu.js +1 -0
- package/dist/web/public/assets/http-BojM9cyU.js +1 -0
- package/dist/web/public/assets/hurl-BxEmMiGP.js +1 -0
- package/dist/web/public/assets/hxml-CoBuVbfs.js +1 -0
- package/dist/web/public/assets/hy-CeISYGGU.js +1 -0
- package/dist/web/public/assets/imba-xjcDFXUW.js +1 -0
- package/dist/web/public/assets/ini-D0ZCSj6e.js +1 -0
- package/dist/web/public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/web/public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/web/public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/web/public/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/web/public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/web/public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/web/public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/web/public/assets/java-BvheClGI.js +1 -0
- package/dist/web/public/assets/javascript-DjlJORDg.js +1 -0
- package/dist/web/public/assets/jinja-Bi4sG72X.js +1 -0
- package/dist/web/public/assets/jison-BTz5Ik2Y.js +1 -0
- package/dist/web/public/assets/json-CiTd40Rg.js +1 -0
- package/dist/web/public/assets/json5-FR9EyF7a.js +1 -0
- package/dist/web/public/assets/jsonc-CHIeFfsD.js +1 -0
- package/dist/web/public/assets/jsonl-B4WQkwTf.js +1 -0
- package/dist/web/public/assets/jsonnet-vd-gzGkL.js +1 -0
- package/dist/web/public/assets/jssm-C_bj1LkZ.js +1 -0
- package/dist/web/public/assets/jsx-Bx-RZMFH.js +1 -0
- package/dist/web/public/assets/jsx-runtime-n8k0hwt8.js +1 -0
- package/dist/web/public/assets/julia-BKcIfSxk.js +1 -0
- package/dist/web/public/assets/just-IkZCagAs.js +1 -0
- package/dist/web/public/assets/kanagawa-dragon-B3Cz89vt.js +1 -0
- package/dist/web/public/assets/kanagawa-lotus-CRe_W5Ft.js +1 -0
- package/dist/web/public/assets/kanagawa-wave-BPqZ5XB7.js +1 -0
- package/dist/web/public/assets/kdl-BzL_Ak31.js +1 -0
- package/dist/web/public/assets/kotlin-BQQFk6ql.js +1 -0
- package/dist/web/public/assets/kusto-vWe6OLKV.js +1 -0
- package/dist/web/public/assets/laserwave-CwtvEUcj.js +1 -0
- package/dist/web/public/assets/latex-9N90_WFU.js +1 -0
- package/dist/web/public/assets/lean-CaqenOqv.js +1 -0
- package/dist/web/public/assets/less-CERnPzn6.js +1 -0
- package/dist/web/public/assets/light-plus-B9_M_OKq.js +1 -0
- package/dist/web/public/assets/liquid-CQLPDP7m.js +1 -0
- package/dist/web/public/assets/llvm-BylJXvm7.js +1 -0
- package/dist/web/public/assets/log-CBBcNcbO.js +1 -0
- package/dist/web/public/assets/logo-r-8Jc8Xk.js +1 -0
- package/dist/web/public/assets/lua-BBL6LXKd.js +1 -0
- package/dist/web/public/assets/luau-B2g7L-zP.js +1 -0
- package/dist/web/public/assets/main-0lKVDR64.css +2 -0
- package/dist/web/public/assets/main-CcNf0BOb.js +126 -0
- package/dist/web/public/assets/make-DK-HzJ2w.js +1 -0
- package/dist/web/public/assets/markdown-FgdsukgR.js +1 -0
- package/dist/web/public/assets/marko-CLZwt2N2.js +1 -0
- package/dist/web/public/assets/material-theme-DOJ9PS4O.js +1 -0
- package/dist/web/public/assets/material-theme-darker-DOurH5jT.js +1 -0
- package/dist/web/public/assets/material-theme-lighter-BfPWxCP6.js +1 -0
- package/dist/web/public/assets/material-theme-ocean-BcO5PKoq.js +1 -0
- package/dist/web/public/assets/material-theme-palenight-ClWQBDDd.js +1 -0
- package/dist/web/public/assets/matlab-DwyUVNXd.js +1 -0
- package/dist/web/public/assets/mdc-Bo8CRPg4.js +1 -0
- package/dist/web/public/assets/mdx-3EBShbsD.js +1 -0
- package/dist/web/public/assets/mermaid-ByG2-SLz.js +1 -0
- package/dist/web/public/assets/mermaid-O7DHMXV3-COAgR3aM.js +1 -0
- package/dist/web/public/assets/min-dark-ClJ2x5pc.js +1 -0
- package/dist/web/public/assets/min-light-BsOUz5iE.js +1 -0
- package/dist/web/public/assets/mipsasm-BKDtQCf3.js +1 -0
- package/dist/web/public/assets/mojo-DmEAK7iv.js +1 -0
- package/dist/web/public/assets/monokai-BKc3VADO.js +1 -0
- package/dist/web/public/assets/moonbit-Qm8v_cKN.js +1 -0
- package/dist/web/public/assets/move-CMectUPk.js +1 -0
- package/dist/web/public/assets/narrat-Bdm8NaK8.js +1 -0
- package/dist/web/public/assets/nextflow-BpSt05nC.js +1 -0
- package/dist/web/public/assets/nextflow-groovy-BZ-bqJ-u.js +1 -0
- package/dist/web/public/assets/nginx-ChZL5FWE.js +1 -0
- package/dist/web/public/assets/night-owl-CbFc5pXO.js +1 -0
- package/dist/web/public/assets/night-owl-light-zYbVCVuz.js +1 -0
- package/dist/web/public/assets/nim-5JnPAJWa.js +1 -0
- package/dist/web/public/assets/nix-P5P-2qHs.js +1 -0
- package/dist/web/public/assets/nord-C7hKGudV.js +1 -0
- package/dist/web/public/assets/nushell-DKPnC5RG.js +1 -0
- package/dist/web/public/assets/objective-c-BPwXtM0v.js +1 -0
- package/dist/web/public/assets/objective-cpp-CWYEdWNG.js +1 -0
- package/dist/web/public/assets/ocaml-CL7OJ02v.js +1 -0
- package/dist/web/public/assets/odin-Dtay25eA.js +1 -0
- package/dist/web/public/assets/one-dark-pro-CrdFNNwF.js +1 -0
- package/dist/web/public/assets/one-light-BUiz8X4B.js +1 -0
- package/dist/web/public/assets/openscad-WD4sXUUp.js +1 -0
- package/dist/web/public/assets/pascal-A6-MZnZ8.js +1 -0
- package/dist/web/public/assets/perl-Yq3AfnVV.js +1 -0
- package/dist/web/public/assets/php-CCj0foPx.js +1 -0
- package/dist/web/public/assets/pkl-cmPbg8fI.js +1 -0
- package/dist/web/public/assets/plastic-DtQ_LnDB.js +1 -0
- package/dist/web/public/assets/plsql-DwmuVd7q.js +1 -0
- package/dist/web/public/assets/po-CkVxkZaj.js +1 -0
- package/dist/web/public/assets/poimandres-Dt0xZuaa.js +1 -0
- package/dist/web/public/assets/polar-hStNz_W2.js +1 -0
- package/dist/web/public/assets/postcss-ZIk0AQ7M.js +1 -0
- package/dist/web/public/assets/powerquery-D0gqoHHD.js +1 -0
- package/dist/web/public/assets/powershell-DXB5HoVh.js +1 -0
- package/dist/web/public/assets/prisma-DmTrfxC0.js +1 -0
- package/dist/web/public/assets/prolog-CdoyriEj.js +1 -0
- package/dist/web/public/assets/proto-4MrN11dS.js +1 -0
- package/dist/web/public/assets/pug-svYJKDOQ.js +1 -0
- package/dist/web/public/assets/puppet-MEaLGpAP.js +1 -0
- package/dist/web/public/assets/purescript-CPxCorqB.js +1 -0
- package/dist/web/public/assets/python-f4fp5z0z.js +1 -0
- package/dist/web/public/assets/qml-BzEtWdqI.js +1 -0
- package/dist/web/public/assets/qmldir-DCjSceJ_.js +1 -0
- package/dist/web/public/assets/qss-BdM02NUc.js +1 -0
- package/dist/web/public/assets/r-luosIeJH.js +1 -0
- package/dist/web/public/assets/racket-D2tfa8Zc.js +1 -0
- package/dist/web/public/assets/raku-KeGPJVZg.js +1 -0
- package/dist/web/public/assets/razor-Bokxs4Qx.js +1 -0
- package/dist/web/public/assets/red-C0qZ-1lN.js +1 -0
- package/dist/web/public/assets/reg-DdnswvOj.js +1 -0
- package/dist/web/public/assets/regexp-CYC8h6V9.js +1 -0
- package/dist/web/public/assets/rel-RhzEfSRc.js +1 -0
- package/dist/web/public/assets/riscv-dS5TzX10.js +1 -0
- package/dist/web/public/assets/ron-CQjQSCVp.js +1 -0
- package/dist/web/public/assets/rose-pine-C89ViLdr.js +1 -0
- package/dist/web/public/assets/rose-pine-dawn-Dq2gf0yi.js +1 -0
- package/dist/web/public/assets/rose-pine-moon-CBDvXVs_.js +1 -0
- package/dist/web/public/assets/rosmsg-nvjuSIGu.js +1 -0
- package/dist/web/public/assets/routes-BXqJCOpL.js +542 -0
- package/dist/web/public/assets/rst-1xwvVGf7.js +1 -0
- package/dist/web/public/assets/ruby-Blad-eDx.js +1 -0
- package/dist/web/public/assets/rust-rV8q_xyI.js +1 -0
- package/dist/web/public/assets/sas-DUPWtptg.js +1 -0
- package/dist/web/public/assets/sass-CuxdoNN0.js +1 -0
- package/dist/web/public/assets/scala-Df4L7N3R.js +1 -0
- package/dist/web/public/assets/scheme-DalRmAPH.js +1 -0
- package/dist/web/public/assets/scss-CYQ8LEwP.js +1 -0
- package/dist/web/public/assets/sdbl-B_TmFnGf.js +1 -0
- package/dist/web/public/assets/shaderlab-DYEMDY3e.js +1 -0
- package/dist/web/public/assets/shellscript-DjKZ34ac.js +1 -0
- package/dist/web/public/assets/shellsession-C3kcnBnh.js +1 -0
- package/dist/web/public/assets/slack-dark-ak_jOeLl.js +1 -0
- package/dist/web/public/assets/slack-ochin-ByiYhLwu.js +1 -0
- package/dist/web/public/assets/smalltalk-DTTnjjZJ.js +1 -0
- package/dist/web/public/assets/snazzy-light-BBRYeY60.js +1 -0
- package/dist/web/public/assets/solarized-dark-BtoLnWkw.js +1 -0
- package/dist/web/public/assets/solarized-light-CtzUA7GI.js +1 -0
- package/dist/web/public/assets/solidity-CSIHEQ2t.js +1 -0
- package/dist/web/public/assets/soy-BN0uzUAI.js +1 -0
- package/dist/web/public/assets/sparql-B6k9tA6Q.js +1 -0
- package/dist/web/public/assets/splunk-DkRzN7V_.js +1 -0
- package/dist/web/public/assets/sql-Bx-WX28V.js +1 -0
- package/dist/web/public/assets/ssh-config-Bqp7ng33.js +1 -0
- package/dist/web/public/assets/stata-HAj7doU8.js +1 -0
- package/dist/web/public/assets/stylus-CdbCxDLX.js +1 -0
- package/dist/web/public/assets/surrealql-BkGf0I3k.js +1 -0
- package/dist/web/public/assets/svelte-DtWg6ssL.js +1 -0
- package/dist/web/public/assets/swift-yRu2dtgr.js +1 -0
- package/dist/web/public/assets/synthwave-84-2WIu6MHX.js +1 -0
- package/dist/web/public/assets/system-verilog-GUE_oP1V.js +1 -0
- package/dist/web/public/assets/systemd-FLIJAQZV.js +1 -0
- package/dist/web/public/assets/talonscript-DTR-8ILs.js +1 -0
- package/dist/web/public/assets/tasl-WHNWP-1F.js +1 -0
- package/dist/web/public/assets/tcl-BaBXNNp6.js +1 -0
- package/dist/web/public/assets/templ-Dc9vj00n.js +1 -0
- package/dist/web/public/assets/terraform-uJUFpr8t.js +1 -0
- package/dist/web/public/assets/tex-DA3dAz55.js +1 -0
- package/dist/web/public/assets/tokyo-night-BbogFqAr.js +1 -0
- package/dist/web/public/assets/toml-CyR4Gqq1.js +1 -0
- package/dist/web/public/assets/ts-tags-BD1j21LH.js +1 -0
- package/dist/web/public/assets/tsv-COLVYI6A.js +1 -0
- package/dist/web/public/assets/tsx-CFm2E6uK.js +1 -0
- package/dist/web/public/assets/turtle-PQwt4gkb.js +1 -0
- package/dist/web/public/assets/twig-DrUXy85s.js +1 -0
- package/dist/web/public/assets/typescript-Dy-5sXFx.js +1 -0
- package/dist/web/public/assets/typespec-Bb7qHV0g.js +1 -0
- package/dist/web/public/assets/typst-Bj_JElGz.js +1 -0
- package/dist/web/public/assets/v-BTkrtik4.js +1 -0
- package/dist/web/public/assets/vala-AXT1CI9v.js +1 -0
- package/dist/web/public/assets/vb-DzTKUgW8.js +1 -0
- package/dist/web/public/assets/verilog-aI3j5Xj8.js +1 -0
- package/dist/web/public/assets/vesper-BmnwIC_B.js +1 -0
- package/dist/web/public/assets/vhdl-4IgBB7vO.js +1 -0
- package/dist/web/public/assets/viml-D_XMKSR6.js +1 -0
- package/dist/web/public/assets/vitesse-black-DhmxIXiA.js +1 -0
- package/dist/web/public/assets/vitesse-dark-dvEH_9qt.js +1 -0
- package/dist/web/public/assets/vitesse-light-Ca0W2L1O.js +1 -0
- package/dist/web/public/assets/vue-DC_yTvy2.js +1 -0
- package/dist/web/public/assets/vue-html-Bp8x4gdt.js +1 -0
- package/dist/web/public/assets/vue-vine-ZcUkuUUp.js +1 -0
- package/dist/web/public/assets/vyper-Dz2f7-FK.js +1 -0
- package/dist/web/public/assets/wasm-CuXPCj65.js +1 -0
- package/dist/web/public/assets/wasm-DHkXUMsP.js +1 -0
- package/dist/web/public/assets/wenyan-BRAtM0Iv.js +1 -0
- package/dist/web/public/assets/wgsl-CMpn9jTa.js +1 -0
- package/dist/web/public/assets/wikitext-DRmBVmVA.js +1 -0
- package/dist/web/public/assets/wit-Drp_HLqJ.js +1 -0
- package/dist/web/public/assets/wolfram-C33umj7M.js +1 -0
- package/dist/web/public/assets/xml-BHoOtGbO.js +1 -0
- package/dist/web/public/assets/xsl-CN1PlFqm.js +1 -0
- package/dist/web/public/assets/yaml-DT0mpn8u.js +1 -0
- package/dist/web/public/assets/zenscript-BlYQ_Frf.js +1 -0
- package/dist/web/public/assets/zig-Buk7I0y-.js +1 -0
- package/dist/web/server/_chunks/ssr-renderer.mjs +15 -0
- package/dist/web/server/_libs/@ai-sdk/anthropic+[...].mjs +14021 -0
- package/dist/web/server/_libs/@ai-sdk/moonshotai+[...].mjs +898 -0
- package/dist/web/server/_libs/@ai-sdk/react+[...].mjs +8969 -0
- package/dist/web/server/_libs/@emotion/is-prop-valid+[...].mjs +34 -0
- package/dist/web/server/_libs/@floating-ui/core+[...].mjs +698 -0
- package/dist/web/server/_libs/@floating-ui/dom+[...].mjs +644 -0
- package/dist/web/server/_libs/@floating-ui/react-dom+[...].mjs +475 -0
- package/dist/web/server/_libs/@lobehub/icons+[...].mjs +3079 -0
- package/dist/web/server/_libs/@radix-ui/react-arrow+[...].mjs +184 -0
- package/dist/web/server/_libs/@radix-ui/react-collapsible+[...].mjs +374 -0
- package/dist/web/server/_libs/@radix-ui/react-dialog+[...].mjs +1503 -0
- package/dist/web/server/_libs/@radix-ui/react-menu+[...].mjs +1236 -0
- package/dist/web/server/_libs/@radix-ui/react-select+[...].mjs +1007 -0
- package/dist/web/server/_libs/@shikijs/core+[...].mjs +9017 -0
- package/dist/web/server/_libs/@shikijs/engine-javascript+[...].mjs +3159 -0
- package/dist/web/server/_libs/@streamdown/math+[...].mjs +37559 -0
- package/dist/web/server/_libs/@tanstack/react-router+[...].mjs +14074 -0
- package/dist/web/server/_libs/_.mjs +3 -0
- package/dist/web/server/_libs/_2.mjs +3 -0
- package/dist/web/server/_libs/_3.mjs +2 -0
- package/dist/web/server/_libs/_4.mjs +2 -0
- package/dist/web/server/_libs/ai-sdk__gateway+vercel__oidc.mjs +1255 -0
- package/dist/web/server/_libs/ai-sdk__google.mjs +1630 -0
- package/dist/web/server/_libs/ai-sdk__openai+zod.mjs +4951 -0
- package/dist/web/server/_libs/ai-sdk__provider-utils.mjs +411 -0
- package/dist/web/server/_libs/ai-sdk__provider.mjs +222 -0
- package/dist/web/server/_libs/bail.mjs +13 -0
- package/dist/web/server/_libs/character-entities.mjs +2135 -0
- package/dist/web/server/_libs/class-variance-authority+clsx.mjs +69 -0
- package/dist/web/server/_libs/color+[...].mjs +2185 -0
- package/dist/web/server/_libs/copy-text-to-clipboard.mjs +40 -0
- package/dist/web/server/_libs/d3-array.mjs +231 -0
- package/dist/web/server/_libs/d3-color.mjs +330 -0
- package/dist/web/server/_libs/d3-format.mjs +252 -0
- package/dist/web/server/_libs/d3-interpolate.mjs +207 -0
- package/dist/web/server/_libs/d3-path.mjs +77 -0
- package/dist/web/server/_libs/d3-scale+[...].mjs +1907 -0
- package/dist/web/server/_libs/d3-shape.mjs +818 -0
- package/dist/web/server/_libs/date-fns.mjs +3012 -0
- package/dist/web/server/_libs/date-fns__tz.mjs +249 -0
- package/dist/web/server/_libs/decimal.js-light.mjs +884 -0
- package/dist/web/server/_libs/decode-named-character-reference+[...].mjs +19 -0
- package/dist/web/server/_libs/dexie.mjs +3745 -0
- package/dist/web/server/_libs/escape-string-regexp.mjs +7 -0
- package/dist/web/server/_libs/estree-util-is-identifier-name.mjs +20 -0
- package/dist/web/server/_libs/eventemitter3.mjs +237 -0
- package/dist/web/server/_libs/extend.mjs +75 -0
- package/dist/web/server/_libs/fast-equals.mjs +423 -0
- package/dist/web/server/_libs/framer-motion+[...].mjs +9573 -0
- package/dist/web/server/_libs/fuzzysort.mjs +621 -0
- package/dist/web/server/_libs/h3+rou3+srvx.mjs +1158 -0
- package/dist/web/server/_libs/hast-util-raw+[...].mjs +800 -0
- package/dist/web/server/_libs/hast-util-sanitize.mjs +780 -0
- package/dist/web/server/_libs/hast-util-to-jsx-runtime+[...].mjs +853 -0
- package/dist/web/server/_libs/hookable.mjs +41 -0
- package/dist/web/server/_libs/html-url-attributes.mjs +44 -0
- package/dist/web/server/_libs/is-plain-obj.mjs +8 -0
- package/dist/web/server/_libs/lodash.mjs +4532 -0
- package/dist/web/server/_libs/lucide-react.mjs +605 -0
- package/dist/web/server/_libs/markdown-table.mjs +289 -0
- package/dist/web/server/_libs/marked.mjs +1511 -0
- package/dist/web/server/_libs/mdast-util-find-and-replace.mjs +198 -0
- package/dist/web/server/_libs/mdast-util-from-markdown+[...].mjs +8121 -0
- package/dist/web/server/_libs/mdast-util-gfm+[...].mjs +2060 -0
- package/dist/web/server/_libs/mdast-util-to-hast+[...].mjs +1770 -0
- package/dist/web/server/_libs/micromark-extension-gfm+[...].mjs +2235 -0
- package/dist/web/server/_libs/nanoid.mjs +26 -0
- package/dist/web/server/_libs/next-themes.mjs +124 -0
- package/dist/web/server/_libs/prop-types.mjs +69 -0
- package/dist/web/server/_libs/radix-ui__number.mjs +6 -0
- package/dist/web/server/_libs/radix-ui__primitive.mjs +9 -0
- package/dist/web/server/_libs/radix-ui__react-collection.mjs +80 -0
- package/dist/web/server/_libs/radix-ui__react-direction.mjs +11 -0
- package/dist/web/server/_libs/radix-ui__react-label.mjs +23 -0
- package/dist/web/server/_libs/radix-ui__react-menubar.mjs +400 -0
- package/dist/web/server/_libs/radix-ui__react-popover.mjs +251 -0
- package/dist/web/server/_libs/radix-ui__react-progress.mjs +81 -0
- package/dist/web/server/_libs/radix-ui__react-scroll-area.mjs +669 -0
- package/dist/web/server/_libs/radix-ui__react-separator.mjs +32 -0
- package/dist/web/server/_libs/radix-ui__react-slider.mjs +464 -0
- package/dist/web/server/_libs/radix-ui__react-switch.mjs +120 -0
- package/dist/web/server/_libs/radix-ui__react-tabs.mjs +145 -0
- package/dist/web/server/_libs/radix-ui__react-tooltip.mjs +494 -0
- package/dist/web/server/_libs/react-day-picker.mjs +3510 -0
- package/dist/web/server/_libs/react-is.mjs +48 -0
- package/dist/web/server/_libs/react-resizable-panels.mjs +1517 -0
- package/dist/web/server/_libs/react-smooth.mjs +1024 -0
- package/dist/web/server/_libs/recharts+[...].mjs +12998 -0
- package/dist/web/server/_libs/rehype-harden.mjs +210 -0
- package/dist/web/server/_libs/rehype-raw.mjs +37 -0
- package/dist/web/server/_libs/rehype-sanitize.mjs +27 -0
- package/dist/web/server/_libs/remark-gfm.mjs +34 -0
- package/dist/web/server/_libs/remark-parse.mjs +37 -0
- package/dist/web/server/_libs/remark-rehype.mjs +169 -0
- package/dist/web/server/_libs/remend.mjs +544 -0
- package/dist/web/server/_libs/scule.mjs +55 -0
- package/dist/web/server/_libs/shiki+streamdown__code.mjs +1748 -0
- package/dist/web/server/_libs/shiki.mjs +16 -0
- package/dist/web/server/_libs/shikijs__engine-oniguruma.mjs +387 -0
- package/dist/web/server/_libs/shikijs__langs.mjs +1357 -0
- package/dist/web/server/_libs/shikijs__themes.mjs +268 -0
- package/dist/web/server/_libs/sonner.mjs +909 -0
- package/dist/web/server/_libs/streamdown+[...].mjs +5842 -0
- package/dist/web/server/_libs/tanstack__history.mjs +342 -0
- package/dist/web/server/_libs/tanstack__query-core.mjs +2073 -0
- package/dist/web/server/_libs/tanstack__react-query.mjs +146 -0
- package/dist/web/server/_libs/tanstack__router-core.mjs +6 -0
- package/dist/web/server/_libs/tanstack__zod-adapter.mjs +16 -0
- package/dist/web/server/_libs/ufo.mjs +64 -0
- package/dist/web/server/_libs/ungap__structured-clone.mjs +197 -0
- package/dist/web/server/_libs/use-stick-to-bottom.mjs +410 -0
- package/dist/web/server/_libs/vercel__oidc.mjs +393 -0
- package/dist/web/server/_libs/zhipu-ai-provider.mjs +13483 -0
- package/dist/web/server/_libs/zustand.mjs +48 -0
- package/dist/web/server/_runtime.mjs +35 -0
- package/dist/web/server/_ssr/components-BzCiScpA.mjs +1452 -0
- package/dist/web/server/_ssr/dist-3Mu7PF0n.mjs +137 -0
- package/dist/web/server/_ssr/dist-BRaLXgxZ.mjs +17 -0
- package/dist/web/server/_ssr/field-1-agM60DBf.mjs +167 -0
- package/dist/web/server/_ssr/get-providers-BoYkp0Of.mjs +40 -0
- package/dist/web/server/_ssr/initialize-provider-B6W8V5Eg.mjs +19 -0
- package/dist/web/server/_ssr/model-list-CDFjdz2P.mjs +60 -0
- package/dist/web/server/_ssr/router-BmmOCtJZ.mjs +168 -0
- package/dist/web/server/_ssr/routes-CvlpZK4Q.mjs +2630 -0
- package/dist/web/server/_ssr/schemas-DsZ5O3zp.mjs +67 -0
- package/dist/web/server/_ssr/send-message-DUT1vRvx.mjs +135 -0
- package/dist/web/server/_ssr/ssr.mjs +5253 -0
- package/dist/web/server/_ssr/start-rewezkfD.mjs +4 -0
- package/dist/web/server/_ssr/submit-key-CcCv6-yy.mjs +62 -0
- package/dist/web/server/_ssr/suggestions-B0Uc3p7F.mjs +38 -0
- package/dist/web/server/_ssr/use-providers-Bwqg2U3N.mjs +1554 -0
- package/dist/web/server/_tanstack-start-manifest_v-BMIvh4y6.mjs +60 -0
- package/dist/web/server/index.mjs +2531 -0
- package/dist/web/server/node_modules/tslib/modules/index.js +70 -0
- package/dist/web/server/node_modules/tslib/modules/package.json +3 -0
- package/dist/web/server/node_modules/tslib/package.json +47 -0
- package/dist/web/server/node_modules/tslib/tslib.js +484 -0
- package/package.json +32 -0
|
@@ -0,0 +1,3745 @@
|
|
|
1
|
+
import { i as __toESM, t as __commonJSMin } from "../_runtime.mjs";
|
|
2
|
+
//#endregion
|
|
3
|
+
//#region ../../node_modules/.pnpm/dexie@4.3.0/node_modules/dexie/import-wrapper-prod.mjs
|
|
4
|
+
var import_dexie_min = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
|
+
((e, t) => {
|
|
6
|
+
"object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).Dexie = t();
|
|
7
|
+
})(exports, function() {
|
|
8
|
+
var B = function(e, t) {
|
|
9
|
+
return (B = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? function(e, t) {
|
|
10
|
+
e.__proto__ = t;
|
|
11
|
+
} : function(e, t) {
|
|
12
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
13
|
+
}))(e, t);
|
|
14
|
+
};
|
|
15
|
+
var _ = function() {
|
|
16
|
+
return (_ = Object.assign || function(e) {
|
|
17
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
18
|
+
return e;
|
|
19
|
+
}).apply(this, arguments);
|
|
20
|
+
};
|
|
21
|
+
function R(e, t, n) {
|
|
22
|
+
if (n || 2 === arguments.length) for (var r, o = 0, i = t.length; o < i; o++) !r && o in t || ((r = r || Array.prototype.slice.call(t, 0, o))[o] = t[o]);
|
|
23
|
+
return e.concat(r || Array.prototype.slice.call(t));
|
|
24
|
+
}
|
|
25
|
+
var f = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : "undefined" != typeof window ? window : global, O = Object.keys, x = Array.isArray;
|
|
26
|
+
function a(t, n) {
|
|
27
|
+
return "object" == typeof n && O(n).forEach(function(e) {
|
|
28
|
+
t[e] = n[e];
|
|
29
|
+
}), t;
|
|
30
|
+
}
|
|
31
|
+
"undefined" == typeof Promise || f.Promise || (f.Promise = Promise);
|
|
32
|
+
var F = Object.getPrototypeOf, M = {}.hasOwnProperty;
|
|
33
|
+
function m(e, t) {
|
|
34
|
+
return M.call(e, t);
|
|
35
|
+
}
|
|
36
|
+
function N(t, n) {
|
|
37
|
+
"function" == typeof n && (n = n(F(t))), ("undefined" == typeof Reflect ? O : Reflect.ownKeys)(n).forEach(function(e) {
|
|
38
|
+
u(t, e, n[e]);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
var L = Object.defineProperty;
|
|
42
|
+
function u(e, t, n, r) {
|
|
43
|
+
L(e, t, a(n && m(n, "get") && "function" == typeof n.get ? {
|
|
44
|
+
get: n.get,
|
|
45
|
+
set: n.set,
|
|
46
|
+
configurable: !0
|
|
47
|
+
} : {
|
|
48
|
+
value: n,
|
|
49
|
+
configurable: !0,
|
|
50
|
+
writable: !0
|
|
51
|
+
}, r));
|
|
52
|
+
}
|
|
53
|
+
function U(t) {
|
|
54
|
+
return { from: function(e) {
|
|
55
|
+
return t.prototype = Object.create(e.prototype), u(t.prototype, "constructor", t), { extend: N.bind(null, t.prototype) };
|
|
56
|
+
} };
|
|
57
|
+
}
|
|
58
|
+
var V = Object.getOwnPropertyDescriptor;
|
|
59
|
+
var z = [].slice;
|
|
60
|
+
function W(e, t, n) {
|
|
61
|
+
return z.call(e, t, n);
|
|
62
|
+
}
|
|
63
|
+
function Y(e, t) {
|
|
64
|
+
return t(e);
|
|
65
|
+
}
|
|
66
|
+
function $(e) {
|
|
67
|
+
if (!e) throw new Error("Assertion Failed");
|
|
68
|
+
}
|
|
69
|
+
function Q(e) {
|
|
70
|
+
f.setImmediate ? setImmediate(e) : setTimeout(e, 0);
|
|
71
|
+
}
|
|
72
|
+
function c(e, t) {
|
|
73
|
+
if ("string" == typeof t && m(e, t)) return e[t];
|
|
74
|
+
if (!t) return e;
|
|
75
|
+
if ("string" != typeof t) {
|
|
76
|
+
for (var n = [], r = 0, o = t.length; r < o; ++r) {
|
|
77
|
+
var i = c(e, t[r]);
|
|
78
|
+
n.push(i);
|
|
79
|
+
}
|
|
80
|
+
return n;
|
|
81
|
+
}
|
|
82
|
+
var a, u = t.indexOf(".");
|
|
83
|
+
return -1 === u || null == (a = e[t.substr(0, u)]) ? void 0 : c(a, t.substr(u + 1));
|
|
84
|
+
}
|
|
85
|
+
function b(e, t, n) {
|
|
86
|
+
if (e && void 0 !== t && !("isFrozen" in Object && Object.isFrozen(e))) if ("string" != typeof t && "length" in t) {
|
|
87
|
+
$("string" != typeof n && "length" in n);
|
|
88
|
+
for (var r = 0, o = t.length; r < o; ++r) b(e, t[r], n[r]);
|
|
89
|
+
} else {
|
|
90
|
+
var i, a, u = t.indexOf(".");
|
|
91
|
+
-1 !== u ? (i = t.substr(0, u), "" === (u = t.substr(u + 1)) ? void 0 === n ? x(e) && !isNaN(parseInt(i)) ? e.splice(i, 1) : delete e[i] : e[i] = n : b(a = (a = e[i]) && m(e, i) ? a : e[i] = {}, u, n)) : void 0 === n ? x(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function G(e) {
|
|
95
|
+
var t, n = {};
|
|
96
|
+
for (t in e) m(e, t) && (n[t] = e[t]);
|
|
97
|
+
return n;
|
|
98
|
+
}
|
|
99
|
+
var X = [].concat;
|
|
100
|
+
function H(e) {
|
|
101
|
+
return X.apply([], e);
|
|
102
|
+
}
|
|
103
|
+
var e = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(H([
|
|
104
|
+
8,
|
|
105
|
+
16,
|
|
106
|
+
32,
|
|
107
|
+
64
|
|
108
|
+
].map(function(t) {
|
|
109
|
+
return [
|
|
110
|
+
"Int",
|
|
111
|
+
"Uint",
|
|
112
|
+
"Float"
|
|
113
|
+
].map(function(e) {
|
|
114
|
+
return e + t + "Array";
|
|
115
|
+
});
|
|
116
|
+
}))).filter(function(e) {
|
|
117
|
+
return f[e];
|
|
118
|
+
}), J = new Set(e.map(function(e) {
|
|
119
|
+
return f[e];
|
|
120
|
+
}));
|
|
121
|
+
var Z = null;
|
|
122
|
+
function ee(e) {
|
|
123
|
+
Z = /* @__PURE__ */ new WeakMap();
|
|
124
|
+
e = function e(t) {
|
|
125
|
+
if (!t || "object" != typeof t) return t;
|
|
126
|
+
var n = Z.get(t);
|
|
127
|
+
if (n) return n;
|
|
128
|
+
if (x(t)) {
|
|
129
|
+
n = [], Z.set(t, n);
|
|
130
|
+
for (var r = 0, o = t.length; r < o; ++r) n.push(e(t[r]));
|
|
131
|
+
} else if (J.has(t.constructor)) n = t;
|
|
132
|
+
else {
|
|
133
|
+
var i, a = F(t);
|
|
134
|
+
for (i in n = a === Object.prototype ? {} : Object.create(a), Z.set(t, n), t) m(t, i) && (n[i] = e(t[i]));
|
|
135
|
+
}
|
|
136
|
+
return n;
|
|
137
|
+
}(e);
|
|
138
|
+
return Z = null, e;
|
|
139
|
+
}
|
|
140
|
+
var te = {}.toString;
|
|
141
|
+
function ne(e) {
|
|
142
|
+
return te.call(e).slice(8, -1);
|
|
143
|
+
}
|
|
144
|
+
var re = "undefined" != typeof Symbol ? Symbol.iterator : "@@iterator", oe = "symbol" == typeof re ? function(e) {
|
|
145
|
+
var t;
|
|
146
|
+
return null != e && (t = e[re]) && t.apply(e);
|
|
147
|
+
} : function() {
|
|
148
|
+
return null;
|
|
149
|
+
};
|
|
150
|
+
function ie(e, t) {
|
|
151
|
+
t = e.indexOf(t);
|
|
152
|
+
0 <= t && e.splice(t, 1);
|
|
153
|
+
}
|
|
154
|
+
var ae = {};
|
|
155
|
+
function n(e) {
|
|
156
|
+
var t, n, r, o;
|
|
157
|
+
if (1 === arguments.length) {
|
|
158
|
+
if (x(e)) return e.slice();
|
|
159
|
+
if (this === ae && "string" == typeof e) return [e];
|
|
160
|
+
if (o = oe(e)) for (n = []; !(r = o.next()).done;) n.push(r.value);
|
|
161
|
+
else {
|
|
162
|
+
if (null == e) return [e];
|
|
163
|
+
if ("number" != typeof (t = e.length)) return [e];
|
|
164
|
+
for (n = new Array(t); t--;) n[t] = e[t];
|
|
165
|
+
}
|
|
166
|
+
} else for (t = arguments.length, n = new Array(t); t--;) n[t] = arguments[t];
|
|
167
|
+
return n;
|
|
168
|
+
}
|
|
169
|
+
var ue = "undefined" != typeof Symbol ? function(e) {
|
|
170
|
+
return "AsyncFunction" === e[Symbol.toStringTag];
|
|
171
|
+
} : function() {
|
|
172
|
+
return !1;
|
|
173
|
+
}, e = [
|
|
174
|
+
"Unknown",
|
|
175
|
+
"Constraint",
|
|
176
|
+
"Data",
|
|
177
|
+
"TransactionInactive",
|
|
178
|
+
"ReadOnly",
|
|
179
|
+
"Version",
|
|
180
|
+
"NotFound",
|
|
181
|
+
"InvalidState",
|
|
182
|
+
"InvalidAccess",
|
|
183
|
+
"Abort",
|
|
184
|
+
"Timeout",
|
|
185
|
+
"QuotaExceeded",
|
|
186
|
+
"Syntax",
|
|
187
|
+
"DataClone"
|
|
188
|
+
], t = [
|
|
189
|
+
"Modify",
|
|
190
|
+
"Bulk",
|
|
191
|
+
"OpenFailed",
|
|
192
|
+
"VersionChange",
|
|
193
|
+
"Schema",
|
|
194
|
+
"Upgrade",
|
|
195
|
+
"InvalidTable",
|
|
196
|
+
"MissingAPI",
|
|
197
|
+
"NoSuchDatabase",
|
|
198
|
+
"InvalidArgument",
|
|
199
|
+
"SubTransaction",
|
|
200
|
+
"Unsupported",
|
|
201
|
+
"Internal",
|
|
202
|
+
"DatabaseClosed",
|
|
203
|
+
"PrematureCommit",
|
|
204
|
+
"ForeignAwait"
|
|
205
|
+
].concat(e), se = {
|
|
206
|
+
VersionChanged: "Database version changed by other database connection",
|
|
207
|
+
DatabaseClosed: "Database has been closed",
|
|
208
|
+
Abort: "Transaction aborted",
|
|
209
|
+
TransactionInactive: "Transaction has already completed or failed",
|
|
210
|
+
MissingAPI: "IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"
|
|
211
|
+
};
|
|
212
|
+
function ce(e, t) {
|
|
213
|
+
this.name = e, this.message = t;
|
|
214
|
+
}
|
|
215
|
+
function le(e, t) {
|
|
216
|
+
return e + ". Errors: " + Object.keys(t).map(function(e) {
|
|
217
|
+
return t[e].toString();
|
|
218
|
+
}).filter(function(e, t, n) {
|
|
219
|
+
return n.indexOf(e) === t;
|
|
220
|
+
}).join("\n");
|
|
221
|
+
}
|
|
222
|
+
function fe(e, t, n, r) {
|
|
223
|
+
this.failures = t, this.failedKeys = r, this.successCount = n, this.message = le(e, t);
|
|
224
|
+
}
|
|
225
|
+
function he(e, t) {
|
|
226
|
+
this.name = "BulkError", this.failures = Object.keys(t).map(function(e) {
|
|
227
|
+
return t[e];
|
|
228
|
+
}), this.failuresByPos = t, this.message = le(e, this.failures);
|
|
229
|
+
}
|
|
230
|
+
U(ce).from(Error).extend({ toString: function() {
|
|
231
|
+
return this.name + ": " + this.message;
|
|
232
|
+
} }), U(fe).from(ce), U(he).from(ce);
|
|
233
|
+
var de = t.reduce(function(e, t) {
|
|
234
|
+
return e[t] = t + "Error", e;
|
|
235
|
+
}, {}), pe = ce, k = t.reduce(function(e, n) {
|
|
236
|
+
var r = n + "Error";
|
|
237
|
+
function t(e, t) {
|
|
238
|
+
this.name = r, e ? "string" == typeof e ? (this.message = "".concat(e).concat(t ? "\n " + t : ""), this.inner = t || null) : "object" == typeof e && (this.message = "".concat(e.name, " ").concat(e.message), this.inner = e) : (this.message = se[n] || r, this.inner = null);
|
|
239
|
+
}
|
|
240
|
+
return U(t).from(pe), e[n] = t, e;
|
|
241
|
+
}, {}), ye = (k.Syntax = SyntaxError, k.Type = TypeError, k.Range = RangeError, e.reduce(function(e, t) {
|
|
242
|
+
return e[t + "Error"] = k[t], e;
|
|
243
|
+
}, {}));
|
|
244
|
+
e = t.reduce(function(e, t) {
|
|
245
|
+
return -1 === [
|
|
246
|
+
"Syntax",
|
|
247
|
+
"Type",
|
|
248
|
+
"Range"
|
|
249
|
+
].indexOf(t) && (e[t + "Error"] = k[t]), e;
|
|
250
|
+
}, {});
|
|
251
|
+
function g() {}
|
|
252
|
+
function ve(e) {
|
|
253
|
+
return e;
|
|
254
|
+
}
|
|
255
|
+
function me(t, n) {
|
|
256
|
+
return null == t || t === ve ? n : function(e) {
|
|
257
|
+
return n(t(e));
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
function be(e, t) {
|
|
261
|
+
return function() {
|
|
262
|
+
e.apply(this, arguments), t.apply(this, arguments);
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
function ge(o, i) {
|
|
266
|
+
return o === g ? i : function() {
|
|
267
|
+
var e = o.apply(this, arguments), t = (void 0 !== e && (arguments[0] = e), this.onsuccess), n = this.onerror, r = (this.onsuccess = null, this.onerror = null, i.apply(this, arguments));
|
|
268
|
+
return t && (this.onsuccess = this.onsuccess ? be(t, this.onsuccess) : t), n && (this.onerror = this.onerror ? be(n, this.onerror) : n), void 0 !== r ? r : e;
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
function we(n, r) {
|
|
272
|
+
return n === g ? r : function() {
|
|
273
|
+
n.apply(this, arguments);
|
|
274
|
+
var e = this.onsuccess, t = this.onerror;
|
|
275
|
+
this.onsuccess = this.onerror = null, r.apply(this, arguments), e && (this.onsuccess = this.onsuccess ? be(e, this.onsuccess) : e), t && (this.onerror = this.onerror ? be(t, this.onerror) : t);
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
function _e(o, i) {
|
|
279
|
+
return o === g ? i : function(e) {
|
|
280
|
+
var t = o.apply(this, arguments), e = (a(e, t), this.onsuccess), n = this.onerror, r = (this.onsuccess = null, this.onerror = null, i.apply(this, arguments));
|
|
281
|
+
return e && (this.onsuccess = this.onsuccess ? be(e, this.onsuccess) : e), n && (this.onerror = this.onerror ? be(n, this.onerror) : n), void 0 === t ? void 0 === r ? void 0 : r : a(t, r);
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
function xe(e, t) {
|
|
285
|
+
return e === g ? t : function() {
|
|
286
|
+
return !1 !== t.apply(this, arguments) && e.apply(this, arguments);
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
function ke(o, i) {
|
|
290
|
+
return o === g ? i : function() {
|
|
291
|
+
var e = o.apply(this, arguments);
|
|
292
|
+
if (e && "function" == typeof e.then) {
|
|
293
|
+
for (var t = this, n = arguments.length, r = new Array(n); n--;) r[n] = arguments[n];
|
|
294
|
+
return e.then(function() {
|
|
295
|
+
return i.apply(t, r);
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
return i.apply(this, arguments);
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
e.ModifyError = fe, e.DexieError = ce, e.BulkError = he;
|
|
302
|
+
var l = "undefined" != typeof location && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
|
|
303
|
+
function Oe(e) {
|
|
304
|
+
l = e;
|
|
305
|
+
}
|
|
306
|
+
var Pe = {}, Ke = 100, Ee = "undefined" == typeof Promise ? [] : (t = Promise.resolve(), "undefined" != typeof crypto && crypto.subtle ? [
|
|
307
|
+
Ee = crypto.subtle.digest("SHA-512", new Uint8Array([0])),
|
|
308
|
+
F(Ee),
|
|
309
|
+
t
|
|
310
|
+
] : [
|
|
311
|
+
t,
|
|
312
|
+
F(t),
|
|
313
|
+
t
|
|
314
|
+
]), t = Ee[0], Se = Ee[1], Se = Se && Se.then, je = t && t.constructor, Ae = !!Ee[2];
|
|
315
|
+
var Ce = function(e, t) {
|
|
316
|
+
Re.push([e, t]), Ie && (queueMicrotask(Ye), Ie = !1);
|
|
317
|
+
}, Te = !0, Ie = !0, qe = [], De = [], Be = ve, s = {
|
|
318
|
+
id: "global",
|
|
319
|
+
global: !0,
|
|
320
|
+
ref: 0,
|
|
321
|
+
unhandleds: [],
|
|
322
|
+
onunhandled: g,
|
|
323
|
+
pgp: !1,
|
|
324
|
+
env: {},
|
|
325
|
+
finalize: g
|
|
326
|
+
}, P = s, Re = [], Fe = 0, Me = [];
|
|
327
|
+
function K(e) {
|
|
328
|
+
if ("object" != typeof this) throw new TypeError("Promises must be constructed via new");
|
|
329
|
+
this._listeners = [], this._lib = !1;
|
|
330
|
+
var t = this._PSD = P;
|
|
331
|
+
if ("function" != typeof e) {
|
|
332
|
+
if (e !== Pe) throw new TypeError("Not a function");
|
|
333
|
+
this._state = arguments[1], this._value = arguments[2], !1 === this._state && Ue(this, this._value);
|
|
334
|
+
} else this._state = null, this._value = null, ++t.ref, function t(r, e) {
|
|
335
|
+
try {
|
|
336
|
+
e(function(n) {
|
|
337
|
+
if (null === r._state) {
|
|
338
|
+
if (n === r) throw new TypeError("A promise cannot be resolved with itself.");
|
|
339
|
+
var e = r._lib && $e();
|
|
340
|
+
n && "function" == typeof n.then ? t(r, function(e, t) {
|
|
341
|
+
n instanceof K ? n._then(e, t) : n.then(e, t);
|
|
342
|
+
}) : (r._state = !0, r._value = n, Ve(r)), e && Qe();
|
|
343
|
+
}
|
|
344
|
+
}, Ue.bind(null, r));
|
|
345
|
+
} catch (e) {
|
|
346
|
+
Ue(r, e);
|
|
347
|
+
}
|
|
348
|
+
}(this, e);
|
|
349
|
+
}
|
|
350
|
+
var Ne = {
|
|
351
|
+
get: function() {
|
|
352
|
+
var u = P, t = et;
|
|
353
|
+
function e(n, r) {
|
|
354
|
+
var o = this, i = !u.global && (u !== P || t !== et), a = i && !v(), e = new K(function(e, t) {
|
|
355
|
+
ze(o, new Le(ut(n, u, i, a), ut(r, u, i, a), e, t, u));
|
|
356
|
+
});
|
|
357
|
+
return this._consoleTask && (e._consoleTask = this._consoleTask), e;
|
|
358
|
+
}
|
|
359
|
+
return e.prototype = Pe, e;
|
|
360
|
+
},
|
|
361
|
+
set: function(e) {
|
|
362
|
+
u(this, "then", e && e.prototype === Pe ? Ne : {
|
|
363
|
+
get: function() {
|
|
364
|
+
return e;
|
|
365
|
+
},
|
|
366
|
+
set: Ne.set
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
function Le(e, t, n, r, o) {
|
|
371
|
+
this.onFulfilled = "function" == typeof e ? e : null, this.onRejected = "function" == typeof t ? t : null, this.resolve = n, this.reject = r, this.psd = o;
|
|
372
|
+
}
|
|
373
|
+
function Ue(e, t) {
|
|
374
|
+
var n, r;
|
|
375
|
+
De.push(t), null === e._state && (n = e._lib && $e(), t = Be(t), e._state = !1, e._value = t, r = e, qe.some(function(e) {
|
|
376
|
+
return e._value === r._value;
|
|
377
|
+
}) || qe.push(r), Ve(e), n) && Qe();
|
|
378
|
+
}
|
|
379
|
+
function Ve(e) {
|
|
380
|
+
var t = e._listeners;
|
|
381
|
+
e._listeners = [];
|
|
382
|
+
for (var n = 0, r = t.length; n < r; ++n) ze(e, t[n]);
|
|
383
|
+
var o = e._PSD;
|
|
384
|
+
--o.ref || o.finalize(), 0 === Fe && (++Fe, Ce(function() {
|
|
385
|
+
0 == --Fe && Ge();
|
|
386
|
+
}, []));
|
|
387
|
+
}
|
|
388
|
+
function ze(e, t) {
|
|
389
|
+
if (null === e._state) e._listeners.push(t);
|
|
390
|
+
else {
|
|
391
|
+
var n = e._state ? t.onFulfilled : t.onRejected;
|
|
392
|
+
if (null === n) return (e._state ? t.resolve : t.reject)(e._value);
|
|
393
|
+
++t.psd.ref, ++Fe, Ce(We, [
|
|
394
|
+
n,
|
|
395
|
+
e,
|
|
396
|
+
t
|
|
397
|
+
]);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
function We(e, t, n) {
|
|
401
|
+
try {
|
|
402
|
+
var r, o = t._value;
|
|
403
|
+
!t._state && De.length && (De = []), r = l && t._consoleTask ? t._consoleTask.run(function() {
|
|
404
|
+
return e(o);
|
|
405
|
+
}) : e(o), t._state || -1 !== De.indexOf(o) || ((e) => {
|
|
406
|
+
for (var t = qe.length; t;) if (qe[--t]._value === e._value) return qe.splice(t, 1);
|
|
407
|
+
})(t), n.resolve(r);
|
|
408
|
+
} catch (e) {
|
|
409
|
+
n.reject(e);
|
|
410
|
+
} finally {
|
|
411
|
+
0 == --Fe && Ge(), --n.psd.ref || n.psd.finalize();
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
function Ye() {
|
|
415
|
+
at(s, function() {
|
|
416
|
+
$e() && Qe();
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
function $e() {
|
|
420
|
+
var e = Te;
|
|
421
|
+
return Ie = Te = !1, e;
|
|
422
|
+
}
|
|
423
|
+
function Qe() {
|
|
424
|
+
var e, t, n;
|
|
425
|
+
do
|
|
426
|
+
for (; 0 < Re.length;) for (e = Re, Re = [], n = e.length, t = 0; t < n; ++t) {
|
|
427
|
+
var r = e[t];
|
|
428
|
+
r[0].apply(null, r[1]);
|
|
429
|
+
}
|
|
430
|
+
while (0 < Re.length);
|
|
431
|
+
Ie = Te = !0;
|
|
432
|
+
}
|
|
433
|
+
function Ge() {
|
|
434
|
+
for (var e = qe, t = (qe = [], e.forEach(function(e) {
|
|
435
|
+
e._PSD.onunhandled.call(null, e._value, e);
|
|
436
|
+
}), Me.slice(0)), n = t.length; n;) t[--n]();
|
|
437
|
+
}
|
|
438
|
+
function Xe(e) {
|
|
439
|
+
return new K(Pe, !1, e);
|
|
440
|
+
}
|
|
441
|
+
function E(n, r) {
|
|
442
|
+
var o = P;
|
|
443
|
+
return function() {
|
|
444
|
+
var e = $e(), t = P;
|
|
445
|
+
try {
|
|
446
|
+
return h(o, !0), n.apply(this, arguments);
|
|
447
|
+
} catch (e) {
|
|
448
|
+
r && r(e);
|
|
449
|
+
} finally {
|
|
450
|
+
h(t, !1), e && Qe();
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
N(K.prototype, {
|
|
455
|
+
then: Ne,
|
|
456
|
+
_then: function(e, t) {
|
|
457
|
+
ze(this, new Le(null, null, e, t, P));
|
|
458
|
+
},
|
|
459
|
+
catch: function(e) {
|
|
460
|
+
var t, n;
|
|
461
|
+
return 1 === arguments.length ? this.then(null, e) : (t = e, n = arguments[1], "function" == typeof t ? this.then(null, function(e) {
|
|
462
|
+
return (e instanceof t ? n : Xe)(e);
|
|
463
|
+
}) : this.then(null, function(e) {
|
|
464
|
+
return (e && e.name === t ? n : Xe)(e);
|
|
465
|
+
}));
|
|
466
|
+
},
|
|
467
|
+
finally: function(t) {
|
|
468
|
+
return this.then(function(e) {
|
|
469
|
+
return K.resolve(t()).then(function() {
|
|
470
|
+
return e;
|
|
471
|
+
});
|
|
472
|
+
}, function(e) {
|
|
473
|
+
return K.resolve(t()).then(function() {
|
|
474
|
+
return Xe(e);
|
|
475
|
+
});
|
|
476
|
+
});
|
|
477
|
+
},
|
|
478
|
+
timeout: function(r, o) {
|
|
479
|
+
var i = this;
|
|
480
|
+
return r < Infinity ? new K(function(e, t) {
|
|
481
|
+
var n = setTimeout(function() {
|
|
482
|
+
return t(new k.Timeout(o));
|
|
483
|
+
}, r);
|
|
484
|
+
i.then(e, t).finally(clearTimeout.bind(null, n));
|
|
485
|
+
}) : this;
|
|
486
|
+
}
|
|
487
|
+
}), "undefined" != typeof Symbol && Symbol.toStringTag && u(K.prototype, Symbol.toStringTag, "Dexie.Promise"), s.env = it(), N(K, {
|
|
488
|
+
all: function() {
|
|
489
|
+
var i = n.apply(null, arguments).map(rt);
|
|
490
|
+
return new K(function(n, r) {
|
|
491
|
+
0 === i.length && n([]);
|
|
492
|
+
var o = i.length;
|
|
493
|
+
i.forEach(function(e, t) {
|
|
494
|
+
return K.resolve(e).then(function(e) {
|
|
495
|
+
i[t] = e, --o || n(i);
|
|
496
|
+
}, r);
|
|
497
|
+
});
|
|
498
|
+
});
|
|
499
|
+
},
|
|
500
|
+
resolve: function(n) {
|
|
501
|
+
return n instanceof K ? n : n && "function" == typeof n.then ? new K(function(e, t) {
|
|
502
|
+
n.then(e, t);
|
|
503
|
+
}) : new K(Pe, !0, n);
|
|
504
|
+
},
|
|
505
|
+
reject: Xe,
|
|
506
|
+
race: function() {
|
|
507
|
+
var e = n.apply(null, arguments).map(rt);
|
|
508
|
+
return new K(function(t, n) {
|
|
509
|
+
e.map(function(e) {
|
|
510
|
+
return K.resolve(e).then(t, n);
|
|
511
|
+
});
|
|
512
|
+
});
|
|
513
|
+
},
|
|
514
|
+
PSD: {
|
|
515
|
+
get: function() {
|
|
516
|
+
return P;
|
|
517
|
+
},
|
|
518
|
+
set: function(e) {
|
|
519
|
+
return P = e;
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
totalEchoes: { get: function() {
|
|
523
|
+
return et;
|
|
524
|
+
} },
|
|
525
|
+
newPSD: y,
|
|
526
|
+
usePSD: at,
|
|
527
|
+
scheduler: {
|
|
528
|
+
get: function() {
|
|
529
|
+
return Ce;
|
|
530
|
+
},
|
|
531
|
+
set: function(e) {
|
|
532
|
+
Ce = e;
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
rejectionMapper: {
|
|
536
|
+
get: function() {
|
|
537
|
+
return Be;
|
|
538
|
+
},
|
|
539
|
+
set: function(e) {
|
|
540
|
+
Be = e;
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
follow: function(o, n) {
|
|
544
|
+
return new K(function(e, t) {
|
|
545
|
+
return y(function(n, r) {
|
|
546
|
+
var e = P;
|
|
547
|
+
e.unhandleds = [], e.onunhandled = r, e.finalize = be(function() {
|
|
548
|
+
var t, e = this;
|
|
549
|
+
t = function() {
|
|
550
|
+
0 === e.unhandleds.length ? n() : r(e.unhandleds[0]);
|
|
551
|
+
}, Me.push(function e() {
|
|
552
|
+
t(), Me.splice(Me.indexOf(e), 1);
|
|
553
|
+
}), ++Fe, Ce(function() {
|
|
554
|
+
0 == --Fe && Ge();
|
|
555
|
+
}, []);
|
|
556
|
+
}, e.finalize), o();
|
|
557
|
+
}, n, e, t);
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
}), je && (je.allSettled && u(K, "allSettled", function() {
|
|
561
|
+
var e = n.apply(null, arguments).map(rt);
|
|
562
|
+
return new K(function(n) {
|
|
563
|
+
0 === e.length && n([]);
|
|
564
|
+
var r = e.length, o = new Array(r);
|
|
565
|
+
e.forEach(function(e, t) {
|
|
566
|
+
return K.resolve(e).then(function(e) {
|
|
567
|
+
return o[t] = {
|
|
568
|
+
status: "fulfilled",
|
|
569
|
+
value: e
|
|
570
|
+
};
|
|
571
|
+
}, function(e) {
|
|
572
|
+
return o[t] = {
|
|
573
|
+
status: "rejected",
|
|
574
|
+
reason: e
|
|
575
|
+
};
|
|
576
|
+
}).then(function() {
|
|
577
|
+
return --r || n(o);
|
|
578
|
+
});
|
|
579
|
+
});
|
|
580
|
+
});
|
|
581
|
+
}), je.any && "undefined" != typeof AggregateError && u(K, "any", function() {
|
|
582
|
+
var e = n.apply(null, arguments).map(rt);
|
|
583
|
+
return new K(function(n, r) {
|
|
584
|
+
0 === e.length && r(/* @__PURE__ */ new AggregateError([]));
|
|
585
|
+
var o = e.length, i = new Array(o);
|
|
586
|
+
e.forEach(function(e, t) {
|
|
587
|
+
return K.resolve(e).then(function(e) {
|
|
588
|
+
return n(e);
|
|
589
|
+
}, function(e) {
|
|
590
|
+
i[t] = e, --o || r(new AggregateError(i));
|
|
591
|
+
});
|
|
592
|
+
});
|
|
593
|
+
});
|
|
594
|
+
}), je.withResolvers) && (K.withResolvers = je.withResolvers);
|
|
595
|
+
var i = {
|
|
596
|
+
awaits: 0,
|
|
597
|
+
echoes: 0,
|
|
598
|
+
id: 0
|
|
599
|
+
}, He = 0, Je = [], Ze = 0, et = 0, tt = 0;
|
|
600
|
+
function y(e, t, n, r) {
|
|
601
|
+
var o = P, i = Object.create(o), t = (i.parent = o, i.ref = 0, i.global = !1, i.id = ++tt, s.env, i.env = Ae ? {
|
|
602
|
+
Promise: K,
|
|
603
|
+
PromiseProp: {
|
|
604
|
+
value: K,
|
|
605
|
+
configurable: !0,
|
|
606
|
+
writable: !0
|
|
607
|
+
},
|
|
608
|
+
all: K.all,
|
|
609
|
+
race: K.race,
|
|
610
|
+
allSettled: K.allSettled,
|
|
611
|
+
any: K.any,
|
|
612
|
+
resolve: K.resolve,
|
|
613
|
+
reject: K.reject
|
|
614
|
+
} : {}, t && a(i, t), ++o.ref, i.finalize = function() {
|
|
615
|
+
--this.parent.ref || this.parent.finalize();
|
|
616
|
+
}, at(i, e, n, r));
|
|
617
|
+
return 0 === i.ref && i.finalize(), t;
|
|
618
|
+
}
|
|
619
|
+
function nt() {
|
|
620
|
+
return i.id || (i.id = ++He), ++i.awaits, i.echoes += Ke, i.id;
|
|
621
|
+
}
|
|
622
|
+
function v() {
|
|
623
|
+
return !!i.awaits && (0 == --i.awaits && (i.id = 0), i.echoes = i.awaits * Ke, !0);
|
|
624
|
+
}
|
|
625
|
+
function rt(e) {
|
|
626
|
+
return i.echoes && e && e.constructor === je ? (nt(), e.then(function(e) {
|
|
627
|
+
return v(), e;
|
|
628
|
+
}, function(e) {
|
|
629
|
+
return v(), w(e);
|
|
630
|
+
})) : e;
|
|
631
|
+
}
|
|
632
|
+
function ot() {
|
|
633
|
+
var e = Je[Je.length - 1];
|
|
634
|
+
Je.pop(), h(e, !1);
|
|
635
|
+
}
|
|
636
|
+
function h(e, t) {
|
|
637
|
+
var n, r, o = P;
|
|
638
|
+
(t ? !i.echoes || Ze++ && e === P : !Ze || --Ze && e === P) || queueMicrotask(t ? function(e) {
|
|
639
|
+
++et, i.echoes && 0 != --i.echoes || (i.echoes = i.awaits = i.id = 0), Je.push(P), h(e, !0);
|
|
640
|
+
}.bind(null, e) : ot), e !== P && (P = e, o === s && (s.env = it()), Ae) && (n = s.env.Promise, r = e.env, o.global || e.global) && (Object.defineProperty(f, "Promise", r.PromiseProp), n.all = r.all, n.race = r.race, n.resolve = r.resolve, n.reject = r.reject, r.allSettled && (n.allSettled = r.allSettled), r.any) && (n.any = r.any);
|
|
641
|
+
}
|
|
642
|
+
function it() {
|
|
643
|
+
var e = f.Promise;
|
|
644
|
+
return Ae ? {
|
|
645
|
+
Promise: e,
|
|
646
|
+
PromiseProp: Object.getOwnPropertyDescriptor(f, "Promise"),
|
|
647
|
+
all: e.all,
|
|
648
|
+
race: e.race,
|
|
649
|
+
allSettled: e.allSettled,
|
|
650
|
+
any: e.any,
|
|
651
|
+
resolve: e.resolve,
|
|
652
|
+
reject: e.reject
|
|
653
|
+
} : {};
|
|
654
|
+
}
|
|
655
|
+
function at(e, t, n, r, o) {
|
|
656
|
+
var i = P;
|
|
657
|
+
try {
|
|
658
|
+
return h(e, !0), t(n, r, o);
|
|
659
|
+
} finally {
|
|
660
|
+
h(i, !1);
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
function ut(t, n, r, o) {
|
|
664
|
+
return "function" != typeof t ? t : function() {
|
|
665
|
+
var e = P;
|
|
666
|
+
r && nt(), h(n, !0);
|
|
667
|
+
try {
|
|
668
|
+
return t.apply(this, arguments);
|
|
669
|
+
} finally {
|
|
670
|
+
h(e, !1), o && queueMicrotask(v);
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
function st(e) {
|
|
675
|
+
Promise === je && 0 === i.echoes ? 0 === Ze ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
|
|
676
|
+
}
|
|
677
|
+
-1 === ("" + Se).indexOf("[native code]") && (nt = v = g);
|
|
678
|
+
var w = K.reject;
|
|
679
|
+
var ct = String.fromCharCode(65535), S = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", lt = "String expected.", ft = [], ht = "__dbnames", dt = "readonly", pt = "readwrite";
|
|
680
|
+
function yt(e, t) {
|
|
681
|
+
return e ? t ? function() {
|
|
682
|
+
return e.apply(this, arguments) && t.apply(this, arguments);
|
|
683
|
+
} : e : t;
|
|
684
|
+
}
|
|
685
|
+
var vt = {
|
|
686
|
+
type: 3,
|
|
687
|
+
lower: -Infinity,
|
|
688
|
+
lowerOpen: !1,
|
|
689
|
+
upper: [[]],
|
|
690
|
+
upperOpen: !1
|
|
691
|
+
};
|
|
692
|
+
function mt(t) {
|
|
693
|
+
return "string" != typeof t || /\./.test(t) ? function(e) {
|
|
694
|
+
return e;
|
|
695
|
+
} : function(e) {
|
|
696
|
+
return void 0 === e[t] && t in e && delete (e = ee(e))[t], e;
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
function bt() {
|
|
700
|
+
throw k.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.");
|
|
701
|
+
}
|
|
702
|
+
function j(e, t) {
|
|
703
|
+
try {
|
|
704
|
+
var n = gt(e), r = gt(t);
|
|
705
|
+
if (n !== r) return "Array" === n ? 1 : "Array" === r ? -1 : "binary" === n ? 1 : "binary" === r ? -1 : "string" === n ? 1 : "string" === r ? -1 : "Date" === n ? 1 : "Date" !== r ? NaN : -1;
|
|
706
|
+
switch (n) {
|
|
707
|
+
case "number":
|
|
708
|
+
case "Date":
|
|
709
|
+
case "string": return t < e ? 1 : e < t ? -1 : 0;
|
|
710
|
+
case "binary":
|
|
711
|
+
for (var o = wt(e), i = wt(t), a = o.length, u = i.length, s = a < u ? a : u, c = 0; c < s; ++c) if (o[c] !== i[c]) return o[c] < i[c] ? -1 : 1;
|
|
712
|
+
return a === u ? 0 : a < u ? -1 : 1;
|
|
713
|
+
case "Array":
|
|
714
|
+
for (var l = e, f = t, h = l.length, d = f.length, p = h < d ? h : d, y = 0; y < p; ++y) {
|
|
715
|
+
var v = j(l[y], f[y]);
|
|
716
|
+
if (0 !== v) return v;
|
|
717
|
+
}
|
|
718
|
+
return h === d ? 0 : h < d ? -1 : 1;
|
|
719
|
+
}
|
|
720
|
+
} catch (e) {}
|
|
721
|
+
return NaN;
|
|
722
|
+
}
|
|
723
|
+
function gt(e) {
|
|
724
|
+
var t = typeof e;
|
|
725
|
+
return "object" == t && (ArrayBuffer.isView(e) || "ArrayBuffer" === (t = ne(e))) ? "binary" : t;
|
|
726
|
+
}
|
|
727
|
+
function wt(e) {
|
|
728
|
+
return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
|
|
729
|
+
}
|
|
730
|
+
function _t(t, n, r) {
|
|
731
|
+
var e = t.schema.yProps;
|
|
732
|
+
return e ? (n && 0 < r.numFailures && (n = n.filter(function(e, t) {
|
|
733
|
+
return !r.failures[t];
|
|
734
|
+
})), Promise.all(e.map(function(e) {
|
|
735
|
+
e = e.updatesTable;
|
|
736
|
+
return n ? t.db.table(e).where("k").anyOf(n).delete() : t.db.table(e).clear();
|
|
737
|
+
})).then(function() {
|
|
738
|
+
return r;
|
|
739
|
+
})) : r;
|
|
740
|
+
}
|
|
741
|
+
kt.prototype.execute = function(e) {
|
|
742
|
+
var t = this["@@propmod"];
|
|
743
|
+
if (void 0 !== t.add) {
|
|
744
|
+
var n = t.add;
|
|
745
|
+
if (x(n)) return R(R([], x(e) ? e : [], !0), n, !0).sort();
|
|
746
|
+
if ("number" == typeof n) return (Number(e) || 0) + n;
|
|
747
|
+
if ("bigint" == typeof n) try {
|
|
748
|
+
return BigInt(e) + n;
|
|
749
|
+
} catch (e) {
|
|
750
|
+
return BigInt(0) + n;
|
|
751
|
+
}
|
|
752
|
+
throw new TypeError("Invalid term ".concat(n));
|
|
753
|
+
}
|
|
754
|
+
if (void 0 !== t.remove) {
|
|
755
|
+
var r = t.remove;
|
|
756
|
+
if (x(r)) return x(e) ? e.filter(function(e) {
|
|
757
|
+
return !r.includes(e);
|
|
758
|
+
}).sort() : [];
|
|
759
|
+
if ("number" == typeof r) return Number(e) - r;
|
|
760
|
+
if ("bigint" == typeof r) try {
|
|
761
|
+
return BigInt(e) - r;
|
|
762
|
+
} catch (e) {
|
|
763
|
+
return BigInt(0) - r;
|
|
764
|
+
}
|
|
765
|
+
throw new TypeError("Invalid subtrahend ".concat(r));
|
|
766
|
+
}
|
|
767
|
+
n = null == (n = t.replacePrefix) ? void 0 : n[0];
|
|
768
|
+
return n && "string" == typeof e && e.startsWith(n) ? t.replacePrefix[1] + e.substring(n.length) : e;
|
|
769
|
+
};
|
|
770
|
+
var xt = kt;
|
|
771
|
+
function kt(e) {
|
|
772
|
+
this["@@propmod"] = e;
|
|
773
|
+
}
|
|
774
|
+
function Ot(e, t) {
|
|
775
|
+
for (var n = O(t), r = n.length, o = !1, i = 0; i < r; ++i) {
|
|
776
|
+
var a = n[i], u = t[a], s = c(e, a);
|
|
777
|
+
u instanceof xt ? (b(e, a, u.execute(s)), o = !0) : s !== u && (b(e, a, u), o = !0);
|
|
778
|
+
}
|
|
779
|
+
return o;
|
|
780
|
+
}
|
|
781
|
+
r.prototype._trans = function(e, r, t) {
|
|
782
|
+
var n = this._tx || P.trans, o = this.name, i = l && "undefined" != typeof console && console.createTask && console.createTask("Dexie: ".concat("readonly" === e ? "read" : "write", " ").concat(this.name));
|
|
783
|
+
function a(e, t, n) {
|
|
784
|
+
if (n.schema[o]) return r(n.idbtrans, n);
|
|
785
|
+
throw new k.NotFound("Table " + o + " not part of transaction");
|
|
786
|
+
}
|
|
787
|
+
var u = $e();
|
|
788
|
+
try {
|
|
789
|
+
var s = n && n.db._novip === this.db._novip ? n === P.trans ? n._promise(e, a, t) : y(function() {
|
|
790
|
+
return n._promise(e, a, t);
|
|
791
|
+
}, {
|
|
792
|
+
trans: n,
|
|
793
|
+
transless: P.transless || P
|
|
794
|
+
}) : function t(n, r, o, i) {
|
|
795
|
+
if (n.idbdb && (n._state.openComplete || P.letThrough || n._vip)) {
|
|
796
|
+
var a = n._createTransaction(r, o, n._dbSchema);
|
|
797
|
+
try {
|
|
798
|
+
a.create(), n._state.PR1398_maxLoop = 3;
|
|
799
|
+
} catch (e) {
|
|
800
|
+
return e.name === de.InvalidState && n.isOpen() && 0 < --n._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), n.close({ disableAutoOpen: !1 }), n.open().then(function() {
|
|
801
|
+
return t(n, r, o, i);
|
|
802
|
+
})) : w(e);
|
|
803
|
+
}
|
|
804
|
+
return a._promise(r, function(e, t) {
|
|
805
|
+
return y(function() {
|
|
806
|
+
return P.trans = a, i(e, t, a);
|
|
807
|
+
});
|
|
808
|
+
}).then(function(e) {
|
|
809
|
+
if ("readwrite" === r) try {
|
|
810
|
+
a.idbtrans.commit();
|
|
811
|
+
} catch (e) {}
|
|
812
|
+
return "readonly" === r ? e : a._completion.then(function() {
|
|
813
|
+
return e;
|
|
814
|
+
});
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
if (n._state.openComplete) return w(new k.DatabaseClosed(n._state.dbOpenError));
|
|
818
|
+
if (!n._state.isBeingOpened) {
|
|
819
|
+
if (!n._state.autoOpen) return w(new k.DatabaseClosed());
|
|
820
|
+
n.open().catch(g);
|
|
821
|
+
}
|
|
822
|
+
return n._state.dbReadyPromise.then(function() {
|
|
823
|
+
return t(n, r, o, i);
|
|
824
|
+
});
|
|
825
|
+
}(this.db, e, [this.name], a);
|
|
826
|
+
return i && (s._consoleTask = i, s = s.catch(function(e) {
|
|
827
|
+
return console.trace(e), w(e);
|
|
828
|
+
})), s;
|
|
829
|
+
} finally {
|
|
830
|
+
u && Qe();
|
|
831
|
+
}
|
|
832
|
+
}, r.prototype.get = function(t, e) {
|
|
833
|
+
var n = this;
|
|
834
|
+
return t && t.constructor === Object ? this.where(t).first(e) : null == t ? w(new k.Type("Invalid argument to Table.get()")) : this._trans("readonly", function(e) {
|
|
835
|
+
return n.core.get({
|
|
836
|
+
trans: e,
|
|
837
|
+
key: t
|
|
838
|
+
}).then(function(e) {
|
|
839
|
+
return n.hook.reading.fire(e);
|
|
840
|
+
});
|
|
841
|
+
}).then(e);
|
|
842
|
+
}, r.prototype.where = function(i) {
|
|
843
|
+
if ("string" == typeof i) return new this.db.WhereClause(this, i);
|
|
844
|
+
if (x(i)) return new this.db.WhereClause(this, "[".concat(i.join("+"), "]"));
|
|
845
|
+
var n = O(i);
|
|
846
|
+
if (1 === n.length) return this.where(n[0]).equals(i[n[0]]);
|
|
847
|
+
var e = this.schema.indexes.concat(this.schema.primKey).filter(function(t) {
|
|
848
|
+
if (t.compound && n.every(function(e) {
|
|
849
|
+
return 0 <= t.keyPath.indexOf(e);
|
|
850
|
+
})) {
|
|
851
|
+
for (var e = 0; e < n.length; ++e) if (-1 === n.indexOf(t.keyPath[e])) return !1;
|
|
852
|
+
return !0;
|
|
853
|
+
}
|
|
854
|
+
return !1;
|
|
855
|
+
}).sort(function(e, t) {
|
|
856
|
+
return e.keyPath.length - t.keyPath.length;
|
|
857
|
+
})[0];
|
|
858
|
+
if (e && this.db._maxKey !== ct) return t = e.keyPath.slice(0, n.length), this.where(t).equals(t.map(function(e) {
|
|
859
|
+
return i[e];
|
|
860
|
+
}));
|
|
861
|
+
!e && l && console.warn("The query ".concat(JSON.stringify(i), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(n.join("+"), "]"));
|
|
862
|
+
var a = this.schema.idxByName;
|
|
863
|
+
function u(e, t) {
|
|
864
|
+
return 0 === j(e, t);
|
|
865
|
+
}
|
|
866
|
+
var t = n.reduce(function(e, t) {
|
|
867
|
+
var n = e[0], e = e[1], r = a[t], o = i[t];
|
|
868
|
+
return [n || r, n || !r ? yt(e, r && r.multi ? function(e) {
|
|
869
|
+
e = c(e, t);
|
|
870
|
+
return x(e) && e.some(function(e) {
|
|
871
|
+
return u(o, e);
|
|
872
|
+
});
|
|
873
|
+
} : function(e) {
|
|
874
|
+
return u(o, c(e, t));
|
|
875
|
+
}) : e];
|
|
876
|
+
}, [null, null]), r = t[0], t = t[1];
|
|
877
|
+
return r ? this.where(r.name).equals(i[r.keyPath]).filter(t) : e ? this.filter(t) : this.where(n).equals("");
|
|
878
|
+
}, r.prototype.filter = function(e) {
|
|
879
|
+
return this.toCollection().and(e);
|
|
880
|
+
}, r.prototype.count = function(e) {
|
|
881
|
+
return this.toCollection().count(e);
|
|
882
|
+
}, r.prototype.offset = function(e) {
|
|
883
|
+
return this.toCollection().offset(e);
|
|
884
|
+
}, r.prototype.limit = function(e) {
|
|
885
|
+
return this.toCollection().limit(e);
|
|
886
|
+
}, r.prototype.each = function(e) {
|
|
887
|
+
return this.toCollection().each(e);
|
|
888
|
+
}, r.prototype.toArray = function(e) {
|
|
889
|
+
return this.toCollection().toArray(e);
|
|
890
|
+
}, r.prototype.toCollection = function() {
|
|
891
|
+
return new this.db.Collection(new this.db.WhereClause(this));
|
|
892
|
+
}, r.prototype.orderBy = function(e) {
|
|
893
|
+
return new this.db.Collection(new this.db.WhereClause(this, x(e) ? "[".concat(e.join("+"), "]") : e));
|
|
894
|
+
}, r.prototype.reverse = function() {
|
|
895
|
+
return this.toCollection().reverse();
|
|
896
|
+
}, r.prototype.mapToClass = function(r) {
|
|
897
|
+
for (var i = this.db, a = this.name, o = ((this.schema.mappedClass = r).prototype instanceof bt && (r = ((e) => {
|
|
898
|
+
var t = o, n = e;
|
|
899
|
+
if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
900
|
+
function r() {
|
|
901
|
+
this.constructor = t;
|
|
902
|
+
}
|
|
903
|
+
function o() {
|
|
904
|
+
return null !== e && e.apply(this, arguments) || this;
|
|
905
|
+
}
|
|
906
|
+
return B(t, n), t.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r()), Object.defineProperty(o.prototype, "db", {
|
|
907
|
+
get: function() {
|
|
908
|
+
return i;
|
|
909
|
+
},
|
|
910
|
+
enumerable: !1,
|
|
911
|
+
configurable: !0
|
|
912
|
+
}), o.prototype.table = function() {
|
|
913
|
+
return a;
|
|
914
|
+
}, o;
|
|
915
|
+
})(r)), /* @__PURE__ */ new Set()), e = r.prototype; e; e = F(e)) Object.getOwnPropertyNames(e).forEach(function(e) {
|
|
916
|
+
return o.add(e);
|
|
917
|
+
});
|
|
918
|
+
function t(e) {
|
|
919
|
+
if (!e) return e;
|
|
920
|
+
var t, n = Object.create(r.prototype);
|
|
921
|
+
for (t in e) if (!o.has(t)) try {
|
|
922
|
+
n[t] = e[t];
|
|
923
|
+
} catch (e) {}
|
|
924
|
+
return n;
|
|
925
|
+
}
|
|
926
|
+
return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = t, this.hook("reading", t), r;
|
|
927
|
+
}, r.prototype.defineClass = function() {
|
|
928
|
+
return this.mapToClass(function(e) {
|
|
929
|
+
a(this, e);
|
|
930
|
+
});
|
|
931
|
+
}, r.prototype.add = function(t, n) {
|
|
932
|
+
var r = this, e = this.schema.primKey, o = e.auto, i = e.keyPath, a = t;
|
|
933
|
+
return i && o && (a = mt(i)(t)), this._trans("readwrite", function(e) {
|
|
934
|
+
return r.core.mutate({
|
|
935
|
+
trans: e,
|
|
936
|
+
type: "add",
|
|
937
|
+
keys: null != n ? [n] : null,
|
|
938
|
+
values: [a]
|
|
939
|
+
});
|
|
940
|
+
}).then(function(e) {
|
|
941
|
+
return e.numFailures ? K.reject(e.failures[0]) : e.lastResult;
|
|
942
|
+
}).then(function(e) {
|
|
943
|
+
if (i) try {
|
|
944
|
+
b(t, i, e);
|
|
945
|
+
} catch (e) {}
|
|
946
|
+
return e;
|
|
947
|
+
});
|
|
948
|
+
}, r.prototype.upsert = function(r, o) {
|
|
949
|
+
var i = this, a = this.schema.primKey.keyPath;
|
|
950
|
+
return this._trans("readwrite", function(n) {
|
|
951
|
+
return i.core.get({
|
|
952
|
+
trans: n,
|
|
953
|
+
key: r
|
|
954
|
+
}).then(function(t) {
|
|
955
|
+
var e = null != t ? t : {};
|
|
956
|
+
return Ot(e, o), a && b(e, a, r), i.core.mutate({
|
|
957
|
+
trans: n,
|
|
958
|
+
type: "put",
|
|
959
|
+
values: [e],
|
|
960
|
+
keys: [r],
|
|
961
|
+
upsert: !0,
|
|
962
|
+
updates: {
|
|
963
|
+
keys: [r],
|
|
964
|
+
changeSpecs: [o]
|
|
965
|
+
}
|
|
966
|
+
}).then(function(e) {
|
|
967
|
+
return e.numFailures ? K.reject(e.failures[0]) : !!t;
|
|
968
|
+
});
|
|
969
|
+
});
|
|
970
|
+
});
|
|
971
|
+
}, r.prototype.update = function(e, t) {
|
|
972
|
+
return "object" != typeof e || x(e) ? this.where(":id").equals(e).modify(t) : void 0 === (e = c(e, this.schema.primKey.keyPath)) ? w(new k.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t);
|
|
973
|
+
}, r.prototype.put = function(t, n) {
|
|
974
|
+
var r = this, e = this.schema.primKey, o = e.auto, i = e.keyPath, a = t;
|
|
975
|
+
return i && o && (a = mt(i)(t)), this._trans("readwrite", function(e) {
|
|
976
|
+
return r.core.mutate({
|
|
977
|
+
trans: e,
|
|
978
|
+
type: "put",
|
|
979
|
+
values: [a],
|
|
980
|
+
keys: null != n ? [n] : null
|
|
981
|
+
});
|
|
982
|
+
}).then(function(e) {
|
|
983
|
+
return e.numFailures ? K.reject(e.failures[0]) : e.lastResult;
|
|
984
|
+
}).then(function(e) {
|
|
985
|
+
if (i) try {
|
|
986
|
+
b(t, i, e);
|
|
987
|
+
} catch (e) {}
|
|
988
|
+
return e;
|
|
989
|
+
});
|
|
990
|
+
}, r.prototype.delete = function(t) {
|
|
991
|
+
var n = this;
|
|
992
|
+
return this._trans("readwrite", function(e) {
|
|
993
|
+
return n.core.mutate({
|
|
994
|
+
trans: e,
|
|
995
|
+
type: "delete",
|
|
996
|
+
keys: [t]
|
|
997
|
+
}).then(function(e) {
|
|
998
|
+
return _t(n, [t], e);
|
|
999
|
+
}).then(function(e) {
|
|
1000
|
+
return e.numFailures ? K.reject(e.failures[0]) : void 0;
|
|
1001
|
+
});
|
|
1002
|
+
});
|
|
1003
|
+
}, r.prototype.clear = function() {
|
|
1004
|
+
var t = this;
|
|
1005
|
+
return this._trans("readwrite", function(e) {
|
|
1006
|
+
return t.core.mutate({
|
|
1007
|
+
trans: e,
|
|
1008
|
+
type: "deleteRange",
|
|
1009
|
+
range: vt
|
|
1010
|
+
}).then(function(e) {
|
|
1011
|
+
return _t(t, null, e);
|
|
1012
|
+
});
|
|
1013
|
+
}).then(function(e) {
|
|
1014
|
+
return e.numFailures ? K.reject(e.failures[0]) : void 0;
|
|
1015
|
+
});
|
|
1016
|
+
}, r.prototype.bulkGet = function(t) {
|
|
1017
|
+
var n = this;
|
|
1018
|
+
return this._trans("readonly", function(e) {
|
|
1019
|
+
return n.core.getMany({
|
|
1020
|
+
keys: t,
|
|
1021
|
+
trans: e
|
|
1022
|
+
}).then(function(e) {
|
|
1023
|
+
return e.map(function(e) {
|
|
1024
|
+
return n.hook.reading.fire(e);
|
|
1025
|
+
});
|
|
1026
|
+
});
|
|
1027
|
+
});
|
|
1028
|
+
}, r.prototype.bulkAdd = function(o, e, t) {
|
|
1029
|
+
var i = this, a = Array.isArray(e) ? e : void 0, u = (t = t || (a ? void 0 : e)) ? t.allKeys : void 0;
|
|
1030
|
+
return this._trans("readwrite", function(e) {
|
|
1031
|
+
var t = i.schema.primKey, n = t.auto, t = t.keyPath;
|
|
1032
|
+
if (t && a) throw new k.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
|
|
1033
|
+
if (a && a.length !== o.length) throw new k.InvalidArgument("Arguments objects and keys must have the same length");
|
|
1034
|
+
var r = o.length, n = t && n ? o.map(mt(t)) : o;
|
|
1035
|
+
return i.core.mutate({
|
|
1036
|
+
trans: e,
|
|
1037
|
+
type: "add",
|
|
1038
|
+
keys: a,
|
|
1039
|
+
values: n,
|
|
1040
|
+
wantResults: u
|
|
1041
|
+
}).then(function(e) {
|
|
1042
|
+
var t = e.numFailures, n = e.failures;
|
|
1043
|
+
if (0 === t) return u ? e.results : e.lastResult;
|
|
1044
|
+
throw new he("".concat(i.name, ".bulkAdd(): ").concat(t, " of ").concat(r, " operations failed"), n);
|
|
1045
|
+
});
|
|
1046
|
+
});
|
|
1047
|
+
}, r.prototype.bulkPut = function(o, e, t) {
|
|
1048
|
+
var i = this, a = Array.isArray(e) ? e : void 0, u = (t = t || (a ? void 0 : e)) ? t.allKeys : void 0;
|
|
1049
|
+
return this._trans("readwrite", function(e) {
|
|
1050
|
+
var t = i.schema.primKey, n = t.auto, t = t.keyPath;
|
|
1051
|
+
if (t && a) throw new k.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
|
|
1052
|
+
if (a && a.length !== o.length) throw new k.InvalidArgument("Arguments objects and keys must have the same length");
|
|
1053
|
+
var r = o.length, n = t && n ? o.map(mt(t)) : o;
|
|
1054
|
+
return i.core.mutate({
|
|
1055
|
+
trans: e,
|
|
1056
|
+
type: "put",
|
|
1057
|
+
keys: a,
|
|
1058
|
+
values: n,
|
|
1059
|
+
wantResults: u
|
|
1060
|
+
}).then(function(e) {
|
|
1061
|
+
var t = e.numFailures, n = e.failures;
|
|
1062
|
+
if (0 === t) return u ? e.results : e.lastResult;
|
|
1063
|
+
throw new he("".concat(i.name, ".bulkPut(): ").concat(t, " of ").concat(r, " operations failed"), n);
|
|
1064
|
+
});
|
|
1065
|
+
});
|
|
1066
|
+
}, r.prototype.bulkUpdate = function(t) {
|
|
1067
|
+
var h = this, n = this.core, r = t.map(function(e) {
|
|
1068
|
+
return e.key;
|
|
1069
|
+
}), o = t.map(function(e) {
|
|
1070
|
+
return e.changes;
|
|
1071
|
+
}), d = [];
|
|
1072
|
+
return this._trans("readwrite", function(e) {
|
|
1073
|
+
return n.getMany({
|
|
1074
|
+
trans: e,
|
|
1075
|
+
keys: r,
|
|
1076
|
+
cache: "clone"
|
|
1077
|
+
}).then(function(c) {
|
|
1078
|
+
var l = [], f = [], s = (t.forEach(function(e, t) {
|
|
1079
|
+
var n = e.key, r = e.changes, o = c[t];
|
|
1080
|
+
if (o) {
|
|
1081
|
+
for (var i = 0, a = Object.keys(r); i < a.length; i++) {
|
|
1082
|
+
var u = a[i], s = r[u];
|
|
1083
|
+
if (u === h.schema.primKey.keyPath) {
|
|
1084
|
+
if (0 !== j(s, n)) throw new k.Constraint("Cannot update primary key in bulkUpdate()");
|
|
1085
|
+
} else b(o, u, s);
|
|
1086
|
+
}
|
|
1087
|
+
d.push(t), l.push(n), f.push(o);
|
|
1088
|
+
}
|
|
1089
|
+
}), l.length);
|
|
1090
|
+
return n.mutate({
|
|
1091
|
+
trans: e,
|
|
1092
|
+
type: "put",
|
|
1093
|
+
keys: l,
|
|
1094
|
+
values: f,
|
|
1095
|
+
updates: {
|
|
1096
|
+
keys: r,
|
|
1097
|
+
changeSpecs: o
|
|
1098
|
+
}
|
|
1099
|
+
}).then(function(e) {
|
|
1100
|
+
var t = e.numFailures, n = e.failures;
|
|
1101
|
+
if (0 === t) return s;
|
|
1102
|
+
for (var r = 0, o = Object.keys(n); r < o.length; r++) {
|
|
1103
|
+
var i, a = o[r], u = d[Number(a)];
|
|
1104
|
+
null != u && (i = n[a], delete n[a], n[u] = i);
|
|
1105
|
+
}
|
|
1106
|
+
throw new he("".concat(h.name, ".bulkUpdate(): ").concat(t, " of ").concat(s, " operations failed"), n);
|
|
1107
|
+
});
|
|
1108
|
+
});
|
|
1109
|
+
});
|
|
1110
|
+
}, r.prototype.bulkDelete = function(t) {
|
|
1111
|
+
var r = this, o = t.length;
|
|
1112
|
+
return this._trans("readwrite", function(e) {
|
|
1113
|
+
return r.core.mutate({
|
|
1114
|
+
trans: e,
|
|
1115
|
+
type: "delete",
|
|
1116
|
+
keys: t
|
|
1117
|
+
}).then(function(e) {
|
|
1118
|
+
return _t(r, t, e);
|
|
1119
|
+
});
|
|
1120
|
+
}).then(function(e) {
|
|
1121
|
+
var t = e.numFailures, n = e.failures;
|
|
1122
|
+
if (0 === t) return e.lastResult;
|
|
1123
|
+
throw new he("".concat(r.name, ".bulkDelete(): ").concat(t, " of ").concat(o, " operations failed"), n);
|
|
1124
|
+
});
|
|
1125
|
+
};
|
|
1126
|
+
var Pt = r;
|
|
1127
|
+
function r() {}
|
|
1128
|
+
function Kt(o) {
|
|
1129
|
+
function t(e, t) {
|
|
1130
|
+
if (t) {
|
|
1131
|
+
for (var n = arguments.length, r = new Array(n - 1); --n;) r[n - 1] = arguments[n];
|
|
1132
|
+
return a[e].subscribe.apply(null, r), o;
|
|
1133
|
+
}
|
|
1134
|
+
if ("string" == typeof e) return a[e];
|
|
1135
|
+
}
|
|
1136
|
+
var a = {};
|
|
1137
|
+
t.addEventType = u;
|
|
1138
|
+
for (var e = 1, n = arguments.length; e < n; ++e) u(arguments[e]);
|
|
1139
|
+
return t;
|
|
1140
|
+
function u(e, n, r) {
|
|
1141
|
+
var o, i;
|
|
1142
|
+
if ("object" != typeof e) return n = n || xe, i = {
|
|
1143
|
+
subscribers: [],
|
|
1144
|
+
fire: r = r || g,
|
|
1145
|
+
subscribe: function(e) {
|
|
1146
|
+
-1 === i.subscribers.indexOf(e) && (i.subscribers.push(e), i.fire = n(i.fire, e));
|
|
1147
|
+
},
|
|
1148
|
+
unsubscribe: function(t) {
|
|
1149
|
+
i.subscribers = i.subscribers.filter(function(e) {
|
|
1150
|
+
return e !== t;
|
|
1151
|
+
}), i.fire = i.subscribers.reduce(n, r);
|
|
1152
|
+
}
|
|
1153
|
+
}, a[e] = t[e] = i;
|
|
1154
|
+
O(o = e).forEach(function(e) {
|
|
1155
|
+
var t = o[e];
|
|
1156
|
+
if (x(t)) u(e, o[e][0], o[e][1]);
|
|
1157
|
+
else {
|
|
1158
|
+
if ("asap" !== t) throw new k.InvalidArgument("Invalid event config");
|
|
1159
|
+
var n = u(e, ve, function() {
|
|
1160
|
+
for (var e = arguments.length, t = new Array(e); e--;) t[e] = arguments[e];
|
|
1161
|
+
n.subscribers.forEach(function(e) {
|
|
1162
|
+
Q(function() {
|
|
1163
|
+
e.apply(null, t);
|
|
1164
|
+
});
|
|
1165
|
+
});
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1168
|
+
});
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
function Et(e, t) {
|
|
1172
|
+
return U(t).from({ prototype: e }), t;
|
|
1173
|
+
}
|
|
1174
|
+
function St(e, t) {
|
|
1175
|
+
return !(e.filter || e.algorithm || e.or) && (t ? e.justLimit : !e.replayFilter);
|
|
1176
|
+
}
|
|
1177
|
+
function jt(e, t) {
|
|
1178
|
+
e.filter = yt(e.filter, t);
|
|
1179
|
+
}
|
|
1180
|
+
function At(e, t, n) {
|
|
1181
|
+
var r = e.replayFilter;
|
|
1182
|
+
e.replayFilter = r ? function() {
|
|
1183
|
+
return yt(r(), t());
|
|
1184
|
+
} : t, e.justLimit = n && !r;
|
|
1185
|
+
}
|
|
1186
|
+
function Ct(e, t) {
|
|
1187
|
+
if (e.isPrimKey) return t.primaryKey;
|
|
1188
|
+
var n = t.getIndexByKeyPath(e.index);
|
|
1189
|
+
if (n) return n;
|
|
1190
|
+
throw new k.Schema("KeyPath " + e.index + " on object store " + t.name + " is not indexed");
|
|
1191
|
+
}
|
|
1192
|
+
function Tt(e, t, n) {
|
|
1193
|
+
var r = Ct(e, t.schema);
|
|
1194
|
+
return t.openCursor({
|
|
1195
|
+
trans: n,
|
|
1196
|
+
values: !e.keysOnly,
|
|
1197
|
+
reverse: "prev" === e.dir,
|
|
1198
|
+
unique: !!e.unique,
|
|
1199
|
+
query: {
|
|
1200
|
+
index: r,
|
|
1201
|
+
range: e.range
|
|
1202
|
+
}
|
|
1203
|
+
});
|
|
1204
|
+
}
|
|
1205
|
+
function It(e, i, t, n) {
|
|
1206
|
+
var a, r, u = e.replayFilter ? yt(e.filter, e.replayFilter()) : e.filter;
|
|
1207
|
+
return e.or ? (a = {}, r = function(e, t, n) {
|
|
1208
|
+
var r, o;
|
|
1209
|
+
u && !u(t, n, function(e) {
|
|
1210
|
+
return t.stop(e);
|
|
1211
|
+
}, function(e) {
|
|
1212
|
+
return t.fail(e);
|
|
1213
|
+
}) || ("[object ArrayBuffer]" === (o = "" + (r = t.primaryKey)) && (o = "" + new Uint8Array(r)), m(a, o)) || (a[o] = !0, i(e, t, n));
|
|
1214
|
+
}, Promise.all([e.or._iterate(r, t), qt(Tt(e, n, t), e.algorithm, r, !e.keysOnly && e.valueMapper)])) : qt(Tt(e, n, t), yt(e.algorithm, u), i, !e.keysOnly && e.valueMapper);
|
|
1215
|
+
}
|
|
1216
|
+
function qt(e, r, o, i) {
|
|
1217
|
+
var a = E(i ? function(e, t, n) {
|
|
1218
|
+
return o(i(e), t, n);
|
|
1219
|
+
} : o);
|
|
1220
|
+
return e.then(function(n) {
|
|
1221
|
+
if (n) return n.start(function() {
|
|
1222
|
+
var t = function() {
|
|
1223
|
+
return n.continue();
|
|
1224
|
+
};
|
|
1225
|
+
r && !r(n, function(e) {
|
|
1226
|
+
return t = e;
|
|
1227
|
+
}, function(e) {
|
|
1228
|
+
n.stop(e), t = g;
|
|
1229
|
+
}, function(e) {
|
|
1230
|
+
n.fail(e), t = g;
|
|
1231
|
+
}) || a(n.value, n, function(e) {
|
|
1232
|
+
return t = e;
|
|
1233
|
+
}), t();
|
|
1234
|
+
});
|
|
1235
|
+
});
|
|
1236
|
+
}
|
|
1237
|
+
o.prototype._read = function(e, t) {
|
|
1238
|
+
var n = this._ctx;
|
|
1239
|
+
return n.error ? n.table._trans(null, w.bind(null, n.error)) : n.table._trans("readonly", e).then(t);
|
|
1240
|
+
}, o.prototype._write = function(e) {
|
|
1241
|
+
var t = this._ctx;
|
|
1242
|
+
return t.error ? t.table._trans(null, w.bind(null, t.error)) : t.table._trans("readwrite", e, "locked");
|
|
1243
|
+
}, o.prototype._addAlgorithm = function(e) {
|
|
1244
|
+
var t = this._ctx;
|
|
1245
|
+
t.algorithm = yt(t.algorithm, e);
|
|
1246
|
+
}, o.prototype._iterate = function(e, t) {
|
|
1247
|
+
return It(this._ctx, e, t, this._ctx.table.core);
|
|
1248
|
+
}, o.prototype.clone = function(e) {
|
|
1249
|
+
var t = Object.create(this.constructor.prototype), n = Object.create(this._ctx);
|
|
1250
|
+
return e && a(n, e), t._ctx = n, t;
|
|
1251
|
+
}, o.prototype.raw = function() {
|
|
1252
|
+
return this._ctx.valueMapper = null, this;
|
|
1253
|
+
}, o.prototype.each = function(t) {
|
|
1254
|
+
var n = this._ctx;
|
|
1255
|
+
return this._read(function(e) {
|
|
1256
|
+
return It(n, t, e, n.table.core);
|
|
1257
|
+
});
|
|
1258
|
+
}, o.prototype.count = function(e) {
|
|
1259
|
+
var o = this;
|
|
1260
|
+
return this._read(function(e) {
|
|
1261
|
+
var t, n = o._ctx, r = n.table.core;
|
|
1262
|
+
return St(n, !0) ? r.count({
|
|
1263
|
+
trans: e,
|
|
1264
|
+
query: {
|
|
1265
|
+
index: Ct(n, r.schema),
|
|
1266
|
+
range: n.range
|
|
1267
|
+
}
|
|
1268
|
+
}).then(function(e) {
|
|
1269
|
+
return Math.min(e, n.limit);
|
|
1270
|
+
}) : (t = 0, It(n, function() {
|
|
1271
|
+
return ++t, !1;
|
|
1272
|
+
}, e, r).then(function() {
|
|
1273
|
+
return t;
|
|
1274
|
+
}));
|
|
1275
|
+
}).then(e);
|
|
1276
|
+
}, o.prototype.sortBy = function(e, t) {
|
|
1277
|
+
var n = e.split(".").reverse(), r = n[0], o = n.length - 1;
|
|
1278
|
+
function i(e, t) {
|
|
1279
|
+
return t ? i(e[n[t]], t - 1) : e[r];
|
|
1280
|
+
}
|
|
1281
|
+
var a = "next" === this._ctx.dir ? 1 : -1;
|
|
1282
|
+
function u(e, t) {
|
|
1283
|
+
return j(i(e, o), i(t, o)) * a;
|
|
1284
|
+
}
|
|
1285
|
+
return this.toArray(function(e) {
|
|
1286
|
+
return e.sort(u);
|
|
1287
|
+
}).then(t);
|
|
1288
|
+
}, o.prototype.toArray = function(e) {
|
|
1289
|
+
var i = this;
|
|
1290
|
+
return this._read(function(e) {
|
|
1291
|
+
var t, n, r, o = i._ctx;
|
|
1292
|
+
return "next" === o.dir && St(o, !0) && 0 < o.limit ? (t = o.valueMapper, n = Ct(o, o.table.core.schema), o.table.core.query({
|
|
1293
|
+
trans: e,
|
|
1294
|
+
limit: o.limit,
|
|
1295
|
+
values: !0,
|
|
1296
|
+
query: {
|
|
1297
|
+
index: n,
|
|
1298
|
+
range: o.range
|
|
1299
|
+
}
|
|
1300
|
+
}).then(function(e) {
|
|
1301
|
+
e = e.result;
|
|
1302
|
+
return t ? e.map(t) : e;
|
|
1303
|
+
})) : (r = [], It(o, function(e) {
|
|
1304
|
+
return r.push(e);
|
|
1305
|
+
}, e, o.table.core).then(function() {
|
|
1306
|
+
return r;
|
|
1307
|
+
}));
|
|
1308
|
+
}, e);
|
|
1309
|
+
}, o.prototype.offset = function(t) {
|
|
1310
|
+
var e = this._ctx;
|
|
1311
|
+
return t <= 0 || (e.offset += t, St(e) ? At(e, function() {
|
|
1312
|
+
var n = t;
|
|
1313
|
+
return function(e, t) {
|
|
1314
|
+
return 0 === n || (1 === n ? --n : t(function() {
|
|
1315
|
+
e.advance(n), n = 0;
|
|
1316
|
+
}), !1);
|
|
1317
|
+
};
|
|
1318
|
+
}) : At(e, function() {
|
|
1319
|
+
var e = t;
|
|
1320
|
+
return function() {
|
|
1321
|
+
return --e < 0;
|
|
1322
|
+
};
|
|
1323
|
+
})), this;
|
|
1324
|
+
}, o.prototype.limit = function(e) {
|
|
1325
|
+
return this._ctx.limit = Math.min(this._ctx.limit, e), At(this._ctx, function() {
|
|
1326
|
+
var r = e;
|
|
1327
|
+
return function(e, t, n) {
|
|
1328
|
+
return --r <= 0 && t(n), 0 <= r;
|
|
1329
|
+
};
|
|
1330
|
+
}, !0), this;
|
|
1331
|
+
}, o.prototype.until = function(r, o) {
|
|
1332
|
+
return jt(this._ctx, function(e, t, n) {
|
|
1333
|
+
return !r(e.value) || (t(n), o);
|
|
1334
|
+
}), this;
|
|
1335
|
+
}, o.prototype.first = function(e) {
|
|
1336
|
+
return this.limit(1).toArray(function(e) {
|
|
1337
|
+
return e[0];
|
|
1338
|
+
}).then(e);
|
|
1339
|
+
}, o.prototype.last = function(e) {
|
|
1340
|
+
return this.reverse().first(e);
|
|
1341
|
+
}, o.prototype.filter = function(t) {
|
|
1342
|
+
var e;
|
|
1343
|
+
return jt(this._ctx, function(e) {
|
|
1344
|
+
return t(e.value);
|
|
1345
|
+
}), (e = this._ctx).isMatch = yt(e.isMatch, t), this;
|
|
1346
|
+
}, o.prototype.and = function(e) {
|
|
1347
|
+
return this.filter(e);
|
|
1348
|
+
}, o.prototype.or = function(e) {
|
|
1349
|
+
return new this.db.WhereClause(this._ctx.table, e, this);
|
|
1350
|
+
}, o.prototype.reverse = function() {
|
|
1351
|
+
return this._ctx.dir = "prev" === this._ctx.dir ? "next" : "prev", this._ondirectionchange && this._ondirectionchange(this._ctx.dir), this;
|
|
1352
|
+
}, o.prototype.desc = function() {
|
|
1353
|
+
return this.reverse();
|
|
1354
|
+
}, o.prototype.eachKey = function(n) {
|
|
1355
|
+
var e = this._ctx;
|
|
1356
|
+
return e.keysOnly = !e.isMatch, this.each(function(e, t) {
|
|
1357
|
+
n(t.key, t);
|
|
1358
|
+
});
|
|
1359
|
+
}, o.prototype.eachUniqueKey = function(e) {
|
|
1360
|
+
return this._ctx.unique = "unique", this.eachKey(e);
|
|
1361
|
+
}, o.prototype.eachPrimaryKey = function(n) {
|
|
1362
|
+
var e = this._ctx;
|
|
1363
|
+
return e.keysOnly = !e.isMatch, this.each(function(e, t) {
|
|
1364
|
+
n(t.primaryKey, t);
|
|
1365
|
+
});
|
|
1366
|
+
}, o.prototype.keys = function(e) {
|
|
1367
|
+
var t = this._ctx, n = (t.keysOnly = !t.isMatch, []);
|
|
1368
|
+
return this.each(function(e, t) {
|
|
1369
|
+
n.push(t.key);
|
|
1370
|
+
}).then(function() {
|
|
1371
|
+
return n;
|
|
1372
|
+
}).then(e);
|
|
1373
|
+
}, o.prototype.primaryKeys = function(e) {
|
|
1374
|
+
var n = this._ctx;
|
|
1375
|
+
if ("next" === n.dir && St(n, !0) && 0 < n.limit) return this._read(function(e) {
|
|
1376
|
+
var t = Ct(n, n.table.core.schema);
|
|
1377
|
+
return n.table.core.query({
|
|
1378
|
+
trans: e,
|
|
1379
|
+
values: !1,
|
|
1380
|
+
limit: n.limit,
|
|
1381
|
+
query: {
|
|
1382
|
+
index: t,
|
|
1383
|
+
range: n.range
|
|
1384
|
+
}
|
|
1385
|
+
});
|
|
1386
|
+
}).then(function(e) {
|
|
1387
|
+
return e.result;
|
|
1388
|
+
}).then(e);
|
|
1389
|
+
n.keysOnly = !n.isMatch;
|
|
1390
|
+
var r = [];
|
|
1391
|
+
return this.each(function(e, t) {
|
|
1392
|
+
r.push(t.primaryKey);
|
|
1393
|
+
}).then(function() {
|
|
1394
|
+
return r;
|
|
1395
|
+
}).then(e);
|
|
1396
|
+
}, o.prototype.uniqueKeys = function(e) {
|
|
1397
|
+
return this._ctx.unique = "unique", this.keys(e);
|
|
1398
|
+
}, o.prototype.firstKey = function(e) {
|
|
1399
|
+
return this.limit(1).keys(function(e) {
|
|
1400
|
+
return e[0];
|
|
1401
|
+
}).then(e);
|
|
1402
|
+
}, o.prototype.lastKey = function(e) {
|
|
1403
|
+
return this.reverse().firstKey(e);
|
|
1404
|
+
}, o.prototype.distinct = function() {
|
|
1405
|
+
var n, e = this._ctx, e = e.index && e.table.schema.idxByName[e.index];
|
|
1406
|
+
return e && e.multi && (n = {}, jt(this._ctx, function(e) {
|
|
1407
|
+
var e = e.primaryKey.toString(), t = m(n, e);
|
|
1408
|
+
return n[e] = !0, !t;
|
|
1409
|
+
})), this;
|
|
1410
|
+
}, o.prototype.modify = function(x) {
|
|
1411
|
+
var n = this, k = this._ctx;
|
|
1412
|
+
return this._write(function(p) {
|
|
1413
|
+
function y(e, t) {
|
|
1414
|
+
var n = t.failures;
|
|
1415
|
+
u += e - t.numFailures;
|
|
1416
|
+
for (var r = 0, o = O(n); r < o.length; r++) {
|
|
1417
|
+
var i = o[r];
|
|
1418
|
+
a.push(n[i]);
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
var v = "function" == typeof x ? x : function(e) {
|
|
1422
|
+
return Ot(e, x);
|
|
1423
|
+
}, m = k.table.core, e = m.schema.primaryKey, b = e.outbound, g = e.extractKey, w = 200, e = n.db._options.modifyChunkSize, a = (e && (w = "object" == typeof e ? e[m.name] || e["*"] || 200 : e), []), u = 0, t = [], _ = x === Bt;
|
|
1424
|
+
return n.clone().primaryKeys().then(function(f) {
|
|
1425
|
+
function h(s) {
|
|
1426
|
+
var c = Math.min(w, f.length - s), l = f.slice(s, s + c);
|
|
1427
|
+
return (_ ? Promise.resolve([]) : m.getMany({
|
|
1428
|
+
trans: p,
|
|
1429
|
+
keys: l,
|
|
1430
|
+
cache: "immutable"
|
|
1431
|
+
})).then(function(e) {
|
|
1432
|
+
var n = [], t = [], r = b ? [] : null, o = _ ? l : [];
|
|
1433
|
+
if (!_) for (var i = 0; i < c; ++i) {
|
|
1434
|
+
var a = e[i], u = {
|
|
1435
|
+
value: ee(a),
|
|
1436
|
+
primKey: f[s + i]
|
|
1437
|
+
};
|
|
1438
|
+
!1 !== v.call(u, u.value, u) && (null == u.value ? o.push(f[s + i]) : b || 0 === j(g(a), g(u.value)) ? (t.push(u.value), b && r.push(f[s + i])) : (o.push(f[s + i]), n.push(u.value)));
|
|
1439
|
+
}
|
|
1440
|
+
return Promise.resolve(0 < n.length && m.mutate({
|
|
1441
|
+
trans: p,
|
|
1442
|
+
type: "add",
|
|
1443
|
+
values: n
|
|
1444
|
+
}).then(function(e) {
|
|
1445
|
+
for (var t in e.failures) o.splice(parseInt(t), 1);
|
|
1446
|
+
y(n.length, e);
|
|
1447
|
+
})).then(function() {
|
|
1448
|
+
return (0 < t.length || d && "object" == typeof x) && m.mutate({
|
|
1449
|
+
trans: p,
|
|
1450
|
+
type: "put",
|
|
1451
|
+
keys: r,
|
|
1452
|
+
values: t,
|
|
1453
|
+
criteria: d,
|
|
1454
|
+
changeSpec: "function" != typeof x && x,
|
|
1455
|
+
isAdditionalChunk: 0 < s
|
|
1456
|
+
}).then(function(e) {
|
|
1457
|
+
return y(t.length, e);
|
|
1458
|
+
});
|
|
1459
|
+
}).then(function() {
|
|
1460
|
+
return (0 < o.length || d && _) && m.mutate({
|
|
1461
|
+
trans: p,
|
|
1462
|
+
type: "delete",
|
|
1463
|
+
keys: o,
|
|
1464
|
+
criteria: d,
|
|
1465
|
+
isAdditionalChunk: 0 < s
|
|
1466
|
+
}).then(function(e) {
|
|
1467
|
+
return _t(k.table, o, e);
|
|
1468
|
+
}).then(function(e) {
|
|
1469
|
+
return y(o.length, e);
|
|
1470
|
+
});
|
|
1471
|
+
}).then(function() {
|
|
1472
|
+
return f.length > s + c && h(s + w);
|
|
1473
|
+
});
|
|
1474
|
+
});
|
|
1475
|
+
}
|
|
1476
|
+
var d = St(k) && k.limit === Infinity && ("function" != typeof x || _) && {
|
|
1477
|
+
index: k.index,
|
|
1478
|
+
range: k.range
|
|
1479
|
+
};
|
|
1480
|
+
return h(0).then(function() {
|
|
1481
|
+
if (0 < a.length) throw new fe("Error modifying one or more objects", a, u, t);
|
|
1482
|
+
return f.length;
|
|
1483
|
+
});
|
|
1484
|
+
});
|
|
1485
|
+
});
|
|
1486
|
+
}, o.prototype.delete = function() {
|
|
1487
|
+
var o = this._ctx, n = o.range;
|
|
1488
|
+
return !St(o) || o.table.schema.yProps || !o.isPrimKey && 3 !== n.type ? this.modify(Bt) : this._write(function(e) {
|
|
1489
|
+
var t = o.table.core.schema.primaryKey, r = n;
|
|
1490
|
+
return o.table.core.count({
|
|
1491
|
+
trans: e,
|
|
1492
|
+
query: {
|
|
1493
|
+
index: t,
|
|
1494
|
+
range: r
|
|
1495
|
+
}
|
|
1496
|
+
}).then(function(n) {
|
|
1497
|
+
return o.table.core.mutate({
|
|
1498
|
+
trans: e,
|
|
1499
|
+
type: "deleteRange",
|
|
1500
|
+
range: r
|
|
1501
|
+
}).then(function(e) {
|
|
1502
|
+
var t = e.failures, e = e.numFailures;
|
|
1503
|
+
if (e) throw new fe("Could not delete some values", Object.keys(t).map(function(e) {
|
|
1504
|
+
return t[e];
|
|
1505
|
+
}), n - e);
|
|
1506
|
+
return n - e;
|
|
1507
|
+
});
|
|
1508
|
+
});
|
|
1509
|
+
});
|
|
1510
|
+
};
|
|
1511
|
+
var Dt = o;
|
|
1512
|
+
function o() {}
|
|
1513
|
+
var Bt = function(e, t) {
|
|
1514
|
+
return t.value = null;
|
|
1515
|
+
};
|
|
1516
|
+
function Rt(e, t) {
|
|
1517
|
+
return e < t ? -1 : e === t ? 0 : 1;
|
|
1518
|
+
}
|
|
1519
|
+
function Ft(e, t) {
|
|
1520
|
+
return t < e ? -1 : e === t ? 0 : 1;
|
|
1521
|
+
}
|
|
1522
|
+
function A(e, t, n) {
|
|
1523
|
+
e = e instanceof Ut ? new e.Collection(e) : e;
|
|
1524
|
+
return e._ctx.error = new (n || TypeError)(t), e;
|
|
1525
|
+
}
|
|
1526
|
+
function Mt(e) {
|
|
1527
|
+
return new e.Collection(e, function() {
|
|
1528
|
+
return Lt("");
|
|
1529
|
+
}).limit(0);
|
|
1530
|
+
}
|
|
1531
|
+
function Nt(e, s, n, r) {
|
|
1532
|
+
var o, c, l, f, h, d, p, y = n.length;
|
|
1533
|
+
if (!n.every(function(e) {
|
|
1534
|
+
return "string" == typeof e;
|
|
1535
|
+
})) return A(e, lt);
|
|
1536
|
+
function t(e) {
|
|
1537
|
+
o = "next" === e ? function(e) {
|
|
1538
|
+
return e.toUpperCase();
|
|
1539
|
+
} : function(e) {
|
|
1540
|
+
return e.toLowerCase();
|
|
1541
|
+
}, c = "next" === e ? function(e) {
|
|
1542
|
+
return e.toLowerCase();
|
|
1543
|
+
} : function(e) {
|
|
1544
|
+
return e.toUpperCase();
|
|
1545
|
+
}, l = "next" === e ? Rt : Ft;
|
|
1546
|
+
var t = n.map(function(e) {
|
|
1547
|
+
return {
|
|
1548
|
+
lower: c(e),
|
|
1549
|
+
upper: o(e)
|
|
1550
|
+
};
|
|
1551
|
+
}).sort(function(e, t) {
|
|
1552
|
+
return l(e.lower, t.lower);
|
|
1553
|
+
});
|
|
1554
|
+
f = t.map(function(e) {
|
|
1555
|
+
return e.upper;
|
|
1556
|
+
}), h = t.map(function(e) {
|
|
1557
|
+
return e.lower;
|
|
1558
|
+
}), p = "next" === (d = e) ? "" : r;
|
|
1559
|
+
}
|
|
1560
|
+
t("next");
|
|
1561
|
+
var e = new e.Collection(e, function() {
|
|
1562
|
+
return C(f[0], h[y - 1] + r);
|
|
1563
|
+
}), v = (e._ondirectionchange = function(e) {
|
|
1564
|
+
t(e);
|
|
1565
|
+
}, 0);
|
|
1566
|
+
return e._addAlgorithm(function(e, t, n) {
|
|
1567
|
+
var r = e.key;
|
|
1568
|
+
if ("string" == typeof r) {
|
|
1569
|
+
var o = c(r);
|
|
1570
|
+
if (s(o, h, v)) return !0;
|
|
1571
|
+
for (var i = null, a = v; a < y; ++a) {
|
|
1572
|
+
var u = ((e, t, n, r, o, i) => {
|
|
1573
|
+
for (var a = Math.min(e.length, r.length), u = -1, s = 0; s < a; ++s) {
|
|
1574
|
+
var c = t[s];
|
|
1575
|
+
if (c !== r[s]) return o(e[s], n[s]) < 0 ? e.substr(0, s) + n[s] + n.substr(s + 1) : o(e[s], r[s]) < 0 ? e.substr(0, s) + r[s] + n.substr(s + 1) : 0 <= u ? e.substr(0, u) + t[u] + n.substr(u + 1) : null;
|
|
1576
|
+
o(e[s], c) < 0 && (u = s);
|
|
1577
|
+
}
|
|
1578
|
+
return a < r.length && "next" === i ? e + n.substr(e.length) : a < e.length && "prev" === i ? e.substr(0, n.length) : u < 0 ? null : e.substr(0, u) + r[u] + n.substr(u + 1);
|
|
1579
|
+
})(r, o, f[a], h[a], l, d);
|
|
1580
|
+
null === u && null === i ? v = a + 1 : (null === i || 0 < l(i, u)) && (i = u);
|
|
1581
|
+
}
|
|
1582
|
+
t(null !== i ? function() {
|
|
1583
|
+
e.continue(i + p);
|
|
1584
|
+
} : n);
|
|
1585
|
+
}
|
|
1586
|
+
return !1;
|
|
1587
|
+
}), e;
|
|
1588
|
+
}
|
|
1589
|
+
function C(e, t, n, r) {
|
|
1590
|
+
return {
|
|
1591
|
+
type: 2,
|
|
1592
|
+
lower: e,
|
|
1593
|
+
upper: t,
|
|
1594
|
+
lowerOpen: n,
|
|
1595
|
+
upperOpen: r
|
|
1596
|
+
};
|
|
1597
|
+
}
|
|
1598
|
+
function Lt(e) {
|
|
1599
|
+
return {
|
|
1600
|
+
type: 1,
|
|
1601
|
+
lower: e,
|
|
1602
|
+
upper: e
|
|
1603
|
+
};
|
|
1604
|
+
}
|
|
1605
|
+
Object.defineProperty(d.prototype, "Collection", {
|
|
1606
|
+
get: function() {
|
|
1607
|
+
return this._ctx.table.db.Collection;
|
|
1608
|
+
},
|
|
1609
|
+
enumerable: !1,
|
|
1610
|
+
configurable: !0
|
|
1611
|
+
}), d.prototype.between = function(e, t, n, r) {
|
|
1612
|
+
n = !1 !== n, r = !0 === r;
|
|
1613
|
+
try {
|
|
1614
|
+
return 0 < this._cmp(e, t) || 0 === this._cmp(e, t) && (n || r) && (!n || !r) ? Mt(this) : new this.Collection(this, function() {
|
|
1615
|
+
return C(e, t, !n, !r);
|
|
1616
|
+
});
|
|
1617
|
+
} catch (e) {
|
|
1618
|
+
return A(this, S);
|
|
1619
|
+
}
|
|
1620
|
+
}, d.prototype.equals = function(e) {
|
|
1621
|
+
return null == e ? A(this, S) : new this.Collection(this, function() {
|
|
1622
|
+
return Lt(e);
|
|
1623
|
+
});
|
|
1624
|
+
}, d.prototype.above = function(e) {
|
|
1625
|
+
return null == e ? A(this, S) : new this.Collection(this, function() {
|
|
1626
|
+
return C(e, void 0, !0);
|
|
1627
|
+
});
|
|
1628
|
+
}, d.prototype.aboveOrEqual = function(e) {
|
|
1629
|
+
return null == e ? A(this, S) : new this.Collection(this, function() {
|
|
1630
|
+
return C(e, void 0, !1);
|
|
1631
|
+
});
|
|
1632
|
+
}, d.prototype.below = function(e) {
|
|
1633
|
+
return null == e ? A(this, S) : new this.Collection(this, function() {
|
|
1634
|
+
return C(void 0, e, !1, !0);
|
|
1635
|
+
});
|
|
1636
|
+
}, d.prototype.belowOrEqual = function(e) {
|
|
1637
|
+
return null == e ? A(this, S) : new this.Collection(this, function() {
|
|
1638
|
+
return C(void 0, e);
|
|
1639
|
+
});
|
|
1640
|
+
}, d.prototype.startsWith = function(e) {
|
|
1641
|
+
return "string" != typeof e ? A(this, lt) : this.between(e, e + ct, !0, !0);
|
|
1642
|
+
}, d.prototype.startsWithIgnoreCase = function(e) {
|
|
1643
|
+
return "" === e ? this.startsWith(e) : Nt(this, function(e, t) {
|
|
1644
|
+
return 0 === e.indexOf(t[0]);
|
|
1645
|
+
}, [e], ct);
|
|
1646
|
+
}, d.prototype.equalsIgnoreCase = function(e) {
|
|
1647
|
+
return Nt(this, function(e, t) {
|
|
1648
|
+
return e === t[0];
|
|
1649
|
+
}, [e], "");
|
|
1650
|
+
}, d.prototype.anyOfIgnoreCase = function() {
|
|
1651
|
+
var e = n.apply(ae, arguments);
|
|
1652
|
+
return 0 === e.length ? Mt(this) : Nt(this, function(e, t) {
|
|
1653
|
+
return -1 !== t.indexOf(e);
|
|
1654
|
+
}, e, "");
|
|
1655
|
+
}, d.prototype.startsWithAnyOfIgnoreCase = function() {
|
|
1656
|
+
var e = n.apply(ae, arguments);
|
|
1657
|
+
return 0 === e.length ? Mt(this) : Nt(this, function(t, e) {
|
|
1658
|
+
return e.some(function(e) {
|
|
1659
|
+
return 0 === t.indexOf(e);
|
|
1660
|
+
});
|
|
1661
|
+
}, e, ct);
|
|
1662
|
+
}, d.prototype.anyOf = function() {
|
|
1663
|
+
var e, o, t = this, i = n.apply(ae, arguments), a = this._cmp;
|
|
1664
|
+
try {
|
|
1665
|
+
i.sort(a);
|
|
1666
|
+
} catch (e) {
|
|
1667
|
+
return A(this, S);
|
|
1668
|
+
}
|
|
1669
|
+
return 0 === i.length ? Mt(this) : ((e = new this.Collection(this, function() {
|
|
1670
|
+
return C(i[0], i[i.length - 1]);
|
|
1671
|
+
}))._ondirectionchange = function(e) {
|
|
1672
|
+
a = "next" === e ? t._ascending : t._descending, i.sort(a);
|
|
1673
|
+
}, o = 0, e._addAlgorithm(function(e, t, n) {
|
|
1674
|
+
for (var r = e.key; 0 < a(r, i[o]);) if (++o === i.length) return t(n), !1;
|
|
1675
|
+
return 0 === a(r, i[o]) || (t(function() {
|
|
1676
|
+
e.continue(i[o]);
|
|
1677
|
+
}), !1);
|
|
1678
|
+
}), e);
|
|
1679
|
+
}, d.prototype.notEqual = function(e) {
|
|
1680
|
+
return this.inAnyRange([[-Infinity, e], [e, this.db._maxKey]], {
|
|
1681
|
+
includeLowers: !1,
|
|
1682
|
+
includeUppers: !1
|
|
1683
|
+
});
|
|
1684
|
+
}, d.prototype.noneOf = function() {
|
|
1685
|
+
var e = n.apply(ae, arguments);
|
|
1686
|
+
if (0 === e.length) return new this.Collection(this);
|
|
1687
|
+
try {
|
|
1688
|
+
e.sort(this._ascending);
|
|
1689
|
+
} catch (e) {
|
|
1690
|
+
return A(this, S);
|
|
1691
|
+
}
|
|
1692
|
+
var t = e.reduce(function(e, t) {
|
|
1693
|
+
return e ? e.concat([[e[e.length - 1][1], t]]) : [[-Infinity, t]];
|
|
1694
|
+
}, null);
|
|
1695
|
+
return t.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(t, {
|
|
1696
|
+
includeLowers: !1,
|
|
1697
|
+
includeUppers: !1
|
|
1698
|
+
});
|
|
1699
|
+
}, d.prototype.inAnyRange = function(e, t) {
|
|
1700
|
+
var i = this, a = this._cmp, u = this._ascending, n = this._descending, s = this._min, c = this._max;
|
|
1701
|
+
if (0 === e.length) return Mt(this);
|
|
1702
|
+
if (!e.every(function(e) {
|
|
1703
|
+
return void 0 !== e[0] && void 0 !== e[1] && u(e[0], e[1]) <= 0;
|
|
1704
|
+
})) return A(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", k.InvalidArgument);
|
|
1705
|
+
var r = !t || !1 !== t.includeLowers, o = t && !0 === t.includeUppers;
|
|
1706
|
+
var l, f = u;
|
|
1707
|
+
function h(e, t) {
|
|
1708
|
+
return f(e[0], t[0]);
|
|
1709
|
+
}
|
|
1710
|
+
try {
|
|
1711
|
+
(l = e.reduce(function(e, t) {
|
|
1712
|
+
for (var n = 0, r = e.length; n < r; ++n) {
|
|
1713
|
+
var o = e[n];
|
|
1714
|
+
if (a(t[0], o[1]) < 0 && 0 < a(t[1], o[0])) {
|
|
1715
|
+
o[0] = s(o[0], t[0]), o[1] = c(o[1], t[1]);
|
|
1716
|
+
break;
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
return n === r && e.push(t), e;
|
|
1720
|
+
}, [])).sort(h);
|
|
1721
|
+
} catch (e) {
|
|
1722
|
+
return A(this, S);
|
|
1723
|
+
}
|
|
1724
|
+
var d = 0, p = o ? function(e) {
|
|
1725
|
+
return 0 < u(e, l[d][1]);
|
|
1726
|
+
} : function(e) {
|
|
1727
|
+
return 0 <= u(e, l[d][1]);
|
|
1728
|
+
}, y = r ? function(e) {
|
|
1729
|
+
return 0 < n(e, l[d][0]);
|
|
1730
|
+
} : function(e) {
|
|
1731
|
+
return 0 <= n(e, l[d][0]);
|
|
1732
|
+
};
|
|
1733
|
+
var v = p, t = new this.Collection(this, function() {
|
|
1734
|
+
return C(l[0][0], l[l.length - 1][1], !r, !o);
|
|
1735
|
+
});
|
|
1736
|
+
return t._ondirectionchange = function(e) {
|
|
1737
|
+
f = "next" === e ? (v = p, u) : (v = y, n), l.sort(h);
|
|
1738
|
+
}, t._addAlgorithm(function(e, t, n) {
|
|
1739
|
+
for (var r, o = e.key; v(o);) if (++d === l.length) return t(n), !1;
|
|
1740
|
+
return !p(r = o) && !y(r) || (0 === i._cmp(o, l[d][1]) || 0 === i._cmp(o, l[d][0]) || t(function() {
|
|
1741
|
+
f === u ? e.continue(l[d][0]) : e.continue(l[d][1]);
|
|
1742
|
+
}), !1);
|
|
1743
|
+
}), t;
|
|
1744
|
+
}, d.prototype.startsWithAnyOf = function() {
|
|
1745
|
+
var e = n.apply(ae, arguments);
|
|
1746
|
+
return e.every(function(e) {
|
|
1747
|
+
return "string" == typeof e;
|
|
1748
|
+
}) ? 0 === e.length ? Mt(this) : this.inAnyRange(e.map(function(e) {
|
|
1749
|
+
return [e, e + ct];
|
|
1750
|
+
})) : A(this, "startsWithAnyOf() only works with strings");
|
|
1751
|
+
};
|
|
1752
|
+
var Ut = d;
|
|
1753
|
+
function d() {}
|
|
1754
|
+
function T(t) {
|
|
1755
|
+
return E(function(e) {
|
|
1756
|
+
return Vt(e), t(e.target.error), !1;
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
function Vt(e) {
|
|
1760
|
+
e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
|
|
1761
|
+
}
|
|
1762
|
+
var zt = "storagemutated", Wt = "x-storagemutated-1", Yt = Kt(null, zt), $t = (p.prototype._lock = function() {
|
|
1763
|
+
return $(!P.global), ++this._reculock, 1 !== this._reculock || P.global || (P.lockOwnerFor = this), this;
|
|
1764
|
+
}, p.prototype._unlock = function() {
|
|
1765
|
+
if ($(!P.global), 0 == --this._reculock) for (P.global || (P.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked();) {
|
|
1766
|
+
var e = this._blockedFuncs.shift();
|
|
1767
|
+
try {
|
|
1768
|
+
at(e[1], e[0]);
|
|
1769
|
+
} catch (e) {}
|
|
1770
|
+
}
|
|
1771
|
+
return this;
|
|
1772
|
+
}, p.prototype._locked = function() {
|
|
1773
|
+
return this._reculock && P.lockOwnerFor !== this;
|
|
1774
|
+
}, p.prototype.create = function(t) {
|
|
1775
|
+
var n = this;
|
|
1776
|
+
if (this.mode) {
|
|
1777
|
+
var e = this.db.idbdb, r = this.db._state.dbOpenError;
|
|
1778
|
+
if ($(!this.idbtrans), !t && !e) switch (r && r.name) {
|
|
1779
|
+
case "DatabaseClosedError": throw new k.DatabaseClosed(r);
|
|
1780
|
+
case "MissingAPIError": throw new k.MissingAPI(r.message, r);
|
|
1781
|
+
default: throw new k.OpenFailed(r);
|
|
1782
|
+
}
|
|
1783
|
+
if (!this.active) throw new k.TransactionInactive();
|
|
1784
|
+
$(null === this._completion._state), (t = this.idbtrans = t || (this.db.core || e).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = E(function(e) {
|
|
1785
|
+
Vt(e), n._reject(t.error);
|
|
1786
|
+
}), t.onabort = E(function(e) {
|
|
1787
|
+
Vt(e), n.active && n._reject(new k.Abort(t.error)), n.active = !1, n.on("abort").fire(e);
|
|
1788
|
+
}), t.oncomplete = E(function() {
|
|
1789
|
+
n.active = !1, n._resolve(), "mutatedParts" in t && Yt.storagemutated.fire(t.mutatedParts);
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
return this;
|
|
1793
|
+
}, p.prototype._promise = function(n, r, o) {
|
|
1794
|
+
var e, i = this;
|
|
1795
|
+
return "readwrite" === n && "readwrite" !== this.mode ? w(new k.ReadOnly("Transaction is readonly")) : this.active ? this._locked() ? new K(function(e, t) {
|
|
1796
|
+
i._blockedFuncs.push([function() {
|
|
1797
|
+
i._promise(n, r, o).then(e, t);
|
|
1798
|
+
}, P]);
|
|
1799
|
+
}) : o ? y(function() {
|
|
1800
|
+
var e = new K(function(e, t) {
|
|
1801
|
+
i._lock();
|
|
1802
|
+
var n = r(e, t, i);
|
|
1803
|
+
n && n.then && n.then(e, t);
|
|
1804
|
+
});
|
|
1805
|
+
return e.finally(function() {
|
|
1806
|
+
return i._unlock();
|
|
1807
|
+
}), e._lib = !0, e;
|
|
1808
|
+
}) : ((e = new K(function(e, t) {
|
|
1809
|
+
var n = r(e, t, i);
|
|
1810
|
+
n && n.then && n.then(e, t);
|
|
1811
|
+
}))._lib = !0, e) : w(new k.TransactionInactive());
|
|
1812
|
+
}, p.prototype._root = function() {
|
|
1813
|
+
return this.parent ? this.parent._root() : this;
|
|
1814
|
+
}, p.prototype.waitFor = function(e) {
|
|
1815
|
+
var t, r = this._root(), o = K.resolve(e), i = (r._waitingFor ? r._waitingFor = r._waitingFor.then(function() {
|
|
1816
|
+
return o;
|
|
1817
|
+
}) : (r._waitingFor = o, r._waitingQueue = [], t = r.idbtrans.objectStore(r.storeNames[0]), function e() {
|
|
1818
|
+
for (++r._spinCount; r._waitingQueue.length;) r._waitingQueue.shift()();
|
|
1819
|
+
r._waitingFor && (t.get(-Infinity).onsuccess = e);
|
|
1820
|
+
}()), r._waitingFor);
|
|
1821
|
+
return new K(function(t, n) {
|
|
1822
|
+
o.then(function(e) {
|
|
1823
|
+
return r._waitingQueue.push(E(t.bind(null, e)));
|
|
1824
|
+
}, function(e) {
|
|
1825
|
+
return r._waitingQueue.push(E(n.bind(null, e)));
|
|
1826
|
+
}).finally(function() {
|
|
1827
|
+
r._waitingFor === i && (r._waitingFor = null);
|
|
1828
|
+
});
|
|
1829
|
+
});
|
|
1830
|
+
}, p.prototype.abort = function() {
|
|
1831
|
+
this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new k.Abort()));
|
|
1832
|
+
}, p.prototype.table = function(e) {
|
|
1833
|
+
var t = this._memoizedTables || (this._memoizedTables = {});
|
|
1834
|
+
if (m(t, e)) return t[e];
|
|
1835
|
+
var n = this.schema[e];
|
|
1836
|
+
if (n) return (n = new this.db.Table(e, n, this)).core = this.db.core.table(e), t[e] = n;
|
|
1837
|
+
throw new k.NotFound("Table " + e + " not part of transaction");
|
|
1838
|
+
}, p);
|
|
1839
|
+
function p() {}
|
|
1840
|
+
function Qt(e, t, n, r, o, i, a, u) {
|
|
1841
|
+
return {
|
|
1842
|
+
name: e,
|
|
1843
|
+
keyPath: t,
|
|
1844
|
+
unique: n,
|
|
1845
|
+
multi: r,
|
|
1846
|
+
auto: o,
|
|
1847
|
+
compound: i,
|
|
1848
|
+
src: (n && !a ? "&" : "") + (r ? "*" : "") + (o ? "++" : "") + Gt(t),
|
|
1849
|
+
type: u
|
|
1850
|
+
};
|
|
1851
|
+
}
|
|
1852
|
+
function Gt(e) {
|
|
1853
|
+
return "string" == typeof e ? e : e ? "[" + [].join.call(e, "+") + "]" : "";
|
|
1854
|
+
}
|
|
1855
|
+
function Xt(e, t, n) {
|
|
1856
|
+
return {
|
|
1857
|
+
name: e,
|
|
1858
|
+
primKey: t,
|
|
1859
|
+
indexes: n,
|
|
1860
|
+
mappedClass: null,
|
|
1861
|
+
idxByName: (r = function(e) {
|
|
1862
|
+
return [e.name, e];
|
|
1863
|
+
}, n.reduce(function(e, t, n) {
|
|
1864
|
+
t = r(t, n);
|
|
1865
|
+
return t && (e[t[0]] = t[1]), e;
|
|
1866
|
+
}, {}))
|
|
1867
|
+
};
|
|
1868
|
+
var r;
|
|
1869
|
+
}
|
|
1870
|
+
var Ht = function(e) {
|
|
1871
|
+
try {
|
|
1872
|
+
return e.only([[]]), Ht = function() {
|
|
1873
|
+
return [[]];
|
|
1874
|
+
}, [[]];
|
|
1875
|
+
} catch (e) {
|
|
1876
|
+
return Ht = function() {
|
|
1877
|
+
return ct;
|
|
1878
|
+
}, ct;
|
|
1879
|
+
}
|
|
1880
|
+
};
|
|
1881
|
+
function Jt(t) {
|
|
1882
|
+
return null == t ? function() {} : "string" == typeof t ? 1 === (n = t).split(".").length ? function(e) {
|
|
1883
|
+
return e[n];
|
|
1884
|
+
} : function(e) {
|
|
1885
|
+
return c(e, n);
|
|
1886
|
+
} : function(e) {
|
|
1887
|
+
return c(e, t);
|
|
1888
|
+
};
|
|
1889
|
+
var n;
|
|
1890
|
+
}
|
|
1891
|
+
function Zt(e) {
|
|
1892
|
+
return [].slice.call(e);
|
|
1893
|
+
}
|
|
1894
|
+
var en = 0;
|
|
1895
|
+
function tn(e) {
|
|
1896
|
+
return null == e ? ":id" : "string" == typeof e ? e : "[".concat(e.join("+"), "]");
|
|
1897
|
+
}
|
|
1898
|
+
function nn(e, o, t) {
|
|
1899
|
+
function _(e) {
|
|
1900
|
+
if (3 === e.type) return null;
|
|
1901
|
+
if (4 === e.type) throw new Error("Cannot convert never type to IDBKeyRange");
|
|
1902
|
+
var t = e.lower, n = e.upper, r = e.lowerOpen, e = e.upperOpen;
|
|
1903
|
+
return void 0 === t ? void 0 === n ? null : o.upperBound(n, !!e) : void 0 === n ? o.lowerBound(t, !!r) : o.bound(t, n, !!r, !!e);
|
|
1904
|
+
}
|
|
1905
|
+
function n(e) {
|
|
1906
|
+
var h, w = e.name;
|
|
1907
|
+
return {
|
|
1908
|
+
name: w,
|
|
1909
|
+
schema: e,
|
|
1910
|
+
mutate: function(e) {
|
|
1911
|
+
var y = e.trans, v = e.type, m = e.keys, b = e.values, g = e.range;
|
|
1912
|
+
return new Promise(function(t, e) {
|
|
1913
|
+
t = E(t);
|
|
1914
|
+
var n = y.objectStore(w), r = null == n.keyPath, o = "put" === v || "add" === v;
|
|
1915
|
+
if (!o && "delete" !== v && "deleteRange" !== v) throw new Error("Invalid operation type: " + v);
|
|
1916
|
+
var i, a = (m || b || { length: 1 }).length;
|
|
1917
|
+
if (m && b && m.length !== b.length) throw new Error("Given keys array must have same length as given values array.");
|
|
1918
|
+
if (0 === a) return t({
|
|
1919
|
+
numFailures: 0,
|
|
1920
|
+
failures: {},
|
|
1921
|
+
results: [],
|
|
1922
|
+
lastResult: void 0
|
|
1923
|
+
});
|
|
1924
|
+
function u(e) {
|
|
1925
|
+
++l, Vt(e);
|
|
1926
|
+
}
|
|
1927
|
+
var s = [], c = [], l = 0;
|
|
1928
|
+
if ("deleteRange" === v) {
|
|
1929
|
+
if (4 === g.type) return t({
|
|
1930
|
+
numFailures: l,
|
|
1931
|
+
failures: c,
|
|
1932
|
+
results: [],
|
|
1933
|
+
lastResult: void 0
|
|
1934
|
+
});
|
|
1935
|
+
3 === g.type ? s.push(i = n.clear()) : s.push(i = n.delete(_(g)));
|
|
1936
|
+
} else {
|
|
1937
|
+
var r = o ? r ? [b, m] : [b, null] : [m, null], f = r[0], h = r[1];
|
|
1938
|
+
if (o) for (var d = 0; d < a; ++d) s.push(i = h && void 0 !== h[d] ? n[v](f[d], h[d]) : n[v](f[d])), i.onerror = u;
|
|
1939
|
+
else for (d = 0; d < a; ++d) s.push(i = n[v](f[d])), i.onerror = u;
|
|
1940
|
+
}
|
|
1941
|
+
function p(e) {
|
|
1942
|
+
e = e.target.result, s.forEach(function(e, t) {
|
|
1943
|
+
return null != e.error && (c[t] = e.error);
|
|
1944
|
+
}), t({
|
|
1945
|
+
numFailures: l,
|
|
1946
|
+
failures: c,
|
|
1947
|
+
results: "delete" === v ? m : s.map(function(e) {
|
|
1948
|
+
return e.result;
|
|
1949
|
+
}),
|
|
1950
|
+
lastResult: e
|
|
1951
|
+
});
|
|
1952
|
+
}
|
|
1953
|
+
i.onerror = function(e) {
|
|
1954
|
+
u(e), p(e);
|
|
1955
|
+
}, i.onsuccess = p;
|
|
1956
|
+
});
|
|
1957
|
+
},
|
|
1958
|
+
getMany: function(e) {
|
|
1959
|
+
var f = e.trans, h = e.keys;
|
|
1960
|
+
return new Promise(function(t, e) {
|
|
1961
|
+
t = E(t);
|
|
1962
|
+
for (var n, r = f.objectStore(w), o = h.length, i = new Array(o), a = 0, u = 0, s = function(e) {
|
|
1963
|
+
e = e.target;
|
|
1964
|
+
i[e._pos] = e.result, ++u === a && t(i);
|
|
1965
|
+
}, c = T(e), l = 0; l < o; ++l) null != h[l] && ((n = r.get(h[l]))._pos = l, n.onsuccess = s, n.onerror = c, ++a);
|
|
1966
|
+
0 === a && t(i);
|
|
1967
|
+
});
|
|
1968
|
+
},
|
|
1969
|
+
get: function(e) {
|
|
1970
|
+
var r = e.trans, o = e.key;
|
|
1971
|
+
return new Promise(function(t, e) {
|
|
1972
|
+
t = E(t);
|
|
1973
|
+
var n = r.objectStore(w).get(o);
|
|
1974
|
+
n.onsuccess = function(e) {
|
|
1975
|
+
return t(e.target.result);
|
|
1976
|
+
}, n.onerror = T(e);
|
|
1977
|
+
});
|
|
1978
|
+
},
|
|
1979
|
+
query: (h = a, function(f) {
|
|
1980
|
+
return new Promise(function(n, e) {
|
|
1981
|
+
n = E(n);
|
|
1982
|
+
var r, o, i, t = f.trans, a = f.values, u = f.limit, s = f.query, c = u === Infinity ? void 0 : u, l = s.index, s = s.range, t = t.objectStore(w), t = l.isPrimaryKey ? t : t.index(l.name), l = _(s);
|
|
1983
|
+
if (0 === u) return n({ result: [] });
|
|
1984
|
+
h ? ((s = a ? t.getAll(l, c) : t.getAllKeys(l, c)).onsuccess = function(e) {
|
|
1985
|
+
return n({ result: e.target.result });
|
|
1986
|
+
}, s.onerror = T(e)) : (r = 0, o = !a && "openKeyCursor" in t ? t.openKeyCursor(l) : t.openCursor(l), i = [], o.onsuccess = function(e) {
|
|
1987
|
+
var t = o.result;
|
|
1988
|
+
return !t || (i.push(a ? t.value : t.primaryKey), ++r === u) ? n({ result: i }) : void t.continue();
|
|
1989
|
+
}, o.onerror = T(e));
|
|
1990
|
+
});
|
|
1991
|
+
}),
|
|
1992
|
+
openCursor: function(e) {
|
|
1993
|
+
var c = e.trans, i = e.values, a = e.query, u = e.reverse, l = e.unique;
|
|
1994
|
+
return new Promise(function(t, n) {
|
|
1995
|
+
t = E(t);
|
|
1996
|
+
var e = a.index, r = a.range, o = c.objectStore(w), o = e.isPrimaryKey ? o : o.index(e.name), e = u ? l ? "prevunique" : "prev" : l ? "nextunique" : "next", s = !i && "openKeyCursor" in o ? o.openKeyCursor(_(r), e) : o.openCursor(_(r), e);
|
|
1997
|
+
s.onerror = T(n), s.onsuccess = E(function(e) {
|
|
1998
|
+
var r, o, i, a, u = s.result;
|
|
1999
|
+
u ? (u.___id = ++en, u.done = !1, r = u.continue.bind(u), o = (o = u.continuePrimaryKey) && o.bind(u), i = u.advance.bind(u), a = function() {
|
|
2000
|
+
throw new Error("Cursor not stopped");
|
|
2001
|
+
}, u.trans = c, u.stop = u.continue = u.continuePrimaryKey = u.advance = function() {
|
|
2002
|
+
throw new Error("Cursor not started");
|
|
2003
|
+
}, u.fail = E(n), u.next = function() {
|
|
2004
|
+
var e = this, t = 1;
|
|
2005
|
+
return this.start(function() {
|
|
2006
|
+
return t-- ? e.continue() : e.stop();
|
|
2007
|
+
}).then(function() {
|
|
2008
|
+
return e;
|
|
2009
|
+
});
|
|
2010
|
+
}, u.start = function(e) {
|
|
2011
|
+
function t() {
|
|
2012
|
+
if (s.result) try {
|
|
2013
|
+
e();
|
|
2014
|
+
} catch (e) {
|
|
2015
|
+
u.fail(e);
|
|
2016
|
+
}
|
|
2017
|
+
else u.done = !0, u.start = function() {
|
|
2018
|
+
throw new Error("Cursor behind last entry");
|
|
2019
|
+
}, u.stop();
|
|
2020
|
+
}
|
|
2021
|
+
var n = new Promise(function(t, e) {
|
|
2022
|
+
t = E(t), s.onerror = T(e), u.fail = e, u.stop = function(e) {
|
|
2023
|
+
u.stop = u.continue = u.continuePrimaryKey = u.advance = a, t(e);
|
|
2024
|
+
};
|
|
2025
|
+
});
|
|
2026
|
+
return s.onsuccess = E(function(e) {
|
|
2027
|
+
s.onsuccess = t, t();
|
|
2028
|
+
}), u.continue = r, u.continuePrimaryKey = o, u.advance = i, t(), n;
|
|
2029
|
+
}, t(u)) : t(null);
|
|
2030
|
+
}, n);
|
|
2031
|
+
});
|
|
2032
|
+
},
|
|
2033
|
+
count: function(e) {
|
|
2034
|
+
var t = e.query, o = e.trans, i = t.index, a = t.range;
|
|
2035
|
+
return new Promise(function(t, e) {
|
|
2036
|
+
var n = o.objectStore(w), n = i.isPrimaryKey ? n : n.index(i.name), r = _(a), r = r ? n.count(r) : n.count();
|
|
2037
|
+
r.onsuccess = E(function(e) {
|
|
2038
|
+
return t(e.target.result);
|
|
2039
|
+
}), r.onerror = T(e);
|
|
2040
|
+
});
|
|
2041
|
+
}
|
|
2042
|
+
};
|
|
2043
|
+
}
|
|
2044
|
+
r = t, i = Zt((t = e).objectStoreNames);
|
|
2045
|
+
var r, t = {
|
|
2046
|
+
schema: {
|
|
2047
|
+
name: t.name,
|
|
2048
|
+
tables: i.map(function(e) {
|
|
2049
|
+
return r.objectStore(e);
|
|
2050
|
+
}).map(function(t) {
|
|
2051
|
+
var e = t.keyPath, n = t.autoIncrement, r = x(e), o = {}, r = {
|
|
2052
|
+
name: t.name,
|
|
2053
|
+
primaryKey: {
|
|
2054
|
+
name: null,
|
|
2055
|
+
isPrimaryKey: !0,
|
|
2056
|
+
outbound: null == e,
|
|
2057
|
+
compound: r,
|
|
2058
|
+
keyPath: e,
|
|
2059
|
+
autoIncrement: n,
|
|
2060
|
+
unique: !0,
|
|
2061
|
+
extractKey: Jt(e)
|
|
2062
|
+
},
|
|
2063
|
+
indexes: Zt(t.indexNames).map(function(e) {
|
|
2064
|
+
return t.index(e);
|
|
2065
|
+
}).map(function(e) {
|
|
2066
|
+
var t = e.name, n = e.unique, r = e.multiEntry, e = e.keyPath, t = {
|
|
2067
|
+
name: t,
|
|
2068
|
+
compound: x(e),
|
|
2069
|
+
keyPath: e,
|
|
2070
|
+
unique: n,
|
|
2071
|
+
multiEntry: r,
|
|
2072
|
+
extractKey: Jt(e)
|
|
2073
|
+
};
|
|
2074
|
+
return o[tn(e)] = t;
|
|
2075
|
+
}),
|
|
2076
|
+
getIndexByKeyPath: function(e) {
|
|
2077
|
+
return o[tn(e)];
|
|
2078
|
+
}
|
|
2079
|
+
};
|
|
2080
|
+
return o[":id"] = r.primaryKey, null != e && (o[tn(e)] = r.primaryKey), r;
|
|
2081
|
+
})
|
|
2082
|
+
},
|
|
2083
|
+
hasGetAll: 0 < i.length && "getAll" in r.objectStore(i[0]) && !("undefined" != typeof navigator && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604)
|
|
2084
|
+
}, i = t.schema, a = t.hasGetAll, t = i.tables.map(n), u = {};
|
|
2085
|
+
return t.forEach(function(e) {
|
|
2086
|
+
return u[e.name] = e;
|
|
2087
|
+
}), {
|
|
2088
|
+
stack: "dbcore",
|
|
2089
|
+
transaction: e.transaction.bind(e),
|
|
2090
|
+
table: function(e) {
|
|
2091
|
+
if (u[e]) return u[e];
|
|
2092
|
+
throw new Error("Table '".concat(e, "' not found"));
|
|
2093
|
+
},
|
|
2094
|
+
MIN_KEY: -Infinity,
|
|
2095
|
+
MAX_KEY: Ht(o),
|
|
2096
|
+
schema: i
|
|
2097
|
+
};
|
|
2098
|
+
}
|
|
2099
|
+
function rn(e, t, n, r) {
|
|
2100
|
+
n = n.IDBKeyRange;
|
|
2101
|
+
return t = nn(t, n, r), { dbcore: e.dbcore.reduce(function(e, t) {
|
|
2102
|
+
t = t.create;
|
|
2103
|
+
return _(_({}, e), t(e));
|
|
2104
|
+
}, t) };
|
|
2105
|
+
}
|
|
2106
|
+
function on(n, e) {
|
|
2107
|
+
var t = e.db, t = rn(n._middlewares, t, n._deps, e);
|
|
2108
|
+
n.core = t.dbcore, n.tables.forEach(function(e) {
|
|
2109
|
+
var t = e.name;
|
|
2110
|
+
n.core.schema.tables.some(function(e) {
|
|
2111
|
+
return e.name === t;
|
|
2112
|
+
}) && (e.core = n.core.table(t), n[t] instanceof n.Table) && (n[t].core = e.core);
|
|
2113
|
+
});
|
|
2114
|
+
}
|
|
2115
|
+
function an(o, e, t, i) {
|
|
2116
|
+
t.forEach(function(n) {
|
|
2117
|
+
var r = i[n];
|
|
2118
|
+
e.forEach(function(e) {
|
|
2119
|
+
var t = function e(t, n) {
|
|
2120
|
+
return V(t, n) || (t = F(t)) && e(t, n);
|
|
2121
|
+
}(e, n);
|
|
2122
|
+
(!t || "value" in t && void 0 === t.value) && (e === o.Transaction.prototype || e instanceof o.Transaction ? u(e, n, {
|
|
2123
|
+
get: function() {
|
|
2124
|
+
return this.table(n);
|
|
2125
|
+
},
|
|
2126
|
+
set: function(e) {
|
|
2127
|
+
L(this, n, {
|
|
2128
|
+
value: e,
|
|
2129
|
+
writable: !0,
|
|
2130
|
+
configurable: !0,
|
|
2131
|
+
enumerable: !0
|
|
2132
|
+
});
|
|
2133
|
+
}
|
|
2134
|
+
}) : e[n] = new o.Table(n, r));
|
|
2135
|
+
});
|
|
2136
|
+
});
|
|
2137
|
+
}
|
|
2138
|
+
function un(n, e) {
|
|
2139
|
+
e.forEach(function(e) {
|
|
2140
|
+
for (var t in e) e[t] instanceof n.Table && delete e[t];
|
|
2141
|
+
});
|
|
2142
|
+
}
|
|
2143
|
+
function sn(e, t) {
|
|
2144
|
+
return e._cfg.version - t._cfg.version;
|
|
2145
|
+
}
|
|
2146
|
+
function cn(n, r, o, e) {
|
|
2147
|
+
var i = n._dbSchema, a = (o.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = Xt("$meta", mn("")[0], []), n._storeNames.push("$meta")), n._createTransaction("readwrite", n._storeNames, i)), u = (a.create(o), a._completion.catch(e), a._reject.bind(a)), s = P.transless || P;
|
|
2148
|
+
y(function() {
|
|
2149
|
+
if (P.trans = a, P.transless = s, 0 !== r) return on(n, o), t = r, ((e = a).storeNames.includes("$meta") ? e.table("$meta").get("version").then(function(e) {
|
|
2150
|
+
return null != e ? e : t;
|
|
2151
|
+
}) : K.resolve(t)).then(function(e) {
|
|
2152
|
+
var s = n, c = e, l = a, f = o, t = [], e = s._versions, h = s._dbSchema = yn(0, s.idbdb, f);
|
|
2153
|
+
return 0 === (e = e.filter(function(e) {
|
|
2154
|
+
return e._cfg.version >= c;
|
|
2155
|
+
})).length ? K.resolve() : (e.forEach(function(u) {
|
|
2156
|
+
t.push(function() {
|
|
2157
|
+
var t, n, r, o = h, e = u._cfg.dbschema, i = (vn(s, o, f), vn(s, e, f), h = s._dbSchema = e, fn(o, e)), a = (i.add.forEach(function(e) {
|
|
2158
|
+
hn(f, e[0], e[1].primKey, e[1].indexes);
|
|
2159
|
+
}), i.change.forEach(function(e) {
|
|
2160
|
+
if (e.recreate) throw new k.Upgrade("Not yet support for changing primary key");
|
|
2161
|
+
var t = f.objectStore(e.name);
|
|
2162
|
+
e.add.forEach(function(e) {
|
|
2163
|
+
return pn(t, e);
|
|
2164
|
+
}), e.change.forEach(function(e) {
|
|
2165
|
+
t.deleteIndex(e.name), pn(t, e);
|
|
2166
|
+
}), e.del.forEach(function(e) {
|
|
2167
|
+
return t.deleteIndex(e);
|
|
2168
|
+
});
|
|
2169
|
+
}), u._cfg.contentUpgrade);
|
|
2170
|
+
if (a && u._cfg.version > c) return on(s, f), l._memoizedTables = {}, t = G(e), i.del.forEach(function(e) {
|
|
2171
|
+
t[e] = o[e];
|
|
2172
|
+
}), un(s, [s.Transaction.prototype]), an(s, [s.Transaction.prototype], O(t), t), l.schema = t, (n = ue(a)) && nt(), e = K.follow(function() {
|
|
2173
|
+
var e;
|
|
2174
|
+
(r = a(l)) && n && (e = v.bind(null, null), r.then(e, e));
|
|
2175
|
+
}), r && "function" == typeof r.then ? K.resolve(r) : e.then(function() {
|
|
2176
|
+
return r;
|
|
2177
|
+
});
|
|
2178
|
+
}), t.push(function(e) {
|
|
2179
|
+
var t = u._cfg.dbschema, n = e;
|
|
2180
|
+
[].slice.call(n.db.objectStoreNames).forEach(function(e) {
|
|
2181
|
+
return null == t[e] && n.db.deleteObjectStore(e);
|
|
2182
|
+
}), un(s, [s.Transaction.prototype]), an(s, [s.Transaction.prototype], s._storeNames, s._dbSchema), l.schema = s._dbSchema;
|
|
2183
|
+
}), t.push(function(e) {
|
|
2184
|
+
s.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(s.idbdb.version / 10) === u._cfg.version ? (s.idbdb.deleteObjectStore("$meta"), delete s._dbSchema.$meta, s._storeNames = s._storeNames.filter(function(e) {
|
|
2185
|
+
return "$meta" !== e;
|
|
2186
|
+
})) : e.objectStore("$meta").put(u._cfg.version, "version"));
|
|
2187
|
+
});
|
|
2188
|
+
}), function e() {
|
|
2189
|
+
return t.length ? K.resolve(t.shift()(l.idbtrans)).then(e) : K.resolve();
|
|
2190
|
+
}().then(function() {
|
|
2191
|
+
dn(h, f);
|
|
2192
|
+
}));
|
|
2193
|
+
}).catch(u);
|
|
2194
|
+
var e, t;
|
|
2195
|
+
O(i).forEach(function(e) {
|
|
2196
|
+
hn(o, e, i[e].primKey, i[e].indexes);
|
|
2197
|
+
}), on(n, o), K.follow(function() {
|
|
2198
|
+
return n.on.populate.fire(a);
|
|
2199
|
+
}).catch(u);
|
|
2200
|
+
});
|
|
2201
|
+
}
|
|
2202
|
+
function ln(e, r) {
|
|
2203
|
+
dn(e._dbSchema, r), r.db.version % 10 != 0 || r.objectStoreNames.contains("$meta") || r.db.createObjectStore("$meta").add(Math.ceil(r.db.version / 10 - 1), "version");
|
|
2204
|
+
var t = yn(0, e.idbdb, r);
|
|
2205
|
+
vn(e, e._dbSchema, r);
|
|
2206
|
+
for (var n = 0, o = fn(t, e._dbSchema).change; n < o.length; n++) {
|
|
2207
|
+
var i = ((t) => {
|
|
2208
|
+
if (t.change.length || t.recreate) return console.warn("Unable to patch indexes of table ".concat(t.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
|
|
2209
|
+
var n = r.objectStore(t.name);
|
|
2210
|
+
t.add.forEach(function(e) {
|
|
2211
|
+
l && console.debug("Dexie upgrade patch: Creating missing index ".concat(t.name, ".").concat(e.src)), pn(n, e);
|
|
2212
|
+
});
|
|
2213
|
+
})(o[n]);
|
|
2214
|
+
if ("object" == typeof i) return i.value;
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
function fn(e, t) {
|
|
2218
|
+
var n, r = {
|
|
2219
|
+
del: [],
|
|
2220
|
+
add: [],
|
|
2221
|
+
change: []
|
|
2222
|
+
};
|
|
2223
|
+
for (n in e) t[n] || r.del.push(n);
|
|
2224
|
+
for (n in t) {
|
|
2225
|
+
var o = e[n], i = t[n];
|
|
2226
|
+
if (o) {
|
|
2227
|
+
var a = {
|
|
2228
|
+
name: n,
|
|
2229
|
+
def: i,
|
|
2230
|
+
recreate: !1,
|
|
2231
|
+
del: [],
|
|
2232
|
+
add: [],
|
|
2233
|
+
change: []
|
|
2234
|
+
};
|
|
2235
|
+
if ("" + (o.primKey.keyPath || "") != "" + (i.primKey.keyPath || "") || o.primKey.auto !== i.primKey.auto) a.recreate = !0, r.change.push(a);
|
|
2236
|
+
else {
|
|
2237
|
+
var u = o.idxByName, s = i.idxByName, c = void 0;
|
|
2238
|
+
for (c in u) s[c] || a.del.push(c);
|
|
2239
|
+
for (c in s) {
|
|
2240
|
+
var l = u[c], f = s[c];
|
|
2241
|
+
l ? l.src !== f.src && a.change.push(f) : a.add.push(f);
|
|
2242
|
+
}
|
|
2243
|
+
(0 < a.del.length || 0 < a.add.length || 0 < a.change.length) && r.change.push(a);
|
|
2244
|
+
}
|
|
2245
|
+
} else r.add.push([n, i]);
|
|
2246
|
+
}
|
|
2247
|
+
return r;
|
|
2248
|
+
}
|
|
2249
|
+
function hn(e, t, n, r) {
|
|
2250
|
+
var o = e.db.createObjectStore(t, n.keyPath ? {
|
|
2251
|
+
keyPath: n.keyPath,
|
|
2252
|
+
autoIncrement: n.auto
|
|
2253
|
+
} : { autoIncrement: n.auto });
|
|
2254
|
+
r.forEach(function(e) {
|
|
2255
|
+
return pn(o, e);
|
|
2256
|
+
});
|
|
2257
|
+
}
|
|
2258
|
+
function dn(t, n) {
|
|
2259
|
+
O(t).forEach(function(e) {
|
|
2260
|
+
n.db.objectStoreNames.contains(e) || (l && console.debug("Dexie: Creating missing table", e), hn(n, e, t[e].primKey, t[e].indexes));
|
|
2261
|
+
});
|
|
2262
|
+
}
|
|
2263
|
+
function pn(e, t) {
|
|
2264
|
+
e.createIndex(t.name, t.keyPath, {
|
|
2265
|
+
unique: t.unique,
|
|
2266
|
+
multiEntry: t.multi
|
|
2267
|
+
});
|
|
2268
|
+
}
|
|
2269
|
+
function yn(e, t, u) {
|
|
2270
|
+
var s = {};
|
|
2271
|
+
return W(t.objectStoreNames, 0).forEach(function(e) {
|
|
2272
|
+
for (var t = u.objectStore(e), n = Qt(Gt(a = t.keyPath), a || "", !0, !1, !!t.autoIncrement, a && "string" != typeof a, !0), r = [], o = 0; o < t.indexNames.length; ++o) {
|
|
2273
|
+
var i = t.index(t.indexNames[o]), a = i.keyPath, i = Qt(i.name, a, !!i.unique, !!i.multiEntry, !1, a && "string" != typeof a, !1);
|
|
2274
|
+
r.push(i);
|
|
2275
|
+
}
|
|
2276
|
+
s[e] = Xt(e, n, r);
|
|
2277
|
+
}), s;
|
|
2278
|
+
}
|
|
2279
|
+
function vn(e, t, n) {
|
|
2280
|
+
for (var r = n.db.objectStoreNames, o = 0; o < r.length; ++o) {
|
|
2281
|
+
var i = r[o], a = n.objectStore(i);
|
|
2282
|
+
e._hasGetAll = "getAll" in a;
|
|
2283
|
+
for (var u = 0; u < a.indexNames.length; ++u) {
|
|
2284
|
+
var s, c = a.indexNames[u], l = a.index(c).keyPath, l = "string" == typeof l ? l : "[" + W(l).join("+") + "]";
|
|
2285
|
+
t[i] && (s = t[i].idxByName[l]) && (s.name = c, delete t[i].idxByName[l], t[i].idxByName[c] = s);
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
"undefined" != typeof navigator && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && f.WorkerGlobalScope && f instanceof f.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
|
|
2289
|
+
}
|
|
2290
|
+
function mn(e) {
|
|
2291
|
+
return e.split(",").map(function(e, t) {
|
|
2292
|
+
var n = e.split(":"), r = null == (r = n[1]) ? void 0 : r.trim(), n = (e = n[0].trim()).replace(/([&*]|\+\+)/g, ""), o = /^\[/.test(n) ? n.match(/^\[(.*)\]$/)[1].split("+") : n;
|
|
2293
|
+
return Qt(n, o || null, /\&/.test(e), /\*/.test(e), /\+\+/.test(e), x(o), 0 === t, r);
|
|
2294
|
+
});
|
|
2295
|
+
}
|
|
2296
|
+
gn.prototype._createTableSchema = Xt, gn.prototype._parseIndexSyntax = mn, gn.prototype._parseStoresSpec = function(r, o) {
|
|
2297
|
+
var i = this;
|
|
2298
|
+
O(r).forEach(function(e) {
|
|
2299
|
+
if (null !== r[e]) {
|
|
2300
|
+
var t = i._parseIndexSyntax(r[e]), n = t.shift();
|
|
2301
|
+
if (!n) throw new k.Schema("Invalid schema for table " + e + ": " + r[e]);
|
|
2302
|
+
if (n.unique = !0, n.multi) throw new k.Schema("Primary key cannot be multiEntry*");
|
|
2303
|
+
t.forEach(function(e) {
|
|
2304
|
+
if (e.auto) throw new k.Schema("Only primary key can be marked as autoIncrement (++)");
|
|
2305
|
+
if (!e.keyPath) throw new k.Schema("Index must have a name and cannot be an empty string");
|
|
2306
|
+
});
|
|
2307
|
+
n = i._createTableSchema(e, n, t);
|
|
2308
|
+
o[e] = n;
|
|
2309
|
+
}
|
|
2310
|
+
});
|
|
2311
|
+
}, gn.prototype.stores = function(e) {
|
|
2312
|
+
var t = this.db, e = (this._cfg.storesSource = this._cfg.storesSource ? a(this._cfg.storesSource, e) : e, t._versions), n = {}, r = {};
|
|
2313
|
+
return e.forEach(function(e) {
|
|
2314
|
+
a(n, e._cfg.storesSource), r = e._cfg.dbschema = {}, e._parseStoresSpec(n, r);
|
|
2315
|
+
}), t._dbSchema = r, un(t, [
|
|
2316
|
+
t._allTables,
|
|
2317
|
+
t,
|
|
2318
|
+
t.Transaction.prototype
|
|
2319
|
+
]), an(t, [
|
|
2320
|
+
t._allTables,
|
|
2321
|
+
t,
|
|
2322
|
+
t.Transaction.prototype,
|
|
2323
|
+
this._cfg.tables
|
|
2324
|
+
], O(r), r), t._storeNames = O(r), this;
|
|
2325
|
+
}, gn.prototype.upgrade = function(e) {
|
|
2326
|
+
return this._cfg.contentUpgrade = ke(this._cfg.contentUpgrade || g, e), this;
|
|
2327
|
+
};
|
|
2328
|
+
var bn = gn;
|
|
2329
|
+
function gn() {}
|
|
2330
|
+
function wn(e, t) {
|
|
2331
|
+
var n = e._dbNamesDB;
|
|
2332
|
+
return n || (n = e._dbNamesDB = new q(ht, {
|
|
2333
|
+
addons: [],
|
|
2334
|
+
indexedDB: e,
|
|
2335
|
+
IDBKeyRange: t
|
|
2336
|
+
})).version(1).stores({ dbnames: "name" }), n.table("dbnames");
|
|
2337
|
+
}
|
|
2338
|
+
function _n(e) {
|
|
2339
|
+
return e && "function" == typeof e.databases;
|
|
2340
|
+
}
|
|
2341
|
+
function xn(e) {
|
|
2342
|
+
return y(function() {
|
|
2343
|
+
return P.letThrough = !0, e();
|
|
2344
|
+
});
|
|
2345
|
+
}
|
|
2346
|
+
function kn(e) {
|
|
2347
|
+
return !("from" in e);
|
|
2348
|
+
}
|
|
2349
|
+
var I = function(e, t) {
|
|
2350
|
+
var n;
|
|
2351
|
+
if (!this) return n = new I(), e && "d" in e && a(n, e), n;
|
|
2352
|
+
a(this, arguments.length ? {
|
|
2353
|
+
d: 1,
|
|
2354
|
+
from: e,
|
|
2355
|
+
to: 1 < arguments.length ? t : e
|
|
2356
|
+
} : { d: 0 });
|
|
2357
|
+
};
|
|
2358
|
+
function On(e, t, n) {
|
|
2359
|
+
var r = j(t, n);
|
|
2360
|
+
if (!isNaN(r)) {
|
|
2361
|
+
if (0 < r) throw RangeError();
|
|
2362
|
+
if (kn(e)) return a(e, {
|
|
2363
|
+
from: t,
|
|
2364
|
+
to: n,
|
|
2365
|
+
d: 1
|
|
2366
|
+
});
|
|
2367
|
+
var r = e.l, o = e.r;
|
|
2368
|
+
if (j(n, e.from) < 0) return r ? On(r, t, n) : e.l = {
|
|
2369
|
+
from: t,
|
|
2370
|
+
to: n,
|
|
2371
|
+
d: 1,
|
|
2372
|
+
l: null,
|
|
2373
|
+
r: null
|
|
2374
|
+
}, Sn(e);
|
|
2375
|
+
if (0 < j(t, e.to)) return o ? On(o, t, n) : e.r = {
|
|
2376
|
+
from: t,
|
|
2377
|
+
to: n,
|
|
2378
|
+
d: 1,
|
|
2379
|
+
l: null,
|
|
2380
|
+
r: null
|
|
2381
|
+
}, Sn(e);
|
|
2382
|
+
j(t, e.from) < 0 && (e.from = t, e.l = null, e.d = o ? o.d + 1 : 1), 0 < j(n, e.to) && (e.to = n, e.r = null, e.d = e.l ? e.l.d + 1 : 1);
|
|
2383
|
+
t = !e.r;
|
|
2384
|
+
r && !e.l && Pn(e, r), o && t && Pn(e, o);
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
function Pn(e, t) {
|
|
2388
|
+
kn(t) || function e(t, n) {
|
|
2389
|
+
var r = n.from, o = n.l, i = n.r;
|
|
2390
|
+
On(t, r, n.to), o && e(t, o), i && e(t, i);
|
|
2391
|
+
}(e, t);
|
|
2392
|
+
}
|
|
2393
|
+
function Kn(e, t) {
|
|
2394
|
+
var n = En(t), r = n.next();
|
|
2395
|
+
if (!r.done) for (var o = r.value, i = En(e), a = i.next(o.from), u = a.value; !r.done && !a.done;) {
|
|
2396
|
+
if (j(u.from, o.to) <= 0 && 0 <= j(u.to, o.from)) return !0;
|
|
2397
|
+
j(o.from, u.from) < 0 ? o = (r = n.next(u.from)).value : u = (a = i.next(o.from)).value;
|
|
2398
|
+
}
|
|
2399
|
+
return !1;
|
|
2400
|
+
}
|
|
2401
|
+
function En(e) {
|
|
2402
|
+
var n = kn(e) ? null : {
|
|
2403
|
+
s: 0,
|
|
2404
|
+
n: e
|
|
2405
|
+
};
|
|
2406
|
+
return { next: function(e) {
|
|
2407
|
+
for (var t = 0 < arguments.length; n;) switch (n.s) {
|
|
2408
|
+
case 0: if (n.s = 1, t) for (; n.n.l && j(e, n.n.from) < 0;) n = {
|
|
2409
|
+
up: n,
|
|
2410
|
+
n: n.n.l,
|
|
2411
|
+
s: 1
|
|
2412
|
+
};
|
|
2413
|
+
else for (; n.n.l;) n = {
|
|
2414
|
+
up: n,
|
|
2415
|
+
n: n.n.l,
|
|
2416
|
+
s: 1
|
|
2417
|
+
};
|
|
2418
|
+
case 1: if (n.s = 2, !t || j(e, n.n.to) <= 0) return {
|
|
2419
|
+
value: n.n,
|
|
2420
|
+
done: !1
|
|
2421
|
+
};
|
|
2422
|
+
case 2: if (n.n.r) {
|
|
2423
|
+
n.s = 3, n = {
|
|
2424
|
+
up: n,
|
|
2425
|
+
n: n.n.r,
|
|
2426
|
+
s: 0
|
|
2427
|
+
};
|
|
2428
|
+
continue;
|
|
2429
|
+
}
|
|
2430
|
+
case 3: n = n.up;
|
|
2431
|
+
}
|
|
2432
|
+
return { done: !0 };
|
|
2433
|
+
} };
|
|
2434
|
+
}
|
|
2435
|
+
function Sn(e) {
|
|
2436
|
+
var t, n, r, o = ((null == (o = e.r) ? void 0 : o.d) || 0) - ((null == (o = e.l) ? void 0 : o.d) || 0), o = 1 < o ? "r" : o < -1 ? "l" : "";
|
|
2437
|
+
o && (t = "r" == o ? "l" : "r", n = _({}, e), r = e[o], e.from = r.from, e.to = r.to, e[o] = r[o], n[o] = r[t], (e[t] = n).d = jn(n)), e.d = jn(e);
|
|
2438
|
+
}
|
|
2439
|
+
function jn(e) {
|
|
2440
|
+
var t = e.r, e = e.l;
|
|
2441
|
+
return (t ? e ? Math.max(t.d, e.d) : t.d : e ? e.d : 0) + 1;
|
|
2442
|
+
}
|
|
2443
|
+
function An(t, n) {
|
|
2444
|
+
return O(n).forEach(function(e) {
|
|
2445
|
+
t[e] ? Pn(t[e], n[e]) : t[e] = function e(t) {
|
|
2446
|
+
var n, r, o = {};
|
|
2447
|
+
for (n in t) m(t, n) && (r = t[n], o[n] = !r || "object" != typeof r || J.has(r.constructor) ? r : e(r));
|
|
2448
|
+
return o;
|
|
2449
|
+
}(n[e]);
|
|
2450
|
+
}), t;
|
|
2451
|
+
}
|
|
2452
|
+
function Cn(t, n) {
|
|
2453
|
+
return t.all || n.all || Object.keys(t).some(function(e) {
|
|
2454
|
+
return n[e] && Kn(n[e], t[e]);
|
|
2455
|
+
});
|
|
2456
|
+
}
|
|
2457
|
+
N(I.prototype, ((t = {
|
|
2458
|
+
add: function(e) {
|
|
2459
|
+
return Pn(this, e), this;
|
|
2460
|
+
},
|
|
2461
|
+
addKey: function(e) {
|
|
2462
|
+
return On(this, e, e), this;
|
|
2463
|
+
},
|
|
2464
|
+
addKeys: function(e) {
|
|
2465
|
+
var t = this;
|
|
2466
|
+
return e.forEach(function(e) {
|
|
2467
|
+
return On(t, e, e);
|
|
2468
|
+
}), this;
|
|
2469
|
+
},
|
|
2470
|
+
hasKey: function(e) {
|
|
2471
|
+
var t = En(this).next(e).value;
|
|
2472
|
+
return t && j(t.from, e) <= 0 && 0 <= j(t.to, e);
|
|
2473
|
+
}
|
|
2474
|
+
})[re] = function() {
|
|
2475
|
+
return En(this);
|
|
2476
|
+
}, t));
|
|
2477
|
+
var Tn = {}, In = {}, qn = !1;
|
|
2478
|
+
function Dn(e) {
|
|
2479
|
+
An(In, e), qn || (qn = !0, setTimeout(function() {
|
|
2480
|
+
qn = !1, Bn(In, !(In = {}));
|
|
2481
|
+
}, 0));
|
|
2482
|
+
}
|
|
2483
|
+
function Bn(e, t) {
|
|
2484
|
+
void 0 === t && (t = !1);
|
|
2485
|
+
var n = /* @__PURE__ */ new Set();
|
|
2486
|
+
if (e.all) for (var r = 0, o = Object.values(Tn); r < o.length; r++) Rn(u = o[r], e, n, t);
|
|
2487
|
+
else for (var i in e) {
|
|
2488
|
+
var a, u, i = /^idb\:\/\/(.*)\/(.*)\//.exec(i);
|
|
2489
|
+
i && (a = i[1], i = i[2], u = Tn["idb://".concat(a, "/").concat(i)]) && Rn(u, e, n, t);
|
|
2490
|
+
}
|
|
2491
|
+
n.forEach(function(e) {
|
|
2492
|
+
return e();
|
|
2493
|
+
});
|
|
2494
|
+
}
|
|
2495
|
+
function Rn(e, t, n, r) {
|
|
2496
|
+
for (var o = [], i = 0, a = Object.entries(e.queries.query); i < a.length; i++) {
|
|
2497
|
+
for (var u = a[i], s = u[0], c = [], l = 0, f = u[1]; l < f.length; l++) {
|
|
2498
|
+
var h = f[l];
|
|
2499
|
+
Cn(t, h.obsSet) ? h.subscribers.forEach(function(e) {
|
|
2500
|
+
return n.add(e);
|
|
2501
|
+
}) : r && c.push(h);
|
|
2502
|
+
}
|
|
2503
|
+
r && o.push([s, c]);
|
|
2504
|
+
}
|
|
2505
|
+
if (r) for (var d = 0, p = o; d < p.length; d++) {
|
|
2506
|
+
var y = p[d], s = y[0], c = y[1];
|
|
2507
|
+
e.queries.query[s] = c;
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
function Fn(h) {
|
|
2511
|
+
var d = h._state, r = h._deps.indexedDB;
|
|
2512
|
+
if (d.isBeingOpened || h.idbdb) return d.dbReadyPromise.then(function() {
|
|
2513
|
+
return d.dbOpenError ? w(d.dbOpenError) : h;
|
|
2514
|
+
});
|
|
2515
|
+
d.isBeingOpened = !0, d.dbOpenError = null, d.openComplete = !1;
|
|
2516
|
+
var t = d.openCanceller, p = Math.round(10 * h.verno), y = !1;
|
|
2517
|
+
function e() {
|
|
2518
|
+
if (d.openCanceller !== t) throw new k.DatabaseClosed("db.open() was cancelled");
|
|
2519
|
+
}
|
|
2520
|
+
function v() {
|
|
2521
|
+
return new K(function(c, n) {
|
|
2522
|
+
if (e(), !r) throw new k.MissingAPI();
|
|
2523
|
+
var l = h.name, f = d.autoSchema || !p ? r.open(l) : r.open(l, p);
|
|
2524
|
+
if (!f) throw new k.MissingAPI();
|
|
2525
|
+
f.onerror = T(n), f.onblocked = E(h._fireOnBlocked), f.onupgradeneeded = E(function(e) {
|
|
2526
|
+
var t;
|
|
2527
|
+
m = f.transaction, d.autoSchema && !h._options.allowEmptyDB ? (f.onerror = Vt, m.abort(), f.result.close(), (t = r.deleteDatabase(l)).onsuccess = t.onerror = E(function() {
|
|
2528
|
+
n(new k.NoSuchDatabase("Database ".concat(l, " doesnt exist")));
|
|
2529
|
+
})) : (m.onerror = T(n), t = e.oldVersion > Math.pow(2, 62) ? 0 : e.oldVersion, b = t < 1, h.idbdb = f.result, y && ln(h, m), cn(h, t / 10, m, n));
|
|
2530
|
+
}, n), f.onsuccess = E(function() {
|
|
2531
|
+
m = null;
|
|
2532
|
+
var e, t, n, r, o, i, a = h.idbdb = f.result, u = W(a.objectStoreNames);
|
|
2533
|
+
if (0 < u.length) try {
|
|
2534
|
+
var s = a.transaction(1 === (o = u).length ? o[0] : o, "readonly");
|
|
2535
|
+
if (d.autoSchema) i = a, r = s, (n = h).verno = i.version / 10, r = n._dbSchema = yn(0, i, r), n._storeNames = W(i.objectStoreNames, 0), an(n, [n._allTables], O(r), r);
|
|
2536
|
+
else if (vn(h, h._dbSchema, s), t = s, ((t = fn(yn(0, (e = h).idbdb, t), e._dbSchema)).add.length || t.change.some(function(e) {
|
|
2537
|
+
return e.add.length || e.change.length;
|
|
2538
|
+
})) && !y) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), a.close(), p = a.version + 1, y = !0, c(v());
|
|
2539
|
+
on(h, s);
|
|
2540
|
+
} catch (e) {}
|
|
2541
|
+
ft.push(h), a.onversionchange = E(function(e) {
|
|
2542
|
+
d.vcFired = !0, h.on("versionchange").fire(e);
|
|
2543
|
+
}), a.onclose = E(function() {
|
|
2544
|
+
h.close({ disableAutoOpen: !1 });
|
|
2545
|
+
}), b && (u = h._deps, o = l, _n(i = u.indexedDB) || o === ht || wn(i, u.IDBKeyRange).put({ name: o }).catch(g)), c();
|
|
2546
|
+
}, n);
|
|
2547
|
+
}).catch(function(e) {
|
|
2548
|
+
switch (null == e ? void 0 : e.name) {
|
|
2549
|
+
case "UnknownError":
|
|
2550
|
+
if (0 < d.PR1398_maxLoop) return d.PR1398_maxLoop--, console.warn("Dexie: Workaround for Chrome UnknownError on open()"), v();
|
|
2551
|
+
break;
|
|
2552
|
+
case "VersionError": if (0 < p) return p = 0, v();
|
|
2553
|
+
}
|
|
2554
|
+
return K.reject(e);
|
|
2555
|
+
});
|
|
2556
|
+
}
|
|
2557
|
+
var n, o = d.dbReadyResolve, m = null, b = !1;
|
|
2558
|
+
return K.race([t, ("undefined" == typeof navigator ? K.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(e) {
|
|
2559
|
+
function t() {
|
|
2560
|
+
return indexedDB.databases().finally(e);
|
|
2561
|
+
}
|
|
2562
|
+
n = setInterval(t, 100), t();
|
|
2563
|
+
}).finally(function() {
|
|
2564
|
+
return clearInterval(n);
|
|
2565
|
+
}) : Promise.resolve()).then(v)]).then(function() {
|
|
2566
|
+
return e(), d.onReadyBeingFired = [], K.resolve(xn(function() {
|
|
2567
|
+
return h.on.ready.fire(h.vip);
|
|
2568
|
+
})).then(function e() {
|
|
2569
|
+
var t;
|
|
2570
|
+
if (0 < d.onReadyBeingFired.length) return t = d.onReadyBeingFired.reduce(ke, g), d.onReadyBeingFired = [], K.resolve(xn(function() {
|
|
2571
|
+
return t(h.vip);
|
|
2572
|
+
})).then(e);
|
|
2573
|
+
});
|
|
2574
|
+
}).finally(function() {
|
|
2575
|
+
d.openCanceller === t && (d.onReadyBeingFired = null, d.isBeingOpened = !1);
|
|
2576
|
+
}).catch(function(e) {
|
|
2577
|
+
d.dbOpenError = e;
|
|
2578
|
+
try {
|
|
2579
|
+
m && m.abort();
|
|
2580
|
+
} catch (e) {}
|
|
2581
|
+
return t === d.openCanceller && h._close(), w(e);
|
|
2582
|
+
}).finally(function() {
|
|
2583
|
+
d.openComplete = !0, o();
|
|
2584
|
+
}).then(function() {
|
|
2585
|
+
var n;
|
|
2586
|
+
return b && (n = {}, h.tables.forEach(function(t) {
|
|
2587
|
+
t.schema.indexes.forEach(function(e) {
|
|
2588
|
+
e.name && (n["idb://".concat(h.name, "/").concat(t.name, "/").concat(e.name)] = new I(-Infinity, [[[]]]));
|
|
2589
|
+
}), n["idb://".concat(h.name, "/").concat(t.name, "/")] = n["idb://".concat(h.name, "/").concat(t.name, "/:dels")] = new I(-Infinity, [[[]]]);
|
|
2590
|
+
}), Yt(zt).fire(n), Bn(n, !0)), h;
|
|
2591
|
+
});
|
|
2592
|
+
}
|
|
2593
|
+
function Mn(t) {
|
|
2594
|
+
function e(e) {
|
|
2595
|
+
return t.next(e);
|
|
2596
|
+
}
|
|
2597
|
+
var r = n(e), o = n(function(e) {
|
|
2598
|
+
return t.throw(e);
|
|
2599
|
+
});
|
|
2600
|
+
function n(n) {
|
|
2601
|
+
return function(e) {
|
|
2602
|
+
var e = n(e), t = e.value;
|
|
2603
|
+
return e.done ? t : t && "function" == typeof t.then ? t.then(r, o) : x(t) ? Promise.all(t).then(r, o) : r(t);
|
|
2604
|
+
};
|
|
2605
|
+
}
|
|
2606
|
+
return n(e)();
|
|
2607
|
+
}
|
|
2608
|
+
function Nn(e, t, n) {
|
|
2609
|
+
for (var r = x(e) ? e.slice() : [e], o = 0; o < n; ++o) r.push(t);
|
|
2610
|
+
return r;
|
|
2611
|
+
}
|
|
2612
|
+
var Ln = {
|
|
2613
|
+
stack: "dbcore",
|
|
2614
|
+
name: "VirtualIndexMiddleware",
|
|
2615
|
+
level: 1,
|
|
2616
|
+
create: function(l) {
|
|
2617
|
+
return _(_({}, l), { table: function(e) {
|
|
2618
|
+
var i = l.table(e), e = i.schema, u = {}, s = [];
|
|
2619
|
+
function c(e, t, n) {
|
|
2620
|
+
var r = tn(e), o = u[r] = u[r] || [], i = null == e ? 0 : "string" == typeof e ? 1 : e.length, a = 0 < t, r = _(_({}, n), {
|
|
2621
|
+
name: a ? "".concat(r, "(virtual-from:").concat(n.name, ")") : n.name,
|
|
2622
|
+
lowLevelIndex: n,
|
|
2623
|
+
isVirtual: a,
|
|
2624
|
+
keyTail: t,
|
|
2625
|
+
keyLength: i,
|
|
2626
|
+
extractKey: Jt(e),
|
|
2627
|
+
unique: !a && n.unique
|
|
2628
|
+
});
|
|
2629
|
+
return o.push(r), r.isPrimaryKey || s.push(r), 1 < i && c(2 === i ? e[0] : e.slice(0, i - 1), t + 1, n), o.sort(function(e, t) {
|
|
2630
|
+
return e.keyTail - t.keyTail;
|
|
2631
|
+
}), r;
|
|
2632
|
+
}
|
|
2633
|
+
var t = c(e.primaryKey.keyPath, 0, e.primaryKey);
|
|
2634
|
+
u[":id"] = [t];
|
|
2635
|
+
for (var n = 0, r = e.indexes; n < r.length; n++) {
|
|
2636
|
+
var o = r[n];
|
|
2637
|
+
c(o.keyPath, 0, o);
|
|
2638
|
+
}
|
|
2639
|
+
function a(e) {
|
|
2640
|
+
var t, n = e.query.index;
|
|
2641
|
+
return n.isVirtual ? _(_({}, e), { query: {
|
|
2642
|
+
index: n.lowLevelIndex,
|
|
2643
|
+
range: (t = e.query.range, n = n.keyTail, {
|
|
2644
|
+
type: 1 === t.type ? 2 : t.type,
|
|
2645
|
+
lower: Nn(t.lower, t.lowerOpen ? l.MAX_KEY : l.MIN_KEY, n),
|
|
2646
|
+
lowerOpen: !0,
|
|
2647
|
+
upper: Nn(t.upper, t.upperOpen ? l.MIN_KEY : l.MAX_KEY, n),
|
|
2648
|
+
upperOpen: !0
|
|
2649
|
+
})
|
|
2650
|
+
} }) : e;
|
|
2651
|
+
}
|
|
2652
|
+
return _(_({}, i), {
|
|
2653
|
+
schema: _(_({}, e), {
|
|
2654
|
+
primaryKey: t,
|
|
2655
|
+
indexes: s,
|
|
2656
|
+
getIndexByKeyPath: function(e) {
|
|
2657
|
+
return (e = u[tn(e)]) && e[0];
|
|
2658
|
+
}
|
|
2659
|
+
}),
|
|
2660
|
+
count: function(e) {
|
|
2661
|
+
return i.count(a(e));
|
|
2662
|
+
},
|
|
2663
|
+
query: function(e) {
|
|
2664
|
+
return i.query(a(e));
|
|
2665
|
+
},
|
|
2666
|
+
openCursor: function(t) {
|
|
2667
|
+
var e = t.query.index, r = e.keyTail, o = e.keyLength;
|
|
2668
|
+
return e.isVirtual ? i.openCursor(a(t)).then(function(e) {
|
|
2669
|
+
return e && n(e);
|
|
2670
|
+
}) : i.openCursor(t);
|
|
2671
|
+
function n(n) {
|
|
2672
|
+
return Object.create(n, {
|
|
2673
|
+
continue: { value: function(e) {
|
|
2674
|
+
null != e ? n.continue(Nn(e, t.reverse ? l.MAX_KEY : l.MIN_KEY, r)) : t.unique ? n.continue(n.key.slice(0, o).concat(t.reverse ? l.MIN_KEY : l.MAX_KEY, r)) : n.continue();
|
|
2675
|
+
} },
|
|
2676
|
+
continuePrimaryKey: { value: function(e, t) {
|
|
2677
|
+
n.continuePrimaryKey(Nn(e, l.MAX_KEY, r), t);
|
|
2678
|
+
} },
|
|
2679
|
+
primaryKey: { get: function() {
|
|
2680
|
+
return n.primaryKey;
|
|
2681
|
+
} },
|
|
2682
|
+
key: { get: function() {
|
|
2683
|
+
var e = n.key;
|
|
2684
|
+
return 1 === o ? e[0] : e.slice(0, o);
|
|
2685
|
+
} },
|
|
2686
|
+
value: { get: function() {
|
|
2687
|
+
return n.value;
|
|
2688
|
+
} }
|
|
2689
|
+
});
|
|
2690
|
+
}
|
|
2691
|
+
}
|
|
2692
|
+
});
|
|
2693
|
+
} });
|
|
2694
|
+
}
|
|
2695
|
+
};
|
|
2696
|
+
function Un(o, i, a, u) {
|
|
2697
|
+
return a = a || {}, u = u || "", O(o).forEach(function(e) {
|
|
2698
|
+
var t, n, r;
|
|
2699
|
+
m(i, e) ? (t = o[e], n = i[e], "object" == typeof t && "object" == typeof n && t && n ? (r = ne(t)) !== ne(n) ? a[u + e] = i[e] : "Object" === r ? Un(t, n, a, u + e + ".") : t !== n && (a[u + e] = i[e]) : t !== n && (a[u + e] = i[e])) : a[u + e] = void 0;
|
|
2700
|
+
}), O(i).forEach(function(e) {
|
|
2701
|
+
m(o, e) || (a[u + e] = i[e]);
|
|
2702
|
+
}), a;
|
|
2703
|
+
}
|
|
2704
|
+
function Vn(e, t) {
|
|
2705
|
+
return "delete" === t.type ? t.keys : t.keys || t.values.map(e.extractKey);
|
|
2706
|
+
}
|
|
2707
|
+
var zn = {
|
|
2708
|
+
stack: "dbcore",
|
|
2709
|
+
name: "HooksMiddleware",
|
|
2710
|
+
level: 2,
|
|
2711
|
+
create: function(e) {
|
|
2712
|
+
return _(_({}, e), { table: function(r) {
|
|
2713
|
+
var y = e.table(r), v = y.schema.primaryKey;
|
|
2714
|
+
return _(_({}, y), { mutate: function(e) {
|
|
2715
|
+
var t = P.trans, n = t.table(r).hook, h = n.deleting, d = n.creating, p = n.updating;
|
|
2716
|
+
switch (e.type) {
|
|
2717
|
+
case "add":
|
|
2718
|
+
if (d.fire === g) break;
|
|
2719
|
+
return t._promise("readwrite", function() {
|
|
2720
|
+
return a(e);
|
|
2721
|
+
}, !0);
|
|
2722
|
+
case "put":
|
|
2723
|
+
if (d.fire === g && p.fire === g) break;
|
|
2724
|
+
return t._promise("readwrite", function() {
|
|
2725
|
+
return a(e);
|
|
2726
|
+
}, !0);
|
|
2727
|
+
case "delete":
|
|
2728
|
+
if (h.fire === g) break;
|
|
2729
|
+
return t._promise("readwrite", function() {
|
|
2730
|
+
return a(e);
|
|
2731
|
+
}, !0);
|
|
2732
|
+
case "deleteRange":
|
|
2733
|
+
if (h.fire === g) break;
|
|
2734
|
+
return t._promise("readwrite", function() {
|
|
2735
|
+
return function n(r, o, i) {
|
|
2736
|
+
return y.query({
|
|
2737
|
+
trans: r,
|
|
2738
|
+
values: !1,
|
|
2739
|
+
query: {
|
|
2740
|
+
index: v,
|
|
2741
|
+
range: o
|
|
2742
|
+
},
|
|
2743
|
+
limit: i
|
|
2744
|
+
}).then(function(e) {
|
|
2745
|
+
var t = e.result;
|
|
2746
|
+
return a({
|
|
2747
|
+
type: "delete",
|
|
2748
|
+
keys: t,
|
|
2749
|
+
trans: r
|
|
2750
|
+
}).then(function(e) {
|
|
2751
|
+
return 0 < e.numFailures ? Promise.reject(e.failures[0]) : t.length < i ? {
|
|
2752
|
+
failures: [],
|
|
2753
|
+
numFailures: 0,
|
|
2754
|
+
lastResult: void 0
|
|
2755
|
+
} : n(r, _(_({}, o), {
|
|
2756
|
+
lower: t[t.length - 1],
|
|
2757
|
+
lowerOpen: !0
|
|
2758
|
+
}), i);
|
|
2759
|
+
});
|
|
2760
|
+
});
|
|
2761
|
+
}(e.trans, e.range, 1e4);
|
|
2762
|
+
}, !0);
|
|
2763
|
+
}
|
|
2764
|
+
return y.mutate(e);
|
|
2765
|
+
function a(c) {
|
|
2766
|
+
var e, t, n, l = P.trans, f = c.keys || Vn(v, c);
|
|
2767
|
+
if (f) return "delete" !== (c = "add" === c.type || "put" === c.type ? _(_({}, c), { keys: f }) : _({}, c)).type && (c.values = R([], c.values, !0)), c.keys && (c.keys = R([], c.keys, !0)), e = y, n = f, ("add" === (t = c).type ? Promise.resolve([]) : e.getMany({
|
|
2768
|
+
trans: t.trans,
|
|
2769
|
+
keys: n,
|
|
2770
|
+
cache: "immutable"
|
|
2771
|
+
})).then(function(u) {
|
|
2772
|
+
var s = f.map(function(e, t) {
|
|
2773
|
+
var n, r, o, i = u[t], a = {
|
|
2774
|
+
onerror: null,
|
|
2775
|
+
onsuccess: null
|
|
2776
|
+
};
|
|
2777
|
+
return "delete" === c.type ? h.fire.call(a, e, i, l) : "add" === c.type || void 0 === i ? (n = d.fire.call(a, e, c.values[t], l), null == e && null != n && (c.keys[t] = e = n, v.outbound || b(c.values[t], v.keyPath, e))) : (n = Un(i, c.values[t]), (r = p.fire.call(a, n, e, i, l)) && (o = c.values[t], Object.keys(r).forEach(function(e) {
|
|
2778
|
+
m(o, e) ? o[e] = r[e] : b(o, e, r[e]);
|
|
2779
|
+
}))), a;
|
|
2780
|
+
});
|
|
2781
|
+
return y.mutate(c).then(function(e) {
|
|
2782
|
+
for (var t = e.failures, n = e.results, r = e.numFailures, e = e.lastResult, o = 0; o < f.length; ++o) {
|
|
2783
|
+
var i = (n || f)[o], a = s[o];
|
|
2784
|
+
null == i ? a.onerror && a.onerror(t[o]) : a.onsuccess && a.onsuccess("put" === c.type && u[o] ? c.values[o] : i);
|
|
2785
|
+
}
|
|
2786
|
+
return {
|
|
2787
|
+
failures: t,
|
|
2788
|
+
results: n,
|
|
2789
|
+
numFailures: r,
|
|
2790
|
+
lastResult: e
|
|
2791
|
+
};
|
|
2792
|
+
}).catch(function(t) {
|
|
2793
|
+
return s.forEach(function(e) {
|
|
2794
|
+
return e.onerror && e.onerror(t);
|
|
2795
|
+
}), Promise.reject(t);
|
|
2796
|
+
});
|
|
2797
|
+
});
|
|
2798
|
+
throw new Error("Keys missing");
|
|
2799
|
+
}
|
|
2800
|
+
} });
|
|
2801
|
+
} });
|
|
2802
|
+
}
|
|
2803
|
+
};
|
|
2804
|
+
function Wn(e, t, n) {
|
|
2805
|
+
try {
|
|
2806
|
+
if (!t) return null;
|
|
2807
|
+
if (t.keys.length < e.length) return null;
|
|
2808
|
+
for (var r = [], o = 0, i = 0; o < t.keys.length && i < e.length; ++o) 0 === j(t.keys[o], e[i]) && (r.push(n ? ee(t.values[o]) : t.values[o]), ++i);
|
|
2809
|
+
return r.length === e.length ? r : null;
|
|
2810
|
+
} catch (e) {
|
|
2811
|
+
return null;
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2814
|
+
var Yn = {
|
|
2815
|
+
stack: "dbcore",
|
|
2816
|
+
level: -1,
|
|
2817
|
+
create: function(t) {
|
|
2818
|
+
return { table: function(e) {
|
|
2819
|
+
var n = t.table(e);
|
|
2820
|
+
return _(_({}, n), {
|
|
2821
|
+
getMany: function(t) {
|
|
2822
|
+
var e;
|
|
2823
|
+
return t.cache ? (e = Wn(t.keys, t.trans._cache, "clone" === t.cache)) ? K.resolve(e) : n.getMany(t).then(function(e) {
|
|
2824
|
+
return t.trans._cache = {
|
|
2825
|
+
keys: t.keys,
|
|
2826
|
+
values: "clone" === t.cache ? ee(e) : e
|
|
2827
|
+
}, e;
|
|
2828
|
+
}) : n.getMany(t);
|
|
2829
|
+
},
|
|
2830
|
+
mutate: function(e) {
|
|
2831
|
+
return "add" !== e.type && (e.trans._cache = null), n.mutate(e);
|
|
2832
|
+
}
|
|
2833
|
+
});
|
|
2834
|
+
} };
|
|
2835
|
+
}
|
|
2836
|
+
};
|
|
2837
|
+
function $n(e, t) {
|
|
2838
|
+
return "readonly" === e.trans.mode && !!e.subscr && !e.trans.explicit && "disabled" !== e.trans.db._options.cache && !t.schema.primaryKey.outbound;
|
|
2839
|
+
}
|
|
2840
|
+
function Qn(e, t) {
|
|
2841
|
+
switch (e) {
|
|
2842
|
+
case "query": return t.values && !t.unique;
|
|
2843
|
+
case "get":
|
|
2844
|
+
case "getMany":
|
|
2845
|
+
case "count":
|
|
2846
|
+
case "openCursor": return !1;
|
|
2847
|
+
}
|
|
2848
|
+
}
|
|
2849
|
+
var Gn = {
|
|
2850
|
+
stack: "dbcore",
|
|
2851
|
+
level: 0,
|
|
2852
|
+
name: "Observability",
|
|
2853
|
+
create: function(b) {
|
|
2854
|
+
var g = b.schema.name, w = new I(b.MIN_KEY, b.MAX_KEY);
|
|
2855
|
+
return _(_({}, b), {
|
|
2856
|
+
transaction: function(e, t, n) {
|
|
2857
|
+
if (P.subscr && "readonly" !== t) throw new k.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(P.querier));
|
|
2858
|
+
return b.transaction(e, t, n);
|
|
2859
|
+
},
|
|
2860
|
+
table: function(d) {
|
|
2861
|
+
function e(e) {
|
|
2862
|
+
var t, e = e.query;
|
|
2863
|
+
return [t = e.index, new I(null != (t = (e = e.range).lower) ? t : b.MIN_KEY, null != (t = e.upper) ? t : b.MAX_KEY)];
|
|
2864
|
+
}
|
|
2865
|
+
var p = b.table(d), y = p.schema, v = y.primaryKey, t = y.indexes, c = v.extractKey, l = v.outbound, m = v.autoIncrement && t.filter(function(e) {
|
|
2866
|
+
return e.compound && e.keyPath.includes(v.keyPath);
|
|
2867
|
+
}), n = _(_({}, p), { mutate: function(a) {
|
|
2868
|
+
function u(e) {
|
|
2869
|
+
return e = "idb://".concat(g, "/").concat(d, "/").concat(e), n[e] || (n[e] = new I());
|
|
2870
|
+
}
|
|
2871
|
+
var e, i, s, t = a.trans, n = a.mutatedParts || (a.mutatedParts = {}), r = u(""), o = u(":dels"), c = a.type, l = "deleteRange" === a.type ? [a.range] : "delete" === a.type ? [a.keys] : a.values.length < 50 ? [Vn(v, a).filter(function(e) {
|
|
2872
|
+
return e;
|
|
2873
|
+
}), a.values] : [], f = l[0], l = l[1], h = a.trans._cache;
|
|
2874
|
+
return x(f) ? (r.addKeys(f), (c = "delete" === c || f.length === l.length ? Wn(f, h) : null) || o.addKeys(f), (c || l) && (e = u, i = c, s = l, y.indexes.forEach(function(t) {
|
|
2875
|
+
var n = e(t.name || "");
|
|
2876
|
+
function r(e) {
|
|
2877
|
+
return null != e ? t.extractKey(e) : null;
|
|
2878
|
+
}
|
|
2879
|
+
function o(e) {
|
|
2880
|
+
t.multiEntry && x(e) ? e.forEach(function(e) {
|
|
2881
|
+
return n.addKey(e);
|
|
2882
|
+
}) : n.addKey(e);
|
|
2883
|
+
}
|
|
2884
|
+
(i || s).forEach(function(e, t) {
|
|
2885
|
+
var n = i && r(i[t]), t = s && r(s[t]);
|
|
2886
|
+
0 !== j(n, t) && (null != n && o(n), null != t) && o(t);
|
|
2887
|
+
});
|
|
2888
|
+
}))) : f ? (l = {
|
|
2889
|
+
from: null != (h = f.lower) ? h : b.MIN_KEY,
|
|
2890
|
+
to: null != (c = f.upper) ? c : b.MAX_KEY
|
|
2891
|
+
}, o.add(l), r.add(l)) : (r.add(w), o.add(w), y.indexes.forEach(function(e) {
|
|
2892
|
+
return u(e.name).add(w);
|
|
2893
|
+
})), p.mutate(a).then(function(i) {
|
|
2894
|
+
return !f || "add" !== a.type && "put" !== a.type || (r.addKeys(i.results), m && m.forEach(function(t) {
|
|
2895
|
+
for (var e = a.values.map(function(e) {
|
|
2896
|
+
return t.extractKey(e);
|
|
2897
|
+
}), n = t.keyPath.findIndex(function(e) {
|
|
2898
|
+
return e === v.keyPath;
|
|
2899
|
+
}), r = 0, o = i.results.length; r < o; ++r) e[r][n] = i.results[r];
|
|
2900
|
+
u(t.name).addKeys(e);
|
|
2901
|
+
})), t.mutatedParts = An(t.mutatedParts || {}, n), i;
|
|
2902
|
+
});
|
|
2903
|
+
} }), f = {
|
|
2904
|
+
get: function(e) {
|
|
2905
|
+
return [v, new I(e.key)];
|
|
2906
|
+
},
|
|
2907
|
+
getMany: function(e) {
|
|
2908
|
+
return [v, new I().addKeys(e.keys)];
|
|
2909
|
+
},
|
|
2910
|
+
count: e,
|
|
2911
|
+
query: e,
|
|
2912
|
+
openCursor: e
|
|
2913
|
+
};
|
|
2914
|
+
return O(f).forEach(function(s) {
|
|
2915
|
+
n[s] = function(o) {
|
|
2916
|
+
var e = P.subscr, t = !!e, n = $n(P, p) && Qn(s, o) ? o.obsSet = {} : e;
|
|
2917
|
+
if (t) {
|
|
2918
|
+
var i, e = function(e) {
|
|
2919
|
+
e = "idb://".concat(g, "/").concat(d, "/").concat(e);
|
|
2920
|
+
return n[e] || (n[e] = new I());
|
|
2921
|
+
}, a = e(""), u = e(":dels"), t = f[s](o), r = t[0], t = t[1];
|
|
2922
|
+
if (("query" === s && r.isPrimaryKey && !o.values ? u : e(r.name || "")).add(t), !r.isPrimaryKey) {
|
|
2923
|
+
if ("count" !== s) return i = "query" === s && l && o.values && p.query(_(_({}, o), { values: !1 })), p[s].apply(this, arguments).then(function(t) {
|
|
2924
|
+
if ("query" === s) {
|
|
2925
|
+
if (l && o.values) return i.then(function(e) {
|
|
2926
|
+
e = e.result;
|
|
2927
|
+
return a.addKeys(e), t;
|
|
2928
|
+
});
|
|
2929
|
+
var e = o.values ? t.result.map(c) : t.result;
|
|
2930
|
+
(o.values ? a : u).addKeys(e);
|
|
2931
|
+
} else {
|
|
2932
|
+
var n, r;
|
|
2933
|
+
if ("openCursor" === s) return r = o.values, (n = t) && Object.create(n, {
|
|
2934
|
+
key: { get: function() {
|
|
2935
|
+
return u.addKey(n.primaryKey), n.key;
|
|
2936
|
+
} },
|
|
2937
|
+
primaryKey: { get: function() {
|
|
2938
|
+
var e = n.primaryKey;
|
|
2939
|
+
return u.addKey(e), e;
|
|
2940
|
+
} },
|
|
2941
|
+
value: { get: function() {
|
|
2942
|
+
return r && a.addKey(n.primaryKey), n.value;
|
|
2943
|
+
} }
|
|
2944
|
+
});
|
|
2945
|
+
}
|
|
2946
|
+
return t;
|
|
2947
|
+
});
|
|
2948
|
+
u.add(w);
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2951
|
+
return p[s].apply(this, arguments);
|
|
2952
|
+
};
|
|
2953
|
+
}), n;
|
|
2954
|
+
}
|
|
2955
|
+
});
|
|
2956
|
+
}
|
|
2957
|
+
};
|
|
2958
|
+
function Xn(e, t, n) {
|
|
2959
|
+
var r;
|
|
2960
|
+
return 0 === n.numFailures ? t : "deleteRange" === t.type || (r = t.keys ? t.keys.length : "values" in t && t.values ? t.values.length : 1, n.numFailures === r) ? null : (r = _({}, t), x(r.keys) && (r.keys = r.keys.filter(function(e, t) {
|
|
2961
|
+
return !(t in n.failures);
|
|
2962
|
+
})), "values" in r && x(r.values) && (r.values = r.values.filter(function(e, t) {
|
|
2963
|
+
return !(t in n.failures);
|
|
2964
|
+
})), r);
|
|
2965
|
+
}
|
|
2966
|
+
function Hn(e, t) {
|
|
2967
|
+
return n = e, (void 0 === (r = t).lower || (r.lowerOpen ? 0 < j(n, r.lower) : 0 <= j(n, r.lower))) && (n = e, void 0 === (r = t).upper || (r.upperOpen ? j(n, r.upper) < 0 : j(n, r.upper) <= 0));
|
|
2968
|
+
var n, r;
|
|
2969
|
+
}
|
|
2970
|
+
function Jn(e, d, t, n, r, o) {
|
|
2971
|
+
var i, p, y, v, m, a;
|
|
2972
|
+
return !t || 0 === t.length || (i = d.query.index, p = i.multiEntry, y = d.query.range, v = n.schema.primaryKey.extractKey, m = i.extractKey, a = (i.lowLevelIndex || i).extractKey, (n = t.reduce(function(e, t) {
|
|
2973
|
+
var n = e, r = [];
|
|
2974
|
+
if ("add" === t.type || "put" === t.type) for (var o = new I(), i = t.values.length - 1; 0 <= i; --i) {
|
|
2975
|
+
var a, u = t.values[i], s = v(u);
|
|
2976
|
+
!o.hasKey(s) && (a = m(u), p && x(a) ? a.some(function(e) {
|
|
2977
|
+
return Hn(e, y);
|
|
2978
|
+
}) : Hn(a, y)) && (o.addKey(s), r.push(u));
|
|
2979
|
+
}
|
|
2980
|
+
switch (t.type) {
|
|
2981
|
+
case "add":
|
|
2982
|
+
var c = new I().addKeys(d.values ? e.map(function(e) {
|
|
2983
|
+
return v(e);
|
|
2984
|
+
}) : e), n = e.concat(d.values ? r.filter(function(e) {
|
|
2985
|
+
e = v(e);
|
|
2986
|
+
return !c.hasKey(e) && (c.addKey(e), !0);
|
|
2987
|
+
}) : r.map(function(e) {
|
|
2988
|
+
return v(e);
|
|
2989
|
+
}).filter(function(e) {
|
|
2990
|
+
return !c.hasKey(e) && (c.addKey(e), !0);
|
|
2991
|
+
}));
|
|
2992
|
+
break;
|
|
2993
|
+
case "put":
|
|
2994
|
+
var l = new I().addKeys(t.values.map(function(e) {
|
|
2995
|
+
return v(e);
|
|
2996
|
+
}));
|
|
2997
|
+
n = e.filter(function(e) {
|
|
2998
|
+
return !l.hasKey(d.values ? v(e) : e);
|
|
2999
|
+
}).concat(d.values ? r : r.map(function(e) {
|
|
3000
|
+
return v(e);
|
|
3001
|
+
}));
|
|
3002
|
+
break;
|
|
3003
|
+
case "delete":
|
|
3004
|
+
var f = new I().addKeys(t.keys);
|
|
3005
|
+
n = e.filter(function(e) {
|
|
3006
|
+
return !f.hasKey(d.values ? v(e) : e);
|
|
3007
|
+
});
|
|
3008
|
+
break;
|
|
3009
|
+
case "deleteRange":
|
|
3010
|
+
var h = t.range;
|
|
3011
|
+
n = e.filter(function(e) {
|
|
3012
|
+
return !Hn(v(e), h);
|
|
3013
|
+
});
|
|
3014
|
+
}
|
|
3015
|
+
return n;
|
|
3016
|
+
}, e)) === e) ? e : (n.sort(function(e, t) {
|
|
3017
|
+
return j(a(e), a(t)) || j(v(e), v(t));
|
|
3018
|
+
}), d.limit && d.limit < Infinity && (n.length > d.limit ? n.length = d.limit : e.length === d.limit && n.length < d.limit && (r.dirty = !0)), o ? Object.freeze(n) : n);
|
|
3019
|
+
}
|
|
3020
|
+
function Zn(e, t) {
|
|
3021
|
+
return 0 === j(e.lower, t.lower) && 0 === j(e.upper, t.upper) && !!e.lowerOpen == !!t.lowerOpen && !!e.upperOpen == !!t.upperOpen;
|
|
3022
|
+
}
|
|
3023
|
+
function er(e, t) {
|
|
3024
|
+
return ((e, t, n, r) => {
|
|
3025
|
+
if (void 0 === e) return void 0 !== t ? -1 : 0;
|
|
3026
|
+
if (void 0 === t) return 1;
|
|
3027
|
+
if (0 === (e = j(e, t))) {
|
|
3028
|
+
if (n && r) return 0;
|
|
3029
|
+
if (n) return 1;
|
|
3030
|
+
if (r) return -1;
|
|
3031
|
+
}
|
|
3032
|
+
return e;
|
|
3033
|
+
})(e.lower, t.lower, e.lowerOpen, t.lowerOpen) <= 0 && 0 <= ((e, t, n, r) => {
|
|
3034
|
+
if (void 0 === e) return void 0 !== t ? 1 : 0;
|
|
3035
|
+
if (void 0 === t) return -1;
|
|
3036
|
+
if (0 === (e = j(e, t))) {
|
|
3037
|
+
if (n && r) return 0;
|
|
3038
|
+
if (n) return -1;
|
|
3039
|
+
if (r) return 1;
|
|
3040
|
+
}
|
|
3041
|
+
return e;
|
|
3042
|
+
})(e.upper, t.upper, e.upperOpen, t.upperOpen);
|
|
3043
|
+
}
|
|
3044
|
+
function tr(n, r, o, e) {
|
|
3045
|
+
n.subscribers.add(o), e.addEventListener("abort", function() {
|
|
3046
|
+
var e, t;
|
|
3047
|
+
n.subscribers.delete(o), 0 === n.subscribers.size && (e = n, t = r, setTimeout(function() {
|
|
3048
|
+
0 === e.subscribers.size && ie(t, e);
|
|
3049
|
+
}, 3e3));
|
|
3050
|
+
});
|
|
3051
|
+
}
|
|
3052
|
+
var nr = {
|
|
3053
|
+
stack: "dbcore",
|
|
3054
|
+
level: 0,
|
|
3055
|
+
name: "Cache",
|
|
3056
|
+
create: function(k) {
|
|
3057
|
+
var O = k.schema.name;
|
|
3058
|
+
return _(_({}, k), {
|
|
3059
|
+
transaction: function(g, w, e) {
|
|
3060
|
+
var _, t, x = k.transaction(g, w, e);
|
|
3061
|
+
return "readwrite" === w && (e = (_ = new AbortController()).signal, x.addEventListener("abort", (t = function(b) {
|
|
3062
|
+
return function() {
|
|
3063
|
+
if (_.abort(), "readwrite" === w) {
|
|
3064
|
+
for (var t = /* @__PURE__ */ new Set(), e = 0, n = g; e < n.length; e++) {
|
|
3065
|
+
var r = n[e], o = Tn["idb://".concat(O, "/").concat(r)];
|
|
3066
|
+
if (o) {
|
|
3067
|
+
var i = k.table(r), a = o.optimisticOps.filter(function(e) {
|
|
3068
|
+
return e.trans === x;
|
|
3069
|
+
});
|
|
3070
|
+
if (x._explicit && b && x.mutatedParts) for (var u = 0, s = Object.values(o.queries.query); u < s.length; u++) for (var c = 0, l = (d = s[u]).slice(); c < l.length; c++) Cn((p = l[c]).obsSet, x.mutatedParts) && (ie(d, p), p.subscribers.forEach(function(e) {
|
|
3071
|
+
return t.add(e);
|
|
3072
|
+
}));
|
|
3073
|
+
else if (0 < a.length) {
|
|
3074
|
+
o.optimisticOps = o.optimisticOps.filter(function(e) {
|
|
3075
|
+
return e.trans !== x;
|
|
3076
|
+
});
|
|
3077
|
+
for (var f = 0, h = Object.values(o.queries.query); f < h.length; f++) for (var d, p, y, v = 0, m = (d = h[f]).slice(); v < m.length; v++) null != (p = m[v]).res && x.mutatedParts && (b && !p.dirty ? (y = Object.isFrozen(p.res), y = Jn(p.res, p.req, a, i, p, y), p.dirty ? (ie(d, p), p.subscribers.forEach(function(e) {
|
|
3078
|
+
return t.add(e);
|
|
3079
|
+
})) : y !== p.res && (p.res = y, p.promise = K.resolve({ result: y }))) : (p.dirty && ie(d, p), p.subscribers.forEach(function(e) {
|
|
3080
|
+
return t.add(e);
|
|
3081
|
+
})));
|
|
3082
|
+
}
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
t.forEach(function(e) {
|
|
3086
|
+
return e();
|
|
3087
|
+
});
|
|
3088
|
+
}
|
|
3089
|
+
};
|
|
3090
|
+
})(!1), { signal: e }), x.addEventListener("error", t(!1), { signal: e }), x.addEventListener("complete", t(!0), { signal: e })), x;
|
|
3091
|
+
},
|
|
3092
|
+
table: function(s) {
|
|
3093
|
+
var c = k.table(s), o = c.schema.primaryKey;
|
|
3094
|
+
return _(_({}, c), {
|
|
3095
|
+
mutate: function(t) {
|
|
3096
|
+
var n, e = P.trans;
|
|
3097
|
+
return !o.outbound && "disabled" !== e.db._options.cache && !e.explicit && "readwrite" === e.idbtrans.mode && (n = Tn["idb://".concat(O, "/").concat(s)]) ? (e = c.mutate(t), "add" !== t.type && "put" !== t.type || !(50 <= t.values.length || Vn(o, t).some(function(e) {
|
|
3098
|
+
return null == e;
|
|
3099
|
+
})) ? (n.optimisticOps.push(t), t.mutatedParts && Dn(t.mutatedParts), e.then(function(e) {
|
|
3100
|
+
0 < e.numFailures && (ie(n.optimisticOps, t), (e = Xn(0, t, e)) && n.optimisticOps.push(e), t.mutatedParts) && Dn(t.mutatedParts);
|
|
3101
|
+
}), e.catch(function() {
|
|
3102
|
+
ie(n.optimisticOps, t), t.mutatedParts && Dn(t.mutatedParts);
|
|
3103
|
+
})) : e.then(function(r) {
|
|
3104
|
+
var e = Xn(0, _(_({}, t), { values: t.values.map(function(e, t) {
|
|
3105
|
+
var n;
|
|
3106
|
+
return r.failures[t] ? e : (b(n = null != (n = o.keyPath) && n.includes(".") ? ee(e) : _({}, e), o.keyPath, r.results[t]), n);
|
|
3107
|
+
}) }), r);
|
|
3108
|
+
n.optimisticOps.push(e), queueMicrotask(function() {
|
|
3109
|
+
return t.mutatedParts && Dn(t.mutatedParts);
|
|
3110
|
+
});
|
|
3111
|
+
}), e) : c.mutate(t);
|
|
3112
|
+
},
|
|
3113
|
+
query: function(t) {
|
|
3114
|
+
var o, e, n, r, i, a, u;
|
|
3115
|
+
return $n(P, c) && Qn("query", t) ? (o = "immutable" === (null == (n = P.trans) ? void 0 : n.db._options.cache), e = (n = P).requery, n = n.signal, a = ((e, t, n, r) => {
|
|
3116
|
+
var o = Tn["idb://".concat(e, "/").concat(t)];
|
|
3117
|
+
if (!o) return [];
|
|
3118
|
+
if (!(e = o.queries[n])) return [
|
|
3119
|
+
null,
|
|
3120
|
+
!1,
|
|
3121
|
+
o,
|
|
3122
|
+
null
|
|
3123
|
+
];
|
|
3124
|
+
var i = e[(r.query ? r.query.index.name : null) || ""];
|
|
3125
|
+
if (!i) return [
|
|
3126
|
+
null,
|
|
3127
|
+
!1,
|
|
3128
|
+
o,
|
|
3129
|
+
null
|
|
3130
|
+
];
|
|
3131
|
+
switch (n) {
|
|
3132
|
+
case "query":
|
|
3133
|
+
var a = i.find(function(e) {
|
|
3134
|
+
return e.req.limit === r.limit && e.req.values === r.values && Zn(e.req.query.range, r.query.range);
|
|
3135
|
+
});
|
|
3136
|
+
return a ? [
|
|
3137
|
+
a,
|
|
3138
|
+
!0,
|
|
3139
|
+
o,
|
|
3140
|
+
i
|
|
3141
|
+
] : [
|
|
3142
|
+
i.find(function(e) {
|
|
3143
|
+
return ("limit" in e.req ? e.req.limit : Infinity) >= r.limit && (!r.values || e.req.values) && er(e.req.query.range, r.query.range);
|
|
3144
|
+
}),
|
|
3145
|
+
!1,
|
|
3146
|
+
o,
|
|
3147
|
+
i
|
|
3148
|
+
];
|
|
3149
|
+
case "count":
|
|
3150
|
+
a = i.find(function(e) {
|
|
3151
|
+
return Zn(e.req.query.range, r.query.range);
|
|
3152
|
+
});
|
|
3153
|
+
return [
|
|
3154
|
+
a,
|
|
3155
|
+
!!a,
|
|
3156
|
+
o,
|
|
3157
|
+
i
|
|
3158
|
+
];
|
|
3159
|
+
}
|
|
3160
|
+
})(O, s, "query", t), u = a[0], r = a[2], i = a[3], u && a[1] ? u.obsSet = t.obsSet : (a = c.query(t).then(function(e) {
|
|
3161
|
+
var t = e.result;
|
|
3162
|
+
if (u && (u.res = t), o) {
|
|
3163
|
+
for (var n = 0, r = t.length; n < r; ++n) Object.freeze(t[n]);
|
|
3164
|
+
Object.freeze(t);
|
|
3165
|
+
} else e.result = ee(t);
|
|
3166
|
+
return e;
|
|
3167
|
+
}).catch(function(e) {
|
|
3168
|
+
return i && u && ie(i, u), Promise.reject(e);
|
|
3169
|
+
}), u = {
|
|
3170
|
+
obsSet: t.obsSet,
|
|
3171
|
+
promise: a,
|
|
3172
|
+
subscribers: /* @__PURE__ */ new Set(),
|
|
3173
|
+
type: "query",
|
|
3174
|
+
req: t,
|
|
3175
|
+
dirty: !1
|
|
3176
|
+
}, i ? i.push(u) : (i = [u], (r = r || (Tn["idb://".concat(O, "/").concat(s)] = {
|
|
3177
|
+
queries: {
|
|
3178
|
+
query: {},
|
|
3179
|
+
count: {}
|
|
3180
|
+
},
|
|
3181
|
+
objs: /* @__PURE__ */ new Map(),
|
|
3182
|
+
optimisticOps: [],
|
|
3183
|
+
unsignaledParts: {}
|
|
3184
|
+
})).queries.query[t.query.index.name || ""] = i)), tr(u, i, e, n), u.promise.then(function(e) {
|
|
3185
|
+
return { result: Jn(e.result, t, null == r ? void 0 : r.optimisticOps, c, u, o) };
|
|
3186
|
+
})) : c.query(t);
|
|
3187
|
+
}
|
|
3188
|
+
});
|
|
3189
|
+
}
|
|
3190
|
+
});
|
|
3191
|
+
}
|
|
3192
|
+
};
|
|
3193
|
+
function rr(e, r) {
|
|
3194
|
+
return new Proxy(e, { get: function(e, t, n) {
|
|
3195
|
+
return "db" === t ? r : Reflect.get(e, t, n);
|
|
3196
|
+
} });
|
|
3197
|
+
}
|
|
3198
|
+
D.prototype.version = function(t) {
|
|
3199
|
+
if (isNaN(t) || t < .1) throw new k.Type("Given version is not a positive number");
|
|
3200
|
+
if (t = Math.round(10 * t) / 10, this.idbdb || this._state.isBeingOpened) throw new k.Schema("Cannot add version when database is open");
|
|
3201
|
+
this.verno = Math.max(this.verno, t);
|
|
3202
|
+
var e = this._versions, n = e.filter(function(e) {
|
|
3203
|
+
return e._cfg.version === t;
|
|
3204
|
+
})[0];
|
|
3205
|
+
return n || (n = new this.Version(t), e.push(n), e.sort(sn), n.stores({}), this._state.autoSchema = !1), n;
|
|
3206
|
+
}, D.prototype._whenReady = function(e) {
|
|
3207
|
+
var n = this;
|
|
3208
|
+
return this.idbdb && (this._state.openComplete || P.letThrough || this._vip) ? e() : new K(function(e, t) {
|
|
3209
|
+
if (n._state.openComplete) return t(new k.DatabaseClosed(n._state.dbOpenError));
|
|
3210
|
+
if (!n._state.isBeingOpened) {
|
|
3211
|
+
if (!n._state.autoOpen) return void t(new k.DatabaseClosed());
|
|
3212
|
+
n.open().catch(g);
|
|
3213
|
+
}
|
|
3214
|
+
n._state.dbReadyPromise.then(e, t);
|
|
3215
|
+
}).then(e);
|
|
3216
|
+
}, D.prototype.use = function(e) {
|
|
3217
|
+
var t = e.stack, n = e.create, r = e.level, e = e.name, o = (e && this.unuse({
|
|
3218
|
+
stack: t,
|
|
3219
|
+
name: e
|
|
3220
|
+
}), this._middlewares[t] || (this._middlewares[t] = []));
|
|
3221
|
+
return o.push({
|
|
3222
|
+
stack: t,
|
|
3223
|
+
create: n,
|
|
3224
|
+
level: null == r ? 10 : r,
|
|
3225
|
+
name: e
|
|
3226
|
+
}), o.sort(function(e, t) {
|
|
3227
|
+
return e.level - t.level;
|
|
3228
|
+
}), this;
|
|
3229
|
+
}, D.prototype.unuse = function(e) {
|
|
3230
|
+
var t = e.stack, n = e.name, r = e.create;
|
|
3231
|
+
return t && this._middlewares[t] && (this._middlewares[t] = this._middlewares[t].filter(function(e) {
|
|
3232
|
+
return r ? e.create !== r : !!n && e.name !== n;
|
|
3233
|
+
})), this;
|
|
3234
|
+
}, D.prototype.open = function() {
|
|
3235
|
+
var e = this;
|
|
3236
|
+
return at(s, function() {
|
|
3237
|
+
return Fn(e);
|
|
3238
|
+
});
|
|
3239
|
+
}, D.prototype._close = function() {
|
|
3240
|
+
this.on.close.fire(new CustomEvent("close"));
|
|
3241
|
+
var n = this._state, e = ft.indexOf(this);
|
|
3242
|
+
if (0 <= e && ft.splice(e, 1), this.idbdb) {
|
|
3243
|
+
try {
|
|
3244
|
+
this.idbdb.close();
|
|
3245
|
+
} catch (e) {}
|
|
3246
|
+
this.idbdb = null;
|
|
3247
|
+
}
|
|
3248
|
+
n.isBeingOpened || (n.dbReadyPromise = new K(function(e) {
|
|
3249
|
+
n.dbReadyResolve = e;
|
|
3250
|
+
}), n.openCanceller = new K(function(e, t) {
|
|
3251
|
+
n.cancelOpen = t;
|
|
3252
|
+
}));
|
|
3253
|
+
}, D.prototype.close = function(e) {
|
|
3254
|
+
var e = (void 0 === e ? { disableAutoOpen: !0 } : e).disableAutoOpen, t = this._state;
|
|
3255
|
+
e ? (t.isBeingOpened && t.cancelOpen(new k.DatabaseClosed()), this._close(), t.autoOpen = !1, t.dbOpenError = new k.DatabaseClosed()) : (this._close(), t.autoOpen = this._options.autoOpen || t.isBeingOpened, t.openComplete = !1, t.dbOpenError = null);
|
|
3256
|
+
}, D.prototype.delete = function(n) {
|
|
3257
|
+
var o = this, i = (void 0 === n && (n = { disableAutoOpen: !0 }), 0 < arguments.length && "object" != typeof arguments[0]), a = this._state;
|
|
3258
|
+
return new K(function(r, t) {
|
|
3259
|
+
function e() {
|
|
3260
|
+
o.close(n);
|
|
3261
|
+
var e = o._deps.indexedDB.deleteDatabase(o.name);
|
|
3262
|
+
e.onsuccess = E(function() {
|
|
3263
|
+
var e = o._deps, t = o.name, n;
|
|
3264
|
+
_n(n = e.indexedDB) || t === ht || wn(n, e.IDBKeyRange).delete(t).catch(g), r();
|
|
3265
|
+
}), e.onerror = T(t), e.onblocked = o._fireOnBlocked;
|
|
3266
|
+
}
|
|
3267
|
+
if (i) throw new k.InvalidArgument("Invalid closeOptions argument to db.delete()");
|
|
3268
|
+
a.isBeingOpened ? a.dbReadyPromise.then(e) : e();
|
|
3269
|
+
});
|
|
3270
|
+
}, D.prototype.backendDB = function() {
|
|
3271
|
+
return this.idbdb;
|
|
3272
|
+
}, D.prototype.isOpen = function() {
|
|
3273
|
+
return null !== this.idbdb;
|
|
3274
|
+
}, D.prototype.hasBeenClosed = function() {
|
|
3275
|
+
var e = this._state.dbOpenError;
|
|
3276
|
+
return e && "DatabaseClosed" === e.name;
|
|
3277
|
+
}, D.prototype.hasFailed = function() {
|
|
3278
|
+
return null !== this._state.dbOpenError;
|
|
3279
|
+
}, D.prototype.dynamicallyOpened = function() {
|
|
3280
|
+
return this._state.autoSchema;
|
|
3281
|
+
}, Object.defineProperty(D.prototype, "tables", {
|
|
3282
|
+
get: function() {
|
|
3283
|
+
var t = this;
|
|
3284
|
+
return O(this._allTables).map(function(e) {
|
|
3285
|
+
return t._allTables[e];
|
|
3286
|
+
});
|
|
3287
|
+
},
|
|
3288
|
+
enumerable: !1,
|
|
3289
|
+
configurable: !0
|
|
3290
|
+
}), D.prototype.transaction = function() {
|
|
3291
|
+
var e = function(e, t, n) {
|
|
3292
|
+
var r = arguments.length;
|
|
3293
|
+
if (r < 2) throw new k.InvalidArgument("Too few arguments");
|
|
3294
|
+
for (var o = new Array(r - 1); --r;) o[r - 1] = arguments[r];
|
|
3295
|
+
return n = o.pop(), [
|
|
3296
|
+
e,
|
|
3297
|
+
H(o),
|
|
3298
|
+
n
|
|
3299
|
+
];
|
|
3300
|
+
}.apply(this, arguments);
|
|
3301
|
+
return this._transaction.apply(this, e);
|
|
3302
|
+
}, D.prototype._transaction = function(e, t, n) {
|
|
3303
|
+
var r, o, i = this, a = P.trans, u = (a && a.db === this && -1 === e.indexOf("!") || (a = null), -1 !== e.indexOf("?"));
|
|
3304
|
+
e = e.replace("!", "").replace("?", "");
|
|
3305
|
+
try {
|
|
3306
|
+
if (o = t.map(function(e) {
|
|
3307
|
+
e = e instanceof i.Table ? e.name : e;
|
|
3308
|
+
if ("string" != typeof e) throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");
|
|
3309
|
+
return e;
|
|
3310
|
+
}), "r" == e || e === dt) r = dt;
|
|
3311
|
+
else {
|
|
3312
|
+
if ("rw" != e && e != pt) throw new k.InvalidArgument("Invalid transaction mode: " + e);
|
|
3313
|
+
r = pt;
|
|
3314
|
+
}
|
|
3315
|
+
if (a) {
|
|
3316
|
+
if (a.mode === dt && r === pt) {
|
|
3317
|
+
if (!u) throw new k.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
|
|
3318
|
+
a = null;
|
|
3319
|
+
}
|
|
3320
|
+
a && o.forEach(function(e) {
|
|
3321
|
+
if (a && -1 === a.storeNames.indexOf(e)) {
|
|
3322
|
+
if (!u) throw new k.SubTransaction("Table " + e + " not included in parent transaction.");
|
|
3323
|
+
a = null;
|
|
3324
|
+
}
|
|
3325
|
+
}), u && a && !a.active && (a = null);
|
|
3326
|
+
}
|
|
3327
|
+
} catch (n) {
|
|
3328
|
+
return a ? a._promise(null, function(e, t) {
|
|
3329
|
+
t(n);
|
|
3330
|
+
}) : w(n);
|
|
3331
|
+
}
|
|
3332
|
+
var s = function o(i, a, u, s, c) {
|
|
3333
|
+
return K.resolve().then(function() {
|
|
3334
|
+
var e = P.transless || P, t = i._createTransaction(a, u, i._dbSchema, s), e = (t.explicit = !0, {
|
|
3335
|
+
trans: t,
|
|
3336
|
+
transless: e
|
|
3337
|
+
});
|
|
3338
|
+
if (s) t.idbtrans = s.idbtrans;
|
|
3339
|
+
else try {
|
|
3340
|
+
t.create(), t.idbtrans._explicit = !0, i._state.PR1398_maxLoop = 3;
|
|
3341
|
+
} catch (e) {
|
|
3342
|
+
return e.name === de.InvalidState && i.isOpen() && 0 < --i._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), i.close({ disableAutoOpen: !1 }), i.open().then(function() {
|
|
3343
|
+
return o(i, a, u, null, c);
|
|
3344
|
+
})) : w(e);
|
|
3345
|
+
}
|
|
3346
|
+
var n, r = ue(c), e = (r && nt(), K.follow(function() {
|
|
3347
|
+
var e;
|
|
3348
|
+
(n = c.call(t, t)) && (r ? (e = v.bind(null, null), n.then(e, e)) : "function" == typeof n.next && "function" == typeof n.throw && (n = Mn(n)));
|
|
3349
|
+
}, e));
|
|
3350
|
+
return (n && "function" == typeof n.then ? K.resolve(n).then(function(e) {
|
|
3351
|
+
return t.active ? e : w(new k.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
|
|
3352
|
+
}) : e.then(function() {
|
|
3353
|
+
return n;
|
|
3354
|
+
})).then(function(e) {
|
|
3355
|
+
return s && t._resolve(), t._completion.then(function() {
|
|
3356
|
+
return e;
|
|
3357
|
+
});
|
|
3358
|
+
}).catch(function(e) {
|
|
3359
|
+
return t._reject(e), w(e);
|
|
3360
|
+
});
|
|
3361
|
+
});
|
|
3362
|
+
}.bind(null, this, r, o, a, n);
|
|
3363
|
+
return a ? a._promise(r, s, "lock") : P.trans ? at(P.transless, function() {
|
|
3364
|
+
return i._whenReady(s);
|
|
3365
|
+
}) : this._whenReady(s);
|
|
3366
|
+
}, D.prototype.table = function(e) {
|
|
3367
|
+
if (m(this._allTables, e)) return this._allTables[e];
|
|
3368
|
+
throw new k.InvalidTable("Table ".concat(e, " does not exist"));
|
|
3369
|
+
};
|
|
3370
|
+
var q = D;
|
|
3371
|
+
function D(e, t) {
|
|
3372
|
+
var i, r, a, n, o, u = this, s = (this._middlewares = {}, this.verno = 0, D.dependencies), s = (this._options = t = _({
|
|
3373
|
+
addons: D.addons,
|
|
3374
|
+
autoOpen: !0,
|
|
3375
|
+
indexedDB: s.indexedDB,
|
|
3376
|
+
IDBKeyRange: s.IDBKeyRange,
|
|
3377
|
+
cache: "cloned"
|
|
3378
|
+
}, t), this._deps = {
|
|
3379
|
+
indexedDB: t.indexedDB,
|
|
3380
|
+
IDBKeyRange: t.IDBKeyRange
|
|
3381
|
+
}, t.addons), c = (this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this, {
|
|
3382
|
+
dbOpenError: null,
|
|
3383
|
+
isBeingOpened: !1,
|
|
3384
|
+
onReadyBeingFired: null,
|
|
3385
|
+
openComplete: !1,
|
|
3386
|
+
dbReadyResolve: g,
|
|
3387
|
+
dbReadyPromise: null,
|
|
3388
|
+
cancelOpen: g,
|
|
3389
|
+
openCanceller: null,
|
|
3390
|
+
autoSchema: !0,
|
|
3391
|
+
PR1398_maxLoop: 3,
|
|
3392
|
+
autoOpen: t.autoOpen
|
|
3393
|
+
}), l = (c.dbReadyPromise = new K(function(e) {
|
|
3394
|
+
c.dbReadyResolve = e;
|
|
3395
|
+
}), c.openCanceller = new K(function(e, t) {
|
|
3396
|
+
c.cancelOpen = t;
|
|
3397
|
+
}), this._state = c, this.name = e, this.on = Kt(this, "populate", "blocked", "versionchange", "close", { ready: [ke, g] }), this.once = function(n, r) {
|
|
3398
|
+
var o = function() {
|
|
3399
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
3400
|
+
u.on(n).unsubscribe(o), r.apply(u, e);
|
|
3401
|
+
};
|
|
3402
|
+
return u.on(n, o);
|
|
3403
|
+
}, this.on.ready.subscribe = Y(this.on.ready.subscribe, function(o) {
|
|
3404
|
+
return function(n, r) {
|
|
3405
|
+
D.vip(function() {
|
|
3406
|
+
var t, e = u._state;
|
|
3407
|
+
e.openComplete ? (e.dbOpenError || K.resolve().then(n), r && o(n)) : e.onReadyBeingFired ? (e.onReadyBeingFired.push(n), r && o(n)) : (o(n), t = u, r || o(function e() {
|
|
3408
|
+
t.on.ready.unsubscribe(n), t.on.ready.unsubscribe(e);
|
|
3409
|
+
}));
|
|
3410
|
+
});
|
|
3411
|
+
};
|
|
3412
|
+
}), this.Collection = (i = this, Et(Dt.prototype, function(e, t) {
|
|
3413
|
+
this.db = i;
|
|
3414
|
+
var n = vt, r = null;
|
|
3415
|
+
if (t) try {
|
|
3416
|
+
n = t();
|
|
3417
|
+
} catch (e) {
|
|
3418
|
+
r = e;
|
|
3419
|
+
}
|
|
3420
|
+
var t = e._ctx, e = t.table, o = e.hook.reading.fire;
|
|
3421
|
+
this._ctx = {
|
|
3422
|
+
table: e,
|
|
3423
|
+
index: t.index,
|
|
3424
|
+
isPrimKey: !t.index || e.schema.primKey.keyPath && t.index === e.schema.primKey.name,
|
|
3425
|
+
range: n,
|
|
3426
|
+
keysOnly: !1,
|
|
3427
|
+
dir: "next",
|
|
3428
|
+
unique: "",
|
|
3429
|
+
algorithm: null,
|
|
3430
|
+
filter: null,
|
|
3431
|
+
replayFilter: null,
|
|
3432
|
+
justLimit: !0,
|
|
3433
|
+
isMatch: null,
|
|
3434
|
+
offset: 0,
|
|
3435
|
+
limit: Infinity,
|
|
3436
|
+
error: r,
|
|
3437
|
+
or: t.or,
|
|
3438
|
+
valueMapper: o !== ve ? o : null
|
|
3439
|
+
};
|
|
3440
|
+
})), this.Table = (r = this, Et(Pt.prototype, function(e, t, n) {
|
|
3441
|
+
this.db = r, this._tx = n, this.name = e, this.schema = t, this.hook = r._allTables[e] ? r._allTables[e].hook : Kt(null, {
|
|
3442
|
+
creating: [ge, g],
|
|
3443
|
+
reading: [me, ve],
|
|
3444
|
+
updating: [_e, g],
|
|
3445
|
+
deleting: [we, g]
|
|
3446
|
+
});
|
|
3447
|
+
})), this.Transaction = (a = this, Et($t.prototype, function(e, t, n, r, o) {
|
|
3448
|
+
var i = this;
|
|
3449
|
+
"readonly" !== e && t.forEach(function(e) {
|
|
3450
|
+
e = null == (e = n[e]) ? void 0 : e.yProps;
|
|
3451
|
+
e && (t = t.concat(e.map(function(e) {
|
|
3452
|
+
return e.updatesTable;
|
|
3453
|
+
})));
|
|
3454
|
+
}), this.db = a, this.mode = e, this.storeNames = t, this.schema = n, this.chromeTransactionDurability = r, this.idbtrans = null, this.on = Kt(this, "complete", "error", "abort"), this.parent = o || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new K(function(e, t) {
|
|
3455
|
+
i._resolve = e, i._reject = t;
|
|
3456
|
+
}), this._completion.then(function() {
|
|
3457
|
+
i.active = !1, i.on.complete.fire();
|
|
3458
|
+
}, function(e) {
|
|
3459
|
+
var t = i.active;
|
|
3460
|
+
return i.active = !1, i.on.error.fire(e), i.parent ? i.parent._reject(e) : t && i.idbtrans && i.idbtrans.abort(), w(e);
|
|
3461
|
+
});
|
|
3462
|
+
})), this.Version = (n = this, Et(bn.prototype, function(e) {
|
|
3463
|
+
this.db = n, this._cfg = {
|
|
3464
|
+
version: e,
|
|
3465
|
+
storesSource: null,
|
|
3466
|
+
dbschema: {},
|
|
3467
|
+
tables: {},
|
|
3468
|
+
contentUpgrade: null
|
|
3469
|
+
};
|
|
3470
|
+
})), this.WhereClause = (o = this, Et(Ut.prototype, function(e, t, n) {
|
|
3471
|
+
if (this.db = o, this._ctx = {
|
|
3472
|
+
table: e,
|
|
3473
|
+
index: ":id" === t ? null : t,
|
|
3474
|
+
or: n
|
|
3475
|
+
}, this._cmp = this._ascending = j, this._descending = function(e, t) {
|
|
3476
|
+
return j(t, e);
|
|
3477
|
+
}, this._max = function(e, t) {
|
|
3478
|
+
return 0 < j(e, t) ? e : t;
|
|
3479
|
+
}, this._min = function(e, t) {
|
|
3480
|
+
return j(e, t) < 0 ? e : t;
|
|
3481
|
+
}, this._IDBKeyRange = o._deps.IDBKeyRange, !this._IDBKeyRange) throw new k.MissingAPI();
|
|
3482
|
+
})), this.on("versionchange", function(e) {
|
|
3483
|
+
0 < e.newVersion ? console.warn("Another connection wants to upgrade database '".concat(u.name, "'. Closing db now to resume the upgrade.")) : console.warn("Another connection wants to delete database '".concat(u.name, "'. Closing db now to resume the delete request.")), u.close({ disableAutoOpen: !1 });
|
|
3484
|
+
}), this.on("blocked", function(e) {
|
|
3485
|
+
!e.newVersion || e.newVersion < e.oldVersion ? console.warn("Dexie.delete('".concat(u.name, "') was blocked")) : console.warn("Upgrade '".concat(u.name, "' blocked by other connection holding version ").concat(e.oldVersion / 10));
|
|
3486
|
+
}), this._maxKey = Ht(t.IDBKeyRange), this._createTransaction = function(e, t, n, r) {
|
|
3487
|
+
return new u.Transaction(e, t, n, u._options.chromeTransactionDurability, r);
|
|
3488
|
+
}, this._fireOnBlocked = function(t) {
|
|
3489
|
+
u.on("blocked").fire(t), ft.filter(function(e) {
|
|
3490
|
+
return e.name === u.name && e !== u && !e._state.vcFired;
|
|
3491
|
+
}).map(function(e) {
|
|
3492
|
+
return e.on("versionchange").fire(t);
|
|
3493
|
+
});
|
|
3494
|
+
}, this.use(Yn), this.use(nr), this.use(Gn), this.use(Ln), this.use(zn), new Proxy(this, { get: function(e, t, n) {
|
|
3495
|
+
var r;
|
|
3496
|
+
return "_vip" === t || ("table" === t ? function(e) {
|
|
3497
|
+
return rr(u.table(e), l);
|
|
3498
|
+
} : (r = Reflect.get(e, t, n)) instanceof Pt ? rr(r, l) : "tables" === t ? r.map(function(e) {
|
|
3499
|
+
return rr(e, l);
|
|
3500
|
+
}) : "_createTransaction" === t ? function() {
|
|
3501
|
+
return rr(r.apply(this, arguments), l);
|
|
3502
|
+
} : r);
|
|
3503
|
+
} }));
|
|
3504
|
+
this.vip = l, s.forEach(function(e) {
|
|
3505
|
+
return e(u);
|
|
3506
|
+
});
|
|
3507
|
+
}
|
|
3508
|
+
var or, Se = "undefined" != typeof Symbol && "observable" in Symbol ? Symbol.observable : "@@observable", ir = (ar.prototype.subscribe = function(e, t, n) {
|
|
3509
|
+
return this._subscribe(e && "function" != typeof e ? e : {
|
|
3510
|
+
next: e,
|
|
3511
|
+
error: t,
|
|
3512
|
+
complete: n
|
|
3513
|
+
});
|
|
3514
|
+
}, ar.prototype[Se] = function() {
|
|
3515
|
+
return this;
|
|
3516
|
+
}, ar);
|
|
3517
|
+
function ar(e) {
|
|
3518
|
+
this._subscribe = e;
|
|
3519
|
+
}
|
|
3520
|
+
try {
|
|
3521
|
+
or = {
|
|
3522
|
+
indexedDB: f.indexedDB || f.mozIndexedDB || f.webkitIndexedDB || f.msIndexedDB,
|
|
3523
|
+
IDBKeyRange: f.IDBKeyRange || f.webkitIDBKeyRange
|
|
3524
|
+
};
|
|
3525
|
+
} catch (e) {
|
|
3526
|
+
or = {
|
|
3527
|
+
indexedDB: null,
|
|
3528
|
+
IDBKeyRange: null
|
|
3529
|
+
};
|
|
3530
|
+
}
|
|
3531
|
+
function ur(h) {
|
|
3532
|
+
var d, p = !1, e = new ir(function(r) {
|
|
3533
|
+
var o = ue(h);
|
|
3534
|
+
var i, a = !1, u = {}, s = {}, e = {
|
|
3535
|
+
get closed() {
|
|
3536
|
+
return a;
|
|
3537
|
+
},
|
|
3538
|
+
unsubscribe: function() {
|
|
3539
|
+
a || (a = !0, i && i.abort(), c && Yt.storagemutated.unsubscribe(f));
|
|
3540
|
+
}
|
|
3541
|
+
}, c = (r.start && r.start(e), !1), l = function() {
|
|
3542
|
+
return st(t);
|
|
3543
|
+
};
|
|
3544
|
+
var f = function(e) {
|
|
3545
|
+
An(u, e), Cn(s, u) && l();
|
|
3546
|
+
}, t = function() {
|
|
3547
|
+
var t, n, e;
|
|
3548
|
+
!a && or.indexedDB && (u = {}, t = {}, i && i.abort(), i = new AbortController(), e = ((e) => {
|
|
3549
|
+
var t = $e();
|
|
3550
|
+
try {
|
|
3551
|
+
o && nt();
|
|
3552
|
+
var n = y(h, e);
|
|
3553
|
+
return n = o ? n.finally(v) : n;
|
|
3554
|
+
} finally {
|
|
3555
|
+
t && Qe();
|
|
3556
|
+
}
|
|
3557
|
+
})(n = {
|
|
3558
|
+
subscr: t,
|
|
3559
|
+
signal: i.signal,
|
|
3560
|
+
requery: l,
|
|
3561
|
+
querier: h,
|
|
3562
|
+
trans: null
|
|
3563
|
+
}), Promise.resolve(e).then(function(e) {
|
|
3564
|
+
p = !0, d = e, a || n.signal.aborted || (u = {}, ((e) => {
|
|
3565
|
+
for (var t in e) if (m(e, t)) return;
|
|
3566
|
+
return 1;
|
|
3567
|
+
})(s = t) || c || (Yt(zt, f), c = !0), st(function() {
|
|
3568
|
+
return !a && r.next && r.next(e);
|
|
3569
|
+
}));
|
|
3570
|
+
}, function(e) {
|
|
3571
|
+
p = !1, ["DatabaseClosedError", "AbortError"].includes(null == e ? void 0 : e.name) || a || st(function() {
|
|
3572
|
+
a || r.error && r.error(e);
|
|
3573
|
+
});
|
|
3574
|
+
}));
|
|
3575
|
+
};
|
|
3576
|
+
return setTimeout(l, 0), e;
|
|
3577
|
+
});
|
|
3578
|
+
return e.hasValue = function() {
|
|
3579
|
+
return p;
|
|
3580
|
+
}, e.getValue = function() {
|
|
3581
|
+
return d;
|
|
3582
|
+
}, e;
|
|
3583
|
+
}
|
|
3584
|
+
var sr = q;
|
|
3585
|
+
function cr(e) {
|
|
3586
|
+
var t = fr;
|
|
3587
|
+
try {
|
|
3588
|
+
fr = !0, Yt.storagemutated.fire(e), Bn(e, !0);
|
|
3589
|
+
} finally {
|
|
3590
|
+
fr = t;
|
|
3591
|
+
}
|
|
3592
|
+
}
|
|
3593
|
+
N(sr, _(_({}, e), {
|
|
3594
|
+
delete: function(e) {
|
|
3595
|
+
return new sr(e, { addons: [] }).delete();
|
|
3596
|
+
},
|
|
3597
|
+
exists: function(e) {
|
|
3598
|
+
return new sr(e, { addons: [] }).open().then(function(e) {
|
|
3599
|
+
return e.close(), !0;
|
|
3600
|
+
}).catch("NoSuchDatabaseError", function() {
|
|
3601
|
+
return !1;
|
|
3602
|
+
});
|
|
3603
|
+
},
|
|
3604
|
+
getDatabaseNames: function(e) {
|
|
3605
|
+
try {
|
|
3606
|
+
return t = sr.dependencies, n = t.indexedDB, t = t.IDBKeyRange, (_n(n) ? Promise.resolve(n.databases()).then(function(e) {
|
|
3607
|
+
return e.map(function(e) {
|
|
3608
|
+
return e.name;
|
|
3609
|
+
}).filter(function(e) {
|
|
3610
|
+
return e !== ht;
|
|
3611
|
+
});
|
|
3612
|
+
}) : wn(n, t).toCollection().primaryKeys()).then(e);
|
|
3613
|
+
} catch (e) {
|
|
3614
|
+
return w(new k.MissingAPI());
|
|
3615
|
+
}
|
|
3616
|
+
var t, n;
|
|
3617
|
+
},
|
|
3618
|
+
defineClass: function() {
|
|
3619
|
+
return function(e) {
|
|
3620
|
+
a(this, e);
|
|
3621
|
+
};
|
|
3622
|
+
},
|
|
3623
|
+
ignoreTransaction: function(e) {
|
|
3624
|
+
return P.trans ? at(P.transless, e) : e();
|
|
3625
|
+
},
|
|
3626
|
+
vip: xn,
|
|
3627
|
+
async: function(t) {
|
|
3628
|
+
return function() {
|
|
3629
|
+
try {
|
|
3630
|
+
var e = Mn(t.apply(this, arguments));
|
|
3631
|
+
return e && "function" == typeof e.then ? e : K.resolve(e);
|
|
3632
|
+
} catch (e) {
|
|
3633
|
+
return w(e);
|
|
3634
|
+
}
|
|
3635
|
+
};
|
|
3636
|
+
},
|
|
3637
|
+
spawn: function(e, t, n) {
|
|
3638
|
+
try {
|
|
3639
|
+
var r = Mn(e.apply(n, t || []));
|
|
3640
|
+
return r && "function" == typeof r.then ? r : K.resolve(r);
|
|
3641
|
+
} catch (e) {
|
|
3642
|
+
return w(e);
|
|
3643
|
+
}
|
|
3644
|
+
},
|
|
3645
|
+
currentTransaction: { get: function() {
|
|
3646
|
+
return P.trans || null;
|
|
3647
|
+
} },
|
|
3648
|
+
waitFor: function(e, t) {
|
|
3649
|
+
e = K.resolve("function" == typeof e ? sr.ignoreTransaction(e) : e).timeout(t || 6e4);
|
|
3650
|
+
return P.trans ? P.trans.waitFor(e) : e;
|
|
3651
|
+
},
|
|
3652
|
+
Promise: K,
|
|
3653
|
+
debug: {
|
|
3654
|
+
get: function() {
|
|
3655
|
+
return l;
|
|
3656
|
+
},
|
|
3657
|
+
set: function(e) {
|
|
3658
|
+
Oe(e);
|
|
3659
|
+
}
|
|
3660
|
+
},
|
|
3661
|
+
derive: U,
|
|
3662
|
+
extend: a,
|
|
3663
|
+
props: N,
|
|
3664
|
+
override: Y,
|
|
3665
|
+
Events: Kt,
|
|
3666
|
+
on: Yt,
|
|
3667
|
+
liveQuery: ur,
|
|
3668
|
+
extendObservabilitySet: An,
|
|
3669
|
+
getByKeyPath: c,
|
|
3670
|
+
setByKeyPath: b,
|
|
3671
|
+
delByKeyPath: function(t, e) {
|
|
3672
|
+
"string" == typeof e ? b(t, e, void 0) : "length" in e && [].map.call(e, function(e) {
|
|
3673
|
+
b(t, e, void 0);
|
|
3674
|
+
});
|
|
3675
|
+
},
|
|
3676
|
+
shallowClone: G,
|
|
3677
|
+
deepClone: ee,
|
|
3678
|
+
getObjectDiff: Un,
|
|
3679
|
+
cmp: j,
|
|
3680
|
+
asap: Q,
|
|
3681
|
+
minKey: -Infinity,
|
|
3682
|
+
addons: [],
|
|
3683
|
+
connections: ft,
|
|
3684
|
+
errnames: de,
|
|
3685
|
+
dependencies: or,
|
|
3686
|
+
cache: Tn,
|
|
3687
|
+
semVer: "4.3.0",
|
|
3688
|
+
version: "4.3.0".split(".").map(function(e) {
|
|
3689
|
+
return parseInt(e);
|
|
3690
|
+
}).reduce(function(e, t, n) {
|
|
3691
|
+
return e + t / Math.pow(10, 2 * n);
|
|
3692
|
+
})
|
|
3693
|
+
})), sr.maxKey = Ht(sr.dependencies.IDBKeyRange), "undefined" != typeof dispatchEvent && "undefined" != typeof addEventListener && (Yt(zt, function(e) {
|
|
3694
|
+
fr || (e = new CustomEvent(Wt, { detail: e }), fr = !0, dispatchEvent(e), fr = !1);
|
|
3695
|
+
}), addEventListener(Wt, function(e) {
|
|
3696
|
+
e = e.detail;
|
|
3697
|
+
fr || cr(e);
|
|
3698
|
+
}));
|
|
3699
|
+
var lr, fr = !1, hr = function() {};
|
|
3700
|
+
return "undefined" != typeof BroadcastChannel && ((hr = function() {
|
|
3701
|
+
(lr = new BroadcastChannel(Wt)).onmessage = function(e) {
|
|
3702
|
+
return e.data && cr(e.data);
|
|
3703
|
+
};
|
|
3704
|
+
})(), "function" == typeof lr.unref && lr.unref(), Yt(zt, function(e) {
|
|
3705
|
+
fr || lr.postMessage(e);
|
|
3706
|
+
})), "undefined" != typeof addEventListener && (addEventListener("pagehide", function(e) {
|
|
3707
|
+
if (!q.disableBfCache && e.persisted) {
|
|
3708
|
+
l && console.debug("Dexie: handling persisted pagehide"), lr?.close();
|
|
3709
|
+
for (var t = 0, n = ft; t < n.length; t++) n[t].close({ disableAutoOpen: !1 });
|
|
3710
|
+
}
|
|
3711
|
+
}), addEventListener("pageshow", function(e) {
|
|
3712
|
+
!q.disableBfCache && e.persisted && (l && console.debug("Dexie: handling persisted pageshow"), hr(), cr({ all: new I(-Infinity, [[]]) }));
|
|
3713
|
+
})), K.rejectionMapper = function(e, t) {
|
|
3714
|
+
return !e || e instanceof ce || e instanceof TypeError || e instanceof SyntaxError || !e.name || !ye[e.name] ? e : (t = new ye[e.name](t || e.message, e), "stack" in e && u(t, "stack", { get: function() {
|
|
3715
|
+
return this.inner.stack;
|
|
3716
|
+
} }), t);
|
|
3717
|
+
}, Oe(l), _(q, Object.freeze({
|
|
3718
|
+
__proto__: null,
|
|
3719
|
+
Dexie: q,
|
|
3720
|
+
Entity: bt,
|
|
3721
|
+
PropModification: xt,
|
|
3722
|
+
RangeSet: I,
|
|
3723
|
+
add: function(e) {
|
|
3724
|
+
return new xt({ add: e });
|
|
3725
|
+
},
|
|
3726
|
+
cmp: j,
|
|
3727
|
+
default: q,
|
|
3728
|
+
liveQuery: ur,
|
|
3729
|
+
mergeRanges: Pn,
|
|
3730
|
+
rangesOverlap: Kn,
|
|
3731
|
+
remove: function(e) {
|
|
3732
|
+
return new xt({ remove: e });
|
|
3733
|
+
},
|
|
3734
|
+
replacePrefix: function(e, t) {
|
|
3735
|
+
return new xt({ replacePrefix: [e, t] });
|
|
3736
|
+
}
|
|
3737
|
+
}), { default: q }), q;
|
|
3738
|
+
});
|
|
3739
|
+
})))(), 1);
|
|
3740
|
+
var DexieSymbol = Symbol.for("Dexie");
|
|
3741
|
+
var Dexie = globalThis[DexieSymbol] || (globalThis[DexieSymbol] = import_dexie_min.default);
|
|
3742
|
+
if (import_dexie_min.default.semVer !== Dexie.semVer) throw new Error(`Two different versions of Dexie loaded in the same app: ${import_dexie_min.default.semVer} and ${Dexie.semVer}`);
|
|
3743
|
+
var { liveQuery, mergeRanges, rangesOverlap, RangeSet, cmp, Entity, PropModification, replacePrefix, add, remove, DexieYProvider } = Dexie;
|
|
3744
|
+
//#endregion
|
|
3745
|
+
export { Dexie as t };
|