cabloy 5.1.10 → 5.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/lint-staged.config.mjs +92 -0
- package/oxfmt.config.ts +4 -1
- package/package.json +2 -11
- package/vona/packages-utils/lint/api/tsconfig.base.esm.json +30 -2
- package/vona/packages-utils/lint/package.json +40 -5
- package/vona/packages-utils/lint/src/index.ts +3 -0
- package/vona/packages-utils/lint/{oxc/format.js → src/oxc/format.ts} +4 -2
- package/vona/packages-utils/lint/{oxc/lint.js → src/oxc/lint.ts} +7 -7
- package/vona/packages-utils/lint/{oxc/lintVue.js → src/oxc/lintVue.ts} +4 -6
- package/vona/packages-utils/lint/tsconfig.json +14 -0
- package/vona/pnpm-lock.yaml +338 -17
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/.metadata/index.ts +0 -78
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/controller/toolOne.ts +3 -1
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/controller/toolTwo.ts +3 -1
- package/zova/env/.env.ssr.cabloyBasicAdmin +0 -2
- package/zova/package.original.json +2 -8
- package/zova/packages-cli/cli/package.json +2 -2
- package/zova/packages-cli/cli-set-front/package.json +8 -8
- package/zova/packages-utils/babel-plugin-zova-bean-module/package.json +3 -3
- package/zova/packages-utils/babel-plugin-zova-bean-use/package.json +2 -2
- package/zova/packages-utils/babel-plugin-zova-behavior/package.json +2 -2
- package/zova/packages-utils/babel-plugin-zova-component/package.json +2 -2
- package/zova/packages-utils/logger/package.json +2 -2
- package/zova/packages-utils/mutate-on-copy/package.json +2 -2
- package/zova/packages-utils/quasar-app-extension-zova/package.json +3 -3
- package/zova/packages-utils/word-utils/package.json +2 -2
- package/zova/packages-utils/zova-jsx/package.json +4 -4
- package/zova/packages-utils/zova-openapi/package.json +2 -2
- package/zova/packages-utils/zova-vite/package.json +6 -6
- package/zova/packages-zova/zova/package.json +4 -4
- package/zova/packages-zova/zova-core/package.json +4 -4
- package/zova/pnpm-lock.yaml +67 -63
- package/zova/src/suite/a-demo/modules/demo-basic/package.json +1 -1
- package/zova/src/suite/a-demo/modules/demo-todo/package.json +1 -1
- package/zova/src/suite/a-demo/package.json +1 -1
- package/zova/src/suite/a-devui/modules/devui-adapter/package.json +1 -1
- package/zova/src/suite/a-devui/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-api/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-base/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-icon/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-index/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-layoutempty/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-layouttabs/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-login/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-passport/package.json +1 -1
- package/zova/src/suite/a-home/modules/home-theme/package.json +1 -1
- package/zova/src/suite/a-home/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-adapter/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-captcha/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-commands/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-commandssync/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-currency/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-date/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-form/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-input/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-page/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-pageentry/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-select/package.json +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-table/package.json +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-text/package.json +1 -0
- package/zova/src/suite-vendor/a-zova/modules/a-api/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-app/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-bean/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-behavior/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-behaviors/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-boundary/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-command/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-fetch/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-form/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-icon/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-interceptor/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-logger/package.json +3 -3
- package/zova/src/suite-vendor/a-zova/modules/a-meta/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-model/package.json +3 -3
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-router/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-routerstack/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-routertabs/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-ssrhmr/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-style/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-zod/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +5 -5
- package/zova/src/suite-vendor/a-zova/package.json +27 -27
- package/vona/packages-utils/lint/api/eslint.js +0 -41
- package/vona/packages-utils/lint/api/prettier.js +0 -8
- package/vona/packages-utils/lint/api/tsconfig.base.cjs.json +0 -32
- package/vona/packages-utils/lint/common/rules.js +0 -155
- package/vona/packages-utils/lint/common/rulesVue.js +0 -5
- package/vona/packages-utils/lint/front/eslint.js +0 -59
- package/vona/packages-utils/lint/front/prettier.js +0 -3
- package/vona/packages-utils/lint/front/tsconfig.base.cjs.json +0 -4
- package/vona/packages-utils/lint/front/tsconfig.base.esm.json +0 -9
- package/vona/packages-utils/lint/index.js +0 -3
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/-zova-config-CoKN49wO.js +0 -11
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-api-DmsK4zNw.js +0 -178
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-app-C7cTDV9C.js +0 -138
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-bean-qjOwLLml.js +0 -408
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-behavior-I9evY2QT.js +0 -454
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-behaviors-Dh8sE2AX.js +0 -58
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-boundary-DxeJURnH.js +0 -21
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-command-Duq9OGnp.js +0 -165
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-fetch-BsiDc5MA.js +0 -317
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-form-BSfvKLPu.js +0 -947
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-icon-Bx0yNmUB.js +0 -460
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-interceptor-CtK-mG6U.js +0 -256
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-logger-D6FVEo-2.js +0 -143
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-meta-DLAWtBzn.js +0 -47
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-model-Ds17NAa5.js +0 -887
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-openapi-Cu42a7Tj.js +0 -677
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-router-BEKs1P3y.js +0 -1009
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-routerstack-CNda3TvU.js +0 -239
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-routertabs-CA8KhmHx.js +0 -519
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-ssr-WZQfI3lD.js +0 -711
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-ssrhmr-DiG_2CbH.js +0 -97
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-style-Dcrophdv.js +0 -408
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-table-Cr0qHPMV.js +0 -464
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-zod-B5ZzHMKp.js +0 -87
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/a-zova-WAWkGLRj.js +0 -21
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/auth-Bjup4K84.svg +0 -8
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/axios-jFGAltpb.js +0 -3152
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-adapter-BzdgS83E.js +0 -68
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-captcha-gmlRJxbp.js +0 -209
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-commands-CmuoODyc.js +0 -179
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-commandssync-4uJoTYWO.js +0 -62
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-currency-ljdT_mJv.js +0 -159
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-date-CJtZtM5q.js +0 -251
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-form-Bi-Dm8Pp.js +0 -376
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-input-DugSctyu.js +0 -83
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-page-C0Mpx24A.js +0 -610
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-pageentry-De7Zvv7J.js +0 -443
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-select-WKCF4vyo.js +0 -186
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-table-B4Eyf7EC.js +0 -368
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/basic-text-CRqjMEyr.js +0 -118
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/browser-C8cI94Tr.js +0 -2409
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/business-DQeTVrBD.svg +0 -12
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/daisy-BZm4lJOy.svg +0 -4
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/default-DxTAw1iv.svg +0 -118
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/demo-basic-CiW_uKMD.js +0 -1419
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/demo-student-DpiY4dnt.js +0 -69
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/demo-todo-CM3XdLlo.js +0 -427
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/devui-adapter-B2uiKP95.js +0 -95
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/dist.es2015-BMNhwNBy.js +0 -343
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/editor-CmZexDJp.svg +0 -32
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/emoji-CLaR2GZg.svg +0 -3
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/esm-Z9BncIrt.js +0 -2574
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/extends-BSP9iXrM.js +0 -27
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/fecha-DvkbkxAQ.js +0 -9849
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/flow-DCn4s91p.svg +0 -13
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-api-B1NjQp7i.js +0 -374
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-base-DRJdeGsg.js +0 -654
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-icon-65b9tDB5.js +0 -125
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-index-KrvUKcFR.js +0 -79
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-layoutempty-DP2peKfC.js +0 -87
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-layouttabs-CRIoszHS.js +0 -980
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-login-z4Url6WO.js +0 -302
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-passport-OqpwAU0M.js +0 -293
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/home-theme-BSua63Y_.js +0 -131
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/index-B5HTgis_.css +0 -26
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/index-Cd4EYYtZ.js +0 -1331
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/localforage-e6vl49GD.js +0 -1798
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/login-Qly1YUqs.svg +0 -7
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/openapi3-jIye4jNw.js +0 -23
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/outline-C6s9io8r.svg +0 -41
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/rest-resource-CN0Ontwm.js +0 -552
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/role-fXTNmWmb.svg +0 -10
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/rolldown-runtime-lkMnaVCm.js +0 -38
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/social-DosI14Uo.svg +0 -12
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/src-BRq8dtuS.js +0 -44
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/src-CBGuKzpF.js +0 -5996
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/src-CzJSxlnS.js +0 -496
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/src-YVxhoO6F.js +0 -65
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tanstack-form-CBq6dr_k.js +0 -122
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tanstack-query-BJk2jOuy.js +0 -2377
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tanstack-query-CBWe1LsT.js +0 -365
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tanstack-query-Ch18aWTP.js +0 -212
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tanstack-table-BvC3VgJj.js +0 -2241
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tanstack-table-D85qomSu.js +0 -123
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/tools-Wk7SnIwE.svg +0 -4
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/typestyle-C2zp2284.js +0 -281
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/vue-1Y5FbPzj.js +0 -3221
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/vue-C-LVj1DU.js +0 -18
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/vue-ChEE2n-Y.js +0 -598
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/vue-CvF_GLFp.js +0 -190
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/vue-DHzalQTI.js +0 -1308
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/vue-router-COfHCB5q.js +0 -1775
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/wrapAsyncGenerator-zA6hqk-P.js +0 -155
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-6Abekb1F.js +0 -83
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-BHaXQJg22.js +0 -11
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-BYPEGx1T.js +0 -15586
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-BuxXrZHs.js +0 -24
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-C4pGJxwQ.js +0 -1227
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-CoRfsquu.js +0 -8
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-CzTANp3C.js +0 -380
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-DQbBsEtS.js +0 -4130
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/assets/zova-hmnYQoyt.js +0 -374
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/client/favicon.ico +0 -0
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/handler.js +0 -164729
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/index.js +0 -26236
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/assets/site/ssr-testSecond-5.0.0/quasar.manifest.json +0 -1
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/bean/ssrMenu.tools.ts +0 -32
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/bean/ssrMenuGroup.tools.ts +0 -18
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/bean/ssrSite.second.ts +0 -31
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/test/ssr.test.ts +0 -44
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/zovaRest/test-second/index.d.mts +0 -9107
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/zovaRest/test-second/index.mjs +0 -234
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/zovaRest/test-second/package.json +0 -40
|
@@ -1,2377 +0,0 @@
|
|
|
1
|
-
import { n as __esmMin } from "./rolldown-runtime-lkMnaVCm.js";
|
|
2
|
-
import { C as _classPrivateFieldSet2, D as _classPrivateFieldInitSpec, E as init_assertClassBrand, O as init_classPrivateFieldInitSpec, S as init_classPrivateFieldGet2, T as _assertClassBrand, b as init_classPrivateMethodInitSpec, d as _objectSpread2, f as init_objectSpread2, i as init_objectWithoutProperties, m as init_asyncToGenerator, p as _asyncToGenerator, r as _objectWithoutProperties, w as init_classPrivateFieldSet2, x as _classPrivateFieldGet2, y as _classPrivateMethodInitSpec } from "./fecha-DvkbkxAQ.js";
|
|
3
|
-
import { i as init_objectDestructuringEmpty, n as init_extends, r as _objectDestructuringEmpty, t as _extends } from "./extends-BSP9iXrM.js";
|
|
4
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/subscribable.js
|
|
5
|
-
var Subscribable;
|
|
6
|
-
var init_subscribable = __esmMin((() => {
|
|
7
|
-
Subscribable = class {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.listeners = /* @__PURE__ */ new Set();
|
|
10
|
-
this.subscribe = this.subscribe.bind(this);
|
|
11
|
-
}
|
|
12
|
-
subscribe(listener) {
|
|
13
|
-
this.listeners.add(listener);
|
|
14
|
-
this.onSubscribe();
|
|
15
|
-
return () => {
|
|
16
|
-
this.listeners.delete(listener);
|
|
17
|
-
this.onUnsubscribe();
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
hasListeners() {
|
|
21
|
-
return this.listeners.size > 0;
|
|
22
|
-
}
|
|
23
|
-
onSubscribe() {}
|
|
24
|
-
onUnsubscribe() {}
|
|
25
|
-
};
|
|
26
|
-
}));
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/focusManager.js
|
|
29
|
-
var _focused, _cleanup$1, _setup$1, FocusManager, focusManager;
|
|
30
|
-
var init_focusManager = __esmMin((() => {
|
|
31
|
-
init_subscribable();
|
|
32
|
-
init_classPrivateFieldInitSpec();
|
|
33
|
-
init_classPrivateFieldSet2();
|
|
34
|
-
init_classPrivateFieldGet2();
|
|
35
|
-
FocusManager = (_focused = /* @__PURE__ */ new WeakMap(), _cleanup$1 = /* @__PURE__ */ new WeakMap(), _setup$1 = /* @__PURE__ */ new WeakMap(), class extends Subscribable {
|
|
36
|
-
constructor() {
|
|
37
|
-
super();
|
|
38
|
-
_classPrivateFieldInitSpec(this, _focused, void 0);
|
|
39
|
-
_classPrivateFieldInitSpec(this, _cleanup$1, void 0);
|
|
40
|
-
_classPrivateFieldInitSpec(this, _setup$1, void 0);
|
|
41
|
-
_classPrivateFieldSet2(_setup$1, this, (onFocus) => {
|
|
42
|
-
if (typeof window !== "undefined" && window.addEventListener) {
|
|
43
|
-
const listener = () => onFocus();
|
|
44
|
-
window.addEventListener("visibilitychange", listener, false);
|
|
45
|
-
return () => {
|
|
46
|
-
window.removeEventListener("visibilitychange", listener);
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
onSubscribe() {
|
|
52
|
-
if (!_classPrivateFieldGet2(_cleanup$1, this)) this.setEventListener(_classPrivateFieldGet2(_setup$1, this));
|
|
53
|
-
}
|
|
54
|
-
onUnsubscribe() {
|
|
55
|
-
if (!this.hasListeners()) {
|
|
56
|
-
var _classPrivateFieldGet2$8;
|
|
57
|
-
(_classPrivateFieldGet2$8 = _classPrivateFieldGet2(_cleanup$1, this)) === null || _classPrivateFieldGet2$8 === void 0 || _classPrivateFieldGet2$8.call(this);
|
|
58
|
-
_classPrivateFieldSet2(_cleanup$1, this, void 0);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
setEventListener(setup) {
|
|
62
|
-
var _classPrivateFieldGet3;
|
|
63
|
-
_classPrivateFieldSet2(_setup$1, this, setup);
|
|
64
|
-
(_classPrivateFieldGet3 = _classPrivateFieldGet2(_cleanup$1, this)) === null || _classPrivateFieldGet3 === void 0 || _classPrivateFieldGet3.call(this);
|
|
65
|
-
_classPrivateFieldSet2(_cleanup$1, this, setup((focused) => {
|
|
66
|
-
if (typeof focused === "boolean") this.setFocused(focused);
|
|
67
|
-
else this.onFocus();
|
|
68
|
-
}));
|
|
69
|
-
}
|
|
70
|
-
setFocused(focused) {
|
|
71
|
-
if (_classPrivateFieldGet2(_focused, this) !== focused) {
|
|
72
|
-
_classPrivateFieldSet2(_focused, this, focused);
|
|
73
|
-
this.onFocus();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
onFocus() {
|
|
77
|
-
const isFocused = this.isFocused();
|
|
78
|
-
this.listeners.forEach((listener) => {
|
|
79
|
-
listener(isFocused);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
isFocused() {
|
|
83
|
-
var _globalThis$document;
|
|
84
|
-
if (typeof _classPrivateFieldGet2(_focused, this) === "boolean") return _classPrivateFieldGet2(_focused, this);
|
|
85
|
-
return ((_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.visibilityState) !== "hidden";
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
focusManager = new FocusManager();
|
|
89
|
-
}));
|
|
90
|
-
//#endregion
|
|
91
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/timeoutManager.js
|
|
92
|
-
function systemSetTimeoutZero(callback) {
|
|
93
|
-
setTimeout(callback, 0);
|
|
94
|
-
}
|
|
95
|
-
var _provider, _providerCalled, defaultTimeoutProvider, TimeoutManager, timeoutManager;
|
|
96
|
-
var init_timeoutManager = __esmMin((() => {
|
|
97
|
-
init_classPrivateFieldInitSpec();
|
|
98
|
-
init_classPrivateFieldGet2();
|
|
99
|
-
init_classPrivateFieldSet2();
|
|
100
|
-
defaultTimeoutProvider = {
|
|
101
|
-
setTimeout: (callback, delay) => setTimeout(callback, delay),
|
|
102
|
-
clearTimeout: (timeoutId) => clearTimeout(timeoutId),
|
|
103
|
-
setInterval: (callback, delay) => setInterval(callback, delay),
|
|
104
|
-
clearInterval: (intervalId) => clearInterval(intervalId)
|
|
105
|
-
};
|
|
106
|
-
TimeoutManager = (_provider = /* @__PURE__ */ new WeakMap(), _providerCalled = /* @__PURE__ */ new WeakMap(), class {
|
|
107
|
-
constructor() {
|
|
108
|
-
_classPrivateFieldInitSpec(this, _provider, defaultTimeoutProvider);
|
|
109
|
-
_classPrivateFieldInitSpec(this, _providerCalled, false);
|
|
110
|
-
}
|
|
111
|
-
setTimeoutProvider(provider) {
|
|
112
|
-
_classPrivateFieldSet2(_provider, this, provider);
|
|
113
|
-
}
|
|
114
|
-
setTimeout(callback, delay) {
|
|
115
|
-
return _classPrivateFieldGet2(_provider, this).setTimeout(callback, delay);
|
|
116
|
-
}
|
|
117
|
-
clearTimeout(timeoutId) {
|
|
118
|
-
_classPrivateFieldGet2(_provider, this).clearTimeout(timeoutId);
|
|
119
|
-
}
|
|
120
|
-
setInterval(callback, delay) {
|
|
121
|
-
return _classPrivateFieldGet2(_provider, this).setInterval(callback, delay);
|
|
122
|
-
}
|
|
123
|
-
clearInterval(intervalId) {
|
|
124
|
-
_classPrivateFieldGet2(_provider, this).clearInterval(intervalId);
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
timeoutManager = new TimeoutManager();
|
|
128
|
-
}));
|
|
129
|
-
//#endregion
|
|
130
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/utils.js
|
|
131
|
-
function noop() {}
|
|
132
|
-
function functionalUpdate(updater, input) {
|
|
133
|
-
return typeof updater === "function" ? updater(input) : updater;
|
|
134
|
-
}
|
|
135
|
-
function isValidTimeout(value) {
|
|
136
|
-
return typeof value === "number" && value >= 0 && value !== Infinity;
|
|
137
|
-
}
|
|
138
|
-
function timeUntilStale(updatedAt, staleTime) {
|
|
139
|
-
return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
|
|
140
|
-
}
|
|
141
|
-
function resolveStaleTime(staleTime, query) {
|
|
142
|
-
return typeof staleTime === "function" ? staleTime(query) : staleTime;
|
|
143
|
-
}
|
|
144
|
-
function resolveQueryBoolean(option, query) {
|
|
145
|
-
return typeof option === "function" ? option(query) : option;
|
|
146
|
-
}
|
|
147
|
-
function matchQuery(filters, query) {
|
|
148
|
-
const { type = "all", exact, fetchStatus, predicate, queryKey, stale } = filters;
|
|
149
|
-
if (queryKey) {
|
|
150
|
-
if (exact) {
|
|
151
|
-
if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) return false;
|
|
152
|
-
} else if (!partialMatchKey(query.queryKey, queryKey)) return false;
|
|
153
|
-
}
|
|
154
|
-
if (type !== "all") {
|
|
155
|
-
const isActive = query.isActive();
|
|
156
|
-
if (type === "active" && !isActive) return false;
|
|
157
|
-
if (type === "inactive" && isActive) return false;
|
|
158
|
-
}
|
|
159
|
-
if (typeof stale === "boolean" && query.isStale() !== stale) return false;
|
|
160
|
-
if (fetchStatus && fetchStatus !== query.state.fetchStatus) return false;
|
|
161
|
-
if (predicate && !predicate(query)) return false;
|
|
162
|
-
return true;
|
|
163
|
-
}
|
|
164
|
-
function matchMutation(filters, mutation) {
|
|
165
|
-
const { exact, status, predicate, mutationKey } = filters;
|
|
166
|
-
if (mutationKey) {
|
|
167
|
-
if (!mutation.options.mutationKey) return false;
|
|
168
|
-
if (exact) {
|
|
169
|
-
if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) return false;
|
|
170
|
-
} else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) return false;
|
|
171
|
-
}
|
|
172
|
-
if (status && mutation.state.status !== status) return false;
|
|
173
|
-
if (predicate && !predicate(mutation)) return false;
|
|
174
|
-
return true;
|
|
175
|
-
}
|
|
176
|
-
function hashQueryKeyByOptions(queryKey, options) {
|
|
177
|
-
return ((options === null || options === void 0 ? void 0 : options.queryKeyHashFn) || hashKey)(queryKey);
|
|
178
|
-
}
|
|
179
|
-
function hashKey(queryKey) {
|
|
180
|
-
return JSON.stringify(queryKey, (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {
|
|
181
|
-
result[key] = val[key];
|
|
182
|
-
return result;
|
|
183
|
-
}, {}) : val);
|
|
184
|
-
}
|
|
185
|
-
function partialMatchKey(a, b) {
|
|
186
|
-
if (a === b) return true;
|
|
187
|
-
if (typeof a !== typeof b) return false;
|
|
188
|
-
if (a && b && typeof a === "object" && typeof b === "object") return Object.keys(b).every((key) => partialMatchKey(a[key], b[key]));
|
|
189
|
-
return false;
|
|
190
|
-
}
|
|
191
|
-
function replaceEqualDeep(a, b, depth = 0) {
|
|
192
|
-
if (a === b) return a;
|
|
193
|
-
if (depth > 500) return b;
|
|
194
|
-
const array = isPlainArray(a) && isPlainArray(b);
|
|
195
|
-
if (!array && !(isPlainObject(a) && isPlainObject(b))) return b;
|
|
196
|
-
const aSize = (array ? a : Object.keys(a)).length;
|
|
197
|
-
const bItems = array ? b : Object.keys(b);
|
|
198
|
-
const bSize = bItems.length;
|
|
199
|
-
const copy = array ? new Array(bSize) : {};
|
|
200
|
-
let equalItems = 0;
|
|
201
|
-
for (let i = 0; i < bSize; i++) {
|
|
202
|
-
const key = array ? i : bItems[i];
|
|
203
|
-
const aItem = a[key];
|
|
204
|
-
const bItem = b[key];
|
|
205
|
-
if (aItem === bItem) {
|
|
206
|
-
copy[key] = aItem;
|
|
207
|
-
if (array ? i < aSize : hasOwn.call(a, key)) equalItems++;
|
|
208
|
-
continue;
|
|
209
|
-
}
|
|
210
|
-
if (aItem === null || bItem === null || typeof aItem !== "object" || typeof bItem !== "object") {
|
|
211
|
-
copy[key] = bItem;
|
|
212
|
-
continue;
|
|
213
|
-
}
|
|
214
|
-
const v = replaceEqualDeep(aItem, bItem, depth + 1);
|
|
215
|
-
copy[key] = v;
|
|
216
|
-
if (v === aItem) equalItems++;
|
|
217
|
-
}
|
|
218
|
-
return aSize === bSize && equalItems === aSize ? a : copy;
|
|
219
|
-
}
|
|
220
|
-
function shallowEqualObjects(a, b) {
|
|
221
|
-
if (!b || Object.keys(a).length !== Object.keys(b).length) return false;
|
|
222
|
-
for (const key in a) if (a[key] !== b[key]) return false;
|
|
223
|
-
return true;
|
|
224
|
-
}
|
|
225
|
-
function isPlainArray(value) {
|
|
226
|
-
return Array.isArray(value) && value.length === Object.keys(value).length;
|
|
227
|
-
}
|
|
228
|
-
function isPlainObject(o) {
|
|
229
|
-
if (!hasObjectPrototype(o)) return false;
|
|
230
|
-
const ctor = o.constructor;
|
|
231
|
-
if (ctor === void 0) return true;
|
|
232
|
-
const prot = ctor.prototype;
|
|
233
|
-
if (!hasObjectPrototype(prot)) return false;
|
|
234
|
-
if (!prot.hasOwnProperty("isPrototypeOf")) return false;
|
|
235
|
-
if (Object.getPrototypeOf(o) !== Object.prototype) return false;
|
|
236
|
-
return true;
|
|
237
|
-
}
|
|
238
|
-
function hasObjectPrototype(o) {
|
|
239
|
-
return Object.prototype.toString.call(o) === "[object Object]";
|
|
240
|
-
}
|
|
241
|
-
function sleep(timeout) {
|
|
242
|
-
return new Promise((resolve) => {
|
|
243
|
-
timeoutManager.setTimeout(resolve, timeout);
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
function replaceData(prevData, data, options) {
|
|
247
|
-
if (typeof options.structuralSharing === "function") return options.structuralSharing(prevData, data);
|
|
248
|
-
else if (options.structuralSharing !== false) return replaceEqualDeep(prevData, data);
|
|
249
|
-
return data;
|
|
250
|
-
}
|
|
251
|
-
function addToEnd(items, item, max = 0) {
|
|
252
|
-
const newItems = [...items, item];
|
|
253
|
-
return max && newItems.length > max ? newItems.slice(1) : newItems;
|
|
254
|
-
}
|
|
255
|
-
function addToStart(items, item, max = 0) {
|
|
256
|
-
const newItems = [item, ...items];
|
|
257
|
-
return max && newItems.length > max ? newItems.slice(0, -1) : newItems;
|
|
258
|
-
}
|
|
259
|
-
function ensureQueryFn(options, fetchOptions) {
|
|
260
|
-
if (!options.queryFn && (fetchOptions === null || fetchOptions === void 0 ? void 0 : fetchOptions.initialPromise)) return () => fetchOptions.initialPromise;
|
|
261
|
-
if (!options.queryFn || options.queryFn === skipToken) return () => Promise.reject(/* @__PURE__ */ new Error(`Missing queryFn: '${options.queryHash}'`));
|
|
262
|
-
return options.queryFn;
|
|
263
|
-
}
|
|
264
|
-
function shouldThrowError(throwOnError, params) {
|
|
265
|
-
if (typeof throwOnError === "function") return throwOnError(...params);
|
|
266
|
-
return !!throwOnError;
|
|
267
|
-
}
|
|
268
|
-
function addConsumeAwareSignal(object, getSignal, onCancelled) {
|
|
269
|
-
let consumed = false;
|
|
270
|
-
let signal;
|
|
271
|
-
Object.defineProperty(object, "signal", {
|
|
272
|
-
enumerable: true,
|
|
273
|
-
get: () => {
|
|
274
|
-
var _signal;
|
|
275
|
-
(_signal = signal) !== null && _signal !== void 0 || (signal = getSignal());
|
|
276
|
-
if (consumed) return signal;
|
|
277
|
-
consumed = true;
|
|
278
|
-
if (signal.aborted) onCancelled();
|
|
279
|
-
else signal.addEventListener("abort", onCancelled, { once: true });
|
|
280
|
-
return signal;
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
return object;
|
|
284
|
-
}
|
|
285
|
-
var isServer, hasOwn, skipToken;
|
|
286
|
-
var init_utils = __esmMin((() => {
|
|
287
|
-
init_timeoutManager();
|
|
288
|
-
isServer = typeof window === "undefined" || "Deno" in globalThis;
|
|
289
|
-
hasOwn = Object.prototype.hasOwnProperty;
|
|
290
|
-
skipToken = /* @__PURE__ */ Symbol();
|
|
291
|
-
}));
|
|
292
|
-
//#endregion
|
|
293
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/environmentManager.js
|
|
294
|
-
var environmentManager;
|
|
295
|
-
var init_environmentManager = __esmMin((() => {
|
|
296
|
-
init_utils();
|
|
297
|
-
environmentManager = /* @__PURE__ */ (() => {
|
|
298
|
-
let isServerFn = () => isServer;
|
|
299
|
-
return {
|
|
300
|
-
/**
|
|
301
|
-
* Returns whether the current runtime should be treated as a server environment.
|
|
302
|
-
*/
|
|
303
|
-
isServer() {
|
|
304
|
-
return isServerFn();
|
|
305
|
-
},
|
|
306
|
-
/**
|
|
307
|
-
* Overrides the server check globally.
|
|
308
|
-
*/
|
|
309
|
-
setIsServer(isServerValue) {
|
|
310
|
-
isServerFn = isServerValue;
|
|
311
|
-
}
|
|
312
|
-
};
|
|
313
|
-
})();
|
|
314
|
-
}));
|
|
315
|
-
//#endregion
|
|
316
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/thenable.js
|
|
317
|
-
function pendingThenable() {
|
|
318
|
-
let resolve;
|
|
319
|
-
let reject;
|
|
320
|
-
const thenable = new Promise((_resolve, _reject) => {
|
|
321
|
-
resolve = _resolve;
|
|
322
|
-
reject = _reject;
|
|
323
|
-
});
|
|
324
|
-
thenable.status = "pending";
|
|
325
|
-
thenable.catch(() => {});
|
|
326
|
-
function finalize(data) {
|
|
327
|
-
Object.assign(thenable, data);
|
|
328
|
-
delete thenable.resolve;
|
|
329
|
-
delete thenable.reject;
|
|
330
|
-
}
|
|
331
|
-
thenable.resolve = (value) => {
|
|
332
|
-
finalize({
|
|
333
|
-
status: "fulfilled",
|
|
334
|
-
value
|
|
335
|
-
});
|
|
336
|
-
resolve(value);
|
|
337
|
-
};
|
|
338
|
-
thenable.reject = (reason) => {
|
|
339
|
-
finalize({
|
|
340
|
-
status: "rejected",
|
|
341
|
-
reason
|
|
342
|
-
});
|
|
343
|
-
reject(reason);
|
|
344
|
-
};
|
|
345
|
-
return thenable;
|
|
346
|
-
}
|
|
347
|
-
function tryResolveSync(promise) {
|
|
348
|
-
var _promise$then;
|
|
349
|
-
let data;
|
|
350
|
-
(_promise$then = promise.then((result) => {
|
|
351
|
-
data = result;
|
|
352
|
-
return result;
|
|
353
|
-
}, noop)) === null || _promise$then === void 0 || _promise$then.catch(noop);
|
|
354
|
-
if (data !== void 0) return { data };
|
|
355
|
-
}
|
|
356
|
-
var init_thenable = __esmMin((() => {
|
|
357
|
-
init_utils();
|
|
358
|
-
}));
|
|
359
|
-
//#endregion
|
|
360
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/hydration.js
|
|
361
|
-
function defaultTransformerFn(data) {
|
|
362
|
-
return data;
|
|
363
|
-
}
|
|
364
|
-
function defaultShouldDehydrateQuery(query) {
|
|
365
|
-
return query.state.status === "success";
|
|
366
|
-
}
|
|
367
|
-
function hydrate(client, dehydratedState, options) {
|
|
368
|
-
var _ref5, _options$defaultOptio, _options$defaultOptio2, _client$getDefaultOpt5;
|
|
369
|
-
if (typeof dehydratedState !== "object" || dehydratedState === null) return;
|
|
370
|
-
const mutationCache = client.getMutationCache();
|
|
371
|
-
const queryCache = client.getQueryCache();
|
|
372
|
-
const deserializeData = (_ref5 = (_options$defaultOptio = options === null || options === void 0 || (_options$defaultOptio2 = options.defaultOptions) === null || _options$defaultOptio2 === void 0 ? void 0 : _options$defaultOptio2.deserializeData) !== null && _options$defaultOptio !== void 0 ? _options$defaultOptio : (_client$getDefaultOpt5 = client.getDefaultOptions().hydrate) === null || _client$getDefaultOpt5 === void 0 ? void 0 : _client$getDefaultOpt5.deserializeData) !== null && _ref5 !== void 0 ? _ref5 : defaultTransformerFn;
|
|
373
|
-
const mutations = dehydratedState.mutations || [];
|
|
374
|
-
const queries = dehydratedState.queries || [];
|
|
375
|
-
mutations.forEach((_ref6) => {
|
|
376
|
-
var _client$getDefaultOpt6, _options$defaultOptio3;
|
|
377
|
-
let { state } = _ref6, mutationOptions = _objectWithoutProperties(_ref6, _excluded);
|
|
378
|
-
mutationCache.build(client, _objectSpread2(_objectSpread2(_objectSpread2({}, (_client$getDefaultOpt6 = client.getDefaultOptions().hydrate) === null || _client$getDefaultOpt6 === void 0 ? void 0 : _client$getDefaultOpt6.mutations), options === null || options === void 0 || (_options$defaultOptio3 = options.defaultOptions) === null || _options$defaultOptio3 === void 0 ? void 0 : _options$defaultOptio3.mutations), mutationOptions), state);
|
|
379
|
-
});
|
|
380
|
-
queries.forEach(({ queryKey, state, queryHash, meta, promise, dehydratedAt, queryType }) => {
|
|
381
|
-
const syncData = promise ? tryResolveSync(promise) : void 0;
|
|
382
|
-
const rawData = state.data === void 0 ? syncData === null || syncData === void 0 ? void 0 : syncData.data : state.data;
|
|
383
|
-
const data = rawData === void 0 ? rawData : deserializeData(rawData);
|
|
384
|
-
let query = queryCache.get(queryHash);
|
|
385
|
-
const existingQueryIsPending = (query === null || query === void 0 ? void 0 : query.state.status) === "pending";
|
|
386
|
-
const existingQueryIsFetching = (query === null || query === void 0 ? void 0 : query.state.fetchStatus) === "fetching";
|
|
387
|
-
if (query) {
|
|
388
|
-
const hasNewerSyncData = syncData && dehydratedAt !== void 0 && dehydratedAt > query.state.dataUpdatedAt;
|
|
389
|
-
if (state.dataUpdatedAt > query.state.dataUpdatedAt || hasNewerSyncData) {
|
|
390
|
-
const { fetchStatus: _ignored } = state, serializedState = _objectWithoutProperties(state, _excluded2);
|
|
391
|
-
query.setState(_objectSpread2(_objectSpread2({}, serializedState), {}, { data }, state.status === "pending" && data !== void 0 && _objectSpread2({ status: "success" }, !existingQueryIsFetching && { fetchStatus: "idle" })));
|
|
392
|
-
}
|
|
393
|
-
} else {
|
|
394
|
-
var _client$getDefaultOpt7, _options$defaultOptio4;
|
|
395
|
-
query = queryCache.build(client, _objectSpread2(_objectSpread2(_objectSpread2({}, (_client$getDefaultOpt7 = client.getDefaultOptions().hydrate) === null || _client$getDefaultOpt7 === void 0 ? void 0 : _client$getDefaultOpt7.queries), options === null || options === void 0 || (_options$defaultOptio4 = options.defaultOptions) === null || _options$defaultOptio4 === void 0 ? void 0 : _options$defaultOptio4.queries), {}, {
|
|
396
|
-
queryKey,
|
|
397
|
-
queryHash,
|
|
398
|
-
meta,
|
|
399
|
-
_type: queryType
|
|
400
|
-
}), _objectSpread2(_objectSpread2({}, state), {}, {
|
|
401
|
-
data,
|
|
402
|
-
fetchStatus: "idle",
|
|
403
|
-
status: state.status === "pending" && data !== void 0 ? "success" : state.status
|
|
404
|
-
}));
|
|
405
|
-
}
|
|
406
|
-
if (promise && !syncData && !existingQueryIsPending && !existingQueryIsFetching && (dehydratedAt === void 0 || dehydratedAt > query.state.dataUpdatedAt)) query.fetch(void 0, { initialPromise: Promise.resolve(promise).then(deserializeData) }).catch(noop);
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
var _excluded, _excluded2;
|
|
410
|
-
var init_hydration = __esmMin((() => {
|
|
411
|
-
init_thenable();
|
|
412
|
-
init_utils();
|
|
413
|
-
init_objectSpread2();
|
|
414
|
-
init_objectWithoutProperties();
|
|
415
|
-
_excluded = ["state"], _excluded2 = ["fetchStatus"];
|
|
416
|
-
}));
|
|
417
|
-
//#endregion
|
|
418
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/notifyManager.js
|
|
419
|
-
function createNotifyManager() {
|
|
420
|
-
let queue = [];
|
|
421
|
-
let transactions = 0;
|
|
422
|
-
let notifyFn = (callback) => {
|
|
423
|
-
callback();
|
|
424
|
-
};
|
|
425
|
-
let batchNotifyFn = (callback) => {
|
|
426
|
-
callback();
|
|
427
|
-
};
|
|
428
|
-
let scheduleFn = defaultScheduler;
|
|
429
|
-
const schedule = (callback) => {
|
|
430
|
-
if (transactions) queue.push(callback);
|
|
431
|
-
else scheduleFn(() => {
|
|
432
|
-
notifyFn(callback);
|
|
433
|
-
});
|
|
434
|
-
};
|
|
435
|
-
const flush = () => {
|
|
436
|
-
const originalQueue = queue;
|
|
437
|
-
queue = [];
|
|
438
|
-
if (originalQueue.length) scheduleFn(() => {
|
|
439
|
-
batchNotifyFn(() => {
|
|
440
|
-
originalQueue.forEach((callback) => {
|
|
441
|
-
notifyFn(callback);
|
|
442
|
-
});
|
|
443
|
-
});
|
|
444
|
-
});
|
|
445
|
-
};
|
|
446
|
-
return {
|
|
447
|
-
batch: (callback) => {
|
|
448
|
-
let result;
|
|
449
|
-
transactions++;
|
|
450
|
-
try {
|
|
451
|
-
result = callback();
|
|
452
|
-
} finally {
|
|
453
|
-
transactions--;
|
|
454
|
-
if (!transactions) flush();
|
|
455
|
-
}
|
|
456
|
-
return result;
|
|
457
|
-
},
|
|
458
|
-
/**
|
|
459
|
-
* All calls to the wrapped function will be batched.
|
|
460
|
-
*/
|
|
461
|
-
batchCalls: (callback) => {
|
|
462
|
-
return (...args) => {
|
|
463
|
-
schedule(() => {
|
|
464
|
-
callback(...args);
|
|
465
|
-
});
|
|
466
|
-
};
|
|
467
|
-
},
|
|
468
|
-
schedule,
|
|
469
|
-
/**
|
|
470
|
-
* Use this method to set a custom notify function.
|
|
471
|
-
* This can be used to for example wrap notifications with `React.act` while running tests.
|
|
472
|
-
*/
|
|
473
|
-
setNotifyFunction: (fn) => {
|
|
474
|
-
notifyFn = fn;
|
|
475
|
-
},
|
|
476
|
-
/**
|
|
477
|
-
* Use this method to set a custom function to batch notifications together into a single tick.
|
|
478
|
-
* By default React Query will use the batch function provided by ReactDOM or React Native.
|
|
479
|
-
*/
|
|
480
|
-
setBatchNotifyFunction: (fn) => {
|
|
481
|
-
batchNotifyFn = fn;
|
|
482
|
-
},
|
|
483
|
-
setScheduler: (fn) => {
|
|
484
|
-
scheduleFn = fn;
|
|
485
|
-
}
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
var defaultScheduler, notifyManager;
|
|
489
|
-
var init_notifyManager = __esmMin((() => {
|
|
490
|
-
init_timeoutManager();
|
|
491
|
-
defaultScheduler = systemSetTimeoutZero;
|
|
492
|
-
notifyManager = createNotifyManager();
|
|
493
|
-
}));
|
|
494
|
-
//#endregion
|
|
495
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/onlineManager.js
|
|
496
|
-
var _online, _cleanup, _setup, OnlineManager, onlineManager;
|
|
497
|
-
var init_onlineManager = __esmMin((() => {
|
|
498
|
-
init_subscribable();
|
|
499
|
-
init_classPrivateFieldInitSpec();
|
|
500
|
-
init_classPrivateFieldSet2();
|
|
501
|
-
init_classPrivateFieldGet2();
|
|
502
|
-
OnlineManager = (_online = /* @__PURE__ */ new WeakMap(), _cleanup = /* @__PURE__ */ new WeakMap(), _setup = /* @__PURE__ */ new WeakMap(), class extends Subscribable {
|
|
503
|
-
constructor() {
|
|
504
|
-
super();
|
|
505
|
-
_classPrivateFieldInitSpec(this, _online, true);
|
|
506
|
-
_classPrivateFieldInitSpec(this, _cleanup, void 0);
|
|
507
|
-
_classPrivateFieldInitSpec(this, _setup, void 0);
|
|
508
|
-
_classPrivateFieldSet2(_setup, this, (onOnline) => {
|
|
509
|
-
if (typeof window !== "undefined" && window.addEventListener) {
|
|
510
|
-
const onlineListener = () => onOnline(true);
|
|
511
|
-
const offlineListener = () => onOnline(false);
|
|
512
|
-
window.addEventListener("online", onlineListener, false);
|
|
513
|
-
window.addEventListener("offline", offlineListener, false);
|
|
514
|
-
return () => {
|
|
515
|
-
window.removeEventListener("online", onlineListener);
|
|
516
|
-
window.removeEventListener("offline", offlineListener);
|
|
517
|
-
};
|
|
518
|
-
}
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
onSubscribe() {
|
|
522
|
-
if (!_classPrivateFieldGet2(_cleanup, this)) this.setEventListener(_classPrivateFieldGet2(_setup, this));
|
|
523
|
-
}
|
|
524
|
-
onUnsubscribe() {
|
|
525
|
-
if (!this.hasListeners()) {
|
|
526
|
-
var _classPrivateFieldGet2$7;
|
|
527
|
-
(_classPrivateFieldGet2$7 = _classPrivateFieldGet2(_cleanup, this)) === null || _classPrivateFieldGet2$7 === void 0 || _classPrivateFieldGet2$7.call(this);
|
|
528
|
-
_classPrivateFieldSet2(_cleanup, this, void 0);
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
setEventListener(setup) {
|
|
532
|
-
var _classPrivateFieldGet3;
|
|
533
|
-
_classPrivateFieldSet2(_setup, this, setup);
|
|
534
|
-
(_classPrivateFieldGet3 = _classPrivateFieldGet2(_cleanup, this)) === null || _classPrivateFieldGet3 === void 0 || _classPrivateFieldGet3.call(this);
|
|
535
|
-
_classPrivateFieldSet2(_cleanup, this, setup(this.setOnline.bind(this)));
|
|
536
|
-
}
|
|
537
|
-
setOnline(online) {
|
|
538
|
-
if (_classPrivateFieldGet2(_online, this) !== online) {
|
|
539
|
-
_classPrivateFieldSet2(_online, this, online);
|
|
540
|
-
this.listeners.forEach((listener) => {
|
|
541
|
-
listener(online);
|
|
542
|
-
});
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
isOnline() {
|
|
546
|
-
return _classPrivateFieldGet2(_online, this);
|
|
547
|
-
}
|
|
548
|
-
});
|
|
549
|
-
onlineManager = new OnlineManager();
|
|
550
|
-
}));
|
|
551
|
-
//#endregion
|
|
552
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/retryer.js
|
|
553
|
-
function defaultRetryDelay(failureCount) {
|
|
554
|
-
return Math.min(1e3 * Math.pow(2, failureCount), 3e4);
|
|
555
|
-
}
|
|
556
|
-
function canFetch(networkMode) {
|
|
557
|
-
return (networkMode !== null && networkMode !== void 0 ? networkMode : "online") === "online" ? onlineManager.isOnline() : true;
|
|
558
|
-
}
|
|
559
|
-
function createRetryer(config) {
|
|
560
|
-
let isRetryCancelled = false;
|
|
561
|
-
let failureCount = 0;
|
|
562
|
-
let continueFn;
|
|
563
|
-
const thenable = pendingThenable();
|
|
564
|
-
const isResolved = () => thenable.status !== "pending";
|
|
565
|
-
const cancel = (cancelOptions) => {
|
|
566
|
-
if (!isResolved()) {
|
|
567
|
-
var _config$onCancel;
|
|
568
|
-
const error = new CancelledError(cancelOptions);
|
|
569
|
-
reject(error);
|
|
570
|
-
(_config$onCancel = config.onCancel) === null || _config$onCancel === void 0 || _config$onCancel.call(config, error);
|
|
571
|
-
}
|
|
572
|
-
};
|
|
573
|
-
const cancelRetry = () => {
|
|
574
|
-
isRetryCancelled = true;
|
|
575
|
-
};
|
|
576
|
-
const continueRetry = () => {
|
|
577
|
-
isRetryCancelled = false;
|
|
578
|
-
};
|
|
579
|
-
const canContinue = () => focusManager.isFocused() && (config.networkMode === "always" || onlineManager.isOnline()) && config.canRun();
|
|
580
|
-
const canStart = () => canFetch(config.networkMode) && config.canRun();
|
|
581
|
-
const resolve = (value) => {
|
|
582
|
-
if (!isResolved()) {
|
|
583
|
-
continueFn === null || continueFn === void 0 || continueFn();
|
|
584
|
-
thenable.resolve(value);
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
const reject = (value) => {
|
|
588
|
-
if (!isResolved()) {
|
|
589
|
-
continueFn === null || continueFn === void 0 || continueFn();
|
|
590
|
-
thenable.reject(value);
|
|
591
|
-
}
|
|
592
|
-
};
|
|
593
|
-
const pause = () => {
|
|
594
|
-
return new Promise((continueResolve) => {
|
|
595
|
-
var _config$onPause;
|
|
596
|
-
continueFn = (value) => {
|
|
597
|
-
if (isResolved() || canContinue()) continueResolve(value);
|
|
598
|
-
};
|
|
599
|
-
(_config$onPause = config.onPause) === null || _config$onPause === void 0 || _config$onPause.call(config);
|
|
600
|
-
}).then(() => {
|
|
601
|
-
continueFn = void 0;
|
|
602
|
-
if (!isResolved()) {
|
|
603
|
-
var _config$onContinue;
|
|
604
|
-
(_config$onContinue = config.onContinue) === null || _config$onContinue === void 0 || _config$onContinue.call(config);
|
|
605
|
-
}
|
|
606
|
-
});
|
|
607
|
-
};
|
|
608
|
-
const run = () => {
|
|
609
|
-
if (isResolved()) return;
|
|
610
|
-
let promiseOrValue;
|
|
611
|
-
const initialPromise = failureCount === 0 ? config.initialPromise : void 0;
|
|
612
|
-
try {
|
|
613
|
-
promiseOrValue = initialPromise !== null && initialPromise !== void 0 ? initialPromise : config.fn();
|
|
614
|
-
} catch (error) {
|
|
615
|
-
promiseOrValue = Promise.reject(error);
|
|
616
|
-
}
|
|
617
|
-
Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
|
|
618
|
-
var _config$retry, _config$retryDelay, _config$onFail;
|
|
619
|
-
if (isResolved()) return;
|
|
620
|
-
const retry = (_config$retry = config.retry) !== null && _config$retry !== void 0 ? _config$retry : environmentManager.isServer() ? 0 : 3;
|
|
621
|
-
const retryDelay = (_config$retryDelay = config.retryDelay) !== null && _config$retryDelay !== void 0 ? _config$retryDelay : defaultRetryDelay;
|
|
622
|
-
const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
|
|
623
|
-
const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
|
|
624
|
-
if (isRetryCancelled || !shouldRetry) {
|
|
625
|
-
reject(error);
|
|
626
|
-
return;
|
|
627
|
-
}
|
|
628
|
-
failureCount++;
|
|
629
|
-
(_config$onFail = config.onFail) === null || _config$onFail === void 0 || _config$onFail.call(config, failureCount, error);
|
|
630
|
-
sleep(delay).then(() => {
|
|
631
|
-
return canContinue() ? void 0 : pause();
|
|
632
|
-
}).then(() => {
|
|
633
|
-
if (isRetryCancelled) reject(error);
|
|
634
|
-
else run();
|
|
635
|
-
});
|
|
636
|
-
});
|
|
637
|
-
};
|
|
638
|
-
return {
|
|
639
|
-
promise: thenable,
|
|
640
|
-
status: () => thenable.status,
|
|
641
|
-
cancel,
|
|
642
|
-
continue: () => {
|
|
643
|
-
continueFn === null || continueFn === void 0 || continueFn();
|
|
644
|
-
return thenable;
|
|
645
|
-
},
|
|
646
|
-
cancelRetry,
|
|
647
|
-
continueRetry,
|
|
648
|
-
canStart,
|
|
649
|
-
start: () => {
|
|
650
|
-
if (canStart()) run();
|
|
651
|
-
else pause().then(run);
|
|
652
|
-
return thenable;
|
|
653
|
-
}
|
|
654
|
-
};
|
|
655
|
-
}
|
|
656
|
-
var CancelledError;
|
|
657
|
-
var init_retryer = __esmMin((() => {
|
|
658
|
-
init_focusManager();
|
|
659
|
-
init_onlineManager();
|
|
660
|
-
init_thenable();
|
|
661
|
-
init_environmentManager();
|
|
662
|
-
init_utils();
|
|
663
|
-
CancelledError = class extends Error {
|
|
664
|
-
constructor(options) {
|
|
665
|
-
super("CancelledError");
|
|
666
|
-
this.revert = options === null || options === void 0 ? void 0 : options.revert;
|
|
667
|
-
this.silent = options === null || options === void 0 ? void 0 : options.silent;
|
|
668
|
-
}
|
|
669
|
-
};
|
|
670
|
-
}));
|
|
671
|
-
//#endregion
|
|
672
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/removable.js
|
|
673
|
-
var _gcTimeout, Removable;
|
|
674
|
-
var init_removable = __esmMin((() => {
|
|
675
|
-
init_timeoutManager();
|
|
676
|
-
init_environmentManager();
|
|
677
|
-
init_utils();
|
|
678
|
-
init_classPrivateFieldInitSpec();
|
|
679
|
-
init_classPrivateFieldSet2();
|
|
680
|
-
init_classPrivateFieldGet2();
|
|
681
|
-
Removable = (_gcTimeout = /* @__PURE__ */ new WeakMap(), class {
|
|
682
|
-
constructor() {
|
|
683
|
-
_classPrivateFieldInitSpec(this, _gcTimeout, void 0);
|
|
684
|
-
}
|
|
685
|
-
destroy() {
|
|
686
|
-
this.clearGcTimeout();
|
|
687
|
-
}
|
|
688
|
-
scheduleGc() {
|
|
689
|
-
this.clearGcTimeout();
|
|
690
|
-
if (isValidTimeout(this.gcTime)) _classPrivateFieldSet2(_gcTimeout, this, timeoutManager.setTimeout(() => {
|
|
691
|
-
this.optionalRemove();
|
|
692
|
-
}, this.gcTime));
|
|
693
|
-
}
|
|
694
|
-
updateGcTime(newGcTime) {
|
|
695
|
-
this.gcTime = Math.max(this.gcTime || 0, newGcTime !== null && newGcTime !== void 0 ? newGcTime : environmentManager.isServer() ? Infinity : 300 * 1e3);
|
|
696
|
-
}
|
|
697
|
-
clearGcTimeout() {
|
|
698
|
-
if (_classPrivateFieldGet2(_gcTimeout, this) !== void 0) {
|
|
699
|
-
timeoutManager.clearTimeout(_classPrivateFieldGet2(_gcTimeout, this));
|
|
700
|
-
_classPrivateFieldSet2(_gcTimeout, this, void 0);
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
});
|
|
704
|
-
}));
|
|
705
|
-
//#endregion
|
|
706
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
|
|
707
|
-
function infiniteQueryBehavior(pages) {
|
|
708
|
-
return { onFetch: (context, query) => {
|
|
709
|
-
var _context$fetchOptions, _context$state$data, _context$state$data2;
|
|
710
|
-
const options = context.options;
|
|
711
|
-
const direction = (_context$fetchOptions = context.fetchOptions) === null || _context$fetchOptions === void 0 || (_context$fetchOptions = _context$fetchOptions.meta) === null || _context$fetchOptions === void 0 || (_context$fetchOptions = _context$fetchOptions.fetchMore) === null || _context$fetchOptions === void 0 ? void 0 : _context$fetchOptions.direction;
|
|
712
|
-
const oldPages = ((_context$state$data = context.state.data) === null || _context$state$data === void 0 ? void 0 : _context$state$data.pages) || [];
|
|
713
|
-
const oldPageParams = ((_context$state$data2 = context.state.data) === null || _context$state$data2 === void 0 ? void 0 : _context$state$data2.pageParams) || [];
|
|
714
|
-
let result = {
|
|
715
|
-
pages: [],
|
|
716
|
-
pageParams: []
|
|
717
|
-
};
|
|
718
|
-
let currentPage = 0;
|
|
719
|
-
const fetchFn = function() {
|
|
720
|
-
var _ref2 = _asyncToGenerator(function* () {
|
|
721
|
-
let cancelled = false;
|
|
722
|
-
const addSignalProperty = (object) => {
|
|
723
|
-
addConsumeAwareSignal(object, () => context.signal, () => cancelled = true);
|
|
724
|
-
};
|
|
725
|
-
const queryFn = ensureQueryFn(context.options, context.fetchOptions);
|
|
726
|
-
const fetchPage = function() {
|
|
727
|
-
var _ref = _asyncToGenerator(function* (data, param, previous) {
|
|
728
|
-
if (cancelled) return Promise.reject(context.signal.reason);
|
|
729
|
-
if (param == null && data.pages.length) return Promise.resolve(data);
|
|
730
|
-
const createQueryFnContext = () => {
|
|
731
|
-
const queryFnContext2 = {
|
|
732
|
-
client: context.client,
|
|
733
|
-
queryKey: context.queryKey,
|
|
734
|
-
pageParam: param,
|
|
735
|
-
direction: previous ? "backward" : "forward",
|
|
736
|
-
meta: context.options.meta
|
|
737
|
-
};
|
|
738
|
-
addSignalProperty(queryFnContext2);
|
|
739
|
-
return queryFnContext2;
|
|
740
|
-
};
|
|
741
|
-
const page = yield queryFn(createQueryFnContext());
|
|
742
|
-
const { maxPages } = context.options;
|
|
743
|
-
const addTo = previous ? addToStart : addToEnd;
|
|
744
|
-
return {
|
|
745
|
-
pages: addTo(data.pages, page, maxPages),
|
|
746
|
-
pageParams: addTo(data.pageParams, param, maxPages)
|
|
747
|
-
};
|
|
748
|
-
});
|
|
749
|
-
return function fetchPage(_x, _x2, _x3) {
|
|
750
|
-
return _ref.apply(this, arguments);
|
|
751
|
-
};
|
|
752
|
-
}();
|
|
753
|
-
if (direction && oldPages.length) {
|
|
754
|
-
const previous = direction === "backward";
|
|
755
|
-
const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
|
|
756
|
-
const oldData = {
|
|
757
|
-
pages: oldPages,
|
|
758
|
-
pageParams: oldPageParams
|
|
759
|
-
};
|
|
760
|
-
result = yield fetchPage(oldData, pageParamFn(options, oldData), previous);
|
|
761
|
-
} else {
|
|
762
|
-
const remainingPages = pages !== null && pages !== void 0 ? pages : oldPages.length;
|
|
763
|
-
do {
|
|
764
|
-
var _oldPageParams$;
|
|
765
|
-
const param = currentPage === 0 ? (_oldPageParams$ = oldPageParams[0]) !== null && _oldPageParams$ !== void 0 ? _oldPageParams$ : options.initialPageParam : getNextPageParam(options, result);
|
|
766
|
-
if (currentPage > 0 && param == null) break;
|
|
767
|
-
result = yield fetchPage(result, param);
|
|
768
|
-
currentPage++;
|
|
769
|
-
} while (currentPage < remainingPages);
|
|
770
|
-
}
|
|
771
|
-
return result;
|
|
772
|
-
});
|
|
773
|
-
return function fetchFn() {
|
|
774
|
-
return _ref2.apply(this, arguments);
|
|
775
|
-
};
|
|
776
|
-
}();
|
|
777
|
-
if (context.options.persister) context.fetchFn = () => {
|
|
778
|
-
var _context$options$pers, _context$options;
|
|
779
|
-
return (_context$options$pers = (_context$options = context.options).persister) === null || _context$options$pers === void 0 ? void 0 : _context$options$pers.call(_context$options, fetchFn, {
|
|
780
|
-
client: context.client,
|
|
781
|
-
queryKey: context.queryKey,
|
|
782
|
-
meta: context.options.meta,
|
|
783
|
-
signal: context.signal
|
|
784
|
-
}, query);
|
|
785
|
-
};
|
|
786
|
-
else context.fetchFn = fetchFn;
|
|
787
|
-
} };
|
|
788
|
-
}
|
|
789
|
-
function getNextPageParam(options, { pages, pageParams }) {
|
|
790
|
-
const lastIndex = pages.length - 1;
|
|
791
|
-
return pages.length > 0 ? options.getNextPageParam(pages[lastIndex], pages, pageParams[lastIndex], pageParams) : void 0;
|
|
792
|
-
}
|
|
793
|
-
function getPreviousPageParam(options, { pages, pageParams }) {
|
|
794
|
-
var _options$getPreviousP;
|
|
795
|
-
return pages.length > 0 ? (_options$getPreviousP = options.getPreviousPageParam) === null || _options$getPreviousP === void 0 ? void 0 : _options$getPreviousP.call(options, pages[0], pages, pageParams[0], pageParams) : void 0;
|
|
796
|
-
}
|
|
797
|
-
var init_infiniteQueryBehavior = __esmMin((() => {
|
|
798
|
-
init_utils();
|
|
799
|
-
init_asyncToGenerator();
|
|
800
|
-
}));
|
|
801
|
-
//#endregion
|
|
802
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/query.js
|
|
803
|
-
function _isInitialPausedFetch() {
|
|
804
|
-
return this.state.fetchStatus === "paused" && this.state.status === "pending";
|
|
805
|
-
}
|
|
806
|
-
function _dispatch$1(action) {
|
|
807
|
-
const reducer = (state) => {
|
|
808
|
-
switch (action.type) {
|
|
809
|
-
case "failed": return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
810
|
-
fetchFailureCount: action.failureCount,
|
|
811
|
-
fetchFailureReason: action.error
|
|
812
|
-
});
|
|
813
|
-
case "pause": return _objectSpread2(_objectSpread2({}, state), {}, { fetchStatus: "paused" });
|
|
814
|
-
case "continue": return _objectSpread2(_objectSpread2({}, state), {}, { fetchStatus: "fetching" });
|
|
815
|
-
case "fetch":
|
|
816
|
-
var _action$meta;
|
|
817
|
-
return _objectSpread2(_objectSpread2(_objectSpread2({}, state), fetchState(state.data, this.options)), {}, { fetchMeta: (_action$meta = action.meta) !== null && _action$meta !== void 0 ? _action$meta : null });
|
|
818
|
-
case "success":
|
|
819
|
-
const newState = _objectSpread2(_objectSpread2(_objectSpread2({}, state), successState(action.data, action.dataUpdatedAt)), {}, { dataUpdateCount: state.dataUpdateCount + 1 }, !action.manual && {
|
|
820
|
-
fetchStatus: "idle",
|
|
821
|
-
fetchFailureCount: 0,
|
|
822
|
-
fetchFailureReason: null
|
|
823
|
-
});
|
|
824
|
-
_classPrivateFieldSet2(_revertState, this, action.manual ? newState : void 0);
|
|
825
|
-
return newState;
|
|
826
|
-
case "error":
|
|
827
|
-
const error = action.error;
|
|
828
|
-
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
829
|
-
error,
|
|
830
|
-
errorUpdateCount: state.errorUpdateCount + 1,
|
|
831
|
-
errorUpdatedAt: Date.now(),
|
|
832
|
-
fetchFailureCount: state.fetchFailureCount + 1,
|
|
833
|
-
fetchFailureReason: error,
|
|
834
|
-
fetchStatus: "idle",
|
|
835
|
-
status: "error",
|
|
836
|
-
isInvalidated: true
|
|
837
|
-
});
|
|
838
|
-
case "invalidate": return _objectSpread2(_objectSpread2({}, state), {}, { isInvalidated: true });
|
|
839
|
-
case "setState": return _objectSpread2(_objectSpread2({}, state), action.state);
|
|
840
|
-
}
|
|
841
|
-
};
|
|
842
|
-
this.state = reducer(this.state);
|
|
843
|
-
notifyManager.batch(() => {
|
|
844
|
-
this.observers.forEach((observer) => {
|
|
845
|
-
observer.onQueryUpdate();
|
|
846
|
-
});
|
|
847
|
-
_classPrivateFieldGet2(_cache, this).notify({
|
|
848
|
-
query: this,
|
|
849
|
-
type: "updated",
|
|
850
|
-
action
|
|
851
|
-
});
|
|
852
|
-
});
|
|
853
|
-
}
|
|
854
|
-
function fetchState(data, options) {
|
|
855
|
-
return _objectSpread2({
|
|
856
|
-
fetchFailureCount: 0,
|
|
857
|
-
fetchFailureReason: null,
|
|
858
|
-
fetchStatus: canFetch(options.networkMode) ? "fetching" : "paused"
|
|
859
|
-
}, data === void 0 && {
|
|
860
|
-
error: null,
|
|
861
|
-
status: "pending"
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
function successState(data, dataUpdatedAt) {
|
|
865
|
-
return {
|
|
866
|
-
data,
|
|
867
|
-
dataUpdatedAt: dataUpdatedAt !== null && dataUpdatedAt !== void 0 ? dataUpdatedAt : Date.now(),
|
|
868
|
-
error: null,
|
|
869
|
-
isInvalidated: false,
|
|
870
|
-
status: "success"
|
|
871
|
-
};
|
|
872
|
-
}
|
|
873
|
-
function getDefaultState$1(options) {
|
|
874
|
-
const data = typeof options.initialData === "function" ? options.initialData() : options.initialData;
|
|
875
|
-
const hasData = data !== void 0;
|
|
876
|
-
const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;
|
|
877
|
-
return {
|
|
878
|
-
data,
|
|
879
|
-
dataUpdateCount: 0,
|
|
880
|
-
dataUpdatedAt: hasData ? initialDataUpdatedAt !== null && initialDataUpdatedAt !== void 0 ? initialDataUpdatedAt : Date.now() : 0,
|
|
881
|
-
error: null,
|
|
882
|
-
errorUpdateCount: 0,
|
|
883
|
-
errorUpdatedAt: 0,
|
|
884
|
-
fetchFailureCount: 0,
|
|
885
|
-
fetchFailureReason: null,
|
|
886
|
-
fetchMeta: null,
|
|
887
|
-
isInvalidated: false,
|
|
888
|
-
status: hasData ? "success" : "pending",
|
|
889
|
-
fetchStatus: "idle"
|
|
890
|
-
};
|
|
891
|
-
}
|
|
892
|
-
var _queryType, _initialState, _revertState, _cache, _client$3, _retryer$1, _defaultOptions$1, _abortSignalConsumed, _Class_brand$3, Query;
|
|
893
|
-
var init_query = __esmMin((() => {
|
|
894
|
-
init_utils();
|
|
895
|
-
init_notifyManager();
|
|
896
|
-
init_retryer();
|
|
897
|
-
init_removable();
|
|
898
|
-
init_infiniteQueryBehavior();
|
|
899
|
-
init_classPrivateMethodInitSpec();
|
|
900
|
-
init_classPrivateFieldInitSpec();
|
|
901
|
-
init_classPrivateFieldSet2();
|
|
902
|
-
init_classPrivateFieldGet2();
|
|
903
|
-
init_objectSpread2();
|
|
904
|
-
init_assertClassBrand();
|
|
905
|
-
init_asyncToGenerator();
|
|
906
|
-
Query = (_queryType = /* @__PURE__ */ new WeakMap(), _initialState = /* @__PURE__ */ new WeakMap(), _revertState = /* @__PURE__ */ new WeakMap(), _cache = /* @__PURE__ */ new WeakMap(), _client$3 = /* @__PURE__ */ new WeakMap(), _retryer$1 = /* @__PURE__ */ new WeakMap(), _defaultOptions$1 = /* @__PURE__ */ new WeakMap(), _abortSignalConsumed = /* @__PURE__ */ new WeakMap(), _Class_brand$3 = /* @__PURE__ */ new WeakSet(), class extends Removable {
|
|
907
|
-
constructor(config) {
|
|
908
|
-
var _config$state;
|
|
909
|
-
super();
|
|
910
|
-
_classPrivateMethodInitSpec(this, _Class_brand$3);
|
|
911
|
-
_classPrivateFieldInitSpec(this, _queryType, void 0);
|
|
912
|
-
_classPrivateFieldInitSpec(this, _initialState, void 0);
|
|
913
|
-
_classPrivateFieldInitSpec(this, _revertState, void 0);
|
|
914
|
-
_classPrivateFieldInitSpec(this, _cache, void 0);
|
|
915
|
-
_classPrivateFieldInitSpec(this, _client$3, void 0);
|
|
916
|
-
_classPrivateFieldInitSpec(this, _retryer$1, void 0);
|
|
917
|
-
_classPrivateFieldInitSpec(this, _defaultOptions$1, void 0);
|
|
918
|
-
_classPrivateFieldInitSpec(this, _abortSignalConsumed, void 0);
|
|
919
|
-
_classPrivateFieldSet2(_abortSignalConsumed, this, false);
|
|
920
|
-
_classPrivateFieldSet2(_defaultOptions$1, this, config.defaultOptions);
|
|
921
|
-
this.setOptions(config.options);
|
|
922
|
-
this.observers = [];
|
|
923
|
-
_classPrivateFieldSet2(_client$3, this, config.client);
|
|
924
|
-
_classPrivateFieldSet2(_cache, this, _classPrivateFieldGet2(_client$3, this).getQueryCache());
|
|
925
|
-
this.queryKey = config.queryKey;
|
|
926
|
-
this.queryHash = config.queryHash;
|
|
927
|
-
_classPrivateFieldSet2(_initialState, this, getDefaultState$1(this.options));
|
|
928
|
-
this.state = (_config$state = config.state) !== null && _config$state !== void 0 ? _config$state : _classPrivateFieldGet2(_initialState, this);
|
|
929
|
-
this.scheduleGc();
|
|
930
|
-
}
|
|
931
|
-
get meta() {
|
|
932
|
-
return this.options.meta;
|
|
933
|
-
}
|
|
934
|
-
get queryType() {
|
|
935
|
-
return _classPrivateFieldGet2(_queryType, this);
|
|
936
|
-
}
|
|
937
|
-
get promise() {
|
|
938
|
-
var _classPrivateFieldGet2$6;
|
|
939
|
-
return (_classPrivateFieldGet2$6 = _classPrivateFieldGet2(_retryer$1, this)) === null || _classPrivateFieldGet2$6 === void 0 ? void 0 : _classPrivateFieldGet2$6.promise;
|
|
940
|
-
}
|
|
941
|
-
setOptions(options) {
|
|
942
|
-
this.options = _objectSpread2(_objectSpread2({}, _classPrivateFieldGet2(_defaultOptions$1, this)), options);
|
|
943
|
-
if (options === null || options === void 0 ? void 0 : options._type) _classPrivateFieldSet2(_queryType, this, options._type);
|
|
944
|
-
this.updateGcTime(this.options.gcTime);
|
|
945
|
-
if (this.state && this.state.data === void 0) {
|
|
946
|
-
const defaultState = getDefaultState$1(this.options);
|
|
947
|
-
if (defaultState.data !== void 0) {
|
|
948
|
-
this.setState(successState(defaultState.data, defaultState.dataUpdatedAt));
|
|
949
|
-
_classPrivateFieldSet2(_initialState, this, defaultState);
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
optionalRemove() {
|
|
954
|
-
if (!this.observers.length && this.state.fetchStatus === "idle") _classPrivateFieldGet2(_cache, this).remove(this);
|
|
955
|
-
}
|
|
956
|
-
setData(newData, options) {
|
|
957
|
-
const data = replaceData(this.state.data, newData, this.options);
|
|
958
|
-
_assertClassBrand(_Class_brand$3, this, _dispatch$1).call(this, {
|
|
959
|
-
data,
|
|
960
|
-
type: "success",
|
|
961
|
-
dataUpdatedAt: options === null || options === void 0 ? void 0 : options.updatedAt,
|
|
962
|
-
manual: options === null || options === void 0 ? void 0 : options.manual
|
|
963
|
-
});
|
|
964
|
-
return data;
|
|
965
|
-
}
|
|
966
|
-
setState(state) {
|
|
967
|
-
_assertClassBrand(_Class_brand$3, this, _dispatch$1).call(this, {
|
|
968
|
-
type: "setState",
|
|
969
|
-
state
|
|
970
|
-
});
|
|
971
|
-
}
|
|
972
|
-
cancel(options) {
|
|
973
|
-
var _classPrivateFieldGet3, _classPrivateFieldGet4;
|
|
974
|
-
const promise = (_classPrivateFieldGet3 = _classPrivateFieldGet2(_retryer$1, this)) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3.promise;
|
|
975
|
-
(_classPrivateFieldGet4 = _classPrivateFieldGet2(_retryer$1, this)) === null || _classPrivateFieldGet4 === void 0 || _classPrivateFieldGet4.cancel(options);
|
|
976
|
-
return promise ? promise.then(noop).catch(noop) : Promise.resolve();
|
|
977
|
-
}
|
|
978
|
-
destroy() {
|
|
979
|
-
super.destroy();
|
|
980
|
-
this.cancel({ silent: true });
|
|
981
|
-
}
|
|
982
|
-
get resetState() {
|
|
983
|
-
return _classPrivateFieldGet2(_initialState, this);
|
|
984
|
-
}
|
|
985
|
-
reset() {
|
|
986
|
-
this.destroy();
|
|
987
|
-
this.setState(this.resetState);
|
|
988
|
-
}
|
|
989
|
-
isActive() {
|
|
990
|
-
return this.observers.some((observer) => resolveQueryBoolean(observer.options.enabled, this) !== false);
|
|
991
|
-
}
|
|
992
|
-
isDisabled() {
|
|
993
|
-
if (this.getObserversCount() > 0) return !this.isActive();
|
|
994
|
-
return this.options.queryFn === skipToken || !this.isFetched();
|
|
995
|
-
}
|
|
996
|
-
isFetched() {
|
|
997
|
-
return this.state.dataUpdateCount + this.state.errorUpdateCount > 0;
|
|
998
|
-
}
|
|
999
|
-
isStatic() {
|
|
1000
|
-
if (this.getObserversCount() > 0) return this.observers.some((observer) => resolveStaleTime(observer.options.staleTime, this) === "static");
|
|
1001
|
-
return false;
|
|
1002
|
-
}
|
|
1003
|
-
isStale() {
|
|
1004
|
-
if (this.getObserversCount() > 0) return this.observers.some((observer) => observer.getCurrentResult().isStale);
|
|
1005
|
-
return this.state.data === void 0 || this.state.isInvalidated;
|
|
1006
|
-
}
|
|
1007
|
-
isStaleByTime(staleTime = 0) {
|
|
1008
|
-
if (this.state.data === void 0) return true;
|
|
1009
|
-
if (staleTime === "static") return false;
|
|
1010
|
-
if (this.state.isInvalidated) return true;
|
|
1011
|
-
return !timeUntilStale(this.state.dataUpdatedAt, staleTime);
|
|
1012
|
-
}
|
|
1013
|
-
onFocus() {
|
|
1014
|
-
var _classPrivateFieldGet5;
|
|
1015
|
-
const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus());
|
|
1016
|
-
observer === null || observer === void 0 || observer.refetch({ cancelRefetch: false });
|
|
1017
|
-
(_classPrivateFieldGet5 = _classPrivateFieldGet2(_retryer$1, this)) === null || _classPrivateFieldGet5 === void 0 || _classPrivateFieldGet5.continue();
|
|
1018
|
-
}
|
|
1019
|
-
onOnline() {
|
|
1020
|
-
var _classPrivateFieldGet6;
|
|
1021
|
-
const observer = this.observers.find((x) => x.shouldFetchOnReconnect());
|
|
1022
|
-
observer === null || observer === void 0 || observer.refetch({ cancelRefetch: false });
|
|
1023
|
-
(_classPrivateFieldGet6 = _classPrivateFieldGet2(_retryer$1, this)) === null || _classPrivateFieldGet6 === void 0 || _classPrivateFieldGet6.continue();
|
|
1024
|
-
}
|
|
1025
|
-
addObserver(observer) {
|
|
1026
|
-
if (!this.observers.includes(observer)) {
|
|
1027
|
-
this.observers.push(observer);
|
|
1028
|
-
this.clearGcTimeout();
|
|
1029
|
-
_classPrivateFieldGet2(_cache, this).notify({
|
|
1030
|
-
type: "observerAdded",
|
|
1031
|
-
query: this,
|
|
1032
|
-
observer
|
|
1033
|
-
});
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
1036
|
-
removeObserver(observer) {
|
|
1037
|
-
if (this.observers.includes(observer)) {
|
|
1038
|
-
this.observers = this.observers.filter((x) => x !== observer);
|
|
1039
|
-
if (!this.observers.length) {
|
|
1040
|
-
if (_classPrivateFieldGet2(_retryer$1, this)) if (_classPrivateFieldGet2(_abortSignalConsumed, this) || _assertClassBrand(_Class_brand$3, this, _isInitialPausedFetch).call(this)) _classPrivateFieldGet2(_retryer$1, this).cancel({ revert: true });
|
|
1041
|
-
else _classPrivateFieldGet2(_retryer$1, this).cancelRetry();
|
|
1042
|
-
this.scheduleGc();
|
|
1043
|
-
}
|
|
1044
|
-
_classPrivateFieldGet2(_cache, this).notify({
|
|
1045
|
-
type: "observerRemoved",
|
|
1046
|
-
query: this,
|
|
1047
|
-
observer
|
|
1048
|
-
});
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
getObserversCount() {
|
|
1052
|
-
return this.observers.length;
|
|
1053
|
-
}
|
|
1054
|
-
invalidate() {
|
|
1055
|
-
if (!this.state.isInvalidated) _assertClassBrand(_Class_brand$3, this, _dispatch$1).call(this, { type: "invalidate" });
|
|
1056
|
-
}
|
|
1057
|
-
fetch(options, fetchOptions) {
|
|
1058
|
-
var _this = this;
|
|
1059
|
-
return _asyncToGenerator(function* () {
|
|
1060
|
-
var _classPrivateFieldGet7, _context$fetchOptions;
|
|
1061
|
-
if (_this.state.fetchStatus !== "idle" && ((_classPrivateFieldGet7 = _classPrivateFieldGet2(_retryer$1, _this)) === null || _classPrivateFieldGet7 === void 0 ? void 0 : _classPrivateFieldGet7.status()) !== "rejected") {
|
|
1062
|
-
if (_this.state.data !== void 0 && (fetchOptions === null || fetchOptions === void 0 ? void 0 : fetchOptions.cancelRefetch)) _this.cancel({ silent: true });
|
|
1063
|
-
else if (_classPrivateFieldGet2(_retryer$1, _this)) {
|
|
1064
|
-
_classPrivateFieldGet2(_retryer$1, _this).continueRetry();
|
|
1065
|
-
return _classPrivateFieldGet2(_retryer$1, _this).promise;
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
if (options) _this.setOptions(options);
|
|
1069
|
-
if (!_this.options.queryFn) {
|
|
1070
|
-
const observer = _this.observers.find((x) => x.options.queryFn);
|
|
1071
|
-
if (observer) _this.setOptions(observer.options);
|
|
1072
|
-
}
|
|
1073
|
-
const abortController = new AbortController();
|
|
1074
|
-
const addSignalProperty = (object) => {
|
|
1075
|
-
Object.defineProperty(object, "signal", {
|
|
1076
|
-
enumerable: true,
|
|
1077
|
-
get: () => {
|
|
1078
|
-
_classPrivateFieldSet2(_abortSignalConsumed, _this, true);
|
|
1079
|
-
return abortController.signal;
|
|
1080
|
-
}
|
|
1081
|
-
});
|
|
1082
|
-
};
|
|
1083
|
-
const fetchFn = () => {
|
|
1084
|
-
const queryFn = ensureQueryFn(_this.options, fetchOptions);
|
|
1085
|
-
const createQueryFnContext = () => {
|
|
1086
|
-
const queryFnContext2 = {
|
|
1087
|
-
client: _classPrivateFieldGet2(_client$3, _this),
|
|
1088
|
-
queryKey: _this.queryKey,
|
|
1089
|
-
meta: _this.meta
|
|
1090
|
-
};
|
|
1091
|
-
addSignalProperty(queryFnContext2);
|
|
1092
|
-
return queryFnContext2;
|
|
1093
|
-
};
|
|
1094
|
-
const queryFnContext = createQueryFnContext();
|
|
1095
|
-
_classPrivateFieldSet2(_abortSignalConsumed, _this, false);
|
|
1096
|
-
if (_this.options.persister) return _this.options.persister(queryFn, queryFnContext, _this);
|
|
1097
|
-
return queryFn(queryFnContext);
|
|
1098
|
-
};
|
|
1099
|
-
const createFetchContext = () => {
|
|
1100
|
-
const context2 = {
|
|
1101
|
-
fetchOptions,
|
|
1102
|
-
options: _this.options,
|
|
1103
|
-
queryKey: _this.queryKey,
|
|
1104
|
-
client: _classPrivateFieldGet2(_client$3, _this),
|
|
1105
|
-
state: _this.state,
|
|
1106
|
-
fetchFn
|
|
1107
|
-
};
|
|
1108
|
-
addSignalProperty(context2);
|
|
1109
|
-
return context2;
|
|
1110
|
-
};
|
|
1111
|
-
const context = createFetchContext();
|
|
1112
|
-
const behavior = _classPrivateFieldGet2(_queryType, _this) === "infinite" ? infiniteQueryBehavior(_this.options.pages) : _this.options.behavior;
|
|
1113
|
-
behavior === null || behavior === void 0 || behavior.onFetch(context, _this);
|
|
1114
|
-
_classPrivateFieldSet2(_revertState, _this, _this.state);
|
|
1115
|
-
if (_this.state.fetchStatus === "idle" || _this.state.fetchMeta !== ((_context$fetchOptions = context.fetchOptions) === null || _context$fetchOptions === void 0 ? void 0 : _context$fetchOptions.meta)) {
|
|
1116
|
-
var _context$fetchOptions2;
|
|
1117
|
-
_assertClassBrand(_Class_brand$3, _this, _dispatch$1).call(_this, {
|
|
1118
|
-
type: "fetch",
|
|
1119
|
-
meta: (_context$fetchOptions2 = context.fetchOptions) === null || _context$fetchOptions2 === void 0 ? void 0 : _context$fetchOptions2.meta
|
|
1120
|
-
});
|
|
1121
|
-
}
|
|
1122
|
-
_classPrivateFieldSet2(_retryer$1, _this, createRetryer({
|
|
1123
|
-
initialPromise: fetchOptions === null || fetchOptions === void 0 ? void 0 : fetchOptions.initialPromise,
|
|
1124
|
-
fn: context.fetchFn,
|
|
1125
|
-
onCancel: (error) => {
|
|
1126
|
-
if (error instanceof CancelledError && error.revert) _this.setState(_objectSpread2(_objectSpread2({}, _classPrivateFieldGet2(_revertState, _this)), {}, { fetchStatus: "idle" }));
|
|
1127
|
-
abortController.abort();
|
|
1128
|
-
},
|
|
1129
|
-
onFail: (failureCount, error) => {
|
|
1130
|
-
_assertClassBrand(_Class_brand$3, _this, _dispatch$1).call(_this, {
|
|
1131
|
-
type: "failed",
|
|
1132
|
-
failureCount,
|
|
1133
|
-
error
|
|
1134
|
-
});
|
|
1135
|
-
},
|
|
1136
|
-
onPause: () => {
|
|
1137
|
-
_assertClassBrand(_Class_brand$3, _this, _dispatch$1).call(_this, { type: "pause" });
|
|
1138
|
-
},
|
|
1139
|
-
onContinue: () => {
|
|
1140
|
-
_assertClassBrand(_Class_brand$3, _this, _dispatch$1).call(_this, { type: "continue" });
|
|
1141
|
-
},
|
|
1142
|
-
retry: context.options.retry,
|
|
1143
|
-
retryDelay: context.options.retryDelay,
|
|
1144
|
-
networkMode: context.options.networkMode,
|
|
1145
|
-
canRun: () => true
|
|
1146
|
-
}));
|
|
1147
|
-
try {
|
|
1148
|
-
var _classPrivateFieldGet8, _classPrivateFieldGet9, _classPrivateFieldGet10, _classPrivateFieldGet11;
|
|
1149
|
-
const data = yield _classPrivateFieldGet2(_retryer$1, _this).start();
|
|
1150
|
-
if (data === void 0) throw new Error(`${_this.queryHash} data is undefined`);
|
|
1151
|
-
_this.setData(data);
|
|
1152
|
-
(_classPrivateFieldGet8 = (_classPrivateFieldGet9 = _classPrivateFieldGet2(_cache, _this).config).onSuccess) === null || _classPrivateFieldGet8 === void 0 || _classPrivateFieldGet8.call(_classPrivateFieldGet9, data, _this);
|
|
1153
|
-
(_classPrivateFieldGet10 = (_classPrivateFieldGet11 = _classPrivateFieldGet2(_cache, _this).config).onSettled) === null || _classPrivateFieldGet10 === void 0 || _classPrivateFieldGet10.call(_classPrivateFieldGet11, data, _this.state.error, _this);
|
|
1154
|
-
return data;
|
|
1155
|
-
} catch (error) {
|
|
1156
|
-
var _classPrivateFieldGet12, _classPrivateFieldGet13, _classPrivateFieldGet14, _classPrivateFieldGet15;
|
|
1157
|
-
if (error instanceof CancelledError) {
|
|
1158
|
-
if (error.silent) return _classPrivateFieldGet2(_retryer$1, _this).promise;
|
|
1159
|
-
else if (error.revert) {
|
|
1160
|
-
if (_this.state.data === void 0) throw error;
|
|
1161
|
-
return _this.state.data;
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
_assertClassBrand(_Class_brand$3, _this, _dispatch$1).call(_this, {
|
|
1165
|
-
type: "error",
|
|
1166
|
-
error
|
|
1167
|
-
});
|
|
1168
|
-
(_classPrivateFieldGet12 = (_classPrivateFieldGet13 = _classPrivateFieldGet2(_cache, _this).config).onError) === null || _classPrivateFieldGet12 === void 0 || _classPrivateFieldGet12.call(_classPrivateFieldGet13, error, _this);
|
|
1169
|
-
(_classPrivateFieldGet14 = (_classPrivateFieldGet15 = _classPrivateFieldGet2(_cache, _this).config).onSettled) === null || _classPrivateFieldGet14 === void 0 || _classPrivateFieldGet14.call(_classPrivateFieldGet15, _this.state.data, error, _this);
|
|
1170
|
-
throw error;
|
|
1171
|
-
} finally {
|
|
1172
|
-
_this.scheduleGc();
|
|
1173
|
-
}
|
|
1174
|
-
})();
|
|
1175
|
-
}
|
|
1176
|
-
});
|
|
1177
|
-
}));
|
|
1178
|
-
//#endregion
|
|
1179
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/queryObserver.js
|
|
1180
|
-
function _executeFetch(fetchOptions) {
|
|
1181
|
-
_assertClassBrand(_Class_brand$2, this, _updateQuery).call(this);
|
|
1182
|
-
let promise = _classPrivateFieldGet2(_currentQuery, this).fetch(this.options, fetchOptions);
|
|
1183
|
-
if (!(fetchOptions === null || fetchOptions === void 0 ? void 0 : fetchOptions.throwOnError)) promise = promise.catch(noop);
|
|
1184
|
-
return promise;
|
|
1185
|
-
}
|
|
1186
|
-
function _updateStaleTimeout() {
|
|
1187
|
-
_assertClassBrand(_Class_brand$2, this, _clearStaleTimeout).call(this);
|
|
1188
|
-
const staleTime = resolveStaleTime(this.options.staleTime, _classPrivateFieldGet2(_currentQuery, this));
|
|
1189
|
-
if (environmentManager.isServer() || _classPrivateFieldGet2(_currentResult$1, this).isStale || !isValidTimeout(staleTime)) return;
|
|
1190
|
-
const timeout = timeUntilStale(_classPrivateFieldGet2(_currentResult$1, this).dataUpdatedAt, staleTime) + 1;
|
|
1191
|
-
_classPrivateFieldSet2(_staleTimeoutId, this, timeoutManager.setTimeout(() => {
|
|
1192
|
-
if (!_classPrivateFieldGet2(_currentResult$1, this).isStale) this.updateResult();
|
|
1193
|
-
}, timeout));
|
|
1194
|
-
}
|
|
1195
|
-
function _computeRefetchInterval() {
|
|
1196
|
-
var _ref2;
|
|
1197
|
-
return (_ref2 = typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(_classPrivateFieldGet2(_currentQuery, this)) : this.options.refetchInterval) !== null && _ref2 !== void 0 ? _ref2 : false;
|
|
1198
|
-
}
|
|
1199
|
-
function _updateRefetchInterval(nextInterval) {
|
|
1200
|
-
_assertClassBrand(_Class_brand$2, this, _clearRefetchInterval).call(this);
|
|
1201
|
-
_classPrivateFieldSet2(_currentRefetchInterval, this, nextInterval);
|
|
1202
|
-
if (environmentManager.isServer() || resolveQueryBoolean(this.options.enabled, _classPrivateFieldGet2(_currentQuery, this)) === false || !isValidTimeout(_classPrivateFieldGet2(_currentRefetchInterval, this)) || _classPrivateFieldGet2(_currentRefetchInterval, this) === 0) return;
|
|
1203
|
-
_classPrivateFieldSet2(_refetchIntervalId, this, timeoutManager.setInterval(() => {
|
|
1204
|
-
if (this.options.refetchIntervalInBackground || focusManager.isFocused()) _assertClassBrand(_Class_brand$2, this, _executeFetch).call(this);
|
|
1205
|
-
}, _classPrivateFieldGet2(_currentRefetchInterval, this)));
|
|
1206
|
-
}
|
|
1207
|
-
function _updateTimers() {
|
|
1208
|
-
_assertClassBrand(_Class_brand$2, this, _updateStaleTimeout).call(this);
|
|
1209
|
-
_assertClassBrand(_Class_brand$2, this, _updateRefetchInterval).call(this, _assertClassBrand(_Class_brand$2, this, _computeRefetchInterval).call(this));
|
|
1210
|
-
}
|
|
1211
|
-
function _clearStaleTimeout() {
|
|
1212
|
-
if (_classPrivateFieldGet2(_staleTimeoutId, this) !== void 0) {
|
|
1213
|
-
timeoutManager.clearTimeout(_classPrivateFieldGet2(_staleTimeoutId, this));
|
|
1214
|
-
_classPrivateFieldSet2(_staleTimeoutId, this, void 0);
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
function _clearRefetchInterval() {
|
|
1218
|
-
if (_classPrivateFieldGet2(_refetchIntervalId, this) !== void 0) {
|
|
1219
|
-
timeoutManager.clearInterval(_classPrivateFieldGet2(_refetchIntervalId, this));
|
|
1220
|
-
_classPrivateFieldSet2(_refetchIntervalId, this, void 0);
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
function _updateQuery() {
|
|
1224
|
-
const query = _classPrivateFieldGet2(_client$2, this).getQueryCache().build(_classPrivateFieldGet2(_client$2, this), this.options);
|
|
1225
|
-
if (query === _classPrivateFieldGet2(_currentQuery, this)) return;
|
|
1226
|
-
const prevQuery = _classPrivateFieldGet2(_currentQuery, this);
|
|
1227
|
-
_classPrivateFieldSet2(_currentQuery, this, query);
|
|
1228
|
-
_classPrivateFieldSet2(_currentQueryInitialState, this, query.state);
|
|
1229
|
-
if (this.hasListeners()) {
|
|
1230
|
-
prevQuery === null || prevQuery === void 0 || prevQuery.removeObserver(this);
|
|
1231
|
-
query.addObserver(this);
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
function _notify$1(notifyOptions) {
|
|
1235
|
-
notifyManager.batch(() => {
|
|
1236
|
-
if (notifyOptions.listeners) this.listeners.forEach((listener) => {
|
|
1237
|
-
listener(_classPrivateFieldGet2(_currentResult$1, this));
|
|
1238
|
-
});
|
|
1239
|
-
_classPrivateFieldGet2(_client$2, this).getQueryCache().notify({
|
|
1240
|
-
query: _classPrivateFieldGet2(_currentQuery, this),
|
|
1241
|
-
type: "observerResultsUpdated"
|
|
1242
|
-
});
|
|
1243
|
-
});
|
|
1244
|
-
}
|
|
1245
|
-
function shouldLoadOnMount(query, options) {
|
|
1246
|
-
return resolveQueryBoolean(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && resolveQueryBoolean(options.retryOnMount, query) === false);
|
|
1247
|
-
}
|
|
1248
|
-
function shouldFetchOnMount(query, options) {
|
|
1249
|
-
return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
|
|
1250
|
-
}
|
|
1251
|
-
function shouldFetchOn(query, options, field) {
|
|
1252
|
-
if (resolveQueryBoolean(options.enabled, query) !== false && resolveStaleTime(options.staleTime, query) !== "static") {
|
|
1253
|
-
const value = typeof field === "function" ? field(query) : field;
|
|
1254
|
-
return value === "always" || value !== false && isStale(query, options);
|
|
1255
|
-
}
|
|
1256
|
-
return false;
|
|
1257
|
-
}
|
|
1258
|
-
function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
|
|
1259
|
-
return (query !== prevQuery || resolveQueryBoolean(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
|
|
1260
|
-
}
|
|
1261
|
-
function isStale(query, options) {
|
|
1262
|
-
return resolveQueryBoolean(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));
|
|
1263
|
-
}
|
|
1264
|
-
function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
|
|
1265
|
-
if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) return true;
|
|
1266
|
-
return false;
|
|
1267
|
-
}
|
|
1268
|
-
var _client$2, _currentQuery, _currentQueryInitialState, _currentResult$1, _currentResultState, _currentResultOptions, _currentThenable, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _Class_brand$2, QueryObserver;
|
|
1269
|
-
var init_queryObserver = __esmMin((() => {
|
|
1270
|
-
init_focusManager();
|
|
1271
|
-
init_environmentManager();
|
|
1272
|
-
init_notifyManager();
|
|
1273
|
-
init_query();
|
|
1274
|
-
init_subscribable();
|
|
1275
|
-
init_thenable();
|
|
1276
|
-
init_utils();
|
|
1277
|
-
init_timeoutManager();
|
|
1278
|
-
init_classPrivateMethodInitSpec();
|
|
1279
|
-
init_classPrivateFieldInitSpec();
|
|
1280
|
-
init_classPrivateFieldSet2();
|
|
1281
|
-
init_classPrivateFieldGet2();
|
|
1282
|
-
init_assertClassBrand();
|
|
1283
|
-
init_objectDestructuringEmpty();
|
|
1284
|
-
init_extends();
|
|
1285
|
-
init_objectSpread2();
|
|
1286
|
-
QueryObserver = (_client$2 = /* @__PURE__ */ new WeakMap(), _currentQuery = /* @__PURE__ */ new WeakMap(), _currentQueryInitialState = /* @__PURE__ */ new WeakMap(), _currentResult$1 = /* @__PURE__ */ new WeakMap(), _currentResultState = /* @__PURE__ */ new WeakMap(), _currentResultOptions = /* @__PURE__ */ new WeakMap(), _currentThenable = /* @__PURE__ */ new WeakMap(), _selectError = /* @__PURE__ */ new WeakMap(), _selectFn = /* @__PURE__ */ new WeakMap(), _selectResult = /* @__PURE__ */ new WeakMap(), _lastQueryWithDefinedData = /* @__PURE__ */ new WeakMap(), _staleTimeoutId = /* @__PURE__ */ new WeakMap(), _refetchIntervalId = /* @__PURE__ */ new WeakMap(), _currentRefetchInterval = /* @__PURE__ */ new WeakMap(), _trackedProps = /* @__PURE__ */ new WeakMap(), _Class_brand$2 = /* @__PURE__ */ new WeakSet(), class extends Subscribable {
|
|
1287
|
-
constructor(client, options) {
|
|
1288
|
-
super();
|
|
1289
|
-
_classPrivateMethodInitSpec(this, _Class_brand$2);
|
|
1290
|
-
_classPrivateFieldInitSpec(this, _client$2, void 0);
|
|
1291
|
-
_classPrivateFieldInitSpec(this, _currentQuery, void 0);
|
|
1292
|
-
_classPrivateFieldInitSpec(this, _currentQueryInitialState, void 0);
|
|
1293
|
-
_classPrivateFieldInitSpec(this, _currentResult$1, void 0);
|
|
1294
|
-
_classPrivateFieldInitSpec(this, _currentResultState, void 0);
|
|
1295
|
-
_classPrivateFieldInitSpec(this, _currentResultOptions, void 0);
|
|
1296
|
-
_classPrivateFieldInitSpec(this, _currentThenable, void 0);
|
|
1297
|
-
_classPrivateFieldInitSpec(this, _selectError, void 0);
|
|
1298
|
-
_classPrivateFieldInitSpec(this, _selectFn, void 0);
|
|
1299
|
-
_classPrivateFieldInitSpec(this, _selectResult, void 0);
|
|
1300
|
-
_classPrivateFieldInitSpec(this, _lastQueryWithDefinedData, void 0);
|
|
1301
|
-
_classPrivateFieldInitSpec(this, _staleTimeoutId, void 0);
|
|
1302
|
-
_classPrivateFieldInitSpec(this, _refetchIntervalId, void 0);
|
|
1303
|
-
_classPrivateFieldInitSpec(this, _currentRefetchInterval, void 0);
|
|
1304
|
-
_classPrivateFieldInitSpec(this, _trackedProps, /* @__PURE__ */ new Set());
|
|
1305
|
-
this.options = options;
|
|
1306
|
-
_classPrivateFieldSet2(_client$2, this, client);
|
|
1307
|
-
_classPrivateFieldSet2(_selectError, this, null);
|
|
1308
|
-
_classPrivateFieldSet2(_currentThenable, this, pendingThenable());
|
|
1309
|
-
this.bindMethods();
|
|
1310
|
-
this.setOptions(options);
|
|
1311
|
-
}
|
|
1312
|
-
bindMethods() {
|
|
1313
|
-
this.refetch = this.refetch.bind(this);
|
|
1314
|
-
}
|
|
1315
|
-
onSubscribe() {
|
|
1316
|
-
if (this.listeners.size === 1) {
|
|
1317
|
-
_classPrivateFieldGet2(_currentQuery, this).addObserver(this);
|
|
1318
|
-
if (shouldFetchOnMount(_classPrivateFieldGet2(_currentQuery, this), this.options)) _assertClassBrand(_Class_brand$2, this, _executeFetch).call(this);
|
|
1319
|
-
else this.updateResult();
|
|
1320
|
-
_assertClassBrand(_Class_brand$2, this, _updateTimers).call(this);
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
onUnsubscribe() {
|
|
1324
|
-
if (!this.hasListeners()) this.destroy();
|
|
1325
|
-
}
|
|
1326
|
-
shouldFetchOnReconnect() {
|
|
1327
|
-
return shouldFetchOn(_classPrivateFieldGet2(_currentQuery, this), this.options, this.options.refetchOnReconnect);
|
|
1328
|
-
}
|
|
1329
|
-
shouldFetchOnWindowFocus() {
|
|
1330
|
-
return shouldFetchOn(_classPrivateFieldGet2(_currentQuery, this), this.options, this.options.refetchOnWindowFocus);
|
|
1331
|
-
}
|
|
1332
|
-
destroy() {
|
|
1333
|
-
this.listeners = /* @__PURE__ */ new Set();
|
|
1334
|
-
_assertClassBrand(_Class_brand$2, this, _clearStaleTimeout).call(this);
|
|
1335
|
-
_assertClassBrand(_Class_brand$2, this, _clearRefetchInterval).call(this);
|
|
1336
|
-
_classPrivateFieldGet2(_currentQuery, this).removeObserver(this);
|
|
1337
|
-
}
|
|
1338
|
-
setOptions(options) {
|
|
1339
|
-
const prevOptions = this.options;
|
|
1340
|
-
const prevQuery = _classPrivateFieldGet2(_currentQuery, this);
|
|
1341
|
-
this.options = _classPrivateFieldGet2(_client$2, this).defaultQueryOptions(options);
|
|
1342
|
-
if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof resolveQueryBoolean(this.options.enabled, _classPrivateFieldGet2(_currentQuery, this)) !== "boolean") throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");
|
|
1343
|
-
_assertClassBrand(_Class_brand$2, this, _updateQuery).call(this);
|
|
1344
|
-
_classPrivateFieldGet2(_currentQuery, this).setOptions(this.options);
|
|
1345
|
-
if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) _classPrivateFieldGet2(_client$2, this).getQueryCache().notify({
|
|
1346
|
-
type: "observerOptionsUpdated",
|
|
1347
|
-
query: _classPrivateFieldGet2(_currentQuery, this),
|
|
1348
|
-
observer: this
|
|
1349
|
-
});
|
|
1350
|
-
const mounted = this.hasListeners();
|
|
1351
|
-
if (mounted && shouldFetchOptionally(_classPrivateFieldGet2(_currentQuery, this), prevQuery, this.options, prevOptions)) _assertClassBrand(_Class_brand$2, this, _executeFetch).call(this);
|
|
1352
|
-
this.updateResult();
|
|
1353
|
-
if (mounted && (_classPrivateFieldGet2(_currentQuery, this) !== prevQuery || resolveQueryBoolean(this.options.enabled, _classPrivateFieldGet2(_currentQuery, this)) !== resolveQueryBoolean(prevOptions.enabled, _classPrivateFieldGet2(_currentQuery, this)) || resolveStaleTime(this.options.staleTime, _classPrivateFieldGet2(_currentQuery, this)) !== resolveStaleTime(prevOptions.staleTime, _classPrivateFieldGet2(_currentQuery, this)))) _assertClassBrand(_Class_brand$2, this, _updateStaleTimeout).call(this);
|
|
1354
|
-
const nextRefetchInterval = _assertClassBrand(_Class_brand$2, this, _computeRefetchInterval).call(this);
|
|
1355
|
-
if (mounted && (_classPrivateFieldGet2(_currentQuery, this) !== prevQuery || resolveQueryBoolean(this.options.enabled, _classPrivateFieldGet2(_currentQuery, this)) !== resolveQueryBoolean(prevOptions.enabled, _classPrivateFieldGet2(_currentQuery, this)) || nextRefetchInterval !== _classPrivateFieldGet2(_currentRefetchInterval, this))) _assertClassBrand(_Class_brand$2, this, _updateRefetchInterval).call(this, nextRefetchInterval);
|
|
1356
|
-
}
|
|
1357
|
-
getOptimisticResult(options) {
|
|
1358
|
-
const query = _classPrivateFieldGet2(_client$2, this).getQueryCache().build(_classPrivateFieldGet2(_client$2, this), options);
|
|
1359
|
-
const result = this.createResult(query, options);
|
|
1360
|
-
if (shouldAssignObserverCurrentProperties(this, result)) {
|
|
1361
|
-
_classPrivateFieldSet2(_currentResult$1, this, result);
|
|
1362
|
-
_classPrivateFieldSet2(_currentResultOptions, this, this.options);
|
|
1363
|
-
_classPrivateFieldSet2(_currentResultState, this, _classPrivateFieldGet2(_currentQuery, this).state);
|
|
1364
|
-
}
|
|
1365
|
-
return result;
|
|
1366
|
-
}
|
|
1367
|
-
getCurrentResult() {
|
|
1368
|
-
return _classPrivateFieldGet2(_currentResult$1, this);
|
|
1369
|
-
}
|
|
1370
|
-
trackResult(result, onPropTracked) {
|
|
1371
|
-
return new Proxy(result, { get: (target, key) => {
|
|
1372
|
-
this.trackProp(key);
|
|
1373
|
-
onPropTracked === null || onPropTracked === void 0 || onPropTracked(key);
|
|
1374
|
-
if (key === "promise") {
|
|
1375
|
-
this.trackProp("data");
|
|
1376
|
-
if (!this.options.experimental_prefetchInRender && _classPrivateFieldGet2(_currentThenable, this).status === "pending") _classPrivateFieldGet2(_currentThenable, this).reject(/* @__PURE__ */ new Error("experimental_prefetchInRender feature flag is not enabled"));
|
|
1377
|
-
}
|
|
1378
|
-
return Reflect.get(target, key);
|
|
1379
|
-
} });
|
|
1380
|
-
}
|
|
1381
|
-
trackProp(key) {
|
|
1382
|
-
_classPrivateFieldGet2(_trackedProps, this).add(key);
|
|
1383
|
-
}
|
|
1384
|
-
getCurrentQuery() {
|
|
1385
|
-
return _classPrivateFieldGet2(_currentQuery, this);
|
|
1386
|
-
}
|
|
1387
|
-
refetch(_ref = {}) {
|
|
1388
|
-
let options = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
1389
|
-
return this.fetch(_objectSpread2({}, options));
|
|
1390
|
-
}
|
|
1391
|
-
fetchOptimistic(options) {
|
|
1392
|
-
const defaultedOptions = _classPrivateFieldGet2(_client$2, this).defaultQueryOptions(options);
|
|
1393
|
-
const query = _classPrivateFieldGet2(_client$2, this).getQueryCache().build(_classPrivateFieldGet2(_client$2, this), defaultedOptions);
|
|
1394
|
-
return query.fetch().then(() => this.createResult(query, defaultedOptions));
|
|
1395
|
-
}
|
|
1396
|
-
fetch(fetchOptions) {
|
|
1397
|
-
var _fetchOptions$cancelR;
|
|
1398
|
-
return _assertClassBrand(_Class_brand$2, this, _executeFetch).call(this, _objectSpread2(_objectSpread2({}, fetchOptions), {}, { cancelRefetch: (_fetchOptions$cancelR = fetchOptions.cancelRefetch) !== null && _fetchOptions$cancelR !== void 0 ? _fetchOptions$cancelR : true })).then(() => {
|
|
1399
|
-
this.updateResult();
|
|
1400
|
-
return _classPrivateFieldGet2(_currentResult$1, this);
|
|
1401
|
-
});
|
|
1402
|
-
}
|
|
1403
|
-
createResult(query, options) {
|
|
1404
|
-
const prevQuery = _classPrivateFieldGet2(_currentQuery, this);
|
|
1405
|
-
const prevOptions = this.options;
|
|
1406
|
-
const prevResult = _classPrivateFieldGet2(_currentResult$1, this);
|
|
1407
|
-
const prevResultState = _classPrivateFieldGet2(_currentResultState, this);
|
|
1408
|
-
const prevResultOptions = _classPrivateFieldGet2(_currentResultOptions, this);
|
|
1409
|
-
const queryInitialState = query !== prevQuery ? query.state : _classPrivateFieldGet2(_currentQueryInitialState, this);
|
|
1410
|
-
const { state } = query;
|
|
1411
|
-
let newState = _objectSpread2({}, state);
|
|
1412
|
-
let isPlaceholderData = false;
|
|
1413
|
-
let data;
|
|
1414
|
-
if (options._optimisticResults) {
|
|
1415
|
-
const mounted = this.hasListeners();
|
|
1416
|
-
const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
|
|
1417
|
-
const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
|
|
1418
|
-
if (fetchOnMount || fetchOptionally) newState = _objectSpread2(_objectSpread2({}, newState), fetchState(state.data, query.options));
|
|
1419
|
-
if (options._optimisticResults === "isRestoring") newState.fetchStatus = "idle";
|
|
1420
|
-
}
|
|
1421
|
-
let { error, errorUpdatedAt, status } = newState;
|
|
1422
|
-
data = newState.data;
|
|
1423
|
-
let skipSelect = false;
|
|
1424
|
-
if (options.placeholderData !== void 0 && data === void 0 && status === "pending") {
|
|
1425
|
-
let placeholderData;
|
|
1426
|
-
if ((prevResult === null || prevResult === void 0 ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions === null || prevResultOptions === void 0 ? void 0 : prevResultOptions.placeholderData)) {
|
|
1427
|
-
placeholderData = prevResult.data;
|
|
1428
|
-
skipSelect = true;
|
|
1429
|
-
} else {
|
|
1430
|
-
var _classPrivateFieldGet2$5;
|
|
1431
|
-
placeholderData = typeof options.placeholderData === "function" ? options.placeholderData((_classPrivateFieldGet2$5 = _classPrivateFieldGet2(_lastQueryWithDefinedData, this)) === null || _classPrivateFieldGet2$5 === void 0 ? void 0 : _classPrivateFieldGet2$5.state.data, _classPrivateFieldGet2(_lastQueryWithDefinedData, this)) : options.placeholderData;
|
|
1432
|
-
}
|
|
1433
|
-
if (placeholderData !== void 0) {
|
|
1434
|
-
status = "success";
|
|
1435
|
-
data = replaceData(prevResult === null || prevResult === void 0 ? void 0 : prevResult.data, placeholderData, options);
|
|
1436
|
-
isPlaceholderData = true;
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
if (options.select && data !== void 0 && !skipSelect) if (prevResult && data === (prevResultState === null || prevResultState === void 0 ? void 0 : prevResultState.data) && options.select === _classPrivateFieldGet2(_selectFn, this)) data = _classPrivateFieldGet2(_selectResult, this);
|
|
1440
|
-
else try {
|
|
1441
|
-
_classPrivateFieldSet2(_selectFn, this, options.select);
|
|
1442
|
-
data = options.select(data);
|
|
1443
|
-
data = replaceData(prevResult === null || prevResult === void 0 ? void 0 : prevResult.data, data, options);
|
|
1444
|
-
_classPrivateFieldSet2(_selectResult, this, data);
|
|
1445
|
-
_classPrivateFieldSet2(_selectError, this, null);
|
|
1446
|
-
} catch (selectError) {
|
|
1447
|
-
_classPrivateFieldSet2(_selectError, this, selectError);
|
|
1448
|
-
}
|
|
1449
|
-
if (_classPrivateFieldGet2(_selectError, this)) {
|
|
1450
|
-
error = _classPrivateFieldGet2(_selectError, this);
|
|
1451
|
-
data = _classPrivateFieldGet2(_selectResult, this);
|
|
1452
|
-
errorUpdatedAt = Date.now();
|
|
1453
|
-
status = "error";
|
|
1454
|
-
}
|
|
1455
|
-
const isFetching = newState.fetchStatus === "fetching";
|
|
1456
|
-
const isPending = status === "pending";
|
|
1457
|
-
const isError = status === "error";
|
|
1458
|
-
const isLoading = isPending && isFetching;
|
|
1459
|
-
const hasData = data !== void 0;
|
|
1460
|
-
const nextResult = {
|
|
1461
|
-
status,
|
|
1462
|
-
fetchStatus: newState.fetchStatus,
|
|
1463
|
-
isPending,
|
|
1464
|
-
isSuccess: status === "success",
|
|
1465
|
-
isError,
|
|
1466
|
-
isInitialLoading: isLoading,
|
|
1467
|
-
isLoading,
|
|
1468
|
-
data,
|
|
1469
|
-
dataUpdatedAt: newState.dataUpdatedAt,
|
|
1470
|
-
error,
|
|
1471
|
-
errorUpdatedAt,
|
|
1472
|
-
failureCount: newState.fetchFailureCount,
|
|
1473
|
-
failureReason: newState.fetchFailureReason,
|
|
1474
|
-
errorUpdateCount: newState.errorUpdateCount,
|
|
1475
|
-
isFetched: query.isFetched(),
|
|
1476
|
-
isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
|
|
1477
|
-
isFetching,
|
|
1478
|
-
isRefetching: isFetching && !isPending,
|
|
1479
|
-
isLoadingError: isError && !hasData,
|
|
1480
|
-
isPaused: newState.fetchStatus === "paused",
|
|
1481
|
-
isPlaceholderData,
|
|
1482
|
-
isRefetchError: isError && hasData,
|
|
1483
|
-
isStale: isStale(query, options),
|
|
1484
|
-
refetch: this.refetch,
|
|
1485
|
-
promise: _classPrivateFieldGet2(_currentThenable, this),
|
|
1486
|
-
isEnabled: resolveQueryBoolean(options.enabled, query) !== false
|
|
1487
|
-
};
|
|
1488
|
-
if (this.options.experimental_prefetchInRender) {
|
|
1489
|
-
const hasResultData = nextResult.data !== void 0;
|
|
1490
|
-
const isErrorWithoutData = nextResult.status === "error" && !hasResultData;
|
|
1491
|
-
const finalizeThenableIfPossible = (thenable) => {
|
|
1492
|
-
if (isErrorWithoutData) thenable.reject(nextResult.error);
|
|
1493
|
-
else if (hasResultData) thenable.resolve(nextResult.data);
|
|
1494
|
-
};
|
|
1495
|
-
const recreateThenable = () => {
|
|
1496
|
-
finalizeThenableIfPossible(_classPrivateFieldSet2(_currentThenable, this, nextResult.promise = pendingThenable()));
|
|
1497
|
-
};
|
|
1498
|
-
const prevThenable = _classPrivateFieldGet2(_currentThenable, this);
|
|
1499
|
-
switch (prevThenable.status) {
|
|
1500
|
-
case "pending":
|
|
1501
|
-
if (query.queryHash === prevQuery.queryHash) finalizeThenableIfPossible(prevThenable);
|
|
1502
|
-
break;
|
|
1503
|
-
case "fulfilled":
|
|
1504
|
-
if (isErrorWithoutData || nextResult.data !== prevThenable.value) recreateThenable();
|
|
1505
|
-
break;
|
|
1506
|
-
case "rejected":
|
|
1507
|
-
if (!isErrorWithoutData || nextResult.error !== prevThenable.reason) recreateThenable();
|
|
1508
|
-
break;
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
|
-
return nextResult;
|
|
1512
|
-
}
|
|
1513
|
-
updateResult() {
|
|
1514
|
-
const prevResult = _classPrivateFieldGet2(_currentResult$1, this);
|
|
1515
|
-
const nextResult = this.createResult(_classPrivateFieldGet2(_currentQuery, this), this.options);
|
|
1516
|
-
_classPrivateFieldSet2(_currentResultState, this, _classPrivateFieldGet2(_currentQuery, this).state);
|
|
1517
|
-
_classPrivateFieldSet2(_currentResultOptions, this, this.options);
|
|
1518
|
-
if (_classPrivateFieldGet2(_currentResultState, this).data !== void 0) _classPrivateFieldSet2(_lastQueryWithDefinedData, this, _classPrivateFieldGet2(_currentQuery, this));
|
|
1519
|
-
if (shallowEqualObjects(nextResult, prevResult)) return;
|
|
1520
|
-
_classPrivateFieldSet2(_currentResult$1, this, nextResult);
|
|
1521
|
-
const shouldNotifyListeners = () => {
|
|
1522
|
-
if (!prevResult) return true;
|
|
1523
|
-
const { notifyOnChangeProps } = this.options;
|
|
1524
|
-
const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
|
|
1525
|
-
if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !_classPrivateFieldGet2(_trackedProps, this).size) return true;
|
|
1526
|
-
const includedProps = new Set(notifyOnChangePropsValue !== null && notifyOnChangePropsValue !== void 0 ? notifyOnChangePropsValue : _classPrivateFieldGet2(_trackedProps, this));
|
|
1527
|
-
if (this.options.throwOnError) includedProps.add("error");
|
|
1528
|
-
return Object.keys(_classPrivateFieldGet2(_currentResult$1, this)).some((key) => {
|
|
1529
|
-
const typedKey = key;
|
|
1530
|
-
return _classPrivateFieldGet2(_currentResult$1, this)[typedKey] !== prevResult[typedKey] && includedProps.has(typedKey);
|
|
1531
|
-
});
|
|
1532
|
-
};
|
|
1533
|
-
_assertClassBrand(_Class_brand$2, this, _notify$1).call(this, { listeners: shouldNotifyListeners() });
|
|
1534
|
-
}
|
|
1535
|
-
onQueryUpdate() {
|
|
1536
|
-
this.updateResult();
|
|
1537
|
-
if (this.hasListeners()) _assertClassBrand(_Class_brand$2, this, _updateTimers).call(this);
|
|
1538
|
-
}
|
|
1539
|
-
});
|
|
1540
|
-
}));
|
|
1541
|
-
//#endregion
|
|
1542
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/mutation.js
|
|
1543
|
-
function _dispatch(action) {
|
|
1544
|
-
const reducer = (state) => {
|
|
1545
|
-
switch (action.type) {
|
|
1546
|
-
case "failed": return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
1547
|
-
failureCount: action.failureCount,
|
|
1548
|
-
failureReason: action.error
|
|
1549
|
-
});
|
|
1550
|
-
case "pause": return _objectSpread2(_objectSpread2({}, state), {}, { isPaused: true });
|
|
1551
|
-
case "continue": return _objectSpread2(_objectSpread2({}, state), {}, { isPaused: false });
|
|
1552
|
-
case "pending": return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
1553
|
-
context: action.context,
|
|
1554
|
-
data: void 0,
|
|
1555
|
-
failureCount: 0,
|
|
1556
|
-
failureReason: null,
|
|
1557
|
-
error: null,
|
|
1558
|
-
isPaused: action.isPaused,
|
|
1559
|
-
status: "pending",
|
|
1560
|
-
variables: action.variables,
|
|
1561
|
-
submittedAt: Date.now()
|
|
1562
|
-
});
|
|
1563
|
-
case "success": return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
1564
|
-
data: action.data,
|
|
1565
|
-
failureCount: 0,
|
|
1566
|
-
failureReason: null,
|
|
1567
|
-
error: null,
|
|
1568
|
-
status: "success",
|
|
1569
|
-
isPaused: false
|
|
1570
|
-
});
|
|
1571
|
-
case "error": return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
1572
|
-
data: void 0,
|
|
1573
|
-
error: action.error,
|
|
1574
|
-
failureCount: state.failureCount + 1,
|
|
1575
|
-
failureReason: action.error,
|
|
1576
|
-
isPaused: false,
|
|
1577
|
-
status: "error"
|
|
1578
|
-
});
|
|
1579
|
-
}
|
|
1580
|
-
};
|
|
1581
|
-
this.state = reducer(this.state);
|
|
1582
|
-
notifyManager.batch(() => {
|
|
1583
|
-
_classPrivateFieldGet2(_observers, this).forEach((observer) => {
|
|
1584
|
-
observer.onMutationUpdate(action);
|
|
1585
|
-
});
|
|
1586
|
-
_classPrivateFieldGet2(_mutationCache$1, this).notify({
|
|
1587
|
-
mutation: this,
|
|
1588
|
-
type: "updated",
|
|
1589
|
-
action
|
|
1590
|
-
});
|
|
1591
|
-
});
|
|
1592
|
-
}
|
|
1593
|
-
function getDefaultState() {
|
|
1594
|
-
return {
|
|
1595
|
-
context: void 0,
|
|
1596
|
-
data: void 0,
|
|
1597
|
-
error: null,
|
|
1598
|
-
failureCount: 0,
|
|
1599
|
-
failureReason: null,
|
|
1600
|
-
isPaused: false,
|
|
1601
|
-
status: "idle",
|
|
1602
|
-
variables: void 0,
|
|
1603
|
-
submittedAt: 0
|
|
1604
|
-
};
|
|
1605
|
-
}
|
|
1606
|
-
var _client$1, _observers, _mutationCache$1, _retryer, _Class_brand$1, Mutation;
|
|
1607
|
-
var init_mutation = __esmMin((() => {
|
|
1608
|
-
init_notifyManager();
|
|
1609
|
-
init_removable();
|
|
1610
|
-
init_retryer();
|
|
1611
|
-
init_classPrivateMethodInitSpec();
|
|
1612
|
-
init_classPrivateFieldInitSpec();
|
|
1613
|
-
init_classPrivateFieldSet2();
|
|
1614
|
-
init_classPrivateFieldGet2();
|
|
1615
|
-
init_assertClassBrand();
|
|
1616
|
-
init_asyncToGenerator();
|
|
1617
|
-
init_objectSpread2();
|
|
1618
|
-
Mutation = (_client$1 = /* @__PURE__ */ new WeakMap(), _observers = /* @__PURE__ */ new WeakMap(), _mutationCache$1 = /* @__PURE__ */ new WeakMap(), _retryer = /* @__PURE__ */ new WeakMap(), _Class_brand$1 = /* @__PURE__ */ new WeakSet(), class extends Removable {
|
|
1619
|
-
constructor(config) {
|
|
1620
|
-
super();
|
|
1621
|
-
_classPrivateMethodInitSpec(this, _Class_brand$1);
|
|
1622
|
-
_classPrivateFieldInitSpec(this, _client$1, void 0);
|
|
1623
|
-
_classPrivateFieldInitSpec(this, _observers, void 0);
|
|
1624
|
-
_classPrivateFieldInitSpec(this, _mutationCache$1, void 0);
|
|
1625
|
-
_classPrivateFieldInitSpec(this, _retryer, void 0);
|
|
1626
|
-
_classPrivateFieldSet2(_client$1, this, config.client);
|
|
1627
|
-
this.mutationId = config.mutationId;
|
|
1628
|
-
_classPrivateFieldSet2(_mutationCache$1, this, config.mutationCache);
|
|
1629
|
-
_classPrivateFieldSet2(_observers, this, []);
|
|
1630
|
-
this.state = config.state || getDefaultState();
|
|
1631
|
-
this.setOptions(config.options);
|
|
1632
|
-
this.scheduleGc();
|
|
1633
|
-
}
|
|
1634
|
-
setOptions(options) {
|
|
1635
|
-
this.options = options;
|
|
1636
|
-
this.updateGcTime(this.options.gcTime);
|
|
1637
|
-
}
|
|
1638
|
-
get meta() {
|
|
1639
|
-
return this.options.meta;
|
|
1640
|
-
}
|
|
1641
|
-
addObserver(observer) {
|
|
1642
|
-
if (!_classPrivateFieldGet2(_observers, this).includes(observer)) {
|
|
1643
|
-
_classPrivateFieldGet2(_observers, this).push(observer);
|
|
1644
|
-
this.clearGcTimeout();
|
|
1645
|
-
_classPrivateFieldGet2(_mutationCache$1, this).notify({
|
|
1646
|
-
type: "observerAdded",
|
|
1647
|
-
mutation: this,
|
|
1648
|
-
observer
|
|
1649
|
-
});
|
|
1650
|
-
}
|
|
1651
|
-
}
|
|
1652
|
-
removeObserver(observer) {
|
|
1653
|
-
_classPrivateFieldSet2(_observers, this, _classPrivateFieldGet2(_observers, this).filter((x) => x !== observer));
|
|
1654
|
-
this.scheduleGc();
|
|
1655
|
-
_classPrivateFieldGet2(_mutationCache$1, this).notify({
|
|
1656
|
-
type: "observerRemoved",
|
|
1657
|
-
mutation: this,
|
|
1658
|
-
observer
|
|
1659
|
-
});
|
|
1660
|
-
}
|
|
1661
|
-
optionalRemove() {
|
|
1662
|
-
if (!_classPrivateFieldGet2(_observers, this).length) if (this.state.status === "pending") this.scheduleGc();
|
|
1663
|
-
else _classPrivateFieldGet2(_mutationCache$1, this).remove(this);
|
|
1664
|
-
}
|
|
1665
|
-
continue() {
|
|
1666
|
-
var _this$retryer$continu, _classPrivateFieldGet2$4;
|
|
1667
|
-
return (_this$retryer$continu = (_classPrivateFieldGet2$4 = _classPrivateFieldGet2(_retryer, this)) === null || _classPrivateFieldGet2$4 === void 0 ? void 0 : _classPrivateFieldGet2$4.continue()) !== null && _this$retryer$continu !== void 0 ? _this$retryer$continu : this.execute(this.state.variables);
|
|
1668
|
-
}
|
|
1669
|
-
execute(variables) {
|
|
1670
|
-
var _this = this;
|
|
1671
|
-
return _asyncToGenerator(function* () {
|
|
1672
|
-
var _this$options$retry;
|
|
1673
|
-
const onContinue = () => {
|
|
1674
|
-
_assertClassBrand(_Class_brand$1, _this, _dispatch).call(_this, { type: "continue" });
|
|
1675
|
-
};
|
|
1676
|
-
const mutationFnContext = {
|
|
1677
|
-
client: _classPrivateFieldGet2(_client$1, _this),
|
|
1678
|
-
meta: _this.options.meta,
|
|
1679
|
-
mutationKey: _this.options.mutationKey
|
|
1680
|
-
};
|
|
1681
|
-
_classPrivateFieldSet2(_retryer, _this, createRetryer({
|
|
1682
|
-
fn: () => {
|
|
1683
|
-
if (!_this.options.mutationFn) return Promise.reject(/* @__PURE__ */ new Error("No mutationFn found"));
|
|
1684
|
-
return _this.options.mutationFn(variables, mutationFnContext);
|
|
1685
|
-
},
|
|
1686
|
-
onFail: (failureCount, error) => {
|
|
1687
|
-
_assertClassBrand(_Class_brand$1, _this, _dispatch).call(_this, {
|
|
1688
|
-
type: "failed",
|
|
1689
|
-
failureCount,
|
|
1690
|
-
error
|
|
1691
|
-
});
|
|
1692
|
-
},
|
|
1693
|
-
onPause: () => {
|
|
1694
|
-
_assertClassBrand(_Class_brand$1, _this, _dispatch).call(_this, { type: "pause" });
|
|
1695
|
-
},
|
|
1696
|
-
onContinue,
|
|
1697
|
-
retry: (_this$options$retry = _this.options.retry) !== null && _this$options$retry !== void 0 ? _this$options$retry : 0,
|
|
1698
|
-
retryDelay: _this.options.retryDelay,
|
|
1699
|
-
networkMode: _this.options.networkMode,
|
|
1700
|
-
canRun: () => _classPrivateFieldGet2(_mutationCache$1, _this).canRun(_this)
|
|
1701
|
-
}));
|
|
1702
|
-
const restored = _this.state.status === "pending";
|
|
1703
|
-
const isPaused = !_classPrivateFieldGet2(_retryer, _this).canStart();
|
|
1704
|
-
try {
|
|
1705
|
-
var _classPrivateFieldGet3, _classPrivateFieldGet4, _this$options$onSucce, _this$options2, _classPrivateFieldGet5, _classPrivateFieldGet6, _this$options$onSettl, _this$options3;
|
|
1706
|
-
if (restored) onContinue();
|
|
1707
|
-
else {
|
|
1708
|
-
var _this$options$onMutat, _this$options;
|
|
1709
|
-
_assertClassBrand(_Class_brand$1, _this, _dispatch).call(_this, {
|
|
1710
|
-
type: "pending",
|
|
1711
|
-
variables,
|
|
1712
|
-
isPaused
|
|
1713
|
-
});
|
|
1714
|
-
if (_classPrivateFieldGet2(_mutationCache$1, _this).config.onMutate) yield _classPrivateFieldGet2(_mutationCache$1, _this).config.onMutate(variables, _this, mutationFnContext);
|
|
1715
|
-
const context = yield (_this$options$onMutat = (_this$options = _this.options).onMutate) === null || _this$options$onMutat === void 0 ? void 0 : _this$options$onMutat.call(_this$options, variables, mutationFnContext);
|
|
1716
|
-
if (context !== _this.state.context) _assertClassBrand(_Class_brand$1, _this, _dispatch).call(_this, {
|
|
1717
|
-
type: "pending",
|
|
1718
|
-
context,
|
|
1719
|
-
variables,
|
|
1720
|
-
isPaused
|
|
1721
|
-
});
|
|
1722
|
-
}
|
|
1723
|
-
const data = yield _classPrivateFieldGet2(_retryer, _this).start();
|
|
1724
|
-
yield (_classPrivateFieldGet3 = (_classPrivateFieldGet4 = _classPrivateFieldGet2(_mutationCache$1, _this).config).onSuccess) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3.call(_classPrivateFieldGet4, data, variables, _this.state.context, _this, mutationFnContext);
|
|
1725
|
-
yield (_this$options$onSucce = (_this$options2 = _this.options).onSuccess) === null || _this$options$onSucce === void 0 ? void 0 : _this$options$onSucce.call(_this$options2, data, variables, _this.state.context, mutationFnContext);
|
|
1726
|
-
yield (_classPrivateFieldGet5 = (_classPrivateFieldGet6 = _classPrivateFieldGet2(_mutationCache$1, _this).config).onSettled) === null || _classPrivateFieldGet5 === void 0 ? void 0 : _classPrivateFieldGet5.call(_classPrivateFieldGet6, data, null, _this.state.variables, _this.state.context, _this, mutationFnContext);
|
|
1727
|
-
yield (_this$options$onSettl = (_this$options3 = _this.options).onSettled) === null || _this$options$onSettl === void 0 ? void 0 : _this$options$onSettl.call(_this$options3, data, null, variables, _this.state.context, mutationFnContext);
|
|
1728
|
-
_assertClassBrand(_Class_brand$1, _this, _dispatch).call(_this, {
|
|
1729
|
-
type: "success",
|
|
1730
|
-
data
|
|
1731
|
-
});
|
|
1732
|
-
return data;
|
|
1733
|
-
} catch (error) {
|
|
1734
|
-
try {
|
|
1735
|
-
var _classPrivateFieldGet7, _classPrivateFieldGet8;
|
|
1736
|
-
yield (_classPrivateFieldGet7 = (_classPrivateFieldGet8 = _classPrivateFieldGet2(_mutationCache$1, _this).config).onError) === null || _classPrivateFieldGet7 === void 0 ? void 0 : _classPrivateFieldGet7.call(_classPrivateFieldGet8, error, variables, _this.state.context, _this, mutationFnContext);
|
|
1737
|
-
} catch (e) {
|
|
1738
|
-
Promise.reject(e);
|
|
1739
|
-
}
|
|
1740
|
-
try {
|
|
1741
|
-
var _this$options$onError, _this$options4;
|
|
1742
|
-
yield (_this$options$onError = (_this$options4 = _this.options).onError) === null || _this$options$onError === void 0 ? void 0 : _this$options$onError.call(_this$options4, error, variables, _this.state.context, mutationFnContext);
|
|
1743
|
-
} catch (e) {
|
|
1744
|
-
Promise.reject(e);
|
|
1745
|
-
}
|
|
1746
|
-
try {
|
|
1747
|
-
var _classPrivateFieldGet9, _classPrivateFieldGet10;
|
|
1748
|
-
yield (_classPrivateFieldGet9 = (_classPrivateFieldGet10 = _classPrivateFieldGet2(_mutationCache$1, _this).config).onSettled) === null || _classPrivateFieldGet9 === void 0 ? void 0 : _classPrivateFieldGet9.call(_classPrivateFieldGet10, void 0, error, _this.state.variables, _this.state.context, _this, mutationFnContext);
|
|
1749
|
-
} catch (e) {
|
|
1750
|
-
Promise.reject(e);
|
|
1751
|
-
}
|
|
1752
|
-
try {
|
|
1753
|
-
var _this$options$onSettl2, _this$options5;
|
|
1754
|
-
yield (_this$options$onSettl2 = (_this$options5 = _this.options).onSettled) === null || _this$options$onSettl2 === void 0 ? void 0 : _this$options$onSettl2.call(_this$options5, void 0, error, variables, _this.state.context, mutationFnContext);
|
|
1755
|
-
} catch (e) {
|
|
1756
|
-
Promise.reject(e);
|
|
1757
|
-
}
|
|
1758
|
-
_assertClassBrand(_Class_brand$1, _this, _dispatch).call(_this, {
|
|
1759
|
-
type: "error",
|
|
1760
|
-
error
|
|
1761
|
-
});
|
|
1762
|
-
throw error;
|
|
1763
|
-
} finally {
|
|
1764
|
-
_classPrivateFieldGet2(_mutationCache$1, _this).runNext(_this);
|
|
1765
|
-
}
|
|
1766
|
-
})();
|
|
1767
|
-
}
|
|
1768
|
-
});
|
|
1769
|
-
}));
|
|
1770
|
-
//#endregion
|
|
1771
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/mutationCache.js
|
|
1772
|
-
function scopeFor(mutation) {
|
|
1773
|
-
var _mutation$options$sco;
|
|
1774
|
-
return (_mutation$options$sco = mutation.options.scope) === null || _mutation$options$sco === void 0 ? void 0 : _mutation$options$sco.id;
|
|
1775
|
-
}
|
|
1776
|
-
var _mutations, _scopes, _mutationId, MutationCache;
|
|
1777
|
-
var init_mutationCache = __esmMin((() => {
|
|
1778
|
-
init_notifyManager();
|
|
1779
|
-
init_mutation();
|
|
1780
|
-
init_utils();
|
|
1781
|
-
init_subscribable();
|
|
1782
|
-
init_classPrivateFieldInitSpec();
|
|
1783
|
-
init_classPrivateFieldSet2();
|
|
1784
|
-
init_classPrivateFieldGet2();
|
|
1785
|
-
init_objectSpread2();
|
|
1786
|
-
MutationCache = (_mutations = /* @__PURE__ */ new WeakMap(), _scopes = /* @__PURE__ */ new WeakMap(), _mutationId = /* @__PURE__ */ new WeakMap(), class extends Subscribable {
|
|
1787
|
-
constructor(config = {}) {
|
|
1788
|
-
super();
|
|
1789
|
-
_classPrivateFieldInitSpec(this, _mutations, void 0);
|
|
1790
|
-
_classPrivateFieldInitSpec(this, _scopes, void 0);
|
|
1791
|
-
_classPrivateFieldInitSpec(this, _mutationId, void 0);
|
|
1792
|
-
this.config = config;
|
|
1793
|
-
_classPrivateFieldSet2(_mutations, this, /* @__PURE__ */ new Set());
|
|
1794
|
-
_classPrivateFieldSet2(_scopes, this, /* @__PURE__ */ new Map());
|
|
1795
|
-
_classPrivateFieldSet2(_mutationId, this, 0);
|
|
1796
|
-
}
|
|
1797
|
-
build(client, options, state) {
|
|
1798
|
-
var _this$mutationId;
|
|
1799
|
-
const mutation = new Mutation({
|
|
1800
|
-
client,
|
|
1801
|
-
mutationCache: this,
|
|
1802
|
-
mutationId: _classPrivateFieldSet2(_mutationId, this, (_this$mutationId = _classPrivateFieldGet2(_mutationId, this), ++_this$mutationId)),
|
|
1803
|
-
options: client.defaultMutationOptions(options),
|
|
1804
|
-
state
|
|
1805
|
-
});
|
|
1806
|
-
this.add(mutation);
|
|
1807
|
-
return mutation;
|
|
1808
|
-
}
|
|
1809
|
-
add(mutation) {
|
|
1810
|
-
_classPrivateFieldGet2(_mutations, this).add(mutation);
|
|
1811
|
-
const scope = scopeFor(mutation);
|
|
1812
|
-
if (typeof scope === "string") {
|
|
1813
|
-
const scopedMutations = _classPrivateFieldGet2(_scopes, this).get(scope);
|
|
1814
|
-
if (scopedMutations) scopedMutations.push(mutation);
|
|
1815
|
-
else _classPrivateFieldGet2(_scopes, this).set(scope, [mutation]);
|
|
1816
|
-
}
|
|
1817
|
-
this.notify({
|
|
1818
|
-
type: "added",
|
|
1819
|
-
mutation
|
|
1820
|
-
});
|
|
1821
|
-
}
|
|
1822
|
-
remove(mutation) {
|
|
1823
|
-
if (_classPrivateFieldGet2(_mutations, this).delete(mutation)) {
|
|
1824
|
-
const scope = scopeFor(mutation);
|
|
1825
|
-
if (typeof scope === "string") {
|
|
1826
|
-
const scopedMutations = _classPrivateFieldGet2(_scopes, this).get(scope);
|
|
1827
|
-
if (scopedMutations) {
|
|
1828
|
-
if (scopedMutations.length > 1) {
|
|
1829
|
-
const index = scopedMutations.indexOf(mutation);
|
|
1830
|
-
if (index !== -1) scopedMutations.splice(index, 1);
|
|
1831
|
-
} else if (scopedMutations[0] === mutation) _classPrivateFieldGet2(_scopes, this).delete(scope);
|
|
1832
|
-
}
|
|
1833
|
-
}
|
|
1834
|
-
}
|
|
1835
|
-
this.notify({
|
|
1836
|
-
type: "removed",
|
|
1837
|
-
mutation
|
|
1838
|
-
});
|
|
1839
|
-
}
|
|
1840
|
-
canRun(mutation) {
|
|
1841
|
-
const scope = scopeFor(mutation);
|
|
1842
|
-
if (typeof scope === "string") {
|
|
1843
|
-
const mutationsWithSameScope = _classPrivateFieldGet2(_scopes, this).get(scope);
|
|
1844
|
-
const firstPendingMutation = mutationsWithSameScope === null || mutationsWithSameScope === void 0 ? void 0 : mutationsWithSameScope.find((m) => m.state.status === "pending");
|
|
1845
|
-
return !firstPendingMutation || firstPendingMutation === mutation;
|
|
1846
|
-
} else return true;
|
|
1847
|
-
}
|
|
1848
|
-
runNext(mutation) {
|
|
1849
|
-
const scope = scopeFor(mutation);
|
|
1850
|
-
if (typeof scope === "string") {
|
|
1851
|
-
var _classPrivateFieldGet2$3, _foundMutation$contin;
|
|
1852
|
-
const foundMutation = (_classPrivateFieldGet2$3 = _classPrivateFieldGet2(_scopes, this).get(scope)) === null || _classPrivateFieldGet2$3 === void 0 ? void 0 : _classPrivateFieldGet2$3.find((m) => m !== mutation && m.state.isPaused);
|
|
1853
|
-
return (_foundMutation$contin = foundMutation === null || foundMutation === void 0 ? void 0 : foundMutation.continue()) !== null && _foundMutation$contin !== void 0 ? _foundMutation$contin : Promise.resolve();
|
|
1854
|
-
} else return Promise.resolve();
|
|
1855
|
-
}
|
|
1856
|
-
clear() {
|
|
1857
|
-
notifyManager.batch(() => {
|
|
1858
|
-
_classPrivateFieldGet2(_mutations, this).forEach((mutation) => {
|
|
1859
|
-
this.notify({
|
|
1860
|
-
type: "removed",
|
|
1861
|
-
mutation
|
|
1862
|
-
});
|
|
1863
|
-
});
|
|
1864
|
-
_classPrivateFieldGet2(_mutations, this).clear();
|
|
1865
|
-
_classPrivateFieldGet2(_scopes, this).clear();
|
|
1866
|
-
});
|
|
1867
|
-
}
|
|
1868
|
-
getAll() {
|
|
1869
|
-
return Array.from(_classPrivateFieldGet2(_mutations, this));
|
|
1870
|
-
}
|
|
1871
|
-
find(filters) {
|
|
1872
|
-
const defaultedFilters = _objectSpread2({ exact: true }, filters);
|
|
1873
|
-
return this.getAll().find((mutation) => matchMutation(defaultedFilters, mutation));
|
|
1874
|
-
}
|
|
1875
|
-
findAll(filters = {}) {
|
|
1876
|
-
return this.getAll().filter((mutation) => matchMutation(filters, mutation));
|
|
1877
|
-
}
|
|
1878
|
-
notify(event) {
|
|
1879
|
-
notifyManager.batch(() => {
|
|
1880
|
-
this.listeners.forEach((listener) => {
|
|
1881
|
-
listener(event);
|
|
1882
|
-
});
|
|
1883
|
-
});
|
|
1884
|
-
}
|
|
1885
|
-
resumePausedMutations() {
|
|
1886
|
-
const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
|
|
1887
|
-
return notifyManager.batch(() => Promise.all(pausedMutations.map((mutation) => mutation.continue().catch(noop))));
|
|
1888
|
-
}
|
|
1889
|
-
});
|
|
1890
|
-
}));
|
|
1891
|
-
//#endregion
|
|
1892
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/mutationObserver.js
|
|
1893
|
-
function _updateResult() {
|
|
1894
|
-
var _this$currentMutation, _classPrivateFieldGet6;
|
|
1895
|
-
const state = (_this$currentMutation = (_classPrivateFieldGet6 = _classPrivateFieldGet2(_currentMutation, this)) === null || _classPrivateFieldGet6 === void 0 ? void 0 : _classPrivateFieldGet6.state) !== null && _this$currentMutation !== void 0 ? _this$currentMutation : getDefaultState();
|
|
1896
|
-
_classPrivateFieldSet2(_currentResult, this, _objectSpread2(_objectSpread2({}, state), {}, {
|
|
1897
|
-
isPending: state.status === "pending",
|
|
1898
|
-
isSuccess: state.status === "success",
|
|
1899
|
-
isError: state.status === "error",
|
|
1900
|
-
isIdle: state.status === "idle",
|
|
1901
|
-
mutate: this.mutate,
|
|
1902
|
-
reset: this.reset
|
|
1903
|
-
}));
|
|
1904
|
-
}
|
|
1905
|
-
function _notify(action) {
|
|
1906
|
-
notifyManager.batch(() => {
|
|
1907
|
-
if (_classPrivateFieldGet2(_mutateOptions, this) && this.hasListeners()) {
|
|
1908
|
-
const variables = _classPrivateFieldGet2(_currentResult, this).variables;
|
|
1909
|
-
const onMutateResult = _classPrivateFieldGet2(_currentResult, this).context;
|
|
1910
|
-
const context = {
|
|
1911
|
-
client: _classPrivateFieldGet2(_client, this),
|
|
1912
|
-
meta: this.options.meta,
|
|
1913
|
-
mutationKey: this.options.mutationKey
|
|
1914
|
-
};
|
|
1915
|
-
if ((action === null || action === void 0 ? void 0 : action.type) === "success") {
|
|
1916
|
-
try {
|
|
1917
|
-
var _classPrivateFieldGet7, _classPrivateFieldGet8;
|
|
1918
|
-
(_classPrivateFieldGet7 = (_classPrivateFieldGet8 = _classPrivateFieldGet2(_mutateOptions, this)).onSuccess) === null || _classPrivateFieldGet7 === void 0 || _classPrivateFieldGet7.call(_classPrivateFieldGet8, action.data, variables, onMutateResult, context);
|
|
1919
|
-
} catch (e) {
|
|
1920
|
-
Promise.reject(e);
|
|
1921
|
-
}
|
|
1922
|
-
try {
|
|
1923
|
-
var _classPrivateFieldGet9, _classPrivateFieldGet10;
|
|
1924
|
-
(_classPrivateFieldGet9 = (_classPrivateFieldGet10 = _classPrivateFieldGet2(_mutateOptions, this)).onSettled) === null || _classPrivateFieldGet9 === void 0 || _classPrivateFieldGet9.call(_classPrivateFieldGet10, action.data, null, variables, onMutateResult, context);
|
|
1925
|
-
} catch (e) {
|
|
1926
|
-
Promise.reject(e);
|
|
1927
|
-
}
|
|
1928
|
-
} else if ((action === null || action === void 0 ? void 0 : action.type) === "error") {
|
|
1929
|
-
try {
|
|
1930
|
-
var _classPrivateFieldGet11, _classPrivateFieldGet12;
|
|
1931
|
-
(_classPrivateFieldGet11 = (_classPrivateFieldGet12 = _classPrivateFieldGet2(_mutateOptions, this)).onError) === null || _classPrivateFieldGet11 === void 0 || _classPrivateFieldGet11.call(_classPrivateFieldGet12, action.error, variables, onMutateResult, context);
|
|
1932
|
-
} catch (e) {
|
|
1933
|
-
Promise.reject(e);
|
|
1934
|
-
}
|
|
1935
|
-
try {
|
|
1936
|
-
var _classPrivateFieldGet13, _classPrivateFieldGet14;
|
|
1937
|
-
(_classPrivateFieldGet13 = (_classPrivateFieldGet14 = _classPrivateFieldGet2(_mutateOptions, this)).onSettled) === null || _classPrivateFieldGet13 === void 0 || _classPrivateFieldGet13.call(_classPrivateFieldGet14, void 0, action.error, variables, onMutateResult, context);
|
|
1938
|
-
} catch (e) {
|
|
1939
|
-
Promise.reject(e);
|
|
1940
|
-
}
|
|
1941
|
-
}
|
|
1942
|
-
}
|
|
1943
|
-
this.listeners.forEach((listener) => {
|
|
1944
|
-
listener(_classPrivateFieldGet2(_currentResult, this));
|
|
1945
|
-
});
|
|
1946
|
-
});
|
|
1947
|
-
}
|
|
1948
|
-
var _client, _currentResult, _currentMutation, _mutateOptions, _Class_brand, MutationObserver;
|
|
1949
|
-
var init_mutationObserver = __esmMin((() => {
|
|
1950
|
-
init_mutation();
|
|
1951
|
-
init_notifyManager();
|
|
1952
|
-
init_subscribable();
|
|
1953
|
-
init_utils();
|
|
1954
|
-
init_classPrivateMethodInitSpec();
|
|
1955
|
-
init_classPrivateFieldInitSpec();
|
|
1956
|
-
init_classPrivateFieldSet2();
|
|
1957
|
-
init_assertClassBrand();
|
|
1958
|
-
init_classPrivateFieldGet2();
|
|
1959
|
-
init_objectSpread2();
|
|
1960
|
-
MutationObserver = (_client = /* @__PURE__ */ new WeakMap(), _currentResult = /* @__PURE__ */ new WeakMap(), _currentMutation = /* @__PURE__ */ new WeakMap(), _mutateOptions = /* @__PURE__ */ new WeakMap(), _Class_brand = /* @__PURE__ */ new WeakSet(), class extends Subscribable {
|
|
1961
|
-
constructor(client, options) {
|
|
1962
|
-
super();
|
|
1963
|
-
_classPrivateMethodInitSpec(this, _Class_brand);
|
|
1964
|
-
_classPrivateFieldInitSpec(this, _client, void 0);
|
|
1965
|
-
_classPrivateFieldInitSpec(this, _currentResult, void 0);
|
|
1966
|
-
_classPrivateFieldInitSpec(this, _currentMutation, void 0);
|
|
1967
|
-
_classPrivateFieldInitSpec(this, _mutateOptions, void 0);
|
|
1968
|
-
_classPrivateFieldSet2(_client, this, client);
|
|
1969
|
-
this.setOptions(options);
|
|
1970
|
-
this.bindMethods();
|
|
1971
|
-
_assertClassBrand(_Class_brand, this, _updateResult).call(this);
|
|
1972
|
-
}
|
|
1973
|
-
bindMethods() {
|
|
1974
|
-
this.mutate = this.mutate.bind(this);
|
|
1975
|
-
this.reset = this.reset.bind(this);
|
|
1976
|
-
}
|
|
1977
|
-
setOptions(options) {
|
|
1978
|
-
var _classPrivateFieldGet2$2;
|
|
1979
|
-
const prevOptions = this.options;
|
|
1980
|
-
this.options = _classPrivateFieldGet2(_client, this).defaultMutationOptions(options);
|
|
1981
|
-
if (!shallowEqualObjects(this.options, prevOptions)) _classPrivateFieldGet2(_client, this).getMutationCache().notify({
|
|
1982
|
-
type: "observerOptionsUpdated",
|
|
1983
|
-
mutation: _classPrivateFieldGet2(_currentMutation, this),
|
|
1984
|
-
observer: this
|
|
1985
|
-
});
|
|
1986
|
-
if ((prevOptions === null || prevOptions === void 0 ? void 0 : prevOptions.mutationKey) && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) this.reset();
|
|
1987
|
-
else if (((_classPrivateFieldGet2$2 = _classPrivateFieldGet2(_currentMutation, this)) === null || _classPrivateFieldGet2$2 === void 0 ? void 0 : _classPrivateFieldGet2$2.state.status) === "pending") _classPrivateFieldGet2(_currentMutation, this).setOptions(this.options);
|
|
1988
|
-
}
|
|
1989
|
-
onUnsubscribe() {
|
|
1990
|
-
if (!this.hasListeners()) {
|
|
1991
|
-
var _classPrivateFieldGet3;
|
|
1992
|
-
(_classPrivateFieldGet3 = _classPrivateFieldGet2(_currentMutation, this)) === null || _classPrivateFieldGet3 === void 0 || _classPrivateFieldGet3.removeObserver(this);
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
onMutationUpdate(action) {
|
|
1996
|
-
_assertClassBrand(_Class_brand, this, _updateResult).call(this);
|
|
1997
|
-
_assertClassBrand(_Class_brand, this, _notify).call(this, action);
|
|
1998
|
-
}
|
|
1999
|
-
getCurrentResult() {
|
|
2000
|
-
return _classPrivateFieldGet2(_currentResult, this);
|
|
2001
|
-
}
|
|
2002
|
-
reset() {
|
|
2003
|
-
var _classPrivateFieldGet4;
|
|
2004
|
-
(_classPrivateFieldGet4 = _classPrivateFieldGet2(_currentMutation, this)) === null || _classPrivateFieldGet4 === void 0 || _classPrivateFieldGet4.removeObserver(this);
|
|
2005
|
-
_classPrivateFieldSet2(_currentMutation, this, void 0);
|
|
2006
|
-
_assertClassBrand(_Class_brand, this, _updateResult).call(this);
|
|
2007
|
-
_assertClassBrand(_Class_brand, this, _notify).call(this);
|
|
2008
|
-
}
|
|
2009
|
-
mutate(variables, options) {
|
|
2010
|
-
var _classPrivateFieldGet5;
|
|
2011
|
-
_classPrivateFieldSet2(_mutateOptions, this, options);
|
|
2012
|
-
(_classPrivateFieldGet5 = _classPrivateFieldGet2(_currentMutation, this)) === null || _classPrivateFieldGet5 === void 0 || _classPrivateFieldGet5.removeObserver(this);
|
|
2013
|
-
_classPrivateFieldSet2(_currentMutation, this, _classPrivateFieldGet2(_client, this).getMutationCache().build(_classPrivateFieldGet2(_client, this), this.options));
|
|
2014
|
-
_classPrivateFieldGet2(_currentMutation, this).addObserver(this);
|
|
2015
|
-
return _classPrivateFieldGet2(_currentMutation, this).execute(variables);
|
|
2016
|
-
}
|
|
2017
|
-
});
|
|
2018
|
-
}));
|
|
2019
|
-
//#endregion
|
|
2020
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/queryCache.js
|
|
2021
|
-
var _queries, QueryCache;
|
|
2022
|
-
var init_queryCache = __esmMin((() => {
|
|
2023
|
-
init_utils();
|
|
2024
|
-
init_query();
|
|
2025
|
-
init_notifyManager();
|
|
2026
|
-
init_subscribable();
|
|
2027
|
-
init_classPrivateFieldInitSpec();
|
|
2028
|
-
init_classPrivateFieldSet2();
|
|
2029
|
-
init_classPrivateFieldGet2();
|
|
2030
|
-
init_objectSpread2();
|
|
2031
|
-
QueryCache = (_queries = /* @__PURE__ */ new WeakMap(), class extends Subscribable {
|
|
2032
|
-
constructor(config = {}) {
|
|
2033
|
-
super();
|
|
2034
|
-
_classPrivateFieldInitSpec(this, _queries, void 0);
|
|
2035
|
-
this.config = config;
|
|
2036
|
-
_classPrivateFieldSet2(_queries, this, /* @__PURE__ */ new Map());
|
|
2037
|
-
}
|
|
2038
|
-
build(client, options, state) {
|
|
2039
|
-
var _options$queryHash;
|
|
2040
|
-
const queryKey = options.queryKey;
|
|
2041
|
-
const queryHash = (_options$queryHash = options.queryHash) !== null && _options$queryHash !== void 0 ? _options$queryHash : hashQueryKeyByOptions(queryKey, options);
|
|
2042
|
-
let query = this.get(queryHash);
|
|
2043
|
-
if (!query) {
|
|
2044
|
-
query = new Query({
|
|
2045
|
-
client,
|
|
2046
|
-
queryKey,
|
|
2047
|
-
queryHash,
|
|
2048
|
-
options: client.defaultQueryOptions(options),
|
|
2049
|
-
state,
|
|
2050
|
-
defaultOptions: client.getQueryDefaults(queryKey)
|
|
2051
|
-
});
|
|
2052
|
-
this.add(query);
|
|
2053
|
-
}
|
|
2054
|
-
return query;
|
|
2055
|
-
}
|
|
2056
|
-
add(query) {
|
|
2057
|
-
if (!_classPrivateFieldGet2(_queries, this).has(query.queryHash)) {
|
|
2058
|
-
_classPrivateFieldGet2(_queries, this).set(query.queryHash, query);
|
|
2059
|
-
this.notify({
|
|
2060
|
-
type: "added",
|
|
2061
|
-
query
|
|
2062
|
-
});
|
|
2063
|
-
}
|
|
2064
|
-
}
|
|
2065
|
-
remove(query) {
|
|
2066
|
-
const queryInMap = _classPrivateFieldGet2(_queries, this).get(query.queryHash);
|
|
2067
|
-
if (queryInMap) {
|
|
2068
|
-
query.destroy();
|
|
2069
|
-
if (queryInMap === query) _classPrivateFieldGet2(_queries, this).delete(query.queryHash);
|
|
2070
|
-
this.notify({
|
|
2071
|
-
type: "removed",
|
|
2072
|
-
query
|
|
2073
|
-
});
|
|
2074
|
-
}
|
|
2075
|
-
}
|
|
2076
|
-
clear() {
|
|
2077
|
-
notifyManager.batch(() => {
|
|
2078
|
-
this.getAll().forEach((query) => {
|
|
2079
|
-
this.remove(query);
|
|
2080
|
-
});
|
|
2081
|
-
});
|
|
2082
|
-
}
|
|
2083
|
-
get(queryHash) {
|
|
2084
|
-
return _classPrivateFieldGet2(_queries, this).get(queryHash);
|
|
2085
|
-
}
|
|
2086
|
-
getAll() {
|
|
2087
|
-
return [..._classPrivateFieldGet2(_queries, this).values()];
|
|
2088
|
-
}
|
|
2089
|
-
find(filters) {
|
|
2090
|
-
const defaultedFilters = _objectSpread2({ exact: true }, filters);
|
|
2091
|
-
return this.getAll().find((query) => matchQuery(defaultedFilters, query));
|
|
2092
|
-
}
|
|
2093
|
-
findAll(filters = {}) {
|
|
2094
|
-
const queries = this.getAll();
|
|
2095
|
-
return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;
|
|
2096
|
-
}
|
|
2097
|
-
notify(event) {
|
|
2098
|
-
notifyManager.batch(() => {
|
|
2099
|
-
this.listeners.forEach((listener) => {
|
|
2100
|
-
listener(event);
|
|
2101
|
-
});
|
|
2102
|
-
});
|
|
2103
|
-
}
|
|
2104
|
-
onFocus() {
|
|
2105
|
-
notifyManager.batch(() => {
|
|
2106
|
-
this.getAll().forEach((query) => {
|
|
2107
|
-
query.onFocus();
|
|
2108
|
-
});
|
|
2109
|
-
});
|
|
2110
|
-
}
|
|
2111
|
-
onOnline() {
|
|
2112
|
-
notifyManager.batch(() => {
|
|
2113
|
-
this.getAll().forEach((query) => {
|
|
2114
|
-
query.onOnline();
|
|
2115
|
-
});
|
|
2116
|
-
});
|
|
2117
|
-
}
|
|
2118
|
-
});
|
|
2119
|
-
}));
|
|
2120
|
-
//#endregion
|
|
2121
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/queryClient.js
|
|
2122
|
-
var _queryCache, _mutationCache, _defaultOptions, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, QueryClient;
|
|
2123
|
-
var init_queryClient = __esmMin((() => {
|
|
2124
|
-
init_utils();
|
|
2125
|
-
init_queryCache();
|
|
2126
|
-
init_mutationCache();
|
|
2127
|
-
init_focusManager();
|
|
2128
|
-
init_onlineManager();
|
|
2129
|
-
init_notifyManager();
|
|
2130
|
-
init_classPrivateFieldInitSpec();
|
|
2131
|
-
init_classPrivateFieldSet2();
|
|
2132
|
-
init_classPrivateFieldGet2();
|
|
2133
|
-
init_asyncToGenerator();
|
|
2134
|
-
init_objectSpread2();
|
|
2135
|
-
QueryClient = (_queryCache = /* @__PURE__ */ new WeakMap(), _mutationCache = /* @__PURE__ */ new WeakMap(), _defaultOptions = /* @__PURE__ */ new WeakMap(), _queryDefaults = /* @__PURE__ */ new WeakMap(), _mutationDefaults = /* @__PURE__ */ new WeakMap(), _mountCount = /* @__PURE__ */ new WeakMap(), _unsubscribeFocus = /* @__PURE__ */ new WeakMap(), _unsubscribeOnline = /* @__PURE__ */ new WeakMap(), class {
|
|
2136
|
-
constructor(config = {}) {
|
|
2137
|
-
_classPrivateFieldInitSpec(this, _queryCache, void 0);
|
|
2138
|
-
_classPrivateFieldInitSpec(this, _mutationCache, void 0);
|
|
2139
|
-
_classPrivateFieldInitSpec(this, _defaultOptions, void 0);
|
|
2140
|
-
_classPrivateFieldInitSpec(this, _queryDefaults, void 0);
|
|
2141
|
-
_classPrivateFieldInitSpec(this, _mutationDefaults, void 0);
|
|
2142
|
-
_classPrivateFieldInitSpec(this, _mountCount, void 0);
|
|
2143
|
-
_classPrivateFieldInitSpec(this, _unsubscribeFocus, void 0);
|
|
2144
|
-
_classPrivateFieldInitSpec(this, _unsubscribeOnline, void 0);
|
|
2145
|
-
_classPrivateFieldSet2(_queryCache, this, config.queryCache || new QueryCache());
|
|
2146
|
-
_classPrivateFieldSet2(_mutationCache, this, config.mutationCache || new MutationCache());
|
|
2147
|
-
_classPrivateFieldSet2(_defaultOptions, this, config.defaultOptions || {});
|
|
2148
|
-
_classPrivateFieldSet2(_queryDefaults, this, /* @__PURE__ */ new Map());
|
|
2149
|
-
_classPrivateFieldSet2(_mutationDefaults, this, /* @__PURE__ */ new Map());
|
|
2150
|
-
_classPrivateFieldSet2(_mountCount, this, 0);
|
|
2151
|
-
}
|
|
2152
|
-
mount() {
|
|
2153
|
-
var _this = this, _this$mountCount;
|
|
2154
|
-
_classPrivateFieldSet2(_mountCount, this, (_this$mountCount = _classPrivateFieldGet2(_mountCount, this), _this$mountCount++, _this$mountCount));
|
|
2155
|
-
if (_classPrivateFieldGet2(_mountCount, this) !== 1) return;
|
|
2156
|
-
_classPrivateFieldSet2(_unsubscribeFocus, this, focusManager.subscribe(function() {
|
|
2157
|
-
var _ref = _asyncToGenerator(function* (focused) {
|
|
2158
|
-
if (focused) {
|
|
2159
|
-
yield _this.resumePausedMutations();
|
|
2160
|
-
_classPrivateFieldGet2(_queryCache, _this).onFocus();
|
|
2161
|
-
}
|
|
2162
|
-
});
|
|
2163
|
-
return function(_x) {
|
|
2164
|
-
return _ref.apply(this, arguments);
|
|
2165
|
-
};
|
|
2166
|
-
}()));
|
|
2167
|
-
_classPrivateFieldSet2(_unsubscribeOnline, this, onlineManager.subscribe(function() {
|
|
2168
|
-
var _ref2 = _asyncToGenerator(function* (online) {
|
|
2169
|
-
if (online) {
|
|
2170
|
-
yield _this.resumePausedMutations();
|
|
2171
|
-
_classPrivateFieldGet2(_queryCache, _this).onOnline();
|
|
2172
|
-
}
|
|
2173
|
-
});
|
|
2174
|
-
return function(_x2) {
|
|
2175
|
-
return _ref2.apply(this, arguments);
|
|
2176
|
-
};
|
|
2177
|
-
}()));
|
|
2178
|
-
}
|
|
2179
|
-
unmount() {
|
|
2180
|
-
var _this$mountCount3, _classPrivateFieldGet2$1, _classPrivateFieldGet3;
|
|
2181
|
-
_classPrivateFieldSet2(_mountCount, this, (_this$mountCount3 = _classPrivateFieldGet2(_mountCount, this), _this$mountCount3--, _this$mountCount3));
|
|
2182
|
-
if (_classPrivateFieldGet2(_mountCount, this) !== 0) return;
|
|
2183
|
-
(_classPrivateFieldGet2$1 = _classPrivateFieldGet2(_unsubscribeFocus, this)) === null || _classPrivateFieldGet2$1 === void 0 || _classPrivateFieldGet2$1.call(this);
|
|
2184
|
-
_classPrivateFieldSet2(_unsubscribeFocus, this, void 0);
|
|
2185
|
-
(_classPrivateFieldGet3 = _classPrivateFieldGet2(_unsubscribeOnline, this)) === null || _classPrivateFieldGet3 === void 0 || _classPrivateFieldGet3.call(this);
|
|
2186
|
-
_classPrivateFieldSet2(_unsubscribeOnline, this, void 0);
|
|
2187
|
-
}
|
|
2188
|
-
isFetching(filters) {
|
|
2189
|
-
return _classPrivateFieldGet2(_queryCache, this).findAll(_objectSpread2(_objectSpread2({}, filters), {}, { fetchStatus: "fetching" })).length;
|
|
2190
|
-
}
|
|
2191
|
-
isMutating(filters) {
|
|
2192
|
-
return _classPrivateFieldGet2(_mutationCache, this).findAll(_objectSpread2(_objectSpread2({}, filters), {}, { status: "pending" })).length;
|
|
2193
|
-
}
|
|
2194
|
-
/**
|
|
2195
|
-
* Imperative (non-reactive) way to retrieve data for a QueryKey.
|
|
2196
|
-
* Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
|
|
2197
|
-
*
|
|
2198
|
-
* Hint: Do not use this function inside a component, because it won't receive updates.
|
|
2199
|
-
* Use `useQuery` to create a `QueryObserver` that subscribes to changes.
|
|
2200
|
-
*/
|
|
2201
|
-
getQueryData(queryKey) {
|
|
2202
|
-
var _classPrivateFieldGet4;
|
|
2203
|
-
const options = this.defaultQueryOptions({ queryKey });
|
|
2204
|
-
return (_classPrivateFieldGet4 = _classPrivateFieldGet2(_queryCache, this).get(options.queryHash)) === null || _classPrivateFieldGet4 === void 0 ? void 0 : _classPrivateFieldGet4.state.data;
|
|
2205
|
-
}
|
|
2206
|
-
ensureQueryData(options) {
|
|
2207
|
-
const defaultedOptions = this.defaultQueryOptions(options);
|
|
2208
|
-
const query = _classPrivateFieldGet2(_queryCache, this).build(this, defaultedOptions);
|
|
2209
|
-
const cachedData = query.state.data;
|
|
2210
|
-
if (cachedData === void 0) return this.fetchQuery(options);
|
|
2211
|
-
if (options.revalidateIfStale && query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query))) this.prefetchQuery(defaultedOptions);
|
|
2212
|
-
return Promise.resolve(cachedData);
|
|
2213
|
-
}
|
|
2214
|
-
getQueriesData(filters) {
|
|
2215
|
-
return _classPrivateFieldGet2(_queryCache, this).findAll(filters).map(({ queryKey, state }) => {
|
|
2216
|
-
return [queryKey, state.data];
|
|
2217
|
-
});
|
|
2218
|
-
}
|
|
2219
|
-
setQueryData(queryKey, updater, options) {
|
|
2220
|
-
const defaultedOptions = this.defaultQueryOptions({ queryKey });
|
|
2221
|
-
const query = _classPrivateFieldGet2(_queryCache, this).get(defaultedOptions.queryHash);
|
|
2222
|
-
const data = functionalUpdate(updater, query === null || query === void 0 ? void 0 : query.state.data);
|
|
2223
|
-
if (data === void 0) return;
|
|
2224
|
-
return _classPrivateFieldGet2(_queryCache, this).build(this, defaultedOptions).setData(data, _objectSpread2(_objectSpread2({}, options), {}, { manual: true }));
|
|
2225
|
-
}
|
|
2226
|
-
setQueriesData(filters, updater, options) {
|
|
2227
|
-
return notifyManager.batch(() => _classPrivateFieldGet2(_queryCache, this).findAll(filters).map(({ queryKey }) => [queryKey, this.setQueryData(queryKey, updater, options)]));
|
|
2228
|
-
}
|
|
2229
|
-
getQueryState(queryKey) {
|
|
2230
|
-
var _classPrivateFieldGet5;
|
|
2231
|
-
const options = this.defaultQueryOptions({ queryKey });
|
|
2232
|
-
return (_classPrivateFieldGet5 = _classPrivateFieldGet2(_queryCache, this).get(options.queryHash)) === null || _classPrivateFieldGet5 === void 0 ? void 0 : _classPrivateFieldGet5.state;
|
|
2233
|
-
}
|
|
2234
|
-
removeQueries(filters) {
|
|
2235
|
-
const queryCache = _classPrivateFieldGet2(_queryCache, this);
|
|
2236
|
-
notifyManager.batch(() => {
|
|
2237
|
-
queryCache.findAll(filters).forEach((query) => {
|
|
2238
|
-
queryCache.remove(query);
|
|
2239
|
-
});
|
|
2240
|
-
});
|
|
2241
|
-
}
|
|
2242
|
-
resetQueries(filters, options) {
|
|
2243
|
-
const queryCache = _classPrivateFieldGet2(_queryCache, this);
|
|
2244
|
-
return notifyManager.batch(() => {
|
|
2245
|
-
queryCache.findAll(filters).forEach((query) => {
|
|
2246
|
-
query.reset();
|
|
2247
|
-
});
|
|
2248
|
-
return this.refetchQueries(_objectSpread2({ type: "active" }, filters), options);
|
|
2249
|
-
});
|
|
2250
|
-
}
|
|
2251
|
-
cancelQueries(filters, cancelOptions = {}) {
|
|
2252
|
-
const defaultedCancelOptions = _objectSpread2({ revert: true }, cancelOptions);
|
|
2253
|
-
const promises = notifyManager.batch(() => _classPrivateFieldGet2(_queryCache, this).findAll(filters).map((query) => query.cancel(defaultedCancelOptions)));
|
|
2254
|
-
return Promise.all(promises).then(noop).catch(noop);
|
|
2255
|
-
}
|
|
2256
|
-
invalidateQueries(filters, options = {}) {
|
|
2257
|
-
return notifyManager.batch(() => {
|
|
2258
|
-
var _ref3, _filters$refetchType;
|
|
2259
|
-
_classPrivateFieldGet2(_queryCache, this).findAll(filters).forEach((query) => {
|
|
2260
|
-
query.invalidate();
|
|
2261
|
-
});
|
|
2262
|
-
if ((filters === null || filters === void 0 ? void 0 : filters.refetchType) === "none") return Promise.resolve();
|
|
2263
|
-
return this.refetchQueries(_objectSpread2(_objectSpread2({}, filters), {}, { type: (_ref3 = (_filters$refetchType = filters === null || filters === void 0 ? void 0 : filters.refetchType) !== null && _filters$refetchType !== void 0 ? _filters$refetchType : filters === null || filters === void 0 ? void 0 : filters.type) !== null && _ref3 !== void 0 ? _ref3 : "active" }), options);
|
|
2264
|
-
});
|
|
2265
|
-
}
|
|
2266
|
-
refetchQueries(filters, options = {}) {
|
|
2267
|
-
var _options$cancelRefetc;
|
|
2268
|
-
const fetchOptions = _objectSpread2(_objectSpread2({}, options), {}, { cancelRefetch: (_options$cancelRefetc = options.cancelRefetch) !== null && _options$cancelRefetc !== void 0 ? _options$cancelRefetc : true });
|
|
2269
|
-
const promises = notifyManager.batch(() => _classPrivateFieldGet2(_queryCache, this).findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {
|
|
2270
|
-
let promise = query.fetch(void 0, fetchOptions);
|
|
2271
|
-
if (!fetchOptions.throwOnError) promise = promise.catch(noop);
|
|
2272
|
-
return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
|
|
2273
|
-
}));
|
|
2274
|
-
return Promise.all(promises).then(noop);
|
|
2275
|
-
}
|
|
2276
|
-
fetchQuery(options) {
|
|
2277
|
-
const defaultedOptions = this.defaultQueryOptions(options);
|
|
2278
|
-
if (defaultedOptions.retry === void 0) defaultedOptions.retry = false;
|
|
2279
|
-
const query = _classPrivateFieldGet2(_queryCache, this).build(this, defaultedOptions);
|
|
2280
|
-
return query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query)) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
|
|
2281
|
-
}
|
|
2282
|
-
prefetchQuery(options) {
|
|
2283
|
-
return this.fetchQuery(options).then(noop).catch(noop);
|
|
2284
|
-
}
|
|
2285
|
-
fetchInfiniteQuery(options) {
|
|
2286
|
-
options._type = "infinite";
|
|
2287
|
-
return this.fetchQuery(options);
|
|
2288
|
-
}
|
|
2289
|
-
prefetchInfiniteQuery(options) {
|
|
2290
|
-
return this.fetchInfiniteQuery(options).then(noop).catch(noop);
|
|
2291
|
-
}
|
|
2292
|
-
ensureInfiniteQueryData(options) {
|
|
2293
|
-
options._type = "infinite";
|
|
2294
|
-
return this.ensureQueryData(options);
|
|
2295
|
-
}
|
|
2296
|
-
resumePausedMutations() {
|
|
2297
|
-
if (onlineManager.isOnline()) return _classPrivateFieldGet2(_mutationCache, this).resumePausedMutations();
|
|
2298
|
-
return Promise.resolve();
|
|
2299
|
-
}
|
|
2300
|
-
getQueryCache() {
|
|
2301
|
-
return _classPrivateFieldGet2(_queryCache, this);
|
|
2302
|
-
}
|
|
2303
|
-
getMutationCache() {
|
|
2304
|
-
return _classPrivateFieldGet2(_mutationCache, this);
|
|
2305
|
-
}
|
|
2306
|
-
getDefaultOptions() {
|
|
2307
|
-
return _classPrivateFieldGet2(_defaultOptions, this);
|
|
2308
|
-
}
|
|
2309
|
-
setDefaultOptions(options) {
|
|
2310
|
-
_classPrivateFieldSet2(_defaultOptions, this, options);
|
|
2311
|
-
}
|
|
2312
|
-
setQueryDefaults(queryKey, options) {
|
|
2313
|
-
_classPrivateFieldGet2(_queryDefaults, this).set(hashKey(queryKey), {
|
|
2314
|
-
queryKey,
|
|
2315
|
-
defaultOptions: options
|
|
2316
|
-
});
|
|
2317
|
-
}
|
|
2318
|
-
getQueryDefaults(queryKey) {
|
|
2319
|
-
const defaults = [..._classPrivateFieldGet2(_queryDefaults, this).values()];
|
|
2320
|
-
const result = {};
|
|
2321
|
-
defaults.forEach((queryDefault) => {
|
|
2322
|
-
if (partialMatchKey(queryKey, queryDefault.queryKey)) Object.assign(result, queryDefault.defaultOptions);
|
|
2323
|
-
});
|
|
2324
|
-
return result;
|
|
2325
|
-
}
|
|
2326
|
-
setMutationDefaults(mutationKey, options) {
|
|
2327
|
-
_classPrivateFieldGet2(_mutationDefaults, this).set(hashKey(mutationKey), {
|
|
2328
|
-
mutationKey,
|
|
2329
|
-
defaultOptions: options
|
|
2330
|
-
});
|
|
2331
|
-
}
|
|
2332
|
-
getMutationDefaults(mutationKey) {
|
|
2333
|
-
const defaults = [..._classPrivateFieldGet2(_mutationDefaults, this).values()];
|
|
2334
|
-
const result = {};
|
|
2335
|
-
defaults.forEach((queryDefault) => {
|
|
2336
|
-
if (partialMatchKey(mutationKey, queryDefault.mutationKey)) Object.assign(result, queryDefault.defaultOptions);
|
|
2337
|
-
});
|
|
2338
|
-
return result;
|
|
2339
|
-
}
|
|
2340
|
-
defaultQueryOptions(options) {
|
|
2341
|
-
if (options._defaulted) return options;
|
|
2342
|
-
const defaultedOptions = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, _classPrivateFieldGet2(_defaultOptions, this).queries), this.getQueryDefaults(options.queryKey)), options), {}, { _defaulted: true });
|
|
2343
|
-
if (!defaultedOptions.queryHash) defaultedOptions.queryHash = hashQueryKeyByOptions(defaultedOptions.queryKey, defaultedOptions);
|
|
2344
|
-
if (defaultedOptions.refetchOnReconnect === void 0) defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
|
|
2345
|
-
if (defaultedOptions.throwOnError === void 0) defaultedOptions.throwOnError = !!defaultedOptions.suspense;
|
|
2346
|
-
if (!defaultedOptions.networkMode && defaultedOptions.persister) defaultedOptions.networkMode = "offlineFirst";
|
|
2347
|
-
if (defaultedOptions.queryFn === skipToken) defaultedOptions.enabled = false;
|
|
2348
|
-
return defaultedOptions;
|
|
2349
|
-
}
|
|
2350
|
-
defaultMutationOptions(options) {
|
|
2351
|
-
if (options === null || options === void 0 ? void 0 : options._defaulted) return options;
|
|
2352
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, _classPrivateFieldGet2(_defaultOptions, this).mutations), (options === null || options === void 0 ? void 0 : options.mutationKey) && this.getMutationDefaults(options.mutationKey)), options), {}, { _defaulted: true });
|
|
2353
|
-
}
|
|
2354
|
-
clear() {
|
|
2355
|
-
_classPrivateFieldGet2(_queryCache, this).clear();
|
|
2356
|
-
_classPrivateFieldGet2(_mutationCache, this).clear();
|
|
2357
|
-
}
|
|
2358
|
-
});
|
|
2359
|
-
}));
|
|
2360
|
-
//#endregion
|
|
2361
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/types.js
|
|
2362
|
-
var init_types = __esmMin((() => {}));
|
|
2363
|
-
//#endregion
|
|
2364
|
-
//#region node_modules/.pnpm/@tanstack+query-core@5.100.10/node_modules/@tanstack/query-core/build/modern/index.js
|
|
2365
|
-
var init_modern = __esmMin((() => {
|
|
2366
|
-
init_hydration();
|
|
2367
|
-
init_mutationCache();
|
|
2368
|
-
init_mutationObserver();
|
|
2369
|
-
init_notifyManager();
|
|
2370
|
-
init_queryCache();
|
|
2371
|
-
init_queryClient();
|
|
2372
|
-
init_queryObserver();
|
|
2373
|
-
init_utils();
|
|
2374
|
-
init_types();
|
|
2375
|
-
}));
|
|
2376
|
-
//#endregion
|
|
2377
|
-
export { MutationCache as a, defaultShouldDehydrateQuery as c, isServer as d, matchQuery as f, MutationObserver as i, hydrate as l, shouldThrowError as m, QueryClient as n, QueryObserver as o, partialMatchKey as p, QueryCache as r, notifyManager as s, init_modern as t, hashKey as u };
|