{"version":3,"sources":["jsdelivr-header.js","/npm/@codelic/component@1.6.85/src/components/CCCalendar/functions/createCalendar.ts","/npm/@codelic/component@1.6.85/src/components/CCCalendar/functions/createPagenaviMonthYear.ts","/npm/@codelic/component@1.6.85/src/components/CCCalendar/functions/createDayOfTheWeek.ts","/npm/@codelic/component@1.6.85/src/components/CCCalendar/CCCalendar.vue","/npm/@codelic/component@1.6.85/src/components/CCInput/functions/calendarPosition.ts","/npm/@codelic/component@1.6.85/src/components/CCInput/CCInput.vue","/npm/@codelic/component@1.6.85/src/components/CCButton/CCButton.vue","/npm/@codelic/component@1.6.85/src/components/CCToggle/CCToggle.vue","/npm/@codelic/component@1.6.85/src/components/CCRadio/CCRadio.vue","/npm/@codelic/component@1.6.85/src/components/CCCheckbox/CCCheckbox.vue","/npm/@codelic/component@1.6.85/node_modules/@vueuse/shared/index.mjs","/npm/@codelic/component@1.6.85/node_modules/@vueuse/core/index.mjs","/npm/@codelic/component@1.6.85/src/components/CCModal/CCModal.vue","/npm/@codelic/component@1.6.85/src/components/CCSelect/CCSelect.vue","/npm/@codelic/component@1.6.85/src/components/CCPagination/CCPagination.vue","/npm/@codelic/component@1.6.85/src/components/CCTextarea/CCTextarea.vue","/npm/@codelic/component@1.6.85/src/components/CCTab/CCTab.vue","/npm/node_modules/is-what/dist/index.js","/npm/node_modules/copy-anything/dist/index.js","/npm/@codelic/component@1.6.85/src/components/CCWheelPicker/utils.ts","/npm/@codelic/component@1.6.85/src/components/CCWheelPicker/CCWheelPicker.vue","/npm/@codelic/component@1.6.85/src/components/CCWheelMultiPicker/utils/DateHelper.ts","/npm/@codelic/component@1.6.85/src/components/CCWheelMultiPicker/utils/helpers.ts","/npm/@codelic/component@1.6.85/src/components/CCWheelMultiPicker/CCWheelMultiPicker.vue","/npm/node_modules/vue-router/dist/vue-router.mjs","/npm/@codelic/component@1.6.85/src/components/CCPankuzu/CCPankuzu.vue","/npm/@codelic/component@1.6.85/src/components/CCHeader/CCHeader.vue","/npm/@codelic/component@1.6.85/src/components/CCButtonSet/CCButtonSet.vue","/npm/@codelic/component@1.6.85/src/components/CCDialogConfirmation/CCDialogConfirmation.vue","/npm/node_modules/@firebase/util/dist/index.esm2017.js","/npm/node_modules/@firebase/component/dist/esm/index.esm2017.js","/npm/node_modules/@firebase/logger/dist/esm/index.esm2017.js","/npm/node_modules/idb/build/wrap-idb-value.js","/npm/node_modules/idb/build/index.js","/npm/node_modules/@firebase/app/dist/esm/index.esm2017.js","/npm/node_modules/@firebase/webchannel-wrapper/dist/esm/index.esm2017.js","/npm/node_modules/@firebase/firestore/dist/index.esm2017.js","/npm/@codelic/component@1.6.85/src/components/CCFilterDrawer/utils/dateFormat.ts","/npm/@codelic/component@1.6.85/src/components/CCFilterDrawer/CCFilterDrawer.vue","/npm/@codelic/component@1.6.85/src/assets/pdf_icon.svg","/npm/@codelic/component@1.6.85/src/components/CCImageUploader/CCImageUploader.vue","/npm/@codelic/component@1.6.85/src/components/CCImageMenuButton/CCImageMenuButton.vue","/npm/@codelic/component@1.6.85/src/components/CCGlobalNavi/default.ts","/npm/@codelic/component@1.6.85/src/components/CCGlobalNavi/CCGlobalNavi.vue","/npm/@codelic/component@1.6.85/src/components/CCFilterDrawerForMagnetarTabel/CCFilterDrawerForMagnetarTabel.vue","/npm/node_modules/d3-array/src/ascending.js","/npm/node_modules/d3-array/src/bisector.js","/npm/node_modules/d3-array/src/bisect.js","/npm/node_modules/d3-array/src/ticks.js","/npm/node_modules/d3-array/src/max.js","/npm/node_modules/d3-dispatch/src/dispatch.js","/npm/node_modules/d3-selection/src/namespaces.js","/npm/node_modules/d3-selection/src/namespace.js","/npm/node_modules/d3-selection/src/creator.js","/npm/node_modules/d3-selection/src/selector.js","/npm/node_modules/d3-selection/src/selection/select.js","/npm/node_modules/d3-selection/src/selectorAll.js","/npm/node_modules/d3-selection/src/selection/selectAll.js","/npm/node_modules/d3-selection/src/matcher.js","/npm/node_modules/d3-selection/src/selection/filter.js","/npm/node_modules/d3-selection/src/selection/sparse.js","/npm/node_modules/d3-selection/src/selection/enter.js","/npm/node_modules/d3-selection/src/constant.js","/npm/node_modules/d3-selection/src/selection/data.js","/npm/node_modules/d3-selection/src/selection/exit.js","/npm/node_modules/d3-selection/src/selection/merge.js","/npm/node_modules/d3-selection/src/selection/order.js","/npm/node_modules/d3-selection/src/selection/sort.js","/npm/node_modules/d3-selection/src/selection/call.js","/npm/node_modules/d3-selection/src/selection/nodes.js","/npm/node_modules/d3-selection/src/selection/node.js","/npm/node_modules/d3-selection/src/selection/size.js","/npm/node_modules/d3-selection/src/selection/empty.js","/npm/node_modules/d3-selection/src/selection/each.js","/npm/node_modules/d3-selection/src/selection/attr.js","/npm/node_modules/d3-selection/src/window.js","/npm/node_modules/d3-selection/src/selection/style.js","/npm/node_modules/d3-selection/src/selection/property.js","/npm/node_modules/d3-selection/src/selection/classed.js","/npm/node_modules/d3-selection/src/selection/text.js","/npm/node_modules/d3-selection/src/selection/html.js","/npm/node_modules/d3-selection/src/selection/raise.js","/npm/node_modules/d3-selection/src/selection/lower.js","/npm/node_modules/d3-selection/src/selection/append.js","/npm/node_modules/d3-selection/src/selection/insert.js","/npm/node_modules/d3-selection/src/selection/remove.js","/npm/node_modules/d3-selection/src/selection/clone.js","/npm/node_modules/d3-selection/src/selection/datum.js","/npm/node_modules/d3-selection/src/selection/on.js","/npm/node_modules/d3-selection/src/selection/dispatch.js","/npm/node_modules/d3-selection/src/selection/index.js","/npm/node_modules/d3-selection/src/select.js","/npm/node_modules/d3-selection/src/local.js","/npm/node_modules/d3-color/src/define.js","/npm/node_modules/d3-color/src/color.js","/npm/node_modules/d3-color/src/math.js","/npm/node_modules/d3-color/src/lab.js","/npm/node_modules/d3-color/src/cubehelix.js","/npm/node_modules/d3-interpolate/src/constant.js","/npm/node_modules/d3-interpolate/src/color.js","/npm/node_modules/d3-interpolate/src/rgb.js","/npm/node_modules/d3-interpolate/src/array.js","/npm/node_modules/d3-interpolate/src/date.js","/npm/node_modules/d3-interpolate/src/number.js","/npm/node_modules/d3-interpolate/src/object.js","/npm/node_modules/d3-interpolate/src/string.js","/npm/node_modules/d3-interpolate/src/value.js","/npm/node_modules/d3-interpolate/src/round.js","/npm/node_modules/d3-interpolate/src/transform/decompose.js","/npm/node_modules/d3-interpolate/src/transform/parse.js","/npm/node_modules/d3-interpolate/src/transform/index.js","/npm/node_modules/d3-interpolate/src/cubehelix.js","/npm/node_modules/d3-timer/src/timer.js","/npm/node_modules/d3-timer/src/timeout.js","/npm/node_modules/d3-transition/src/transition/schedule.js","/npm/node_modules/d3-transition/src/interrupt.js","/npm/node_modules/d3-transition/src/selection/interrupt.js","/npm/node_modules/d3-transition/src/transition/tween.js","/npm/node_modules/d3-transition/src/transition/interpolate.js","/npm/node_modules/d3-transition/src/transition/attr.js","/npm/node_modules/d3-transition/src/transition/attrTween.js","/npm/node_modules/d3-transition/src/transition/delay.js","/npm/node_modules/d3-transition/src/transition/duration.js","/npm/node_modules/d3-transition/src/transition/ease.js","/npm/node_modules/d3-transition/src/transition/filter.js","/npm/node_modules/d3-transition/src/transition/merge.js","/npm/node_modules/d3-transition/src/transition/on.js","/npm/node_modules/d3-transition/src/transition/remove.js","/npm/node_modules/d3-transition/src/transition/select.js","/npm/node_modules/d3-transition/src/transition/selectAll.js","/npm/node_modules/d3-transition/src/transition/selection.js","/npm/node_modules/d3-transition/src/transition/style.js","/npm/node_modules/d3-transition/src/transition/styleTween.js","/npm/node_modules/d3-transition/src/transition/text.js","/npm/node_modules/d3-transition/src/transition/transition.js","/npm/node_modules/d3-transition/src/transition/index.js","/npm/node_modules/d3-ease/src/cubic.js","/npm/node_modules/d3-ease/src/poly.js","/npm/node_modules/d3-ease/src/back.js","/npm/node_modules/d3-ease/src/elastic.js","/npm/node_modules/d3-transition/src/selection/transition.js","/npm/node_modules/d3-transition/src/selection/index.js","/npm/node_modules/d3-path/src/path.js","/npm/node_modules/d3-collection/src/map.js","/npm/node_modules/d3-collection/src/set.js","/npm/node_modules/d3-dsv/src/dsv.js","/npm/node_modules/d3-quadtree/src/add.js","/npm/node_modules/d3-quadtree/src/cover.js","/npm/node_modules/d3-quadtree/src/data.js","/npm/node_modules/d3-quadtree/src/extent.js","/npm/node_modules/d3-quadtree/src/quad.js","/npm/node_modules/d3-quadtree/src/find.js","/npm/node_modules/d3-quadtree/src/remove.js","/npm/node_modules/d3-quadtree/src/root.js","/npm/node_modules/d3-quadtree/src/size.js","/npm/node_modules/d3-quadtree/src/visit.js","/npm/node_modules/d3-quadtree/src/visitAfter.js","/npm/node_modules/d3-quadtree/src/x.js","/npm/node_modules/d3-quadtree/src/y.js","/npm/node_modules/d3-quadtree/src/quadtree.js","/npm/node_modules/d3-dsv/src/csv.js","/npm/node_modules/d3-dsv/src/tsv.js","/npm/node_modules/d3-format/src/formatPrefixAuto.js","/npm/node_modules/d3-format/src/formatDecimal.js","/npm/node_modules/d3-format/src/exponent.js","/npm/node_modules/d3-format/src/formatGroup.js","/npm/node_modules/d3-format/src/formatNumerals.js","/npm/node_modules/d3-format/src/formatDefault.js","/npm/node_modules/d3-format/src/formatRounded.js","/npm/node_modules/d3-format/src/formatTypes.js","/npm/node_modules/d3-format/src/formatSpecifier.js","/npm/node_modules/d3-format/src/identity.js","/npm/node_modules/d3-format/src/locale.js","/npm/node_modules/d3-format/src/defaultLocale.js","/npm/node_modules/d3-format/src/precisionFixed.js","/npm/node_modules/d3-format/src/precisionPrefix.js","/npm/node_modules/d3-format/src/precisionRound.js","/npm/node_modules/d3-geo/src/adder.js","/npm/node_modules/d3-geo/src/math.js","/npm/node_modules/d3-geo/src/rotation.js","/npm/node_modules/d3-geo/src/transform.js","/npm/node_modules/d3-geo/src/projection/equirectangular.js","/npm/node_modules/d3-hierarchy/src/hierarchy/count.js","/npm/node_modules/d3-hierarchy/src/hierarchy/each.js","/npm/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","/npm/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","/npm/node_modules/d3-hierarchy/src/hierarchy/sum.js","/npm/node_modules/d3-hierarchy/src/hierarchy/sort.js","/npm/node_modules/d3-hierarchy/src/hierarchy/path.js","/npm/node_modules/d3-hierarchy/src/hierarchy/ancestors.js","/npm/node_modules/d3-hierarchy/src/hierarchy/descendants.js","/npm/node_modules/d3-hierarchy/src/hierarchy/leaves.js","/npm/node_modules/d3-hierarchy/src/hierarchy/links.js","/npm/node_modules/d3-hierarchy/src/hierarchy/index.js","/npm/node_modules/d3-hierarchy/src/treemap/dice.js","/npm/node_modules/d3-hierarchy/src/treemap/slice.js","/npm/node_modules/d3-geo/src/area.js","/npm/node_modules/d3-geo/src/bounds.js","/npm/node_modules/d3-geo/src/polygonContains.js","/npm/node_modules/d3-geo/src/length.js","/npm/node_modules/d3-geo/src/path/area.js","/npm/node_modules/d3-geo/src/path/measure.js","/npm/node_modules/d3-hierarchy/src/tree.js","/npm/node_modules/d3-hierarchy/src/treemap/squarify.js","/npm/node_modules/d3-hierarchy/src/treemap/resquarify.js","/npm/node_modules/d3-queue/src/array.js","/npm/node_modules/d3-queue/src/queue.js","/npm/node_modules/d3-random/src/defaultSource.js","/npm/node_modules/d3-random/src/uniform.js","/npm/node_modules/d3-random/src/normal.js","/npm/node_modules/d3-random/src/logNormal.js","/npm/node_modules/d3-random/src/irwinHall.js","/npm/node_modules/d3-random/src/bates.js","/npm/node_modules/d3-random/src/exponential.js","/npm/node_modules/d3-scale/src/array.js","/npm/node_modules/d3-scale/src/ordinal.js","/npm/node_modules/d3-scale/src/constant.js","/npm/node_modules/d3-scale/src/number.js","/npm/node_modules/d3-scale/src/continuous.js","/npm/node_modules/d3-scale/src/tickFormat.js","/npm/node_modules/d3-scale/src/linear.js","/npm/node_modules/d3-time/src/interval.js","/npm/node_modules/d3-time/src/millisecond.js","/npm/node_modules/d3-time/src/duration.js","/npm/node_modules/d3-time/src/second.js","/npm/node_modules/d3-time/src/minute.js","/npm/node_modules/d3-time/src/hour.js","/npm/node_modules/d3-time/src/day.js","/npm/node_modules/d3-time/src/week.js","/npm/node_modules/d3-time/src/month.js","/npm/node_modules/d3-time/src/year.js","/npm/node_modules/d3-time/src/utcMinute.js","/npm/node_modules/d3-time/src/utcHour.js","/npm/node_modules/d3-time/src/utcDay.js","/npm/node_modules/d3-time/src/utcWeek.js","/npm/node_modules/d3-time/src/utcMonth.js","/npm/node_modules/d3-time/src/utcYear.js","/npm/node_modules/d3-time-format/src/locale.js","/npm/node_modules/d3-time-format/src/defaultLocale.js","/npm/node_modules/d3-time-format/src/isoFormat.js","/npm/node_modules/d3-time-format/src/isoParse.js","/npm/node_modules/d3-scale/src/colors.js","/npm/node_modules/d3-scale/src/viridis.js","/npm/node_modules/d3-shape/src/constant.js","/npm/node_modules/d3-scale/src/category10.js","/npm/node_modules/d3-scale/src/category20b.js","/npm/node_modules/d3-scale/src/category20c.js","/npm/node_modules/d3-scale/src/category20.js","/npm/node_modules/d3-scale/src/cubehelix.js","/npm/node_modules/d3-scale/src/rainbow.js","/npm/node_modules/d3-shape/src/math.js","/npm/node_modules/d3-shape/src/arc.js","/npm/node_modules/d3-shape/src/descending.js","/npm/node_modules/d3-shape/src/identity.js","/npm/node_modules/d3-shape/src/pie.js","/npm/node_modules/d3-shape/src/noop.js","/npm/node_modules/d3-shape/src/curve/basis.js","/npm/node_modules/d3-shape/src/curve/bundle.js","/npm/node_modules/d3-shape/src/curve/cardinal.js","/npm/node_modules/d3-shape/src/curve/cardinalClosed.js","/npm/node_modules/d3-shape/src/curve/cardinalOpen.js","/npm/node_modules/d3-shape/src/curve/catmullRom.js","/npm/node_modules/d3-shape/src/curve/catmullRomClosed.js","/npm/node_modules/d3-shape/src/curve/catmullRomOpen.js","/npm/node_modules/d3-shape/src/curve/monotone.js","/npm/node_modules/d3-voronoi/src/RedBlackTree.js","/npm/node_modules/d3-voronoi/src/Edge.js","/npm/node_modules/d3-voronoi/src/Cell.js","/npm/node_modules/d3-voronoi/src/Circle.js","/npm/node_modules/d3-voronoi/src/Beach.js","/npm/node_modules/d3-voronoi/src/Diagram.js","/npm/node_modules/d3-zoom/src/transform.js","/npm/@codelic/component@1.6.85/src/components/CCPaymentRatePieChart/CCPaymentRatePieChart.vue","/npm/@codelic/component@1.6.85/src/components/CCToast/CCToast.vue","/npm/node_modules/quasar/dist/quasar.client.js","/npm/@codelic/component@1.6.85/src/components/CCCardDownload/CCCardDownload.ts","/npm/node_modules/@firebaseasy/storage/node_modules/@firebase/util/dist/index.esm2017.js","/npm/node_modules/@firebaseasy/storage/node_modules/@firebase/component/dist/esm/index.esm2017.js","/npm/node_modules/@firebaseasy/storage/node_modules/@firebase/logger/dist/esm/index.esm2017.js","/npm/node_modules/@firebaseasy/storage/node_modules/@firebase/app/dist/esm/index.esm2017.js","/npm/node_modules/@firebaseasy/storage/node_modules/@firebase/storage/dist/index.esm2017.js","/npm/node_modules/@firebaseasy/storage/lib/easyUpload.js","/npm/node_modules/@firebaseasy/storage/lib/easyDownload.js","/npm/@codelic/component@1.6.85/src/components/CCCardDownload/CCCardDownload.vue","/npm/@codelic/component@1.6.85/src/components/CCHeader/index.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,40CCCa,eAAiB,CAAC,EAAmB,KAE1C,MAAA,EAAc,IAAgB,IAG9B,EAAe,IAAgB,IAG/B,EAAc,IAAgB,IAG9B,EAAwB,IAAgB,IAGxC,EAA8B,IAAI,KACtC,EACA,EACA,GACA,SAGF,QAAS,EAAI,EAAG,EAAI,EAAG,IACjB,GAAK,EACP,EAAY,MAAM,KAAK,CACrB,KAAM,OAAO,GACb,MAAO,OAAO,GACd,IAAK,OAAO,GAAK,EAA8B,OAGjD,EAAY,MAAM,KAClB,EAAY,MAAM,KAAK,CACrB,KAAM,IACN,MAAO,IACP,IAAK,OAMX,MAAM,EAA4B,IAAI,KACpC,EACA,EAAa,EACb,GACA,SAGI,EAAiB,IAAI,KAAK,EAAW,EAAa,EAAG,GAAG,UAG9D,QAAS,EAAI,EAAG,EAAI,EAAG,IACjB,GAAK,EACP,EA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AV,KAAwB,QAAqB,IAAZ,EAAM,GAChD,MAAM,IAAI,UAAU,oDAEtB,MAAM,EAAwB,iBAAV,EAAqB,UAAU,GAAS,EAAO,EAAI,EAAK,EAAI,IAAK,EAAI,EAAK,EAAI,IAAK,EAAI,EAAK,EAAI,IACpH,MAAO,OADsH,GAAK,OAAU,EAAI,MAAQ,KAAK,KAAK,EAAI,MAAS,MAAO,MAClK,OAD4K,GAAK,OAAU,EAAI,MAAQ,KAAK,KAAK,EAAI,MAAS,MAAO,MACxN,OADkO,GAAK,OAAU,EAAI,MAAQ,KAAK,KAAK,EAAI,MAAS,MAAO,KAE9T,CA6DA,IAAI,QAAU,CACZ,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,iBACA,kBACA,kBACA,iBACA,kBACA,kBACA,kBACA,iBACA,kBACA,kBACA,eACA,iBACA,iBACA,eACA,iBACA,iBACA,iBACA,eACA,iBACA,iBACA,eACA,iBACA,iBACA,eACA,iBACA,iBACA,iBACA,eACA,iBACA,iBACA,eACA,iBACA,iBACA,eACA,iBACA,iBACA,iBACA,eACA,iBACA,iBACA,eACA,gBACA,iBACA,eACA,gBACA,iBACA,gBACA,eACA,gBACA,iBACA,cACA,eACA,eACA,cACA,eACA,eACA,eACA,cACA,eACA,eACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,gBACA,gBACA,gBACA,cAEE,UAAY,2BACZ,cAAgB,iJACC,gBAAgB,CACnC,KAAM,SACN,MAAO,IACF,gBACA,aACH,WAAY,OACZ,aAAc,OACd,YAAa,CACX,KAAM,OACN,QAAS,WACT,UAAY,GAAM,CAAC,WAAY,OAAQ,WAAW,SAAS,IAE7D,YAAa,CACX,KAAM,OACN,QAAS,OACT,UAAY,GAAM,CAAC,OAAQ,MA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U,YAAc,yBAAyB,EAAM,EAAY,MAAK,MAExE,EAAc,MAAQ,IAAI,KAAK,CAAC,GAAO,WACzC,IAGF,MA0BM,EAAc,UAAS,KAC3B,MAAM,EAAO,EAAM,KACnB,OAAI,MAAA,OAAA,EAAA,EAAM,iBACD,EAAK,iBAEV,MAAA,OAAA,EAAA,EAAM,aACD,EAAK,YAGP,M,2oCAnCW,W,SACb,OAAA,EAAA,EAAM,WAAN,EAAA,EAAY,UACjB,UAAU,OAAQ,EAClB,aAAa,OAAA,EAAA,EAAM,WAAN,EAAA,EAAY,OAAQ,EAAM,KAAK,SAAU,IACpD,YAAY,MAAQ,EAAW,IAC3B,GAAY,MACd,YAAY,MAAQ,EACtB,IAEF,UAAU,OAAQ,I,m9BAMC,E,OACnB,GADmB,G,uCACb,QAAQ,kBAAmB,GAAG,SAAS,gBAC7B,gBAAA,GAAG,MAAK,KACtB,EAAG,OAAO,CACR,SAAU,MACV,QAAS,GAAG,eACZ,WAAY,kBACb,G,ipBCnEE,SAAS,wBAAwB,G,MAC9B,cAAA,EAAA,MAAA,OAAA,EAAA,EAAO,WAAP,EAAA,EAAa,QAA2B,EAClD,Q","file":"/npm/@codelic/component@1.6.85/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@codelic/component@1.6.85/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { ref } from 'vue'\nimport { DateType } from '../types'\n\n/**\n * 選択された年月日のカレンダー情報を生成する関数\n *\n */\nexport const createCalendar = (yearValue: number, monthValue: number) => {\n  // 1週目のカレンダー配列\n  const weekOneDays = ref<DateType[]>([])\n\n  // 最終週のカレンダー配列\n  const lastWeekDays = ref<DateType[]>([])\n\n  // 中間のカレンダー配列\n  const midWeekDays = ref<DateType[]>([])\n\n  // この月のカレンダー配列\n  const thisMonthCalenderDays = ref<DateType[]>([])\n\n  // 月初の曜日番号を取得する\n  const isMonthStartDayOfWeekNumber = new Date(\n    yearValue,\n    monthValue,\n    1\n  ).getDay()\n\n  // 1週目の配列を生成する\n  for (let i = 0; i < 7; i++) {\n    if (i >= isMonthStartDayOfWeekNumber) {\n      weekOneDays.value.push({\n        year: String(yearValue),\n        month: String(monthValue),\n        day: String(i - (isMonthStartDayOfWeekNumber - 1))\n      })\n    } else {\n      weekOneDays.value.push\n      weekOneDays.value.push({\n        year: ' ',\n        month: ' ',\n        day: ' '\n      })\n    }\n  }\n\n  // 月末の曜日番号を取得する\n  const isMonthEndDayOfWeekNumber = new Date(\n    yearValue,\n    monthValue + 1,\n    0\n  ).getDay()\n\n  // 月末の日を取得する\n  const isMonthEndDate = new Date(yearValue, monthValue + 1, 0).getDate()\n\n  // 最終週の配列を生成する\n  for (let i = 0; i < 7; i++) {\n    if (i <= isMonthEndDayOfWeekNumber) {\n      lastWeekDays.value.unshift({\n        year: String(yearValue),\n        month: String(monthValue),\n        day: String(isMonthEndDate - i)\n      })\n    } else {\n      lastWeekDays.value.push({\n        year: ' ',\n        month: ' ',\n        day: ' '\n      })\n    }\n  }\n\n  // 1週目と最終週以外の日付を格納する\n  for (\n    let i = Number(weekOneDays.value[6].day) + 1;\n    i < Number(lastWeekDays.value[0].day);\n    i++\n  ) {\n    midWeekDays.value.push({\n      year: String(yearValue),\n      month: String(monthValue),\n      day: String(i)\n    })\n  }\n\n  // この月のカレンダー配列\n  thisMonthCalenderDays.value = [\n    ...weekOneDays.value,\n    ...midWeekDays.value,\n    ...lastWeekDays.value\n  ]\n\n  return thisMonthCalenderDays.value\n}\n","class CreatePagenaviMonthYear {\n  /**\n   * ページナビの年月を生成する\n   */\n  createPagenaviEnMonthYear = (yearValue: number, monthValue: number) => {\n    if (monthValue + 1 === 1) {\n      return 'January' + ' ' + yearValue\n    } else if (monthValue + 1 === 2) {\n      return 'February' + ' ' + yearValue\n    } else if (monthValue + 1 === 3) {\n      return 'March' + ' ' + yearValue\n    } else if (monthValue + 1 === 4) {\n      return 'April' + ' ' + yearValue\n    } else if (monthValue + 1 === 5) {\n      return 'May' + ' ' + yearValue\n    } else if (monthValue + 1 === 6) {\n      return 'June' + ' ' + yearValue\n    } else if (monthValue + 1 === 7) {\n      return 'July' + ' ' + yearValue\n    } else if (monthValue + 1 === 8) {\n      return 'August' + ' ' + yearValue\n    } else if (monthValue + 1 === 9) {\n      return 'September' + ' ' + yearValue\n    } else if (monthValue + 1 === 10) {\n      return 'October' + ' ' + yearValue\n    } else if (monthValue + 1 === 11) {\n      return 'November' + ' ' + yearValue\n    } else if (monthValue + 1 === 12) {\n      return 'December' + ' ' + yearValue\n    }\n\n    return ''\n  }\n\n  createPagenaviJaMonthYear = (yearValue: number, monthValue: number) => {\n    if (monthValue + 1 === 1) {\n      return `${yearValue}年 1月`\n    } else if (monthValue + 1 === 2) {\n      return `${yearValue}年 2月`\n    } else if (monthValue + 1 === 3) {\n      return `${yearValue}年 3月`\n    } else if (monthValue + 1 === 4) {\n      return `${yearValue}年 4月`\n    } else if (monthValue + 1 === 5) {\n      return `${yearValue}年 5月`\n    } else if (monthValue + 1 === 6) {\n      return `${yearValue}年 6月`\n    } else if (monthValue + 1 === 7) {\n      return `${yearValue}年 7月`\n    } else if (monthValue + 1 === 8) {\n      return `${yearValue}年 8月`\n    } else if (monthValue + 1 === 9) {\n      return `${yearValue}年 9月`\n    } else if (monthValue + 1 === 10) {\n      return `${yearValue}年 10月`\n    } else if (monthValue + 1 === 11) {\n      return `${yearValue}年 11月`\n    } else if (monthValue + 1 === 12) {\n      return `${yearValue}年 12月`\n    }\n    return ''\n  }\n  createPagenaviMonthYearChoose = (language: string, yearValue: number, monthValue: number) => {\n    if (language === 'ja') {\n      return this.createPagenaviJaMonthYear(yearValue, monthValue)\n    } else if (language === 'en') {\n      return this.createPagenaviEnMonthYear(yearValue, monthValue)\n    } else {\n      return ''\n    }\n  }\n}\n\nconst createPagenaviMonthYear = new CreatePagenaviMonthYear()\nexport { createPagenaviMonthYear }\n","class CreateDayOfTheWeek {\n  /**\n   * 英語の曜日を生成する\n   */\n  createEnglishDayOfTheWeek = (weekNumber: number) => {\n    if (weekNumber === 0) {\n      return 'Sun'\n    } else if (weekNumber === 1) {\n      return 'Mon'\n    } else if (weekNumber === 2) {\n      return 'Tue'\n    } else if (weekNumber === 3) {\n      return 'Wed'\n    } else if (weekNumber === 4) {\n      return 'Thu'\n    } else if (weekNumber === 5) {\n      return 'Fri'\n    } else if (weekNumber === 6) {\n      return 'Sat'\n    }\n    return ''\n  }\n  /**\n   * 日本語の曜日を生成する\n   */\n  createJapaneseDayOfTheWeek = (weekNumber: number) => {\n    if (weekNumber === 0) {\n      return '日'\n    } else if (weekNumber === 1) {\n      return '月'\n    } else if (weekNumber === 2) {\n      return '火'\n    } else if (weekNumber === 3) {\n      return '水'\n    } else if (weekNumber === 4) {\n      return '木'\n    } else if (weekNumber === 5) {\n      return '金'\n    } else if (weekNumber === 6) {\n      return '土'\n    }\n    return ''\n  }\n  /**\n   * どちらの関数を使うかを判定して発火させる関数\n   * @param lang 言語\n   * @param weekNumber 曜日の番号\n   * @param internal 内部で使うかどうか\n   */\n  createDayOfTheWeekChoose = (lang: string, weekNumber: number, internal = false) => {\n    if (lang === 'ja') {\n      return this.createJapaneseDayOfTheWeek(weekNumber)\n    } else if (!internal && lang === 'en') {\n      return this.createEnglishDayOfTheWeek(weekNumber)\n    } else if (internal && lang === 'en') {\n      return this.createEnglishDayOfTheWeek(weekNumber).charAt(0)\n    } else {\n      return ''\n    }\n  }\n}\n\nconst createDayOfTheWeek = new CreateDayOfTheWeek()\nexport { createDayOfTheWeek }\n","<script setup lang=\"ts\">\nimport { ref, computed, watch, PropType } from 'vue'\nimport { CCCard, CCMDIcon } from '@codelic/component'\nimport { DateType } from './types'\nimport { createCalendar } from './functions/createCalendar'\nimport { createPagenaviMonthYear } from './functions/createPagenaviMonthYear'\nimport { createDayOfTheWeek } from './functions/createDayOfTheWeek'\n\nconst props = defineProps({\n  /**\n   * 選択された日付\n   * @example '2023/01/01'\n   */\n  modelValue: { type: String, required: true },\n  /**\n   * カレンダーの言語設定\n   * @default 'ja'\n   * @example '5月1日（水）'\n   * @type { 'en' | 'ja' }\n   */\n  lang: { type: String as PropType<'ja' | 'en'>, default: 'ja' },\n})\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', val: string): void\n}>()\n\nconst model = computed({\n  get: () => props.modelValue,\n  set: (value) => {\n    emit('update:modelValue', value)\n  },\n})\n\n// 現在の日時\nconst isNewDate = computed(() => (model.value ? new Date(model.value) : new Date()))\n\n// 本日の日を定義する\nconst isDate = ref<number>(isNewDate.value.getDate())\n\n// 年を定義する\nconst isYear = ref<number>(isNewDate.value.getFullYear())\n\n// 月を定義する\nconst isMonth = ref<number>(isNewDate.value.getMonth())\n\n// この月のカレンダー配列\nconst thisMonthCalenderDays = ref<DateType[]>([])\n// ヘッダーの日付を定義する\nconst headerYear = computed(() => model.value?.toString().split('/').at(0) ?? '')\n\n// ヘッダーの日付を定義する\nconst headerDate = computed(() => {\n  if (props.lang === 'ja') {\n    return model.value\n      ? isNewDate.value.getMonth() +\n          1 +\n          '月' +\n          isNewDate.value.getDate() +\n          '日' +\n          '（' +\n          byLangDayOfTheWeek.value +\n          '）'\n      : ''\n  } else if (props.lang === 'en') {\n    return (\n      isNewDate.value.getMonth() +\n      1 +\n      ',' +\n      ' ' +\n      isNewDate.value.getDate() +\n      ' ' +\n      byLangDayOfTheWeek.value\n    )\n  }\n})\n\n// ページナビの月年を定義する\nconst isPagenaviMonthYear = ref<string>('')\n\n// 略語の曜日\nconst byLangDayOfTheWeek = ref<string>('')\n\n// 今月のカレンダー情報を設定する\nthisMonthCalenderDays.value = createCalendar(isYear.value, isMonth.value)\n\n// ページナビの日付を代入する\nisPagenaviMonthYear.value = createPagenaviMonthYear.createPagenaviMonthYearChoose(\n  props.lang,\n  isYear.value,\n  isMonth.value\n)\n\n// 英語の曜日を代入する\nbyLangDayOfTheWeek.value = createDayOfTheWeek.createDayOfTheWeekChoose(\n  props.lang,\n  isNewDate.value.getDay()\n)\n\nwatch(\n  () => model.value,\n  () => {\n    if (!model.value) {\n      byLangDayOfTheWeek.value = createDayOfTheWeek.createDayOfTheWeekChoose(\n        props.lang,\n        isNewDate.value.getDay()\n      )\n    }\n  }\n)\n\n// 年月を選択する左側ボタンのref\nconst selectionButtonLeft = ref<HTMLElement>()\n\n// 年月を選択する右側ボタンのref\nconst selectionButtonRight = ref<HTMLElement>()\n\n// カレンダーのref\nconst refThisMonthCalenderDays = ref<HTMLElement>()\n\n// ページナビの現在地\nconst pageNaviCurrent = ref<number>(isMonth.value)\n\n// カレンダー日付区分のref\nconst refCalendarDateSection = ref<HTMLElement>()\n\nconst backCalendar = () => {\n  const elementCalendarDateSection = refCalendarDateSection.value!\n  elementCalendarDateSection.style.marginLeft = '5px'\n  elementCalendarDateSection.style.opacity = '0'\n\n  setTimeout(() => {\n    elementCalendarDateSection.style.marginLeft = '0px'\n    elementCalendarDateSection.style.marginRight = '5px'\n  }, 150)\n\n  setTimeout(() => {\n    pageNaviCurrent.value--\n    isMonth.value = pageNaviCurrent.value\n    if (pageNaviCurrent.value < 0) {\n      isYear.value--\n      pageNaviCurrent.value = 11\n      isMonth.value = pageNaviCurrent.value\n    }\n\n    // 前月のカレンダー情報を設定する\n    thisMonthCalenderDays.value = createCalendar(isYear.value, isMonth.value)\n\n    // ページナビの日付を代入する\n    isPagenaviMonthYear.value = createPagenaviMonthYear.createPagenaviMonthYearChoose(\n      props.lang,\n      isYear.value,\n      isMonth.value\n    )\n\n    elementCalendarDateSection.style.marginRight = '0px'\n    elementCalendarDateSection.style.opacity = '1'\n  }, 300)\n}\n\nconst nextCalendar = () => {\n  const elementCalendarDateSection = refCalendarDateSection.value!\n  elementCalendarDateSection.style.marginRight = '5px'\n  elementCalendarDateSection.style.opacity = '0'\n\n  setTimeout(() => {\n    elementCalendarDateSection.style.marginRight = '0px'\n    elementCalendarDateSection.style.marginLeft = '5px'\n  }, 150)\n\n  setTimeout(() => {\n    pageNaviCurrent.value++\n    isMonth.value = pageNaviCurrent.value\n    if (pageNaviCurrent.value > 11) {\n      isYear.value++\n      pageNaviCurrent.value = 0\n      isMonth.value = pageNaviCurrent.value\n    }\n\n    // 翌月のカレンダー情報を設定する\n    thisMonthCalenderDays.value = createCalendar(isYear.value, isMonth.value)\n\n    // ページナビの日付を代入する\n    isPagenaviMonthYear.value = createPagenaviMonthYear.createPagenaviMonthYearChoose(\n      props.lang,\n      isYear.value,\n      isMonth.value\n    )\n\n    elementCalendarDateSection.style.marginLeft = '0px'\n    elementCalendarDateSection.style.opacity = '1'\n  }, 300)\n}\n\n// ヘッダーの日付コンテナref\nconst refHeaderDateContainer = ref<HTMLElement>()\n\nconst selectDay = (dayObject: DateType) => {\n  if (dayObject.year === ' ' && dayObject.month === ' ' && dayObject.day === ' ') return\n\n  // const elementHeaderDateContainer = refHeaderDateContainer.value!\n  // elementHeaderDateContainer.style.opacity = '0'\n\n  setTimeout(() => {\n    const selectDayOfTheWeek = new Date(\n      Number(dayObject.year),\n      Number(dayObject.month),\n      Number(dayObject.day)\n    ).getDay()\n\n    byLangDayOfTheWeek.value = createDayOfTheWeek.createDayOfTheWeekChoose(\n      props.lang,\n      selectDayOfTheWeek\n    )\n\n    model.value = dayObject.year + '/' + (Number(dayObject.month) + 1) + '/' + dayObject.day\n\n    // elementHeaderDateContainer.style.opacity = '1'\n  }, 300)\n}\n</script>\n\n<template>\n  <div class=\"_cc_calendar\">\n    <CCCard class=\"_calendar_card\">\n      <div class=\"_calendar_header\">\n        <div ref=\"refHeaderDateContainer\" class=\"_header_date_container\">\n          <div v-if=\"!(headerYear && headerDate)\" class=\"_header_selection_not_selected\">\n            日付が未設定です\n          </div>\n          <div v-else>\n            <div class=\"_header_selection_year\">{{ headerYear }}</div>\n            <div class=\"_header_selection_date\">{{ headerDate }}</div>\n          </div>\n        </div>\n      </div>\n\n      <div class=\"_selection_date_container\">\n        <div class=\"_pagenavi_container\">\n          <div\n            ref=\"selectionButtonLeft\"\n            class=\"_selection_button _selection_button_left\"\n            @click=\"backCalendar\"\n          >\n            <CCMDIcon name=\"chevron_left\" />\n          </div>\n          <div class=\"_selection_month_year\">{{ isPagenaviMonthYear }}</div>\n          <div\n            ref=\"selectionButtonRight\"\n            class=\"_selection_button _selection_button_right\"\n            @click=\"nextCalendar\"\n          >\n            <CCMDIcon name=\"chevron_right\" />\n          </div>\n        </div>\n\n        <div class=\"_week_items_container\">\n          <div class=\"_day_of_the_week_items\">\n            {{ createDayOfTheWeek.createDayOfTheWeekChoose(props.lang, 0, true) }}\n          </div>\n          <div class=\"_day_of_the_week_items\">\n            {{ createDayOfTheWeek.createDayOfTheWeekChoose(props.lang, 1, true) }}\n          </div>\n          <div class=\"_day_of_the_week_items\">\n            {{ createDayOfTheWeek.createDayOfTheWeekChoose(props.lang, 2, true) }}\n          </div>\n          <div class=\"_day_of_the_week_items\">\n            {{ createDayOfTheWeek.createDayOfTheWeekChoose(props.lang, 3, true) }}\n          </div>\n          <div class=\"_day_of_the_week_items\">\n            {{ createDayOfTheWeek.createDayOfTheWeekChoose(props.lang, 4, true) }}\n          </div>\n          <div class=\"_day_of_the_week_items\">\n            {{ createDayOfTheWeek.createDayOfTheWeekChoose(props.lang, 5, true) }}\n          </div>\n          <div class=\"_day_of_the_week_items\">\n            {{ createDayOfTheWeek.createDayOfTheWeekChoose(props.lang, 6, true) }}\n          </div>\n        </div>\n\n        <div ref=\"refCalendarDateSection\" class=\"_week_items_container\">\n          <div\n            ref=\"refThisMonthCalenderDays\"\n            v-for=\"(dayObject, index) in thisMonthCalenderDays\"\n            :key=\"index\"\n            :class=\"{\n              _this_month_day:\n                dayObject.year !== ' ' && dayObject.month !== ' ' && dayObject.day !== ' ',\n              _day_space:\n                dayObject.year === ' ' && dayObject.month === ' ' && dayObject.day === ' ',\n              _today:\n                dayObject.year === String(isNewDate.getFullYear()) &&\n                dayObject.month === String(isNewDate.getMonth()) &&\n                dayObject.day === String(isNewDate.getDate()),\n              _select_day:\n                dayObject.year + '/' + (Number(dayObject.month) + 1) + '/' + dayObject.day ===\n                model,\n            }\"\n            @click=\"selectDay(dayObject)\"\n          >\n            {{ dayObject.day }}\n          </div>\n        </div>\n      </div>\n    </CCCard>\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n._cc_calendar\n  font-family: 'Roboto', sans-serif\n  width: 265px\n  ._calendar_card\n    height: 375px\n    ._calendar_header\n      background: var(--c-primary)\n      height: 90px\n      padding: 15px 20px 0px\n      color: #fff\n      ._header_date_container\n        transition: 0.3s\n        ._header_selection_year\n          font-size: 16px\n          margin-bottom: 8px\n        ._header_selection_date\n          font-size: 24px\n        ._header_selection_not_selected\n          margin-top: 15px\n          font-size: 20px\n    ._selection_date_container\n      padding: 15px 5px\n      padding-bottom: 0\n      color: #707070\n      ._pagenavi_container\n        display: flex\n        justify-content: center\n        align-items: center\n        margin-bottom: 15px\n        padding: 0 7px\n      ._selection_button\n        -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n        width: 24px\n        height: 24px\n        border-radius: 50%\n        cursor: pointer\n        transition: 0.3s\n      ._selection_button_left:hover\n        background: #707070\n        color: #fff\n      ._selection_button_right:hover\n        background: #707070\n        color: #fff\n      ._selection_month_year\n        text-align: center\n        width: 150px\n        font-size: 12px\n        line-height: 1rem\n        margin: 0 auto\n      ._week_items_container\n        display: flex\n        flex-wrap: wrap\n        justify-content: center\n        gap: 2px 4px\n        transition: 0.3s\n        ._day_of_the_week_items\n          width: 32px\n          height: 32px\n          display: grid\n          place-items: center\n        ._this_month_day\n          -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n          display: grid\n          place-items: center\n          border-radius: 50%\n          transition: 0.3s\n          height: 30px\n          width: 30px\n          border: solid 1px #fff\n          cursor: pointer\n        ._this_month_day:hover\n          background: rgb(var(--c-primary-rgb), 0.3)\n          color: #fff\n        ._day_space\n          height: 30px\n          width: 30px\n          border: solid 1px #fff\n        ._today\n          border: solid 1px var(--c-primary)\n        ._select_day\n          background: var(--c-primary)\n          color: #fff\n</style>\n","import { SizeTypes } from '../../../types'\n/**\n * カレンダーの展開位置を取得する\n */\nexport const calendarPosition = (\n  refInput: HTMLElement | undefined,\n  inputSize: SizeTypes,\n  labelFlag: boolean\n) => {\n  // インプットトップ\n  const elementInput = refInput!\n  const inputCoordinateTop = elementInput.getBoundingClientRect().top\n\n  // ブラウザ中心値\n  const innerHeightCenter = window.innerHeight / 2\n\n  if (\n    inputCoordinateTop < innerHeightCenter &&\n    (inputSize === 's' || inputSize === 'S') &&\n    !labelFlag\n  ) {\n    // インプットがブラウザの中心から上にあり、サイズがSで、ラベル等が設定されていない場合\n    return '44px'\n  } else if (\n    inputCoordinateTop < innerHeightCenter &&\n    (inputSize === 'm' || inputSize === 'M') &&\n    !labelFlag\n  ) {\n    // インプットがブラウザの中心から上にあり、サイズがMで、ラベル等が設定されていない場合\n    return '49px'\n  } else if (\n    inputCoordinateTop < innerHeightCenter &&\n    (inputSize === 'l' || inputSize === 'L') &&\n    !labelFlag\n  ) {\n    // インプットがブラウザの中心から上にあり、サイズがLで、ラベル等が設定されていない場合\n    return '54px'\n  } else if (\n    inputCoordinateTop < innerHeightCenter &&\n    (inputSize === 's' || inputSize === 'S') &&\n    labelFlag\n  ) {\n    // インプットがブラウザの中心から上にあり、サイズがSで、ラベル等が設定されている場合\n    return '68px'\n  } else if (\n    inputCoordinateTop < innerHeightCenter &&\n    (inputSize === 'm' || inputSize === 'M') &&\n    labelFlag\n  ) {\n    // インプットがブラウザの中心から上にあり、サイズがMで、ラベル等が設定されている場合\n    return '73px'\n  } else if (\n    inputCoordinateTop < innerHeightCenter &&\n    (inputSize === 'l' || inputSize === 'L') &&\n    labelFlag\n  ) {\n    // インプットがブラウザの中心から上にあり、サイズがLで、ラベル等が設定されている場合\n    return '78px'\n  } else if (inputCoordinateTop > innerHeightCenter) {\n    // インプットがブラウザの中心から下にある場合\n    return '-395px'\n  }\n  return '0px'\n}\n","<script setup lang=\"ts\">\nimport { ref, computed, PropType, watch, Ref, onMounted } from 'vue'\nimport { SizeTypes, MDIconTypes } from '../../types'\nimport CCMDIcon from '../CCMDIcon/CCMDIcon.vue'\nimport CCCalendar from '../CCCalendar/CCCalendar.vue'\n// import CCModal from '../CCModal/CCModal.vue'\nimport { onClickOutside } from '@vueuse/core'\nimport { calendarPosition } from './functions/calendarPosition'\nimport { access } from 'fs'\n\nconst props = defineProps({\n  /**\n   * 値\n   * @example 'テスト', 100\n   */\n  modelValue: { type: [String, Number, File] },\n  /**\n   * アウトライン\n   * @example outline\n   */\n  outline: { type: Boolean, default: false },\n  /**\n   * シャドウ\n   * @example shadow\n   */\n  shadow: { type: Boolean, default: false },\n  /**\n   * スクエア\n   * @example square\n   */\n  square: { type: Boolean, default: false },\n  /**\n   * ディセーブル\n   * @example disable => true\n   */\n  disabled: { type: Boolean, default: false },\n  /**\n   * ラベル\n   * @example 'お名前'\n   */\n  label: { type: String, default: '' },\n  /**\n   * ラベルのテキストの大きさ\n   * line-heightが24pxのため、大きすぎるサイズを入れると表示が崩れる\n   * @example '16px'\n   */\n  labelSize: { type: String, default: '' },\n  /**\n   * プレースホルダー\n   * @example 'お名前'\n   */\n  placeholder: { type: String, default: '' },\n  /**\n   * サイズ\n   * @example 'S' | 'M' | 'L'\n   */\n  size: { type: String as PropType<SizeTypes>, default: 'S' },\n  /**\n   * アイコンレフト\n   * @example 'left'\n   */\n  iconLeft: { type: String as PropType<MDIconTypes>, default: '' },\n  /**\n   * アイコンライト\n   * @example 'right'\n   */\n  iconRight: { type: String as PropType<MDIconTypes>, default: '' },\n  /**\n   * 必須テキスト\n   * @example '*' | '*必須'\n   */\n  requiredText: { type: String as PropType<'※' | '※必須'>, default: '' },\n  /**\n   * 必須アイコン\n   * @example true\n   */\n  requiredIcon: { type: Boolean, default: false },\n  /**\n   * エラー1\n   * @example true\n   */\n  error1: { type: Boolean, default: false },\n  /**\n   * エラー2\n   * @example true\n   */\n  error2: { type: Boolean, default: false },\n  /**\n   * エラー3\n   * @example '****を入力してください'\n   */\n  error3: { type: String, default: '' },\n  /**\n   * エラー4\n   * @example '****を入力してください'\n   */\n  error4: { type: String, default: '' },\n  /**\n   * 日付\n   * @example true | false\n   */\n  date: { type: Boolean, default: false },\n  /**\n   * 文字数制限\n   * @example 11\n   */\n  maxlength: { type: String, default: '999' },\n  /**\n   * 検索\n   * @example true | false\n   */\n  search: { type: Boolean, default: false },\n  /**\n   * カレンダーをポップアップモードで表示する\n   * @example true | false\n   */\n  calendarPopupMode: { type: Boolean, default: false },\n  /**\n   * ファイル選択\n   */\n  accept: { type: String, default: '' },\n\n  /**\n   * inputmode\n   * @example inputmode: numeric\n   */\n  inputmode: {\n    type: String as PropType<\n      'text' | 'search' | 'none' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | undefined\n    >,\n    default: 'text',\n  },\n  type: {\n    type: String,\n    default: 'text',\n  },\n  /**\n   * autocomplete\n   * @example true | false\n   */\n  isAutocomplete: {\n    type: Boolean,\n    default: true,\n  },\n})\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', val: string | number | File | undefined): void\n  (e: 'update:calendarPopupMode', val: boolean): void\n  (e: 'onBlur'): void\n  (e: 'onFocus'): void\n}>()\n\nconst model = computed({\n  get: () => props.modelValue,\n  set: (value) => {\n    emit('update:modelValue', value)\n  },\n})\n\nconst typeLocal = ref<string>(props.type)\n\nconst isDesign = computed(() => {\n  if (props.outline) return 'outline'\n  if (props.shadow) return 'shadow'\n  if (props.square) return 'square'\n  return 'standard'\n})\n\n// パスワードアイコンをクリックする\nconst clickPasswordIcon = () => {\n  if (typeLocal.value === 'password') {\n    typeLocal.value = 'text'\n  } else {\n    typeLocal.value = 'password'\n  }\n}\n\nconst calendarState = ref<boolean>(false)\nconst refCcInput = ref<HTMLElement>()\nconst refCcCalendar = ref<HTMLElement>()\nconst refCCCalendarPop = ref<HTMLElement>()\nconst calendarOpen = () => {\n  calendarState.value = !calendarState.value\n\n  // ラベルフラグ\n  const labelFlag = ref<boolean>(false)\n  if (props.label || props.requiredIcon || props.requiredText) {\n    labelFlag.value = true\n  }\n\n  // カレンダーの表示位置を設定する:ポップアップの場合はスルーするー\n  if (!props.calendarPopupMode) {\n    const elementCalendar = refCcCalendar.value!\n    elementCalendar.style.top = calendarPosition(refCcInput.value, props.size, labelFlag.value)\n  }\n}\n\n// コンポーネントの要素外をクリックした場合、optionsを閉じる\n// onClickOutside(refCcInput, () => {\n//   if (!calendarState.value) return\n//   calendarState.value = false\n// })\n// onClickOutside(refCCCalendarPop, () => {\n//   if (!calendarState.value) return\n//   calendarState.value = false\n// })\n\n//カレンダー上で日付を選んでも閉じる\nwatch(model, () => {\n  if (!calendarState.value) return\n  calendarState.value = false\n  //modelの値を監視し、変更があった場合その値をmodelValueを使用しているemitに返す\n  if (model.value) {\n    let year = String(model.value).split('/')[0]\n    let month = ('0' + String(model.value).split('/')[1]).slice(-2)\n    let day = ('0' + String(model.value).split('/')[2]).slice(-2)\n    /**日付を0付きの数字に変更する */\n    const date = `${year}/${month}/${day}`\n    emit('update:modelValue', date)\n  }\n})\n\nconst onBlur = () => {\n  emit('onBlur')\n}\nconst onFocus = () => {\n  emit('onFocus')\n}\nconst clickInput = () => {\n  if (typeLocal.value === 'file') {\n    const element = document.createElement('input')\n    if (props.accept) {\n      element.accept = props.accept\n    }\n    element.type = 'file'\n    element.addEventListener('change', (e) => {\n      const target = e.target as HTMLInputElement\n      const file = target.files![0]\n      model.value = file\n      element.remove()\n    })\n    element.click()\n  }\n}\n\nconst showFileName = computed(() => {\n  if (model.value instanceof File) {\n    const fileName = model.value.name\n    return fileName\n  }\n})\n\nconst inputClass = computed(() => {\n  return {\n    _icon_left: props.iconLeft || props.search,\n    _icon_right: props.iconRight || props.date,\n    _icon_left_and_right: props.iconLeft && props.iconRight,\n    _size_s: props.size.toLocaleLowerCase() === 's',\n    _size_m: props.size.toLocaleLowerCase() === 'm',\n    _size_l: props.size.toLocaleLowerCase() === 'l',\n    _standard: isDesign.value === 'standard',\n    _outline: isDesign.value === 'outline',\n    _shadow: isDesign.value === 'shadow',\n    _square: isDesign.value === 'square',\n    _standard_or_shadow_width:\n      (isDesign.value === 'standard' && !props.iconLeft && !props.iconRight) ||\n      (isDesign.value === 'shadow' && !props.iconLeft && !props.iconRight),\n    _outline_or_square_width:\n      (isDesign.value === 'outline' && !props.iconLeft && !props.iconRight) ||\n      (isDesign.value === 'square' && !props.iconLeft && !props.iconRight),\n    _standard_or_shadow_single_icon:\n      (isDesign.value === 'standard' &&\n        (props.iconLeft || props.iconRight || props.date || props.search)) ||\n      (isDesign.value === 'shadow' &&\n        (props.iconLeft || props.iconRight || props.date || props.search)),\n    _outline_or_square_single_icon:\n      (isDesign.value === 'outline' &&\n        (props.iconLeft || props.iconRight || props.date || props.search)) ||\n      (isDesign.value === 'square' &&\n        (props.iconLeft || props.iconRight || props.date || props.search)),\n    _standard_or_shadow_double_icons:\n      (isDesign.value === 'standard' && props.iconLeft && props.iconRight) ||\n      (isDesign.value === 'shadow' && props.iconLeft && props.iconRight),\n    _outline_or_square_double_icons:\n      (isDesign.value === 'outline' && props.iconLeft && props.iconRight) ||\n      (isDesign.value === 'square' && props.iconLeft && props.iconRight),\n    _disable: props.disabled,\n    _error_standard:\n      isDesign.value === 'standard' &&\n      (props.error1 || props.error2 || props.error3 || props.error4),\n    _error_outline_and_square:\n      (isDesign.value === 'outline' || isDesign.value === 'square') &&\n      (props.error1 || props.error2 || props.error3 || props.error4),\n    _error_bg: props.error2 || props.error4,\n  }\n})\n\nconst isCCCalendar = (m: any): m is string | number | undefined => {\n  return typeof m === 'string' || typeof m === undefined\n}\n</script>\n\n<template>\n  <div ref=\"refCcInput\" class=\"_cc_input\" @click=\"clickInput\">\n    <Teleport to=\"body\">\n      <transition name=\"fade\" v-if=\"calendarPopupMode\">\n        <div class=\"_calender_modal\" v-if=\"calendarPopupMode\" v-show=\"calendarState\">\n          <div v-if=\"size === 's' || size === 'S'\" class=\"_calender_modal_box\">\n            <div class=\"_modal_card_small\" ref=\"refCCCalendarPop\">\n              <CCCalendar v-if=\"isCCCalendar(model)\" v-model=\"(model as string)\" />\n            </div>\n          </div>\n        </div>\n      </transition>\n    </Teleport>\n    <transition v-if=\"!calendarPopupMode\">\n      <div ref=\"refCcCalendar\" v-show=\"calendarState\" class=\"_cc_calendar_container\">\n        <CCCalendar v-if=\"isCCCalendar(model)\" v-model=\"(model as string)\" />\n      </div>\n    </transition>\n\n    <div class=\"_label_container\">\n      <div class=\"_label label_text_size\">\n        {{ label }}\n      </div>\n      <div v-if=\"requiredText\" class=\"_required_text\" :class=\"{ _required_position_right: label }\">\n        {{ requiredText }}\n      </div>\n      <div\n        v-if=\"requiredIcon\"\n        class=\"_required_icon_container\"\n        :class=\"{ _required_position_right: label }\"\n      >\n        <div class=\"_required_icon\">必須</div>\n      </div>\n    </div>\n\n    <div class=\"_input_container\">\n      <div v-if=\"iconLeft && !search\" class=\"_icon_left_position\">\n        <CCMDIcon :name=\"iconLeft\" class=\"_cc_mdicon\" />\n      </div>\n\n      <div v-if=\"search && !iconLeft\" class=\"_icon_left_position\">\n        <CCMDIcon name=\"search\" class=\"_cc_search_icon\" />\n      </div>\n\n      <div v-if=\"iconRight && !date\" class=\"_icon_right_position\">\n        <CCMDIcon :name=\"iconRight\" class=\"_cc_mdicon\" />\n      </div>\n\n      <div v-if=\"date && !iconRight\" class=\"_calendar_icon_container\" @click=\"calendarOpen\">\n        <CCMDIcon name=\"calendar_today\" class=\"_cc_mdicon\" />\n      </div>\n\n      <div v-if=\"type === 'password'\">\n        <div\n          v-if=\"typeLocal === 'password'\"\n          class=\"_calendar_icon_container\"\n          @click=\"clickPasswordIcon\"\n        >\n          <CCMDIcon name=\"visibility_off\" class=\"_cc_mdicon\" />\n        </div>\n        <div\n          v-if=\"typeLocal !== 'password'\"\n          class=\"_calendar_icon_container\"\n          @click=\"clickPasswordIcon\"\n        >\n          <CCMDIcon name=\"visibility\" class=\"_cc_mdicon\" />\n        </div>\n      </div>\n\n      <div v-if=\"typeLocal === 'file'\" class=\"_input _file\" :class=\"inputClass\">\n        {{ !!showFileName ? showFileName : placeholder }}\n      </div>\n\n      <input\n        v-else\n        :name=\"'dfasdfjdjskfjkdsak_' + Math.random().toString(36).substring(2)\"\n        v-model=\"model\"\n        :disabled=\"disabled\"\n        :placeholder=\"search ? 'キーワードで検索' : placeholder\"\n        :maxlength=\"maxlength\"\n        :inputmode=\"inputmode\"\n        :type=\"typeLocal\"\n        @blur=\"onBlur()\"\n        @focus=\"onFocus()\"\n        class=\"_input\"\n        :class=\"inputClass\"\n        :autocomplete=\"isAutocomplete ? '' : 'new-password'\"\n      />\n    </div>\n\n    <div v-show=\"error3\" class=\"_error_message\">\n      {{ error3 }}\n    </div>\n\n    <div v-show=\"error4\" class=\"_error_message\">\n      {{ error4 }}\n    </div>\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\ninput::placeholder\n  color: #D2D2D2\n._cc_input\n  font-family: 'Roboto', sans-serif\n  position: relative\n  box-sizing: border-box\n\n._cc_calendar_container\n  position: absolute\n  z-index: 100\n  right: 0\n\n._icon_left_position\n  width: 30px\n  height: 30px\n  display: flex\n  justify-content: center\n  align-items: center\n  position: absolute\n  top: 50%\n  left: 10px\n  transform: translateY(-50%)\n  -webkit-transform: translateY(-50%)\n  -ms-transform: translateY(-50%)\n\n._icon_right_position\n  width: 30px\n  height: 30px\n  display: flex\n  justify-content: center\n  align-items: center\n  position: absolute\n  top: 50%\n  right: 10px\n  transform: translateY(-50%)\n  -webkit-transform: translateY(-50%)\n  -ms-transform: translateY(-50%)\n._calendarpopup_mode\n  position: fixed\n  top: 50%\n  left: 50%\n  transform: translate(-50%, -50%)\n  z-index: 100\n\n\n._calendar_icon_container\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  width: 30px\n  height: 30px\n  display: flex\n  justify-content: center\n  align-items: center\n  position: absolute\n  top: 50%\n  right: 10px\n  transform: translateY(-50%)\n  -webkit-transform: translateY(-50%)\n  -ms-transform: translateY(-50%)\n  border-radius: 50%\n  cursor: pointer\n  transition: 0.3s\n._calendar_icon_container:hover\n  background: rgb(var(--c-primary-rgb), 0.3)\n\n._cc_mdicon\n  font-size: 24px\n  color: var(--c-primary)\n\n._cc_search_icon\n  font-size: 24px\n  color: #9C9C9C\n\n._label_container\n  display: flex\n  align-items: center\n  padding: 0 5px\n  margin-bottom: 2px\n  line-height: 24px\n\n._label\n  font-size: 16px\n  color: #707070\n  width: fit-content\n\n._required_text\n  font-size: 14px\n  color: #D20000\n\n._required_icon_container\n  height: 24px\n  display: flex\n  align-items: center\n\n._required_icon\n  font-size: 14px\n  background: #D20000\n  color: #fff\n  line-height: 22px\n  padding: 0 5px\n  border-radius: 5px\n\n._required_position_right\n  margin-left: auto\n\n._input_container\n  position: relative\n\n._input\n  padding: 0 15px\n  border: none\n  outline: none\n  font-size: 16px\n\n._file\n  line-height: 40px\n  cursor: pointer\n  overflow: hidden\n  text-overflow: ellipsis\n  white-space: nowrap\n  word-break: keep-all\n\n._icon_left\n  padding: 0 15px 0 45px\n\n._icon_right\n  padding: 0 45px 0 15px\n\n._icon_left_and_right\n  padding: 0 45px\n\n._size_s\n  height: 40px\n\n._size_m\n  height: 45px\n\n._size_l\n  height: 50px\n\n._standard\n  -webkit-appearance: none\n  appearance: none\n  padding-top: 1px\n  border-radius: 0px\n  border-bottom: solid 1px var(--c-primary)\n\n._outline\n  border-radius: 5px\n\n._shadow\n  border-radius: 5px\n  box-shadow: rgba(99, 99, 99, 0.2) 0px 0px 8px 1px\n  -webkit-appearance: none\n  appearance: none\n  padding-top: 1px\n  padding-bottom: 1px\n\n._square\n  border-radius: 0px\n\n._standard_or_shadow_width\n  width: calc(100%)\n\n._outline_or_square_width\n  width: calc(100%)\n  border: solid 1px var(--c-primary)\n\n._standard_or_shadow_single_icon\n  width: calc(100%)\n\n._outline_or_square_single_icon\n  width: calc(100%)\n  border: solid 1px var(--c-primary)\n\n._standard_or_shadow_double_icons\n  width: calc(100%)\n\n._outline_or_square_double_icons\n  width: calc(100%)\n  border: solid 1px var(--c-primary)\n\n._disable\n  background: #ECECEC\n  cursor: not-allowed\n\n._error_message\n  color: #D20000\n  font-size: 16px\n\n._error_standard\n  border-bottom: solid 1px #D20000\n\n._error_outline_and_square\n  border: solid 1px #D20000\n\n._error_bg\n  background: rgba(210,0,0,0.2)\n\n.v-enter-active, .v-leave-active\n  transition: opacity 0.3s ease\n\n.v-enter-from, .v-leave-to\n  opacity: 0\n\n.label_text_size\n  font-size: v-bind('labelSize === \"\" ? \"16px\" : labelSize')\n//\n// モーダルカレンダー用\n.fade-enter-active, .fade-leave-active\n  transition: opacity 0.3s ease\n\n.fade-enter-from, .fade-leave-to\n  opacity: 0\n\n.fade-enter-to, .fade-leave-from\n  opacity: 1\n\n._calender_modal\n  position: fixed\n  top: 0\n  left: 0\n  z-index: 9999\n  background: rgb(var(--c-modal-black-rgb), 0.3)\n  backdrop-filter: blur(1px)\n  height: 100vh\n  width: 100vw\n  display: flex\n._calender_modal_box\n  position: absolute\n  top: 50%\n  left: calc((100vw + 0px) / 2)\n  transform: translate(-50%, -50%)\n  -webkit-transform: translate(-50%, -50%)\n  -ms-transform: translate(-50%, -50%)\n</style>\n","<script setup lang=\"ts\">\nimport { ref, PropType, watch, computed } from 'vue'\nimport { SizeTypes, MDIconTypes, ColorTypes } from '../../types'\nimport CCMDIcon from '../CCMDIcon/CCMDIcon.vue'\n\nconst props = defineProps({\n  /**\n   * label\n   * @example 'Save'\n   */\n  label: { type: String, default: 'label' },\n  /**\n   * outline\n   * @example outline\n   */\n  outline: { type: Boolean, default: false },\n\n  /**\n   * ラウンドデザイン\n   * @example rounded\n   */\n  rounded: { type: Boolean, default: false },\n  /**\n   * スクエアデザイン\n   * @example square\n   */\n  square: { type: Boolean, default: false },\n  /**\n   * サイズ\n   * @example 'xs' | 'XS' | 's' | 'S' | 'm' | 'M' | 'l' | 'L' | 'xl' | 'XL'\n   */\n  size: { type: String as PropType<SizeTypes>, default: 'S' },\n  /**\n   * カラー\n   * @example 'secondary'\n   */\n  color: {\n    type: String as PropType<ColorTypes>,\n    default: 'primary',\n  },\n  /**\n   * ディセーブル\n   * @example disable => true\n   */\n  disabled: { type: Boolean, default: false },\n  /**\n   * アイコン右\n   * @example 'mail'\n   */\n  iconRight: { type: String as PropType<MDIconTypes>, default: '' },\n  /**\n   * アイコン左\n   * @example 'phone'\n   */\n  iconLeft: { type: String as PropType<MDIconTypes>, default: '' },\n  /**\n   * ラベルカラー\n   */\n  labelColor: { type: String, default: '#FFFFFF' },\n})\n\nconst emit = defineEmits<{\n  (e: 'click'): void\n}>()\n\nconst isDesign = ref<string>()\n\nif (props.rounded) {\n  isDesign.value = 'rounded'\n}\nif (props.square) {\n  isDesign.value = 'square'\n}\nif (!props.rounded && !props.square) {\n  isDesign.value = 'standard'\n}\n\nwatch(\n  () => [props.rounded, props.square],\n  () => {\n    if (props.rounded) {\n      isDesign.value = 'rounded'\n    }\n    if (props.square) {\n      isDesign.value = 'square'\n    }\n    if (!props.rounded && !props.square) {\n      isDesign.value = 'standard'\n    }\n  }\n)\n\n// カラーコードが指定された場合に対応するインラインスタイルを設定\nconst buttonStyle = computed(() => {\n  if (props.color.startsWith('#')) {\n    return {\n      backgroundColor: props.outline ? 'transparent' : props.color,\n      border: props.outline ? `1px solid ${props.color}` : 'none',\n      color: props.labelColor,\n    }\n  }\n  return {}\n})\n</script>\n\n<template>\n  <button\n    :disabled=\"disabled\"\n    class=\"_cc_button\"\n    :class=\"{\n      _standard: isDesign === 'standard',\n      _rounded: isDesign === 'rounded',\n      _square: isDesign === 'square',\n      _size_xs: size === 'xs' || size === 'XS',\n      _size_s: size === 's' || size === 'S',\n      _size_m: size === 'm' || size === 'M',\n      _size_l: size === 'l' || size === 'L',\n      _size_xl: size == 'xl' || size === 'XL',\n      _disabled: disabled,\n      _color_primary: color === 'primary',\n      _color_secondary: color === 'secondary',\n      _color_positive: color === 'positive',\n      _color_negative: color === 'negative',\n      _color_warning: color === 'warning',\n      _outline_primary: outline && color === 'primary',\n      _outline_secondary: outline && color === 'secondary',\n      _outline_positive: outline && color === 'positive',\n      _outline_negative: outline && color === 'negative',\n      _outline_warning: outline && color === 'warning',\n    }\"\n    :style=\"buttonStyle\"\n    @click=\"emit('click')\"\n  >\n    <CCMDIcon v-show=\"iconLeft\" :name=\"iconLeft\" class=\"_cc_mdicon\" />\n\n    <div class=\"_label\">{{ label }}</div>\n\n    <CCMDIcon v-show=\"iconRight\" :name=\"iconRight\" class=\"_cc_mdicon\" />\n  </button>\n</template>\n\n<style lang=\"sass\" scoped>\n._cc_button\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  font-family: 'Roboto', sans-serif\n  font-size: 18px\n  cursor: pointer\n  transition: 0.3s\n  border: none\n  width: 100%\n  display: flex\n  justify-content: center\n  align-items: center\n  color: #fff\n\n._cc_button:hover\n  opacity: 0.7\n\n._standard\n  border-radius: 5px\n\n._rounded\n  border-radius: 25px\n\n._square\n  border-radius: 0px\n\n._size_xs\n  height: 35px\n\n._size_s\n  height: 40px\n\n._size_m\n  height: 45px\n\n._size_l\n  height: 50px\n\n._size_xl\n  height: 55px\n\n._disabled\n  cursor: not-allowed\n  opacity: 0.7\n\n._color_primary\n  background: var(--c-primary)\n\n._color_secondary\n  background: var(--c-secondary)\n\n._color_positive\n  background: var(--c-positive)\n\n._color_negative\n  background: var(--c-negative)\n\n._color_warning\n  background: var(--c-warning)\n\n._label\n  margin: 0 5px\n\n._cc_mdicon\n  font-size: 23px\n  height: 25px\n  width: 25px\n\n._outline_primary\n  background: transparent\n  border: 1px solid var(--c-primary)\n  color: var(--c-primary)\n\n._outline_secondary\n  background: transparent\n  border: 1px solid var(--c-secondary)\n  color: var(--c-secondary)\n._outline_positive\n  background: transparent\n  border: 1px solid var(--c-positive)\n  color: var(--c-positive)\n._outline_negative\n  background: transparent\n  border: 1px solid var(--c-negative)\n  color: var(--c-negative)\n._outline_warning\n  background: transparent\n  border: 1px solid var(--c-warning)\n  color: var(--c-warning)\n</style>\n","<script setup lang=\"ts\">\nimport { PropType, computed } from \"vue\";\nimport { CCToggleType } from \"./CCToggle.types\";\nimport CCMDIcon from \"../CCMDIcon/CCMDIcon.vue\";\n\nconst props = defineProps({\n  /**\n   * 値\n   * @example true | false\n   */\n  modelValue: { type: Boolean, default: false },\n  /**\n   * パターン\n   * @example 'pattern1' | 'pattern2' | 'pattern3'\n   */\n  design: { type: String as PropType<CCToggleType>, default: \"pattern1\" },\n  /**\n   * 制御\n   * @example true: 制御, false: 解除\n   */\n  disabled: { type: Boolean, default: false },\n  /**\n   * ラベル\n   * @example 'label'\n   */\n  label: { type: String, default: \"\" },\n  /**\n   * ホバー解除\n   * @example hoverInvalid\n   */\n  hoverInvalid: { type: Boolean, default: false },\n});\n\nconst emit = defineEmits<{\n  (e: \"update:modelValue\", val: boolean): void;\n}>();\n\nconst model = computed({\n  get: () => props.modelValue,\n  set: (value) => {\n    emit(\"update:modelValue\", value);\n  },\n});\n\n// トグルをクリックする\nconst clickToggle = () => {\n  if (props.disabled) return;\n  model.value = !model.value;\n};\n</script>\n\n<template>\n  <div\n    v-if=\"design === 'pattern1' || design === 'pattern2'\"\n    class=\"_p1_p2_item_container\"\n    :class=\"{\n      _disabled_item_container: props.disabled,\n      _hover_invalid_item_container: props.hoverInvalid,\n    }\"\n    @click=\"clickToggle\"\n  >\n    <div\n      v-if=\"design === 'pattern1'\"\n      :class=\"{\n        _p1_p2_ball_passive: !model && !props.hoverInvalid,\n        _p1_p2_ball_active: model && !props.hoverInvalid,\n        _p1_p2_ball_passive_hover_invalid: !model && props.hoverInvalid,\n        _p1_p2_ball_active_hover_invalid: model && props.hoverInvalid,\n        _ball_disabled: props.disabled,\n      }\"\n      class=\"_p1_p2_ball\"\n    />\n    <div\n      v-if=\"design === 'pattern2'\"\n      :class=\"{\n        _p1_p2_ball_passive: !model && !props.hoverInvalid,\n        _p1_p2_ball_active: model && !props.hoverInvalid,\n        _p1_p2_ball_passive_hover_invalid: !model && props.hoverInvalid,\n        _p1_p2_ball_active_hover_invalid: model && props.hoverInvalid,\n        _ball_disabled: props.disabled,\n      }\"\n      class=\"_p1_p2_ball\"\n    >\n      <div>\n        <CCMDIcon\n          :name=\"model ? 'done' : 'close'\"\n          :class=\"{\n            _icon_active: model,\n            _icon_passive: !model,\n          }\"\n          class=\"_icon_common\"\n        />\n      </div>\n    </div>\n\n    <div\n      v-if=\"!props.disabled && !props.hoverInvalid\"\n      :class=\"{\n        _p1_p2_hover_circle_passive: !model,\n        _p1_p2_hover_circle_active: model,\n      }\"\n      class=\"_p1_p2_hover_circle\"\n    />\n\n    <div\n      :class=\"{\n        _p1_p2_bar_active: model,\n        _p1_p2_bar_passive: !model,\n      }\"\n      class=\"_p1_p2_bar\"\n    />\n  </div>\n\n  <div\n    v-if=\"design === 'pattern3'\"\n    :class=\"{\n      _p3_item_active: model,\n      _p3_item_passive: !model,\n      _disabled_item_container: props.disabled,\n    }\"\n    class=\"_p3_item_container\"\n    @click=\"clickToggle\"\n  >\n    <div\n      class=\"_p3_ball\"\n      :class=\"{\n        _p3_ball_passive: !model,\n        _p3_ball_active: model,\n        _ball_disabled: props.disabled,\n      }\"\n    />\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n._p1_p2_item_container\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  position: relative\n  height: 50px\n  width: 65px\n  cursor: pointer\n  border-radius: 25px\n._p1_p2_item_container:hover ._p1_p2_hover_circle\n  background: rgb(var(--c-primary-rgb), 0.3)\n\n._hover_invalid_item_container\n  height: 25px\n  width: 40px\n\n._p1_p2_ball\n  position: absolute\n  top: 50%\n  left: 0%\n  transform: translateY(-50%)\n  -webkit-transform: translateY(-50%)\n  -ms-transform: translateY(-50%)\n  z-index: 10\n  width: 25px\n  height: 25px\n  border-radius: 25px\n  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 6px, rgba(0, 0, 0, 0.23) 0px 2px 6px\n  transition: 0.3s\n\n._icon_common\n  position: absolute\n  font-size: 16px\n  font-weight: 700\n  border-radius: 25px\n  position: absolute\n  top: 50%\n  left: 50%\n  transform: translate(-50%, -50%)\n  -webkit-transform: translate(-50%, -50%)\n  -ms-transform: translate(-50%, -50%)\n._icon_active\n  color: #fff\n._icon_passive\n  color: #707070\n\n._p1_p2_ball_passive\n  background: #fff\n  margin-left: 12px\n\n._p1_p2_ball_active\n  background: var(--c-primary)\n  margin-left: 28px\n\n._p1_p2_ball_passive_hover_invalid\n  background: #fff\n._p1_p2_ball_active_hover_invalid\n  background: var(--c-primary)\n  margin-left: 16px\n\n._p1_p2_hover_circle\n  position: absolute\n  top: 50%\n  left: 0\n  transform: translateY(-50%)\n  -webkit-transform: translateY(-50%)\n  -ms-transform: translateY(-50%)\n  z-index: 5\n  height: 50px\n  width: 50px\n  border-radius: 25px\n  transition: 0.3s\n\n._p1_p2_hover_circle_passive\n  margin-left: 0px\n\n._p1_p2_hover_circle_active\n  margin-left: 15px\n\n._p1_p2_bar\n  position: absolute\n  z-index: 1\n  height: 13px\n  width: 40px\n  border-radius: 25px\n  top: 50%\n  left: 50%\n  transform: translate(-50%, -50%)\n  -webkit-transform: translate(-50%, -50%)\n  -ms-transform: translate(-50%, -50%)\n._p1_p2_bar_active\n  background: rgb(var(--c-primary-rgb), 0.3)\n._p1_p2_bar_passive\n  background: #9E9E9E\n\n._p3_item_container\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  height: 30px\n  width: 60px\n  border-radius: 25px\n  display: flex\n  align-items: center\n  cursor: pointer\n  transition: 0.3s\n._p3_item_active\n  background: var(--c-primary)\n._p3_item_passive\n  background: #9E9E9E\n\n._p3_ball\n  width: 24px\n  height: 24px\n  border-radius: 25px\n  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 6px, rgba(0, 0, 0, 0.23) 0px 2px 6px\n  transition: 0.3s\n\n._p3_ball_passive\n  margin-left: 4px\n  background: #fff\n\n._p3_ball_active\n  margin-left: 32px\n  background: #fff\n\n._disabled_item_container\n  cursor: not-allowed\n\n._ball_disabled\n  background: #ECECEC\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nconst props = defineProps({\n  /**\n   * 値\n   * @example 'Google'\n   */\n  modelValue: { type: String, default: '' },\n  /**\n   * 表示名\n   * @example 'フェイスブック'\n   */\n  label: { type: String },\n  /**\n   * 連動値\n   * @example 'Facebook'\n   */\n  value: { type: String, default: '' },\n  /**\n   * 制御\n   * @example true | false\n   */\n  disabled: { type: Boolean, default: false },\n  /**\n   * ホバーを解除する\n   * @example hoverInvalid\n   */\n  hoverInvalid: { type: Boolean, default: false },\n})\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', value: string): void\n}>()\n\nconst model = computed({\n  get: () => {\n    return props.modelValue\n  },\n  set: value => {\n    emit('update:modelValue', value)\n  },\n})\n\n// コンポーネントをクリックした場合の処理\nconst clickBox = () => {\n  if (props.disabled) return\n\n  if (model.value !== props.value) {\n    model.value = props.value\n  }\n}\n</script>\n\n<template>\n  <div class=\"_box\" :class=\"{ _active: !disabled, _disable: disabled }\" @click=\"clickBox\">\n    <div v-show=\"!props.hoverInvalid\" class=\"_hover_circle_container\">\n      <div v-show=\"!props.disabled\" class=\"_hover_circle\" />\n    </div>\n\n    <div\n      class=\"_radio_item_container\"\n      :class=\"{ _hover_invalid_radio_item_container: hoverInvalid }\"\n    >\n      <div\n        :class=\"{\n          _outer_circle_active: model === props.value,\n          _outer_circle_passive: model !== props.value,\n        }\"\n        class=\"_outer_circle\"\n      >\n        <div :class=\"{ _inner_circle_active: model === props.value }\" class=\"_inner_circle\" />\n      </div>\n      <input v-model=\"model\" type=\"radio\" :value=\"value\" />\n      <label :for=\"value\" :class=\"{ _label: !disabled, _label_disabled: disabled }\">\n        {{ typeof label === 'string' ? label : value }}\n      </label>\n    </div>\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n._box\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  position: relative\n  width: fit-content\n  font-family: 'Roboto', sans-serif\n\n._box:hover ._hover_circle\n  height: 48px\n  width: 48px\n._active\n  cursor: pointer\n  opacity: 1\n._disable\n  cursor: not-allowed\n  opacity: 0.7\n\n._radio_item_container\n  display: flex\n  align-items: center\n  padding: 9px 5px 9px 9px\n\n._hover_invalid_radio_item_container\n  padding: 0px 5px 0px 0px\n\n._hover_circle_container\n  position: absolute\n  height: 48px\n  width: 48px\n  display: flex\n  justify-content: center\n  align-items: center\n\n._hover_circle\n  border-radius: 50%\n  height: 0px\n  width: 0px\n  transition: 0.3s\n  background: rgb(var(--c-primary-rgb), 0.1)\n\ninput\n  display: none\n\nlabel\n  font-size: 16px\n  color: #333333\n  margin-left: 12px\n\n._label\n  cursor: pointer\n\n._label_disabled\n  cursor: not-allowed\n\n._outer_circle\n  height: 24px\n  width: 24px\n  border-radius: 50%\n  background: #fff\n  display: flex\n  justify-content: center\n  align-items: center\n  transition: 0.3s\n._outer_circle_active\n  border: solid 3px var(--c-primary)\n._outer_circle_passive\n  border: solid 3px #9E9E9E\n\n\n._inner_circle\n  background: var(--c-primary)\n  border-radius: 50%\n  transition: 0.3s\n._inner_circle_active\n  height: 14px\n  width: 14px\n</style>\n","<script setup lang=\"ts\">\nimport { computed, PropType } from 'vue'\nimport { SizeTypes } from '../../types'\nimport { LabelColorTypes } from '../../types/Color/Color.types'\n\nconst props = defineProps({\n  /**\n   * 値\n   * @example true | false\n   */\n  modelValue: { type: Boolean, default: false },\n  /**\n   * 制御\n   * @example true | false\n   */\n  disabled: { type: Boolean, default: false },\n  /**\n   * ラベル\n   * @example '利用規約'\n   */\n  label: { type: String, default: '' },\n  /**\n   * ラベルカラー\n   * @example 'black' | 'gray'\n   */\n  labelColor: { type: String as PropType<LabelColorTypes>, default: '' },\n  /**\n   * サイズ\n   * @example 's' | 'S' | 'l' | 'L'\n   */\n  size: { type: String as PropType<SizeTypes>, default: 'L' },\n  /**\n   * エラーパターン1\n   * @example true | false\n   */\n  error1: { type: Boolean, default: false },\n  /**\n   * エラーパターン2\n   * @example true | false\n   */\n  error2: { type: Boolean, default: false },\n  /**\n   * エラーパターン3\n   * 表示はエラーパターン2と同じだが、チェックボックスがついていなくてもエラー表示にできるもの\n   * 無効化したければerror3に明示的にfalseを渡すか、そもそもpropsでerror3を設定しなければよい\n   * @example true | false\n   */\n  error3: { type: Boolean, default: false },\n})\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst model = computed({\n  get: () => props.modelValue,\n  set: value => {\n    emit('update:modelValue', value)\n  },\n})\n\n// チェックボックスをクリックした場合、以下の処理を実行する\nconst clickCheckBox = () => {\n  if (props.disabled) return\n\n  model.value = !model.value\n}\n</script>\n\n<template>\n  <div\n    class=\"_cc_checkbox\"\n    :class=\"{\n      _active: !props.disabled,\n      _passive: props.disabled,\n      _cc_checkbox_size_l: props.size === 'L' || props.size === 'l',\n    }\"\n    @click=\"clickCheckBox\"\n  >\n    <div v-if=\"props.size === 'L' || props.size === 'l'\" class=\"_hover_circle_container\">\n      <div v-show=\"!props.disabled\" class=\"_hover_circle\" />\n    </div>\n\n    <div\n      class=\"_checkbox\"\n      :class=\"{\n        _size_s: props.size === 'S' || props.size === 's',\n        _size_l: props.size === 'L' || props.size === 'l',\n        _checkbox_active: model,\n        _checkbox_passive: !model,\n        _checkbox_disabled: props.disabled,\n        _checkbox_error1: props.error1 && !model,\n        _checkbox_error2: (props.error2 && !model) || props.error3,\n      }\"\n    >\n      <div\n        class=\"_check_container_position\"\n        :class=\"{\n          _check_container_position_size_s_label:\n            props.label && (props.size === 'S' || props.size === 's'),\n        }\"\n      >\n        <div class=\"_check_container\">\n          <div\n            :class=\"{\n              _long_border_active: model,\n              _long_border_passive: !model,\n            }\"\n            class=\"_long_border\"\n          />\n          <div\n            :class=\"{\n              _short_border_active: model,\n              _short_border_passive: !model,\n            }\"\n            class=\"_short_border\"\n          />\n        </div>\n      </div>\n    </div>\n\n    <div\n      v-show=\"label\"\n      class=\"_label\"\n      :class=\"{\n        _label_size_l: props.size === 'L' || props.size === 'l',\n        _label_size_s: props.size === 'S' || props.size === 's',\n        _label_color_main: !labelColor,\n        _label_color_black: labelColor === 'black',\n        _label_color_gray: labelColor === 'gray',\n      }\"\n    >\n      {{ label }}\n    </div>\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n._cc_checkbox\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  position: relative\n  width: fit-content\n  display: flex\n  font-family: 'Roboto', sans-serif\n\n._cc_checkbox_size_l\n  min-height: 48px\n\n._cc_checkbox:hover ._hover_circle\n  height: 48px\n  width: 48px\n._active\n  cursor: pointer\n._passive\n  cursor: not-allowed\n\n._hover_circle_container\n  position: absolute\n  height: 48px\n  width: 48px\n  display: flex\n  justify-content: center\n  align-items: center\n\n._hover_circle\n  background: var(--c-primary)\n  height: 0px\n  width: 0px\n  opacity: 0.1\n  border-radius: 50%\n  transition: 0.3s\n\n._checkbox\n  border-radius: 5px\n\n._size_s\n  height: 15px\n  width: 15px\n\n._size_l\n  flex-shrink: 0\n  position: relative\n  top: 11px\n  left: 11px\n  height: 20px\n  width: 20px\n\n._checkbox_active\n  background: var(--c-primary)\n  border: solid 3px var(--c-primary)\n\n._checkbox_passive\n  background: #fff\n  border: solid 3px #9E9E9E\n  transition-property: background, border\n  transition-delay: 0.3s\n\n._checkbox_disabled\n  opacity: 0.7\n\n._checkbox_error1\n  border: solid 3px #D20000\n\n._checkbox_error2\n  border: solid 3px #D20000\n  background: rgb(210, 0 , 0, 0.2)\n\n._check_container_position\n  position: absolute\n  top: 40%\n  left: 50%\n  transform: translate(-50%, -50%)\n  -webkit-transform: translate(-50%, -50%)\n  -ms-transform: translate(-50%, -50%)\n\n._check_container_position_size_s_label\n  left: 17%\n\n._check_container\n  position: relative\n  width: 9px\n  height: 14px\n  transform: rotate( 45deg )\n\n._short_border\n  position: absolute\n  bottom: 0\n  border-bottom: solid 3px #fff\n  transition: 0.1s\n._short_border_active\n  width: 100%\n._short_border_passive\n  width: 0%\n  transition-property: width\n  transition-delay: 0.1s\n\n._long_border\n  position: absolute\n  bottom: 0\n  right: 0\n  border-right: solid 3px #fff\n  width: 0%\n  transition: 0.1s\n._long_border_active\n  height: 100%\n  transition-property: height\n  transition-delay: 0.1s\n._long_border_passive\n  height: 0%\n\n._label\n  text-align: justify\n  text-justify: inter-ideograph\n\n._label_size_l\n  padding: 11px 0 0 24px\n\n._label_size_s\n  padding-left: 12px\n  font-size: 14px\n\n._label_color_main\n  color: var(--c-primary)\n._label_color_black\n  color: #333\n._label_color_gray\n  color: #707070\n</style>\n","import { shallowRef, watchEffect, readonly, unref, ref, isVue3, version, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, isRef, computed, reactive, toRefs as toRefs$1, toRef, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$b.call(b, prop))\n      __defNormalProp$9(a, prop, b[prop]);\n  if (__getOwnPropSymbols$b)\n    for (var prop of __getOwnPropSymbols$b(b)) {\n      if (__propIsEnum$b.call(b, prop))\n        __defNormalProp$9(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction computedEager(fn, options) {\n  var _a;\n  const result = shallowRef();\n  watchEffect(() => {\n    result.value = fn();\n  }, __spreadProps$6(__spreadValues$9({}, options), {\n    flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n  }));\n  return readonly(result);\n}\n\nvar _a;\nconst isClient = typeof window !== \"undefined\";\nconst isDef = (val) => typeof val !== \"undefined\";\nconst assert = (condition, ...infos) => {\n  if (!condition)\n    console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isBoolean = (val) => typeof val === \"boolean\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isNumber = (val) => typeof val === \"number\";\nconst isString = (val) => typeof val === \"string\";\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst isWindow = (val) => typeof window !== \"undefined\" && toString.call(val) === \"[object Window]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n  min = Math.ceil(min);\n  max = Math.floor(max);\n  return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\n\nfunction resolveUnref(r) {\n  return typeof r === \"function\" ? r() : unref(r);\n}\n\nfunction createFilterWrapper(filter, fn) {\n  function wrapper(...args) {\n    return new Promise((resolve, reject) => {\n      Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n    });\n  }\n  return wrapper;\n}\nconst bypassFilter = (invoke) => {\n  return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n  let timer;\n  let maxTimer;\n  let lastRejector = noop;\n  const _clearTimeout = (timer2) => {\n    clearTimeout(timer2);\n    lastRejector();\n    lastRejector = noop;\n  };\n  const filter = (invoke) => {\n    const duration = resolveUnref(ms);\n    const maxDuration = resolveUnref(options.maxWait);\n    if (timer)\n      _clearTimeout(timer);\n    if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n      if (maxTimer) {\n        _clearTimeout(maxTimer);\n        maxTimer = null;\n      }\n      return Promise.resolve(invoke());\n    }\n    return new Promise((resolve, reject) => {\n      lastRejector = options.rejectOnCancel ? reject : resolve;\n      if (maxDuration && !maxTimer) {\n        maxTimer = setTimeout(() => {\n          if (timer)\n            _clearTimeout(timer);\n          maxTimer = null;\n          resolve(invoke());\n        }, maxDuration);\n      }\n      timer = setTimeout(() => {\n        if (maxTimer)\n          _clearTimeout(maxTimer);\n        maxTimer = null;\n        resolve(invoke());\n      }, duration);\n    });\n  };\n  return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n  let lastExec = 0;\n  let timer;\n  let isLeading = true;\n  let lastRejector = noop;\n  let lastValue;\n  const clear = () => {\n    if (timer) {\n      clearTimeout(timer);\n      timer = void 0;\n      lastRejector();\n      lastRejector = noop;\n    }\n  };\n  const filter = (_invoke) => {\n    const duration = resolveUnref(ms);\n    const elapsed = Date.now() - lastExec;\n    const invoke = () => {\n      return lastValue = _invoke();\n    };\n    clear();\n    if (duration <= 0) {\n      lastExec = Date.now();\n      return invoke();\n    }\n    if (elapsed > duration && (leading || !isLeading)) {\n      lastExec = Date.now();\n      invoke();\n    } else if (trailing) {\n      lastValue = new Promise((resolve, reject) => {\n        lastRejector = rejectOnCancel ? reject : resolve;\n        timer = setTimeout(() => {\n          lastExec = Date.now();\n          isLeading = true;\n          resolve(invoke());\n          clear();\n        }, Math.max(0, duration - elapsed));\n      });\n    }\n    if (!leading && !timer)\n      timer = setTimeout(() => isLeading = true, duration);\n    isLeading = false;\n    return lastValue;\n  };\n  return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n  const isActive = ref(true);\n  function pause() {\n    isActive.value = false;\n  }\n  function resume() {\n    isActive.value = true;\n  }\n  const eventFilter = (...args) => {\n    if (isActive.value)\n      extendFilter(...args);\n  };\n  return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nfunction __onlyVue3(name = \"this function\") {\n  if (isVue3)\n    return;\n  throw new Error(`[VueUse] ${name} is only works on Vue 3.`);\n}\nfunction __onlyVue27Plus(name = \"this function\") {\n  if (isVue3 || version.startsWith(\"2.7.\"))\n    return;\n  throw new Error(`[VueUse] ${name} is only works on Vue 2.7 or above.`);\n}\nconst directiveHooks = {\n  mounted: isVue3 ? \"mounted\" : \"inserted\",\n  updated: isVue3 ? \"updated\" : \"componentUpdated\",\n  unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n  return new Promise((resolve, reject) => {\n    if (throwOnTimeout)\n      setTimeout(() => reject(reason), ms);\n    else\n      setTimeout(resolve, ms);\n  });\n}\nfunction identity(arg) {\n  return arg;\n}\nfunction createSingletonPromise(fn) {\n  let _promise;\n  function wrapper() {\n    if (!_promise)\n      _promise = fn();\n    return _promise;\n  }\n  wrapper.reset = async () => {\n    const _prev = _promise;\n    _promise = void 0;\n    if (_prev)\n      await _prev;\n  };\n  return wrapper;\n}\nfunction invoke(fn) {\n  return fn();\n}\nfunction containsProp(obj, ...props) {\n  return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n  var _a;\n  if (typeof target === \"number\")\n    return target + delta;\n  const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n  const unit = target.slice(value.length);\n  const result = parseFloat(value) + delta;\n  if (Number.isNaN(result))\n    return target;\n  return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n  return keys.reduce((n, k) => {\n    if (k in obj) {\n      if (!omitUndefined || obj[k] !== void 0)\n        n[k] = obj[k];\n    }\n    return n;\n  }, {});\n}\n\nfunction computedWithControl(source, fn) {\n  let v = void 0;\n  let track;\n  let trigger;\n  const dirty = ref(true);\n  const update = () => {\n    dirty.value = true;\n    trigger();\n  };\n  watch(source, update, { flush: \"sync\" });\n  const get = isFunction(fn) ? fn : fn.get;\n  const set = isFunction(fn) ? void 0 : fn.set;\n  const result = customRef((_track, _trigger) => {\n    track = _track;\n    trigger = _trigger;\n    return {\n      get() {\n        if (dirty.value) {\n          v = get();\n          dirty.value = false;\n        }\n        track();\n        return v;\n      },\n      set(v2) {\n        set == null ? void 0 : set(v2);\n      }\n    };\n  });\n  if (Object.isExtensible(result))\n    result.trigger = update;\n  return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n  if (getCurrentScope()) {\n    onScopeDispose(fn);\n    return true;\n  }\n  return false;\n}\n\nfunction createEventHook() {\n  const fns = [];\n  const off = (fn) => {\n    const index = fns.indexOf(fn);\n    if (index !== -1)\n      fns.splice(index, 1);\n  };\n  const on = (fn) => {\n    fns.push(fn);\n    const offFn = () => off(fn);\n    tryOnScopeDispose(offFn);\n    return {\n      off: offFn\n    };\n  };\n  const trigger = (param) => {\n    fns.forEach((fn) => fn(param));\n  };\n  return {\n    on,\n    off,\n    trigger\n  };\n}\n\nfunction createGlobalState(stateFactory) {\n  let initialized = false;\n  let state;\n  const scope = effectScope(true);\n  return () => {\n    if (!initialized) {\n      state = scope.run(stateFactory);\n      initialized = true;\n    }\n    return state;\n  };\n}\n\nfunction createInjectionState(composable) {\n  const key = Symbol(\"InjectionState\");\n  const useProvidingState = (...args) => {\n    const state = composable(...args);\n    provide(key, state);\n    return state;\n  };\n  const useInjectedState = () => inject(key);\n  return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n  let subscribers = 0;\n  let state;\n  let scope;\n  const dispose = () => {\n    subscribers -= 1;\n    if (scope && subscribers <= 0) {\n      scope.stop();\n      state = void 0;\n      scope = void 0;\n    }\n  };\n  return (...args) => {\n    subscribers += 1;\n    if (!state) {\n      scope = effectScope(true);\n      state = scope.run(() => composable(...args));\n    }\n    tryOnScopeDispose(dispose);\n    return state;\n  };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n  __onlyVue27Plus();\n  for (const [key, value] of Object.entries(extend)) {\n    if (key === \"value\")\n      continue;\n    if (isRef(value) && unwrap) {\n      Object.defineProperty(ref, key, {\n        get() {\n          return value.value;\n        },\n        set(v) {\n          value.value = v;\n        },\n        enumerable\n      });\n    } else {\n      Object.defineProperty(ref, key, { value, enumerable });\n    }\n  }\n  return ref;\n}\n\nfunction get(obj, key) {\n  if (key == null)\n    return unref(obj);\n  return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n  return unref(v) != null;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$a.call(b, prop))\n      __defNormalProp$8(a, prop, b[prop]);\n  if (__getOwnPropSymbols$a)\n    for (var prop of __getOwnPropSymbols$a(b)) {\n      if (__propIsEnum$a.call(b, prop))\n        __defNormalProp$8(a, prop, b[prop]);\n    }\n  return a;\n};\nfunction makeDestructurable(obj, arr) {\n  if (typeof Symbol !== \"undefined\") {\n    const clone = __spreadValues$8({}, obj);\n    Object.defineProperty(clone, Symbol.iterator, {\n      enumerable: false,\n      value() {\n        let index = 0;\n        return {\n          next: () => ({\n            value: arr[index++],\n            done: index > arr.length\n          })\n        };\n      }\n    });\n    return clone;\n  } else {\n    return Object.assign([...arr], obj);\n  }\n}\n\nfunction reactify(fn, options) {\n  const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : resolveUnref;\n  return function(...args) {\n    return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n  };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n  let keys = [];\n  let options;\n  if (Array.isArray(optionsOrKeys)) {\n    keys = optionsOrKeys;\n  } else {\n    options = optionsOrKeys;\n    const { includeOwnProperties = true } = optionsOrKeys;\n    keys.push(...Object.keys(obj));\n    if (includeOwnProperties)\n      keys.push(...Object.getOwnPropertyNames(obj));\n  }\n  return Object.fromEntries(keys.map((key) => {\n    const value = obj[key];\n    return [\n      key,\n      typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n    ];\n  }));\n}\n\nfunction toReactive(objectRef) {\n  if (!isRef(objectRef))\n    return reactive(objectRef);\n  const proxy = new Proxy({}, {\n    get(_, p, receiver) {\n      return unref(Reflect.get(objectRef.value, p, receiver));\n    },\n    set(_, p, value) {\n      if (isRef(objectRef.value[p]) && !isRef(value))\n        objectRef.value[p].value = value;\n      else\n        objectRef.value[p] = value;\n      return true;\n    },\n    deleteProperty(_, p) {\n      return Reflect.deleteProperty(objectRef.value, p);\n    },\n    has(_, p) {\n      return Reflect.has(objectRef.value, p);\n    },\n    ownKeys() {\n      return Object.keys(objectRef.value);\n    },\n    getOwnPropertyDescriptor() {\n      return {\n        enumerable: true,\n        configurable: true\n      };\n    }\n  });\n  return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n  return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n  const flatKeys = keys.flat();\n  return reactiveComputed(() => Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nfunction reactivePick(obj, ...keys) {\n  const flatKeys = keys.flat();\n  return reactive(Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n  return customRef((track, trigger) => {\n    let value = defaultValue;\n    let timer;\n    const resetAfter = () => setTimeout(() => {\n      value = defaultValue;\n      trigger();\n    }, resolveUnref(afterMs));\n    tryOnScopeDispose(() => {\n      clearTimeout(timer);\n    });\n    return {\n      get() {\n        track();\n        return value;\n      },\n      set(newValue) {\n        value = newValue;\n        trigger();\n        clearTimeout(timer);\n        timer = resetAfter();\n      }\n    };\n  });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n  return createFilterWrapper(debounceFilter(ms, options), fn);\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n  const debounced = ref(value.value);\n  const updater = useDebounceFn(() => {\n    debounced.value = value.value;\n  }, ms, options);\n  watch(value, () => updater());\n  return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n  return computed({\n    get() {\n      var _a;\n      return (_a = source.value) != null ? _a : defaultValue;\n    },\n    set(value) {\n      source.value = value;\n    }\n  });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n  return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n  if (delay <= 0)\n    return value;\n  const throttled = ref(value.value);\n  const updater = useThrottleFn(() => {\n    throttled.value = value.value;\n  }, delay, trailing, leading);\n  watch(value, () => updater());\n  return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n  let source = initial;\n  let track;\n  let trigger;\n  const ref = customRef((_track, _trigger) => {\n    track = _track;\n    trigger = _trigger;\n    return {\n      get() {\n        return get();\n      },\n      set(v) {\n        set(v);\n      }\n    };\n  });\n  function get(tracking = true) {\n    if (tracking)\n      track();\n    return source;\n  }\n  function set(value, triggering = true) {\n    var _a, _b;\n    if (value === source)\n      return;\n    const old = source;\n    if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n      return;\n    source = value;\n    (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n    if (triggering)\n      trigger();\n  }\n  const untrackedGet = () => get(false);\n  const silentSet = (v) => set(v, false);\n  const peek = () => get(false);\n  const lay = (v) => set(v, false);\n  return extendRef(ref, {\n    get,\n    set,\n    untrackedGet,\n    silentSet,\n    peek,\n    lay\n  }, { enumerable: true });\n}\nconst controlledRef = refWithControl;\n\nfunction resolveRef(r) {\n  return typeof r === \"function\" ? computed(r) : ref(r);\n}\n\nfunction set(...args) {\n  if (args.length === 2) {\n    const [ref, value] = args;\n    ref.value = value;\n  }\n  if (args.length === 3) {\n    if (isVue2) {\n      set$1(...args);\n    } else {\n      const [target, key, value] = args;\n      target[key] = value;\n    }\n  }\n}\n\nfunction syncRef(left, right, options = {}) {\n  var _a, _b;\n  const {\n    flush = \"sync\",\n    deep = false,\n    immediate = true,\n    direction = \"both\",\n    transform = {}\n  } = options;\n  let watchLeft;\n  let watchRight;\n  const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;\n  const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;\n  if (direction === \"both\" || direction === \"ltr\") {\n    watchLeft = watch(left, (newValue) => right.value = transformLTR(newValue), { flush, deep, immediate });\n  }\n  if (direction === \"both\" || direction === \"rtl\") {\n    watchRight = watch(right, (newValue) => left.value = transformRTL(newValue), { flush, deep, immediate });\n  }\n  return () => {\n    watchLeft == null ? void 0 : watchLeft();\n    watchRight == null ? void 0 : watchRight();\n  };\n}\n\nfunction syncRefs(source, targets, options = {}) {\n  const {\n    flush = \"sync\",\n    deep = false,\n    immediate = true\n  } = options;\n  if (!Array.isArray(targets))\n    targets = [targets];\n  return watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$9.call(b, prop))\n      __defNormalProp$7(a, prop, b[prop]);\n  if (__getOwnPropSymbols$9)\n    for (var prop of __getOwnPropSymbols$9(b)) {\n      if (__propIsEnum$9.call(b, prop))\n        __defNormalProp$7(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction toRefs(objectRef) {\n  if (!isRef(objectRef))\n    return toRefs$1(objectRef);\n  const result = Array.isArray(objectRef.value) ? new Array(objectRef.value.length) : {};\n  for (const key in objectRef.value) {\n    result[key] = customRef(() => ({\n      get() {\n        return objectRef.value[key];\n      },\n      set(v) {\n        if (Array.isArray(objectRef.value)) {\n          const copy = [...objectRef.value];\n          copy[key] = v;\n          objectRef.value = copy;\n        } else {\n          const newObject = __spreadProps$5(__spreadValues$7({}, objectRef.value), { [key]: v });\n          Object.setPrototypeOf(newObject, objectRef.value);\n          objectRef.value = newObject;\n        }\n      }\n    }));\n  }\n  return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n  if (getCurrentInstance())\n    onBeforeMount(fn);\n  else if (sync)\n    fn();\n  else\n    nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n  if (getCurrentInstance())\n    onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n  if (getCurrentInstance())\n    onMounted(fn);\n  else if (sync)\n    fn();\n  else\n    nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n  if (getCurrentInstance())\n    onUnmounted(fn);\n}\n\nfunction createUntil(r, isNot = false) {\n  function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n    let stop = null;\n    const watcher = new Promise((resolve) => {\n      stop = watch(r, (v) => {\n        if (condition(v) !== isNot) {\n          stop == null ? void 0 : stop();\n          resolve(v);\n        }\n      }, {\n        flush,\n        deep,\n        immediate: true\n      });\n    });\n    const promises = [watcher];\n    if (timeout != null) {\n      promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => stop == null ? void 0 : stop()));\n    }\n    return Promise.race(promises);\n  }\n  function toBe(value, options) {\n    if (!isRef(value))\n      return toMatch((v) => v === value, options);\n    const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n    let stop = null;\n    const watcher = new Promise((resolve) => {\n      stop = watch([r, value], ([v1, v2]) => {\n        if (isNot !== (v1 === v2)) {\n          stop == null ? void 0 : stop();\n          resolve(v1);\n        }\n      }, {\n        flush,\n        deep,\n        immediate: true\n      });\n    });\n    const promises = [watcher];\n    if (timeout != null) {\n      promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => {\n        stop == null ? void 0 : stop();\n        return resolveUnref(r);\n      }));\n    }\n    return Promise.race(promises);\n  }\n  function toBeTruthy(options) {\n    return toMatch((v) => Boolean(v), options);\n  }\n  function toBeNull(options) {\n    return toBe(null, options);\n  }\n  function toBeUndefined(options) {\n    return toBe(void 0, options);\n  }\n  function toBeNaN(options) {\n    return toMatch(Number.isNaN, options);\n  }\n  function toContains(value, options) {\n    return toMatch((v) => {\n      const array = Array.from(v);\n      return array.includes(value) || array.includes(resolveUnref(value));\n    }, options);\n  }\n  function changed(options) {\n    return changedTimes(1, options);\n  }\n  function changedTimes(n = 1, options) {\n    let count = -1;\n    return toMatch(() => {\n      count += 1;\n      return count >= n;\n    }, options);\n  }\n  if (Array.isArray(resolveUnref(r))) {\n    const instance = {\n      toMatch,\n      toContains,\n      changed,\n      changedTimes,\n      get not() {\n        return createUntil(r, !isNot);\n      }\n    };\n    return instance;\n  } else {\n    const instance = {\n      toMatch,\n      toBe,\n      toBeTruthy,\n      toBeNull,\n      toBeNaN,\n      toBeUndefined,\n      changed,\n      changedTimes,\n      get not() {\n        return createUntil(r, !isNot);\n      }\n    };\n    return instance;\n  }\n}\nfunction until(r) {\n  return createUntil(r);\n}\n\nfunction useArrayEvery(list, fn) {\n  return computed(() => resolveUnref(list).every((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n  return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n  return computed(() => resolveUnref(resolveUnref(list).find((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayFindIndex(list, fn) {\n  return computed(() => resolveUnref(list).findIndex((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n  let index = arr.length;\n  while (index-- > 0) {\n    if (cb(arr[index], index, arr))\n      return arr[index];\n  }\n  return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n  return computed(() => resolveUnref(!Array.prototype.findLast ? findLast(resolveUnref(list), (element, index, array) => fn(resolveUnref(element), index, array)) : resolveUnref(list).findLast((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayJoin(list, separator) {\n  return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).join(resolveUnref(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n  return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n  const reduceCallback = (sum, value, index) => reducer(resolveUnref(sum), resolveUnref(value), index);\n  return computed(() => {\n    const resolved = resolveUnref(list);\n    return args.length ? resolved.reduce(reduceCallback, resolveUnref(args[0])) : resolved.reduce(reduceCallback);\n  });\n}\n\nfunction useArraySome(list, fn) {\n  return computed(() => resolveUnref(list).some((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayUnique(list) {\n  return computed(() => [...new Set(resolveUnref(list).map((element) => resolveUnref(element)))]);\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n  const count = ref(initialValue);\n  const {\n    max = Infinity,\n    min = -Infinity\n  } = options;\n  const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n  const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n  const get = () => count.value;\n  const set = (val) => count.value = Math.max(min, Math.min(max, val));\n  const reset = (val = initialValue) => {\n    initialValue = val;\n    return set(val);\n  };\n  return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nconst defaultMeridiem = (hours, minutes, isLowercase, hasPeriod) => {\n  let m = hours < 12 ? \"AM\" : \"PM\";\n  if (hasPeriod)\n    m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n  return isLowercase ? m.toLowerCase() : m;\n};\nconst formatDate = (date, formatStr, options = {}) => {\n  var _a;\n  const years = date.getFullYear();\n  const month = date.getMonth();\n  const days = date.getDate();\n  const hours = date.getHours();\n  const minutes = date.getMinutes();\n  const seconds = date.getSeconds();\n  const milliseconds = date.getMilliseconds();\n  const day = date.getDay();\n  const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n  const matches = {\n    YY: () => String(years).slice(-2),\n    YYYY: () => years,\n    M: () => month + 1,\n    MM: () => `${month + 1}`.padStart(2, \"0\"),\n    MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n    MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n    D: () => String(days),\n    DD: () => `${days}`.padStart(2, \"0\"),\n    H: () => String(hours),\n    HH: () => `${hours}`.padStart(2, \"0\"),\n    h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n    hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n    m: () => String(minutes),\n    mm: () => `${minutes}`.padStart(2, \"0\"),\n    s: () => String(seconds),\n    ss: () => `${seconds}`.padStart(2, \"0\"),\n    SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n    d: () => day,\n    dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n    ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n    dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n    A: () => meridiem(hours, minutes),\n    AA: () => meridiem(hours, minutes, false, true),\n    a: () => meridiem(hours, minutes, true),\n    aa: () => meridiem(hours, minutes, true, true)\n  };\n  return formatStr.replace(REGEX_FORMAT, (match, $1) => $1 || matches[match]());\n};\nconst normalizeDate = (date) => {\n  if (date === null)\n    return new Date(NaN);\n  if (date === void 0)\n    return new Date();\n  if (date instanceof Date)\n    return new Date(date);\n  if (typeof date === \"string\" && !/Z$/i.test(date)) {\n    const d = date.match(REGEX_PARSE);\n    if (d) {\n      const m = d[2] - 1 || 0;\n      const ms = (d[7] || \"0\").substring(0, 3);\n      return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n    }\n  }\n  return new Date(date);\n};\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n  return computed(() => formatDate(normalizeDate(resolveUnref(date)), resolveUnref(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n  const {\n    immediate = true,\n    immediateCallback = false\n  } = options;\n  let timer = null;\n  const isActive = ref(false);\n  function clean() {\n    if (timer) {\n      clearInterval(timer);\n      timer = null;\n    }\n  }\n  function pause() {\n    isActive.value = false;\n    clean();\n  }\n  function resume() {\n    const intervalValue = resolveUnref(interval);\n    if (intervalValue <= 0)\n      return;\n    isActive.value = true;\n    if (immediateCallback)\n      cb();\n    clean();\n    timer = setInterval(cb, intervalValue);\n  }\n  if (immediate && isClient)\n    resume();\n  if (isRef(interval) || isFunction(interval)) {\n    const stopWatch = watch(interval, () => {\n      if (isActive.value && isClient)\n        resume();\n    });\n    tryOnScopeDispose(stopWatch);\n  }\n  tryOnScopeDispose(pause);\n  return {\n    isActive,\n    pause,\n    resume\n  };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$8.call(b, prop))\n      __defNormalProp$6(a, prop, b[prop]);\n  if (__getOwnPropSymbols$8)\n    for (var prop of __getOwnPropSymbols$8(b)) {\n      if (__propIsEnum$8.call(b, prop))\n        __defNormalProp$6(a, prop, b[prop]);\n    }\n  return a;\n};\nfunction useInterval(interval = 1e3, options = {}) {\n  const {\n    controls: exposeControls = false,\n    immediate = true,\n    callback\n  } = options;\n  const counter = ref(0);\n  const update = () => counter.value += 1;\n  const reset = () => {\n    counter.value = 0;\n  };\n  const controls = useIntervalFn(callback ? () => {\n    update();\n    callback(counter.value);\n  } : update, interval, { immediate });\n  if (exposeControls) {\n    return __spreadValues$6({\n      counter,\n      reset\n    }, controls);\n  } else {\n    return counter;\n  }\n}\n\nfunction useLastChanged(source, options = {}) {\n  var _a;\n  const ms = ref((_a = options.initialValue) != null ? _a : null);\n  watch(source, () => ms.value = timestamp(), options);\n  return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n  const {\n    immediate = true\n  } = options;\n  const isPending = ref(false);\n  let timer = null;\n  function clear() {\n    if (timer) {\n      clearTimeout(timer);\n      timer = null;\n    }\n  }\n  function stop() {\n    isPending.value = false;\n    clear();\n  }\n  function start(...args) {\n    clear();\n    isPending.value = true;\n    timer = setTimeout(() => {\n      isPending.value = false;\n      timer = null;\n      cb(...args);\n    }, resolveUnref(interval));\n  }\n  if (immediate) {\n    isPending.value = true;\n    if (isClient)\n      start();\n  }\n  tryOnScopeDispose(stop);\n  return {\n    isPending: readonly(isPending),\n    start,\n    stop\n  };\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$7.call(b, prop))\n      __defNormalProp$5(a, prop, b[prop]);\n  if (__getOwnPropSymbols$7)\n    for (var prop of __getOwnPropSymbols$7(b)) {\n      if (__propIsEnum$7.call(b, prop))\n        __defNormalProp$5(a, prop, b[prop]);\n    }\n  return a;\n};\nfunction useTimeout(interval = 1e3, options = {}) {\n  const {\n    controls: exposeControls = false,\n    callback\n  } = options;\n  const controls = useTimeoutFn(callback != null ? callback : noop, interval, options);\n  const ready = computed(() => !controls.isPending.value);\n  if (exposeControls) {\n    return __spreadValues$5({\n      ready\n    }, controls);\n  } else {\n    return ready;\n  }\n}\n\nfunction useToNumber(value, options = {}) {\n  const {\n    method = \"parseFloat\",\n    radix,\n    nanToZero\n  } = options;\n  return computed(() => {\n    let resolved = resolveUnref(value);\n    if (typeof resolved === \"string\")\n      resolved = Number[method](resolved, radix);\n    if (nanToZero && isNaN(resolved))\n      resolved = 0;\n    return resolved;\n  });\n}\n\nfunction useToString(value) {\n  return computed(() => `${resolveUnref(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n  const {\n    truthyValue = true,\n    falsyValue = false\n  } = options;\n  const valueIsRef = isRef(initialValue);\n  const _value = ref(initialValue);\n  function toggle(value) {\n    if (arguments.length) {\n      _value.value = value;\n      return _value.value;\n    } else {\n      const truthy = resolveUnref(truthyValue);\n      _value.value = _value.value === truthy ? resolveUnref(falsyValue) : truthy;\n      return _value.value;\n    }\n  }\n  if (valueIsRef)\n    return toggle;\n  else\n    return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n  let oldList = (options == null ? void 0 : options.immediate) ? [] : [\n    ...source instanceof Function ? source() : Array.isArray(source) ? source : unref(source)\n  ];\n  return watch(source, (newList, _, onCleanup) => {\n    const oldListRemains = new Array(oldList.length);\n    const added = [];\n    for (const obj of newList) {\n      let found = false;\n      for (let i = 0; i < oldList.length; i++) {\n        if (!oldListRemains[i] && obj === oldList[i]) {\n          oldListRemains[i] = true;\n          found = true;\n          break;\n        }\n      }\n      if (!found)\n        added.push(obj);\n    }\n    const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n    cb(newList, oldList, added, removed, onCleanup);\n    oldList = [...newList];\n  }, options);\n}\n\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __objRest$5 = (source, exclude) => {\n  var target = {};\n  for (var prop in source)\n    if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)\n      target[prop] = source[prop];\n  if (source != null && __getOwnPropSymbols$6)\n    for (var prop of __getOwnPropSymbols$6(source)) {\n      if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))\n        target[prop] = source[prop];\n    }\n  return target;\n};\nfunction watchWithFilter(source, cb, options = {}) {\n  const _a = options, {\n    eventFilter = bypassFilter\n  } = _a, watchOptions = __objRest$5(_a, [\n    \"eventFilter\"\n  ]);\n  return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);\n}\n\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __objRest$4 = (source, exclude) => {\n  var target = {};\n  for (var prop in source)\n    if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)\n      target[prop] = source[prop];\n  if (source != null && __getOwnPropSymbols$5)\n    for (var prop of __getOwnPropSymbols$5(source)) {\n      if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))\n        target[prop] = source[prop];\n    }\n  return target;\n};\nfunction watchAtMost(source, cb, options) {\n  const _a = options, {\n    count\n  } = _a, watchOptions = __objRest$4(_a, [\n    \"count\"\n  ]);\n  const current = ref(0);\n  const stop = watchWithFilter(source, (...args) => {\n    current.value += 1;\n    if (current.value >= resolveUnref(count))\n      nextTick(() => stop());\n    cb(...args);\n  }, watchOptions);\n  return { count: current, stop };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$4.call(b, prop))\n      __defNormalProp$4(a, prop, b[prop]);\n  if (__getOwnPropSymbols$4)\n    for (var prop of __getOwnPropSymbols$4(b)) {\n      if (__propIsEnum$4.call(b, prop))\n        __defNormalProp$4(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nvar __objRest$3 = (source, exclude) => {\n  var target = {};\n  for (var prop in source)\n    if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)\n      target[prop] = source[prop];\n  if (source != null && __getOwnPropSymbols$4)\n    for (var prop of __getOwnPropSymbols$4(source)) {\n      if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))\n        target[prop] = source[prop];\n    }\n  return target;\n};\nfunction watchDebounced(source, cb, options = {}) {\n  const _a = options, {\n    debounce = 0,\n    maxWait = void 0\n  } = _a, watchOptions = __objRest$3(_a, [\n    \"debounce\",\n    \"maxWait\"\n  ]);\n  return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$4({}, watchOptions), {\n    eventFilter: debounceFilter(debounce, { maxWait })\n  }));\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$3.call(b, prop))\n      __defNormalProp$3(a, prop, b[prop]);\n  if (__getOwnPropSymbols$3)\n    for (var prop of __getOwnPropSymbols$3(b)) {\n      if (__propIsEnum$3.call(b, prop))\n        __defNormalProp$3(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nvar __objRest$2 = (source, exclude) => {\n  var target = {};\n  for (var prop in source)\n    if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)\n      target[prop] = source[prop];\n  if (source != null && __getOwnPropSymbols$3)\n    for (var prop of __getOwnPropSymbols$3(source)) {\n      if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))\n        target[prop] = source[prop];\n    }\n  return target;\n};\nfunction watchIgnorable(source, cb, options = {}) {\n  const _a = options, {\n    eventFilter = bypassFilter\n  } = _a, watchOptions = __objRest$2(_a, [\n    \"eventFilter\"\n  ]);\n  const filteredCb = createFilterWrapper(eventFilter, cb);\n  let ignoreUpdates;\n  let ignorePrevAsyncUpdates;\n  let stop;\n  if (watchOptions.flush === \"sync\") {\n    const ignore = ref(false);\n    ignorePrevAsyncUpdates = () => {\n    };\n    ignoreUpdates = (updater) => {\n      ignore.value = true;\n      updater();\n      ignore.value = false;\n    };\n    stop = watch(source, (...args) => {\n      if (!ignore.value)\n        filteredCb(...args);\n    }, watchOptions);\n  } else {\n    const disposables = [];\n    const ignoreCounter = ref(0);\n    const syncCounter = ref(0);\n    ignorePrevAsyncUpdates = () => {\n      ignoreCounter.value = syncCounter.value;\n    };\n    disposables.push(watch(source, () => {\n      syncCounter.value++;\n    }, __spreadProps$3(__spreadValues$3({}, watchOptions), { flush: \"sync\" })));\n    ignoreUpdates = (updater) => {\n      const syncCounterPrev = syncCounter.value;\n      updater();\n      ignoreCounter.value += syncCounter.value - syncCounterPrev;\n    };\n    disposables.push(watch(source, (...args) => {\n      const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n      ignoreCounter.value = 0;\n      syncCounter.value = 0;\n      if (ignore)\n        return;\n      filteredCb(...args);\n    }, watchOptions));\n    stop = () => {\n      disposables.forEach((fn) => fn());\n    };\n  }\n  return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchOnce(source, cb, options) {\n  const stop = watch(source, (...args) => {\n    nextTick(() => stop());\n    return cb(...args);\n  }, options);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$2.call(b, prop))\n      __defNormalProp$2(a, prop, b[prop]);\n  if (__getOwnPropSymbols$2)\n    for (var prop of __getOwnPropSymbols$2(b)) {\n      if (__propIsEnum$2.call(b, prop))\n        __defNormalProp$2(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nvar __objRest$1 = (source, exclude) => {\n  var target = {};\n  for (var prop in source)\n    if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n      target[prop] = source[prop];\n  if (source != null && __getOwnPropSymbols$2)\n    for (var prop of __getOwnPropSymbols$2(source)) {\n      if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n        target[prop] = source[prop];\n    }\n  return target;\n};\nfunction watchPausable(source, cb, options = {}) {\n  const _a = options, {\n    eventFilter: filter\n  } = _a, watchOptions = __objRest$1(_a, [\n    \"eventFilter\"\n  ]);\n  const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n  const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {\n    eventFilter\n  }));\n  return { stop, pause, resume, isActive };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$1.call(b, prop))\n      __defNormalProp$1(a, prop, b[prop]);\n  if (__getOwnPropSymbols$1)\n    for (var prop of __getOwnPropSymbols$1(b)) {\n      if (__propIsEnum$1.call(b, prop))\n        __defNormalProp$1(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nvar __objRest = (source, exclude) => {\n  var target = {};\n  for (var prop in source)\n    if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)\n      target[prop] = source[prop];\n  if (source != null && __getOwnPropSymbols$1)\n    for (var prop of __getOwnPropSymbols$1(source)) {\n      if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))\n        target[prop] = source[prop];\n    }\n  return target;\n};\nfunction watchThrottled(source, cb, options = {}) {\n  const _a = options, {\n    throttle = 0,\n    trailing = true,\n    leading = true\n  } = _a, watchOptions = __objRest(_a, [\n    \"throttle\",\n    \"trailing\",\n    \"leading\"\n  ]);\n  return watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {\n    eventFilter: throttleFilter(throttle, trailing, leading)\n  }));\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp.call(b, prop))\n      __defNormalProp(a, prop, b[prop]);\n  if (__getOwnPropSymbols)\n    for (var prop of __getOwnPropSymbols(b)) {\n      if (__propIsEnum.call(b, prop))\n        __defNormalProp(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction watchTriggerable(source, cb, options = {}) {\n  let cleanupFn;\n  function onEffect() {\n    if (!cleanupFn)\n      return;\n    const fn = cleanupFn;\n    cleanupFn = void 0;\n    fn();\n  }\n  function onCleanup(callback) {\n    cleanupFn = callback;\n  }\n  const _cb = (value, oldValue) => {\n    onEffect();\n    return cb(value, oldValue, onCleanup);\n  };\n  const res = watchIgnorable(source, _cb, options);\n  const { ignoreUpdates } = res;\n  const trigger = () => {\n    let res2;\n    ignoreUpdates(() => {\n      res2 = _cb(getWatchSources(source), getOldValue(source));\n    });\n    return res2;\n  };\n  return __spreadProps(__spreadValues({}, res), {\n    trigger\n  });\n}\nfunction getWatchSources(sources) {\n  if (isReactive(sources))\n    return sources;\n  if (Array.isArray(sources))\n    return sources.map((item) => getOneWatchSource(item));\n  return getOneWatchSource(sources);\n}\nfunction getOneWatchSource(source) {\n  return typeof source === \"function\" ? source() : unref(source);\n}\nfunction getOldValue(source) {\n  return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n  return watch(source, (v, ov, onInvalidate) => {\n    if (v)\n      cb(v, ov, onInvalidate);\n  }, options);\n}\n\nexport { __onlyVue27Plus, __onlyVue3, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, resolveUnref, isClient, isString, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, promiseTimeout, isFunction, resolveRef, increaseWithUnit, useTimeoutFn, pausableWatch, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, createSingletonPromise, toRefs, containsProp, until, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, isObject, isNumber, useIntervalFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, unref, watch, getCurrentInstance, customRef, onUpdated, reactive, nextTick, onMounted, markRaw, readonly, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n  let options;\n  if (isRef(optionsOrRef)) {\n    options = {\n      evaluating: optionsOrRef\n    };\n  } else {\n    options = optionsOrRef || {};\n  }\n  const {\n    lazy = false,\n    evaluating = void 0,\n    shallow = false,\n    onError = noop\n  } = options;\n  const started = ref(!lazy);\n  const current = shallow ? shallowRef(initialState) : ref(initialState);\n  let counter = 0;\n  watchEffect(async (onInvalidate) => {\n    if (!started.value)\n      return;\n    counter++;\n    const counterAtBeginning = counter;\n    let hasFinished = false;\n    if (evaluating) {\n      Promise.resolve().then(() => {\n        evaluating.value = true;\n      });\n    }\n    try {\n      const result = await evaluationCallback((cancelCallback) => {\n        onInvalidate(() => {\n          if (evaluating)\n            evaluating.value = false;\n          if (!hasFinished)\n            cancelCallback();\n        });\n      });\n      if (counterAtBeginning === counter)\n        current.value = result;\n    } catch (e) {\n      onError(e);\n    } finally {\n      if (evaluating && counterAtBeginning === counter)\n        evaluating.value = false;\n      hasFinished = true;\n    }\n  });\n  if (lazy) {\n    return computed(() => {\n      started.value = true;\n      return current.value;\n    });\n  } else {\n    return current;\n  }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n  let source = inject(key);\n  if (defaultSource)\n    source = inject(key, defaultSource);\n  if (treatDefaultAsFactory)\n    source = inject(key, defaultSource, treatDefaultAsFactory);\n  if (typeof options === \"function\") {\n    return computed((ctx) => options(source, ctx));\n  } else {\n    return computed({\n      get: (ctx) => options.get(source, ctx),\n      set: options.set\n    });\n  }\n}\n\nconst createUnrefFn = (fn) => {\n  return function(...args) {\n    return fn.apply(this, args.map((i) => unref(i)));\n  };\n};\n\nfunction unrefElement(elRef) {\n  var _a;\n  const plain = resolveUnref(elRef);\n  return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n  let target;\n  let events;\n  let listeners;\n  let options;\n  if (isString(args[0]) || Array.isArray(args[0])) {\n    [events, listeners, options] = args;\n    target = defaultWindow;\n  } else {\n    [target, events, listeners, options] = args;\n  }\n  if (!target)\n    return noop;\n  if (!Array.isArray(events))\n    events = [events];\n  if (!Array.isArray(listeners))\n    listeners = [listeners];\n  const cleanups = [];\n  const cleanup = () => {\n    cleanups.forEach((fn) => fn());\n    cleanups.length = 0;\n  };\n  const register = (el, event, listener, options2) => {\n    el.addEventListener(event, listener, options2);\n    return () => el.removeEventListener(event, listener, options2);\n  };\n  const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {\n    cleanup();\n    if (!el)\n      return;\n    cleanups.push(...events.flatMap((event) => {\n      return listeners.map((listener) => register(el, event, listener, options2));\n    }));\n  }, { immediate: true, flush: \"post\" });\n  const stop = () => {\n    stopWatch();\n    cleanup();\n  };\n  tryOnScopeDispose(stop);\n  return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n  const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n  if (!window)\n    return;\n  if (isIOS && !_iOSWorkaround) {\n    _iOSWorkaround = true;\n    Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n  }\n  let shouldListen = true;\n  const shouldIgnore = (event) => {\n    return ignore.some((target2) => {\n      if (typeof target2 === \"string\") {\n        return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n      } else {\n        const el = unrefElement(target2);\n        return el && (event.target === el || event.composedPath().includes(el));\n      }\n    });\n  };\n  const listener = (event) => {\n    const el = unrefElement(target);\n    if (!el || el === event.target || event.composedPath().includes(el))\n      return;\n    if (event.detail === 0)\n      shouldListen = !shouldIgnore(event);\n    if (!shouldListen) {\n      shouldListen = true;\n      return;\n    }\n    handler(event);\n  };\n  const cleanup = [\n    useEventListener(window, \"click\", listener, { passive: true, capture }),\n    useEventListener(window, \"pointerdown\", (e) => {\n      const el = unrefElement(target);\n      if (el)\n        shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);\n    }, { passive: true }),\n    detectIframe && useEventListener(window, \"blur\", (event) => {\n      var _a;\n      const el = unrefElement(target);\n      if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n        handler(event);\n    })\n  ].filter(Boolean);\n  const stop = () => cleanup.forEach((fn) => fn());\n  return stop;\n}\n\nvar __defProp$n = Object.defineProperty;\nvar __defProps$9 = Object.defineProperties;\nvar __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$p = Object.getOwnPropertySymbols;\nvar __hasOwnProp$p = Object.prototype.hasOwnProperty;\nvar __propIsEnum$p = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$n = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$p.call(b, prop))\n      __defNormalProp$n(a, prop, b[prop]);\n  if (__getOwnPropSymbols$p)\n    for (var prop of __getOwnPropSymbols$p(b)) {\n      if (__propIsEnum$p.call(b, prop))\n        __defNormalProp$n(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));\nconst createKeyPredicate = (keyFilter) => {\n  if (typeof keyFilter === \"function\")\n    return keyFilter;\n  else if (typeof keyFilter === \"string\")\n    return (event) => event.key === keyFilter;\n  else if (Array.isArray(keyFilter))\n    return (event) => keyFilter.includes(event.key);\n  return () => true;\n};\nfunction onKeyStroke(...args) {\n  let key;\n  let handler;\n  let options = {};\n  if (args.length === 3) {\n    key = args[0];\n    handler = args[1];\n    options = args[2];\n  } else if (args.length === 2) {\n    if (typeof args[1] === \"object\") {\n      key = true;\n      handler = args[0];\n      options = args[1];\n    } else {\n      key = args[0];\n      handler = args[1];\n    }\n  } else {\n    key = true;\n    handler = args[0];\n  }\n  const { target = defaultWindow, eventName = \"keydown\", passive = false } = options;\n  const predicate = createKeyPredicate(key);\n  const listener = (e) => {\n    if (predicate(e))\n      handler(e);\n  };\n  return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n  return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keydown\" }));\n}\nfunction onKeyPressed(key, handler, options = {}) {\n  return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keypress\" }));\n}\nfunction onKeyUp(key, handler, options = {}) {\n  return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keyup\" }));\n}\n\nconst DEFAULT_DELAY = 500;\nfunction onLongPress(target, handler, options) {\n  var _a, _b;\n  const elementRef = computed(() => unrefElement(target));\n  let timeout;\n  function clear() {\n    if (timeout) {\n      clearTimeout(timeout);\n      timeout = void 0;\n    }\n  }\n  function onDown(ev) {\n    var _a2, _b2, _c, _d;\n    if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n      return;\n    clear();\n    if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n      ev.preventDefault();\n    if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n      ev.stopPropagation();\n    timeout = setTimeout(() => handler(ev), (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY);\n  }\n  const listenerOptions = {\n    capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n    once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n  };\n  useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions);\n  useEventListener(elementRef, \"pointerup\", clear, listenerOptions);\n  useEventListener(elementRef, \"pointerleave\", clear, listenerOptions);\n}\n\nconst isFocusedElementEditable = () => {\n  const { activeElement, body } = document;\n  if (!activeElement)\n    return false;\n  if (activeElement === body)\n    return false;\n  switch (activeElement.tagName) {\n    case \"INPUT\":\n    case \"TEXTAREA\":\n      return true;\n  }\n  return activeElement.hasAttribute(\"contenteditable\");\n};\nconst isTypedCharValid = ({\n  keyCode,\n  metaKey,\n  ctrlKey,\n  altKey\n}) => {\n  if (metaKey || ctrlKey || altKey)\n    return false;\n  if (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105)\n    return true;\n  if (keyCode >= 65 && keyCode <= 90)\n    return true;\n  return false;\n};\nfunction onStartTyping(callback, options = {}) {\n  const { document: document2 = defaultDocument } = options;\n  const keydown = (event) => {\n    !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n  };\n  if (document2)\n    useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n  const instance = getCurrentInstance();\n  let _trigger = () => {\n  };\n  const element = customRef((track, trigger) => {\n    _trigger = trigger;\n    return {\n      get() {\n        var _a, _b;\n        track();\n        return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n      },\n      set() {\n      }\n    };\n  });\n  tryOnMounted(_trigger);\n  onUpdated(_trigger);\n  return element;\n}\n\nfunction useActiveElement(options = {}) {\n  var _a;\n  const { window = defaultWindow } = options;\n  const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n  const activeElement = computedWithControl(() => null, () => document == null ? void 0 : document.activeElement);\n  if (window) {\n    useEventListener(window, \"blur\", (event) => {\n      if (event.relatedTarget !== null)\n        return;\n      activeElement.trigger();\n    }, true);\n    useEventListener(window, \"focus\", activeElement.trigger, true);\n  }\n  return activeElement;\n}\n\nfunction useAsyncQueue(tasks, options = {}) {\n  const {\n    interrupt = true,\n    onError = noop,\n    onFinished = noop\n  } = options;\n  const promiseState = {\n    pending: \"pending\",\n    rejected: \"rejected\",\n    fulfilled: \"fulfilled\"\n  };\n  const initialResult = Array.from(new Array(tasks.length), () => ({ state: promiseState.pending, data: null }));\n  const result = reactive(initialResult);\n  const activeIndex = ref(-1);\n  if (!tasks || tasks.length === 0) {\n    onFinished();\n    return {\n      activeIndex,\n      result\n    };\n  }\n  function updateResult(state, res) {\n    activeIndex.value++;\n    result[activeIndex.value].data = res;\n    result[activeIndex.value].state = state;\n  }\n  tasks.reduce((prev, curr) => {\n    return prev.then((prevRes) => {\n      var _a;\n      if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n        onFinished();\n        return;\n      }\n      return curr(prevRes).then((currentRes) => {\n        updateResult(promiseState.fulfilled, currentRes);\n        activeIndex.value === tasks.length - 1 && onFinished();\n        return currentRes;\n      });\n    }).catch((e) => {\n      updateResult(promiseState.rejected, e);\n      onError();\n      return e;\n    });\n  }, Promise.resolve());\n  return {\n    activeIndex,\n    result\n  };\n}\n\nfunction useAsyncState(promise, initialState, options) {\n  const {\n    immediate = true,\n    delay = 0,\n    onError = noop,\n    onSuccess = noop,\n    resetOnExecute = true,\n    shallow = true,\n    throwError\n  } = options != null ? options : {};\n  const state = shallow ? shallowRef(initialState) : ref(initialState);\n  const isReady = ref(false);\n  const isLoading = ref(false);\n  const error = ref(void 0);\n  async function execute(delay2 = 0, ...args) {\n    if (resetOnExecute)\n      state.value = initialState;\n    error.value = void 0;\n    isReady.value = false;\n    isLoading.value = true;\n    if (delay2 > 0)\n      await promiseTimeout(delay2);\n    const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n    try {\n      const data = await _promise;\n      state.value = data;\n      isReady.value = true;\n      onSuccess(data);\n    } catch (e) {\n      error.value = e;\n      onError(e);\n      if (throwError)\n        throw error;\n    } finally {\n      isLoading.value = false;\n    }\n    return state.value;\n  }\n  if (immediate)\n    execute(delay);\n  return {\n    state,\n    isReady,\n    isLoading,\n    error,\n    execute\n  };\n}\n\nconst defaults = {\n  array: (v) => JSON.stringify(v),\n  object: (v) => JSON.stringify(v),\n  set: (v) => JSON.stringify(Array.from(v)),\n  map: (v) => JSON.stringify(Object.fromEntries(v)),\n  null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n  if (!target)\n    return defaults.null;\n  if (target instanceof Map)\n    return defaults.map;\n  else if (target instanceof Set)\n    return defaults.set;\n  else if (Array.isArray(target))\n    return defaults.array;\n  else\n    return defaults.object;\n}\n\nfunction useBase64(target, options) {\n  const base64 = ref(\"\");\n  const promise = ref();\n  function execute() {\n    if (!isClient)\n      return;\n    promise.value = new Promise((resolve, reject) => {\n      try {\n        const _target = resolveUnref(target);\n        if (_target == null) {\n          resolve(\"\");\n        } else if (typeof _target === \"string\") {\n          resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n        } else if (_target instanceof Blob) {\n          resolve(blobToBase64(_target));\n        } else if (_target instanceof ArrayBuffer) {\n          resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n        } else if (_target instanceof HTMLCanvasElement) {\n          resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n        } else if (_target instanceof HTMLImageElement) {\n          const img = _target.cloneNode(false);\n          img.crossOrigin = \"Anonymous\";\n          imgLoaded(img).then(() => {\n            const canvas = document.createElement(\"canvas\");\n            const ctx = canvas.getContext(\"2d\");\n            canvas.width = img.width;\n            canvas.height = img.height;\n            ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n            resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n          }).catch(reject);\n        } else if (typeof _target === \"object\") {\n          const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n          const serialized = _serializeFn(_target);\n          return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n        } else {\n          reject(new Error(\"target is unsupported types\"));\n        }\n      } catch (error) {\n        reject(error);\n      }\n    });\n    promise.value.then((res) => base64.value = res);\n    return promise.value;\n  }\n  if (isRef(target) || isFunction(target))\n    watch(target, execute, { immediate: true });\n  else\n    execute();\n  return {\n    base64,\n    promise,\n    execute\n  };\n}\nfunction imgLoaded(img) {\n  return new Promise((resolve, reject) => {\n    if (!img.complete) {\n      img.onload = () => {\n        resolve();\n      };\n      img.onerror = reject;\n    } else {\n      resolve();\n    }\n  });\n}\nfunction blobToBase64(blob) {\n  return new Promise((resolve, reject) => {\n    const fr = new FileReader();\n    fr.onload = (e) => {\n      resolve(e.target.result);\n    };\n    fr.onerror = reject;\n    fr.readAsDataURL(blob);\n  });\n}\n\nfunction useSupported(callback, sync = false) {\n  const isSupported = ref();\n  const update = () => isSupported.value = Boolean(callback());\n  update();\n  tryOnMounted(update, sync);\n  return isSupported;\n}\n\nfunction useBattery({ navigator = defaultNavigator } = {}) {\n  const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n  const isSupported = useSupported(() => navigator && \"getBattery\" in navigator);\n  const charging = ref(false);\n  const chargingTime = ref(0);\n  const dischargingTime = ref(0);\n  const level = ref(1);\n  let battery;\n  function updateBatteryInfo() {\n    charging.value = this.charging;\n    chargingTime.value = this.chargingTime || 0;\n    dischargingTime.value = this.dischargingTime || 0;\n    level.value = this.level;\n  }\n  if (isSupported.value) {\n    navigator.getBattery().then((_battery) => {\n      battery = _battery;\n      updateBatteryInfo.call(battery);\n      for (const event of events)\n        useEventListener(battery, event, updateBatteryInfo, { passive: true });\n    });\n  }\n  return {\n    isSupported,\n    charging,\n    chargingTime,\n    dischargingTime,\n    level\n  };\n}\n\nfunction useBluetooth(options) {\n  let {\n    acceptAllDevices = false\n  } = options || {};\n  const {\n    filters = void 0,\n    optionalServices = void 0,\n    navigator = defaultNavigator\n  } = options || {};\n  const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n  const device = shallowRef(void 0);\n  const error = shallowRef(null);\n  watch(device, () => {\n    connectToBluetoothGATTServer();\n  });\n  async function requestDevice() {\n    if (!isSupported.value)\n      return;\n    error.value = null;\n    if (filters && filters.length > 0)\n      acceptAllDevices = false;\n    try {\n      device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n        acceptAllDevices,\n        filters,\n        optionalServices\n      }));\n    } catch (err) {\n      error.value = err;\n    }\n  }\n  const server = ref();\n  const isConnected = computed(() => {\n    var _a;\n    return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n  });\n  async function connectToBluetoothGATTServer() {\n    error.value = null;\n    if (device.value && device.value.gatt) {\n      device.value.addEventListener(\"gattserverdisconnected\", () => {\n      });\n      try {\n        server.value = await device.value.gatt.connect();\n      } catch (err) {\n        error.value = err;\n      }\n    }\n  }\n  tryOnMounted(() => {\n    var _a;\n    if (device.value)\n      (_a = device.value.gatt) == null ? void 0 : _a.connect();\n  });\n  tryOnScopeDispose(() => {\n    var _a;\n    if (device.value)\n      (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n  });\n  return {\n    isSupported,\n    isConnected,\n    device,\n    requestDevice,\n    server,\n    error\n  };\n}\n\nfunction useMediaQuery(query, options = {}) {\n  const { window = defaultWindow } = options;\n  const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n  let mediaQuery;\n  const matches = ref(false);\n  const cleanup = () => {\n    if (!mediaQuery)\n      return;\n    if (\"removeEventListener\" in mediaQuery)\n      mediaQuery.removeEventListener(\"change\", update);\n    else\n      mediaQuery.removeListener(update);\n  };\n  const update = () => {\n    if (!isSupported.value)\n      return;\n    cleanup();\n    mediaQuery = window.matchMedia(resolveRef(query).value);\n    matches.value = mediaQuery.matches;\n    if (\"addEventListener\" in mediaQuery)\n      mediaQuery.addEventListener(\"change\", update);\n    else\n      mediaQuery.addListener(update);\n  };\n  watchEffect(update);\n  tryOnScopeDispose(() => cleanup());\n  return matches;\n}\n\nconst breakpointsTailwind = {\n  \"sm\": 640,\n  \"md\": 768,\n  \"lg\": 1024,\n  \"xl\": 1280,\n  \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n  sm: 576,\n  md: 768,\n  lg: 992,\n  xl: 1200,\n  xxl: 1400\n};\nconst breakpointsVuetify = {\n  xs: 600,\n  sm: 960,\n  md: 1264,\n  lg: 1904\n};\nconst breakpointsAntDesign = {\n  xs: 480,\n  sm: 576,\n  md: 768,\n  lg: 992,\n  xl: 1200,\n  xxl: 1600\n};\nconst breakpointsQuasar = {\n  xs: 600,\n  sm: 1024,\n  md: 1440,\n  lg: 1920\n};\nconst breakpointsSematic = {\n  mobileS: 320,\n  mobileM: 375,\n  mobileL: 425,\n  tablet: 768,\n  laptop: 1024,\n  laptopL: 1440,\n  desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n  \"3xs\": 360,\n  \"2xs\": 480,\n  \"xs\": 600,\n  \"sm\": 768,\n  \"md\": 1024,\n  \"lg\": 1280,\n  \"xl\": 1440,\n  \"2xl\": 1600,\n  \"3xl\": 1920,\n  \"4xl\": 2560\n};\n\nvar __defProp$m = Object.defineProperty;\nvar __getOwnPropSymbols$o = Object.getOwnPropertySymbols;\nvar __hasOwnProp$o = Object.prototype.hasOwnProperty;\nvar __propIsEnum$o = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$m = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$o.call(b, prop))\n      __defNormalProp$m(a, prop, b[prop]);\n  if (__getOwnPropSymbols$o)\n    for (var prop of __getOwnPropSymbols$o(b)) {\n      if (__propIsEnum$o.call(b, prop))\n        __defNormalProp$m(a, prop, b[prop]);\n    }\n  return a;\n};\nfunction useBreakpoints(breakpoints, options = {}) {\n  function getValue(k, delta) {\n    let v = breakpoints[k];\n    if (delta != null)\n      v = increaseWithUnit(v, delta);\n    if (typeof v === \"number\")\n      v = `${v}px`;\n    return v;\n  }\n  const { window = defaultWindow } = options;\n  function match(query) {\n    if (!window)\n      return false;\n    return window.matchMedia(query).matches;\n  }\n  const greaterOrEqual = (k) => {\n    return useMediaQuery(`(min-width: ${getValue(k)})`, options);\n  };\n  const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n    Object.defineProperty(shortcuts, k, {\n      get: () => greaterOrEqual(k),\n      enumerable: true,\n      configurable: true\n    });\n    return shortcuts;\n  }, {});\n  return __spreadValues$m({\n    greater(k) {\n      return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);\n    },\n    greaterOrEqual,\n    smaller(k) {\n      return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);\n    },\n    smallerOrEqual(k) {\n      return useMediaQuery(`(max-width: ${getValue(k)})`, options);\n    },\n    between(a, b) {\n      return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n    },\n    isGreater(k) {\n      return match(`(min-width: ${getValue(k, 0.1)})`);\n    },\n    isGreaterOrEqual(k) {\n      return match(`(min-width: ${getValue(k)})`);\n    },\n    isSmaller(k) {\n      return match(`(max-width: ${getValue(k, -0.1)})`);\n    },\n    isSmallerOrEqual(k) {\n      return match(`(max-width: ${getValue(k)})`);\n    },\n    isInBetween(a, b) {\n      return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n    }\n  }, shortcutMethods);\n}\n\nconst useBroadcastChannel = (options) => {\n  const {\n    name,\n    window = defaultWindow\n  } = options;\n  const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n  const isClosed = ref(false);\n  const channel = ref();\n  const data = ref();\n  const error = ref(null);\n  const post = (data2) => {\n    if (channel.value)\n      channel.value.postMessage(data2);\n  };\n  const close = () => {\n    if (channel.value)\n      channel.value.close();\n    isClosed.value = true;\n  };\n  if (isSupported.value) {\n    tryOnMounted(() => {\n      error.value = null;\n      channel.value = new BroadcastChannel(name);\n      channel.value.addEventListener(\"message\", (e) => {\n        data.value = e.data;\n      }, { passive: true });\n      channel.value.addEventListener(\"messageerror\", (e) => {\n        error.value = e;\n      }, { passive: true });\n      channel.value.addEventListener(\"close\", () => {\n        isClosed.value = true;\n      });\n    });\n  }\n  tryOnScopeDispose(() => {\n    close();\n  });\n  return {\n    isSupported,\n    channel,\n    data,\n    post,\n    close,\n    error,\n    isClosed\n  };\n};\n\nfunction useBrowserLocation({ window = defaultWindow } = {}) {\n  const buildState = (trigger) => {\n    const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n    const { hash, host, hostname, href, origin, pathname, port, protocol, search } = (window == null ? void 0 : window.location) || {};\n    return {\n      trigger,\n      state: state2,\n      length,\n      hash,\n      host,\n      hostname,\n      href,\n      origin,\n      pathname,\n      port,\n      protocol,\n      search\n    };\n  };\n  const state = ref(buildState(\"load\"));\n  if (window) {\n    useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n    useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n  }\n  return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n  const cachedValue = ref(refValue.value);\n  watch(() => refValue.value, (value) => {\n    if (!comparator(value, cachedValue.value))\n      cachedValue.value = value;\n  }, watchOptions);\n  return cachedValue;\n}\n\nfunction useClipboard(options = {}) {\n  const {\n    navigator = defaultNavigator,\n    read = false,\n    source,\n    copiedDuring = 1500,\n    legacy = false\n  } = options;\n  const events = [\"copy\", \"cut\"];\n  const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n  const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n  const text = ref(\"\");\n  const copied = ref(false);\n  const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n  function updateText() {\n    if (isClipboardApiSupported.value) {\n      navigator.clipboard.readText().then((value) => {\n        text.value = value;\n      });\n    } else {\n      text.value = legacyRead();\n    }\n  }\n  if (isSupported.value && read) {\n    for (const event of events)\n      useEventListener(event, updateText);\n  }\n  async function copy(value = resolveUnref(source)) {\n    if (isSupported.value && value != null) {\n      if (isClipboardApiSupported.value)\n        await navigator.clipboard.writeText(value);\n      else\n        legacyCopy(value);\n      text.value = value;\n      copied.value = true;\n      timeout.start();\n    }\n  }\n  function legacyCopy(value) {\n    const ta = document.createElement(\"textarea\");\n    ta.value = value != null ? value : \"\";\n    ta.style.position = \"absolute\";\n    ta.style.opacity = \"0\";\n    document.body.appendChild(ta);\n    ta.select();\n    document.execCommand(\"copy\");\n    ta.remove();\n  }\n  function legacyRead() {\n    var _a, _b, _c;\n    return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n  }\n  return {\n    isSupported,\n    text,\n    copied,\n    copy\n  };\n}\n\nvar __defProp$l = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$n = Object.getOwnPropertySymbols;\nvar __hasOwnProp$n = Object.prototype.hasOwnProperty;\nvar __propIsEnum$n = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$l = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$n.call(b, prop))\n      __defNormalProp$l(a, prop, b[prop]);\n  if (__getOwnPropSymbols$n)\n    for (var prop of __getOwnPropSymbols$n(b)) {\n      if (__propIsEnum$n.call(b, prop))\n        __defNormalProp$l(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction cloneFnJSON(source) {\n  return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n  const cloned = ref({});\n  const {\n    manual,\n    clone = cloneFnJSON,\n    deep = true,\n    immediate = true\n  } = options;\n  function sync() {\n    cloned.value = clone(unref(source));\n  }\n  if (!manual && isRef(source)) {\n    watch(source, sync, __spreadProps$8(__spreadValues$l({}, options), {\n      deep,\n      immediate\n    }));\n  } else {\n    sync();\n  }\n  return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\n_global[globalKey] = _global[globalKey] || {};\nconst handlers = _global[globalKey];\nfunction getSSRHandler(key, fallback) {\n  return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n  handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n  return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nvar __defProp$k = Object.defineProperty;\nvar __getOwnPropSymbols$m = Object.getOwnPropertySymbols;\nvar __hasOwnProp$m = Object.prototype.hasOwnProperty;\nvar __propIsEnum$m = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$k = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$m.call(b, prop))\n      __defNormalProp$k(a, prop, b[prop]);\n  if (__getOwnPropSymbols$m)\n    for (var prop of __getOwnPropSymbols$m(b)) {\n      if (__propIsEnum$m.call(b, prop))\n        __defNormalProp$k(a, prop, b[prop]);\n    }\n  return a;\n};\nconst StorageSerializers = {\n  boolean: {\n    read: (v) => v === \"true\",\n    write: (v) => String(v)\n  },\n  object: {\n    read: (v) => JSON.parse(v),\n    write: (v) => JSON.stringify(v)\n  },\n  number: {\n    read: (v) => Number.parseFloat(v),\n    write: (v) => String(v)\n  },\n  any: {\n    read: (v) => v,\n    write: (v) => String(v)\n  },\n  string: {\n    read: (v) => v,\n    write: (v) => String(v)\n  },\n  map: {\n    read: (v) => new Map(JSON.parse(v)),\n    write: (v) => JSON.stringify(Array.from(v.entries()))\n  },\n  set: {\n    read: (v) => new Set(JSON.parse(v)),\n    write: (v) => JSON.stringify(Array.from(v))\n  },\n  date: {\n    read: (v) => new Date(v),\n    write: (v) => v.toISOString()\n  }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n  var _a;\n  const {\n    flush = \"pre\",\n    deep = true,\n    listenToStorageChanges = true,\n    writeDefaults = true,\n    mergeDefaults = false,\n    shallow,\n    window = defaultWindow,\n    eventFilter,\n    onError = (e) => {\n      console.error(e);\n    }\n  } = options;\n  const data = (shallow ? shallowRef : ref)(defaults);\n  if (!storage) {\n    try {\n      storage = getSSRHandler(\"getDefaultStorage\", () => {\n        var _a2;\n        return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n      })();\n    } catch (e) {\n      onError(e);\n    }\n  }\n  if (!storage)\n    return data;\n  const rawInit = resolveUnref(defaults);\n  const type = guessSerializerType(rawInit);\n  const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n  const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, () => write(data.value), { flush, deep, eventFilter });\n  if (window && listenToStorageChanges) {\n    useEventListener(window, \"storage\", update);\n    useEventListener(window, customStorageEventName, updateFromCustomEvent);\n  }\n  update();\n  return data;\n  function write(v) {\n    try {\n      if (v == null) {\n        storage.removeItem(key);\n      } else {\n        const serialized = serializer.write(v);\n        const oldValue = storage.getItem(key);\n        if (oldValue !== serialized) {\n          storage.setItem(key, serialized);\n          if (window) {\n            window.dispatchEvent(new CustomEvent(customStorageEventName, {\n              detail: {\n                key,\n                oldValue,\n                newValue: serialized,\n                storageArea: storage\n              }\n            }));\n          }\n        }\n      }\n    } catch (e) {\n      onError(e);\n    }\n  }\n  function read(event) {\n    const rawValue = event ? event.newValue : storage.getItem(key);\n    if (rawValue == null) {\n      if (writeDefaults && rawInit !== null)\n        storage.setItem(key, serializer.write(rawInit));\n      return rawInit;\n    } else if (!event && mergeDefaults) {\n      const value = serializer.read(rawValue);\n      if (isFunction(mergeDefaults))\n        return mergeDefaults(value, rawInit);\n      else if (type === \"object\" && !Array.isArray(value))\n        return __spreadValues$k(__spreadValues$k({}, rawInit), value);\n      return value;\n    } else if (typeof rawValue !== \"string\") {\n      return rawValue;\n    } else {\n      return serializer.read(rawValue);\n    }\n  }\n  function updateFromCustomEvent(event) {\n    update(event.detail);\n  }\n  function update(event) {\n    if (event && event.storageArea !== storage)\n      return;\n    if (event && event.key == null) {\n      data.value = rawInit;\n      return;\n    }\n    if (event && event.key !== key)\n      return;\n    pauseWatch();\n    try {\n      data.value = read(event);\n    } catch (e) {\n      onError(e);\n    } finally {\n      if (event)\n        nextTick(resumeWatch);\n      else\n        resumeWatch();\n    }\n  }\n}\n\nfunction usePreferredDark(options) {\n  return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nvar __defProp$j = Object.defineProperty;\nvar __getOwnPropSymbols$l = Object.getOwnPropertySymbols;\nvar __hasOwnProp$l = Object.prototype.hasOwnProperty;\nvar __propIsEnum$l = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$j = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$l.call(b, prop))\n      __defNormalProp$j(a, prop, b[prop]);\n  if (__getOwnPropSymbols$l)\n    for (var prop of __getOwnPropSymbols$l(b)) {\n      if (__propIsEnum$l.call(b, prop))\n        __defNormalProp$j(a, prop, b[prop]);\n    }\n  return a;\n};\nfunction useColorMode(options = {}) {\n  const {\n    selector = \"html\",\n    attribute = \"class\",\n    initialValue = \"auto\",\n    window = defaultWindow,\n    storage,\n    storageKey = \"vueuse-color-scheme\",\n    listenToStorageChanges = true,\n    storageRef,\n    emitAuto\n  } = options;\n  const modes = __spreadValues$j({\n    auto: \"\",\n    light: \"light\",\n    dark: \"dark\"\n  }, options.modes || {});\n  const preferredDark = usePreferredDark({ window });\n  const preferredMode = computed(() => preferredDark.value ? \"dark\" : \"light\");\n  const store = storageRef || (storageKey == null ? ref(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n  const state = computed({\n    get() {\n      return store.value === \"auto\" && !emitAuto ? preferredMode.value : store.value;\n    },\n    set(v) {\n      store.value = v;\n    }\n  });\n  const updateHTMLAttrs = getSSRHandler(\"updateHTMLAttrs\", (selector2, attribute2, value) => {\n    const el = window == null ? void 0 : window.document.querySelector(selector2);\n    if (!el)\n      return;\n    if (attribute2 === \"class\") {\n      const current = value.split(/\\s/g);\n      Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n        if (current.includes(v))\n          el.classList.add(v);\n        else\n          el.classList.remove(v);\n      });\n    } else {\n      el.setAttribute(attribute2, value);\n    }\n  });\n  function defaultOnChanged(mode) {\n    var _a;\n    const resolvedMode = mode === \"auto\" ? preferredMode.value : mode;\n    updateHTMLAttrs(selector, attribute, (_a = modes[resolvedMode]) != null ? _a : resolvedMode);\n  }\n  function onChanged(mode) {\n    if (options.onChanged)\n      options.onChanged(mode, defaultOnChanged);\n    else\n      defaultOnChanged(mode);\n  }\n  watch(state, onChanged, { flush: \"post\", immediate: true });\n  if (emitAuto)\n    watch(preferredMode, () => onChanged(state.value), { flush: \"post\" });\n  tryOnMounted(() => onChanged(state.value));\n  return state;\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n  const confirmHook = createEventHook();\n  const cancelHook = createEventHook();\n  const revealHook = createEventHook();\n  let _resolve = noop;\n  const reveal = (data) => {\n    revealHook.trigger(data);\n    revealed.value = true;\n    return new Promise((resolve) => {\n      _resolve = resolve;\n    });\n  };\n  const confirm = (data) => {\n    revealed.value = false;\n    confirmHook.trigger(data);\n    _resolve({ data, isCanceled: false });\n  };\n  const cancel = (data) => {\n    revealed.value = false;\n    cancelHook.trigger(data);\n    _resolve({ data, isCanceled: true });\n  };\n  return {\n    isRevealed: computed(() => revealed.value),\n    reveal,\n    confirm,\n    cancel,\n    onReveal: revealHook.on,\n    onConfirm: confirmHook.on,\n    onCancel: cancelHook.on\n  };\n}\n\nfunction useCssVar(prop, target, { window = defaultWindow, initialValue = \"\" } = {}) {\n  const variable = ref(initialValue);\n  const elRef = computed(() => {\n    var _a;\n    return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n  });\n  watch([elRef, () => resolveUnref(prop)], ([el, prop2]) => {\n    var _a;\n    if (el && window) {\n      const value = (_a = window.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a.trim();\n      variable.value = value || initialValue;\n    }\n  }, { immediate: true });\n  watch(variable, (val) => {\n    var _a;\n    if ((_a = elRef.value) == null ? void 0 : _a.style)\n      elRef.value.style.setProperty(resolveUnref(prop), val);\n  });\n  return variable;\n}\n\nfunction useCurrentElement() {\n  const vm = getCurrentInstance();\n  const currentElement = computedWithControl(() => null, () => vm.proxy.$el);\n  onUpdated(currentElement.trigger);\n  onMounted(currentElement.trigger);\n  return currentElement;\n}\n\nfunction useCycleList(list, options) {\n  var _a;\n  const state = shallowRef((_a = options == null ? void 0 : options.initialValue) != null ? _a : list[0]);\n  const index = computed({\n    get() {\n      var _a2;\n      let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, list) : list.indexOf(state.value);\n      if (index2 < 0)\n        index2 = (_a2 = options == null ? void 0 : options.fallbackIndex) != null ? _a2 : 0;\n      return index2;\n    },\n    set(v) {\n      set(v);\n    }\n  });\n  function set(i) {\n    const length = list.length;\n    const index2 = (i % length + length) % length;\n    const value = list[index2];\n    state.value = value;\n    return value;\n  }\n  function shift(delta = 1) {\n    return set(index.value + delta);\n  }\n  function next(n = 1) {\n    return shift(n);\n  }\n  function prev(n = 1) {\n    return shift(-n);\n  }\n  return {\n    state,\n    index,\n    next,\n    prev\n  };\n}\n\nvar __defProp$i = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$k = Object.getOwnPropertySymbols;\nvar __hasOwnProp$k = Object.prototype.hasOwnProperty;\nvar __propIsEnum$k = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$i = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$k.call(b, prop))\n      __defNormalProp$i(a, prop, b[prop]);\n  if (__getOwnPropSymbols$k)\n    for (var prop of __getOwnPropSymbols$k(b)) {\n      if (__propIsEnum$k.call(b, prop))\n        __defNormalProp$i(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction useDark(options = {}) {\n  const {\n    valueDark = \"dark\",\n    valueLight = \"\",\n    window = defaultWindow\n  } = options;\n  const mode = useColorMode(__spreadProps$7(__spreadValues$i({}, options), {\n    onChanged: (mode2, defaultHandler) => {\n      var _a;\n      if (options.onChanged)\n        (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\");\n      else\n        defaultHandler(mode2);\n    },\n    modes: {\n      dark: valueDark,\n      light: valueLight\n    }\n  }));\n  const preferredDark = usePreferredDark({ window });\n  const isDark = computed({\n    get() {\n      return mode.value === \"dark\";\n    },\n    set(v) {\n      if (v === preferredDark.value)\n        mode.value = \"auto\";\n      else\n        mode.value = v ? \"dark\" : \"light\";\n    }\n  });\n  return isDark;\n}\n\nconst fnBypass = (v) => v;\nconst fnSetSource = (source, value) => source.value = value;\nfunction defaultDump(clone) {\n  return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n  return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n  const {\n    clone = false,\n    dump = defaultDump(clone),\n    parse = defaultParse(clone),\n    setSource = fnSetSource\n  } = options;\n  function _createHistoryRecord() {\n    return markRaw({\n      snapshot: dump(source.value),\n      timestamp: timestamp()\n    });\n  }\n  const last = ref(_createHistoryRecord());\n  const undoStack = ref([]);\n  const redoStack = ref([]);\n  const _setSource = (record) => {\n    setSource(source, parse(record.snapshot));\n    last.value = record;\n  };\n  const commit = () => {\n    undoStack.value.unshift(last.value);\n    last.value = _createHistoryRecord();\n    if (options.capacity && undoStack.value.length > options.capacity)\n      undoStack.value.splice(options.capacity, Infinity);\n    if (redoStack.value.length)\n      redoStack.value.splice(0, redoStack.value.length);\n  };\n  const clear = () => {\n    undoStack.value.splice(0, undoStack.value.length);\n    redoStack.value.splice(0, redoStack.value.length);\n  };\n  const undo = () => {\n    const state = undoStack.value.shift();\n    if (state) {\n      redoStack.value.unshift(last.value);\n      _setSource(state);\n    }\n  };\n  const redo = () => {\n    const state = redoStack.value.shift();\n    if (state) {\n      undoStack.value.unshift(last.value);\n      _setSource(state);\n    }\n  };\n  const reset = () => {\n    _setSource(last.value);\n  };\n  const history = computed(() => [last.value, ...undoStack.value]);\n  const canUndo = computed(() => undoStack.value.length > 0);\n  const canRedo = computed(() => redoStack.value.length > 0);\n  return {\n    source,\n    undoStack,\n    redoStack,\n    last,\n    history,\n    canUndo,\n    canRedo,\n    clear,\n    commit,\n    reset,\n    undo,\n    redo\n  };\n}\n\nvar __defProp$h = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$j = Object.getOwnPropertySymbols;\nvar __hasOwnProp$j = Object.prototype.hasOwnProperty;\nvar __propIsEnum$j = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$h = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$j.call(b, prop))\n      __defNormalProp$h(a, prop, b[prop]);\n  if (__getOwnPropSymbols$j)\n    for (var prop of __getOwnPropSymbols$j(b)) {\n      if (__propIsEnum$j.call(b, prop))\n        __defNormalProp$h(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction useRefHistory(source, options = {}) {\n  const {\n    deep = false,\n    flush = \"pre\",\n    eventFilter\n  } = options;\n  const {\n    eventFilter: composedFilter,\n    pause,\n    resume: resumeTracking,\n    isActive: isTracking\n  } = pausableFilter(eventFilter);\n  const {\n    ignoreUpdates,\n    ignorePrevAsyncUpdates,\n    stop\n  } = watchIgnorable(source, commit, { deep, flush, eventFilter: composedFilter });\n  function setSource(source2, value) {\n    ignorePrevAsyncUpdates();\n    ignoreUpdates(() => {\n      source2.value = value;\n    });\n  }\n  const manualHistory = useManualRefHistory(source, __spreadProps$6(__spreadValues$h({}, options), { clone: options.clone || deep, setSource }));\n  const { clear, commit: manualCommit } = manualHistory;\n  function commit() {\n    ignorePrevAsyncUpdates();\n    manualCommit();\n  }\n  function resume(commitNow) {\n    resumeTracking();\n    if (commitNow)\n      commit();\n  }\n  function batch(fn) {\n    let canceled = false;\n    const cancel = () => canceled = true;\n    ignoreUpdates(() => {\n      fn(cancel);\n    });\n    if (!canceled)\n      commit();\n  }\n  function dispose() {\n    stop();\n    clear();\n  }\n  return __spreadProps$6(__spreadValues$h({}, manualHistory), {\n    isTracking,\n    pause,\n    resume,\n    commit,\n    batch,\n    dispose\n  });\n}\n\nvar __defProp$g = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$i = Object.getOwnPropertySymbols;\nvar __hasOwnProp$i = Object.prototype.hasOwnProperty;\nvar __propIsEnum$i = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$g = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$i.call(b, prop))\n      __defNormalProp$g(a, prop, b[prop]);\n  if (__getOwnPropSymbols$i)\n    for (var prop of __getOwnPropSymbols$i(b)) {\n      if (__propIsEnum$i.call(b, prop))\n        __defNormalProp$g(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction useDebouncedRefHistory(source, options = {}) {\n  const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n  const history = useRefHistory(source, __spreadProps$5(__spreadValues$g({}, options), { eventFilter: filter }));\n  return __spreadValues$g({}, history);\n}\n\nfunction useDeviceMotion(options = {}) {\n  const {\n    window = defaultWindow,\n    eventFilter = bypassFilter\n  } = options;\n  const acceleration = ref({ x: null, y: null, z: null });\n  const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n  const interval = ref(0);\n  const accelerationIncludingGravity = ref({\n    x: null,\n    y: null,\n    z: null\n  });\n  if (window) {\n    const onDeviceMotion = createFilterWrapper(eventFilter, (event) => {\n      acceleration.value = event.acceleration;\n      accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n      rotationRate.value = event.rotationRate;\n      interval.value = event.interval;\n    });\n    useEventListener(window, \"devicemotion\", onDeviceMotion);\n  }\n  return {\n    acceleration,\n    accelerationIncludingGravity,\n    rotationRate,\n    interval\n  };\n}\n\nfunction useDeviceOrientation(options = {}) {\n  const { window = defaultWindow } = options;\n  const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n  const isAbsolute = ref(false);\n  const alpha = ref(null);\n  const beta = ref(null);\n  const gamma = ref(null);\n  if (window && isSupported.value) {\n    useEventListener(window, \"deviceorientation\", (event) => {\n      isAbsolute.value = event.absolute;\n      alpha.value = event.alpha;\n      beta.value = event.beta;\n      gamma.value = event.gamma;\n    });\n  }\n  return {\n    isSupported,\n    isAbsolute,\n    alpha,\n    beta,\n    gamma\n  };\n}\n\nfunction useDevicePixelRatio({\n  window = defaultWindow\n} = {}) {\n  const pixelRatio = ref(1);\n  if (window) {\n    let observe = function() {\n      pixelRatio.value = window.devicePixelRatio;\n      cleanup();\n      media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n      media.addEventListener(\"change\", observe, { once: true });\n    }, cleanup = function() {\n      media == null ? void 0 : media.removeEventListener(\"change\", observe);\n    };\n    let media;\n    observe();\n    tryOnScopeDispose(cleanup);\n  }\n  return { pixelRatio };\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n  const {\n    controls = false,\n    navigator = defaultNavigator\n  } = options;\n  const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n  let permissionStatus;\n  const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n  const state = ref();\n  const onChange = () => {\n    if (permissionStatus)\n      state.value = permissionStatus.state;\n  };\n  const query = createSingletonPromise(async () => {\n    if (!isSupported.value)\n      return;\n    if (!permissionStatus) {\n      try {\n        permissionStatus = await navigator.permissions.query(desc);\n        useEventListener(permissionStatus, \"change\", onChange);\n        onChange();\n      } catch (e) {\n        state.value = \"prompt\";\n      }\n    }\n    return permissionStatus;\n  });\n  query();\n  if (controls) {\n    return {\n      state,\n      isSupported,\n      query\n    };\n  } else {\n    return state;\n  }\n}\n\nfunction useDevicesList(options = {}) {\n  const {\n    navigator = defaultNavigator,\n    requestPermissions = false,\n    constraints = { audio: true, video: true },\n    onUpdated\n  } = options;\n  const devices = ref([]);\n  const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n  const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n  const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n  const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n  const permissionGranted = ref(false);\n  async function update() {\n    if (!isSupported.value)\n      return;\n    devices.value = await navigator.mediaDevices.enumerateDevices();\n    onUpdated == null ? void 0 : onUpdated(devices.value);\n  }\n  async function ensurePermissions() {\n    if (!isSupported.value)\n      return false;\n    if (permissionGranted.value)\n      return true;\n    const { state, query } = usePermission(\"camera\", { controls: true });\n    await query();\n    if (state.value !== \"granted\") {\n      const stream = await navigator.mediaDevices.getUserMedia(constraints);\n      stream.getTracks().forEach((t) => t.stop());\n      update();\n      permissionGranted.value = true;\n    } else {\n      permissionGranted.value = true;\n    }\n    return permissionGranted.value;\n  }\n  if (isSupported.value) {\n    if (requestPermissions)\n      ensurePermissions();\n    useEventListener(navigator.mediaDevices, \"devicechange\", update);\n    update();\n  }\n  return {\n    devices,\n    ensurePermissions,\n    permissionGranted,\n    videoInputs,\n    audioInputs,\n    audioOutputs,\n    isSupported\n  };\n}\n\nfunction useDisplayMedia(options = {}) {\n  var _a;\n  const enabled = ref((_a = options.enabled) != null ? _a : false);\n  const video = options.video;\n  const audio = options.audio;\n  const { navigator = defaultNavigator } = options;\n  const isSupported = useSupported(() => {\n    var _a2;\n    return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n  });\n  const constraint = { audio, video };\n  const stream = shallowRef();\n  async function _start() {\n    if (!isSupported.value || stream.value)\n      return;\n    stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n    return stream.value;\n  }\n  async function _stop() {\n    var _a2;\n    (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n    stream.value = void 0;\n  }\n  function stop() {\n    _stop();\n    enabled.value = false;\n  }\n  async function start() {\n    await _start();\n    if (stream.value)\n      enabled.value = true;\n    return stream.value;\n  }\n  watch(enabled, (v) => {\n    if (v)\n      _start();\n    else\n      _stop();\n  }, { immediate: true });\n  return {\n    isSupported,\n    stream,\n    start,\n    stop,\n    enabled\n  };\n}\n\nfunction useDocumentVisibility({ document = defaultDocument } = {}) {\n  if (!document)\n    return ref(\"visible\");\n  const visibility = ref(document.visibilityState);\n  useEventListener(document, \"visibilitychange\", () => {\n    visibility.value = document.visibilityState;\n  });\n  return visibility;\n}\n\nvar __defProp$f = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$h = Object.getOwnPropertySymbols;\nvar __hasOwnProp$h = Object.prototype.hasOwnProperty;\nvar __propIsEnum$h = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$f = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$h.call(b, prop))\n      __defNormalProp$f(a, prop, b[prop]);\n  if (__getOwnPropSymbols$h)\n    for (var prop of __getOwnPropSymbols$h(b)) {\n      if (__propIsEnum$h.call(b, prop))\n        __defNormalProp$f(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nfunction useDraggable(target, options = {}) {\n  var _a, _b, _c;\n  const draggingElement = (_a = options.draggingElement) != null ? _a : defaultWindow;\n  const draggingHandle = (_b = options.handle) != null ? _b : target;\n  const position = ref((_c = resolveUnref(options.initialValue)) != null ? _c : { x: 0, y: 0 });\n  const pressedDelta = ref();\n  const filterEvent = (e) => {\n    if (options.pointerTypes)\n      return options.pointerTypes.includes(e.pointerType);\n    return true;\n  };\n  const handleEvent = (e) => {\n    if (resolveUnref(options.preventDefault))\n      e.preventDefault();\n    if (resolveUnref(options.stopPropagation))\n      e.stopPropagation();\n  };\n  const start = (e) => {\n    var _a2;\n    if (!filterEvent(e))\n      return;\n    if (resolveUnref(options.exact) && e.target !== resolveUnref(target))\n      return;\n    const rect = resolveUnref(target).getBoundingClientRect();\n    const pos = {\n      x: e.clientX - rect.left,\n      y: e.clientY - rect.top\n    };\n    if (((_a2 = options.onStart) == null ? void 0 : _a2.call(options, pos, e)) === false)\n      return;\n    pressedDelta.value = pos;\n    handleEvent(e);\n  };\n  const move = (e) => {\n    var _a2;\n    if (!filterEvent(e))\n      return;\n    if (!pressedDelta.value)\n      return;\n    position.value = {\n      x: e.clientX - pressedDelta.value.x,\n      y: e.clientY - pressedDelta.value.y\n    };\n    (_a2 = options.onMove) == null ? void 0 : _a2.call(options, position.value, e);\n    handleEvent(e);\n  };\n  const end = (e) => {\n    var _a2;\n    if (!filterEvent(e))\n      return;\n    if (!pressedDelta.value)\n      return;\n    pressedDelta.value = void 0;\n    (_a2 = options.onEnd) == null ? void 0 : _a2.call(options, position.value, e);\n    handleEvent(e);\n  };\n  if (isClient) {\n    useEventListener(draggingHandle, \"pointerdown\", start, true);\n    useEventListener(draggingElement, \"pointermove\", move, true);\n    useEventListener(draggingElement, \"pointerup\", end, true);\n  }\n  return __spreadProps$4(__spreadValues$f({}, toRefs(position)), {\n    position,\n    isDragging: computed(() => !!pressedDelta.value),\n    style: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)\n  });\n}\n\nfunction useDropZone(target, onDrop) {\n  const isOverDropZone = ref(false);\n  let counter = 0;\n  if (isClient) {\n    useEventListener(target, \"dragenter\", (event) => {\n      event.preventDefault();\n      counter += 1;\n      isOverDropZone.value = true;\n    });\n    useEventListener(target, \"dragover\", (event) => {\n      event.preventDefault();\n    });\n    useEventListener(target, \"dragleave\", (event) => {\n      event.preventDefault();\n      counter -= 1;\n      if (counter === 0)\n        isOverDropZone.value = false;\n    });\n    useEventListener(target, \"drop\", (event) => {\n      var _a, _b;\n      event.preventDefault();\n      counter = 0;\n      isOverDropZone.value = false;\n      const files = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n      onDrop == null ? void 0 : onDrop(files.length === 0 ? null : files);\n    });\n  }\n  return {\n    isOverDropZone\n  };\n}\n\nvar __getOwnPropSymbols$g = Object.getOwnPropertySymbols;\nvar __hasOwnProp$g = Object.prototype.hasOwnProperty;\nvar __propIsEnum$g = Object.prototype.propertyIsEnumerable;\nvar __objRest$2 = (source, exclude) => {\n  var target = {};\n  for (var prop in source)\n    if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)\n      target[prop] = source[prop];\n  if (source != null && __getOwnPropSymbols$g)\n    for (var prop of __getOwnPropSymbols$g(source)) {\n      if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))\n        target[prop] = source[prop];\n    }\n  return target;\n};\nfunction useResizeObserver(target, callback, options = {}) {\n  const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, [\"window\"]);\n  let observer;\n  const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n  const cleanup = () => {\n    if (observer) {\n      observer.disconnect();\n      observer = void 0;\n    }\n  };\n  const stopWatch = watch(() => unrefElement(target), (el) => {\n    cleanup();\n    if (isSupported.value && window && el) {\n      observer = new ResizeObserver(callback);\n      observer.observe(el, observerOptions);\n    }\n  }, { immediate: true, flush: \"post\" });\n  const stop = () => {\n    cleanup();\n    stopWatch();\n  };\n  tryOnScopeDispose(stop);\n  return {\n    isSupported,\n    stop\n  };\n}\n\nfunction useElementBounding(target, options = {}) {\n  const {\n    reset = true,\n    windowResize = true,\n    windowScroll = true,\n    immediate = true\n  } = options;\n  const height = ref(0);\n  const bottom = ref(0);\n  const left = ref(0);\n  const right = ref(0);\n  const top = ref(0);\n  const width = ref(0);\n  const x = ref(0);\n  const y = ref(0);\n  function update() {\n    const el = unrefElement(target);\n    if (!el) {\n      if (reset) {\n        height.value = 0;\n        bottom.value = 0;\n        left.value = 0;\n        right.value = 0;\n        top.value = 0;\n        width.value = 0;\n        x.value = 0;\n        y.value = 0;\n      }\n      return;\n    }\n    const rect = el.getBoundingClientRect();\n    height.value = rect.height;\n    bottom.value = rect.bottom;\n    left.value = rect.left;\n    right.value = rect.right;\n    top.value = rect.top;\n    width.value = rect.width;\n    x.value = rect.x;\n    y.value = rect.y;\n  }\n  useResizeObserver(target, update);\n  watch(() => unrefElement(target), (ele) => !ele && update());\n  if (windowScroll)\n    useEventListener(\"scroll\", update, { capture: true, passive: true });\n  if (windowResize)\n    useEventListener(\"resize\", update, { passive: true });\n  tryOnMounted(() => {\n    if (immediate)\n      update();\n  });\n  return {\n    height,\n    bottom,\n    left,\n    right,\n    top,\n    width,\n    x,\n    y,\n    update\n  };\n}\n\nfunction useRafFn(fn, options = {}) {\n  const {\n    immediate = true,\n    window = defaultWindow\n  } = options;\n  const isActive = ref(false);\n  let previousFrameTimestamp = 0;\n  let rafId = null;\n  function loop(timestamp) {\n    if (!isActive.value || !window)\n      return;\n    const delta = timestamp - previousFrameTimestamp;\n    fn({ delta, timestamp });\n    previousFrameTimestamp = timestamp;\n    rafId = window.requestAnimationFrame(loop);\n  }\n  function resume() {\n    if (!isActive.value && window) {\n      isActive.value = true;\n      rafId = window.requestAnimationFrame(loop);\n    }\n  }\n  function pause() {\n    isActive.value = false;\n    if (rafId != null && window) {\n      window.cancelAnimationFrame(rafId);\n      rafId = null;\n    }\n  }\n  if (immediate)\n    resume();\n  tryOnScopeDispose(pause);\n  return {\n    isActive: readonly(isActive),\n    pause,\n    resume\n  };\n}\n\nvar __defProp$e = Object.defineProperty;\nvar __getOwnPropSymbols$f = Object.getOwnPropertySymbols;\nvar __hasOwnProp$f = Object.prototype.hasOwnProperty;\nvar __propIsEnum$f = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$e = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$f.call(b, prop))\n      __defNormalProp$e(a, prop, b[prop]);\n  if (__getOwnPropSymbols$f)\n    for (var prop of __getOwnPropSymbols$f(b)) {\n      if (__propIsEnum$f.call(b, prop))\n        __defNormalProp$e(a, prop, b[prop]);\n    }\n  return a;\n};\nfunction useElementByPoint(options) {\n  const element = ref(null);\n  const { x, y, document = defaultDocument } = options;\n  const controls = useRafFn(() => {\n    element.value = (document == null ? void 0 : document.elementFromPoint(resolveUnref(x), resolveUnref(y))) || null;\n  });\n  return __spreadValues$e({\n    element\n  }, controls);\n}\n\nfunction useElementHover(el, options = {}) {\n  const delayEnter = options ? options.delayEnter : 0;\n  const delayLeave = options ? options.delayLeave : 0;\n  const isHovered = ref(false);\n  let timer;\n  const toggle = (entering) => {\n    const delay = entering ? delayEnter : delayLeave;\n    if (timer) {\n      clearTimeout(timer);\n      timer = void 0;\n    }\n    if (delay)\n      timer = setTimeout(() => isHovered.value = entering, delay);\n    else\n      isHovered.value = entering;\n  };\n  if (!window)\n    return isHovered;\n  useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n  useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n  return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n  const { window = defaultWindow, box = \"content-box\" } = options;\n  const isSVG = computed(() => {\n    var _a, _b;\n    return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n  });\n  const width = ref(initialSize.width);\n  const height = ref(initialSize.height);\n  useResizeObserver(target, ([entry]) => {\n    const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n    if (window && isSVG.value) {\n      const $elem = unrefElement(target);\n      if ($elem) {\n        const styles = window.getComputedStyle($elem);\n        width.value = parseFloat(styles.width);\n        height.value = parseFloat(styles.height);\n      }\n    } else {\n      if (boxSize) {\n        const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n        width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n        height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n      } else {\n        width.value = entry.contentRect.width;\n        height.value = entry.contentRect.height;\n      }\n    }\n  }, options);\n  watch(() => unrefElement(target), (ele) => {\n    width.value = ele ? initialSize.width : 0;\n    height.value = ele ? initialSize.height : 0;\n  });\n  return {\n    width,\n    height\n  };\n}\n\nfunction useElementVisibility(element, { window = defaultWindow, scrollTarget } = {}) {\n  const elementIsVisible = ref(false);\n  const testBounding = () => {\n    if (!window)\n      return;\n    const document = window.document;\n    const el = unrefElement(element);\n    if (!el) {\n      elementIsVisible.value = false;\n    } else {\n      const rect = el.getBoundingClientRect();\n      elementIsVisible.value = rect.top <= (window.innerHeight || document.documentElement.clientHeight) && rect.left <= (window.innerWidth || document.documentElement.clientWidth) && rect.bottom >= 0 && rect.right >= 0;\n    }\n  };\n  watch(() => unrefElement(element), () => testBounding(), { immediate: true, flush: \"post\" });\n  if (window) {\n    useEventListener(scrollTarget || window, \"scroll\", testBounding, {\n      capture: false,\n      passive: true\n    });\n  }\n  return elementIsVisible;\n}\n\nconst events = new Map();\n\nfunction useEventBus(key) {\n  const scope = getCurrentScope();\n  function on(listener) {\n    var _a;\n    const listeners = events.get(key) || [];\n    listeners.push(listener);\n    events.set(key, listeners);\n    const _off = () => off(listener);\n    (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n    return _off;\n  }\n  function once(listener) {\n    function _listener(...args) {\n      off(_listener);\n      listener(...args);\n    }\n    return on(_listener);\n  }\n  function off(listener) {\n    const listeners = events.get(key);\n    if (!listeners)\n      return;\n    const index = listeners.indexOf(listener);\n    if (index > -1)\n      listeners.splice(index, 1);\n    if (!listeners.length)\n      events.delete(key);\n  }\n  function reset() {\n    events.delete(key);\n  }\n  function emit(event, payload) {\n    var _a;\n    (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n  }\n  return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n  const event = ref(null);\n  const data = ref(null);\n  const status = ref(\"CONNECTING\");\n  const eventSource = ref(null);\n  const error = ref(null);\n  const {\n    withCredentials = false\n  } = options;\n  const close = () => {\n    if (eventSource.value) {\n      eventSource.value.close();\n      eventSource.value = null;\n      status.value = \"CLOSED\";\n    }\n  };\n  const es = new EventSource(url, { withCredentials });\n  eventSource.value = es;\n  es.onopen = () => {\n    status.value = \"OPEN\";\n    error.value = null;\n  };\n  es.onerror = (e) => {\n    status.value = \"CLOSED\";\n    error.value = e;\n  };\n  es.onmessage = (e) => {\n    event.value = null;\n    data.value = e.data;\n  };\n  for (const event_name of events) {\n    useEventListener(es, event_name, (e) => {\n      event.value = event_name;\n      data.value = e.data || null;\n    });\n  }\n  tryOnScopeDispose(() => {\n    close();\n  });\n  return {\n    eventSource,\n    event,\n    data,\n    status,\n    error,\n    close\n  };\n}\n\nfunction useEyeDropper(options = {}) {\n  const { initialValue = \"\" } = options;\n  const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n  const sRGBHex = ref(initialValue);\n  async function open(openOptions) {\n    if (!isSupported.value)\n      return;\n    const eyeDropper = new window.EyeDropper();\n    const result = await eyeDropper.open(openOptions);\n    sRGBHex.value = result.sRGBHex;\n    return result;\n  }\n  return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n  const {\n    baseUrl = \"\",\n    rel = \"icon\",\n    document = defaultDocument\n  } = options;\n  const favicon = resolveRef(newIcon);\n  const applyIcon = (icon) => {\n    document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`).forEach((el) => el.href = `${baseUrl}${icon}`);\n  };\n  watch(favicon, (i, o) => {\n    if (isString(i) && i !== o)\n      applyIcon(i);\n  }, { immediate: true });\n  return favicon;\n}\n\nvar __defProp$d = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$e = Object.getOwnPropertySymbols;\nvar __hasOwnProp$e = Object.prototype.hasOwnProperty;\nvar __propIsEnum$e = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$d = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$e.call(b, prop))\n      __defNormalProp$d(a, prop, b[prop]);\n  if (__getOwnPropSymbols$e)\n    for (var prop of __getOwnPropSymbols$e(b)) {\n      if (__propIsEnum$e.call(b, prop))\n        __defNormalProp$d(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nconst payloadMapping = {\n  json: \"application/json\",\n  text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n  return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\");\n}\nfunction isAbsoluteURL(url) {\n  return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n  if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n    return Object.fromEntries([...headers.entries()]);\n  return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n  if (combination === \"overwrite\") {\n    return async (ctx) => {\n      const callback = callbacks[callbacks.length - 1];\n      if (callback !== void 0)\n        await callback(ctx);\n      return ctx;\n    };\n  } else {\n    return async (ctx) => {\n      await callbacks.reduce((prevCallback, callback) => prevCallback.then(async () => {\n        if (callback)\n          ctx = __spreadValues$d(__spreadValues$d({}, ctx), await callback(ctx));\n      }), Promise.resolve());\n      return ctx;\n    };\n  }\n}\nfunction createFetch(config = {}) {\n  const _combination = config.combination || \"chain\";\n  const _options = config.options || {};\n  const _fetchOptions = config.fetchOptions || {};\n  function useFactoryFetch(url, ...args) {\n    const computedUrl = computed(() => {\n      const baseUrl = resolveUnref(config.baseUrl);\n      const targetUrl = resolveUnref(url);\n      return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n    });\n    let options = _options;\n    let fetchOptions = _fetchOptions;\n    if (args.length > 0) {\n      if (isFetchOptions(args[0])) {\n        options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[0]), {\n          beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n          afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n          onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n        });\n      } else {\n        fetchOptions = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, fetchOptions), args[0]), {\n          headers: __spreadValues$d(__spreadValues$d({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})\n        });\n      }\n    }\n    if (args.length > 1 && isFetchOptions(args[1])) {\n      options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[1]), {\n        beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n        afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n        onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n      });\n    }\n    return useFetch(computedUrl, fetchOptions, options);\n  }\n  return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n  var _a;\n  const supportsAbort = typeof AbortController === \"function\";\n  let fetchOptions = {};\n  let options = { immediate: true, refetch: false, timeout: 0 };\n  const config = {\n    method: \"GET\",\n    type: \"text\",\n    payload: void 0\n  };\n  if (args.length > 0) {\n    if (isFetchOptions(args[0]))\n      options = __spreadValues$d(__spreadValues$d({}, options), args[0]);\n    else\n      fetchOptions = args[0];\n  }\n  if (args.length > 1) {\n    if (isFetchOptions(args[1]))\n      options = __spreadValues$d(__spreadValues$d({}, options), args[1]);\n  }\n  const {\n    fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n    initialData,\n    timeout\n  } = options;\n  const responseEvent = createEventHook();\n  const errorEvent = createEventHook();\n  const finallyEvent = createEventHook();\n  const isFinished = ref(false);\n  const isFetching = ref(false);\n  const aborted = ref(false);\n  const statusCode = ref(null);\n  const response = shallowRef(null);\n  const error = shallowRef(null);\n  const data = shallowRef(initialData);\n  const canAbort = computed(() => supportsAbort && isFetching.value);\n  let controller;\n  let timer;\n  const abort = () => {\n    if (supportsAbort && controller) {\n      controller.abort();\n      controller = void 0;\n    }\n  };\n  const loading = (isLoading) => {\n    isFetching.value = isLoading;\n    isFinished.value = !isLoading;\n  };\n  if (timeout)\n    timer = useTimeoutFn(abort, timeout, { immediate: false });\n  const execute = async (throwOnFailed = false) => {\n    var _a2;\n    loading(true);\n    error.value = null;\n    statusCode.value = null;\n    aborted.value = false;\n    if (supportsAbort) {\n      abort();\n      controller = new AbortController();\n      controller.signal.onabort = () => aborted.value = true;\n      fetchOptions = __spreadProps$3(__spreadValues$d({}, fetchOptions), {\n        signal: controller.signal\n      });\n    }\n    const defaultFetchOptions = {\n      method: config.method,\n      headers: {}\n    };\n    if (config.payload) {\n      const headers = headersToObject(defaultFetchOptions.headers);\n      if (config.payloadType)\n        headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n      const payload = resolveUnref(config.payload);\n      defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n    }\n    let isCanceled = false;\n    const context = {\n      url: resolveUnref(url),\n      options: __spreadValues$d(__spreadValues$d({}, defaultFetchOptions), fetchOptions),\n      cancel: () => {\n        isCanceled = true;\n      }\n    };\n    if (options.beforeFetch)\n      Object.assign(context, await options.beforeFetch(context));\n    if (isCanceled || !fetch) {\n      loading(false);\n      return Promise.resolve(null);\n    }\n    let responseData = null;\n    if (timer)\n      timer.start();\n    return new Promise((resolve, reject) => {\n      var _a3;\n      fetch(context.url, __spreadProps$3(__spreadValues$d(__spreadValues$d({}, defaultFetchOptions), context.options), {\n        headers: __spreadValues$d(__spreadValues$d({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))\n      })).then(async (fetchResponse) => {\n        response.value = fetchResponse;\n        statusCode.value = fetchResponse.status;\n        responseData = await fetchResponse[config.type]();\n        if (options.afterFetch && statusCode.value >= 200 && statusCode.value < 300)\n          ({ data: responseData } = await options.afterFetch({ data: responseData, response: fetchResponse }));\n        data.value = responseData;\n        if (!fetchResponse.ok)\n          throw new Error(fetchResponse.statusText);\n        responseEvent.trigger(fetchResponse);\n        return resolve(fetchResponse);\n      }).catch(async (fetchError) => {\n        let errorData = fetchError.message || fetchError.name;\n        if (options.onFetchError)\n          ({ data: responseData, error: errorData } = await options.onFetchError({ data: responseData, error: fetchError, response: response.value }));\n        data.value = responseData;\n        error.value = errorData;\n        errorEvent.trigger(fetchError);\n        if (throwOnFailed)\n          return reject(fetchError);\n        return resolve(null);\n      }).finally(() => {\n        loading(false);\n        if (timer)\n          timer.stop();\n        finallyEvent.trigger(null);\n      });\n    });\n  };\n  const refetch = resolveRef(options.refetch);\n  watch([\n    refetch,\n    resolveRef(url)\n  ], ([refetch2]) => refetch2 && execute(), { deep: true });\n  const shell = {\n    isFinished,\n    statusCode,\n    response,\n    error,\n    data,\n    isFetching,\n    canAbort,\n    aborted,\n    abort,\n    execute,\n    onFetchResponse: responseEvent.on,\n    onFetchError: errorEvent.on,\n    onFetchFinally: finallyEvent.on,\n    get: setMethod(\"GET\"),\n    put: setMethod(\"PUT\"),\n    post: setMethod(\"POST\"),\n    delete: setMethod(\"DELETE\"),\n    patch: setMethod(\"PATCH\"),\n    head: setMethod(\"HEAD\"),\n    options: setMethod(\"OPTIONS\"),\n    json: setType(\"json\"),\n    text: setType(\"text\"),\n    blob: setType(\"blob\"),\n    arrayBuffer: setType(\"arrayBuffer\"),\n    formData: setType(\"formData\")\n  };\n  function setMethod(method) {\n    return (payload, payloadType) => {\n      if (!isFetching.value) {\n        config.method = method;\n        config.payload = payload;\n        config.payloadType = payloadType;\n        if (isRef(config.payload)) {\n          watch([\n            refetch,\n            resolveRef(config.payload)\n          ], ([refetch2]) => refetch2 && execute(), { deep: true });\n        }\n        const rawPayload = resolveUnref(config.payload);\n        if (!payloadType && rawPayload && Object.getPrototypeOf(rawPayload) === Object.prototype && !(rawPayload instanceof FormData))\n          config.payloadType = \"json\";\n        return __spreadProps$3(__spreadValues$d({}, shell), {\n          then(onFulfilled, onRejected) {\n            return waitUntilFinished().then(onFulfilled, onRejected);\n          }\n        });\n      }\n      return void 0;\n    };\n  }\n  function waitUntilFinished() {\n    return new Promise((resolve, reject) => {\n      until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n    });\n  }\n  function setType(type) {\n    return () => {\n      if (!isFetching.value) {\n        config.type = type;\n        return __spreadProps$3(__spreadValues$d({}, shell), {\n          then(onFulfilled, onRejected) {\n            return waitUntilFinished().then(onFulfilled, onRejected);\n          }\n        });\n      }\n      return void 0;\n    };\n  }\n  if (options.immediate)\n    setTimeout(execute, 0);\n  return __spreadProps$3(__spreadValues$d({}, shell), {\n    then(onFulfilled, onRejected) {\n      return waitUntilFinished().then(onFulfilled, onRejected);\n    }\n  });\n}\nfunction joinPaths(start, end) {\n  if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n    return `${start}/${end}`;\n  return `${start}${end}`;\n}\n\nvar __defProp$c = Object.defineProperty;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$c = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$d.call(b, prop))\n      __defNormalProp$c(a, prop, b[prop]);\n  if (__getOwnPropSymbols$d)\n    for (var prop of __getOwnPropSymbols$d(b)) {\n      if (__propIsEnum$d.call(b, prop))\n        __defNormalProp$c(a, prop, b[prop]);\n    }\n  return a;\n};\nconst DEFAULT_OPTIONS = {\n  multiple: true,\n  accept: \"*\"\n};\nfunction useFileDialog(options = {}) {\n  const {\n    document = defaultDocument\n  } = options;\n  const files = ref(null);\n  let input;\n  if (document) {\n    input = document.createElement(\"input\");\n    input.type = \"file\";\n    input.onchange = (event) => {\n      const result = event.target;\n      files.value = result.files;\n    };\n  }\n  const open = (localOptions) => {\n    if (!input)\n      return;\n    const _options = __spreadValues$c(__spreadValues$c(__spreadValues$c({}, DEFAULT_OPTIONS), options), localOptions);\n    input.multiple = _options.multiple;\n    input.accept = _options.accept;\n    if (hasOwn(_options, \"capture\"))\n      input.capture = _options.capture;\n    input.click();\n  };\n  const reset = () => {\n    files.value = null;\n    if (input)\n      input.value = \"\";\n  };\n  return {\n    files: readonly(files),\n    open,\n    reset\n  };\n}\n\nvar __defProp$b = Object.defineProperty;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$c.call(b, prop))\n      __defNormalProp$b(a, prop, b[prop]);\n  if (__getOwnPropSymbols$c)\n    for (var prop of __getOwnPropSymbols$c(b)) {\n      if (__propIsEnum$c.call(b, prop))\n        __defNormalProp$b(a, prop, b[prop]);\n    }\n  return a;\n};\nfunction useFileSystemAccess(options = {}) {\n  const {\n    window: _window = defaultWindow,\n    dataType = \"Text\"\n  } = unref(options);\n  const window = _window;\n  const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n  const fileHandle = ref();\n  const data = ref();\n  const file = ref();\n  const fileName = computed(() => {\n    var _a, _b;\n    return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n  });\n  const fileMIME = computed(() => {\n    var _a, _b;\n    return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n  });\n  const fileSize = computed(() => {\n    var _a, _b;\n    return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n  });\n  const fileLastModified = computed(() => {\n    var _a, _b;\n    return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n  });\n  async function open(_options = {}) {\n    if (!isSupported.value)\n      return;\n    const [handle] = await window.showOpenFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n    fileHandle.value = handle;\n    await updateFile();\n    await updateData();\n  }\n  async function create(_options = {}) {\n    if (!isSupported.value)\n      return;\n    fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n    data.value = void 0;\n    await updateFile();\n    await updateData();\n  }\n  async function save(_options = {}) {\n    if (!isSupported.value)\n      return;\n    if (!fileHandle.value)\n      return saveAs(_options);\n    if (data.value) {\n      const writableStream = await fileHandle.value.createWritable();\n      await writableStream.write(data.value);\n      await writableStream.close();\n    }\n    await updateFile();\n  }\n  async function saveAs(_options = {}) {\n    if (!isSupported.value)\n      return;\n    fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n    if (data.value) {\n      const writableStream = await fileHandle.value.createWritable();\n      await writableStream.write(data.value);\n      await writableStream.close();\n    }\n    await updateFile();\n  }\n  async function updateFile() {\n    var _a;\n    file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n  }\n  async function updateData() {\n    var _a, _b;\n    if (unref(dataType) === \"Text\")\n      data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n    if (unref(dataType) === \"ArrayBuffer\")\n      data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n    if (unref(dataType) === \"Blob\")\n      data.value = file.value;\n  }\n  watch(() => unref(dataType), updateData);\n  return {\n    isSupported,\n    data,\n    file,\n    fileName,\n    fileMIME,\n    fileSize,\n    fileLastModified,\n    open,\n    create,\n    save,\n    saveAs,\n    updateData\n  };\n}\n\nfunction useFocus(target, options = {}) {\n  const { initialValue = false } = options;\n  const innerFocused = ref(false);\n  const targetElement = computed(() => unrefElement(target));\n  useEventListener(targetElement, \"focus\", () => innerFocused.value = true);\n  useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n  const focused = computed({\n    get: () => innerFocused.value,\n    set(value) {\n      var _a, _b;\n      if (!value && innerFocused.value)\n        (_a = targetElement.value) == null ? void 0 : _a.blur();\n      else if (value && !innerFocused.value)\n        (_b = targetElement.value) == null ? void 0 : _b.focus();\n    }\n  });\n  watch(targetElement, () => {\n    focused.value = initialValue;\n  }, { immediate: true, flush: \"post\" });\n  return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n  const activeElement = useActiveElement(options);\n  const targetElement = computed(() => unrefElement(target));\n  const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n  return { focused };\n}\n\nfunction useFps(options) {\n  var _a;\n  const fps = ref(0);\n  if (typeof performance === \"undefined\")\n    return fps;\n  const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n  let last = performance.now();\n  let ticks = 0;\n  useRafFn(() => {\n    ticks += 1;\n    if (ticks >= every) {\n      const now = performance.now();\n      const diff = now - last;\n      fps.value = Math.round(1e3 / (diff / ticks));\n      last = now;\n      ticks = 0;\n    }\n  });\n  return fps;\n}\n\nconst functionsMap = [\n  [\n    \"requestFullscreen\",\n    \"exitFullscreen\",\n    \"fullscreenElement\",\n    \"fullscreenEnabled\",\n    \"fullscreenchange\",\n    \"fullscreenerror\"\n  ],\n  [\n    \"webkitRequestFullscreen\",\n    \"webkitExitFullscreen\",\n    \"webkitFullscreenElement\",\n    \"webkitFullscreenEnabled\",\n    \"webkitfullscreenchange\",\n    \"webkitfullscreenerror\"\n  ],\n  [\n    \"webkitRequestFullScreen\",\n    \"webkitCancelFullScreen\",\n    \"webkitCurrentFullScreenElement\",\n    \"webkitCancelFullScreen\",\n    \"webkitfullscreenchange\",\n    \"webkitfullscreenerror\"\n  ],\n  [\n    \"mozRequestFullScreen\",\n    \"mozCancelFullScreen\",\n    \"mozFullScreenElement\",\n    \"mozFullScreenEnabled\",\n    \"mozfullscreenchange\",\n    \"mozfullscreenerror\"\n  ],\n  [\n    \"msRequestFullscreen\",\n    \"msExitFullscreen\",\n    \"msFullscreenElement\",\n    \"msFullscreenEnabled\",\n    \"MSFullscreenChange\",\n    \"MSFullscreenError\"\n  ]\n];\nfunction useFullscreen(target, options = {}) {\n  const { document = defaultDocument, autoExit = false } = options;\n  const targetRef = target || (document == null ? void 0 : document.querySelector(\"html\"));\n  const isFullscreen = ref(false);\n  let map = functionsMap[0];\n  const isSupported = useSupported(() => {\n    if (!document) {\n      return false;\n    } else {\n      for (const m of functionsMap) {\n        if (m[1] in document) {\n          map = m;\n          return true;\n        }\n      }\n    }\n    return false;\n  });\n  const [REQUEST, EXIT, ELEMENT, , EVENT] = map;\n  async function exit() {\n    if (!isSupported.value)\n      return;\n    if (document == null ? void 0 : document[ELEMENT])\n      await document[EXIT]();\n    isFullscreen.value = false;\n  }\n  async function enter() {\n    if (!isSupported.value)\n      return;\n    await exit();\n    const target2 = unrefElement(targetRef);\n    if (target2) {\n      await target2[REQUEST]();\n      isFullscreen.value = true;\n    }\n  }\n  async function toggle() {\n    if (isFullscreen.value)\n      await exit();\n    else\n      await enter();\n  }\n  if (document) {\n    useEventListener(document, EVENT, () => {\n      isFullscreen.value = !!(document == null ? void 0 : document[ELEMENT]);\n    }, false);\n  }\n  if (autoExit)\n    tryOnScopeDispose(exit);\n  return {\n    isSupported,\n    isFullscreen,\n    enter,\n    exit,\n    toggle\n  };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n  return computed(() => {\n    if (gamepad.value) {\n      return {\n        buttons: {\n          a: gamepad.value.buttons[0],\n          b: gamepad.value.buttons[1],\n          x: gamepad.value.buttons[2],\n          y: gamepad.value.buttons[3]\n        },\n        bumper: {\n          left: gamepad.value.buttons[4],\n          right: gamepad.value.buttons[5]\n        },\n        triggers: {\n          left: gamepad.value.buttons[6],\n          right: gamepad.value.buttons[7]\n        },\n        stick: {\n          left: {\n            horizontal: gamepad.value.axes[0],\n            vertical: gamepad.value.axes[1],\n            button: gamepad.value.buttons[10]\n          },\n          right: {\n            horizontal: gamepad.value.axes[2],\n            vertical: gamepad.value.axes[3],\n            button: gamepad.value.buttons[11]\n          }\n        },\n        dpad: {\n          up: gamepad.value.buttons[12],\n          down: gamepad.value.buttons[13],\n          left: gamepad.value.buttons[14],\n          right: gamepad.value.buttons[15]\n        },\n        back: gamepad.value.buttons[8],\n        start: gamepad.value.buttons[9]\n      };\n    }\n    return null;\n  });\n}\nfunction useGamepad(options = {}) {\n  const {\n    navigator = defaultNavigator\n  } = options;\n  const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n  const gamepads = ref([]);\n  const onConnectedHook = createEventHook();\n  const onDisconnectedHook = createEventHook();\n  const stateFromGamepad = (gamepad) => {\n    const hapticActuators = [];\n    const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n    if (vibrationActuator)\n      hapticActuators.push(vibrationActuator);\n    if (gamepad.hapticActuators)\n      hapticActuators.push(...gamepad.hapticActuators);\n    return {\n      id: gamepad.id,\n      hapticActuators,\n      index: gamepad.index,\n      mapping: gamepad.mapping,\n      connected: gamepad.connected,\n      timestamp: gamepad.timestamp,\n      axes: gamepad.axes.map((axes) => axes),\n      buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n    };\n  };\n  const updateGamepadState = () => {\n    const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n    for (let i = 0; i < _gamepads.length; ++i) {\n      const gamepad = _gamepads[i];\n      if (gamepad) {\n        const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n        if (index > -1)\n          gamepads.value[index] = stateFromGamepad(gamepad);\n      }\n    }\n  };\n  const { isActive, pause, resume } = useRafFn(updateGamepadState);\n  const onGamepadConnected = (gamepad) => {\n    if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n      gamepads.value.push(stateFromGamepad(gamepad));\n      onConnectedHook.trigger(gamepad.index);\n    }\n    resume();\n  };\n  const onGamepadDisconnected = (gamepad) => {\n    gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n    onDisconnectedHook.trigger(gamepad.index);\n  };\n  useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n  useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n  tryOnMounted(() => {\n    const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n    if (_gamepads) {\n      for (let i = 0; i < _gamepads.length; ++i) {\n        const gamepad = _gamepads[i];\n        if (gamepad)\n          onGamepadConnected(gamepad);\n      }\n    }\n  });\n  pause();\n  return {\n    isSupported,\n    onConnected: onConnectedHook.on,\n    onDisconnected: onDisconnectedHook.on,\n    gamepads,\n    pause,\n    resume,\n    isActive\n  };\n}\n\nfunction useGeolocation(options = {}) {\n  const {\n    enableHighAccuracy = true,\n    maximumAge = 3e4,\n    timeout = 27e3,\n    navigator = defaultNavigator,\n    immediate = true\n  } = options;\n  const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n  const locatedAt = ref(null);\n  const error = ref(null);\n  const coords = ref({\n    accuracy: 0,\n    latitude: Infinity,\n    longitude: Infinity,\n    altitude: null,\n    altitudeAccuracy: null,\n    heading: null,\n    speed: null\n  });\n  function updatePosition(position) {\n    locatedAt.value = position.timestamp;\n    coords.value = position.coords;\n    error.value = null;\n  }\n  let watcher;\n  function resume() {\n    if (isSupported.value) {\n      watcher = navigator.geolocation.watchPosition(updatePosition, (err) => error.value = err, {\n        enableHighAccuracy,\n        maximumAge,\n        timeout\n      });\n    }\n  }\n  if (immediate)\n    resume();\n  function pause() {\n    if (watcher && navigator)\n      navigator.geolocation.clearWatch(watcher);\n  }\n  tryOnScopeDispose(() => {\n    pause();\n  });\n  return {\n    isSupported,\n    coords,\n    locatedAt,\n    error,\n    resume,\n    pause\n  };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n  const {\n    initialState = false,\n    listenForVisibilityChange = true,\n    events = defaultEvents$1,\n    window = defaultWindow,\n    eventFilter = throttleFilter(50)\n  } = options;\n  const idle = ref(initialState);\n  const lastActive = ref(timestamp());\n  let timer;\n  const onEvent = createFilterWrapper(eventFilter, () => {\n    idle.value = false;\n    lastActive.value = timestamp();\n    clearTimeout(timer);\n    timer = setTimeout(() => idle.value = true, timeout);\n  });\n  if (window) {\n    const document = window.document;\n    for (const event of events)\n      useEventListener(window, event, onEvent, { passive: true });\n    if (listenForVisibilityChange) {\n      useEventListener(document, \"visibilitychange\", () => {\n        if (!document.hidden)\n          onEvent();\n      });\n    }\n  }\n  timer = setTimeout(() => idle.value = true, timeout);\n  return { idle, lastActive };\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$b.call(b, prop))\n      __defNormalProp$a(a, prop, b[prop]);\n  if (__getOwnPropSymbols$b)\n    for (var prop of __getOwnPropSymbols$b(b)) {\n      if (__propIsEnum$b.call(b, prop))\n        __defNormalProp$a(a, prop, b[prop]);\n    }\n  return a;\n};\nasync function loadImage(options) {\n  return new Promise((resolve, reject) => {\n    const img = new Image();\n    const { src, srcset, sizes } = options;\n    img.src = src;\n    if (srcset)\n      img.srcset = srcset;\n    if (sizes)\n      img.sizes = sizes;\n    img.onload = () => resolve(img);\n    img.onerror = reject;\n  });\n}\nconst useImage = (options, asyncStateOptions = {}) => {\n  const state = useAsyncState(() => loadImage(resolveUnref(options)), void 0, __spreadValues$a({\n    resetOnExecute: true\n  }, asyncStateOptions));\n  watch(() => resolveUnref(options), () => state.execute(asyncStateOptions.delay), { deep: true });\n  return state;\n};\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n  const {\n    throttle = 0,\n    idle = 200,\n    onStop = noop,\n    onScroll = noop,\n    offset = {\n      left: 0,\n      right: 0,\n      top: 0,\n      bottom: 0\n    },\n    eventListenerOptions = {\n      capture: false,\n      passive: true\n    },\n    behavior = \"auto\"\n  } = options;\n  const internalX = ref(0);\n  const internalY = ref(0);\n  const x = computed({\n    get() {\n      return internalX.value;\n    },\n    set(x2) {\n      scrollTo(x2, void 0);\n    }\n  });\n  const y = computed({\n    get() {\n      return internalY.value;\n    },\n    set(y2) {\n      scrollTo(void 0, y2);\n    }\n  });\n  function scrollTo(_x, _y) {\n    var _a, _b, _c;\n    const _element = resolveUnref(element);\n    if (!_element)\n      return;\n    (_c = _element instanceof Document ? document.body : _element) == null ? void 0 : _c.scrollTo({\n      top: (_a = resolveUnref(_y)) != null ? _a : y.value,\n      left: (_b = resolveUnref(_x)) != null ? _b : x.value,\n      behavior: resolveUnref(behavior)\n    });\n  }\n  const isScrolling = ref(false);\n  const arrivedState = reactive({\n    left: true,\n    right: false,\n    top: true,\n    bottom: false\n  });\n  const directions = reactive({\n    left: false,\n    right: false,\n    top: false,\n    bottom: false\n  });\n  const onScrollEnd = (e) => {\n    if (!isScrolling.value)\n      return;\n    isScrolling.value = false;\n    directions.left = false;\n    directions.right = false;\n    directions.top = false;\n    directions.bottom = false;\n    onStop(e);\n  };\n  const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n  const onScrollHandler = (e) => {\n    const eventTarget = e.target === document ? e.target.documentElement : e.target;\n    const scrollLeft = eventTarget.scrollLeft;\n    directions.left = scrollLeft < internalX.value;\n    directions.right = scrollLeft > internalY.value;\n    arrivedState.left = scrollLeft <= 0 + (offset.left || 0);\n    arrivedState.right = scrollLeft + eventTarget.clientWidth >= eventTarget.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n    internalX.value = scrollLeft;\n    let scrollTop = eventTarget.scrollTop;\n    if (e.target === document && !scrollTop)\n      scrollTop = document.body.scrollTop;\n    directions.top = scrollTop < internalY.value;\n    directions.bottom = scrollTop > internalY.value;\n    arrivedState.top = scrollTop <= 0 + (offset.top || 0);\n    arrivedState.bottom = scrollTop + eventTarget.clientHeight >= eventTarget.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n    internalY.value = scrollTop;\n    isScrolling.value = true;\n    onScrollEndDebounced(e);\n    onScroll(e);\n  };\n  useEventListener(element, \"scroll\", throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions);\n  useEventListener(element, \"scrollend\", onScrollEnd, eventListenerOptions);\n  return {\n    x,\n    y,\n    isScrolling,\n    arrivedState,\n    directions\n  };\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$a.call(b, prop))\n      __defNormalProp$9(a, prop, b[prop]);\n  if (__getOwnPropSymbols$a)\n    for (var prop of __getOwnPropSymbols$a(b)) {\n      if (__propIsEnum$a.call(b, prop))\n        __defNormalProp$9(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n  var _a, _b;\n  const direction = (_a = options.direction) != null ? _a : \"bottom\";\n  const state = reactive(useScroll(element, __spreadProps$2(__spreadValues$9({}, options), {\n    offset: __spreadValues$9({\n      [direction]: (_b = options.distance) != null ? _b : 0\n    }, options.offset)\n  })));\n  watch(() => state.arrivedState[direction], async (v) => {\n    var _a2, _b2;\n    if (v) {\n      const elem = resolveUnref(element);\n      const previous = {\n        height: (_a2 = elem == null ? void 0 : elem.scrollHeight) != null ? _a2 : 0,\n        width: (_b2 = elem == null ? void 0 : elem.scrollWidth) != null ? _b2 : 0\n      };\n      await onLoadMore(state);\n      if (options.preserveScrollPosition && elem) {\n        nextTick(() => {\n          elem.scrollTo({\n            top: elem.scrollHeight - previous.height,\n            left: elem.scrollWidth - previous.width\n          });\n        });\n      }\n    }\n  });\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n  const {\n    root,\n    rootMargin = \"0px\",\n    threshold = 0.1,\n    window = defaultWindow\n  } = options;\n  const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n  let cleanup = noop;\n  const stopWatch = isSupported.value ? watch(() => ({\n    el: unrefElement(target),\n    root: unrefElement(root)\n  }), ({ el, root: root2 }) => {\n    cleanup();\n    if (!el)\n      return;\n    const observer = new IntersectionObserver(callback, {\n      root: root2,\n      rootMargin,\n      threshold\n    });\n    observer.observe(el);\n    cleanup = () => {\n      observer.disconnect();\n      cleanup = noop;\n    };\n  }, { immediate: true, flush: \"post\" }) : noop;\n  const stop = () => {\n    cleanup();\n    stopWatch();\n  };\n  tryOnScopeDispose(stop);\n  return {\n    isSupported,\n    stop\n  };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n  const {\n    events = defaultEvents,\n    document = defaultDocument,\n    initial = null\n  } = options;\n  const state = ref(initial);\n  if (document) {\n    events.forEach((listenerEvent) => {\n      useEventListener(document, listenerEvent, (evt) => {\n        if (typeof evt.getModifierState === \"function\")\n          state.value = evt.getModifierState(modifier);\n      });\n    });\n  }\n  return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n  const { window = defaultWindow } = options;\n  return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n  ctrl: \"control\",\n  command: \"meta\",\n  cmd: \"meta\",\n  option: \"alt\",\n  up: \"arrowup\",\n  down: \"arrowdown\",\n  left: \"arrowleft\",\n  right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n  const {\n    reactive: useReactive = false,\n    target = defaultWindow,\n    aliasMap = DefaultMagicKeysAliasMap,\n    passive = true,\n    onEventFired = noop\n  } = options;\n  const current = reactive(new Set());\n  const obj = {\n    toJSON() {\n      return {};\n    },\n    current\n  };\n  const refs = useReactive ? reactive(obj) : obj;\n  const metaDeps = new Set();\n  const usedKeys = new Set();\n  function setRefs(key, value) {\n    if (key in refs) {\n      if (useReactive)\n        refs[key] = value;\n      else\n        refs[key].value = value;\n    }\n  }\n  function reset() {\n    current.clear();\n    for (const key of usedKeys)\n      setRefs(key, false);\n  }\n  function updateRefs(e, value) {\n    var _a, _b;\n    const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n    const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n    const values = [code, key].filter(Boolean);\n    if (key) {\n      if (value)\n        current.add(key);\n      else\n        current.delete(key);\n    }\n    for (const key2 of values) {\n      usedKeys.add(key2);\n      setRefs(key2, value);\n    }\n    if (key === \"meta\" && !value) {\n      metaDeps.forEach((key2) => {\n        current.delete(key2);\n        setRefs(key2, false);\n      });\n      metaDeps.clear();\n    } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n      [...current, ...values].forEach((key2) => metaDeps.add(key2));\n    }\n  }\n  useEventListener(target, \"keydown\", (e) => {\n    updateRefs(e, true);\n    return onEventFired(e);\n  }, { passive });\n  useEventListener(target, \"keyup\", (e) => {\n    updateRefs(e, false);\n    return onEventFired(e);\n  }, { passive });\n  useEventListener(\"blur\", reset, { passive: true });\n  useEventListener(\"focus\", reset, { passive: true });\n  const proxy = new Proxy(refs, {\n    get(target2, prop, rec) {\n      if (typeof prop !== \"string\")\n        return Reflect.get(target2, prop, rec);\n      prop = prop.toLowerCase();\n      if (prop in aliasMap)\n        prop = aliasMap[prop];\n      if (!(prop in refs)) {\n        if (/[+_-]/.test(prop)) {\n          const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n          refs[prop] = computed(() => keys.every((key) => unref(proxy[key])));\n        } else {\n          refs[prop] = ref(false);\n        }\n      }\n      const r = Reflect.get(target2, prop, rec);\n      return useReactive ? unref(r) : r;\n    }\n  });\n  return proxy;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$9.call(b, prop))\n      __defNormalProp$8(a, prop, b[prop]);\n  if (__getOwnPropSymbols$9)\n    for (var prop of __getOwnPropSymbols$9(b)) {\n      if (__propIsEnum$9.call(b, prop))\n        __defNormalProp$8(a, prop, b[prop]);\n    }\n  return a;\n};\nfunction usingElRef(source, cb) {\n  if (resolveUnref(source))\n    cb(resolveUnref(source));\n}\nfunction timeRangeToArray(timeRanges) {\n  let ranges = [];\n  for (let i = 0; i < timeRanges.length; ++i)\n    ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n  return ranges;\n}\nfunction tracksToArray(tracks) {\n  return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n  src: \"\",\n  tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n  options = __spreadValues$8(__spreadValues$8({}, defaultOptions), options);\n  const {\n    document = defaultDocument\n  } = options;\n  const currentTime = ref(0);\n  const duration = ref(0);\n  const seeking = ref(false);\n  const volume = ref(1);\n  const waiting = ref(false);\n  const ended = ref(false);\n  const playing = ref(false);\n  const rate = ref(1);\n  const stalled = ref(false);\n  const buffered = ref([]);\n  const tracks = ref([]);\n  const selectedTrack = ref(-1);\n  const isPictureInPicture = ref(false);\n  const muted = ref(false);\n  const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n  const sourceErrorEvent = createEventHook();\n  const disableTrack = (track) => {\n    usingElRef(target, (el) => {\n      if (track) {\n        const id = isNumber(track) ? track : track.id;\n        el.textTracks[id].mode = \"disabled\";\n      } else {\n        for (let i = 0; i < el.textTracks.length; ++i)\n          el.textTracks[i].mode = \"disabled\";\n      }\n      selectedTrack.value = -1;\n    });\n  };\n  const enableTrack = (track, disableTracks = true) => {\n    usingElRef(target, (el) => {\n      const id = isNumber(track) ? track : track.id;\n      if (disableTracks)\n        disableTrack();\n      el.textTracks[id].mode = \"showing\";\n      selectedTrack.value = id;\n    });\n  };\n  const togglePictureInPicture = () => {\n    return new Promise((resolve, reject) => {\n      usingElRef(target, async (el) => {\n        if (supportsPictureInPicture) {\n          if (!isPictureInPicture.value) {\n            el.requestPictureInPicture().then(resolve).catch(reject);\n          } else {\n            document.exitPictureInPicture().then(resolve).catch(reject);\n          }\n        }\n      });\n    });\n  };\n  watchEffect(() => {\n    if (!document)\n      return;\n    const el = resolveUnref(target);\n    if (!el)\n      return;\n    const src = resolveUnref(options.src);\n    let sources = [];\n    if (!src)\n      return;\n    if (isString(src))\n      sources = [{ src }];\n    else if (Array.isArray(src))\n      sources = src;\n    else if (isObject(src))\n      sources = [src];\n    el.querySelectorAll(\"source\").forEach((e) => {\n      e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n      e.remove();\n    });\n    sources.forEach(({ src: src2, type }) => {\n      const source = document.createElement(\"source\");\n      source.setAttribute(\"src\", src2);\n      source.setAttribute(\"type\", type || \"\");\n      source.addEventListener(\"error\", sourceErrorEvent.trigger);\n      el.appendChild(source);\n    });\n    el.load();\n  });\n  tryOnScopeDispose(() => {\n    const el = resolveUnref(target);\n    if (!el)\n      return;\n    el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n  });\n  watch(volume, (vol) => {\n    const el = resolveUnref(target);\n    if (!el)\n      return;\n    el.volume = vol;\n  });\n  watch(muted, (mute) => {\n    const el = resolveUnref(target);\n    if (!el)\n      return;\n    el.muted = mute;\n  });\n  watch(rate, (rate2) => {\n    const el = resolveUnref(target);\n    if (!el)\n      return;\n    el.playbackRate = rate2;\n  });\n  watchEffect(() => {\n    if (!document)\n      return;\n    const textTracks = resolveUnref(options.tracks);\n    const el = resolveUnref(target);\n    if (!textTracks || !textTracks.length || !el)\n      return;\n    el.querySelectorAll(\"track\").forEach((e) => e.remove());\n    textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n      const track = document.createElement(\"track\");\n      track.default = isDefault || false;\n      track.kind = kind;\n      track.label = label;\n      track.src = src;\n      track.srclang = srcLang;\n      if (track.default)\n        selectedTrack.value = i;\n      el.appendChild(track);\n    });\n  });\n  const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n    const el = resolveUnref(target);\n    if (!el)\n      return;\n    el.currentTime = time;\n  });\n  const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n    const el = resolveUnref(target);\n    if (!el)\n      return;\n    isPlaying ? el.play() : el.pause();\n  });\n  useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = resolveUnref(target).currentTime));\n  useEventListener(target, \"durationchange\", () => duration.value = resolveUnref(target).duration);\n  useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(resolveUnref(target).buffered));\n  useEventListener(target, \"seeking\", () => seeking.value = true);\n  useEventListener(target, \"seeked\", () => seeking.value = false);\n  useEventListener(target, \"waiting\", () => waiting.value = true);\n  useEventListener(target, \"playing\", () => {\n    waiting.value = false;\n    ended.value = false;\n  });\n  useEventListener(target, \"ratechange\", () => rate.value = resolveUnref(target).playbackRate);\n  useEventListener(target, \"stalled\", () => stalled.value = true);\n  useEventListener(target, \"ended\", () => ended.value = true);\n  useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n  useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n  useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n  useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n  useEventListener(target, \"volumechange\", () => {\n    const el = resolveUnref(target);\n    if (!el)\n      return;\n    volume.value = el.volume;\n    muted.value = el.muted;\n  });\n  const listeners = [];\n  const stop = watch([target], () => {\n    const el = resolveUnref(target);\n    if (!el)\n      return;\n    stop();\n    listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n    listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n    listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n  });\n  tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n  return {\n    currentTime,\n    duration,\n    waiting,\n    seeking,\n    ended,\n    stalled,\n    buffered,\n    playing,\n    rate,\n    volume,\n    muted,\n    tracks,\n    selectedTrack,\n    enableTrack,\n    disableTrack,\n    supportsPictureInPicture,\n    togglePictureInPicture,\n    isPictureInPicture,\n    onSourceError: sourceErrorEvent.on\n  };\n}\n\nconst getMapVue2Compat = () => {\n  const data = reactive({});\n  return {\n    get: (key) => data[key],\n    set: (key, value) => set(data, key, value),\n    has: (key) => hasOwn(data, key),\n    delete: (key) => del(data, key),\n    clear: () => {\n      Object.keys(data).forEach((key) => {\n        del(data, key);\n      });\n    }\n  };\n};\nfunction useMemoize(resolver, options) {\n  const initCache = () => {\n    if (options == null ? void 0 : options.cache)\n      return reactive(options.cache);\n    if (isVue2)\n      return getMapVue2Compat();\n    return reactive(new Map());\n  };\n  const cache = initCache();\n  const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n  const _loadData = (key, ...args) => {\n    cache.set(key, resolver(...args));\n    return cache.get(key);\n  };\n  const loadData = (...args) => _loadData(generateKey(...args), ...args);\n  const deleteData = (...args) => {\n    cache.delete(generateKey(...args));\n  };\n  const clearData = () => {\n    cache.clear();\n  };\n  const memoized = (...args) => {\n    const key = generateKey(...args);\n    if (cache.has(key))\n      return cache.get(key);\n    return _loadData(key, ...args);\n  };\n  memoized.load = loadData;\n  memoized.delete = deleteData;\n  memoized.clear = clearData;\n  memoized.generateKey = generateKey;\n  memoized.cache = cache;\n  return memoized;\n}\n\nfunction useMemory(options = {}) {\n  const memory = ref();\n  const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n  if (isSupported.value) {\n    const { interval = 1e3 } = options;\n    useIntervalFn(() => {\n      memory.value = performance.memory;\n    }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n  }\n  return { isSupported, memory };\n}\n\nfunction useMounted() {\n  const isMounted = ref(false);\n  onMounted(() => {\n    isMounted.value = true;\n  });\n  return isMounted;\n}\n\nfunction useMouse(options = {}) {\n  const {\n    type = \"page\",\n    touch = true,\n    resetOnTouchEnds = false,\n    initialValue = { x: 0, y: 0 },\n    window = defaultWindow,\n    eventFilter\n  } = options;\n  const x = ref(initialValue.x);\n  const y = ref(initialValue.y);\n  const sourceType = ref(null);\n  const mouseHandler = (event) => {\n    if (type === \"page\") {\n      x.value = event.pageX;\n      y.value = event.pageY;\n    } else if (type === \"client\") {\n      x.value = event.clientX;\n      y.value = event.clientY;\n    } else if (type === \"movement\") {\n      x.value = event.movementX;\n      y.value = event.movementY;\n    }\n    sourceType.value = \"mouse\";\n  };\n  const reset = () => {\n    x.value = initialValue.x;\n    y.value = initialValue.y;\n  };\n  const touchHandler = (event) => {\n    if (event.touches.length > 0) {\n      const touch2 = event.touches[0];\n      if (type === \"page\") {\n        x.value = touch2.pageX;\n        y.value = touch2.pageY;\n      } else if (type === \"client\") {\n        x.value = touch2.clientX;\n        y.value = touch2.clientY;\n      }\n      sourceType.value = \"touch\";\n    }\n  };\n  const mouseHandlerWrapper = (event) => {\n    return eventFilter === void 0 ? mouseHandler(event) : eventFilter(() => mouseHandler(event), {});\n  };\n  const touchHandlerWrapper = (event) => {\n    return eventFilter === void 0 ? touchHandler(event) : eventFilter(() => touchHandler(event), {});\n  };\n  if (window) {\n    useEventListener(window, \"mousemove\", mouseHandlerWrapper, { passive: true });\n    useEventListener(window, \"dragover\", mouseHandlerWrapper, { passive: true });\n    if (touch && type !== \"movement\") {\n      useEventListener(window, \"touchstart\", touchHandlerWrapper, { passive: true });\n      useEventListener(window, \"touchmove\", touchHandlerWrapper, { passive: true });\n      if (resetOnTouchEnds)\n        useEventListener(window, \"touchend\", reset, { passive: true });\n    }\n  }\n  return {\n    x,\n    y,\n    sourceType\n  };\n}\n\nfunction useMouseInElement(target, options = {}) {\n  const {\n    handleOutside = true,\n    window = defaultWindow\n  } = options;\n  const { x, y, sourceType } = useMouse(options);\n  const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n  const elementX = ref(0);\n  const elementY = ref(0);\n  const elementPositionX = ref(0);\n  const elementPositionY = ref(0);\n  const elementHeight = ref(0);\n  const elementWidth = ref(0);\n  const isOutside = ref(true);\n  let stop = () => {\n  };\n  if (window) {\n    stop = watch([targetRef, x, y], () => {\n      const el = unrefElement(targetRef);\n      if (!el)\n        return;\n      const {\n        left,\n        top,\n        width,\n        height\n      } = el.getBoundingClientRect();\n      elementPositionX.value = left + window.pageXOffset;\n      elementPositionY.value = top + window.pageYOffset;\n      elementHeight.value = height;\n      elementWidth.value = width;\n      const elX = x.value - elementPositionX.value;\n      const elY = y.value - elementPositionY.value;\n      isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n      if (handleOutside || !isOutside.value) {\n        elementX.value = elX;\n        elementY.value = elY;\n      }\n    }, { immediate: true });\n    useEventListener(document, \"mouseleave\", () => {\n      isOutside.value = true;\n    });\n  }\n  return {\n    x,\n    y,\n    sourceType,\n    elementX,\n    elementY,\n    elementPositionX,\n    elementPositionY,\n    elementHeight,\n    elementWidth,\n    isOutside,\n    stop\n  };\n}\n\nfunction useMousePressed(options = {}) {\n  const {\n    touch = true,\n    drag = true,\n    initialValue = false,\n    window = defaultWindow\n  } = options;\n  const pressed = ref(initialValue);\n  const sourceType = ref(null);\n  if (!window) {\n    return {\n      pressed,\n      sourceType\n    };\n  }\n  const onPressed = (srcType) => () => {\n    pressed.value = true;\n    sourceType.value = srcType;\n  };\n  const onReleased = () => {\n    pressed.value = false;\n    sourceType.value = null;\n  };\n  const target = computed(() => unrefElement(options.target) || window);\n  useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true });\n  useEventListener(window, \"mouseleave\", onReleased, { passive: true });\n  useEventListener(window, \"mouseup\", onReleased, { passive: true });\n  if (drag) {\n    useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true });\n    useEventListener(window, \"drop\", onReleased, { passive: true });\n    useEventListener(window, \"dragend\", onReleased, { passive: true });\n  }\n  if (touch) {\n    useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true });\n    useEventListener(window, \"touchend\", onReleased, { passive: true });\n    useEventListener(window, \"touchcancel\", onReleased, { passive: true });\n  }\n  return {\n    pressed,\n    sourceType\n  };\n}\n\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __objRest$1 = (source, exclude) => {\n  var target = {};\n  for (var prop in source)\n    if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)\n      target[prop] = source[prop];\n  if (source != null && __getOwnPropSymbols$8)\n    for (var prop of __getOwnPropSymbols$8(source)) {\n      if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))\n        target[prop] = source[prop];\n    }\n  return target;\n};\nfunction useMutationObserver(target, callback, options = {}) {\n  const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest$1(_a, [\"window\"]);\n  let observer;\n  const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n  const cleanup = () => {\n    if (observer) {\n      observer.disconnect();\n      observer = void 0;\n    }\n  };\n  const stopWatch = watch(() => unrefElement(target), (el) => {\n    cleanup();\n    if (isSupported.value && window && el) {\n      observer = new MutationObserver(callback);\n      observer.observe(el, mutationOptions);\n    }\n  }, { immediate: true });\n  const stop = () => {\n    cleanup();\n    stopWatch();\n  };\n  tryOnScopeDispose(stop);\n  return {\n    isSupported,\n    stop\n  };\n}\n\nconst useNavigatorLanguage = (options = {}) => {\n  const { window = defaultWindow } = options;\n  const navigator = window == null ? void 0 : window.navigator;\n  const isSupported = useSupported(() => navigator && \"language\" in navigator);\n  const language = ref(navigator == null ? void 0 : navigator.language);\n  useEventListener(window, \"languagechange\", () => {\n    if (navigator)\n      language.value = navigator.language;\n  });\n  return {\n    isSupported,\n    language\n  };\n};\n\nfunction useNetwork(options = {}) {\n  const { window = defaultWindow } = options;\n  const navigator = window == null ? void 0 : window.navigator;\n  const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n  const isOnline = ref(true);\n  const saveData = ref(false);\n  const offlineAt = ref(void 0);\n  const onlineAt = ref(void 0);\n  const downlink = ref(void 0);\n  const downlinkMax = ref(void 0);\n  const rtt = ref(void 0);\n  const effectiveType = ref(void 0);\n  const type = ref(\"unknown\");\n  const connection = isSupported.value && navigator.connection;\n  function updateNetworkInformation() {\n    if (!navigator)\n      return;\n    isOnline.value = navigator.onLine;\n    offlineAt.value = isOnline.value ? void 0 : Date.now();\n    onlineAt.value = isOnline.value ? Date.now() : void 0;\n    if (connection) {\n      downlink.value = connection.downlink;\n      downlinkMax.value = connection.downlinkMax;\n      effectiveType.value = connection.effectiveType;\n      rtt.value = connection.rtt;\n      saveData.value = connection.saveData;\n      type.value = connection.type;\n    }\n  }\n  if (window) {\n    useEventListener(window, \"offline\", () => {\n      isOnline.value = false;\n      offlineAt.value = Date.now();\n    });\n    useEventListener(window, \"online\", () => {\n      isOnline.value = true;\n      onlineAt.value = Date.now();\n    });\n  }\n  if (connection)\n    useEventListener(connection, \"change\", updateNetworkInformation, false);\n  updateNetworkInformation();\n  return {\n    isSupported,\n    isOnline,\n    saveData,\n    offlineAt,\n    onlineAt,\n    downlink,\n    downlinkMax,\n    effectiveType,\n    rtt,\n    type\n  };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$7.call(b, prop))\n      __defNormalProp$7(a, prop, b[prop]);\n  if (__getOwnPropSymbols$7)\n    for (var prop of __getOwnPropSymbols$7(b)) {\n      if (__propIsEnum$7.call(b, prop))\n        __defNormalProp$7(a, prop, b[prop]);\n    }\n  return a;\n};\nfunction useNow(options = {}) {\n  const {\n    controls: exposeControls = false,\n    interval = \"requestAnimationFrame\"\n  } = options;\n  const now = ref(new Date());\n  const update = () => now.value = new Date();\n  const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n  if (exposeControls) {\n    return __spreadValues$7({\n      now\n    }, controls);\n  } else {\n    return now;\n  }\n}\n\nfunction useObjectUrl(object) {\n  const url = ref();\n  const release = () => {\n    if (url.value)\n      URL.revokeObjectURL(url.value);\n    url.value = void 0;\n  };\n  watch(() => unref(object), (newObject) => {\n    release();\n    if (newObject)\n      url.value = URL.createObjectURL(newObject);\n  }, { immediate: true });\n  tryOnScopeDispose(release);\n  return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n  if (isFunction(value) || isReadonly(value))\n    return computed(() => clamp(resolveUnref(value), resolveUnref(min), resolveUnref(max)));\n  const _value = ref(value);\n  return computed({\n    get() {\n      return _value.value = clamp(_value.value, resolveUnref(min), resolveUnref(max));\n    },\n    set(value2) {\n      _value.value = clamp(value2, resolveUnref(min), resolveUnref(max));\n    }\n  });\n}\n\nfunction useOffsetPagination(options) {\n  const {\n    total = Infinity,\n    pageSize = 10,\n    page = 1,\n    onPageChange = noop,\n    onPageSizeChange = noop,\n    onPageCountChange = noop\n  } = options;\n  const currentPageSize = useClamp(pageSize, 1, Infinity);\n  const pageCount = computed(() => Math.max(1, Math.ceil(unref(total) / unref(currentPageSize))));\n  const currentPage = useClamp(page, 1, pageCount);\n  const isFirstPage = computed(() => currentPage.value === 1);\n  const isLastPage = computed(() => currentPage.value === pageCount.value);\n  if (isRef(page))\n    syncRef(page, currentPage);\n  if (isRef(pageSize))\n    syncRef(pageSize, currentPageSize);\n  function prev() {\n    currentPage.value--;\n  }\n  function next() {\n    currentPage.value++;\n  }\n  const returnValue = {\n    currentPage,\n    currentPageSize,\n    pageCount,\n    isFirstPage,\n    isLastPage,\n    prev,\n    next\n  };\n  watch(currentPage, () => {\n    onPageChange(reactive(returnValue));\n  });\n  watch(currentPageSize, () => {\n    onPageSizeChange(reactive(returnValue));\n  });\n  watch(pageCount, () => {\n    onPageCountChange(reactive(returnValue));\n  });\n  return returnValue;\n}\n\nfunction useOnline(options = {}) {\n  const { isOnline } = useNetwork(options);\n  return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n  const { window = defaultWindow } = options;\n  const isLeft = ref(false);\n  const handler = (event) => {\n    if (!window)\n      return;\n    event = event || window.event;\n    const from = event.relatedTarget || event.toElement;\n    isLeft.value = !from;\n  };\n  if (window) {\n    useEventListener(window, \"mouseout\", handler, { passive: true });\n    useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n    useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n  }\n  return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n  const {\n    deviceOrientationTiltAdjust = (i) => i,\n    deviceOrientationRollAdjust = (i) => i,\n    mouseTiltAdjust = (i) => i,\n    mouseRollAdjust = (i) => i,\n    window = defaultWindow\n  } = options;\n  const orientation = reactive(useDeviceOrientation({ window }));\n  const {\n    elementX: x,\n    elementY: y,\n    elementWidth: width,\n    elementHeight: height\n  } = useMouseInElement(target, { handleOutside: false, window });\n  const source = computed(() => {\n    if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n      return \"deviceOrientation\";\n    return \"mouse\";\n  });\n  const roll = computed(() => {\n    if (source.value === \"deviceOrientation\") {\n      const value = -orientation.beta / 90;\n      return deviceOrientationRollAdjust(value);\n    } else {\n      const value = -(y.value - height.value / 2) / height.value;\n      return mouseRollAdjust(value);\n    }\n  });\n  const tilt = computed(() => {\n    if (source.value === \"deviceOrientation\") {\n      const value = orientation.gamma / 90;\n      return deviceOrientationTiltAdjust(value);\n    } else {\n      const value = (x.value - width.value / 2) / width.value;\n      return mouseTiltAdjust(value);\n    }\n  });\n  return { roll, tilt, source };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$6.call(b, prop))\n      __defNormalProp$6(a, prop, b[prop]);\n  if (__getOwnPropSymbols$6)\n    for (var prop of __getOwnPropSymbols$6(b)) {\n      if (__propIsEnum$6.call(b, prop))\n        __defNormalProp$6(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nconst defaultState = {\n  x: 0,\n  y: 0,\n  pointerId: 0,\n  pressure: 0,\n  tiltX: 0,\n  tiltY: 0,\n  width: 0,\n  height: 0,\n  twist: 0,\n  pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n  const {\n    target = defaultWindow\n  } = options;\n  const isInside = ref(false);\n  const state = ref(options.initialValue || {});\n  Object.assign(state.value, defaultState, state.value);\n  const handler = (event) => {\n    isInside.value = true;\n    if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n      return;\n    state.value = objectPick(event, keys, false);\n  };\n  if (target) {\n    useEventListener(target, \"pointerdown\", handler, { passive: true });\n    useEventListener(target, \"pointermove\", handler, { passive: true });\n    useEventListener(target, \"pointerleave\", () => isInside.value = false, { passive: true });\n  }\n  return __spreadProps$1(__spreadValues$6({}, toRefs(state)), {\n    isInside\n  });\n}\n\nfunction usePointerLock(target, options = {}) {\n  const { document = defaultDocument, pointerLockOptions } = options;\n  const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n  const element = ref();\n  const triggerElement = ref();\n  let targetElement;\n  if (isSupported.value) {\n    useEventListener(document, \"pointerlockchange\", () => {\n      var _a;\n      const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n      if (targetElement && currentElement === targetElement) {\n        element.value = document.pointerLockElement;\n        if (!element.value)\n          targetElement = triggerElement.value = null;\n      }\n    });\n    useEventListener(document, \"pointerlockerror\", () => {\n      var _a;\n      const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n      if (targetElement && currentElement === targetElement) {\n        const action = document.pointerLockElement ? \"release\" : \"acquire\";\n        throw new Error(`Failed to ${action} pointer lock.`);\n      }\n    });\n  }\n  async function lock(e, options2) {\n    var _a;\n    if (!isSupported.value)\n      throw new Error(\"Pointer Lock API is not supported by your browser.\");\n    triggerElement.value = e instanceof Event ? e.currentTarget : null;\n    targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n    if (!targetElement)\n      throw new Error(\"Target element undefined.\");\n    targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n    return await until(element).toBe(targetElement);\n  }\n  async function unlock() {\n    if (!element.value)\n      return false;\n    document.exitPointerLock();\n    await until(element).toBeNull();\n    return true;\n  }\n  return {\n    isSupported,\n    element,\n    triggerElement,\n    lock,\n    unlock\n  };\n}\n\nvar SwipeDirection;\n(function(SwipeDirection2) {\n  SwipeDirection2[\"UP\"] = \"UP\";\n  SwipeDirection2[\"RIGHT\"] = \"RIGHT\";\n  SwipeDirection2[\"DOWN\"] = \"DOWN\";\n  SwipeDirection2[\"LEFT\"] = \"LEFT\";\n  SwipeDirection2[\"NONE\"] = \"NONE\";\n})(SwipeDirection || (SwipeDirection = {}));\nfunction useSwipe(target, options = {}) {\n  const {\n    threshold = 50,\n    onSwipe,\n    onSwipeEnd,\n    onSwipeStart,\n    passive = true,\n    window = defaultWindow\n  } = options;\n  const coordsStart = reactive({ x: 0, y: 0 });\n  const coordsEnd = reactive({ x: 0, y: 0 });\n  const diffX = computed(() => coordsStart.x - coordsEnd.x);\n  const diffY = computed(() => coordsStart.y - coordsEnd.y);\n  const { max, abs } = Math;\n  const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n  const isSwiping = ref(false);\n  const direction = computed(() => {\n    if (!isThresholdExceeded.value)\n      return SwipeDirection.NONE;\n    if (abs(diffX.value) > abs(diffY.value)) {\n      return diffX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n    } else {\n      return diffY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n    }\n  });\n  const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n  const updateCoordsStart = (x, y) => {\n    coordsStart.x = x;\n    coordsStart.y = y;\n  };\n  const updateCoordsEnd = (x, y) => {\n    coordsEnd.x = x;\n    coordsEnd.y = y;\n  };\n  let listenerOptions;\n  const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n  if (!passive)\n    listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n  else\n    listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n  const onTouchEnd = (e) => {\n    if (isSwiping.value)\n      onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n    isSwiping.value = false;\n  };\n  const stops = [\n    useEventListener(target, \"touchstart\", (e) => {\n      if (listenerOptions.capture && !listenerOptions.passive)\n        e.preventDefault();\n      const [x, y] = getTouchEventCoords(e);\n      updateCoordsStart(x, y);\n      updateCoordsEnd(x, y);\n      onSwipeStart == null ? void 0 : onSwipeStart(e);\n    }, listenerOptions),\n    useEventListener(target, \"touchmove\", (e) => {\n      const [x, y] = getTouchEventCoords(e);\n      updateCoordsEnd(x, y);\n      if (!isSwiping.value && isThresholdExceeded.value)\n        isSwiping.value = true;\n      if (isSwiping.value)\n        onSwipe == null ? void 0 : onSwipe(e);\n    }, listenerOptions),\n    useEventListener(target, \"touchend\", onTouchEnd, listenerOptions),\n    useEventListener(target, \"touchcancel\", onTouchEnd, listenerOptions)\n  ];\n  const stop = () => stops.forEach((s) => s());\n  return {\n    isPassiveEventSupported,\n    isSwiping,\n    direction,\n    coordsStart,\n    coordsEnd,\n    lengthX: diffX,\n    lengthY: diffY,\n    stop\n  };\n}\nfunction checkPassiveEventSupport(document) {\n  if (!document)\n    return false;\n  let supportsPassive = false;\n  const optionsBlock = {\n    get passive() {\n      supportsPassive = true;\n      return false;\n    }\n  };\n  document.addEventListener(\"x\", noop, optionsBlock);\n  document.removeEventListener(\"x\", noop);\n  return supportsPassive;\n}\n\nfunction usePointerSwipe(target, options = {}) {\n  const targetRef = resolveRef(target);\n  const {\n    threshold = 50,\n    onSwipe,\n    onSwipeEnd,\n    onSwipeStart\n  } = options;\n  const posStart = reactive({ x: 0, y: 0 });\n  const updatePosStart = (x, y) => {\n    posStart.x = x;\n    posStart.y = y;\n  };\n  const posEnd = reactive({ x: 0, y: 0 });\n  const updatePosEnd = (x, y) => {\n    posEnd.x = x;\n    posEnd.y = y;\n  };\n  const distanceX = computed(() => posStart.x - posEnd.x);\n  const distanceY = computed(() => posStart.y - posEnd.y);\n  const { max, abs } = Math;\n  const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n  const isSwiping = ref(false);\n  const isPointerDown = ref(false);\n  const direction = computed(() => {\n    if (!isThresholdExceeded.value)\n      return SwipeDirection.NONE;\n    if (abs(distanceX.value) > abs(distanceY.value)) {\n      return distanceX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n    } else {\n      return distanceY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n    }\n  });\n  const eventIsAllowed = (e) => {\n    var _a, _b, _c;\n    const isReleasingButton = e.buttons === 0;\n    const isPrimaryButton = e.buttons === 1;\n    return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n  };\n  const stops = [\n    useEventListener(target, \"pointerdown\", (e) => {\n      var _a, _b;\n      if (!eventIsAllowed(e))\n        return;\n      isPointerDown.value = true;\n      (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n      const eventTarget = e.target;\n      eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n      const { clientX: x, clientY: y } = e;\n      updatePosStart(x, y);\n      updatePosEnd(x, y);\n      onSwipeStart == null ? void 0 : onSwipeStart(e);\n    }),\n    useEventListener(target, \"pointermove\", (e) => {\n      if (!eventIsAllowed(e))\n        return;\n      if (!isPointerDown.value)\n        return;\n      const { clientX: x, clientY: y } = e;\n      updatePosEnd(x, y);\n      if (!isSwiping.value && isThresholdExceeded.value)\n        isSwiping.value = true;\n      if (isSwiping.value)\n        onSwipe == null ? void 0 : onSwipe(e);\n    }),\n    useEventListener(target, \"pointerup\", (e) => {\n      var _a, _b;\n      if (!eventIsAllowed(e))\n        return;\n      if (isSwiping.value)\n        onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n      isPointerDown.value = false;\n      isSwiping.value = false;\n      (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"initial\");\n    })\n  ];\n  const stop = () => stops.forEach((s) => s());\n  return {\n    isSwiping: readonly(isSwiping),\n    direction: readonly(direction),\n    posStart: readonly(posStart),\n    posEnd: readonly(posEnd),\n    distanceX,\n    distanceY,\n    stop\n  };\n}\n\nfunction usePreferredColorScheme(options) {\n  const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n  const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n  return computed(() => {\n    if (isDark.value)\n      return \"dark\";\n    if (isLight.value)\n      return \"light\";\n    return \"no-preference\";\n  });\n}\n\nfunction usePreferredContrast(options) {\n  const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n  const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n  const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n  return computed(() => {\n    if (isMore.value)\n      return \"more\";\n    if (isLess.value)\n      return \"less\";\n    if (isCustom.value)\n      return \"custom\";\n    return \"no-preference\";\n  });\n}\n\nfunction usePreferredLanguages(options = {}) {\n  const { window = defaultWindow } = options;\n  if (!window)\n    return ref([\"en\"]);\n  const navigator = window.navigator;\n  const value = ref(navigator.languages);\n  useEventListener(window, \"languagechange\", () => {\n    value.value = navigator.languages;\n  });\n  return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n  const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n  return computed(() => {\n    if (isReduced.value)\n      return \"reduce\";\n    return \"no-preference\";\n  });\n}\n\nfunction usePrevious(value, initialValue) {\n  const previous = shallowRef(initialValue);\n  watch(resolveRef(value), (_, oldValue) => {\n    previous.value = oldValue;\n  }, { flush: \"sync\" });\n  return readonly(previous);\n}\n\nconst useScreenOrientation = (options = {}) => {\n  const {\n    window = defaultWindow\n  } = options;\n  const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n  const screenOrientation = isSupported.value ? window.screen.orientation : {};\n  const orientation = ref(screenOrientation.type);\n  const angle = ref(screenOrientation.angle || 0);\n  if (isSupported.value) {\n    useEventListener(window, \"orientationchange\", () => {\n      orientation.value = screenOrientation.type;\n      angle.value = screenOrientation.angle;\n    });\n  }\n  const lockOrientation = (type) => {\n    if (!isSupported.value)\n      return Promise.reject(new Error(\"Not supported\"));\n    return screenOrientation.lock(type);\n  };\n  const unlockOrientation = () => {\n    if (isSupported.value)\n      screenOrientation.unlock();\n  };\n  return {\n    isSupported,\n    orientation,\n    angle,\n    lockOrientation,\n    unlockOrientation\n  };\n};\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n  const top = ref(\"\");\n  const right = ref(\"\");\n  const bottom = ref(\"\");\n  const left = ref(\"\");\n  if (isClient) {\n    const topCssVar = useCssVar(topVarName);\n    const rightCssVar = useCssVar(rightVarName);\n    const bottomCssVar = useCssVar(bottomVarName);\n    const leftCssVar = useCssVar(leftVarName);\n    topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n    rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n    bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n    leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n    update();\n    useEventListener(\"resize\", useDebounceFn(update));\n  }\n  function update() {\n    top.value = getValue(topVarName);\n    right.value = getValue(rightVarName);\n    bottom.value = getValue(bottomVarName);\n    left.value = getValue(leftVarName);\n  }\n  return {\n    top,\n    right,\n    bottom,\n    left,\n    update\n  };\n}\nfunction getValue(position) {\n  return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n  const {\n    immediate = true,\n    manual = false,\n    type = \"text/javascript\",\n    async = true,\n    crossOrigin,\n    referrerPolicy,\n    noModule,\n    defer,\n    document = defaultDocument,\n    attrs = {}\n  } = options;\n  const scriptTag = ref(null);\n  let _promise = null;\n  const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n    const resolveWithElement = (el2) => {\n      scriptTag.value = el2;\n      resolve(el2);\n      return el2;\n    };\n    if (!document) {\n      resolve(false);\n      return;\n    }\n    let shouldAppend = false;\n    let el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n    if (!el) {\n      el = document.createElement(\"script\");\n      el.type = type;\n      el.async = async;\n      el.src = resolveUnref(src);\n      if (defer)\n        el.defer = defer;\n      if (crossOrigin)\n        el.crossOrigin = crossOrigin;\n      if (noModule)\n        el.noModule = noModule;\n      if (referrerPolicy)\n        el.referrerPolicy = referrerPolicy;\n      Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n      shouldAppend = true;\n    } else if (el.hasAttribute(\"data-loaded\")) {\n      resolveWithElement(el);\n    }\n    el.addEventListener(\"error\", (event) => reject(event));\n    el.addEventListener(\"abort\", (event) => reject(event));\n    el.addEventListener(\"load\", () => {\n      el.setAttribute(\"data-loaded\", \"true\");\n      onLoaded(el);\n      resolveWithElement(el);\n    });\n    if (shouldAppend)\n      el = document.head.appendChild(el);\n    if (!waitForScriptLoad)\n      resolveWithElement(el);\n  });\n  const load = (waitForScriptLoad = true) => {\n    if (!_promise)\n      _promise = loadScript(waitForScriptLoad);\n    return _promise;\n  };\n  const unload = () => {\n    if (!document)\n      return;\n    _promise = null;\n    if (scriptTag.value)\n      scriptTag.value = null;\n    const el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n    if (el)\n      document.head.removeChild(el);\n  };\n  if (immediate && !manual)\n    tryOnMounted(load);\n  if (!manual)\n    tryOnUnmounted(unload);\n  return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n  const style = window.getComputedStyle(ele);\n  if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientHeight < ele.scrollHeight || style.overflowY === \"auto\" && ele.clientWidth < ele.scrollWidth) {\n    return true;\n  } else {\n    const parent = ele.parentNode;\n    if (!parent || parent.tagName === \"BODY\")\n      return false;\n    return checkOverflowScroll(parent);\n  }\n}\nfunction preventDefault(rawEvent) {\n  const e = rawEvent || window.event;\n  const _target = e.target;\n  if (checkOverflowScroll(_target))\n    return false;\n  if (e.touches.length > 1)\n    return true;\n  if (e.preventDefault)\n    e.preventDefault();\n  return false;\n}\nfunction useScrollLock(element, initialState = false) {\n  const isLocked = ref(initialState);\n  let stopTouchMoveListener = null;\n  let initialOverflow;\n  watch(resolveRef(element), (el) => {\n    if (el) {\n      const ele = el;\n      initialOverflow = ele.style.overflow;\n      if (isLocked.value)\n        ele.style.overflow = \"hidden\";\n    }\n  }, {\n    immediate: true\n  });\n  const lock = () => {\n    const ele = resolveUnref(element);\n    if (!ele || isLocked.value)\n      return;\n    if (isIOS) {\n      stopTouchMoveListener = useEventListener(ele, \"touchmove\", (e) => {\n        preventDefault(e);\n      }, { passive: false });\n    }\n    ele.style.overflow = \"hidden\";\n    isLocked.value = true;\n  };\n  const unlock = () => {\n    const ele = resolveUnref(element);\n    if (!ele || !isLocked.value)\n      return;\n    isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n    ele.style.overflow = initialOverflow;\n    isLocked.value = false;\n  };\n  tryOnScopeDispose(unlock);\n  return computed({\n    get() {\n      return isLocked.value;\n    },\n    set(v) {\n      if (v)\n        lock();\n      else\n        unlock();\n    }\n  });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n  const { window = defaultWindow } = options;\n  return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$5.call(b, prop))\n      __defNormalProp$5(a, prop, b[prop]);\n  if (__getOwnPropSymbols$5)\n    for (var prop of __getOwnPropSymbols$5(b)) {\n      if (__propIsEnum$5.call(b, prop))\n        __defNormalProp$5(a, prop, b[prop]);\n    }\n  return a;\n};\nfunction useShare(shareOptions = {}, options = {}) {\n  const { navigator = defaultNavigator } = options;\n  const _navigator = navigator;\n  const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n  const share = async (overrideOptions = {}) => {\n    if (isSupported.value) {\n      const data = __spreadValues$5(__spreadValues$5({}, resolveUnref(shareOptions)), resolveUnref(overrideOptions));\n      let granted = true;\n      if (data.files && _navigator.canShare)\n        granted = _navigator.canShare({ files: data.files });\n      if (granted)\n        return _navigator.share(data);\n    }\n  };\n  return {\n    isSupported,\n    share\n  };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n  var _a, _b, _c, _d;\n  const [source] = args;\n  let compareFn = defaultCompare;\n  let options = {};\n  if (args.length === 2) {\n    if (typeof args[1] === \"object\") {\n      options = args[1];\n      compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n    } else {\n      compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n    }\n  } else if (args.length > 2) {\n    compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n    options = (_d = args[2]) != null ? _d : {};\n  }\n  const {\n    dirty = false,\n    sortFn = defaultSortFn\n  } = options;\n  if (!dirty)\n    return computed(() => sortFn([...unref(source)], compareFn));\n  watchEffect(() => {\n    const result = sortFn(unref(source), compareFn);\n    if (isRef(source))\n      source.value = result;\n    else\n      source.splice(0, source.length, ...result);\n  });\n  return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n  const {\n    interimResults = true,\n    continuous = true,\n    window = defaultWindow\n  } = options;\n  const lang = resolveRef(options.lang || \"en-US\");\n  const isListening = ref(false);\n  const isFinal = ref(false);\n  const result = ref(\"\");\n  const error = shallowRef(void 0);\n  const toggle = (value = !isListening.value) => {\n    isListening.value = value;\n  };\n  const start = () => {\n    isListening.value = true;\n  };\n  const stop = () => {\n    isListening.value = false;\n  };\n  const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n  const isSupported = useSupported(() => SpeechRecognition);\n  let recognition;\n  if (isSupported.value) {\n    recognition = new SpeechRecognition();\n    recognition.continuous = continuous;\n    recognition.interimResults = interimResults;\n    recognition.lang = unref(lang);\n    recognition.onstart = () => {\n      isFinal.value = false;\n    };\n    watch(lang, (lang2) => {\n      if (recognition && !isListening.value)\n        recognition.lang = lang2;\n    });\n    recognition.onresult = (event) => {\n      const transcript = Array.from(event.results).map((result2) => {\n        isFinal.value = result2.isFinal;\n        return result2[0];\n      }).map((result2) => result2.transcript).join(\"\");\n      result.value = transcript;\n      error.value = void 0;\n    };\n    recognition.onerror = (event) => {\n      error.value = event;\n    };\n    recognition.onend = () => {\n      isListening.value = false;\n      recognition.lang = unref(lang);\n    };\n    watch(isListening, () => {\n      if (isListening.value)\n        recognition.start();\n      else\n        recognition.stop();\n    });\n  }\n  tryOnScopeDispose(() => {\n    isListening.value = false;\n  });\n  return {\n    isSupported,\n    isListening,\n    isFinal,\n    recognition,\n    result,\n    error,\n    toggle,\n    start,\n    stop\n  };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n  const {\n    pitch = 1,\n    rate = 1,\n    volume = 1,\n    window = defaultWindow\n  } = options;\n  const synth = window && window.speechSynthesis;\n  const isSupported = useSupported(() => synth);\n  const isPlaying = ref(false);\n  const status = ref(\"init\");\n  const spokenText = resolveRef(text || \"\");\n  const lang = resolveRef(options.lang || \"en-US\");\n  const error = shallowRef(void 0);\n  const toggle = (value = !isPlaying.value) => {\n    isPlaying.value = value;\n  };\n  const bindEventsForUtterance = (utterance2) => {\n    utterance2.lang = unref(lang);\n    utterance2.voice = unref(options.voice) || null;\n    utterance2.pitch = pitch;\n    utterance2.rate = rate;\n    utterance2.volume = volume;\n    utterance2.onstart = () => {\n      isPlaying.value = true;\n      status.value = \"play\";\n    };\n    utterance2.onpause = () => {\n      isPlaying.value = false;\n      status.value = \"pause\";\n    };\n    utterance2.onresume = () => {\n      isPlaying.value = true;\n      status.value = \"play\";\n    };\n    utterance2.onend = () => {\n      isPlaying.value = false;\n      status.value = \"end\";\n    };\n    utterance2.onerror = (event) => {\n      error.value = event;\n    };\n  };\n  const utterance = computed(() => {\n    isPlaying.value = false;\n    status.value = \"init\";\n    const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n    bindEventsForUtterance(newUtterance);\n    return newUtterance;\n  });\n  const speak = () => {\n    synth.cancel();\n    utterance && synth.speak(utterance.value);\n  };\n  const stop = () => {\n    synth.cancel();\n    isPlaying.value = false;\n  };\n  if (isSupported.value) {\n    bindEventsForUtterance(utterance.value);\n    watch(lang, (lang2) => {\n      if (utterance.value && !isPlaying.value)\n        utterance.value.lang = lang2;\n    });\n    if (options.voice) {\n      watch(options.voice, () => {\n        synth.cancel();\n      });\n    }\n    watch(isPlaying, () => {\n      if (isPlaying.value)\n        synth.resume();\n      else\n        synth.pause();\n    });\n  }\n  tryOnScopeDispose(() => {\n    isPlaying.value = false;\n  });\n  return {\n    isSupported,\n    isPlaying,\n    status,\n    utterance,\n    error,\n    stop,\n    toggle,\n    speak\n  };\n}\n\nfunction useStepper(steps, initialStep) {\n  const stepsRef = ref(steps);\n  const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n  const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n  const current = computed(() => at(index.value));\n  const isFirst = computed(() => index.value === 0);\n  const isLast = computed(() => index.value === stepNames.value.length - 1);\n  const next = computed(() => stepNames.value[index.value + 1]);\n  const previous = computed(() => stepNames.value[index.value - 1]);\n  function at(index2) {\n    if (Array.isArray(stepsRef.value))\n      return stepsRef.value[index2];\n    return stepsRef.value[stepNames.value[index2]];\n  }\n  function get(step) {\n    if (!stepNames.value.includes(step))\n      return;\n    return at(stepNames.value.indexOf(step));\n  }\n  function goTo(step) {\n    if (stepNames.value.includes(step))\n      index.value = stepNames.value.indexOf(step);\n  }\n  function goToNext() {\n    if (isLast.value)\n      return;\n    index.value++;\n  }\n  function goToPrevious() {\n    if (isFirst.value)\n      return;\n    index.value--;\n  }\n  function goBackTo(step) {\n    if (isAfter(step))\n      goTo(step);\n  }\n  function isNext(step) {\n    return stepNames.value.indexOf(step) === index.value + 1;\n  }\n  function isPrevious(step) {\n    return stepNames.value.indexOf(step) === index.value - 1;\n  }\n  function isCurrent(step) {\n    return stepNames.value.indexOf(step) === index.value;\n  }\n  function isBefore(step) {\n    return index.value < stepNames.value.indexOf(step);\n  }\n  function isAfter(step) {\n    return index.value > stepNames.value.indexOf(step);\n  }\n  return {\n    steps: stepsRef,\n    stepNames,\n    index,\n    current,\n    next,\n    previous,\n    isFirst,\n    isLast,\n    at,\n    get,\n    goTo,\n    goToNext,\n    goToPrevious,\n    goBackTo,\n    isNext,\n    isPrevious,\n    isCurrent,\n    isBefore,\n    isAfter\n  };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$4.call(b, prop))\n      __defNormalProp$4(a, prop, b[prop]);\n  if (__getOwnPropSymbols$4)\n    for (var prop of __getOwnPropSymbols$4(b)) {\n      if (__propIsEnum$4.call(b, prop))\n        __defNormalProp$4(a, prop, b[prop]);\n    }\n  return a;\n};\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n  var _a;\n  const {\n    flush = \"pre\",\n    deep = true,\n    listenToStorageChanges = true,\n    writeDefaults = true,\n    mergeDefaults = false,\n    shallow,\n    window = defaultWindow,\n    eventFilter,\n    onError = (e) => {\n      console.error(e);\n    }\n  } = options;\n  const rawInit = resolveUnref(initialValue);\n  const type = guessSerializerType(rawInit);\n  const data = (shallow ? shallowRef : ref)(initialValue);\n  const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n  if (!storage) {\n    try {\n      storage = getSSRHandler(\"getDefaultStorage\", () => {\n        var _a2;\n        return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n      })();\n    } catch (e) {\n      onError(e);\n    }\n  }\n  async function read(event) {\n    if (!storage || event && event.key !== key)\n      return;\n    try {\n      const rawValue = event ? event.newValue : await storage.getItem(key);\n      if (rawValue == null) {\n        data.value = rawInit;\n        if (writeDefaults && rawInit !== null)\n          await storage.setItem(key, await serializer.write(rawInit));\n      } else if (mergeDefaults) {\n        const value = await serializer.read(rawValue);\n        if (isFunction(mergeDefaults))\n          data.value = mergeDefaults(value, rawInit);\n        else if (type === \"object\" && !Array.isArray(value))\n          data.value = __spreadValues$4(__spreadValues$4({}, rawInit), value);\n        else\n          data.value = value;\n      } else {\n        data.value = await serializer.read(rawValue);\n      }\n    } catch (e) {\n      onError(e);\n    }\n  }\n  read();\n  if (window && listenToStorageChanges)\n    useEventListener(window, \"storage\", (e) => setTimeout(() => read(e), 0));\n  if (storage) {\n    watchWithFilter(data, async () => {\n      try {\n        if (data.value == null)\n          await storage.removeItem(key);\n        else\n          await storage.setItem(key, await serializer.write(data.value));\n      } catch (e) {\n        onError(e);\n      }\n    }, {\n      flush,\n      deep,\n      eventFilter\n    });\n  }\n  return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n  const isLoaded = ref(false);\n  const {\n    document = defaultDocument,\n    immediate = true,\n    manual = false,\n    id = `vueuse_styletag_${++_id}`\n  } = options;\n  const cssRef = ref(css);\n  let stop = () => {\n  };\n  const load = () => {\n    if (!document)\n      return;\n    const el = document.getElementById(id) || document.createElement(\"style\");\n    if (!el.isConnected) {\n      el.type = \"text/css\";\n      el.id = id;\n      if (options.media)\n        el.media = options.media;\n      document.head.appendChild(el);\n    }\n    if (isLoaded.value)\n      return;\n    stop = watch(cssRef, (value) => {\n      el.textContent = value;\n    }, { immediate: true });\n    isLoaded.value = true;\n  };\n  const unload = () => {\n    if (!document || !isLoaded.value)\n      return;\n    stop();\n    document.head.removeChild(document.getElementById(id));\n    isLoaded.value = false;\n  };\n  if (immediate && !manual)\n    tryOnMounted(load);\n  if (!manual)\n    tryOnScopeDispose(unload);\n  return {\n    id,\n    css: cssRef,\n    unload,\n    load,\n    isLoaded: readonly(isLoaded)\n  };\n}\n\nfunction useTemplateRefsList() {\n  const refs = ref([]);\n  refs.value.set = (el) => {\n    if (el)\n      refs.value.push(el);\n  };\n  onBeforeUpdate(() => {\n    refs.value.length = 0;\n  });\n  return refs;\n}\n\nfunction useTextDirection(options = {}) {\n  const {\n    document = defaultDocument,\n    selector = \"html\",\n    observe = false,\n    initialValue = \"ltr\"\n  } = options;\n  function getValue() {\n    var _a, _b;\n    return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n  }\n  const dir = ref(getValue());\n  tryOnMounted(() => dir.value = getValue());\n  if (observe && document) {\n    useMutationObserver(document.querySelector(selector), () => dir.value = getValue(), { attributes: true });\n  }\n  return computed({\n    get() {\n      return dir.value;\n    },\n    set(v) {\n      var _a, _b;\n      dir.value = v;\n      if (!document)\n        return;\n      if (dir.value)\n        (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n      else\n        (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n    }\n  });\n}\n\nfunction getRangesFromSelection(selection) {\n  var _a;\n  const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n  const ranges = new Array(rangeCount);\n  for (let i = 0; i < rangeCount; i++) {\n    const range = selection.getRangeAt(i);\n    ranges[i] = range;\n  }\n  return ranges;\n}\nfunction useTextSelection(options = {}) {\n  const {\n    window = defaultWindow\n  } = options;\n  const selection = ref(null);\n  const text = computed(() => {\n    var _a, _b;\n    return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n  });\n  const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n  const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n  function onSelectionChange() {\n    selection.value = null;\n    if (window)\n      selection.value = window.getSelection();\n  }\n  if (window)\n    useEventListener(window.document, \"selectionchange\", onSelectionChange);\n  return {\n    text,\n    rects,\n    ranges,\n    selection\n  };\n}\n\nfunction useTextareaAutosize(options) {\n  const textarea = ref(options == null ? void 0 : options.element);\n  const input = ref(options == null ? void 0 : options.input);\n  function triggerResize() {\n    var _a, _b;\n    if (!textarea.value)\n      return;\n    textarea.value.style.height = \"1px\";\n    textarea.value.style.height = `${(_a = textarea.value) == null ? void 0 : _a.scrollHeight}px`;\n    (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n  }\n  watch([input, textarea], triggerResize, { immediate: true });\n  useResizeObserver(textarea, () => triggerResize());\n  if (options == null ? void 0 : options.watch)\n    watch(options.watch, triggerResize, { immediate: true, deep: true });\n  return {\n    textarea,\n    input,\n    triggerResize\n  };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$3.call(b, prop))\n      __defNormalProp$3(a, prop, b[prop]);\n  if (__getOwnPropSymbols$3)\n    for (var prop of __getOwnPropSymbols$3(b)) {\n      if (__propIsEnum$3.call(b, prop))\n        __defNormalProp$3(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction useThrottledRefHistory(source, options = {}) {\n  const { throttle = 200, trailing = true } = options;\n  const filter = throttleFilter(throttle, trailing);\n  const history = useRefHistory(source, __spreadProps(__spreadValues$3({}, options), { eventFilter: filter }));\n  return __spreadValues$3({}, history);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$2.call(b, prop))\n      __defNormalProp$2(a, prop, b[prop]);\n  if (__getOwnPropSymbols$2)\n    for (var prop of __getOwnPropSymbols$2(b)) {\n      if (__propIsEnum$2.call(b, prop))\n        __defNormalProp$2(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __objRest = (source, exclude) => {\n  var target = {};\n  for (var prop in source)\n    if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n      target[prop] = source[prop];\n  if (source != null && __getOwnPropSymbols$2)\n    for (var prop of __getOwnPropSymbols$2(source)) {\n      if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n        target[prop] = source[prop];\n    }\n  return target;\n};\nconst DEFAULT_UNITS = [\n  { max: 6e4, value: 1e3, name: \"second\" },\n  { max: 276e4, value: 6e4, name: \"minute\" },\n  { max: 72e6, value: 36e5, name: \"hour\" },\n  { max: 5184e5, value: 864e5, name: \"day\" },\n  { max: 24192e5, value: 6048e5, name: \"week\" },\n  { max: 28512e6, value: 2592e6, name: \"month\" },\n  { max: Infinity, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n  justNow: \"just now\",\n  past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n  future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n  month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n  year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n  day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n  week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n  hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n  minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n  second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n  invalid: \"\"\n};\nconst DEFAULT_FORMATTER = (date) => date.toISOString().slice(0, 10);\nfunction useTimeAgo(time, options = {}) {\n  const {\n    controls: exposeControls = false,\n    updateInterval = 3e4\n  } = options;\n  const _a = useNow({ interval: updateInterval, controls: true }), { now } = _a, controls = __objRest(_a, [\"now\"]);\n  const timeAgo = computed(() => formatTimeAgo(new Date(resolveUnref(time)), options, unref(now.value)));\n  if (exposeControls) {\n    return __spreadValues$2({\n      timeAgo\n    }, controls);\n  } else {\n    return timeAgo;\n  }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n  var _a;\n  const {\n    max,\n    messages = DEFAULT_MESSAGES,\n    fullDateFormatter = DEFAULT_FORMATTER,\n    units = DEFAULT_UNITS,\n    showSecond = false,\n    rounding = \"round\"\n  } = options;\n  const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n  const diff = +now - +from;\n  const absDiff = Math.abs(diff);\n  function getValue(diff2, unit) {\n    return roundFn(Math.abs(diff2) / unit.value);\n  }\n  function format(diff2, unit) {\n    const val = getValue(diff2, unit);\n    const past = diff2 > 0;\n    const str = applyFormat(unit.name, val, past);\n    return applyFormat(past ? \"past\" : \"future\", str, past);\n  }\n  function applyFormat(name, val, isPast) {\n    const formatter = messages[name];\n    if (typeof formatter === \"function\")\n      return formatter(val, isPast);\n    return formatter.replace(\"{0}\", val.toString());\n  }\n  if (absDiff < 6e4 && !showSecond)\n    return messages.justNow;\n  if (typeof max === \"number\" && absDiff > max)\n    return fullDateFormatter(new Date(from));\n  if (typeof max === \"string\") {\n    const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n    if (unitMax && absDiff > unitMax)\n      return fullDateFormatter(new Date(from));\n  }\n  for (const [idx, unit] of units.entries()) {\n    const val = getValue(diff, unit);\n    if (val <= 0 && units[idx - 1])\n      return format(diff, units[idx - 1]);\n    if (absDiff < unit.max)\n      return format(diff, unit);\n  }\n  return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n  const { start } = useTimeoutFn(loop, interval);\n  const isActive = ref(false);\n  async function loop() {\n    if (!isActive.value)\n      return;\n    await fn();\n    start();\n  }\n  function resume() {\n    if (!isActive.value) {\n      isActive.value = true;\n      loop();\n    }\n  }\n  function pause() {\n    isActive.value = false;\n  }\n  if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n    resume();\n  tryOnScopeDispose(pause);\n  return {\n    isActive,\n    pause,\n    resume\n  };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp$1.call(b, prop))\n      __defNormalProp$1(a, prop, b[prop]);\n  if (__getOwnPropSymbols$1)\n    for (var prop of __getOwnPropSymbols$1(b)) {\n      if (__propIsEnum$1.call(b, prop))\n        __defNormalProp$1(a, prop, b[prop]);\n    }\n  return a;\n};\nfunction useTimestamp(options = {}) {\n  const {\n    controls: exposeControls = false,\n    offset = 0,\n    immediate = true,\n    interval = \"requestAnimationFrame\",\n    callback\n  } = options;\n  const ts = ref(timestamp() + offset);\n  const update = () => ts.value = timestamp() + offset;\n  const cb = callback ? () => {\n    update();\n    callback(ts.value);\n  } : update;\n  const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n  if (exposeControls) {\n    return __spreadValues$1({\n      timestamp: ts\n    }, controls);\n  } else {\n    return ts;\n  }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n  var _a, _b;\n  const {\n    document = defaultDocument\n  } = options;\n  const title = resolveRef((_a = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _a : null);\n  const isReadonly = newTitle && isFunction(newTitle);\n  function format(t) {\n    if (!(\"titleTemplate\" in options))\n      return t;\n    const template = options.titleTemplate || \"%s\";\n    return isFunction(template) ? template(t) : unref(template).replace(/%s/g, t);\n  }\n  watch(title, (t, o) => {\n    if (t !== o && document)\n      document.title = format(isString(t) ? t : \"\");\n  }, { immediate: true });\n  if (options.observe && !options.titleTemplate && document && !isReadonly) {\n    useMutationObserver((_b = document.head) == null ? void 0 : _b.querySelector(\"title\"), () => {\n      if (document && document.title !== title.value)\n        title.value = format(document.title);\n    }, { childList: true });\n  }\n  return title;\n}\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp.call(b, prop))\n      __defNormalProp(a, prop, b[prop]);\n  if (__getOwnPropSymbols)\n    for (var prop of __getOwnPropSymbols(b)) {\n      if (__propIsEnum.call(b, prop))\n        __defNormalProp(a, prop, b[prop]);\n    }\n  return a;\n};\nconst _TransitionPresets = {\n  easeInSine: [0.12, 0, 0.39, 0],\n  easeOutSine: [0.61, 1, 0.88, 1],\n  easeInOutSine: [0.37, 0, 0.63, 1],\n  easeInQuad: [0.11, 0, 0.5, 0],\n  easeOutQuad: [0.5, 1, 0.89, 1],\n  easeInOutQuad: [0.45, 0, 0.55, 1],\n  easeInCubic: [0.32, 0, 0.67, 0],\n  easeOutCubic: [0.33, 1, 0.68, 1],\n  easeInOutCubic: [0.65, 0, 0.35, 1],\n  easeInQuart: [0.5, 0, 0.75, 0],\n  easeOutQuart: [0.25, 1, 0.5, 1],\n  easeInOutQuart: [0.76, 0, 0.24, 1],\n  easeInQuint: [0.64, 0, 0.78, 0],\n  easeOutQuint: [0.22, 1, 0.36, 1],\n  easeInOutQuint: [0.83, 0, 0.17, 1],\n  easeInExpo: [0.7, 0, 0.84, 0],\n  easeOutExpo: [0.16, 1, 0.3, 1],\n  easeInOutExpo: [0.87, 0, 0.13, 1],\n  easeInCirc: [0.55, 0, 1, 0.45],\n  easeOutCirc: [0, 0.55, 0.45, 1],\n  easeInOutCirc: [0.85, 0, 0.15, 1],\n  easeInBack: [0.36, 0, 0.66, -0.56],\n  easeOutBack: [0.34, 1.56, 0.64, 1],\n  easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = __spreadValues({\n  linear: identity\n}, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n  const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n  const b = (a1, a2) => 3 * a2 - 6 * a1;\n  const c = (a1) => 3 * a1;\n  const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n  const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n  const getTforX = (x) => {\n    let aGuessT = x;\n    for (let i = 0; i < 4; ++i) {\n      const currentSlope = getSlope(aGuessT, p0, p2);\n      if (currentSlope === 0)\n        return aGuessT;\n      const currentX = calcBezier(aGuessT, p0, p2) - x;\n      aGuessT -= currentX / currentSlope;\n    }\n    return aGuessT;\n  };\n  return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction useTransition(source, options = {}) {\n  const {\n    delay = 0,\n    disabled = false,\n    duration = 1e3,\n    onFinished = noop,\n    onStarted = noop,\n    transition = identity\n  } = options;\n  const currentTransition = computed(() => {\n    const t = unref(transition);\n    return isFunction(t) ? t : createEasingFunction(t);\n  });\n  const sourceValue = computed(() => {\n    const s = unref(source);\n    return isNumber(s) ? s : s.map(unref);\n  });\n  const sourceVector = computed(() => isNumber(sourceValue.value) ? [sourceValue.value] : sourceValue.value);\n  const outputVector = ref(sourceVector.value.slice(0));\n  let currentDuration;\n  let diffVector;\n  let endAt;\n  let startAt;\n  let startVector;\n  const { resume, pause } = useRafFn(() => {\n    const now = Date.now();\n    const progress = clamp(1 - (endAt - now) / currentDuration, 0, 1);\n    outputVector.value = startVector.map((val, i) => {\n      var _a;\n      return val + ((_a = diffVector[i]) != null ? _a : 0) * currentTransition.value(progress);\n    });\n    if (progress >= 1) {\n      pause();\n      onFinished();\n    }\n  }, { immediate: false });\n  const start = () => {\n    pause();\n    currentDuration = unref(duration);\n    diffVector = outputVector.value.map((n, i) => {\n      var _a, _b;\n      return ((_a = sourceVector.value[i]) != null ? _a : 0) - ((_b = outputVector.value[i]) != null ? _b : 0);\n    });\n    startVector = outputVector.value.slice(0);\n    startAt = Date.now();\n    endAt = startAt + currentDuration;\n    resume();\n    onStarted();\n  };\n  const timeout = useTimeoutFn(start, delay, { immediate: false });\n  watch(sourceVector, () => {\n    if (unref(disabled))\n      return;\n    if (unref(delay) <= 0)\n      start();\n    else\n      timeout.start();\n  }, { deep: true });\n  watch(() => unref(disabled), (v) => {\n    if (v) {\n      outputVector.value = sourceVector.value.slice(0);\n      pause();\n    }\n  });\n  return computed(() => {\n    const targetVector = unref(disabled) ? sourceVector : outputVector;\n    return isNumber(sourceValue.value) ? targetVector.value[0] : targetVector.value;\n  });\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n  const {\n    initialValue = {},\n    removeNullishValues = true,\n    removeFalsyValues = false,\n    write: enableWrite = true,\n    window = defaultWindow\n  } = options;\n  if (!window)\n    return reactive(initialValue);\n  const state = reactive({});\n  function getRawParams() {\n    if (mode === \"history\") {\n      return window.location.search || \"\";\n    } else if (mode === \"hash\") {\n      const hash = window.location.hash || \"\";\n      const index = hash.indexOf(\"?\");\n      return index > 0 ? hash.slice(index) : \"\";\n    } else {\n      return (window.location.hash || \"\").replace(/^#/, \"\");\n    }\n  }\n  function constructQuery(params) {\n    const stringified = params.toString();\n    if (mode === \"history\")\n      return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n    if (mode === \"hash-params\")\n      return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n    const hash = window.location.hash || \"#\";\n    const index = hash.indexOf(\"?\");\n    if (index > 0)\n      return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n    return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n  }\n  function read() {\n    return new URLSearchParams(getRawParams());\n  }\n  function updateState(params) {\n    const unusedKeys = new Set(Object.keys(state));\n    for (const key of params.keys()) {\n      const paramsForKey = params.getAll(key);\n      state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n      unusedKeys.delete(key);\n    }\n    Array.from(unusedKeys).forEach((key) => delete state[key]);\n  }\n  const { pause, resume } = pausableWatch(state, () => {\n    const params = new URLSearchParams(\"\");\n    Object.keys(state).forEach((key) => {\n      const mapEntry = state[key];\n      if (Array.isArray(mapEntry))\n        mapEntry.forEach((value) => params.append(key, value));\n      else if (removeNullishValues && mapEntry == null)\n        params.delete(key);\n      else if (removeFalsyValues && !mapEntry)\n        params.delete(key);\n      else\n        params.set(key, mapEntry);\n    });\n    write(params);\n  }, { deep: true });\n  function write(params, shouldUpdate) {\n    pause();\n    if (shouldUpdate)\n      updateState(params);\n    window.history.replaceState(window.history.state, window.document.title, window.location.pathname + constructQuery(params));\n    resume();\n  }\n  function onChanged() {\n    if (!enableWrite)\n      return;\n    write(read(), true);\n  }\n  useEventListener(window, \"popstate\", onChanged, false);\n  if (mode !== \"history\")\n    useEventListener(window, \"hashchange\", onChanged, false);\n  const initial = read();\n  if (initial.keys().next().value)\n    updateState(initial);\n  else\n    Object.assign(state, initialValue);\n  return state;\n}\n\nfunction useUserMedia(options = {}) {\n  var _a, _b;\n  const enabled = ref((_a = options.enabled) != null ? _a : false);\n  const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n  const videoDeviceId = ref(options.videoDeviceId);\n  const audioDeviceId = ref(options.audioDeviceId);\n  const { navigator = defaultNavigator } = options;\n  const isSupported = useSupported(() => {\n    var _a2;\n    return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n  });\n  const stream = shallowRef();\n  function getDeviceOptions(device) {\n    if (device.value === \"none\" || device.value === false)\n      return false;\n    if (device.value == null)\n      return true;\n    return {\n      deviceId: device.value\n    };\n  }\n  async function _start() {\n    if (!isSupported.value || stream.value)\n      return;\n    stream.value = await navigator.mediaDevices.getUserMedia({\n      video: getDeviceOptions(videoDeviceId),\n      audio: getDeviceOptions(audioDeviceId)\n    });\n    return stream.value;\n  }\n  async function _stop() {\n    var _a2;\n    (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n    stream.value = void 0;\n  }\n  function stop() {\n    _stop();\n    enabled.value = false;\n  }\n  async function start() {\n    await _start();\n    if (stream.value)\n      enabled.value = true;\n    return stream.value;\n  }\n  async function restart() {\n    _stop();\n    return await start();\n  }\n  watch(enabled, (v) => {\n    if (v)\n      _start();\n    else\n      _stop();\n  }, { immediate: true });\n  watch([videoDeviceId, audioDeviceId], () => {\n    if (autoSwitch.value && stream.value)\n      restart();\n  }, { immediate: true });\n  return {\n    isSupported,\n    stream,\n    start,\n    stop,\n    restart,\n    videoDeviceId,\n    audioDeviceId,\n    enabled,\n    autoSwitch\n  };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n  var _a, _b, _c, _d, _e;\n  const {\n    clone = false,\n    passive = false,\n    eventName,\n    deep = false,\n    defaultValue\n  } = options;\n  const vm = getCurrentInstance();\n  const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n  let event = eventName;\n  if (!key) {\n    if (isVue2) {\n      const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n      key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n      if (!eventName)\n        event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n    } else {\n      key = \"modelValue\";\n    }\n  }\n  event = eventName || event || `update:${key.toString()}`;\n  const cloneFn = (val) => !clone ? val : isFunction(clone) ? clone(val) : cloneFnJSON(val);\n  const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n  if (passive) {\n    const initialValue = getValue();\n    const proxy = ref(initialValue);\n    watch(() => props[key], (v) => proxy.value = cloneFn(v));\n    watch(proxy, (v) => {\n      if (v !== props[key] || deep)\n        _emit(event, v);\n    }, { deep });\n    return proxy;\n  } else {\n    return computed({\n      get() {\n        return getValue();\n      },\n      set(value) {\n        _emit(event, value);\n      }\n    });\n  }\n}\n\nfunction useVModels(props, emit, options = {}) {\n  const ret = {};\n  for (const key in props)\n    ret[key] = useVModel(props, key, emit, options);\n  return ret;\n}\n\nfunction useVibrate(options) {\n  const {\n    pattern = [],\n    interval = 0,\n    navigator = defaultNavigator\n  } = options || {};\n  const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n  const patternRef = resolveRef(pattern);\n  let intervalControls;\n  const vibrate = (pattern2 = patternRef.value) => {\n    if (isSupported.value)\n      navigator.vibrate(pattern2);\n  };\n  const stop = () => {\n    if (isSupported.value)\n      navigator.vibrate(0);\n    intervalControls == null ? void 0 : intervalControls.pause();\n  };\n  if (interval > 0) {\n    intervalControls = useIntervalFn(vibrate, interval, {\n      immediate: false,\n      immediateCallback: false\n    });\n  }\n  return {\n    isSupported,\n    pattern,\n    intervalControls,\n    vibrate,\n    stop\n  };\n}\n\nfunction useVirtualList(list, options) {\n  const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n  return {\n    list: currentList,\n    scrollTo,\n    containerProps: {\n      ref: containerRef,\n      onScroll: () => {\n        calculateRange();\n      },\n      style: containerStyle\n    },\n    wrapperProps\n  };\n}\nfunction useVirtualListResources(list) {\n  const containerRef = ref(null);\n  const size = useElementSize(containerRef);\n  const currentList = ref([]);\n  const source = shallowRef(list);\n  const state = ref({ start: 0, end: 10 });\n  return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n  return (containerSize) => {\n    if (typeof itemSize === \"number\")\n      return Math.ceil(containerSize / itemSize);\n    const { start = 0 } = state.value;\n    let sum = 0;\n    let capacity = 0;\n    for (let i = start; i < source.value.length; i++) {\n      const size = itemSize(i);\n      sum += size;\n      capacity = i;\n      if (sum > containerSize)\n        break;\n    }\n    return capacity - start;\n  };\n}\nfunction createGetOffset(source, itemSize) {\n  return (scrollDirection) => {\n    if (typeof itemSize === \"number\")\n      return Math.floor(scrollDirection / itemSize) + 1;\n    let sum = 0;\n    let offset = 0;\n    for (let i = 0; i < source.value.length; i++) {\n      const size = itemSize(i);\n      sum += size;\n      if (sum >= scrollDirection) {\n        offset = i;\n        break;\n      }\n    }\n    return offset + 1;\n  };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n  return () => {\n    const element = containerRef.value;\n    if (element) {\n      const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n      const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n      const from = offset - overscan;\n      const to = offset + viewCapacity + overscan;\n      state.value = {\n        start: from < 0 ? 0 : from,\n        end: to > source.value.length ? source.value.length : to\n      };\n      currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n        data: ele,\n        index: index + state.value.start\n      }));\n    }\n  };\n}\nfunction createGetDistance(itemSize, source) {\n  return (index) => {\n    if (typeof itemSize === \"number\") {\n      const size2 = index * itemSize;\n      return size2;\n    }\n    const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n    return size;\n  };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n  watch([size.width, size.height, list], () => {\n    calculateRange();\n  });\n}\nfunction createComputedTotalSize(itemSize, source) {\n  return computed(() => {\n    if (typeof itemSize === \"number\")\n      return source.value.length * itemSize;\n    return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n  });\n}\nconst scrollToDictionaryForElementScrollKey = {\n  horizontal: \"scrollLeft\",\n  vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n  return (index) => {\n    if (containerRef.value) {\n      containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n      calculateRange();\n    }\n  };\n}\nfunction useHorizontalVirtualList(options, list) {\n  const resources = useVirtualListResources(list);\n  const { state, source, currentList, size, containerRef } = resources;\n  const containerStyle = { overflowX: \"auto\" };\n  const { itemWidth, overscan = 5 } = options;\n  const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n  const getOffset = createGetOffset(source, itemWidth);\n  const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n  const getDistanceLeft = createGetDistance(itemWidth, source);\n  const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n  const totalWidth = createComputedTotalSize(itemWidth, source);\n  useWatchForSizes(size, list, calculateRange);\n  const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n  const wrapperProps = computed(() => {\n    return {\n      style: {\n        height: \"100%\",\n        width: `${totalWidth.value - offsetLeft.value}px`,\n        marginLeft: `${offsetLeft.value}px`,\n        display: \"flex\"\n      }\n    };\n  });\n  return {\n    scrollTo,\n    calculateRange,\n    wrapperProps,\n    containerStyle,\n    currentList,\n    containerRef\n  };\n}\nfunction useVerticalVirtualList(options, list) {\n  const resources = useVirtualListResources(list);\n  const { state, source, currentList, size, containerRef } = resources;\n  const containerStyle = { overflowY: \"auto\" };\n  const { itemHeight, overscan = 5 } = options;\n  const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n  const getOffset = createGetOffset(source, itemHeight);\n  const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n  const getDistanceTop = createGetDistance(itemHeight, source);\n  const offsetTop = computed(() => getDistanceTop(state.value.start));\n  const totalHeight = createComputedTotalSize(itemHeight, source);\n  useWatchForSizes(size, list, calculateRange);\n  const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n  const wrapperProps = computed(() => {\n    return {\n      style: {\n        width: \"100%\",\n        height: `${totalHeight.value - offsetTop.value}px`,\n        marginTop: `${offsetTop.value}px`\n      }\n    };\n  });\n  return {\n    calculateRange,\n    scrollTo,\n    containerStyle,\n    wrapperProps,\n    currentList,\n    containerRef\n  };\n}\n\nconst useWakeLock = (options = {}) => {\n  const {\n    navigator = defaultNavigator,\n    document = defaultDocument\n  } = options;\n  let wakeLock;\n  const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n  const isActive = ref(false);\n  async function onVisibilityChange() {\n    if (!isSupported.value || !wakeLock)\n      return;\n    if (document && document.visibilityState === \"visible\")\n      wakeLock = await navigator.wakeLock.request(\"screen\");\n    isActive.value = !wakeLock.released;\n  }\n  if (document)\n    useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n  async function request(type) {\n    if (!isSupported.value)\n      return;\n    wakeLock = await navigator.wakeLock.request(type);\n    isActive.value = !wakeLock.released;\n  }\n  async function release() {\n    if (!isSupported.value || !wakeLock)\n      return;\n    await wakeLock.release();\n    isActive.value = !wakeLock.released;\n    wakeLock = null;\n  }\n  return {\n    isSupported,\n    isActive,\n    request,\n    release\n  };\n};\n\nconst useWebNotification = (defaultOptions = {}) => {\n  const {\n    window = defaultWindow\n  } = defaultOptions;\n  const isSupported = useSupported(() => !!window && \"Notification\" in window);\n  const notification = ref(null);\n  const requestPermission = async () => {\n    if (!isSupported.value)\n      return;\n    if (\"permission\" in Notification && Notification.permission !== \"denied\")\n      await Notification.requestPermission();\n  };\n  const onClick = createEventHook();\n  const onShow = createEventHook();\n  const onError = createEventHook();\n  const onClose = createEventHook();\n  const show = async (overrides) => {\n    if (!isSupported.value)\n      return;\n    await requestPermission();\n    const options = Object.assign({}, defaultOptions, overrides);\n    notification.value = new Notification(options.title || \"\", options);\n    notification.value.onclick = (event) => onClick.trigger(event);\n    notification.value.onshow = (event) => onShow.trigger(event);\n    notification.value.onerror = (event) => onError.trigger(event);\n    notification.value.onclose = (event) => onClose.trigger(event);\n    return notification.value;\n  };\n  const close = () => {\n    if (notification.value)\n      notification.value.close();\n    notification.value = null;\n  };\n  tryOnMounted(async () => {\n    if (isSupported.value)\n      await requestPermission();\n  });\n  tryOnScopeDispose(close);\n  if (isSupported.value && window) {\n    const document = window.document;\n    useEventListener(document, \"visibilitychange\", (e) => {\n      e.preventDefault();\n      if (document.visibilityState === \"visible\") {\n        close();\n      }\n    });\n  }\n  return {\n    isSupported,\n    notification,\n    show,\n    close,\n    onClick,\n    onShow,\n    onError,\n    onClose\n  };\n};\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n  if (options === true)\n    return {};\n  return options;\n}\nfunction useWebSocket(url, options = {}) {\n  const {\n    onConnected,\n    onDisconnected,\n    onError,\n    onMessage,\n    immediate = true,\n    autoClose = true,\n    protocols = []\n  } = options;\n  const data = ref(null);\n  const status = ref(\"CLOSED\");\n  const wsRef = ref();\n  const urlRef = resolveRef(url);\n  let heartbeatPause;\n  let heartbeatResume;\n  let explicitlyClosed = false;\n  let retried = 0;\n  let bufferedData = [];\n  let pongTimeoutWait;\n  const close = (code = 1e3, reason) => {\n    if (!wsRef.value)\n      return;\n    explicitlyClosed = true;\n    heartbeatPause == null ? void 0 : heartbeatPause();\n    wsRef.value.close(code, reason);\n  };\n  const _sendBuffer = () => {\n    if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n      for (const buffer of bufferedData)\n        wsRef.value.send(buffer);\n      bufferedData = [];\n    }\n  };\n  const resetHeartbeat = () => {\n    clearTimeout(pongTimeoutWait);\n    pongTimeoutWait = void 0;\n  };\n  const send = (data2, useBuffer = true) => {\n    if (!wsRef.value || status.value !== \"OPEN\") {\n      if (useBuffer)\n        bufferedData.push(data2);\n      return false;\n    }\n    _sendBuffer();\n    wsRef.value.send(data2);\n    return true;\n  };\n  const _init = () => {\n    if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n      return;\n    const ws = new WebSocket(urlRef.value, protocols);\n    wsRef.value = ws;\n    status.value = \"CONNECTING\";\n    ws.onopen = () => {\n      status.value = \"OPEN\";\n      onConnected == null ? void 0 : onConnected(ws);\n      heartbeatResume == null ? void 0 : heartbeatResume();\n      _sendBuffer();\n    };\n    ws.onclose = (ev) => {\n      status.value = \"CLOSED\";\n      wsRef.value = void 0;\n      onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n      if (!explicitlyClosed && options.autoReconnect) {\n        const {\n          retries = -1,\n          delay = 1e3,\n          onFailed\n        } = resolveNestedOptions(options.autoReconnect);\n        retried += 1;\n        if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n          setTimeout(_init, delay);\n        else if (typeof retries === \"function\" && retries())\n          setTimeout(_init, delay);\n        else\n          onFailed == null ? void 0 : onFailed();\n      }\n    };\n    ws.onerror = (e) => {\n      onError == null ? void 0 : onError(ws, e);\n    };\n    ws.onmessage = (e) => {\n      if (options.heartbeat) {\n        resetHeartbeat();\n        const {\n          message = DEFAULT_PING_MESSAGE\n        } = resolveNestedOptions(options.heartbeat);\n        if (e.data === message)\n          return;\n      }\n      data.value = e.data;\n      onMessage == null ? void 0 : onMessage(ws, e);\n    };\n  };\n  if (options.heartbeat) {\n    const {\n      message = DEFAULT_PING_MESSAGE,\n      interval = 1e3,\n      pongTimeout = 1e3\n    } = resolveNestedOptions(options.heartbeat);\n    const { pause, resume } = useIntervalFn(() => {\n      send(message, false);\n      if (pongTimeoutWait != null)\n        return;\n      pongTimeoutWait = setTimeout(() => {\n        close();\n      }, pongTimeout);\n    }, interval, { immediate: false });\n    heartbeatPause = pause;\n    heartbeatResume = resume;\n  }\n  if (autoClose) {\n    useEventListener(window, \"beforeunload\", () => close());\n    tryOnScopeDispose(close);\n  }\n  const open = () => {\n    close();\n    explicitlyClosed = false;\n    retried = 0;\n    _init();\n  };\n  if (immediate)\n    watch(urlRef, open, { immediate: true });\n  return {\n    data,\n    status,\n    close,\n    send,\n    open,\n    ws: wsRef\n  };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n  const {\n    window = defaultWindow\n  } = options != null ? options : {};\n  const data = ref(null);\n  const worker = shallowRef();\n  const post = function post2(val) {\n    if (!worker.value)\n      return;\n    worker.value.postMessage(val);\n  };\n  const terminate = function terminate2() {\n    if (!worker.value)\n      return;\n    worker.value.terminate();\n  };\n  if (window) {\n    if (isString(arg0))\n      worker.value = new Worker(arg0, workerOptions);\n    else if (isFunction(arg0))\n      worker.value = arg0();\n    else\n      worker.value = arg0;\n    worker.value.onmessage = (e) => {\n      data.value = e.data;\n    };\n    tryOnScopeDispose(() => {\n      if (worker.value)\n        worker.value.terminate();\n    });\n  }\n  return {\n    data,\n    post,\n    terminate,\n    worker\n  };\n}\n\nconst jobRunner = (userFunc) => (e) => {\n  const userFuncArgs = e.data[0];\n  return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n    postMessage([\"SUCCESS\", result]);\n  }).catch((error) => {\n    postMessage([\"ERROR\", error]);\n  });\n};\n\nconst depsParser = (deps) => {\n  if (deps.length === 0)\n    return \"\";\n  const depsString = deps.map((dep) => `'${dep}'`).toString();\n  return `importScripts(${depsString})`;\n};\n\nconst createWorkerBlobUrl = (fn, deps) => {\n  const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n  const blob = new Blob([blobCode], { type: \"text/javascript\" });\n  const url = URL.createObjectURL(blob);\n  return url;\n};\n\nconst useWebWorkerFn = (fn, options = {}) => {\n  const {\n    dependencies = [],\n    timeout,\n    window = defaultWindow\n  } = options;\n  const worker = ref();\n  const workerStatus = ref(\"PENDING\");\n  const promise = ref({});\n  const timeoutId = ref();\n  const workerTerminate = (status = \"PENDING\") => {\n    if (worker.value && worker.value._url && window) {\n      worker.value.terminate();\n      URL.revokeObjectURL(worker.value._url);\n      promise.value = {};\n      worker.value = void 0;\n      window.clearTimeout(timeoutId.value);\n      workerStatus.value = status;\n    }\n  };\n  workerTerminate();\n  tryOnScopeDispose(workerTerminate);\n  const generateWorker = () => {\n    const blobUrl = createWorkerBlobUrl(fn, dependencies);\n    const newWorker = new Worker(blobUrl);\n    newWorker._url = blobUrl;\n    newWorker.onmessage = (e) => {\n      const { resolve = () => {\n      }, reject = () => {\n      } } = promise.value;\n      const [status, result] = e.data;\n      switch (status) {\n        case \"SUCCESS\":\n          resolve(result);\n          workerTerminate(status);\n          break;\n        default:\n          reject(result);\n          workerTerminate(\"ERROR\");\n          break;\n      }\n    };\n    newWorker.onerror = (e) => {\n      const { reject = () => {\n      } } = promise.value;\n      reject(e);\n      workerTerminate(\"ERROR\");\n    };\n    if (timeout) {\n      timeoutId.value = setTimeout(() => workerTerminate(\"TIMEOUT_EXPIRED\"), timeout);\n    }\n    return newWorker;\n  };\n  const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n    promise.value = {\n      resolve,\n      reject\n    };\n    worker.value && worker.value.postMessage([[...fnArgs]]);\n    workerStatus.value = \"RUNNING\";\n  });\n  const workerFn = (...fnArgs) => {\n    if (workerStatus.value === \"RUNNING\") {\n      console.error(\"[useWebWorkerFn] You can only run one instance of the worker at a time.\");\n      return Promise.reject();\n    }\n    worker.value = generateWorker();\n    return callWorker(...fnArgs);\n  };\n  return {\n    workerFn,\n    workerStatus,\n    workerTerminate\n  };\n};\n\nfunction useWindowFocus({ window = defaultWindow } = {}) {\n  if (!window)\n    return ref(false);\n  const focused = ref(window.document.hasFocus());\n  useEventListener(window, \"blur\", () => {\n    focused.value = false;\n  });\n  useEventListener(window, \"focus\", () => {\n    focused.value = true;\n  });\n  return focused;\n}\n\nfunction useWindowScroll({ window = defaultWindow } = {}) {\n  if (!window) {\n    return {\n      x: ref(0),\n      y: ref(0)\n    };\n  }\n  const x = ref(window.scrollX);\n  const y = ref(window.scrollY);\n  useEventListener(window, \"scroll\", () => {\n    x.value = window.scrollX;\n    y.value = window.scrollY;\n  }, {\n    capture: false,\n    passive: true\n  });\n  return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n  const {\n    window = defaultWindow,\n    initialWidth = Infinity,\n    initialHeight = Infinity,\n    listenOrientation = true,\n    includeScrollbar = true\n  } = options;\n  const width = ref(initialWidth);\n  const height = ref(initialHeight);\n  const update = () => {\n    if (window) {\n      if (includeScrollbar) {\n        width.value = window.innerWidth;\n        height.value = window.innerHeight;\n      } else {\n        width.value = window.document.documentElement.clientWidth;\n        height.value = window.document.documentElement.clientHeight;\n      }\n    }\n  };\n  update();\n  tryOnMounted(update);\n  useEventListener(\"resize\", update, { passive: true });\n  if (listenOrientation)\n    useEventListener(\"orientationchange\", update, { passive: true });\n  return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, SwipeDirection, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","<script setup lang=\"ts\">\nimport { PropType, computed, ref, onMounted, onBeforeUnmount } from 'vue'\nimport CCCard from '../CCCard/CCCard.vue'\nimport CCMDIcon from '../CCMDIcon/CCMDIcon.vue'\n\ntype DialogSize = 's' | 'S' | 'm' | 'M' | 'l' | 'L'\n\nconst props = defineProps({\n  /**\n   * ダイアログの開閉ステータス\n   * @example true: 展開\n   */\n  modelValue: { type: Boolean, default: false },\n  /**\n   * サイズ\n   * @example 's' | 'S' | 'm' | 'M' | 'l' | 'L'\n   */\n  size: { type: String as PropType<DialogSize>, default: 'l' },\n  /**\n   * ログインページだけページの使用が異なる。\n   * trueの場合グローバルナビがない場合のサイズとなる\n   */\n  loginPage: { type: Boolean, default: false },\n})\n\n// Emitの定義\nconst emit = defineEmits<{\n  (e: 'close', value: boolean): void\n  (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst model = computed({\n  get: () => props.modelValue,\n  set: (value) => {\n    emit('update:modelValue', value)\n  },\n})\n\nconst clickAction = () => {\n  model.value = false\n  emit('close', false)\n}\nconst toggleBodyOverflow = (enable) => {\n  const body = document.body\n  if (enable) {\n    body.style.overflow = 'hidden'\n  } else {\n    body.style.overflow = 'auto'\n  }\n}\n// ダイアログが表示されるときにスクロールを無効化\nonMounted(() => {\n  toggleBodyOverflow(true)\n})\n// ダイアログが閉じられるときにスクロールを有効化\nonBeforeUnmount(() => {\n  toggleBodyOverflow(false)\n})\n</script>\n\n<template>\n  <Teleport to=\"body\">\n    <transition name=\"fade\" v-if=\"model\">\n      <div\n        class=\"_cc_modal\"\n        :class=\"{\n          _card_position_large: size === 'l' || size === 'L',\n          _cc_modal_login_page: loginPage,\n        }\"\n      >\n        <div\n          v-if=\"size === 's' || size === 'S'\"\n          class=\"_dialog_container_small\"\n          :class=\"{ _dialog_container_small_login_page: loginPage }\"\n        >\n          <div class=\"_close_container_small\">\n            <CCMDIcon name=\"close\" class=\"_close_icon\" @click=\"clickAction\" />\n          </div>\n          <CCCard class=\"_modal_card_small\">\n            <slot />\n          </CCCard>\n        </div>\n\n        <div v-if=\"size === 'm' || size === 'M'\" class=\"_dialog_container_medium\">\n          <div class=\"_close_container_medium\">\n            <CCMDIcon name=\"close\" class=\"_close_icon\" @click=\"clickAction\" />\n          </div>\n          <CCCard class=\"_modal_card_medium\">\n            <slot />\n          </CCCard>\n        </div>\n\n        <div v-if=\"size === 'l' || size === 'L'\">\n          <div class=\"_close_container_large\">\n            <CCMDIcon name=\"close\" class=\"_close_icon\" @click=\"clickAction\" />\n          </div>\n          <CCCard class=\"_modal_card_large\">\n            <slot />\n          </CCCard>\n        </div>\n      </div>\n    </transition>\n  </Teleport>\n</template>\n\n<style lang=\"sass\" scoped>\n._cc_modal\n    position: fixed\n    top: 0\n    left: 0\n    z-index: 9999\n    background: rgb(var(--c-modal-black-rgb), 0.3)\n    backdrop-filter: blur(1px)\n    height: 100vh\n    width: 100vw\n    display: flex\n\n._cc_modal_login_page\n    top:0\n    left:0\n\n._dialog_container_small\n    position: absolute\n    top: 50%\n    left: calc((100vw + 0px) / 2)\n    transform: translate(-50%, -50%)\n    -webkit-transform: translate(-50%, -50%)\n    -ms-transform: translate(-50%, -50%)\n    // width: 500px\n._dialog_container_small_login_page\n    left: calc((100vw) / 2)\n._close_container_small\n    height: 50px\n    display: flex\n    justify-content: end\n    align-items: center\n    padding-right:  10px\n\n._dialog_container_medium\n  position: absolute\n  top: 50%\n  left: calc((100vw + 0px) / 2)\n  transform: translate(-50%, -50%)\n  -webkit-transform: translate(-50%, -50%)\n  -ms-transform: translate(-50%, -50%)\n  width: 1000px\n\n._close_container_medium\n  height: 50px\n  display: flex\n  justify-content: end\n  align-items: center\n  padding-right:  10px\n\n._modal_card_medium\n  padding: 50px 0\n  overflow: auto\n\n._card_position_large\n    flex-direction: column\n    align-items: end\n\n._modal_card_small\n    // padding: 50px 0 40px 0\n    overflow: auto\n\n._close_container_large\n    height: 50px\n    width: calc( 100vw - 225px )\n    display: flex\n    align-items: center\n    justify-content: end\n    padding-right:  10px\n\n._close_icon\n    font-size: 36px\n    cursor: pointer\n    color: #FFFFFF\n    transition: 0.3s\n._close_icon:hover\n    opacity: 0.7\n\n._modal_card_large\n    width: calc( 100vw - 215px )\n    height: calc( 100vh - 50px )\n    overflow: auto\n\n.fade-enter-active, .fade-leave-active\n  transition: opacity 0.3s ease\n\n\n.fade-enter-from, .fade-leave-to\n  opacity: 0\n\n.fade-enter-to, .fade-leave-from\n  opacity: 1\n</style>\n","<script setup lang=\"ts\">\nimport { ref, computed, PropType, watch } from 'vue'\nimport { SizeTypes, MDIconTypes } from '../../types'\nimport { onClickOutside } from '@vueuse/core'\nimport CCMDIcon from '../CCMDIcon/CCMDIcon.vue'\nimport CCCard from '../CCCard/CCCard.vue'\nimport CCModal from '../CCModal/CCModal.vue'\nimport { onMounted } from 'vue'\n\n//optionsの型定義\ntype OptionsObjType = {\n  label: string | number\n  value: string | number | boolean\n  furigana?: string\n}\n\nconst props = defineProps({\n  /**\n   * 値\n   * @example 'テスト', 100\n   */\n  modelValue: { type: [String, Number, Boolean] },\n  /**\n   * オプション\n   * @example ['Google', 'Apple', 'Facebook', 'Amazon.com']\n   */\n  options: { type: Array as PropType<string[] | OptionsObjType[]>, default: [] },\n  /**\n   * アウトライン\n   * @example outline\n   */\n  outline: { type: Boolean, default: false },\n  /**\n   * シャドウ\n   * @example shadow\n   */\n  shadow: { type: Boolean, default: false },\n  /**\n   * スクエア\n   * @example square\n   */\n  square: { type: Boolean, default: false },\n  /**\n   * オプションズデザイン\n   * @example 2\n   */\n  optionsDesign: {\n    type: Number,\n    default: 1,\n  },\n  optionsHeight: { type: Number, default: 300 },\n  /**\n   * ディセーブル\n   * @example disable => true\n   */\n  disabled: { type: Boolean, default: false },\n  /**\n   * ラベル\n   * @example 'お名前'\n   */\n  label: { type: String, default: '' },\n  /**\n   * プレースホルダー\n   * @example 'お名前'\n   */\n  placeholder: { type: String, default: '' },\n  /**\n   * サイズ\n   * @example 'S' | 'M' | 'L'\n   */\n  size: { type: String as PropType<SizeTypes>, default: 'S' },\n  /**\n   * 必須テキスト\n   * @example '*' | '*必須'\n   */\n  requiredText: { type: String as PropType<'※' | '※必須'>, default: '' },\n  /**\n   * 必須アイコン\n   * @example true\n   */\n  requiredIcon: { type: Boolean, default: false },\n  /**\n   * エラー1\n   * @example true\n   */\n  error1: { type: Boolean, default: false },\n  /**\n   * エラー2\n   * @example true\n   */\n  error2: { type: Boolean, default: false },\n  /**\n   * エラー3\n   * @example '****を入力してください'\n   */\n  error3: { type: String, default: '' },\n  /**\n   * エラー4\n   * @example '****を入力してください'\n   */\n  error4: { type: String, default: '' },\n  /**\n   * optionsをdialogで表示する\n   */\n  isDialog: { type: Boolean, default: false },\n  /**\n   * 右アイコン\n   */\n  iconRight: { type: String as PropType<MDIconTypes>, default: 'arrow_drop_down' },\n  /**\n   * value値をclassに追加する\n   */\n  isAddClassFromValue: { type: Boolean, default: false }\n})\n\n/**\n * optionがstringの配列だった場合、オブジェクトの配列に変換する\n */\nconst optionVal = computed(() => {\n  return props.options.map((option: string | OptionsObjType) => {\n    if (typeof option === 'string') {\n      return { label: option, value: option }\n    } else {\n      return option\n    }\n  })\n})\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', val: string | number | boolean | undefined): void\n  (e: 'onBlur'): void\n  (e: 'onFocus'): void\n}>()\n\nconst model = computed({\n  get: () => props.modelValue,\n  set: (value) => {\n    emit('update:modelValue', value)\n  },\n})\n\nconst isDesign = ref<string>()\n\nif (props.outline) {\n  isDesign.value = 'outline'\n}\nif (props.shadow) {\n  isDesign.value = 'shadow'\n}\nif (props.square) {\n  isDesign.value = 'square'\n}\nif (!props.outline && !props.shadow && !props.square) {\n  isDesign.value = 'standard'\n}\n\nwatch(\n  () => [props.outline, props.shadow, props.square],\n  () => {\n    if (props.outline) {\n      isDesign.value = 'outline'\n    }\n    if (props.shadow) {\n      isDesign.value = 'shadow'\n    }\n    if (props.square) {\n      isDesign.value = 'square'\n    }\n    if (!props.outline && !props.shadow && !props.square) {\n      isDesign.value = 'standard'\n    }\n  }\n)\nwatch(\n  () => props.options,\n  (newOptions) => {\n    // furiganaがあるオブジェクト型の配列なら、50音順にソート\n    if (\n      optionVal.value.length > 0 &&\n      typeof optionVal.value[0] === 'object' &&\n      'furigana' in optionVal.value[0]\n    ) {\n      optionVal.value.sort((a, b) => {\n        const furiganaA = typeof a === 'object' ? a.furigana ?? String(a.label) : String(a)\n        const furiganaB = typeof b === 'object' ? b.furigana ?? String(b.label) : String(b)\n        return furiganaA.localeCompare(furiganaB, 'ja')\n      })\n    }\n  },\n  { immediate: true }\n)\n\n// コンポーネントのrefを定義する\nconst refBox = ref<HTMLElement>()\n\n// セレクトフォームのrefを定義する\nconst refSelectFormContainer = ref<HTMLElement>()\n\n// オプションアイテムコンテナのrefを定義する\nconst refOptionsItemContainer = ref<HTMLElement>()\n\n// optionsの表示状態を定義する\nconst isOptionsDispState = ref<boolean>(false)\n\n// セレクトフォームをクリックした場合、以下の処理を実行する\nconst clickSelectForm = () => {\n  onFocus()\n  if (props.disabled) return\n\n  isOptionsDispState.value = !isOptionsDispState.value\n\n  const labelFlag = ref<boolean>(false)\n  if (props.label || props.requiredText || props.requiredIcon) {\n    labelFlag.value = true\n  }\n\n  // セレクトフォームのrefを変数へ代入する\n  const eleSelectFormContainer = refSelectFormContainer.value!\n\n  // セレクトフォームの座標位置topを変数へ代入する\n  const eleSelectFormContainerTop = eleSelectFormContainer.getBoundingClientRect().top\n\n  // オプションアイテムコンテナのrefを変数へ代入する\n  const eleOptionsItemContainer = refOptionsItemContainer.value!\n\n  // オプションアイテムコンテナのDOM生成ご以下の処理を実行する\n  setTimeout(() => {\n    // isOptionsDispStateがtrueで、セレクトフォームの座標位置がブラウザの上下中心位置より下の場合\n    if (isOptionsDispState.value && eleSelectFormContainerTop > window.innerHeight / 2) {\n      eleOptionsItemContainer.style.top = `-${eleOptionsItemContainer.clientHeight - 2}px`\n    }\n\n    // isOptionsDispStateがtrueで、props.sizeが'S'で、props.labelまたはprops.requiredTextまたはprops.requiredIconが未設定で、セレクトフォームの座標位置がブラウザの上下中心位置より上の場合\n    if (\n      isOptionsDispState.value &&\n      props.size === 'S' &&\n      !labelFlag.value &&\n      eleSelectFormContainerTop < window.innerHeight / 2\n    ) {\n      eleOptionsItemContainer.style.top = '42px'\n    }\n\n    // isOptionsDispStateがtrueで、props.sizeが'M'で、props.labelまたはprops.requiredTextまたはprops.requiredIconが未設定で、セレクトフォームの座標位置がブラウザの上下中心位置より上の場合\n    if (\n      isOptionsDispState.value &&\n      props.size === 'M' &&\n      !labelFlag.value &&\n      eleSelectFormContainerTop < window.innerHeight / 2\n    ) {\n      eleOptionsItemContainer.style.top = '49px'\n    }\n\n    // isOptionsDispStateがtrueで、props.sizeが'L'で、props.labelまたはprops.requiredTextまたはprops.requiredIconが未設定で、セレクトフォームの座標位置がブラウザの上下中心位置より上の場合\n    if (\n      isOptionsDispState.value &&\n      props.size === 'L' &&\n      !labelFlag.value &&\n      eleSelectFormContainerTop < window.innerHeight / 2\n    ) {\n      eleOptionsItemContainer.style.top = '54px'\n    }\n\n    // isOptionsDispStateがtrueで、props.sizeが'S'で、props.labelまたはprops.requiredTextまたはprops.requiredIconが設定済みで、セレクトフォームの座標位置がブラウザの上下中心位置より上の場合\n    if (\n      isOptionsDispState.value &&\n      props.size === 'S' &&\n      labelFlag.value &&\n      eleSelectFormContainerTop < window.innerHeight / 2\n    ) {\n      eleOptionsItemContainer.style.top = '66px'\n    }\n\n    // isOptionsDispStateがtrueで、props.sizeが'M'で、props.labelまたはprops.requiredTextまたはprops.requiredIconが設定済みで、セレクトフォームの座標位置がブラウザの上下中心位置より上の場合\n    if (\n      isOptionsDispState.value &&\n      props.size === 'M' &&\n      labelFlag.value &&\n      eleSelectFormContainerTop < window.innerHeight / 2\n    ) {\n      eleOptionsItemContainer.style.top = '73px'\n    }\n\n    // isOptionsDispStateがtrueで、props.sizeが'L'で、props.labelまたはprops.requiredTextまたはprops.requiredIconが設定済みで、セレクトフォームの座標位置がブラウザの上下中心位置より上の場合\n    if (\n      isOptionsDispState.value &&\n      props.size === 'L' &&\n      labelFlag.value &&\n      eleSelectFormContainerTop < window.innerHeight / 2\n    ) {\n      eleOptionsItemContainer.style.top = '78px'\n    }\n  }, 0)\n}\n\n// optionsからアイテムを選択し、v-modelへ値を代入する\nconst slectOptionsItem = (item: string | number | boolean | undefined) => {\n  model.value = optionVal.value.find((val) => val.value === item)?.value\n  onBlur()\n  isOptionsDispState.value = false\n}\n\n// コンポーネントの要素外をクリックした場合、optionsを閉じる\nonClickOutside(refBox, () => {\n  if (!isOptionsDispState.value) return\n  onBlur()\n  isOptionsDispState.value = false\n})\nconst onBlur = () => {\n  emit('onBlur')\n}\nconst onFocus = () => {\n  emit('onFocus')\n}\n</script>\n\n<template>\n  <div ref=\"refBox\" class=\"_box\">\n    <div class=\"_label_container\">\n      <div class=\"_label\">{{ label }}</div>\n      <div\n        v-show=\"requiredText\"\n        class=\"_required_text\"\n        :class=\"{ _required_position_right: label }\"\n      >\n        {{ requiredText }}\n      </div>\n      <div\n        v-show=\"requiredIcon\"\n        class=\"_required_icon_container\"\n        :class=\"{ _required_position_right: label }\"\n      >\n        <div class=\"_required_icon\">必須</div>\n      </div>\n    </div>\n\n    <div\n      ref=\"refSelectFormContainer\"\n      class=\"_select_form_container\"\n      :class=\"{\n        _size_s: props.size === 'S',\n        _size_m: props.size === 'M',\n        _size_l: props.size === 'L',\n        _standard: isDesign === 'standard',\n        _outline: isDesign === 'outline',\n        _shadow: isDesign === 'shadow',\n        _square: isDesign === 'square',\n        _disabled: props.disabled,\n        _error_standard:\n          isDesign === 'standard' && (props.error1 || props.error2 || props.error3 || props.error4),\n        _error_outline_and_square:\n          (isDesign === 'outline' || isDesign === 'square') &&\n          (props.error1 || props.error2 || props.error3 || props.error4),\n        _error_bg_common: props.error2 || props.error4,\n      }\"\n      @click=\"clickSelectForm\"\n    >\n      <div v-show=\"!model\" class=\"_placeholder_text\">{{ placeholder }}</div>\n      <div class=\"_text\" :class=\"isAddClassFromValue ? `_value-${model}` : ''\">{{ optionVal.find((val) => val.value === model)?.label }}</div>\n      <CCMDIcon :name=\"iconRight\" class=\"_arrow_drop_down\" />\n    </div>\n\n    <div v-show=\"props.error3\" class=\"_error_message_common\">\n      {{ props.error3 }}\n    </div>\n\n    <div v-show=\"props.error4\" class=\"_error_message_common\">\n      {{ props.error4 }}\n    </div>\n\n    <CCModal\n      v-if=\"isDialog && isOptionsDispState\"\n      v-model=\"isOptionsDispState\"\n      size=\"s\"\n      class=\"_cc_select_modal\"\n    >\n      <CCCard :style=\"{ 'max-height': optionsHeight + 'px' }\" class=\"_cc_select_modal_card\">\n        <div\n          v-for=\"(item, index) in optionVal\"\n          :key=\"item.label\"\n          :class=\"{\n            _options_item_table_design1: props.optionsDesign === 1,\n            _options_item_table_select_design1: model === item.value && props.optionsDesign === 1,\n            _options_item_table_design2:\n              props.optionsDesign === 2 && index !== optionVal.length - 1,\n            _options_item_table_last_design2:\n              props.optionsDesign === 2 && index === optionVal.length - 1,\n            _options_item_table_select_design2: model === item.value && props.optionsDesign === 2,\n          }\"\n          @click=\"slectOptionsItem(item.value)\"\n        >\n          {{ item.label }}\n        </div>\n      </CCCard>\n    </CCModal>\n\n    <transition>\n      <div\n        v-show=\"isOptionsDispState && !isDialog\"\n        ref=\"refOptionsItemContainer\"\n        class=\"_options_item_container\"\n        @blur=\"onBlur()\"\n      >\n        <CCCard :style=\"{ 'max-height': optionsHeight + 'px', 'overflow': 'auto' }\">\n          <div\n            v-for=\"(item, index) in optionVal\"\n            :key=\"item.label\"\n            :class=\"[isAddClassFromValue ? `_value-${item.value}` : '',{\n              _options_item_table_design1: props.optionsDesign === 1,\n              _options_item_table_select_design1: model === item.value && props.optionsDesign === 1,\n              _options_item_table_design2:\n                props.optionsDesign === 2 && index !== optionVal.length - 1,\n              _options_item_table_last_design2:\n                props.optionsDesign === 2 && index === optionVal.length - 1,\n              _options_item_table_select_design2: model === item.value && props.optionsDesign === 2,\n            }]\"\n            @click=\"slectOptionsItem(item.value)\"\n          >\n            {{ item.label }}\n          </div>\n        </CCCard>\n      </div>\n    </transition>\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n._box\n  position: relative\n  font-family: 'Roboto', sans-serif\n  box-sizing: border-box\n\n._label_container\n  display: flex\n  align-items: center\n  padding: 0 5px\n  margin-bottom: 2px\n  line-height: 24px\n\n._label\n  font-size: 16px\n  color: #707070\n  width: fit-content\n\n._required_text\n  font-size: 14px\n  color: #D20000\n\n._required_icon_container\n  height: 24px\n  display: flex\n  align-items: center\n\n._required_icon\n  font-size: 14px\n  background: #D20000\n  color: #fff\n  line-height: 22px\n  padding: 0 5px\n  border-radius: 5px\n\n._required_position_right\n  margin-left: auto\n\n._select_form_container\n  background-color: #fff\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  font-size: 16px\n  display: flex\n  align-items: center\n  cursor: pointer\n  height: auto\n\n._size_s\n  min-height: 40px\n  height: auto\n\n._size_m\n  min-height: 45px\n  height: auto\n\n._size_l\n  min-height: 50px\n  height: auto\n\n._cc_select_modal_card\n  padding: 0\n  overflow: auto\n\n._standard\n  border-radius: 0px\n  padding: 1px 5px 0 16px\n  border-bottom: solid 1px var(--c-primary)\n\n._outline\n  outline: none\n  border-radius: 5px\n  padding: 0 5px 0 15px\n  border: solid 1px var(--c-primary)\n\n._shadow\n  border-radius: 5px\n  box-shadow: rgba(99, 99, 99, 0.2) 0px 0px 8px 1px\n  -webkit-appearance: none\n  appearance: none\n  padding: 1px 5px 1px 16px\n\n._square\n  border-radius: 0px\n  padding: 0 5px 0 15px\n  border: solid 1px var(--c-primary)\n\n._disabled\n  background: #ECECEC\n  cursor: not-allowed\n  opacity: 0.6\n  ._text\n    opacity: 0.7\n    white-space: normal\n    word-break: break-word\n    line-height: 1.4\n    display: block\n\n._placeholder_text\n  color: #D2D2D2\n\n._arrow_drop_down\n  font-size: 30px\n  color: #707070\n  margin-left: auto\n\n._options_item_container\n  position: absolute\n  z-index: 999999\n  width: 100%\n._options_item_container_dialog\n  position: fixed\n  z-index: 999999999\n  width: 100%\n  height: 100%\n  top: 0\n  left: 0\n  background: rgba(0, 0, 0, 0.5)\n  display: flex\n  justify-content: center\n  align-items: center\n  max-width: 90vh\n\n._options_item_table_design1\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  padding: 10px\n  cursor: pointer\n  transition: 0.3s\n  color: #707070\n._options_item_table_design1:hover\n  background: var(--c-primary)\n  color: #fff\n._options_item_table_select_design1\n  background: var(--c-primary)\n  color: #fff\n._options_item_table_space\n  height: 20px\n\n._options_item_table_design2\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  padding: 10px\n  cursor: pointer\n  transition: 0.3s\n  color: #707070\n  border-bottom: 1px solid #707070\n._options_item_table_design2:hover\n  background: rgb(var(--c-primary-rgb), 0.7)\n  color: #fff\n._options_item_table_last_design2\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  padding: 10px\n  cursor: pointer\n  transition: 0.3s\n  color: #707070\n._options_item_table_last_design2:hover\n  background: rgb(var(--c-primary-rgb), 0.7)\n  color: #fff\n._options_item_table_select_design2\n  background: rgb(var(--c-primary-rgb), 0.7)\n  color: #fff\n\n._error_message_common\n  color: #D20000\n  font-size: 16px\n\n._error_standard\n  border-bottom: solid 1px #D20000\n\n._error_outline_and_square\n  border: solid 1px #D20000\n\n._error_bg_common\n  background: rgba(210,0,0,0.2)\n\n.v-enter-active, .v-leave-active\n  transition: opacity 0.3s ease\n\n.v-enter-from, .v-leave-to\n  opacity: 0\n</style>\n","<script setup lang=\"ts\">\nimport { ref, computed, onMounted, PropType } from 'vue'\nimport { SizeTypes } from '../../types'\n\nconst props = defineProps({\n  /**\n   * 値\n   * @example 1\n   */\n  modelValue: { type: Number, default: 1 },\n  /**\n   * パターン\n   * @example 1\n   */\n  pattern: { type: Number, default: 1 },\n  /**\n   * ボタンの最大値\n   * @example 10\n   */\n  max: { type: Number, default: 1 },\n  /**\n   * ページに表示するボタンの最大値\n   * @example 5\n   */\n  maxPages: { type: Number, default: 1 },\n  /**\n   * サイズ\n   * @example 'S' | 'L'\n   */\n  size: { type: String as PropType<SizeTypes>, default: 'L' },\n})\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', val: number): void\n}>()\n\nconst model = computed({\n  get: () => props.modelValue,\n  set: (value) => {\n    emit('update:modelValue', value)\n  },\n})\n\n// 全てのボタン数配列を定義する\nconst isBtnAllNumArray = ref<number[]>([])\n\n// 表示するボタン数配列を定義する\nconst isBtnDispNumArray = ref<number[]>([])\n\nonMounted(() => {\n  // ボタンの最大値が未設定の場合、全てのボタン数配列に1を追加する\n  if (!props.max) {\n    isBtnAllNumArray.value.push(1)\n    return\n  }\n\n  // 全てのボタン数配列にprops.max分の数字を追加する\n  for (let i = 1; i < props.max + 1; i++) {\n    isBtnAllNumArray.value.push(i)\n  }\n\n  // 全てのボタン数配列へページに表示するボタンの最大値分フィルターをかけて、表示するボタン数配列へ代入する\n  isBtnDispNumArray.value = isBtnAllNumArray.value.filter((num) => num <= props.maxPages)\n})\n\n// pattern1\n// 番号ボタンをクリックする\nconst clickBtnNum = (selectNum: number) => {\n  // 選択された数字をmodelへ代入する\n  model.value = selectNum\n\n  // 配列の中央を定義する\n  const centerIndex = Math.round(isBtnDispNumArray.value.length / 2 - 1)\n\n  // 選択されたボタン数より上のループ処理回数を定義する\n  let upperCounter = 0\n  // 選択されたボタン数より下のループ処理回数を定義する\n  let underCounter = 0\n  if (props.maxPages % 2 === 0) {\n    upperCounter = props.maxPages - centerIndex\n    underCounter = props.maxPages - centerIndex - 1\n  } else {\n    upperCounter = props.maxPages - centerIndex\n    underCounter = props.maxPages - centerIndex\n  }\n\n  // 選択されたボタン数より上の数字配列を生成する\n  const upperNumArr = ref<number[]>([])\n  for (let i = 1; i < upperCounter; i++) {\n    if (selectNum + i <= props.max) {\n      upperNumArr.value.push(selectNum + i)\n    } else {\n      underCounter++\n    }\n  }\n\n  // 選択されたボタン数より下の数字配列を生成する\n  const underNumArr = ref<number[]>([])\n  for (let i = 1; i < underCounter; i++) {\n    underNumArr.value.unshift(selectNum - i)\n  }\n\n  // 選択されたボタンのみ配列に格納する\n  const selectNumArr = ref<number[]>([selectNum])\n\n  // 選択されたボタンの値を元に、新いボタン配列を生成する\n  const newBtnDispNumArray = ref<number[]>([\n    ...underNumArr.value,\n    ...selectNumArr.value,\n    ...upperNumArr.value,\n  ])\n\n  if (newBtnDispNumArray.value[0] <= 0) {\n    // 新いボタン配列のindex0の値が0を含む低い数字になった場合props.maxPages分フィルターをかけて変数へ代入する\n    isBtnDispNumArray.value = isBtnAllNumArray.value.filter((num) => num <= props.maxPages)\n  } else {\n    // 新いボタン配列を変数へ代入する\n    isBtnDispNumArray.value = newBtnDispNumArray.value\n  }\n}\n\n// 左ボタンをクリック\nconst clickArrowLeft = (pattern: number) => {\n  if (model.value === 1) return\n  model.value--\n\n  // pattern1の場合\n  // ボタンの最大値がページに表示するボタンの最大値より大きい場合\n  if (pattern === 1 && props.max > props.maxPages) {\n    // 表示されているボタン配列の中央の値を定義する\n    const centerIndex = Math.round(isBtnDispNumArray.value.length / 2 - 1)\n    const centerNum = isBtnDispNumArray.value[centerIndex]\n\n    // 表示されるスタート位置の数字を定義する\n    const startNum = isBtnDispNumArray.value.slice(-1)[0] - props.maxPages\n\n    // 表示されるエンド位置の数字を定義する\n    const endNum = isBtnDispNumArray.value.slice(-1)[0] - 1\n\n    // 現在地が中央値を超えて、エンド位置以下の場合\n    if (model.value === centerNum && startNum > 0) {\n      isBtnDispNumArray.value = isBtnAllNumArray.value.filter(\n        (num) => num >= startNum && num <= endNum\n      )\n    }\n  }\n}\n\n// 右ボタンをクリック\nconst clickArrowRight = (pattern: number) => {\n  if (model.value === props.max) return\n  model.value++\n\n  // pattern1の場合\n  // ボタンの最大値がページに表示するボタンの最大値より大きい場合\n  if (pattern === 1 && props.max > props.maxPages) {\n    // 表示されているボタン配列の中央の値を定義する\n    const centerIndex = Math.round(isBtnDispNumArray.value.length / 2 - 1)\n    const centerNum = isBtnDispNumArray.value[centerIndex]\n\n    // 表示されるスタート位置の数字を定義する\n    const startNum = isBtnDispNumArray.value[1]\n\n    // 表示されるエンド位置の数字を定義する\n    const endNum = isBtnDispNumArray.value.slice(-1)[0] + 1\n\n    // 現在地が中央値を超えて、エンド位置以下の場合\n    if (model.value >= centerNum && endNum < props.max) {\n      isBtnDispNumArray.value = isBtnAllNumArray.value.filter(\n        (num) => num >= startNum && num <= endNum\n      )\n    }\n    // エンド位置とボタンの最大値が同じ場合\n    if (endNum === props.max) {\n      isBtnDispNumArray.value = isBtnAllNumArray.value.filter(\n        (num) => num >= props.max - props.maxPages + 1 && num <= props.max\n      )\n    }\n  }\n}\n</script>\n\n<template>\n  <div class=\"_box\">\n    <div\n      class=\"_arrow_container_common\"\n      :class=\"{\n        _arrow_container_disabled_common: model === 1,\n        _arrow_container_common_size_s: props.size === 's' || props.size === 'S',\n      }\"\n      @click=\"clickArrowLeft(props.pattern)\"\n    >\n      <div\n        class=\"_arrow_left\"\n        :class=\"{\n          _arrow_left_size_s: props.size === 's' || props.size === 'S',\n        }\"\n      />\n    </div>\n\n    <!-- pattern1 -->\n    <div\n      v-show=\"props.pattern === 1\"\n      v-for=\"btnNum in isBtnDispNumArray\"\n      :key=\"btnNum\"\n      class=\"_pattern_1_num_btn\"\n      :class=\"{\n        _pattern_1_num_btn_active: btnNum === model,\n        _pattern_1_num_btn_passive: btnNum !== model,\n        _pattern_1_num_btn_size_s: props.size === 's' || props.size === 'S',\n      }\"\n      @click=\"clickBtnNum(btnNum)\"\n    >\n      {{ btnNum }}\n    </div>\n\n    <!-- pattern2 -->\n    <div\n      v-show=\"props.pattern === 2\"\n      class=\"_pattern_2_num_container\"\n      :class=\"{\n        _pattern_2_num_container_size_s: props.size === 's' || props.size === 'S',\n      }\"\n    >\n      {{ model }} / {{ props.max }}\n    </div>\n\n    <div\n      class=\"_arrow_container_common\"\n      :class=\"{ _arrow_container_disabled_common: model === props.max }\"\n      @click=\"clickArrowRight(props.pattern)\"\n    >\n      <div\n        class=\"_arrow_right\"\n        :class=\"{\n          _arrow_right_size_s: props.size === 's' || props.size === 'S',\n        }\"\n      />\n    </div>\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n._box\n  display: flex\n  align-items: center\n  width: fit-content\n  font-family: 'Roboto', sans-serif\n\n._pattern_1_num_btn\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  user-select: none\n  height: 40px\n  width: 40px\n  border-radius: 50%\n  display: flex\n  justify-content: center\n  align-items: center\n  cursor: pointer\n._pattern_1_num_btn_active\n  background: var(--c-primary)\n  color: #fff\n  font-weight: bold\n._pattern_1_num_btn_passive\n  background: #fff\n  color: var(--c-primary)\n\n._pattern_1_num_btn_size_s\n  font-size: 14px\n  height: 35px\n  width: 35px\n\n._arrow_container_common\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  width: 40px\n  height: 40px\n  display: flex\n  justify-content: center\n  align-items: center\n  border-radius: 50%\n  cursor: pointer\n._arrow_container_disabled_common\n  cursor: not-allowed\n  opacity: 0.7\n\n._arrow_container_common_size_s\n  width: 35px\n  height: 35px\n\n._arrow_left\n  height: 18px\n  width: 18px\n  transform: rotate(45deg)\n  border-left: solid 5px var(--c-primary)\n  border-bottom: solid 5px var(--c-primary)\n\n._arrow_left_size_s\n  height: 13px\n  width: 13px\n\n._pattern_2_num_container\n  user-select: none\n  font-size: 20px\n  font-weight: bold\n  min-width: 87px\n  text-align: center\n  color: var(--c-primary)\n\n._pattern_2_num_container_size_s\n  font-size: 18px\n\n._arrow_right\n  height: 18px\n  width: 18px\n  transform: rotate(45deg)\n  border-top: solid 5px var(--c-primary)\n  border-right: solid 5px var(--c-primary)\n\n._arrow_right_size_s\n  height: 13px\n  width: 13px\n</style>\n","<script setup lang=\"ts\">\nimport { computed, PropType } from 'vue'\nimport { FormType } from '../../types/Form/Form.types'\n\nconst props = defineProps({\n  /**\n   * 値\n   * @example 'テスト', 100\n   */\n  modelValue: { type: String },\n  /**\n   * rows\n   * @example '20'\n   */\n  rows: { type: String, default: '10' },\n  /**\n   * デザイン\n   * @example 'outline'\n   */\n  design: { type: String as PropType<FormType>, default: 'outline' },\n  /**\n   * ディセーブル\n   * @example disable => true\n   */\n  disabled: { type: Boolean, default: false },\n  /**\n   * ラベル\n   * @example 'お名前'\n   */\n  label: { type: String, default: '' },\n  /**\n   * プレースホルダー\n   * @example 'お名前'\n   */\n  placeholder: { type: String, default: '' },\n  /**\n   * 必須テキスト\n   * @example '*' | '*必須'\n   */\n  requiredText: { type: String as PropType<'※' | '※必須'>, default: '' },\n  /**\n   * 必須アイコン\n   * @example true\n   */\n  requiredIcon: { type: Boolean, default: false },\n  /**\n   * エラー1\n   * @example true\n   */\n  error1: { type: Boolean, default: false },\n  /**\n   * エラー2\n   * @example true\n   */\n  error2: { type: Boolean, default: false },\n  /**\n   * エラー3\n   * @example '****を入力してください'\n   */\n  error3: { type: String, default: '' },\n  /**\n   * エラー4\n   * @example '****を入力してください'\n   */\n  error4: { type: String, default: '' },\n})\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', val: string | undefined): void\n  (e: 'onBlur'): void\n  (e: 'onFocus'): void\n}>()\n\nconst model = computed({\n  get: () => props.modelValue,\n  set: (value) => {\n    emit('update:modelValue', value)\n  },\n})\nconst onBlur = () => {\n  emit('onBlur')\n}\nconst onFocus = () => {\n  emit('onFocus')\n}\n</script>\n\n<template>\n  <div class=\"_box\">\n    <div class=\"_label_container\">\n      <div class=\"_label\">{{ label }}</div>\n      <div\n        v-show=\"requiredText\"\n        class=\"_required_text\"\n        :class=\"{ _required_position_right: label }\"\n      >\n        {{ requiredText }}\n      </div>\n      <div\n        v-show=\"requiredIcon\"\n        class=\"_required_icon_container\"\n        :class=\"{ _required_position_right: label }\"\n      >\n        <div class=\"_required_icon\">必須</div>\n      </div>\n    </div>\n\n    <textarea\n      v-model=\"model\"\n      :rows=\"rows\"\n      :disabled=\"disabled\"\n      :placeholder=\"placeholder\"\n      :class=\"{\n        _outline: props.design === 'outline',\n        _shadow: props.design === 'shadow',\n        _square: props.design === 'square',\n        _disabled: props.disabled,\n        _error_border_common:\n          props.design !== 'shadow' &&\n          (props.error1 || props.error2 || props.error3 || props.error4),\n        _error_bg_common: props.error2 || props.error4,\n      }\"\n      class=\"_textarea\"\n      @blur=\"onBlur()\"\n      @focus=\"onFocus()\"\n    />\n\n    <div v-show=\"props.error3\" class=\"_error_message_common\">\n      {{ props.error3 }}\n    </div>\n\n    <div v-show=\"props.error4\" class=\"_error_message_common\">\n      {{ props.error4 }}\n    </div>\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n._box\n  font-family: 'Roboto', sans-serif\n  width: 100%\n  box-sizing: border-box\n\n._label_container\n  display: flex\n  align-items: center\n  padding: 0 5px\n  margin-bottom: 2px\n  line-height: 24px\n\n._label\n  font-size: 16px\n  color: #707070\n  width: fit-content\n\n._required_text\n  font-size: 14px\n  color: #D20000\n\n._required_position_right\n  margin-left: auto\n\n._required_icon_container\n  height: 24px\n  display: flex\n  align-items: center\n\n._required_icon\n  font-size: 14px\n  background: #D20000\n  color: #fff\n  line-height: 22px\n  padding: 0 5px\n  border-radius: 5px\n\n._textarea\n  padding: 10px 15px\n  border: none\n  font-size: 16px\n  box-sizing: border-box\n\n._outline\n  outline: none\n  border-radius: 5px\n  width: 100%\n  border: solid 1px var(--c-primary)\n\n._shadow\n  outline: none\n  border-radius: 5px\n  box-shadow: rgba(99, 99, 99, 0.2) 0px 0px 8px 1px\n  -webkit-appearance: none\n  appearance: none\n  width: 100%\n\n._square\n  outline: none\n  border-radius: 0px\n  width: 100%\n  border: solid 1px var(--c-primary)\n\n._disabled\n  background: #ECECEC\n  cursor: not-allowed\n\n._error_message_common\n  color: #D20000\n  font-size: 16px\n\n._error_border_common\n  border: solid 1px #D20000\n\n._error_bg_common\n  background: rgba(210,0,0,0.2)\n</style>\n","<script setup lang=\"ts\">\nimport { PropType, computed, ref, watch } from 'vue'\nimport CCMDIcon from '../CCMDIcon/CCMDIcon.vue'\nimport type { ColorTypes, MDIconTypes } from '../../types'\n\nconst props = defineProps({\n  /**\n   * 値\n   * @example 1\n   */\n  modelValue: { type: Number, default: 0 },\n  /**\n   * コンテンツ配列\n   * @example ['Google', 'Apple', 'Facebook', 'Amazon.com']\n   */\n  options: { type: Array as PropType<string[]>, default: ['item1', 'item2'] },\n  /**\n   * アラート配列\n   * 通知の設定が必要ないときは0をセットする\n   * optionsの配列と同じ順番でセットする\n   * @example [0,10,0,true]\n   */\n  alertArr: {\n    type: Array as PropType<(number | boolean)[]>,\n    default: [],\n  },\n  /**\n   * パターン\n   * @example 2\n   */\n  pattern: { type: Number, default: 1 },\n  /**\n   * 横幅\n   * @example 100\n   */\n  width: { type: Number },\n  /**\n   * アイコンを指定できるようにする\n   * @example [{name: 'home', type: 'outlined'}, {name: 'settings', type: 'outlined'}]\n   */\n  iconSetArr: { type: Object as PropType<{\n    name: MDIconTypes,\n    type: '' | 'outlined' | 'sharp' | 'round' | 'two-tone'\n  }[]\n    > ,default: []},\n  /**\n   * タブのカラーを変更できるようにする\n   * @example 'secondary' | '#FF0000'\n   * pattern3のみ有効\n   */\n  colorArr: {\n    type: Array as PropType<string[]>,\n    default: [],\n  },\n  /**\n   * シャドウをつけるかどうか\n   * @example true\n   */\n  isShadow: { type: Boolean, default: false },\n  /**\n   * ボーダーをつけるかどうか：pattern3のみ有効\n   */\n  isBorder: { type: Boolean, default: false },\n})\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', val: number): void\n}>()\n\nconst model = computed({\n  get: () => props.modelValue,\n  set: value => {\n    emit('update:modelValue', value)\n  },\n})\nconst alertArr = computed(() => props.alertArr)\n\n// 対象のアイテムをクリック\nconst selectItem = (index: number) => {\n  model.value = index\n}\n\n// カラーコードが指定された場合に対応するスタイルを設定\nconst tabColorArr = computed(() => {\n  const colorMap = props.colorArr.flatMap((color) => {\n    if (color.startsWith('#')) {\n    return color\n  }\n  return `var(--c-${color})`\n  })\n  return colorMap\n})\n// console.log('tabColorArr:',tabColorArr.value)\n// iconを配列で受け取る\nconst iconSetArr = computed(() => props.iconSetArr)\n\n</script>\n\n<template>\n  <div class=\"_box\">\n    <!-- pattern1 -->\n    <div v-show=\"pattern === 1\" class=\"_item_container_common\">\n      <div\n        v-for=\"(item, index) in options\"\n        :key=\"index\"\n        :style=\"{\n          width: width ? width + 'px' : '100%'\n        }\"\n        :class=\"{\n          _pattern1_item_border_left: index === 0,\n          _pattern1_item_active: model === index,\n          _pattern1_item_passive: model !== index,\n          _shadow: isShadow,\n        }\"\n        class=\"_pattern1_item\"\n        @click=\"selectItem(index)\"\n      >\n        <div v-if=\"alertArr.at(index)\" class=\"_badge_annihilation\" />\n        <div v-if=\"iconSetArr.at(index)?.name\" class=\"_icon_container_gap\">\n          <CCMDIcon :name=\"iconSetArr.at(index)?.name!\" :type=\"iconSetArr.at(index)?.type\" />\n        </div>\n        <div>\n          {{ item }}\n        </div>\n        <div v-if=\"alertArr.at(index)\" class=\"_alert_icon\">\n          {{\n            !alertArr.at(index)\n              ? ''\n              : typeof alertArr.at(index) === 'number'\n              ? alertArr.at(index)\n              : '!'\n          }}\n        </div>\n      </div>\n    </div>\n\n    <!-- pattern2 -->\n    <div v-show=\"pattern === 2\" class=\"_item_container_common _item_container_gap\" >\n      <div\n        v-for=\"(item, index) in options\"\n        :key=\"index\"\n        :style=\"{\n          width: width ? width + 'px' : '100%',\n        }\"\n        :class=\"{\n          _pattern2_item_active: model === index,\n          _pattern2_item_passive: model !== index,\n          _shadow: isShadow,\n        }\"\n        class=\"_pattern2_item \"\n        @click=\"selectItem(index)\"\n      >\n        <div class=\"_pattern2_content\">\n          <div v-if=\"alertArr.at(index)\" class=\"_badge_annihilation\" />\n          <div v-if=\"iconSetArr.at(index)?.name\"  class=\"_icon_container_gap\">\n            <CCMDIcon :name=\"iconSetArr.at(index)?.name!\" :type=\"iconSetArr.at(index)?.type\" />\n          </div>\n          <div class=\"_pattern2_content _parttern2_underbar\">{{ item }}</div>\n          <div v-if=\"alertArr.at(index)\" class=\"_alert_icon\">\n            {{\n              !alertArr.at(index)\n                ? ''\n                : typeof alertArr.at(index) === 'number'\n                ? alertArr.at(index)\n                : '!'\n            }}\n          </div>\n        </div>\n      </div>\n    </div>\n\n    <!-- pattern3 -->\n    <div v-show=\"pattern === 3\" class=\"_item_container_common _item_container_gap\" :class=\"{ _border_under: isBorder }\">\n      <div\n        v-for=\"(item, index) in options\"\n        :key=\"index\"\n        :style=\"{\n          width: width ? width + 'px' : '100%',\n          background: model === index ? tabColorArr[index] : '',\n          color: model !== index ? tabColorArr[index] : '',\n        }\"\n        :class=\"{\n          _pattern3_item_active: model === index,\n          _pattern3_item_passive: model !== index,\n          _shadow: isShadow,\n          \n        }\"\n        class=\"_pattern3_item\"\n        @click=\"selectItem(index)\"\n      >\n        <div v-if=\"alertArr.at(index)\" class=\"_badge_annihilation\" />\n        <div v-if=\"iconSetArr.at(index)?.name\" class=\"_icon_container_gap\">\n          <CCMDIcon :name=\"iconSetArr.at(index)?.name!\" :type=\"iconSetArr.at(index)?.type\" />\n        </div>\n        <div>\n          {{ item }}\n        </div>\n        <div v-if=\"alertArr.at(index)\" class=\"_alert_icon\">\n          {{\n            !alertArr.at(index)\n              ? ''\n              : typeof alertArr.at(index) === 'number'\n              ? alertArr.at(index)\n              : '!'\n          }}\n        </div>\n      </div>\n    </div>\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n._box\n  font-family: 'Roboto', sans-serif\n  font-size: 16px\n\n._item_container_common\n  display: flex\n._item_container_gap\n  gap: 10px\n\n._pattern1_item\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  height: 38px\n  justify-content: center\n  display: flex\n  place-items: center\n  cursor: pointer\n  transition: 0.3s\n  border-top: solid 1px var(--c-primary)\n  border-bottom: solid 1px var(--c-primary)\n  border-right: solid 1px var(--c-primary)\n._pattern1_item:hover\n  background: var(--c-primary)\n  opacity: 0.7\n  color: #fff\n._badge_annihilation\n  width: 27px\n._alert_icon\n  border-radius: 50%\n  width: 17px\n  height: 17px\n  color: var(--c-text-color)\n  background: var(--c-warning)\n  text-align: center\n  line-height: 17px\n  margin-left: 10px\n._pattern1_item_border_left\n  border-left: solid 1px var(--c-primary)\n._pattern1_item_active\n  background: var(--c-primary)\n  color: #fff\n._pattern1_item_passive\n  background: #fff\n  color: var(--c-primary)\n\n._pattern2_item\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  height: 30px\n  display: flex\n  justify-content: center\n  align-items: center\n  border-top-left-radius: 10px\n  border-top-right-radius: 10px\n  cursor: pointer\n  transition: 0.3s\n._pattern2_content\n  display: flex\n  height: 100%\n  justify-content: center\n  align-items: center\n  box-sizing: border-box\n  ._parttern2_underbar\n    padding-bottom: 2px\n\n._pattern2_item:hover\n  color: var(--c-primary)\n._pattern2_item_active\n  color: var(--c-primary)\n  ._parttern2_underbar\n    border-bottom: solid 2px var(--c-primary)\n._pattern2_item_passive\n  color: #D2D2D2\n  ._parttern2_underbar\n    opacity: 0.7\n\n._pattern3_item\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0)\n  height: 40px\n  display: flex\n  justify-content: center\n  place-items: center\n  border-top-left-radius: 10px\n  border-top-right-radius: 10px\n  cursor: pointer\n  transition: 0.3s\n\n._pattern3_item_active\n  background: var(--c-primary)\n  opacity: 0.7\n  color: #fff\n._pattern3_item_active:hover\n  background: var(--c-primary)\n  opacity: 0.5\n._pattern3_item_passive\n  background: #ECECEC\n  color: var(--c-primary)\n._pattern3_item_passive:hover\n  background: rgb(236, 236, 236, 0.7)\n\n._icon_container_gap\n  display: flex\n  align-items: center\n  justify-content: center\n\n._shadow\n  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1), -1px -1px 5px rgba(0, 0, 0, 0.1)\n._border_under\n  border-bottom: solid 2px var(--c-primary)\n\n</style>\n","function getType(payload) {\n  return Object.prototype.toString.call(payload).slice(8, -1);\n}\n\nfunction isAnyObject(payload) {\n  return getType(payload) === \"Object\";\n}\n\nfunction isArray(payload) {\n  return getType(payload) === \"Array\";\n}\n\nfunction isBlob(payload) {\n  return getType(payload) === \"Blob\";\n}\n\nfunction isBoolean(payload) {\n  return getType(payload) === \"Boolean\";\n}\n\nfunction isDate(payload) {\n  return getType(payload) === \"Date\" && !isNaN(payload);\n}\n\nfunction isEmptyArray(payload) {\n  return isArray(payload) && payload.length === 0;\n}\n\nfunction isPlainObject(payload) {\n  if (getType(payload) !== \"Object\")\n    return false;\n  const prototype = Object.getPrototypeOf(payload);\n  return !!prototype && prototype.constructor === Object && prototype === Object.prototype;\n}\n\nfunction isEmptyObject(payload) {\n  return isPlainObject(payload) && Object.keys(payload).length === 0;\n}\n\nfunction isEmptyString(payload) {\n  return payload === \"\";\n}\n\nfunction isError(payload) {\n  return getType(payload) === \"Error\" || payload instanceof Error;\n}\n\nfunction isFile(payload) {\n  return getType(payload) === \"File\";\n}\n\nfunction isFullArray(payload) {\n  return isArray(payload) && payload.length > 0;\n}\n\nfunction isFullObject(payload) {\n  return isPlainObject(payload) && Object.keys(payload).length > 0;\n}\n\nfunction isString(payload) {\n  return getType(payload) === \"String\";\n}\n\nfunction isFullString(payload) {\n  return isString(payload) && payload !== \"\";\n}\n\nfunction isFunction(payload) {\n  return typeof payload === \"function\";\n}\n\nfunction isType(payload, type) {\n  if (!(type instanceof Function)) {\n    throw new TypeError(\"Type must be a function\");\n  }\n  if (!Object.prototype.hasOwnProperty.call(type, \"prototype\")) {\n    throw new TypeError(\"Type is not a class\");\n  }\n  const name = type.name;\n  return getType(payload) === name || Boolean(payload && payload.constructor === type);\n}\n\nfunction isInstanceOf(value, classOrClassName) {\n  if (typeof classOrClassName === \"function\") {\n    for (let p = value; p; p = Object.getPrototypeOf(p)) {\n      if (isType(p, classOrClassName)) {\n        return true;\n      }\n    }\n    return false;\n  } else {\n    for (let p = value; p; p = Object.getPrototypeOf(p)) {\n      if (getType(p) === classOrClassName) {\n        return true;\n      }\n    }\n    return false;\n  }\n}\n\nfunction isMap(payload) {\n  return getType(payload) === \"Map\";\n}\n\nfunction isNaNValue(payload) {\n  return getType(payload) === \"Number\" && isNaN(payload);\n}\n\nfunction isNumber(payload) {\n  return getType(payload) === \"Number\" && !isNaN(payload);\n}\n\nfunction isNegativeNumber(payload) {\n  return isNumber(payload) && payload < 0;\n}\n\nfunction isNull(payload) {\n  return getType(payload) === \"Null\";\n}\n\nfunction isOneOf(a, b, c, d, e) {\n  return (value) => a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);\n}\n\nfunction isUndefined(payload) {\n  return getType(payload) === \"Undefined\";\n}\n\nconst isNullOrUndefined = isOneOf(isNull, isUndefined);\n\nfunction isObject(payload) {\n  return isPlainObject(payload);\n}\n\nfunction isObjectLike(payload) {\n  return isAnyObject(payload);\n}\n\nfunction isPositiveNumber(payload) {\n  return isNumber(payload) && payload > 0;\n}\n\nfunction isSymbol(payload) {\n  return getType(payload) === \"Symbol\";\n}\n\nfunction isPrimitive(payload) {\n  return isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);\n}\n\nfunction isPromise(payload) {\n  return getType(payload) === \"Promise\";\n}\n\nfunction isRegExp(payload) {\n  return getType(payload) === \"RegExp\";\n}\n\nfunction isSet(payload) {\n  return getType(payload) === \"Set\";\n}\n\nfunction isWeakMap(payload) {\n  return getType(payload) === \"WeakMap\";\n}\n\nfunction isWeakSet(payload) {\n  return getType(payload) === \"WeakSet\";\n}\n\nexport { getType, isAnyObject, isArray, isBlob, isBoolean, isDate, isEmptyArray, isEmptyObject, isEmptyString, isError, isFile, isFullArray, isFullObject, isFullString, isFunction, isInstanceOf, isMap, isNaNValue, isNegativeNumber, isNull, isNullOrUndefined, isNumber, isObject, isObjectLike, isOneOf, isPlainObject, isPositiveNumber, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isType, isUndefined, isWeakMap, isWeakSet };\n","import { isArray, isPlainObject } from 'is-what';\n\nfunction assignProp(carry, key, newVal, originalObject, includeNonenumerable) {\n  const propType = {}.propertyIsEnumerable.call(originalObject, key) ? \"enumerable\" : \"nonenumerable\";\n  if (propType === \"enumerable\")\n    carry[key] = newVal;\n  if (includeNonenumerable && propType === \"nonenumerable\") {\n    Object.defineProperty(carry, key, {\n      value: newVal,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    });\n  }\n}\nfunction copy(target, options = {}) {\n  if (isArray(target)) {\n    return target.map((item) => copy(item, options));\n  }\n  if (!isPlainObject(target)) {\n    return target;\n  }\n  const props = Object.getOwnPropertyNames(target);\n  const symbols = Object.getOwnPropertySymbols(target);\n  return [...props, ...symbols].reduce((carry, key) => {\n    if (isArray(options.props) && !options.props.includes(key)) {\n      return carry;\n    }\n    const val = target[key];\n    const newVal = copy(val, options);\n    assignProp(carry, key, newVal, target, options.nonenumerable);\n    return carry;\n  }, {});\n}\n\nexport { copy };\n","export const MAX_RENDERED_AMOUNT = 500;\n\nexport type PickerValue = {\n  label: string;\n  value: number | string;\n  // Hidden. Used in the Picker\n  visibility?: boolean;\n  sourceId?: number;\n};\n\nexport type TouchDataType = {\n  startY: number;\n  yArr: number[][];\n  touchScroll: number;\n  delta: number;\n};\n\nexport type TouchEventFunc = (e: TouchEvent) => void;\nexport type MouseEventFunc = (e: MouseEvent) => void;\n\nexport type EventNames = \"touchstart\" | \"touchmove\" | \"touchend\";\n\nexport interface MouseEvents extends MouseEvent {\n  type: \"mousedown\" | \"mousemove\" | \"mouseup\";\n}\n\nexport interface TouchEvents extends TouchEvent {\n  type: EventNames;\n}\n\nexport type MouseOrTouch = MouseEvents | TouchEvents;\n\nexport const isTouchEvent = (evt: MouseOrTouch): evt is TouchEvents =>\n  [\"touchstart\", \"touchmove\", \"touchend\"].includes(evt.type);\n\n/** EaseOutQuart easing function */\nexport const easing = (pos: number) => {\n  return -(Math.pow(pos - 1, 4) - 1);\n};\n\nexport const getVisibleOptions = (source: PickerValue[], index: number) => {\n  const min =\n    index - MAX_RENDERED_AMOUNT / 2 < 0 ? 0 : index - MAX_RENDERED_AMOUNT / 2;\n  const max =\n    min + MAX_RENDERED_AMOUNT > source.length\n      ? source.length\n      : min + MAX_RENDERED_AMOUNT;\n  return {\n    options: source.slice(min, max),\n    start: Math.floor(min),\n  };\n};\n\nexport const calculateVelocity = (yArr: number[][], itemHeight: number) => {\n  let velocity: number;\n\n  if (yArr.length === 1) {\n    velocity = 0;\n  } else {\n    const startTime = yArr[yArr.length - 2][1];\n    const endTime = yArr[yArr.length - 1][1];\n    const startY = yArr[yArr.length - 2][0];\n    const endY = yArr[yArr.length - 1][0];\n\n    // Calculated speed\n    velocity = (((startY - endY) / itemHeight) * 1000) / (endTime - startTime);\n    const sign = velocity > 0 ? 1 : -1;\n\n    velocity = Math.abs(velocity) > 30 ? 30 * sign : velocity;\n  }\n\n  return velocity;\n};\n\nexport const wheelDebounce = (\n  start: Function,\n  end: Function,\n  timer: number\n): MouseEventFunc => {\n  let timeout: ReturnType<typeof setTimeout>;\n  const returnFunc = (e: WheelEvent) => {\n    clearTimeout(timeout);\n    start(e);\n    timeout = setTimeout(() => end(), timer);\n  };\n  return returnFunc as MouseEventFunc;\n};\n","<template>\n  <div\n    class=\"picker\"\n    :style=\"{ perspective: `${perspective}px` }\"\n    @mousedown=\"(e) => touchstartForMouse(e)\"\n    @mouseup=\"touchend\"\n    @touchstart=\"(e) => touchstartForTouch(e)\"\n    @touchend=\"touchend\"\n    @wheel=\"debounced\"\n    @keyup.up=\"doManualSelect(selectedIndex, selectedIndex - 1)\"\n    @keyup.down=\"doManualSelect(selectedIndex, selectedIndex + 1)\"\n    tabindex=\"0\"\n    :slotKey=\"_slotKey\"\n  >\n    <div\n      v-if=\"arrows\"\n      class=\"picker_arrow top\"\n      @click=\"doManualSelect(selectedIndex, selectedIndex - 1)\"\n    >\n      <slot name=\"arrow-top\" />\n    </div>\n\n    <div class=\"picker_wrapper\">\n      <ul class=\"picker_options\" :style=\"listStyle\">\n        <li\n          v-for=\"(item, i) in visibleOptions\"\n          :key=\"item.value\"\n          class=\"picker_option\"\n          :style=\"{\n            'top': `${itemHeight * -0.5}px`,\n            'height': `${itemHeight}px`,\n            'line-height': `${itemHeight}px`,\n            'transform': `rotateX(${0 - rotationAngle * i}deg) translate3d(0, 0, ${radius}px)`,\n            'visibility': item.visibility ? 'visible' : 'hidden',\n          }\"\n          :data-index=\"i\"\n        >\n          <slot\n            name=\"before-option\"\n            v-if=\"props.addClassConditions.includes(String(item.value))\"\n          ></slot>\n          <slot name=\"option\" v-bind=\"item\">\n            {{ item.label }}\n          </slot>\n          <slot\n            name=\"after-option\"\n            v-if=\"props.addClassConditions.includes(String(item.value))\"\n          ></slot>\n        </li>\n      </ul>\n\n      <div\n        class=\"picker_chosen\"\n        :style=\"{\n          'height': `${itemHeight}px`,\n          'line-height': `${itemHeight}px`,\n        }\"\n      >\n        <ul class=\"picker_chosen_list\" :style=\"highlightListStyle\">\n          <li\n            v-for=\"(item, i) in visibleOptions\"\n            :key=\"i\"\n            class=\"picker_chosen_item\"\n            :style=\"`height: ${itemHeight}px`\"\n          >\n            <slot\n              name=\"before-option\"\n              v-if=\"props.addClassConditions.includes(String(item.value))\"\n            ></slot>\n            <slot name=\"option\" v-bind=\"item\">\n              {{ item.label }}\n            </slot>\n            <slot\n              name=\"after-option\"\n              v-if=\"props.addClassConditions.includes(String(item.value))\"\n            ></slot>\n          </li>\n        </ul>\n      </div>\n    </div>\n\n    <div\n      v-if=\"arrows\"\n      class=\"picker_arrow bottom\"\n      @click=\"doManualSelect(selectedIndex, selectedIndex + 1)\"\n    >\n      <slot name=\"arrow-bottom\" />\n    </div>\n  </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { PropType, ref, computed, onMounted, watch, toRef } from 'vue'\nimport {\n  calculateVelocity,\n  easing,\n  getVisibleOptions,\n  isTouchEvent,\n  MouseOrTouch,\n  PickerValue,\n  TouchDataType,\n  wheelDebounce,\n  MouseEventFunc,\n  TouchEventFunc,\n} from './utils'\n\nconst props = defineProps({\n  /** Pickerに表示するオプションの配列。形式は { value: string, label: string } です */\n  options: {\n    type: Array as PropType<PickerValue[]>,\n    default: () => [],\n  },\n  /**\n   * text-alignの指定\n   */\n  align: {\n    type: String as PropType<'left' | 'center' | 'right'>,\n    default: 'center',\n  },\n\n  selectedBorderRadius: {\n    type: Array as PropType<string[]>,\n    default: ['100px', '100px', '100px', '100px'],\n  },\n\n  /** Pickerのデフォルト値。初期値としても、v-modelとしても使用します */\n  modelValue: {\n    type: Object as PropType<PickerValue | null>,\n    default: null,\n  },\n\n  /** リスト内の各アイテム間の距離 */\n  radius: {\n    type: Number,\n    default: 100,\n  },\n\n  /** Pickerが視聴者から「どれくらい遠くにあるか」を定義します。視覚的にPickerの丸みを変更します。 */\n  perspective: {\n    type: Number,\n    default: 200,\n  },\n\n  /** リスト内の各アイテムの高さ。それらの位置を適切に計算するために必要です */\n  itemHeight: {\n    type: Number,\n    default: 40,\n  },\n\n  /**\n   * Pickerがタッチにどれぐらい敏感か。大きな値を設定すると、タッチを動かした後のPickerの加速が増します。\n   * 範囲は0から10です。\n   */\n  sensitivity: {\n    type: Number,\n    default: 8,\n    validator: function (value: number) {\n      return value > 0 && value <= 10\n    },\n  },\n  /**\n   * スロットのキーを定義します。これは、複数のPickerを同じページに配置するときに、それらを区別するために使用されます。\n   */\n  slotKey: {\n    type: String,\n    default: () => {\n      let l = 8\n\n      // 生成する文字列に含める文字セット\n      let c = 'abcdefghijklmnopqrstuvwxyz0123456789'\n\n      let cl = c.length\n      let r = ''\n      for (let i = 0; i < l; i++) {\n        r += c[Math.floor(Math.random() * cl)]\n      }\n      return r\n    },\n  },\n  /**\n   * singleがfalseの場合、複数のPickerを同じページに配置するときに、それらを区別するために使用されます。\n   */\n  single: {\n    type: Boolean,\n    default: true,\n  },\n\n  /**\n   * Pickerのリング上に表示されるオプションの数。\n   * 最大で、指定された数プラスリングの中央に選択されたオプションを表示します。\n   * 最良の体験のためには、2の倍数である必要があります。\n   */\n  visibleOptionsAmount: {\n    type: Number,\n    default: 8,\n    validator: function (value: number) {\n      return value % 2 === 0\n    },\n  },\n\n  /** 'infinite'が渡されると、Pickerを永遠にスクロールできます。すべての値が繰り返されます */\n  type: {\n    type: String as PropType<'normal' | 'infinite'>,\n    default: 'normal',\n    validator: function (value: 'normal' | 'infinite') {\n      return ['normal', 'infinite'].includes(value)\n    },\n  },\n  /**\n   * Pickerのスタイルを定義します\n   */\n  style: {\n    type: Object as PropType<CSSStyleDeclaration>,\n    default: () => ({}),\n  },\n  /** トップまたはボトムにスクロールするための矢印を表示する必要があるかどうか */\n  arrows: {\n    type: Boolean,\n    default: false,\n  },\n  /** 条件に合う選択肢のCSSを触れるようにする */\n  addClassConditions: {\n    type: Array as PropType<string[]>,\n    default: () => [],\n  },\n})\nconst selected = ref<number | string>(\n  props.modelValue\n    ? props.options.findIndex((option) => option.value === props?.modelValue?.value)\n    : 0\n)\n/**\n * 選択されたオプションのインデックス\n */\nconst selectedIndex = ref(\n  typeof selected.value == 'number' ? (selected.value > -1 ? selected.value : 0) : 0\n)\n/**\n * 選択されたオプションを表示している部分のborder-radius\n */\nconst selectedBorderRadius = props.selectedBorderRadius.join(' ')\n\n/**\n * ランダムな文字列を生成\n */\nfunction createRandomString() {\n  let l = 8\n\n  // 生成する文字列に含める文字セット\n  let c = 'abcdefghijklmnopqrstuvwxyz0123456789'\n\n  let cl = c.length\n  let r = ''\n  for (let i = 0; i < l; i++) {\n    r += c[Math.floor(Math.random() * cl)]\n  }\n  return r\n}\n\n/**\n * スロットの識別keyを生成\n */\nconst _slotKey = createRandomString()\n\n/**\n * 選択されたオプションの値を変更したときに発火するイベント\n */\nconst emit = defineEmits(['update:modelValue', 'earlyUpdate'])\nwatch(selectedIndex, () => {\n  if (!props.options[selectedIndex.value]) return\n  emit('update:modelValue', props.options[selectedIndex.value])\n})\n\nconst options = getVisibleOptions(props.options, selectedIndex.value)\n\n// const circular = initCircularBuffer(this.options, selectedIndex);\n\nconst listStyle = ref({\n  transform: `transform: translate3d(0, 0, ${-1 * props.radius}px) rotateX(0deg)`,\n})\nconst highlightListStyle = ref({\n  transform: `translate3d(0, 0, 0)`,\n})\n\nconst source = ref(options)\nconst visibleOptions = ref(options.options)\nconst visibleOptionsIndex = ref(options.start)\n\nconst prevSelectedIndex = ref(selectedIndex.value)\nconst maxAcceleration = ref(10)\nconst requestAnimationId = ref(0)\nconst wheeling = ref(false)\nconst touchData = ref({\n  startY: 0,\n  yArr: [],\n  touchScroll: 0,\n  delta: 0,\n} as TouchDataType)\n\nconst debounced = computed<MouseEventFunc>(() => {\n  return wheelDebounce(wheel, endWheel, 100)\n})\nconst rotationAngle = computed<number>(() => {\n  return 185 / props.visibleOptionsAmount\n})\n\nonMounted(() => {\n  document.addEventListener('mousedown', touchstart as EventListener)\n  document.addEventListener('mouseup', touchend as EventListener)\n\n  // Move to the initial value\n  moveTo(selectedIndex.value)\n})\n\nconst modelValue = toRef(props, 'modelValue')\n\nwatch(\n  modelValue,\n  (val) => {\n    if (val?.value === selected.value) return\n    if (!val?.value) return\n    const newIndex = val?.value\n      ? source.value.options.findIndex((option) => option.value === val?.value)\n      : 0\n    selected.value = val?.value\n    if (selectedIndex.value !== newIndex) selectedIndex.value = newIndex\n    animateToScroll(selectedIndex.value, newIndex)\n  },\n  { deep: true }\n)\nfunction changeSelectedIndex(newIndex: number) {\n  if (Math.abs(newIndex - prevSelectedIndex.value) > props.visibleOptionsAmount / 2) {\n    const options = getVisibleOptions(source.value.options, newIndex)\n    visibleOptions.value = options.options\n    visibleOptionsIndex.value = options.start\n    prevSelectedIndex.value = selectedIndex.value\n  }\n  selectedIndex.value = newIndex\n}\n\nfunction startRoll(yPos: number) {\n  touchData.value.startY = yPos\n  touchData.value.yArr = [[yPos, new Date().getTime()]]\n  touchData.value.touchScroll = selectedIndex.value\n  stop()\n}\n\nfunction doRoll(yPos: number) {\n  touchData.value.yArr.push([yPos, new Date().getTime()])\n\n  // Calculate new selected index by the item height and the scrolled amount\n  const scrollAdd = (touchData.value.startY - yPos) / props.itemHeight\n  let moveToScroll = scrollAdd + selectedIndex.value\n\n  if (props.type === 'normal') {\n    if (moveToScroll < 0) {\n      moveToScroll = wheeling.value ? Math.max(-1.5, moveToScroll * 0.05) : moveToScroll * 0.3\n    } else if (moveToScroll > source.value.options.length) {\n      const toPos = moveToScroll - source.value.options.length\n      moveToScroll =\n        source.value.options.length + (wheeling ? Math.min(1.5, toPos * 0.05) : toPos * 0.3)\n    }\n  } else {\n    moveToScroll = normalizeScroll(moveToScroll)\n  }\n\n  touchData.value.touchScroll = moveTo(moveToScroll)\n}\n\n/**\n * ロール後の処理\n */\nfunction endRoll() {\n  const velocity = calculateVelocity(touchData.value.yArr, props.itemHeight)\n  changeSelectedIndex(touchData.value.touchScroll)\n\n  animateMoveByVelocity(velocity)\n}\n\nfunction touchstartForMouse(e: MouseEvent) {\n  if (e.target) e.target.addEventListener('touchmove', touchmove as EventListener)\n  document.addEventListener('mousemove', touchmove as EventListener)\n  const eventY = e.clientY\n  touchData.value.delta = 0\n  startRoll(eventY)\n}\nfunction touchstart(e: MouseOrTouch) {\n  if (e.target) e.target.addEventListener('touchmove', touchmove as EventListener)\n  document.addEventListener('mousemove', touchmove as EventListener)\n\n  const eventY = isTouchEvent(e) ? e.touches[0].clientY : e.clientY\n  touchData.value.delta = 0\n  startRoll(eventY)\n}\nfunction touchstartForTouch(e: TouchEvent) {\n  if (e.target) e.target.addEventListener('touchmove', touchmove as EventListener)\n  document.addEventListener('mousemove', touchmove as EventListener)\n\n  const eventY = e.touches[0].clientY\n  touchData.value.delta = 0\n  startRoll(eventY)\n}\n\nfunction getElPickerNodeInfo(ev: any) {\n  if (!ev?.parentElement) throw new Error('これ以上parentElementが見当たりません')\n  if (ev?.parentElement?.classList?.contains('picker')) return ev?.parentElement\n  return getElPickerNodeInfo(ev?.parentElement)\n}\n\nfunction getSlotKeyFromEl(ev: any) {\n  const targetEl = getElPickerNodeInfo(ev)\n  return targetEl?.attributes.slotKey.value\n}\n\nfunction touchmove(e: MouseOrTouch) {\n  const ev = e.target as any\n  if (!ev.className.includes('picker')) return\n\n  if (ev) {\n    const slotKey = getSlotKeyFromEl(ev)\n    if (slotKey !== _slotKey) return\n  }\n  e.preventDefault()\n  const eventY = isTouchEvent(e) ? e.touches[0].clientY : e.clientY\n  doRoll(eventY)\n}\nfunction wheel(e: WheelEvent) {\n  e.preventDefault()\n  if (!wheeling.value) {\n    wheeling.value = true\n    const startPos = e.clientY\n    touchData.value.delta = e.deltaY\n    startRoll(startPos)\n  } else {\n    touchData.value.delta -= e.deltaY\n    doRoll(touchData.value.startY + touchData.value.delta)\n  }\n}\n\nfunction endWheel() {\n  endRoll()\n  wheeling.value = false\n}\n\nfunction touchend(e: MouseEvent | TouchEvent) {\n  if (e.target) e.target.removeEventListener('touchmove', touchmove as EventListener)\n  document.removeEventListener('mousemove', touchmove as EventListener)\n  endRoll()\n}\n\nfunction normalizeScroll(scroll: number): number {\n  let normalizedScroll = scroll\n\n  while (normalizedScroll < 0) {\n    normalizedScroll += source.value.options.length\n  }\n  normalizedScroll = normalizedScroll % source.value.options.length\n\n  return normalizedScroll\n}\n\nconst preIndex = ref<number | null>(null)\n\n/** オプションの配列内の特定のインデックスに直ちに移動する*/\nfunction moveTo(newIndex: number): number {\n  if (props.type === 'infinite') {\n    changeSelectedIndex(normalizeScroll(newIndex))\n  }\n\n  if (!source.value.options.length) {\n    return 0\n  }\n\n  listStyle.value.transform = `translate3d(0, 0, ${-1 * props.radius}px) rotateX(${\n    rotationAngle.value * (newIndex - visibleOptionsIndex.value)\n  }deg)`\n  highlightListStyle.value.transform = `translate3d(0, ${\n    -(newIndex - visibleOptionsIndex.value) * props.itemHeight\n  }px, 0)`\n\n  visibleOptions.value = visibleOptions.value.map((item, index) => {\n    item.visibility =\n      Math.abs(visibleOptionsIndex.value + index - newIndex) <= props.visibleOptionsAmount / 2\n    return item\n  })\n\n  if (\n    newIndex - Math.round(newIndex) < 0.9 &&\n    preIndex.value !== null &&\n    Math.abs(preIndex.value - Math.round(newIndex)) < 1\n  ) {\n    emit('earlyUpdate', props.options[Math.round(newIndex)])\n  }\n  preIndex.value = newIndex\n  return newIndex\n}\n\nconst textAlign = props.align\n\n/**\n * At initial speed scroll (?) initV\n * @param {init} initV， initV Will be reset\n * スクロールの加速度に基づいて、整数の位置まで確実にスクロールすることができます（スクロールターゲットが選択された値を正確に受け取ることが保証されています）\n */\nfunction animateMoveByVelocity(initV: number) {\n  let initScroll\n  let finalScroll\n  let totalScrollLen\n\n  let a // 加速度\n  let t // 時間\n\n  if (props.type === 'normal') {\n    if (selectedIndex.value < 0 || selectedIndex.value > source.value.options.length - 1) {\n      a = maxAcceleration.value\n      initScroll = selectedIndex.value\n      finalScroll = selectedIndex.value < 0 ? 0 : source.value.options.length - 1\n      totalScrollLen = initScroll - finalScroll\n      t = Math.sqrt(Math.abs(totalScrollLen / a))\n\n      animateToScroll(initScroll, finalScroll, t)?.then(() => {\n        selectByScroll(selectedIndex.value)\n      })\n    } else {\n      initScroll = selectedIndex.value\n\n      a = initV > 0 ? -props.sensitivity : props.sensitivity // Is acceleration or deceleration\n      t = Math.abs(initV / a) // Speed reduced to 0 takes time\n      totalScrollLen = initV * t + (a * t * t) / 2 // Total rolling length\n      finalScroll = Math.round(selectedIndex.value + totalScrollLen) // Round to ensure accuracy and finally scroll to an integer\n      finalScroll =\n        finalScroll < 0\n          ? 0\n          : finalScroll > source.value.options.length - 1\n          ? source.value.options.length - 1\n          : finalScroll\n\n      totalScrollLen = finalScroll - initScroll\n      t = Math.sqrt(Math.abs(totalScrollLen / a))\n      animateToScroll(selectedIndex.value, finalScroll, t)?.then(() =>\n        selectByScroll(selectedIndex.value)\n      )\n    }\n  } else {\n    a = initV > 0 ? -props.sensitivity : props.sensitivity // Deceleration/Acceleration\n    t = Math.abs(initV / a) // Speed reduced to 0 takes time\n    totalScrollLen = initV * t + (a * t * t) / 2 // Total rolling length\n    finalScroll = Math.round(selectedIndex.value + totalScrollLen) // Round to ensure accuracy and finally scroll as an integer\n    animateToScroll(selectedIndex.value, finalScroll, t)?.then(() =>\n      selectByScroll(selectedIndex.value)\n    )\n  }\n}\n\nfunction animateToScroll(initScroll: number, finalScroll: number, time: number | null = null) {\n  if (finalScroll > source.value.options.length - 1 || finalScroll < 0) {\n    return\n  }\n\n  if (time === null) {\n    time = 0.125 * Math.abs(finalScroll - initScroll)\n  }\n\n  if (initScroll === finalScroll || time === 0) {\n    moveTo(initScroll)\n\n    return\n  }\n\n  const start = new Date().getTime() / 1000\n  let pass = 0\n  const totalScrollLen = finalScroll - initScroll\n\n  return new Promise<void>((resolve) => {\n    const tick = () => {\n      pass = new Date().getTime() / 1000 - start\n\n      if (pass < (time as number)) {\n        changeSelectedIndex(moveTo(initScroll + easing(pass / (time as number)) * totalScrollLen))\n        requestAnimationId.value = requestAnimationFrame(tick)\n      } else {\n        resolve()\n        stop()\n        changeSelectedIndex(moveTo(initScroll + totalScrollLen))\n      }\n    }\n    tick()\n  })\n}\n\nfunction stop() {\n  cancelAnimationFrame(requestAnimationId.value)\n}\n\n/**\n * スクロールで値を選択するときの処理\n * @param scroll　インデックスの数\n */\nfunction selectByScroll(scroll: number) {\n  scroll = normalizeScroll(scroll) | 0\n  if (scroll > source.value.options.length - 1) {\n    scroll = source.value.options.length - 1\n    moveTo(scroll)\n  }\n\n  moveTo(scroll)\n  selectedIndex.value = scroll\n  selected.value = source[scroll]\n}\nfunction doManualSelect(initScroll: number, finalScroll: number, time: number | null = null) {\n  animateToScroll(initScroll, finalScroll, time)?.then(() => selectByScroll(selectedIndex.value))\n}\n\nconst optionPadding = 30\nconst singleWidth = `calc(100% - ${optionPadding}px)`\nconst singlePadding = `0 ${optionPadding / 2}px`\n</script>\n\n<style scoped>\n.picker {\n  position: relative;\n  overflow-y: auto;\n  overscroll-behavior: none;\n  scrollbar-width: none;\n  -ms-overflow-style: none;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-items: center;\n  height: 300px;\n  margin: 16px auto 0;\n  background-color: #fff;\n  border-radius: 4px;\n  text-align: v-bind(textAlign);\n  font-size: 24px;\n  color: #bbbcc9;\n}\n\n.picker * {\n  box-sizing: initial;\n}\n\n.picker::-webkit-scrollbar {\n  display: none;\n}\n\n.picker:focus {\n  outline: none;\n}\n\n.picker_wrapper {\n  position: relative;\n  height: 100%;\n  width: 100%;\n  flex-grow: 1;\n  overflow: hidden;\n}\n\n.picker_options {\n  position: absolute;\n  top: 50%;\n  left: 0;\n  width: v-bind(singleWidth);\n  height: 0;\n  transform-style: preserve-3d;\n  margin: 0 auto;\n  padding: v-bind(singlePadding);\n  display: block;\n  transform: translateZ(-150px) rotateX(0deg);\n  -webkit-font-smoothing: subpixel-antialiased;\n  list-style: none;\n}\n\n.picker_option {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: v-bind(singleWidth);\n  padding: v-bind(singlePadding);\n\n  height: 50px;\n  user-select: none;\n  -webkit-font-smoothing: subpixel-antialiased;\n}\n\n.picker_chosen {\n  position: absolute;\n  top: 50%;\n  width: v-bind(singleWidth);\n\n  transform: translate(0, -50%);\n  overflow: hidden;\n  background-color: #f8f8fa;\n  border-radius: v-bind(selectedBorderRadius);\n  color: #121212;\n  font-size: 24px;\n  padding: v-bind(singlePadding);\n}\n\n.picker_chosen_list {\n  position: absolute;\n  width: v-bind(singleWidth);\n\n  margin: 0;\n  padding: 0;\n  list-style: none;\n}\n\n.picker_chosen_item,\n.picker_arrow {\n  user-select: none;\n  position: relative;\n}\n\n.picker_arrow {\n  cursor: pointer;\n}\n</style>\n","import dateFormat from 'dateformat'\nimport { PickerValue } from '../../CCWheelPicker/utils'\nimport { FormatTypes } from './helpers'\n\nexport type PickerValueForDate = Omit<PickerValue, 'value'> & { value: string }\n\nconst date = new Date()\nconst year = date.getFullYear()\n/**\n * 各スロットのフォーマット\n * mode日時の時だけ\n */\nexport const dateFormats: FormatTypes[] = [\n  {\n    label: 'yyyy',\n    startOffset: year - 100,\n    upperNumber: year + 100,\n    requiredDigit: false,\n    numberOptions: true,\n  }, // 4桁の数字で年を表示。\n  {\n    label: 'yy',\n    startOffset: 0,\n    upperNumber: 99,\n    requiredDigit: true,\n    numberOptions: true,\n  }, // 年を最後の2桁で表示；10未満の年には先頭ゼロあり。\n  {\n    label: 'dd',\n    startOffset: 1,\n    upperNumber: 31,\n    requiredDigit: true,\n    numberOptions: true,\n  }, // 月の日付としての数字；1桁の日には先頭ゼロあり。\n  {\n    label: 'd',\n    startOffset: 1,\n    upperNumber: 31,\n    requiredDigit: false,\n    numberOptions: true,\n  }, // 月の日付としての数字；1桁の日には先頭のゼロなし。\n  {\n    label: 'mm',\n    startOffset: 1,\n    upperNumber: 12,\n    requiredDigit: true,\n    numberOptions: true,\n  }, // 月を数字で表示；1桁の月には先頭ゼロあり。\n  {\n    label: 'm',\n    startOffset: 1,\n    upperNumber: 12,\n    requiredDigit: false,\n    numberOptions: true,\n  }, // 月を数字で表示；1桁の月には先頭のゼロなし。\n  {\n    label: 'h',\n    startOffset: 0,\n    upperNumber: 11,\n    requiredDigit: false,\n    numberOptions: true,\n  }, // 時間を表示；1桁の時間には12時間制で先頭のゼロなし。\n  {\n    label: 'hh',\n    startOffset: 0,\n    upperNumber: 11,\n    requiredDigit: true,\n    numberOptions: true,\n  }, // 時間を表示；1桁の時間には12時間制で先頭ゼロあり。\n  {\n    label: 'HH',\n    startOffset: 0,\n    upperNumber: 23,\n    requiredDigit: true,\n    numberOptions: true,\n  }, // 時間を表示；1桁の時間には24時間制で先頭ゼロあり。\n  {\n    label: 'H',\n    startOffset: 0,\n    upperNumber: 23,\n    requiredDigit: false,\n    numberOptions: true,\n  }, // 時間を表示；1桁の時間には24時間制で先頭のゼロなし。\n  {\n    label: 'MM',\n    startOffset: 0,\n    upperNumber: 59,\n    requiredDigit: true,\n    numberOptions: true,\n  }, // 分を数字で表示；1桁の分には先頭ゼロあり。\n  {\n    label: 'M',\n    startOffset: 0,\n    upperNumber: 59,\n    requiredDigit: false,\n    numberOptions: true,\n  }, // 分を数字で表示；1桁の分には先頭のゼロなし。\n  {\n    label: 'ss',\n    startOffset: 0,\n    upperNumber: 59,\n    requiredDigit: true,\n    numberOptions: true,\n  }, // 秒を数字で表示；1桁の秒には先頭ゼロあり。\n  {\n    label: 's',\n    startOffset: 0,\n    upperNumber: 59,\n    requiredDigit: false,\n    numberOptions: true,\n  }, // 秒を数字で表示；1桁の秒には先頭のゼロなし。\n]\n\n/**\n * 文字列を日付に変換する\n * @param model\n * @returns\n */\nexport function transformValueFromDateText(model, slotsFormat) {\n  const unitDateInJp = ['年', '月', '日']\n  const timeUnitDateInJp = ['時', '分']\n  const secondUnitDateInJp = ['秒']\n  const signs = ['/', ':']\n  let modelFormated = unitDateInJp\n    .reduce((acc, cur) => {\n      return acc.replaceAll(cur, '/')\n    }, model)\n    .replaceAll('//', '/')\n  modelFormated = timeUnitDateInJp\n    .reduce((acc, cur) => {\n      return acc.replaceAll(cur, ':')\n    }, modelFormated)\n    .replaceAll('::', ':')\n  modelFormated = secondUnitDateInJp.reduce((acc, cur) => {\n    return acc.replaceAll(cur, '')\n  }, modelFormated)\n  // 末尾に余計な記号がある場合は消去\n  if (signs.includes(modelFormated.slice(-1))) modelFormated = modelFormated.slice(0, -1)\n\n  const date = new Date(modelFormated || '')\n\n  return slotsFormat.map((e) => {\n    return {\n      value: dateFormat(date, e.format),\n      label: dateFormat(date, e.format),\n    }\n  })\n}\n\n/** 閏年の判別をする関数\n * @param year　年\n * @returns boolean　閏年の場合はtrue\n */\nexport function isLeapYear(year: number): boolean {\n  if ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0) {\n    return true\n  }\n  return false\n}\n","import { PickerValue } from '../../CCWheelPicker/utils'\nimport { PickerValueForDate } from './DateHelper'\n\nexport type FormatTypeForNumber = {\n  label: string\n  startOffset: number\n  upperNumber: number\n  requiredDigit: boolean\n  numberOptions: true\n}\nexport type FormatTypeForText = {\n  label: string\n  options: PickerValue[]\n  numberOptions: false\n}\n\nexport type FormatTypes = FormatTypeForNumber | FormatTypeForText\n\n/**\n * フォーマットを分割する\n * 共通関数\n * @param format\n * @returns {string[]}\n */\nexport function getEachSlotFormat(format: string): { format: string; subscript: boolean }[] {\n  const pattern = /\\{(.*?)\\}/g\n  let match\n  const targets: string[] = []\n\n  while ((match = pattern.exec(format)) !== null) {\n    targets.push(match[1])\n  }\n  const allTarget = format.split(pattern)\n\n  const results = allTarget\n    .map((e) => {\n      if (targets.includes(e)) return { format: e, subscript: false }\n      return { format: e, subscript: true }\n    })\n    .filter((e) => e.format !== '')\n\n  return results\n}\n\n/**\n * 各スロットのOptionの作成\n * 共通で使用できる\n * @param val {string} フォーマット{}を含むテキストを吹き出した情報 ex: yyyy\n */\nexport function createEachOptions(val: string, dataFormats: FormatTypes[]) {\n  const options = [] as PickerValueForDate[] | PickerValue[]\n\n  const format = dataFormats.find((e) => val.includes(e.label))\n  if (!!format) {\n    if (format.numberOptions === false) {\n      return format.options\n    }\n    for (let i = format.startOffset; i <= format.upperNumber; i++) {\n      const label = format.requiredDigit === true && i < 10 ? `0${i}` : `${i}`\n      options.push({\n        label: val.replace(format.label, label),\n        value: val.replace(format.label, label),\n      })\n    }\n\n    return options\n  }\n\n  return options\n}\n","import {is} from 'quasar';<script setup lang=\"ts\">\nimport { ref, computed, watch, Ref, PropType, onMounted } from 'vue'\nimport { copy } from 'copy-anything'\nimport CCWheelPicker from '../CCWheelPicker/CCWheelPicker.vue'\nimport { PickerValue } from '../CCWheelPicker/utils'\nimport { dateFormats, PickerValueForDate, isLeapYear } from './utils/DateHelper'\nimport { getEachSlotFormat, FormatTypes, createEachOptions } from './utils/helpers'\n\nconst props = defineProps({\n  /**\n   * 値\n   * @example\n   */\n  modelValue: { type: String },\n  /**\n   * フォーマット\n   * @example \"{yyyy}-{mm}-{dd}\" スロットことに{}で囲む\n   */\n  format: {\n    type: String,\n    default: '{yyyy年}-{mm月}-{dd日} {HH}{MM}',\n  },\n  /**\n   * モード\n   * @example \"date\"\n   */\n  mode: {\n    type: String as PropType<'normal' | 'date'>,\n    default: 'normal',\n  },\n  formats: {\n    type: Array as PropType<FormatTypes[]>,\n    default: () => [],\n  },\n  /**\n   * イニシャルのデータをv-modelに初回反映させるかどうか\n   */\n  isInitialReflect: {\n    type: Boolean,\n    default: true,\n  },\n\n  /**\n   * イニシャルのデータを指定\n   */\n  initialValue: {\n    type: Object as PropType<{ label: string; value: string | number }[]>,\n    default: () => [],\n  },\n})\n\n/**\n * emitの定義\n * 共通関数\n */\nconst emits = defineEmits<{\n  (e: 'update:modelValue', payload: String): void\n  (e: 'earlyUpdate', payload: string): void\n}>()\n\n/**\n * スロットの各フォーマット（添字と値の混合）\n */\nconst slotsFormat = computed(() => {\n  return getEachSlotFormat(props.format)\n})\n\n/**\n * それぞれのスロットの値\n */\nconst eachModelValue = ref<PickerValue[]>(splitModelValue(props.initialValue, slotsFormat.value))\n/**\n * propsが変更されたら初期値を更新\n */\nonMounted(() => {\n  // isInitialReflectがfalseの場合は初回に初期値を反映しない\n  if (!props.isInitialReflect) return\n  eachModelValue.value = splitModelValue(props.initialValue, slotsFormat.value)\n})\n\nconst dataFormats = (props.mode == 'date' ? dateFormats : props.formats) as FormatTypes[]\n\n/**\n * eachModelValueの変更を監視\n * 変換処理後にemit\n * mode共通\n */\nwatch(\n  eachModelValue,\n  (newVal, oldVal) => {\n    const returnVal = [...newVal].map((e: PickerValue | Ref<PickerValue>) => {\n      return typeof e?.value == 'string' || typeof e?.value == 'number'\n        ? e?.value || ''\n        : e?.value?.value || ''\n    })\n    if (returnVal.includes('')) return\n    const res = returnVal.reduce((acc, cur, index) => {\n      if (!!slotsFormat.value[index].subscript) return acc\n      if (typeof acc == 'number') return acc\n\n      return acc.replaceAll(slotsFormat.value[index].format, !!cur ? String(cur) : '-')\n    }, props.format)\n\n    emits('update:modelValue', String(res).replaceAll('{', '').replaceAll('}', ''))\n  },\n  { deep: true }\n)\n\nfunction _earlyUpdate(val, index) {\n  const newVal = copy([...eachModelValue.value])\n  newVal[index] = val\n  const returnVal = [...newVal].map((e: PickerValue | Ref<PickerValue>) => {\n    return typeof e?.value == 'string' || typeof e?.value == 'number'\n      ? e?.value || ''\n      : e?.value?.value || ''\n  })\n  if (returnVal.includes('')) return\n  const res = returnVal.reduce((acc, cur, index) => {\n    if (!!slotsFormat.value[index].subscript) return acc\n    if (typeof acc == 'number') return acc\n\n    return acc.replaceAll(slotsFormat.value[index].format, !!cur ? String(cur) : '-')\n  }, props.format)\n\n  emits('earlyUpdate', String(res).replaceAll('{', '').replaceAll('}', ''))\n}\n\n/**\n * modelValueを各スロット用の今の値に変換して出力\n */\nfunction splitModelValue(\n  initialValue: { label: string; value: string | number }[],\n  slotsFormat: {\n    format: string\n    subscript: boolean\n  }[]\n): PickerValueForDate[] | PickerValue[] {\n  const res = slotsFormat.map((e) => {\n    const label = initialValue.reduce((acc, cur) => {\n      return acc.replaceAll(cur.label, String(cur.value))\n    }, e.format)\n    return {\n      value: label,\n      label,\n    }\n  })\n  return res\n}\n\n/**\n * 見た目を整えるためのgridの設定\n */\nconst gridColumns = computed<string>(() => {\n  return slotsFormat.value.reduce((grid, el, index) => {\n    if (slotsFormat.value.length - 1 === index || index == 0) return grid + '1fr '\n\n    if (!!el.subscript) {\n      const width = String(el.format).length * 16\n      return grid + `${width}px `\n    }\n    const Opt = createEachOptions(el.format, dataFormats)\n      .map((e) => e.label.length)\n      .reduce((e, max) => (e > max ? e : max), 1)\n    const width = Opt * 24 + 20\n    return grid + `${width}px `\n    // }\n\n    // return el.format.length > 3 ? grid + '1fr ' : grid + '42px '\n  }, '')\n})\n\n/** modeがdateのときに今選択している年 */\nconst currentYear = computed<number>(() => {\n  if (props.mode !== 'date') return 0\n  const yearIndex = slotsFormat.value.findIndex((e) => e.format == 'yyyy')\n\n  const year = eachModelValue.value[yearIndex]?.value || 0\n  return Number(year)\n})\n\n/** modeがdateのときに今選択している月 */\nconst currentMonth = computed<number>(() => {\n  if (props.mode !== 'date') return 0\n  const monthIndex = slotsFormat.value.findIndex((e) => e.format == 'mm' || e.format == 'm')\n\n  const year = eachModelValue.value[monthIndex]?.value || 0\n  return Number(year)\n})\n\n/**\n * modeがdateのときに今選択している年と月から日(閏年の時の2月とか)を計算して出力\n */\nfunction filterOptionDays(baseOption: PickerValue[]): PickerValue[] {\n  return baseOption.filter((e) => {\n    if (isLeapYear(currentYear.value) && currentMonth.value == 2) {\n      if (Number(e.value) <= 29) {\n        return true\n      }\n      return false\n    }\n    if (!isLeapYear(currentYear.value) && currentMonth.value == 2) {\n      if (Number(e.value) <= 28) {\n        return true\n      }\n      return false\n    }\n    if (\n      currentMonth.value == 4 ||\n      currentMonth.value == 6 ||\n      currentMonth.value == 9 ||\n      currentMonth.value == 11\n    ) {\n      if (Number(e.value) <= 30) {\n        return true\n      }\n      return false\n    }\n    return true\n  })\n}\n</script>\n<template>\n  <div class=\"_datePicker\">\n    <div class=\"_flex\" v-for=\"(val, index) in slotsFormat\" :key=\"`slot_${index}`\">\n      <CCWheelPicker\n        v-if=\"!val.subscript\"\n        v-model=\"eachModelValue[index]\"\n        :options=\"\n          props.mode === 'date' && (val.format === 'dd' || val.format === 'd')\n            ? filterOptionDays(createEachOptions(val.format, dataFormats))\n            : createEachOptions(val.format, dataFormats)\n        \"\n        @earlyUpdate=\"_earlyUpdate($event, index)\"\n        :selectedBorderRadius=\"\n          index == 0\n            ? ['100px', '0', '0', '100px']\n            : index == slotsFormat.length - 1\n            ? ['0', '100px', '100px', '0']\n            : ['0', '0', '0', '0']\n        \"\n        :align=\"index == 0 ? 'right' : index == slotsFormat.length - 1 ? 'left' : 'center'\"\n        :single=\"false\"\n        :key=\"`slot_${index}_${\n          props.mode === 'date' && (val.format === 'dd' || val.format === 'd')\n            ? String(currentYear) + String(currentMonth)\n            : '0'\n        }`\"\n        :slotKey=\"`slot_${index}`\"\n      />\n      <div\n        class=\"_subscript\"\n        :style=\"\n          index == 0\n            ? 'text-align:right;border-radius: 100px 0 0 100px;'\n            : index == slotsFormat.length - 1\n            ? 'text-align:left;border-radius: 0 100px 100px 0;'\n            : 'text-align:center;border-radius: 0 0 0 0;'\n        \"\n        v-else\n      >\n        {{ val.format }}\n      </div>\n    </div>\n  </div>\n</template>\n<style scoped>\n._datePicker {\n  display: grid;\n  justify-content: center;\n  -webkit-align-items: center;\n  align-items: center;\n  grid-template-columns: v-bind(gridColumns);\n}\n._flex {\n  width: 100%;\n  position: relative;\n}\n\n._subscript {\n  position: absolute;\n  top: 50%;\n  width: 100%;\n  transform: translate(0, calc(-50% + 8px));\n  overflow: hidden;\n  background-color: #f8f8fa;\n  line-height: 40px;\n  color: #121212;\n  font-size: 14px;\n  padding: 0 0;\n  text-align: center;\n}\n</style>\n","/*!\n  * vue-router v4.5.0\n  * (c) 2024 Eduardo San Martin Morote\n  * @license MIT\n  */\nimport { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, shallowReactive, nextTick } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nconst isBrowser = typeof document !== 'undefined';\n\n/**\n * Allows differentiating lazy components from functional components and vue-class-component\n * @internal\n *\n * @param component\n */\nfunction isRouteComponent(component) {\n    return (typeof component === 'object' ||\n        'displayName' in component ||\n        'props' in component ||\n        '__vccOpts' in component);\n}\nfunction isESModule(obj) {\n    return (obj.__esModule ||\n        obj[Symbol.toStringTag] === 'Module' ||\n        // support CF with dynamic imports that do not\n        // add the Module string tag\n        (obj.default && isRouteComponent(obj.default)));\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n    const newParams = {};\n    for (const key in params) {\n        const value = params[key];\n        newParams[key] = isArray(value)\n            ? value.map(fn)\n            : fn(value);\n    }\n    return newParams;\n}\nconst noop = () => { };\n/**\n * Typesafe alternative to Array.isArray\n * https://github.com/microsoft/TypeScript/pull/48228\n */\nconst isArray = Array.isArray;\n\nfunction warn(msg) {\n    // avoid using ...args as it breaks in older Edge builds\n    const args = Array.from(arguments).slice(1);\n    console.warn.apply(console, ['[Vue Router warn]: ' + msg].concat(args));\n}\n\n/**\n * Encoding Rules (␣ = Space)\n * - Path: ␣ \" < > # ? { }\n * - Query: ␣ \" < > # & =\n * - Hash: ␣ \" < > `\n *\n * On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\n * defines some extra characters to be encoded. Most browsers do not encode them\n * in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\n * also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)\n * plus `-._~`. This extra safety should be applied to query by patching the\n * string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\n * should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\n * into a `/` if directly typed in. The _backtick_ (`````) should also be\n * encoded everywhere because some browsers like FF encode it when directly\n * written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\n */\n// const EXTRA_RESERVED_RE = /[!'()*]/g\n// const encodeReservedReplacer = (c: string) => '%' + c.charCodeAt(0).toString(16)\nconst HASH_RE = /#/g; // %23\nconst AMPERSAND_RE = /&/g; // %26\nconst SLASH_RE = /\\//g; // %2F\nconst EQUAL_RE = /=/g; // %3D\nconst IM_RE = /\\?/g; // %3F\nconst PLUS_RE = /\\+/g; // %2B\n/**\n * NOTE: It's not clear to me if we should encode the + symbol in queries, it\n * seems to be less flexible than not doing so and I can't find out the legacy\n * systems requiring this for regular requests like text/html. In the standard,\n * the encoding of the plus character is only mentioned for\n * application/x-www-form-urlencoded\n * (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\n * leave the plus character as is in queries. To be more flexible, we allow the\n * plus character on the query, but it can also be manually encoded by the user.\n *\n * Resources:\n * - https://url.spec.whatwg.org/#urlencoded-parsing\n * - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\n */\nconst ENC_BRACKET_OPEN_RE = /%5B/g; // [\nconst ENC_BRACKET_CLOSE_RE = /%5D/g; // ]\nconst ENC_CARET_RE = /%5E/g; // ^\nconst ENC_BACKTICK_RE = /%60/g; // `\nconst ENC_CURLY_OPEN_RE = /%7B/g; // {\nconst ENC_PIPE_RE = /%7C/g; // |\nconst ENC_CURLY_CLOSE_RE = /%7D/g; // }\nconst ENC_SPACE_RE = /%20/g; // }\n/**\n * Encode characters that need to be encoded on the path, search and hash\n * sections of the URL.\n *\n * @internal\n * @param text - string to encode\n * @returns encoded string\n */\nfunction commonEncode(text) {\n    return encodeURI('' + text)\n        .replace(ENC_PIPE_RE, '|')\n        .replace(ENC_BRACKET_OPEN_RE, '[')\n        .replace(ENC_BRACKET_CLOSE_RE, ']');\n}\n/**\n * Encode characters that need to be encoded on the hash section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeHash(text) {\n    return commonEncode(text)\n        .replace(ENC_CURLY_OPEN_RE, '{')\n        .replace(ENC_CURLY_CLOSE_RE, '}')\n        .replace(ENC_CARET_RE, '^');\n}\n/**\n * Encode characters that need to be encoded query values on the query\n * section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeQueryValue(text) {\n    return (commonEncode(text)\n        // Encode the space as +, encode the + to differentiate it from the space\n        .replace(PLUS_RE, '%2B')\n        .replace(ENC_SPACE_RE, '+')\n        .replace(HASH_RE, '%23')\n        .replace(AMPERSAND_RE, '%26')\n        .replace(ENC_BACKTICK_RE, '`')\n        .replace(ENC_CURLY_OPEN_RE, '{')\n        .replace(ENC_CURLY_CLOSE_RE, '}')\n        .replace(ENC_CARET_RE, '^'));\n}\n/**\n * Like `encodeQueryValue` but also encodes the `=` character.\n *\n * @param text - string to encode\n */\nfunction encodeQueryKey(text) {\n    return encodeQueryValue(text).replace(EQUAL_RE, '%3D');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodePath(text) {\n    return commonEncode(text).replace(HASH_RE, '%23').replace(IM_RE, '%3F');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL as a\n * param. This function encodes everything {@link encodePath} does plus the\n * slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\n * string instead.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeParam(text) {\n    return text == null ? '' : encodePath(text).replace(SLASH_RE, '%2F');\n}\n/**\n * Decode text using `decodeURIComponent`. Returns the original text if it\n * fails.\n *\n * @param text - string to decode\n * @returns decoded string\n */\nfunction decode(text) {\n    try {\n        return decodeURIComponent('' + text);\n    }\n    catch (err) {\n        (process.env.NODE_ENV !== 'production') && warn(`Error decoding \"${text}\". Using original value`);\n    }\n    return '' + text;\n}\n\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, '');\n/**\n * Transforms a URI into a normalized history location\n *\n * @param parseQuery\n * @param location - URI to normalize\n * @param currentLocation - current absolute location. Allows resolving relative\n * paths. Must start with `/`. Defaults to `/`\n * @returns a normalized history location\n */\nfunction parseURL(parseQuery, location, currentLocation = '/') {\n    let path, query = {}, searchString = '', hash = '';\n    // Could use URL and URLSearchParams but IE 11 doesn't support it\n    // TODO: move to new URL()\n    const hashPos = location.indexOf('#');\n    let searchPos = location.indexOf('?');\n    // the hash appears before the search, so it's not part of the search string\n    if (hashPos < searchPos && hashPos >= 0) {\n        searchPos = -1;\n    }\n    if (searchPos > -1) {\n        path = location.slice(0, searchPos);\n        searchString = location.slice(searchPos + 1, hashPos > -1 ? hashPos : location.length);\n        query = parseQuery(searchString);\n    }\n    if (hashPos > -1) {\n        path = path || location.slice(0, hashPos);\n        // keep the # character\n        hash = location.slice(hashPos, location.length);\n    }\n    // no search and no query\n    path = resolveRelativePath(path != null ? path : location, currentLocation);\n    // empty path means a relative query or hash `?foo=f`, `#thing`\n    return {\n        fullPath: path + (searchString && '?') + searchString + hash,\n        path,\n        query,\n        hash: decode(hash),\n    };\n}\n/**\n * Stringifies a URL object\n *\n * @param stringifyQuery\n * @param location\n */\nfunction stringifyURL(stringifyQuery, location) {\n    const query = location.query ? stringifyQuery(location.query) : '';\n    return location.path + (query && '?') + query + (location.hash || '');\n}\n/**\n * Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.\n *\n * @param pathname - location.pathname\n * @param base - base to strip off\n */\nfunction stripBase(pathname, base) {\n    // no base or base is not found at the beginning\n    if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n        return pathname;\n    return pathname.slice(base.length) || '/';\n}\n/**\n * Checks if two RouteLocation are equal. This means that both locations are\n * pointing towards the same {@link RouteRecord} and that all `params`, `query`\n * parameters and `hash` are the same\n *\n * @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.\n * @param a - first {@link RouteLocation}\n * @param b - second {@link RouteLocation}\n */\nfunction isSameRouteLocation(stringifyQuery, a, b) {\n    const aLastIndex = a.matched.length - 1;\n    const bLastIndex = b.matched.length - 1;\n    return (aLastIndex > -1 &&\n        aLastIndex === bLastIndex &&\n        isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) &&\n        isSameRouteLocationParams(a.params, b.params) &&\n        stringifyQuery(a.query) === stringifyQuery(b.query) &&\n        a.hash === b.hash);\n}\n/**\n * Check if two `RouteRecords` are equal. Takes into account aliases: they are\n * considered equal to the `RouteRecord` they are aliasing.\n *\n * @param a - first {@link RouteRecord}\n * @param b - second {@link RouteRecord}\n */\nfunction isSameRouteRecord(a, b) {\n    // since the original record has an undefined value for aliasOf\n    // but all aliases point to the original record, this will always compare\n    // the original record\n    return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n    if (Object.keys(a).length !== Object.keys(b).length)\n        return false;\n    for (const key in a) {\n        if (!isSameRouteLocationParamsValue(a[key], b[key]))\n            return false;\n    }\n    return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n    return isArray(a)\n        ? isEquivalentArray(a, b)\n        : isArray(b)\n            ? isEquivalentArray(b, a)\n            : a === b;\n}\n/**\n * Check if two arrays are the same or if an array with one single entry is the\n * same as another primitive value. Used to check query and parameters\n *\n * @param a - array of values\n * @param b - array of values or a single value\n */\nfunction isEquivalentArray(a, b) {\n    return isArray(b)\n        ? a.length === b.length && a.every((value, i) => value === b[i])\n        : a.length === 1 && a[0] === b;\n}\n/**\n * Resolves a relative path that starts with `.`.\n *\n * @param to - path location we are resolving\n * @param from - currentLocation.path, should start with `/`\n */\nfunction resolveRelativePath(to, from) {\n    if (to.startsWith('/'))\n        return to;\n    if ((process.env.NODE_ENV !== 'production') && !from.startsWith('/')) {\n        warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n        return to;\n    }\n    if (!to)\n        return from;\n    const fromSegments = from.split('/');\n    const toSegments = to.split('/');\n    const lastToSegment = toSegments[toSegments.length - 1];\n    // make . and ./ the same (../ === .., ../../ === ../..)\n    // this is the same behavior as new URL()\n    if (lastToSegment === '..' || lastToSegment === '.') {\n        toSegments.push('');\n    }\n    let position = fromSegments.length - 1;\n    let toPosition;\n    let segment;\n    for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n        segment = toSegments[toPosition];\n        // we stay on the same position\n        if (segment === '.')\n            continue;\n        // go up in the from array\n        if (segment === '..') {\n            // we can't go below zero, but we still need to increment toPosition\n            if (position > 1)\n                position--;\n            // continue\n        }\n        // we reached a non-relative path, we stop here\n        else\n            break;\n    }\n    return (fromSegments.slice(0, position).join('/') +\n        '/' +\n        toSegments.slice(toPosition).join('/'));\n}\n/**\n * Initial route location where the router is. Can be used in navigation guards\n * to differentiate the initial navigation.\n *\n * @example\n * ```js\n * import { START_LOCATION } from 'vue-router'\n *\n * router.beforeEach((to, from) => {\n *   if (from === START_LOCATION) {\n *     // initial navigation\n *   }\n * })\n * ```\n */\nconst START_LOCATION_NORMALIZED = {\n    path: '/',\n    // TODO: could we use a symbol in the future?\n    name: undefined,\n    params: {},\n    query: {},\n    hash: '',\n    fullPath: '/',\n    matched: [],\n    meta: {},\n    redirectedFrom: undefined,\n};\n\nvar NavigationType;\n(function (NavigationType) {\n    NavigationType[\"pop\"] = \"pop\";\n    NavigationType[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function (NavigationDirection) {\n    NavigationDirection[\"back\"] = \"back\";\n    NavigationDirection[\"forward\"] = \"forward\";\n    NavigationDirection[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\n/**\n * Starting location for Histories\n */\nconst START = '';\n// Generic utils\n/**\n * Normalizes a base by removing any trailing slash and reading the base tag if\n * present.\n *\n * @param base - base to normalize\n */\nfunction normalizeBase(base) {\n    if (!base) {\n        if (isBrowser) {\n            // respect <base> tag\n            const baseEl = document.querySelector('base');\n            base = (baseEl && baseEl.getAttribute('href')) || '/';\n            // strip full URL origin\n            base = base.replace(/^\\w+:\\/\\/[^\\/]+/, '');\n        }\n        else {\n            base = '/';\n        }\n    }\n    // ensure leading slash when it was removed by the regex above avoid leading\n    // slash with hash because the file could be read from the disk like file://\n    // and the leading slash would cause problems\n    if (base[0] !== '/' && base[0] !== '#')\n        base = '/' + base;\n    // remove the trailing slash so all other method can just do `base + fullPath`\n    // to build an href\n    return removeTrailingSlash(base);\n}\n// remove any character before the hash\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location) {\n    return base.replace(BEFORE_HASH_RE, '#') + location;\n}\n\nfunction getElementPosition(el, offset) {\n    const docRect = document.documentElement.getBoundingClientRect();\n    const elRect = el.getBoundingClientRect();\n    return {\n        behavior: offset.behavior,\n        left: elRect.left - docRect.left - (offset.left || 0),\n        top: elRect.top - docRect.top - (offset.top || 0),\n    };\n}\nconst computeScrollPosition = () => ({\n    left: window.scrollX,\n    top: window.scrollY,\n});\nfunction scrollToPosition(position) {\n    let scrollToOptions;\n    if ('el' in position) {\n        const positionEl = position.el;\n        const isIdSelector = typeof positionEl === 'string' && positionEl.startsWith('#');\n        /**\n         * `id`s can accept pretty much any characters, including CSS combinators\n         * like `>` or `~`. It's still possible to retrieve elements using\n         * `document.getElementById('~')` but it needs to be escaped when using\n         * `document.querySelector('#\\\\~')` for it to be valid. The only\n         * requirements for `id`s are them to be unique on the page and to not be\n         * empty (`id=\"\"`). Because of that, when passing an id selector, it should\n         * be properly escaped for it to work with `querySelector`. We could check\n         * for the id selector to be simple (no CSS combinators `+ >~`) but that\n         * would make things inconsistent since they are valid characters for an\n         * `id` but would need to be escaped when using `querySelector`, breaking\n         * their usage and ending up in no selector returned. Selectors need to be\n         * escaped:\n         *\n         * - `#1-thing` becomes `#\\31 -thing`\n         * - `#with~symbols` becomes `#with\\\\~symbols`\n         *\n         * - More information about  the topic can be found at\n         *   https://mathiasbynens.be/notes/html5-id-class.\n         * - Practical example: https://mathiasbynens.be/demo/html5-id\n         */\n        if ((process.env.NODE_ENV !== 'production') && typeof position.el === 'string') {\n            if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n                try {\n                    const foundEl = document.querySelector(position.el);\n                    if (isIdSelector && foundEl) {\n                        warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n                        // return to avoid other warnings\n                        return;\n                    }\n                }\n                catch (err) {\n                    warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n                    // return to avoid other warnings\n                    return;\n                }\n            }\n        }\n        const el = typeof positionEl === 'string'\n            ? isIdSelector\n                ? document.getElementById(positionEl.slice(1))\n                : document.querySelector(positionEl)\n            : positionEl;\n        if (!el) {\n            (process.env.NODE_ENV !== 'production') &&\n                warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n            return;\n        }\n        scrollToOptions = getElementPosition(el, position);\n    }\n    else {\n        scrollToOptions = position;\n    }\n    if ('scrollBehavior' in document.documentElement.style)\n        window.scrollTo(scrollToOptions);\n    else {\n        window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);\n    }\n}\nfunction getScrollKey(path, delta) {\n    const position = history.state ? history.state.position - delta : -1;\n    return position + path;\n}\nconst scrollPositions = new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n    scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n    const scroll = scrollPositions.get(key);\n    // consume it so it's not used again\n    scrollPositions.delete(key);\n    return scroll;\n}\n// TODO: RFC about how to save scroll position\n/**\n * ScrollBehavior instance used by the router to compute and restore the scroll\n * position when navigating.\n */\n// export interface ScrollHandler<ScrollPositionEntry extends HistoryStateValue, ScrollPosition extends ScrollPositionEntry> {\n//   // returns a scroll position that can be saved in history\n//   compute(): ScrollPositionEntry\n//   // can take an extended ScrollPositionEntry\n//   scroll(position: ScrollPosition): void\n// }\n// export const scrollHandler: ScrollHandler<ScrollPosition> = {\n//   compute: computeScroll,\n//   scroll: scrollToPosition,\n// }\n\nlet createBaseLocation = () => location.protocol + '//' + location.host;\n/**\n * Creates a normalized history location from a window.location object\n * @param base - The base path\n * @param location - The window.location object\n */\nfunction createCurrentLocation(base, location) {\n    const { pathname, search, hash } = location;\n    // allows hash bases like #, /#, #/, #!, #!/, /#!/, or even /folder#end\n    const hashPos = base.indexOf('#');\n    if (hashPos > -1) {\n        let slicePos = hash.includes(base.slice(hashPos))\n            ? base.slice(hashPos).length\n            : 1;\n        let pathFromHash = hash.slice(slicePos);\n        // prepend the starting slash to hash so the url starts with /#\n        if (pathFromHash[0] !== '/')\n            pathFromHash = '/' + pathFromHash;\n        return stripBase(pathFromHash, '');\n    }\n    const path = stripBase(pathname, base);\n    return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n    let listeners = [];\n    let teardowns = [];\n    // TODO: should it be a stack? a Dict. Check if the popstate listener\n    // can trigger twice\n    let pauseState = null;\n    const popStateHandler = ({ state, }) => {\n        const to = createCurrentLocation(base, location);\n        const from = currentLocation.value;\n        const fromState = historyState.value;\n        let delta = 0;\n        if (state) {\n            currentLocation.value = to;\n            historyState.value = state;\n            // ignore the popstate and reset the pauseState\n            if (pauseState && pauseState === from) {\n                pauseState = null;\n                return;\n            }\n            delta = fromState ? state.position - fromState.position : 0;\n        }\n        else {\n            replace(to);\n        }\n        // Here we could also revert the navigation by calling history.go(-delta)\n        // this listener will have to be adapted to not trigger again and to wait for the url\n        // to be updated before triggering the listeners. Some kind of validation function would also\n        // need to be passed to the listeners so the navigation can be accepted\n        // call all listeners\n        listeners.forEach(listener => {\n            listener(currentLocation.value, from, {\n                delta,\n                type: NavigationType.pop,\n                direction: delta\n                    ? delta > 0\n                        ? NavigationDirection.forward\n                        : NavigationDirection.back\n                    : NavigationDirection.unknown,\n            });\n        });\n    };\n    function pauseListeners() {\n        pauseState = currentLocation.value;\n    }\n    function listen(callback) {\n        // set up the listener and prepare teardown callbacks\n        listeners.push(callback);\n        const teardown = () => {\n            const index = listeners.indexOf(callback);\n            if (index > -1)\n                listeners.splice(index, 1);\n        };\n        teardowns.push(teardown);\n        return teardown;\n    }\n    function beforeUnloadListener() {\n        const { history } = window;\n        if (!history.state)\n            return;\n        history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), '');\n    }\n    function destroy() {\n        for (const teardown of teardowns)\n            teardown();\n        teardowns = [];\n        window.removeEventListener('popstate', popStateHandler);\n        window.removeEventListener('beforeunload', beforeUnloadListener);\n    }\n    // set up the listeners and prepare teardown callbacks\n    window.addEventListener('popstate', popStateHandler);\n    // TODO: could we use 'pagehide' or 'visibilitychange' instead?\n    // https://developer.chrome.com/blog/page-lifecycle-api/\n    window.addEventListener('beforeunload', beforeUnloadListener, {\n        passive: true,\n    });\n    return {\n        pauseListeners,\n        listen,\n        destroy,\n    };\n}\n/**\n * Creates a state object\n */\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n    return {\n        back,\n        current,\n        forward,\n        replaced,\n        position: window.history.length,\n        scroll: computeScroll ? computeScrollPosition() : null,\n    };\n}\nfunction useHistoryStateNavigation(base) {\n    const { history, location } = window;\n    // private variables\n    const currentLocation = {\n        value: createCurrentLocation(base, location),\n    };\n    const historyState = { value: history.state };\n    // build current history entry as this is a fresh navigation\n    if (!historyState.value) {\n        changeLocation(currentLocation.value, {\n            back: null,\n            current: currentLocation.value,\n            forward: null,\n            // the length is off by one, we need to decrease it\n            position: history.length - 1,\n            replaced: true,\n            // don't add a scroll as the user may have an anchor, and we want\n            // scrollBehavior to be triggered without a saved position\n            scroll: null,\n        }, true);\n    }\n    function changeLocation(to, state, replace) {\n        /**\n         * if a base tag is provided, and we are on a normal domain, we have to\n         * respect the provided `base` attribute because pushState() will use it and\n         * potentially erase anything before the `#` like at\n         * https://github.com/vuejs/router/issues/685 where a base of\n         * `/folder/#` but a base of `/` would erase the `/folder/` section. If\n         * there is no host, the `<base>` tag makes no sense and if there isn't a\n         * base tag we can just use everything after the `#`.\n         */\n        const hashIndex = base.indexOf('#');\n        const url = hashIndex > -1\n            ? (location.host && document.querySelector('base')\n                ? base\n                : base.slice(hashIndex)) + to\n            : createBaseLocation() + base + to;\n        try {\n            // BROWSER QUIRK\n            // NOTE: Safari throws a SecurityError when calling this function 100 times in 30 seconds\n            history[replace ? 'replaceState' : 'pushState'](state, '', url);\n            historyState.value = state;\n        }\n        catch (err) {\n            if ((process.env.NODE_ENV !== 'production')) {\n                warn('Error with push/replace State', err);\n            }\n            else {\n                console.error(err);\n            }\n            // Force the navigation, this also resets the call count\n            location[replace ? 'replace' : 'assign'](url);\n        }\n    }\n    function replace(to, data) {\n        const state = assign({}, history.state, buildState(historyState.value.back, \n        // keep back and forward entries but override current position\n        to, historyState.value.forward, true), data, { position: historyState.value.position });\n        changeLocation(to, state, true);\n        currentLocation.value = to;\n    }\n    function push(to, data) {\n        // Add to current entry the information of where we are going\n        // as well as saving the current position\n        const currentState = assign({}, \n        // use current history state to gracefully handle a wrong call to\n        // history.replaceState\n        // https://github.com/vuejs/router/issues/366\n        historyState.value, history.state, {\n            forward: to,\n            scroll: computeScrollPosition(),\n        });\n        if ((process.env.NODE_ENV !== 'production') && !history.state) {\n            warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\n` +\n                `history.replaceState(history.state, '', url)\\n\\n` +\n                `You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`);\n        }\n        changeLocation(currentState.current, currentState, true);\n        const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n        changeLocation(to, state, false);\n        currentLocation.value = to;\n    }\n    return {\n        location: currentLocation,\n        state: historyState,\n        push,\n        replace,\n    };\n}\n/**\n * Creates an HTML5 history. Most common history for single page applications.\n *\n * @param base -\n */\nfunction createWebHistory(base) {\n    base = normalizeBase(base);\n    const historyNavigation = useHistoryStateNavigation(base);\n    const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n    function go(delta, triggerListeners = true) {\n        if (!triggerListeners)\n            historyListeners.pauseListeners();\n        history.go(delta);\n    }\n    const routerHistory = assign({\n        // it's overridden right after\n        location: '',\n        base,\n        go,\n        createHref: createHref.bind(null, base),\n    }, historyNavigation, historyListeners);\n    Object.defineProperty(routerHistory, 'location', {\n        enumerable: true,\n        get: () => historyNavigation.location.value,\n    });\n    Object.defineProperty(routerHistory, 'state', {\n        enumerable: true,\n        get: () => historyNavigation.state.value,\n    });\n    return routerHistory;\n}\n\n/**\n * Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\n * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\n *\n * @param base - Base applied to all urls, defaults to '/'\n * @returns a history object that can be passed to the router constructor\n */\nfunction createMemoryHistory(base = '') {\n    let listeners = [];\n    let queue = [START];\n    let position = 0;\n    base = normalizeBase(base);\n    function setLocation(location) {\n        position++;\n        if (position !== queue.length) {\n            // we are in the middle, we remove everything from here in the queue\n            queue.splice(position);\n        }\n        queue.push(location);\n    }\n    function triggerListeners(to, from, { direction, delta }) {\n        const info = {\n            direction,\n            delta,\n            type: NavigationType.pop,\n        };\n        for (const callback of listeners) {\n            callback(to, from, info);\n        }\n    }\n    const routerHistory = {\n        // rewritten by Object.defineProperty\n        location: START,\n        // TODO: should be kept in queue\n        state: {},\n        base,\n        createHref: createHref.bind(null, base),\n        replace(to) {\n            // remove current entry and decrement position\n            queue.splice(position--, 1);\n            setLocation(to);\n        },\n        push(to, data) {\n            setLocation(to);\n        },\n        listen(callback) {\n            listeners.push(callback);\n            return () => {\n                const index = listeners.indexOf(callback);\n                if (index > -1)\n                    listeners.splice(index, 1);\n            };\n        },\n        destroy() {\n            listeners = [];\n            queue = [START];\n            position = 0;\n        },\n        go(delta, shouldTrigger = true) {\n            const from = this.location;\n            const direction = \n            // we are considering delta === 0 going forward, but in abstract mode\n            // using 0 for the delta doesn't make sense like it does in html5 where\n            // it reloads the page\n            delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\n            position = Math.max(0, Math.min(position + delta, queue.length - 1));\n            if (shouldTrigger) {\n                triggerListeners(this.location, from, {\n                    direction,\n                    delta,\n                });\n            }\n        },\n    };\n    Object.defineProperty(routerHistory, 'location', {\n        enumerable: true,\n        get: () => queue[position],\n    });\n    return routerHistory;\n}\n\n/**\n * Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to\n * handle any URL is not possible.\n *\n * @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag\n * in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\n * calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything\n * after the `#`).\n *\n * @example\n * ```js\n * // at https://example.com/folder\n * createWebHashHistory() // gives a url of `https://example.com/folder#`\n * createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\n * // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\n * createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\n * // you should avoid doing this because it changes the original url and breaks copying urls\n * createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\n *\n * // at file:///usr/etc/folder/index.html\n * // for locations with no `host`, the base is ignored\n * createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\n * ```\n */\nfunction createWebHashHistory(base) {\n    // Make sure this implementation is fine in terms of encoding, specially for IE11\n    // for `file://`, directly use the pathname and ignore the base\n    // location.pathname contains an initial `/` even at the root: `https://example.com`\n    base = location.host ? base || location.pathname + location.search : '';\n    // allow the user to provide a `#` in the middle: `/base/#/app`\n    if (!base.includes('#'))\n        base += '#';\n    if ((process.env.NODE_ENV !== 'production') && !base.endsWith('#/') && !base.endsWith('#')) {\n        warn(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, '#')}\".`);\n    }\n    return createWebHistory(base);\n}\n\nfunction isRouteLocation(route) {\n    return typeof route === 'string' || (route && typeof route === 'object');\n}\nfunction isRouteName(name) {\n    return typeof name === 'string' || typeof name === 'symbol';\n}\n\nconst NavigationFailureSymbol = Symbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : '');\n/**\n * Enumeration with all possible types for navigation failures. Can be passed to\n * {@link isNavigationFailure} to check for specific failures.\n */\nvar NavigationFailureType;\n(function (NavigationFailureType) {\n    /**\n     * An aborted navigation is a navigation that failed because a navigation\n     * guard returned `false` or called `next(false)`\n     */\n    NavigationFailureType[NavigationFailureType[\"aborted\"] = 4] = \"aborted\";\n    /**\n     * A cancelled navigation is a navigation that failed because a more recent\n     * navigation finished started (not necessarily finished).\n     */\n    NavigationFailureType[NavigationFailureType[\"cancelled\"] = 8] = \"cancelled\";\n    /**\n     * A duplicated navigation is a navigation that failed because it was\n     * initiated while already being at the exact same location.\n     */\n    NavigationFailureType[NavigationFailureType[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\n// DEV only debug messages\nconst ErrorTypeMessages = {\n    [1 /* ErrorTypes.MATCHER_NOT_FOUND */]({ location, currentLocation }) {\n        return `No match for\\n ${JSON.stringify(location)}${currentLocation\n            ? '\\nwhile being at\\n' + JSON.stringify(currentLocation)\n            : ''}`;\n    },\n    [2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */]({ from, to, }) {\n        return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n    },\n    [4 /* ErrorTypes.NAVIGATION_ABORTED */]({ from, to }) {\n        return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n    },\n    [8 /* ErrorTypes.NAVIGATION_CANCELLED */]({ from, to }) {\n        return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n    },\n    [16 /* ErrorTypes.NAVIGATION_DUPLICATED */]({ from, to }) {\n        return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n    },\n};\n/**\n * Creates a typed NavigationFailure object.\n * @internal\n * @param type - NavigationFailureType\n * @param params - { from, to }\n */\nfunction createRouterError(type, params) {\n    // keep full error messages in cjs versions\n    if ((process.env.NODE_ENV !== 'production') || !true) {\n        return assign(new Error(ErrorTypeMessages[type](params)), {\n            type,\n            [NavigationFailureSymbol]: true,\n        }, params);\n    }\n    else {\n        return assign(new Error(), {\n            type,\n            [NavigationFailureSymbol]: true,\n        }, params);\n    }\n}\nfunction isNavigationFailure(error, type) {\n    return (error instanceof Error &&\n        NavigationFailureSymbol in error &&\n        (type == null || !!(error.type & type)));\n}\nconst propertiesToLog = ['params', 'query', 'hash'];\nfunction stringifyRoute(to) {\n    if (typeof to === 'string')\n        return to;\n    if (to.path != null)\n        return to.path;\n    const location = {};\n    for (const key of propertiesToLog) {\n        if (key in to)\n            location[key] = to[key];\n    }\n    return JSON.stringify(location, null, 2);\n}\n\n// default pattern for a param: non-greedy everything but /\nconst BASE_PARAM_PATTERN = '[^/]+?';\nconst BASE_PATH_PARSER_OPTIONS = {\n    sensitive: false,\n    strict: false,\n    start: true,\n    end: true,\n};\n// Special Regex characters that must be escaped in static tokens\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\n/**\n * Creates a path parser from an array of Segments (a segment is an array of Tokens)\n *\n * @param segments - array of segments returned by tokenizePath\n * @param extraOptions - optional options for the regexp\n * @returns a PathParser\n */\nfunction tokensToParser(segments, extraOptions) {\n    const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n    // the amount of scores is the same as the length of segments except for the root segment \"/\"\n    const score = [];\n    // the regexp as a string\n    let pattern = options.start ? '^' : '';\n    // extracted keys\n    const keys = [];\n    for (const segment of segments) {\n        // the root segment needs special treatment\n        const segmentScores = segment.length ? [] : [90 /* PathScore.Root */];\n        // allow trailing slash\n        if (options.strict && !segment.length)\n            pattern += '/';\n        for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n            const token = segment[tokenIndex];\n            // resets the score if we are inside a sub-segment /:a-other-:b\n            let subSegmentScore = 40 /* PathScore.Segment */ +\n                (options.sensitive ? 0.25 /* PathScore.BonusCaseSensitive */ : 0);\n            if (token.type === 0 /* TokenType.Static */) {\n                // prepend the slash if we are starting a new segment\n                if (!tokenIndex)\n                    pattern += '/';\n                pattern += token.value.replace(REGEX_CHARS_RE, '\\\\$&');\n                subSegmentScore += 40 /* PathScore.Static */;\n            }\n            else if (token.type === 1 /* TokenType.Param */) {\n                const { value, repeatable, optional, regexp } = token;\n                keys.push({\n                    name: value,\n                    repeatable,\n                    optional,\n                });\n                const re = regexp ? regexp : BASE_PARAM_PATTERN;\n                // the user provided a custom regexp /:id(\\\\d+)\n                if (re !== BASE_PARAM_PATTERN) {\n                    subSegmentScore += 10 /* PathScore.BonusCustomRegExp */;\n                    // make sure the regexp is valid before using it\n                    try {\n                        new RegExp(`(${re})`);\n                    }\n                    catch (err) {\n                        throw new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` +\n                            err.message);\n                    }\n                }\n                // when we repeat we must take care of the repeating leading slash\n                let subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\n                // prepend the slash if we are starting a new segment\n                if (!tokenIndex)\n                    subPattern =\n                        // avoid an optional / if there are more segments e.g. /:p?-static\n                        // or /:p?-:p2\n                        optional && segment.length < 2\n                            ? `(?:/${subPattern})`\n                            : '/' + subPattern;\n                if (optional)\n                    subPattern += '?';\n                pattern += subPattern;\n                subSegmentScore += 20 /* PathScore.Dynamic */;\n                if (optional)\n                    subSegmentScore += -8 /* PathScore.BonusOptional */;\n                if (repeatable)\n                    subSegmentScore += -20 /* PathScore.BonusRepeatable */;\n                if (re === '.*')\n                    subSegmentScore += -50 /* PathScore.BonusWildcard */;\n            }\n            segmentScores.push(subSegmentScore);\n        }\n        // an empty array like /home/ -> [[{home}], []]\n        // if (!segment.length) pattern += '/'\n        score.push(segmentScores);\n    }\n    // only apply the strict bonus to the last score\n    if (options.strict && options.end) {\n        const i = score.length - 1;\n        score[i][score[i].length - 1] += 0.7000000000000001 /* PathScore.BonusStrict */;\n    }\n    // TODO: dev only warn double trailing slash\n    if (!options.strict)\n        pattern += '/?';\n    if (options.end)\n        pattern += '$';\n    // allow paths like /dynamic to only match dynamic or dynamic/... but not dynamic_something_else\n    else if (options.strict && !pattern.endsWith('/'))\n        pattern += '(?:/|$)';\n    const re = new RegExp(pattern, options.sensitive ? '' : 'i');\n    function parse(path) {\n        const match = path.match(re);\n        const params = {};\n        if (!match)\n            return null;\n        for (let i = 1; i < match.length; i++) {\n            const value = match[i] || '';\n            const key = keys[i - 1];\n            params[key.name] = value && key.repeatable ? value.split('/') : value;\n        }\n        return params;\n    }\n    function stringify(params) {\n        let path = '';\n        // for optional parameters to allow to be empty\n        let avoidDuplicatedSlash = false;\n        for (const segment of segments) {\n            if (!avoidDuplicatedSlash || !path.endsWith('/'))\n                path += '/';\n            avoidDuplicatedSlash = false;\n            for (const token of segment) {\n                if (token.type === 0 /* TokenType.Static */) {\n                    path += token.value;\n                }\n                else if (token.type === 1 /* TokenType.Param */) {\n                    const { value, repeatable, optional } = token;\n                    const param = value in params ? params[value] : '';\n                    if (isArray(param) && !repeatable) {\n                        throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n                    }\n                    const text = isArray(param)\n                        ? param.join('/')\n                        : param;\n                    if (!text) {\n                        if (optional) {\n                            // if we have more than one optional param like /:a?-static we don't need to care about the optional param\n                            if (segment.length < 2) {\n                                // remove the last slash as we could be at the end\n                                if (path.endsWith('/'))\n                                    path = path.slice(0, -1);\n                                // do not append a slash on the next iteration\n                                else\n                                    avoidDuplicatedSlash = true;\n                            }\n                        }\n                        else\n                            throw new Error(`Missing required param \"${value}\"`);\n                    }\n                    path += text;\n                }\n            }\n        }\n        // avoid empty path when we have multiple optional params\n        return path || '/';\n    }\n    return {\n        re,\n        score,\n        keys,\n        parse,\n        stringify,\n    };\n}\n/**\n * Compares an array of numbers as used in PathParser.score and returns a\n * number. This function can be used to `sort` an array\n *\n * @param a - first array of numbers\n * @param b - second array of numbers\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n * should be sorted first\n */\nfunction compareScoreArray(a, b) {\n    let i = 0;\n    while (i < a.length && i < b.length) {\n        const diff = b[i] - a[i];\n        // only keep going if diff === 0\n        if (diff)\n            return diff;\n        i++;\n    }\n    // if the last subsegment was Static, the shorter segments should be sorted first\n    // otherwise sort the longest segment first\n    if (a.length < b.length) {\n        return a.length === 1 && a[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n            ? -1\n            : 1;\n    }\n    else if (a.length > b.length) {\n        return b.length === 1 && b[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n            ? 1\n            : -1;\n    }\n    return 0;\n}\n/**\n * Compare function that can be used with `sort` to sort an array of PathParser\n *\n * @param a - first PathParser\n * @param b - second PathParser\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n */\nfunction comparePathParserScore(a, b) {\n    let i = 0;\n    const aScore = a.score;\n    const bScore = b.score;\n    while (i < aScore.length && i < bScore.length) {\n        const comp = compareScoreArray(aScore[i], bScore[i]);\n        // do not return if both are equal\n        if (comp)\n            return comp;\n        i++;\n    }\n    if (Math.abs(bScore.length - aScore.length) === 1) {\n        if (isLastScoreNegative(aScore))\n            return 1;\n        if (isLastScoreNegative(bScore))\n            return -1;\n    }\n    // if a and b share the same score entries but b has more, sort b first\n    return bScore.length - aScore.length;\n    // this is the ternary version\n    // return aScore.length < bScore.length\n    //   ? 1\n    //   : aScore.length > bScore.length\n    //   ? -1\n    //   : 0\n}\n/**\n * This allows detecting splats at the end of a path: /home/:id(.*)*\n *\n * @param score - score to check\n * @returns true if the last entry is negative\n */\nfunction isLastScoreNegative(score) {\n    const last = score[score.length - 1];\n    return score.length > 0 && last[last.length - 1] < 0;\n}\n\nconst ROOT_TOKEN = {\n    type: 0 /* TokenType.Static */,\n    value: '',\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\n// After some profiling, the cache seems to be unnecessary because tokenizePath\n// (the slowest part of adding a route) is very fast\n// const tokenCache = new Map<string, Token[][]>()\nfunction tokenizePath(path) {\n    if (!path)\n        return [[]];\n    if (path === '/')\n        return [[ROOT_TOKEN]];\n    if (!path.startsWith('/')) {\n        throw new Error((process.env.NODE_ENV !== 'production')\n            ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".`\n            : `Invalid path \"${path}\"`);\n    }\n    // if (tokenCache.has(path)) return tokenCache.get(path)!\n    function crash(message) {\n        throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n    }\n    let state = 0 /* TokenizerState.Static */;\n    let previousState = state;\n    const tokens = [];\n    // the segment will always be valid because we get into the initial state\n    // with the leading /\n    let segment;\n    function finalizeSegment() {\n        if (segment)\n            tokens.push(segment);\n        segment = [];\n    }\n    // index on the path\n    let i = 0;\n    // char at index\n    let char;\n    // buffer of the value read\n    let buffer = '';\n    // custom regexp for a param\n    let customRe = '';\n    function consumeBuffer() {\n        if (!buffer)\n            return;\n        if (state === 0 /* TokenizerState.Static */) {\n            segment.push({\n                type: 0 /* TokenType.Static */,\n                value: buffer,\n            });\n        }\n        else if (state === 1 /* TokenizerState.Param */ ||\n            state === 2 /* TokenizerState.ParamRegExp */ ||\n            state === 3 /* TokenizerState.ParamRegExpEnd */) {\n            if (segment.length > 1 && (char === '*' || char === '+'))\n                crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n            segment.push({\n                type: 1 /* TokenType.Param */,\n                value: buffer,\n                regexp: customRe,\n                repeatable: char === '*' || char === '+',\n                optional: char === '*' || char === '?',\n            });\n        }\n        else {\n            crash('Invalid state to consume buffer');\n        }\n        buffer = '';\n    }\n    function addCharToBuffer() {\n        buffer += char;\n    }\n    while (i < path.length) {\n        char = path[i++];\n        if (char === '\\\\' && state !== 2 /* TokenizerState.ParamRegExp */) {\n            previousState = state;\n            state = 4 /* TokenizerState.EscapeNext */;\n            continue;\n        }\n        switch (state) {\n            case 0 /* TokenizerState.Static */:\n                if (char === '/') {\n                    if (buffer) {\n                        consumeBuffer();\n                    }\n                    finalizeSegment();\n                }\n                else if (char === ':') {\n                    consumeBuffer();\n                    state = 1 /* TokenizerState.Param */;\n                }\n                else {\n                    addCharToBuffer();\n                }\n                break;\n            case 4 /* TokenizerState.EscapeNext */:\n                addCharToBuffer();\n                state = previousState;\n                break;\n            case 1 /* TokenizerState.Param */:\n                if (char === '(') {\n                    state = 2 /* TokenizerState.ParamRegExp */;\n                }\n                else if (VALID_PARAM_RE.test(char)) {\n                    addCharToBuffer();\n                }\n                else {\n                    consumeBuffer();\n                    state = 0 /* TokenizerState.Static */;\n                    // go back one character if we were not modifying\n                    if (char !== '*' && char !== '?' && char !== '+')\n                        i--;\n                }\n                break;\n            case 2 /* TokenizerState.ParamRegExp */:\n                // TODO: is it worth handling nested regexp? like :p(?:prefix_([^/]+)_suffix)\n                // it already works by escaping the closing )\n                // https://paths.esm.dev/?p=AAMeJbiAwQEcDKbAoAAkP60PG2R6QAvgNaA6AFACM2ABuQBB#\n                // is this really something people need since you can also write\n                // /prefix_:p()_suffix\n                if (char === ')') {\n                    // handle the escaped )\n                    if (customRe[customRe.length - 1] == '\\\\')\n                        customRe = customRe.slice(0, -1) + char;\n                    else\n                        state = 3 /* TokenizerState.ParamRegExpEnd */;\n                }\n                else {\n                    customRe += char;\n                }\n                break;\n            case 3 /* TokenizerState.ParamRegExpEnd */:\n                // same as finalizing a param\n                consumeBuffer();\n                state = 0 /* TokenizerState.Static */;\n                // go back one character if we were not modifying\n                if (char !== '*' && char !== '?' && char !== '+')\n                    i--;\n                customRe = '';\n                break;\n            default:\n                crash('Unknown state');\n                break;\n        }\n    }\n    if (state === 2 /* TokenizerState.ParamRegExp */)\n        crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n    consumeBuffer();\n    finalizeSegment();\n    // tokenCache.set(path, tokens)\n    return tokens;\n}\n\nfunction createRouteRecordMatcher(record, parent, options) {\n    const parser = tokensToParser(tokenizePath(record.path), options);\n    // warn against params with the same name\n    if ((process.env.NODE_ENV !== 'production')) {\n        const existingKeys = new Set();\n        for (const key of parser.keys) {\n            if (existingKeys.has(key.name))\n                warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n            existingKeys.add(key.name);\n        }\n    }\n    const matcher = assign(parser, {\n        record,\n        parent,\n        // these needs to be populated by the parent\n        children: [],\n        alias: [],\n    });\n    if (parent) {\n        // both are aliases or both are not aliases\n        // we don't want to mix them because the order is used when\n        // passing originalRecord in Matcher.addRoute\n        if (!matcher.record.aliasOf === !parent.record.aliasOf)\n            parent.children.push(matcher);\n    }\n    return matcher;\n}\n\n/**\n * Creates a Router Matcher.\n *\n * @internal\n * @param routes - array of initial routes\n * @param globalOptions - global route options\n */\nfunction createRouterMatcher(routes, globalOptions) {\n    // normalized ordered array of matchers\n    const matchers = [];\n    const matcherMap = new Map();\n    globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n    function getRecordMatcher(name) {\n        return matcherMap.get(name);\n    }\n    function addRoute(record, parent, originalRecord) {\n        // used later on to remove by name\n        const isRootAdd = !originalRecord;\n        const mainNormalizedRecord = normalizeRouteRecord(record);\n        if ((process.env.NODE_ENV !== 'production')) {\n            checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n        }\n        // we might be the child of an alias\n        mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n        const options = mergeOptions(globalOptions, record);\n        // generate an array of records to correctly handle aliases\n        const normalizedRecords = [mainNormalizedRecord];\n        if ('alias' in record) {\n            const aliases = typeof record.alias === 'string' ? [record.alias] : record.alias;\n            for (const alias of aliases) {\n                normalizedRecords.push(\n                // we need to normalize again to ensure the `mods` property\n                // being non enumerable\n                normalizeRouteRecord(assign({}, mainNormalizedRecord, {\n                    // this allows us to hold a copy of the `components` option\n                    // so that async components cache is hold on the original record\n                    components: originalRecord\n                        ? originalRecord.record.components\n                        : mainNormalizedRecord.components,\n                    path: alias,\n                    // we might be the child of an alias\n                    aliasOf: originalRecord\n                        ? originalRecord.record\n                        : mainNormalizedRecord,\n                    // the aliases are always of the same kind as the original since they\n                    // are defined on the same record\n                })));\n            }\n        }\n        let matcher;\n        let originalMatcher;\n        for (const normalizedRecord of normalizedRecords) {\n            const { path } = normalizedRecord;\n            // Build up the path for nested routes if the child isn't an absolute\n            // route. Only add the / delimiter if the child path isn't empty and if the\n            // parent path doesn't have a trailing slash\n            if (parent && path[0] !== '/') {\n                const parentPath = parent.record.path;\n                const connectingSlash = parentPath[parentPath.length - 1] === '/' ? '' : '/';\n                normalizedRecord.path =\n                    parent.record.path + (path && connectingSlash + path);\n            }\n            if ((process.env.NODE_ENV !== 'production') && normalizedRecord.path === '*') {\n                throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\n' +\n                    'See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.');\n            }\n            // create the object beforehand, so it can be passed to children\n            matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n            if ((process.env.NODE_ENV !== 'production') && parent && path[0] === '/')\n                checkMissingParamsInAbsolutePath(matcher, parent);\n            // if we are an alias we must tell the original record that we exist,\n            // so we can be removed\n            if (originalRecord) {\n                originalRecord.alias.push(matcher);\n                if ((process.env.NODE_ENV !== 'production')) {\n                    checkSameParams(originalRecord, matcher);\n                }\n            }\n            else {\n                // otherwise, the first record is the original and others are aliases\n                originalMatcher = originalMatcher || matcher;\n                if (originalMatcher !== matcher)\n                    originalMatcher.alias.push(matcher);\n                // remove the route if named and only for the top record (avoid in nested calls)\n                // this works because the original record is the first one\n                if (isRootAdd && record.name && !isAliasRecord(matcher)) {\n                    if ((process.env.NODE_ENV !== 'production')) {\n                        checkSameNameAsAncestor(record, parent);\n                    }\n                    removeRoute(record.name);\n                }\n            }\n            // Avoid adding a record that doesn't display anything. This allows passing through records without a component to\n            // not be reached and pass through the catch all route\n            if (isMatchable(matcher)) {\n                insertMatcher(matcher);\n            }\n            if (mainNormalizedRecord.children) {\n                const children = mainNormalizedRecord.children;\n                for (let i = 0; i < children.length; i++) {\n                    addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n                }\n            }\n            // if there was no original record, then the first one was not an alias and all\n            // other aliases (if any) need to reference this record when adding children\n            originalRecord = originalRecord || matcher;\n            // TODO: add normalized records for more flexibility\n            // if (parent && isAliasRecord(originalRecord)) {\n            //   parent.children.push(originalRecord)\n            // }\n        }\n        return originalMatcher\n            ? () => {\n                // since other matchers are aliases, they should be removed by the original matcher\n                removeRoute(originalMatcher);\n            }\n            : noop;\n    }\n    function removeRoute(matcherRef) {\n        if (isRouteName(matcherRef)) {\n            const matcher = matcherMap.get(matcherRef);\n            if (matcher) {\n                matcherMap.delete(matcherRef);\n                matchers.splice(matchers.indexOf(matcher), 1);\n                matcher.children.forEach(removeRoute);\n                matcher.alias.forEach(removeRoute);\n            }\n        }\n        else {\n            const index = matchers.indexOf(matcherRef);\n            if (index > -1) {\n                matchers.splice(index, 1);\n                if (matcherRef.record.name)\n                    matcherMap.delete(matcherRef.record.name);\n                matcherRef.children.forEach(removeRoute);\n                matcherRef.alias.forEach(removeRoute);\n            }\n        }\n    }\n    function getRoutes() {\n        return matchers;\n    }\n    function insertMatcher(matcher) {\n        const index = findInsertionIndex(matcher, matchers);\n        matchers.splice(index, 0, matcher);\n        // only add the original record to the name map\n        if (matcher.record.name && !isAliasRecord(matcher))\n            matcherMap.set(matcher.record.name, matcher);\n    }\n    function resolve(location, currentLocation) {\n        let matcher;\n        let params = {};\n        let path;\n        let name;\n        if ('name' in location && location.name) {\n            matcher = matcherMap.get(location.name);\n            if (!matcher)\n                throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n                    location,\n                });\n            // warn if the user is passing invalid params so they can debug it better when they get removed\n            if ((process.env.NODE_ENV !== 'production')) {\n                const invalidParams = Object.keys(location.params || {}).filter(paramName => !matcher.keys.find(k => k.name === paramName));\n                if (invalidParams.length) {\n                    warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n                }\n            }\n            name = matcher.record.name;\n            params = assign(\n            // paramsFromLocation is a new object\n            paramsFromLocation(currentLocation.params, \n            // only keep params that exist in the resolved location\n            // only keep optional params coming from a parent record\n            matcher.keys\n                .filter(k => !k.optional)\n                .concat(matcher.parent ? matcher.parent.keys.filter(k => k.optional) : [])\n                .map(k => k.name)), \n            // discard any existing params in the current location that do not exist here\n            // #1497 this ensures better active/exact matching\n            location.params &&\n                paramsFromLocation(location.params, matcher.keys.map(k => k.name)));\n            // throws if cannot be stringified\n            path = matcher.stringify(params);\n        }\n        else if (location.path != null) {\n            // no need to resolve the path with the matcher as it was provided\n            // this also allows the user to control the encoding\n            path = location.path;\n            if ((process.env.NODE_ENV !== 'production') && !path.startsWith('/')) {\n                warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n            }\n            matcher = matchers.find(m => m.re.test(path));\n            // matcher should have a value after the loop\n            if (matcher) {\n                // we know the matcher works because we tested the regexp\n                params = matcher.parse(path);\n                name = matcher.record.name;\n            }\n            // location is a relative path\n        }\n        else {\n            // match by name or path of current route\n            matcher = currentLocation.name\n                ? matcherMap.get(currentLocation.name)\n                : matchers.find(m => m.re.test(currentLocation.path));\n            if (!matcher)\n                throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n                    location,\n                    currentLocation,\n                });\n            name = matcher.record.name;\n            // since we are navigating to the same location, we don't need to pick the\n            // params like when `name` is provided\n            params = assign({}, currentLocation.params, location.params);\n            path = matcher.stringify(params);\n        }\n        const matched = [];\n        let parentMatcher = matcher;\n        while (parentMatcher) {\n            // reversed order so parents are at the beginning\n            matched.unshift(parentMatcher.record);\n            parentMatcher = parentMatcher.parent;\n        }\n        return {\n            name,\n            path,\n            params,\n            matched,\n            meta: mergeMetaFields(matched),\n        };\n    }\n    // add initial routes\n    routes.forEach(route => addRoute(route));\n    function clearRoutes() {\n        matchers.length = 0;\n        matcherMap.clear();\n    }\n    return {\n        addRoute,\n        resolve,\n        removeRoute,\n        clearRoutes,\n        getRoutes,\n        getRecordMatcher,\n    };\n}\nfunction paramsFromLocation(params, keys) {\n    const newParams = {};\n    for (const key of keys) {\n        if (key in params)\n            newParams[key] = params[key];\n    }\n    return newParams;\n}\n/**\n * Normalizes a RouteRecordRaw. Creates a copy\n *\n * @param record\n * @returns the normalized version\n */\nfunction normalizeRouteRecord(record) {\n    const normalized = {\n        path: record.path,\n        redirect: record.redirect,\n        name: record.name,\n        meta: record.meta || {},\n        aliasOf: record.aliasOf,\n        beforeEnter: record.beforeEnter,\n        props: normalizeRecordProps(record),\n        children: record.children || [],\n        instances: {},\n        leaveGuards: new Set(),\n        updateGuards: new Set(),\n        enterCallbacks: {},\n        // must be declared afterwards\n        // mods: {},\n        components: 'components' in record\n            ? record.components || null\n            : record.component && { default: record.component },\n    };\n    // mods contain modules and shouldn't be copied,\n    // logged or anything. It's just used for internal\n    // advanced use cases like data loaders\n    Object.defineProperty(normalized, 'mods', {\n        value: {},\n    });\n    return normalized;\n}\n/**\n * Normalize the optional `props` in a record to always be an object similar to\n * components. Also accept a boolean for components.\n * @param record\n */\nfunction normalizeRecordProps(record) {\n    const propsObject = {};\n    // props does not exist on redirect records, but we can set false directly\n    const props = record.props || false;\n    if ('component' in record) {\n        propsObject.default = props;\n    }\n    else {\n        // NOTE: we could also allow a function to be applied to every component.\n        // Would need user feedback for use cases\n        for (const name in record.components)\n            propsObject[name] = typeof props === 'object' ? props[name] : props;\n    }\n    return propsObject;\n}\n/**\n * Checks if a record or any of its parent is an alias\n * @param record\n */\nfunction isAliasRecord(record) {\n    while (record) {\n        if (record.record.aliasOf)\n            return true;\n        record = record.parent;\n    }\n    return false;\n}\n/**\n * Merge meta fields of an array of records\n *\n * @param matched - array of matched records\n */\nfunction mergeMetaFields(matched) {\n    return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n    const options = {};\n    for (const key in defaults) {\n        options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n    }\n    return options;\n}\nfunction isSameParam(a, b) {\n    return (a.name === b.name &&\n        a.optional === b.optional &&\n        a.repeatable === b.repeatable);\n}\n/**\n * Check if a path and its alias have the same required params\n *\n * @param a - original record\n * @param b - alias record\n */\nfunction checkSameParams(a, b) {\n    for (const key of a.keys) {\n        if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n            return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n    }\n    for (const key of b.keys) {\n        if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n            return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n    }\n}\n/**\n * A route with a name and a child with an empty path without a name should warn when adding the route\n *\n * @param mainNormalizedRecord - RouteRecordNormalized\n * @param parent - RouteRecordMatcher\n */\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n    if (parent &&\n        parent.record.name &&\n        !mainNormalizedRecord.name &&\n        !mainNormalizedRecord.path) {\n        warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n    }\n}\nfunction checkSameNameAsAncestor(record, parent) {\n    for (let ancestor = parent; ancestor; ancestor = ancestor.parent) {\n        if (ancestor.record.name === record.name) {\n            throw new Error(`A route named \"${String(record.name)}\" has been added as a ${parent === ancestor ? 'child' : 'descendant'} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);\n        }\n    }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n    for (const key of parent.keys) {\n        if (!record.keys.find(isSameParam.bind(null, key)))\n            return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n    }\n}\n/**\n * Performs a binary search to find the correct insertion index for a new matcher.\n *\n * Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,\n * with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.\n *\n * @param matcher - new matcher to be inserted\n * @param matchers - existing matchers\n */\nfunction findInsertionIndex(matcher, matchers) {\n    // First phase: binary search based on score\n    let lower = 0;\n    let upper = matchers.length;\n    while (lower !== upper) {\n        const mid = (lower + upper) >> 1;\n        const sortOrder = comparePathParserScore(matcher, matchers[mid]);\n        if (sortOrder < 0) {\n            upper = mid;\n        }\n        else {\n            lower = mid + 1;\n        }\n    }\n    // Second phase: check for an ancestor with the same score\n    const insertionAncestor = getInsertionAncestor(matcher);\n    if (insertionAncestor) {\n        upper = matchers.lastIndexOf(insertionAncestor, upper - 1);\n        if ((process.env.NODE_ENV !== 'production') && upper < 0) {\n            // This should never happen\n            warn(`Finding ancestor route \"${insertionAncestor.record.path}\" failed for \"${matcher.record.path}\"`);\n        }\n    }\n    return upper;\n}\nfunction getInsertionAncestor(matcher) {\n    let ancestor = matcher;\n    while ((ancestor = ancestor.parent)) {\n        if (isMatchable(ancestor) &&\n            comparePathParserScore(matcher, ancestor) === 0) {\n            return ancestor;\n        }\n    }\n    return;\n}\n/**\n * Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without\n * a component, or name, or redirect, are just used to group other routes.\n * @param matcher\n * @param matcher.record record of the matcher\n * @returns\n */\nfunction isMatchable({ record }) {\n    return !!(record.name ||\n        (record.components && Object.keys(record.components).length) ||\n        record.redirect);\n}\n\n/**\n * Transforms a queryString into a {@link LocationQuery} object. Accept both, a\n * version with the leading `?` and without Should work as URLSearchParams\n\n * @internal\n *\n * @param search - search string to parse\n * @returns a query object\n */\nfunction parseQuery(search) {\n    const query = {};\n    // avoid creating an object with an empty key and empty value\n    // because of split('&')\n    if (search === '' || search === '?')\n        return query;\n    const hasLeadingIM = search[0] === '?';\n    const searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');\n    for (let i = 0; i < searchParams.length; ++i) {\n        // pre decode the + into space\n        const searchParam = searchParams[i].replace(PLUS_RE, ' ');\n        // allow the = character\n        const eqPos = searchParam.indexOf('=');\n        const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n        const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n        if (key in query) {\n            // an extra variable for ts types\n            let currentValue = query[key];\n            if (!isArray(currentValue)) {\n                currentValue = query[key] = [currentValue];\n            }\n            currentValue.push(value);\n        }\n        else {\n            query[key] = value;\n        }\n    }\n    return query;\n}\n/**\n * Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\n * doesn't prepend a `?`\n *\n * @internal\n *\n * @param query - query object to stringify\n * @returns string version of the query without the leading `?`\n */\nfunction stringifyQuery(query) {\n    let search = '';\n    for (let key in query) {\n        const value = query[key];\n        key = encodeQueryKey(key);\n        if (value == null) {\n            // only null adds the value\n            if (value !== undefined) {\n                search += (search.length ? '&' : '') + key;\n            }\n            continue;\n        }\n        // keep null values\n        const values = isArray(value)\n            ? value.map(v => v && encodeQueryValue(v))\n            : [value && encodeQueryValue(value)];\n        values.forEach(value => {\n            // skip undefined values in arrays as if they were not present\n            // smaller code than using filter\n            if (value !== undefined) {\n                // only append & with non-empty search\n                search += (search.length ? '&' : '') + key;\n                if (value != null)\n                    search += '=' + value;\n            }\n        });\n    }\n    return search;\n}\n/**\n * Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\n * numbers into strings, removing keys with an undefined value and replacing\n * undefined with null in arrays\n *\n * @param query - query object to normalize\n * @returns a normalized query object\n */\nfunction normalizeQuery(query) {\n    const normalizedQuery = {};\n    for (const key in query) {\n        const value = query[key];\n        if (value !== undefined) {\n            normalizedQuery[key] = isArray(value)\n                ? value.map(v => (v == null ? null : '' + v))\n                : value == null\n                    ? value\n                    : '' + value;\n        }\n    }\n    return normalizedQuery;\n}\n\n/**\n * RouteRecord being rendered by the closest ancestor Router View. Used for\n * `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\n * Location Matched\n *\n * @internal\n */\nconst matchedRouteKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : '');\n/**\n * Allows overriding the router view depth to control which component in\n * `matched` is rendered. rvd stands for Router View Depth\n *\n * @internal\n */\nconst viewDepthKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : '');\n/**\n * Allows overriding the router instance returned by `useRouter` in tests. r\n * stands for router\n *\n * @internal\n */\nconst routerKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router' : '');\n/**\n * Allows overriding the current route returned by `useRoute` in tests. rl\n * stands for route location\n *\n * @internal\n */\nconst routeLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'route location' : '');\n/**\n * Allows overriding the current route used by router-view. Internally this is\n * used when the `route` prop is passed.\n *\n * @internal\n */\nconst routerViewLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location' : '');\n\n/**\n * Create a list of callbacks that can be reset. Used to create before and after navigation guards list\n */\nfunction useCallbacks() {\n    let handlers = [];\n    function add(handler) {\n        handlers.push(handler);\n        return () => {\n            const i = handlers.indexOf(handler);\n            if (i > -1)\n                handlers.splice(i, 1);\n        };\n    }\n    function reset() {\n        handlers = [];\n    }\n    return {\n        add,\n        list: () => handlers.slice(),\n        reset,\n    };\n}\n\nfunction registerGuard(record, name, guard) {\n    const removeFromList = () => {\n        record[name].delete(guard);\n    };\n    onUnmounted(removeFromList);\n    onDeactivated(removeFromList);\n    onActivated(() => {\n        record[name].add(guard);\n    });\n    record[name].add(guard);\n}\n/**\n * Add a navigation guard that triggers whenever the component for the current\n * location is about to be left. Similar to {@link beforeRouteLeave} but can be\n * used in any component. The guard is removed when the component is unmounted.\n *\n * @param leaveGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteLeave(leaveGuard) {\n    if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\n        warn('getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function');\n        return;\n    }\n    const activeRecord = inject(matchedRouteKey, \n    // to avoid warning\n    {}).value;\n    if (!activeRecord) {\n        (process.env.NODE_ENV !== 'production') &&\n            warn('No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');\n        return;\n    }\n    registerGuard(activeRecord, 'leaveGuards', leaveGuard);\n}\n/**\n * Add a navigation guard that triggers whenever the current location is about\n * to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\n * component. The guard is removed when the component is unmounted.\n *\n * @param updateGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteUpdate(updateGuard) {\n    if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\n        warn('getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function');\n        return;\n    }\n    const activeRecord = inject(matchedRouteKey, \n    // to avoid warning\n    {}).value;\n    if (!activeRecord) {\n        (process.env.NODE_ENV !== 'production') &&\n            warn('No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');\n        return;\n    }\n    registerGuard(activeRecord, 'updateGuards', updateGuard);\n}\nfunction guardToPromiseFn(guard, to, from, record, name, runWithContext = fn => fn()) {\n    // keep a reference to the enterCallbackArray to prevent pushing callbacks if a new navigation took place\n    const enterCallbackArray = record &&\n        // name is defined if record is because of the function overload\n        (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n    return () => new Promise((resolve, reject) => {\n        const next = (valid) => {\n            if (valid === false) {\n                reject(createRouterError(4 /* ErrorTypes.NAVIGATION_ABORTED */, {\n                    from,\n                    to,\n                }));\n            }\n            else if (valid instanceof Error) {\n                reject(valid);\n            }\n            else if (isRouteLocation(valid)) {\n                reject(createRouterError(2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */, {\n                    from: to,\n                    to: valid,\n                }));\n            }\n            else {\n                if (enterCallbackArray &&\n                    // since enterCallbackArray is truthy, both record and name also are\n                    record.enterCallbacks[name] === enterCallbackArray &&\n                    typeof valid === 'function') {\n                    enterCallbackArray.push(valid);\n                }\n                resolve();\n            }\n        };\n        // wrapping with Promise.resolve allows it to work with both async and sync guards\n        const guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, (process.env.NODE_ENV !== 'production') ? canOnlyBeCalledOnce(next, to, from) : next));\n        let guardCall = Promise.resolve(guardReturn);\n        if (guard.length < 3)\n            guardCall = guardCall.then(next);\n        if ((process.env.NODE_ENV !== 'production') && guard.length > 2) {\n            const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : ''}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n            if (typeof guardReturn === 'object' && 'then' in guardReturn) {\n                guardCall = guardCall.then(resolvedValue => {\n                    // @ts-expect-error: _called is added at canOnlyBeCalledOnce\n                    if (!next._called) {\n                        warn(message);\n                        return Promise.reject(new Error('Invalid navigation guard'));\n                    }\n                    return resolvedValue;\n                });\n            }\n            else if (guardReturn !== undefined) {\n                // @ts-expect-error: _called is added at canOnlyBeCalledOnce\n                if (!next._called) {\n                    warn(message);\n                    reject(new Error('Invalid navigation guard'));\n                    return;\n                }\n            }\n        }\n        guardCall.catch(err => reject(err));\n    });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n    let called = 0;\n    return function () {\n        if (called++ === 1)\n            warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n        // @ts-expect-error: we put it in the original one because it's easier to check\n        next._called = true;\n        if (called === 1)\n            next.apply(null, arguments);\n    };\n}\nfunction extractComponentsGuards(matched, guardType, to, from, runWithContext = fn => fn()) {\n    const guards = [];\n    for (const record of matched) {\n        if ((process.env.NODE_ENV !== 'production') && !record.components && !record.children.length) {\n            warn(`Record with path \"${record.path}\" is either missing a \"component(s)\"` +\n                ` or \"children\" property.`);\n        }\n        for (const name in record.components) {\n            let rawComponent = record.components[name];\n            if ((process.env.NODE_ENV !== 'production')) {\n                if (!rawComponent ||\n                    (typeof rawComponent !== 'object' &&\n                        typeof rawComponent !== 'function')) {\n                    warn(`Component \"${name}\" in record with path \"${record.path}\" is not` +\n                        ` a valid component. Received \"${String(rawComponent)}\".`);\n                    // throw to ensure we stop here but warn to ensure the message isn't\n                    // missed by the user\n                    throw new Error('Invalid route component');\n                }\n                else if ('then' in rawComponent) {\n                    // warn if user wrote import('/component.vue') instead of () =>\n                    // import('./component.vue')\n                    warn(`Component \"${name}\" in record with path \"${record.path}\" is a ` +\n                        `Promise instead of a function that returns a Promise. Did you ` +\n                        `write \"import('./MyPage.vue')\" instead of ` +\n                        `\"() => import('./MyPage.vue')\" ? This will break in ` +\n                        `production if not fixed.`);\n                    const promise = rawComponent;\n                    rawComponent = () => promise;\n                }\n                else if (rawComponent.__asyncLoader &&\n                    // warn only once per component\n                    !rawComponent.__warnedDefineAsync) {\n                    rawComponent.__warnedDefineAsync = true;\n                    warn(`Component \"${name}\" in record with path \"${record.path}\" is defined ` +\n                        `using \"defineAsyncComponent()\". ` +\n                        `Write \"() => import('./MyPage.vue')\" instead of ` +\n                        `\"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n                }\n            }\n            // skip update and leave guards if the route component is not mounted\n            if (guardType !== 'beforeRouteEnter' && !record.instances[name])\n                continue;\n            if (isRouteComponent(rawComponent)) {\n                // __vccOpts is added by vue-class-component and contain the regular options\n                const options = rawComponent.__vccOpts || rawComponent;\n                const guard = options[guardType];\n                guard &&\n                    guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));\n            }\n            else {\n                // start requesting the chunk already\n                let componentPromise = rawComponent();\n                if ((process.env.NODE_ENV !== 'production') && !('catch' in componentPromise)) {\n                    warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n                    componentPromise = Promise.resolve(componentPromise);\n                }\n                guards.push(() => componentPromise.then(resolved => {\n                    if (!resolved)\n                        throw new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`);\n                    const resolvedComponent = isESModule(resolved)\n                        ? resolved.default\n                        : resolved;\n                    // keep the resolved module for plugins like data loaders\n                    record.mods[name] = resolved;\n                    // replace the function with the resolved component\n                    // cannot be null or undefined because we went into the for loop\n                    record.components[name] = resolvedComponent;\n                    // __vccOpts is added by vue-class-component and contain the regular options\n                    const options = resolvedComponent.__vccOpts || resolvedComponent;\n                    const guard = options[guardType];\n                    return (guard &&\n                        guardToPromiseFn(guard, to, from, record, name, runWithContext)());\n                }));\n            }\n        }\n    }\n    return guards;\n}\n/**\n * Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.\n *\n * @param route - resolved route to load\n */\nfunction loadRouteLocation(route) {\n    return route.matched.every(record => record.redirect)\n        ? Promise.reject(new Error('Cannot load a route that redirects.'))\n        : Promise.all(route.matched.map(record => record.components &&\n            Promise.all(Object.keys(record.components).reduce((promises, name) => {\n                const rawComponent = record.components[name];\n                if (typeof rawComponent === 'function' &&\n                    !('displayName' in rawComponent)) {\n                    promises.push(rawComponent().then(resolved => {\n                        if (!resolved)\n                            return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\n                        const resolvedComponent = isESModule(resolved)\n                            ? resolved.default\n                            : resolved;\n                        // keep the resolved module for plugins like data loaders\n                        record.mods[name] = resolved;\n                        // replace the function with the resolved component\n                        // cannot be null or undefined because we went into the for loop\n                        record.components[name] = resolvedComponent;\n                        return;\n                    }));\n                }\n                return promises;\n            }, [])))).then(() => route);\n}\n\n// TODO: we could allow currentRoute as a prop to expose `isActive` and\n// `isExactActive` behavior should go through an RFC\n/**\n * Returns the internal behavior of a {@link RouterLink} without the rendering part.\n *\n * @param props - a `to` location and an optional `replace` flag\n */\nfunction useLink(props) {\n    const router = inject(routerKey);\n    const currentRoute = inject(routeLocationKey);\n    let hasPrevious = false;\n    let previousTo = null;\n    const route = computed(() => {\n        const to = unref(props.to);\n        if ((process.env.NODE_ENV !== 'production') && (!hasPrevious || to !== previousTo)) {\n            if (!isRouteLocation(to)) {\n                if (hasPrevious) {\n                    warn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- previous to:`, previousTo, `\\n- props:`, props);\n                }\n                else {\n                    warn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- props:`, props);\n                }\n            }\n            previousTo = to;\n            hasPrevious = true;\n        }\n        return router.resolve(to);\n    });\n    const activeRecordIndex = computed(() => {\n        const { matched } = route.value;\n        const { length } = matched;\n        const routeMatched = matched[length - 1];\n        const currentMatched = currentRoute.matched;\n        if (!routeMatched || !currentMatched.length)\n            return -1;\n        const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n        if (index > -1)\n            return index;\n        // possible parent record\n        const parentRecordPath = getOriginalPath(matched[length - 2]);\n        return (\n        // we are dealing with nested routes\n        length > 1 &&\n            // if the parent and matched route have the same path, this link is\n            // referring to the empty child. Or we currently are on a different\n            // child of the same parent\n            getOriginalPath(routeMatched) === parentRecordPath &&\n            // avoid comparing the child with its parent\n            currentMatched[currentMatched.length - 1].path !== parentRecordPath\n            ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2]))\n            : index);\n    });\n    const isActive = computed(() => activeRecordIndex.value > -1 &&\n        includesParams(currentRoute.params, route.value.params));\n    const isExactActive = computed(() => activeRecordIndex.value > -1 &&\n        activeRecordIndex.value === currentRoute.matched.length - 1 &&\n        isSameRouteLocationParams(currentRoute.params, route.value.params));\n    function navigate(e = {}) {\n        if (guardEvent(e)) {\n            const p = router[unref(props.replace) ? 'replace' : 'push'](unref(props.to)\n            // avoid uncaught errors are they are logged anyway\n            ).catch(noop);\n            if (props.viewTransition &&\n                typeof document !== 'undefined' &&\n                'startViewTransition' in document) {\n                document.startViewTransition(() => p);\n            }\n            return p;\n        }\n        return Promise.resolve();\n    }\n    // devtools only\n    if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n        const instance = getCurrentInstance();\n        if (instance) {\n            const linkContextDevtools = {\n                route: route.value,\n                isActive: isActive.value,\n                isExactActive: isExactActive.value,\n                error: null,\n            };\n            // @ts-expect-error: this is internal\n            instance.__vrl_devtools = instance.__vrl_devtools || [];\n            // @ts-expect-error: this is internal\n            instance.__vrl_devtools.push(linkContextDevtools);\n            watchEffect(() => {\n                linkContextDevtools.route = route.value;\n                linkContextDevtools.isActive = isActive.value;\n                linkContextDevtools.isExactActive = isExactActive.value;\n                linkContextDevtools.error = isRouteLocation(unref(props.to))\n                    ? null\n                    : 'Invalid \"to\" value';\n            }, { flush: 'post' });\n        }\n    }\n    /**\n     * NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\n     */\n    return {\n        route,\n        href: computed(() => route.value.href),\n        isActive,\n        isExactActive,\n        navigate,\n    };\n}\nfunction preferSingleVNode(vnodes) {\n    return vnodes.length === 1 ? vnodes[0] : vnodes;\n}\nconst RouterLinkImpl = /*#__PURE__*/ defineComponent({\n    name: 'RouterLink',\n    compatConfig: { MODE: 3 },\n    props: {\n        to: {\n            type: [String, Object],\n            required: true,\n        },\n        replace: Boolean,\n        activeClass: String,\n        // inactiveClass: String,\n        exactActiveClass: String,\n        custom: Boolean,\n        ariaCurrentValue: {\n            type: String,\n            default: 'page',\n        },\n    },\n    useLink,\n    setup(props, { slots }) {\n        const link = reactive(useLink(props));\n        const { options } = inject(routerKey);\n        const elClass = computed(() => ({\n            [getLinkClass(props.activeClass, options.linkActiveClass, 'router-link-active')]: link.isActive,\n            // [getLinkClass(\n            //   props.inactiveClass,\n            //   options.linkInactiveClass,\n            //   'router-link-inactive'\n            // )]: !link.isExactActive,\n            [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, 'router-link-exact-active')]: link.isExactActive,\n        }));\n        return () => {\n            const children = slots.default && preferSingleVNode(slots.default(link));\n            return props.custom\n                ? children\n                : h('a', {\n                    'aria-current': link.isExactActive\n                        ? props.ariaCurrentValue\n                        : null,\n                    href: link.href,\n                    // this would override user added attrs but Vue will still add\n                    // the listener, so we end up triggering both\n                    onClick: link.navigate,\n                    class: elClass.value,\n                }, children);\n        };\n    },\n});\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to render a link that triggers a navigation on click.\n */\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n    // don't redirect with control keys\n    if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n        return;\n    // don't redirect when preventDefault called\n    if (e.defaultPrevented)\n        return;\n    // don't redirect on right click\n    if (e.button !== undefined && e.button !== 0)\n        return;\n    // don't redirect if `target=\"_blank\"`\n    // @ts-expect-error getAttribute does exist\n    if (e.currentTarget && e.currentTarget.getAttribute) {\n        // @ts-expect-error getAttribute exists\n        const target = e.currentTarget.getAttribute('target');\n        if (/\\b_blank\\b/i.test(target))\n            return;\n    }\n    // this may be a Weex event which doesn't have this method\n    if (e.preventDefault)\n        e.preventDefault();\n    return true;\n}\nfunction includesParams(outer, inner) {\n    for (const key in inner) {\n        const innerValue = inner[key];\n        const outerValue = outer[key];\n        if (typeof innerValue === 'string') {\n            if (innerValue !== outerValue)\n                return false;\n        }\n        else {\n            if (!isArray(outerValue) ||\n                outerValue.length !== innerValue.length ||\n                innerValue.some((value, i) => value !== outerValue[i]))\n                return false;\n        }\n    }\n    return true;\n}\n/**\n * Get the original path value of a record by following its aliasOf\n * @param record\n */\nfunction getOriginalPath(record) {\n    return record ? (record.aliasOf ? record.aliasOf.path : record.path) : '';\n}\n/**\n * Utility class to get the active class based on defaults.\n * @param propClass\n * @param globalClass\n * @param defaultClass\n */\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null\n    ? propClass\n    : globalClass != null\n        ? globalClass\n        : defaultClass;\n\nconst RouterViewImpl = /*#__PURE__*/ defineComponent({\n    name: 'RouterView',\n    // #674 we manually inherit them\n    inheritAttrs: false,\n    props: {\n        name: {\n            type: String,\n            default: 'default',\n        },\n        route: Object,\n    },\n    // Better compat for @vue/compat users\n    // https://github.com/vuejs/router/issues/1315\n    compatConfig: { MODE: 3 },\n    setup(props, { attrs, slots }) {\n        (process.env.NODE_ENV !== 'production') && warnDeprecatedUsage();\n        const injectedRoute = inject(routerViewLocationKey);\n        const routeToDisplay = computed(() => props.route || injectedRoute.value);\n        const injectedDepth = inject(viewDepthKey, 0);\n        // The depth changes based on empty components option, which allows passthrough routes e.g. routes with children\n        // that are used to reuse the `path` property\n        const depth = computed(() => {\n            let initialDepth = unref(injectedDepth);\n            const { matched } = routeToDisplay.value;\n            let matchedRoute;\n            while ((matchedRoute = matched[initialDepth]) &&\n                !matchedRoute.components) {\n                initialDepth++;\n            }\n            return initialDepth;\n        });\n        const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n        provide(viewDepthKey, computed(() => depth.value + 1));\n        provide(matchedRouteKey, matchedRouteRef);\n        provide(routerViewLocationKey, routeToDisplay);\n        const viewRef = ref();\n        // watch at the same time the component instance, the route record we are\n        // rendering, and the name\n        watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n            // copy reused instances\n            if (to) {\n                // this will update the instance for new instances as well as reused\n                // instances when navigating to a new route\n                to.instances[name] = instance;\n                // the component instance is reused for a different route or name, so\n                // we copy any saved update or leave guards. With async setup, the\n                // mounting component will mount before the matchedRoute changes,\n                // making instance === oldInstance, so we check if guards have been\n                // added before. This works because we remove guards when\n                // unmounting/deactivating components\n                if (from && from !== to && instance && instance === oldInstance) {\n                    if (!to.leaveGuards.size) {\n                        to.leaveGuards = from.leaveGuards;\n                    }\n                    if (!to.updateGuards.size) {\n                        to.updateGuards = from.updateGuards;\n                    }\n                }\n            }\n            // trigger beforeRouteEnter next callbacks\n            if (instance &&\n                to &&\n                // if there is no instance but to and from are the same this might be\n                // the first visit\n                (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n                (to.enterCallbacks[name] || []).forEach(callback => callback(instance));\n            }\n        }, { flush: 'post' });\n        return () => {\n            const route = routeToDisplay.value;\n            // we need the value at the time we render because when we unmount, we\n            // navigated to a different location so the value is different\n            const currentName = props.name;\n            const matchedRoute = matchedRouteRef.value;\n            const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n            if (!ViewComponent) {\n                return normalizeSlot(slots.default, { Component: ViewComponent, route });\n            }\n            // props from route configuration\n            const routePropsOption = matchedRoute.props[currentName];\n            const routeProps = routePropsOption\n                ? routePropsOption === true\n                    ? route.params\n                    : typeof routePropsOption === 'function'\n                        ? routePropsOption(route)\n                        : routePropsOption\n                : null;\n            const onVnodeUnmounted = vnode => {\n                // remove the instance reference to prevent leak\n                if (vnode.component.isUnmounted) {\n                    matchedRoute.instances[currentName] = null;\n                }\n            };\n            const component = h(ViewComponent, assign({}, routeProps, attrs, {\n                onVnodeUnmounted,\n                ref: viewRef,\n            }));\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n                isBrowser &&\n                component.ref) {\n                // TODO: can display if it's an alias, its props\n                const info = {\n                    depth: depth.value,\n                    name: matchedRoute.name,\n                    path: matchedRoute.path,\n                    meta: matchedRoute.meta,\n                };\n                const internalInstances = isArray(component.ref)\n                    ? component.ref.map(r => r.i)\n                    : [component.ref.i];\n                internalInstances.forEach(instance => {\n                    // @ts-expect-error\n                    instance.__vrv_devtools = info;\n                });\n            }\n            return (\n            // pass the vnode to the slot as a prop.\n            // h and <component :is=\"...\"> both accept vnodes\n            normalizeSlot(slots.default, { Component: component, route }) ||\n                component);\n        };\n    },\n});\nfunction normalizeSlot(slot, data) {\n    if (!slot)\n        return null;\n    const slotContent = slot(data);\n    return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to display the current route the user is at.\n */\nconst RouterView = RouterViewImpl;\n// warn against deprecated usage with <transition> & <keep-alive>\n// due to functional component being no longer eager in Vue 3\nfunction warnDeprecatedUsage() {\n    const instance = getCurrentInstance();\n    const parentName = instance.parent && instance.parent.type.name;\n    const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n    if (parentName &&\n        (parentName === 'KeepAlive' || parentName.includes('Transition')) &&\n        typeof parentSubTreeType === 'object' &&\n        parentSubTreeType.name === 'RouterView') {\n        const comp = parentName === 'KeepAlive' ? 'keep-alive' : 'transition';\n        warn(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.\\n` +\n            `Use slot props instead:\\n\\n` +\n            `<router-view v-slot=\"{ Component }\">\\n` +\n            `  <${comp}>\\n` +\n            `    <component :is=\"Component\" />\\n` +\n            `  </${comp}>\\n` +\n            `</router-view>`);\n    }\n}\n\n/**\n * Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\n *\n * @param routeLocation - routeLocation to format\n * @param tooltip - optional tooltip\n * @returns a copy of the routeLocation\n */\nfunction formatRouteLocation(routeLocation, tooltip) {\n    const copy = assign({}, routeLocation, {\n        // remove variables that can contain vue instances\n        matched: routeLocation.matched.map(matched => omit(matched, ['instances', 'children', 'aliasOf'])),\n    });\n    return {\n        _custom: {\n            type: null,\n            readOnly: true,\n            display: routeLocation.fullPath,\n            tooltip,\n            value: copy,\n        },\n    };\n}\nfunction formatDisplay(display) {\n    return {\n        _custom: {\n            display,\n        },\n    };\n}\n// to support multiple router instances\nlet routerId = 0;\nfunction addDevtools(app, router, matcher) {\n    // Take over router.beforeEach and afterEach\n    // make sure we are not registering the devtool twice\n    if (router.__hasDevtools)\n        return;\n    router.__hasDevtools = true;\n    // increment to support multiple router instances\n    const id = routerId++;\n    setupDevtoolsPlugin({\n        id: 'org.vuejs.router' + (id ? '.' + id : ''),\n        label: 'Vue Router',\n        packageName: 'vue-router',\n        homepage: 'https://router.vuejs.org',\n        logo: 'https://router.vuejs.org/logo.png',\n        componentStateTypes: ['Routing'],\n        app,\n    }, api => {\n        if (typeof api.now !== 'function') {\n            console.warn('[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\n        }\n        // display state added by the router\n        api.on.inspectComponent((payload, ctx) => {\n            if (payload.instanceData) {\n                payload.instanceData.state.push({\n                    type: 'Routing',\n                    key: '$route',\n                    editable: false,\n                    value: formatRouteLocation(router.currentRoute.value, 'Current Route'),\n                });\n            }\n        });\n        // mark router-link as active and display tags on router views\n        api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n            if (componentInstance.__vrv_devtools) {\n                const info = componentInstance.__vrv_devtools;\n                node.tags.push({\n                    label: (info.name ? `${info.name.toString()}: ` : '') + info.path,\n                    textColor: 0,\n                    tooltip: 'This component is rendered by &lt;router-view&gt;',\n                    backgroundColor: PINK_500,\n                });\n            }\n            // if multiple useLink are used\n            if (isArray(componentInstance.__vrl_devtools)) {\n                componentInstance.__devtoolsApi = api;\n                componentInstance.__vrl_devtools.forEach(devtoolsData => {\n                    let label = devtoolsData.route.path;\n                    let backgroundColor = ORANGE_400;\n                    let tooltip = '';\n                    let textColor = 0;\n                    if (devtoolsData.error) {\n                        label = devtoolsData.error;\n                        backgroundColor = RED_100;\n                        textColor = RED_700;\n                    }\n                    else if (devtoolsData.isExactActive) {\n                        backgroundColor = LIME_500;\n                        tooltip = 'This is exactly active';\n                    }\n                    else if (devtoolsData.isActive) {\n                        backgroundColor = BLUE_600;\n                        tooltip = 'This link is active';\n                    }\n                    node.tags.push({\n                        label,\n                        textColor,\n                        tooltip,\n                        backgroundColor,\n                    });\n                });\n            }\n        });\n        watch(router.currentRoute, () => {\n            // refresh active state\n            refreshRoutesView();\n            api.notifyComponentUpdate();\n            api.sendInspectorTree(routerInspectorId);\n            api.sendInspectorState(routerInspectorId);\n        });\n        const navigationsLayerId = 'router:navigations:' + id;\n        api.addTimelineLayer({\n            id: navigationsLayerId,\n            label: `Router${id ? ' ' + id : ''} Navigations`,\n            color: 0x40a8c4,\n        });\n        // const errorsLayerId = 'router:errors'\n        // api.addTimelineLayer({\n        //   id: errorsLayerId,\n        //   label: 'Router Errors',\n        //   color: 0xea5455,\n        // })\n        router.onError((error, to) => {\n            api.addTimelineEvent({\n                layerId: navigationsLayerId,\n                event: {\n                    title: 'Error during Navigation',\n                    subtitle: to.fullPath,\n                    logType: 'error',\n                    time: api.now(),\n                    data: { error },\n                    groupId: to.meta.__navigationId,\n                },\n            });\n        });\n        // attached to `meta` and used to group events\n        let navigationId = 0;\n        router.beforeEach((to, from) => {\n            const data = {\n                guard: formatDisplay('beforeEach'),\n                from: formatRouteLocation(from, 'Current Location during this navigation'),\n                to: formatRouteLocation(to, 'Target location'),\n            };\n            // Used to group navigations together, hide from devtools\n            Object.defineProperty(to.meta, '__navigationId', {\n                value: navigationId++,\n            });\n            api.addTimelineEvent({\n                layerId: navigationsLayerId,\n                event: {\n                    time: api.now(),\n                    title: 'Start of navigation',\n                    subtitle: to.fullPath,\n                    data,\n                    groupId: to.meta.__navigationId,\n                },\n            });\n        });\n        router.afterEach((to, from, failure) => {\n            const data = {\n                guard: formatDisplay('afterEach'),\n            };\n            if (failure) {\n                data.failure = {\n                    _custom: {\n                        type: Error,\n                        readOnly: true,\n                        display: failure ? failure.message : '',\n                        tooltip: 'Navigation Failure',\n                        value: failure,\n                    },\n                };\n                data.status = formatDisplay('❌');\n            }\n            else {\n                data.status = formatDisplay('✅');\n            }\n            // we set here to have the right order\n            data.from = formatRouteLocation(from, 'Current Location during this navigation');\n            data.to = formatRouteLocation(to, 'Target location');\n            api.addTimelineEvent({\n                layerId: navigationsLayerId,\n                event: {\n                    title: 'End of navigation',\n                    subtitle: to.fullPath,\n                    time: api.now(),\n                    data,\n                    logType: failure ? 'warning' : 'default',\n                    groupId: to.meta.__navigationId,\n                },\n            });\n        });\n        /**\n         * Inspector of Existing routes\n         */\n        const routerInspectorId = 'router-inspector:' + id;\n        api.addInspector({\n            id: routerInspectorId,\n            label: 'Routes' + (id ? ' ' + id : ''),\n            icon: 'book',\n            treeFilterPlaceholder: 'Search routes',\n        });\n        function refreshRoutesView() {\n            // the routes view isn't active\n            if (!activeRoutesPayload)\n                return;\n            const payload = activeRoutesPayload;\n            // children routes will appear as nested\n            let routes = matcher.getRoutes().filter(route => !route.parent ||\n                // these routes have a parent with no component which will not appear in the view\n                // therefore we still need to include them\n                !route.parent.record.components);\n            // reset match state to false\n            routes.forEach(resetMatchStateOnRouteRecord);\n            // apply a match state if there is a payload\n            if (payload.filter) {\n                routes = routes.filter(route => \n                // save matches state based on the payload\n                isRouteMatching(route, payload.filter.toLowerCase()));\n            }\n            // mark active routes\n            routes.forEach(route => markRouteRecordActive(route, router.currentRoute.value));\n            payload.rootNodes = routes.map(formatRouteRecordForInspector);\n        }\n        let activeRoutesPayload;\n        api.on.getInspectorTree(payload => {\n            activeRoutesPayload = payload;\n            if (payload.app === app && payload.inspectorId === routerInspectorId) {\n                refreshRoutesView();\n            }\n        });\n        /**\n         * Display information about the currently selected route record\n         */\n        api.on.getInspectorState(payload => {\n            if (payload.app === app && payload.inspectorId === routerInspectorId) {\n                const routes = matcher.getRoutes();\n                const route = routes.find(route => route.record.__vd_id === payload.nodeId);\n                if (route) {\n                    payload.state = {\n                        options: formatRouteRecordMatcherForStateInspector(route),\n                    };\n                }\n            }\n        });\n        api.sendInspectorTree(routerInspectorId);\n        api.sendInspectorState(routerInspectorId);\n    });\n}\nfunction modifierForKey(key) {\n    if (key.optional) {\n        return key.repeatable ? '*' : '?';\n    }\n    else {\n        return key.repeatable ? '+' : '';\n    }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n    const { record } = route;\n    const fields = [\n        { editable: false, key: 'path', value: record.path },\n    ];\n    if (record.name != null) {\n        fields.push({\n            editable: false,\n            key: 'name',\n            value: record.name,\n        });\n    }\n    fields.push({ editable: false, key: 'regexp', value: route.re });\n    if (route.keys.length) {\n        fields.push({\n            editable: false,\n            key: 'keys',\n            value: {\n                _custom: {\n                    type: null,\n                    readOnly: true,\n                    display: route.keys\n                        .map(key => `${key.name}${modifierForKey(key)}`)\n                        .join(' '),\n                    tooltip: 'Param keys',\n                    value: route.keys,\n                },\n            },\n        });\n    }\n    if (record.redirect != null) {\n        fields.push({\n            editable: false,\n            key: 'redirect',\n            value: record.redirect,\n        });\n    }\n    if (route.alias.length) {\n        fields.push({\n            editable: false,\n            key: 'aliases',\n            value: route.alias.map(alias => alias.record.path),\n        });\n    }\n    if (Object.keys(route.record.meta).length) {\n        fields.push({\n            editable: false,\n            key: 'meta',\n            value: route.record.meta,\n        });\n    }\n    fields.push({\n        key: 'score',\n        editable: false,\n        value: {\n            _custom: {\n                type: null,\n                readOnly: true,\n                display: route.score.map(score => score.join(', ')).join(' | '),\n                tooltip: 'Score used to sort routes',\n                value: route.score,\n            },\n        },\n    });\n    return fields;\n}\n/**\n * Extracted from tailwind palette\n */\nconst PINK_500 = 0xec4899;\nconst BLUE_600 = 0x2563eb;\nconst LIME_500 = 0x84cc16;\nconst CYAN_400 = 0x22d3ee;\nconst ORANGE_400 = 0xfb923c;\n// const GRAY_100 = 0xf4f4f5\nconst DARK = 0x666666;\nconst RED_100 = 0xfee2e2;\nconst RED_700 = 0xb91c1c;\nfunction formatRouteRecordForInspector(route) {\n    const tags = [];\n    const { record } = route;\n    if (record.name != null) {\n        tags.push({\n            label: String(record.name),\n            textColor: 0,\n            backgroundColor: CYAN_400,\n        });\n    }\n    if (record.aliasOf) {\n        tags.push({\n            label: 'alias',\n            textColor: 0,\n            backgroundColor: ORANGE_400,\n        });\n    }\n    if (route.__vd_match) {\n        tags.push({\n            label: 'matches',\n            textColor: 0,\n            backgroundColor: PINK_500,\n        });\n    }\n    if (route.__vd_exactActive) {\n        tags.push({\n            label: 'exact',\n            textColor: 0,\n            backgroundColor: LIME_500,\n        });\n    }\n    if (route.__vd_active) {\n        tags.push({\n            label: 'active',\n            textColor: 0,\n            backgroundColor: BLUE_600,\n        });\n    }\n    if (record.redirect) {\n        tags.push({\n            label: typeof record.redirect === 'string'\n                ? `redirect: ${record.redirect}`\n                : 'redirects',\n            textColor: 0xffffff,\n            backgroundColor: DARK,\n        });\n    }\n    // add an id to be able to select it. Using the `path` is not possible because\n    // empty path children would collide with their parents\n    let id = record.__vd_id;\n    if (id == null) {\n        id = String(routeRecordId++);\n        record.__vd_id = id;\n    }\n    return {\n        id,\n        label: record.path,\n        tags,\n        children: route.children.map(formatRouteRecordForInspector),\n    };\n}\n//  incremental id for route records and inspector state\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n    // no route will be active if matched is empty\n    // reset the matching state\n    const isExactActive = currentRoute.matched.length &&\n        isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n    route.__vd_exactActive = route.__vd_active = isExactActive;\n    if (!isExactActive) {\n        route.__vd_active = currentRoute.matched.some(match => isSameRouteRecord(match, route.record));\n    }\n    route.children.forEach(childRoute => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n    route.__vd_match = false;\n    route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n    const found = String(route.re).match(EXTRACT_REGEXP_RE);\n    route.__vd_match = false;\n    if (!found || found.length < 3) {\n        return false;\n    }\n    // use a regexp without $ at the end to match nested routes better\n    const nonEndingRE = new RegExp(found[1].replace(/\\$$/, ''), found[2]);\n    if (nonEndingRE.test(filter)) {\n        // mark children as matches\n        route.children.forEach(child => isRouteMatching(child, filter));\n        // exception case: `/`\n        if (route.record.path !== '/' || filter === '/') {\n            route.__vd_match = route.re.test(filter);\n            return true;\n        }\n        // hide the / route\n        return false;\n    }\n    const path = route.record.path.toLowerCase();\n    const decodedPath = decode(path);\n    // also allow partial matching on the path\n    if (!filter.startsWith('/') &&\n        (decodedPath.includes(filter) || path.includes(filter)))\n        return true;\n    if (decodedPath.startsWith(filter) || path.startsWith(filter))\n        return true;\n    if (route.record.name && String(route.record.name).includes(filter))\n        return true;\n    return route.children.some(child => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n    const ret = {};\n    for (const key in obj) {\n        if (!keys.includes(key)) {\n            // @ts-expect-error\n            ret[key] = obj[key];\n        }\n    }\n    return ret;\n}\n\n/**\n * Creates a Router instance that can be used by a Vue app.\n *\n * @param options - {@link RouterOptions}\n */\nfunction createRouter(options) {\n    const matcher = createRouterMatcher(options.routes, options);\n    const parseQuery$1 = options.parseQuery || parseQuery;\n    const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n    const routerHistory = options.history;\n    if ((process.env.NODE_ENV !== 'production') && !routerHistory)\n        throw new Error('Provide the \"history\" option when calling \"createRouter()\":' +\n            ' https://router.vuejs.org/api/interfaces/RouterOptions.html#history');\n    const beforeGuards = useCallbacks();\n    const beforeResolveGuards = useCallbacks();\n    const afterGuards = useCallbacks();\n    const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n    let pendingLocation = START_LOCATION_NORMALIZED;\n    // leave the scrollRestoration if no scrollBehavior is provided\n    if (isBrowser && options.scrollBehavior && 'scrollRestoration' in history) {\n        history.scrollRestoration = 'manual';\n    }\n    const normalizeParams = applyToParams.bind(null, paramValue => '' + paramValue);\n    const encodeParams = applyToParams.bind(null, encodeParam);\n    const decodeParams = \n    // @ts-expect-error: intentionally avoid the type check\n    applyToParams.bind(null, decode);\n    function addRoute(parentOrRoute, route) {\n        let parent;\n        let record;\n        if (isRouteName(parentOrRoute)) {\n            parent = matcher.getRecordMatcher(parentOrRoute);\n            if ((process.env.NODE_ENV !== 'production') && !parent) {\n                warn(`Parent route \"${String(parentOrRoute)}\" not found when adding child route`, route);\n            }\n            record = route;\n        }\n        else {\n            record = parentOrRoute;\n        }\n        return matcher.addRoute(record, parent);\n    }\n    function removeRoute(name) {\n        const recordMatcher = matcher.getRecordMatcher(name);\n        if (recordMatcher) {\n            matcher.removeRoute(recordMatcher);\n        }\n        else if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Cannot remove non-existent route \"${String(name)}\"`);\n        }\n    }\n    function getRoutes() {\n        return matcher.getRoutes().map(routeMatcher => routeMatcher.record);\n    }\n    function hasRoute(name) {\n        return !!matcher.getRecordMatcher(name);\n    }\n    function resolve(rawLocation, currentLocation) {\n        // const resolve: Router['resolve'] = (rawLocation: RouteLocationRaw, currentLocation) => {\n        // const objectLocation = routerLocationAsObject(rawLocation)\n        // we create a copy to modify it later\n        currentLocation = assign({}, currentLocation || currentRoute.value);\n        if (typeof rawLocation === 'string') {\n            const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n            const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n            const href = routerHistory.createHref(locationNormalized.fullPath);\n            if ((process.env.NODE_ENV !== 'production')) {\n                if (href.startsWith('//'))\n                    warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n                else if (!matchedRoute.matched.length) {\n                    warn(`No match found for location with path \"${rawLocation}\"`);\n                }\n            }\n            // locationNormalized is always a new object\n            return assign(locationNormalized, matchedRoute, {\n                params: decodeParams(matchedRoute.params),\n                hash: decode(locationNormalized.hash),\n                redirectedFrom: undefined,\n                href,\n            });\n        }\n        if ((process.env.NODE_ENV !== 'production') && !isRouteLocation(rawLocation)) {\n            warn(`router.resolve() was passed an invalid location. This will fail in production.\\n- Location:`, rawLocation);\n            return resolve({});\n        }\n        let matcherLocation;\n        // path could be relative in object as well\n        if (rawLocation.path != null) {\n            if ((process.env.NODE_ENV !== 'production') &&\n                'params' in rawLocation &&\n                !('name' in rawLocation) &&\n                // @ts-expect-error: the type is never\n                Object.keys(rawLocation.params).length) {\n                warn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n            }\n            matcherLocation = assign({}, rawLocation, {\n                path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path,\n            });\n        }\n        else {\n            // remove any nullish param\n            const targetParams = assign({}, rawLocation.params);\n            for (const key in targetParams) {\n                if (targetParams[key] == null) {\n                    delete targetParams[key];\n                }\n            }\n            // pass encoded values to the matcher, so it can produce encoded path and fullPath\n            matcherLocation = assign({}, rawLocation, {\n                params: encodeParams(targetParams),\n            });\n            // current location params are decoded, we need to encode them in case the\n            // matcher merges the params\n            currentLocation.params = encodeParams(currentLocation.params);\n        }\n        const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n        const hash = rawLocation.hash || '';\n        if ((process.env.NODE_ENV !== 'production') && hash && !hash.startsWith('#')) {\n            warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n        }\n        // the matcher might have merged current location params, so\n        // we need to run the decoding again\n        matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n        const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n            hash: encodeHash(hash),\n            path: matchedRoute.path,\n        }));\n        const href = routerHistory.createHref(fullPath);\n        if ((process.env.NODE_ENV !== 'production')) {\n            if (href.startsWith('//')) {\n                warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n            }\n            else if (!matchedRoute.matched.length) {\n                warn(`No match found for location with path \"${rawLocation.path != null ? rawLocation.path : rawLocation}\"`);\n            }\n        }\n        return assign({\n            fullPath,\n            // keep the hash encoded so fullPath is effectively path + encodedQuery +\n            // hash\n            hash,\n            query: \n            // if the user is using a custom query lib like qs, we might have\n            // nested objects, so we keep the query as is, meaning it can contain\n            // numbers at `$route.query`, but at the point, the user will have to\n            // use their own type anyway.\n            // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n            stringifyQuery$1 === stringifyQuery\n                ? normalizeQuery(rawLocation.query)\n                : (rawLocation.query || {}),\n        }, matchedRoute, {\n            redirectedFrom: undefined,\n            href,\n        });\n    }\n    function locationAsObject(to) {\n        return typeof to === 'string'\n            ? parseURL(parseQuery$1, to, currentRoute.value.path)\n            : assign({}, to);\n    }\n    function checkCanceledNavigation(to, from) {\n        if (pendingLocation !== to) {\n            return createRouterError(8 /* ErrorTypes.NAVIGATION_CANCELLED */, {\n                from,\n                to,\n            });\n        }\n    }\n    function push(to) {\n        return pushWithRedirect(to);\n    }\n    function replace(to) {\n        return push(assign(locationAsObject(to), { replace: true }));\n    }\n    function handleRedirectRecord(to) {\n        const lastMatched = to.matched[to.matched.length - 1];\n        if (lastMatched && lastMatched.redirect) {\n            const { redirect } = lastMatched;\n            let newTargetLocation = typeof redirect === 'function' ? redirect(to) : redirect;\n            if (typeof newTargetLocation === 'string') {\n                newTargetLocation =\n                    newTargetLocation.includes('?') || newTargetLocation.includes('#')\n                        ? (newTargetLocation = locationAsObject(newTargetLocation))\n                        : // force empty params\n                            { path: newTargetLocation };\n                // @ts-expect-error: force empty params when a string is passed to let\n                // the router parse them again\n                newTargetLocation.params = {};\n            }\n            if ((process.env.NODE_ENV !== 'production') &&\n                newTargetLocation.path == null &&\n                !('name' in newTargetLocation)) {\n                warn(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n                throw new Error('Invalid redirect');\n            }\n            return assign({\n                query: to.query,\n                hash: to.hash,\n                // avoid transferring params if the redirect has a path\n                params: newTargetLocation.path != null ? {} : to.params,\n            }, newTargetLocation);\n        }\n    }\n    function pushWithRedirect(to, redirectedFrom) {\n        const targetLocation = (pendingLocation = resolve(to));\n        const from = currentRoute.value;\n        const data = to.state;\n        const force = to.force;\n        // to could be a string where `replace` is a function\n        const replace = to.replace === true;\n        const shouldRedirect = handleRedirectRecord(targetLocation);\n        if (shouldRedirect)\n            return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\n                state: typeof shouldRedirect === 'object'\n                    ? assign({}, data, shouldRedirect.state)\n                    : data,\n                force,\n                replace,\n            }), \n            // keep original redirectedFrom if it exists\n            redirectedFrom || targetLocation);\n        // if it was a redirect we already called `pushWithRedirect` above\n        const toLocation = targetLocation;\n        toLocation.redirectedFrom = redirectedFrom;\n        let failure;\n        if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n            failure = createRouterError(16 /* ErrorTypes.NAVIGATION_DUPLICATED */, { to: toLocation, from });\n            // trigger scroll to allow scrolling to the same anchor\n            handleScroll(from, from, \n            // this is a push, the only way for it to be triggered from a\n            // history.listen is with a redirect, which makes it become a push\n            true, \n            // This cannot be the first navigation because the initial location\n            // cannot be manually navigated to\n            false);\n        }\n        return (failure ? Promise.resolve(failure) : navigate(toLocation, from))\n            .catch((error) => isNavigationFailure(error)\n            ? // navigation redirects still mark the router as ready\n                isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)\n                    ? error\n                    : markAsReady(error) // also returns the error\n            : // reject any unknown error\n                triggerError(error, toLocation, from))\n            .then((failure) => {\n            if (failure) {\n                if (isNavigationFailure(failure, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n                    if ((process.env.NODE_ENV !== 'production') &&\n                        // we are redirecting to the same location we were already at\n                        isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) &&\n                        // and we have done it a couple of times\n                        redirectedFrom &&\n                        // @ts-expect-error: added only in dev\n                        (redirectedFrom._count = redirectedFrom._count\n                            ? // @ts-expect-error\n                                redirectedFrom._count + 1\n                            : 1) > 30) {\n                        warn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n                        return Promise.reject(new Error('Infinite redirect in navigation guard'));\n                    }\n                    return pushWithRedirect(\n                    // keep options\n                    assign({\n                        // preserve an existing replacement but allow the redirect to override it\n                        replace,\n                    }, locationAsObject(failure.to), {\n                        state: typeof failure.to === 'object'\n                            ? assign({}, data, failure.to.state)\n                            : data,\n                        force,\n                    }), \n                    // preserve the original redirectedFrom if any\n                    redirectedFrom || toLocation);\n                }\n            }\n            else {\n                // if we fail we don't finalize the navigation\n                failure = finalizeNavigation(toLocation, from, true, replace, data);\n            }\n            triggerAfterEach(toLocation, from, failure);\n            return failure;\n        });\n    }\n    /**\n     * Helper to reject and skip all navigation guards if a new navigation happened\n     * @param to\n     * @param from\n     */\n    function checkCanceledNavigationAndReject(to, from) {\n        const error = checkCanceledNavigation(to, from);\n        return error ? Promise.reject(error) : Promise.resolve();\n    }\n    function runWithContext(fn) {\n        const app = installedApps.values().next().value;\n        // support Vue < 3.3\n        return app && typeof app.runWithContext === 'function'\n            ? app.runWithContext(fn)\n            : fn();\n    }\n    // TODO: refactor the whole before guards by internally using router.beforeEach\n    function navigate(to, from) {\n        let guards;\n        const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n        // all components here have been resolved once because we are leaving\n        guards = extractComponentsGuards(leavingRecords.reverse(), 'beforeRouteLeave', to, from);\n        // leavingRecords is already reversed\n        for (const record of leavingRecords) {\n            record.leaveGuards.forEach(guard => {\n                guards.push(guardToPromiseFn(guard, to, from));\n            });\n        }\n        const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n        guards.push(canceledNavigationCheck);\n        // run the queue of per route beforeRouteLeave guards\n        return (runGuardQueue(guards)\n            .then(() => {\n            // check global guards beforeEach\n            guards = [];\n            for (const guard of beforeGuards.list()) {\n                guards.push(guardToPromiseFn(guard, to, from));\n            }\n            guards.push(canceledNavigationCheck);\n            return runGuardQueue(guards);\n        })\n            .then(() => {\n            // check in components beforeRouteUpdate\n            guards = extractComponentsGuards(updatingRecords, 'beforeRouteUpdate', to, from);\n            for (const record of updatingRecords) {\n                record.updateGuards.forEach(guard => {\n                    guards.push(guardToPromiseFn(guard, to, from));\n                });\n            }\n            guards.push(canceledNavigationCheck);\n            // run the queue of per route beforeEnter guards\n            return runGuardQueue(guards);\n        })\n            .then(() => {\n            // check the route beforeEnter\n            guards = [];\n            for (const record of enteringRecords) {\n                // do not trigger beforeEnter on reused views\n                if (record.beforeEnter) {\n                    if (isArray(record.beforeEnter)) {\n                        for (const beforeEnter of record.beforeEnter)\n                            guards.push(guardToPromiseFn(beforeEnter, to, from));\n                    }\n                    else {\n                        guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n                    }\n                }\n            }\n            guards.push(canceledNavigationCheck);\n            // run the queue of per route beforeEnter guards\n            return runGuardQueue(guards);\n        })\n            .then(() => {\n            // NOTE: at this point to.matched is normalized and does not contain any () => Promise<Component>\n            // clear existing enterCallbacks, these are added by extractComponentsGuards\n            to.matched.forEach(record => (record.enterCallbacks = {}));\n            // check in-component beforeRouteEnter\n            guards = extractComponentsGuards(enteringRecords, 'beforeRouteEnter', to, from, runWithContext);\n            guards.push(canceledNavigationCheck);\n            // run the queue of per route beforeEnter guards\n            return runGuardQueue(guards);\n        })\n            .then(() => {\n            // check global guards beforeResolve\n            guards = [];\n            for (const guard of beforeResolveGuards.list()) {\n                guards.push(guardToPromiseFn(guard, to, from));\n            }\n            guards.push(canceledNavigationCheck);\n            return runGuardQueue(guards);\n        })\n            // catch any navigation canceled\n            .catch(err => isNavigationFailure(err, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)\n            ? err\n            : Promise.reject(err)));\n    }\n    function triggerAfterEach(to, from, failure) {\n        // navigation is confirmed, call afterGuards\n        // TODO: wrap with error handlers\n        afterGuards\n            .list()\n            .forEach(guard => runWithContext(() => guard(to, from, failure)));\n    }\n    /**\n     * - Cleans up any navigation guards\n     * - Changes the url if necessary\n     * - Calls the scrollBehavior\n     */\n    function finalizeNavigation(toLocation, from, isPush, replace, data) {\n        // a more recent navigation took place\n        const error = checkCanceledNavigation(toLocation, from);\n        if (error)\n            return error;\n        // only consider as push if it's not the first navigation\n        const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n        const state = !isBrowser ? {} : history.state;\n        // change URL only if the user did a push/replace and if it's not the initial navigation because\n        // it's just reflecting the url\n        if (isPush) {\n            // on the initial navigation, we want to reuse the scroll position from\n            // history state if it exists\n            if (replace || isFirstNavigation)\n                routerHistory.replace(toLocation.fullPath, assign({\n                    scroll: isFirstNavigation && state && state.scroll,\n                }, data));\n            else\n                routerHistory.push(toLocation.fullPath, data);\n        }\n        // accept current navigation\n        currentRoute.value = toLocation;\n        handleScroll(toLocation, from, isPush, isFirstNavigation);\n        markAsReady();\n    }\n    let removeHistoryListener;\n    // attach listener to history to trigger navigations\n    function setupListeners() {\n        // avoid setting up listeners twice due to an invalid first navigation\n        if (removeHistoryListener)\n            return;\n        removeHistoryListener = routerHistory.listen((to, _from, info) => {\n            if (!router.listening)\n                return;\n            // cannot be a redirect route because it was in history\n            const toLocation = resolve(to);\n            // due to dynamic routing, and to hash history with manual navigation\n            // (manually changing the url or calling history.hash = '#/somewhere'),\n            // there could be a redirect record in history\n            const shouldRedirect = handleRedirectRecord(toLocation);\n            if (shouldRedirect) {\n                pushWithRedirect(assign(shouldRedirect, { replace: true, force: true }), toLocation).catch(noop);\n                return;\n            }\n            pendingLocation = toLocation;\n            const from = currentRoute.value;\n            // TODO: should be moved to web history?\n            if (isBrowser) {\n                saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n            }\n            navigate(toLocation, from)\n                .catch((error) => {\n                if (isNavigationFailure(error, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n                    return error;\n                }\n                if (isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n                    // Here we could call if (info.delta) routerHistory.go(-info.delta,\n                    // false) but this is bug prone as we have no way to wait the\n                    // navigation to be finished before calling pushWithRedirect. Using\n                    // a setTimeout of 16ms seems to work but there is no guarantee for\n                    // it to work on every browser. So instead we do not restore the\n                    // history entry and trigger a new navigation as requested by the\n                    // navigation guard.\n                    // the error is already handled by router.push we just want to avoid\n                    // logging the error\n                    pushWithRedirect(assign(locationAsObject(error.to), {\n                        force: true,\n                    }), toLocation\n                    // avoid an uncaught rejection, let push call triggerError\n                    )\n                        .then(failure => {\n                        // manual change in hash history #916 ending up in the URL not\n                        // changing, but it was changed by the manual url change, so we\n                        // need to manually change it ourselves\n                        if (isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ |\n                            16 /* ErrorTypes.NAVIGATION_DUPLICATED */) &&\n                            !info.delta &&\n                            info.type === NavigationType.pop) {\n                            routerHistory.go(-1, false);\n                        }\n                    })\n                        .catch(noop);\n                    // avoid the then branch\n                    return Promise.reject();\n                }\n                // do not restore history on unknown direction\n                if (info.delta) {\n                    routerHistory.go(-info.delta, false);\n                }\n                // unrecognized error, transfer to the global handler\n                return triggerError(error, toLocation, from);\n            })\n                .then((failure) => {\n                failure =\n                    failure ||\n                        finalizeNavigation(\n                        // after navigation, all matched components are resolved\n                        toLocation, from, false);\n                // revert the navigation\n                if (failure) {\n                    if (info.delta &&\n                        // a new navigation has been triggered, so we do not want to revert, that will change the current history\n                        // entry while a different route is displayed\n                        !isNavigationFailure(failure, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n                        routerHistory.go(-info.delta, false);\n                    }\n                    else if (info.type === NavigationType.pop &&\n                        isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 16 /* ErrorTypes.NAVIGATION_DUPLICATED */)) {\n                        // manual change in hash history #916\n                        // it's like a push but lacks the information of the direction\n                        routerHistory.go(-1, false);\n                    }\n                }\n                triggerAfterEach(toLocation, from, failure);\n            })\n                // avoid warnings in the console about uncaught rejections, they are logged by triggerErrors\n                .catch(noop);\n        });\n    }\n    // Initialization and Errors\n    let readyHandlers = useCallbacks();\n    let errorListeners = useCallbacks();\n    let ready;\n    /**\n     * Trigger errorListeners added via onError and throws the error as well\n     *\n     * @param error - error to throw\n     * @param to - location we were navigating to when the error happened\n     * @param from - location we were navigating from when the error happened\n     * @returns the error as a rejected promise\n     */\n    function triggerError(error, to, from) {\n        markAsReady(error);\n        const list = errorListeners.list();\n        if (list.length) {\n            list.forEach(handler => handler(error, to, from));\n        }\n        else {\n            if ((process.env.NODE_ENV !== 'production')) {\n                warn('uncaught error during route navigation:');\n            }\n            console.error(error);\n        }\n        // reject the error no matter there were error listeners or not\n        return Promise.reject(error);\n    }\n    function isReady() {\n        if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n            return Promise.resolve();\n        return new Promise((resolve, reject) => {\n            readyHandlers.add([resolve, reject]);\n        });\n    }\n    function markAsReady(err) {\n        if (!ready) {\n            // still not ready if an error happened\n            ready = !err;\n            setupListeners();\n            readyHandlers\n                .list()\n                .forEach(([resolve, reject]) => (err ? reject(err) : resolve()));\n            readyHandlers.reset();\n        }\n        return err;\n    }\n    // Scroll behavior\n    function handleScroll(to, from, isPush, isFirstNavigation) {\n        const { scrollBehavior } = options;\n        if (!isBrowser || !scrollBehavior)\n            return Promise.resolve();\n        const scrollPosition = (!isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0))) ||\n            ((isFirstNavigation || !isPush) &&\n                history.state &&\n                history.state.scroll) ||\n            null;\n        return nextTick()\n            .then(() => scrollBehavior(to, from, scrollPosition))\n            .then(position => position && scrollToPosition(position))\n            .catch(err => triggerError(err, to, from));\n    }\n    const go = (delta) => routerHistory.go(delta);\n    let started;\n    const installedApps = new Set();\n    const router = {\n        currentRoute,\n        listening: true,\n        addRoute,\n        removeRoute,\n        clearRoutes: matcher.clearRoutes,\n        hasRoute,\n        getRoutes,\n        resolve,\n        options,\n        push,\n        replace,\n        go,\n        back: () => go(-1),\n        forward: () => go(1),\n        beforeEach: beforeGuards.add,\n        beforeResolve: beforeResolveGuards.add,\n        afterEach: afterGuards.add,\n        onError: errorListeners.add,\n        isReady,\n        install(app) {\n            const router = this;\n            app.component('RouterLink', RouterLink);\n            app.component('RouterView', RouterView);\n            app.config.globalProperties.$router = router;\n            Object.defineProperty(app.config.globalProperties, '$route', {\n                enumerable: true,\n                get: () => unref(currentRoute),\n            });\n            // this initial navigation is only necessary on client, on server it doesn't\n            // make sense because it will create an extra unnecessary navigation and could\n            // lead to problems\n            if (isBrowser &&\n                // used for the initial navigation client side to avoid pushing\n                // multiple times when the router is used in multiple apps\n                !started &&\n                currentRoute.value === START_LOCATION_NORMALIZED) {\n                // see above\n                started = true;\n                push(routerHistory.location).catch(err => {\n                    if ((process.env.NODE_ENV !== 'production'))\n                        warn('Unexpected error when starting the router:', err);\n                });\n            }\n            const reactiveRoute = {};\n            for (const key in START_LOCATION_NORMALIZED) {\n                Object.defineProperty(reactiveRoute, key, {\n                    get: () => currentRoute.value[key],\n                    enumerable: true,\n                });\n            }\n            app.provide(routerKey, router);\n            app.provide(routeLocationKey, shallowReactive(reactiveRoute));\n            app.provide(routerViewLocationKey, currentRoute);\n            const unmountApp = app.unmount;\n            installedApps.add(app);\n            app.unmount = function () {\n                installedApps.delete(app);\n                // the router is not attached to an app anymore\n                if (installedApps.size < 1) {\n                    // invalidate the current navigation\n                    pendingLocation = START_LOCATION_NORMALIZED;\n                    removeHistoryListener && removeHistoryListener();\n                    removeHistoryListener = null;\n                    currentRoute.value = START_LOCATION_NORMALIZED;\n                    started = false;\n                    ready = false;\n                }\n                unmountApp();\n            };\n            // TODO: this probably needs to be updated so it can be used by vue-termui\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n                addDevtools(app, router, matcher);\n            }\n        },\n    };\n    // TODO: type this as NavigationGuardReturn or similar instead of any\n    function runGuardQueue(guards) {\n        return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n    }\n    return router;\n}\nfunction extractChangingRecords(to, from) {\n    const leavingRecords = [];\n    const updatingRecords = [];\n    const enteringRecords = [];\n    const len = Math.max(from.matched.length, to.matched.length);\n    for (let i = 0; i < len; i++) {\n        const recordFrom = from.matched[i];\n        if (recordFrom) {\n            if (to.matched.find(record => isSameRouteRecord(record, recordFrom)))\n                updatingRecords.push(recordFrom);\n            else\n                leavingRecords.push(recordFrom);\n        }\n        const recordTo = to.matched[i];\n        if (recordTo) {\n            // the type doesn't matter because we are comparing per reference\n            if (!from.matched.find(record => isSameRouteRecord(record, recordTo))) {\n                enteringRecords.push(recordTo);\n            }\n        }\n    }\n    return [leavingRecords, updatingRecords, enteringRecords];\n}\n\n/**\n * Returns the router instance. Equivalent to using `$router` inside\n * templates.\n */\nfunction useRouter() {\n    return inject(routerKey);\n}\n/**\n * Returns the current route location. Equivalent to using `$route` inside\n * templates.\n */\nfunction useRoute(_name) {\n    return inject(routeLocationKey);\n}\n\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };\n","<script setup lang=\"ts\">\nimport { ref, reactive, computed, onMounted } from 'vue'\nimport { CCMDIcon } from '../..'\nimport { useRouter } from 'vue-router'\n\nconst props = defineProps<{\n  items: {\n    text: string\n    path?: string\n  }[]\n}>()\n\nconst router = useRouter()\n\nfunction jumpTo(path: string | undefined) {\n  if (path) {\n    router.push(path)\n  }\n}\n</script>\n\n<template>\n  <div class=\"pankuzu\">\n    <div v-for=\"item in items\" :key=\"item.text\" class=\"item\">\n      <div @click=\"jumpTo(item.path)\" class=\"pointer\">\n        {{ item.text }}\n      </div>\n      <CCMDIcon v-if=\"item !== items[items.length - 1]\" name=\"chevron_right\"></CCMDIcon>\n    </div>\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n.pankuzu\n  display: flex\n  gap: 14px\n  align-items: center\n\n.item\n  display: flex\n  gap: 14px\n  font-size: 14px\n  align-items: center\n\n.pointer\n  cursor: pointer\n</style>\n","<script setup lang=\"ts\">\nimport { onMounted, ref } from 'vue'\nimport { CCMDIcon, CCPankuzu } from '../../index'\n\nconst props = defineProps<{\n  items: {\n    text: string\n    path?: string\n  }[]\n  userName: string\n}>()\n\nconst emit = defineEmits<{\n  (e: 'logout'): void\n}>()\n\n//ログアウトボタン初期値\nconst isDisplayLogoutPanel = ref<boolean>(false)\n\nconst displayLogout = () => {\n  isDisplayLogoutPanel.value = !isDisplayLogoutPanel.value\n}\n\nconst hideLogout = () => {\n  isDisplayLogoutPanel.value = false\n}\n\nfunction logout() {\n  emit('logout')\n}\n\nonMounted(() => {\n  // 外側をクリックした時にメニューを閉じる\n  document.addEventListener('click', e => {\n    if (!(e.target as Element).closest('#menuPanel') && isDisplayLogoutPanel.value) hideLogout()\n  })\n})\n</script>\n\n<template>\n  <header class=\"main-header\">\n    <CCPankuzu :items=\"items\"></CCPankuzu>\n    <div class=\"header-right cursor-pointer\" @click=\"displayLogout\" id=\"menuPanel\">\n      <div>{{ userName }}</div>\n      <CCMDIcon\n        name=\"expand_more\"\n        class=\"arrow\"\n        :class=\"{\n          'arrow-rotate-move': isDisplayLogoutPanel,\n          'arrow-rotate-move-reverse': !isDisplayLogoutPanel,\n        }\"\n      />\n\n      <Transition name=\"logoutFade\">\n        <div v-if=\"isDisplayLogoutPanel\" id=\"logoutPanel\" class=\"logout-panel\" @click=\"logout\">\n          <div class=\"logout-title\">\n            <CCMDIcon name=\"directions_walk\" class=\"directions-walk-icon\" /> ログアウト\n          </div>\n        </div>\n      </Transition>\n    </div>\n  </header>\n</template>\n\n<style lang=\"sass\" scoped>\n.main-header\n  position: relative\n  z-index: 100\n  height: 60px\n  // width: calc(100vw - 285px)\n  display: flex\n  align-items: center\n  justify-content: start\n  padding: 0 35px\n  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px\n  color: var(--pm-text-black)\n\n.header-right\n  display: flex\n  margin-left: auto\n  align-items: center\n\n.arrow\n  font-size: 35px\n  transform: rotate(180deg)\n\n.cursor-pointer\n  cursor: pointer\n\n.arrow-rotate-move\n  transform: rotate(0deg)\n  transition-duration: 0.5s\n\n.arrow-rotate-move-reverse\n  transform: rotate(180deg)\n  transition-duration: 0.5s\n\n.logout-panel\n  position: absolute\n  box-shadow: rgba(99, 99, 99, 0.2) 0px 0px 8px 1px\n  background-color: var(  --c-primary)\n  height: 50px\n  width: 250px\n  top: 50px\n  right:0px\n  display: flex\n  align-items: center\n  justify-content: flex-start\n\n.logout-title\n  display: flex\n  padding-left: 27.6px\n  color: var(--pm-text-white)\n\n.directions-walk-icon\n  padding-right: 14.4px\n  color: var(--pm-text-white)\n\n.logout-title:hover\n  opacity: 0.7\n  transition: 1s\n  cursor: pointer\n\n// ログアウトボタントランジション用CSS\n.logoutFade-enter-active, .logoutFade-leave-active\n  transition: opacity 0.3s ease\n\n.logoutFade-enter-from, .logoutFade-leave-to\n  opacity: 0\n\n.logoutFade-enter-to, .logoutFade-leave-from\n  opacity: 1\n</style>\n","<script setup lang=\"ts\">\nimport { PropType } from 'vue'\nimport { SizeTypes, MDIconTypes, ColorTypes } from '../../types'\nimport CCButton from '../CCButton/CCButton.vue'\n\ndefineProps({\n  /**\n   * ボタン間のスペース\n   * @example '50px'\n   */\n  centerSpace: { type: String, default: '50px' },\n  /**\n   * 左ボタンのラベル\n   * @example 'キャンセル'\n   */\n  leftButtonLabel: { type: String, default: 'label' },\n  /**\n   * 右ボタンのラベル\n   * @example '保存'\n   */\n  rightButtonLabel: { type: String, default: 'label' },\n  /**\n   * 左ボタンのアウトライン\n   * @example leftButtonOutline\n   */\n  leftButtonOutline: { type: Boolean, default: false },\n  /**\n   * 右ボタンのアウトライン\n   * @example rightButtonOutline\n   */\n  rightButtonOutline: { type: Boolean, default: false },\n  /**\n   * ラウンドデザイン\n   * @example rounded\n   */\n  rounded: { type: Boolean, default: false },\n  /**\n   * スクエアデザイン\n   * @example square\n   */\n  square: { type: Boolean, default: false },\n  /**\n   * サイズ\n   * @example 'xs' | 'XS' | 's' | 'S' | 'm' | 'M' | 'l' | 'L' | 'xl' | 'XL'\n   */\n  size: { type: String as PropType<SizeTypes>, default: 'S' },\n  /**\n   * 左ボタンのカラー\n   * @example 'primary'\n   */\n  leftButtonColor: {\n    type: String as PropType<ColorTypes>,\n    default: 'primary',\n  },\n  /**\n   * 右ボタンのカラー\n   * @example 'secondary'\n   */\n  rightButtonColor: {\n    type: String as PropType<ColorTypes>,\n    default: 'primary',\n  },\n  /**\n   * 左ボタンのディセーブル\n   * @example leftButtonDisabled\n   */\n  leftButtonDisabled: { type: Boolean, default: false },\n  /**\n   * 右ボタンのディセーブル\n   * @example rightButtonDisabled\n   */\n  rightButtonDisabled: { type: Boolean, default: false },\n  /**\n   * 左ボタンのアイコン左\n   * @example 'mail'\n   */\n  leftButtonIconLeft: { type: String as PropType<MDIconTypes>, default: '' },\n  /**\n   * 左ボタンのアイコン右\n   * @example 'phone'\n   */\n  leftButtonIconRight: { type: String as PropType<MDIconTypes>, default: '' },\n  /**\n   * 右ボタンのアイコン左\n   * @example 'mail'\n   */\n  rightButtonIconLeft: { type: String as PropType<MDIconTypes>, default: '' },\n  /**\n   * 右ボタンのアイコン右\n   * @example 'phone'\n   */\n  rightButtonIconRight: { type: String as PropType<MDIconTypes>, default: '' },\n})\n\nconst emit = defineEmits<{\n  (e: 'clickLeft'): void\n  (e: 'clickRight'): void\n}>()\n</script>\n\n<template>\n  <div class=\"_button_container\">\n    <CCButton\n      :label=\"leftButtonLabel\"\n      :outline=\"leftButtonOutline\"\n      :rounded=\"rounded\"\n      :square=\"square\"\n      :size=\"size\"\n      :color=\"leftButtonColor\"\n      :disabled=\"leftButtonDisabled\"\n      :iconLeft=\"leftButtonIconLeft\"\n      :iconRight=\"leftButtonIconRight\"\n      @click=\"() => emit('clickLeft')\"\n    />\n    <CCButton\n      :label=\"rightButtonLabel\"\n      :outline=\"rightButtonOutline\"\n      :rounded=\"rounded\"\n      :square=\"square\"\n      :size=\"size\"\n      :color=\"rightButtonColor\"\n      :disabled=\"rightButtonDisabled\"\n      :iconLeft=\"rightButtonIconLeft\"\n      :iconRight=\"rightButtonIconRight\"\n      @click=\"() => emit('clickRight')\"\n    />\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n._button_container\n  display: grid\n  grid-template-columns: repeat(2, 1fr)\n  gap: v-bind(centerSpace)\n</style>\n","<script setup lang=\"ts\">\nimport { PropType } from 'vue'\nimport { SizeTypes, MDIconTypes, ColorTypes } from '../../types'\nimport { CCModal, CCButtonSet, CCButton } from '../../index'\ndefineProps({\n  /**\n   * ボタンが1個の場合\n   * @example singleButton\n   */\n  singleButton: { type: Boolean, default: false },\n  /**\n   * ボタンのラベル\n   * @example '登録'\n   */\n  label: { type: String, default: 'label' },\n  /**\n   * 左ボタンのラベル\n   * @example 'キャンセル'\n   */\n  leftButtonLabel: { type: String, default: 'label' },\n  /**\n   * 右ボタンのラベル\n   * @example '保存'\n   */\n  rightButtonLabel: { type: String, default: 'label' },\n  /**\n   * ボタンのアウトライン\n   * @example outline\n   */\n  outline: { type: Boolean, default: false },\n  /**\n   * 左ボタンのアウトライン\n   * @example leftButtonOutline\n   */\n  leftButtonOutline: { type: Boolean, default: false },\n  /**\n   * 右ボタンのアウトライン\n   * @example rightButtonOutline\n   */\n  rightButtonOutline: { type: Boolean, default: false },\n  /**\n   * ラウンドデザイン\n   * @example rounded\n   */\n  rounded: { type: Boolean, default: false },\n  /**\n   * スクエアデザイン\n   * @example square\n   */\n  square: { type: Boolean, default: false },\n  /**\n   * サイズ\n   * @example 'xs' | 'XS' | 's' | 'S' | 'm' | 'M' | 'l' | 'L' | 'xl' | 'XL'\n   */\n  size: { type: String as PropType<SizeTypes>, default: 'S' },\n  /**\n   * カラー\n   * @example 'secondary'\n   */\n  color: {\n    type: String as PropType<ColorTypes>,\n    default: 'primary',\n  },\n  /**\n   * 左ボタンのカラー\n   * @example 'primary'\n   */\n  leftButtonColor: {\n    type: String as PropType<ColorTypes>,\n    default: 'primary',\n  },\n  /**\n   * 右ボタンのカラー\n   * @example 'secondary'\n   */\n  rightButtonColor: {\n    type: String as PropType<ColorTypes>,\n    default: 'primary',\n  },\n  /**\n   * ディセーブル\n   * @example disabled\n   */\n  disabled: { type: Boolean, default: false },\n  /**\n   * 左ボタンのディセーブル\n   * @example leftButtonDisabled\n   */\n  leftButtonDisabled: { type: Boolean, default: false },\n  /**\n   * 右ボタンのディセーブル\n   * @example rightButtonDisabled\n   */\n  rightButtonDisabled: { type: Boolean, default: false },\n  /**\n   * アイコン右\n   * @example 'mail'\n   */\n  iconRight: { type: String as PropType<MDIconTypes>, default: '' },\n  /**\n   * アイコン左\n   * @example 'phone'\n   */\n  iconLeft: { type: String as PropType<MDIconTypes>, default: '' },\n  /**\n   * 左ボタンのアイコン左\n   * @example 'mail'\n   */\n  leftButtonIconLeft: { type: String as PropType<MDIconTypes>, default: '' },\n  /**\n   * 左ボタンのアイコン右\n   * @example 'phone'\n   */\n  leftButtonIconRight: { type: String as PropType<MDIconTypes>, default: '' },\n  /**\n   * 右ボタンのアイコン左\n   * @example 'mail'\n   */\n  rightButtonIconLeft: { type: String as PropType<MDIconTypes>, default: '' },\n  /**\n   * 右ボタンのアイコン右\n   * @example 'phone'\n   */\n  rightButtonIconRight: { type: String as PropType<MDIconTypes>, default: '' },\n})\n\nconst emit = defineEmits<{\n  (e: 'click'): void\n  (e: 'clickLeft'): void\n  (e: 'clickRight'): void\n}>()\n</script>\n\n<template>\n  <CCModal loginPage size=\"s\">\n    <div class=\"_slot_container\">\n      <slot />\n    </div>\n    <CCButton\n      v-if=\"singleButton\"\n      class=\"_single_button\"\n      :label=\"label\"\n      :outline=\"outline\"\n      :rounded=\"rounded\"\n      :square=\"square\"\n      :size=\"size\"\n      :color=\"color\"\n      :disabled=\"disabled\"\n      :iconRight=\"iconRight\"\n      :iconLeft=\"iconLeft\"\n      @click=\"() => emit('click')\"\n    />\n    <CCButtonSet\n      v-else\n      class=\"_double_button\"\n      center-space=\"20px\"\n      :leftButtonLabel=\"leftButtonLabel\"\n      :rightButtonLabel=\"rightButtonLabel\"\n      :leftButtonOutline=\"leftButtonOutline\"\n      :rightButtonOutline=\"rightButtonOutline\"\n      :rounded=\"rounded\"\n      :square=\"square\"\n      :size=\"size\"\n      :leftButtonColor=\"leftButtonColor\"\n      :rightButtonColor=\"rightButtonColor\"\n      :leftButtonDisabled=\"leftButtonDisabled\"\n      :rightButtonDisabled=\"rightButtonDisabled\"\n      :leftButtonIconLeft=\"leftButtonIconLeft\"\n      :leftButtonIconRight=\"leftButtonIconRight\"\n      :rightButtonIconLeft=\"rightButtonIconLeft\"\n      :rightButtonIconRight=\"rightButtonIconRight\"\n      @clickLeft=\"() => emit('clickLeft')\"\n      @clickRight=\"() => emit('clickRight')\"\n    />\n  </CCModal>\n</template>\n\n<style lang=\"sass\" scoped>\n._single_button\n  width: 150px\n  margin: 30px auto\n._double_button\n  width: 320px\n  margin: 30px auto\n._slot_container\n  margin: 20px\n  margin-bottom: 0\n  text-align: center\n</style>\n","/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @fileoverview Firebase constants.  Some of these (@defines) can be overridden at compile-time.\r\n */\r\nconst CONSTANTS = {\r\n    /**\r\n     * @define {boolean} Whether this is the client Node.js SDK.\r\n     */\r\n    NODE_CLIENT: false,\r\n    /**\r\n     * @define {boolean} Whether this is the Admin Node.js SDK.\r\n     */\r\n    NODE_ADMIN: false,\r\n    /**\r\n     * Firebase SDK Version\r\n     */\r\n    SDK_VERSION: '${JSCORE_VERSION}'\r\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Throws an error if the provided assertion is falsy\r\n */\r\nconst assert = function (assertion, message) {\r\n    if (!assertion) {\r\n        throw assertionError(message);\r\n    }\r\n};\r\n/**\r\n * Returns an Error object suitable for throwing.\r\n */\r\nconst assertionError = function (message) {\r\n    return new Error('Firebase Database (' +\r\n        CONSTANTS.SDK_VERSION +\r\n        ') INTERNAL ASSERT FAILED: ' +\r\n        message);\r\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst stringToByteArray$1 = function (str) {\r\n    // TODO(user): Use native implementations if/when available\r\n    const out = [];\r\n    let p = 0;\r\n    for (let i = 0; i < str.length; i++) {\r\n        let c = str.charCodeAt(i);\r\n        if (c < 128) {\r\n            out[p++] = c;\r\n        }\r\n        else if (c < 2048) {\r\n            out[p++] = (c >> 6) | 192;\r\n            out[p++] = (c & 63) | 128;\r\n        }\r\n        else if ((c & 0xfc00) === 0xd800 &&\r\n            i + 1 < str.length &&\r\n            (str.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\r\n            // Surrogate Pair\r\n            c = 0x10000 + ((c & 0x03ff) << 10) + (str.charCodeAt(++i) & 0x03ff);\r\n            out[p++] = (c >> 18) | 240;\r\n            out[p++] = ((c >> 12) & 63) | 128;\r\n            out[p++] = ((c >> 6) & 63) | 128;\r\n            out[p++] = (c & 63) | 128;\r\n        }\r\n        else {\r\n            out[p++] = (c >> 12) | 224;\r\n            out[p++] = ((c >> 6) & 63) | 128;\r\n            out[p++] = (c & 63) | 128;\r\n        }\r\n    }\r\n    return out;\r\n};\r\n/**\r\n * Turns an array of numbers into the string given by the concatenation of the\r\n * characters to which the numbers correspond.\r\n * @param bytes Array of numbers representing characters.\r\n * @return Stringification of the array.\r\n */\r\nconst byteArrayToString = function (bytes) {\r\n    // TODO(user): Use native implementations if/when available\r\n    const out = [];\r\n    let pos = 0, c = 0;\r\n    while (pos < bytes.length) {\r\n        const c1 = bytes[pos++];\r\n        if (c1 < 128) {\r\n            out[c++] = String.fromCharCode(c1);\r\n        }\r\n        else if (c1 > 191 && c1 < 224) {\r\n            const c2 = bytes[pos++];\r\n            out[c++] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));\r\n        }\r\n        else if (c1 > 239 && c1 < 365) {\r\n            // Surrogate Pair\r\n            const c2 = bytes[pos++];\r\n            const c3 = bytes[pos++];\r\n            const c4 = bytes[pos++];\r\n            const u = (((c1 & 7) << 18) | ((c2 & 63) << 12) | ((c3 & 63) << 6) | (c4 & 63)) -\r\n                0x10000;\r\n            out[c++] = String.fromCharCode(0xd800 + (u >> 10));\r\n            out[c++] = String.fromCharCode(0xdc00 + (u & 1023));\r\n        }\r\n        else {\r\n            const c2 = bytes[pos++];\r\n            const c3 = bytes[pos++];\r\n            out[c++] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\r\n        }\r\n    }\r\n    return out.join('');\r\n};\r\n// We define it as an object literal instead of a class because a class compiled down to es5 can't\r\n// be treeshaked. https://github.com/rollup/rollup/issues/1691\r\n// Static lookup maps, lazily populated by init_()\r\nconst base64 = {\r\n    /**\r\n     * Maps bytes to characters.\r\n     */\r\n    byteToCharMap_: null,\r\n    /**\r\n     * Maps characters to bytes.\r\n     */\r\n    charToByteMap_: null,\r\n    /**\r\n     * Maps bytes to websafe characters.\r\n     * @private\r\n     */\r\n    byteToCharMapWebSafe_: null,\r\n    /**\r\n     * Maps websafe characters to bytes.\r\n     * @private\r\n     */\r\n    charToByteMapWebSafe_: null,\r\n    /**\r\n     * Our default alphabet, shared between\r\n     * ENCODED_VALS and ENCODED_VALS_WEBSAFE\r\n     */\r\n    ENCODED_VALS_BASE: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz' + '0123456789',\r\n    /**\r\n     * Our default alphabet. Value 64 (=) is special; it means \"nothing.\"\r\n     */\r\n    get ENCODED_VALS() {\r\n        return this.ENCODED_VALS_BASE + '+/=';\r\n    },\r\n    /**\r\n     * Our websafe alphabet.\r\n     */\r\n    get ENCODED_VALS_WEBSAFE() {\r\n        return this.ENCODED_VALS_BASE + '-_.';\r\n    },\r\n    /**\r\n     * Whether this browser supports the atob and btoa functions. This extension\r\n     * started at Mozilla but is now implemented by many browsers. We use the\r\n     * ASSUME_* variables to avoid pulling in the full useragent detection library\r\n     * but still allowing the standard per-browser compilations.\r\n     *\r\n     */\r\n    HAS_NATIVE_SUPPORT: typeof atob === 'function',\r\n    /**\r\n     * Base64-encode an array of bytes.\r\n     *\r\n     * @param input An array of bytes (numbers with\r\n     *     value in [0, 255]) to encode.\r\n     * @param webSafe Boolean indicating we should use the\r\n     *     alternative alphabet.\r\n     * @return The base64 encoded string.\r\n     */\r\n    encodeByteArray(input, webSafe) {\r\n        if (!Array.isArray(input)) {\r\n            throw Error('encodeByteArray takes an array as a parameter');\r\n        }\r\n        this.init_();\r\n        const byteToCharMap = webSafe\r\n            ? this.byteToCharMapWebSafe_\r\n            : this.byteToCharMap_;\r\n        const output = [];\r\n        for (let i = 0; i < input.length; i += 3) {\r\n            const byte1 = input[i];\r\n            const haveByte2 = i + 1 < input.length;\r\n            const byte2 = haveByte2 ? input[i + 1] : 0;\r\n            const haveByte3 = i + 2 < input.length;\r\n            const byte3 = haveByte3 ? input[i + 2] : 0;\r\n            const outByte1 = byte1 >> 2;\r\n            const outByte2 = ((byte1 & 0x03) << 4) | (byte2 >> 4);\r\n            let outByte3 = ((byte2 & 0x0f) << 2) | (byte3 >> 6);\r\n            let outByte4 = byte3 & 0x3f;\r\n            if (!haveByte3) {\r\n                outByte4 = 64;\r\n                if (!haveByte2) {\r\n                    outByte3 = 64;\r\n                }\r\n            }\r\n            output.push(byteToCharMap[outByte1], byteToCharMap[outByte2], byteToCharMap[outByte3], byteToCharMap[outByte4]);\r\n        }\r\n        return output.join('');\r\n    },\r\n    /**\r\n     * Base64-encode a string.\r\n     *\r\n     * @param input A string to encode.\r\n     * @param webSafe If true, we should use the\r\n     *     alternative alphabet.\r\n     * @return The base64 encoded string.\r\n     */\r\n    encodeString(input, webSafe) {\r\n        // Shortcut for Mozilla browsers that implement\r\n        // a native base64 encoder in the form of \"btoa/atob\"\r\n        if (this.HAS_NATIVE_SUPPORT && !webSafe) {\r\n            return btoa(input);\r\n        }\r\n        return this.encodeByteArray(stringToByteArray$1(input), webSafe);\r\n    },\r\n    /**\r\n     * Base64-decode a string.\r\n     *\r\n     * @param input to decode.\r\n     * @param webSafe True if we should use the\r\n     *     alternative alphabet.\r\n     * @return string representing the decoded value.\r\n     */\r\n    decodeString(input, webSafe) {\r\n        // Shortcut for Mozilla browsers that implement\r\n        // a native base64 encoder in the form of \"btoa/atob\"\r\n        if (this.HAS_NATIVE_SUPPORT && !webSafe) {\r\n            return atob(input);\r\n        }\r\n        return byteArrayToString(this.decodeStringToByteArray(input, webSafe));\r\n    },\r\n    /**\r\n     * Base64-decode a string.\r\n     *\r\n     * In base-64 decoding, groups of four characters are converted into three\r\n     * bytes.  If the encoder did not apply padding, the input length may not\r\n     * be a multiple of 4.\r\n     *\r\n     * In this case, the last group will have fewer than 4 characters, and\r\n     * padding will be inferred.  If the group has one or two characters, it decodes\r\n     * to one byte.  If the group has three characters, it decodes to two bytes.\r\n     *\r\n     * @param input Input to decode.\r\n     * @param webSafe True if we should use the web-safe alphabet.\r\n     * @return bytes representing the decoded value.\r\n     */\r\n    decodeStringToByteArray(input, webSafe) {\r\n        this.init_();\r\n        const charToByteMap = webSafe\r\n            ? this.charToByteMapWebSafe_\r\n            : this.charToByteMap_;\r\n        const output = [];\r\n        for (let i = 0; i < input.length;) {\r\n            const byte1 = charToByteMap[input.charAt(i++)];\r\n            const haveByte2 = i < input.length;\r\n            const byte2 = haveByte2 ? charToByteMap[input.charAt(i)] : 0;\r\n            ++i;\r\n            const haveByte3 = i < input.length;\r\n            const byte3 = haveByte3 ? charToByteMap[input.charAt(i)] : 64;\r\n            ++i;\r\n            const haveByte4 = i < input.length;\r\n            const byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;\r\n            ++i;\r\n            if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {\r\n                throw new DecodeBase64StringError();\r\n            }\r\n            const outByte1 = (byte1 << 2) | (byte2 >> 4);\r\n            output.push(outByte1);\r\n            if (byte3 !== 64) {\r\n                const outByte2 = ((byte2 << 4) & 0xf0) | (byte3 >> 2);\r\n                output.push(outByte2);\r\n                if (byte4 !== 64) {\r\n                    const outByte3 = ((byte3 << 6) & 0xc0) | byte4;\r\n                    output.push(outByte3);\r\n                }\r\n            }\r\n        }\r\n        return output;\r\n    },\r\n    /**\r\n     * Lazy static initialization function. Called before\r\n     * accessing any of the static map variables.\r\n     * @private\r\n     */\r\n    init_() {\r\n        if (!this.byteToCharMap_) {\r\n            this.byteToCharMap_ = {};\r\n            this.charToByteMap_ = {};\r\n            this.byteToCharMapWebSafe_ = {};\r\n            this.charToByteMapWebSafe_ = {};\r\n            // We want quick mappings back and forth, so we precompute two maps.\r\n            for (let i = 0; i < this.ENCODED_VALS.length; i++) {\r\n                this.byteToCharMap_[i] = this.ENCODED_VALS.charAt(i);\r\n                this.charToByteMap_[this.byteToCharMap_[i]] = i;\r\n                this.byteToCharMapWebSafe_[i] = this.ENCODED_VALS_WEBSAFE.charAt(i);\r\n                this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]] = i;\r\n                // Be forgiving when decoding and correctly decode both encodings.\r\n                if (i >= this.ENCODED_VALS_BASE.length) {\r\n                    this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)] = i;\r\n                    this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)] = i;\r\n                }\r\n            }\r\n        }\r\n    }\r\n};\r\n/**\r\n * An error encountered while decoding base64 string.\r\n */\r\nclass DecodeBase64StringError extends Error {\r\n    constructor() {\r\n        super(...arguments);\r\n        this.name = 'DecodeBase64StringError';\r\n    }\r\n}\r\n/**\r\n * URL-safe base64 encoding\r\n */\r\nconst base64Encode = function (str) {\r\n    const utf8Bytes = stringToByteArray$1(str);\r\n    return base64.encodeByteArray(utf8Bytes, true);\r\n};\r\n/**\r\n * URL-safe base64 encoding (without \".\" padding in the end).\r\n * e.g. Used in JSON Web Token (JWT) parts.\r\n */\r\nconst base64urlEncodeWithoutPadding = function (str) {\r\n    // Use base64url encoding and remove padding in the end (dot characters).\r\n    return base64Encode(str).replace(/\\./g, '');\r\n};\r\n/**\r\n * URL-safe base64 decoding\r\n *\r\n * NOTE: DO NOT use the global atob() function - it does NOT support the\r\n * base64Url variant encoding.\r\n *\r\n * @param str To be decoded\r\n * @return Decoded result, if possible\r\n */\r\nconst base64Decode = function (str) {\r\n    try {\r\n        return base64.decodeString(str, true);\r\n    }\r\n    catch (e) {\r\n        console.error('base64Decode failed: ', e);\r\n    }\r\n    return null;\r\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Do a deep-copy of basic JavaScript Objects or Arrays.\r\n */\r\nfunction deepCopy(value) {\r\n    return deepExtend(undefined, value);\r\n}\r\n/**\r\n * Copy properties from source to target (recursively allows extension\r\n * of Objects and Arrays).  Scalar values in the target are over-written.\r\n * If target is undefined, an object of the appropriate type will be created\r\n * (and returned).\r\n *\r\n * We recursively copy all child properties of plain Objects in the source- so\r\n * that namespace- like dictionaries are merged.\r\n *\r\n * Note that the target can be a function, in which case the properties in\r\n * the source Object are copied onto it as static properties of the Function.\r\n *\r\n * Note: we don't merge __proto__ to prevent prototype pollution\r\n */\r\nfunction deepExtend(target, source) {\r\n    if (!(source instanceof Object)) {\r\n        return source;\r\n    }\r\n    switch (source.constructor) {\r\n        case Date:\r\n            // Treat Dates like scalars; if the target date object had any child\r\n            // properties - they will be lost!\r\n            const dateValue = source;\r\n            return new Date(dateValue.getTime());\r\n        case Object:\r\n            if (target === undefined) {\r\n                target = {};\r\n            }\r\n            break;\r\n        case Array:\r\n            // Always copy the array source and overwrite the target.\r\n            target = [];\r\n            break;\r\n        default:\r\n            // Not a plain Object - treat it as a scalar.\r\n            return source;\r\n    }\r\n    for (const prop in source) {\r\n        // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\r\n        if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\r\n            continue;\r\n        }\r\n        target[prop] = deepExtend(target[prop], source[prop]);\r\n    }\r\n    return target;\r\n}\r\nfunction isValidKey(key) {\r\n    return key !== '__proto__';\r\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Polyfill for `globalThis` object.\r\n * @returns the `globalThis` object for the given environment.\r\n * @public\r\n */\r\nfunction getGlobal() {\r\n    if (typeof self !== 'undefined') {\r\n        return self;\r\n    }\r\n    if (typeof window !== 'undefined') {\r\n        return window;\r\n    }\r\n    if (typeof global !== 'undefined') {\r\n        return global;\r\n    }\r\n    throw new Error('Unable to locate global object.');\r\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst getDefaultsFromGlobal = () => getGlobal().__FIREBASE_DEFAULTS__;\r\n/**\r\n * Attempt to read defaults from a JSON string provided to\r\n * process(.)env(.)__FIREBASE_DEFAULTS__ or a JSON file whose path is in\r\n * process(.)env(.)__FIREBASE_DEFAULTS_PATH__\r\n * The dots are in parens because certain compilers (Vite?) cannot\r\n * handle seeing that variable in comments.\r\n * See https://github.com/firebase/firebase-js-sdk/issues/6838\r\n */\r\nconst getDefaultsFromEnvVariable = () => {\r\n    if (typeof process === 'undefined' || typeof process.env === 'undefined') {\r\n        return;\r\n    }\r\n    const defaultsJsonString = process.env.__FIREBASE_DEFAULTS__;\r\n    if (defaultsJsonString) {\r\n        return JSON.parse(defaultsJsonString);\r\n    }\r\n};\r\nconst getDefaultsFromCookie = () => {\r\n    if (typeof document === 'undefined') {\r\n        return;\r\n    }\r\n    let match;\r\n    try {\r\n        match = document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/);\r\n    }\r\n    catch (e) {\r\n        // Some environments such as Angular Universal SSR have a\r\n        // `document` object but error on accessing `document.cookie`.\r\n        return;\r\n    }\r\n    const decoded = match && base64Decode(match[1]);\r\n    return decoded && JSON.parse(decoded);\r\n};\r\n/**\r\n * Get the __FIREBASE_DEFAULTS__ object. It checks in order:\r\n * (1) if such an object exists as a property of `globalThis`\r\n * (2) if such an object was provided on a shell environment variable\r\n * (3) if such an object exists in a cookie\r\n * @public\r\n */\r\nconst getDefaults = () => {\r\n    try {\r\n        return (getDefaultsFromGlobal() ||\r\n            getDefaultsFromEnvVariable() ||\r\n            getDefaultsFromCookie());\r\n    }\r\n    catch (e) {\r\n        /**\r\n         * Catch-all for being unable to get __FIREBASE_DEFAULTS__ due\r\n         * to any environment case we have not accounted for. Log to\r\n         * info instead of swallowing so we can find these unknown cases\r\n         * and add paths for them if needed.\r\n         */\r\n        console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);\r\n        return;\r\n    }\r\n};\r\n/**\r\n * Returns emulator host stored in the __FIREBASE_DEFAULTS__ object\r\n * for the given product.\r\n * @returns a URL host formatted like `127.0.0.1:9999` or `[::1]:4000` if available\r\n * @public\r\n */\r\nconst getDefaultEmulatorHost = (productName) => { var _a, _b; return (_b = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.emulatorHosts) === null || _b === void 0 ? void 0 : _b[productName]; };\r\n/**\r\n * Returns emulator hostname and port stored in the __FIREBASE_DEFAULTS__ object\r\n * for the given product.\r\n * @returns a pair of hostname and port like `[\"::1\", 4000]` if available\r\n * @public\r\n */\r\nconst getDefaultEmulatorHostnameAndPort = (productName) => {\r\n    const host = getDefaultEmulatorHost(productName);\r\n    if (!host) {\r\n        return undefined;\r\n    }\r\n    const separatorIndex = host.lastIndexOf(':'); // Finding the last since IPv6 addr also has colons.\r\n    if (separatorIndex <= 0 || separatorIndex + 1 === host.length) {\r\n        throw new Error(`Invalid host ${host} with no separate hostname and port!`);\r\n    }\r\n    // eslint-disable-next-line no-restricted-globals\r\n    const port = parseInt(host.substring(separatorIndex + 1), 10);\r\n    if (host[0] === '[') {\r\n        // Bracket-quoted `[ipv6addr]:port` => return \"ipv6addr\" (without brackets).\r\n        return [host.substring(1, separatorIndex - 1), port];\r\n    }\r\n    else {\r\n        return [host.substring(0, separatorIndex), port];\r\n    }\r\n};\r\n/**\r\n * Returns Firebase app config stored in the __FIREBASE_DEFAULTS__ object.\r\n * @public\r\n */\r\nconst getDefaultAppConfig = () => { var _a; return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.config; };\r\n/**\r\n * Returns an experimental setting on the __FIREBASE_DEFAULTS__ object (properties\r\n * prefixed by \"_\")\r\n * @public\r\n */\r\nconst getExperimentalSetting = (name) => { var _a; return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a[`_${name}`]; };\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass Deferred {\r\n    constructor() {\r\n        this.reject = () => { };\r\n        this.resolve = () => { };\r\n        this.promise = new Promise((resolve, reject) => {\r\n            this.resolve = resolve;\r\n            this.reject = reject;\r\n        });\r\n    }\r\n    /**\r\n     * Our API internals are not promiseified and cannot because our callback APIs have subtle expectations around\r\n     * invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback\r\n     * and returns a node-style callback which will resolve or reject the Deferred's promise.\r\n     */\r\n    wrapCallback(callback) {\r\n        return (error, value) => {\r\n            if (error) {\r\n                this.reject(error);\r\n            }\r\n            else {\r\n                this.resolve(value);\r\n            }\r\n            if (typeof callback === 'function') {\r\n                // Attaching noop handler just in case developer wasn't expecting\r\n                // promises\r\n                this.promise.catch(() => { });\r\n                // Some of our callbacks don't expect a value and our own tests\r\n                // assert that the parameter length is 1\r\n                if (callback.length === 1) {\r\n                    callback(error);\r\n                }\r\n                else {\r\n                    callback(error, value);\r\n                }\r\n            }\r\n        };\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction createMockUserToken(token, projectId) {\r\n    if (token.uid) {\r\n        throw new Error('The \"uid\" field is no longer supported by mockUserToken. Please use \"sub\" instead for Firebase Auth User ID.');\r\n    }\r\n    // Unsecured JWTs use \"none\" as the algorithm.\r\n    const header = {\r\n        alg: 'none',\r\n        type: 'JWT'\r\n    };\r\n    const project = projectId || 'demo-project';\r\n    const iat = token.iat || 0;\r\n    const sub = token.sub || token.user_id;\r\n    if (!sub) {\r\n        throw new Error(\"mockUserToken must contain 'sub' or 'user_id' field!\");\r\n    }\r\n    const payload = Object.assign({ \r\n        // Set all required fields to decent defaults\r\n        iss: `https://securetoken.google.com/${project}`, aud: project, iat, exp: iat + 3600, auth_time: iat, sub, user_id: sub, firebase: {\r\n            sign_in_provider: 'custom',\r\n            identities: {}\r\n        } }, token);\r\n    // Unsecured JWTs use the empty string as a signature.\r\n    const signature = '';\r\n    return [\r\n        base64urlEncodeWithoutPadding(JSON.stringify(header)),\r\n        base64urlEncodeWithoutPadding(JSON.stringify(payload)),\r\n        signature\r\n    ].join('.');\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Returns navigator.userAgent string or '' if it's not defined.\r\n * @return user agent string\r\n */\r\nfunction getUA() {\r\n    if (typeof navigator !== 'undefined' &&\r\n        typeof navigator['userAgent'] === 'string') {\r\n        return navigator['userAgent'];\r\n    }\r\n    else {\r\n        return '';\r\n    }\r\n}\r\n/**\r\n * Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.\r\n *\r\n * Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap\r\n * in the Ripple emulator) nor Cordova `onDeviceReady`, which would normally\r\n * wait for a callback.\r\n */\r\nfunction isMobileCordova() {\r\n    return (typeof window !== 'undefined' &&\r\n        // @ts-ignore Setting up an broadly applicable index signature for Window\r\n        // just to deal with this case would probably be a bad idea.\r\n        !!(window['cordova'] || window['phonegap'] || window['PhoneGap']) &&\r\n        /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA()));\r\n}\r\n/**\r\n * Detect Node.js.\r\n *\r\n * @return true if Node.js environment is detected or specified.\r\n */\r\n// Node detection logic from: https://github.com/iliakan/detect-node/\r\nfunction isNode() {\r\n    var _a;\r\n    const forceEnvironment = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.forceEnvironment;\r\n    if (forceEnvironment === 'node') {\r\n        return true;\r\n    }\r\n    else if (forceEnvironment === 'browser') {\r\n        return false;\r\n    }\r\n    try {\r\n        return (Object.prototype.toString.call(global.process) === '[object process]');\r\n    }\r\n    catch (e) {\r\n        return false;\r\n    }\r\n}\r\n/**\r\n * Detect Browser Environment\r\n */\r\nfunction isBrowser() {\r\n    return typeof self === 'object' && self.self === self;\r\n}\r\nfunction isBrowserExtension() {\r\n    const runtime = typeof chrome === 'object'\r\n        ? chrome.runtime\r\n        : typeof browser === 'object'\r\n            ? browser.runtime\r\n            : undefined;\r\n    return typeof runtime === 'object' && runtime.id !== undefined;\r\n}\r\n/**\r\n * Detect React Native.\r\n *\r\n * @return true if ReactNative environment is detected.\r\n */\r\nfunction isReactNative() {\r\n    return (typeof navigator === 'object' && navigator['product'] === 'ReactNative');\r\n}\r\n/** Detects Electron apps. */\r\nfunction isElectron() {\r\n    return getUA().indexOf('Electron/') >= 0;\r\n}\r\n/** Detects Internet Explorer. */\r\nfunction isIE() {\r\n    const ua = getUA();\r\n    return ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;\r\n}\r\n/** Detects Universal Windows Platform apps. */\r\nfunction isUWP() {\r\n    return getUA().indexOf('MSAppHost/') >= 0;\r\n}\r\n/**\r\n * Detect whether the current SDK build is the Node version.\r\n *\r\n * @return true if it's the Node SDK build.\r\n */\r\nfunction isNodeSdk() {\r\n    return CONSTANTS.NODE_CLIENT === true || CONSTANTS.NODE_ADMIN === true;\r\n}\r\n/** Returns true if we are running in Safari. */\r\nfunction isSafari() {\r\n    return (!isNode() &&\r\n        navigator.userAgent.includes('Safari') &&\r\n        !navigator.userAgent.includes('Chrome'));\r\n}\r\n/**\r\n * This method checks if indexedDB is supported by current browser/service worker context\r\n * @return true if indexedDB is supported by current browser/service worker context\r\n */\r\nfunction isIndexedDBAvailable() {\r\n    try {\r\n        return typeof indexedDB === 'object';\r\n    }\r\n    catch (e) {\r\n        return false;\r\n    }\r\n}\r\n/**\r\n * This method validates browser/sw context for indexedDB by opening a dummy indexedDB database and reject\r\n * if errors occur during the database open operation.\r\n *\r\n * @throws exception if current browser/sw context can't run idb.open (ex: Safari iframe, Firefox\r\n * private browsing)\r\n */\r\nfunction validateIndexedDBOpenable() {\r\n    return new Promise((resolve, reject) => {\r\n        try {\r\n            let preExist = true;\r\n            const DB_CHECK_NAME = 'validate-browser-context-for-indexeddb-analytics-module';\r\n            const request = self.indexedDB.open(DB_CHECK_NAME);\r\n            request.onsuccess = () => {\r\n                request.result.close();\r\n                // delete database only when it doesn't pre-exist\r\n                if (!preExist) {\r\n                    self.indexedDB.deleteDatabase(DB_CHECK_NAME);\r\n                }\r\n                resolve(true);\r\n            };\r\n            request.onupgradeneeded = () => {\r\n                preExist = false;\r\n            };\r\n            request.onerror = () => {\r\n                var _a;\r\n                reject(((_a = request.error) === null || _a === void 0 ? void 0 : _a.message) || '');\r\n            };\r\n        }\r\n        catch (error) {\r\n            reject(error);\r\n        }\r\n    });\r\n}\r\n/**\r\n *\r\n * This method checks whether cookie is enabled within current browser\r\n * @return true if cookie is enabled within current browser\r\n */\r\nfunction areCookiesEnabled() {\r\n    if (typeof navigator === 'undefined' || !navigator.cookieEnabled) {\r\n        return false;\r\n    }\r\n    return true;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @fileoverview Standardized Firebase Error.\r\n *\r\n * Usage:\r\n *\r\n *   // Typescript string literals for type-safe codes\r\n *   type Err =\r\n *     'unknown' |\r\n *     'object-not-found'\r\n *     ;\r\n *\r\n *   // Closure enum for type-safe error codes\r\n *   // at-enum {string}\r\n *   var Err = {\r\n *     UNKNOWN: 'unknown',\r\n *     OBJECT_NOT_FOUND: 'object-not-found',\r\n *   }\r\n *\r\n *   let errors: Map<Err, string> = {\r\n *     'generic-error': \"Unknown error\",\r\n *     'file-not-found': \"Could not find file: {$file}\",\r\n *   };\r\n *\r\n *   // Type-safe function - must pass a valid error code as param.\r\n *   let error = new ErrorFactory<Err>('service', 'Service', errors);\r\n *\r\n *   ...\r\n *   throw error.create(Err.GENERIC);\r\n *   ...\r\n *   throw error.create(Err.FILE_NOT_FOUND, {'file': fileName});\r\n *   ...\r\n *   // Service: Could not file file: foo.txt (service/file-not-found).\r\n *\r\n *   catch (e) {\r\n *     assert(e.message === \"Could not find file: foo.txt.\");\r\n *     if ((e as FirebaseError)?.code === 'service/file-not-found') {\r\n *       console.log(\"Could not read file: \" + e['file']);\r\n *     }\r\n *   }\r\n */\r\nconst ERROR_NAME = 'FirebaseError';\r\n// Based on code from:\r\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types\r\nclass FirebaseError extends Error {\r\n    constructor(\r\n    /** The error code for this error. */\r\n    code, message, \r\n    /** Custom data for this error. */\r\n    customData) {\r\n        super(message);\r\n        this.code = code;\r\n        this.customData = customData;\r\n        /** The custom name for all FirebaseErrors. */\r\n        this.name = ERROR_NAME;\r\n        // Fix For ES5\r\n        // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\r\n        Object.setPrototypeOf(this, FirebaseError.prototype);\r\n        // Maintains proper stack trace for where our error was thrown.\r\n        // Only available on V8.\r\n        if (Error.captureStackTrace) {\r\n            Error.captureStackTrace(this, ErrorFactory.prototype.create);\r\n        }\r\n    }\r\n}\r\nclass ErrorFactory {\r\n    constructor(service, serviceName, errors) {\r\n        this.service = service;\r\n        this.serviceName = serviceName;\r\n        this.errors = errors;\r\n    }\r\n    create(code, ...data) {\r\n        const customData = data[0] || {};\r\n        const fullCode = `${this.service}/${code}`;\r\n        const template = this.errors[code];\r\n        const message = template ? replaceTemplate(template, customData) : 'Error';\r\n        // Service Name: Error message (service/code).\r\n        const fullMessage = `${this.serviceName}: ${message} (${fullCode}).`;\r\n        const error = new FirebaseError(fullCode, fullMessage, customData);\r\n        return error;\r\n    }\r\n}\r\nfunction replaceTemplate(template, data) {\r\n    return template.replace(PATTERN, (_, key) => {\r\n        const value = data[key];\r\n        return value != null ? String(value) : `<${key}?>`;\r\n    });\r\n}\r\nconst PATTERN = /\\{\\$([^}]+)}/g;\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Evaluates a JSON string into a javascript object.\r\n *\r\n * @param {string} str A string containing JSON.\r\n * @return {*} The javascript object representing the specified JSON.\r\n */\r\nfunction jsonEval(str) {\r\n    return JSON.parse(str);\r\n}\r\n/**\r\n * Returns JSON representing a javascript object.\r\n * @param {*} data Javascript object to be stringified.\r\n * @return {string} The JSON contents of the object.\r\n */\r\nfunction stringify(data) {\r\n    return JSON.stringify(data);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Decodes a Firebase auth. token into constituent parts.\r\n *\r\n * Notes:\r\n * - May return with invalid / incomplete claims if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst decode = function (token) {\r\n    let header = {}, claims = {}, data = {}, signature = '';\r\n    try {\r\n        const parts = token.split('.');\r\n        header = jsonEval(base64Decode(parts[0]) || '');\r\n        claims = jsonEval(base64Decode(parts[1]) || '');\r\n        signature = parts[2];\r\n        data = claims['d'] || {};\r\n        delete claims['d'];\r\n    }\r\n    catch (e) { }\r\n    return {\r\n        header,\r\n        claims,\r\n        data,\r\n        signature\r\n    };\r\n};\r\n/**\r\n * Decodes a Firebase auth. token and checks the validity of its time-based claims. Will return true if the\r\n * token is within the time window authorized by the 'nbf' (not-before) and 'iat' (issued-at) claims.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst isValidTimestamp = function (token) {\r\n    const claims = decode(token).claims;\r\n    const now = Math.floor(new Date().getTime() / 1000);\r\n    let validSince = 0, validUntil = 0;\r\n    if (typeof claims === 'object') {\r\n        if (claims.hasOwnProperty('nbf')) {\r\n            validSince = claims['nbf'];\r\n        }\r\n        else if (claims.hasOwnProperty('iat')) {\r\n            validSince = claims['iat'];\r\n        }\r\n        if (claims.hasOwnProperty('exp')) {\r\n            validUntil = claims['exp'];\r\n        }\r\n        else {\r\n            // token will expire after 24h by default\r\n            validUntil = validSince + 86400;\r\n        }\r\n    }\r\n    return (!!now &&\r\n        !!validSince &&\r\n        !!validUntil &&\r\n        now >= validSince &&\r\n        now <= validUntil);\r\n};\r\n/**\r\n * Decodes a Firebase auth. token and returns its issued at time if valid, null otherwise.\r\n *\r\n * Notes:\r\n * - May return null if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst issuedAtTime = function (token) {\r\n    const claims = decode(token).claims;\r\n    if (typeof claims === 'object' && claims.hasOwnProperty('iat')) {\r\n        return claims['iat'];\r\n    }\r\n    return null;\r\n};\r\n/**\r\n * Decodes a Firebase auth. token and checks the validity of its format. Expects a valid issued-at time.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst isValidFormat = function (token) {\r\n    const decoded = decode(token), claims = decoded.claims;\r\n    return !!claims && typeof claims === 'object' && claims.hasOwnProperty('iat');\r\n};\r\n/**\r\n * Attempts to peer into an auth token and determine if it's an admin auth token by looking at the claims portion.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst isAdmin = function (token) {\r\n    const claims = decode(token).claims;\r\n    return typeof claims === 'object' && claims['admin'] === true;\r\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction contains(obj, key) {\r\n    return Object.prototype.hasOwnProperty.call(obj, key);\r\n}\r\nfunction safeGet(obj, key) {\r\n    if (Object.prototype.hasOwnProperty.call(obj, key)) {\r\n        return obj[key];\r\n    }\r\n    else {\r\n        return undefined;\r\n    }\r\n}\r\nfunction isEmpty(obj) {\r\n    for (const key in obj) {\r\n        if (Object.prototype.hasOwnProperty.call(obj, key)) {\r\n            return false;\r\n        }\r\n    }\r\n    return true;\r\n}\r\nfunction map(obj, fn, contextObj) {\r\n    const res = {};\r\n    for (const key in obj) {\r\n        if (Object.prototype.hasOwnProperty.call(obj, key)) {\r\n            res[key] = fn.call(contextObj, obj[key], key, obj);\r\n        }\r\n    }\r\n    return res;\r\n}\r\n/**\r\n * Deep equal two objects. Support Arrays and Objects.\r\n */\r\nfunction deepEqual(a, b) {\r\n    if (a === b) {\r\n        return true;\r\n    }\r\n    const aKeys = Object.keys(a);\r\n    const bKeys = Object.keys(b);\r\n    for (const k of aKeys) {\r\n        if (!bKeys.includes(k)) {\r\n            return false;\r\n        }\r\n        const aProp = a[k];\r\n        const bProp = b[k];\r\n        if (isObject(aProp) && isObject(bProp)) {\r\n            if (!deepEqual(aProp, bProp)) {\r\n                return false;\r\n            }\r\n        }\r\n        else if (aProp !== bProp) {\r\n            return false;\r\n        }\r\n    }\r\n    for (const k of bKeys) {\r\n        if (!aKeys.includes(k)) {\r\n            return false;\r\n        }\r\n    }\r\n    return true;\r\n}\r\nfunction isObject(thing) {\r\n    return thing !== null && typeof thing === 'object';\r\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Rejects if the given promise doesn't resolve in timeInMS milliseconds.\r\n * @internal\r\n */\r\nfunction promiseWithTimeout(promise, timeInMS = 2000) {\r\n    const deferredPromise = new Deferred();\r\n    setTimeout(() => deferredPromise.reject('timeout!'), timeInMS);\r\n    promise.then(deferredPromise.resolve, deferredPromise.reject);\r\n    return deferredPromise.promise;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Returns a querystring-formatted string (e.g. &arg=val&arg2=val2) from a\r\n * params object (e.g. {arg: 'val', arg2: 'val2'})\r\n * Note: You must prepend it with ? when adding it to a URL.\r\n */\r\nfunction querystring(querystringParams) {\r\n    const params = [];\r\n    for (const [key, value] of Object.entries(querystringParams)) {\r\n        if (Array.isArray(value)) {\r\n            value.forEach(arrayVal => {\r\n                params.push(encodeURIComponent(key) + '=' + encodeURIComponent(arrayVal));\r\n            });\r\n        }\r\n        else {\r\n            params.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\r\n        }\r\n    }\r\n    return params.length ? '&' + params.join('&') : '';\r\n}\r\n/**\r\n * Decodes a querystring (e.g. ?arg=val&arg2=val2) into a params object\r\n * (e.g. {arg: 'val', arg2: 'val2'})\r\n */\r\nfunction querystringDecode(querystring) {\r\n    const obj = {};\r\n    const tokens = querystring.replace(/^\\?/, '').split('&');\r\n    tokens.forEach(token => {\r\n        if (token) {\r\n            const [key, value] = token.split('=');\r\n            obj[decodeURIComponent(key)] = decodeURIComponent(value);\r\n        }\r\n    });\r\n    return obj;\r\n}\r\n/**\r\n * Extract the query string part of a URL, including the leading question mark (if present).\r\n */\r\nfunction extractQuerystring(url) {\r\n    const queryStart = url.indexOf('?');\r\n    if (!queryStart) {\r\n        return '';\r\n    }\r\n    const fragmentStart = url.indexOf('#', queryStart);\r\n    return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @fileoverview SHA-1 cryptographic hash.\r\n * Variable names follow the notation in FIPS PUB 180-3:\r\n * http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf.\r\n *\r\n * Usage:\r\n *   var sha1 = new sha1();\r\n *   sha1.update(bytes);\r\n *   var hash = sha1.digest();\r\n *\r\n * Performance:\r\n *   Chrome 23:   ~400 Mbit/s\r\n *   Firefox 16:  ~250 Mbit/s\r\n *\r\n */\r\n/**\r\n * SHA-1 cryptographic hash constructor.\r\n *\r\n * The properties declared here are discussed in the above algorithm document.\r\n * @constructor\r\n * @final\r\n * @struct\r\n */\r\nclass Sha1 {\r\n    constructor() {\r\n        /**\r\n         * Holds the previous values of accumulated variables a-e in the compress_\r\n         * function.\r\n         * @private\r\n         */\r\n        this.chain_ = [];\r\n        /**\r\n         * A buffer holding the partially computed hash result.\r\n         * @private\r\n         */\r\n        this.buf_ = [];\r\n        /**\r\n         * An array of 80 bytes, each a part of the message to be hashed.  Referred to\r\n         * as the message schedule in the docs.\r\n         * @private\r\n         */\r\n        this.W_ = [];\r\n        /**\r\n         * Contains data needed to pad messages less than 64 bytes.\r\n         * @private\r\n         */\r\n        this.pad_ = [];\r\n        /**\r\n         * @private {number}\r\n         */\r\n        this.inbuf_ = 0;\r\n        /**\r\n         * @private {number}\r\n         */\r\n        this.total_ = 0;\r\n        this.blockSize = 512 / 8;\r\n        this.pad_[0] = 128;\r\n        for (let i = 1; i < this.blockSize; ++i) {\r\n            this.pad_[i] = 0;\r\n        }\r\n        this.reset();\r\n    }\r\n    reset() {\r\n        this.chain_[0] = 0x67452301;\r\n        this.chain_[1] = 0xefcdab89;\r\n        this.chain_[2] = 0x98badcfe;\r\n        this.chain_[3] = 0x10325476;\r\n        this.chain_[4] = 0xc3d2e1f0;\r\n        this.inbuf_ = 0;\r\n        this.total_ = 0;\r\n    }\r\n    /**\r\n     * Internal compress helper function.\r\n     * @param buf Block to compress.\r\n     * @param offset Offset of the block in the buffer.\r\n     * @private\r\n     */\r\n    compress_(buf, offset) {\r\n        if (!offset) {\r\n            offset = 0;\r\n        }\r\n        const W = this.W_;\r\n        // get 16 big endian words\r\n        if (typeof buf === 'string') {\r\n            for (let i = 0; i < 16; i++) {\r\n                // TODO(user): [bug 8140122] Recent versions of Safari for Mac OS and iOS\r\n                // have a bug that turns the post-increment ++ operator into pre-increment\r\n                // during JIT compilation.  We have code that depends heavily on SHA-1 for\r\n                // correctness and which is affected by this bug, so I've removed all uses\r\n                // of post-increment ++ in which the result value is used.  We can revert\r\n                // this change once the Safari bug\r\n                // (https://bugs.webkit.org/show_bug.cgi?id=109036) has been fixed and\r\n                // most clients have been updated.\r\n                W[i] =\r\n                    (buf.charCodeAt(offset) << 24) |\r\n                        (buf.charCodeAt(offset + 1) << 16) |\r\n                        (buf.charCodeAt(offset + 2) << 8) |\r\n                        buf.charCodeAt(offset + 3);\r\n                offset += 4;\r\n            }\r\n        }\r\n        else {\r\n            for (let i = 0; i < 16; i++) {\r\n                W[i] =\r\n                    (buf[offset] << 24) |\r\n                        (buf[offset + 1] << 16) |\r\n                        (buf[offset + 2] << 8) |\r\n                        buf[offset + 3];\r\n                offset += 4;\r\n            }\r\n        }\r\n        // expand to 80 words\r\n        for (let i = 16; i < 80; i++) {\r\n            const t = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\r\n            W[i] = ((t << 1) | (t >>> 31)) & 0xffffffff;\r\n        }\r\n        let a = this.chain_[0];\r\n        let b = this.chain_[1];\r\n        let c = this.chain_[2];\r\n        let d = this.chain_[3];\r\n        let e = this.chain_[4];\r\n        let f, k;\r\n        // TODO(user): Try to unroll this loop to speed up the computation.\r\n        for (let i = 0; i < 80; i++) {\r\n            if (i < 40) {\r\n                if (i < 20) {\r\n                    f = d ^ (b & (c ^ d));\r\n                    k = 0x5a827999;\r\n                }\r\n                else {\r\n                    f = b ^ c ^ d;\r\n                    k = 0x6ed9eba1;\r\n                }\r\n            }\r\n            else {\r\n                if (i < 60) {\r\n                    f = (b & c) | (d & (b | c));\r\n                    k = 0x8f1bbcdc;\r\n                }\r\n                else {\r\n                    f = b ^ c ^ d;\r\n                    k = 0xca62c1d6;\r\n                }\r\n            }\r\n            const t = (((a << 5) | (a >>> 27)) + f + e + k + W[i]) & 0xffffffff;\r\n            e = d;\r\n            d = c;\r\n            c = ((b << 30) | (b >>> 2)) & 0xffffffff;\r\n            b = a;\r\n            a = t;\r\n        }\r\n        this.chain_[0] = (this.chain_[0] + a) & 0xffffffff;\r\n        this.chain_[1] = (this.chain_[1] + b) & 0xffffffff;\r\n        this.chain_[2] = (this.chain_[2] + c) & 0xffffffff;\r\n        this.chain_[3] = (this.chain_[3] + d) & 0xffffffff;\r\n        this.chain_[4] = (this.chain_[4] + e) & 0xffffffff;\r\n    }\r\n    update(bytes, length) {\r\n        // TODO(johnlenz): tighten the function signature and remove this check\r\n        if (bytes == null) {\r\n            return;\r\n        }\r\n        if (length === undefined) {\r\n            length = bytes.length;\r\n        }\r\n        const lengthMinusBlock = length - this.blockSize;\r\n        let n = 0;\r\n        // Using local instead of member variables gives ~5% speedup on Firefox 16.\r\n        const buf = this.buf_;\r\n        let inbuf = this.inbuf_;\r\n        // The outer while loop should execute at most twice.\r\n        while (n < length) {\r\n            // When we have no data in the block to top up, we can directly process the\r\n            // input buffer (assuming it contains sufficient data). This gives ~25%\r\n            // speedup on Chrome 23 and ~15% speedup on Firefox 16, but requires that\r\n            // the data is provided in large chunks (or in multiples of 64 bytes).\r\n            if (inbuf === 0) {\r\n                while (n <= lengthMinusBlock) {\r\n                    this.compress_(bytes, n);\r\n                    n += this.blockSize;\r\n                }\r\n            }\r\n            if (typeof bytes === 'string') {\r\n                while (n < length) {\r\n                    buf[inbuf] = bytes.charCodeAt(n);\r\n                    ++inbuf;\r\n                    ++n;\r\n                    if (inbuf === this.blockSize) {\r\n                        this.compress_(buf);\r\n                        inbuf = 0;\r\n                        // Jump to the outer loop so we use the full-block optimization.\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n            else {\r\n                while (n < length) {\r\n                    buf[inbuf] = bytes[n];\r\n                    ++inbuf;\r\n                    ++n;\r\n                    if (inbuf === this.blockSize) {\r\n                        this.compress_(buf);\r\n                        inbuf = 0;\r\n                        // Jump to the outer loop so we use the full-block optimization.\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        this.inbuf_ = inbuf;\r\n        this.total_ += length;\r\n    }\r\n    /** @override */\r\n    digest() {\r\n        const digest = [];\r\n        let totalBits = this.total_ * 8;\r\n        // Add pad 0x80 0x00*.\r\n        if (this.inbuf_ < 56) {\r\n            this.update(this.pad_, 56 - this.inbuf_);\r\n        }\r\n        else {\r\n            this.update(this.pad_, this.blockSize - (this.inbuf_ - 56));\r\n        }\r\n        // Add # bits.\r\n        for (let i = this.blockSize - 1; i >= 56; i--) {\r\n            this.buf_[i] = totalBits & 255;\r\n            totalBits /= 256; // Don't use bit-shifting here!\r\n        }\r\n        this.compress_(this.buf_);\r\n        let n = 0;\r\n        for (let i = 0; i < 5; i++) {\r\n            for (let j = 24; j >= 0; j -= 8) {\r\n                digest[n] = (this.chain_[i] >> j) & 255;\r\n                ++n;\r\n            }\r\n        }\r\n        return digest;\r\n    }\r\n}\n\n/**\r\n * Helper to make a Subscribe function (just like Promise helps make a\r\n * Thenable).\r\n *\r\n * @param executor Function which can make calls to a single Observer\r\n *     as a proxy.\r\n * @param onNoObservers Callback when count of Observers goes to zero.\r\n */\r\nfunction createSubscribe(executor, onNoObservers) {\r\n    const proxy = new ObserverProxy(executor, onNoObservers);\r\n    return proxy.subscribe.bind(proxy);\r\n}\r\n/**\r\n * Implement fan-out for any number of Observers attached via a subscribe\r\n * function.\r\n */\r\nclass ObserverProxy {\r\n    /**\r\n     * @param executor Function which can make calls to a single Observer\r\n     *     as a proxy.\r\n     * @param onNoObservers Callback when count of Observers goes to zero.\r\n     */\r\n    constructor(executor, onNoObservers) {\r\n        this.observers = [];\r\n        this.unsubscribes = [];\r\n        this.observerCount = 0;\r\n        // Micro-task scheduling by calling task.then().\r\n        this.task = Promise.resolve();\r\n        this.finalized = false;\r\n        this.onNoObservers = onNoObservers;\r\n        // Call the executor asynchronously so subscribers that are called\r\n        // synchronously after the creation of the subscribe function\r\n        // can still receive the very first value generated in the executor.\r\n        this.task\r\n            .then(() => {\r\n            executor(this);\r\n        })\r\n            .catch(e => {\r\n            this.error(e);\r\n        });\r\n    }\r\n    next(value) {\r\n        this.forEachObserver((observer) => {\r\n            observer.next(value);\r\n        });\r\n    }\r\n    error(error) {\r\n        this.forEachObserver((observer) => {\r\n            observer.error(error);\r\n        });\r\n        this.close(error);\r\n    }\r\n    complete() {\r\n        this.forEachObserver((observer) => {\r\n            observer.complete();\r\n        });\r\n        this.close();\r\n    }\r\n    /**\r\n     * Subscribe function that can be used to add an Observer to the fan-out list.\r\n     *\r\n     * - We require that no event is sent to a subscriber sychronously to their\r\n     *   call to subscribe().\r\n     */\r\n    subscribe(nextOrObserver, error, complete) {\r\n        let observer;\r\n        if (nextOrObserver === undefined &&\r\n            error === undefined &&\r\n            complete === undefined) {\r\n            throw new Error('Missing Observer.');\r\n        }\r\n        // Assemble an Observer object when passed as callback functions.\r\n        if (implementsAnyMethods(nextOrObserver, [\r\n            'next',\r\n            'error',\r\n            'complete'\r\n        ])) {\r\n            observer = nextOrObserver;\r\n        }\r\n        else {\r\n            observer = {\r\n                next: nextOrObserver,\r\n                error,\r\n                complete\r\n            };\r\n        }\r\n        if (observer.next === undefined) {\r\n            observer.next = noop;\r\n        }\r\n        if (observer.error === undefined) {\r\n            observer.error = noop;\r\n        }\r\n        if (observer.complete === undefined) {\r\n            observer.complete = noop;\r\n        }\r\n        const unsub = this.unsubscribeOne.bind(this, this.observers.length);\r\n        // Attempt to subscribe to a terminated Observable - we\r\n        // just respond to the Observer with the final error or complete\r\n        // event.\r\n        if (this.finalized) {\r\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n            this.task.then(() => {\r\n                try {\r\n                    if (this.finalError) {\r\n                        observer.error(this.finalError);\r\n                    }\r\n                    else {\r\n                        observer.complete();\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    // nothing\r\n                }\r\n                return;\r\n            });\r\n        }\r\n        this.observers.push(observer);\r\n        return unsub;\r\n    }\r\n    // Unsubscribe is synchronous - we guarantee that no events are sent to\r\n    // any unsubscribed Observer.\r\n    unsubscribeOne(i) {\r\n        if (this.observers === undefined || this.observers[i] === undefined) {\r\n            return;\r\n        }\r\n        delete this.observers[i];\r\n        this.observerCount -= 1;\r\n        if (this.observerCount === 0 && this.onNoObservers !== undefined) {\r\n            this.onNoObservers(this);\r\n        }\r\n    }\r\n    forEachObserver(fn) {\r\n        if (this.finalized) {\r\n            // Already closed by previous event....just eat the additional values.\r\n            return;\r\n        }\r\n        // Since sendOne calls asynchronously - there is no chance that\r\n        // this.observers will become undefined.\r\n        for (let i = 0; i < this.observers.length; i++) {\r\n            this.sendOne(i, fn);\r\n        }\r\n    }\r\n    // Call the Observer via one of it's callback function. We are careful to\r\n    // confirm that the observe has not been unsubscribed since this asynchronous\r\n    // function had been queued.\r\n    sendOne(i, fn) {\r\n        // Execute the callback asynchronously\r\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n        this.task.then(() => {\r\n            if (this.observers !== undefined && this.observers[i] !== undefined) {\r\n                try {\r\n                    fn(this.observers[i]);\r\n                }\r\n                catch (e) {\r\n                    // Ignore exceptions raised in Observers or missing methods of an\r\n                    // Observer.\r\n                    // Log error to console. b/31404806\r\n                    if (typeof console !== 'undefined' && console.error) {\r\n                        console.error(e);\r\n                    }\r\n                }\r\n            }\r\n        });\r\n    }\r\n    close(err) {\r\n        if (this.finalized) {\r\n            return;\r\n        }\r\n        this.finalized = true;\r\n        if (err !== undefined) {\r\n            this.finalError = err;\r\n        }\r\n        // Proxy is no longer needed - garbage collect references\r\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n        this.task.then(() => {\r\n            this.observers = undefined;\r\n            this.onNoObservers = undefined;\r\n        });\r\n    }\r\n}\r\n/** Turn synchronous function into one called asynchronously. */\r\n// eslint-disable-next-line @typescript-eslint/ban-types\r\nfunction async(fn, onError) {\r\n    return (...args) => {\r\n        Promise.resolve(true)\r\n            .then(() => {\r\n            fn(...args);\r\n        })\r\n            .catch((error) => {\r\n            if (onError) {\r\n                onError(error);\r\n            }\r\n        });\r\n    };\r\n}\r\n/**\r\n * Return true if the object passed in implements any of the named methods.\r\n */\r\nfunction implementsAnyMethods(obj, methods) {\r\n    if (typeof obj !== 'object' || obj === null) {\r\n        return false;\r\n    }\r\n    for (const method of methods) {\r\n        if (method in obj && typeof obj[method] === 'function') {\r\n            return true;\r\n        }\r\n    }\r\n    return false;\r\n}\r\nfunction noop() {\r\n    // do nothing\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Check to make sure the appropriate number of arguments are provided for a public function.\r\n * Throws an error if it fails.\r\n *\r\n * @param fnName The function name\r\n * @param minCount The minimum number of arguments to allow for the function call\r\n * @param maxCount The maximum number of argument to allow for the function call\r\n * @param argCount The actual number of arguments provided.\r\n */\r\nconst validateArgCount = function (fnName, minCount, maxCount, argCount) {\r\n    let argError;\r\n    if (argCount < minCount) {\r\n        argError = 'at least ' + minCount;\r\n    }\r\n    else if (argCount > maxCount) {\r\n        argError = maxCount === 0 ? 'none' : 'no more than ' + maxCount;\r\n    }\r\n    if (argError) {\r\n        const error = fnName +\r\n            ' failed: Was called with ' +\r\n            argCount +\r\n            (argCount === 1 ? ' argument.' : ' arguments.') +\r\n            ' Expects ' +\r\n            argError +\r\n            '.';\r\n        throw new Error(error);\r\n    }\r\n};\r\n/**\r\n * Generates a string to prefix an error message about failed argument validation\r\n *\r\n * @param fnName The function name\r\n * @param argName The name of the argument\r\n * @return The prefix to add to the error thrown for validation.\r\n */\r\nfunction errorPrefix(fnName, argName) {\r\n    return `${fnName} failed: ${argName} argument `;\r\n}\r\n/**\r\n * @param fnName\r\n * @param argumentNumber\r\n * @param namespace\r\n * @param optional\r\n */\r\nfunction validateNamespace(fnName, namespace, optional) {\r\n    if (optional && !namespace) {\r\n        return;\r\n    }\r\n    if (typeof namespace !== 'string') {\r\n        //TODO: I should do more validation here. We only allow certain chars in namespaces.\r\n        throw new Error(errorPrefix(fnName, 'namespace') + 'must be a valid firebase namespace.');\r\n    }\r\n}\r\nfunction validateCallback(fnName, argumentName, \r\n// eslint-disable-next-line @typescript-eslint/ban-types\r\ncallback, optional) {\r\n    if (optional && !callback) {\r\n        return;\r\n    }\r\n    if (typeof callback !== 'function') {\r\n        throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid function.');\r\n    }\r\n}\r\nfunction validateContextObject(fnName, argumentName, context, optional) {\r\n    if (optional && !context) {\r\n        return;\r\n    }\r\n    if (typeof context !== 'object' || context === null) {\r\n        throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid context object.');\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n// Code originally came from goog.crypt.stringToUtf8ByteArray, but for some reason they\r\n// automatically replaced '\\r\\n' with '\\n', and they didn't handle surrogate pairs,\r\n// so it's been modified.\r\n// Note that not all Unicode characters appear as single characters in JavaScript strings.\r\n// fromCharCode returns the UTF-16 encoding of a character - so some Unicode characters\r\n// use 2 characters in Javascript.  All 4-byte UTF-8 characters begin with a first\r\n// character in the range 0xD800 - 0xDBFF (the first character of a so-called surrogate\r\n// pair).\r\n// See http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3\r\n/**\r\n * @param {string} str\r\n * @return {Array}\r\n */\r\nconst stringToByteArray = function (str) {\r\n    const out = [];\r\n    let p = 0;\r\n    for (let i = 0; i < str.length; i++) {\r\n        let c = str.charCodeAt(i);\r\n        // Is this the lead surrogate in a surrogate pair?\r\n        if (c >= 0xd800 && c <= 0xdbff) {\r\n            const high = c - 0xd800; // the high 10 bits.\r\n            i++;\r\n            assert(i < str.length, 'Surrogate pair missing trail surrogate.');\r\n            const low = str.charCodeAt(i) - 0xdc00; // the low 10 bits.\r\n            c = 0x10000 + (high << 10) + low;\r\n        }\r\n        if (c < 128) {\r\n            out[p++] = c;\r\n        }\r\n        else if (c < 2048) {\r\n            out[p++] = (c >> 6) | 192;\r\n            out[p++] = (c & 63) | 128;\r\n        }\r\n        else if (c < 65536) {\r\n            out[p++] = (c >> 12) | 224;\r\n            out[p++] = ((c >> 6) & 63) | 128;\r\n            out[p++] = (c & 63) | 128;\r\n        }\r\n        else {\r\n            out[p++] = (c >> 18) | 240;\r\n            out[p++] = ((c >> 12) & 63) | 128;\r\n            out[p++] = ((c >> 6) & 63) | 128;\r\n            out[p++] = (c & 63) | 128;\r\n        }\r\n    }\r\n    return out;\r\n};\r\n/**\r\n * Calculate length without actually converting; useful for doing cheaper validation.\r\n * @param {string} str\r\n * @return {number}\r\n */\r\nconst stringLength = function (str) {\r\n    let p = 0;\r\n    for (let i = 0; i < str.length; i++) {\r\n        const c = str.charCodeAt(i);\r\n        if (c < 128) {\r\n            p++;\r\n        }\r\n        else if (c < 2048) {\r\n            p += 2;\r\n        }\r\n        else if (c >= 0xd800 && c <= 0xdbff) {\r\n            // Lead surrogate of a surrogate pair.  The pair together will take 4 bytes to represent.\r\n            p += 4;\r\n            i++; // skip trail surrogate.\r\n        }\r\n        else {\r\n            p += 3;\r\n        }\r\n    }\r\n    return p;\r\n};\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Copied from https://stackoverflow.com/a/2117523\r\n * Generates a new uuid.\r\n * @public\r\n */\r\nconst uuidv4 = function () {\r\n    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {\r\n        const r = (Math.random() * 16) | 0, v = c === 'x' ? r : (r & 0x3) | 0x8;\r\n        return v.toString(16);\r\n    });\r\n};\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * The amount of milliseconds to exponentially increase.\r\n */\r\nconst DEFAULT_INTERVAL_MILLIS = 1000;\r\n/**\r\n * The factor to backoff by.\r\n * Should be a number greater than 1.\r\n */\r\nconst DEFAULT_BACKOFF_FACTOR = 2;\r\n/**\r\n * The maximum milliseconds to increase to.\r\n *\r\n * <p>Visible for testing\r\n */\r\nconst MAX_VALUE_MILLIS = 4 * 60 * 60 * 1000; // Four hours, like iOS and Android.\r\n/**\r\n * The percentage of backoff time to randomize by.\r\n * See\r\n * http://go/safe-client-behavior#step-1-determine-the-appropriate-retry-interval-to-handle-spike-traffic\r\n * for context.\r\n *\r\n * <p>Visible for testing\r\n */\r\nconst RANDOM_FACTOR = 0.5;\r\n/**\r\n * Based on the backoff method from\r\n * https://github.com/google/closure-library/blob/master/closure/goog/math/exponentialbackoff.js.\r\n * Extracted here so we don't need to pass metadata and a stateful ExponentialBackoff object around.\r\n */\r\nfunction calculateBackoffMillis(backoffCount, intervalMillis = DEFAULT_INTERVAL_MILLIS, backoffFactor = DEFAULT_BACKOFF_FACTOR) {\r\n    // Calculates an exponentially increasing value.\r\n    // Deviation: calculates value from count and a constant interval, so we only need to save value\r\n    // and count to restore state.\r\n    const currBaseValue = intervalMillis * Math.pow(backoffFactor, backoffCount);\r\n    // A random \"fuzz\" to avoid waves of retries.\r\n    // Deviation: randomFactor is required.\r\n    const randomWait = Math.round(\r\n    // A fraction of the backoff value to add/subtract.\r\n    // Deviation: changes multiplication order to improve readability.\r\n    RANDOM_FACTOR *\r\n        currBaseValue *\r\n        // A random float (rounded to int by Math.round above) in the range [-1, 1]. Determines\r\n        // if we add or subtract.\r\n        (Math.random() - 0.5) *\r\n        2);\r\n    // Limits backoff to max to avoid effectively permanent backoff.\r\n    return Math.min(MAX_VALUE_MILLIS, currBaseValue + randomWait);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Provide English ordinal letters after a number\r\n */\r\nfunction ordinal(i) {\r\n    if (!Number.isFinite(i)) {\r\n        return `${i}`;\r\n    }\r\n    return i + indicator(i);\r\n}\r\nfunction indicator(i) {\r\n    i = Math.abs(i);\r\n    const cent = i % 100;\r\n    if (cent >= 10 && cent <= 20) {\r\n        return 'th';\r\n    }\r\n    const dec = i % 10;\r\n    if (dec === 1) {\r\n        return 'st';\r\n    }\r\n    if (dec === 2) {\r\n        return 'nd';\r\n    }\r\n    if (dec === 3) {\r\n        return 'rd';\r\n    }\r\n    return 'th';\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction getModularInstance(service) {\r\n    if (service && service._delegate) {\r\n        return service._delegate;\r\n    }\r\n    else {\r\n        return service;\r\n    }\r\n}\n\nexport { CONSTANTS, DecodeBase64StringError, Deferred, ErrorFactory, FirebaseError, MAX_VALUE_MILLIS, RANDOM_FACTOR, Sha1, areCookiesEnabled, assert, assertionError, async, base64, base64Decode, base64Encode, base64urlEncodeWithoutPadding, calculateBackoffMillis, contains, createMockUserToken, createSubscribe, decode, deepCopy, deepEqual, deepExtend, errorPrefix, extractQuerystring, getDefaultAppConfig, getDefaultEmulatorHost, getDefaultEmulatorHostnameAndPort, getDefaults, getExperimentalSetting, getGlobal, getModularInstance, getUA, isAdmin, isBrowser, isBrowserExtension, isElectron, isEmpty, isIE, isIndexedDBAvailable, isMobileCordova, isNode, isNodeSdk, isReactNative, isSafari, isUWP, isValidFormat, isValidTimestamp, issuedAtTime, jsonEval, map, ordinal, promiseWithTimeout, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, uuidv4, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };\n//# sourceMappingURL=index.esm2017.js.map\n","import { Deferred } from '@firebase/util';\n\n/**\r\n * Component for service name T, e.g. `auth`, `auth-internal`\r\n */\r\nclass Component {\r\n    /**\r\n     *\r\n     * @param name The public service name, e.g. app, auth, firestore, database\r\n     * @param instanceFactory Service factory responsible for creating the public interface\r\n     * @param type whether the service provided by the component is public or private\r\n     */\r\n    constructor(name, instanceFactory, type) {\r\n        this.name = name;\r\n        this.instanceFactory = instanceFactory;\r\n        this.type = type;\r\n        this.multipleInstances = false;\r\n        /**\r\n         * Properties to be added to the service namespace\r\n         */\r\n        this.serviceProps = {};\r\n        this.instantiationMode = \"LAZY\" /* InstantiationMode.LAZY */;\r\n        this.onInstanceCreated = null;\r\n    }\r\n    setInstantiationMode(mode) {\r\n        this.instantiationMode = mode;\r\n        return this;\r\n    }\r\n    setMultipleInstances(multipleInstances) {\r\n        this.multipleInstances = multipleInstances;\r\n        return this;\r\n    }\r\n    setServiceProps(props) {\r\n        this.serviceProps = props;\r\n        return this;\r\n    }\r\n    setInstanceCreatedCallback(callback) {\r\n        this.onInstanceCreated = callback;\r\n        return this;\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst DEFAULT_ENTRY_NAME = '[DEFAULT]';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Provider for instance for service name T, e.g. 'auth', 'auth-internal'\r\n * NameServiceMapping[T] is an alias for the type of the instance\r\n */\r\nclass Provider {\r\n    constructor(name, container) {\r\n        this.name = name;\r\n        this.container = container;\r\n        this.component = null;\r\n        this.instances = new Map();\r\n        this.instancesDeferred = new Map();\r\n        this.instancesOptions = new Map();\r\n        this.onInitCallbacks = new Map();\r\n    }\r\n    /**\r\n     * @param identifier A provider can provide mulitple instances of a service\r\n     * if this.component.multipleInstances is true.\r\n     */\r\n    get(identifier) {\r\n        // if multipleInstances is not supported, use the default name\r\n        const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\r\n        if (!this.instancesDeferred.has(normalizedIdentifier)) {\r\n            const deferred = new Deferred();\r\n            this.instancesDeferred.set(normalizedIdentifier, deferred);\r\n            if (this.isInitialized(normalizedIdentifier) ||\r\n                this.shouldAutoInitialize()) {\r\n                // initialize the service if it can be auto-initialized\r\n                try {\r\n                    const instance = this.getOrInitializeService({\r\n                        instanceIdentifier: normalizedIdentifier\r\n                    });\r\n                    if (instance) {\r\n                        deferred.resolve(instance);\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    // when the instance factory throws an exception during get(), it should not cause\r\n                    // a fatal error. We just return the unresolved promise in this case.\r\n                }\r\n            }\r\n        }\r\n        return this.instancesDeferred.get(normalizedIdentifier).promise;\r\n    }\r\n    getImmediate(options) {\r\n        var _a;\r\n        // if multipleInstances is not supported, use the default name\r\n        const normalizedIdentifier = this.normalizeInstanceIdentifier(options === null || options === void 0 ? void 0 : options.identifier);\r\n        const optional = (_a = options === null || options === void 0 ? void 0 : options.optional) !== null && _a !== void 0 ? _a : false;\r\n        if (this.isInitialized(normalizedIdentifier) ||\r\n            this.shouldAutoInitialize()) {\r\n            try {\r\n                return this.getOrInitializeService({\r\n                    instanceIdentifier: normalizedIdentifier\r\n                });\r\n            }\r\n            catch (e) {\r\n                if (optional) {\r\n                    return null;\r\n                }\r\n                else {\r\n                    throw e;\r\n                }\r\n            }\r\n        }\r\n        else {\r\n            // In case a component is not initialized and should/can not be auto-initialized at the moment, return null if the optional flag is set, or throw\r\n            if (optional) {\r\n                return null;\r\n            }\r\n            else {\r\n                throw Error(`Service ${this.name} is not available`);\r\n            }\r\n        }\r\n    }\r\n    getComponent() {\r\n        return this.component;\r\n    }\r\n    setComponent(component) {\r\n        if (component.name !== this.name) {\r\n            throw Error(`Mismatching Component ${component.name} for Provider ${this.name}.`);\r\n        }\r\n        if (this.component) {\r\n            throw Error(`Component for ${this.name} has already been provided`);\r\n        }\r\n        this.component = component;\r\n        // return early without attempting to initialize the component if the component requires explicit initialization (calling `Provider.initialize()`)\r\n        if (!this.shouldAutoInitialize()) {\r\n            return;\r\n        }\r\n        // if the service is eager, initialize the default instance\r\n        if (isComponentEager(component)) {\r\n            try {\r\n                this.getOrInitializeService({ instanceIdentifier: DEFAULT_ENTRY_NAME });\r\n            }\r\n            catch (e) {\r\n                // when the instance factory for an eager Component throws an exception during the eager\r\n                // initialization, it should not cause a fatal error.\r\n                // TODO: Investigate if we need to make it configurable, because some component may want to cause\r\n                // a fatal error in this case?\r\n            }\r\n        }\r\n        // Create service instances for the pending promises and resolve them\r\n        // NOTE: if this.multipleInstances is false, only the default instance will be created\r\n        // and all promises with resolve with it regardless of the identifier.\r\n        for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {\r\n            const normalizedIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);\r\n            try {\r\n                // `getOrInitializeService()` should always return a valid instance since a component is guaranteed. use ! to make typescript happy.\r\n                const instance = this.getOrInitializeService({\r\n                    instanceIdentifier: normalizedIdentifier\r\n                });\r\n                instanceDeferred.resolve(instance);\r\n            }\r\n            catch (e) {\r\n                // when the instance factory throws an exception, it should not cause\r\n                // a fatal error. We just leave the promise unresolved.\r\n            }\r\n        }\r\n    }\r\n    clearInstance(identifier = DEFAULT_ENTRY_NAME) {\r\n        this.instancesDeferred.delete(identifier);\r\n        this.instancesOptions.delete(identifier);\r\n        this.instances.delete(identifier);\r\n    }\r\n    // app.delete() will call this method on every provider to delete the services\r\n    // TODO: should we mark the provider as deleted?\r\n    async delete() {\r\n        const services = Array.from(this.instances.values());\r\n        await Promise.all([\r\n            ...services\r\n                .filter(service => 'INTERNAL' in service) // legacy services\r\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n                .map(service => service.INTERNAL.delete()),\r\n            ...services\r\n                .filter(service => '_delete' in service) // modularized services\r\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n                .map(service => service._delete())\r\n        ]);\r\n    }\r\n    isComponentSet() {\r\n        return this.component != null;\r\n    }\r\n    isInitialized(identifier = DEFAULT_ENTRY_NAME) {\r\n        return this.instances.has(identifier);\r\n    }\r\n    getOptions(identifier = DEFAULT_ENTRY_NAME) {\r\n        return this.instancesOptions.get(identifier) || {};\r\n    }\r\n    initialize(opts = {}) {\r\n        const { options = {} } = opts;\r\n        const normalizedIdentifier = this.normalizeInstanceIdentifier(opts.instanceIdentifier);\r\n        if (this.isInitialized(normalizedIdentifier)) {\r\n            throw Error(`${this.name}(${normalizedIdentifier}) has already been initialized`);\r\n        }\r\n        if (!this.isComponentSet()) {\r\n            throw Error(`Component ${this.name} has not been registered yet`);\r\n        }\r\n        const instance = this.getOrInitializeService({\r\n            instanceIdentifier: normalizedIdentifier,\r\n            options\r\n        });\r\n        // resolve any pending promise waiting for the service instance\r\n        for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {\r\n            const normalizedDeferredIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);\r\n            if (normalizedIdentifier === normalizedDeferredIdentifier) {\r\n                instanceDeferred.resolve(instance);\r\n            }\r\n        }\r\n        return instance;\r\n    }\r\n    /**\r\n     *\r\n     * @param callback - a function that will be invoked  after the provider has been initialized by calling provider.initialize().\r\n     * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.\r\n     *\r\n     * @param identifier An optional instance identifier\r\n     * @returns a function to unregister the callback\r\n     */\r\n    onInit(callback, identifier) {\r\n        var _a;\r\n        const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\r\n        const existingCallbacks = (_a = this.onInitCallbacks.get(normalizedIdentifier)) !== null && _a !== void 0 ? _a : new Set();\r\n        existingCallbacks.add(callback);\r\n        this.onInitCallbacks.set(normalizedIdentifier, existingCallbacks);\r\n        const existingInstance = this.instances.get(normalizedIdentifier);\r\n        if (existingInstance) {\r\n            callback(existingInstance, normalizedIdentifier);\r\n        }\r\n        return () => {\r\n            existingCallbacks.delete(callback);\r\n        };\r\n    }\r\n    /**\r\n     * Invoke onInit callbacks synchronously\r\n     * @param instance the service instance`\r\n     */\r\n    invokeOnInitCallbacks(instance, identifier) {\r\n        const callbacks = this.onInitCallbacks.get(identifier);\r\n        if (!callbacks) {\r\n            return;\r\n        }\r\n        for (const callback of callbacks) {\r\n            try {\r\n                callback(instance, identifier);\r\n            }\r\n            catch (_a) {\r\n                // ignore errors in the onInit callback\r\n            }\r\n        }\r\n    }\r\n    getOrInitializeService({ instanceIdentifier, options = {} }) {\r\n        let instance = this.instances.get(instanceIdentifier);\r\n        if (!instance && this.component) {\r\n            instance = this.component.instanceFactory(this.container, {\r\n                instanceIdentifier: normalizeIdentifierForFactory(instanceIdentifier),\r\n                options\r\n            });\r\n            this.instances.set(instanceIdentifier, instance);\r\n            this.instancesOptions.set(instanceIdentifier, options);\r\n            /**\r\n             * Invoke onInit listeners.\r\n             * Note this.component.onInstanceCreated is different, which is used by the component creator,\r\n             * while onInit listeners are registered by consumers of the provider.\r\n             */\r\n            this.invokeOnInitCallbacks(instance, instanceIdentifier);\r\n            /**\r\n             * Order is important\r\n             * onInstanceCreated() should be called after this.instances.set(instanceIdentifier, instance); which\r\n             * makes `isInitialized()` return true.\r\n             */\r\n            if (this.component.onInstanceCreated) {\r\n                try {\r\n                    this.component.onInstanceCreated(this.container, instanceIdentifier, instance);\r\n                }\r\n                catch (_a) {\r\n                    // ignore errors in the onInstanceCreatedCallback\r\n                }\r\n            }\r\n        }\r\n        return instance || null;\r\n    }\r\n    normalizeInstanceIdentifier(identifier = DEFAULT_ENTRY_NAME) {\r\n        if (this.component) {\r\n            return this.component.multipleInstances ? identifier : DEFAULT_ENTRY_NAME;\r\n        }\r\n        else {\r\n            return identifier; // assume multiple instances are supported before the component is provided.\r\n        }\r\n    }\r\n    shouldAutoInitialize() {\r\n        return (!!this.component &&\r\n            this.component.instantiationMode !== \"EXPLICIT\" /* InstantiationMode.EXPLICIT */);\r\n    }\r\n}\r\n// undefined should be passed to the service factory for the default instance\r\nfunction normalizeIdentifierForFactory(identifier) {\r\n    return identifier === DEFAULT_ENTRY_NAME ? undefined : identifier;\r\n}\r\nfunction isComponentEager(component) {\r\n    return component.instantiationMode === \"EAGER\" /* InstantiationMode.EAGER */;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`\r\n */\r\nclass ComponentContainer {\r\n    constructor(name) {\r\n        this.name = name;\r\n        this.providers = new Map();\r\n    }\r\n    /**\r\n     *\r\n     * @param component Component being added\r\n     * @param overwrite When a component with the same name has already been registered,\r\n     * if overwrite is true: overwrite the existing component with the new component and create a new\r\n     * provider with the new component. It can be useful in tests where you want to use different mocks\r\n     * for different tests.\r\n     * if overwrite is false: throw an exception\r\n     */\r\n    addComponent(component) {\r\n        const provider = this.getProvider(component.name);\r\n        if (provider.isComponentSet()) {\r\n            throw new Error(`Component ${component.name} has already been registered with ${this.name}`);\r\n        }\r\n        provider.setComponent(component);\r\n    }\r\n    addOrOverwriteComponent(component) {\r\n        const provider = this.getProvider(component.name);\r\n        if (provider.isComponentSet()) {\r\n            // delete the existing provider from the container, so we can register the new component\r\n            this.providers.delete(component.name);\r\n        }\r\n        this.addComponent(component);\r\n    }\r\n    /**\r\n     * getProvider provides a type safe interface where it can only be called with a field name\r\n     * present in NameServiceMapping interface.\r\n     *\r\n     * Firebase SDKs providing services should extend NameServiceMapping interface to register\r\n     * themselves.\r\n     */\r\n    getProvider(name) {\r\n        if (this.providers.has(name)) {\r\n            return this.providers.get(name);\r\n        }\r\n        // create a Provider for a service that hasn't registered with Firebase\r\n        const provider = new Provider(name, this);\r\n        this.providers.set(name, provider);\r\n        return provider;\r\n    }\r\n    getProviders() {\r\n        return Array.from(this.providers.values());\r\n    }\r\n}\n\nexport { Component, ComponentContainer, Provider };\n//# sourceMappingURL=index.esm2017.js.map\n","/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * A container for all of the Logger instances\r\n */\r\nconst instances = [];\r\n/**\r\n * The JS SDK supports 5 log levels and also allows a user the ability to\r\n * silence the logs altogether.\r\n *\r\n * The order is a follows:\r\n * DEBUG < VERBOSE < INFO < WARN < ERROR\r\n *\r\n * All of the log types above the current log level will be captured (i.e. if\r\n * you set the log level to `INFO`, errors will still be logged, but `DEBUG` and\r\n * `VERBOSE` logs will not)\r\n */\r\nvar LogLevel;\r\n(function (LogLevel) {\r\n    LogLevel[LogLevel[\"DEBUG\"] = 0] = \"DEBUG\";\r\n    LogLevel[LogLevel[\"VERBOSE\"] = 1] = \"VERBOSE\";\r\n    LogLevel[LogLevel[\"INFO\"] = 2] = \"INFO\";\r\n    LogLevel[LogLevel[\"WARN\"] = 3] = \"WARN\";\r\n    LogLevel[LogLevel[\"ERROR\"] = 4] = \"ERROR\";\r\n    LogLevel[LogLevel[\"SILENT\"] = 5] = \"SILENT\";\r\n})(LogLevel || (LogLevel = {}));\r\nconst levelStringToEnum = {\r\n    'debug': LogLevel.DEBUG,\r\n    'verbose': LogLevel.VERBOSE,\r\n    'info': LogLevel.INFO,\r\n    'warn': LogLevel.WARN,\r\n    'error': LogLevel.ERROR,\r\n    'silent': LogLevel.SILENT\r\n};\r\n/**\r\n * The default log level\r\n */\r\nconst defaultLogLevel = LogLevel.INFO;\r\n/**\r\n * By default, `console.debug` is not displayed in the developer console (in\r\n * chrome). To avoid forcing users to have to opt-in to these logs twice\r\n * (i.e. once for firebase, and once in the console), we are sending `DEBUG`\r\n * logs to the `console.log` function.\r\n */\r\nconst ConsoleMethod = {\r\n    [LogLevel.DEBUG]: 'log',\r\n    [LogLevel.VERBOSE]: 'log',\r\n    [LogLevel.INFO]: 'info',\r\n    [LogLevel.WARN]: 'warn',\r\n    [LogLevel.ERROR]: 'error'\r\n};\r\n/**\r\n * The default log handler will forward DEBUG, VERBOSE, INFO, WARN, and ERROR\r\n * messages on to their corresponding console counterparts (if the log method\r\n * is supported by the current log level)\r\n */\r\nconst defaultLogHandler = (instance, logType, ...args) => {\r\n    if (logType < instance.logLevel) {\r\n        return;\r\n    }\r\n    const now = new Date().toISOString();\r\n    const method = ConsoleMethod[logType];\r\n    if (method) {\r\n        console[method](`[${now}]  ${instance.name}:`, ...args);\r\n    }\r\n    else {\r\n        throw new Error(`Attempted to log a message with an invalid logType (value: ${logType})`);\r\n    }\r\n};\r\nclass Logger {\r\n    /**\r\n     * Gives you an instance of a Logger to capture messages according to\r\n     * Firebase's logging scheme.\r\n     *\r\n     * @param name The name that the logs will be associated with\r\n     */\r\n    constructor(name) {\r\n        this.name = name;\r\n        /**\r\n         * The log level of the given Logger instance.\r\n         */\r\n        this._logLevel = defaultLogLevel;\r\n        /**\r\n         * The main (internal) log handler for the Logger instance.\r\n         * Can be set to a new function in internal package code but not by user.\r\n         */\r\n        this._logHandler = defaultLogHandler;\r\n        /**\r\n         * The optional, additional, user-defined log handler for the Logger instance.\r\n         */\r\n        this._userLogHandler = null;\r\n        /**\r\n         * Capture the current instance for later use\r\n         */\r\n        instances.push(this);\r\n    }\r\n    get logLevel() {\r\n        return this._logLevel;\r\n    }\r\n    set logLevel(val) {\r\n        if (!(val in LogLevel)) {\r\n            throw new TypeError(`Invalid value \"${val}\" assigned to \\`logLevel\\``);\r\n        }\r\n        this._logLevel = val;\r\n    }\r\n    // Workaround for setter/getter having to be the same type.\r\n    setLogLevel(val) {\r\n        this._logLevel = typeof val === 'string' ? levelStringToEnum[val] : val;\r\n    }\r\n    get logHandler() {\r\n        return this._logHandler;\r\n    }\r\n    set logHandler(val) {\r\n        if (typeof val !== 'function') {\r\n            throw new TypeError('Value assigned to `logHandler` must be a function');\r\n        }\r\n        this._logHandler = val;\r\n    }\r\n    get userLogHandler() {\r\n        return this._userLogHandler;\r\n    }\r\n    set userLogHandler(val) {\r\n        this._userLogHandler = val;\r\n    }\r\n    /**\r\n     * The functions below are all based on the `console` interface\r\n     */\r\n    debug(...args) {\r\n        this._userLogHandler && this._userLogHandler(this, LogLevel.DEBUG, ...args);\r\n        this._logHandler(this, LogLevel.DEBUG, ...args);\r\n    }\r\n    log(...args) {\r\n        this._userLogHandler &&\r\n            this._userLogHandler(this, LogLevel.VERBOSE, ...args);\r\n        this._logHandler(this, LogLevel.VERBOSE, ...args);\r\n    }\r\n    info(...args) {\r\n        this._userLogHandler && this._userLogHandler(this, LogLevel.INFO, ...args);\r\n        this._logHandler(this, LogLevel.INFO, ...args);\r\n    }\r\n    warn(...args) {\r\n        this._userLogHandler && this._userLogHandler(this, LogLevel.WARN, ...args);\r\n        this._logHandler(this, LogLevel.WARN, ...args);\r\n    }\r\n    error(...args) {\r\n        this._userLogHandler && this._userLogHandler(this, LogLevel.ERROR, ...args);\r\n        this._logHandler(this, LogLevel.ERROR, ...args);\r\n    }\r\n}\r\nfunction setLogLevel(level) {\r\n    instances.forEach(inst => {\r\n        inst.setLogLevel(level);\r\n    });\r\n}\r\nfunction setUserLogHandler(logCallback, options) {\r\n    for (const instance of instances) {\r\n        let customLogLevel = null;\r\n        if (options && options.level) {\r\n            customLogLevel = levelStringToEnum[options.level];\r\n        }\r\n        if (logCallback === null) {\r\n            instance.userLogHandler = null;\r\n        }\r\n        else {\r\n            instance.userLogHandler = (instance, level, ...args) => {\r\n                const message = args\r\n                    .map(arg => {\r\n                    if (arg == null) {\r\n                        return null;\r\n                    }\r\n                    else if (typeof arg === 'string') {\r\n                        return arg;\r\n                    }\r\n                    else if (typeof arg === 'number' || typeof arg === 'boolean') {\r\n                        return arg.toString();\r\n                    }\r\n                    else if (arg instanceof Error) {\r\n                        return arg.message;\r\n                    }\r\n                    else {\r\n                        try {\r\n                            return JSON.stringify(arg);\r\n                        }\r\n                        catch (ignored) {\r\n                            return null;\r\n                        }\r\n                    }\r\n                })\r\n                    .filter(arg => arg)\r\n                    .join(' ');\r\n                if (level >= (customLogLevel !== null && customLogLevel !== void 0 ? customLogLevel : instance.logLevel)) {\r\n                    logCallback({\r\n                        level: LogLevel[level].toLowerCase(),\r\n                        message,\r\n                        args,\r\n                        type: instance.name\r\n                    });\r\n                }\r\n            };\r\n        }\r\n    }\r\n}\n\nexport { LogLevel, Logger, setLogLevel, setUserLogHandler };\n//# sourceMappingURL=index.esm2017.js.map\n","const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n    return (idbProxyableTypes ||\n        (idbProxyableTypes = [\n            IDBDatabase,\n            IDBObjectStore,\n            IDBIndex,\n            IDBCursor,\n            IDBTransaction,\n        ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n    return (cursorAdvanceMethods ||\n        (cursorAdvanceMethods = [\n            IDBCursor.prototype.advance,\n            IDBCursor.prototype.continue,\n            IDBCursor.prototype.continuePrimaryKey,\n        ]));\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n    const promise = new Promise((resolve, reject) => {\n        const unlisten = () => {\n            request.removeEventListener('success', success);\n            request.removeEventListener('error', error);\n        };\n        const success = () => {\n            resolve(wrap(request.result));\n            unlisten();\n        };\n        const error = () => {\n            reject(request.error);\n            unlisten();\n        };\n        request.addEventListener('success', success);\n        request.addEventListener('error', error);\n    });\n    promise\n        .then((value) => {\n        // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n        // (see wrapFunction).\n        if (value instanceof IDBCursor) {\n            cursorRequestMap.set(value, request);\n        }\n        // Catching to avoid \"Uncaught Promise exceptions\"\n    })\n        .catch(() => { });\n    // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n    // is because we create many promises from a single IDBRequest.\n    reverseTransformCache.set(promise, request);\n    return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n    // Early bail if we've already created a done promise for this transaction.\n    if (transactionDoneMap.has(tx))\n        return;\n    const done = new Promise((resolve, reject) => {\n        const unlisten = () => {\n            tx.removeEventListener('complete', complete);\n            tx.removeEventListener('error', error);\n            tx.removeEventListener('abort', error);\n        };\n        const complete = () => {\n            resolve();\n            unlisten();\n        };\n        const error = () => {\n            reject(tx.error || new DOMException('AbortError', 'AbortError'));\n            unlisten();\n        };\n        tx.addEventListener('complete', complete);\n        tx.addEventListener('error', error);\n        tx.addEventListener('abort', error);\n    });\n    // Cache it for later retrieval.\n    transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n    get(target, prop, receiver) {\n        if (target instanceof IDBTransaction) {\n            // Special handling for transaction.done.\n            if (prop === 'done')\n                return transactionDoneMap.get(target);\n            // Polyfill for objectStoreNames because of Edge.\n            if (prop === 'objectStoreNames') {\n                return target.objectStoreNames || transactionStoreNamesMap.get(target);\n            }\n            // Make tx.store return the only store in the transaction, or undefined if there are many.\n            if (prop === 'store') {\n                return receiver.objectStoreNames[1]\n                    ? undefined\n                    : receiver.objectStore(receiver.objectStoreNames[0]);\n            }\n        }\n        // Else transform whatever we get back.\n        return wrap(target[prop]);\n    },\n    set(target, prop, value) {\n        target[prop] = value;\n        return true;\n    },\n    has(target, prop) {\n        if (target instanceof IDBTransaction &&\n            (prop === 'done' || prop === 'store')) {\n            return true;\n        }\n        return prop in target;\n    },\n};\nfunction replaceTraps(callback) {\n    idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n    // Due to expected object equality (which is enforced by the caching in `wrap`), we\n    // only create one new func per func.\n    // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n    if (func === IDBDatabase.prototype.transaction &&\n        !('objectStoreNames' in IDBTransaction.prototype)) {\n        return function (storeNames, ...args) {\n            const tx = func.call(unwrap(this), storeNames, ...args);\n            transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n            return wrap(tx);\n        };\n    }\n    // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n    // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n    // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n    // with real promises, so each advance methods returns a new promise for the cursor object, or\n    // undefined if the end of the cursor has been reached.\n    if (getCursorAdvanceMethods().includes(func)) {\n        return function (...args) {\n            // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n            // the original object.\n            func.apply(unwrap(this), args);\n            return wrap(cursorRequestMap.get(this));\n        };\n    }\n    return function (...args) {\n        // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n        // the original object.\n        return wrap(func.apply(unwrap(this), args));\n    };\n}\nfunction transformCachableValue(value) {\n    if (typeof value === 'function')\n        return wrapFunction(value);\n    // This doesn't return, it just creates a 'done' promise for the transaction,\n    // which is later returned for transaction.done (see idbObjectHandler).\n    if (value instanceof IDBTransaction)\n        cacheDonePromiseForTransaction(value);\n    if (instanceOfAny(value, getIdbProxyableTypes()))\n        return new Proxy(value, idbProxyTraps);\n    // Return the same value back if we're not going to transform it.\n    return value;\n}\nfunction wrap(value) {\n    // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n    // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n    if (value instanceof IDBRequest)\n        return promisifyRequest(value);\n    // If we've already transformed this value before, reuse the transformed value.\n    // This is faster, but it also provides object equality.\n    if (transformCache.has(value))\n        return transformCache.get(value);\n    const newValue = transformCachableValue(value);\n    // Not all types are transformed.\n    // These may be primitive types, so they can't be WeakMap keys.\n    if (newValue !== value) {\n        transformCache.set(value, newValue);\n        reverseTransformCache.set(newValue, value);\n    }\n    return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };\n","import { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n    const request = indexedDB.open(name, version);\n    const openPromise = wrap(request);\n    if (upgrade) {\n        request.addEventListener('upgradeneeded', (event) => {\n            upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);\n        });\n    }\n    if (blocked) {\n        request.addEventListener('blocked', (event) => blocked(\n        // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n        event.oldVersion, event.newVersion, event));\n    }\n    openPromise\n        .then((db) => {\n        if (terminated)\n            db.addEventListener('close', () => terminated());\n        if (blocking) {\n            db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event));\n        }\n    })\n        .catch(() => { });\n    return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n    const request = indexedDB.deleteDatabase(name);\n    if (blocked) {\n        request.addEventListener('blocked', (event) => blocked(\n        // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n        event.oldVersion, event));\n    }\n    return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n    if (!(target instanceof IDBDatabase &&\n        !(prop in target) &&\n        typeof prop === 'string')) {\n        return;\n    }\n    if (cachedMethods.get(prop))\n        return cachedMethods.get(prop);\n    const targetFuncName = prop.replace(/FromIndex$/, '');\n    const useIndex = prop !== targetFuncName;\n    const isWrite = writeMethods.includes(targetFuncName);\n    if (\n    // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n    !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n        !(isWrite || readMethods.includes(targetFuncName))) {\n        return;\n    }\n    const method = async function (storeName, ...args) {\n        // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n        const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n        let target = tx.store;\n        if (useIndex)\n            target = target.index(args.shift());\n        // Must reject if op rejects.\n        // If it's a write operation, must reject if tx.done rejects.\n        // Must reject with op rejection first.\n        // Must resolve with op value.\n        // Must handle both promises (no unhandled rejections)\n        return (await Promise.all([\n            target[targetFuncName](...args),\n            isWrite && tx.done,\n        ]))[0];\n    };\n    cachedMethods.set(prop, method);\n    return method;\n}\nreplaceTraps((oldTraps) => ({\n    ...oldTraps,\n    get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n    has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nexport { deleteDB, openDB };\n","import { Component, ComponentContainer } from '@firebase/component';\nimport { Logger, setUserLogHandler, setLogLevel as setLogLevel$1 } from '@firebase/logger';\nimport { ErrorFactory, getDefaultAppConfig, deepEqual, FirebaseError, base64urlEncodeWithoutPadding, isIndexedDBAvailable, validateIndexedDBOpenable } from '@firebase/util';\nexport { FirebaseError } from '@firebase/util';\nimport { openDB } from 'idb';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass PlatformLoggerServiceImpl {\r\n    constructor(container) {\r\n        this.container = container;\r\n    }\r\n    // In initial implementation, this will be called by installations on\r\n    // auth token refresh, and installations will send this string.\r\n    getPlatformInfoString() {\r\n        const providers = this.container.getProviders();\r\n        // Loop through providers and get library/version pairs from any that are\r\n        // version components.\r\n        return providers\r\n            .map(provider => {\r\n            if (isVersionServiceProvider(provider)) {\r\n                const service = provider.getImmediate();\r\n                return `${service.library}/${service.version}`;\r\n            }\r\n            else {\r\n                return null;\r\n            }\r\n        })\r\n            .filter(logString => logString)\r\n            .join(' ');\r\n    }\r\n}\r\n/**\r\n *\r\n * @param provider check if this provider provides a VersionService\r\n *\r\n * NOTE: Using Provider<'app-version'> is a hack to indicate that the provider\r\n * provides VersionService. The provider is not necessarily a 'app-version'\r\n * provider.\r\n */\r\nfunction isVersionServiceProvider(provider) {\r\n    const component = provider.getComponent();\r\n    return (component === null || component === void 0 ? void 0 : component.type) === \"VERSION\" /* ComponentType.VERSION */;\r\n}\n\nconst name$o = \"@firebase/app\";\nconst version$1 = \"0.9.13\";\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst logger = new Logger('@firebase/app');\n\nconst name$n = \"@firebase/app-compat\";\n\nconst name$m = \"@firebase/analytics-compat\";\n\nconst name$l = \"@firebase/analytics\";\n\nconst name$k = \"@firebase/app-check-compat\";\n\nconst name$j = \"@firebase/app-check\";\n\nconst name$i = \"@firebase/auth\";\n\nconst name$h = \"@firebase/auth-compat\";\n\nconst name$g = \"@firebase/database\";\n\nconst name$f = \"@firebase/database-compat\";\n\nconst name$e = \"@firebase/functions\";\n\nconst name$d = \"@firebase/functions-compat\";\n\nconst name$c = \"@firebase/installations\";\n\nconst name$b = \"@firebase/installations-compat\";\n\nconst name$a = \"@firebase/messaging\";\n\nconst name$9 = \"@firebase/messaging-compat\";\n\nconst name$8 = \"@firebase/performance\";\n\nconst name$7 = \"@firebase/performance-compat\";\n\nconst name$6 = \"@firebase/remote-config\";\n\nconst name$5 = \"@firebase/remote-config-compat\";\n\nconst name$4 = \"@firebase/storage\";\n\nconst name$3 = \"@firebase/storage-compat\";\n\nconst name$2 = \"@firebase/firestore\";\n\nconst name$1 = \"@firebase/firestore-compat\";\n\nconst name = \"firebase\";\nconst version = \"9.23.0\";\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * The default app name\r\n *\r\n * @internal\r\n */\r\nconst DEFAULT_ENTRY_NAME = '[DEFAULT]';\r\nconst PLATFORM_LOG_STRING = {\r\n    [name$o]: 'fire-core',\r\n    [name$n]: 'fire-core-compat',\r\n    [name$l]: 'fire-analytics',\r\n    [name$m]: 'fire-analytics-compat',\r\n    [name$j]: 'fire-app-check',\r\n    [name$k]: 'fire-app-check-compat',\r\n    [name$i]: 'fire-auth',\r\n    [name$h]: 'fire-auth-compat',\r\n    [name$g]: 'fire-rtdb',\r\n    [name$f]: 'fire-rtdb-compat',\r\n    [name$e]: 'fire-fn',\r\n    [name$d]: 'fire-fn-compat',\r\n    [name$c]: 'fire-iid',\r\n    [name$b]: 'fire-iid-compat',\r\n    [name$a]: 'fire-fcm',\r\n    [name$9]: 'fire-fcm-compat',\r\n    [name$8]: 'fire-perf',\r\n    [name$7]: 'fire-perf-compat',\r\n    [name$6]: 'fire-rc',\r\n    [name$5]: 'fire-rc-compat',\r\n    [name$4]: 'fire-gcs',\r\n    [name$3]: 'fire-gcs-compat',\r\n    [name$2]: 'fire-fst',\r\n    [name$1]: 'fire-fst-compat',\r\n    'fire-js': 'fire-js',\r\n    [name]: 'fire-js-all'\r\n};\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @internal\r\n */\r\nconst _apps = new Map();\r\n/**\r\n * Registered components.\r\n *\r\n * @internal\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nconst _components = new Map();\r\n/**\r\n * @param component - the component being added to this app's container\r\n *\r\n * @internal\r\n */\r\nfunction _addComponent(app, component) {\r\n    try {\r\n        app.container.addComponent(component);\r\n    }\r\n    catch (e) {\r\n        logger.debug(`Component ${component.name} failed to register with FirebaseApp ${app.name}`, e);\r\n    }\r\n}\r\n/**\r\n *\r\n * @internal\r\n */\r\nfunction _addOrOverwriteComponent(app, component) {\r\n    app.container.addOrOverwriteComponent(component);\r\n}\r\n/**\r\n *\r\n * @param component - the component to register\r\n * @returns whether or not the component is registered successfully\r\n *\r\n * @internal\r\n */\r\nfunction _registerComponent(component) {\r\n    const componentName = component.name;\r\n    if (_components.has(componentName)) {\r\n        logger.debug(`There were multiple attempts to register component ${componentName}.`);\r\n        return false;\r\n    }\r\n    _components.set(componentName, component);\r\n    // add the component to existing app instances\r\n    for (const app of _apps.values()) {\r\n        _addComponent(app, component);\r\n    }\r\n    return true;\r\n}\r\n/**\r\n *\r\n * @param app - FirebaseApp instance\r\n * @param name - service name\r\n *\r\n * @returns the provider for the service with the matching name\r\n *\r\n * @internal\r\n */\r\nfunction _getProvider(app, name) {\r\n    const heartbeatController = app.container\r\n        .getProvider('heartbeat')\r\n        .getImmediate({ optional: true });\r\n    if (heartbeatController) {\r\n        void heartbeatController.triggerHeartbeat();\r\n    }\r\n    return app.container.getProvider(name);\r\n}\r\n/**\r\n *\r\n * @param app - FirebaseApp instance\r\n * @param name - service name\r\n * @param instanceIdentifier - service instance identifier in case the service supports multiple instances\r\n *\r\n * @internal\r\n */\r\nfunction _removeServiceInstance(app, name, instanceIdentifier = DEFAULT_ENTRY_NAME) {\r\n    _getProvider(app, name).clearInstance(instanceIdentifier);\r\n}\r\n/**\r\n * Test only\r\n *\r\n * @internal\r\n */\r\nfunction _clearComponents() {\r\n    _components.clear();\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst ERRORS = {\r\n    [\"no-app\" /* AppError.NO_APP */]: \"No Firebase App '{$appName}' has been created - \" +\r\n        'call initializeApp() first',\r\n    [\"bad-app-name\" /* AppError.BAD_APP_NAME */]: \"Illegal App name: '{$appName}\",\r\n    [\"duplicate-app\" /* AppError.DUPLICATE_APP */]: \"Firebase App named '{$appName}' already exists with different options or config\",\r\n    [\"app-deleted\" /* AppError.APP_DELETED */]: \"Firebase App named '{$appName}' already deleted\",\r\n    [\"no-options\" /* AppError.NO_OPTIONS */]: 'Need to provide options, when not being deployed to hosting via source.',\r\n    [\"invalid-app-argument\" /* AppError.INVALID_APP_ARGUMENT */]: 'firebase.{$appName}() takes either no argument or a ' +\r\n        'Firebase App instance.',\r\n    [\"invalid-log-argument\" /* AppError.INVALID_LOG_ARGUMENT */]: 'First argument to `onLog` must be null or a function.',\r\n    [\"idb-open\" /* AppError.IDB_OPEN */]: 'Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.',\r\n    [\"idb-get\" /* AppError.IDB_GET */]: 'Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.',\r\n    [\"idb-set\" /* AppError.IDB_WRITE */]: 'Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.',\r\n    [\"idb-delete\" /* AppError.IDB_DELETE */]: 'Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.'\r\n};\r\nconst ERROR_FACTORY = new ErrorFactory('app', 'Firebase', ERRORS);\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass FirebaseAppImpl {\r\n    constructor(options, config, container) {\r\n        this._isDeleted = false;\r\n        this._options = Object.assign({}, options);\r\n        this._config = Object.assign({}, config);\r\n        this._name = config.name;\r\n        this._automaticDataCollectionEnabled =\r\n            config.automaticDataCollectionEnabled;\r\n        this._container = container;\r\n        this.container.addComponent(new Component('app', () => this, \"PUBLIC\" /* ComponentType.PUBLIC */));\r\n    }\r\n    get automaticDataCollectionEnabled() {\r\n        this.checkDestroyed();\r\n        return this._automaticDataCollectionEnabled;\r\n    }\r\n    set automaticDataCollectionEnabled(val) {\r\n        this.checkDestroyed();\r\n        this._automaticDataCollectionEnabled = val;\r\n    }\r\n    get name() {\r\n        this.checkDestroyed();\r\n        return this._name;\r\n    }\r\n    get options() {\r\n        this.checkDestroyed();\r\n        return this._options;\r\n    }\r\n    get config() {\r\n        this.checkDestroyed();\r\n        return this._config;\r\n    }\r\n    get container() {\r\n        return this._container;\r\n    }\r\n    get isDeleted() {\r\n        return this._isDeleted;\r\n    }\r\n    set isDeleted(val) {\r\n        this._isDeleted = val;\r\n    }\r\n    /**\r\n     * This function will throw an Error if the App has already been deleted -\r\n     * use before performing API actions on the App.\r\n     */\r\n    checkDestroyed() {\r\n        if (this.isDeleted) {\r\n            throw ERROR_FACTORY.create(\"app-deleted\" /* AppError.APP_DELETED */, { appName: this._name });\r\n        }\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * The current SDK version.\r\n *\r\n * @public\r\n */\r\nconst SDK_VERSION = version;\r\nfunction initializeApp(_options, rawConfig = {}) {\r\n    let options = _options;\r\n    if (typeof rawConfig !== 'object') {\r\n        const name = rawConfig;\r\n        rawConfig = { name };\r\n    }\r\n    const config = Object.assign({ name: DEFAULT_ENTRY_NAME, automaticDataCollectionEnabled: false }, rawConfig);\r\n    const name = config.name;\r\n    if (typeof name !== 'string' || !name) {\r\n        throw ERROR_FACTORY.create(\"bad-app-name\" /* AppError.BAD_APP_NAME */, {\r\n            appName: String(name)\r\n        });\r\n    }\r\n    options || (options = getDefaultAppConfig());\r\n    if (!options) {\r\n        throw ERROR_FACTORY.create(\"no-options\" /* AppError.NO_OPTIONS */);\r\n    }\r\n    const existingApp = _apps.get(name);\r\n    if (existingApp) {\r\n        // return the existing app if options and config deep equal the ones in the existing app.\r\n        if (deepEqual(options, existingApp.options) &&\r\n            deepEqual(config, existingApp.config)) {\r\n            return existingApp;\r\n        }\r\n        else {\r\n            throw ERROR_FACTORY.create(\"duplicate-app\" /* AppError.DUPLICATE_APP */, { appName: name });\r\n        }\r\n    }\r\n    const container = new ComponentContainer(name);\r\n    for (const component of _components.values()) {\r\n        container.addComponent(component);\r\n    }\r\n    const newApp = new FirebaseAppImpl(options, config, container);\r\n    _apps.set(name, newApp);\r\n    return newApp;\r\n}\r\n/**\r\n * Retrieves a {@link @firebase/app#FirebaseApp} instance.\r\n *\r\n * When called with no arguments, the default app is returned. When an app name\r\n * is provided, the app corresponding to that name is returned.\r\n *\r\n * An exception is thrown if the app being retrieved has not yet been\r\n * initialized.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Return the default app\r\n * const app = getApp();\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Return a named app\r\n * const otherApp = getApp(\"otherApp\");\r\n * ```\r\n *\r\n * @param name - Optional name of the app to return. If no name is\r\n *   provided, the default is `\"[DEFAULT]\"`.\r\n *\r\n * @returns The app corresponding to the provided app name.\r\n *   If no app name is provided, the default app is returned.\r\n *\r\n * @public\r\n */\r\nfunction getApp(name = DEFAULT_ENTRY_NAME) {\r\n    const app = _apps.get(name);\r\n    if (!app && name === DEFAULT_ENTRY_NAME && getDefaultAppConfig()) {\r\n        return initializeApp();\r\n    }\r\n    if (!app) {\r\n        throw ERROR_FACTORY.create(\"no-app\" /* AppError.NO_APP */, { appName: name });\r\n    }\r\n    return app;\r\n}\r\n/**\r\n * A (read-only) array of all initialized apps.\r\n * @public\r\n */\r\nfunction getApps() {\r\n    return Array.from(_apps.values());\r\n}\r\n/**\r\n * Renders this app unusable and frees the resources of all associated\r\n * services.\r\n *\r\n * @example\r\n * ```javascript\r\n * deleteApp(app)\r\n *   .then(function() {\r\n *     console.log(\"App deleted successfully\");\r\n *   })\r\n *   .catch(function(error) {\r\n *     console.log(\"Error deleting app:\", error);\r\n *   });\r\n * ```\r\n *\r\n * @public\r\n */\r\nasync function deleteApp(app) {\r\n    const name = app.name;\r\n    if (_apps.has(name)) {\r\n        _apps.delete(name);\r\n        await Promise.all(app.container\r\n            .getProviders()\r\n            .map(provider => provider.delete()));\r\n        app.isDeleted = true;\r\n    }\r\n}\r\n/**\r\n * Registers a library's name and version for platform logging purposes.\r\n * @param library - Name of 1p or 3p library (e.g. firestore, angularfire)\r\n * @param version - Current version of that library.\r\n * @param variant - Bundle variant, e.g., node, rn, etc.\r\n *\r\n * @public\r\n */\r\nfunction registerVersion(libraryKeyOrName, version, variant) {\r\n    var _a;\r\n    // TODO: We can use this check to whitelist strings when/if we set up\r\n    // a good whitelist system.\r\n    let library = (_a = PLATFORM_LOG_STRING[libraryKeyOrName]) !== null && _a !== void 0 ? _a : libraryKeyOrName;\r\n    if (variant) {\r\n        library += `-${variant}`;\r\n    }\r\n    const libraryMismatch = library.match(/\\s|\\//);\r\n    const versionMismatch = version.match(/\\s|\\//);\r\n    if (libraryMismatch || versionMismatch) {\r\n        const warning = [\r\n            `Unable to register library \"${library}\" with version \"${version}\":`\r\n        ];\r\n        if (libraryMismatch) {\r\n            warning.push(`library name \"${library}\" contains illegal characters (whitespace or \"/\")`);\r\n        }\r\n        if (libraryMismatch && versionMismatch) {\r\n            warning.push('and');\r\n        }\r\n        if (versionMismatch) {\r\n            warning.push(`version name \"${version}\" contains illegal characters (whitespace or \"/\")`);\r\n        }\r\n        logger.warn(warning.join(' '));\r\n        return;\r\n    }\r\n    _registerComponent(new Component(`${library}-version`, () => ({ library, version }), \"VERSION\" /* ComponentType.VERSION */));\r\n}\r\n/**\r\n * Sets log handler for all Firebase SDKs.\r\n * @param logCallback - An optional custom log handler that executes user code whenever\r\n * the Firebase SDK makes a logging call.\r\n *\r\n * @public\r\n */\r\nfunction onLog(logCallback, options) {\r\n    if (logCallback !== null && typeof logCallback !== 'function') {\r\n        throw ERROR_FACTORY.create(\"invalid-log-argument\" /* AppError.INVALID_LOG_ARGUMENT */);\r\n    }\r\n    setUserLogHandler(logCallback, options);\r\n}\r\n/**\r\n * Sets log level for all Firebase SDKs.\r\n *\r\n * All of the log types above the current log level are captured (i.e. if\r\n * you set the log level to `info`, errors are logged, but `debug` and\r\n * `verbose` logs are not).\r\n *\r\n * @public\r\n */\r\nfunction setLogLevel(logLevel) {\r\n    setLogLevel$1(logLevel);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst DB_NAME = 'firebase-heartbeat-database';\r\nconst DB_VERSION = 1;\r\nconst STORE_NAME = 'firebase-heartbeat-store';\r\nlet dbPromise = null;\r\nfunction getDbPromise() {\r\n    if (!dbPromise) {\r\n        dbPromise = openDB(DB_NAME, DB_VERSION, {\r\n            upgrade: (db, oldVersion) => {\r\n                // We don't use 'break' in this switch statement, the fall-through\r\n                // behavior is what we want, because if there are multiple versions between\r\n                // the old version and the current version, we want ALL the migrations\r\n                // that correspond to those versions to run, not only the last one.\r\n                // eslint-disable-next-line default-case\r\n                switch (oldVersion) {\r\n                    case 0:\r\n                        db.createObjectStore(STORE_NAME);\r\n                }\r\n            }\r\n        }).catch(e => {\r\n            throw ERROR_FACTORY.create(\"idb-open\" /* AppError.IDB_OPEN */, {\r\n                originalErrorMessage: e.message\r\n            });\r\n        });\r\n    }\r\n    return dbPromise;\r\n}\r\nasync function readHeartbeatsFromIndexedDB(app) {\r\n    try {\r\n        const db = await getDbPromise();\r\n        const result = await db\r\n            .transaction(STORE_NAME)\r\n            .objectStore(STORE_NAME)\r\n            .get(computeKey(app));\r\n        return result;\r\n    }\r\n    catch (e) {\r\n        if (e instanceof FirebaseError) {\r\n            logger.warn(e.message);\r\n        }\r\n        else {\r\n            const idbGetError = ERROR_FACTORY.create(\"idb-get\" /* AppError.IDB_GET */, {\r\n                originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\r\n            });\r\n            logger.warn(idbGetError.message);\r\n        }\r\n    }\r\n}\r\nasync function writeHeartbeatsToIndexedDB(app, heartbeatObject) {\r\n    try {\r\n        const db = await getDbPromise();\r\n        const tx = db.transaction(STORE_NAME, 'readwrite');\r\n        const objectStore = tx.objectStore(STORE_NAME);\r\n        await objectStore.put(heartbeatObject, computeKey(app));\r\n        await tx.done;\r\n    }\r\n    catch (e) {\r\n        if (e instanceof FirebaseError) {\r\n            logger.warn(e.message);\r\n        }\r\n        else {\r\n            const idbGetError = ERROR_FACTORY.create(\"idb-set\" /* AppError.IDB_WRITE */, {\r\n                originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\r\n            });\r\n            logger.warn(idbGetError.message);\r\n        }\r\n    }\r\n}\r\nfunction computeKey(app) {\r\n    return `${app.name}!${app.options.appId}`;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst MAX_HEADER_BYTES = 1024;\r\n// 30 days\r\nconst STORED_HEARTBEAT_RETENTION_MAX_MILLIS = 30 * 24 * 60 * 60 * 1000;\r\nclass HeartbeatServiceImpl {\r\n    constructor(container) {\r\n        this.container = container;\r\n        /**\r\n         * In-memory cache for heartbeats, used by getHeartbeatsHeader() to generate\r\n         * the header string.\r\n         * Stores one record per date. This will be consolidated into the standard\r\n         * format of one record per user agent string before being sent as a header.\r\n         * Populated from indexedDB when the controller is instantiated and should\r\n         * be kept in sync with indexedDB.\r\n         * Leave public for easier testing.\r\n         */\r\n        this._heartbeatsCache = null;\r\n        const app = this.container.getProvider('app').getImmediate();\r\n        this._storage = new HeartbeatStorageImpl(app);\r\n        this._heartbeatsCachePromise = this._storage.read().then(result => {\r\n            this._heartbeatsCache = result;\r\n            return result;\r\n        });\r\n    }\r\n    /**\r\n     * Called to report a heartbeat. The function will generate\r\n     * a HeartbeatsByUserAgent object, update heartbeatsCache, and persist it\r\n     * to IndexedDB.\r\n     * Note that we only store one heartbeat per day. So if a heartbeat for today is\r\n     * already logged, subsequent calls to this function in the same day will be ignored.\r\n     */\r\n    async triggerHeartbeat() {\r\n        const platformLogger = this.container\r\n            .getProvider('platform-logger')\r\n            .getImmediate();\r\n        // This is the \"Firebase user agent\" string from the platform logger\r\n        // service, not the browser user agent.\r\n        const agent = platformLogger.getPlatformInfoString();\r\n        const date = getUTCDateString();\r\n        if (this._heartbeatsCache === null) {\r\n            this._heartbeatsCache = await this._heartbeatsCachePromise;\r\n        }\r\n        // Do not store a heartbeat if one is already stored for this day\r\n        // or if a header has already been sent today.\r\n        if (this._heartbeatsCache.lastSentHeartbeatDate === date ||\r\n            this._heartbeatsCache.heartbeats.some(singleDateHeartbeat => singleDateHeartbeat.date === date)) {\r\n            return;\r\n        }\r\n        else {\r\n            // There is no entry for this date. Create one.\r\n            this._heartbeatsCache.heartbeats.push({ date, agent });\r\n        }\r\n        // Remove entries older than 30 days.\r\n        this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter(singleDateHeartbeat => {\r\n            const hbTimestamp = new Date(singleDateHeartbeat.date).valueOf();\r\n            const now = Date.now();\r\n            return now - hbTimestamp <= STORED_HEARTBEAT_RETENTION_MAX_MILLIS;\r\n        });\r\n        return this._storage.overwrite(this._heartbeatsCache);\r\n    }\r\n    /**\r\n     * Returns a base64 encoded string which can be attached to the heartbeat-specific header directly.\r\n     * It also clears all heartbeats from memory as well as in IndexedDB.\r\n     *\r\n     * NOTE: Consuming product SDKs should not send the header if this method\r\n     * returns an empty string.\r\n     */\r\n    async getHeartbeatsHeader() {\r\n        if (this._heartbeatsCache === null) {\r\n            await this._heartbeatsCachePromise;\r\n        }\r\n        // If it's still null or the array is empty, there is no data to send.\r\n        if (this._heartbeatsCache === null ||\r\n            this._heartbeatsCache.heartbeats.length === 0) {\r\n            return '';\r\n        }\r\n        const date = getUTCDateString();\r\n        // Extract as many heartbeats from the cache as will fit under the size limit.\r\n        const { heartbeatsToSend, unsentEntries } = extractHeartbeatsForHeader(this._heartbeatsCache.heartbeats);\r\n        const headerString = base64urlEncodeWithoutPadding(JSON.stringify({ version: 2, heartbeats: heartbeatsToSend }));\r\n        // Store last sent date to prevent another being logged/sent for the same day.\r\n        this._heartbeatsCache.lastSentHeartbeatDate = date;\r\n        if (unsentEntries.length > 0) {\r\n            // Store any unsent entries if they exist.\r\n            this._heartbeatsCache.heartbeats = unsentEntries;\r\n            // This seems more likely than emptying the array (below) to lead to some odd state\r\n            // since the cache isn't empty and this will be called again on the next request,\r\n            // and is probably safest if we await it.\r\n            await this._storage.overwrite(this._heartbeatsCache);\r\n        }\r\n        else {\r\n            this._heartbeatsCache.heartbeats = [];\r\n            // Do not wait for this, to reduce latency.\r\n            void this._storage.overwrite(this._heartbeatsCache);\r\n        }\r\n        return headerString;\r\n    }\r\n}\r\nfunction getUTCDateString() {\r\n    const today = new Date();\r\n    // Returns date format 'YYYY-MM-DD'\r\n    return today.toISOString().substring(0, 10);\r\n}\r\nfunction extractHeartbeatsForHeader(heartbeatsCache, maxSize = MAX_HEADER_BYTES) {\r\n    // Heartbeats grouped by user agent in the standard format to be sent in\r\n    // the header.\r\n    const heartbeatsToSend = [];\r\n    // Single date format heartbeats that are not sent.\r\n    let unsentEntries = heartbeatsCache.slice();\r\n    for (const singleDateHeartbeat of heartbeatsCache) {\r\n        // Look for an existing entry with the same user agent.\r\n        const heartbeatEntry = heartbeatsToSend.find(hb => hb.agent === singleDateHeartbeat.agent);\r\n        if (!heartbeatEntry) {\r\n            // If no entry for this user agent exists, create one.\r\n            heartbeatsToSend.push({\r\n                agent: singleDateHeartbeat.agent,\r\n                dates: [singleDateHeartbeat.date]\r\n            });\r\n            if (countBytes(heartbeatsToSend) > maxSize) {\r\n                // If the header would exceed max size, remove the added heartbeat\r\n                // entry and stop adding to the header.\r\n                heartbeatsToSend.pop();\r\n                break;\r\n            }\r\n        }\r\n        else {\r\n            heartbeatEntry.dates.push(singleDateHeartbeat.date);\r\n            // If the header would exceed max size, remove the added date\r\n            // and stop adding to the header.\r\n            if (countBytes(heartbeatsToSend) > maxSize) {\r\n                heartbeatEntry.dates.pop();\r\n                break;\r\n            }\r\n        }\r\n        // Pop unsent entry from queue. (Skipped if adding the entry exceeded\r\n        // quota and the loop breaks early.)\r\n        unsentEntries = unsentEntries.slice(1);\r\n    }\r\n    return {\r\n        heartbeatsToSend,\r\n        unsentEntries\r\n    };\r\n}\r\nclass HeartbeatStorageImpl {\r\n    constructor(app) {\r\n        this.app = app;\r\n        this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();\r\n    }\r\n    async runIndexedDBEnvironmentCheck() {\r\n        if (!isIndexedDBAvailable()) {\r\n            return false;\r\n        }\r\n        else {\r\n            return validateIndexedDBOpenable()\r\n                .then(() => true)\r\n                .catch(() => false);\r\n        }\r\n    }\r\n    /**\r\n     * Read all heartbeats.\r\n     */\r\n    async read() {\r\n        const canUseIndexedDB = await this._canUseIndexedDBPromise;\r\n        if (!canUseIndexedDB) {\r\n            return { heartbeats: [] };\r\n        }\r\n        else {\r\n            const idbHeartbeatObject = await readHeartbeatsFromIndexedDB(this.app);\r\n            return idbHeartbeatObject || { heartbeats: [] };\r\n        }\r\n    }\r\n    // overwrite the storage with the provided heartbeats\r\n    async overwrite(heartbeatsObject) {\r\n        var _a;\r\n        const canUseIndexedDB = await this._canUseIndexedDBPromise;\r\n        if (!canUseIndexedDB) {\r\n            return;\r\n        }\r\n        else {\r\n            const existingHeartbeatsObject = await this.read();\r\n            return writeHeartbeatsToIndexedDB(this.app, {\r\n                lastSentHeartbeatDate: (_a = heartbeatsObject.lastSentHeartbeatDate) !== null && _a !== void 0 ? _a : existingHeartbeatsObject.lastSentHeartbeatDate,\r\n                heartbeats: heartbeatsObject.heartbeats\r\n            });\r\n        }\r\n    }\r\n    // add heartbeats\r\n    async add(heartbeatsObject) {\r\n        var _a;\r\n        const canUseIndexedDB = await this._canUseIndexedDBPromise;\r\n        if (!canUseIndexedDB) {\r\n            return;\r\n        }\r\n        else {\r\n            const existingHeartbeatsObject = await this.read();\r\n            return writeHeartbeatsToIndexedDB(this.app, {\r\n                lastSentHeartbeatDate: (_a = heartbeatsObject.lastSentHeartbeatDate) !== null && _a !== void 0 ? _a : existingHeartbeatsObject.lastSentHeartbeatDate,\r\n                heartbeats: [\r\n                    ...existingHeartbeatsObject.heartbeats,\r\n                    ...heartbeatsObject.heartbeats\r\n                ]\r\n            });\r\n        }\r\n    }\r\n}\r\n/**\r\n * Calculate bytes of a HeartbeatsByUserAgent array after being wrapped\r\n * in a platform logging header JSON object, stringified, and converted\r\n * to base 64.\r\n */\r\nfunction countBytes(heartbeatsCache) {\r\n    // base64 has a restricted set of characters, all of which should be 1 byte.\r\n    return base64urlEncodeWithoutPadding(\r\n    // heartbeatsCache wrapper properties\r\n    JSON.stringify({ version: 2, heartbeats: heartbeatsCache })).length;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction registerCoreComponents(variant) {\r\n    _registerComponent(new Component('platform-logger', container => new PlatformLoggerServiceImpl(container), \"PRIVATE\" /* ComponentType.PRIVATE */));\r\n    _registerComponent(new Component('heartbeat', container => new HeartbeatServiceImpl(container), \"PRIVATE\" /* ComponentType.PRIVATE */));\r\n    // Register `app` package.\r\n    registerVersion(name$o, version$1, variant);\r\n    // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\r\n    registerVersion(name$o, version$1, 'esm2017');\r\n    // Register platform SDK identifier (no version).\r\n    registerVersion('fire-js', '');\r\n}\n\n/**\r\n * Firebase App\r\n *\r\n * @remarks This package coordinates the communication between the different Firebase components\r\n * @packageDocumentation\r\n */\r\nregisterCoreComponents('');\n\nexport { SDK_VERSION, DEFAULT_ENTRY_NAME as _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel };\n//# sourceMappingURL=index.esm2017.js.map\n","var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nvar esm = {};\n\n/*\n\n Copyright The Closure Library Authors.\n SPDX-License-Identifier: Apache-2.0\n*/\n\nvar k,goog=goog||{},l=commonjsGlobal||self;function aa(a){var b=typeof a;b=\"object\"!=b?b:a?Array.isArray(a)?\"array\":b:\"null\";return \"array\"==b||\"object\"==b&&\"number\"==typeof a.length}function p(a){var b=typeof a;return \"object\"==b&&null!=a||\"function\"==b}function ba(a){return Object.prototype.hasOwnProperty.call(a,ca)&&a[ca]||(a[ca]=++da)}var ca=\"closure_uid_\"+(1E9*Math.random()>>>0),da=0;function ea(a,b,c){return a.call.apply(a.bind,arguments)}\nfunction fa(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}}function q(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf(\"native code\")?q=ea:q=fa;return q.apply(null,arguments)}\nfunction ha(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}}function r(a,b){function c(){}c.prototype=b.prototype;a.$=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.ac=function(d,e,f){for(var h=Array(arguments.length-2),n=2;n<arguments.length;n++)h[n-2]=arguments[n];return b.prototype[e].apply(d,h)};}function v(){this.s=this.s;this.o=this.o;}var ia=0;v.prototype.s=!1;v.prototype.sa=function(){if(!this.s&&(this.s=!0,this.N(),0!=ia)){ba(this);}};v.prototype.N=function(){if(this.o)for(;this.o.length;)this.o.shift()();};const ka=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(\"string\"===typeof a)return \"string\"!==typeof b||1!=b.length?-1:a.indexOf(b,0);for(let c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return -1};function ma(a){const b=a.length;if(0<b){const c=Array(b);for(let d=0;d<b;d++)c[d]=a[d];return c}return []}\nfunction na(a,b){for(let c=1;c<arguments.length;c++){const d=arguments[c];if(aa(d)){const e=a.length||0,f=d.length||0;a.length=e+f;for(let h=0;h<f;h++)a[e+h]=d[h];}else a.push(d);}}function w(a,b){this.type=a;this.g=this.target=b;this.defaultPrevented=!1;}w.prototype.h=function(){this.defaultPrevented=!0;};var oa=function(){if(!l.addEventListener||!Object.defineProperty)return !1;var a=!1,b=Object.defineProperty({},\"passive\",{get:function(){a=!0;}});try{l.addEventListener(\"test\",()=>{},b),l.removeEventListener(\"test\",()=>{},b);}catch(c){}return a}();function x(a){return /^[\\s\\xa0]*$/.test(a)}function pa(){var a=l.navigator;return a&&(a=a.userAgent)?a:\"\"}function y(a){return -1!=pa().indexOf(a)}function qa(a){qa[\" \"](a);return a}qa[\" \"]=function(){};function ra(a,b){var c=sa;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)}var ta=y(\"Opera\"),z=y(\"Trident\")||y(\"MSIE\"),ua=y(\"Edge\"),va=ua||z,wa=y(\"Gecko\")&&!(-1!=pa().toLowerCase().indexOf(\"webkit\")&&!y(\"Edge\"))&&!(y(\"Trident\")||y(\"MSIE\"))&&!y(\"Edge\"),xa=-1!=pa().toLowerCase().indexOf(\"webkit\")&&!y(\"Edge\");function ya(){var a=l.document;return a?a.documentMode:void 0}var za;\na:{var Aa=\"\",Ba=function(){var a=pa();if(wa)return /rv:([^\\);]+)(\\)|;)/.exec(a);if(ua)return /Edge\\/([\\d\\.]+)/.exec(a);if(z)return /\\b(?:MSIE|rv)[: ]([^\\);]+)(\\)|;)/.exec(a);if(xa)return /WebKit\\/(\\S+)/.exec(a);if(ta)return /(?:Version)[ \\/]?(\\S+)/.exec(a)}();Ba&&(Aa=Ba?Ba[1]:\"\");if(z){var Ca=ya();if(null!=Ca&&Ca>parseFloat(Aa)){za=String(Ca);break a}}za=Aa;}var Da;if(l.document&&z){var Ea=ya();Da=Ea?Ea:parseInt(za,10)||void 0;}else Da=void 0;var Fa=Da;function A(a,b){w.call(this,a?a.type:\"\");this.relatedTarget=this.g=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=0;this.key=\"\";this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType=\"\";this.i=null;if(a){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.g=b;if(b=a.relatedTarget){if(wa){a:{try{qa(b.nodeName);var e=!0;break a}catch(f){}e=\n!1;}e||(b=null);}}else \"mouseover\"==c?b=a.fromElement:\"mouseout\"==c&&(b=a.toElement);this.relatedTarget=b;d?(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0):(this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.key=a.key||\"\";this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=\na.shiftKey;this.metaKey=a.metaKey;this.pointerId=a.pointerId||0;this.pointerType=\"string\"===typeof a.pointerType?a.pointerType:Ga[a.pointerType]||\"\";this.state=a.state;this.i=a;a.defaultPrevented&&A.$.h.call(this);}}r(A,w);var Ga={2:\"touch\",3:\"pen\",4:\"mouse\"};A.prototype.h=function(){A.$.h.call(this);var a=this.i;a.preventDefault?a.preventDefault():a.returnValue=!1;};var Ha=\"closure_listenable_\"+(1E6*Math.random()|0);var Ia=0;function Ja(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.la=e;this.key=++Ia;this.fa=this.ia=!1;}function Ka(a){a.fa=!0;a.listener=null;a.proxy=null;a.src=null;a.la=null;}function Na(a,b,c){for(const d in a)b.call(c,a[d],d,a);}function Oa(a,b){for(const c in a)b.call(void 0,a[c],c,a);}function Pa(a){const b={};for(const c in a)b[c]=a[c];return b}const Qa=\"constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf\".split(\" \");function Ra(a,b){let c,d;for(let e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(let f=0;f<Qa.length;f++)c=Qa[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c]);}}function Sa(a){this.src=a;this.g={};this.h=0;}Sa.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.g[f];a||(a=this.g[f]=[],this.h++);var h=Ta(a,b,d,e);-1<h?(b=a[h],c||(b.ia=!1)):(b=new Ja(b,this.src,f,!!d,e),b.ia=c,a.push(b));return b};function Ua(a,b){var c=b.type;if(c in a.g){var d=a.g[c],e=ka(d,b),f;(f=0<=e)&&Array.prototype.splice.call(d,e,1);f&&(Ka(b),0==a.g[c].length&&(delete a.g[c],a.h--));}}\nfunction Ta(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.fa&&f.listener==b&&f.capture==!!c&&f.la==d)return e}return -1}var Va=\"closure_lm_\"+(1E6*Math.random()|0),Wa={};function Ya(a,b,c,d,e){if(d&&d.once)return Za(a,b,c,d,e);if(Array.isArray(b)){for(var f=0;f<b.length;f++)Ya(a,b[f],c,d,e);return null}c=$a(c);return a&&a[Ha]?a.O(b,c,p(d)?!!d.capture:!!d,e):ab(a,b,c,!1,d,e)}\nfunction ab(a,b,c,d,e,f){if(!b)throw Error(\"Invalid event type\");var h=p(e)?!!e.capture:!!e,n=bb(a);n||(a[Va]=n=new Sa(a));c=n.add(b,c,d,h,f);if(c.proxy)return c;d=cb();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)oa||(e=h),void 0===e&&(e=!1),a.addEventListener(b.toString(),d,e);else if(a.attachEvent)a.attachEvent(db(b.toString()),d);else if(a.addListener&&a.removeListener)a.addListener(d);else throw Error(\"addEventListener and attachEvent are unavailable.\");return c}\nfunction cb(){function a(c){return b.call(a.src,a.listener,c)}const b=eb;return a}function Za(a,b,c,d,e){if(Array.isArray(b)){for(var f=0;f<b.length;f++)Za(a,b[f],c,d,e);return null}c=$a(c);return a&&a[Ha]?a.P(b,c,p(d)?!!d.capture:!!d,e):ab(a,b,c,!0,d,e)}\nfunction fb(a,b,c,d,e){if(Array.isArray(b))for(var f=0;f<b.length;f++)fb(a,b[f],c,d,e);else (d=p(d)?!!d.capture:!!d,c=$a(c),a&&a[Ha])?(a=a.i,b=String(b).toString(),b in a.g&&(f=a.g[b],c=Ta(f,c,d,e),-1<c&&(Ka(f[c]),Array.prototype.splice.call(f,c,1),0==f.length&&(delete a.g[b],a.h--)))):a&&(a=bb(a))&&(b=a.g[b.toString()],a=-1,b&&(a=Ta(b,c,d,e)),(c=-1<a?b[a]:null)&&gb(c));}\nfunction gb(a){if(\"number\"!==typeof a&&a&&!a.fa){var b=a.src;if(b&&b[Ha])Ua(b.i,a);else {var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(db(c),d):b.addListener&&b.removeListener&&b.removeListener(d);(c=bb(b))?(Ua(c,a),0==c.h&&(c.src=null,b[Va]=null)):Ka(a);}}}function db(a){return a in Wa?Wa[a]:Wa[a]=\"on\"+a}function eb(a,b){if(a.fa)a=!0;else {b=new A(b,this);var c=a.listener,d=a.la||a.src;a.ia&&gb(a);a=c.call(d,b);}return a}\nfunction bb(a){a=a[Va];return a instanceof Sa?a:null}var hb=\"__closure_events_fn_\"+(1E9*Math.random()>>>0);function $a(a){if(\"function\"===typeof a)return a;a[hb]||(a[hb]=function(b){return a.handleEvent(b)});return a[hb]}function B(){v.call(this);this.i=new Sa(this);this.S=this;this.J=null;}r(B,v);B.prototype[Ha]=!0;B.prototype.removeEventListener=function(a,b,c,d){fb(this,a,b,c,d);};\nfunction C(a,b){var c,d=a.J;if(d)for(c=[];d;d=d.J)c.push(d);a=a.S;d=b.type||b;if(\"string\"===typeof b)b=new w(b,a);else if(b instanceof w)b.target=b.target||a;else {var e=b;b=new w(d,a);Ra(b,e);}e=!0;if(c)for(var f=c.length-1;0<=f;f--){var h=b.g=c[f];e=ib(h,d,!0,b)&&e;}h=b.g=a;e=ib(h,d,!0,b)&&e;e=ib(h,d,!1,b)&&e;if(c)for(f=0;f<c.length;f++)h=b.g=c[f],e=ib(h,d,!1,b)&&e;}\nB.prototype.N=function(){B.$.N.call(this);if(this.i){var a=this.i,c;for(c in a.g){for(var d=a.g[c],e=0;e<d.length;e++)Ka(d[e]);delete a.g[c];a.h--;}}this.J=null;};B.prototype.O=function(a,b,c,d){return this.i.add(String(a),b,!1,c,d)};B.prototype.P=function(a,b,c,d){return this.i.add(String(a),b,!0,c,d)};\nfunction ib(a,b,c,d){b=a.i.g[String(b)];if(!b)return !0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var h=b[f];if(h&&!h.fa&&h.capture==c){var n=h.listener,t=h.la||h.src;h.ia&&Ua(a.i,h);e=!1!==n.call(t,d)&&e;}}return e&&!d.defaultPrevented}var jb=l.JSON.stringify;class kb{constructor(a,b){this.i=a;this.j=b;this.h=0;this.g=null;}get(){let a;0<this.h?(this.h--,a=this.g,this.g=a.next,a.next=null):a=this.i();return a}}function lb(){var a=mb;let b=null;a.g&&(b=a.g,a.g=a.g.next,a.g||(a.h=null),b.next=null);return b}class nb{constructor(){this.h=this.g=null;}add(a,b){const c=ob.get();c.set(a,b);this.h?this.h.next=c:this.g=c;this.h=c;}}var ob=new kb(()=>new pb,a=>a.reset());class pb{constructor(){this.next=this.g=this.h=null;}set(a,b){this.h=a;this.g=b;this.next=null;}reset(){this.next=this.g=this.h=null;}}function qb(a){var b=1;a=a.split(\":\");const c=[];for(;0<b&&a.length;)c.push(a.shift()),b--;a.length&&c.push(a.join(\":\"));return c}function rb(a){l.setTimeout(()=>{throw a;},0);}let sb,tb=!1,mb=new nb,vb=()=>{const a=l.Promise.resolve(void 0);sb=()=>{a.then(ub);};};var ub=()=>{for(var a;a=lb();){try{a.h.call(a.g);}catch(c){rb(c);}var b=ob;b.j(a);100>b.h&&(b.h++,a.next=b.g,b.g=a);}tb=!1;};function wb(a,b){B.call(this);this.h=a||1;this.g=b||l;this.j=q(this.qb,this);this.l=Date.now();}r(wb,B);k=wb.prototype;k.ga=!1;k.T=null;k.qb=function(){if(this.ga){var a=Date.now()-this.l;0<a&&a<.8*this.h?this.T=this.g.setTimeout(this.j,this.h-a):(this.T&&(this.g.clearTimeout(this.T),this.T=null),C(this,\"tick\"),this.ga&&(xb(this),this.start()));}};k.start=function(){this.ga=!0;this.T||(this.T=this.g.setTimeout(this.j,this.h),this.l=Date.now());};\nfunction xb(a){a.ga=!1;a.T&&(a.g.clearTimeout(a.T),a.T=null);}k.N=function(){wb.$.N.call(this);xb(this);delete this.g;};function yb(a,b,c){if(\"function\"===typeof a)c&&(a=q(a,c));else if(a&&\"function\"==typeof a.handleEvent)a=q(a.handleEvent,a);else throw Error(\"Invalid listener argument\");return 2147483647<Number(b)?-1:l.setTimeout(a,b||0)}function zb(a){a.g=yb(()=>{a.g=null;a.i&&(a.i=!1,zb(a));},a.j);const b=a.h;a.h=null;a.m.apply(null,b);}class Ab extends v{constructor(a,b){super();this.m=a;this.j=b;this.h=null;this.i=!1;this.g=null;}l(a){this.h=arguments;this.g?this.i=!0:zb(this);}N(){super.N();this.g&&(l.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null);}}function Bb(a){v.call(this);this.h=a;this.g={};}r(Bb,v);var Cb=[];function Db(a,b,c,d){Array.isArray(c)||(c&&(Cb[0]=c.toString()),c=Cb);for(var e=0;e<c.length;e++){var f=Ya(b,c[e],d||a.handleEvent,!1,a.h||a);if(!f)break;a.g[f.key]=f;}}function Fb(a){Na(a.g,function(b,c){this.g.hasOwnProperty(c)&&gb(b);},a);a.g={};}Bb.prototype.N=function(){Bb.$.N.call(this);Fb(this);};Bb.prototype.handleEvent=function(){throw Error(\"EventHandler.handleEvent not implemented\");};function Gb(){this.g=!0;}Gb.prototype.Ea=function(){this.g=!1;};function Hb(a,b,c,d,e,f){a.info(function(){if(a.g)if(f){var h=\"\";for(var n=f.split(\"&\"),t=0;t<n.length;t++){var m=n[t].split(\"=\");if(1<m.length){var u=m[0];m=m[1];var L=u.split(\"_\");h=2<=L.length&&\"type\"==L[1]?h+(u+\"=\"+m+\"&\"):h+(u+\"=redacted&\");}}}else h=null;else h=f;return \"XMLHTTP REQ (\"+d+\") [attempt \"+e+\"]: \"+b+\"\\n\"+c+\"\\n\"+h});}\nfunction Ib(a,b,c,d,e,f,h){a.info(function(){return \"XMLHTTP RESP (\"+d+\") [ attempt \"+e+\"]: \"+b+\"\\n\"+c+\"\\n\"+f+\" \"+h});}function D(a,b,c,d){a.info(function(){return \"XMLHTTP TEXT (\"+b+\"): \"+Jb(a,c)+(d?\" \"+d:\"\")});}function Kb(a,b){a.info(function(){return \"TIMEOUT: \"+b});}Gb.prototype.info=function(){};\nfunction Jb(a,b){if(!a.g)return b;if(!b)return null;try{var c=JSON.parse(b);if(c)for(a=0;a<c.length;a++)if(Array.isArray(c[a])){var d=c[a];if(!(2>d.length)){var e=d[1];if(Array.isArray(e)&&!(1>e.length)){var f=e[0];if(\"noop\"!=f&&\"stop\"!=f&&\"close\"!=f)for(var h=1;h<e.length;h++)e[h]=\"\";}}}return jb(c)}catch(n){return b}}var E={},Lb=null;function Mb(){return Lb=Lb||new B}E.Ta=\"serverreachability\";function Nb(a){w.call(this,E.Ta,a);}r(Nb,w);function Ob(a){const b=Mb();C(b,new Nb(b));}E.STAT_EVENT=\"statevent\";function Pb(a,b){w.call(this,E.STAT_EVENT,a);this.stat=b;}r(Pb,w);function F(a){const b=Mb();C(b,new Pb(b,a));}E.Ua=\"timingevent\";function Qb(a,b){w.call(this,E.Ua,a);this.size=b;}r(Qb,w);\nfunction Rb(a,b){if(\"function\"!==typeof a)throw Error(\"Fn must not be null and must be a function\");return l.setTimeout(function(){a();},b)}var Sb={NO_ERROR:0,rb:1,Eb:2,Db:3,yb:4,Cb:5,Fb:6,Qa:7,TIMEOUT:8,Ib:9};var Tb={wb:\"complete\",Sb:\"success\",Ra:\"error\",Qa:\"abort\",Kb:\"ready\",Lb:\"readystatechange\",TIMEOUT:\"timeout\",Gb:\"incrementaldata\",Jb:\"progress\",zb:\"downloadprogress\",$b:\"uploadprogress\"};function Ub(){}Ub.prototype.h=null;function Vb(a){return a.h||(a.h=a.i())}function Wb(){}var Xb={OPEN:\"a\",vb:\"b\",Ra:\"c\",Hb:\"d\"};function Yb(){w.call(this,\"d\");}r(Yb,w);function Zb(){w.call(this,\"c\");}r(Zb,w);var $b;function ac(){}r(ac,Ub);ac.prototype.g=function(){return new XMLHttpRequest};ac.prototype.i=function(){return {}};$b=new ac;function bc(a,b,c,d){this.l=a;this.j=b;this.m=c;this.W=d||1;this.U=new Bb(this);this.P=cc;a=va?125:void 0;this.V=new wb(a);this.I=null;this.i=!1;this.s=this.A=this.v=this.L=this.G=this.Y=this.B=null;this.F=[];this.g=null;this.C=0;this.o=this.u=null;this.ca=-1;this.J=!1;this.O=0;this.M=null;this.ba=this.K=this.aa=this.S=!1;this.h=new dc;}function dc(){this.i=null;this.g=\"\";this.h=!1;}var cc=45E3,ec={},fc={};k=bc.prototype;k.setTimeout=function(a){this.P=a;};\nfunction gc(a,b,c){a.L=1;a.v=hc(G(b));a.s=c;a.S=!0;ic(a,null);}function ic(a,b){a.G=Date.now();jc(a);a.A=G(a.v);var c=a.A,d=a.W;Array.isArray(d)||(d=[String(d)]);kc(c.i,\"t\",d);a.C=0;c=a.l.J;a.h=new dc;a.g=lc(a.l,c?b:null,!a.s);0<a.O&&(a.M=new Ab(q(a.Pa,a,a.g),a.O));Db(a.U,a.g,\"readystatechange\",a.nb);b=a.I?Pa(a.I):{};a.s?(a.u||(a.u=\"POST\"),b[\"Content-Type\"]=\"application/x-www-form-urlencoded\",a.g.ha(a.A,a.u,a.s,b)):(a.u=\"GET\",a.g.ha(a.A,a.u,null,b));Ob();Hb(a.j,a.u,a.A,a.m,a.W,a.s);}\nk.nb=function(a){a=a.target;const b=this.M;b&&3==H(a)?b.l():this.Pa(a);};\nk.Pa=function(a){try{if(a==this.g)a:{const u=H(this.g);var b=this.g.Ia();const L=this.g.da();if(!(3>u)&&(3!=u||va||this.g&&(this.h.h||this.g.ja()||mc(this.g)))){this.J||4!=u||7==b||(8==b||0>=L?Ob(3):Ob(2));nc(this);var c=this.g.da();this.ca=c;b:if(oc(this)){var d=mc(this.g);a=\"\";var e=d.length,f=4==H(this.g);if(!this.h.i){if(\"undefined\"===typeof TextDecoder){I(this);pc(this);var h=\"\";break b}this.h.i=new l.TextDecoder;}for(b=0;b<e;b++)this.h.h=!0,a+=this.h.i.decode(d[b],{stream:f&&b==e-1});d.splice(0,\ne);this.h.g+=a;this.C=0;h=this.h.g;}else h=this.g.ja();this.i=200==c;Ib(this.j,this.u,this.A,this.m,this.W,u,c);if(this.i){if(this.aa&&!this.K){b:{if(this.g){var n,t=this.g;if((n=t.g?t.g.getResponseHeader(\"X-HTTP-Initial-Response\"):null)&&!x(n)){var m=n;break b}}m=null;}if(c=m)D(this.j,this.m,c,\"Initial handshake response via X-HTTP-Initial-Response\"),this.K=!0,qc(this,c);else {this.i=!1;this.o=3;F(12);I(this);pc(this);break a}}this.S?(rc(this,u,h),va&&this.i&&3==u&&(Db(this.U,this.V,\"tick\",this.mb),\nthis.V.start())):(D(this.j,this.m,h,null),qc(this,h));4==u&&I(this);this.i&&!this.J&&(4==u?sc(this.l,this):(this.i=!1,jc(this)));}else tc(this.g),400==c&&0<h.indexOf(\"Unknown SID\")?(this.o=3,F(12)):(this.o=0,F(13)),I(this),pc(this);}}}catch(u){}finally{}};function oc(a){return a.g?\"GET\"==a.u&&2!=a.L&&a.l.Ha:!1}\nfunction rc(a,b,c){let d=!0,e;for(;!a.J&&a.C<c.length;)if(e=uc(a,c),e==fc){4==b&&(a.o=4,F(14),d=!1);D(a.j,a.m,null,\"[Incomplete Response]\");break}else if(e==ec){a.o=4;F(15);D(a.j,a.m,c,\"[Invalid Chunk]\");d=!1;break}else D(a.j,a.m,e,null),qc(a,e);oc(a)&&e!=fc&&e!=ec&&(a.h.g=\"\",a.C=0);4!=b||0!=c.length||a.h.h||(a.o=1,F(16),d=!1);a.i=a.i&&d;d?0<c.length&&!a.ba&&(a.ba=!0,b=a.l,b.g==a&&b.ca&&!b.M&&(b.l.info(\"Great, no buffering proxy detected. Bytes received: \"+c.length),vc(b),b.M=!0,F(11))):(D(a.j,a.m,\nc,\"[Invalid Chunked Response]\"),I(a),pc(a));}k.mb=function(){if(this.g){var a=H(this.g),b=this.g.ja();this.C<b.length&&(nc(this),rc(this,a,b),this.i&&4!=a&&jc(this));}};function uc(a,b){var c=a.C,d=b.indexOf(\"\\n\",c);if(-1==d)return fc;c=Number(b.substring(c,d));if(isNaN(c))return ec;d+=1;if(d+c>b.length)return fc;b=b.slice(d,d+c);a.C=d+c;return b}k.cancel=function(){this.J=!0;I(this);};function jc(a){a.Y=Date.now()+a.P;wc(a,a.P);}\nfunction wc(a,b){if(null!=a.B)throw Error(\"WatchDog timer not null\");a.B=Rb(q(a.lb,a),b);}function nc(a){a.B&&(l.clearTimeout(a.B),a.B=null);}k.lb=function(){this.B=null;const a=Date.now();0<=a-this.Y?(Kb(this.j,this.A),2!=this.L&&(Ob(),F(17)),I(this),this.o=2,pc(this)):wc(this,this.Y-a);};function pc(a){0==a.l.H||a.J||sc(a.l,a);}function I(a){nc(a);var b=a.M;b&&\"function\"==typeof b.sa&&b.sa();a.M=null;xb(a.V);Fb(a.U);a.g&&(b=a.g,a.g=null,b.abort(),b.sa());}\nfunction qc(a,b){try{var c=a.l;if(0!=c.H&&(c.g==a||xc(c.i,a)))if(!a.K&&xc(c.i,a)&&3==c.H){try{var d=c.Ja.g.parse(b);}catch(m){d=null;}if(Array.isArray(d)&&3==d.length){var e=d;if(0==e[0])a:{if(!c.u){if(c.g)if(c.g.G+3E3<a.G)yc(c),zc(c);else break a;Ac(c);F(18);}}else c.Fa=e[1],0<c.Fa-c.V&&37500>e[2]&&c.G&&0==c.A&&!c.v&&(c.v=Rb(q(c.ib,c),6E3));if(1>=Bc(c.i)&&c.oa){try{c.oa();}catch(m){}c.oa=void 0;}}else J(c,11);}else if((a.K||c.g==a)&&yc(c),!x(b))for(e=c.Ja.g.parse(b),b=0;b<e.length;b++){let m=e[b];c.V=\nm[0];m=m[1];if(2==c.H)if(\"c\"==m[0]){c.K=m[1];c.pa=m[2];const u=m[3];null!=u&&(c.ra=u,c.l.info(\"VER=\"+c.ra));const L=m[4];null!=L&&(c.Ga=L,c.l.info(\"SVER=\"+c.Ga));const La=m[5];null!=La&&\"number\"===typeof La&&0<La&&(d=1.5*La,c.L=d,c.l.info(\"backChannelRequestTimeoutMs_=\"+d));d=c;const la=a.g;if(la){const Ma=la.g?la.g.getResponseHeader(\"X-Client-Wire-Protocol\"):null;if(Ma){var f=d.i;f.g||-1==Ma.indexOf(\"spdy\")&&-1==Ma.indexOf(\"quic\")&&-1==Ma.indexOf(\"h2\")||(f.j=f.l,f.g=new Set,f.h&&(Cc(f,f.h),f.h=null));}if(d.F){const Eb=\nla.g?la.g.getResponseHeader(\"X-HTTP-Session-Id\"):null;Eb&&(d.Da=Eb,K(d.I,d.F,Eb));}}c.H=3;c.h&&c.h.Ba();c.ca&&(c.S=Date.now()-a.G,c.l.info(\"Handshake RTT: \"+c.S+\"ms\"));d=c;var h=a;d.wa=Dc(d,d.J?d.pa:null,d.Y);if(h.K){Ec(d.i,h);var n=h,t=d.L;t&&n.setTimeout(t);n.B&&(nc(n),jc(n));d.g=h;}else Fc(d);0<c.j.length&&Gc(c);}else \"stop\"!=m[0]&&\"close\"!=m[0]||J(c,7);else 3==c.H&&(\"stop\"==m[0]||\"close\"==m[0]?\"stop\"==m[0]?J(c,7):Hc(c):\"noop\"!=m[0]&&c.h&&c.h.Aa(m),c.A=0);}Ob(4);}catch(m){}}function Ic(a){if(a.Z&&\"function\"==typeof a.Z)return a.Z();if(\"undefined\"!==typeof Map&&a instanceof Map||\"undefined\"!==typeof Set&&a instanceof Set)return Array.from(a.values());if(\"string\"===typeof a)return a.split(\"\");if(aa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}b=[];c=0;for(d in a)b[c++]=a[d];return b}\nfunction Jc(a){if(a.ta&&\"function\"==typeof a.ta)return a.ta();if(!a.Z||\"function\"!=typeof a.Z){if(\"undefined\"!==typeof Map&&a instanceof Map)return Array.from(a.keys());if(!(\"undefined\"!==typeof Set&&a instanceof Set)){if(aa(a)||\"string\"===typeof a){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}b=[];c=0;for(const d in a)b[c++]=d;return b}}}\nfunction Kc(a,b){if(a.forEach&&\"function\"==typeof a.forEach)a.forEach(b,void 0);else if(aa(a)||\"string\"===typeof a)Array.prototype.forEach.call(a,b,void 0);else for(var c=Jc(a),d=Ic(a),e=d.length,f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],a);}var Lc=RegExp(\"^(?:([^:/?#.]+):)?(?://(?:([^\\\\\\\\/?#]*)@)?([^\\\\\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\\\\\/?#]|$))?([^?#]+)?(?:\\\\?([^#]*))?(?:#([\\\\s\\\\S]*))?$\");function Mc(a,b){if(a){a=a.split(\"&\");for(var c=0;c<a.length;c++){var d=a[c].indexOf(\"=\"),e=null;if(0<=d){var f=a[c].substring(0,d);e=a[c].substring(d+1);}else f=a[c];b(f,e?decodeURIComponent(e.replace(/\\+/g,\" \")):\"\");}}}function M(a){this.g=this.s=this.j=\"\";this.m=null;this.o=this.l=\"\";this.h=!1;if(a instanceof M){this.h=a.h;Nc(this,a.j);this.s=a.s;this.g=a.g;Oc(this,a.m);this.l=a.l;var b=a.i;var c=new Pc;c.i=b.i;b.g&&(c.g=new Map(b.g),c.h=b.h);Qc(this,c);this.o=a.o;}else a&&(b=String(a).match(Lc))?(this.h=!1,Nc(this,b[1]||\"\",!0),this.s=Rc(b[2]||\"\"),this.g=Rc(b[3]||\"\",!0),Oc(this,b[4]),this.l=Rc(b[5]||\"\",!0),Qc(this,b[6]||\"\",!0),this.o=Rc(b[7]||\"\")):(this.h=!1,this.i=new Pc(null,this.h));}\nM.prototype.toString=function(){var a=[],b=this.j;b&&a.push(Sc(b,Tc,!0),\":\");var c=this.g;if(c||\"file\"==b)a.push(\"//\"),(b=this.s)&&a.push(Sc(b,Tc,!0),\"@\"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,\"%$1\")),c=this.m,null!=c&&a.push(\":\",String(c));if(c=this.l)this.g&&\"/\"!=c.charAt(0)&&a.push(\"/\"),a.push(Sc(c,\"/\"==c.charAt(0)?Uc:Vc,!0));(c=this.i.toString())&&a.push(\"?\",c);(c=this.o)&&a.push(\"#\",Sc(c,Wc));return a.join(\"\")};function G(a){return new M(a)}\nfunction Nc(a,b,c){a.j=c?Rc(b,!0):b;a.j&&(a.j=a.j.replace(/:$/,\"\"));}function Oc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error(\"Bad port number \"+b);a.m=b;}else a.m=null;}function Qc(a,b,c){b instanceof Pc?(a.i=b,Xc(a.i,a.h)):(c||(b=Sc(b,Yc)),a.i=new Pc(b,a.h));}function K(a,b,c){a.i.set(b,c);}function hc(a){K(a,\"zx\",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36));return a}\nfunction Rc(a,b){return a?b?decodeURI(a.replace(/%25/g,\"%2525\")):decodeURIComponent(a):\"\"}function Sc(a,b,c){return \"string\"===typeof a?(a=encodeURI(a).replace(b,Zc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,\"%$1\")),a):null}function Zc(a){a=a.charCodeAt(0);return \"%\"+(a>>4&15).toString(16)+(a&15).toString(16)}var Tc=/[#\\/\\?@]/g,Vc=/[#\\?:]/g,Uc=/[#\\?]/g,Yc=/[#\\?@]/g,Wc=/#/g;function Pc(a,b){this.h=this.g=null;this.i=a||null;this.j=!!b;}\nfunction N(a){a.g||(a.g=new Map,a.h=0,a.i&&Mc(a.i,function(b,c){a.add(decodeURIComponent(b.replace(/\\+/g,\" \")),c);}));}k=Pc.prototype;k.add=function(a,b){N(this);this.i=null;a=O(this,a);var c=this.g.get(a);c||this.g.set(a,c=[]);c.push(b);this.h+=1;return this};function $c(a,b){N(a);b=O(a,b);a.g.has(b)&&(a.i=null,a.h-=a.g.get(b).length,a.g.delete(b));}function ad(a,b){N(a);b=O(a,b);return a.g.has(b)}\nk.forEach=function(a,b){N(this);this.g.forEach(function(c,d){c.forEach(function(e){a.call(b,e,d,this);},this);},this);};k.ta=function(){N(this);const a=Array.from(this.g.values()),b=Array.from(this.g.keys()),c=[];for(let d=0;d<b.length;d++){const e=a[d];for(let f=0;f<e.length;f++)c.push(b[d]);}return c};k.Z=function(a){N(this);let b=[];if(\"string\"===typeof a)ad(this,a)&&(b=b.concat(this.g.get(O(this,a))));else {a=Array.from(this.g.values());for(let c=0;c<a.length;c++)b=b.concat(a[c]);}return b};\nk.set=function(a,b){N(this);this.i=null;a=O(this,a);ad(this,a)&&(this.h-=this.g.get(a).length);this.g.set(a,[b]);this.h+=1;return this};k.get=function(a,b){if(!a)return b;a=this.Z(a);return 0<a.length?String(a[0]):b};function kc(a,b,c){$c(a,b);0<c.length&&(a.i=null,a.g.set(O(a,b),ma(c)),a.h+=c.length);}\nk.toString=function(){if(this.i)return this.i;if(!this.g)return \"\";const a=[],b=Array.from(this.g.keys());for(var c=0;c<b.length;c++){var d=b[c];const f=encodeURIComponent(String(d)),h=this.Z(d);for(d=0;d<h.length;d++){var e=f;\"\"!==h[d]&&(e+=\"=\"+encodeURIComponent(String(h[d])));a.push(e);}}return this.i=a.join(\"&\")};function O(a,b){b=String(b);a.j&&(b=b.toLowerCase());return b}\nfunction Xc(a,b){b&&!a.j&&(N(a),a.i=null,a.g.forEach(function(c,d){var e=d.toLowerCase();d!=e&&($c(this,d),kc(this,e,c));},a));a.j=b;}var bd=class{constructor(a,b){this.g=a;this.map=b;}};function cd(a){this.l=a||dd;l.PerformanceNavigationTiming?(a=l.performance.getEntriesByType(\"navigation\"),a=0<a.length&&(\"hq\"==a[0].nextHopProtocol||\"h2\"==a[0].nextHopProtocol)):a=!!(l.g&&l.g.Ka&&l.g.Ka()&&l.g.Ka().ec);this.j=a?this.l:1;this.g=null;1<this.j&&(this.g=new Set);this.h=null;this.i=[];}var dd=10;function ed(a){return a.h?!0:a.g?a.g.size>=a.j:!1}function Bc(a){return a.h?1:a.g?a.g.size:0}function xc(a,b){return a.h?a.h==b:a.g?a.g.has(b):!1}function Cc(a,b){a.g?a.g.add(b):a.h=b;}\nfunction Ec(a,b){a.h&&a.h==b?a.h=null:a.g&&a.g.has(b)&&a.g.delete(b);}cd.prototype.cancel=function(){this.i=fd(this);if(this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const a of this.g.values())a.cancel();this.g.clear();}};function fd(a){if(null!=a.h)return a.i.concat(a.h.F);if(null!=a.g&&0!==a.g.size){let b=a.i;for(const c of a.g.values())b=b.concat(c.F);return b}return ma(a.i)}var gd=class{stringify(a){return l.JSON.stringify(a,void 0)}parse(a){return l.JSON.parse(a,void 0)}};function hd(){this.g=new gd;}function id(a,b,c){const d=c||\"\";try{Kc(a,function(e,f){let h=e;p(e)&&(h=jb(e));b.push(d+f+\"=\"+encodeURIComponent(h));});}catch(e){throw b.push(d+\"type=\"+encodeURIComponent(\"_badmap\")),e;}}function jd(a,b){const c=new Gb;if(l.Image){const d=new Image;d.onload=ha(kd,c,d,\"TestLoadImage: loaded\",!0,b);d.onerror=ha(kd,c,d,\"TestLoadImage: error\",!1,b);d.onabort=ha(kd,c,d,\"TestLoadImage: abort\",!1,b);d.ontimeout=ha(kd,c,d,\"TestLoadImage: timeout\",!1,b);l.setTimeout(function(){if(d.ontimeout)d.ontimeout();},1E4);d.src=a;}else b(!1);}function kd(a,b,c,d,e){try{b.onload=null,b.onerror=null,b.onabort=null,b.ontimeout=null,e(d);}catch(f){}}function ld(a){this.l=a.fc||null;this.j=a.ob||!1;}r(ld,Ub);ld.prototype.g=function(){return new md(this.l,this.j)};ld.prototype.i=function(a){return function(){return a}}({});function md(a,b){B.call(this);this.F=a;this.u=b;this.m=void 0;this.readyState=nd;this.status=0;this.responseType=this.responseText=this.response=this.statusText=\"\";this.onreadystatechange=null;this.v=new Headers;this.h=null;this.C=\"GET\";this.B=\"\";this.g=!1;this.A=this.j=this.l=null;}r(md,B);var nd=0;k=md.prototype;\nk.open=function(a,b){if(this.readyState!=nd)throw this.abort(),Error(\"Error reopening a connection\");this.C=a;this.B=b;this.readyState=1;od(this);};k.send=function(a){if(1!=this.readyState)throw this.abort(),Error(\"need to call open() first. \");this.g=!0;const b={headers:this.v,method:this.C,credentials:this.m,cache:void 0};a&&(b.body=a);(this.F||l).fetch(new Request(this.B,b)).then(this.$a.bind(this),this.ka.bind(this));};\nk.abort=function(){this.response=this.responseText=\"\";this.v=new Headers;this.status=0;this.j&&this.j.cancel(\"Request was aborted.\").catch(()=>{});1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,pd(this));this.readyState=nd;};\nk.$a=function(a){if(this.g&&(this.l=a,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=a.headers,this.readyState=2,od(this)),this.g&&(this.readyState=3,od(this),this.g)))if(\"arraybuffer\"===this.responseType)a.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(\"undefined\"!==typeof l.ReadableStream&&\"body\"in a){this.j=a.body.getReader();if(this.u){if(this.responseType)throw Error('responseType must be empty for \"streamBinaryChunks\" mode responses.');this.response=\n[];}else this.response=this.responseText=\"\",this.A=new TextDecoder;qd(this);}else a.text().then(this.Za.bind(this),this.ka.bind(this));};function qd(a){a.j.read().then(a.Xa.bind(a)).catch(a.ka.bind(a));}k.Xa=function(a){if(this.g){if(this.u&&a.value)this.response.push(a.value);else if(!this.u){var b=a.value?a.value:new Uint8Array(0);if(b=this.A.decode(b,{stream:!a.done}))this.response=this.responseText+=b;}a.done?pd(this):od(this);3==this.readyState&&qd(this);}};\nk.Za=function(a){this.g&&(this.response=this.responseText=a,pd(this));};k.Ya=function(a){this.g&&(this.response=a,pd(this));};k.ka=function(){this.g&&pd(this);};function pd(a){a.readyState=4;a.l=null;a.j=null;a.A=null;od(a);}k.setRequestHeader=function(a,b){this.v.append(a,b);};k.getResponseHeader=function(a){return this.h?this.h.get(a.toLowerCase())||\"\":\"\"};\nk.getAllResponseHeaders=function(){if(!this.h)return \"\";const a=[],b=this.h.entries();for(var c=b.next();!c.done;)c=c.value,a.push(c[0]+\": \"+c[1]),c=b.next();return a.join(\"\\r\\n\")};function od(a){a.onreadystatechange&&a.onreadystatechange.call(a);}Object.defineProperty(md.prototype,\"withCredentials\",{get:function(){return \"include\"===this.m},set:function(a){this.m=a?\"include\":\"same-origin\";}});var rd=l.JSON.parse;function P(a){B.call(this);this.headers=new Map;this.u=a||null;this.h=!1;this.C=this.g=null;this.I=\"\";this.m=0;this.j=\"\";this.l=this.G=this.v=this.F=!1;this.B=0;this.A=null;this.K=sd;this.L=this.M=!1;}r(P,B);var sd=\"\",td=/^https?$/i,ud=[\"POST\",\"PUT\"];k=P.prototype;k.Oa=function(a){this.M=a;};\nk.ha=function(a,b,c,d){if(this.g)throw Error(\"[goog.net.XhrIo] Object is active with another request=\"+this.I+\"; newUri=\"+a);b=b?b.toUpperCase():\"GET\";this.I=a;this.j=\"\";this.m=0;this.F=!1;this.h=!0;this.g=this.u?this.u.g():$b.g();this.C=this.u?Vb(this.u):Vb($b);this.g.onreadystatechange=q(this.La,this);try{this.G=!0,this.g.open(b,String(a),!0),this.G=!1;}catch(f){vd(this,f);return}a=c||\"\";c=new Map(this.headers);if(d)if(Object.getPrototypeOf(d)===Object.prototype)for(var e in d)c.set(e,d[e]);else if(\"function\"===\ntypeof d.keys&&\"function\"===typeof d.get)for(const f of d.keys())c.set(f,d.get(f));else throw Error(\"Unknown input type for opt_headers: \"+String(d));d=Array.from(c.keys()).find(f=>\"content-type\"==f.toLowerCase());e=l.FormData&&a instanceof l.FormData;!(0<=ka(ud,b))||d||e||c.set(\"Content-Type\",\"application/x-www-form-urlencoded;charset=utf-8\");for(const [f,h]of c)this.g.setRequestHeader(f,h);this.K&&(this.g.responseType=this.K);\"withCredentials\"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=\nthis.M);try{wd(this),0<this.B&&((this.L=xd(this.g))?(this.g.timeout=this.B,this.g.ontimeout=q(this.ua,this)):this.A=yb(this.ua,this.B,this)),this.v=!0,this.g.send(a),this.v=!1;}catch(f){vd(this,f);}};function xd(a){return z&&\"number\"===typeof a.timeout&&void 0!==a.ontimeout}k.ua=function(){\"undefined\"!=typeof goog&&this.g&&(this.j=\"Timed out after \"+this.B+\"ms, aborting\",this.m=8,C(this,\"timeout\"),this.abort(8));};function vd(a,b){a.h=!1;a.g&&(a.l=!0,a.g.abort(),a.l=!1);a.j=b;a.m=5;yd(a);zd(a);}\nfunction yd(a){a.F||(a.F=!0,C(a,\"complete\"),C(a,\"error\"));}k.abort=function(a){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=a||7,C(this,\"complete\"),C(this,\"abort\"),zd(this));};k.N=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),zd(this,!0));P.$.N.call(this);};k.La=function(){this.s||(this.G||this.v||this.l?Ad(this):this.kb());};k.kb=function(){Ad(this);};\nfunction Ad(a){if(a.h&&\"undefined\"!=typeof goog&&(!a.C[1]||4!=H(a)||2!=a.da()))if(a.v&&4==H(a))yb(a.La,0,a);else if(C(a,\"readystatechange\"),4==H(a)){a.h=!1;try{const h=a.da();a:switch(h){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var b=!0;break a;default:b=!1;}var c;if(!(c=b)){var d;if(d=0===h){var e=String(a.I).match(Lc)[1]||null;!e&&l.self&&l.self.location&&(e=l.self.location.protocol.slice(0,-1));d=!td.test(e?e.toLowerCase():\"\");}c=d;}if(c)C(a,\"complete\"),C(a,\"success\");else {a.m=\n6;try{var f=2<H(a)?a.g.statusText:\"\";}catch(n){f=\"\";}a.j=f+\" [\"+a.da()+\"]\";yd(a);}}finally{zd(a);}}}function zd(a,b){if(a.g){wd(a);const c=a.g,d=a.C[0]?()=>{}:null;a.g=null;a.C=null;b||C(a,\"ready\");try{c.onreadystatechange=d;}catch(e){}}}function wd(a){a.g&&a.L&&(a.g.ontimeout=null);a.A&&(l.clearTimeout(a.A),a.A=null);}k.isActive=function(){return !!this.g};function H(a){return a.g?a.g.readyState:0}k.da=function(){try{return 2<H(this)?this.g.status:-1}catch(a){return -1}};\nk.ja=function(){try{return this.g?this.g.responseText:\"\"}catch(a){return \"\"}};k.Wa=function(a){if(this.g){var b=this.g.responseText;a&&0==b.indexOf(a)&&(b=b.substring(a.length));return rd(b)}};function mc(a){try{if(!a.g)return null;if(\"response\"in a.g)return a.g.response;switch(a.K){case sd:case \"text\":return a.g.responseText;case \"arraybuffer\":if(\"mozResponseArrayBuffer\"in a.g)return a.g.mozResponseArrayBuffer}return null}catch(b){return null}}\nfunction tc(a){const b={};a=(a.g&&2<=H(a)?a.g.getAllResponseHeaders()||\"\":\"\").split(\"\\r\\n\");for(let d=0;d<a.length;d++){if(x(a[d]))continue;var c=qb(a[d]);const e=c[0];c=c[1];if(\"string\"!==typeof c)continue;c=c.trim();const f=b[e]||[];b[e]=f;f.push(c);}Oa(b,function(d){return d.join(\", \")});}k.Ia=function(){return this.m};k.Sa=function(){return \"string\"===typeof this.j?this.j:String(this.j)};function Bd(a){let b=\"\";Na(a,function(c,d){b+=d;b+=\":\";b+=c;b+=\"\\r\\n\";});return b}function Cd(a,b,c){a:{for(d in c){var d=!1;break a}d=!0;}d||(c=Bd(c),\"string\"===typeof a?(null!=c&&encodeURIComponent(String(c))):K(a,b,c));}function Dd(a,b,c){return c&&c.internalChannelParams?c.internalChannelParams[a]||b:b}\nfunction Ed(a){this.Ga=0;this.j=[];this.l=new Gb;this.pa=this.wa=this.I=this.Y=this.g=this.Da=this.F=this.na=this.o=this.U=this.s=null;this.fb=this.W=0;this.cb=Dd(\"failFast\",!1,a);this.G=this.v=this.u=this.m=this.h=null;this.aa=!0;this.Fa=this.V=-1;this.ba=this.A=this.C=0;this.ab=Dd(\"baseRetryDelayMs\",5E3,a);this.hb=Dd(\"retryDelaySeedMs\",1E4,a);this.eb=Dd(\"forwardChannelMaxRetries\",2,a);this.xa=Dd(\"forwardChannelRequestTimeoutMs\",2E4,a);this.va=a&&a.xmlHttpFactory||void 0;this.Ha=a&&a.dc||!1;this.L=\nvoid 0;this.J=a&&a.supportsCrossDomainXhr||!1;this.K=\"\";this.i=new cd(a&&a.concurrentRequestLimit);this.Ja=new hd;this.P=a&&a.fastHandshake||!1;this.O=a&&a.encodeInitMessageHeaders||!1;this.P&&this.O&&(this.O=!1);this.bb=a&&a.bc||!1;a&&a.Ea&&this.l.Ea();a&&a.forceLongPolling&&(this.aa=!1);this.ca=!this.P&&this.aa&&a&&a.detectBufferingProxy||!1;this.qa=void 0;a&&a.longPollingTimeout&&0<a.longPollingTimeout&&(this.qa=a.longPollingTimeout);this.oa=void 0;this.S=0;this.M=!1;this.ma=this.B=null;}k=Ed.prototype;\nk.ra=8;k.H=1;function Hc(a){Fd(a);if(3==a.H){var b=a.W++,c=G(a.I);K(c,\"SID\",a.K);K(c,\"RID\",b);K(c,\"TYPE\",\"terminate\");Gd(a,c);b=new bc(a,a.l,b);b.L=2;b.v=hc(G(c));c=!1;if(l.navigator&&l.navigator.sendBeacon)try{c=l.navigator.sendBeacon(b.v.toString(),\"\");}catch(d){}!c&&l.Image&&((new Image).src=b.v,c=!0);c||(b.g=lc(b.l,null),b.g.ha(b.v));b.G=Date.now();jc(b);}Hd(a);}function zc(a){a.g&&(vc(a),a.g.cancel(),a.g=null);}\nfunction Fd(a){zc(a);a.u&&(l.clearTimeout(a.u),a.u=null);yc(a);a.i.cancel();a.m&&(\"number\"===typeof a.m&&l.clearTimeout(a.m),a.m=null);}function Gc(a){if(!ed(a.i)&&!a.m){a.m=!0;var b=a.Na;sb||vb();tb||(sb(),tb=!0);mb.add(b,a);a.C=0;}}function Id(a,b){if(Bc(a.i)>=a.i.j-(a.m?1:0))return !1;if(a.m)return a.j=b.F.concat(a.j),!0;if(1==a.H||2==a.H||a.C>=(a.cb?0:a.eb))return !1;a.m=Rb(q(a.Na,a,b),Jd(a,a.C));a.C++;return !0}\nk.Na=function(a){if(this.m)if(this.m=null,1==this.H){if(!a){this.W=Math.floor(1E5*Math.random());a=this.W++;const e=new bc(this,this.l,a);let f=this.s;this.U&&(f?(f=Pa(f),Ra(f,this.U)):f=this.U);null!==this.o||this.O||(e.I=f,f=null);if(this.P)a:{var b=0;for(var c=0;c<this.j.length;c++){b:{var d=this.j[c];if(\"__data__\"in d.map&&(d=d.map.__data__,\"string\"===typeof d)){d=d.length;break b}d=void 0;}if(void 0===d)break;b+=d;if(4096<b){b=c;break a}if(4096===b||c===this.j.length-1){b=c+1;break a}}b=1E3;}else b=\n1E3;b=Kd(this,e,b);c=G(this.I);K(c,\"RID\",a);K(c,\"CVER\",22);this.F&&K(c,\"X-HTTP-Session-Id\",this.F);Gd(this,c);f&&(this.O?b=\"headers=\"+encodeURIComponent(String(Bd(f)))+\"&\"+b:this.o&&Cd(c,this.o,f));Cc(this.i,e);this.bb&&K(c,\"TYPE\",\"init\");this.P?(K(c,\"$req\",b),K(c,\"SID\",\"null\"),e.aa=!0,gc(e,c,null)):gc(e,c,b);this.H=2;}}else 3==this.H&&(a?Ld(this,a):0==this.j.length||ed(this.i)||Ld(this));};\nfunction Ld(a,b){var c;b?c=b.m:c=a.W++;const d=G(a.I);K(d,\"SID\",a.K);K(d,\"RID\",c);K(d,\"AID\",a.V);Gd(a,d);a.o&&a.s&&Cd(d,a.o,a.s);c=new bc(a,a.l,c,a.C+1);null===a.o&&(c.I=a.s);b&&(a.j=b.F.concat(a.j));b=Kd(a,c,1E3);c.setTimeout(Math.round(.5*a.xa)+Math.round(.5*a.xa*Math.random()));Cc(a.i,c);gc(c,d,b);}function Gd(a,b){a.na&&Na(a.na,function(c,d){K(b,d,c);});a.h&&Kc({},function(c,d){K(b,d,c);});}\nfunction Kd(a,b,c){c=Math.min(a.j.length,c);var d=a.h?q(a.h.Va,a.h,a):null;a:{var e=a.j;let f=-1;for(;;){const h=[\"count=\"+c];-1==f?0<c?(f=e[0].g,h.push(\"ofs=\"+f)):f=0:h.push(\"ofs=\"+f);let n=!0;for(let t=0;t<c;t++){let m=e[t].g;const u=e[t].map;m-=f;if(0>m)f=Math.max(0,e[t].g-100),n=!1;else try{id(u,h,\"req\"+m+\"_\");}catch(L){d&&d(u);}}if(n){d=h.join(\"&\");break a}}}a=a.j.splice(0,c);b.F=a;return d}function Fc(a){if(!a.g&&!a.u){a.ba=1;var b=a.Ma;sb||vb();tb||(sb(),tb=!0);mb.add(b,a);a.A=0;}}\nfunction Ac(a){if(a.g||a.u||3<=a.A)return !1;a.ba++;a.u=Rb(q(a.Ma,a),Jd(a,a.A));a.A++;return !0}k.Ma=function(){this.u=null;Md(this);if(this.ca&&!(this.M||null==this.g||0>=this.S)){var a=2*this.S;this.l.info(\"BP detection timer enabled: \"+a);this.B=Rb(q(this.jb,this),a);}};k.jb=function(){this.B&&(this.B=null,this.l.info(\"BP detection timeout reached.\"),this.l.info(\"Buffering proxy detected and switch to long-polling!\"),this.G=!1,this.M=!0,F(10),zc(this),Md(this));};\nfunction vc(a){null!=a.B&&(l.clearTimeout(a.B),a.B=null);}function Md(a){a.g=new bc(a,a.l,\"rpc\",a.ba);null===a.o&&(a.g.I=a.s);a.g.O=0;var b=G(a.wa);K(b,\"RID\",\"rpc\");K(b,\"SID\",a.K);K(b,\"AID\",a.V);K(b,\"CI\",a.G?\"0\":\"1\");!a.G&&a.qa&&K(b,\"TO\",a.qa);K(b,\"TYPE\",\"xmlhttp\");Gd(a,b);a.o&&a.s&&Cd(b,a.o,a.s);a.L&&a.g.setTimeout(a.L);var c=a.g;a=a.pa;c.L=1;c.v=hc(G(b));c.s=null;c.S=!0;ic(c,a);}k.ib=function(){null!=this.v&&(this.v=null,zc(this),Ac(this),F(19));};\nfunction yc(a){null!=a.v&&(l.clearTimeout(a.v),a.v=null);}function sc(a,b){var c=null;if(a.g==b){yc(a);vc(a);a.g=null;var d=2;}else if(xc(a.i,b))c=b.F,Ec(a.i,b),d=1;else return;if(0!=a.H)if(b.i)if(1==d){c=b.s?b.s.length:0;b=Date.now()-b.G;var e=a.C;d=Mb();C(d,new Qb(d,c));Gc(a);}else Fc(a);else if(e=b.o,3==e||0==e&&0<b.ca||!(1==d&&Id(a,b)||2==d&&Ac(a)))switch(c&&0<c.length&&(b=a.i,b.i=b.i.concat(c)),e){case 1:J(a,5);break;case 4:J(a,10);break;case 3:J(a,6);break;default:J(a,2);}}\nfunction Jd(a,b){let c=a.ab+Math.floor(Math.random()*a.hb);a.isActive()||(c*=2);return c*b}function J(a,b){a.l.info(\"Error code \"+b);if(2==b){var c=null;a.h&&(c=null);var d=q(a.pb,a);c||(c=new M(\"//www.google.com/images/cleardot.gif\"),l.location&&\"http\"==l.location.protocol||Nc(c,\"https\"),hc(c));jd(c.toString(),d);}else F(2);a.H=0;a.h&&a.h.za(b);Hd(a);Fd(a);}k.pb=function(a){a?(this.l.info(\"Successfully pinged google.com\"),F(2)):(this.l.info(\"Failed to ping google.com\"),F(1));};\nfunction Hd(a){a.H=0;a.ma=[];if(a.h){const b=fd(a.i);if(0!=b.length||0!=a.j.length)na(a.ma,b),na(a.ma,a.j),a.i.i.length=0,ma(a.j),a.j.length=0;a.h.ya();}}function Dc(a,b,c){var d=c instanceof M?G(c):new M(c);if(\"\"!=d.g)b&&(d.g=b+\".\"+d.g),Oc(d,d.m);else {var e=l.location;d=e.protocol;b=b?b+\".\"+e.hostname:e.hostname;e=+e.port;var f=new M(null);d&&Nc(f,d);b&&(f.g=b);e&&Oc(f,e);c&&(f.l=c);d=f;}c=a.F;b=a.Da;c&&b&&K(d,c,b);K(d,\"VER\",a.ra);Gd(a,d);return d}\nfunction lc(a,b,c){if(b&&!a.J)throw Error(\"Can't create secondary domain capable XhrIo object.\");b=c&&a.Ha&&!a.va?new P(new ld({ob:!0})):new P(a.va);b.Oa(a.J);return b}k.isActive=function(){return !!this.h&&this.h.isActive(this)};function Nd(){}k=Nd.prototype;k.Ba=function(){};k.Aa=function(){};k.za=function(){};k.ya=function(){};k.isActive=function(){return !0};k.Va=function(){};function Od(){if(z&&!(10<=Number(Fa)))throw Error(\"Environmental error: no available transport.\");}Od.prototype.g=function(a,b){return new Q(a,b)};\nfunction Q(a,b){B.call(this);this.g=new Ed(b);this.l=a;this.h=b&&b.messageUrlParams||null;a=b&&b.messageHeaders||null;b&&b.clientProtocolHeaderRequired&&(a?a[\"X-Client-Protocol\"]=\"webchannel\":a={\"X-Client-Protocol\":\"webchannel\"});this.g.s=a;a=b&&b.initMessageHeaders||null;b&&b.messageContentType&&(a?a[\"X-WebChannel-Content-Type\"]=b.messageContentType:a={\"X-WebChannel-Content-Type\":b.messageContentType});b&&b.Ca&&(a?a[\"X-WebChannel-Client-Profile\"]=b.Ca:a={\"X-WebChannel-Client-Profile\":b.Ca});this.g.U=\na;(a=b&&b.cc)&&!x(a)&&(this.g.o=a);this.A=b&&b.supportsCrossDomainXhr||!1;this.v=b&&b.sendRawJson||!1;(b=b&&b.httpSessionIdParam)&&!x(b)&&(this.g.F=b,a=this.h,null!==a&&b in a&&(a=this.h,b in a&&delete a[b]));this.j=new R(this);}r(Q,B);Q.prototype.m=function(){this.g.h=this.j;this.A&&(this.g.J=!0);var a=this.g,b=this.l,c=this.h||void 0;F(0);a.Y=b;a.na=c||{};a.G=a.aa;a.I=Dc(a,null,a.Y);Gc(a);};Q.prototype.close=function(){Hc(this.g);};\nQ.prototype.u=function(a){var b=this.g;if(\"string\"===typeof a){var c={};c.__data__=a;a=c;}else this.v&&(c={},c.__data__=jb(a),a=c);b.j.push(new bd(b.fb++,a));3==b.H&&Gc(b);};Q.prototype.N=function(){this.g.h=null;delete this.j;Hc(this.g);delete this.g;Q.$.N.call(this);};\nfunction Pd(a){Yb.call(this);a.__headers__&&(this.headers=a.__headers__,this.statusCode=a.__status__,delete a.__headers__,delete a.__status__);var b=a.__sm__;if(b){a:{for(const c in b){a=c;break a}a=void 0;}if(this.i=a)a=this.i,b=null!==b&&a in b?b[a]:void 0;this.data=b;}else this.data=a;}r(Pd,Yb);function Qd(){Zb.call(this);this.status=1;}r(Qd,Zb);function R(a){this.g=a;}r(R,Nd);R.prototype.Ba=function(){C(this.g,\"a\");};R.prototype.Aa=function(a){C(this.g,new Pd(a));};\nR.prototype.za=function(a){C(this.g,new Qd());};R.prototype.ya=function(){C(this.g,\"b\");};function Rd(){this.blockSize=-1;}function S(){this.blockSize=-1;this.blockSize=64;this.g=Array(4);this.m=Array(this.blockSize);this.i=this.h=0;this.reset();}r(S,Rd);S.prototype.reset=function(){this.g[0]=1732584193;this.g[1]=4023233417;this.g[2]=2562383102;this.g[3]=271733878;this.i=this.h=0;};\nfunction Sd(a,b,c){c||(c=0);var d=Array(16);if(\"string\"===typeof b)for(var e=0;16>e;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.g[0];c=a.g[1];e=a.g[2];var f=a.g[3];var h=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(h<<7&4294967295|h>>>25);h=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(h<<12&4294967295|h>>>20);h=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(h<<17&4294967295|h>>>15);\nh=c+(b^e&(f^b))+d[3]+3250441966&4294967295;c=e+(h<<22&4294967295|h>>>10);h=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(h<<7&4294967295|h>>>25);h=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(h<<12&4294967295|h>>>20);h=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(h<<17&4294967295|h>>>15);h=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(h<<22&4294967295|h>>>10);h=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(h<<7&4294967295|h>>>25);h=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(h<<12&4294967295|\nh>>>20);h=e+(c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(h<<17&4294967295|h>>>15);h=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(h<<22&4294967295|h>>>10);h=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(h<<7&4294967295|h>>>25);h=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(h<<12&4294967295|h>>>20);h=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(h<<17&4294967295|h>>>15);h=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(h<<22&4294967295|h>>>10);h=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(h<<\n5&4294967295|h>>>27);h=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(h<<9&4294967295|h>>>23);h=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(h<<14&4294967295|h>>>18);h=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(h<<20&4294967295|h>>>12);h=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(h<<5&4294967295|h>>>27);h=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(h<<9&4294967295|h>>>23);h=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(h<<14&4294967295|h>>>18);h=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c=\ne+(h<<20&4294967295|h>>>12);h=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(h<<5&4294967295|h>>>27);h=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(h<<9&4294967295|h>>>23);h=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(h<<14&4294967295|h>>>18);h=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(h<<20&4294967295|h>>>12);h=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(h<<5&4294967295|h>>>27);h=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(h<<9&4294967295|h>>>23);h=e+(b^c&(f^b))+d[7]+1735328473&4294967295;\ne=f+(h<<14&4294967295|h>>>18);h=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(h<<20&4294967295|h>>>12);h=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(h<<4&4294967295|h>>>28);h=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(h<<11&4294967295|h>>>21);h=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(h<<16&4294967295|h>>>16);h=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(h<<23&4294967295|h>>>9);h=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(h<<4&4294967295|h>>>28);h=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(h<<11&4294967295|\nh>>>21);h=e+(f^b^c)+d[7]+4139469664&4294967295;e=f+(h<<16&4294967295|h>>>16);h=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(h<<23&4294967295|h>>>9);h=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(h<<4&4294967295|h>>>28);h=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(h<<11&4294967295|h>>>21);h=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(h<<16&4294967295|h>>>16);h=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(h<<23&4294967295|h>>>9);h=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(h<<4&4294967295|h>>>28);h=f+(b^c^e)+d[12]+\n3873151461&4294967295;f=b+(h<<11&4294967295|h>>>21);h=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(h<<16&4294967295|h>>>16);h=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(h<<23&4294967295|h>>>9);h=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(h<<6&4294967295|h>>>26);h=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(h<<10&4294967295|h>>>22);h=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(h<<15&4294967295|h>>>17);h=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(h<<21&4294967295|h>>>11);h=b+(e^(c|~f))+d[12]+1700485571&\n4294967295;b=c+(h<<6&4294967295|h>>>26);h=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(h<<10&4294967295|h>>>22);h=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(h<<15&4294967295|h>>>17);h=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(h<<21&4294967295|h>>>11);h=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(h<<6&4294967295|h>>>26);h=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(h<<10&4294967295|h>>>22);h=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(h<<15&4294967295|h>>>17);h=c+(f^(e|~b))+d[13]+1309151649&\n4294967295;c=e+(h<<21&4294967295|h>>>11);h=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(h<<6&4294967295|h>>>26);h=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(h<<10&4294967295|h>>>22);h=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(h<<15&4294967295|h>>>17);h=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.g[0]=a.g[0]+b&4294967295;a.g[1]=a.g[1]+(e+(h<<21&4294967295|h>>>11))&4294967295;a.g[2]=a.g[2]+e&4294967295;a.g[3]=a.g[3]+f&4294967295;}\nS.prototype.j=function(a,b){void 0===b&&(b=a.length);for(var c=b-this.blockSize,d=this.m,e=this.h,f=0;f<b;){if(0==e)for(;f<=c;)Sd(this,a,f),f+=this.blockSize;if(\"string\"===typeof a)for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.blockSize){Sd(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.blockSize){Sd(this,d);e=0;break}}this.h=e;this.i+=b;};\nS.prototype.l=function(){var a=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;var c=8*this.i;for(b=a.length-8;b<a.length;++b)a[b]=c&255,c/=256;this.j(a);a=Array(16);for(b=c=0;4>b;++b)for(var d=0;32>d;d+=8)a[c++]=this.g[b]>>>d&255;return a};function T(a,b){this.h=b;for(var c=[],d=!0,e=a.length-1;0<=e;e--){var f=a[e]|0;d&&f==b||(c[e]=f,d=!1);}this.g=c;}var sa={};function Td(a){return -128<=a&&128>a?ra(a,function(b){return new T([b|0],0>b?-1:0)}):new T([a|0],0>a?-1:0)}function U(a){if(isNaN(a)||!isFinite(a))return V;if(0>a)return W(U(-a));for(var b=[],c=1,d=0;a>=c;d++)b[d]=a/c|0,c*=Ud;return new T(b,0)}\nfunction Vd(a,b){if(0==a.length)throw Error(\"number format error: empty string\");b=b||10;if(2>b||36<b)throw Error(\"radix out of range: \"+b);if(\"-\"==a.charAt(0))return W(Vd(a.substring(1),b));if(0<=a.indexOf(\"-\"))throw Error('number format error: interior \"-\" character');for(var c=U(Math.pow(b,8)),d=V,e=0;e<a.length;e+=8){var f=Math.min(8,a.length-e),h=parseInt(a.substring(e,e+f),b);8>f?(f=U(Math.pow(b,f)),d=d.R(f).add(U(h))):(d=d.R(c),d=d.add(U(h)));}return d}\nvar Ud=4294967296,V=Td(0),Wd=Td(1),Xd=Td(16777216);k=T.prototype;k.ea=function(){if(X(this))return -W(this).ea();for(var a=0,b=1,c=0;c<this.g.length;c++){var d=this.D(c);a+=(0<=d?d:Ud+d)*b;b*=Ud;}return a};\nk.toString=function(a){a=a||10;if(2>a||36<a)throw Error(\"radix out of range: \"+a);if(Y(this))return \"0\";if(X(this))return \"-\"+W(this).toString(a);for(var b=U(Math.pow(a,6)),c=this,d=\"\";;){var e=Yd(c,b).g;c=Zd(c,e.R(b));var f=((0<c.g.length?c.g[0]:c.h)>>>0).toString(a);c=e;if(Y(c))return f+d;for(;6>f.length;)f=\"0\"+f;d=f+d;}};k.D=function(a){return 0>a?0:a<this.g.length?this.g[a]:this.h};function Y(a){if(0!=a.h)return !1;for(var b=0;b<a.g.length;b++)if(0!=a.g[b])return !1;return !0}\nfunction X(a){return -1==a.h}k.X=function(a){a=Zd(this,a);return X(a)?-1:Y(a)?0:1};function W(a){for(var b=a.g.length,c=[],d=0;d<b;d++)c[d]=~a.g[d];return (new T(c,~a.h)).add(Wd)}k.abs=function(){return X(this)?W(this):this};k.add=function(a){for(var b=Math.max(this.g.length,a.g.length),c=[],d=0,e=0;e<=b;e++){var f=d+(this.D(e)&65535)+(a.D(e)&65535),h=(f>>>16)+(this.D(e)>>>16)+(a.D(e)>>>16);d=h>>>16;f&=65535;h&=65535;c[e]=h<<16|f;}return new T(c,c[c.length-1]&-2147483648?-1:0)};\nfunction Zd(a,b){return a.add(W(b))}\nk.R=function(a){if(Y(this)||Y(a))return V;if(X(this))return X(a)?W(this).R(W(a)):W(W(this).R(a));if(X(a))return W(this.R(W(a)));if(0>this.X(Xd)&&0>a.X(Xd))return U(this.ea()*a.ea());for(var b=this.g.length+a.g.length,c=[],d=0;d<2*b;d++)c[d]=0;for(d=0;d<this.g.length;d++)for(var e=0;e<a.g.length;e++){var f=this.D(d)>>>16,h=this.D(d)&65535,n=a.D(e)>>>16,t=a.D(e)&65535;c[2*d+2*e]+=h*t;$d(c,2*d+2*e);c[2*d+2*e+1]+=f*t;$d(c,2*d+2*e+1);c[2*d+2*e+1]+=h*n;$d(c,2*d+2*e+1);c[2*d+2*e+2]+=f*n;$d(c,2*d+2*e+2);}for(d=\n0;d<b;d++)c[d]=c[2*d+1]<<16|c[2*d];for(d=b;d<2*b;d++)c[d]=0;return new T(c,0)};function $d(a,b){for(;(a[b]&65535)!=a[b];)a[b+1]+=a[b]>>>16,a[b]&=65535,b++;}function ae(a,b){this.g=a;this.h=b;}\nfunction Yd(a,b){if(Y(b))throw Error(\"division by zero\");if(Y(a))return new ae(V,V);if(X(a))return b=Yd(W(a),b),new ae(W(b.g),W(b.h));if(X(b))return b=Yd(a,W(b)),new ae(W(b.g),b.h);if(30<a.g.length){if(X(a)||X(b))throw Error(\"slowDivide_ only works with positive integers.\");for(var c=Wd,d=b;0>=d.X(a);)c=be(c),d=be(d);var e=Z(c,1),f=Z(d,1);d=Z(d,2);for(c=Z(c,2);!Y(d);){var h=f.add(d);0>=h.X(a)&&(e=e.add(c),f=h);d=Z(d,1);c=Z(c,1);}b=Zd(a,e.R(b));return new ae(e,b)}for(e=V;0<=a.X(b);){c=Math.max(1,Math.floor(a.ea()/\nb.ea()));d=Math.ceil(Math.log(c)/Math.LN2);d=48>=d?1:Math.pow(2,d-48);f=U(c);for(h=f.R(b);X(h)||0<h.X(a);)c-=d,f=U(c),h=f.R(b);Y(f)&&(f=Wd);e=e.add(f);a=Zd(a,h);}return new ae(e,a)}k.gb=function(a){return Yd(this,a).h};k.and=function(a){for(var b=Math.max(this.g.length,a.g.length),c=[],d=0;d<b;d++)c[d]=this.D(d)&a.D(d);return new T(c,this.h&a.h)};k.or=function(a){for(var b=Math.max(this.g.length,a.g.length),c=[],d=0;d<b;d++)c[d]=this.D(d)|a.D(d);return new T(c,this.h|a.h)};\nk.xor=function(a){for(var b=Math.max(this.g.length,a.g.length),c=[],d=0;d<b;d++)c[d]=this.D(d)^a.D(d);return new T(c,this.h^a.h)};function be(a){for(var b=a.g.length+1,c=[],d=0;d<b;d++)c[d]=a.D(d)<<1|a.D(d-1)>>>31;return new T(c,a.h)}function Z(a,b){var c=b>>5;b%=32;for(var d=a.g.length-c,e=[],f=0;f<d;f++)e[f]=0<b?a.D(f+c)>>>b|a.D(f+c+1)<<32-b:a.D(f+c);return new T(e,a.h)}Od.prototype.createWebChannel=Od.prototype.g;Q.prototype.send=Q.prototype.u;Q.prototype.open=Q.prototype.m;Q.prototype.close=Q.prototype.close;Sb.NO_ERROR=0;Sb.TIMEOUT=8;Sb.HTTP_ERROR=6;Tb.COMPLETE=\"complete\";Wb.EventType=Xb;Xb.OPEN=\"a\";Xb.CLOSE=\"b\";Xb.ERROR=\"c\";Xb.MESSAGE=\"d\";B.prototype.listen=B.prototype.O;P.prototype.listenOnce=P.prototype.P;P.prototype.getLastError=P.prototype.Sa;P.prototype.getLastErrorCode=P.prototype.Ia;P.prototype.getStatus=P.prototype.da;P.prototype.getResponseJson=P.prototype.Wa;\nP.prototype.getResponseText=P.prototype.ja;P.prototype.send=P.prototype.ha;P.prototype.setWithCredentials=P.prototype.Oa;S.prototype.digest=S.prototype.l;S.prototype.reset=S.prototype.reset;S.prototype.update=S.prototype.j;T.prototype.add=T.prototype.add;T.prototype.multiply=T.prototype.R;T.prototype.modulo=T.prototype.gb;T.prototype.compare=T.prototype.X;T.prototype.toNumber=T.prototype.ea;T.prototype.toString=T.prototype.toString;T.prototype.getBits=T.prototype.D;T.fromNumber=U;T.fromString=Vd;\nvar createWebChannelTransport = esm.createWebChannelTransport=function(){return new Od};var getStatEventTarget = esm.getStatEventTarget=function(){return Mb()};var ErrorCode = esm.ErrorCode=Sb;var EventType = esm.EventType=Tb;var Event = esm.Event=E;var Stat = esm.Stat={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20};var FetchXmlHttpFactory = esm.FetchXmlHttpFactory=ld;var WebChannel = esm.WebChannel=Wb;var XhrIo = esm.XhrIo=P;var Md5 = esm.Md5=S;var Integer = esm.Integer=T;\n\nexport { ErrorCode, Event, EventType, FetchXmlHttpFactory, Integer, Md5, Stat, WebChannel, XhrIo, createWebChannelTransport, esm as default, getStatEventTarget };\n//# sourceMappingURL=index.esm2017.js.map\n","import { _registerComponent, registerVersion, _getProvider, getApp, _removeServiceInstance, SDK_VERSION } from '@firebase/app';\nimport { Component } from '@firebase/component';\nimport { Logger, LogLevel } from '@firebase/logger';\nimport { FirebaseError, createMockUserToken, getModularInstance, deepEqual, getDefaultEmulatorHostnameAndPort, getUA, isIndexedDBAvailable, isSafari } from '@firebase/util';\nimport { Integer, XhrIo, EventType, ErrorCode, createWebChannelTransport, getStatEventTarget, FetchXmlHttpFactory, WebChannel, Event, Stat, Md5 } from '@firebase/webchannel-wrapper';\n\nconst b = \"@firebase/firestore\";\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Simple wrapper around a nullable UID. Mostly exists to make code more\n * readable.\n */\nclass V {\n    constructor(t) {\n        this.uid = t;\n    }\n    isAuthenticated() {\n        return null != this.uid;\n    }\n    /**\n     * Returns a key representing this user, suitable for inclusion in a\n     * dictionary.\n     */    toKey() {\n        return this.isAuthenticated() ? \"uid:\" + this.uid : \"anonymous-user\";\n    }\n    isEqual(t) {\n        return t.uid === this.uid;\n    }\n}\n\n/** A user with a null UID. */ V.UNAUTHENTICATED = new V(null), \n// TODO(mikelehen): Look into getting a proper uid-equivalent for\n// non-FirebaseAuth providers.\nV.GOOGLE_CREDENTIALS = new V(\"google-credentials-uid\"), V.FIRST_PARTY = new V(\"first-party-uid\"), \nV.MOCK_USER = new V(\"mock-user\");\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nlet S = \"9.23.0\";\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst D = new Logger(\"@firebase/firestore\");\n\n// Helper methods are needed because variables can't be exported as read/write\nfunction C() {\n    return D.logLevel;\n}\n\n/**\n * Sets the verbosity of Cloud Firestore logs (debug, error, or silent).\n *\n * @param logLevel - The verbosity you set for activity and error logging. Can\n *   be any of the following values:\n *\n *   <ul>\n *     <li>`debug` for the most verbose logging level, primarily for\n *     debugging.</li>\n *     <li>`error` to log errors only.</li>\n *     <li><code>`silent` to turn off logging.</li>\n *   </ul>\n */ function x(t) {\n    D.setLogLevel(t);\n}\n\nfunction N(t, ...e) {\n    if (D.logLevel <= LogLevel.DEBUG) {\n        const n = e.map($);\n        D.debug(`Firestore (${S}): ${t}`, ...n);\n    }\n}\n\nfunction k(t, ...e) {\n    if (D.logLevel <= LogLevel.ERROR) {\n        const n = e.map($);\n        D.error(`Firestore (${S}): ${t}`, ...n);\n    }\n}\n\n/**\n * @internal\n */ function M(t, ...e) {\n    if (D.logLevel <= LogLevel.WARN) {\n        const n = e.map($);\n        D.warn(`Firestore (${S}): ${t}`, ...n);\n    }\n}\n\n/**\n * Converts an additional log parameter to a string representation.\n */ function $(t) {\n    if (\"string\" == typeof t) return t;\n    try {\n        return e = t, JSON.stringify(e);\n    } catch (e) {\n        // Converting to JSON failed, just log the object directly\n        return t;\n    }\n    /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n    /** Formats an object as a JSON string, suitable for logging. */\n    var e;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Unconditionally fails, throwing an Error with the given message.\n * Messages are stripped in production builds.\n *\n * Returns `never` and can be used in expressions:\n * @example\n * let futureVar = fail('not implemented yet');\n */ function O(t = \"Unexpected state\") {\n    // Log the failure in addition to throw an exception, just in case the\n    // exception is swallowed.\n    const e = `FIRESTORE (${S}) INTERNAL ASSERTION FAILED: ` + t;\n    // NOTE: We don't use FirestoreError here because these are internal failures\n    // that cannot be handled by the user. (Also it would create a circular\n    // dependency between the error and assert modules which doesn't work.)\n    throw k(e), new Error(e);\n}\n\n/**\n * Fails if the given assertion condition is false, throwing an Error with the\n * given message if it did.\n *\n * Messages are stripped in production builds.\n */ function F(t, e) {\n    t || O();\n}\n\n/**\n * Fails if the given assertion condition is false, throwing an Error with the\n * given message if it did.\n *\n * The code of callsites invoking this function are stripped out in production\n * builds. Any side-effects of code within the debugAssert() invocation will not\n * happen in this case.\n *\n * @internal\n */ function B(t, e) {\n    t || O();\n}\n\n/**\n * Casts `obj` to `T`. In non-production builds, verifies that `obj` is an\n * instance of `T` before casting.\n */ function L(t, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ne) {\n    return t;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const q = {\n    // Causes are copied from:\n    // https://github.com/grpc/grpc/blob/bceec94ea4fc5f0085d81235d8e1c06798dc341a/include/grpc%2B%2B/impl/codegen/status_code_enum.h\n    /** Not an error; returned on success. */\n    OK: \"ok\",\n    /** The operation was cancelled (typically by the caller). */\n    CANCELLED: \"cancelled\",\n    /** Unknown error or an error from a different error domain. */\n    UNKNOWN: \"unknown\",\n    /**\n     * Client specified an invalid argument. Note that this differs from\n     * FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are\n     * problematic regardless of the state of the system (e.g., a malformed file\n     * name).\n     */\n    INVALID_ARGUMENT: \"invalid-argument\",\n    /**\n     * Deadline expired before operation could complete. For operations that\n     * change the state of the system, this error may be returned even if the\n     * operation has completed successfully. For example, a successful response\n     * from a server could have been delayed long enough for the deadline to\n     * expire.\n     */\n    DEADLINE_EXCEEDED: \"deadline-exceeded\",\n    /** Some requested entity (e.g., file or directory) was not found. */\n    NOT_FOUND: \"not-found\",\n    /**\n     * Some entity that we attempted to create (e.g., file or directory) already\n     * exists.\n     */\n    ALREADY_EXISTS: \"already-exists\",\n    /**\n     * The caller does not have permission to execute the specified operation.\n     * PERMISSION_DENIED must not be used for rejections caused by exhausting\n     * some resource (use RESOURCE_EXHAUSTED instead for those errors).\n     * PERMISSION_DENIED must not be used if the caller can not be identified\n     * (use UNAUTHENTICATED instead for those errors).\n     */\n    PERMISSION_DENIED: \"permission-denied\",\n    /**\n     * The request does not have valid authentication credentials for the\n     * operation.\n     */\n    UNAUTHENTICATED: \"unauthenticated\",\n    /**\n     * Some resource has been exhausted, perhaps a per-user quota, or perhaps the\n     * entire file system is out of space.\n     */\n    RESOURCE_EXHAUSTED: \"resource-exhausted\",\n    /**\n     * Operation was rejected because the system is not in a state required for\n     * the operation's execution. For example, directory to be deleted may be\n     * non-empty, an rmdir operation is applied to a non-directory, etc.\n     *\n     * A litmus test that may help a service implementor in deciding\n     * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:\n     *  (a) Use UNAVAILABLE if the client can retry just the failing call.\n     *  (b) Use ABORTED if the client should retry at a higher-level\n     *      (e.g., restarting a read-modify-write sequence).\n     *  (c) Use FAILED_PRECONDITION if the client should not retry until\n     *      the system state has been explicitly fixed. E.g., if an \"rmdir\"\n     *      fails because the directory is non-empty, FAILED_PRECONDITION\n     *      should be returned since the client should not retry unless\n     *      they have first fixed up the directory by deleting files from it.\n     *  (d) Use FAILED_PRECONDITION if the client performs conditional\n     *      REST Get/Update/Delete on a resource and the resource on the\n     *      server does not match the condition. E.g., conflicting\n     *      read-modify-write on the same resource.\n     */\n    FAILED_PRECONDITION: \"failed-precondition\",\n    /**\n     * The operation was aborted, typically due to a concurrency issue like\n     * sequencer check failures, transaction aborts, etc.\n     *\n     * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,\n     * and UNAVAILABLE.\n     */\n    ABORTED: \"aborted\",\n    /**\n     * Operation was attempted past the valid range. E.g., seeking or reading\n     * past end of file.\n     *\n     * Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed\n     * if the system state changes. For example, a 32-bit file system will\n     * generate INVALID_ARGUMENT if asked to read at an offset that is not in the\n     * range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from\n     * an offset past the current file size.\n     *\n     * There is a fair bit of overlap between FAILED_PRECONDITION and\n     * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error)\n     * when it applies so that callers who are iterating through a space can\n     * easily look for an OUT_OF_RANGE error to detect when they are done.\n     */\n    OUT_OF_RANGE: \"out-of-range\",\n    /** Operation is not implemented or not supported/enabled in this service. */\n    UNIMPLEMENTED: \"unimplemented\",\n    /**\n     * Internal errors. Means some invariants expected by underlying System has\n     * been broken. If you see one of these errors, Something is very broken.\n     */\n    INTERNAL: \"internal\",\n    /**\n     * The service is currently unavailable. This is a most likely a transient\n     * condition and may be corrected by retrying with a backoff.\n     *\n     * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,\n     * and UNAVAILABLE.\n     */\n    UNAVAILABLE: \"unavailable\",\n    /** Unrecoverable data loss or corruption. */\n    DATA_LOSS: \"data-loss\"\n};\n\n/** An error returned by a Firestore operation. */ class U extends FirebaseError {\n    /** @hideconstructor */\n    constructor(\n    /**\n     * The backend error code associated with this error.\n     */\n    t, \n    /**\n     * A custom error description.\n     */\n    e) {\n        super(t, e), this.code = t, this.message = e, \n        // HACK: We write a toString property directly because Error is not a real\n        // class and so inheritance does not work correctly. We could alternatively\n        // do the same \"back-door inheritance\" trick that FirebaseError does.\n        this.toString = () => `${this.name}: [code=${this.code}]: ${this.message}`;\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class K {\n    constructor() {\n        this.promise = new Promise(((t, e) => {\n            this.resolve = t, this.reject = e;\n        }));\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class G {\n    constructor(t, e) {\n        this.user = e, this.type = \"OAuth\", this.headers = new Map, this.headers.set(\"Authorization\", `Bearer ${t}`);\n    }\n}\n\n/**\n * A CredentialsProvider that always yields an empty token.\n * @internal\n */ class Q {\n    getToken() {\n        return Promise.resolve(null);\n    }\n    invalidateToken() {}\n    start(t, e) {\n        // Fire with initial user.\n        t.enqueueRetryable((() => e(V.UNAUTHENTICATED)));\n    }\n    shutdown() {}\n}\n\n/**\n * A CredentialsProvider that always returns a constant token. Used for\n * emulator token mocking.\n */ class j {\n    constructor(t) {\n        this.token = t, \n        /**\n         * Stores the listener registered with setChangeListener()\n         * This isn't actually necessary since the UID never changes, but we use this\n         * to verify the listen contract is adhered to in tests.\n         */\n        this.changeListener = null;\n    }\n    getToken() {\n        return Promise.resolve(this.token);\n    }\n    invalidateToken() {}\n    start(t, e) {\n        this.changeListener = e, \n        // Fire with initial user.\n        t.enqueueRetryable((() => e(this.token.user)));\n    }\n    shutdown() {\n        this.changeListener = null;\n    }\n}\n\nclass z {\n    constructor(t) {\n        this.t = t, \n        /** Tracks the current User. */\n        this.currentUser = V.UNAUTHENTICATED, \n        /**\n         * Counter used to detect if the token changed while a getToken request was\n         * outstanding.\n         */\n        this.i = 0, this.forceRefresh = !1, this.auth = null;\n    }\n    start(t, e) {\n        let n = this.i;\n        // A change listener that prevents double-firing for the same token change.\n                const s = t => this.i !== n ? (n = this.i, e(t)) : Promise.resolve();\n        // A promise that can be waited on to block on the next token change.\n        // This promise is re-created after each change.\n                let i = new K;\n        this.o = () => {\n            this.i++, this.currentUser = this.u(), i.resolve(), i = new K, t.enqueueRetryable((() => s(this.currentUser)));\n        };\n        const r = () => {\n            const e = i;\n            t.enqueueRetryable((async () => {\n                await e.promise, await s(this.currentUser);\n            }));\n        }, o = t => {\n            N(\"FirebaseAuthCredentialsProvider\", \"Auth detected\"), this.auth = t, this.auth.addAuthTokenListener(this.o), \n            r();\n        };\n        this.t.onInit((t => o(t))), \n        // Our users can initialize Auth right after Firestore, so we give it\n        // a chance to register itself with the component framework before we\n        // determine whether to start up in unauthenticated mode.\n        setTimeout((() => {\n            if (!this.auth) {\n                const t = this.t.getImmediate({\n                    optional: !0\n                });\n                t ? o(t) : (\n                // If auth is still not available, proceed with `null` user\n                N(\"FirebaseAuthCredentialsProvider\", \"Auth not yet detected\"), i.resolve(), i = new K);\n            }\n        }), 0), r();\n    }\n    getToken() {\n        // Take note of the current value of the tokenCounter so that this method\n        // can fail (with an ABORTED error) if there is a token change while the\n        // request is outstanding.\n        const t = this.i, e = this.forceRefresh;\n        return this.forceRefresh = !1, this.auth ? this.auth.getToken(e).then((e => \n        // Cancel the request since the token changed while the request was\n        // outstanding so the response is potentially for a previous user (which\n        // user, we can't be sure).\n        this.i !== t ? (N(\"FirebaseAuthCredentialsProvider\", \"getToken aborted due to token change.\"), \n        this.getToken()) : e ? (F(\"string\" == typeof e.accessToken), new G(e.accessToken, this.currentUser)) : null)) : Promise.resolve(null);\n    }\n    invalidateToken() {\n        this.forceRefresh = !0;\n    }\n    shutdown() {\n        this.auth && this.auth.removeAuthTokenListener(this.o);\n    }\n    // Auth.getUid() can return null even with a user logged in. It is because\n    // getUid() is synchronous, but the auth code populating Uid is asynchronous.\n    // This method should only be called in the AuthTokenListener callback\n    // to guarantee to get the actual user.\n    u() {\n        const t = this.auth && this.auth.getUid();\n        return F(null === t || \"string\" == typeof t), new V(t);\n    }\n}\n\n/*\n * FirstPartyToken provides a fresh token each time its value\n * is requested, because if the token is too old, requests will be rejected.\n * Technically this may no longer be necessary since the SDK should gracefully\n * recover from unauthenticated errors (see b/33147818 for context), but it's\n * safer to keep the implementation as-is.\n */ class W {\n    constructor(t, e, n) {\n        this.h = t, this.l = e, this.m = n, this.type = \"FirstParty\", this.user = V.FIRST_PARTY, \n        this.g = new Map;\n    }\n    /**\n     * Gets an authorization token, using a provided factory function, or return\n     * null.\n     */    p() {\n        return this.m ? this.m() : null;\n    }\n    get headers() {\n        this.g.set(\"X-Goog-AuthUser\", this.h);\n        // Use array notation to prevent minification\n        const t = this.p();\n        return t && this.g.set(\"Authorization\", t), this.l && this.g.set(\"X-Goog-Iam-Authorization-Token\", this.l), \n        this.g;\n    }\n}\n\n/*\n * Provides user credentials required for the Firestore JavaScript SDK\n * to authenticate the user, using technique that is only available\n * to applications hosted by Google.\n */ class H {\n    constructor(t, e, n) {\n        this.h = t, this.l = e, this.m = n;\n    }\n    getToken() {\n        return Promise.resolve(new W(this.h, this.l, this.m));\n    }\n    start(t, e) {\n        // Fire with initial uid.\n        t.enqueueRetryable((() => e(V.FIRST_PARTY)));\n    }\n    shutdown() {}\n    invalidateToken() {}\n}\n\nclass J {\n    constructor(t) {\n        this.value = t, this.type = \"AppCheck\", this.headers = new Map, t && t.length > 0 && this.headers.set(\"x-firebase-appcheck\", this.value);\n    }\n}\n\nclass Y {\n    constructor(t) {\n        this.I = t, this.forceRefresh = !1, this.appCheck = null, this.T = null;\n    }\n    start(t, e) {\n        const n = t => {\n            null != t.error && N(\"FirebaseAppCheckTokenProvider\", `Error getting App Check token; using placeholder token instead. Error: ${t.error.message}`);\n            const n = t.token !== this.T;\n            return this.T = t.token, N(\"FirebaseAppCheckTokenProvider\", `Received ${n ? \"new\" : \"existing\"} token.`), \n            n ? e(t.token) : Promise.resolve();\n        };\n        this.o = e => {\n            t.enqueueRetryable((() => n(e)));\n        };\n        const s = t => {\n            N(\"FirebaseAppCheckTokenProvider\", \"AppCheck detected\"), this.appCheck = t, this.appCheck.addTokenListener(this.o);\n        };\n        this.I.onInit((t => s(t))), \n        // Our users can initialize AppCheck after Firestore, so we give it\n        // a chance to register itself with the component framework.\n        setTimeout((() => {\n            if (!this.appCheck) {\n                const t = this.I.getImmediate({\n                    optional: !0\n                });\n                t ? s(t) : \n                // If AppCheck is still not available, proceed without it.\n                N(\"FirebaseAppCheckTokenProvider\", \"AppCheck not yet detected\");\n            }\n        }), 0);\n    }\n    getToken() {\n        const t = this.forceRefresh;\n        return this.forceRefresh = !1, this.appCheck ? this.appCheck.getToken(t).then((t => t ? (F(\"string\" == typeof t.token), \n        this.T = t.token, new J(t.token)) : null)) : Promise.resolve(null);\n    }\n    invalidateToken() {\n        this.forceRefresh = !0;\n    }\n    shutdown() {\n        this.appCheck && this.appCheck.removeTokenListener(this.o);\n    }\n}\n\n/**\n * An AppCheck token provider that always yields an empty token.\n * @internal\n */ class X {\n    getToken() {\n        return Promise.resolve(new J(\"\"));\n    }\n    invalidateToken() {}\n    start(t, e) {}\n    shutdown() {}\n}\n\n/**\n * Builds a CredentialsProvider depending on the type of\n * the credentials passed in.\n */\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Generates `nBytes` of random bytes.\n *\n * If `nBytes < 0` , an error will be thrown.\n */\nfunction Z(t) {\n    // Polyfills for IE and WebWorker by using `self` and `msCrypto` when `crypto` is not available.\n    const e = \n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    \"undefined\" != typeof self && (self.crypto || self.msCrypto), n = new Uint8Array(t);\n    if (e && \"function\" == typeof e.getRandomValues) e.getRandomValues(n); else \n    // Falls back to Math.random\n    for (let e = 0; e < t; e++) n[e] = Math.floor(256 * Math.random());\n    return n;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class tt {\n    static A() {\n        // Alphanumeric characters\n        const t = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\", e = Math.floor(256 / t.length) * t.length;\n        // The largest byte value that is a multiple of `char.length`.\n                let n = \"\";\n        for (;n.length < 20; ) {\n            const s = Z(40);\n            for (let i = 0; i < s.length; ++i) \n            // Only accept values that are [0, maxMultiple), this ensures they can\n            // be evenly mapped to indices of `chars` via a modulo operation.\n            n.length < 20 && s[i] < e && (n += t.charAt(s[i] % t.length));\n        }\n        return n;\n    }\n}\n\nfunction et(t, e) {\n    return t < e ? -1 : t > e ? 1 : 0;\n}\n\n/** Helper to compare arrays using isEqual(). */ function nt(t, e, n) {\n    return t.length === e.length && t.every(((t, s) => n(t, e[s])));\n}\n\n/**\n * Returns the immediate lexicographically-following string. This is useful to\n * construct an inclusive range for indexeddb iterators.\n */ function st(t) {\n    // Return the input string, with an additional NUL byte appended.\n    return t + \"\\0\";\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// The earliest date supported by Firestore timestamps (0001-01-01T00:00:00Z).\n/**\n * A `Timestamp` represents a point in time independent of any time zone or\n * calendar, represented as seconds and fractions of seconds at nanosecond\n * resolution in UTC Epoch time.\n *\n * It is encoded using the Proleptic Gregorian Calendar which extends the\n * Gregorian calendar backwards to year one. It is encoded assuming all minutes\n * are 60 seconds long, i.e. leap seconds are \"smeared\" so that no leap second\n * table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to\n * 9999-12-31T23:59:59.999999999Z.\n *\n * For examples and further specifications, refer to the\n * {@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto | Timestamp definition}.\n */\nclass it {\n    /**\n     * Creates a new timestamp.\n     *\n     * @param seconds - The number of seconds of UTC time since Unix epoch\n     *     1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n     *     9999-12-31T23:59:59Z inclusive.\n     * @param nanoseconds - The non-negative fractions of a second at nanosecond\n     *     resolution. Negative second values with fractions must still have\n     *     non-negative nanoseconds values that count forward in time. Must be\n     *     from 0 to 999,999,999 inclusive.\n     */\n    constructor(\n    /**\n     * The number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.\n     */\n    t, \n    /**\n     * The fractions of a second at nanosecond resolution.*\n     */\n    e) {\n        if (this.seconds = t, this.nanoseconds = e, e < 0) throw new U(q.INVALID_ARGUMENT, \"Timestamp nanoseconds out of range: \" + e);\n        if (e >= 1e9) throw new U(q.INVALID_ARGUMENT, \"Timestamp nanoseconds out of range: \" + e);\n        if (t < -62135596800) throw new U(q.INVALID_ARGUMENT, \"Timestamp seconds out of range: \" + t);\n        // This will break in the year 10,000.\n                if (t >= 253402300800) throw new U(q.INVALID_ARGUMENT, \"Timestamp seconds out of range: \" + t);\n    }\n    /**\n     * Creates a new timestamp with the current date, with millisecond precision.\n     *\n     * @returns a new timestamp representing the current date.\n     */    static now() {\n        return it.fromMillis(Date.now());\n    }\n    /**\n     * Creates a new timestamp from the given date.\n     *\n     * @param date - The date to initialize the `Timestamp` from.\n     * @returns A new `Timestamp` representing the same point in time as the given\n     *     date.\n     */    static fromDate(t) {\n        return it.fromMillis(t.getTime());\n    }\n    /**\n     * Creates a new timestamp from the given number of milliseconds.\n     *\n     * @param milliseconds - Number of milliseconds since Unix epoch\n     *     1970-01-01T00:00:00Z.\n     * @returns A new `Timestamp` representing the same point in time as the given\n     *     number of milliseconds.\n     */    static fromMillis(t) {\n        const e = Math.floor(t / 1e3), n = Math.floor(1e6 * (t - 1e3 * e));\n        return new it(e, n);\n    }\n    /**\n     * Converts a `Timestamp` to a JavaScript `Date` object. This conversion\n     * causes a loss of precision since `Date` objects only support millisecond\n     * precision.\n     *\n     * @returns JavaScript `Date` object representing the same point in time as\n     *     this `Timestamp`, with millisecond precision.\n     */    toDate() {\n        return new Date(this.toMillis());\n    }\n    /**\n     * Converts a `Timestamp` to a numeric timestamp (in milliseconds since\n     * epoch). This operation causes a loss of precision.\n     *\n     * @returns The point in time corresponding to this timestamp, represented as\n     *     the number of milliseconds since Unix epoch 1970-01-01T00:00:00Z.\n     */    toMillis() {\n        return 1e3 * this.seconds + this.nanoseconds / 1e6;\n    }\n    _compareTo(t) {\n        return this.seconds === t.seconds ? et(this.nanoseconds, t.nanoseconds) : et(this.seconds, t.seconds);\n    }\n    /**\n     * Returns true if this `Timestamp` is equal to the provided one.\n     *\n     * @param other - The `Timestamp` to compare against.\n     * @returns true if this `Timestamp` is equal to the provided one.\n     */    isEqual(t) {\n        return t.seconds === this.seconds && t.nanoseconds === this.nanoseconds;\n    }\n    /** Returns a textual representation of this `Timestamp`. */    toString() {\n        return \"Timestamp(seconds=\" + this.seconds + \", nanoseconds=\" + this.nanoseconds + \")\";\n    }\n    /** Returns a JSON-serializable representation of this `Timestamp`. */    toJSON() {\n        return {\n            seconds: this.seconds,\n            nanoseconds: this.nanoseconds\n        };\n    }\n    /**\n     * Converts this object to a primitive string, which allows `Timestamp` objects\n     * to be compared using the `>`, `<=`, `>=` and `>` operators.\n     */    valueOf() {\n        // This method returns a string of the form <seconds>.<nanoseconds> where\n        // <seconds> is translated to have a non-negative value and both <seconds>\n        // and <nanoseconds> are left-padded with zeroes to be a consistent length.\n        // Strings with this format then have a lexiographical ordering that matches\n        // the expected ordering. The <seconds> translation is done to avoid having\n        // a leading negative sign (i.e. a leading '-' character) in its string\n        // representation, which would affect its lexiographical ordering.\n        const t = this.seconds - -62135596800;\n        // Note: Up to 12 decimal digits are required to represent all valid\n        // 'seconds' values.\n                return String(t).padStart(12, \"0\") + \".\" + String(this.nanoseconds).padStart(9, \"0\");\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A version of a document in Firestore. This corresponds to the version\n * timestamp, such as update_time or read_time.\n */ class rt {\n    constructor(t) {\n        this.timestamp = t;\n    }\n    static fromTimestamp(t) {\n        return new rt(t);\n    }\n    static min() {\n        return new rt(new it(0, 0));\n    }\n    static max() {\n        return new rt(new it(253402300799, 999999999));\n    }\n    compareTo(t) {\n        return this.timestamp._compareTo(t.timestamp);\n    }\n    isEqual(t) {\n        return this.timestamp.isEqual(t.timestamp);\n    }\n    /** Returns a number representation of the version for use in spec tests. */    toMicroseconds() {\n        // Convert to microseconds.\n        return 1e6 * this.timestamp.seconds + this.timestamp.nanoseconds / 1e3;\n    }\n    toString() {\n        return \"SnapshotVersion(\" + this.timestamp.toString() + \")\";\n    }\n    toTimestamp() {\n        return this.timestamp;\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Path represents an ordered sequence of string segments.\n */\nclass ot {\n    constructor(t, e, n) {\n        void 0 === e ? e = 0 : e > t.length && O(), void 0 === n ? n = t.length - e : n > t.length - e && O(), \n        this.segments = t, this.offset = e, this.len = n;\n    }\n    get length() {\n        return this.len;\n    }\n    isEqual(t) {\n        return 0 === ot.comparator(this, t);\n    }\n    child(t) {\n        const e = this.segments.slice(this.offset, this.limit());\n        return t instanceof ot ? t.forEach((t => {\n            e.push(t);\n        })) : e.push(t), this.construct(e);\n    }\n    /** The index of one past the last segment of the path. */    limit() {\n        return this.offset + this.length;\n    }\n    popFirst(t) {\n        return t = void 0 === t ? 1 : t, this.construct(this.segments, this.offset + t, this.length - t);\n    }\n    popLast() {\n        return this.construct(this.segments, this.offset, this.length - 1);\n    }\n    firstSegment() {\n        return this.segments[this.offset];\n    }\n    lastSegment() {\n        return this.get(this.length - 1);\n    }\n    get(t) {\n        return this.segments[this.offset + t];\n    }\n    isEmpty() {\n        return 0 === this.length;\n    }\n    isPrefixOf(t) {\n        if (t.length < this.length) return !1;\n        for (let e = 0; e < this.length; e++) if (this.get(e) !== t.get(e)) return !1;\n        return !0;\n    }\n    isImmediateParentOf(t) {\n        if (this.length + 1 !== t.length) return !1;\n        for (let e = 0; e < this.length; e++) if (this.get(e) !== t.get(e)) return !1;\n        return !0;\n    }\n    forEach(t) {\n        for (let e = this.offset, n = this.limit(); e < n; e++) t(this.segments[e]);\n    }\n    toArray() {\n        return this.segments.slice(this.offset, this.limit());\n    }\n    static comparator(t, e) {\n        const n = Math.min(t.length, e.length);\n        for (let s = 0; s < n; s++) {\n            const n = t.get(s), i = e.get(s);\n            if (n < i) return -1;\n            if (n > i) return 1;\n        }\n        return t.length < e.length ? -1 : t.length > e.length ? 1 : 0;\n    }\n}\n\n/**\n * A slash-separated path for navigating resources (documents and collections)\n * within Firestore.\n *\n * @internal\n */ class ut extends ot {\n    construct(t, e, n) {\n        return new ut(t, e, n);\n    }\n    canonicalString() {\n        // NOTE: The client is ignorant of any path segments containing escape\n        // sequences (e.g. __id123__) and just passes them through raw (they exist\n        // for legacy reasons and should not be used frequently).\n        return this.toArray().join(\"/\");\n    }\n    toString() {\n        return this.canonicalString();\n    }\n    /**\n     * Creates a resource path from the given slash-delimited string. If multiple\n     * arguments are provided, all components are combined. Leading and trailing\n     * slashes from all components are ignored.\n     */    static fromString(...t) {\n        // NOTE: The client is ignorant of any path segments containing escape\n        // sequences (e.g. __id123__) and just passes them through raw (they exist\n        // for legacy reasons and should not be used frequently).\n        const e = [];\n        for (const n of t) {\n            if (n.indexOf(\"//\") >= 0) throw new U(q.INVALID_ARGUMENT, `Invalid segment (${n}). Paths must not contain // in them.`);\n            // Strip leading and traling slashed.\n                        e.push(...n.split(\"/\").filter((t => t.length > 0)));\n        }\n        return new ut(e);\n    }\n    static emptyPath() {\n        return new ut([]);\n    }\n}\n\nconst ct = /^[_a-zA-Z][_a-zA-Z0-9]*$/;\n\n/**\n * A dot-separated path for navigating sub-objects within a document.\n * @internal\n */ class at extends ot {\n    construct(t, e, n) {\n        return new at(t, e, n);\n    }\n    /**\n     * Returns true if the string could be used as a segment in a field path\n     * without escaping.\n     */    static isValidIdentifier(t) {\n        return ct.test(t);\n    }\n    canonicalString() {\n        return this.toArray().map((t => (t = t.replace(/\\\\/g, \"\\\\\\\\\").replace(/`/g, \"\\\\`\"), \n        at.isValidIdentifier(t) || (t = \"`\" + t + \"`\"), t))).join(\".\");\n    }\n    toString() {\n        return this.canonicalString();\n    }\n    /**\n     * Returns true if this field references the key of a document.\n     */    isKeyField() {\n        return 1 === this.length && \"__name__\" === this.get(0);\n    }\n    /**\n     * The field designating the key of a document.\n     */    static keyField() {\n        return new at([ \"__name__\" ]);\n    }\n    /**\n     * Parses a field string from the given server-formatted string.\n     *\n     * - Splitting the empty string is not allowed (for now at least).\n     * - Empty segments within the string (e.g. if there are two consecutive\n     *   separators) are not allowed.\n     *\n     * TODO(b/37244157): we should make this more strict. Right now, it allows\n     * non-identifier path components, even if they aren't escaped.\n     */    static fromServerFormat(t) {\n        const e = [];\n        let n = \"\", s = 0;\n        const i = () => {\n            if (0 === n.length) throw new U(q.INVALID_ARGUMENT, `Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);\n            e.push(n), n = \"\";\n        };\n        let r = !1;\n        for (;s < t.length; ) {\n            const e = t[s];\n            if (\"\\\\\" === e) {\n                if (s + 1 === t.length) throw new U(q.INVALID_ARGUMENT, \"Path has trailing escape character: \" + t);\n                const e = t[s + 1];\n                if (\"\\\\\" !== e && \".\" !== e && \"`\" !== e) throw new U(q.INVALID_ARGUMENT, \"Path has invalid escape sequence: \" + t);\n                n += e, s += 2;\n            } else \"`\" === e ? (r = !r, s++) : \".\" !== e || r ? (n += e, s++) : (i(), s++);\n        }\n        if (i(), r) throw new U(q.INVALID_ARGUMENT, \"Unterminated ` in path: \" + t);\n        return new at(e);\n    }\n    static emptyPath() {\n        return new at([]);\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @internal\n */ class ht {\n    constructor(t) {\n        this.path = t;\n    }\n    static fromPath(t) {\n        return new ht(ut.fromString(t));\n    }\n    static fromName(t) {\n        return new ht(ut.fromString(t).popFirst(5));\n    }\n    static empty() {\n        return new ht(ut.emptyPath());\n    }\n    get collectionGroup() {\n        return this.path.popLast().lastSegment();\n    }\n    /** Returns true if the document is in the specified collectionId. */    hasCollectionId(t) {\n        return this.path.length >= 2 && this.path.get(this.path.length - 2) === t;\n    }\n    /** Returns the collection group (i.e. the name of the parent collection) for this key. */    getCollectionGroup() {\n        return this.path.get(this.path.length - 2);\n    }\n    /** Returns the fully qualified path to the parent collection. */    getCollectionPath() {\n        return this.path.popLast();\n    }\n    isEqual(t) {\n        return null !== t && 0 === ut.comparator(this.path, t.path);\n    }\n    toString() {\n        return this.path.toString();\n    }\n    static comparator(t, e) {\n        return ut.comparator(t.path, e.path);\n    }\n    static isDocumentKey(t) {\n        return t.length % 2 == 0;\n    }\n    /**\n     * Creates and returns a new document key with the given segments.\n     *\n     * @param segments - The segments of the path to the document\n     * @returns A new instance of DocumentKey\n     */    static fromSegments(t) {\n        return new ht(new ut(t.slice()));\n    }\n}\n\n/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The initial mutation batch id for each index. Gets updated during index\n * backfill.\n */\n/**\n * An index definition for field indexes in Firestore.\n *\n * Every index is associated with a collection. The definition contains a list\n * of fields and their index kind (which can be `ASCENDING`, `DESCENDING` or\n * `CONTAINS` for ArrayContains/ArrayContainsAny queries).\n *\n * Unlike the backend, the SDK does not differentiate between collection or\n * collection group-scoped indices. Every index can be used for both single\n * collection and collection group queries.\n */\nclass lt {\n    constructor(\n    /**\n     * The index ID. Returns -1 if the index ID is not available (e.g. the index\n     * has not yet been persisted).\n     */\n    t, \n    /** The collection ID this index applies to. */\n    e, \n    /** The field segments for this index. */\n    n, \n    /** Shows how up-to-date the index is for the current user. */\n    s) {\n        this.indexId = t, this.collectionGroup = e, this.fields = n, this.indexState = s;\n    }\n}\n\n/** An ID for an index that has not yet been added to persistence.  */\n/** Returns the ArrayContains/ArrayContainsAny segment for this index. */\nfunction ft(t) {\n    return t.fields.find((t => 2 /* IndexKind.CONTAINS */ === t.kind));\n}\n\n/** Returns all directional (ascending/descending) segments for this index. */ function dt(t) {\n    return t.fields.filter((t => 2 /* IndexKind.CONTAINS */ !== t.kind));\n}\n\n/**\n * Returns the order of the document key component for the given index.\n *\n * PORTING NOTE: This is only used in the Web IndexedDb implementation.\n */\n/**\n * Compares indexes by collection group and segments. Ignores update time and\n * index ID.\n */\nfunction wt(t, e) {\n    let n = et(t.collectionGroup, e.collectionGroup);\n    if (0 !== n) return n;\n    for (let s = 0; s < Math.min(t.fields.length, e.fields.length); ++s) if (n = mt(t.fields[s], e.fields[s]), \n    0 !== n) return n;\n    return et(t.fields.length, e.fields.length);\n}\n\n/** Returns a debug representation of the field index */ lt.UNKNOWN_ID = -1;\n\n/** An index component consisting of field path and index type.  */\nclass _t {\n    constructor(\n    /** The field path of the component. */\n    t, \n    /** The fields sorting order. */\n    e) {\n        this.fieldPath = t, this.kind = e;\n    }\n}\n\nfunction mt(t, e) {\n    const n = at.comparator(t.fieldPath, e.fieldPath);\n    return 0 !== n ? n : et(t.kind, e.kind);\n}\n\n/**\n * Stores the \"high water mark\" that indicates how updated the Index is for the\n * current user.\n */ class gt {\n    constructor(\n    /**\n     * Indicates when the index was last updated (relative to other indexes).\n     */\n    t, \n    /** The the latest indexed read time, document and batch id. */\n    e) {\n        this.sequenceNumber = t, this.offset = e;\n    }\n    /** The state of an index that has not yet been backfilled. */    static empty() {\n        return new gt(0, It.min());\n    }\n}\n\n/**\n * Creates an offset that matches all documents with a read time higher than\n * `readTime`.\n */ function yt(t, e) {\n    // We want to create an offset that matches all documents with a read time\n    // greater than the provided read time. To do so, we technically need to\n    // create an offset for `(readTime, MAX_DOCUMENT_KEY)`. While we could use\n    // Unicode codepoints to generate MAX_DOCUMENT_KEY, it is much easier to use\n    // `(readTime + 1, DocumentKey.empty())` since `> DocumentKey.empty()` matches\n    // all valid document IDs.\n    const n = t.toTimestamp().seconds, s = t.toTimestamp().nanoseconds + 1, i = rt.fromTimestamp(1e9 === s ? new it(n + 1, 0) : new it(n, s));\n    return new It(i, ht.empty(), e);\n}\n\n/** Creates a new offset based on the provided document. */ function pt(t) {\n    return new It(t.readTime, t.key, -1);\n}\n\n/**\n * Stores the latest read time, document and batch ID that were processed for an\n * index.\n */ class It {\n    constructor(\n    /**\n     * The latest read time version that has been indexed by Firestore for this\n     * field index.\n     */\n    t, \n    /**\n     * The key of the last document that was indexed for this query. Use\n     * `DocumentKey.empty()` if no document has been indexed.\n     */\n    e, \n    /*\n     * The largest mutation batch id that's been processed by Firestore.\n     */\n    n) {\n        this.readTime = t, this.documentKey = e, this.largestBatchId = n;\n    }\n    /** Returns an offset that sorts before all regular offsets. */    static min() {\n        return new It(rt.min(), ht.empty(), -1);\n    }\n    /** Returns an offset that sorts after all regular offsets. */    static max() {\n        return new It(rt.max(), ht.empty(), -1);\n    }\n}\n\nfunction Tt(t, e) {\n    let n = t.readTime.compareTo(e.readTime);\n    return 0 !== n ? n : (n = ht.comparator(t.documentKey, e.documentKey), 0 !== n ? n : et(t.largestBatchId, e.largestBatchId));\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const Et = \"The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.\";\n\n/**\n * A base class representing a persistence transaction, encapsulating both the\n * transaction's sequence numbers as well as a list of onCommitted listeners.\n *\n * When you call Persistence.runTransaction(), it will create a transaction and\n * pass it to your callback. You then pass it to any method that operates\n * on persistence.\n */ class At {\n    constructor() {\n        this.onCommittedListeners = [];\n    }\n    addOnCommittedListener(t) {\n        this.onCommittedListeners.push(t);\n    }\n    raiseOnCommittedEvent() {\n        this.onCommittedListeners.forEach((t => t()));\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Verifies the error thrown by a LocalStore operation. If a LocalStore\n * operation fails because the primary lease has been taken by another client,\n * we ignore the error (the persistence layer will immediately call\n * `applyPrimaryLease` to propagate the primary state change). All other errors\n * are re-thrown.\n *\n * @param err - An error returned by a LocalStore operation.\n * @returns A Promise that resolves after we recovered, or the original error.\n */ async function vt(t) {\n    if (t.code !== q.FAILED_PRECONDITION || t.message !== Et) throw t;\n    N(\"LocalStore\", \"Unexpectedly lost primary lease\");\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * PersistencePromise is essentially a re-implementation of Promise except\n * it has a .next() method instead of .then() and .next() and .catch() callbacks\n * are executed synchronously when a PersistencePromise resolves rather than\n * asynchronously (Promise implementations use setImmediate() or similar).\n *\n * This is necessary to interoperate with IndexedDB which will automatically\n * commit transactions if control is returned to the event loop without\n * synchronously initiating another operation on the transaction.\n *\n * NOTE: .then() and .catch() only allow a single consumer, unlike normal\n * Promises.\n */ class Rt {\n    constructor(t) {\n        // NOTE: next/catchCallback will always point to our own wrapper functions,\n        // not the user's raw next() or catch() callbacks.\n        this.nextCallback = null, this.catchCallback = null, \n        // When the operation resolves, we'll set result or error and mark isDone.\n        this.result = void 0, this.error = void 0, this.isDone = !1, \n        // Set to true when .then() or .catch() are called and prevents additional\n        // chaining.\n        this.callbackAttached = !1, t((t => {\n            this.isDone = !0, this.result = t, this.nextCallback && \n            // value should be defined unless T is Void, but we can't express\n            // that in the type system.\n            this.nextCallback(t);\n        }), (t => {\n            this.isDone = !0, this.error = t, this.catchCallback && this.catchCallback(t);\n        }));\n    }\n    catch(t) {\n        return this.next(void 0, t);\n    }\n    next(t, e) {\n        return this.callbackAttached && O(), this.callbackAttached = !0, this.isDone ? this.error ? this.wrapFailure(e, this.error) : this.wrapSuccess(t, this.result) : new Rt(((n, s) => {\n            this.nextCallback = e => {\n                this.wrapSuccess(t, e).next(n, s);\n            }, this.catchCallback = t => {\n                this.wrapFailure(e, t).next(n, s);\n            };\n        }));\n    }\n    toPromise() {\n        return new Promise(((t, e) => {\n            this.next(t, e);\n        }));\n    }\n    wrapUserFunction(t) {\n        try {\n            const e = t();\n            return e instanceof Rt ? e : Rt.resolve(e);\n        } catch (t) {\n            return Rt.reject(t);\n        }\n    }\n    wrapSuccess(t, e) {\n        return t ? this.wrapUserFunction((() => t(e))) : Rt.resolve(e);\n    }\n    wrapFailure(t, e) {\n        return t ? this.wrapUserFunction((() => t(e))) : Rt.reject(e);\n    }\n    static resolve(t) {\n        return new Rt(((e, n) => {\n            e(t);\n        }));\n    }\n    static reject(t) {\n        return new Rt(((e, n) => {\n            n(t);\n        }));\n    }\n    static waitFor(\n    // Accept all Promise types in waitFor().\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    t) {\n        return new Rt(((e, n) => {\n            let s = 0, i = 0, r = !1;\n            t.forEach((t => {\n                ++s, t.next((() => {\n                    ++i, r && i === s && e();\n                }), (t => n(t)));\n            })), r = !0, i === s && e();\n        }));\n    }\n    /**\n     * Given an array of predicate functions that asynchronously evaluate to a\n     * boolean, implements a short-circuiting `or` between the results. Predicates\n     * will be evaluated until one of them returns `true`, then stop. The final\n     * result will be whether any of them returned `true`.\n     */    static or(t) {\n        let e = Rt.resolve(!1);\n        for (const n of t) e = e.next((t => t ? Rt.resolve(t) : n()));\n        return e;\n    }\n    static forEach(t, e) {\n        const n = [];\n        return t.forEach(((t, s) => {\n            n.push(e.call(this, t, s));\n        })), this.waitFor(n);\n    }\n    /**\n     * Concurrently map all array elements through asynchronous function.\n     */    static mapArray(t, e) {\n        return new Rt(((n, s) => {\n            const i = t.length, r = new Array(i);\n            let o = 0;\n            for (let u = 0; u < i; u++) {\n                const c = u;\n                e(t[c]).next((t => {\n                    r[c] = t, ++o, o === i && n(r);\n                }), (t => s(t)));\n            }\n        }));\n    }\n    /**\n     * An alternative to recursive PersistencePromise calls, that avoids\n     * potential memory problems from unbounded chains of promises.\n     *\n     * The `action` will be called repeatedly while `condition` is true.\n     */    static doWhile(t, e) {\n        return new Rt(((n, s) => {\n            const i = () => {\n                !0 === t() ? e().next((() => {\n                    i();\n                }), s) : n();\n            };\n            i();\n        }));\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// References to `window` are guarded by SimpleDb.isAvailable()\n/* eslint-disable no-restricted-globals */\n/**\n * Wraps an IDBTransaction and exposes a store() method to get a handle to a\n * specific object store.\n */\nclass Pt {\n    constructor(t, e) {\n        this.action = t, this.transaction = e, this.aborted = !1, \n        /**\n         * A `Promise` that resolves with the result of the IndexedDb transaction.\n         */\n        this.v = new K, this.transaction.oncomplete = () => {\n            this.v.resolve();\n        }, this.transaction.onabort = () => {\n            e.error ? this.v.reject(new St(t, e.error)) : this.v.resolve();\n        }, this.transaction.onerror = e => {\n            const n = kt(e.target.error);\n            this.v.reject(new St(t, n));\n        };\n    }\n    static open(t, e, n, s) {\n        try {\n            return new Pt(e, t.transaction(s, n));\n        } catch (t) {\n            throw new St(e, t);\n        }\n    }\n    get R() {\n        return this.v.promise;\n    }\n    abort(t) {\n        t && this.v.reject(t), this.aborted || (N(\"SimpleDb\", \"Aborting transaction:\", t ? t.message : \"Client-initiated abort\"), \n        this.aborted = !0, this.transaction.abort());\n    }\n    P() {\n        // If the browser supports V3 IndexedDB, we invoke commit() explicitly to\n        // speed up index DB processing if the event loop remains blocks.\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        const t = this.transaction;\n        this.aborted || \"function\" != typeof t.commit || t.commit();\n    }\n    /**\n     * Returns a SimpleDbStore<KeyType, ValueType> for the specified store. All\n     * operations performed on the SimpleDbStore happen within the context of this\n     * transaction and it cannot be used anymore once the transaction is\n     * completed.\n     *\n     * Note that we can't actually enforce that the KeyType and ValueType are\n     * correct, but they allow type safety through the rest of the consuming code.\n     */    store(t) {\n        const e = this.transaction.objectStore(t);\n        return new Ct(e);\n    }\n}\n\n/**\n * Provides a wrapper around IndexedDb with a simplified interface that uses\n * Promise-like return values to chain operations. Real promises cannot be used\n * since .then() continuations are executed asynchronously (e.g. via\n * .setImmediate), which would cause IndexedDB to end the transaction.\n * See PersistencePromise for more details.\n */ class bt {\n    /*\n     * Creates a new SimpleDb wrapper for IndexedDb database `name`.\n     *\n     * Note that `version` must not be a downgrade. IndexedDB does not support\n     * downgrading the schema version. We currently do not support any way to do\n     * versioning outside of IndexedDB's versioning mechanism, as only\n     * version-upgrade transactions are allowed to do things like create\n     * objectstores.\n     */\n    constructor(t, e, n) {\n        this.name = t, this.version = e, this.V = n;\n        // NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the\n        // bug we're checking for should exist in iOS >= 12.2 and < 13, but for\n        // whatever reason it's much harder to hit after 12.2 so we only proactively\n        // log on 12.2.\n        12.2 === bt.S(getUA()) && k(\"Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.\");\n    }\n    /** Deletes the specified database. */    static delete(t) {\n        return N(\"SimpleDb\", \"Removing database:\", t), xt(window.indexedDB.deleteDatabase(t)).toPromise();\n    }\n    /** Returns true if IndexedDB is available in the current environment. */    static D() {\n        if (!isIndexedDBAvailable()) return !1;\n        if (bt.C()) return !0;\n        // We extensively use indexed array values and compound keys,\n        // which IE and Edge do not support. However, they still have indexedDB\n        // defined on the window, so we need to check for them here and make sure\n        // to return that persistence is not enabled for those browsers.\n        // For tracking support of this feature, see here:\n        // https://developer.microsoft.com/en-us/microsoft-edge/platform/status/indexeddbarraysandmultientrysupport/\n        // Check the UA string to find out the browser.\n                const t = getUA(), e = bt.S(t), n = 0 < e && e < 10, s = bt.N(t), i = 0 < s && s < 4.5;\n        // IE 10\n        // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';\n        // IE 11\n        // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';\n        // Edge\n        // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML,\n        // like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';\n        // iOS Safari: Disable for users running iOS version < 10.\n                return !(t.indexOf(\"MSIE \") > 0 || t.indexOf(\"Trident/\") > 0 || t.indexOf(\"Edge/\") > 0 || n || i);\n    }\n    /**\n     * Returns true if the backing IndexedDB store is the Node IndexedDBShim\n     * (see https://github.com/axemclion/IndexedDBShim).\n     */    static C() {\n        var t;\n        return \"undefined\" != typeof process && \"YES\" === (null === (t = process.env) || void 0 === t ? void 0 : t.k);\n    }\n    /** Helper to get a typed SimpleDbStore from a transaction. */    static M(t, e) {\n        return t.store(e);\n    }\n    // visible for testing\n    /** Parse User Agent to determine iOS version. Returns -1 if not found. */\n    static S(t) {\n        const e = t.match(/i(?:phone|pad|pod) os ([\\d_]+)/i), n = e ? e[1].split(\"_\").slice(0, 2).join(\".\") : \"-1\";\n        return Number(n);\n    }\n    // visible for testing\n    /** Parse User Agent to determine Android version. Returns -1 if not found. */\n    static N(t) {\n        const e = t.match(/Android ([\\d.]+)/i), n = e ? e[1].split(\".\").slice(0, 2).join(\".\") : \"-1\";\n        return Number(n);\n    }\n    /**\n     * Opens the specified database, creating or upgrading it if necessary.\n     */    async $(t) {\n        return this.db || (N(\"SimpleDb\", \"Opening database:\", this.name), this.db = await new Promise(((e, n) => {\n            // TODO(mikelehen): Investigate browser compatibility.\n            // https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB\n            // suggests IE9 and older WebKit browsers handle upgrade\n            // differently. They expect setVersion, as described here:\n            // https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeRequest/setVersion\n            const s = indexedDB.open(this.name, this.version);\n            s.onsuccess = t => {\n                const n = t.target.result;\n                e(n);\n            }, s.onblocked = () => {\n                n(new St(t, \"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed.\"));\n            }, s.onerror = e => {\n                const s = e.target.error;\n                \"VersionError\" === s.name ? n(new U(q.FAILED_PRECONDITION, \"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.\")) : \"InvalidStateError\" === s.name ? n(new U(q.FAILED_PRECONDITION, \"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: \" + s)) : n(new St(t, s));\n            }, s.onupgradeneeded = t => {\n                N(\"SimpleDb\", 'Database \"' + this.name + '\" requires upgrade from version:', t.oldVersion);\n                const e = t.target.result;\n                this.V.O(e, s.transaction, t.oldVersion, this.version).next((() => {\n                    N(\"SimpleDb\", \"Database upgrade to version \" + this.version + \" complete\");\n                }));\n            };\n        }))), this.F && (this.db.onversionchange = t => this.F(t)), this.db;\n    }\n    B(t) {\n        this.F = t, this.db && (this.db.onversionchange = e => t(e));\n    }\n    async runTransaction(t, e, n, s) {\n        const i = \"readonly\" === e;\n        let r = 0;\n        for (;;) {\n            ++r;\n            try {\n                this.db = await this.$(t);\n                const e = Pt.open(this.db, t, i ? \"readonly\" : \"readwrite\", n), r = s(e).next((t => (e.P(), \n                t))).catch((t => (\n                // Abort the transaction if there was an error.\n                e.abort(t), Rt.reject(t)))).toPromise();\n                // As noted above, errors are propagated by aborting the transaction. So\n                // we swallow any error here to avoid the browser logging it as unhandled.\n                return r.catch((() => {})), \n                // Wait for the transaction to complete (i.e. IndexedDb's onsuccess event to\n                // fire), but still return the original transactionFnResult back to the\n                // caller.\n                await e.R, r;\n            } catch (t) {\n                const e = t, n = \"FirebaseError\" !== e.name && r < 3;\n                // TODO(schmidt-sebastian): We could probably be smarter about this and\n                // not retry exceptions that are likely unrecoverable (such as quota\n                // exceeded errors).\n                // Note: We cannot use an instanceof check for FirestoreException, since the\n                // exception is wrapped in a generic error by our async/await handling.\n                                if (N(\"SimpleDb\", \"Transaction failed with error:\", e.message, \"Retrying:\", n), \n                this.close(), !n) return Promise.reject(e);\n            }\n        }\n    }\n    close() {\n        this.db && this.db.close(), this.db = void 0;\n    }\n}\n\n/**\n * A controller for iterating over a key range or index. It allows an iterate\n * callback to delete the currently-referenced object, or jump to a new key\n * within the key range or index.\n */ class Vt {\n    constructor(t) {\n        this.L = t, this.q = !1, this.U = null;\n    }\n    get isDone() {\n        return this.q;\n    }\n    get K() {\n        return this.U;\n    }\n    set cursor(t) {\n        this.L = t;\n    }\n    /**\n     * This function can be called to stop iteration at any point.\n     */    done() {\n        this.q = !0;\n    }\n    /**\n     * This function can be called to skip to that next key, which could be\n     * an index or a primary key.\n     */    G(t) {\n        this.U = t;\n    }\n    /**\n     * Delete the current cursor value from the object store.\n     *\n     * NOTE: You CANNOT do this with a keysOnly query.\n     */    delete() {\n        return xt(this.L.delete());\n    }\n}\n\n/** An error that wraps exceptions that thrown during IndexedDB execution. */ class St extends U {\n    constructor(t, e) {\n        super(q.UNAVAILABLE, `IndexedDB transaction '${t}' failed: ${e}`), this.name = \"IndexedDbTransactionError\";\n    }\n}\n\n/** Verifies whether `e` is an IndexedDbTransactionError. */ function Dt(t) {\n    // Use name equality, as instanceof checks on errors don't work with errors\n    // that wrap other errors.\n    return \"IndexedDbTransactionError\" === t.name;\n}\n\n/**\n * A wrapper around an IDBObjectStore providing an API that:\n *\n * 1) Has generic KeyType / ValueType parameters to provide strongly-typed\n * methods for acting against the object store.\n * 2) Deals with IndexedDB's onsuccess / onerror event callbacks, making every\n * method return a PersistencePromise instead.\n * 3) Provides a higher-level API to avoid needing to do excessive wrapping of\n * intermediate IndexedDB types (IDBCursorWithValue, etc.)\n */ class Ct {\n    constructor(t) {\n        this.store = t;\n    }\n    put(t, e) {\n        let n;\n        return void 0 !== e ? (N(\"SimpleDb\", \"PUT\", this.store.name, t, e), n = this.store.put(e, t)) : (N(\"SimpleDb\", \"PUT\", this.store.name, \"<auto-key>\", t), \n        n = this.store.put(t)), xt(n);\n    }\n    /**\n     * Adds a new value into an Object Store and returns the new key. Similar to\n     * IndexedDb's `add()`, this method will fail on primary key collisions.\n     *\n     * @param value - The object to write.\n     * @returns The key of the value to add.\n     */    add(t) {\n        N(\"SimpleDb\", \"ADD\", this.store.name, t, t);\n        return xt(this.store.add(t));\n    }\n    /**\n     * Gets the object with the specified key from the specified store, or null\n     * if no object exists with the specified key.\n     *\n     * @key The key of the object to get.\n     * @returns The object with the specified key or null if no object exists.\n     */    get(t) {\n        // We're doing an unsafe cast to ValueType.\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return xt(this.store.get(t)).next((e => (\n        // Normalize nonexistence to null.\n        void 0 === e && (e = null), N(\"SimpleDb\", \"GET\", this.store.name, t, e), e)));\n    }\n    delete(t) {\n        N(\"SimpleDb\", \"DELETE\", this.store.name, t);\n        return xt(this.store.delete(t));\n    }\n    /**\n     * If we ever need more of the count variants, we can add overloads. For now,\n     * all we need is to count everything in a store.\n     *\n     * Returns the number of rows in the store.\n     */    count() {\n        N(\"SimpleDb\", \"COUNT\", this.store.name);\n        return xt(this.store.count());\n    }\n    j(t, e) {\n        const n = this.options(t, e);\n        // Use `getAll()` if the browser supports IndexedDB v3, as it is roughly\n        // 20% faster. Unfortunately, getAll() does not support custom indices.\n                if (n.index || \"function\" != typeof this.store.getAll) {\n            const t = this.cursor(n), e = [];\n            return this.W(t, ((t, n) => {\n                e.push(n);\n            })).next((() => e));\n        }\n        {\n            const t = this.store.getAll(n.range);\n            return new Rt(((e, n) => {\n                t.onerror = t => {\n                    n(t.target.error);\n                }, t.onsuccess = t => {\n                    e(t.target.result);\n                };\n            }));\n        }\n    }\n    /**\n     * Loads the first `count` elements from the provided index range. Loads all\n     * elements if no limit is provided.\n     */    H(t, e) {\n        const n = this.store.getAll(t, null === e ? void 0 : e);\n        return new Rt(((t, e) => {\n            n.onerror = t => {\n                e(t.target.error);\n            }, n.onsuccess = e => {\n                t(e.target.result);\n            };\n        }));\n    }\n    J(t, e) {\n        N(\"SimpleDb\", \"DELETE ALL\", this.store.name);\n        const n = this.options(t, e);\n        n.Y = !1;\n        const s = this.cursor(n);\n        return this.W(s, ((t, e, n) => n.delete()));\n    }\n    X(t, e) {\n        let n;\n        e ? n = t : (n = {}, e = t);\n        const s = this.cursor(n);\n        return this.W(s, e);\n    }\n    /**\n     * Iterates over a store, but waits for the given callback to complete for\n     * each entry before iterating the next entry. This allows the callback to do\n     * asynchronous work to determine if this iteration should continue.\n     *\n     * The provided callback should return `true` to continue iteration, and\n     * `false` otherwise.\n     */    Z(t) {\n        const e = this.cursor({});\n        return new Rt(((n, s) => {\n            e.onerror = t => {\n                const e = kt(t.target.error);\n                s(e);\n            }, e.onsuccess = e => {\n                const s = e.target.result;\n                s ? t(s.primaryKey, s.value).next((t => {\n                    t ? s.continue() : n();\n                })) : n();\n            };\n        }));\n    }\n    W(t, e) {\n        const n = [];\n        return new Rt(((s, i) => {\n            t.onerror = t => {\n                i(t.target.error);\n            }, t.onsuccess = t => {\n                const i = t.target.result;\n                if (!i) return void s();\n                const r = new Vt(i), o = e(i.primaryKey, i.value, r);\n                if (o instanceof Rt) {\n                    const t = o.catch((t => (r.done(), Rt.reject(t))));\n                    n.push(t);\n                }\n                r.isDone ? s() : null === r.K ? i.continue() : i.continue(r.K);\n            };\n        })).next((() => Rt.waitFor(n)));\n    }\n    options(t, e) {\n        let n;\n        return void 0 !== t && (\"string\" == typeof t ? n = t : e = t), {\n            index: n,\n            range: e\n        };\n    }\n    cursor(t) {\n        let e = \"next\";\n        if (t.reverse && (e = \"prev\"), t.index) {\n            const n = this.store.index(t.index);\n            return t.Y ? n.openKeyCursor(t.range, e) : n.openCursor(t.range, e);\n        }\n        return this.store.openCursor(t.range, e);\n    }\n}\n\n/**\n * Wraps an IDBRequest in a PersistencePromise, using the onsuccess / onerror\n * handlers to resolve / reject the PersistencePromise as appropriate.\n */ function xt(t) {\n    return new Rt(((e, n) => {\n        t.onsuccess = t => {\n            const n = t.target.result;\n            e(n);\n        }, t.onerror = t => {\n            const e = kt(t.target.error);\n            n(e);\n        };\n    }));\n}\n\n// Guard so we only report the error once.\nlet Nt = !1;\n\nfunction kt(t) {\n    const e = bt.S(getUA());\n    if (e >= 12.2 && e < 13) {\n        const e = \"An internal error was encountered in the Indexed Database server\";\n        if (t.message.indexOf(e) >= 0) {\n            // Wrap error in a more descriptive one.\n            const t = new U(\"internal\", `IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${e}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);\n            return Nt || (Nt = !0, \n            // Throw a global exception outside of this promise chain, for the user to\n            // potentially catch.\n            setTimeout((() => {\n                throw t;\n            }), 0)), t;\n        }\n    }\n    return t;\n}\n\n/** This class is responsible for the scheduling of Index Backfiller. */\nclass Mt {\n    constructor(t, e) {\n        this.asyncQueue = t, this.tt = e, this.task = null;\n    }\n    start() {\n        this.et(15e3);\n    }\n    stop() {\n        this.task && (this.task.cancel(), this.task = null);\n    }\n    get started() {\n        return null !== this.task;\n    }\n    et(t) {\n        N(\"IndexBackiller\", `Scheduled in ${t}ms`), this.task = this.asyncQueue.enqueueAfterDelay(\"index_backfill\" /* TimerId.IndexBackfill */ , t, (async () => {\n            this.task = null;\n            try {\n                N(\"IndexBackiller\", `Documents written: ${await this.tt.nt()}`);\n            } catch (t) {\n                Dt(t) ? N(\"IndexBackiller\", \"Ignoring IndexedDB error during index backfill: \", t) : await vt(t);\n            }\n            await this.et(6e4);\n        }));\n    }\n}\n\n/** Implements the steps for backfilling indexes. */ class $t {\n    constructor(\n    /**\n     * LocalStore provides access to IndexManager and LocalDocumentView.\n     * These properties will update when the user changes. Consequently,\n     * making a local copy of IndexManager and LocalDocumentView will require\n     * updates over time. The simpler solution is to rely on LocalStore to have\n     * an up-to-date references to IndexManager and LocalDocumentStore.\n     */\n    t, e) {\n        this.localStore = t, this.persistence = e;\n    }\n    async nt(t = 50) {\n        return this.persistence.runTransaction(\"Backfill Indexes\", \"readwrite-primary\", (e => this.st(e, t)));\n    }\n    /** Writes index entries until the cap is reached. Returns the number of documents processed. */    st(t, e) {\n        const n = new Set;\n        let s = e, i = !0;\n        return Rt.doWhile((() => !0 === i && s > 0), (() => this.localStore.indexManager.getNextCollectionGroupToUpdate(t).next((e => {\n            if (null !== e && !n.has(e)) return N(\"IndexBackiller\", `Processing collection: ${e}`), \n            this.it(t, e, s).next((t => {\n                s -= t, n.add(e);\n            }));\n            i = !1;\n        })))).next((() => e - s));\n    }\n    /**\n     * Writes entries for the provided collection group. Returns the number of documents processed.\n     */    it(t, e, n) {\n        // Use the earliest offset of all field indexes to query the local cache.\n        return this.localStore.indexManager.getMinOffsetFromCollectionGroup(t, e).next((s => this.localStore.localDocuments.getNextDocuments(t, e, s, n).next((n => {\n            const i = n.changes;\n            return this.localStore.indexManager.updateIndexEntries(t, i).next((() => this.rt(s, n))).next((n => (N(\"IndexBackiller\", `Updating offset: ${n}`), \n            this.localStore.indexManager.updateCollectionGroup(t, e, n)))).next((() => i.size));\n        }))));\n    }\n    /** Returns the next offset based on the provided documents. */    rt(t, e) {\n        let n = t;\n        return e.changes.forEach(((t, e) => {\n            const s = pt(e);\n            Tt(s, n) > 0 && (n = s);\n        })), new It(n.readTime, n.documentKey, Math.max(e.batchId, t.largestBatchId));\n    }\n}\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * `ListenSequence` is a monotonic sequence. It is initialized with a minimum value to\n * exceed. All subsequent calls to next will return increasing values. If provided with a\n * `SequenceNumberSyncer`, it will additionally bump its next value when told of a new value, as\n * well as write out sequence numbers that it produces via `next()`.\n */ class Ot {\n    constructor(t, e) {\n        this.previousValue = t, e && (e.sequenceNumberHandler = t => this.ot(t), this.ut = t => e.writeSequenceNumber(t));\n    }\n    ot(t) {\n        return this.previousValue = Math.max(t, this.previousValue), this.previousValue;\n    }\n    next() {\n        const t = ++this.previousValue;\n        return this.ut && this.ut(t), t;\n    }\n}\n\nOt.ct = -1;\n\n/**\n * Returns whether a variable is either undefined or null.\n */\nfunction Ft(t) {\n    return null == t;\n}\n\n/** Returns whether the value represents -0. */ function Bt(t) {\n    // Detect if the value is -0.0. Based on polyfill from\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n    return 0 === t && 1 / t == -1 / 0;\n}\n\n/**\n * Returns whether a value is an integer and in the safe integer range\n * @param value - The value to test for being an integer and in the safe range\n */ function Lt(t) {\n    return \"number\" == typeof t && Number.isInteger(t) && !Bt(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Encodes a resource path into a IndexedDb-compatible string form.\n */\nfunction qt(t) {\n    let e = \"\";\n    for (let n = 0; n < t.length; n++) e.length > 0 && (e = Kt(e)), e = Ut(t.get(n), e);\n    return Kt(e);\n}\n\n/** Encodes a single segment of a resource path into the given result */ function Ut(t, e) {\n    let n = e;\n    const s = t.length;\n    for (let e = 0; e < s; e++) {\n        const s = t.charAt(e);\n        switch (s) {\n          case \"\\0\":\n            n += \"\u0001\u0010\";\n            break;\n\n          case \"\u0001\":\n            n += \"\u0001\u0011\";\n            break;\n\n          default:\n            n += s;\n        }\n    }\n    return n;\n}\n\n/** Encodes a path separator into the given result */ function Kt(t) {\n    return t + \"\u0001\u0001\";\n}\n\n/**\n * Decodes the given IndexedDb-compatible string form of a resource path into\n * a ResourcePath instance. Note that this method is not suitable for use with\n * decoding resource names from the server; those are One Platform format\n * strings.\n */ function Gt(t) {\n    // Event the empty path must encode as a path of at least length 2. A path\n    // with exactly 2 must be the empty path.\n    const e = t.length;\n    if (F(e >= 2), 2 === e) return F(\"\u0001\" === t.charAt(0) && \"\u0001\" === t.charAt(1)), ut.emptyPath();\n    // Escape characters cannot exist past the second-to-last position in the\n    // source value.\n        const __PRIVATE_lastReasonableEscapeIndex = e - 2, n = [];\n    let s = \"\";\n    for (let i = 0; i < e; ) {\n        // The last two characters of a valid encoded path must be a separator, so\n        // there must be an end to this segment.\n        const e = t.indexOf(\"\u0001\", i);\n        (e < 0 || e > __PRIVATE_lastReasonableEscapeIndex) && O();\n        switch (t.charAt(e + 1)) {\n          case \"\u0001\":\n            const r = t.substring(i, e);\n            let o;\n            0 === s.length ? \n            // Avoid copying for the common case of a segment that excludes \\0\n            // and \\001\n            o = r : (s += r, o = s, s = \"\"), n.push(o);\n            break;\n\n          case \"\u0010\":\n            s += t.substring(i, e), s += \"\\0\";\n            break;\n\n          case \"\u0011\":\n            // The escape character can be used in the output to encode itself.\n            s += t.substring(i, e + 1);\n            break;\n\n          default:\n            O();\n        }\n        i = e + 2;\n    }\n    return new ut(n);\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const Qt = [ \"userId\", \"batchId\" ];\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Name of the IndexedDb object store.\n *\n * Note that the name 'owner' is chosen to ensure backwards compatibility with\n * older clients that only supported single locked access to the persistence\n * layer.\n */\n/**\n * Creates a [userId, encodedPath] key for use in the DbDocumentMutations\n * index to iterate over all at document mutations for a given path or lower.\n */\nfunction jt(t, e) {\n    return [ t, qt(e) ];\n}\n\n/**\n * Creates a full index key of [userId, encodedPath, batchId] for inserting\n * and deleting into the DbDocumentMutations index.\n */ function zt(t, e, n) {\n    return [ t, qt(e), n ];\n}\n\n/**\n * Because we store all the useful information for this store in the key,\n * there is no useful information to store as the value. The raw (unencoded)\n * path cannot be stored because IndexedDb doesn't store prototype\n * information.\n */ const Wt = {}, Ht = [ \"prefixPath\", \"collectionGroup\", \"readTime\", \"documentId\" ], Jt = [ \"prefixPath\", \"collectionGroup\", \"documentId\" ], Yt = [ \"collectionGroup\", \"readTime\", \"prefixPath\", \"documentId\" ], Xt = [ \"canonicalId\", \"targetId\" ], Zt = [ \"targetId\", \"path\" ], te = [ \"path\", \"targetId\" ], ee = [ \"collectionId\", \"parent\" ], ne = [ \"indexId\", \"uid\" ], se = [ \"uid\", \"sequenceNumber\" ], ie = [ \"indexId\", \"uid\", \"arrayValue\", \"directionalValue\", \"orderedDocumentKey\", \"documentKey\" ], re = [ \"indexId\", \"uid\", \"orderedDocumentKey\" ], oe = [ \"userId\", \"collectionPath\", \"documentId\" ], ue = [ \"userId\", \"collectionPath\", \"largestBatchId\" ], ce = [ \"userId\", \"collectionGroup\", \"largestBatchId\" ], ae = [ ...[ ...[ ...[ ...[ \"mutationQueues\", \"mutations\", \"documentMutations\", \"remoteDocuments\", \"targets\", \"owner\", \"targetGlobal\", \"targetDocuments\" ], \"clientMetadata\" ], \"remoteDocumentGlobal\" ], \"collectionParents\" ], \"bundles\", \"namedQueries\" ], he = [ ...ae, \"documentOverlays\" ], le = [ \"mutationQueues\", \"mutations\", \"documentMutations\", \"remoteDocumentsV14\", \"targets\", \"owner\", \"targetGlobal\", \"targetDocuments\", \"clientMetadata\", \"remoteDocumentGlobal\", \"collectionParents\", \"bundles\", \"namedQueries\", \"documentOverlays\" ], fe = le, de = [ ...fe, \"indexConfiguration\", \"indexState\", \"indexEntries\" ];\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass we extends At {\n    constructor(t, e) {\n        super(), this.ht = t, this.currentSequenceNumber = e;\n    }\n}\n\nfunction _e(t, e) {\n    const n = L(t);\n    return bt.M(n.ht, e);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ function me(t) {\n    let e = 0;\n    for (const n in t) Object.prototype.hasOwnProperty.call(t, n) && e++;\n    return e;\n}\n\nfunction ge(t, e) {\n    for (const n in t) Object.prototype.hasOwnProperty.call(t, n) && e(n, t[n]);\n}\n\nfunction ye(t) {\n    for (const e in t) if (Object.prototype.hasOwnProperty.call(t, e)) return !1;\n    return !0;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// An immutable sorted map implementation, based on a Left-leaning Red-Black\n// tree.\nclass pe {\n    constructor(t, e) {\n        this.comparator = t, this.root = e || Te.EMPTY;\n    }\n    // Returns a copy of the map, with the specified key/value added or replaced.\n    insert(t, e) {\n        return new pe(this.comparator, this.root.insert(t, e, this.comparator).copy(null, null, Te.BLACK, null, null));\n    }\n    // Returns a copy of the map, with the specified key removed.\n    remove(t) {\n        return new pe(this.comparator, this.root.remove(t, this.comparator).copy(null, null, Te.BLACK, null, null));\n    }\n    // Returns the value of the node with the given key, or null.\n    get(t) {\n        let e = this.root;\n        for (;!e.isEmpty(); ) {\n            const n = this.comparator(t, e.key);\n            if (0 === n) return e.value;\n            n < 0 ? e = e.left : n > 0 && (e = e.right);\n        }\n        return null;\n    }\n    // Returns the index of the element in this sorted map, or -1 if it doesn't\n    // exist.\n    indexOf(t) {\n        // Number of nodes that were pruned when descending right\n        let e = 0, n = this.root;\n        for (;!n.isEmpty(); ) {\n            const s = this.comparator(t, n.key);\n            if (0 === s) return e + n.left.size;\n            s < 0 ? n = n.left : (\n            // Count all nodes left of the node plus the node itself\n            e += n.left.size + 1, n = n.right);\n        }\n        // Node not found\n                return -1;\n    }\n    isEmpty() {\n        return this.root.isEmpty();\n    }\n    // Returns the total number of nodes in the map.\n    get size() {\n        return this.root.size;\n    }\n    // Returns the minimum key in the map.\n    minKey() {\n        return this.root.minKey();\n    }\n    // Returns the maximum key in the map.\n    maxKey() {\n        return this.root.maxKey();\n    }\n    // Traverses the map in key order and calls the specified action function\n    // for each key/value pair. If action returns true, traversal is aborted.\n    // Returns the first truthy value returned by action, or the last falsey\n    // value returned by action.\n    inorderTraversal(t) {\n        return this.root.inorderTraversal(t);\n    }\n    forEach(t) {\n        this.inorderTraversal(((e, n) => (t(e, n), !1)));\n    }\n    toString() {\n        const t = [];\n        return this.inorderTraversal(((e, n) => (t.push(`${e}:${n}`), !1))), `{${t.join(\", \")}}`;\n    }\n    // Traverses the map in reverse key order and calls the specified action\n    // function for each key/value pair. If action returns true, traversal is\n    // aborted.\n    // Returns the first truthy value returned by action, or the last falsey\n    // value returned by action.\n    reverseTraversal(t) {\n        return this.root.reverseTraversal(t);\n    }\n    // Returns an iterator over the SortedMap.\n    getIterator() {\n        return new Ie(this.root, null, this.comparator, !1);\n    }\n    getIteratorFrom(t) {\n        return new Ie(this.root, t, this.comparator, !1);\n    }\n    getReverseIterator() {\n        return new Ie(this.root, null, this.comparator, !0);\n    }\n    getReverseIteratorFrom(t) {\n        return new Ie(this.root, t, this.comparator, !0);\n    }\n}\n\n // end SortedMap\n// An iterator over an LLRBNode.\nclass Ie {\n    constructor(t, e, n, s) {\n        this.isReverse = s, this.nodeStack = [];\n        let i = 1;\n        for (;!t.isEmpty(); ) if (i = e ? n(t.key, e) : 1, \n        // flip the comparison if we're going in reverse\n        e && s && (i *= -1), i < 0) \n        // This node is less than our start key. ignore it\n        t = this.isReverse ? t.left : t.right; else {\n            if (0 === i) {\n                // This node is exactly equal to our start key. Push it on the stack,\n                // but stop iterating;\n                this.nodeStack.push(t);\n                break;\n            }\n            // This node is greater than our start key, add it to the stack and move\n            // to the next one\n            this.nodeStack.push(t), t = this.isReverse ? t.right : t.left;\n        }\n    }\n    getNext() {\n        let t = this.nodeStack.pop();\n        const e = {\n            key: t.key,\n            value: t.value\n        };\n        if (this.isReverse) for (t = t.left; !t.isEmpty(); ) this.nodeStack.push(t), t = t.right; else for (t = t.right; !t.isEmpty(); ) this.nodeStack.push(t), \n        t = t.left;\n        return e;\n    }\n    hasNext() {\n        return this.nodeStack.length > 0;\n    }\n    peek() {\n        if (0 === this.nodeStack.length) return null;\n        const t = this.nodeStack[this.nodeStack.length - 1];\n        return {\n            key: t.key,\n            value: t.value\n        };\n    }\n}\n\n // end SortedMapIterator\n// Represents a node in a Left-leaning Red-Black tree.\nclass Te {\n    constructor(t, e, n, s, i) {\n        this.key = t, this.value = e, this.color = null != n ? n : Te.RED, this.left = null != s ? s : Te.EMPTY, \n        this.right = null != i ? i : Te.EMPTY, this.size = this.left.size + 1 + this.right.size;\n    }\n    // Returns a copy of the current node, optionally replacing pieces of it.\n    copy(t, e, n, s, i) {\n        return new Te(null != t ? t : this.key, null != e ? e : this.value, null != n ? n : this.color, null != s ? s : this.left, null != i ? i : this.right);\n    }\n    isEmpty() {\n        return !1;\n    }\n    // Traverses the tree in key order and calls the specified action function\n    // for each node. If action returns true, traversal is aborted.\n    // Returns the first truthy value returned by action, or the last falsey\n    // value returned by action.\n    inorderTraversal(t) {\n        return this.left.inorderTraversal(t) || t(this.key, this.value) || this.right.inorderTraversal(t);\n    }\n    // Traverses the tree in reverse key order and calls the specified action\n    // function for each node. If action returns true, traversal is aborted.\n    // Returns the first truthy value returned by action, or the last falsey\n    // value returned by action.\n    reverseTraversal(t) {\n        return this.right.reverseTraversal(t) || t(this.key, this.value) || this.left.reverseTraversal(t);\n    }\n    // Returns the minimum node in the tree.\n    min() {\n        return this.left.isEmpty() ? this : this.left.min();\n    }\n    // Returns the maximum key in the tree.\n    minKey() {\n        return this.min().key;\n    }\n    // Returns the maximum key in the tree.\n    maxKey() {\n        return this.right.isEmpty() ? this.key : this.right.maxKey();\n    }\n    // Returns new tree, with the key/value added.\n    insert(t, e, n) {\n        let s = this;\n        const i = n(t, s.key);\n        return s = i < 0 ? s.copy(null, null, null, s.left.insert(t, e, n), null) : 0 === i ? s.copy(null, e, null, null, null) : s.copy(null, null, null, null, s.right.insert(t, e, n)), \n        s.fixUp();\n    }\n    removeMin() {\n        if (this.left.isEmpty()) return Te.EMPTY;\n        let t = this;\n        return t.left.isRed() || t.left.left.isRed() || (t = t.moveRedLeft()), t = t.copy(null, null, null, t.left.removeMin(), null), \n        t.fixUp();\n    }\n    // Returns new tree, with the specified item removed.\n    remove(t, e) {\n        let n, s = this;\n        if (e(t, s.key) < 0) s.left.isEmpty() || s.left.isRed() || s.left.left.isRed() || (s = s.moveRedLeft()), \n        s = s.copy(null, null, null, s.left.remove(t, e), null); else {\n            if (s.left.isRed() && (s = s.rotateRight()), s.right.isEmpty() || s.right.isRed() || s.right.left.isRed() || (s = s.moveRedRight()), \n            0 === e(t, s.key)) {\n                if (s.right.isEmpty()) return Te.EMPTY;\n                n = s.right.min(), s = s.copy(n.key, n.value, null, null, s.right.removeMin());\n            }\n            s = s.copy(null, null, null, null, s.right.remove(t, e));\n        }\n        return s.fixUp();\n    }\n    isRed() {\n        return this.color;\n    }\n    // Returns new tree after performing any needed rotations.\n    fixUp() {\n        let t = this;\n        return t.right.isRed() && !t.left.isRed() && (t = t.rotateLeft()), t.left.isRed() && t.left.left.isRed() && (t = t.rotateRight()), \n        t.left.isRed() && t.right.isRed() && (t = t.colorFlip()), t;\n    }\n    moveRedLeft() {\n        let t = this.colorFlip();\n        return t.right.left.isRed() && (t = t.copy(null, null, null, null, t.right.rotateRight()), \n        t = t.rotateLeft(), t = t.colorFlip()), t;\n    }\n    moveRedRight() {\n        let t = this.colorFlip();\n        return t.left.left.isRed() && (t = t.rotateRight(), t = t.colorFlip()), t;\n    }\n    rotateLeft() {\n        const t = this.copy(null, null, Te.RED, null, this.right.left);\n        return this.right.copy(null, null, this.color, t, null);\n    }\n    rotateRight() {\n        const t = this.copy(null, null, Te.RED, this.left.right, null);\n        return this.left.copy(null, null, this.color, null, t);\n    }\n    colorFlip() {\n        const t = this.left.copy(null, null, !this.left.color, null, null), e = this.right.copy(null, null, !this.right.color, null, null);\n        return this.copy(null, null, !this.color, t, e);\n    }\n    // For testing.\n    checkMaxDepth() {\n        const t = this.check();\n        return Math.pow(2, t) <= this.size + 1;\n    }\n    // In a balanced RB tree, the black-depth (number of black nodes) from root to\n    // leaves is equal on both sides.  This function verifies that or asserts.\n    check() {\n        if (this.isRed() && this.left.isRed()) throw O();\n        if (this.right.isRed()) throw O();\n        const t = this.left.check();\n        if (t !== this.right.check()) throw O();\n        return t + (this.isRed() ? 0 : 1);\n    }\n}\n\n // end LLRBNode\n// Empty node is shared between all LLRB trees.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nTe.EMPTY = null, Te.RED = !0, Te.BLACK = !1;\n\n// end LLRBEmptyNode\nTe.EMPTY = new \n// Represents an empty node (a leaf node in the Red-Black Tree).\nclass {\n    constructor() {\n        this.size = 0;\n    }\n    get key() {\n        throw O();\n    }\n    get value() {\n        throw O();\n    }\n    get color() {\n        throw O();\n    }\n    get left() {\n        throw O();\n    }\n    get right() {\n        throw O();\n    }\n    // Returns a copy of the current node.\n    copy(t, e, n, s, i) {\n        return this;\n    }\n    // Returns a copy of the tree, with the specified key/value added.\n    insert(t, e, n) {\n        return new Te(t, e);\n    }\n    // Returns a copy of the tree, with the specified key removed.\n    remove(t, e) {\n        return this;\n    }\n    isEmpty() {\n        return !0;\n    }\n    inorderTraversal(t) {\n        return !1;\n    }\n    reverseTraversal(t) {\n        return !1;\n    }\n    minKey() {\n        return null;\n    }\n    maxKey() {\n        return null;\n    }\n    isRed() {\n        return !1;\n    }\n    // For testing.\n    checkMaxDepth() {\n        return !0;\n    }\n    check() {\n        return 0;\n    }\n};\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * SortedSet is an immutable (copy-on-write) collection that holds elements\n * in order specified by the provided comparator.\n *\n * NOTE: if provided comparator returns 0 for two elements, we consider them to\n * be equal!\n */\nclass Ee {\n    constructor(t) {\n        this.comparator = t, this.data = new pe(this.comparator);\n    }\n    has(t) {\n        return null !== this.data.get(t);\n    }\n    first() {\n        return this.data.minKey();\n    }\n    last() {\n        return this.data.maxKey();\n    }\n    get size() {\n        return this.data.size;\n    }\n    indexOf(t) {\n        return this.data.indexOf(t);\n    }\n    /** Iterates elements in order defined by \"comparator\" */    forEach(t) {\n        this.data.inorderTraversal(((e, n) => (t(e), !1)));\n    }\n    /** Iterates over `elem`s such that: range[0] &lt;= elem &lt; range[1]. */    forEachInRange(t, e) {\n        const n = this.data.getIteratorFrom(t[0]);\n        for (;n.hasNext(); ) {\n            const s = n.getNext();\n            if (this.comparator(s.key, t[1]) >= 0) return;\n            e(s.key);\n        }\n    }\n    /**\n     * Iterates over `elem`s such that: start &lt;= elem until false is returned.\n     */    forEachWhile(t, e) {\n        let n;\n        for (n = void 0 !== e ? this.data.getIteratorFrom(e) : this.data.getIterator(); n.hasNext(); ) {\n            if (!t(n.getNext().key)) return;\n        }\n    }\n    /** Finds the least element greater than or equal to `elem`. */    firstAfterOrEqual(t) {\n        const e = this.data.getIteratorFrom(t);\n        return e.hasNext() ? e.getNext().key : null;\n    }\n    getIterator() {\n        return new Ae(this.data.getIterator());\n    }\n    getIteratorFrom(t) {\n        return new Ae(this.data.getIteratorFrom(t));\n    }\n    /** Inserts or updates an element */    add(t) {\n        return this.copy(this.data.remove(t).insert(t, !0));\n    }\n    /** Deletes an element */    delete(t) {\n        return this.has(t) ? this.copy(this.data.remove(t)) : this;\n    }\n    isEmpty() {\n        return this.data.isEmpty();\n    }\n    unionWith(t) {\n        let e = this;\n        // Make sure `result` always refers to the larger one of the two sets.\n                return e.size < t.size && (e = t, t = this), t.forEach((t => {\n            e = e.add(t);\n        })), e;\n    }\n    isEqual(t) {\n        if (!(t instanceof Ee)) return !1;\n        if (this.size !== t.size) return !1;\n        const e = this.data.getIterator(), n = t.data.getIterator();\n        for (;e.hasNext(); ) {\n            const t = e.getNext().key, s = n.getNext().key;\n            if (0 !== this.comparator(t, s)) return !1;\n        }\n        return !0;\n    }\n    toArray() {\n        const t = [];\n        return this.forEach((e => {\n            t.push(e);\n        })), t;\n    }\n    toString() {\n        const t = [];\n        return this.forEach((e => t.push(e))), \"SortedSet(\" + t.toString() + \")\";\n    }\n    copy(t) {\n        const e = new Ee(this.comparator);\n        return e.data = t, e;\n    }\n}\n\nclass Ae {\n    constructor(t) {\n        this.iter = t;\n    }\n    getNext() {\n        return this.iter.getNext().key;\n    }\n    hasNext() {\n        return this.iter.hasNext();\n    }\n}\n\n/**\n * Compares two sorted sets for equality using their natural ordering. The\n * method computes the intersection and invokes `onAdd` for every element that\n * is in `after` but not `before`. `onRemove` is invoked for every element in\n * `before` but missing from `after`.\n *\n * The method creates a copy of both `before` and `after` and runs in O(n log\n * n), where n is the size of the two lists.\n *\n * @param before - The elements that exist in the original set.\n * @param after - The elements to diff against the original set.\n * @param comparator - The comparator for the elements in before and after.\n * @param onAdd - A function to invoke for every element that is part of `\n * after` but not `before`.\n * @param onRemove - A function to invoke for every element that is part of\n * `before` but not `after`.\n */\n/**\n * Returns the next element from the iterator or `undefined` if none available.\n */\nfunction ve(t) {\n    return t.hasNext() ? t.getNext() : void 0;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides a set of fields that can be used to partially patch a document.\n * FieldMask is used in conjunction with ObjectValue.\n * Examples:\n *   foo - Overwrites foo entirely with the provided value. If foo is not\n *         present in the companion ObjectValue, the field is deleted.\n *   foo.bar - Overwrites only the field bar of the object foo.\n *             If foo is not an object, foo is replaced with an object\n *             containing foo\n */ class Re {\n    constructor(t) {\n        this.fields = t, \n        // TODO(dimond): validation of FieldMask\n        // Sort the field mask to support `FieldMask.isEqual()` and assert below.\n        t.sort(at.comparator);\n    }\n    static empty() {\n        return new Re([]);\n    }\n    /**\n     * Returns a new FieldMask object that is the result of adding all the given\n     * fields paths to this field mask.\n     */    unionWith(t) {\n        let e = new Ee(at.comparator);\n        for (const t of this.fields) e = e.add(t);\n        for (const n of t) e = e.add(n);\n        return new Re(e.toArray());\n    }\n    /**\n     * Verifies that `fieldPath` is included by at least one field in this field\n     * mask.\n     *\n     * This is an O(n) operation, where `n` is the size of the field mask.\n     */    covers(t) {\n        for (const e of this.fields) if (e.isPrefixOf(t)) return !0;\n        return !1;\n    }\n    isEqual(t) {\n        return nt(this.fields, t.fields, ((t, e) => t.isEqual(e)));\n    }\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An error encountered while decoding base64 string.\n */ class Pe extends Error {\n    constructor() {\n        super(...arguments), this.name = \"Base64DecodeError\";\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Converts a Base64 encoded string to a binary string. */\n/** True if and only if the Base64 conversion functions are available. */\nfunction be() {\n    return \"undefined\" != typeof atob;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Immutable class that represents a \"proto\" byte string.\n *\n * Proto byte strings can either be Base64-encoded strings or Uint8Arrays when\n * sent on the wire. This class abstracts away this differentiation by holding\n * the proto byte string in a common class that must be converted into a string\n * before being sent as a proto.\n * @internal\n */ class Ve {\n    constructor(t) {\n        this.binaryString = t;\n    }\n    static fromBase64String(t) {\n        const e = function(t) {\n            try {\n                return atob(t);\n            } catch (t) {\n                // Check that `DOMException` is defined before using it to avoid\n                // \"ReferenceError: Property 'DOMException' doesn't exist\" in react-native.\n                // (https://github.com/firebase/firebase-js-sdk/issues/7115)\n                throw \"undefined\" != typeof DOMException && t instanceof DOMException ? new Pe(\"Invalid base64 string: \" + t) : t;\n            }\n        }\n        /** Converts a binary string to a Base64 encoded string. */ (t);\n        return new Ve(e);\n    }\n    static fromUint8Array(t) {\n        // TODO(indexing); Remove the copy of the byte string here as this method\n        // is frequently called during indexing.\n        const e = \n        /**\n * Helper function to convert an Uint8array to a binary string.\n */\n        function(t) {\n            let e = \"\";\n            for (let n = 0; n < t.length; ++n) e += String.fromCharCode(t[n]);\n            return e;\n        }\n        /**\n * Helper function to convert a binary string to an Uint8Array.\n */ (t);\n        return new Ve(e);\n    }\n    [Symbol.iterator]() {\n        let t = 0;\n        return {\n            next: () => t < this.binaryString.length ? {\n                value: this.binaryString.charCodeAt(t++),\n                done: !1\n            } : {\n                value: void 0,\n                done: !0\n            }\n        };\n    }\n    toBase64() {\n        return t = this.binaryString, btoa(t);\n        var t;\n    }\n    toUint8Array() {\n        return function(t) {\n            const e = new Uint8Array(t.length);\n            for (let n = 0; n < t.length; n++) e[n] = t.charCodeAt(n);\n            return e;\n        }\n        /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n        // A RegExp matching ISO 8601 UTC timestamps with optional fraction.\n        (this.binaryString);\n    }\n    approximateByteSize() {\n        return 2 * this.binaryString.length;\n    }\n    compareTo(t) {\n        return et(this.binaryString, t.binaryString);\n    }\n    isEqual(t) {\n        return this.binaryString === t.binaryString;\n    }\n}\n\nVe.EMPTY_BYTE_STRING = new Ve(\"\");\n\nconst Se = new RegExp(/^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.(\\d+))?Z$/);\n\n/**\n * Converts the possible Proto values for a timestamp value into a \"seconds and\n * nanos\" representation.\n */ function De(t) {\n    // The json interface (for the browser) will return an iso timestamp string,\n    // while the proto js library (for node) will return a\n    // google.protobuf.Timestamp instance.\n    if (F(!!t), \"string\" == typeof t) {\n        // The date string can have higher precision (nanos) than the Date class\n        // (millis), so we do some custom parsing here.\n        // Parse the nanos right out of the string.\n        let e = 0;\n        const n = Se.exec(t);\n        if (F(!!n), n[1]) {\n            // Pad the fraction out to 9 digits (nanos).\n            let t = n[1];\n            t = (t + \"000000000\").substr(0, 9), e = Number(t);\n        }\n        // Parse the date to get the seconds.\n                const s = new Date(t);\n        return {\n            seconds: Math.floor(s.getTime() / 1e3),\n            nanos: e\n        };\n    }\n    return {\n        seconds: Ce(t.seconds),\n        nanos: Ce(t.nanos)\n    };\n}\n\n/**\n * Converts the possible Proto types for numbers into a JavaScript number.\n * Returns 0 if the value is not numeric.\n */ function Ce(t) {\n    // TODO(bjornick): Handle int64 greater than 53 bits.\n    return \"number\" == typeof t ? t : \"string\" == typeof t ? Number(t) : 0;\n}\n\n/** Converts the possible Proto types for Blobs into a ByteString. */ function xe(t) {\n    return \"string\" == typeof t ? Ve.fromBase64String(t) : Ve.fromUint8Array(t);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a locally-applied ServerTimestamp.\n *\n * Server Timestamps are backed by MapValues that contain an internal field\n * `__type__` with a value of `server_timestamp`. The previous value and local\n * write time are stored in its `__previous_value__` and `__local_write_time__`\n * fields respectively.\n *\n * Notes:\n * - ServerTimestampValue instances are created as the result of applying a\n *   transform. They can only exist in the local view of a document. Therefore\n *   they do not need to be parsed or serialized.\n * - When evaluated locally (e.g. for snapshot.data()), they by default\n *   evaluate to `null`. This behavior can be configured by passing custom\n *   FieldValueOptions to value().\n * - With respect to other ServerTimestampValues, they sort by their\n *   localWriteTime.\n */ function Ne(t) {\n    var e, n;\n    return \"server_timestamp\" === (null === (n = ((null === (e = null == t ? void 0 : t.mapValue) || void 0 === e ? void 0 : e.fields) || {}).__type__) || void 0 === n ? void 0 : n.stringValue);\n}\n\n/**\n * Creates a new ServerTimestamp proto value (using the internal format).\n */\n/**\n * Returns the value of the field before this ServerTimestamp was set.\n *\n * Preserving the previous values allows the user to display the last resoled\n * value until the backend responds with the timestamp.\n */\nfunction ke(t) {\n    const e = t.mapValue.fields.__previous_value__;\n    return Ne(e) ? ke(e) : e;\n}\n\n/**\n * Returns the local time at which this timestamp was first set.\n */ function Me(t) {\n    const e = De(t.mapValue.fields.__local_write_time__.timestampValue);\n    return new it(e.seconds, e.nanos);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class $e {\n    /**\n     * Constructs a DatabaseInfo using the provided host, databaseId and\n     * persistenceKey.\n     *\n     * @param databaseId - The database to use.\n     * @param appId - The Firebase App Id.\n     * @param persistenceKey - A unique identifier for this Firestore's local\n     * storage (used in conjunction with the databaseId).\n     * @param host - The Firestore backend host to connect to.\n     * @param ssl - Whether to use SSL when connecting.\n     * @param forceLongPolling - Whether to use the forceLongPolling option\n     * when using WebChannel as the network transport.\n     * @param autoDetectLongPolling - Whether to use the detectBufferingProxy\n     * option when using WebChannel as the network transport.\n     * @param longPollingOptions Options that configure long-polling.\n     * @param useFetchStreams Whether to use the Fetch API instead of\n     * XMLHTTPRequest\n     */\n    constructor(t, e, n, s, i, r, o, u, c) {\n        this.databaseId = t, this.appId = e, this.persistenceKey = n, this.host = s, this.ssl = i, \n        this.forceLongPolling = r, this.autoDetectLongPolling = o, this.longPollingOptions = u, \n        this.useFetchStreams = c;\n    }\n}\n\n/** The default database name for a project. */\n/**\n * Represents the database ID a Firestore client is associated with.\n * @internal\n */\nclass Oe {\n    constructor(t, e) {\n        this.projectId = t, this.database = e || \"(default)\";\n    }\n    static empty() {\n        return new Oe(\"\", \"\");\n    }\n    get isDefaultDatabase() {\n        return \"(default)\" === this.database;\n    }\n    isEqual(t) {\n        return t instanceof Oe && t.projectId === this.projectId && t.database === this.database;\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst Fe = {\n    mapValue: {\n        fields: {\n            __type__: {\n                stringValue: \"__max__\"\n            }\n        }\n    }\n}, Be = {\n    nullValue: \"NULL_VALUE\"\n};\n\n/** Extracts the backend's type order for the provided value. */\nfunction Le(t) {\n    return \"nullValue\" in t ? 0 /* TypeOrder.NullValue */ : \"booleanValue\" in t ? 1 /* TypeOrder.BooleanValue */ : \"integerValue\" in t || \"doubleValue\" in t ? 2 /* TypeOrder.NumberValue */ : \"timestampValue\" in t ? 3 /* TypeOrder.TimestampValue */ : \"stringValue\" in t ? 5 /* TypeOrder.StringValue */ : \"bytesValue\" in t ? 6 /* TypeOrder.BlobValue */ : \"referenceValue\" in t ? 7 /* TypeOrder.RefValue */ : \"geoPointValue\" in t ? 8 /* TypeOrder.GeoPointValue */ : \"arrayValue\" in t ? 9 /* TypeOrder.ArrayValue */ : \"mapValue\" in t ? Ne(t) ? 4 /* TypeOrder.ServerTimestampValue */ : en(t) ? 9007199254740991 /* TypeOrder.MaxValue */ : 10 /* TypeOrder.ObjectValue */ : O();\n}\n\n/** Tests `left` and `right` for equality based on the backend semantics. */ function qe(t, e) {\n    if (t === e) return !0;\n    const n = Le(t);\n    if (n !== Le(e)) return !1;\n    switch (n) {\n      case 0 /* TypeOrder.NullValue */ :\n      case 9007199254740991 /* TypeOrder.MaxValue */ :\n        return !0;\n\n      case 1 /* TypeOrder.BooleanValue */ :\n        return t.booleanValue === e.booleanValue;\n\n      case 4 /* TypeOrder.ServerTimestampValue */ :\n        return Me(t).isEqual(Me(e));\n\n      case 3 /* TypeOrder.TimestampValue */ :\n        return function(t, e) {\n            if (\"string\" == typeof t.timestampValue && \"string\" == typeof e.timestampValue && t.timestampValue.length === e.timestampValue.length) \n            // Use string equality for ISO 8601 timestamps\n            return t.timestampValue === e.timestampValue;\n            const n = De(t.timestampValue), s = De(e.timestampValue);\n            return n.seconds === s.seconds && n.nanos === s.nanos;\n        }(t, e);\n\n      case 5 /* TypeOrder.StringValue */ :\n        return t.stringValue === e.stringValue;\n\n      case 6 /* TypeOrder.BlobValue */ :\n        return function(t, e) {\n            return xe(t.bytesValue).isEqual(xe(e.bytesValue));\n        }(t, e);\n\n      case 7 /* TypeOrder.RefValue */ :\n        return t.referenceValue === e.referenceValue;\n\n      case 8 /* TypeOrder.GeoPointValue */ :\n        return function(t, e) {\n            return Ce(t.geoPointValue.latitude) === Ce(e.geoPointValue.latitude) && Ce(t.geoPointValue.longitude) === Ce(e.geoPointValue.longitude);\n        }(t, e);\n\n      case 2 /* TypeOrder.NumberValue */ :\n        return function(t, e) {\n            if (\"integerValue\" in t && \"integerValue\" in e) return Ce(t.integerValue) === Ce(e.integerValue);\n            if (\"doubleValue\" in t && \"doubleValue\" in e) {\n                const n = Ce(t.doubleValue), s = Ce(e.doubleValue);\n                return n === s ? Bt(n) === Bt(s) : isNaN(n) && isNaN(s);\n            }\n            return !1;\n        }(t, e);\n\n      case 9 /* TypeOrder.ArrayValue */ :\n        return nt(t.arrayValue.values || [], e.arrayValue.values || [], qe);\n\n      case 10 /* TypeOrder.ObjectValue */ :\n        return function(t, e) {\n            const n = t.mapValue.fields || {}, s = e.mapValue.fields || {};\n            if (me(n) !== me(s)) return !1;\n            for (const t in n) if (n.hasOwnProperty(t) && (void 0 === s[t] || !qe(n[t], s[t]))) return !1;\n            return !0;\n        }\n        /** Returns true if the ArrayValue contains the specified element. */ (t, e);\n\n      default:\n        return O();\n    }\n}\n\nfunction Ue(t, e) {\n    return void 0 !== (t.values || []).find((t => qe(t, e)));\n}\n\nfunction Ke(t, e) {\n    if (t === e) return 0;\n    const n = Le(t), s = Le(e);\n    if (n !== s) return et(n, s);\n    switch (n) {\n      case 0 /* TypeOrder.NullValue */ :\n      case 9007199254740991 /* TypeOrder.MaxValue */ :\n        return 0;\n\n      case 1 /* TypeOrder.BooleanValue */ :\n        return et(t.booleanValue, e.booleanValue);\n\n      case 2 /* TypeOrder.NumberValue */ :\n        return function(t, e) {\n            const n = Ce(t.integerValue || t.doubleValue), s = Ce(e.integerValue || e.doubleValue);\n            return n < s ? -1 : n > s ? 1 : n === s ? 0 : \n            // one or both are NaN.\n            isNaN(n) ? isNaN(s) ? 0 : -1 : 1;\n        }(t, e);\n\n      case 3 /* TypeOrder.TimestampValue */ :\n        return Ge(t.timestampValue, e.timestampValue);\n\n      case 4 /* TypeOrder.ServerTimestampValue */ :\n        return Ge(Me(t), Me(e));\n\n      case 5 /* TypeOrder.StringValue */ :\n        return et(t.stringValue, e.stringValue);\n\n      case 6 /* TypeOrder.BlobValue */ :\n        return function(t, e) {\n            const n = xe(t), s = xe(e);\n            return n.compareTo(s);\n        }(t.bytesValue, e.bytesValue);\n\n      case 7 /* TypeOrder.RefValue */ :\n        return function(t, e) {\n            const n = t.split(\"/\"), s = e.split(\"/\");\n            for (let t = 0; t < n.length && t < s.length; t++) {\n                const e = et(n[t], s[t]);\n                if (0 !== e) return e;\n            }\n            return et(n.length, s.length);\n        }(t.referenceValue, e.referenceValue);\n\n      case 8 /* TypeOrder.GeoPointValue */ :\n        return function(t, e) {\n            const n = et(Ce(t.latitude), Ce(e.latitude));\n            if (0 !== n) return n;\n            return et(Ce(t.longitude), Ce(e.longitude));\n        }(t.geoPointValue, e.geoPointValue);\n\n      case 9 /* TypeOrder.ArrayValue */ :\n        return function(t, e) {\n            const n = t.values || [], s = e.values || [];\n            for (let t = 0; t < n.length && t < s.length; ++t) {\n                const e = Ke(n[t], s[t]);\n                if (e) return e;\n            }\n            return et(n.length, s.length);\n        }(t.arrayValue, e.arrayValue);\n\n      case 10 /* TypeOrder.ObjectValue */ :\n        return function(t, e) {\n            if (t === Fe.mapValue && e === Fe.mapValue) return 0;\n            if (t === Fe.mapValue) return 1;\n            if (e === Fe.mapValue) return -1;\n            const n = t.fields || {}, s = Object.keys(n), i = e.fields || {}, r = Object.keys(i);\n            // Even though MapValues are likely sorted correctly based on their insertion\n            // order (e.g. when received from the backend), local modifications can bring\n            // elements out of order. We need to re-sort the elements to ensure that\n            // canonical IDs are independent of insertion order.\n            s.sort(), r.sort();\n            for (let t = 0; t < s.length && t < r.length; ++t) {\n                const e = et(s[t], r[t]);\n                if (0 !== e) return e;\n                const o = Ke(n[s[t]], i[r[t]]);\n                if (0 !== o) return o;\n            }\n            return et(s.length, r.length);\n        }\n        /**\n * Generates the canonical ID for the provided field value (as used in Target\n * serialization).\n */ (t.mapValue, e.mapValue);\n\n      default:\n        throw O();\n    }\n}\n\nfunction Ge(t, e) {\n    if (\"string\" == typeof t && \"string\" == typeof e && t.length === e.length) return et(t, e);\n    const n = De(t), s = De(e), i = et(n.seconds, s.seconds);\n    return 0 !== i ? i : et(n.nanos, s.nanos);\n}\n\nfunction Qe(t) {\n    return je(t);\n}\n\nfunction je(t) {\n    return \"nullValue\" in t ? \"null\" : \"booleanValue\" in t ? \"\" + t.booleanValue : \"integerValue\" in t ? \"\" + t.integerValue : \"doubleValue\" in t ? \"\" + t.doubleValue : \"timestampValue\" in t ? function(t) {\n        const e = De(t);\n        return `time(${e.seconds},${e.nanos})`;\n    }(t.timestampValue) : \"stringValue\" in t ? t.stringValue : \"bytesValue\" in t ? xe(t.bytesValue).toBase64() : \"referenceValue\" in t ? (n = t.referenceValue, \n    ht.fromName(n).toString()) : \"geoPointValue\" in t ? `geo(${(e = t.geoPointValue).latitude},${e.longitude})` : \"arrayValue\" in t ? function(t) {\n        let e = \"[\", n = !0;\n        for (const s of t.values || []) n ? n = !1 : e += \",\", e += je(s);\n        return e + \"]\";\n    }\n    /**\n * Returns an approximate (and wildly inaccurate) in-memory size for the field\n * value.\n *\n * The memory size takes into account only the actual user data as it resides\n * in memory and ignores object overhead.\n */ (t.arrayValue) : \"mapValue\" in t ? function(t) {\n        // Iteration order in JavaScript is not guaranteed. To ensure that we generate\n        // matching canonical IDs for identical maps, we need to sort the keys.\n        const e = Object.keys(t.fields || {}).sort();\n        let n = \"{\", s = !0;\n        for (const i of e) s ? s = !1 : n += \",\", n += `${i}:${je(t.fields[i])}`;\n        return n + \"}\";\n    }(t.mapValue) : O();\n    var e, n;\n}\n\nfunction ze(t) {\n    switch (Le(t)) {\n      case 0 /* TypeOrder.NullValue */ :\n      case 1 /* TypeOrder.BooleanValue */ :\n        return 4;\n\n      case 2 /* TypeOrder.NumberValue */ :\n        return 8;\n\n      case 3 /* TypeOrder.TimestampValue */ :\n      case 8 /* TypeOrder.GeoPointValue */ :\n        // GeoPoints are made up of two distinct numbers (latitude + longitude)\n        return 16;\n\n      case 4 /* TypeOrder.ServerTimestampValue */ :\n        const e = ke(t);\n        return e ? 16 + ze(e) : 16;\n\n      case 5 /* TypeOrder.StringValue */ :\n        // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures:\n        // \"JavaScript's String type is [...] a set of elements of 16-bit unsigned\n        // integer values\"\n        return 2 * t.stringValue.length;\n\n      case 6 /* TypeOrder.BlobValue */ :\n        return xe(t.bytesValue).approximateByteSize();\n\n      case 7 /* TypeOrder.RefValue */ :\n        return t.referenceValue.length;\n\n      case 9 /* TypeOrder.ArrayValue */ :\n        return (t.arrayValue.values || []).reduce(((t, e) => t + ze(e)), 0);\n\n      case 10 /* TypeOrder.ObjectValue */ :\n        return function(t) {\n            let e = 0;\n            return ge(t.fields, ((t, n) => {\n                e += t.length + ze(n);\n            })), e;\n        }(t.mapValue);\n\n      default:\n        throw O();\n    }\n}\n\n/** Returns a reference value for the provided database and key. */\nfunction We(t, e) {\n    return {\n        referenceValue: `projects/${t.projectId}/databases/${t.database}/documents/${e.path.canonicalString()}`\n    };\n}\n\n/** Returns true if `value` is an IntegerValue . */ function He(t) {\n    return !!t && \"integerValue\" in t;\n}\n\n/** Returns true if `value` is a DoubleValue. */\n/** Returns true if `value` is an ArrayValue. */\nfunction Je(t) {\n    return !!t && \"arrayValue\" in t;\n}\n\n/** Returns true if `value` is a NullValue. */ function Ye(t) {\n    return !!t && \"nullValue\" in t;\n}\n\n/** Returns true if `value` is NaN. */ function Xe(t) {\n    return !!t && \"doubleValue\" in t && isNaN(Number(t.doubleValue));\n}\n\n/** Returns true if `value` is a MapValue. */ function Ze(t) {\n    return !!t && \"mapValue\" in t;\n}\n\n/** Creates a deep copy of `source`. */ function tn(t) {\n    if (t.geoPointValue) return {\n        geoPointValue: Object.assign({}, t.geoPointValue)\n    };\n    if (t.timestampValue && \"object\" == typeof t.timestampValue) return {\n        timestampValue: Object.assign({}, t.timestampValue)\n    };\n    if (t.mapValue) {\n        const e = {\n            mapValue: {\n                fields: {}\n            }\n        };\n        return ge(t.mapValue.fields, ((t, n) => e.mapValue.fields[t] = tn(n))), e;\n    }\n    if (t.arrayValue) {\n        const e = {\n            arrayValue: {\n                values: []\n            }\n        };\n        for (let n = 0; n < (t.arrayValue.values || []).length; ++n) e.arrayValue.values[n] = tn(t.arrayValue.values[n]);\n        return e;\n    }\n    return Object.assign({}, t);\n}\n\n/** Returns true if the Value represents the canonical {@link #MAX_VALUE} . */ function en(t) {\n    return \"__max__\" === (((t.mapValue || {}).fields || {}).__type__ || {}).stringValue;\n}\n\n/** Returns the lowest value for the given value type (inclusive). */ function nn(t) {\n    return \"nullValue\" in t ? Be : \"booleanValue\" in t ? {\n        booleanValue: !1\n    } : \"integerValue\" in t || \"doubleValue\" in t ? {\n        doubleValue: NaN\n    } : \"timestampValue\" in t ? {\n        timestampValue: {\n            seconds: Number.MIN_SAFE_INTEGER\n        }\n    } : \"stringValue\" in t ? {\n        stringValue: \"\"\n    } : \"bytesValue\" in t ? {\n        bytesValue: \"\"\n    } : \"referenceValue\" in t ? We(Oe.empty(), ht.empty()) : \"geoPointValue\" in t ? {\n        geoPointValue: {\n            latitude: -90,\n            longitude: -180\n        }\n    } : \"arrayValue\" in t ? {\n        arrayValue: {}\n    } : \"mapValue\" in t ? {\n        mapValue: {}\n    } : O();\n}\n\n/** Returns the largest value for the given value type (exclusive). */ function sn(t) {\n    return \"nullValue\" in t ? {\n        booleanValue: !1\n    } : \"booleanValue\" in t ? {\n        doubleValue: NaN\n    } : \"integerValue\" in t || \"doubleValue\" in t ? {\n        timestampValue: {\n            seconds: Number.MIN_SAFE_INTEGER\n        }\n    } : \"timestampValue\" in t ? {\n        stringValue: \"\"\n    } : \"stringValue\" in t ? {\n        bytesValue: \"\"\n    } : \"bytesValue\" in t ? We(Oe.empty(), ht.empty()) : \"referenceValue\" in t ? {\n        geoPointValue: {\n            latitude: -90,\n            longitude: -180\n        }\n    } : \"geoPointValue\" in t ? {\n        arrayValue: {}\n    } : \"arrayValue\" in t ? {\n        mapValue: {}\n    } : \"mapValue\" in t ? Fe : O();\n}\n\nfunction rn(t, e) {\n    const n = Ke(t.value, e.value);\n    return 0 !== n ? n : t.inclusive && !e.inclusive ? -1 : !t.inclusive && e.inclusive ? 1 : 0;\n}\n\nfunction on(t, e) {\n    const n = Ke(t.value, e.value);\n    return 0 !== n ? n : t.inclusive && !e.inclusive ? 1 : !t.inclusive && e.inclusive ? -1 : 0;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An ObjectValue represents a MapValue in the Firestore Proto and offers the\n * ability to add and remove fields (via the ObjectValueBuilder).\n */ class un {\n    constructor(t) {\n        this.value = t;\n    }\n    static empty() {\n        return new un({\n            mapValue: {}\n        });\n    }\n    /**\n     * Returns the value at the given path or null.\n     *\n     * @param path - the path to search\n     * @returns The value at the path or null if the path is not set.\n     */    field(t) {\n        if (t.isEmpty()) return this.value;\n        {\n            let e = this.value;\n            for (let n = 0; n < t.length - 1; ++n) if (e = (e.mapValue.fields || {})[t.get(n)], \n            !Ze(e)) return null;\n            return e = (e.mapValue.fields || {})[t.lastSegment()], e || null;\n        }\n    }\n    /**\n     * Sets the field to the provided value.\n     *\n     * @param path - The field path to set.\n     * @param value - The value to set.\n     */    set(t, e) {\n        this.getFieldsMap(t.popLast())[t.lastSegment()] = tn(e);\n    }\n    /**\n     * Sets the provided fields to the provided values.\n     *\n     * @param data - A map of fields to values (or null for deletes).\n     */    setAll(t) {\n        let e = at.emptyPath(), n = {}, s = [];\n        t.forEach(((t, i) => {\n            if (!e.isImmediateParentOf(i)) {\n                // Insert the accumulated changes at this parent location\n                const t = this.getFieldsMap(e);\n                this.applyChanges(t, n, s), n = {}, s = [], e = i.popLast();\n            }\n            t ? n[i.lastSegment()] = tn(t) : s.push(i.lastSegment());\n        }));\n        const i = this.getFieldsMap(e);\n        this.applyChanges(i, n, s);\n    }\n    /**\n     * Removes the field at the specified path. If there is no field at the\n     * specified path, nothing is changed.\n     *\n     * @param path - The field path to remove.\n     */    delete(t) {\n        const e = this.field(t.popLast());\n        Ze(e) && e.mapValue.fields && delete e.mapValue.fields[t.lastSegment()];\n    }\n    isEqual(t) {\n        return qe(this.value, t.value);\n    }\n    /**\n     * Returns the map that contains the leaf element of `path`. If the parent\n     * entry does not yet exist, or if it is not a map, a new map will be created.\n     */    getFieldsMap(t) {\n        let e = this.value;\n        e.mapValue.fields || (e.mapValue = {\n            fields: {}\n        });\n        for (let n = 0; n < t.length; ++n) {\n            let s = e.mapValue.fields[t.get(n)];\n            Ze(s) && s.mapValue.fields || (s = {\n                mapValue: {\n                    fields: {}\n                }\n            }, e.mapValue.fields[t.get(n)] = s), e = s;\n        }\n        return e.mapValue.fields;\n    }\n    /**\n     * Modifies `fieldsMap` by adding, replacing or deleting the specified\n     * entries.\n     */    applyChanges(t, e, n) {\n        ge(e, ((e, n) => t[e] = n));\n        for (const e of n) delete t[e];\n    }\n    clone() {\n        return new un(tn(this.value));\n    }\n}\n\n/**\n * Returns a FieldMask built from all fields in a MapValue.\n */ function cn(t) {\n    const e = [];\n    return ge(t.fields, ((t, n) => {\n        const s = new at([ t ]);\n        if (Ze(n)) {\n            const t = cn(n.mapValue).fields;\n            if (0 === t.length) \n            // Preserve the empty map by adding it to the FieldMask.\n            e.push(s); else \n            // For nested and non-empty ObjectValues, add the FieldPath of the\n            // leaf nodes.\n            for (const n of t) e.push(s.child(n));\n        } else \n        // For nested and non-empty ObjectValues, add the FieldPath of the leaf\n        // nodes.\n        e.push(s);\n    })), new Re(e);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a document in Firestore with a key, version, data and whether it\n * has local mutations applied to it.\n *\n * Documents can transition between states via `convertToFoundDocument()`,\n * `convertToNoDocument()` and `convertToUnknownDocument()`. If a document does\n * not transition to one of these states even after all mutations have been\n * applied, `isValidDocument()` returns false and the document should be removed\n * from all views.\n */ class an {\n    constructor(t, e, n, s, i, r, o) {\n        this.key = t, this.documentType = e, this.version = n, this.readTime = s, this.createTime = i, \n        this.data = r, this.documentState = o;\n    }\n    /**\n     * Creates a document with no known version or data, but which can serve as\n     * base document for mutations.\n     */    static newInvalidDocument(t) {\n        return new an(t, 0 /* DocumentType.INVALID */ , \n        /* version */ rt.min(), \n        /* readTime */ rt.min(), \n        /* createTime */ rt.min(), un.empty(), 0 /* DocumentState.SYNCED */);\n    }\n    /**\n     * Creates a new document that is known to exist with the given data at the\n     * given version.\n     */    static newFoundDocument(t, e, n, s) {\n        return new an(t, 1 /* DocumentType.FOUND_DOCUMENT */ , \n        /* version */ e, \n        /* readTime */ rt.min(), \n        /* createTime */ n, s, 0 /* DocumentState.SYNCED */);\n    }\n    /** Creates a new document that is known to not exist at the given version. */    static newNoDocument(t, e) {\n        return new an(t, 2 /* DocumentType.NO_DOCUMENT */ , \n        /* version */ e, \n        /* readTime */ rt.min(), \n        /* createTime */ rt.min(), un.empty(), 0 /* DocumentState.SYNCED */);\n    }\n    /**\n     * Creates a new document that is known to exist at the given version but\n     * whose data is not known (e.g. a document that was updated without a known\n     * base document).\n     */    static newUnknownDocument(t, e) {\n        return new an(t, 3 /* DocumentType.UNKNOWN_DOCUMENT */ , \n        /* version */ e, \n        /* readTime */ rt.min(), \n        /* createTime */ rt.min(), un.empty(), 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */);\n    }\n    /**\n     * Changes the document type to indicate that it exists and that its version\n     * and data are known.\n     */    convertToFoundDocument(t, e) {\n        // If a document is switching state from being an invalid or deleted\n        // document to a valid (FOUND_DOCUMENT) document, either due to receiving an\n        // update from Watch or due to applying a local set mutation on top\n        // of a deleted document, our best guess about its createTime would be the\n        // version at which the document transitioned to a FOUND_DOCUMENT.\n        return !this.createTime.isEqual(rt.min()) || 2 /* DocumentType.NO_DOCUMENT */ !== this.documentType && 0 /* DocumentType.INVALID */ !== this.documentType || (this.createTime = t), \n        this.version = t, this.documentType = 1 /* DocumentType.FOUND_DOCUMENT */ , this.data = e, \n        this.documentState = 0 /* DocumentState.SYNCED */ , this;\n    }\n    /**\n     * Changes the document type to indicate that it doesn't exist at the given\n     * version.\n     */    convertToNoDocument(t) {\n        return this.version = t, this.documentType = 2 /* DocumentType.NO_DOCUMENT */ , \n        this.data = un.empty(), this.documentState = 0 /* DocumentState.SYNCED */ , this;\n    }\n    /**\n     * Changes the document type to indicate that it exists at a given version but\n     * that its data is not known (e.g. a document that was updated without a known\n     * base document).\n     */    convertToUnknownDocument(t) {\n        return this.version = t, this.documentType = 3 /* DocumentType.UNKNOWN_DOCUMENT */ , \n        this.data = un.empty(), this.documentState = 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */ , \n        this;\n    }\n    setHasCommittedMutations() {\n        return this.documentState = 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */ , this;\n    }\n    setHasLocalMutations() {\n        return this.documentState = 1 /* DocumentState.HAS_LOCAL_MUTATIONS */ , this.version = rt.min(), \n        this;\n    }\n    setReadTime(t) {\n        return this.readTime = t, this;\n    }\n    get hasLocalMutations() {\n        return 1 /* DocumentState.HAS_LOCAL_MUTATIONS */ === this.documentState;\n    }\n    get hasCommittedMutations() {\n        return 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */ === this.documentState;\n    }\n    get hasPendingWrites() {\n        return this.hasLocalMutations || this.hasCommittedMutations;\n    }\n    isValidDocument() {\n        return 0 /* DocumentType.INVALID */ !== this.documentType;\n    }\n    isFoundDocument() {\n        return 1 /* DocumentType.FOUND_DOCUMENT */ === this.documentType;\n    }\n    isNoDocument() {\n        return 2 /* DocumentType.NO_DOCUMENT */ === this.documentType;\n    }\n    isUnknownDocument() {\n        return 3 /* DocumentType.UNKNOWN_DOCUMENT */ === this.documentType;\n    }\n    isEqual(t) {\n        return t instanceof an && this.key.isEqual(t.key) && this.version.isEqual(t.version) && this.documentType === t.documentType && this.documentState === t.documentState && this.data.isEqual(t.data);\n    }\n    mutableCopy() {\n        return new an(this.key, this.documentType, this.version, this.readTime, this.createTime, this.data.clone(), this.documentState);\n    }\n    toString() {\n        return `Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`;\n    }\n}\n\n/**\n * Compares the value for field `field` in the provided documents. Throws if\n * the field does not exist in both documents.\n */\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a bound of a query.\n *\n * The bound is specified with the given components representing a position and\n * whether it's just before or just after the position (relative to whatever the\n * query order is).\n *\n * The position represents a logical index position for a query. It's a prefix\n * of values for the (potentially implicit) order by clauses of a query.\n *\n * Bound provides a function to determine whether a document comes before or\n * after a bound. This is influenced by whether the position is just before or\n * just after the provided values.\n */\nclass hn {\n    constructor(t, e) {\n        this.position = t, this.inclusive = e;\n    }\n}\n\nfunction ln(t, e, n) {\n    let s = 0;\n    for (let i = 0; i < t.position.length; i++) {\n        const r = e[i], o = t.position[i];\n        if (r.field.isKeyField()) s = ht.comparator(ht.fromName(o.referenceValue), n.key); else {\n            s = Ke(o, n.data.field(r.field));\n        }\n        if (\"desc\" /* Direction.DESCENDING */ === r.dir && (s *= -1), 0 !== s) break;\n    }\n    return s;\n}\n\n/**\n * Returns true if a document sorts after a bound using the provided sort\n * order.\n */ function fn(t, e) {\n    if (null === t) return null === e;\n    if (null === e) return !1;\n    if (t.inclusive !== e.inclusive || t.position.length !== e.position.length) return !1;\n    for (let n = 0; n < t.position.length; n++) {\n        if (!qe(t.position[n], e.position[n])) return !1;\n    }\n    return !0;\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An ordering on a field, in some Direction. Direction defaults to ASCENDING.\n */ class dn {\n    constructor(t, e = \"asc\" /* Direction.ASCENDING */) {\n        this.field = t, this.dir = e;\n    }\n}\n\nfunction wn(t, e) {\n    return t.dir === e.dir && t.field.isEqual(e.field);\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class _n {}\n\nclass mn extends _n {\n    constructor(t, e, n) {\n        super(), this.field = t, this.op = e, this.value = n;\n    }\n    /**\n     * Creates a filter based on the provided arguments.\n     */    static create(t, e, n) {\n        return t.isKeyField() ? \"in\" /* Operator.IN */ === e || \"not-in\" /* Operator.NOT_IN */ === e ? this.createKeyFieldInFilter(t, e, n) : new Pn(t, e, n) : \"array-contains\" /* Operator.ARRAY_CONTAINS */ === e ? new Dn(t, n) : \"in\" /* Operator.IN */ === e ? new Cn(t, n) : \"not-in\" /* Operator.NOT_IN */ === e ? new xn(t, n) : \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ === e ? new Nn(t, n) : new mn(t, e, n);\n    }\n    static createKeyFieldInFilter(t, e, n) {\n        return \"in\" /* Operator.IN */ === e ? new bn(t, n) : new Vn(t, n);\n    }\n    matches(t) {\n        const e = t.data.field(this.field);\n        // Types do not have to match in NOT_EQUAL filters.\n                return \"!=\" /* Operator.NOT_EQUAL */ === this.op ? null !== e && this.matchesComparison(Ke(e, this.value)) : null !== e && Le(this.value) === Le(e) && this.matchesComparison(Ke(e, this.value));\n        // Only compare types with matching backend order (such as double and int).\n        }\n    matchesComparison(t) {\n        switch (this.op) {\n          case \"<\" /* Operator.LESS_THAN */ :\n            return t < 0;\n\n          case \"<=\" /* Operator.LESS_THAN_OR_EQUAL */ :\n            return t <= 0;\n\n          case \"==\" /* Operator.EQUAL */ :\n            return 0 === t;\n\n          case \"!=\" /* Operator.NOT_EQUAL */ :\n            return 0 !== t;\n\n          case \">\" /* Operator.GREATER_THAN */ :\n            return t > 0;\n\n          case \">=\" /* Operator.GREATER_THAN_OR_EQUAL */ :\n            return t >= 0;\n\n          default:\n            return O();\n        }\n    }\n    isInequality() {\n        return [ \"<\" /* Operator.LESS_THAN */ , \"<=\" /* Operator.LESS_THAN_OR_EQUAL */ , \">\" /* Operator.GREATER_THAN */ , \">=\" /* Operator.GREATER_THAN_OR_EQUAL */ , \"!=\" /* Operator.NOT_EQUAL */ , \"not-in\" /* Operator.NOT_IN */ ].indexOf(this.op) >= 0;\n    }\n    getFlattenedFilters() {\n        return [ this ];\n    }\n    getFilters() {\n        return [ this ];\n    }\n    getFirstInequalityField() {\n        return this.isInequality() ? this.field : null;\n    }\n}\n\nclass gn extends _n {\n    constructor(t, e) {\n        super(), this.filters = t, this.op = e, this.lt = null;\n    }\n    /**\n     * Creates a filter based on the provided arguments.\n     */    static create(t, e) {\n        return new gn(t, e);\n    }\n    matches(t) {\n        return yn(this) ? void 0 === this.filters.find((e => !e.matches(t))) : void 0 !== this.filters.find((e => e.matches(t)));\n    }\n    getFlattenedFilters() {\n        return null !== this.lt || (this.lt = this.filters.reduce(((t, e) => t.concat(e.getFlattenedFilters())), [])), \n        this.lt;\n    }\n    // Returns a mutable copy of `this.filters`\n    getFilters() {\n        return Object.assign([], this.filters);\n    }\n    getFirstInequalityField() {\n        const t = this.ft((t => t.isInequality()));\n        return null !== t ? t.field : null;\n    }\n    // Performs a depth-first search to find and return the first FieldFilter in the composite filter\n    // that satisfies the predicate. Returns `null` if none of the FieldFilters satisfy the\n    // predicate.\n    ft(t) {\n        for (const e of this.getFlattenedFilters()) if (t(e)) return e;\n        return null;\n    }\n}\n\nfunction yn(t) {\n    return \"and\" /* CompositeOperator.AND */ === t.op;\n}\n\nfunction pn(t) {\n    return \"or\" /* CompositeOperator.OR */ === t.op;\n}\n\n/**\n * Returns true if this filter is a conjunction of field filters only. Returns false otherwise.\n */ function In(t) {\n    return Tn(t) && yn(t);\n}\n\n/**\n * Returns true if this filter does not contain any composite filters. Returns false otherwise.\n */ function Tn(t) {\n    for (const e of t.filters) if (e instanceof gn) return !1;\n    return !0;\n}\n\nfunction En(t) {\n    if (t instanceof mn) \n    // TODO(b/29183165): Technically, this won't be unique if two values have\n    // the same description, such as the int 3 and the string \"3\". So we should\n    // add the types in here somehow, too.\n    return t.field.canonicalString() + t.op.toString() + Qe(t.value);\n    if (In(t)) \n    // Older SDK versions use an implicit AND operation between their filters.\n    // In the new SDK versions, the developer may use an explicit AND filter.\n    // To stay consistent with the old usages, we add a special case to ensure\n    // the canonical ID for these two are the same. For example:\n    // `col.whereEquals(\"a\", 1).whereEquals(\"b\", 2)` should have the same\n    // canonical ID as `col.where(and(equals(\"a\",1), equals(\"b\",2)))`.\n    return t.filters.map((t => En(t))).join(\",\");\n    {\n        // filter instanceof CompositeFilter\n        const e = t.filters.map((t => En(t))).join(\",\");\n        return `${t.op}(${e})`;\n    }\n}\n\nfunction An(t, e) {\n    return t instanceof mn ? function(t, e) {\n        return e instanceof mn && t.op === e.op && t.field.isEqual(e.field) && qe(t.value, e.value);\n    }(t, e) : t instanceof gn ? function(t, e) {\n        if (e instanceof gn && t.op === e.op && t.filters.length === e.filters.length) {\n            return t.filters.reduce(((t, n, s) => t && An(n, e.filters[s])), !0);\n        }\n        return !1;\n    }\n    /**\n * Returns a new composite filter that contains all filter from\n * `compositeFilter` plus all the given filters in `otherFilters`.\n */ (t, e) : void O();\n}\n\nfunction vn(t, e) {\n    const n = t.filters.concat(e);\n    return gn.create(n, t.op);\n}\n\n/** Returns a debug description for `filter`. */ function Rn(t) {\n    return t instanceof mn ? function(t) {\n        return `${t.field.canonicalString()} ${t.op} ${Qe(t.value)}`;\n    }\n    /** Filter that matches on key fields (i.e. '__name__'). */ (t) : t instanceof gn ? function(t) {\n        return t.op.toString() + \" {\" + t.getFilters().map(Rn).join(\" ,\") + \"}\";\n    }(t) : \"Filter\";\n}\n\nclass Pn extends mn {\n    constructor(t, e, n) {\n        super(t, e, n), this.key = ht.fromName(n.referenceValue);\n    }\n    matches(t) {\n        const e = ht.comparator(t.key, this.key);\n        return this.matchesComparison(e);\n    }\n}\n\n/** Filter that matches on key fields within an array. */ class bn extends mn {\n    constructor(t, e) {\n        super(t, \"in\" /* Operator.IN */ , e), this.keys = Sn(\"in\" /* Operator.IN */ , e);\n    }\n    matches(t) {\n        return this.keys.some((e => e.isEqual(t.key)));\n    }\n}\n\n/** Filter that matches on key fields not present within an array. */ class Vn extends mn {\n    constructor(t, e) {\n        super(t, \"not-in\" /* Operator.NOT_IN */ , e), this.keys = Sn(\"not-in\" /* Operator.NOT_IN */ , e);\n    }\n    matches(t) {\n        return !this.keys.some((e => e.isEqual(t.key)));\n    }\n}\n\nfunction Sn(t, e) {\n    var n;\n    return ((null === (n = e.arrayValue) || void 0 === n ? void 0 : n.values) || []).map((t => ht.fromName(t.referenceValue)));\n}\n\n/** A Filter that implements the array-contains operator. */ class Dn extends mn {\n    constructor(t, e) {\n        super(t, \"array-contains\" /* Operator.ARRAY_CONTAINS */ , e);\n    }\n    matches(t) {\n        const e = t.data.field(this.field);\n        return Je(e) && Ue(e.arrayValue, this.value);\n    }\n}\n\n/** A Filter that implements the IN operator. */ class Cn extends mn {\n    constructor(t, e) {\n        super(t, \"in\" /* Operator.IN */ , e);\n    }\n    matches(t) {\n        const e = t.data.field(this.field);\n        return null !== e && Ue(this.value.arrayValue, e);\n    }\n}\n\n/** A Filter that implements the not-in operator. */ class xn extends mn {\n    constructor(t, e) {\n        super(t, \"not-in\" /* Operator.NOT_IN */ , e);\n    }\n    matches(t) {\n        if (Ue(this.value.arrayValue, {\n            nullValue: \"NULL_VALUE\"\n        })) return !1;\n        const e = t.data.field(this.field);\n        return null !== e && !Ue(this.value.arrayValue, e);\n    }\n}\n\n/** A Filter that implements the array-contains-any operator. */ class Nn extends mn {\n    constructor(t, e) {\n        super(t, \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ , e);\n    }\n    matches(t) {\n        const e = t.data.field(this.field);\n        return !(!Je(e) || !e.arrayValue.values) && e.arrayValue.values.some((t => Ue(this.value.arrayValue, t)));\n    }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Visible for testing\nclass kn {\n    constructor(t, e = null, n = [], s = [], i = null, r = null, o = null) {\n        this.path = t, this.collectionGroup = e, this.orderBy = n, this.filters = s, this.limit = i, \n        this.startAt = r, this.endAt = o, this.dt = null;\n    }\n}\n\n/**\n * Initializes a Target with a path and optional additional query constraints.\n * Path must currently be empty if this is a collection group query.\n *\n * NOTE: you should always construct `Target` from `Query.toTarget` instead of\n * using this factory method, because `Query` provides an implicit `orderBy`\n * property.\n */ function Mn(t, e = null, n = [], s = [], i = null, r = null, o = null) {\n    return new kn(t, e, n, s, i, r, o);\n}\n\nfunction $n(t) {\n    const e = L(t);\n    if (null === e.dt) {\n        let t = e.path.canonicalString();\n        null !== e.collectionGroup && (t += \"|cg:\" + e.collectionGroup), t += \"|f:\", t += e.filters.map((t => En(t))).join(\",\"), \n        t += \"|ob:\", t += e.orderBy.map((t => function(t) {\n            // TODO(b/29183165): Make this collision robust.\n            return t.field.canonicalString() + t.dir;\n        }(t))).join(\",\"), Ft(e.limit) || (t += \"|l:\", t += e.limit), e.startAt && (t += \"|lb:\", \n        t += e.startAt.inclusive ? \"b:\" : \"a:\", t += e.startAt.position.map((t => Qe(t))).join(\",\")), \n        e.endAt && (t += \"|ub:\", t += e.endAt.inclusive ? \"a:\" : \"b:\", t += e.endAt.position.map((t => Qe(t))).join(\",\")), \n        e.dt = t;\n    }\n    return e.dt;\n}\n\nfunction On(t, e) {\n    if (t.limit !== e.limit) return !1;\n    if (t.orderBy.length !== e.orderBy.length) return !1;\n    for (let n = 0; n < t.orderBy.length; n++) if (!wn(t.orderBy[n], e.orderBy[n])) return !1;\n    if (t.filters.length !== e.filters.length) return !1;\n    for (let n = 0; n < t.filters.length; n++) if (!An(t.filters[n], e.filters[n])) return !1;\n    return t.collectionGroup === e.collectionGroup && (!!t.path.isEqual(e.path) && (!!fn(t.startAt, e.startAt) && fn(t.endAt, e.endAt)));\n}\n\nfunction Fn(t) {\n    return ht.isDocumentKey(t.path) && null === t.collectionGroup && 0 === t.filters.length;\n}\n\n/** Returns the field filters that target the given field path. */ function Bn(t, e) {\n    return t.filters.filter((t => t instanceof mn && t.field.isEqual(e)));\n}\n\n/**\n * Returns the values that are used in ARRAY_CONTAINS or ARRAY_CONTAINS_ANY\n * filters. Returns `null` if there are no such filters.\n */\n/**\n * Returns the value to use as the lower bound for ascending index segment at\n * the provided `fieldPath` (or the upper bound for an descending segment).\n */\nfunction Ln(t, e, n) {\n    let s = Be, i = !0;\n    // Process all filters to find a value for the current field segment\n    for (const n of Bn(t, e)) {\n        let t = Be, e = !0;\n        switch (n.op) {\n          case \"<\" /* Operator.LESS_THAN */ :\n          case \"<=\" /* Operator.LESS_THAN_OR_EQUAL */ :\n            t = nn(n.value);\n            break;\n\n          case \"==\" /* Operator.EQUAL */ :\n          case \"in\" /* Operator.IN */ :\n          case \">=\" /* Operator.GREATER_THAN_OR_EQUAL */ :\n            t = n.value;\n            break;\n\n          case \">\" /* Operator.GREATER_THAN */ :\n            t = n.value, e = !1;\n            break;\n\n          case \"!=\" /* Operator.NOT_EQUAL */ :\n          case \"not-in\" /* Operator.NOT_IN */ :\n            t = Be;\n // Remaining filters cannot be used as lower bounds.\n                }\n        rn({\n            value: s,\n            inclusive: i\n        }, {\n            value: t,\n            inclusive: e\n        }) < 0 && (s = t, i = e);\n    }\n    // If there is an additional bound, compare the values against the existing\n    // range to see if we can narrow the scope.\n        if (null !== n) for (let r = 0; r < t.orderBy.length; ++r) {\n        if (t.orderBy[r].field.isEqual(e)) {\n            const t = n.position[r];\n            rn({\n                value: s,\n                inclusive: i\n            }, {\n                value: t,\n                inclusive: n.inclusive\n            }) < 0 && (s = t, i = n.inclusive);\n            break;\n        }\n    }\n    return {\n        value: s,\n        inclusive: i\n    };\n}\n\n/**\n * Returns the value to use as the upper bound for ascending index segment at\n * the provided `fieldPath` (or the lower bound for a descending segment).\n */ function qn(t, e, n) {\n    let s = Fe, i = !0;\n    // Process all filters to find a value for the current field segment\n    for (const n of Bn(t, e)) {\n        let t = Fe, e = !0;\n        switch (n.op) {\n          case \">=\" /* Operator.GREATER_THAN_OR_EQUAL */ :\n          case \">\" /* Operator.GREATER_THAN */ :\n            t = sn(n.value), e = !1;\n            break;\n\n          case \"==\" /* Operator.EQUAL */ :\n          case \"in\" /* Operator.IN */ :\n          case \"<=\" /* Operator.LESS_THAN_OR_EQUAL */ :\n            t = n.value;\n            break;\n\n          case \"<\" /* Operator.LESS_THAN */ :\n            t = n.value, e = !1;\n            break;\n\n          case \"!=\" /* Operator.NOT_EQUAL */ :\n          case \"not-in\" /* Operator.NOT_IN */ :\n            t = Fe;\n // Remaining filters cannot be used as upper bounds.\n                }\n        on({\n            value: s,\n            inclusive: i\n        }, {\n            value: t,\n            inclusive: e\n        }) > 0 && (s = t, i = e);\n    }\n    // If there is an additional bound, compare the values against the existing\n    // range to see if we can narrow the scope.\n        if (null !== n) for (let r = 0; r < t.orderBy.length; ++r) {\n        if (t.orderBy[r].field.isEqual(e)) {\n            const t = n.position[r];\n            on({\n                value: s,\n                inclusive: i\n            }, {\n                value: t,\n                inclusive: n.inclusive\n            }) > 0 && (s = t, i = n.inclusive);\n            break;\n        }\n    }\n    return {\n        value: s,\n        inclusive: i\n    };\n}\n\n/** Returns the number of segments of a perfect index for this target. */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Query encapsulates all the query attributes we support in the SDK. It can\n * be run against the LocalStore, as well as be converted to a `Target` to\n * query the RemoteStore results.\n *\n * Visible for testing.\n */\nclass Un {\n    /**\n     * Initializes a Query with a path and optional additional query constraints.\n     * Path must currently be empty if this is a collection group query.\n     */\n    constructor(t, e = null, n = [], s = [], i = null, r = \"F\" /* LimitType.First */ , o = null, u = null) {\n        this.path = t, this.collectionGroup = e, this.explicitOrderBy = n, this.filters = s, \n        this.limit = i, this.limitType = r, this.startAt = o, this.endAt = u, this.wt = null, \n        // The corresponding `Target` of this `Query` instance.\n        this._t = null, this.startAt, this.endAt;\n    }\n}\n\n/** Creates a new Query instance with the options provided. */ function Kn(t, e, n, s, i, r, o, u) {\n    return new Un(t, e, n, s, i, r, o, u);\n}\n\n/** Creates a new Query for a query that matches all documents at `path` */ function Gn(t) {\n    return new Un(t);\n}\n\n/**\n * Helper to convert a collection group query into a collection query at a\n * specific path. This is used when executing collection group queries, since\n * we have to split the query into a set of collection queries at multiple\n * paths.\n */\n/**\n * Returns true if this query does not specify any query constraints that\n * could remove results.\n */\nfunction Qn(t) {\n    return 0 === t.filters.length && null === t.limit && null == t.startAt && null == t.endAt && (0 === t.explicitOrderBy.length || 1 === t.explicitOrderBy.length && t.explicitOrderBy[0].field.isKeyField());\n}\n\nfunction jn(t) {\n    return t.explicitOrderBy.length > 0 ? t.explicitOrderBy[0].field : null;\n}\n\nfunction zn(t) {\n    for (const e of t.filters) {\n        const t = e.getFirstInequalityField();\n        if (null !== t) return t;\n    }\n    return null;\n}\n\n/**\n * Creates a new Query for a collection group query that matches all documents\n * within the provided collection group.\n */\n/**\n * Returns whether the query matches a collection group rather than a specific\n * collection.\n */\nfunction Wn(t) {\n    return null !== t.collectionGroup;\n}\n\n/**\n * Returns the implicit order by constraint that is used to execute the Query,\n * which can be different from the order by constraints the user provided (e.g.\n * the SDK and backend always orders by `__name__`).\n */ function Hn(t) {\n    const e = L(t);\n    if (null === e.wt) {\n        e.wt = [];\n        const t = zn(e), n = jn(e);\n        if (null !== t && null === n) \n        // In order to implicitly add key ordering, we must also add the\n        // inequality filter field for it to be a valid query.\n        // Note that the default inequality field and key ordering is ascending.\n        t.isKeyField() || e.wt.push(new dn(t)), e.wt.push(new dn(at.keyField(), \"asc\" /* Direction.ASCENDING */)); else {\n            let t = !1;\n            for (const n of e.explicitOrderBy) e.wt.push(n), n.field.isKeyField() && (t = !0);\n            if (!t) {\n                // The order of the implicit key ordering always matches the last\n                // explicit order by\n                const t = e.explicitOrderBy.length > 0 ? e.explicitOrderBy[e.explicitOrderBy.length - 1].dir : \"asc\" /* Direction.ASCENDING */;\n                e.wt.push(new dn(at.keyField(), t));\n            }\n        }\n    }\n    return e.wt;\n}\n\n/**\n * Converts this `Query` instance to it's corresponding `Target` representation.\n */ function Jn(t) {\n    const e = L(t);\n    if (!e._t) if (\"F\" /* LimitType.First */ === e.limitType) e._t = Mn(e.path, e.collectionGroup, Hn(e), e.filters, e.limit, e.startAt, e.endAt); else {\n        // Flip the orderBy directions since we want the last results\n        const t = [];\n        for (const n of Hn(e)) {\n            const e = \"desc\" /* Direction.DESCENDING */ === n.dir ? \"asc\" /* Direction.ASCENDING */ : \"desc\" /* Direction.DESCENDING */;\n            t.push(new dn(n.field, e));\n        }\n        // We need to swap the cursors to match the now-flipped query ordering.\n                const n = e.endAt ? new hn(e.endAt.position, e.endAt.inclusive) : null, s = e.startAt ? new hn(e.startAt.position, e.startAt.inclusive) : null;\n        // Now return as a LimitType.First query.\n        e._t = Mn(e.path, e.collectionGroup, t, e.filters, e.limit, n, s);\n    }\n    return e._t;\n}\n\nfunction Yn(t, e) {\n    e.getFirstInequalityField(), zn(t);\n    const n = t.filters.concat([ e ]);\n    return new Un(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);\n}\n\nfunction Xn(t, e, n) {\n    return new Un(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);\n}\n\nfunction Zn(t, e) {\n    return On(Jn(t), Jn(e)) && t.limitType === e.limitType;\n}\n\n// TODO(b/29183165): This is used to get a unique string from a query to, for\n// example, use as a dictionary key, but the implementation is subject to\n// collisions. Make it collision-free.\nfunction ts(t) {\n    return `${$n(Jn(t))}|lt:${t.limitType}`;\n}\n\nfunction es(t) {\n    return `Query(target=${function(t) {\n        let e = t.path.canonicalString();\n        return null !== t.collectionGroup && (e += \" collectionGroup=\" + t.collectionGroup), \n        t.filters.length > 0 && (e += `, filters: [${t.filters.map((t => Rn(t))).join(\", \")}]`), \n        Ft(t.limit) || (e += \", limit: \" + t.limit), t.orderBy.length > 0 && (e += `, orderBy: [${t.orderBy.map((t => function(t) {\n            return `${t.field.canonicalString()} (${t.dir})`;\n        }(t))).join(\", \")}]`), t.startAt && (e += \", startAt: \", e += t.startAt.inclusive ? \"b:\" : \"a:\", \n        e += t.startAt.position.map((t => Qe(t))).join(\",\")), t.endAt && (e += \", endAt: \", \n        e += t.endAt.inclusive ? \"a:\" : \"b:\", e += t.endAt.position.map((t => Qe(t))).join(\",\")), \n        `Target(${e})`;\n    }(Jn(t))}; limitType=${t.limitType})`;\n}\n\n/** Returns whether `doc` matches the constraints of `query`. */ function ns(t, e) {\n    return e.isFoundDocument() && function(t, e) {\n        const n = e.key.path;\n        return null !== t.collectionGroup ? e.key.hasCollectionId(t.collectionGroup) && t.path.isPrefixOf(n) : ht.isDocumentKey(t.path) ? t.path.isEqual(n) : t.path.isImmediateParentOf(n);\n    }\n    /**\n * A document must have a value for every ordering clause in order to show up\n * in the results.\n */ (t, e) && function(t, e) {\n        // We must use `queryOrderBy()` to get the list of all orderBys (both implicit and explicit).\n        // Note that for OR queries, orderBy applies to all disjunction terms and implicit orderBys must\n        // be taken into account. For example, the query \"a > 1 || b==1\" has an implicit \"orderBy a\" due\n        // to the inequality, and is evaluated as \"a > 1 orderBy a || b==1 orderBy a\".\n        // A document with content of {b:1} matches the filters, but does not match the orderBy because\n        // it's missing the field 'a'.\n        for (const n of Hn(t)) \n        // order by key always matches\n        if (!n.field.isKeyField() && null === e.data.field(n.field)) return !1;\n        return !0;\n    }(t, e) && function(t, e) {\n        for (const n of t.filters) if (!n.matches(e)) return !1;\n        return !0;\n    }\n    /** Makes sure a document is within the bounds, if provided. */ (t, e) && function(t, e) {\n        if (t.startAt && !\n        /**\n * Returns true if a document sorts before a bound using the provided sort\n * order.\n */\n        function(t, e, n) {\n            const s = ln(t, e, n);\n            return t.inclusive ? s <= 0 : s < 0;\n        }(t.startAt, Hn(t), e)) return !1;\n        if (t.endAt && !function(t, e, n) {\n            const s = ln(t, e, n);\n            return t.inclusive ? s >= 0 : s > 0;\n        }(t.endAt, Hn(t), e)) return !1;\n        return !0;\n    }\n    /**\n * Returns the collection group that this query targets.\n *\n * PORTING NOTE: This is only used in the Web SDK to facilitate multi-tab\n * synchronization for query results.\n */ (t, e);\n}\n\nfunction ss(t) {\n    return t.collectionGroup || (t.path.length % 2 == 1 ? t.path.lastSegment() : t.path.get(t.path.length - 2));\n}\n\n/**\n * Returns a new comparator function that can be used to compare two documents\n * based on the Query's ordering constraint.\n */ function is(t) {\n    return (e, n) => {\n        let s = !1;\n        for (const i of Hn(t)) {\n            const t = rs(i, e, n);\n            if (0 !== t) return t;\n            s = s || i.field.isKeyField();\n        }\n        return 0;\n    };\n}\n\nfunction rs(t, e, n) {\n    const s = t.field.isKeyField() ? ht.comparator(e.key, n.key) : function(t, e, n) {\n        const s = e.data.field(t), i = n.data.field(t);\n        return null !== s && null !== i ? Ke(s, i) : O();\n    }(t.field, e, n);\n    switch (t.dir) {\n      case \"asc\" /* Direction.ASCENDING */ :\n        return s;\n\n      case \"desc\" /* Direction.DESCENDING */ :\n        return -1 * s;\n\n      default:\n        return O();\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A map implementation that uses objects as keys. Objects must have an\n * associated equals function and must be immutable. Entries in the map are\n * stored together with the key being produced from the mapKeyFn. This map\n * automatically handles collisions of keys.\n */ class os {\n    constructor(t, e) {\n        this.mapKeyFn = t, this.equalsFn = e, \n        /**\n         * The inner map for a key/value pair. Due to the possibility of collisions we\n         * keep a list of entries that we do a linear search through to find an actual\n         * match. Note that collisions should be rare, so we still expect near\n         * constant time lookups in practice.\n         */\n        this.inner = {}, \n        /** The number of entries stored in the map */\n        this.innerSize = 0;\n    }\n    /** Get a value for this key, or undefined if it does not exist. */    get(t) {\n        const e = this.mapKeyFn(t), n = this.inner[e];\n        if (void 0 !== n) for (const [e, s] of n) if (this.equalsFn(e, t)) return s;\n    }\n    has(t) {\n        return void 0 !== this.get(t);\n    }\n    /** Put this key and value in the map. */    set(t, e) {\n        const n = this.mapKeyFn(t), s = this.inner[n];\n        if (void 0 === s) return this.inner[n] = [ [ t, e ] ], void this.innerSize++;\n        for (let n = 0; n < s.length; n++) if (this.equalsFn(s[n][0], t)) \n        // This is updating an existing entry and does not increase `innerSize`.\n        return void (s[n] = [ t, e ]);\n        s.push([ t, e ]), this.innerSize++;\n    }\n    /**\n     * Remove this key from the map. Returns a boolean if anything was deleted.\n     */    delete(t) {\n        const e = this.mapKeyFn(t), n = this.inner[e];\n        if (void 0 === n) return !1;\n        for (let s = 0; s < n.length; s++) if (this.equalsFn(n[s][0], t)) return 1 === n.length ? delete this.inner[e] : n.splice(s, 1), \n        this.innerSize--, !0;\n        return !1;\n    }\n    forEach(t) {\n        ge(this.inner, ((e, n) => {\n            for (const [e, s] of n) t(e, s);\n        }));\n    }\n    isEmpty() {\n        return ye(this.inner);\n    }\n    size() {\n        return this.innerSize;\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const us = new pe(ht.comparator);\n\nfunction cs() {\n    return us;\n}\n\nconst as = new pe(ht.comparator);\n\nfunction hs(...t) {\n    let e = as;\n    for (const n of t) e = e.insert(n.key, n);\n    return e;\n}\n\nfunction ls(t) {\n    let e = as;\n    return t.forEach(((t, n) => e = e.insert(t, n.overlayedDocument))), e;\n}\n\nfunction fs() {\n    return ws();\n}\n\nfunction ds() {\n    return ws();\n}\n\nfunction ws() {\n    return new os((t => t.toString()), ((t, e) => t.isEqual(e)));\n}\n\nconst _s = new pe(ht.comparator);\n\nconst ms = new Ee(ht.comparator);\n\nfunction gs(...t) {\n    let e = ms;\n    for (const n of t) e = e.add(n);\n    return e;\n}\n\nconst ys = new Ee(et);\n\nfunction ps() {\n    return ys;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Returns an DoubleValue for `value` that is encoded based the serializer's\n * `useProto3Json` setting.\n */ function Is(t, e) {\n    if (t.useProto3Json) {\n        if (isNaN(e)) return {\n            doubleValue: \"NaN\"\n        };\n        if (e === 1 / 0) return {\n            doubleValue: \"Infinity\"\n        };\n        if (e === -1 / 0) return {\n            doubleValue: \"-Infinity\"\n        };\n    }\n    return {\n        doubleValue: Bt(e) ? \"-0\" : e\n    };\n}\n\n/**\n * Returns an IntegerValue for `value`.\n */ function Ts(t) {\n    return {\n        integerValue: \"\" + t\n    };\n}\n\n/**\n * Returns a value for a number that's appropriate to put into a proto.\n * The return value is an IntegerValue if it can safely represent the value,\n * otherwise a DoubleValue is returned.\n */ function Es(t, e) {\n    return Lt(e) ? Ts(e) : Is(t, e);\n}\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Used to represent a field transform on a mutation. */ class As {\n    constructor() {\n        // Make sure that the structural type of `TransformOperation` is unique.\n        // See https://github.com/microsoft/TypeScript/issues/5451\n        this._ = void 0;\n    }\n}\n\n/**\n * Computes the local transform result against the provided `previousValue`,\n * optionally using the provided localWriteTime.\n */ function vs(t, e, n) {\n    return t instanceof bs ? function(t, e) {\n        const n = {\n            fields: {\n                __type__: {\n                    stringValue: \"server_timestamp\"\n                },\n                __local_write_time__: {\n                    timestampValue: {\n                        seconds: t.seconds,\n                        nanos: t.nanoseconds\n                    }\n                }\n            }\n        };\n        // We should avoid storing deeply nested server timestamp map values\n        // because we never use the intermediate \"previous values\".\n        // For example:\n        // previous: 42L, add: t1, result: t1 -> 42L\n        // previous: t1,  add: t2, result: t2 -> 42L (NOT t2 -> t1 -> 42L)\n        // previous: t2,  add: t3, result: t3 -> 42L (NOT t3 -> t2 -> t1 -> 42L)\n        // `getPreviousValue` recursively traverses server timestamps to find the\n        // least recent Value.\n                return e && Ne(e) && (e = ke(e)), e && (n.fields.__previous_value__ = e), \n        {\n            mapValue: n\n        };\n    }(n, e) : t instanceof Vs ? Ss(t, e) : t instanceof Ds ? Cs(t, e) : function(t, e) {\n        // PORTING NOTE: Since JavaScript's integer arithmetic is limited to 53 bit\n        // precision and resolves overflows by reducing precision, we do not\n        // manually cap overflows at 2^63.\n        const n = Ps(t, e), s = Ns(n) + Ns(t.gt);\n        return He(n) && He(t.gt) ? Ts(s) : Is(t.serializer, s);\n    }(t, e);\n}\n\n/**\n * Computes a final transform result after the transform has been acknowledged\n * by the server, potentially using the server-provided transformResult.\n */ function Rs(t, e, n) {\n    // The server just sends null as the transform result for array operations,\n    // so we have to calculate a result the same as we do for local\n    // applications.\n    return t instanceof Vs ? Ss(t, e) : t instanceof Ds ? Cs(t, e) : n;\n}\n\n/**\n * If this transform operation is not idempotent, returns the base value to\n * persist for this transform. If a base value is returned, the transform\n * operation is always applied to this base value, even if document has\n * already been updated.\n *\n * Base values provide consistent behavior for non-idempotent transforms and\n * allow us to return the same latency-compensated value even if the backend\n * has already applied the transform operation. The base value is null for\n * idempotent transforms, as they can be re-played even if the backend has\n * already applied them.\n *\n * @returns a base value to store along with the mutation, or null for\n * idempotent transforms.\n */ function Ps(t, e) {\n    return t instanceof xs ? He(n = e) || function(t) {\n        return !!t && \"doubleValue\" in t;\n    }\n    /** Returns true if `value` is either an IntegerValue or a DoubleValue. */ (n) ? e : {\n        integerValue: 0\n    } : null;\n    var n;\n}\n\n/** Transforms a value into a server-generated timestamp. */\nclass bs extends As {}\n\n/** Transforms an array value via a union operation. */ class Vs extends As {\n    constructor(t) {\n        super(), this.elements = t;\n    }\n}\n\nfunction Ss(t, e) {\n    const n = ks(e);\n    for (const e of t.elements) n.some((t => qe(t, e))) || n.push(e);\n    return {\n        arrayValue: {\n            values: n\n        }\n    };\n}\n\n/** Transforms an array value via a remove operation. */ class Ds extends As {\n    constructor(t) {\n        super(), this.elements = t;\n    }\n}\n\nfunction Cs(t, e) {\n    let n = ks(e);\n    for (const e of t.elements) n = n.filter((t => !qe(t, e)));\n    return {\n        arrayValue: {\n            values: n\n        }\n    };\n}\n\n/**\n * Implements the backend semantics for locally computed NUMERIC_ADD (increment)\n * transforms. Converts all field values to integers or doubles, but unlike the\n * backend does not cap integer values at 2^63. Instead, JavaScript number\n * arithmetic is used and precision loss can occur for values greater than 2^53.\n */ class xs extends As {\n    constructor(t, e) {\n        super(), this.serializer = t, this.gt = e;\n    }\n}\n\nfunction Ns(t) {\n    return Ce(t.integerValue || t.doubleValue);\n}\n\nfunction ks(t) {\n    return Je(t) && t.arrayValue.values ? t.arrayValue.values.slice() : [];\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** A field path and the TransformOperation to perform upon it. */ class Ms {\n    constructor(t, e) {\n        this.field = t, this.transform = e;\n    }\n}\n\nfunction $s(t, e) {\n    return t.field.isEqual(e.field) && function(t, e) {\n        return t instanceof Vs && e instanceof Vs || t instanceof Ds && e instanceof Ds ? nt(t.elements, e.elements, qe) : t instanceof xs && e instanceof xs ? qe(t.gt, e.gt) : t instanceof bs && e instanceof bs;\n    }(t.transform, e.transform);\n}\n\n/** The result of successfully applying a mutation to the backend. */\nclass Os {\n    constructor(\n    /**\n     * The version at which the mutation was committed:\n     *\n     * - For most operations, this is the updateTime in the WriteResult.\n     * - For deletes, the commitTime of the WriteResponse (because deletes are\n     *   not stored and have no updateTime).\n     *\n     * Note that these versions can be different: No-op writes will not change\n     * the updateTime even though the commitTime advances.\n     */\n    t, \n    /**\n     * The resulting fields returned from the backend after a mutation\n     * containing field transforms has been committed. Contains one FieldValue\n     * for each FieldTransform that was in the mutation.\n     *\n     * Will be empty if the mutation did not contain any field transforms.\n     */\n    e) {\n        this.version = t, this.transformResults = e;\n    }\n}\n\n/**\n * Encodes a precondition for a mutation. This follows the model that the\n * backend accepts with the special case of an explicit \"empty\" precondition\n * (meaning no precondition).\n */ class Fs {\n    constructor(t, e) {\n        this.updateTime = t, this.exists = e;\n    }\n    /** Creates a new empty Precondition. */    static none() {\n        return new Fs;\n    }\n    /** Creates a new Precondition with an exists flag. */    static exists(t) {\n        return new Fs(void 0, t);\n    }\n    /** Creates a new Precondition based on a version a document exists at. */    static updateTime(t) {\n        return new Fs(t);\n    }\n    /** Returns whether this Precondition is empty. */    get isNone() {\n        return void 0 === this.updateTime && void 0 === this.exists;\n    }\n    isEqual(t) {\n        return this.exists === t.exists && (this.updateTime ? !!t.updateTime && this.updateTime.isEqual(t.updateTime) : !t.updateTime);\n    }\n}\n\n/** Returns true if the preconditions is valid for the given document. */ function Bs(t, e) {\n    return void 0 !== t.updateTime ? e.isFoundDocument() && e.version.isEqual(t.updateTime) : void 0 === t.exists || t.exists === e.isFoundDocument();\n}\n\n/**\n * A mutation describes a self-contained change to a document. Mutations can\n * create, replace, delete, and update subsets of documents.\n *\n * Mutations not only act on the value of the document but also its version.\n *\n * For local mutations (mutations that haven't been committed yet), we preserve\n * the existing version for Set and Patch mutations. For Delete mutations, we\n * reset the version to 0.\n *\n * Here's the expected transition table.\n *\n * MUTATION           APPLIED TO            RESULTS IN\n *\n * SetMutation        Document(v3)          Document(v3)\n * SetMutation        NoDocument(v3)        Document(v0)\n * SetMutation        InvalidDocument(v0)   Document(v0)\n * PatchMutation      Document(v3)          Document(v3)\n * PatchMutation      NoDocument(v3)        NoDocument(v3)\n * PatchMutation      InvalidDocument(v0)   UnknownDocument(v3)\n * DeleteMutation     Document(v3)          NoDocument(v0)\n * DeleteMutation     NoDocument(v3)        NoDocument(v0)\n * DeleteMutation     InvalidDocument(v0)   NoDocument(v0)\n *\n * For acknowledged mutations, we use the updateTime of the WriteResponse as\n * the resulting version for Set and Patch mutations. As deletes have no\n * explicit update time, we use the commitTime of the WriteResponse for\n * Delete mutations.\n *\n * If a mutation is acknowledged by the backend but fails the precondition check\n * locally, we transition to an `UnknownDocument` and rely on Watch to send us\n * the updated version.\n *\n * Field transforms are used only with Patch and Set Mutations. We use the\n * `updateTransforms` message to store transforms, rather than the `transforms`s\n * messages.\n *\n * ## Subclassing Notes\n *\n * Every type of mutation needs to implement its own applyToRemoteDocument() and\n * applyToLocalView() to implement the actual behavior of applying the mutation\n * to some source document (see `setMutationApplyToRemoteDocument()` for an\n * example).\n */ class Ls {}\n\n/**\n * A utility method to calculate a `Mutation` representing the overlay from the\n * final state of the document, and a `FieldMask` representing the fields that\n * are mutated by the local mutations.\n */ function qs(t, e) {\n    if (!t.hasLocalMutations || e && 0 === e.fields.length) return null;\n    // mask is null when sets or deletes are applied to the current document.\n        if (null === e) return t.isNoDocument() ? new Ys(t.key, Fs.none()) : new js(t.key, t.data, Fs.none());\n    {\n        const n = t.data, s = un.empty();\n        let i = new Ee(at.comparator);\n        for (let t of e.fields) if (!i.has(t)) {\n            let e = n.field(t);\n            // If we are deleting a nested field, we take the immediate parent as\n            // the mask used to construct the resulting mutation.\n            // Justification: Nested fields can create parent fields implicitly. If\n            // only a leaf entry is deleted in later mutations, the parent field\n            // should still remain, but we may have lost this information.\n            // Consider mutation (foo.bar 1), then mutation (foo.bar delete()).\n            // This leaves the final result (foo, {}). Despite the fact that `doc`\n            // has the correct result, `foo` is not in `mask`, and the resulting\n            // mutation would miss `foo`.\n                        null === e && t.length > 1 && (t = t.popLast(), e = n.field(t)), null === e ? s.delete(t) : s.set(t, e), \n            i = i.add(t);\n        }\n        return new zs(t.key, s, new Re(i.toArray()), Fs.none());\n    }\n}\n\n/**\n * Applies this mutation to the given document for the purposes of computing a\n * new remote document. If the input document doesn't match the expected state\n * (e.g. it is invalid or outdated), the document type may transition to\n * unknown.\n *\n * @param mutation - The mutation to apply.\n * @param document - The document to mutate. The input document can be an\n *     invalid document if the client has no knowledge of the pre-mutation state\n *     of the document.\n * @param mutationResult - The result of applying the mutation from the backend.\n */ function Us(t, e, n) {\n    t instanceof js ? function(t, e, n) {\n        // Unlike setMutationApplyToLocalView, if we're applying a mutation to a\n        // remote document the server has accepted the mutation so the precondition\n        // must have held.\n        const s = t.value.clone(), i = Hs(t.fieldTransforms, e, n.transformResults);\n        s.setAll(i), e.convertToFoundDocument(n.version, s).setHasCommittedMutations();\n    }(t, e, n) : t instanceof zs ? function(t, e, n) {\n        if (!Bs(t.precondition, e)) \n        // Since the mutation was not rejected, we know that the precondition\n        // matched on the backend. We therefore must not have the expected version\n        // of the document in our cache and convert to an UnknownDocument with a\n        // known updateTime.\n        return void e.convertToUnknownDocument(n.version);\n        const s = Hs(t.fieldTransforms, e, n.transformResults), i = e.data;\n        i.setAll(Ws(t)), i.setAll(s), e.convertToFoundDocument(n.version, i).setHasCommittedMutations();\n    }(t, e, n) : function(t, e, n) {\n        // Unlike applyToLocalView, if we're applying a mutation to a remote\n        // document the server has accepted the mutation so the precondition must\n        // have held.\n        e.convertToNoDocument(n.version).setHasCommittedMutations();\n    }(0, e, n);\n}\n\n/**\n * Applies this mutation to the given document for the purposes of computing\n * the new local view of a document. If the input document doesn't match the\n * expected state, the document is not modified.\n *\n * @param mutation - The mutation to apply.\n * @param document - The document to mutate. The input document can be an\n *     invalid document if the client has no knowledge of the pre-mutation state\n *     of the document.\n * @param previousMask - The fields that have been updated before applying this mutation.\n * @param localWriteTime - A timestamp indicating the local write time of the\n *     batch this mutation is a part of.\n * @returns A `FieldMask` representing the fields that are changed by applying this mutation.\n */ function Ks(t, e, n, s) {\n    return t instanceof js ? function(t, e, n, s) {\n        if (!Bs(t.precondition, e)) \n        // The mutation failed to apply (e.g. a document ID created with add()\n        // caused a name collision).\n        return n;\n        const i = t.value.clone(), r = Js(t.fieldTransforms, s, e);\n        return i.setAll(r), e.convertToFoundDocument(e.version, i).setHasLocalMutations(), \n        null;\n // SetMutation overwrites all fields.\n        }\n    /**\n * A mutation that modifies fields of the document at the given key with the\n * given values. The values are applied through a field mask:\n *\n *  * When a field is in both the mask and the values, the corresponding field\n *    is updated.\n *  * When a field is in neither the mask nor the values, the corresponding\n *    field is unmodified.\n *  * When a field is in the mask but not in the values, the corresponding field\n *    is deleted.\n *  * When a field is not in the mask but is in the values, the values map is\n *    ignored.\n */ (t, e, n, s) : t instanceof zs ? function(t, e, n, s) {\n        if (!Bs(t.precondition, e)) return n;\n        const i = Js(t.fieldTransforms, s, e), r = e.data;\n        if (r.setAll(Ws(t)), r.setAll(i), e.convertToFoundDocument(e.version, r).setHasLocalMutations(), \n        null === n) return null;\n        return n.unionWith(t.fieldMask.fields).unionWith(t.fieldTransforms.map((t => t.field)));\n    }\n    /**\n * Returns a FieldPath/Value map with the content of the PatchMutation.\n */ (t, e, n, s) : function(t, e, n) {\n        if (Bs(t.precondition, e)) return e.convertToNoDocument(e.version).setHasLocalMutations(), \n        null;\n        return n;\n    }\n    /**\n * A mutation that verifies the existence of the document at the given key with\n * the provided precondition.\n *\n * The `verify` operation is only used in Transactions, and this class serves\n * primarily to facilitate serialization into protos.\n */ (t, e, n);\n}\n\n/**\n * If this mutation is not idempotent, returns the base value to persist with\n * this mutation. If a base value is returned, the mutation is always applied\n * to this base value, even if document has already been updated.\n *\n * The base value is a sparse object that consists of only the document\n * fields for which this mutation contains a non-idempotent transformation\n * (e.g. a numeric increment). The provided value guarantees consistent\n * behavior for non-idempotent transforms and allow us to return the same\n * latency-compensated value even if the backend has already applied the\n * mutation. The base value is null for idempotent mutations, as they can be\n * re-played even if the backend has already applied them.\n *\n * @returns a base value to store along with the mutation, or null for\n * idempotent mutations.\n */ function Gs(t, e) {\n    let n = null;\n    for (const s of t.fieldTransforms) {\n        const t = e.data.field(s.field), i = Ps(s.transform, t || null);\n        null != i && (null === n && (n = un.empty()), n.set(s.field, i));\n    }\n    return n || null;\n}\n\nfunction Qs(t, e) {\n    return t.type === e.type && (!!t.key.isEqual(e.key) && (!!t.precondition.isEqual(e.precondition) && (!!function(t, e) {\n        return void 0 === t && void 0 === e || !(!t || !e) && nt(t, e, ((t, e) => $s(t, e)));\n    }(t.fieldTransforms, e.fieldTransforms) && (0 /* MutationType.Set */ === t.type ? t.value.isEqual(e.value) : 1 /* MutationType.Patch */ !== t.type || t.data.isEqual(e.data) && t.fieldMask.isEqual(e.fieldMask)))));\n}\n\n/**\n * A mutation that creates or replaces the document at the given key with the\n * object value contents.\n */ class js extends Ls {\n    constructor(t, e, n, s = []) {\n        super(), this.key = t, this.value = e, this.precondition = n, this.fieldTransforms = s, \n        this.type = 0 /* MutationType.Set */;\n    }\n    getFieldMask() {\n        return null;\n    }\n}\n\nclass zs extends Ls {\n    constructor(t, e, n, s, i = []) {\n        super(), this.key = t, this.data = e, this.fieldMask = n, this.precondition = s, \n        this.fieldTransforms = i, this.type = 1 /* MutationType.Patch */;\n    }\n    getFieldMask() {\n        return this.fieldMask;\n    }\n}\n\nfunction Ws(t) {\n    const e = new Map;\n    return t.fieldMask.fields.forEach((n => {\n        if (!n.isEmpty()) {\n            const s = t.data.field(n);\n            e.set(n, s);\n        }\n    })), e;\n}\n\n/**\n * Creates a list of \"transform results\" (a transform result is a field value\n * representing the result of applying a transform) for use after a mutation\n * containing transforms has been acknowledged by the server.\n *\n * @param fieldTransforms - The field transforms to apply the result to.\n * @param mutableDocument - The current state of the document after applying all\n * previous mutations.\n * @param serverTransformResults - The transform results received by the server.\n * @returns The transform results list.\n */ function Hs(t, e, n) {\n    const s = new Map;\n    F(t.length === n.length);\n    for (let i = 0; i < n.length; i++) {\n        const r = t[i], o = r.transform, u = e.data.field(r.field);\n        s.set(r.field, Rs(o, u, n[i]));\n    }\n    return s;\n}\n\n/**\n * Creates a list of \"transform results\" (a transform result is a field value\n * representing the result of applying a transform) for use when applying a\n * transform locally.\n *\n * @param fieldTransforms - The field transforms to apply the result to.\n * @param localWriteTime - The local time of the mutation (used to\n *     generate ServerTimestampValues).\n * @param mutableDocument - The document to apply transforms on.\n * @returns The transform results list.\n */ function Js(t, e, n) {\n    const s = new Map;\n    for (const i of t) {\n        const t = i.transform, r = n.data.field(i.field);\n        s.set(i.field, vs(t, r, e));\n    }\n    return s;\n}\n\n/** A mutation that deletes the document at the given key. */ class Ys extends Ls {\n    constructor(t, e) {\n        super(), this.key = t, this.precondition = e, this.type = 2 /* MutationType.Delete */ , \n        this.fieldTransforms = [];\n    }\n    getFieldMask() {\n        return null;\n    }\n}\n\nclass Xs extends Ls {\n    constructor(t, e) {\n        super(), this.key = t, this.precondition = e, this.type = 3 /* MutationType.Verify */ , \n        this.fieldTransforms = [];\n    }\n    getFieldMask() {\n        return null;\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A batch of mutations that will be sent as one unit to the backend.\n */ class Zs {\n    /**\n     * @param batchId - The unique ID of this mutation batch.\n     * @param localWriteTime - The original write time of this mutation.\n     * @param baseMutations - Mutations that are used to populate the base\n     * values when this mutation is applied locally. This can be used to locally\n     * overwrite values that are persisted in the remote document cache. Base\n     * mutations are never sent to the backend.\n     * @param mutations - The user-provided mutations in this mutation batch.\n     * User-provided mutations are applied both locally and remotely on the\n     * backend.\n     */\n    constructor(t, e, n, s) {\n        this.batchId = t, this.localWriteTime = e, this.baseMutations = n, this.mutations = s;\n    }\n    /**\n     * Applies all the mutations in this MutationBatch to the specified document\n     * to compute the state of the remote document\n     *\n     * @param document - The document to apply mutations to.\n     * @param batchResult - The result of applying the MutationBatch to the\n     * backend.\n     */    applyToRemoteDocument(t, e) {\n        const n = e.mutationResults;\n        for (let e = 0; e < this.mutations.length; e++) {\n            const s = this.mutations[e];\n            if (s.key.isEqual(t.key)) {\n                Us(s, t, n[e]);\n            }\n        }\n    }\n    /**\n     * Computes the local view of a document given all the mutations in this\n     * batch.\n     *\n     * @param document - The document to apply mutations to.\n     * @param mutatedFields - Fields that have been updated before applying this mutation batch.\n     * @returns A `FieldMask` representing all the fields that are mutated.\n     */    applyToLocalView(t, e) {\n        // First, apply the base state. This allows us to apply non-idempotent\n        // transform against a consistent set of values.\n        for (const n of this.baseMutations) n.key.isEqual(t.key) && (e = Ks(n, t, e, this.localWriteTime));\n        // Second, apply all user-provided mutations.\n                for (const n of this.mutations) n.key.isEqual(t.key) && (e = Ks(n, t, e, this.localWriteTime));\n        return e;\n    }\n    /**\n     * Computes the local view for all provided documents given the mutations in\n     * this batch. Returns a `DocumentKey` to `Mutation` map which can be used to\n     * replace all the mutation applications.\n     */    applyToLocalDocumentSet(t, e) {\n        // TODO(mrschmidt): This implementation is O(n^2). If we apply the mutations\n        // directly (as done in `applyToLocalView()`), we can reduce the complexity\n        // to O(n).\n        const n = ds();\n        return this.mutations.forEach((s => {\n            const i = t.get(s.key), r = i.overlayedDocument;\n            // TODO(mutabledocuments): This method should take a MutableDocumentMap\n            // and we should remove this cast.\n                        let o = this.applyToLocalView(r, i.mutatedFields);\n            // Set mutatedFields to null if the document is only from local mutations.\n            // This creates a Set or Delete mutation, instead of trying to create a\n            // patch mutation as the overlay.\n                        o = e.has(s.key) ? null : o;\n            const u = qs(r, o);\n            null !== u && n.set(s.key, u), r.isValidDocument() || r.convertToNoDocument(rt.min());\n        })), n;\n    }\n    keys() {\n        return this.mutations.reduce(((t, e) => t.add(e.key)), gs());\n    }\n    isEqual(t) {\n        return this.batchId === t.batchId && nt(this.mutations, t.mutations, ((t, e) => Qs(t, e))) && nt(this.baseMutations, t.baseMutations, ((t, e) => Qs(t, e)));\n    }\n}\n\n/** The result of applying a mutation batch to the backend. */ class ti {\n    constructor(t, e, n, \n    /**\n     * A pre-computed mapping from each mutated document to the resulting\n     * version.\n     */\n    s) {\n        this.batch = t, this.commitVersion = e, this.mutationResults = n, this.docVersions = s;\n    }\n    /**\n     * Creates a new MutationBatchResult for the given batch and results. There\n     * must be one result for each mutation in the batch. This static factory\n     * caches a document=&gt;version mapping (docVersions).\n     */    static from(t, e, n) {\n        F(t.mutations.length === n.length);\n        let s = _s;\n        const i = t.mutations;\n        for (let t = 0; t < i.length; t++) s = s.insert(i[t].key, n[t].version);\n        return new ti(t, e, n, s);\n    }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Representation of an overlay computed by Firestore.\n *\n * Holds information about a mutation and the largest batch id in Firestore when\n * the mutation was created.\n */ class ei {\n    constructor(t, e) {\n        this.largestBatchId = t, this.mutation = e;\n    }\n    getKey() {\n        return this.mutation.key;\n    }\n    isEqual(t) {\n        return null !== t && this.mutation === t.mutation;\n    }\n    toString() {\n        return `Overlay{\\n      largestBatchId: ${this.largestBatchId},\\n      mutation: ${this.mutation.toString()}\\n    }`;\n    }\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Concrete implementation of the Aggregate type.\n */ class ni {\n    constructor(t, e, n) {\n        this.alias = t, this.yt = e, this.fieldPath = n;\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class si {\n    constructor(t, e) {\n        this.count = t, this.unchangedNames = e;\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Error Codes describing the different ways GRPC can fail. These are copied\n * directly from GRPC's sources here:\n *\n * https://github.com/grpc/grpc/blob/bceec94ea4fc5f0085d81235d8e1c06798dc341a/include/grpc%2B%2B/impl/codegen/status_code_enum.h\n *\n * Important! The names of these identifiers matter because the string forms\n * are used for reverse lookups from the webchannel stream. Do NOT change the\n * names of these identifiers or change this into a const enum.\n */ var ii, ri;\n\n/**\n * Determines whether an error code represents a permanent error when received\n * in response to a non-write operation.\n *\n * See isPermanentWriteError for classifying write errors.\n */\nfunction oi(t) {\n    switch (t) {\n      default:\n        return O();\n\n      case q.CANCELLED:\n      case q.UNKNOWN:\n      case q.DEADLINE_EXCEEDED:\n      case q.RESOURCE_EXHAUSTED:\n      case q.INTERNAL:\n      case q.UNAVAILABLE:\n // Unauthenticated means something went wrong with our token and we need\n        // to retry with new credentials which will happen automatically.\n              case q.UNAUTHENTICATED:\n        return !1;\n\n      case q.INVALID_ARGUMENT:\n      case q.NOT_FOUND:\n      case q.ALREADY_EXISTS:\n      case q.PERMISSION_DENIED:\n      case q.FAILED_PRECONDITION:\n // Aborted might be retried in some scenarios, but that is dependant on\n        // the context and should handled individually by the calling code.\n        // See https://cloud.google.com/apis/design/errors.\n              case q.ABORTED:\n      case q.OUT_OF_RANGE:\n      case q.UNIMPLEMENTED:\n      case q.DATA_LOSS:\n        return !0;\n    }\n}\n\n/**\n * Determines whether an error code represents a permanent error when received\n * in response to a write operation.\n *\n * Write operations must be handled specially because as of b/119437764, ABORTED\n * errors on the write stream should be retried too (even though ABORTED errors\n * are not generally retryable).\n *\n * Note that during the initial handshake on the write stream an ABORTED error\n * signals that we should discard our stream token (i.e. it is permanent). This\n * means a handshake error should be classified with isPermanentError, above.\n */\n/**\n * Maps an error Code from GRPC status code number, like 0, 1, or 14. These\n * are not the same as HTTP status codes.\n *\n * @returns The Code equivalent to the given GRPC status code. Fails if there\n *     is no match.\n */\nfunction ui(t) {\n    if (void 0 === t) \n    // This shouldn't normally happen, but in certain error cases (like trying\n    // to send invalid proto messages) we may get an error with no GRPC code.\n    return k(\"GRPC error has no .code\"), q.UNKNOWN;\n    switch (t) {\n      case ii.OK:\n        return q.OK;\n\n      case ii.CANCELLED:\n        return q.CANCELLED;\n\n      case ii.UNKNOWN:\n        return q.UNKNOWN;\n\n      case ii.DEADLINE_EXCEEDED:\n        return q.DEADLINE_EXCEEDED;\n\n      case ii.RESOURCE_EXHAUSTED:\n        return q.RESOURCE_EXHAUSTED;\n\n      case ii.INTERNAL:\n        return q.INTERNAL;\n\n      case ii.UNAVAILABLE:\n        return q.UNAVAILABLE;\n\n      case ii.UNAUTHENTICATED:\n        return q.UNAUTHENTICATED;\n\n      case ii.INVALID_ARGUMENT:\n        return q.INVALID_ARGUMENT;\n\n      case ii.NOT_FOUND:\n        return q.NOT_FOUND;\n\n      case ii.ALREADY_EXISTS:\n        return q.ALREADY_EXISTS;\n\n      case ii.PERMISSION_DENIED:\n        return q.PERMISSION_DENIED;\n\n      case ii.FAILED_PRECONDITION:\n        return q.FAILED_PRECONDITION;\n\n      case ii.ABORTED:\n        return q.ABORTED;\n\n      case ii.OUT_OF_RANGE:\n        return q.OUT_OF_RANGE;\n\n      case ii.UNIMPLEMENTED:\n        return q.UNIMPLEMENTED;\n\n      case ii.DATA_LOSS:\n        return q.DATA_LOSS;\n\n      default:\n        return O();\n    }\n}\n\n/**\n * Converts an HTTP response's error status to the equivalent error code.\n *\n * @param status - An HTTP error response status (\"FAILED_PRECONDITION\",\n * \"UNKNOWN\", etc.)\n * @returns The equivalent Code. Non-matching responses are mapped to\n *     Code.UNKNOWN.\n */ (ri = ii || (ii = {}))[ri.OK = 0] = \"OK\", ri[ri.CANCELLED = 1] = \"CANCELLED\", \nri[ri.UNKNOWN = 2] = \"UNKNOWN\", ri[ri.INVALID_ARGUMENT = 3] = \"INVALID_ARGUMENT\", \nri[ri.DEADLINE_EXCEEDED = 4] = \"DEADLINE_EXCEEDED\", ri[ri.NOT_FOUND = 5] = \"NOT_FOUND\", \nri[ri.ALREADY_EXISTS = 6] = \"ALREADY_EXISTS\", ri[ri.PERMISSION_DENIED = 7] = \"PERMISSION_DENIED\", \nri[ri.UNAUTHENTICATED = 16] = \"UNAUTHENTICATED\", ri[ri.RESOURCE_EXHAUSTED = 8] = \"RESOURCE_EXHAUSTED\", \nri[ri.FAILED_PRECONDITION = 9] = \"FAILED_PRECONDITION\", ri[ri.ABORTED = 10] = \"ABORTED\", \nri[ri.OUT_OF_RANGE = 11] = \"OUT_OF_RANGE\", ri[ri.UNIMPLEMENTED = 12] = \"UNIMPLEMENTED\", \nri[ri.INTERNAL = 13] = \"INTERNAL\", ri[ri.UNAVAILABLE = 14] = \"UNAVAILABLE\", ri[ri.DATA_LOSS = 15] = \"DATA_LOSS\";\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Manages \"testing hooks\", hooks into the internals of the SDK to verify\n * internal state and events during integration tests. Do not use this class\n * except for testing purposes.\n *\n * There are two ways to retrieve the global singleton instance of this class:\n * 1. The `instance` property, which returns null if the global singleton\n *      instance has not been created. Use this property if the caller should\n *      \"do nothing\" if there are no testing hooks registered, such as when\n *      delivering an event to notify registered callbacks.\n * 2. The `getOrCreateInstance()` method, which creates the global singleton\n *      instance if it has not been created. Use this method if the instance is\n *      needed to, for example, register a callback.\n *\n * @internal\n */\nclass ci {\n    constructor() {\n        this.onExistenceFilterMismatchCallbacks = new Map;\n    }\n    /**\n     * Returns the singleton instance of this class, or null if it has not been\n     * initialized.\n     */    static get instance() {\n        return ai;\n    }\n    /**\n     * Returns the singleton instance of this class, creating it if is has never\n     * been created before.\n     */    static getOrCreateInstance() {\n        return null === ai && (ai = new ci), ai;\n    }\n    /**\n     * Registers a callback to be notified when an existence filter mismatch\n     * occurs in the Watch listen stream.\n     *\n     * The relative order in which callbacks are notified is unspecified; do not\n     * rely on any particular ordering. If a given callback is registered multiple\n     * times then it will be notified multiple times, once per registration.\n     *\n     * @param callback the callback to invoke upon existence filter mismatch.\n     *\n     * @return a function that, when called, unregisters the given callback; only\n     * the first invocation of the returned function does anything; all subsequent\n     * invocations do nothing.\n     */    onExistenceFilterMismatch(t) {\n        const e = Symbol();\n        return this.onExistenceFilterMismatchCallbacks.set(e, t), () => this.onExistenceFilterMismatchCallbacks.delete(e);\n    }\n    /**\n     * Invokes all currently-registered `onExistenceFilterMismatch` callbacks.\n     * @param info Information about the existence filter mismatch.\n     */    notifyOnExistenceFilterMismatch(t) {\n        this.onExistenceFilterMismatchCallbacks.forEach((e => e(t)));\n    }\n}\n\n/** The global singleton instance of `TestingHooks`. */ let ai = null;\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An instance of the Platform's 'TextEncoder' implementation.\n */ function hi() {\n    return new TextEncoder;\n}\n\n/**\n * An instance of the Platform's 'TextDecoder' implementation.\n */\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst li = new Integer([ 4294967295, 4294967295 ], 0);\n\n// Hash a string using md5 hashing algorithm.\nfunction fi(t) {\n    const e = hi().encode(t), n = new Md5;\n    return n.update(e), new Uint8Array(n.digest());\n}\n\n// Interpret the 16 bytes array as two 64-bit unsigned integers, encoded using\n// 2’s complement using little endian.\nfunction di(t) {\n    const e = new DataView(t.buffer), n = e.getUint32(0, /* littleEndian= */ !0), s = e.getUint32(4, /* littleEndian= */ !0), i = e.getUint32(8, /* littleEndian= */ !0), r = e.getUint32(12, /* littleEndian= */ !0);\n    return [ new Integer([ n, s ], 0), new Integer([ i, r ], 0) ];\n}\n\nclass wi {\n    constructor(t, e, n) {\n        if (this.bitmap = t, this.padding = e, this.hashCount = n, e < 0 || e >= 8) throw new _i(`Invalid padding: ${e}`);\n        if (n < 0) throw new _i(`Invalid hash count: ${n}`);\n        if (t.length > 0 && 0 === this.hashCount) \n        // Only empty bloom filter can have 0 hash count.\n        throw new _i(`Invalid hash count: ${n}`);\n        if (0 === t.length && 0 !== e) \n        // Empty bloom filter should have 0 padding.\n        throw new _i(`Invalid padding when bitmap length is 0: ${e}`);\n        this.It = 8 * t.length - e, \n        // Set the bit count in Integer to avoid repetition in mightContain().\n        this.Tt = Integer.fromNumber(this.It);\n    }\n    // Calculate the ith hash value based on the hashed 64bit integers,\n    // and calculate its corresponding bit index in the bitmap to be checked.\n    Et(t, e, n) {\n        // Calculate hashed value h(i) = h1 + (i * h2).\n        let s = t.add(e.multiply(Integer.fromNumber(n)));\n        // Wrap if hash value overflow 64bit.\n                return 1 === s.compare(li) && (s = new Integer([ s.getBits(0), s.getBits(1) ], 0)), \n        s.modulo(this.Tt).toNumber();\n    }\n    // Return whether the bit on the given index in the bitmap is set to 1.\n    At(t) {\n        return 0 != (this.bitmap[Math.floor(t / 8)] & 1 << t % 8);\n    }\n    vt(t) {\n        // Empty bitmap should always return false on membership check.\n        if (0 === this.It) return !1;\n        const e = fi(t), [n, s] = di(e);\n        for (let t = 0; t < this.hashCount; t++) {\n            const e = this.Et(n, s, t);\n            if (!this.At(e)) return !1;\n        }\n        return !0;\n    }\n    /** Create bloom filter for testing purposes only. */    static create(t, e, n) {\n        const s = t % 8 == 0 ? 0 : 8 - t % 8, i = new Uint8Array(Math.ceil(t / 8)), r = new wi(i, s, e);\n        return n.forEach((t => r.insert(t))), r;\n    }\n    insert(t) {\n        if (0 === this.It) return;\n        const e = fi(t), [n, s] = di(e);\n        for (let t = 0; t < this.hashCount; t++) {\n            const e = this.Et(n, s, t);\n            this.Rt(e);\n        }\n    }\n    Rt(t) {\n        const e = Math.floor(t / 8), n = t % 8;\n        this.bitmap[e] |= 1 << n;\n    }\n}\n\nclass _i extends Error {\n    constructor() {\n        super(...arguments), this.name = \"BloomFilterError\";\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An event from the RemoteStore. It is split into targetChanges (changes to the\n * state or the set of documents in our watched targets) and documentUpdates\n * (changes to the actual documents).\n */ class mi {\n    constructor(\n    /**\n     * The snapshot version this event brings us up to, or MIN if not set.\n     */\n    t, \n    /**\n     * A map from target to changes to the target. See TargetChange.\n     */\n    e, \n    /**\n     * A map of targets that is known to be inconsistent, and the purpose for\n     * re-listening. Listens for these targets should be re-established without\n     * resume tokens.\n     */\n    n, \n    /**\n     * A set of which documents have changed or been deleted, along with the\n     * doc's new values (if not deleted).\n     */\n    s, \n    /**\n     * A set of which document updates are due only to limbo resolution targets.\n     */\n    i) {\n        this.snapshotVersion = t, this.targetChanges = e, this.targetMismatches = n, this.documentUpdates = s, \n        this.resolvedLimboDocuments = i;\n    }\n    /**\n     * HACK: Views require RemoteEvents in order to determine whether the view is\n     * CURRENT, but secondary tabs don't receive remote events. So this method is\n     * used to create a synthesized RemoteEvent that can be used to apply a\n     * CURRENT status change to a View, for queries executed in a different tab.\n     */\n    // PORTING NOTE: Multi-tab only\n    static createSynthesizedRemoteEventForCurrentChange(t, e, n) {\n        const s = new Map;\n        return s.set(t, gi.createSynthesizedTargetChangeForCurrentChange(t, e, n)), new mi(rt.min(), s, new pe(et), cs(), gs());\n    }\n}\n\n/**\n * A TargetChange specifies the set of changes for a specific target as part of\n * a RemoteEvent. These changes track which documents are added, modified or\n * removed, as well as the target's resume token and whether the target is\n * marked CURRENT.\n * The actual changes *to* documents are not part of the TargetChange since\n * documents may be part of multiple targets.\n */ class gi {\n    constructor(\n    /**\n     * An opaque, server-assigned token that allows watching a query to be resumed\n     * after disconnecting without retransmitting all the data that matches the\n     * query. The resume token essentially identifies a point in time from which\n     * the server should resume sending results.\n     */\n    t, \n    /**\n     * The \"current\" (synced) status of this target. Note that \"current\"\n     * has special meaning in the RPC protocol that implies that a target is\n     * both up-to-date and consistent with the rest of the watch stream.\n     */\n    e, \n    /**\n     * The set of documents that were newly assigned to this target as part of\n     * this remote event.\n     */\n    n, \n    /**\n     * The set of documents that were already assigned to this target but received\n     * an update during this remote event.\n     */\n    s, \n    /**\n     * The set of documents that were removed from this target as part of this\n     * remote event.\n     */\n    i) {\n        this.resumeToken = t, this.current = e, this.addedDocuments = n, this.modifiedDocuments = s, \n        this.removedDocuments = i;\n    }\n    /**\n     * This method is used to create a synthesized TargetChanges that can be used to\n     * apply a CURRENT status change to a View (for queries executed in a different\n     * tab) or for new queries (to raise snapshots with correct CURRENT status).\n     */    static createSynthesizedTargetChangeForCurrentChange(t, e, n) {\n        return new gi(n, e, gs(), gs(), gs());\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a changed document and a list of target ids to which this change\n * applies.\n *\n * If document has been deleted NoDocument will be provided.\n */ class yi {\n    constructor(\n    /** The new document applies to all of these targets. */\n    t, \n    /** The new document is removed from all of these targets. */\n    e, \n    /** The key of the document for this change. */\n    n, \n    /**\n     * The new document or NoDocument if it was deleted. Is null if the\n     * document went out of view without the server sending a new document.\n     */\n    s) {\n        this.Pt = t, this.removedTargetIds = e, this.key = n, this.bt = s;\n    }\n}\n\nclass pi {\n    constructor(t, e) {\n        this.targetId = t, this.Vt = e;\n    }\n}\n\nclass Ii {\n    constructor(\n    /** What kind of change occurred to the watch target. */\n    t, \n    /** The target IDs that were added/removed/set. */\n    e, \n    /**\n     * An opaque, server-assigned token that allows watching a target to be\n     * resumed after disconnecting without retransmitting all the data that\n     * matches the target. The resume token essentially identifies a point in\n     * time from which the server should resume sending results.\n     */\n    n = Ve.EMPTY_BYTE_STRING\n    /** An RPC error indicating why the watch failed. */ , s = null) {\n        this.state = t, this.targetIds = e, this.resumeToken = n, this.cause = s;\n    }\n}\n\n/** Tracks the internal state of a Watch target. */ class Ti {\n    constructor() {\n        /**\n         * The number of pending responses (adds or removes) that we are waiting on.\n         * We only consider targets active that have no pending responses.\n         */\n        this.St = 0, \n        /**\n         * Keeps track of the document changes since the last raised snapshot.\n         *\n         * These changes are continuously updated as we receive document updates and\n         * always reflect the current set of changes against the last issued snapshot.\n         */\n        this.Dt = vi(), \n        /** See public getters for explanations of these fields. */\n        this.Ct = Ve.EMPTY_BYTE_STRING, this.xt = !1, \n        /**\n         * Whether this target state should be included in the next snapshot. We\n         * initialize to true so that newly-added targets are included in the next\n         * RemoteEvent.\n         */\n        this.Nt = !0;\n    }\n    /**\n     * Whether this target has been marked 'current'.\n     *\n     * 'Current' has special meaning in the RPC protocol: It implies that the\n     * Watch backend has sent us all changes up to the point at which the target\n     * was added and that the target is consistent with the rest of the watch\n     * stream.\n     */    get current() {\n        return this.xt;\n    }\n    /** The last resume token sent to us for this target. */    get resumeToken() {\n        return this.Ct;\n    }\n    /** Whether this target has pending target adds or target removes. */    get kt() {\n        return 0 !== this.St;\n    }\n    /** Whether we have modified any state that should trigger a snapshot. */    get Mt() {\n        return this.Nt;\n    }\n    /**\n     * Applies the resume token to the TargetChange, but only when it has a new\n     * value. Empty resumeTokens are discarded.\n     */    $t(t) {\n        t.approximateByteSize() > 0 && (this.Nt = !0, this.Ct = t);\n    }\n    /**\n     * Creates a target change from the current set of changes.\n     *\n     * To reset the document changes after raising this snapshot, call\n     * `clearPendingChanges()`.\n     */    Ot() {\n        let t = gs(), e = gs(), n = gs();\n        return this.Dt.forEach(((s, i) => {\n            switch (i) {\n              case 0 /* ChangeType.Added */ :\n                t = t.add(s);\n                break;\n\n              case 2 /* ChangeType.Modified */ :\n                e = e.add(s);\n                break;\n\n              case 1 /* ChangeType.Removed */ :\n                n = n.add(s);\n                break;\n\n              default:\n                O();\n            }\n        })), new gi(this.Ct, this.xt, t, e, n);\n    }\n    /**\n     * Resets the document changes and sets `hasPendingChanges` to false.\n     */    Ft() {\n        this.Nt = !1, this.Dt = vi();\n    }\n    Bt(t, e) {\n        this.Nt = !0, this.Dt = this.Dt.insert(t, e);\n    }\n    Lt(t) {\n        this.Nt = !0, this.Dt = this.Dt.remove(t);\n    }\n    qt() {\n        this.St += 1;\n    }\n    Ut() {\n        this.St -= 1;\n    }\n    Kt() {\n        this.Nt = !0, this.xt = !0;\n    }\n}\n\n/**\n * A helper class to accumulate watch changes into a RemoteEvent.\n */\nclass Ei {\n    constructor(t) {\n        this.Gt = t, \n        /** The internal state of all tracked targets. */\n        this.Qt = new Map, \n        /** Keeps track of the documents to update since the last raised snapshot. */\n        this.jt = cs(), \n        /** A mapping of document keys to their set of target IDs. */\n        this.zt = Ai(), \n        /**\n         * A map of targets with existence filter mismatches. These targets are\n         * known to be inconsistent and their listens needs to be re-established by\n         * RemoteStore.\n         */\n        this.Wt = new pe(et);\n    }\n    /**\n     * Processes and adds the DocumentWatchChange to the current set of changes.\n     */    Ht(t) {\n        for (const e of t.Pt) t.bt && t.bt.isFoundDocument() ? this.Jt(e, t.bt) : this.Yt(e, t.key, t.bt);\n        for (const e of t.removedTargetIds) this.Yt(e, t.key, t.bt);\n    }\n    /** Processes and adds the WatchTargetChange to the current set of changes. */    Xt(t) {\n        this.forEachTarget(t, (e => {\n            const n = this.Zt(e);\n            switch (t.state) {\n              case 0 /* WatchTargetChangeState.NoChange */ :\n                this.te(e) && n.$t(t.resumeToken);\n                break;\n\n              case 1 /* WatchTargetChangeState.Added */ :\n                // We need to decrement the number of pending acks needed from watch\n                // for this targetId.\n                n.Ut(), n.kt || \n                // We have a freshly added target, so we need to reset any state\n                // that we had previously. This can happen e.g. when remove and add\n                // back a target for existence filter mismatches.\n                n.Ft(), n.$t(t.resumeToken);\n                break;\n\n              case 2 /* WatchTargetChangeState.Removed */ :\n                // We need to keep track of removed targets to we can post-filter and\n                // remove any target changes.\n                // We need to decrement the number of pending acks needed from watch\n                // for this targetId.\n                n.Ut(), n.kt || this.removeTarget(e);\n                break;\n\n              case 3 /* WatchTargetChangeState.Current */ :\n                this.te(e) && (n.Kt(), n.$t(t.resumeToken));\n                break;\n\n              case 4 /* WatchTargetChangeState.Reset */ :\n                this.te(e) && (\n                // Reset the target and synthesizes removes for all existing\n                // documents. The backend will re-add any documents that still\n                // match the target before it sends the next global snapshot.\n                this.ee(e), n.$t(t.resumeToken));\n                break;\n\n              default:\n                O();\n            }\n        }));\n    }\n    /**\n     * Iterates over all targetIds that the watch change applies to: either the\n     * targetIds explicitly listed in the change or the targetIds of all currently\n     * active targets.\n     */    forEachTarget(t, e) {\n        t.targetIds.length > 0 ? t.targetIds.forEach(e) : this.Qt.forEach(((t, n) => {\n            this.te(n) && e(n);\n        }));\n    }\n    /**\n     * Handles existence filters and synthesizes deletes for filter mismatches.\n     * Targets that are invalidated by filter mismatches are added to\n     * `pendingTargetResets`.\n     */    ne(t) {\n        var e;\n        const n = t.targetId, s = t.Vt.count, i = this.se(n);\n        if (i) {\n            const r = i.target;\n            if (Fn(r)) if (0 === s) {\n                // The existence filter told us the document does not exist. We deduce\n                // that this document does not exist and apply a deleted document to\n                // our updates. Without applying this deleted document there might be\n                // another query that will raise this document as part of a snapshot\n                // until it is resolved, essentially exposing inconsistency between\n                // queries.\n                const t = new ht(r.path);\n                this.Yt(n, t, an.newNoDocument(t, rt.min()));\n            } else F(1 === s); else {\n                const i = this.ie(n);\n                // Existence filter mismatch. Mark the documents as being in limbo, and\n                // raise a snapshot with `isFromCache:true`.\n                                if (i !== s) {\n                    // Apply bloom filter to identify and mark removed documents.\n                    const s = this.re(t, i);\n                    if (0 /* BloomFilterApplicationStatus.Success */ !== s) {\n                        // If bloom filter application fails, we reset the mapping and\n                        // trigger re-run of the query.\n                        this.ee(n);\n                        const t = 2 /* BloomFilterApplicationStatus.FalsePositive */ === s ? \"TargetPurposeExistenceFilterMismatchBloom\" /* TargetPurpose.ExistenceFilterMismatchBloom */ : \"TargetPurposeExistenceFilterMismatch\" /* TargetPurpose.ExistenceFilterMismatch */;\n                        this.Wt = this.Wt.insert(n, t);\n                    }\n                    null === (e = ci.instance) || void 0 === e || e.notifyOnExistenceFilterMismatch(function(t, e, n) {\n                        var s, i, r, o, u, c;\n                        const a = {\n                            localCacheCount: e,\n                            existenceFilterCount: n.count\n                        }, h = n.unchangedNames;\n                        h && (a.bloomFilter = {\n                            applied: 0 /* BloomFilterApplicationStatus.Success */ === t,\n                            hashCount: null !== (s = null == h ? void 0 : h.hashCount) && void 0 !== s ? s : 0,\n                            bitmapLength: null !== (o = null === (r = null === (i = null == h ? void 0 : h.bits) || void 0 === i ? void 0 : i.bitmap) || void 0 === r ? void 0 : r.length) && void 0 !== o ? o : 0,\n                            padding: null !== (c = null === (u = null == h ? void 0 : h.bits) || void 0 === u ? void 0 : u.padding) && void 0 !== c ? c : 0\n                        });\n                        return a;\n                    }\n                    /**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ (s, i, t.Vt));\n                }\n            }\n        }\n    }\n    /**\n     * Apply bloom filter to remove the deleted documents, and return the\n     * application status.\n     */    re(t, e) {\n        const {unchangedNames: n, count: s} = t.Vt;\n        if (!n || !n.bits) return 1 /* BloomFilterApplicationStatus.Skipped */;\n        const {bits: {bitmap: i = \"\", padding: r = 0}, hashCount: o = 0} = n;\n        let u, c;\n        try {\n            u = xe(i).toUint8Array();\n        } catch (t) {\n            if (t instanceof Pe) return M(\"Decoding the base64 bloom filter in existence filter failed (\" + t.message + \"); ignoring the bloom filter and falling back to full re-query.\"), \n            1 /* BloomFilterApplicationStatus.Skipped */;\n            throw t;\n        }\n        try {\n            // BloomFilter throws error if the inputs are invalid.\n            c = new wi(u, r, o);\n        } catch (t) {\n            return M(t instanceof _i ? \"BloomFilter error: \" : \"Applying bloom filter failed: \", t), \n            1 /* BloomFilterApplicationStatus.Skipped */;\n        }\n        if (0 === c.It) return 1 /* BloomFilterApplicationStatus.Skipped */;\n        return s !== e - this.oe(t.targetId, c) ? 2 /* BloomFilterApplicationStatus.FalsePositive */ : 0 /* BloomFilterApplicationStatus.Success */;\n    }\n    /**\n     * Filter out removed documents based on bloom filter membership result and\n     * return number of documents removed.\n     */    oe(t, e) {\n        const n = this.Gt.getRemoteKeysForTarget(t);\n        let s = 0;\n        return n.forEach((n => {\n            const i = this.Gt.ue(), r = `projects/${i.projectId}/databases/${i.database}/documents/${n.path.canonicalString()}`;\n            e.vt(r) || (this.Yt(t, n, /*updatedDocument=*/ null), s++);\n        })), s;\n    }\n    /**\n     * Converts the currently accumulated state into a remote event at the\n     * provided snapshot version. Resets the accumulated changes before returning.\n     */    ce(t) {\n        const e = new Map;\n        this.Qt.forEach(((n, s) => {\n            const i = this.se(s);\n            if (i) {\n                if (n.current && Fn(i.target)) {\n                    // Document queries for document that don't exist can produce an empty\n                    // result set. To update our local cache, we synthesize a document\n                    // delete if we have not previously received the document. This\n                    // resolves the limbo state of the document, removing it from\n                    // limboDocumentRefs.\n                    // TODO(dimond): Ideally we would have an explicit lookup target\n                    // instead resulting in an explicit delete message and we could\n                    // remove this special logic.\n                    const e = new ht(i.target.path);\n                    null !== this.jt.get(e) || this.ae(s, e) || this.Yt(s, e, an.newNoDocument(e, t));\n                }\n                n.Mt && (e.set(s, n.Ot()), n.Ft());\n            }\n        }));\n        let n = gs();\n        // We extract the set of limbo-only document updates as the GC logic\n        // special-cases documents that do not appear in the target cache.\n        \n        // TODO(gsoltis): Expand on this comment once GC is available in the JS\n        // client.\n                this.zt.forEach(((t, e) => {\n            let s = !0;\n            e.forEachWhile((t => {\n                const e = this.se(t);\n                return !e || \"TargetPurposeLimboResolution\" /* TargetPurpose.LimboResolution */ === e.purpose || (s = !1, \n                !1);\n            })), s && (n = n.add(t));\n        })), this.jt.forEach(((e, n) => n.setReadTime(t)));\n        const s = new mi(t, e, this.Wt, this.jt, n);\n        return this.jt = cs(), this.zt = Ai(), this.Wt = new pe(et), s;\n    }\n    /**\n     * Adds the provided document to the internal list of document updates and\n     * its document key to the given target's mapping.\n     */\n    // Visible for testing.\n    Jt(t, e) {\n        if (!this.te(t)) return;\n        const n = this.ae(t, e.key) ? 2 /* ChangeType.Modified */ : 0 /* ChangeType.Added */;\n        this.Zt(t).Bt(e.key, n), this.jt = this.jt.insert(e.key, e), this.zt = this.zt.insert(e.key, this.he(e.key).add(t));\n    }\n    /**\n     * Removes the provided document from the target mapping. If the\n     * document no longer matches the target, but the document's state is still\n     * known (e.g. we know that the document was deleted or we received the change\n     * that caused the filter mismatch), the new document can be provided\n     * to update the remote document cache.\n     */\n    // Visible for testing.\n    Yt(t, e, n) {\n        if (!this.te(t)) return;\n        const s = this.Zt(t);\n        this.ae(t, e) ? s.Bt(e, 1 /* ChangeType.Removed */) : \n        // The document may have entered and left the target before we raised a\n        // snapshot, so we can just ignore the change.\n        s.Lt(e), this.zt = this.zt.insert(e, this.he(e).delete(t)), n && (this.jt = this.jt.insert(e, n));\n    }\n    removeTarget(t) {\n        this.Qt.delete(t);\n    }\n    /**\n     * Returns the current count of documents in the target. This includes both\n     * the number of documents that the LocalStore considers to be part of the\n     * target as well as any accumulated changes.\n     */    ie(t) {\n        const e = this.Zt(t).Ot();\n        return this.Gt.getRemoteKeysForTarget(t).size + e.addedDocuments.size - e.removedDocuments.size;\n    }\n    /**\n     * Increment the number of acks needed from watch before we can consider the\n     * server to be 'in-sync' with the client's active targets.\n     */    qt(t) {\n        this.Zt(t).qt();\n    }\n    Zt(t) {\n        let e = this.Qt.get(t);\n        return e || (e = new Ti, this.Qt.set(t, e)), e;\n    }\n    he(t) {\n        let e = this.zt.get(t);\n        return e || (e = new Ee(et), this.zt = this.zt.insert(t, e)), e;\n    }\n    /**\n     * Verifies that the user is still interested in this target (by calling\n     * `getTargetDataForTarget()`) and that we are not waiting for pending ADDs\n     * from watch.\n     */    te(t) {\n        const e = null !== this.se(t);\n        return e || N(\"WatchChangeAggregator\", \"Detected inactive target\", t), e;\n    }\n    /**\n     * Returns the TargetData for an active target (i.e. a target that the user\n     * is still interested in that has no outstanding target change requests).\n     */    se(t) {\n        const e = this.Qt.get(t);\n        return e && e.kt ? null : this.Gt.le(t);\n    }\n    /**\n     * Resets the state of a Watch target to its initial state (e.g. sets\n     * 'current' to false, clears the resume token and removes its target mapping\n     * from all documents).\n     */    ee(t) {\n        this.Qt.set(t, new Ti);\n        this.Gt.getRemoteKeysForTarget(t).forEach((e => {\n            this.Yt(t, e, /*updatedDocument=*/ null);\n        }));\n    }\n    /**\n     * Returns whether the LocalStore considers the document to be part of the\n     * specified target.\n     */    ae(t, e) {\n        return this.Gt.getRemoteKeysForTarget(t).has(e);\n    }\n}\n\nfunction Ai() {\n    return new pe(ht.comparator);\n}\n\nfunction vi() {\n    return new pe(ht.comparator);\n}\n\nconst Ri = (() => {\n    const t = {\n        asc: \"ASCENDING\",\n        desc: \"DESCENDING\"\n    };\n    return t;\n})(), Pi = (() => {\n    const t = {\n        \"<\": \"LESS_THAN\",\n        \"<=\": \"LESS_THAN_OR_EQUAL\",\n        \">\": \"GREATER_THAN\",\n        \">=\": \"GREATER_THAN_OR_EQUAL\",\n        \"==\": \"EQUAL\",\n        \"!=\": \"NOT_EQUAL\",\n        \"array-contains\": \"ARRAY_CONTAINS\",\n        in: \"IN\",\n        \"not-in\": \"NOT_IN\",\n        \"array-contains-any\": \"ARRAY_CONTAINS_ANY\"\n    };\n    return t;\n})(), bi = (() => {\n    const t = {\n        and: \"AND\",\n        or: \"OR\"\n    };\n    return t;\n})();\n\n/**\n * This class generates JsonObject values for the Datastore API suitable for\n * sending to either GRPC stub methods or via the JSON/HTTP REST API.\n *\n * The serializer supports both Protobuf.js and Proto3 JSON formats. By\n * setting `useProto3Json` to true, the serializer will use the Proto3 JSON\n * format.\n *\n * For a description of the Proto3 JSON format check\n * https://developers.google.com/protocol-buffers/docs/proto3#json\n *\n * TODO(klimt): We can remove the databaseId argument if we keep the full\n * resource name in documents.\n */\nclass Vi {\n    constructor(t, e) {\n        this.databaseId = t, this.useProto3Json = e;\n    }\n}\n\n/**\n * Returns a value for a number (or null) that's appropriate to put into\n * a google.protobuf.Int32Value proto.\n * DO NOT USE THIS FOR ANYTHING ELSE.\n * This method cheats. It's typed as returning \"number\" because that's what\n * our generated proto interfaces say Int32Value must be. But GRPC actually\n * expects a { value: <number> } struct.\n */\nfunction Si(t, e) {\n    return t.useProto3Json || Ft(e) ? e : {\n        value: e\n    };\n}\n\n/**\n * Returns a number (or null) from a google.protobuf.Int32Value proto.\n */\n/**\n * Returns a value for a Date that's appropriate to put into a proto.\n */\nfunction Di(t, e) {\n    if (t.useProto3Json) {\n        return `${new Date(1e3 * e.seconds).toISOString().replace(/\\.\\d*/, \"\").replace(\"Z\", \"\")}.${(\"000000000\" + e.nanoseconds).slice(-9)}Z`;\n    }\n    return {\n        seconds: \"\" + e.seconds,\n        nanos: e.nanoseconds\n    };\n}\n\n/**\n * Returns a value for bytes that's appropriate to put in a proto.\n *\n * Visible for testing.\n */\nfunction Ci(t, e) {\n    return t.useProto3Json ? e.toBase64() : e.toUint8Array();\n}\n\n/**\n * Returns a ByteString based on the proto string value.\n */ function xi(t, e) {\n    return Di(t, e.toTimestamp());\n}\n\nfunction Ni(t) {\n    return F(!!t), rt.fromTimestamp(function(t) {\n        const e = De(t);\n        return new it(e.seconds, e.nanos);\n    }(t));\n}\n\nfunction ki(t, e) {\n    return function(t) {\n        return new ut([ \"projects\", t.projectId, \"databases\", t.database ]);\n    }(t).child(\"documents\").child(e).canonicalString();\n}\n\nfunction Mi(t) {\n    const e = ut.fromString(t);\n    return F(ur(e)), e;\n}\n\nfunction $i(t, e) {\n    return ki(t.databaseId, e.path);\n}\n\nfunction Oi(t, e) {\n    const n = Mi(e);\n    if (n.get(1) !== t.databaseId.projectId) throw new U(q.INVALID_ARGUMENT, \"Tried to deserialize key from different project: \" + n.get(1) + \" vs \" + t.databaseId.projectId);\n    if (n.get(3) !== t.databaseId.database) throw new U(q.INVALID_ARGUMENT, \"Tried to deserialize key from different database: \" + n.get(3) + \" vs \" + t.databaseId.database);\n    return new ht(qi(n));\n}\n\nfunction Fi(t, e) {\n    return ki(t.databaseId, e);\n}\n\nfunction Bi(t) {\n    const e = Mi(t);\n    // In v1beta1 queries for collections at the root did not have a trailing\n    // \"/documents\". In v1 all resource paths contain \"/documents\". Preserve the\n    // ability to read the v1beta1 form for compatibility with queries persisted\n    // in the local target cache.\n        return 4 === e.length ? ut.emptyPath() : qi(e);\n}\n\nfunction Li(t) {\n    return new ut([ \"projects\", t.databaseId.projectId, \"databases\", t.databaseId.database ]).canonicalString();\n}\n\nfunction qi(t) {\n    return F(t.length > 4 && \"documents\" === t.get(4)), t.popFirst(5);\n}\n\n/** Creates a Document proto from key and fields (but no create/update time) */ function Ui(t, e, n) {\n    return {\n        name: $i(t, e),\n        fields: n.value.mapValue.fields\n    };\n}\n\nfunction Ki(t, e, n) {\n    const s = Oi(t, e.name), i = Ni(e.updateTime), r = e.createTime ? Ni(e.createTime) : rt.min(), o = new un({\n        mapValue: {\n            fields: e.fields\n        }\n    }), u = an.newFoundDocument(s, i, r, o);\n    return n && u.setHasCommittedMutations(), n ? u.setHasCommittedMutations() : u;\n}\n\nfunction Gi(t, e) {\n    return \"found\" in e ? function(t, e) {\n        F(!!e.found), e.found.name, e.found.updateTime;\n        const n = Oi(t, e.found.name), s = Ni(e.found.updateTime), i = e.found.createTime ? Ni(e.found.createTime) : rt.min(), r = new un({\n            mapValue: {\n                fields: e.found.fields\n            }\n        });\n        return an.newFoundDocument(n, s, i, r);\n    }(t, e) : \"missing\" in e ? function(t, e) {\n        F(!!e.missing), F(!!e.readTime);\n        const n = Oi(t, e.missing), s = Ni(e.readTime);\n        return an.newNoDocument(n, s);\n    }(t, e) : O();\n}\n\nfunction Qi(t, e) {\n    let n;\n    if (\"targetChange\" in e) {\n        e.targetChange;\n        // proto3 default value is unset in JSON (undefined), so use 'NO_CHANGE'\n        // if unset\n        const s = function(t) {\n            return \"NO_CHANGE\" === t ? 0 /* WatchTargetChangeState.NoChange */ : \"ADD\" === t ? 1 /* WatchTargetChangeState.Added */ : \"REMOVE\" === t ? 2 /* WatchTargetChangeState.Removed */ : \"CURRENT\" === t ? 3 /* WatchTargetChangeState.Current */ : \"RESET\" === t ? 4 /* WatchTargetChangeState.Reset */ : O();\n        }(e.targetChange.targetChangeType || \"NO_CHANGE\"), i = e.targetChange.targetIds || [], r = function(t, e) {\n            return t.useProto3Json ? (F(void 0 === e || \"string\" == typeof e), Ve.fromBase64String(e || \"\")) : (F(void 0 === e || e instanceof Uint8Array), \n            Ve.fromUint8Array(e || new Uint8Array));\n        }(t, e.targetChange.resumeToken), o = e.targetChange.cause, u = o && function(t) {\n            const e = void 0 === t.code ? q.UNKNOWN : ui(t.code);\n            return new U(e, t.message || \"\");\n        }(o);\n        n = new Ii(s, i, r, u || null);\n    } else if (\"documentChange\" in e) {\n        e.documentChange;\n        const s = e.documentChange;\n        s.document, s.document.name, s.document.updateTime;\n        const i = Oi(t, s.document.name), r = Ni(s.document.updateTime), o = s.document.createTime ? Ni(s.document.createTime) : rt.min(), u = new un({\n            mapValue: {\n                fields: s.document.fields\n            }\n        }), c = an.newFoundDocument(i, r, o, u), a = s.targetIds || [], h = s.removedTargetIds || [];\n        n = new yi(a, h, c.key, c);\n    } else if (\"documentDelete\" in e) {\n        e.documentDelete;\n        const s = e.documentDelete;\n        s.document;\n        const i = Oi(t, s.document), r = s.readTime ? Ni(s.readTime) : rt.min(), o = an.newNoDocument(i, r), u = s.removedTargetIds || [];\n        n = new yi([], u, o.key, o);\n    } else if (\"documentRemove\" in e) {\n        e.documentRemove;\n        const s = e.documentRemove;\n        s.document;\n        const i = Oi(t, s.document), r = s.removedTargetIds || [];\n        n = new yi([], r, i, null);\n    } else {\n        if (!(\"filter\" in e)) return O();\n        {\n            e.filter;\n            const t = e.filter;\n            t.targetId;\n            const {count: s = 0, unchangedNames: i} = t, r = new si(s, i), o = t.targetId;\n            n = new pi(o, r);\n        }\n    }\n    return n;\n}\n\nfunction ji(t, e) {\n    let n;\n    if (e instanceof js) n = {\n        update: Ui(t, e.key, e.value)\n    }; else if (e instanceof Ys) n = {\n        delete: $i(t, e.key)\n    }; else if (e instanceof zs) n = {\n        update: Ui(t, e.key, e.data),\n        updateMask: or(e.fieldMask)\n    }; else {\n        if (!(e instanceof Xs)) return O();\n        n = {\n            verify: $i(t, e.key)\n        };\n    }\n    return e.fieldTransforms.length > 0 && (n.updateTransforms = e.fieldTransforms.map((t => function(t, e) {\n        const n = e.transform;\n        if (n instanceof bs) return {\n            fieldPath: e.field.canonicalString(),\n            setToServerValue: \"REQUEST_TIME\"\n        };\n        if (n instanceof Vs) return {\n            fieldPath: e.field.canonicalString(),\n            appendMissingElements: {\n                values: n.elements\n            }\n        };\n        if (n instanceof Ds) return {\n            fieldPath: e.field.canonicalString(),\n            removeAllFromArray: {\n                values: n.elements\n            }\n        };\n        if (n instanceof xs) return {\n            fieldPath: e.field.canonicalString(),\n            increment: n.gt\n        };\n        throw O();\n    }(0, t)))), e.precondition.isNone || (n.currentDocument = function(t, e) {\n        return void 0 !== e.updateTime ? {\n            updateTime: xi(t, e.updateTime)\n        } : void 0 !== e.exists ? {\n            exists: e.exists\n        } : O();\n    }(t, e.precondition)), n;\n}\n\nfunction zi(t, e) {\n    const n = e.currentDocument ? function(t) {\n        return void 0 !== t.updateTime ? Fs.updateTime(Ni(t.updateTime)) : void 0 !== t.exists ? Fs.exists(t.exists) : Fs.none();\n    }(e.currentDocument) : Fs.none(), s = e.updateTransforms ? e.updateTransforms.map((e => function(t, e) {\n        let n = null;\n        if (\"setToServerValue\" in e) F(\"REQUEST_TIME\" === e.setToServerValue), n = new bs; else if (\"appendMissingElements\" in e) {\n            const t = e.appendMissingElements.values || [];\n            n = new Vs(t);\n        } else if (\"removeAllFromArray\" in e) {\n            const t = e.removeAllFromArray.values || [];\n            n = new Ds(t);\n        } else \"increment\" in e ? n = new xs(t, e.increment) : O();\n        const s = at.fromServerFormat(e.fieldPath);\n        return new Ms(s, n);\n    }(t, e))) : [];\n    if (e.update) {\n        e.update.name;\n        const i = Oi(t, e.update.name), r = new un({\n            mapValue: {\n                fields: e.update.fields\n            }\n        });\n        if (e.updateMask) {\n            const t = function(t) {\n                const e = t.fieldPaths || [];\n                return new Re(e.map((t => at.fromServerFormat(t))));\n            }(e.updateMask);\n            return new zs(i, r, t, n, s);\n        }\n        return new js(i, r, n, s);\n    }\n    if (e.delete) {\n        const s = Oi(t, e.delete);\n        return new Ys(s, n);\n    }\n    if (e.verify) {\n        const s = Oi(t, e.verify);\n        return new Xs(s, n);\n    }\n    return O();\n}\n\nfunction Wi(t, e) {\n    return t && t.length > 0 ? (F(void 0 !== e), t.map((t => function(t, e) {\n        // NOTE: Deletes don't have an updateTime.\n        let n = t.updateTime ? Ni(t.updateTime) : Ni(e);\n        return n.isEqual(rt.min()) && (\n        // The Firestore Emulator currently returns an update time of 0 for\n        // deletes of non-existing documents (rather than null). This breaks the\n        // test \"get deleted doc while offline with source=cache\" as NoDocuments\n        // with version 0 are filtered by IndexedDb's RemoteDocumentCache.\n        // TODO(#2149): Remove this when Emulator is fixed\n        n = Ni(e)), new Os(n, t.transformResults || []);\n    }(t, e)))) : [];\n}\n\nfunction Hi(t, e) {\n    return {\n        documents: [ Fi(t, e.path) ]\n    };\n}\n\nfunction Ji(t, e) {\n    // Dissect the path into parent, collectionId, and optional key filter.\n    const n = {\n        structuredQuery: {}\n    }, s = e.path;\n    null !== e.collectionGroup ? (n.parent = Fi(t, s), n.structuredQuery.from = [ {\n        collectionId: e.collectionGroup,\n        allDescendants: !0\n    } ]) : (n.parent = Fi(t, s.popLast()), n.structuredQuery.from = [ {\n        collectionId: s.lastSegment()\n    } ]);\n    const i = function(t) {\n        if (0 === t.length) return;\n        return rr(gn.create(t, \"and\" /* CompositeOperator.AND */));\n    }(e.filters);\n    i && (n.structuredQuery.where = i);\n    const r = function(t) {\n        if (0 === t.length) return;\n        return t.map((t => \n        // visible for testing\n        function(t) {\n            return {\n                field: sr(t.field),\n                direction: tr(t.dir)\n            };\n        }(t)));\n    }(e.orderBy);\n    r && (n.structuredQuery.orderBy = r);\n    const o = Si(t, e.limit);\n    var u;\n    return null !== o && (n.structuredQuery.limit = o), e.startAt && (n.structuredQuery.startAt = {\n        before: (u = e.startAt).inclusive,\n        values: u.position\n    }), e.endAt && (n.structuredQuery.endAt = function(t) {\n        return {\n            before: !t.inclusive,\n            values: t.position\n        };\n    }(e.endAt)), n;\n}\n\nfunction Yi(t) {\n    let e = Bi(t.parent);\n    const n = t.structuredQuery, s = n.from ? n.from.length : 0;\n    let i = null;\n    if (s > 0) {\n        F(1 === s);\n        const t = n.from[0];\n        t.allDescendants ? i = t.collectionId : e = e.child(t.collectionId);\n    }\n    let r = [];\n    n.where && (r = function(t) {\n        const e = Zi(t);\n        if (e instanceof gn && In(e)) return e.getFilters();\n        return [ e ];\n    }(n.where));\n    let o = [];\n    n.orderBy && (o = n.orderBy.map((t => function(t) {\n        return new dn(ir(t.field), \n        // visible for testing\n        function(t) {\n            switch (t) {\n              case \"ASCENDING\":\n                return \"asc\" /* Direction.ASCENDING */;\n\n              case \"DESCENDING\":\n                return \"desc\" /* Direction.DESCENDING */;\n\n              default:\n                return;\n            }\n        }\n        // visible for testing\n        (t.direction));\n    }\n    // visible for testing\n    (t))));\n    let u = null;\n    n.limit && (u = function(t) {\n        let e;\n        return e = \"object\" == typeof t ? t.value : t, Ft(e) ? null : e;\n    }(n.limit));\n    let c = null;\n    n.startAt && (c = function(t) {\n        const e = !!t.before, n = t.values || [];\n        return new hn(n, e);\n    }(n.startAt));\n    let a = null;\n    return n.endAt && (a = function(t) {\n        const e = !t.before, n = t.values || [];\n        return new hn(n, e);\n    }\n    // visible for testing\n    (n.endAt)), Kn(e, i, o, r, u, \"F\" /* LimitType.First */ , c, a);\n}\n\nfunction Xi(t, e) {\n    const n = function(t) {\n        switch (t) {\n          case \"TargetPurposeListen\" /* TargetPurpose.Listen */ :\n            return null;\n\n          case \"TargetPurposeExistenceFilterMismatch\" /* TargetPurpose.ExistenceFilterMismatch */ :\n            return \"existence-filter-mismatch\";\n\n          case \"TargetPurposeExistenceFilterMismatchBloom\" /* TargetPurpose.ExistenceFilterMismatchBloom */ :\n            return \"existence-filter-mismatch-bloom\";\n\n          case \"TargetPurposeLimboResolution\" /* TargetPurpose.LimboResolution */ :\n            return \"limbo-document\";\n\n          default:\n            return O();\n        }\n    }(e.purpose);\n    return null == n ? null : {\n        \"goog-listen-tags\": n\n    };\n}\n\nfunction Zi(t) {\n    return void 0 !== t.unaryFilter ? function(t) {\n        switch (t.unaryFilter.op) {\n          case \"IS_NAN\":\n            const e = ir(t.unaryFilter.field);\n            return mn.create(e, \"==\" /* Operator.EQUAL */ , {\n                doubleValue: NaN\n            });\n\n          case \"IS_NULL\":\n            const n = ir(t.unaryFilter.field);\n            return mn.create(n, \"==\" /* Operator.EQUAL */ , {\n                nullValue: \"NULL_VALUE\"\n            });\n\n          case \"IS_NOT_NAN\":\n            const s = ir(t.unaryFilter.field);\n            return mn.create(s, \"!=\" /* Operator.NOT_EQUAL */ , {\n                doubleValue: NaN\n            });\n\n          case \"IS_NOT_NULL\":\n            const i = ir(t.unaryFilter.field);\n            return mn.create(i, \"!=\" /* Operator.NOT_EQUAL */ , {\n                nullValue: \"NULL_VALUE\"\n            });\n\n          default:\n            return O();\n        }\n    }(t) : void 0 !== t.fieldFilter ? function(t) {\n        return mn.create(ir(t.fieldFilter.field), function(t) {\n            switch (t) {\n              case \"EQUAL\":\n                return \"==\" /* Operator.EQUAL */;\n\n              case \"NOT_EQUAL\":\n                return \"!=\" /* Operator.NOT_EQUAL */;\n\n              case \"GREATER_THAN\":\n                return \">\" /* Operator.GREATER_THAN */;\n\n              case \"GREATER_THAN_OR_EQUAL\":\n                return \">=\" /* Operator.GREATER_THAN_OR_EQUAL */;\n\n              case \"LESS_THAN\":\n                return \"<\" /* Operator.LESS_THAN */;\n\n              case \"LESS_THAN_OR_EQUAL\":\n                return \"<=\" /* Operator.LESS_THAN_OR_EQUAL */;\n\n              case \"ARRAY_CONTAINS\":\n                return \"array-contains\" /* Operator.ARRAY_CONTAINS */;\n\n              case \"IN\":\n                return \"in\" /* Operator.IN */;\n\n              case \"NOT_IN\":\n                return \"not-in\" /* Operator.NOT_IN */;\n\n              case \"ARRAY_CONTAINS_ANY\":\n                return \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */;\n\n              default:\n                return O();\n            }\n        }(t.fieldFilter.op), t.fieldFilter.value);\n    }(t) : void 0 !== t.compositeFilter ? function(t) {\n        return gn.create(t.compositeFilter.filters.map((t => Zi(t))), function(t) {\n            switch (t) {\n              case \"AND\":\n                return \"and\" /* CompositeOperator.AND */;\n\n              case \"OR\":\n                return \"or\" /* CompositeOperator.OR */;\n\n              default:\n                return O();\n            }\n        }(t.compositeFilter.op));\n    }(t) : O();\n}\n\nfunction tr(t) {\n    return Ri[t];\n}\n\nfunction er(t) {\n    return Pi[t];\n}\n\nfunction nr(t) {\n    return bi[t];\n}\n\nfunction sr(t) {\n    return {\n        fieldPath: t.canonicalString()\n    };\n}\n\nfunction ir(t) {\n    return at.fromServerFormat(t.fieldPath);\n}\n\nfunction rr(t) {\n    return t instanceof mn ? function(t) {\n        if (\"==\" /* Operator.EQUAL */ === t.op) {\n            if (Xe(t.value)) return {\n                unaryFilter: {\n                    field: sr(t.field),\n                    op: \"IS_NAN\"\n                }\n            };\n            if (Ye(t.value)) return {\n                unaryFilter: {\n                    field: sr(t.field),\n                    op: \"IS_NULL\"\n                }\n            };\n        } else if (\"!=\" /* Operator.NOT_EQUAL */ === t.op) {\n            if (Xe(t.value)) return {\n                unaryFilter: {\n                    field: sr(t.field),\n                    op: \"IS_NOT_NAN\"\n                }\n            };\n            if (Ye(t.value)) return {\n                unaryFilter: {\n                    field: sr(t.field),\n                    op: \"IS_NOT_NULL\"\n                }\n            };\n        }\n        return {\n            fieldFilter: {\n                field: sr(t.field),\n                op: er(t.op),\n                value: t.value\n            }\n        };\n    }(t) : t instanceof gn ? function(t) {\n        const e = t.getFilters().map((t => rr(t)));\n        if (1 === e.length) return e[0];\n        return {\n            compositeFilter: {\n                op: nr(t.op),\n                filters: e\n            }\n        };\n    }(t) : O();\n}\n\nfunction or(t) {\n    const e = [];\n    return t.fields.forEach((t => e.push(t.canonicalString()))), {\n        fieldPaths: e\n    };\n}\n\nfunction ur(t) {\n    // Resource names have at least 4 components (project ID, database ID)\n    return t.length >= 4 && \"projects\" === t.get(0) && \"databases\" === t.get(2);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An immutable set of metadata that the local store tracks for each target.\n */ class cr {\n    constructor(\n    /** The target being listened to. */\n    t, \n    /**\n     * The target ID to which the target corresponds; Assigned by the\n     * LocalStore for user listens and by the SyncEngine for limbo watches.\n     */\n    e, \n    /** The purpose of the target. */\n    n, \n    /**\n     * The sequence number of the last transaction during which this target data\n     * was modified.\n     */\n    s, \n    /** The latest snapshot version seen for this target. */\n    i = rt.min()\n    /**\n     * The maximum snapshot version at which the associated view\n     * contained no limbo documents.\n     */ , r = rt.min()\n    /**\n     * An opaque, server-assigned token that allows watching a target to be\n     * resumed after disconnecting without retransmitting all the data that\n     * matches the target. The resume token essentially identifies a point in\n     * time from which the server should resume sending results.\n     */ , o = Ve.EMPTY_BYTE_STRING\n    /**\n     * The number of documents that last matched the query at the resume token or\n     * read time. Documents are counted only when making a listen request with\n     * resume token or read time, otherwise, keep it null.\n     */ , u = null) {\n        this.target = t, this.targetId = e, this.purpose = n, this.sequenceNumber = s, this.snapshotVersion = i, \n        this.lastLimboFreeSnapshotVersion = r, this.resumeToken = o, this.expectedCount = u;\n    }\n    /** Creates a new target data instance with an updated sequence number. */    withSequenceNumber(t) {\n        return new cr(this.target, this.targetId, this.purpose, t, this.snapshotVersion, this.lastLimboFreeSnapshotVersion, this.resumeToken, this.expectedCount);\n    }\n    /**\n     * Creates a new target data instance with an updated resume token and\n     * snapshot version.\n     */    withResumeToken(t, e) {\n        return new cr(this.target, this.targetId, this.purpose, this.sequenceNumber, e, this.lastLimboFreeSnapshotVersion, t, \n        /* expectedCount= */ null);\n    }\n    /**\n     * Creates a new target data instance with an updated expected count.\n     */    withExpectedCount(t) {\n        return new cr(this.target, this.targetId, this.purpose, this.sequenceNumber, this.snapshotVersion, this.lastLimboFreeSnapshotVersion, this.resumeToken, t);\n    }\n    /**\n     * Creates a new target data instance with an updated last limbo free\n     * snapshot version number.\n     */    withLastLimboFreeSnapshotVersion(t) {\n        return new cr(this.target, this.targetId, this.purpose, this.sequenceNumber, this.snapshotVersion, t, this.resumeToken, this.expectedCount);\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Serializer for values stored in the LocalStore. */ class ar {\n    constructor(t) {\n        this.fe = t;\n    }\n}\n\n/** Decodes a remote document from storage locally to a Document. */ function hr(t, e) {\n    let n;\n    if (e.document) n = Ki(t.fe, e.document, !!e.hasCommittedMutations); else if (e.noDocument) {\n        const t = ht.fromSegments(e.noDocument.path), s = wr(e.noDocument.readTime);\n        n = an.newNoDocument(t, s), e.hasCommittedMutations && n.setHasCommittedMutations();\n    } else {\n        if (!e.unknownDocument) return O();\n        {\n            const t = ht.fromSegments(e.unknownDocument.path), s = wr(e.unknownDocument.version);\n            n = an.newUnknownDocument(t, s);\n        }\n    }\n    return e.readTime && n.setReadTime(function(t) {\n        const e = new it(t[0], t[1]);\n        return rt.fromTimestamp(e);\n    }(e.readTime)), n;\n}\n\n/** Encodes a document for storage locally. */ function lr(t, e) {\n    const n = e.key, s = {\n        prefixPath: n.getCollectionPath().popLast().toArray(),\n        collectionGroup: n.collectionGroup,\n        documentId: n.path.lastSegment(),\n        readTime: fr(e.readTime),\n        hasCommittedMutations: e.hasCommittedMutations\n    };\n    if (e.isFoundDocument()) s.document = function(t, e) {\n        return {\n            name: $i(t, e.key),\n            fields: e.data.value.mapValue.fields,\n            updateTime: Di(t, e.version.toTimestamp()),\n            createTime: Di(t, e.createTime.toTimestamp())\n        };\n    }(t.fe, e); else if (e.isNoDocument()) s.noDocument = {\n        path: n.path.toArray(),\n        readTime: dr(e.version)\n    }; else {\n        if (!e.isUnknownDocument()) return O();\n        s.unknownDocument = {\n            path: n.path.toArray(),\n            version: dr(e.version)\n        };\n    }\n    return s;\n}\n\nfunction fr(t) {\n    const e = t.toTimestamp();\n    return [ e.seconds, e.nanoseconds ];\n}\n\nfunction dr(t) {\n    const e = t.toTimestamp();\n    return {\n        seconds: e.seconds,\n        nanoseconds: e.nanoseconds\n    };\n}\n\nfunction wr(t) {\n    const e = new it(t.seconds, t.nanoseconds);\n    return rt.fromTimestamp(e);\n}\n\n/** Encodes a batch of mutations into a DbMutationBatch for local storage. */\n/** Decodes a DbMutationBatch into a MutationBatch */\nfunction _r(t, e) {\n    const n = (e.baseMutations || []).map((e => zi(t.fe, e)));\n    // Squash old transform mutations into existing patch or set mutations.\n    // The replacement of representing `transforms` with `update_transforms`\n    // on the SDK means that old `transform` mutations stored in IndexedDB need\n    // to be updated to `update_transforms`.\n    // TODO(b/174608374): Remove this code once we perform a schema migration.\n        for (let t = 0; t < e.mutations.length - 1; ++t) {\n        const n = e.mutations[t];\n        if (t + 1 < e.mutations.length && void 0 !== e.mutations[t + 1].transform) {\n            const s = e.mutations[t + 1];\n            n.updateTransforms = s.transform.fieldTransforms, e.mutations.splice(t + 1, 1), \n            ++t;\n        }\n    }\n    const s = e.mutations.map((e => zi(t.fe, e))), i = it.fromMillis(e.localWriteTimeMs);\n    return new Zs(e.batchId, i, n, s);\n}\n\n/** Decodes a DbTarget into TargetData */ function mr(t) {\n    const e = wr(t.readTime), n = void 0 !== t.lastLimboFreeSnapshotVersion ? wr(t.lastLimboFreeSnapshotVersion) : rt.min();\n    let s;\n    var i;\n    return void 0 !== t.query.documents ? (F(1 === (i = t.query).documents.length), \n    s = Jn(Gn(Bi(i.documents[0])))) : s = function(t) {\n        return Jn(Yi(t));\n    }(t.query), new cr(s, t.targetId, \"TargetPurposeListen\" /* TargetPurpose.Listen */ , t.lastListenSequenceNumber, e, n, Ve.fromBase64String(t.resumeToken));\n}\n\n/** Encodes TargetData into a DbTarget for storage locally. */ function gr(t, e) {\n    const n = dr(e.snapshotVersion), s = dr(e.lastLimboFreeSnapshotVersion);\n    let i;\n    i = Fn(e.target) ? Hi(t.fe, e.target) : Ji(t.fe, e.target);\n    // We can't store the resumeToken as a ByteString in IndexedDb, so we\n    // convert it to a base64 string for storage.\n        const r = e.resumeToken.toBase64();\n    // lastListenSequenceNumber is always 0 until we do real GC.\n        return {\n        targetId: e.targetId,\n        canonicalId: $n(e.target),\n        readTime: n,\n        resumeToken: r,\n        lastListenSequenceNumber: e.sequenceNumber,\n        lastLimboFreeSnapshotVersion: s,\n        query: i\n    };\n}\n\n/**\n * A helper function for figuring out what kind of query has been stored.\n */\n/**\n * Encodes a `BundledQuery` from bundle proto to a Query object.\n *\n * This reconstructs the original query used to build the bundle being loaded,\n * including features exists only in SDKs (for example: limit-to-last).\n */\nfunction yr(t) {\n    const e = Yi({\n        parent: t.parent,\n        structuredQuery: t.structuredQuery\n    });\n    return \"LAST\" === t.limitType ? Xn(e, e.limit, \"L\" /* LimitType.Last */) : e;\n}\n\n/** Encodes a NamedQuery proto object to a NamedQuery model object. */\n/** Encodes a DbDocumentOverlay object to an Overlay model object. */\nfunction pr(t, e) {\n    return new ei(e.largestBatchId, zi(t.fe, e.overlayMutation));\n}\n\n/** Decodes an Overlay model object into a DbDocumentOverlay object. */\n/**\n * Returns the DbDocumentOverlayKey corresponding to the given user and\n * document key.\n */\nfunction Ir(t, e) {\n    const n = e.path.lastSegment();\n    return [ t, qt(e.path.popLast()), n ];\n}\n\nfunction Tr(t, e, n, s) {\n    return {\n        indexId: t,\n        uid: e.uid || \"\",\n        sequenceNumber: n,\n        readTime: dr(s.readTime),\n        documentKey: qt(s.documentKey.path),\n        largestBatchId: s.largestBatchId\n    };\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class Er {\n    getBundleMetadata(t, e) {\n        return Ar(t).get(e).next((t => {\n            if (t) return {\n                id: (e = t).bundleId,\n                createTime: wr(e.createTime),\n                version: e.version\n            };\n            /** Encodes a DbBundle to a BundleMetadata object. */\n            var e;\n            /** Encodes a BundleMetadata to a DbBundle. */        }));\n    }\n    saveBundleMetadata(t, e) {\n        return Ar(t).put({\n            bundleId: (n = e).id,\n            createTime: dr(Ni(n.createTime)),\n            version: n.version\n        });\n        var n;\n        /** Encodes a DbNamedQuery to a NamedQuery. */    }\n    getNamedQuery(t, e) {\n        return vr(t).get(e).next((t => {\n            if (t) return {\n                name: (e = t).name,\n                query: yr(e.bundledQuery),\n                readTime: wr(e.readTime)\n            };\n            var e;\n            /** Encodes a NamedQuery from a bundle proto to a DbNamedQuery. */        }));\n    }\n    saveNamedQuery(t, e) {\n        return vr(t).put(function(t) {\n            return {\n                name: t.name,\n                readTime: dr(Ni(t.readTime)),\n                bundledQuery: t.bundledQuery\n            };\n        }(e));\n    }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the bundles object store.\n */ function Ar(t) {\n    return _e(t, \"bundles\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the namedQueries object store.\n */ function vr(t) {\n    return _e(t, \"namedQueries\");\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Implementation of DocumentOverlayCache using IndexedDb.\n */ class Rr {\n    /**\n     * @param serializer - The document serializer.\n     * @param userId - The userId for which we are accessing overlays.\n     */\n    constructor(t, e) {\n        this.serializer = t, this.userId = e;\n    }\n    static de(t, e) {\n        const n = e.uid || \"\";\n        return new Rr(t, n);\n    }\n    getOverlay(t, e) {\n        return Pr(t).get(Ir(this.userId, e)).next((t => t ? pr(this.serializer, t) : null));\n    }\n    getOverlays(t, e) {\n        const n = fs();\n        return Rt.forEach(e, (e => this.getOverlay(t, e).next((t => {\n            null !== t && n.set(e, t);\n        })))).next((() => n));\n    }\n    saveOverlays(t, e, n) {\n        const s = [];\n        return n.forEach(((n, i) => {\n            const r = new ei(e, i);\n            s.push(this.we(t, r));\n        })), Rt.waitFor(s);\n    }\n    removeOverlaysForBatchId(t, e, n) {\n        const s = new Set;\n        // Get the set of unique collection paths.\n                e.forEach((t => s.add(qt(t.getCollectionPath()))));\n        const i = [];\n        return s.forEach((e => {\n            const s = IDBKeyRange.bound([ this.userId, e, n ], [ this.userId, e, n + 1 ], \n            /*lowerOpen=*/ !1, \n            /*upperOpen=*/ !0);\n            i.push(Pr(t).J(\"collectionPathOverlayIndex\", s));\n        })), Rt.waitFor(i);\n    }\n    getOverlaysForCollection(t, e, n) {\n        const s = fs(), i = qt(e), r = IDBKeyRange.bound([ this.userId, i, n ], [ this.userId, i, Number.POSITIVE_INFINITY ], \n        /*lowerOpen=*/ !0);\n        return Pr(t).j(\"collectionPathOverlayIndex\", r).next((t => {\n            for (const e of t) {\n                const t = pr(this.serializer, e);\n                s.set(t.getKey(), t);\n            }\n            return s;\n        }));\n    }\n    getOverlaysForCollectionGroup(t, e, n, s) {\n        const i = fs();\n        let r;\n        // We want batch IDs larger than `sinceBatchId`, and so the lower bound\n        // is not inclusive.\n                const o = IDBKeyRange.bound([ this.userId, e, n ], [ this.userId, e, Number.POSITIVE_INFINITY ], \n        /*lowerOpen=*/ !0);\n        return Pr(t).X({\n            index: \"collectionGroupOverlayIndex\",\n            range: o\n        }, ((t, e, n) => {\n            // We do not want to return partial batch overlays, even if the size\n            // of the result set exceeds the given `count` argument. Therefore, we\n            // continue to aggregate results even after the result size exceeds\n            // `count` if there are more overlays from the `currentBatchId`.\n            const o = pr(this.serializer, e);\n            i.size() < s || o.largestBatchId === r ? (i.set(o.getKey(), o), r = o.largestBatchId) : n.done();\n        })).next((() => i));\n    }\n    we(t, e) {\n        return Pr(t).put(function(t, e, n) {\n            const [s, i, r] = Ir(e, n.mutation.key);\n            return {\n                userId: e,\n                collectionPath: i,\n                documentId: r,\n                collectionGroup: n.mutation.key.getCollectionGroup(),\n                largestBatchId: n.largestBatchId,\n                overlayMutation: ji(t.fe, n.mutation)\n            };\n        }(this.serializer, this.userId, e));\n    }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the document overlay object store.\n */ function Pr(t) {\n    return _e(t, \"documentOverlays\");\n}\n\n/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Note: This code is copied from the backend. Code that is not used by\n// Firestore was removed.\n/** Firestore index value writer.  */\nclass br {\n    constructor() {}\n    // The write methods below short-circuit writing terminators for values\n    // containing a (terminating) truncated value.\n    // As an example, consider the resulting encoding for:\n    // [\"bar\", [2, \"foo\"]] -> (STRING, \"bar\", TERM, ARRAY, NUMBER, 2, STRING, \"foo\", TERM, TERM, TERM)\n    // [\"bar\", [2, truncated(\"foo\")]] -> (STRING, \"bar\", TERM, ARRAY, NUMBER, 2, STRING, \"foo\", TRUNC)\n    // [\"bar\", truncated([\"foo\"])] -> (STRING, \"bar\", TERM, ARRAY. STRING, \"foo\", TERM, TRUNC)\n    /** Writes an index value.  */\n    _e(t, e) {\n        this.me(t, e), \n        // Write separator to split index values\n        // (see go/firestore-storage-format#encodings).\n        e.ge();\n    }\n    me(t, e) {\n        if (\"nullValue\" in t) this.ye(e, 5); else if (\"booleanValue\" in t) this.ye(e, 10), \n        e.pe(t.booleanValue ? 1 : 0); else if (\"integerValue\" in t) this.ye(e, 15), e.pe(Ce(t.integerValue)); else if (\"doubleValue\" in t) {\n            const n = Ce(t.doubleValue);\n            isNaN(n) ? this.ye(e, 13) : (this.ye(e, 15), Bt(n) ? \n            // -0.0, 0 and 0.0 are all considered the same\n            e.pe(0) : e.pe(n));\n        } else if (\"timestampValue\" in t) {\n            const n = t.timestampValue;\n            this.ye(e, 20), \"string\" == typeof n ? e.Ie(n) : (e.Ie(`${n.seconds || \"\"}`), e.pe(n.nanos || 0));\n        } else if (\"stringValue\" in t) this.Te(t.stringValue, e), this.Ee(e); else if (\"bytesValue\" in t) this.ye(e, 30), \n        e.Ae(xe(t.bytesValue)), this.Ee(e); else if (\"referenceValue\" in t) this.ve(t.referenceValue, e); else if (\"geoPointValue\" in t) {\n            const n = t.geoPointValue;\n            this.ye(e, 45), e.pe(n.latitude || 0), e.pe(n.longitude || 0);\n        } else \"mapValue\" in t ? en(t) ? this.ye(e, Number.MAX_SAFE_INTEGER) : (this.Re(t.mapValue, e), \n        this.Ee(e)) : \"arrayValue\" in t ? (this.Pe(t.arrayValue, e), this.Ee(e)) : O();\n    }\n    Te(t, e) {\n        this.ye(e, 25), this.be(t, e);\n    }\n    be(t, e) {\n        e.Ie(t);\n    }\n    Re(t, e) {\n        const n = t.fields || {};\n        this.ye(e, 55);\n        for (const t of Object.keys(n)) this.Te(t, e), this.me(n[t], e);\n    }\n    Pe(t, e) {\n        const n = t.values || [];\n        this.ye(e, 50);\n        for (const t of n) this.me(t, e);\n    }\n    ve(t, e) {\n        this.ye(e, 37);\n        ht.fromName(t).path.forEach((t => {\n            this.ye(e, 60), this.be(t, e);\n        }));\n    }\n    ye(t, e) {\n        t.pe(e);\n    }\n    Ee(t) {\n        // While the SDK does not implement truncation, the truncation marker is\n        // used to terminate all variable length values (which are strings, bytes,\n        // references, arrays and maps).\n        t.pe(2);\n    }\n}\n\nbr.Ve = new br;\n\n/**\n * Counts the number of zeros in a byte.\n *\n * Visible for testing.\n */\nfunction Vr(t) {\n    if (0 === t) return 8;\n    let e = 0;\n    return t >> 4 == 0 && (\n    // Test if the first four bits are zero.\n    e += 4, t <<= 4), t >> 6 == 0 && (\n    // Test if the first two (or next two) bits are zero.\n    e += 2, t <<= 2), t >> 7 == 0 && (\n    // Test if the remaining bit is zero.\n    e += 1), e;\n}\n\n/** Counts the number of leading zeros in the given byte array. */\n/**\n * Returns the number of bytes required to store \"value\". Leading zero bytes\n * are skipped.\n */\nfunction Sr(t) {\n    // This is just the number of bytes for the unsigned representation of the number.\n    const e = 64 - function(t) {\n        let e = 0;\n        for (let n = 0; n < 8; ++n) {\n            const s = Vr(255 & t[n]);\n            if (e += s, 8 !== s) break;\n        }\n        return e;\n    }(t);\n    return Math.ceil(e / 8);\n}\n\n/**\n * OrderedCodeWriter is a minimal-allocation implementation of the writing\n * behavior defined by the backend.\n *\n * The code is ported from its Java counterpart.\n */ class Dr {\n    constructor() {\n        this.buffer = new Uint8Array(1024), this.position = 0;\n    }\n    Se(t) {\n        const e = t[Symbol.iterator]();\n        let n = e.next();\n        for (;!n.done; ) this.De(n.value), n = e.next();\n        this.Ce();\n    }\n    xe(t) {\n        const e = t[Symbol.iterator]();\n        let n = e.next();\n        for (;!n.done; ) this.Ne(n.value), n = e.next();\n        this.ke();\n    }\n    /** Writes utf8 bytes into this byte sequence, ascending. */    Me(t) {\n        for (const e of t) {\n            const t = e.charCodeAt(0);\n            if (t < 128) this.De(t); else if (t < 2048) this.De(960 | t >>> 6), this.De(128 | 63 & t); else if (e < \"\\ud800\" || \"\\udbff\" < e) this.De(480 | t >>> 12), \n            this.De(128 | 63 & t >>> 6), this.De(128 | 63 & t); else {\n                const t = e.codePointAt(0);\n                this.De(240 | t >>> 18), this.De(128 | 63 & t >>> 12), this.De(128 | 63 & t >>> 6), \n                this.De(128 | 63 & t);\n            }\n        }\n        this.Ce();\n    }\n    /** Writes utf8 bytes into this byte sequence, descending */    $e(t) {\n        for (const e of t) {\n            const t = e.charCodeAt(0);\n            if (t < 128) this.Ne(t); else if (t < 2048) this.Ne(960 | t >>> 6), this.Ne(128 | 63 & t); else if (e < \"\\ud800\" || \"\\udbff\" < e) this.Ne(480 | t >>> 12), \n            this.Ne(128 | 63 & t >>> 6), this.Ne(128 | 63 & t); else {\n                const t = e.codePointAt(0);\n                this.Ne(240 | t >>> 18), this.Ne(128 | 63 & t >>> 12), this.Ne(128 | 63 & t >>> 6), \n                this.Ne(128 | 63 & t);\n            }\n        }\n        this.ke();\n    }\n    Oe(t) {\n        // Values are encoded with a single byte length prefix, followed by the\n        // actual value in big-endian format with leading 0 bytes dropped.\n        const e = this.Fe(t), n = Sr(e);\n        this.Be(1 + n), this.buffer[this.position++] = 255 & n;\n        // Write the length\n        for (let t = e.length - n; t < e.length; ++t) this.buffer[this.position++] = 255 & e[t];\n    }\n    Le(t) {\n        // Values are encoded with a single byte length prefix, followed by the\n        // inverted value in big-endian format with leading 0 bytes dropped.\n        const e = this.Fe(t), n = Sr(e);\n        this.Be(1 + n), this.buffer[this.position++] = ~(255 & n);\n        // Write the length\n        for (let t = e.length - n; t < e.length; ++t) this.buffer[this.position++] = ~(255 & e[t]);\n    }\n    /**\n     * Writes the \"infinity\" byte sequence that sorts after all other byte\n     * sequences written in ascending order.\n     */    qe() {\n        this.Ue(255), this.Ue(255);\n    }\n    /**\n     * Writes the \"infinity\" byte sequence that sorts before all other byte\n     * sequences written in descending order.\n     */    Ke() {\n        this.Ge(255), this.Ge(255);\n    }\n    /**\n     * Resets the buffer such that it is the same as when it was newly\n     * constructed.\n     */    reset() {\n        this.position = 0;\n    }\n    seed(t) {\n        this.Be(t.length), this.buffer.set(t, this.position), this.position += t.length;\n    }\n    /** Makes a copy of the encoded bytes in this buffer.  */    Qe() {\n        return this.buffer.slice(0, this.position);\n    }\n    /**\n     * Encodes `val` into an encoding so that the order matches the IEEE 754\n     * floating-point comparison results with the following exceptions:\n     *   -0.0 < 0.0\n     *   all non-NaN < NaN\n     *   NaN = NaN\n     */    Fe(t) {\n        const e = \n        /** Converts a JavaScript number to a byte array (using big endian encoding). */\n        function(t) {\n            const e = new DataView(new ArrayBuffer(8));\n            return e.setFloat64(0, t, /* littleEndian= */ !1), new Uint8Array(e.buffer);\n        }(t), n = 0 != (128 & e[0]);\n        // Check if the first bit is set. We use a bit mask since value[0] is\n        // encoded as a number from 0 to 255.\n                // Revert the two complement to get natural ordering\n        e[0] ^= n ? 255 : 128;\n        for (let t = 1; t < e.length; ++t) e[t] ^= n ? 255 : 0;\n        return e;\n    }\n    /** Writes a single byte ascending to the buffer. */    De(t) {\n        const e = 255 & t;\n        0 === e ? (this.Ue(0), this.Ue(255)) : 255 === e ? (this.Ue(255), this.Ue(0)) : this.Ue(e);\n    }\n    /** Writes a single byte descending to the buffer.  */    Ne(t) {\n        const e = 255 & t;\n        0 === e ? (this.Ge(0), this.Ge(255)) : 255 === e ? (this.Ge(255), this.Ge(0)) : this.Ge(t);\n    }\n    Ce() {\n        this.Ue(0), this.Ue(1);\n    }\n    ke() {\n        this.Ge(0), this.Ge(1);\n    }\n    Ue(t) {\n        this.Be(1), this.buffer[this.position++] = t;\n    }\n    Ge(t) {\n        this.Be(1), this.buffer[this.position++] = ~t;\n    }\n    Be(t) {\n        const e = t + this.position;\n        if (e <= this.buffer.length) return;\n        // Try doubling.\n                let n = 2 * this.buffer.length;\n        // Still not big enough? Just allocate the right size.\n                n < e && (n = e);\n        // Create the new buffer.\n                const s = new Uint8Array(n);\n        s.set(this.buffer), // copy old data\n        this.buffer = s;\n    }\n}\n\nclass Cr {\n    constructor(t) {\n        this.je = t;\n    }\n    Ae(t) {\n        this.je.Se(t);\n    }\n    Ie(t) {\n        this.je.Me(t);\n    }\n    pe(t) {\n        this.je.Oe(t);\n    }\n    ge() {\n        this.je.qe();\n    }\n}\n\nclass xr {\n    constructor(t) {\n        this.je = t;\n    }\n    Ae(t) {\n        this.je.xe(t);\n    }\n    Ie(t) {\n        this.je.$e(t);\n    }\n    pe(t) {\n        this.je.Le(t);\n    }\n    ge() {\n        this.je.Ke();\n    }\n}\n\n/**\n * Implements `DirectionalIndexByteEncoder` using `OrderedCodeWriter` for the\n * actual encoding.\n */ class Nr {\n    constructor() {\n        this.je = new Dr, this.ze = new Cr(this.je), this.We = new xr(this.je);\n    }\n    seed(t) {\n        this.je.seed(t);\n    }\n    He(t) {\n        return 0 /* IndexKind.ASCENDING */ === t ? this.ze : this.We;\n    }\n    Qe() {\n        return this.je.Qe();\n    }\n    reset() {\n        this.je.reset();\n    }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Represents an index entry saved by the SDK in persisted storage. */ class kr {\n    constructor(t, e, n, s) {\n        this.indexId = t, this.documentKey = e, this.arrayValue = n, this.directionalValue = s;\n    }\n    /**\n     * Returns an IndexEntry entry that sorts immediately after the current\n     * directional value.\n     */    Je() {\n        const t = this.directionalValue.length, e = 0 === t || 255 === this.directionalValue[t - 1] ? t + 1 : t, n = new Uint8Array(e);\n        return n.set(this.directionalValue, 0), e !== t ? n.set([ 0 ], this.directionalValue.length) : ++n[n.length - 1], \n        new kr(this.indexId, this.documentKey, this.arrayValue, n);\n    }\n}\n\nfunction Mr(t, e) {\n    let n = t.indexId - e.indexId;\n    return 0 !== n ? n : (n = $r(t.arrayValue, e.arrayValue), 0 !== n ? n : (n = $r(t.directionalValue, e.directionalValue), \n    0 !== n ? n : ht.comparator(t.documentKey, e.documentKey)));\n}\n\nfunction $r(t, e) {\n    for (let n = 0; n < t.length && n < e.length; ++n) {\n        const s = t[n] - e[n];\n        if (0 !== s) return s;\n    }\n    return t.length - e.length;\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A light query planner for Firestore.\n *\n * This class matches a `FieldIndex` against a Firestore Query `Target`. It\n * determines whether a given index can be used to serve the specified target.\n *\n * The following table showcases some possible index configurations:\n *\n * Query                                               | Index\n * -----------------------------------------------------------------------------\n * where('a', '==', 'a').where('b', '==', 'b')         | a ASC, b DESC\n * where('a', '==', 'a').where('b', '==', 'b')         | a ASC\n * where('a', '==', 'a').where('b', '==', 'b')         | b DESC\n * where('a', '>=', 'a').orderBy('a')                  | a ASC\n * where('a', '>=', 'a').orderBy('a', 'desc')          | a DESC\n * where('a', '>=', 'a').orderBy('a').orderBy('b')     | a ASC, b ASC\n * where('a', '>=', 'a').orderBy('a').orderBy('b')     | a ASC\n * where('a', 'array-contains', 'a').orderBy('b')      | a CONTAINS, b ASCENDING\n * where('a', 'array-contains', 'a').orderBy('b')      | a CONTAINS\n */ class Or {\n    constructor(t) {\n        this.collectionId = null != t.collectionGroup ? t.collectionGroup : t.path.lastSegment(), \n        this.Ye = t.orderBy, this.Xe = [];\n        for (const e of t.filters) {\n            const t = e;\n            t.isInequality() ? this.Ze = t : this.Xe.push(t);\n        }\n    }\n    /**\n     * Returns whether the index can be used to serve the TargetIndexMatcher's\n     * target.\n     *\n     * An index is considered capable of serving the target when:\n     * - The target uses all index segments for its filters and orderBy clauses.\n     *   The target can have additional filter and orderBy clauses, but not\n     *   fewer.\n     * - If an ArrayContains/ArrayContainsAnyfilter is used, the index must also\n     *   have a corresponding `CONTAINS` segment.\n     * - All directional index segments can be mapped to the target as a series of\n     *   equality filters, a single inequality filter and a series of orderBy\n     *   clauses.\n     * - The segments that represent the equality filters may appear out of order.\n     * - The optional segment for the inequality filter must appear after all\n     *   equality segments.\n     * - The segments that represent that orderBy clause of the target must appear\n     *   in order after all equality and inequality segments. Single orderBy\n     *   clauses cannot be skipped, but a continuous orderBy suffix may be\n     *   omitted.\n     */    tn(t) {\n        F(t.collectionGroup === this.collectionId);\n        // If there is an array element, find a matching filter.\n        const e = ft(t);\n        if (void 0 !== e && !this.en(e)) return !1;\n        const n = dt(t);\n        let s = new Set, i = 0, r = 0;\n        // Process all equalities first. Equalities can appear out of order.\n        for (;i < n.length && this.en(n[i]); ++i) s = s.add(n[i].fieldPath.canonicalString());\n        // If we already have processed all segments, all segments are used to serve\n        // the equality filters and we do not need to map any segments to the\n        // target's inequality and orderBy clauses.\n                if (i === n.length) return !0;\n        if (void 0 !== this.Ze) {\n            // If there is an inequality filter and the field was not in one of the\n            // equality filters above, the next segment must match both the filter\n            // and the first orderBy clause.\n            if (!s.has(this.Ze.field.canonicalString())) {\n                const t = n[i];\n                if (!this.nn(this.Ze, t) || !this.sn(this.Ye[r++], t)) return !1;\n            }\n            ++i;\n        }\n        // All remaining segments need to represent the prefix of the target's\n        // orderBy.\n                for (;i < n.length; ++i) {\n            const t = n[i];\n            if (r >= this.Ye.length || !this.sn(this.Ye[r++], t)) return !1;\n        }\n        return !0;\n    }\n    en(t) {\n        for (const e of this.Xe) if (this.nn(e, t)) return !0;\n        return !1;\n    }\n    nn(t, e) {\n        if (void 0 === t || !t.field.isEqual(e.fieldPath)) return !1;\n        const n = \"array-contains\" /* Operator.ARRAY_CONTAINS */ === t.op || \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ === t.op;\n        return 2 /* IndexKind.CONTAINS */ === e.kind === n;\n    }\n    sn(t, e) {\n        return !!t.field.isEqual(e.fieldPath) && (0 /* IndexKind.ASCENDING */ === e.kind && \"asc\" /* Direction.ASCENDING */ === t.dir || 1 /* IndexKind.DESCENDING */ === e.kind && \"desc\" /* Direction.DESCENDING */ === t.dir);\n    }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides utility functions that help with boolean logic transformations needed for handling\n * complex filters used in queries.\n */\n/**\n * The `in` filter is only a syntactic sugar over a disjunction of equalities. For instance: `a in\n * [1,2,3]` is in fact `a==1 || a==2 || a==3`. This method expands any `in` filter in the given\n * input into a disjunction of equality filters and returns the expanded filter.\n */ function Fr(t) {\n    var e, n;\n    if (F(t instanceof mn || t instanceof gn), t instanceof mn) {\n        if (t instanceof Cn) {\n            const s = (null === (n = null === (e = t.value.arrayValue) || void 0 === e ? void 0 : e.values) || void 0 === n ? void 0 : n.map((e => mn.create(t.field, \"==\" /* Operator.EQUAL */ , e)))) || [];\n            return gn.create(s, \"or\" /* CompositeOperator.OR */);\n        }\n        // We have reached other kinds of field filters.\n        return t;\n    }\n    // We have a composite filter.\n        const s = t.filters.map((t => Fr(t)));\n    return gn.create(s, t.op);\n}\n\n/**\n * Given a composite filter, returns the list of terms in its disjunctive normal form.\n *\n * <p>Each element in the return value is one term of the resulting DNF. For instance: For the\n * input: (A || B) && C, the DNF form is: (A && C) || (B && C), and the return value is a list\n * with two elements: a composite filter that performs (A && C), and a composite filter that\n * performs (B && C).\n *\n * @param filter the composite filter to calculate DNF transform for.\n * @return the terms in the DNF transform.\n */ function Br(t) {\n    if (0 === t.getFilters().length) return [];\n    const e = Kr(Fr(t));\n    return F(Ur(e)), Lr(e) || qr(e) ? [ e ] : e.getFilters();\n}\n\n/** Returns true if the given filter is a single field filter. e.g. (a == 10). */ function Lr(t) {\n    return t instanceof mn;\n}\n\n/**\n * Returns true if the given filter is the conjunction of one or more field filters. e.g. (a == 10\n * && b == 20)\n */ function qr(t) {\n    return t instanceof gn && In(t);\n}\n\n/**\n * Returns whether or not the given filter is in disjunctive normal form (DNF).\n *\n * <p>In boolean logic, a disjunctive normal form (DNF) is a canonical normal form of a logical\n * formula consisting of a disjunction of conjunctions; it can also be described as an OR of ANDs.\n *\n * <p>For more info, visit: https://en.wikipedia.org/wiki/Disjunctive_normal_form\n */ function Ur(t) {\n    return Lr(t) || qr(t) || \n    /**\n * Returns true if the given filter is the disjunction of one or more \"flat conjunctions\" and\n * field filters. e.g. (a == 10) || (b==20 && c==30)\n */\n    function(t) {\n        if (t instanceof gn && pn(t)) {\n            for (const e of t.getFilters()) if (!Lr(e) && !qr(e)) return !1;\n            return !0;\n        }\n        return !1;\n    }(t);\n}\n\nfunction Kr(t) {\n    if (F(t instanceof mn || t instanceof gn), t instanceof mn) return t;\n    if (1 === t.filters.length) return Kr(t.filters[0]);\n    // Compute DNF for each of the subfilters first\n        const e = t.filters.map((t => Kr(t)));\n    let n = gn.create(e, t.op);\n    return n = jr(n), Ur(n) ? n : (F(n instanceof gn), F(yn(n)), F(n.filters.length > 1), \n    n.filters.reduce(((t, e) => Gr(t, e))));\n}\n\nfunction Gr(t, e) {\n    let n;\n    return F(t instanceof mn || t instanceof gn), F(e instanceof mn || e instanceof gn), \n    // FieldFilter FieldFilter\n    n = t instanceof mn ? e instanceof mn ? function(t, e) {\n        // Conjunction distribution for two field filters is the conjunction of them.\n        return gn.create([ t, e ], \"and\" /* CompositeOperator.AND */);\n    }(t, e) : Qr(t, e) : e instanceof mn ? Qr(e, t) : function(t, e) {\n        // There are four cases:\n        // (A & B) & (C & D) --> (A & B & C & D)\n        // (A & B) & (C | D) --> (A & B & C) | (A & B & D)\n        // (A | B) & (C & D) --> (C & D & A) | (C & D & B)\n        // (A | B) & (C | D) --> (A & C) | (A & D) | (B & C) | (B & D)\n        // Case 1 is a merge.\n        if (F(t.filters.length > 0 && e.filters.length > 0), yn(t) && yn(e)) return vn(t, e.getFilters());\n        // Case 2,3,4 all have at least one side (lhs or rhs) that is a disjunction. In all three cases\n        // we should take each element of the disjunction and distribute it over the other side, and\n        // return the disjunction of the distribution results.\n                const n = pn(t) ? t : e, s = pn(t) ? e : t, i = n.filters.map((t => Gr(t, s)));\n        return gn.create(i, \"or\" /* CompositeOperator.OR */);\n    }(t, e), jr(n);\n}\n\nfunction Qr(t, e) {\n    // There are two cases:\n    // A & (B & C) --> (A & B & C)\n    // A & (B | C) --> (A & B) | (A & C)\n    if (yn(e)) \n    // Case 1\n    return vn(e, t.getFilters());\n    {\n        // Case 2\n        const n = e.filters.map((e => Gr(t, e)));\n        return gn.create(n, \"or\" /* CompositeOperator.OR */);\n    }\n}\n\n/**\n * Applies the associativity property to the given filter and returns the resulting filter.\n *\n * <ul>\n *   <li>A | (B | C) == (A | B) | C == (A | B | C)\n *   <li>A & (B & C) == (A & B) & C == (A & B & C)\n * </ul>\n *\n * <p>For more info, visit: https://en.wikipedia.org/wiki/Associative_property#Propositional_logic\n */ function jr(t) {\n    if (F(t instanceof mn || t instanceof gn), t instanceof mn) return t;\n    const e = t.getFilters();\n    // If the composite filter only contains 1 filter, apply associativity to it.\n        if (1 === e.length) return jr(e[0]);\n    // Associativity applied to a flat composite filter results is itself.\n        if (Tn(t)) return t;\n    // First apply associativity to all subfilters. This will in turn recursively apply\n    // associativity to all nested composite filters and field filters.\n        const n = e.map((t => jr(t))), s = [];\n    // For composite subfilters that perform the same kind of logical operation as `compositeFilter`\n    // take out their filters and add them to `compositeFilter`. For example:\n    // compositeFilter = (A | (B | C | D))\n    // compositeSubfilter = (B | C | D)\n    // Result: (A | B | C | D)\n    // Note that the `compositeSubfilter` has been eliminated, and its filters (B, C, D) have been\n    // added to the top-level \"compositeFilter\".\n        return n.forEach((e => {\n        e instanceof mn ? s.push(e) : e instanceof gn && (e.op === t.op ? \n        // compositeFilter: (A | (B | C))\n        // compositeSubfilter: (B | C)\n        // Result: (A | B | C)\n        s.push(...e.filters) : \n        // compositeFilter: (A | (B & C))\n        // compositeSubfilter: (B & C)\n        // Result: (A | (B & C))\n        s.push(e));\n    })), 1 === s.length ? s[0] : gn.create(s, t.op);\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An in-memory implementation of IndexManager.\n */ class zr {\n    constructor() {\n        this.rn = new Wr;\n    }\n    addToCollectionParentIndex(t, e) {\n        return this.rn.add(e), Rt.resolve();\n    }\n    getCollectionParents(t, e) {\n        return Rt.resolve(this.rn.getEntries(e));\n    }\n    addFieldIndex(t, e) {\n        // Field indices are not supported with memory persistence.\n        return Rt.resolve();\n    }\n    deleteFieldIndex(t, e) {\n        // Field indices are not supported with memory persistence.\n        return Rt.resolve();\n    }\n    getDocumentsMatchingTarget(t, e) {\n        // Field indices are not supported with memory persistence.\n        return Rt.resolve(null);\n    }\n    getIndexType(t, e) {\n        // Field indices are not supported with memory persistence.\n        return Rt.resolve(0 /* IndexType.NONE */);\n    }\n    getFieldIndexes(t, e) {\n        // Field indices are not supported with memory persistence.\n        return Rt.resolve([]);\n    }\n    getNextCollectionGroupToUpdate(t) {\n        // Field indices are not supported with memory persistence.\n        return Rt.resolve(null);\n    }\n    getMinOffset(t, e) {\n        return Rt.resolve(It.min());\n    }\n    getMinOffsetFromCollectionGroup(t, e) {\n        return Rt.resolve(It.min());\n    }\n    updateCollectionGroup(t, e, n) {\n        // Field indices are not supported with memory persistence.\n        return Rt.resolve();\n    }\n    updateIndexEntries(t, e) {\n        // Field indices are not supported with memory persistence.\n        return Rt.resolve();\n    }\n}\n\n/**\n * Internal implementation of the collection-parent index exposed by MemoryIndexManager.\n * Also used for in-memory caching by IndexedDbIndexManager and initial index population\n * in indexeddb_schema.ts\n */ class Wr {\n    constructor() {\n        this.index = {};\n    }\n    // Returns false if the entry already existed.\n    add(t) {\n        const e = t.lastSegment(), n = t.popLast(), s = this.index[e] || new Ee(ut.comparator), i = !s.has(n);\n        return this.index[e] = s.add(n), i;\n    }\n    has(t) {\n        const e = t.lastSegment(), n = t.popLast(), s = this.index[e];\n        return s && s.has(n);\n    }\n    getEntries(t) {\n        return (this.index[t] || new Ee(ut.comparator)).toArray();\n    }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const Hr = new Uint8Array(0);\n\n/**\n * A persisted implementation of IndexManager.\n *\n * PORTING NOTE: Unlike iOS and Android, the Web SDK does not memoize index\n * data as it supports multi-tab access.\n */\nclass Jr {\n    constructor(t, e) {\n        this.user = t, this.databaseId = e, \n        /**\n         * An in-memory copy of the index entries we've already written since the SDK\n         * launched. Used to avoid re-writing the same entry repeatedly.\n         *\n         * This is *NOT* a complete cache of what's in persistence and so can never be\n         * used to satisfy reads.\n         */\n        this.on = new Wr, \n        /**\n         * Maps from a target to its equivalent list of sub-targets. Each sub-target\n         * contains only one term from the target's disjunctive normal form (DNF).\n         */\n        this.un = new os((t => $n(t)), ((t, e) => On(t, e))), this.uid = t.uid || \"\";\n    }\n    /**\n     * Adds a new entry to the collection parent index.\n     *\n     * Repeated calls for the same collectionPath should be avoided within a\n     * transaction as IndexedDbIndexManager only caches writes once a transaction\n     * has been committed.\n     */    addToCollectionParentIndex(t, e) {\n        if (!this.on.has(e)) {\n            const n = e.lastSegment(), s = e.popLast();\n            t.addOnCommittedListener((() => {\n                // Add the collection to the in memory cache only if the transaction was\n                // successfully committed.\n                this.on.add(e);\n            }));\n            const i = {\n                collectionId: n,\n                parent: qt(s)\n            };\n            return Yr(t).put(i);\n        }\n        return Rt.resolve();\n    }\n    getCollectionParents(t, e) {\n        const n = [], s = IDBKeyRange.bound([ e, \"\" ], [ st(e), \"\" ], \n        /*lowerOpen=*/ !1, \n        /*upperOpen=*/ !0);\n        return Yr(t).j(s).next((t => {\n            for (const s of t) {\n                // This collectionId guard shouldn't be necessary (and isn't as long\n                // as we're running in a real browser), but there's a bug in\n                // indexeddbshim that breaks our range in our tests running in node:\n                // https://github.com/axemclion/IndexedDBShim/issues/334\n                if (s.collectionId !== e) break;\n                n.push(Gt(s.parent));\n            }\n            return n;\n        }));\n    }\n    addFieldIndex(t, e) {\n        // TODO(indexing): Verify that the auto-incrementing index ID works in\n        // Safari & Firefox.\n        const n = Zr(t), s = function(t) {\n            return {\n                indexId: t.indexId,\n                collectionGroup: t.collectionGroup,\n                fields: t.fields.map((t => [ t.fieldPath.canonicalString(), t.kind ]))\n            };\n        }(e);\n        delete s.indexId;\n        // `indexId` is auto-populated by IndexedDb\n        const i = n.add(s);\n        if (e.indexState) {\n            const n = to(t);\n            return i.next((t => {\n                n.put(Tr(t, this.user, e.indexState.sequenceNumber, e.indexState.offset));\n            }));\n        }\n        return i.next();\n    }\n    deleteFieldIndex(t, e) {\n        const n = Zr(t), s = to(t), i = Xr(t);\n        return n.delete(e.indexId).next((() => s.delete(IDBKeyRange.bound([ e.indexId ], [ e.indexId + 1 ], \n        /*lowerOpen=*/ !1, \n        /*upperOpen=*/ !0)))).next((() => i.delete(IDBKeyRange.bound([ e.indexId ], [ e.indexId + 1 ], \n        /*lowerOpen=*/ !1, \n        /*upperOpen=*/ !0))));\n    }\n    getDocumentsMatchingTarget(t, e) {\n        const n = Xr(t);\n        let s = !0;\n        const i = new Map;\n        return Rt.forEach(this.cn(e), (e => this.an(t, e).next((t => {\n            s && (s = !!t), i.set(e, t);\n        })))).next((() => {\n            if (s) {\n                let t = gs();\n                const s = [];\n                return Rt.forEach(i, ((i, r) => {\n                    var o;\n                    N(\"IndexedDbIndexManager\", `Using index ${o = i, `id=${o.indexId}|cg=${o.collectionGroup}|f=${o.fields.map((t => `${t.fieldPath}:${t.kind}`)).join(\",\")}`} to execute ${$n(e)}`);\n                    const u = function(t, e) {\n                        const n = ft(e);\n                        if (void 0 === n) return null;\n                        for (const e of Bn(t, n.fieldPath)) switch (e.op) {\n                          case \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ :\n                            return e.value.arrayValue.values || [];\n\n                          case \"array-contains\" /* Operator.ARRAY_CONTAINS */ :\n                            return [ e.value ];\n                            // Remaining filters are not array filters.\n                                                }\n                        return null;\n                    }\n                    /**\n * Returns the list of values that are used in != or NOT_IN filters. Returns\n * `null` if there are no such filters.\n */ (r, i), c = function(t, e) {\n                        const n = new Map;\n                        for (const s of dt(e)) for (const e of Bn(t, s.fieldPath)) switch (e.op) {\n                          case \"==\" /* Operator.EQUAL */ :\n                          case \"in\" /* Operator.IN */ :\n                            // Encode equality prefix, which is encoded in the index value before\n                            // the inequality (e.g. `a == 'a' && b != 'b'` is encoded to\n                            // `value != 'ab'`).\n                            n.set(s.fieldPath.canonicalString(), e.value);\n                            break;\n\n                          case \"not-in\" /* Operator.NOT_IN */ :\n                          case \"!=\" /* Operator.NOT_EQUAL */ :\n                            // NotIn/NotEqual is always a suffix. There cannot be any remaining\n                            // segments and hence we can return early here.\n                            return n.set(s.fieldPath.canonicalString(), e.value), Array.from(n.values());\n                            // Remaining filters cannot be used as notIn bounds.\n                                                }\n                        return null;\n                    }\n                    /**\n * Returns a lower bound of field values that can be used as a starting point to\n * scan the index defined by `fieldIndex`. Returns `MIN_VALUE` if no lower bound\n * exists.\n */ (r, i), a = function(t, e) {\n                        const n = [];\n                        let s = !0;\n                        // For each segment, retrieve a lower bound if there is a suitable filter or\n                        // startAt.\n                                                for (const i of dt(e)) {\n                            const e = 0 /* IndexKind.ASCENDING */ === i.kind ? Ln(t, i.fieldPath, t.startAt) : qn(t, i.fieldPath, t.startAt);\n                            n.push(e.value), s && (s = e.inclusive);\n                        }\n                        return new hn(n, s);\n                    }\n                    /**\n * Returns an upper bound of field values that can be used as an ending point\n * when scanning the index defined by `fieldIndex`. Returns `MAX_VALUE` if no\n * upper bound exists.\n */ (r, i), h = function(t, e) {\n                        const n = [];\n                        let s = !0;\n                        // For each segment, retrieve an upper bound if there is a suitable filter or\n                        // endAt.\n                                                for (const i of dt(e)) {\n                            const e = 0 /* IndexKind.ASCENDING */ === i.kind ? qn(t, i.fieldPath, t.endAt) : Ln(t, i.fieldPath, t.endAt);\n                            n.push(e.value), s && (s = e.inclusive);\n                        }\n                        return new hn(n, s);\n                    }(r, i), l = this.hn(i, r, a), f = this.hn(i, r, h), d = this.ln(i, r, c), w = this.fn(i.indexId, u, l, a.inclusive, f, h.inclusive, d);\n                    return Rt.forEach(w, (i => n.H(i, e.limit).next((e => {\n                        e.forEach((e => {\n                            const n = ht.fromSegments(e.documentKey);\n                            t.has(n) || (t = t.add(n), s.push(n));\n                        }));\n                    }))));\n                })).next((() => s));\n            }\n            return Rt.resolve(null);\n        }));\n    }\n    cn(t) {\n        let e = this.un.get(t);\n        if (e) return e;\n        if (0 === t.filters.length) e = [ t ]; else {\n            e = Br(gn.create(t.filters, \"and\" /* CompositeOperator.AND */)).map((e => Mn(t.path, t.collectionGroup, t.orderBy, e.getFilters(), t.limit, t.startAt, t.endAt)));\n        }\n        return this.un.set(t, e), e;\n    }\n    /**\n     * Constructs a key range query on `DbIndexEntryStore` that unions all\n     * bounds.\n     */    fn(t, e, n, s, i, r, o) {\n        // The number of total index scans we union together. This is similar to a\n        // distributed normal form, but adapted for array values. We create a single\n        // index range per value in an ARRAY_CONTAINS or ARRAY_CONTAINS_ANY filter\n        // combined with the values from the query bounds.\n        const u = (null != e ? e.length : 1) * Math.max(n.length, i.length), c = u / (null != e ? e.length : 1), a = [];\n        for (let h = 0; h < u; ++h) {\n            const u = e ? this.dn(e[h / c]) : Hr, l = this.wn(t, u, n[h % c], s), f = this._n(t, u, i[h % c], r), d = o.map((e => this.wn(t, u, e, \n            /* inclusive= */ !0)));\n            a.push(...this.createRange(l, f, d));\n        }\n        return a;\n    }\n    /** Generates the lower bound for `arrayValue` and `directionalValue`. */    wn(t, e, n, s) {\n        const i = new kr(t, ht.empty(), e, n);\n        return s ? i : i.Je();\n    }\n    /** Generates the upper bound for `arrayValue` and `directionalValue`. */    _n(t, e, n, s) {\n        const i = new kr(t, ht.empty(), e, n);\n        return s ? i.Je() : i;\n    }\n    an(t, e) {\n        const n = new Or(e), s = null != e.collectionGroup ? e.collectionGroup : e.path.lastSegment();\n        return this.getFieldIndexes(t, s).next((t => {\n            // Return the index with the most number of segments.\n            let e = null;\n            for (const s of t) {\n                n.tn(s) && (!e || s.fields.length > e.fields.length) && (e = s);\n            }\n            return e;\n        }));\n    }\n    getIndexType(t, e) {\n        let n = 2 /* IndexType.FULL */;\n        const s = this.cn(e);\n        return Rt.forEach(s, (e => this.an(t, e).next((t => {\n            t ? 0 /* IndexType.NONE */ !== n && t.fields.length < function(t) {\n                let e = new Ee(at.comparator), n = !1;\n                for (const s of t.filters) for (const t of s.getFlattenedFilters()) \n                // __name__ is not an explicit segment of any index, so we don't need to\n                // count it.\n                t.field.isKeyField() || (\n                // ARRAY_CONTAINS or ARRAY_CONTAINS_ANY filters must be counted separately.\n                // For instance, it is possible to have an index for \"a ARRAY a ASC\". Even\n                // though these are on the same field, they should be counted as two\n                // separate segments in an index.\n                \"array-contains\" /* Operator.ARRAY_CONTAINS */ === t.op || \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ === t.op ? n = !0 : e = e.add(t.field));\n                for (const n of t.orderBy) \n                // __name__ is not an explicit segment of any index, so we don't need to\n                // count it.\n                n.field.isKeyField() || (e = e.add(n.field));\n                return e.size + (n ? 1 : 0);\n            }(e) && (n = 1 /* IndexType.PARTIAL */) : n = 0 /* IndexType.NONE */;\n        })))).next((() => \n        // OR queries have more than one sub-target (one sub-target per DNF term). We currently consider\n        // OR queries that have a `limit` to have a partial index. For such queries we perform sorting\n        // and apply the limit in memory as a post-processing step.\n        function(t) {\n            return null !== t.limit;\n        }(e) && s.length > 1 && 2 /* IndexType.FULL */ === n ? 1 /* IndexType.PARTIAL */ : n));\n    }\n    /**\n     * Returns the byte encoded form of the directional values in the field index.\n     * Returns `null` if the document does not have all fields specified in the\n     * index.\n     */    mn(t, e) {\n        const n = new Nr;\n        for (const s of dt(t)) {\n            const t = e.data.field(s.fieldPath);\n            if (null == t) return null;\n            const i = n.He(s.kind);\n            br.Ve._e(t, i);\n        }\n        return n.Qe();\n    }\n    /** Encodes a single value to the ascending index format. */    dn(t) {\n        const e = new Nr;\n        return br.Ve._e(t, e.He(0 /* IndexKind.ASCENDING */)), e.Qe();\n    }\n    /**\n     * Returns an encoded form of the document key that sorts based on the key\n     * ordering of the field index.\n     */    gn(t, e) {\n        const n = new Nr;\n        return br.Ve._e(We(this.databaseId, e), n.He(function(t) {\n            const e = dt(t);\n            return 0 === e.length ? 0 /* IndexKind.ASCENDING */ : e[e.length - 1].kind;\n        }(t))), n.Qe();\n    }\n    /**\n     * Encodes the given field values according to the specification in `target`.\n     * For IN queries, a list of possible values is returned.\n     */    ln(t, e, n) {\n        if (null === n) return [];\n        let s = [];\n        s.push(new Nr);\n        let i = 0;\n        for (const r of dt(t)) {\n            const t = n[i++];\n            for (const n of s) if (this.yn(e, r.fieldPath) && Je(t)) s = this.pn(s, r, t); else {\n                const e = n.He(r.kind);\n                br.Ve._e(t, e);\n            }\n        }\n        return this.In(s);\n    }\n    /**\n     * Encodes the given bounds according to the specification in `target`. For IN\n     * queries, a list of possible values is returned.\n     */    hn(t, e, n) {\n        return this.ln(t, e, n.position);\n    }\n    /** Returns the byte representation for the provided encoders. */    In(t) {\n        const e = [];\n        for (let n = 0; n < t.length; ++n) e[n] = t[n].Qe();\n        return e;\n    }\n    /**\n     * Creates a separate encoder for each element of an array.\n     *\n     * The method appends each value to all existing encoders (e.g. filter(\"a\",\n     * \"==\", \"a1\").filter(\"b\", \"in\", [\"b1\", \"b2\"]) becomes [\"a1,b1\", \"a1,b2\"]). A\n     * list of new encoders is returned.\n     */    pn(t, e, n) {\n        const s = [ ...t ], i = [];\n        for (const t of n.arrayValue.values || []) for (const n of s) {\n            const s = new Nr;\n            s.seed(n.Qe()), br.Ve._e(t, s.He(e.kind)), i.push(s);\n        }\n        return i;\n    }\n    yn(t, e) {\n        return !!t.filters.find((t => t instanceof mn && t.field.isEqual(e) && (\"in\" /* Operator.IN */ === t.op || \"not-in\" /* Operator.NOT_IN */ === t.op)));\n    }\n    getFieldIndexes(t, e) {\n        const n = Zr(t), s = to(t);\n        return (e ? n.j(\"collectionGroupIndex\", IDBKeyRange.bound(e, e)) : n.j()).next((t => {\n            const e = [];\n            return Rt.forEach(t, (t => s.get([ t.indexId, this.uid ]).next((n => {\n                e.push(function(t, e) {\n                    const n = e ? new gt(e.sequenceNumber, new It(wr(e.readTime), new ht(Gt(e.documentKey)), e.largestBatchId)) : gt.empty(), s = t.fields.map((([t, e]) => new _t(at.fromServerFormat(t), e)));\n                    return new lt(t.indexId, t.collectionGroup, s, n);\n                }(t, n));\n            })))).next((() => e));\n        }));\n    }\n    getNextCollectionGroupToUpdate(t) {\n        return this.getFieldIndexes(t).next((t => 0 === t.length ? null : (t.sort(((t, e) => {\n            const n = t.indexState.sequenceNumber - e.indexState.sequenceNumber;\n            return 0 !== n ? n : et(t.collectionGroup, e.collectionGroup);\n        })), t[0].collectionGroup)));\n    }\n    updateCollectionGroup(t, e, n) {\n        const s = Zr(t), i = to(t);\n        return this.Tn(t).next((t => s.j(\"collectionGroupIndex\", IDBKeyRange.bound(e, e)).next((e => Rt.forEach(e, (e => i.put(Tr(e.indexId, this.user, t, n))))))));\n    }\n    updateIndexEntries(t, e) {\n        // Porting Note: `getFieldIndexes()` on Web does not cache index lookups as\n        // it could be used across different IndexedDB transactions. As any cached\n        // data might be invalidated by other multi-tab clients, we can only trust\n        // data within a single IndexedDB transaction. We therefore add a cache\n        // here.\n        const n = new Map;\n        return Rt.forEach(e, ((e, s) => {\n            const i = n.get(e.collectionGroup);\n            return (i ? Rt.resolve(i) : this.getFieldIndexes(t, e.collectionGroup)).next((i => (n.set(e.collectionGroup, i), \n            Rt.forEach(i, (n => this.En(t, e, n).next((e => {\n                const i = this.An(s, n);\n                return e.isEqual(i) ? Rt.resolve() : this.vn(t, s, n, e, i);\n            })))))));\n        }));\n    }\n    Rn(t, e, n, s) {\n        return Xr(t).put({\n            indexId: s.indexId,\n            uid: this.uid,\n            arrayValue: s.arrayValue,\n            directionalValue: s.directionalValue,\n            orderedDocumentKey: this.gn(n, e.key),\n            documentKey: e.key.path.toArray()\n        });\n    }\n    Pn(t, e, n, s) {\n        return Xr(t).delete([ s.indexId, this.uid, s.arrayValue, s.directionalValue, this.gn(n, e.key), e.key.path.toArray() ]);\n    }\n    En(t, e, n) {\n        const s = Xr(t);\n        let i = new Ee(Mr);\n        return s.X({\n            index: \"documentKeyIndex\",\n            range: IDBKeyRange.only([ n.indexId, this.uid, this.gn(n, e) ])\n        }, ((t, s) => {\n            i = i.add(new kr(n.indexId, e, s.arrayValue, s.directionalValue));\n        })).next((() => i));\n    }\n    /** Creates the index entries for the given document. */    An(t, e) {\n        let n = new Ee(Mr);\n        const s = this.mn(e, t);\n        if (null == s) return n;\n        const i = ft(e);\n        if (null != i) {\n            const r = t.data.field(i.fieldPath);\n            if (Je(r)) for (const i of r.arrayValue.values || []) n = n.add(new kr(e.indexId, t.key, this.dn(i), s));\n        } else n = n.add(new kr(e.indexId, t.key, Hr, s));\n        return n;\n    }\n    /**\n     * Updates the index entries for the provided document by deleting entries\n     * that are no longer referenced in `newEntries` and adding all newly added\n     * entries.\n     */    vn(t, e, n, s, i) {\n        N(\"IndexedDbIndexManager\", \"Updating index entries for document '%s'\", e.key);\n        const r = [];\n        return function(t, e, n, s, i) {\n            const r = t.getIterator(), o = e.getIterator();\n            let u = ve(r), c = ve(o);\n            // Walk through the two sets at the same time, using the ordering defined by\n            // `comparator`.\n            for (;u || c; ) {\n                let t = !1, e = !1;\n                if (u && c) {\n                    const s = n(u, c);\n                    s < 0 ? \n                    // The element was removed if the next element in our ordered\n                    // walkthrough is only in `before`.\n                    e = !0 : s > 0 && (\n                    // The element was added if the next element in our ordered walkthrough\n                    // is only in `after`.\n                    t = !0);\n                } else null != u ? e = !0 : t = !0;\n                t ? (s(c), c = ve(o)) : e ? (i(u), u = ve(r)) : (u = ve(r), c = ve(o));\n            }\n        }(s, i, Mr, (\n        /* onAdd= */ s => {\n            r.push(this.Rn(t, e, n, s));\n        }), (\n        /* onRemove= */ s => {\n            r.push(this.Pn(t, e, n, s));\n        })), Rt.waitFor(r);\n    }\n    Tn(t) {\n        let e = 1;\n        return to(t).X({\n            index: \"sequenceNumberIndex\",\n            reverse: !0,\n            range: IDBKeyRange.upperBound([ this.uid, Number.MAX_SAFE_INTEGER ])\n        }, ((t, n, s) => {\n            s.done(), e = n.sequenceNumber + 1;\n        })).next((() => e));\n    }\n    /**\n     * Returns a new set of IDB ranges that splits the existing range and excludes\n     * any values that match the `notInValue` from these ranges. As an example,\n     * '[foo > 2 && foo != 3]` becomes  `[foo > 2 && < 3, foo > 3]`.\n     */    createRange(t, e, n) {\n        // The notIn values need to be sorted and unique so that we can return a\n        // sorted set of non-overlapping ranges.\n        n = n.sort(((t, e) => Mr(t, e))).filter(((t, e, n) => !e || 0 !== Mr(t, n[e - 1])));\n        const s = [];\n        s.push(t);\n        for (const i of n) {\n            const n = Mr(i, t), r = Mr(i, e);\n            if (0 === n) \n            // `notInValue` is the lower bound. We therefore need to raise the bound\n            // to the next value.\n            s[0] = t.Je(); else if (n > 0 && r < 0) \n            // `notInValue` is in the middle of the range\n            s.push(i), s.push(i.Je()); else if (r > 0) \n            // `notInValue` (and all following values) are out of the range\n            break;\n        }\n        s.push(e);\n        const i = [];\n        for (let t = 0; t < s.length; t += 2) {\n            // If we encounter two bounds that will create an unmatchable key range,\n            // then we return an empty set of key ranges.\n            if (this.bn(s[t], s[t + 1])) return [];\n            const e = [ s[t].indexId, this.uid, s[t].arrayValue, s[t].directionalValue, Hr, [] ], n = [ s[t + 1].indexId, this.uid, s[t + 1].arrayValue, s[t + 1].directionalValue, Hr, [] ];\n            i.push(IDBKeyRange.bound(e, n));\n        }\n        return i;\n    }\n    bn(t, e) {\n        // If lower bound is greater than the upper bound, then the key\n        // range can never be matched.\n        return Mr(t, e) > 0;\n    }\n    getMinOffsetFromCollectionGroup(t, e) {\n        return this.getFieldIndexes(t, e).next(eo);\n    }\n    getMinOffset(t, e) {\n        return Rt.mapArray(this.cn(e), (e => this.an(t, e).next((t => t || O())))).next(eo);\n    }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the collectionParents\n * document store.\n */ function Yr(t) {\n    return _e(t, \"collectionParents\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the index entry object store.\n */ function Xr(t) {\n    return _e(t, \"indexEntries\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the index configuration object store.\n */ function Zr(t) {\n    return _e(t, \"indexConfiguration\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the index state object store.\n */ function to(t) {\n    return _e(t, \"indexState\");\n}\n\nfunction eo(t) {\n    F(0 !== t.length);\n    let e = t[0].indexState.offset, n = e.largestBatchId;\n    for (let s = 1; s < t.length; s++) {\n        const i = t[s].indexState.offset;\n        Tt(i, e) < 0 && (e = i), n < i.largestBatchId && (n = i.largestBatchId);\n    }\n    return new It(e.readTime, e.documentKey, n);\n}\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const no = {\n    didRun: !1,\n    sequenceNumbersCollected: 0,\n    targetsRemoved: 0,\n    documentsRemoved: 0\n};\n\nclass so {\n    constructor(\n    // When we attempt to collect, we will only do so if the cache size is greater than this\n    // threshold. Passing `COLLECTION_DISABLED` here will cause collection to always be skipped.\n    t, \n    // The percentage of sequence numbers that we will attempt to collect\n    e, \n    // A cap on the total number of sequence numbers that will be collected. This prevents\n    // us from collecting a huge number of sequence numbers if the cache has grown very large.\n    n) {\n        this.cacheSizeCollectionThreshold = t, this.percentileToCollect = e, this.maximumSequenceNumbersToCollect = n;\n    }\n    static withCacheSize(t) {\n        return new so(t, so.DEFAULT_COLLECTION_PERCENTILE, so.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT);\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Delete a mutation batch and the associated document mutations.\n * @returns A PersistencePromise of the document mutations that were removed.\n */\nfunction io(t, e, n) {\n    const s = t.store(\"mutations\"), i = t.store(\"documentMutations\"), r = [], o = IDBKeyRange.only(n.batchId);\n    let u = 0;\n    const c = s.X({\n        range: o\n    }, ((t, e, n) => (u++, n.delete())));\n    r.push(c.next((() => {\n        F(1 === u);\n    })));\n    const a = [];\n    for (const t of n.mutations) {\n        const s = zt(e, t.key.path, n.batchId);\n        r.push(i.delete(s)), a.push(t.key);\n    }\n    return Rt.waitFor(r).next((() => a));\n}\n\n/**\n * Returns an approximate size for the given document.\n */ function ro(t) {\n    if (!t) return 0;\n    let e;\n    if (t.document) e = t.document; else if (t.unknownDocument) e = t.unknownDocument; else {\n        if (!t.noDocument) throw O();\n        e = t.noDocument;\n    }\n    return JSON.stringify(e).length;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** A mutation queue for a specific user, backed by IndexedDB. */ so.DEFAULT_COLLECTION_PERCENTILE = 10, \nso.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT = 1e3, so.DEFAULT = new so(41943040, so.DEFAULT_COLLECTION_PERCENTILE, so.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT), \nso.DISABLED = new so(-1, 0, 0);\n\nclass oo {\n    constructor(\n    /**\n     * The normalized userId (e.g. null UID => \"\" userId) used to store /\n     * retrieve mutations.\n     */\n    t, e, n, s) {\n        this.userId = t, this.serializer = e, this.indexManager = n, this.referenceDelegate = s, \n        /**\n         * Caches the document keys for pending mutation batches. If the mutation\n         * has been removed from IndexedDb, the cached value may continue to\n         * be used to retrieve the batch's document keys. To remove a cached value\n         * locally, `removeCachedMutationKeys()` should be invoked either directly\n         * or through `removeMutationBatches()`.\n         *\n         * With multi-tab, when the primary client acknowledges or rejects a mutation,\n         * this cache is used by secondary clients to invalidate the local\n         * view of the documents that were previously affected by the mutation.\n         */\n        // PORTING NOTE: Multi-tab only.\n        this.Vn = {};\n    }\n    /**\n     * Creates a new mutation queue for the given user.\n     * @param user - The user for which to create a mutation queue.\n     * @param serializer - The serializer to use when persisting to IndexedDb.\n     */    static de(t, e, n, s) {\n        // TODO(mcg): Figure out what constraints there are on userIDs\n        // In particular, are there any reserved characters? are empty ids allowed?\n        // For the moment store these together in the same mutations table assuming\n        // that empty userIDs aren't allowed.\n        F(\"\" !== t.uid);\n        const i = t.isAuthenticated() ? t.uid : \"\";\n        return new oo(i, e, n, s);\n    }\n    checkEmpty(t) {\n        let e = !0;\n        const n = IDBKeyRange.bound([ this.userId, Number.NEGATIVE_INFINITY ], [ this.userId, Number.POSITIVE_INFINITY ]);\n        return co(t).X({\n            index: \"userMutationsIndex\",\n            range: n\n        }, ((t, n, s) => {\n            e = !1, s.done();\n        })).next((() => e));\n    }\n    addMutationBatch(t, e, n, s) {\n        const i = ao(t), r = co(t);\n        // The IndexedDb implementation in Chrome (and Firefox) does not handle\n        // compound indices that include auto-generated keys correctly. To ensure\n        // that the index entry is added correctly in all browsers, we perform two\n        // writes: The first write is used to retrieve the next auto-generated Batch\n        // ID, and the second write populates the index and stores the actual\n        // mutation batch.\n        // See: https://bugs.chromium.org/p/chromium/issues/detail?id=701972\n        // We write an empty object to obtain key\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return r.add({}).next((o => {\n            F(\"number\" == typeof o);\n            const u = new Zs(o, e, n, s), c = function(t, e, n) {\n                const s = n.baseMutations.map((e => ji(t.fe, e))), i = n.mutations.map((e => ji(t.fe, e)));\n                return {\n                    userId: e,\n                    batchId: n.batchId,\n                    localWriteTimeMs: n.localWriteTime.toMillis(),\n                    baseMutations: s,\n                    mutations: i\n                };\n            }(this.serializer, this.userId, u), a = [];\n            let h = new Ee(((t, e) => et(t.canonicalString(), e.canonicalString())));\n            for (const t of s) {\n                const e = zt(this.userId, t.key.path, o);\n                h = h.add(t.key.path.popLast()), a.push(r.put(c)), a.push(i.put(e, Wt));\n            }\n            return h.forEach((e => {\n                a.push(this.indexManager.addToCollectionParentIndex(t, e));\n            })), t.addOnCommittedListener((() => {\n                this.Vn[o] = u.keys();\n            })), Rt.waitFor(a).next((() => u));\n        }));\n    }\n    lookupMutationBatch(t, e) {\n        return co(t).get(e).next((t => t ? (F(t.userId === this.userId), _r(this.serializer, t)) : null));\n    }\n    /**\n     * Returns the document keys for the mutation batch with the given batchId.\n     * For primary clients, this method returns `null` after\n     * `removeMutationBatches()` has been called. Secondary clients return a\n     * cached result until `removeCachedMutationKeys()` is invoked.\n     */\n    // PORTING NOTE: Multi-tab only.\n    Sn(t, e) {\n        return this.Vn[e] ? Rt.resolve(this.Vn[e]) : this.lookupMutationBatch(t, e).next((t => {\n            if (t) {\n                const n = t.keys();\n                return this.Vn[e] = n, n;\n            }\n            return null;\n        }));\n    }\n    getNextMutationBatchAfterBatchId(t, e) {\n        const n = e + 1, s = IDBKeyRange.lowerBound([ this.userId, n ]);\n        let i = null;\n        return co(t).X({\n            index: \"userMutationsIndex\",\n            range: s\n        }, ((t, e, s) => {\n            e.userId === this.userId && (F(e.batchId >= n), i = _r(this.serializer, e)), s.done();\n        })).next((() => i));\n    }\n    getHighestUnacknowledgedBatchId(t) {\n        const e = IDBKeyRange.upperBound([ this.userId, Number.POSITIVE_INFINITY ]);\n        let n = -1;\n        return co(t).X({\n            index: \"userMutationsIndex\",\n            range: e,\n            reverse: !0\n        }, ((t, e, s) => {\n            n = e.batchId, s.done();\n        })).next((() => n));\n    }\n    getAllMutationBatches(t) {\n        const e = IDBKeyRange.bound([ this.userId, -1 ], [ this.userId, Number.POSITIVE_INFINITY ]);\n        return co(t).j(\"userMutationsIndex\", e).next((t => t.map((t => _r(this.serializer, t)))));\n    }\n    getAllMutationBatchesAffectingDocumentKey(t, e) {\n        // Scan the document-mutation index starting with a prefix starting with\n        // the given documentKey.\n        const n = jt(this.userId, e.path), s = IDBKeyRange.lowerBound(n), i = [];\n        return ao(t).X({\n            range: s\n        }, ((n, s, r) => {\n            const [o, u, c] = n, a = Gt(u);\n            // Only consider rows matching exactly the specific key of\n            // interest. Note that because we order by path first, and we\n            // order terminators before path separators, we'll encounter all\n            // the index rows for documentKey contiguously. In particular, all\n            // the rows for documentKey will occur before any rows for\n            // documents nested in a subcollection beneath documentKey so we\n            // can stop as soon as we hit any such row.\n                        if (o === this.userId && e.path.isEqual(a)) \n            // Look up the mutation batch in the store.\n            return co(t).get(c).next((t => {\n                if (!t) throw O();\n                F(t.userId === this.userId), i.push(_r(this.serializer, t));\n            }));\n            r.done();\n        })).next((() => i));\n    }\n    getAllMutationBatchesAffectingDocumentKeys(t, e) {\n        let n = new Ee(et);\n        const s = [];\n        return e.forEach((e => {\n            const i = jt(this.userId, e.path), r = IDBKeyRange.lowerBound(i), o = ao(t).X({\n                range: r\n            }, ((t, s, i) => {\n                const [r, o, u] = t, c = Gt(o);\n                // Only consider rows matching exactly the specific key of\n                // interest. Note that because we order by path first, and we\n                // order terminators before path separators, we'll encounter all\n                // the index rows for documentKey contiguously. In particular, all\n                // the rows for documentKey will occur before any rows for\n                // documents nested in a subcollection beneath documentKey so we\n                // can stop as soon as we hit any such row.\n                                r === this.userId && e.path.isEqual(c) ? n = n.add(u) : i.done();\n            }));\n            s.push(o);\n        })), Rt.waitFor(s).next((() => this.Dn(t, n)));\n    }\n    getAllMutationBatchesAffectingQuery(t, e) {\n        const n = e.path, s = n.length + 1, i = jt(this.userId, n), r = IDBKeyRange.lowerBound(i);\n        // Collect up unique batchIDs encountered during a scan of the index. Use a\n        // SortedSet to accumulate batch IDs so they can be traversed in order in a\n        // scan of the main table.\n        let o = new Ee(et);\n        return ao(t).X({\n            range: r\n        }, ((t, e, i) => {\n            const [r, u, c] = t, a = Gt(u);\n            r === this.userId && n.isPrefixOf(a) ? \n            // Rows with document keys more than one segment longer than the\n            // query path can't be matches. For example, a query on 'rooms'\n            // can't match the document /rooms/abc/messages/xyx.\n            // TODO(mcg): we'll need a different scanner when we implement\n            // ancestor queries.\n            a.length === s && (o = o.add(c)) : i.done();\n        })).next((() => this.Dn(t, o)));\n    }\n    Dn(t, e) {\n        const n = [], s = [];\n        // TODO(rockwood): Implement this using iterate.\n        return e.forEach((e => {\n            s.push(co(t).get(e).next((t => {\n                if (null === t) throw O();\n                F(t.userId === this.userId), n.push(_r(this.serializer, t));\n            })));\n        })), Rt.waitFor(s).next((() => n));\n    }\n    removeMutationBatch(t, e) {\n        return io(t.ht, this.userId, e).next((n => (t.addOnCommittedListener((() => {\n            this.Cn(e.batchId);\n        })), Rt.forEach(n, (e => this.referenceDelegate.markPotentiallyOrphaned(t, e))))));\n    }\n    /**\n     * Clears the cached keys for a mutation batch. This method should be\n     * called by secondary clients after they process mutation updates.\n     *\n     * Note that this method does not have to be called from primary clients as\n     * the corresponding cache entries are cleared when an acknowledged or\n     * rejected batch is removed from the mutation queue.\n     */\n    // PORTING NOTE: Multi-tab only\n    Cn(t) {\n        delete this.Vn[t];\n    }\n    performConsistencyCheck(t) {\n        return this.checkEmpty(t).next((e => {\n            if (!e) return Rt.resolve();\n            // Verify that there are no entries in the documentMutations index if\n            // the queue is empty.\n                        const n = IDBKeyRange.lowerBound([ this.userId ]);\n            const s = [];\n            return ao(t).X({\n                range: n\n            }, ((t, e, n) => {\n                if (t[0] === this.userId) {\n                    const e = Gt(t[1]);\n                    s.push(e);\n                } else n.done();\n            })).next((() => {\n                F(0 === s.length);\n            }));\n        }));\n    }\n    containsKey(t, e) {\n        return uo(t, this.userId, e);\n    }\n    // PORTING NOTE: Multi-tab only (state is held in memory in other clients).\n    /** Returns the mutation queue's metadata from IndexedDb. */\n    xn(t) {\n        return ho(t).get(this.userId).next((t => t || {\n            userId: this.userId,\n            lastAcknowledgedBatchId: -1,\n            lastStreamToken: \"\"\n        }));\n    }\n}\n\n/**\n * @returns true if the mutation queue for the given user contains a pending\n *         mutation for the given key.\n */ function uo(t, e, n) {\n    const s = jt(e, n.path), i = s[1], r = IDBKeyRange.lowerBound(s);\n    let o = !1;\n    return ao(t).X({\n        range: r,\n        Y: !0\n    }, ((t, n, s) => {\n        const [r, u, /*batchID*/ c] = t;\n        r === e && u === i && (o = !0), s.done();\n    })).next((() => o));\n}\n\n/** Returns true if any mutation queue contains the given document. */\n/**\n * Helper to get a typed SimpleDbStore for the mutations object store.\n */\nfunction co(t) {\n    return _e(t, \"mutations\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the mutationQueues object store.\n */ function ao(t) {\n    return _e(t, \"documentMutations\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the mutationQueues object store.\n */ function ho(t) {\n    return _e(t, \"mutationQueues\");\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Offset to ensure non-overlapping target ids. */\n/**\n * Generates monotonically increasing target IDs for sending targets to the\n * watch stream.\n *\n * The client constructs two generators, one for the target cache, and one for\n * for the sync engine (to generate limbo documents targets). These\n * generators produce non-overlapping IDs (by using even and odd IDs\n * respectively).\n *\n * By separating the target ID space, the query cache can generate target IDs\n * that persist across client restarts, while sync engine can independently\n * generate in-memory target IDs that are transient and can be reused after a\n * restart.\n */\nclass lo {\n    constructor(t) {\n        this.Nn = t;\n    }\n    next() {\n        return this.Nn += 2, this.Nn;\n    }\n    static kn() {\n        // The target cache generator must return '2' in its first call to `next()`\n        // as there is no differentiation in the protocol layer between an unset\n        // number and the number '0'. If we were to sent a target with target ID\n        // '0', the backend would consider it unset and replace it with its own ID.\n        return new lo(0);\n    }\n    static Mn() {\n        // Sync engine assigns target IDs for limbo document detection.\n        return new lo(-1);\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class fo {\n    constructor(t, e) {\n        this.referenceDelegate = t, this.serializer = e;\n    }\n    // PORTING NOTE: We don't cache global metadata for the target cache, since\n    // some of it (in particular `highestTargetId`) can be modified by secondary\n    // tabs. We could perhaps be more granular (and e.g. still cache\n    // `lastRemoteSnapshotVersion` in memory) but for simplicity we currently go\n    // to IndexedDb whenever we need to read metadata. We can revisit if it turns\n    // out to have a meaningful performance impact.\n    allocateTargetId(t) {\n        return this.$n(t).next((e => {\n            const n = new lo(e.highestTargetId);\n            return e.highestTargetId = n.next(), this.On(t, e).next((() => e.highestTargetId));\n        }));\n    }\n    getLastRemoteSnapshotVersion(t) {\n        return this.$n(t).next((t => rt.fromTimestamp(new it(t.lastRemoteSnapshotVersion.seconds, t.lastRemoteSnapshotVersion.nanoseconds))));\n    }\n    getHighestSequenceNumber(t) {\n        return this.$n(t).next((t => t.highestListenSequenceNumber));\n    }\n    setTargetsMetadata(t, e, n) {\n        return this.$n(t).next((s => (s.highestListenSequenceNumber = e, n && (s.lastRemoteSnapshotVersion = n.toTimestamp()), \n        e > s.highestListenSequenceNumber && (s.highestListenSequenceNumber = e), this.On(t, s))));\n    }\n    addTargetData(t, e) {\n        return this.Fn(t, e).next((() => this.$n(t).next((n => (n.targetCount += 1, this.Bn(e, n), \n        this.On(t, n))))));\n    }\n    updateTargetData(t, e) {\n        return this.Fn(t, e);\n    }\n    removeTargetData(t, e) {\n        return this.removeMatchingKeysForTargetId(t, e.targetId).next((() => wo(t).delete(e.targetId))).next((() => this.$n(t))).next((e => (F(e.targetCount > 0), \n        e.targetCount -= 1, this.On(t, e))));\n    }\n    /**\n     * Drops any targets with sequence number less than or equal to the upper bound, excepting those\n     * present in `activeTargetIds`. Document associations for the removed targets are also removed.\n     * Returns the number of targets removed.\n     */    removeTargets(t, e, n) {\n        let s = 0;\n        const i = [];\n        return wo(t).X(((r, o) => {\n            const u = mr(o);\n            u.sequenceNumber <= e && null === n.get(u.targetId) && (s++, i.push(this.removeTargetData(t, u)));\n        })).next((() => Rt.waitFor(i))).next((() => s));\n    }\n    /**\n     * Call provided function with each `TargetData` that we have cached.\n     */    forEachTarget(t, e) {\n        return wo(t).X(((t, n) => {\n            const s = mr(n);\n            e(s);\n        }));\n    }\n    $n(t) {\n        return _o(t).get(\"targetGlobalKey\").next((t => (F(null !== t), t)));\n    }\n    On(t, e) {\n        return _o(t).put(\"targetGlobalKey\", e);\n    }\n    Fn(t, e) {\n        return wo(t).put(gr(this.serializer, e));\n    }\n    /**\n     * In-place updates the provided metadata to account for values in the given\n     * TargetData. Saving is done separately. Returns true if there were any\n     * changes to the metadata.\n     */    Bn(t, e) {\n        let n = !1;\n        return t.targetId > e.highestTargetId && (e.highestTargetId = t.targetId, n = !0), \n        t.sequenceNumber > e.highestListenSequenceNumber && (e.highestListenSequenceNumber = t.sequenceNumber, \n        n = !0), n;\n    }\n    getTargetCount(t) {\n        return this.$n(t).next((t => t.targetCount));\n    }\n    getTargetData(t, e) {\n        // Iterating by the canonicalId may yield more than one result because\n        // canonicalId values are not required to be unique per target. This query\n        // depends on the queryTargets index to be efficient.\n        const n = $n(e), s = IDBKeyRange.bound([ n, Number.NEGATIVE_INFINITY ], [ n, Number.POSITIVE_INFINITY ]);\n        let i = null;\n        return wo(t).X({\n            range: s,\n            index: \"queryTargetsIndex\"\n        }, ((t, n, s) => {\n            const r = mr(n);\n            // After finding a potential match, check that the target is\n            // actually equal to the requested target.\n                        On(e, r.target) && (i = r, s.done());\n        })).next((() => i));\n    }\n    addMatchingKeys(t, e, n) {\n        // PORTING NOTE: The reverse index (documentsTargets) is maintained by\n        // IndexedDb.\n        const s = [], i = mo(t);\n        return e.forEach((e => {\n            const r = qt(e.path);\n            s.push(i.put({\n                targetId: n,\n                path: r\n            })), s.push(this.referenceDelegate.addReference(t, n, e));\n        })), Rt.waitFor(s);\n    }\n    removeMatchingKeys(t, e, n) {\n        // PORTING NOTE: The reverse index (documentsTargets) is maintained by\n        // IndexedDb.\n        const s = mo(t);\n        return Rt.forEach(e, (e => {\n            const i = qt(e.path);\n            return Rt.waitFor([ s.delete([ n, i ]), this.referenceDelegate.removeReference(t, n, e) ]);\n        }));\n    }\n    removeMatchingKeysForTargetId(t, e) {\n        const n = mo(t), s = IDBKeyRange.bound([ e ], [ e + 1 ], \n        /*lowerOpen=*/ !1, \n        /*upperOpen=*/ !0);\n        return n.delete(s);\n    }\n    getMatchingKeysForTargetId(t, e) {\n        const n = IDBKeyRange.bound([ e ], [ e + 1 ], \n        /*lowerOpen=*/ !1, \n        /*upperOpen=*/ !0), s = mo(t);\n        let i = gs();\n        return s.X({\n            range: n,\n            Y: !0\n        }, ((t, e, n) => {\n            const s = Gt(t[1]), r = new ht(s);\n            i = i.add(r);\n        })).next((() => i));\n    }\n    containsKey(t, e) {\n        const n = qt(e.path), s = IDBKeyRange.bound([ n ], [ st(n) ], \n        /*lowerOpen=*/ !1, \n        /*upperOpen=*/ !0);\n        let i = 0;\n        return mo(t).X({\n            index: \"documentTargetsIndex\",\n            Y: !0,\n            range: s\n        }, (([t, e], n, s) => {\n            // Having a sentinel row for a document does not count as containing that document;\n            // For the target cache, containing the document means the document is part of some\n            // target.\n            0 !== t && (i++, s.done());\n        })).next((() => i > 0));\n    }\n    /**\n     * Looks up a TargetData entry by target ID.\n     *\n     * @param targetId - The target ID of the TargetData entry to look up.\n     * @returns The cached TargetData entry, or null if the cache has no entry for\n     * the target.\n     */\n    // PORTING NOTE: Multi-tab only.\n    le(t, e) {\n        return wo(t).get(e).next((t => t ? mr(t) : null));\n    }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the queries object store.\n */ function wo(t) {\n    return _e(t, \"targets\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the target globals object store.\n */ function _o(t) {\n    return _e(t, \"targetGlobal\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the document target object store.\n */ function mo(t) {\n    return _e(t, \"targetDocuments\");\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ function go([t, e], [n, s]) {\n    const i = et(t, n);\n    return 0 === i ? et(e, s) : i;\n}\n\n/**\n * Used to calculate the nth sequence number. Keeps a rolling buffer of the\n * lowest n values passed to `addElement`, and finally reports the largest of\n * them in `maxValue`.\n */ class yo {\n    constructor(t) {\n        this.Ln = t, this.buffer = new Ee(go), this.qn = 0;\n    }\n    Un() {\n        return ++this.qn;\n    }\n    Kn(t) {\n        const e = [ t, this.Un() ];\n        if (this.buffer.size < this.Ln) this.buffer = this.buffer.add(e); else {\n            const t = this.buffer.last();\n            go(e, t) < 0 && (this.buffer = this.buffer.delete(t).add(e));\n        }\n    }\n    get maxValue() {\n        // Guaranteed to be non-empty. If we decide we are not collecting any\n        // sequence numbers, nthSequenceNumber below short-circuits. If we have\n        // decided that we are collecting n sequence numbers, it's because n is some\n        // percentage of the existing sequence numbers. That means we should never\n        // be in a situation where we are collecting sequence numbers but don't\n        // actually have any.\n        return this.buffer.last()[0];\n    }\n}\n\n/**\n * This class is responsible for the scheduling of LRU garbage collection. It handles checking\n * whether or not GC is enabled, as well as which delay to use before the next run.\n */ class po {\n    constructor(t, e, n) {\n        this.garbageCollector = t, this.asyncQueue = e, this.localStore = n, this.Gn = null;\n    }\n    start() {\n        -1 !== this.garbageCollector.params.cacheSizeCollectionThreshold && this.Qn(6e4);\n    }\n    stop() {\n        this.Gn && (this.Gn.cancel(), this.Gn = null);\n    }\n    get started() {\n        return null !== this.Gn;\n    }\n    Qn(t) {\n        N(\"LruGarbageCollector\", `Garbage collection scheduled in ${t}ms`), this.Gn = this.asyncQueue.enqueueAfterDelay(\"lru_garbage_collection\" /* TimerId.LruGarbageCollection */ , t, (async () => {\n            this.Gn = null;\n            try {\n                await this.localStore.collectGarbage(this.garbageCollector);\n            } catch (t) {\n                Dt(t) ? N(\"LruGarbageCollector\", \"Ignoring IndexedDB error during garbage collection: \", t) : await vt(t);\n            }\n            await this.Qn(3e5);\n        }));\n    }\n}\n\n/**\n * Implements the steps for LRU garbage collection.\n */ class Io {\n    constructor(t, e) {\n        this.jn = t, this.params = e;\n    }\n    calculateTargetCount(t, e) {\n        return this.jn.zn(t).next((t => Math.floor(e / 100 * t)));\n    }\n    nthSequenceNumber(t, e) {\n        if (0 === e) return Rt.resolve(Ot.ct);\n        const n = new yo(e);\n        return this.jn.forEachTarget(t, (t => n.Kn(t.sequenceNumber))).next((() => this.jn.Wn(t, (t => n.Kn(t))))).next((() => n.maxValue));\n    }\n    removeTargets(t, e, n) {\n        return this.jn.removeTargets(t, e, n);\n    }\n    removeOrphanedDocuments(t, e) {\n        return this.jn.removeOrphanedDocuments(t, e);\n    }\n    collect(t, e) {\n        return -1 === this.params.cacheSizeCollectionThreshold ? (N(\"LruGarbageCollector\", \"Garbage collection skipped; disabled\"), \n        Rt.resolve(no)) : this.getCacheSize(t).next((n => n < this.params.cacheSizeCollectionThreshold ? (N(\"LruGarbageCollector\", `Garbage collection skipped; Cache size ${n} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`), \n        no) : this.Hn(t, e)));\n    }\n    getCacheSize(t) {\n        return this.jn.getCacheSize(t);\n    }\n    Hn(t, e) {\n        let n, s, i, r, o, c, a;\n        const h = Date.now();\n        return this.calculateTargetCount(t, this.params.percentileToCollect).next((e => (\n        // Cap at the configured max\n        e > this.params.maximumSequenceNumbersToCollect ? (N(\"LruGarbageCollector\", `Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${e}`), \n        s = this.params.maximumSequenceNumbersToCollect) : s = e, r = Date.now(), this.nthSequenceNumber(t, s)))).next((s => (n = s, \n        o = Date.now(), this.removeTargets(t, n, e)))).next((e => (i = e, c = Date.now(), \n        this.removeOrphanedDocuments(t, n)))).next((t => {\n            if (a = Date.now(), C() <= LogLevel.DEBUG) {\n                N(\"LruGarbageCollector\", `LRU Garbage Collection\\n\\tCounted targets in ${r - h}ms\\n\\tDetermined least recently used ${s} in ` + (o - r) + \"ms\\n\" + `\\tRemoved ${i} targets in ` + (c - o) + \"ms\\n\" + `\\tRemoved ${t} documents in ` + (a - c) + \"ms\\n\" + `Total Duration: ${a - h}ms`);\n            }\n            return Rt.resolve({\n                didRun: !0,\n                sequenceNumbersCollected: s,\n                targetsRemoved: i,\n                documentsRemoved: t\n            });\n        }));\n    }\n}\n\nfunction To(t, e) {\n    return new Io(t, e);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Provides LRU functionality for IndexedDB persistence. */ class Eo {\n    constructor(t, e) {\n        this.db = t, this.garbageCollector = To(this, e);\n    }\n    zn(t) {\n        const e = this.Jn(t);\n        return this.db.getTargetCache().getTargetCount(t).next((t => e.next((e => t + e))));\n    }\n    Jn(t) {\n        let e = 0;\n        return this.Wn(t, (t => {\n            e++;\n        })).next((() => e));\n    }\n    forEachTarget(t, e) {\n        return this.db.getTargetCache().forEachTarget(t, e);\n    }\n    Wn(t, e) {\n        return this.Yn(t, ((t, n) => e(n)));\n    }\n    addReference(t, e, n) {\n        return Ao(t, n);\n    }\n    removeReference(t, e, n) {\n        return Ao(t, n);\n    }\n    removeTargets(t, e, n) {\n        return this.db.getTargetCache().removeTargets(t, e, n);\n    }\n    markPotentiallyOrphaned(t, e) {\n        return Ao(t, e);\n    }\n    /**\n     * Returns true if anything would prevent this document from being garbage\n     * collected, given that the document in question is not present in any\n     * targets and has a sequence number less than or equal to the upper bound for\n     * the collection run.\n     */    Xn(t, e) {\n        return function(t, e) {\n            let n = !1;\n            return ho(t).Z((s => uo(t, s, e).next((t => (t && (n = !0), Rt.resolve(!t)))))).next((() => n));\n        }(t, e);\n    }\n    removeOrphanedDocuments(t, e) {\n        const n = this.db.getRemoteDocumentCache().newChangeBuffer(), s = [];\n        let i = 0;\n        return this.Yn(t, ((r, o) => {\n            if (o <= e) {\n                const e = this.Xn(t, r).next((e => {\n                    if (!e) \n                    // Our size accounting requires us to read all documents before\n                    // removing them.\n                    return i++, n.getEntry(t, r).next((() => (n.removeEntry(r, rt.min()), mo(t).delete([ 0, qt(r.path) ]))));\n                }));\n                s.push(e);\n            }\n        })).next((() => Rt.waitFor(s))).next((() => n.apply(t))).next((() => i));\n    }\n    removeTarget(t, e) {\n        const n = e.withSequenceNumber(t.currentSequenceNumber);\n        return this.db.getTargetCache().updateTargetData(t, n);\n    }\n    updateLimboDocument(t, e) {\n        return Ao(t, e);\n    }\n    /**\n     * Call provided function for each document in the cache that is 'orphaned'. Orphaned\n     * means not a part of any target, so the only entry in the target-document index for\n     * that document will be the sentinel row (targetId 0), which will also have the sequence\n     * number for the last time the document was accessed.\n     */    Yn(t, e) {\n        const n = mo(t);\n        let s, i = Ot.ct;\n        return n.X({\n            index: \"documentTargetsIndex\"\n        }, (([t, n], {path: r, sequenceNumber: o}) => {\n            0 === t ? (\n            // if nextToReport is valid, report it, this is a new key so the\n            // last one must not be a member of any targets.\n            i !== Ot.ct && e(new ht(Gt(s)), i), \n            // set nextToReport to be this sequence number. It's the next one we\n            // might report, if we don't find any targets for this document.\n            // Note that the sequence number must be defined when the targetId\n            // is 0.\n            i = o, s = r) : \n            // set nextToReport to be invalid, we know we don't need to report\n            // this one since we found a target for it.\n            i = Ot.ct;\n        })).next((() => {\n            // Since we report sequence numbers after getting to the next key, we\n            // need to check if the last key we iterated over was an orphaned\n            // document and report it.\n            i !== Ot.ct && e(new ht(Gt(s)), i);\n        }));\n    }\n    getCacheSize(t) {\n        return this.db.getRemoteDocumentCache().getSize(t);\n    }\n}\n\nfunction Ao(t, e) {\n    return mo(t).put(\n    /**\n * @returns A value suitable for writing a sentinel row in the target-document\n * store.\n */\n    function(t, e) {\n        return {\n            targetId: 0,\n            path: qt(t.path),\n            sequenceNumber: e\n        };\n    }(e, t.currentSequenceNumber));\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An in-memory buffer of entries to be written to a RemoteDocumentCache.\n * It can be used to batch up a set of changes to be written to the cache, but\n * additionally supports reading entries back with the `getEntry()` method,\n * falling back to the underlying RemoteDocumentCache if no entry is\n * buffered.\n *\n * Entries added to the cache *must* be read first. This is to facilitate\n * calculating the size delta of the pending changes.\n *\n * PORTING NOTE: This class was implemented then removed from other platforms.\n * If byte-counting ends up being needed on the other platforms, consider\n * porting this class as part of that implementation work.\n */ class vo {\n    constructor() {\n        // A mapping of document key to the new cache entry that should be written.\n        this.changes = new os((t => t.toString()), ((t, e) => t.isEqual(e))), this.changesApplied = !1;\n    }\n    /**\n     * Buffers a `RemoteDocumentCache.addEntry()` call.\n     *\n     * You can only modify documents that have already been retrieved via\n     * `getEntry()/getEntries()` (enforced via IndexedDbs `apply()`).\n     */    addEntry(t) {\n        this.assertNotApplied(), this.changes.set(t.key, t);\n    }\n    /**\n     * Buffers a `RemoteDocumentCache.removeEntry()` call.\n     *\n     * You can only remove documents that have already been retrieved via\n     * `getEntry()/getEntries()` (enforced via IndexedDbs `apply()`).\n     */    removeEntry(t, e) {\n        this.assertNotApplied(), this.changes.set(t, an.newInvalidDocument(t).setReadTime(e));\n    }\n    /**\n     * Looks up an entry in the cache. The buffered changes will first be checked,\n     * and if no buffered change applies, this will forward to\n     * `RemoteDocumentCache.getEntry()`.\n     *\n     * @param transaction - The transaction in which to perform any persistence\n     *     operations.\n     * @param documentKey - The key of the entry to look up.\n     * @returns The cached document or an invalid document if we have nothing\n     * cached.\n     */    getEntry(t, e) {\n        this.assertNotApplied();\n        const n = this.changes.get(e);\n        return void 0 !== n ? Rt.resolve(n) : this.getFromCache(t, e);\n    }\n    /**\n     * Looks up several entries in the cache, forwarding to\n     * `RemoteDocumentCache.getEntry()`.\n     *\n     * @param transaction - The transaction in which to perform any persistence\n     *     operations.\n     * @param documentKeys - The keys of the entries to look up.\n     * @returns A map of cached documents, indexed by key. If an entry cannot be\n     *     found, the corresponding key will be mapped to an invalid document.\n     */    getEntries(t, e) {\n        return this.getAllFromCache(t, e);\n    }\n    /**\n     * Applies buffered changes to the underlying RemoteDocumentCache, using\n     * the provided transaction.\n     */    apply(t) {\n        return this.assertNotApplied(), this.changesApplied = !0, this.applyChanges(t);\n    }\n    /** Helper to assert this.changes is not null  */    assertNotApplied() {}\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The RemoteDocumentCache for IndexedDb. To construct, invoke\n * `newIndexedDbRemoteDocumentCache()`.\n */ class Ro {\n    constructor(t) {\n        this.serializer = t;\n    }\n    setIndexManager(t) {\n        this.indexManager = t;\n    }\n    /**\n     * Adds the supplied entries to the cache.\n     *\n     * All calls of `addEntry` are required to go through the RemoteDocumentChangeBuffer\n     * returned by `newChangeBuffer()` to ensure proper accounting of metadata.\n     */    addEntry(t, e, n) {\n        return So(t).put(n);\n    }\n    /**\n     * Removes a document from the cache.\n     *\n     * All calls of `removeEntry`  are required to go through the RemoteDocumentChangeBuffer\n     * returned by `newChangeBuffer()` to ensure proper accounting of metadata.\n     */    removeEntry(t, e, n) {\n        return So(t).delete(\n        /**\n * Returns a key that can be used for document lookups via the primary key of\n * the DbRemoteDocument object store.\n */\n        function(t, e) {\n            const n = t.path.toArray();\n            return [ \n            /* prefix path */ n.slice(0, n.length - 2), \n            /* collection id */ n[n.length - 2], fr(e), \n            /* document id */ n[n.length - 1] ];\n        }\n        /**\n * Returns a key that can be used for document lookups on the\n * `DbRemoteDocumentDocumentCollectionGroupIndex` index.\n */ (e, n));\n    }\n    /**\n     * Updates the current cache size.\n     *\n     * Callers to `addEntry()` and `removeEntry()` *must* call this afterwards to update the\n     * cache's metadata.\n     */    updateMetadata(t, e) {\n        return this.getMetadata(t).next((n => (n.byteSize += e, this.Zn(t, n))));\n    }\n    getEntry(t, e) {\n        let n = an.newInvalidDocument(e);\n        return So(t).X({\n            index: \"documentKeyIndex\",\n            range: IDBKeyRange.only(Do(e))\n        }, ((t, s) => {\n            n = this.ts(e, s);\n        })).next((() => n));\n    }\n    /**\n     * Looks up an entry in the cache.\n     *\n     * @param documentKey - The key of the entry to look up.\n     * @returns The cached document entry and its size.\n     */    es(t, e) {\n        let n = {\n            size: 0,\n            document: an.newInvalidDocument(e)\n        };\n        return So(t).X({\n            index: \"documentKeyIndex\",\n            range: IDBKeyRange.only(Do(e))\n        }, ((t, s) => {\n            n = {\n                document: this.ts(e, s),\n                size: ro(s)\n            };\n        })).next((() => n));\n    }\n    getEntries(t, e) {\n        let n = cs();\n        return this.ns(t, e, ((t, e) => {\n            const s = this.ts(t, e);\n            n = n.insert(t, s);\n        })).next((() => n));\n    }\n    /**\n     * Looks up several entries in the cache.\n     *\n     * @param documentKeys - The set of keys entries to look up.\n     * @returns A map of documents indexed by key and a map of sizes indexed by\n     *     key (zero if the document does not exist).\n     */    ss(t, e) {\n        let n = cs(), s = new pe(ht.comparator);\n        return this.ns(t, e, ((t, e) => {\n            const i = this.ts(t, e);\n            n = n.insert(t, i), s = s.insert(t, ro(e));\n        })).next((() => ({\n            documents: n,\n            rs: s\n        })));\n    }\n    ns(t, e, n) {\n        if (e.isEmpty()) return Rt.resolve();\n        let s = new Ee(xo);\n        e.forEach((t => s = s.add(t)));\n        const i = IDBKeyRange.bound(Do(s.first()), Do(s.last())), r = s.getIterator();\n        let o = r.getNext();\n        return So(t).X({\n            index: \"documentKeyIndex\",\n            range: i\n        }, ((t, e, s) => {\n            const i = ht.fromSegments([ ...e.prefixPath, e.collectionGroup, e.documentId ]);\n            // Go through keys not found in cache.\n                        for (;o && xo(o, i) < 0; ) n(o, null), o = r.getNext();\n            o && o.isEqual(i) && (\n            // Key found in cache.\n            n(o, e), o = r.hasNext() ? r.getNext() : null), \n            // Skip to the next key (if there is one).\n            o ? s.G(Do(o)) : s.done();\n        })).next((() => {\n            // The rest of the keys are not in the cache. One case where `iterate`\n            // above won't go through them is when the cache is empty.\n            for (;o; ) n(o, null), o = r.hasNext() ? r.getNext() : null;\n        }));\n    }\n    getDocumentsMatchingQuery(t, e, n, s) {\n        const i = e.path, r = [ i.popLast().toArray(), i.lastSegment(), fr(n.readTime), n.documentKey.path.isEmpty() ? \"\" : n.documentKey.path.lastSegment() ], o = [ i.popLast().toArray(), i.lastSegment(), [ Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER ], \"\" ];\n        return So(t).j(IDBKeyRange.bound(r, o, !0)).next((t => {\n            let n = cs();\n            for (const i of t) {\n                const t = this.ts(ht.fromSegments(i.prefixPath.concat(i.collectionGroup, i.documentId)), i);\n                t.isFoundDocument() && (ns(e, t) || s.has(t.key)) && (\n                // Either the document matches the given query, or it is mutated.\n                n = n.insert(t.key, t));\n            }\n            return n;\n        }));\n    }\n    getAllFromCollectionGroup(t, e, n, s) {\n        let i = cs();\n        const r = Co(e, n), o = Co(e, It.max());\n        return So(t).X({\n            index: \"collectionGroupIndex\",\n            range: IDBKeyRange.bound(r, o, !0)\n        }, ((t, e, n) => {\n            const r = this.ts(ht.fromSegments(e.prefixPath.concat(e.collectionGroup, e.documentId)), e);\n            i = i.insert(r.key, r), i.size === s && n.done();\n        })).next((() => i));\n    }\n    newChangeBuffer(t) {\n        return new bo(this, !!t && t.trackRemovals);\n    }\n    getSize(t) {\n        return this.getMetadata(t).next((t => t.byteSize));\n    }\n    getMetadata(t) {\n        return Vo(t).get(\"remoteDocumentGlobalKey\").next((t => (F(!!t), t)));\n    }\n    Zn(t, e) {\n        return Vo(t).put(\"remoteDocumentGlobalKey\", e);\n    }\n    /**\n     * Decodes `dbRemoteDoc` and returns the document (or an invalid document if\n     * the document corresponds to the format used for sentinel deletes).\n     */    ts(t, e) {\n        if (e) {\n            const t = hr(this.serializer, e);\n            // Whether the document is a sentinel removal and should only be used in the\n            // `getNewDocumentChanges()`\n                        if (!(t.isNoDocument() && t.version.isEqual(rt.min()))) return t;\n        }\n        return an.newInvalidDocument(t);\n    }\n}\n\n/** Creates a new IndexedDbRemoteDocumentCache. */ function Po(t) {\n    return new Ro(t);\n}\n\n/**\n * Handles the details of adding and updating documents in the IndexedDbRemoteDocumentCache.\n *\n * Unlike the MemoryRemoteDocumentChangeBuffer, the IndexedDb implementation computes the size\n * delta for all submitted changes. This avoids having to re-read all documents from IndexedDb\n * when we apply the changes.\n */ class bo extends vo {\n    /**\n     * @param documentCache - The IndexedDbRemoteDocumentCache to apply the changes to.\n     * @param trackRemovals - Whether to create sentinel deletes that can be tracked by\n     * `getNewDocumentChanges()`.\n     */\n    constructor(t, e) {\n        super(), this.os = t, this.trackRemovals = e, \n        // A map of document sizes and read times prior to applying the changes in\n        // this buffer.\n        this.us = new os((t => t.toString()), ((t, e) => t.isEqual(e)));\n    }\n    applyChanges(t) {\n        const e = [];\n        let n = 0, s = new Ee(((t, e) => et(t.canonicalString(), e.canonicalString())));\n        return this.changes.forEach(((i, r) => {\n            const o = this.us.get(i);\n            if (e.push(this.os.removeEntry(t, i, o.readTime)), r.isValidDocument()) {\n                const u = lr(this.os.serializer, r);\n                s = s.add(i.path.popLast());\n                const c = ro(u);\n                n += c - o.size, e.push(this.os.addEntry(t, i, u));\n            } else if (n -= o.size, this.trackRemovals) {\n                // In order to track removals, we store a \"sentinel delete\" in the\n                // RemoteDocumentCache. This entry is represented by a NoDocument\n                // with a version of 0 and ignored by `maybeDecodeDocument()` but\n                // preserved in `getNewDocumentChanges()`.\n                const n = lr(this.os.serializer, r.convertToNoDocument(rt.min()));\n                e.push(this.os.addEntry(t, i, n));\n            }\n        })), s.forEach((n => {\n            e.push(this.os.indexManager.addToCollectionParentIndex(t, n));\n        })), e.push(this.os.updateMetadata(t, n)), Rt.waitFor(e);\n    }\n    getFromCache(t, e) {\n        // Record the size of everything we load from the cache so we can compute a delta later.\n        return this.os.es(t, e).next((t => (this.us.set(e, {\n            size: t.size,\n            readTime: t.document.readTime\n        }), t.document)));\n    }\n    getAllFromCache(t, e) {\n        // Record the size of everything we load from the cache so we can compute\n        // a delta later.\n        return this.os.ss(t, e).next((({documents: t, rs: e}) => (\n        // Note: `getAllFromCache` returns two maps instead of a single map from\n        // keys to `DocumentSizeEntry`s. This is to allow returning the\n        // `MutableDocumentMap` directly, without a conversion.\n        e.forEach(((e, n) => {\n            this.us.set(e, {\n                size: n,\n                readTime: t.get(e).readTime\n            });\n        })), t)));\n    }\n}\n\nfunction Vo(t) {\n    return _e(t, \"remoteDocumentGlobal\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the remoteDocuments object store.\n */ function So(t) {\n    return _e(t, \"remoteDocumentsV14\");\n}\n\n/**\n * Returns a key that can be used for document lookups on the\n * `DbRemoteDocumentDocumentKeyIndex` index.\n */ function Do(t) {\n    const e = t.path.toArray();\n    return [ \n    /* prefix path */ e.slice(0, e.length - 2), \n    /* collection id */ e[e.length - 2], \n    /* document id */ e[e.length - 1] ];\n}\n\nfunction Co(t, e) {\n    const n = e.documentKey.path.toArray();\n    return [ \n    /* collection id */ t, fr(e.readTime), \n    /* prefix path */ n.slice(0, n.length - 2), \n    /* document id */ n.length > 0 ? n[n.length - 1] : \"\" ];\n}\n\n/**\n * Comparator that compares document keys according to the primary key sorting\n * used by the `DbRemoteDocumentDocument` store (by prefix path, collection id\n * and then document ID).\n *\n * Visible for testing.\n */ function xo(t, e) {\n    const n = t.path.toArray(), s = e.path.toArray();\n    // The ordering is based on https://chromium.googlesource.com/chromium/blink/+/fe5c21fef94dae71c1c3344775b8d8a7f7e6d9ec/Source/modules/indexeddb/IDBKey.cpp#74\n    let i = 0;\n    for (let t = 0; t < n.length - 2 && t < s.length - 2; ++t) if (i = et(n[t], s[t]), \n    i) return i;\n    return i = et(n.length, s.length), i || (i = et(n[n.length - 2], s[s.length - 2]), \n    i || et(n[n.length - 1], s[s.length - 1]));\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Schema Version for the Web client:\n * 1.  Initial version including Mutation Queue, Query Cache, and Remote\n *     Document Cache\n * 2.  Used to ensure a targetGlobal object exists and add targetCount to it. No\n *     longer required because migration 3 unconditionally clears it.\n * 3.  Dropped and re-created Query Cache to deal with cache corruption related\n *     to limbo resolution. Addresses\n *     https://github.com/firebase/firebase-ios-sdk/issues/1548\n * 4.  Multi-Tab Support.\n * 5.  Removal of held write acks.\n * 6.  Create document global for tracking document cache size.\n * 7.  Ensure every cached document has a sentinel row with a sequence number.\n * 8.  Add collection-parent index for Collection Group queries.\n * 9.  Change RemoteDocumentChanges store to be keyed by readTime rather than\n *     an auto-incrementing ID. This is required for Index-Free queries.\n * 10. Rewrite the canonical IDs to the explicit Protobuf-based format.\n * 11. Add bundles and named_queries for bundle support.\n * 12. Add document overlays.\n * 13. Rewrite the keys of the remote document cache to allow for efficient\n *     document lookup via `getAll()`.\n * 14. Add overlays.\n * 15. Add indexing support.\n */\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a local view (overlay) of a document, and the fields that are\n * locally mutated.\n */\nclass No {\n    constructor(t, \n    /**\n     * The fields that are locally mutated by patch mutations.\n     *\n     * If the overlayed\tdocument is from set or delete mutations, this is `null`.\n     * If there is no overlay (mutation) for the document, this is an empty `FieldMask`.\n     */\n    e) {\n        this.overlayedDocument = t, this.mutatedFields = e;\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A readonly view of the local state of all documents we're tracking (i.e. we\n * have a cached version in remoteDocumentCache or local mutations for the\n * document). The view is computed by applying the mutations in the\n * MutationQueue to the RemoteDocumentCache.\n */ class ko {\n    constructor(t, e, n, s) {\n        this.remoteDocumentCache = t, this.mutationQueue = e, this.documentOverlayCache = n, \n        this.indexManager = s;\n    }\n    /**\n     * Get the local view of the document identified by `key`.\n     *\n     * @returns Local view of the document or null if we don't have any cached\n     * state for it.\n     */    getDocument(t, e) {\n        let n = null;\n        return this.documentOverlayCache.getOverlay(t, e).next((s => (n = s, this.remoteDocumentCache.getEntry(t, e)))).next((t => (null !== n && Ks(n.mutation, t, Re.empty(), it.now()), \n        t)));\n    }\n    /**\n     * Gets the local view of the documents identified by `keys`.\n     *\n     * If we don't have cached state for a document in `keys`, a NoDocument will\n     * be stored for that key in the resulting set.\n     */    getDocuments(t, e) {\n        return this.remoteDocumentCache.getEntries(t, e).next((e => this.getLocalViewOfDocuments(t, e, gs()).next((() => e))));\n    }\n    /**\n     * Similar to `getDocuments`, but creates the local view from the given\n     * `baseDocs` without retrieving documents from the local store.\n     *\n     * @param transaction - The transaction this operation is scoped to.\n     * @param docs - The documents to apply local mutations to get the local views.\n     * @param existenceStateChanged - The set of document keys whose existence state\n     *   is changed. This is useful to determine if some documents overlay needs\n     *   to be recalculated.\n     */    getLocalViewOfDocuments(t, e, n = gs()) {\n        const s = fs();\n        return this.populateOverlays(t, s, e).next((() => this.computeViews(t, e, s, n).next((t => {\n            let e = hs();\n            return t.forEach(((t, n) => {\n                e = e.insert(t, n.overlayedDocument);\n            })), e;\n        }))));\n    }\n    /**\n     * Gets the overlayed documents for the given document map, which will include\n     * the local view of those documents and a `FieldMask` indicating which fields\n     * are mutated locally, `null` if overlay is a Set or Delete mutation.\n     */    getOverlayedDocuments(t, e) {\n        const n = fs();\n        return this.populateOverlays(t, n, e).next((() => this.computeViews(t, e, n, gs())));\n    }\n    /**\n     * Fetches the overlays for {@code docs} and adds them to provided overlay map\n     * if the map does not already contain an entry for the given document key.\n     */    populateOverlays(t, e, n) {\n        const s = [];\n        return n.forEach((t => {\n            e.has(t) || s.push(t);\n        })), this.documentOverlayCache.getOverlays(t, s).next((t => {\n            t.forEach(((t, n) => {\n                e.set(t, n);\n            }));\n        }));\n    }\n    /**\n     * Computes the local view for the given documents.\n     *\n     * @param docs - The documents to compute views for. It also has the base\n     *   version of the documents.\n     * @param overlays - The overlays that need to be applied to the given base\n     *   version of the documents.\n     * @param existenceStateChanged - A set of documents whose existence states\n     *   might have changed. This is used to determine if we need to re-calculate\n     *   overlays from mutation queues.\n     * @return A map represents the local documents view.\n     */    computeViews(t, e, n, s) {\n        let i = cs();\n        const r = ws(), o = ws();\n        return e.forEach(((t, e) => {\n            const o = n.get(e.key);\n            // Recalculate an overlay if the document's existence state changed due to\n            // a remote event *and* the overlay is a PatchMutation. This is because\n            // document existence state can change if some patch mutation's\n            // preconditions are met.\n            // NOTE: we recalculate when `overlay` is undefined as well, because there\n            // might be a patch mutation whose precondition does not match before the\n            // change (hence overlay is undefined), but would now match.\n                        s.has(e.key) && (void 0 === o || o.mutation instanceof zs) ? i = i.insert(e.key, e) : void 0 !== o ? (r.set(e.key, o.mutation.getFieldMask()), \n            Ks(o.mutation, e, o.mutation.getFieldMask(), it.now())) : \n            // no overlay exists\n            // Using EMPTY to indicate there is no overlay for the document.\n            r.set(e.key, Re.empty());\n        })), this.recalculateAndSaveOverlays(t, i).next((t => (t.forEach(((t, e) => r.set(t, e))), \n        e.forEach(((t, e) => {\n            var n;\n            return o.set(t, new No(e, null !== (n = r.get(t)) && void 0 !== n ? n : null));\n        })), o)));\n    }\n    recalculateAndSaveOverlays(t, e) {\n        const n = ws();\n        // A reverse lookup map from batch id to the documents within that batch.\n                let s = new pe(((t, e) => t - e)), i = gs();\n        return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(t, e).next((t => {\n            for (const i of t) i.keys().forEach((t => {\n                const r = e.get(t);\n                if (null === r) return;\n                let o = n.get(t) || Re.empty();\n                o = i.applyToLocalView(r, o), n.set(t, o);\n                const u = (s.get(i.batchId) || gs()).add(t);\n                s = s.insert(i.batchId, u);\n            }));\n        })).next((() => {\n            const r = [], o = s.getReverseIterator();\n            // Iterate in descending order of batch IDs, and skip documents that are\n            // already saved.\n                        for (;o.hasNext(); ) {\n                const s = o.getNext(), u = s.key, c = s.value, a = ds();\n                c.forEach((t => {\n                    if (!i.has(t)) {\n                        const s = qs(e.get(t), n.get(t));\n                        null !== s && a.set(t, s), i = i.add(t);\n                    }\n                })), r.push(this.documentOverlayCache.saveOverlays(t, u, a));\n            }\n            return Rt.waitFor(r);\n        })).next((() => n));\n    }\n    /**\n     * Recalculates overlays by reading the documents from remote document cache\n     * first, and saves them after they are calculated.\n     */    recalculateAndSaveOverlaysForDocumentKeys(t, e) {\n        return this.remoteDocumentCache.getEntries(t, e).next((e => this.recalculateAndSaveOverlays(t, e)));\n    }\n    /**\n     * Performs a query against the local view of all documents.\n     *\n     * @param transaction - The persistence transaction.\n     * @param query - The query to match documents against.\n     * @param offset - Read time and key to start scanning by (exclusive).\n     */    getDocumentsMatchingQuery(t, e, n) {\n        /**\n * Returns whether the query matches a single document by path (rather than a\n * collection).\n */\n        return function(t) {\n            return ht.isDocumentKey(t.path) && null === t.collectionGroup && 0 === t.filters.length;\n        }(e) ? this.getDocumentsMatchingDocumentQuery(t, e.path) : Wn(e) ? this.getDocumentsMatchingCollectionGroupQuery(t, e, n) : this.getDocumentsMatchingCollectionQuery(t, e, n);\n    }\n    /**\n     * Given a collection group, returns the next documents that follow the provided offset, along\n     * with an updated batch ID.\n     *\n     * <p>The documents returned by this method are ordered by remote version from the provided\n     * offset. If there are no more remote documents after the provided offset, documents with\n     * mutations in order of batch id from the offset are returned. Since all documents in a batch are\n     * returned together, the total number of documents returned can exceed {@code count}.\n     *\n     * @param transaction\n     * @param collectionGroup The collection group for the documents.\n     * @param offset The offset to index into.\n     * @param count The number of documents to return\n     * @return A LocalWriteResult with the documents that follow the provided offset and the last processed batch id.\n     */    getNextDocuments(t, e, n, s) {\n        return this.remoteDocumentCache.getAllFromCollectionGroup(t, e, n, s).next((i => {\n            const r = s - i.size > 0 ? this.documentOverlayCache.getOverlaysForCollectionGroup(t, e, n.largestBatchId, s - i.size) : Rt.resolve(fs());\n            // The callsite will use the largest batch ID together with the latest read time to create\n            // a new index offset. Since we only process batch IDs if all remote documents have been read,\n            // no overlay will increase the overall read time. This is why we only need to special case\n            // the batch id.\n                        let o = -1, u = i;\n            return r.next((e => Rt.forEach(e, ((e, n) => (o < n.largestBatchId && (o = n.largestBatchId), \n            i.get(e) ? Rt.resolve() : this.remoteDocumentCache.getEntry(t, e).next((t => {\n                u = u.insert(e, t);\n            }))))).next((() => this.populateOverlays(t, e, i))).next((() => this.computeViews(t, u, e, gs()))).next((t => ({\n                batchId: o,\n                changes: ls(t)\n            })))));\n        }));\n    }\n    getDocumentsMatchingDocumentQuery(t, e) {\n        // Just do a simple document lookup.\n        return this.getDocument(t, new ht(e)).next((t => {\n            let e = hs();\n            return t.isFoundDocument() && (e = e.insert(t.key, t)), e;\n        }));\n    }\n    getDocumentsMatchingCollectionGroupQuery(t, e, n) {\n        const s = e.collectionGroup;\n        let i = hs();\n        return this.indexManager.getCollectionParents(t, s).next((r => Rt.forEach(r, (r => {\n            const o = function(t, e) {\n                return new Un(e, \n                /*collectionGroup=*/ null, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);\n            }(e, r.child(s));\n            return this.getDocumentsMatchingCollectionQuery(t, o, n).next((t => {\n                t.forEach(((t, e) => {\n                    i = i.insert(t, e);\n                }));\n            }));\n        })).next((() => i))));\n    }\n    getDocumentsMatchingCollectionQuery(t, e, n) {\n        // Query the remote documents and overlay mutations.\n        let s;\n        return this.documentOverlayCache.getOverlaysForCollection(t, e.path, n.largestBatchId).next((i => (s = i, \n        this.remoteDocumentCache.getDocumentsMatchingQuery(t, e, n, s)))).next((t => {\n            // As documents might match the query because of their overlay we need to\n            // include documents for all overlays in the initial document set.\n            s.forEach(((e, n) => {\n                const s = n.getKey();\n                null === t.get(s) && (t = t.insert(s, an.newInvalidDocument(s)));\n            }));\n            // Apply the overlays and match against the query.\n            let n = hs();\n            return t.forEach(((t, i) => {\n                const r = s.get(t);\n                void 0 !== r && Ks(r.mutation, i, Re.empty(), it.now()), \n                // Finally, insert the documents that still match the query\n                ns(e, i) && (n = n.insert(t, i));\n            })), n;\n        }));\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class Mo {\n    constructor(t) {\n        this.serializer = t, this.cs = new Map, this.hs = new Map;\n    }\n    getBundleMetadata(t, e) {\n        return Rt.resolve(this.cs.get(e));\n    }\n    saveBundleMetadata(t, e) {\n        /** Decodes a BundleMetadata proto into a BundleMetadata object. */\n        var n;\n        return this.cs.set(e.id, {\n            id: (n = e).id,\n            version: n.version,\n            createTime: Ni(n.createTime)\n        }), Rt.resolve();\n    }\n    getNamedQuery(t, e) {\n        return Rt.resolve(this.hs.get(e));\n    }\n    saveNamedQuery(t, e) {\n        return this.hs.set(e.name, function(t) {\n            return {\n                name: t.name,\n                query: yr(t.bundledQuery),\n                readTime: Ni(t.readTime)\n            };\n        }(e)), Rt.resolve();\n    }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An in-memory implementation of DocumentOverlayCache.\n */ class $o {\n    constructor() {\n        // A map sorted by DocumentKey, whose value is a pair of the largest batch id\n        // for the overlay and the overlay itself.\n        this.overlays = new pe(ht.comparator), this.ls = new Map;\n    }\n    getOverlay(t, e) {\n        return Rt.resolve(this.overlays.get(e));\n    }\n    getOverlays(t, e) {\n        const n = fs();\n        return Rt.forEach(e, (e => this.getOverlay(t, e).next((t => {\n            null !== t && n.set(e, t);\n        })))).next((() => n));\n    }\n    saveOverlays(t, e, n) {\n        return n.forEach(((n, s) => {\n            this.we(t, e, s);\n        })), Rt.resolve();\n    }\n    removeOverlaysForBatchId(t, e, n) {\n        const s = this.ls.get(n);\n        return void 0 !== s && (s.forEach((t => this.overlays = this.overlays.remove(t))), \n        this.ls.delete(n)), Rt.resolve();\n    }\n    getOverlaysForCollection(t, e, n) {\n        const s = fs(), i = e.length + 1, r = new ht(e.child(\"\")), o = this.overlays.getIteratorFrom(r);\n        for (;o.hasNext(); ) {\n            const t = o.getNext().value, r = t.getKey();\n            if (!e.isPrefixOf(r.path)) break;\n            // Documents from sub-collections\n                        r.path.length === i && (t.largestBatchId > n && s.set(t.getKey(), t));\n        }\n        return Rt.resolve(s);\n    }\n    getOverlaysForCollectionGroup(t, e, n, s) {\n        let i = new pe(((t, e) => t - e));\n        const r = this.overlays.getIterator();\n        for (;r.hasNext(); ) {\n            const t = r.getNext().value;\n            if (t.getKey().getCollectionGroup() === e && t.largestBatchId > n) {\n                let e = i.get(t.largestBatchId);\n                null === e && (e = fs(), i = i.insert(t.largestBatchId, e)), e.set(t.getKey(), t);\n            }\n        }\n        const o = fs(), u = i.getIterator();\n        for (;u.hasNext(); ) {\n            if (u.getNext().value.forEach(((t, e) => o.set(t, e))), o.size() >= s) break;\n        }\n        return Rt.resolve(o);\n    }\n    we(t, e, n) {\n        // Remove the association of the overlay to its batch id.\n        const s = this.overlays.get(n.key);\n        if (null !== s) {\n            const t = this.ls.get(s.largestBatchId).delete(n.key);\n            this.ls.set(s.largestBatchId, t);\n        }\n        this.overlays = this.overlays.insert(n.key, new ei(e, n));\n        // Create the association of this overlay to the given largestBatchId.\n        let i = this.ls.get(e);\n        void 0 === i && (i = gs(), this.ls.set(e, i)), this.ls.set(e, i.add(n.key));\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A collection of references to a document from some kind of numbered entity\n * (either a target ID or batch ID). As references are added to or removed from\n * the set corresponding events are emitted to a registered garbage collector.\n *\n * Each reference is represented by a DocumentReference object. Each of them\n * contains enough information to uniquely identify the reference. They are all\n * stored primarily in a set sorted by key. A document is considered garbage if\n * there's no references in that set (this can be efficiently checked thanks to\n * sorting by key).\n *\n * ReferenceSet also keeps a secondary set that contains references sorted by\n * IDs. This one is used to efficiently implement removal of all references by\n * some target ID.\n */ class Oo {\n    constructor() {\n        // A set of outstanding references to a document sorted by key.\n        this.fs = new Ee(Fo.ds), \n        // A set of outstanding references to a document sorted by target id.\n        this.ws = new Ee(Fo._s);\n    }\n    /** Returns true if the reference set contains no references. */    isEmpty() {\n        return this.fs.isEmpty();\n    }\n    /** Adds a reference to the given document key for the given ID. */    addReference(t, e) {\n        const n = new Fo(t, e);\n        this.fs = this.fs.add(n), this.ws = this.ws.add(n);\n    }\n    /** Add references to the given document keys for the given ID. */    gs(t, e) {\n        t.forEach((t => this.addReference(t, e)));\n    }\n    /**\n     * Removes a reference to the given document key for the given\n     * ID.\n     */    removeReference(t, e) {\n        this.ys(new Fo(t, e));\n    }\n    ps(t, e) {\n        t.forEach((t => this.removeReference(t, e)));\n    }\n    /**\n     * Clears all references with a given ID. Calls removeRef() for each key\n     * removed.\n     */    Is(t) {\n        const e = new ht(new ut([])), n = new Fo(e, t), s = new Fo(e, t + 1), i = [];\n        return this.ws.forEachInRange([ n, s ], (t => {\n            this.ys(t), i.push(t.key);\n        })), i;\n    }\n    Ts() {\n        this.fs.forEach((t => this.ys(t)));\n    }\n    ys(t) {\n        this.fs = this.fs.delete(t), this.ws = this.ws.delete(t);\n    }\n    Es(t) {\n        const e = new ht(new ut([])), n = new Fo(e, t), s = new Fo(e, t + 1);\n        let i = gs();\n        return this.ws.forEachInRange([ n, s ], (t => {\n            i = i.add(t.key);\n        })), i;\n    }\n    containsKey(t) {\n        const e = new Fo(t, 0), n = this.fs.firstAfterOrEqual(e);\n        return null !== n && t.isEqual(n.key);\n    }\n}\n\nclass Fo {\n    constructor(t, e) {\n        this.key = t, this.As = e;\n    }\n    /** Compare by key then by ID */    static ds(t, e) {\n        return ht.comparator(t.key, e.key) || et(t.As, e.As);\n    }\n    /** Compare by ID then by key */    static _s(t, e) {\n        return et(t.As, e.As) || ht.comparator(t.key, e.key);\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class Bo {\n    constructor(t, e) {\n        this.indexManager = t, this.referenceDelegate = e, \n        /**\n         * The set of all mutations that have been sent but not yet been applied to\n         * the backend.\n         */\n        this.mutationQueue = [], \n        /** Next value to use when assigning sequential IDs to each mutation batch. */\n        this.vs = 1, \n        /** An ordered mapping between documents and the mutations batch IDs. */\n        this.Rs = new Ee(Fo.ds);\n    }\n    checkEmpty(t) {\n        return Rt.resolve(0 === this.mutationQueue.length);\n    }\n    addMutationBatch(t, e, n, s) {\n        const i = this.vs;\n        this.vs++, this.mutationQueue.length > 0 && this.mutationQueue[this.mutationQueue.length - 1];\n        const r = new Zs(i, e, n, s);\n        this.mutationQueue.push(r);\n        // Track references by document key and index collection parents.\n        for (const e of s) this.Rs = this.Rs.add(new Fo(e.key, i)), this.indexManager.addToCollectionParentIndex(t, e.key.path.popLast());\n        return Rt.resolve(r);\n    }\n    lookupMutationBatch(t, e) {\n        return Rt.resolve(this.Ps(e));\n    }\n    getNextMutationBatchAfterBatchId(t, e) {\n        const n = e + 1, s = this.bs(n), i = s < 0 ? 0 : s;\n        // The requested batchId may still be out of range so normalize it to the\n        // start of the queue.\n                return Rt.resolve(this.mutationQueue.length > i ? this.mutationQueue[i] : null);\n    }\n    getHighestUnacknowledgedBatchId() {\n        return Rt.resolve(0 === this.mutationQueue.length ? -1 : this.vs - 1);\n    }\n    getAllMutationBatches(t) {\n        return Rt.resolve(this.mutationQueue.slice());\n    }\n    getAllMutationBatchesAffectingDocumentKey(t, e) {\n        const n = new Fo(e, 0), s = new Fo(e, Number.POSITIVE_INFINITY), i = [];\n        return this.Rs.forEachInRange([ n, s ], (t => {\n            const e = this.Ps(t.As);\n            i.push(e);\n        })), Rt.resolve(i);\n    }\n    getAllMutationBatchesAffectingDocumentKeys(t, e) {\n        let n = new Ee(et);\n        return e.forEach((t => {\n            const e = new Fo(t, 0), s = new Fo(t, Number.POSITIVE_INFINITY);\n            this.Rs.forEachInRange([ e, s ], (t => {\n                n = n.add(t.As);\n            }));\n        })), Rt.resolve(this.Vs(n));\n    }\n    getAllMutationBatchesAffectingQuery(t, e) {\n        // Use the query path as a prefix for testing if a document matches the\n        // query.\n        const n = e.path, s = n.length + 1;\n        // Construct a document reference for actually scanning the index. Unlike\n        // the prefix the document key in this reference must have an even number of\n        // segments. The empty segment can be used a suffix of the query path\n        // because it precedes all other segments in an ordered traversal.\n        let i = n;\n        ht.isDocumentKey(i) || (i = i.child(\"\"));\n        const r = new Fo(new ht(i), 0);\n        // Find unique batchIDs referenced by all documents potentially matching the\n        // query.\n                let o = new Ee(et);\n        return this.Rs.forEachWhile((t => {\n            const e = t.key.path;\n            return !!n.isPrefixOf(e) && (\n            // Rows with document keys more than one segment longer than the query\n            // path can't be matches. For example, a query on 'rooms' can't match\n            // the document /rooms/abc/messages/xyx.\n            // TODO(mcg): we'll need a different scanner when we implement\n            // ancestor queries.\n            e.length === s && (o = o.add(t.As)), !0);\n        }), r), Rt.resolve(this.Vs(o));\n    }\n    Vs(t) {\n        // Construct an array of matching batches, sorted by batchID to ensure that\n        // multiple mutations affecting the same document key are applied in order.\n        const e = [];\n        return t.forEach((t => {\n            const n = this.Ps(t);\n            null !== n && e.push(n);\n        })), e;\n    }\n    removeMutationBatch(t, e) {\n        F(0 === this.Ss(e.batchId, \"removed\")), this.mutationQueue.shift();\n        let n = this.Rs;\n        return Rt.forEach(e.mutations, (s => {\n            const i = new Fo(s.key, e.batchId);\n            return n = n.delete(i), this.referenceDelegate.markPotentiallyOrphaned(t, s.key);\n        })).next((() => {\n            this.Rs = n;\n        }));\n    }\n    Cn(t) {\n        // No-op since the memory mutation queue does not maintain a separate cache.\n    }\n    containsKey(t, e) {\n        const n = new Fo(e, 0), s = this.Rs.firstAfterOrEqual(n);\n        return Rt.resolve(e.isEqual(s && s.key));\n    }\n    performConsistencyCheck(t) {\n        return this.mutationQueue.length, Rt.resolve();\n    }\n    /**\n     * Finds the index of the given batchId in the mutation queue and asserts that\n     * the resulting index is within the bounds of the queue.\n     *\n     * @param batchId - The batchId to search for\n     * @param action - A description of what the caller is doing, phrased in passive\n     * form (e.g. \"acknowledged\" in a routine that acknowledges batches).\n     */    Ss(t, e) {\n        return this.bs(t);\n    }\n    /**\n     * Finds the index of the given batchId in the mutation queue. This operation\n     * is O(1).\n     *\n     * @returns The computed index of the batch with the given batchId, based on\n     * the state of the queue. Note this index can be negative if the requested\n     * batchId has already been remvoed from the queue or past the end of the\n     * queue if the batchId is larger than the last added batch.\n     */    bs(t) {\n        if (0 === this.mutationQueue.length) \n        // As an index this is past the end of the queue\n        return 0;\n        // Examine the front of the queue to figure out the difference between the\n        // batchId and indexes in the array. Note that since the queue is ordered\n        // by batchId, if the first batch has a larger batchId then the requested\n        // batchId doesn't exist in the queue.\n                return t - this.mutationQueue[0].batchId;\n    }\n    /**\n     * A version of lookupMutationBatch that doesn't return a promise, this makes\n     * other functions that uses this code easier to read and more efficent.\n     */    Ps(t) {\n        const e = this.bs(t);\n        if (e < 0 || e >= this.mutationQueue.length) return null;\n        return this.mutationQueue[e];\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The memory-only RemoteDocumentCache for IndexedDb. To construct, invoke\n * `newMemoryRemoteDocumentCache()`.\n */\nclass Lo {\n    /**\n     * @param sizer - Used to assess the size of a document. For eager GC, this is\n     * expected to just return 0 to avoid unnecessarily doing the work of\n     * calculating the size.\n     */\n    constructor(t) {\n        this.Ds = t, \n        /** Underlying cache of documents and their read times. */\n        this.docs = new pe(ht.comparator), \n        /** Size of all cached documents. */\n        this.size = 0;\n    }\n    setIndexManager(t) {\n        this.indexManager = t;\n    }\n    /**\n     * Adds the supplied entry to the cache and updates the cache size as appropriate.\n     *\n     * All calls of `addEntry`  are required to go through the RemoteDocumentChangeBuffer\n     * returned by `newChangeBuffer()`.\n     */    addEntry(t, e) {\n        const n = e.key, s = this.docs.get(n), i = s ? s.size : 0, r = this.Ds(e);\n        return this.docs = this.docs.insert(n, {\n            document: e.mutableCopy(),\n            size: r\n        }), this.size += r - i, this.indexManager.addToCollectionParentIndex(t, n.path.popLast());\n    }\n    /**\n     * Removes the specified entry from the cache and updates the cache size as appropriate.\n     *\n     * All calls of `removeEntry` are required to go through the RemoteDocumentChangeBuffer\n     * returned by `newChangeBuffer()`.\n     */    removeEntry(t) {\n        const e = this.docs.get(t);\n        e && (this.docs = this.docs.remove(t), this.size -= e.size);\n    }\n    getEntry(t, e) {\n        const n = this.docs.get(e);\n        return Rt.resolve(n ? n.document.mutableCopy() : an.newInvalidDocument(e));\n    }\n    getEntries(t, e) {\n        let n = cs();\n        return e.forEach((t => {\n            const e = this.docs.get(t);\n            n = n.insert(t, e ? e.document.mutableCopy() : an.newInvalidDocument(t));\n        })), Rt.resolve(n);\n    }\n    getDocumentsMatchingQuery(t, e, n, s) {\n        let i = cs();\n        // Documents are ordered by key, so we can use a prefix scan to narrow down\n        // the documents we need to match the query against.\n                const r = e.path, o = new ht(r.child(\"\")), u = this.docs.getIteratorFrom(o);\n        for (;u.hasNext(); ) {\n            const {key: t, value: {document: o}} = u.getNext();\n            if (!r.isPrefixOf(t.path)) break;\n            t.path.length > r.length + 1 || (Tt(pt(o), n) <= 0 || (s.has(o.key) || ns(e, o)) && (i = i.insert(o.key, o.mutableCopy())));\n        }\n        return Rt.resolve(i);\n    }\n    getAllFromCollectionGroup(t, e, n, s) {\n        // This method should only be called from the IndexBackfiller if persistence\n        // is enabled.\n        O();\n    }\n    Cs(t, e) {\n        return Rt.forEach(this.docs, (t => e(t)));\n    }\n    newChangeBuffer(t) {\n        // `trackRemovals` is ignores since the MemoryRemoteDocumentCache keeps\n        // a separate changelog and does not need special handling for removals.\n        return new qo(this);\n    }\n    getSize(t) {\n        return Rt.resolve(this.size);\n    }\n}\n\n/**\n * Creates a new memory-only RemoteDocumentCache.\n *\n * @param sizer - Used to assess the size of a document. For eager GC, this is\n * expected to just return 0 to avoid unnecessarily doing the work of\n * calculating the size.\n */\n/**\n * Handles the details of adding and updating documents in the MemoryRemoteDocumentCache.\n */\nclass qo extends vo {\n    constructor(t) {\n        super(), this.os = t;\n    }\n    applyChanges(t) {\n        const e = [];\n        return this.changes.forEach(((n, s) => {\n            s.isValidDocument() ? e.push(this.os.addEntry(t, s)) : this.os.removeEntry(n);\n        })), Rt.waitFor(e);\n    }\n    getFromCache(t, e) {\n        return this.os.getEntry(t, e);\n    }\n    getAllFromCache(t, e) {\n        return this.os.getEntries(t, e);\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class Uo {\n    constructor(t) {\n        this.persistence = t, \n        /**\n         * Maps a target to the data about that target\n         */\n        this.xs = new os((t => $n(t)), On), \n        /** The last received snapshot version. */\n        this.lastRemoteSnapshotVersion = rt.min(), \n        /** The highest numbered target ID encountered. */\n        this.highestTargetId = 0, \n        /** The highest sequence number encountered. */\n        this.Ns = 0, \n        /**\n         * A ordered bidirectional mapping between documents and the remote target\n         * IDs.\n         */\n        this.ks = new Oo, this.targetCount = 0, this.Ms = lo.kn();\n    }\n    forEachTarget(t, e) {\n        return this.xs.forEach(((t, n) => e(n))), Rt.resolve();\n    }\n    getLastRemoteSnapshotVersion(t) {\n        return Rt.resolve(this.lastRemoteSnapshotVersion);\n    }\n    getHighestSequenceNumber(t) {\n        return Rt.resolve(this.Ns);\n    }\n    allocateTargetId(t) {\n        return this.highestTargetId = this.Ms.next(), Rt.resolve(this.highestTargetId);\n    }\n    setTargetsMetadata(t, e, n) {\n        return n && (this.lastRemoteSnapshotVersion = n), e > this.Ns && (this.Ns = e), \n        Rt.resolve();\n    }\n    Fn(t) {\n        this.xs.set(t.target, t);\n        const e = t.targetId;\n        e > this.highestTargetId && (this.Ms = new lo(e), this.highestTargetId = e), t.sequenceNumber > this.Ns && (this.Ns = t.sequenceNumber);\n    }\n    addTargetData(t, e) {\n        return this.Fn(e), this.targetCount += 1, Rt.resolve();\n    }\n    updateTargetData(t, e) {\n        return this.Fn(e), Rt.resolve();\n    }\n    removeTargetData(t, e) {\n        return this.xs.delete(e.target), this.ks.Is(e.targetId), this.targetCount -= 1, \n        Rt.resolve();\n    }\n    removeTargets(t, e, n) {\n        let s = 0;\n        const i = [];\n        return this.xs.forEach(((r, o) => {\n            o.sequenceNumber <= e && null === n.get(o.targetId) && (this.xs.delete(r), i.push(this.removeMatchingKeysForTargetId(t, o.targetId)), \n            s++);\n        })), Rt.waitFor(i).next((() => s));\n    }\n    getTargetCount(t) {\n        return Rt.resolve(this.targetCount);\n    }\n    getTargetData(t, e) {\n        const n = this.xs.get(e) || null;\n        return Rt.resolve(n);\n    }\n    addMatchingKeys(t, e, n) {\n        return this.ks.gs(e, n), Rt.resolve();\n    }\n    removeMatchingKeys(t, e, n) {\n        this.ks.ps(e, n);\n        const s = this.persistence.referenceDelegate, i = [];\n        return s && e.forEach((e => {\n            i.push(s.markPotentiallyOrphaned(t, e));\n        })), Rt.waitFor(i);\n    }\n    removeMatchingKeysForTargetId(t, e) {\n        return this.ks.Is(e), Rt.resolve();\n    }\n    getMatchingKeysForTargetId(t, e) {\n        const n = this.ks.Es(e);\n        return Rt.resolve(n);\n    }\n    containsKey(t, e) {\n        return Rt.resolve(this.ks.containsKey(e));\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A memory-backed instance of Persistence. Data is stored only in RAM and\n * not persisted across sessions.\n */\nclass Ko {\n    /**\n     * The constructor accepts a factory for creating a reference delegate. This\n     * allows both the delegate and this instance to have strong references to\n     * each other without having nullable fields that would then need to be\n     * checked or asserted on every access.\n     */\n    constructor(t, e) {\n        this.$s = {}, this.overlays = {}, this.Os = new Ot(0), this.Fs = !1, this.Fs = !0, \n        this.referenceDelegate = t(this), this.Bs = new Uo(this);\n        this.indexManager = new zr, this.remoteDocumentCache = function(t) {\n            return new Lo(t);\n        }((t => this.referenceDelegate.Ls(t))), this.serializer = new ar(e), this.qs = new Mo(this.serializer);\n    }\n    start() {\n        return Promise.resolve();\n    }\n    shutdown() {\n        // No durable state to ensure is closed on shutdown.\n        return this.Fs = !1, Promise.resolve();\n    }\n    get started() {\n        return this.Fs;\n    }\n    setDatabaseDeletedListener() {\n        // No op.\n    }\n    setNetworkEnabled() {\n        // No op.\n    }\n    getIndexManager(t) {\n        // We do not currently support indices for memory persistence, so we can\n        // return the same shared instance of the memory index manager.\n        return this.indexManager;\n    }\n    getDocumentOverlayCache(t) {\n        let e = this.overlays[t.toKey()];\n        return e || (e = new $o, this.overlays[t.toKey()] = e), e;\n    }\n    getMutationQueue(t, e) {\n        let n = this.$s[t.toKey()];\n        return n || (n = new Bo(e, this.referenceDelegate), this.$s[t.toKey()] = n), n;\n    }\n    getTargetCache() {\n        return this.Bs;\n    }\n    getRemoteDocumentCache() {\n        return this.remoteDocumentCache;\n    }\n    getBundleCache() {\n        return this.qs;\n    }\n    runTransaction(t, e, n) {\n        N(\"MemoryPersistence\", \"Starting transaction:\", t);\n        const s = new Go(this.Os.next());\n        return this.referenceDelegate.Us(), n(s).next((t => this.referenceDelegate.Ks(s).next((() => t)))).toPromise().then((t => (s.raiseOnCommittedEvent(), \n        t)));\n    }\n    Gs(t, e) {\n        return Rt.or(Object.values(this.$s).map((n => () => n.containsKey(t, e))));\n    }\n}\n\n/**\n * Memory persistence is not actually transactional, but future implementations\n * may have transaction-scoped state.\n */ class Go extends At {\n    constructor(t) {\n        super(), this.currentSequenceNumber = t;\n    }\n}\n\nclass Qo {\n    constructor(t) {\n        this.persistence = t, \n        /** Tracks all documents that are active in Query views. */\n        this.Qs = new Oo, \n        /** The list of documents that are potentially GCed after each transaction. */\n        this.js = null;\n    }\n    static zs(t) {\n        return new Qo(t);\n    }\n    get Ws() {\n        if (this.js) return this.js;\n        throw O();\n    }\n    addReference(t, e, n) {\n        return this.Qs.addReference(n, e), this.Ws.delete(n.toString()), Rt.resolve();\n    }\n    removeReference(t, e, n) {\n        return this.Qs.removeReference(n, e), this.Ws.add(n.toString()), Rt.resolve();\n    }\n    markPotentiallyOrphaned(t, e) {\n        return this.Ws.add(e.toString()), Rt.resolve();\n    }\n    removeTarget(t, e) {\n        this.Qs.Is(e.targetId).forEach((t => this.Ws.add(t.toString())));\n        const n = this.persistence.getTargetCache();\n        return n.getMatchingKeysForTargetId(t, e.targetId).next((t => {\n            t.forEach((t => this.Ws.add(t.toString())));\n        })).next((() => n.removeTargetData(t, e)));\n    }\n    Us() {\n        this.js = new Set;\n    }\n    Ks(t) {\n        // Remove newly orphaned documents.\n        const e = this.persistence.getRemoteDocumentCache().newChangeBuffer();\n        return Rt.forEach(this.Ws, (n => {\n            const s = ht.fromPath(n);\n            return this.Hs(t, s).next((t => {\n                t || e.removeEntry(s, rt.min());\n            }));\n        })).next((() => (this.js = null, e.apply(t))));\n    }\n    updateLimboDocument(t, e) {\n        return this.Hs(t, e).next((t => {\n            t ? this.Ws.delete(e.toString()) : this.Ws.add(e.toString());\n        }));\n    }\n    Ls(t) {\n        // For eager GC, we don't care about the document size, there are no size thresholds.\n        return 0;\n    }\n    Hs(t, e) {\n        return Rt.or([ () => Rt.resolve(this.Qs.containsKey(e)), () => this.persistence.getTargetCache().containsKey(t, e), () => this.persistence.Gs(t, e) ]);\n    }\n}\n\nclass jo {\n    constructor(t, e) {\n        this.persistence = t, this.Js = new os((t => qt(t.path)), ((t, e) => t.isEqual(e))), \n        this.garbageCollector = To(this, e);\n    }\n    static zs(t, e) {\n        return new jo(t, e);\n    }\n    // No-ops, present so memory persistence doesn't have to care which delegate\n    // it has.\n    Us() {}\n    Ks(t) {\n        return Rt.resolve();\n    }\n    forEachTarget(t, e) {\n        return this.persistence.getTargetCache().forEachTarget(t, e);\n    }\n    zn(t) {\n        const e = this.Jn(t);\n        return this.persistence.getTargetCache().getTargetCount(t).next((t => e.next((e => t + e))));\n    }\n    Jn(t) {\n        let e = 0;\n        return this.Wn(t, (t => {\n            e++;\n        })).next((() => e));\n    }\n    Wn(t, e) {\n        return Rt.forEach(this.Js, ((n, s) => this.Xn(t, n, s).next((t => t ? Rt.resolve() : e(s)))));\n    }\n    removeTargets(t, e, n) {\n        return this.persistence.getTargetCache().removeTargets(t, e, n);\n    }\n    removeOrphanedDocuments(t, e) {\n        let n = 0;\n        const s = this.persistence.getRemoteDocumentCache(), i = s.newChangeBuffer();\n        return s.Cs(t, (s => this.Xn(t, s, e).next((t => {\n            t || (n++, i.removeEntry(s, rt.min()));\n        })))).next((() => i.apply(t))).next((() => n));\n    }\n    markPotentiallyOrphaned(t, e) {\n        return this.Js.set(e, t.currentSequenceNumber), Rt.resolve();\n    }\n    removeTarget(t, e) {\n        const n = e.withSequenceNumber(t.currentSequenceNumber);\n        return this.persistence.getTargetCache().updateTargetData(t, n);\n    }\n    addReference(t, e, n) {\n        return this.Js.set(n, t.currentSequenceNumber), Rt.resolve();\n    }\n    removeReference(t, e, n) {\n        return this.Js.set(n, t.currentSequenceNumber), Rt.resolve();\n    }\n    updateLimboDocument(t, e) {\n        return this.Js.set(e, t.currentSequenceNumber), Rt.resolve();\n    }\n    Ls(t) {\n        let e = t.key.toString().length;\n        return t.isFoundDocument() && (e += ze(t.data.value)), e;\n    }\n    Xn(t, e, n) {\n        return Rt.or([ () => this.persistence.Gs(t, e), () => this.persistence.getTargetCache().containsKey(t, e), () => {\n            const t = this.Js.get(e);\n            return Rt.resolve(void 0 !== t && t > n);\n        } ]);\n    }\n    getCacheSize(t) {\n        return this.persistence.getRemoteDocumentCache().getSize(t);\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Performs database creation and schema upgrades. */ class zo {\n    constructor(t) {\n        this.serializer = t;\n    }\n    /**\n     * Performs database creation and schema upgrades.\n     *\n     * Note that in production, this method is only ever used to upgrade the schema\n     * to SCHEMA_VERSION. Different values of toVersion are only used for testing\n     * and local feature development.\n     */    O(t, e, n, s) {\n        const i = new Pt(\"createOrUpgrade\", e);\n        n < 1 && s >= 1 && (function(t) {\n            t.createObjectStore(\"owner\");\n        }(t), function(t) {\n            t.createObjectStore(\"mutationQueues\", {\n                keyPath: \"userId\"\n            });\n            t.createObjectStore(\"mutations\", {\n                keyPath: \"batchId\",\n                autoIncrement: !0\n            }).createIndex(\"userMutationsIndex\", Qt, {\n                unique: !0\n            }), t.createObjectStore(\"documentMutations\");\n        }\n        /**\n * Upgrade function to migrate the 'mutations' store from V1 to V3. Loads\n * and rewrites all data.\n */ (t), Wo(t), function(t) {\n            t.createObjectStore(\"remoteDocuments\");\n        }(t));\n        // Migration 2 to populate the targetGlobal object no longer needed since\n        // migration 3 unconditionally clears it.\n                let r = Rt.resolve();\n        return n < 3 && s >= 3 && (\n        // Brand new clients don't need to drop and recreate--only clients that\n        // potentially have corrupt data.\n        0 !== n && (!function(t) {\n            t.deleteObjectStore(\"targetDocuments\"), t.deleteObjectStore(\"targets\"), t.deleteObjectStore(\"targetGlobal\");\n        }(t), Wo(t)), r = r.next((() => \n        /**\n * Creates the target global singleton row.\n *\n * @param txn - The version upgrade transaction for indexeddb\n */\n        function(t) {\n            const e = t.store(\"targetGlobal\"), n = {\n                highestTargetId: 0,\n                highestListenSequenceNumber: 0,\n                lastRemoteSnapshotVersion: rt.min().toTimestamp(),\n                targetCount: 0\n            };\n            return e.put(\"targetGlobalKey\", n);\n        }(i)))), n < 4 && s >= 4 && (0 !== n && (\n        // Schema version 3 uses auto-generated keys to generate globally unique\n        // mutation batch IDs (this was previously ensured internally by the\n        // client). To migrate to the new schema, we have to read all mutations\n        // and write them back out. We preserve the existing batch IDs to guarantee\n        // consistency with other object stores. Any further mutation batch IDs will\n        // be auto-generated.\n        r = r.next((() => function(t, e) {\n            return e.store(\"mutations\").j().next((n => {\n                t.deleteObjectStore(\"mutations\");\n                t.createObjectStore(\"mutations\", {\n                    keyPath: \"batchId\",\n                    autoIncrement: !0\n                }).createIndex(\"userMutationsIndex\", Qt, {\n                    unique: !0\n                });\n                const s = e.store(\"mutations\"), i = n.map((t => s.put(t)));\n                return Rt.waitFor(i);\n            }));\n        }(t, i)))), r = r.next((() => {\n            !function(t) {\n                t.createObjectStore(\"clientMetadata\", {\n                    keyPath: \"clientId\"\n                });\n            }(t);\n        }))), n < 5 && s >= 5 && (r = r.next((() => this.Ys(i)))), n < 6 && s >= 6 && (r = r.next((() => (function(t) {\n            t.createObjectStore(\"remoteDocumentGlobal\");\n        }(t), this.Xs(i))))), n < 7 && s >= 7 && (r = r.next((() => this.Zs(i)))), n < 8 && s >= 8 && (r = r.next((() => this.ti(t, i)))), \n        n < 9 && s >= 9 && (r = r.next((() => {\n            // Multi-Tab used to manage its own changelog, but this has been moved\n            // to the DbRemoteDocument object store itself. Since the previous change\n            // log only contained transient data, we can drop its object store.\n            !function(t) {\n                t.objectStoreNames.contains(\"remoteDocumentChanges\") && t.deleteObjectStore(\"remoteDocumentChanges\");\n            }(t);\n            // Note: Schema version 9 used to create a read time index for the\n            // RemoteDocumentCache. This is now done with schema version 13.\n                }))), n < 10 && s >= 10 && (r = r.next((() => this.ei(i)))), n < 11 && s >= 11 && (r = r.next((() => {\n            !function(t) {\n                t.createObjectStore(\"bundles\", {\n                    keyPath: \"bundleId\"\n                });\n            }(t), function(t) {\n                t.createObjectStore(\"namedQueries\", {\n                    keyPath: \"name\"\n                });\n            }(t);\n        }))), n < 12 && s >= 12 && (r = r.next((() => {\n            !function(t) {\n                const e = t.createObjectStore(\"documentOverlays\", {\n                    keyPath: oe\n                });\n                e.createIndex(\"collectionPathOverlayIndex\", ue, {\n                    unique: !1\n                }), e.createIndex(\"collectionGroupOverlayIndex\", ce, {\n                    unique: !1\n                });\n            }(t);\n        }))), n < 13 && s >= 13 && (r = r.next((() => function(t) {\n            const e = t.createObjectStore(\"remoteDocumentsV14\", {\n                keyPath: Ht\n            });\n            e.createIndex(\"documentKeyIndex\", Jt), e.createIndex(\"collectionGroupIndex\", Yt);\n        }(t))).next((() => this.ni(t, i))).next((() => t.deleteObjectStore(\"remoteDocuments\")))), \n        n < 14 && s >= 14 && (r = r.next((() => this.si(t, i)))), n < 15 && s >= 15 && (r = r.next((() => function(t) {\n            t.createObjectStore(\"indexConfiguration\", {\n                keyPath: \"indexId\",\n                autoIncrement: !0\n            }).createIndex(\"collectionGroupIndex\", \"collectionGroup\", {\n                unique: !1\n            });\n            t.createObjectStore(\"indexState\", {\n                keyPath: ne\n            }).createIndex(\"sequenceNumberIndex\", se, {\n                unique: !1\n            });\n            t.createObjectStore(\"indexEntries\", {\n                keyPath: ie\n            }).createIndex(\"documentKeyIndex\", re, {\n                unique: !1\n            });\n        }(t)))), r;\n    }\n    Xs(t) {\n        let e = 0;\n        return t.store(\"remoteDocuments\").X(((t, n) => {\n            e += ro(n);\n        })).next((() => {\n            const n = {\n                byteSize: e\n            };\n            return t.store(\"remoteDocumentGlobal\").put(\"remoteDocumentGlobalKey\", n);\n        }));\n    }\n    Ys(t) {\n        const e = t.store(\"mutationQueues\"), n = t.store(\"mutations\");\n        return e.j().next((e => Rt.forEach(e, (e => {\n            const s = IDBKeyRange.bound([ e.userId, -1 ], [ e.userId, e.lastAcknowledgedBatchId ]);\n            return n.j(\"userMutationsIndex\", s).next((n => Rt.forEach(n, (n => {\n                F(n.userId === e.userId);\n                const s = _r(this.serializer, n);\n                return io(t, e.userId, s).next((() => {}));\n            }))));\n        }))));\n    }\n    /**\n     * Ensures that every document in the remote document cache has a corresponding sentinel row\n     * with a sequence number. Missing rows are given the most recently used sequence number.\n     */    Zs(t) {\n        const e = t.store(\"targetDocuments\"), n = t.store(\"remoteDocuments\");\n        return t.store(\"targetGlobal\").get(\"targetGlobalKey\").next((t => {\n            const s = [];\n            return n.X(((n, i) => {\n                const r = new ut(n), o = function(t) {\n                    return [ 0, qt(t) ];\n                }(r);\n                s.push(e.get(o).next((n => n ? Rt.resolve() : (n => e.put({\n                    targetId: 0,\n                    path: qt(n),\n                    sequenceNumber: t.highestListenSequenceNumber\n                }))(r))));\n            })).next((() => Rt.waitFor(s)));\n        }));\n    }\n    ti(t, e) {\n        // Create the index.\n        t.createObjectStore(\"collectionParents\", {\n            keyPath: ee\n        });\n        const n = e.store(\"collectionParents\"), s = new Wr, i = t => {\n            if (s.add(t)) {\n                const e = t.lastSegment(), s = t.popLast();\n                return n.put({\n                    collectionId: e,\n                    parent: qt(s)\n                });\n            }\n        };\n        // Helper to add an index entry iff we haven't already written it.\n                // Index existing remote documents.\n        return e.store(\"remoteDocuments\").X({\n            Y: !0\n        }, ((t, e) => {\n            const n = new ut(t);\n            return i(n.popLast());\n        })).next((() => e.store(\"documentMutations\").X({\n            Y: !0\n        }, (([t, e, n], s) => {\n            const r = Gt(e);\n            return i(r.popLast());\n        }))));\n    }\n    ei(t) {\n        const e = t.store(\"targets\");\n        return e.X(((t, n) => {\n            const s = mr(n), i = gr(this.serializer, s);\n            return e.put(i);\n        }));\n    }\n    ni(t, e) {\n        const n = e.store(\"remoteDocuments\"), s = [];\n        return n.X(((t, n) => {\n            const i = e.store(\"remoteDocumentsV14\"), r = (o = n, o.document ? new ht(ut.fromString(o.document.name).popFirst(5)) : o.noDocument ? ht.fromSegments(o.noDocument.path) : o.unknownDocument ? ht.fromSegments(o.unknownDocument.path) : O()).path.toArray();\n            var o;\n            /**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */            const u = {\n                prefixPath: r.slice(0, r.length - 2),\n                collectionGroup: r[r.length - 2],\n                documentId: r[r.length - 1],\n                readTime: n.readTime || [ 0, 0 ],\n                unknownDocument: n.unknownDocument,\n                noDocument: n.noDocument,\n                document: n.document,\n                hasCommittedMutations: !!n.hasCommittedMutations\n            };\n            s.push(i.put(u));\n        })).next((() => Rt.waitFor(s)));\n    }\n    si(t, e) {\n        const n = e.store(\"mutations\"), s = Po(this.serializer), i = new Ko(Qo.zs, this.serializer.fe);\n        return n.j().next((t => {\n            const n = new Map;\n            return t.forEach((t => {\n                var e;\n                let s = null !== (e = n.get(t.userId)) && void 0 !== e ? e : gs();\n                _r(this.serializer, t).keys().forEach((t => s = s.add(t))), n.set(t.userId, s);\n            })), Rt.forEach(n, ((t, n) => {\n                const r = new V(n), o = Rr.de(this.serializer, r), u = i.getIndexManager(r), c = oo.de(r, this.serializer, u, i.referenceDelegate);\n                return new ko(s, c, o, u).recalculateAndSaveOverlaysForDocumentKeys(new we(e, Ot.ct), t).next();\n            }));\n        }));\n    }\n}\n\nfunction Wo(t) {\n    t.createObjectStore(\"targetDocuments\", {\n        keyPath: Zt\n    }).createIndex(\"documentTargetsIndex\", te, {\n        unique: !0\n    });\n    // NOTE: This is unique only because the TargetId is the suffix.\n    t.createObjectStore(\"targets\", {\n        keyPath: \"targetId\"\n    }).createIndex(\"queryTargetsIndex\", Xt, {\n        unique: !0\n    }), t.createObjectStore(\"targetGlobal\");\n}\n\nconst Ho = \"Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.\";\n\n/**\n * Oldest acceptable age in milliseconds for client metadata before the client\n * is considered inactive and its associated data is garbage collected.\n */\n/**\n * An IndexedDB-backed instance of Persistence. Data is stored persistently\n * across sessions.\n *\n * On Web only, the Firestore SDKs support shared access to its persistence\n * layer. This allows multiple browser tabs to read and write to IndexedDb and\n * to synchronize state even without network connectivity. Shared access is\n * currently optional and not enabled unless all clients invoke\n * `enablePersistence()` with `{synchronizeTabs:true}`.\n *\n * In multi-tab mode, if multiple clients are active at the same time, the SDK\n * will designate one client as the “primary client”. An effort is made to pick\n * a visible, network-connected and active client, and this client is\n * responsible for letting other clients know about its presence. The primary\n * client writes a unique client-generated identifier (the client ID) to\n * IndexedDb’s “owner” store every 4 seconds. If the primary client fails to\n * update this entry, another client can acquire the lease and take over as\n * primary.\n *\n * Some persistence operations in the SDK are designated as primary-client only\n * operations. This includes the acknowledgment of mutations and all updates of\n * remote documents. The effects of these operations are written to persistence\n * and then broadcast to other tabs via LocalStorage (see\n * `WebStorageSharedClientState`), which then refresh their state from\n * persistence.\n *\n * Similarly, the primary client listens to notifications sent by secondary\n * clients to discover persistence changes written by secondary clients, such as\n * the addition of new mutations and query targets.\n *\n * If multi-tab is not enabled and another tab already obtained the primary\n * lease, IndexedDbPersistence enters a failed state and all subsequent\n * operations will automatically fail.\n *\n * Additionally, there is an optimization so that when a tab is closed, the\n * primary lease is released immediately (this is especially important to make\n * sure that a refreshed tab is able to immediately re-acquire the primary\n * lease). Unfortunately, IndexedDB cannot be reliably used in window.unload\n * since it is an asynchronous API. So in addition to attempting to give up the\n * lease, the leaseholder writes its client ID to a \"zombiedClient\" entry in\n * LocalStorage which acts as an indicator that another tab should go ahead and\n * take the primary lease immediately regardless of the current lease timestamp.\n *\n * TODO(b/114226234): Remove `synchronizeTabs` section when multi-tab is no\n * longer optional.\n */\nclass Jo {\n    constructor(\n    /**\n     * Whether to synchronize the in-memory state of multiple tabs and share\n     * access to local persistence.\n     */\n    t, e, n, s, i, r, o, u, c, \n    /**\n     * If set to true, forcefully obtains database access. Existing tabs will\n     * no longer be able to access IndexedDB.\n     */\n    a, h = 15) {\n        if (this.allowTabSynchronization = t, this.persistenceKey = e, this.clientId = n, \n        this.ii = i, this.window = r, this.document = o, this.ri = c, this.oi = a, this.ui = h, \n        this.Os = null, this.Fs = !1, this.isPrimary = !1, this.networkEnabled = !0, \n        /** Our window.unload handler, if registered. */\n        this.ci = null, this.inForeground = !1, \n        /** Our 'visibilitychange' listener if registered. */\n        this.ai = null, \n        /** The client metadata refresh task. */\n        this.hi = null, \n        /** The last time we garbage collected the client metadata object store. */\n        this.li = Number.NEGATIVE_INFINITY, \n        /** A listener to notify on primary state changes. */\n        this.fi = t => Promise.resolve(), !Jo.D()) throw new U(q.UNIMPLEMENTED, \"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.\");\n        this.referenceDelegate = new Eo(this, s), this.di = e + \"main\", this.serializer = new ar(u), \n        this.wi = new bt(this.di, this.ui, new zo(this.serializer)), this.Bs = new fo(this.referenceDelegate, this.serializer), \n        this.remoteDocumentCache = Po(this.serializer), this.qs = new Er, this.window && this.window.localStorage ? this._i = this.window.localStorage : (this._i = null, \n        !1 === a && k(\"IndexedDbPersistence\", \"LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page.\"));\n    }\n    /**\n     * Attempt to start IndexedDb persistence.\n     *\n     * @returns Whether persistence was enabled.\n     */    start() {\n        // NOTE: This is expected to fail sometimes (in the case of another tab\n        // already having the persistence lock), so it's the first thing we should\n        // do.\n        return this.mi().then((() => {\n            if (!this.isPrimary && !this.allowTabSynchronization) \n            // Fail `start()` if `synchronizeTabs` is disabled and we cannot\n            // obtain the primary lease.\n            throw new U(q.FAILED_PRECONDITION, Ho);\n            return this.gi(), this.yi(), this.pi(), this.runTransaction(\"getHighestListenSequenceNumber\", \"readonly\", (t => this.Bs.getHighestSequenceNumber(t)));\n        })).then((t => {\n            this.Os = new Ot(t, this.ri);\n        })).then((() => {\n            this.Fs = !0;\n        })).catch((t => (this.wi && this.wi.close(), Promise.reject(t))));\n    }\n    /**\n     * Registers a listener that gets called when the primary state of the\n     * instance changes. Upon registering, this listener is invoked immediately\n     * with the current primary state.\n     *\n     * PORTING NOTE: This is only used for Web multi-tab.\n     */    Ii(t) {\n        return this.fi = async e => {\n            if (this.started) return t(e);\n        }, t(this.isPrimary);\n    }\n    /**\n     * Registers a listener that gets called when the database receives a\n     * version change event indicating that it has deleted.\n     *\n     * PORTING NOTE: This is only used for Web multi-tab.\n     */    setDatabaseDeletedListener(t) {\n        this.wi.B((async e => {\n            // Check if an attempt is made to delete IndexedDB.\n            null === e.newVersion && await t();\n        }));\n    }\n    /**\n     * Adjusts the current network state in the client's metadata, potentially\n     * affecting the primary lease.\n     *\n     * PORTING NOTE: This is only used for Web multi-tab.\n     */    setNetworkEnabled(t) {\n        this.networkEnabled !== t && (this.networkEnabled = t, \n        // Schedule a primary lease refresh for immediate execution. The eventual\n        // lease update will be propagated via `primaryStateListener`.\n        this.ii.enqueueAndForget((async () => {\n            this.started && await this.mi();\n        })));\n    }\n    /**\n     * Updates the client metadata in IndexedDb and attempts to either obtain or\n     * extend the primary lease for the local client. Asynchronously notifies the\n     * primary state listener if the client either newly obtained or released its\n     * primary lease.\n     */    mi() {\n        return this.runTransaction(\"updateClientMetadataAndTryBecomePrimary\", \"readwrite\", (t => Xo(t).put({\n            clientId: this.clientId,\n            updateTimeMs: Date.now(),\n            networkEnabled: this.networkEnabled,\n            inForeground: this.inForeground\n        }).next((() => {\n            if (this.isPrimary) return this.Ti(t).next((t => {\n                t || (this.isPrimary = !1, this.ii.enqueueRetryable((() => this.fi(!1))));\n            }));\n        })).next((() => this.Ei(t))).next((e => this.isPrimary && !e ? this.Ai(t).next((() => !1)) : !!e && this.vi(t).next((() => !0)))))).catch((t => {\n            if (Dt(t)) \n            // Proceed with the existing state. Any subsequent access to\n            // IndexedDB will verify the lease.\n            return N(\"IndexedDbPersistence\", \"Failed to extend owner lease: \", t), this.isPrimary;\n            if (!this.allowTabSynchronization) throw t;\n            return N(\"IndexedDbPersistence\", \"Releasing owner lease after error during lease refresh\", t), \n            /* isPrimary= */ !1;\n        })).then((t => {\n            this.isPrimary !== t && this.ii.enqueueRetryable((() => this.fi(t))), this.isPrimary = t;\n        }));\n    }\n    Ti(t) {\n        return Yo(t).get(\"owner\").next((t => Rt.resolve(this.Ri(t))));\n    }\n    Pi(t) {\n        return Xo(t).delete(this.clientId);\n    }\n    /**\n     * If the garbage collection threshold has passed, prunes the\n     * RemoteDocumentChanges and the ClientMetadata store based on the last update\n     * time of all clients.\n     */    async bi() {\n        if (this.isPrimary && !this.Vi(this.li, 18e5)) {\n            this.li = Date.now();\n            const t = await this.runTransaction(\"maybeGarbageCollectMultiClientState\", \"readwrite-primary\", (t => {\n                const e = _e(t, \"clientMetadata\");\n                return e.j().next((t => {\n                    const n = this.Si(t, 18e5), s = t.filter((t => -1 === n.indexOf(t)));\n                    // Delete metadata for clients that are no longer considered active.\n                    return Rt.forEach(s, (t => e.delete(t.clientId))).next((() => s));\n                }));\n            })).catch((() => []));\n            // Delete potential leftover entries that may continue to mark the\n            // inactive clients as zombied in LocalStorage.\n            // Ideally we'd delete the IndexedDb and LocalStorage zombie entries for\n            // the client atomically, but we can't. So we opt to delete the IndexedDb\n            // entries first to avoid potentially reviving a zombied client.\n                        if (this._i) for (const e of t) this._i.removeItem(this.Di(e.clientId));\n        }\n    }\n    /**\n     * Schedules a recurring timer to update the client metadata and to either\n     * extend or acquire the primary lease if the client is eligible.\n     */    pi() {\n        this.hi = this.ii.enqueueAfterDelay(\"client_metadata_refresh\" /* TimerId.ClientMetadataRefresh */ , 4e3, (() => this.mi().then((() => this.bi())).then((() => this.pi()))));\n    }\n    /** Checks whether `client` is the local client. */    Ri(t) {\n        return !!t && t.ownerId === this.clientId;\n    }\n    /**\n     * Evaluate the state of all active clients and determine whether the local\n     * client is or can act as the holder of the primary lease. Returns whether\n     * the client is eligible for the lease, but does not actually acquire it.\n     * May return 'false' even if there is no active leaseholder and another\n     * (foreground) client should become leaseholder instead.\n     */    Ei(t) {\n        if (this.oi) return Rt.resolve(!0);\n        return Yo(t).get(\"owner\").next((e => {\n            // A client is eligible for the primary lease if:\n            // - its network is enabled and the client's tab is in the foreground.\n            // - its network is enabled and no other client's tab is in the\n            //   foreground.\n            // - every clients network is disabled and the client's tab is in the\n            //   foreground.\n            // - every clients network is disabled and no other client's tab is in\n            //   the foreground.\n            // - the `forceOwningTab` setting was passed in.\n            if (null !== e && this.Vi(e.leaseTimestampMs, 5e3) && !this.Ci(e.ownerId)) {\n                if (this.Ri(e) && this.networkEnabled) return !0;\n                if (!this.Ri(e)) {\n                    if (!e.allowTabSynchronization) \n                    // Fail the `canActAsPrimary` check if the current leaseholder has\n                    // not opted into multi-tab synchronization. If this happens at\n                    // client startup, we reject the Promise returned by\n                    // `enablePersistence()` and the user can continue to use Firestore\n                    // with in-memory persistence.\n                    // If this fails during a lease refresh, we will instead block the\n                    // AsyncQueue from executing further operations. Note that this is\n                    // acceptable since mixing & matching different `synchronizeTabs`\n                    // settings is not supported.\n                    // TODO(b/114226234): Remove this check when `synchronizeTabs` can\n                    // no longer be turned off.\n                    throw new U(q.FAILED_PRECONDITION, Ho);\n                    return !1;\n                }\n            }\n            return !(!this.networkEnabled || !this.inForeground) || Xo(t).j().next((t => void 0 === this.Si(t, 5e3).find((t => {\n                if (this.clientId !== t.clientId) {\n                    const e = !this.networkEnabled && t.networkEnabled, n = !this.inForeground && t.inForeground, s = this.networkEnabled === t.networkEnabled;\n                    if (e || n && s) return !0;\n                }\n                return !1;\n            }))));\n        })).next((t => (this.isPrimary !== t && N(\"IndexedDbPersistence\", `Client ${t ? \"is\" : \"is not\"} eligible for a primary lease.`), \n        t)));\n    }\n    async shutdown() {\n        // The shutdown() operations are idempotent and can be called even when\n        // start() aborted (e.g. because it couldn't acquire the persistence lease).\n        this.Fs = !1, this.xi(), this.hi && (this.hi.cancel(), this.hi = null), this.Ni(), \n        this.ki(), \n        // Use `SimpleDb.runTransaction` directly to avoid failing if another tab\n        // has obtained the primary lease.\n        await this.wi.runTransaction(\"shutdown\", \"readwrite\", [ \"owner\", \"clientMetadata\" ], (t => {\n            const e = new we(t, Ot.ct);\n            return this.Ai(e).next((() => this.Pi(e)));\n        })), this.wi.close(), \n        // Remove the entry marking the client as zombied from LocalStorage since\n        // we successfully deleted its metadata from IndexedDb.\n        this.Mi();\n    }\n    /**\n     * Returns clients that are not zombied and have an updateTime within the\n     * provided threshold.\n     */    Si(t, e) {\n        return t.filter((t => this.Vi(t.updateTimeMs, e) && !this.Ci(t.clientId)));\n    }\n    /**\n     * Returns the IDs of the clients that are currently active. If multi-tab\n     * is not supported, returns an array that only contains the local client's\n     * ID.\n     *\n     * PORTING NOTE: This is only used for Web multi-tab.\n     */    $i() {\n        return this.runTransaction(\"getActiveClients\", \"readonly\", (t => Xo(t).j().next((t => this.Si(t, 18e5).map((t => t.clientId))))));\n    }\n    get started() {\n        return this.Fs;\n    }\n    getMutationQueue(t, e) {\n        return oo.de(t, this.serializer, e, this.referenceDelegate);\n    }\n    getTargetCache() {\n        return this.Bs;\n    }\n    getRemoteDocumentCache() {\n        return this.remoteDocumentCache;\n    }\n    getIndexManager(t) {\n        return new Jr(t, this.serializer.fe.databaseId);\n    }\n    getDocumentOverlayCache(t) {\n        return Rr.de(this.serializer, t);\n    }\n    getBundleCache() {\n        return this.qs;\n    }\n    runTransaction(t, e, n) {\n        N(\"IndexedDbPersistence\", \"Starting transaction:\", t);\n        const s = \"readonly\" === e ? \"readonly\" : \"readwrite\", i = 15 === (r = this.ui) ? de : 14 === r ? fe : 13 === r ? le : 12 === r ? he : 11 === r ? ae : void O();\n        /** Returns the object stores for the provided schema. */\n        var r;\n        let o;\n        // Do all transactions as readwrite against all object stores, since we\n        // are the only reader/writer.\n                return this.wi.runTransaction(t, s, i, (s => (o = new we(s, this.Os ? this.Os.next() : Ot.ct), \n        \"readwrite-primary\" === e ? this.Ti(o).next((t => !!t || this.Ei(o))).next((e => {\n            if (!e) throw k(`Failed to obtain primary lease for action '${t}'.`), this.isPrimary = !1, \n            this.ii.enqueueRetryable((() => this.fi(!1))), new U(q.FAILED_PRECONDITION, Et);\n            return n(o);\n        })).next((t => this.vi(o).next((() => t)))) : this.Oi(o).next((() => n(o)))))).then((t => (o.raiseOnCommittedEvent(), \n        t)));\n    }\n    /**\n     * Verifies that the current tab is the primary leaseholder or alternatively\n     * that the leaseholder has opted into multi-tab synchronization.\n     */\n    // TODO(b/114226234): Remove this check when `synchronizeTabs` can no longer\n    // be turned off.\n    Oi(t) {\n        return Yo(t).get(\"owner\").next((t => {\n            if (null !== t && this.Vi(t.leaseTimestampMs, 5e3) && !this.Ci(t.ownerId) && !this.Ri(t) && !(this.oi || this.allowTabSynchronization && t.allowTabSynchronization)) throw new U(q.FAILED_PRECONDITION, Ho);\n        }));\n    }\n    /**\n     * Obtains or extends the new primary lease for the local client. This\n     * method does not verify that the client is eligible for this lease.\n     */    vi(t) {\n        const e = {\n            ownerId: this.clientId,\n            allowTabSynchronization: this.allowTabSynchronization,\n            leaseTimestampMs: Date.now()\n        };\n        return Yo(t).put(\"owner\", e);\n    }\n    static D() {\n        return bt.D();\n    }\n    /** Checks the primary lease and removes it if we are the current primary. */    Ai(t) {\n        const e = Yo(t);\n        return e.get(\"owner\").next((t => this.Ri(t) ? (N(\"IndexedDbPersistence\", \"Releasing primary lease.\"), \n        e.delete(\"owner\")) : Rt.resolve()));\n    }\n    /** Verifies that `updateTimeMs` is within `maxAgeMs`. */    Vi(t, e) {\n        const n = Date.now();\n        return !(t < n - e) && (!(t > n) || (k(`Detected an update time that is in the future: ${t} > ${n}`), \n        !1));\n    }\n    gi() {\n        null !== this.document && \"function\" == typeof this.document.addEventListener && (this.ai = () => {\n            this.ii.enqueueAndForget((() => (this.inForeground = \"visible\" === this.document.visibilityState, \n            this.mi())));\n        }, this.document.addEventListener(\"visibilitychange\", this.ai), this.inForeground = \"visible\" === this.document.visibilityState);\n    }\n    Ni() {\n        this.ai && (this.document.removeEventListener(\"visibilitychange\", this.ai), this.ai = null);\n    }\n    /**\n     * Attaches a window.unload handler that will synchronously write our\n     * clientId to a \"zombie client id\" location in LocalStorage. This can be used\n     * by tabs trying to acquire the primary lease to determine that the lease\n     * is no longer valid even if the timestamp is recent. This is particularly\n     * important for the refresh case (so the tab correctly re-acquires the\n     * primary lease). LocalStorage is used for this rather than IndexedDb because\n     * it is a synchronous API and so can be used reliably from  an unload\n     * handler.\n     */    yi() {\n        var t;\n        \"function\" == typeof (null === (t = this.window) || void 0 === t ? void 0 : t.addEventListener) && (this.ci = () => {\n            // Note: In theory, this should be scheduled on the AsyncQueue since it\n            // accesses internal state. We execute this code directly during shutdown\n            // to make sure it gets a chance to run.\n            this.xi();\n            const t = /(?:Version|Mobile)\\/1[456]/;\n            isSafari() && (navigator.appVersion.match(t) || navigator.userAgent.match(t)) && \n            // On Safari 14, 15, and 16, we do not run any cleanup actions as it might\n            // trigger a bug that prevents Safari from re-opening IndexedDB during\n            // the next page load.\n            // See https://bugs.webkit.org/show_bug.cgi?id=226547\n            this.ii.enterRestrictedMode(/* purgeExistingTasks= */ !0), this.ii.enqueueAndForget((() => this.shutdown()));\n        }, this.window.addEventListener(\"pagehide\", this.ci));\n    }\n    ki() {\n        this.ci && (this.window.removeEventListener(\"pagehide\", this.ci), this.ci = null);\n    }\n    /**\n     * Returns whether a client is \"zombied\" based on its LocalStorage entry.\n     * Clients become zombied when their tab closes without running all of the\n     * cleanup logic in `shutdown()`.\n     */    Ci(t) {\n        var e;\n        try {\n            const n = null !== (null === (e = this._i) || void 0 === e ? void 0 : e.getItem(this.Di(t)));\n            return N(\"IndexedDbPersistence\", `Client '${t}' ${n ? \"is\" : \"is not\"} zombied in LocalStorage`), \n            n;\n        } catch (t) {\n            // Gracefully handle if LocalStorage isn't working.\n            return k(\"IndexedDbPersistence\", \"Failed to get zombied client id.\", t), !1;\n        }\n    }\n    /**\n     * Record client as zombied (a client that had its tab closed). Zombied\n     * clients are ignored during primary tab selection.\n     */    xi() {\n        if (this._i) try {\n            this._i.setItem(this.Di(this.clientId), String(Date.now()));\n        } catch (t) {\n            // Gracefully handle if LocalStorage isn't available / working.\n            k(\"Failed to set zombie client id.\", t);\n        }\n    }\n    /** Removes the zombied client entry if it exists. */    Mi() {\n        if (this._i) try {\n            this._i.removeItem(this.Di(this.clientId));\n        } catch (t) {\n            // Ignore\n        }\n    }\n    Di(t) {\n        return `firestore_zombie_${this.persistenceKey}_${t}`;\n    }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the primary client object store.\n */ function Yo(t) {\n    return _e(t, \"owner\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the client metadata object store.\n */ function Xo(t) {\n    return _e(t, \"clientMetadata\");\n}\n\n/**\n * Generates a string used as a prefix when storing data in IndexedDB and\n * LocalStorage.\n */ function Zo(t, e) {\n    // Use two different prefix formats:\n    //   * firestore / persistenceKey / projectID . databaseID / ...\n    //   * firestore / persistenceKey / projectID / ...\n    // projectIDs are DNS-compatible names and cannot contain dots\n    // so there's no danger of collisions.\n    let n = t.projectId;\n    return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\";\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A set of changes to what documents are currently in view and out of view for\n * a given query. These changes are sent to the LocalStore by the View (via\n * the SyncEngine) and are used to pin / unpin documents as appropriate.\n */\nclass tu {\n    constructor(t, e, n, s) {\n        this.targetId = t, this.fromCache = e, this.Fi = n, this.Bi = s;\n    }\n    static Li(t, e) {\n        let n = gs(), s = gs();\n        for (const t of e.docChanges) switch (t.type) {\n          case 0 /* ChangeType.Added */ :\n            n = n.add(t.doc.key);\n            break;\n\n          case 1 /* ChangeType.Removed */ :\n            s = s.add(t.doc.key);\n // do nothing\n                }\n        return new tu(t, e.fromCache, n, s);\n    }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The Firestore query engine.\n *\n * Firestore queries can be executed in three modes. The Query Engine determines\n * what mode to use based on what data is persisted. The mode only determines\n * the runtime complexity of the query - the result set is equivalent across all\n * implementations.\n *\n * The Query engine will use indexed-based execution if a user has configured\n * any index that can be used to execute query (via `setIndexConfiguration()`).\n * Otherwise, the engine will try to optimize the query by re-using a previously\n * persisted query result. If that is not possible, the query will be executed\n * via a full collection scan.\n *\n * Index-based execution is the default when available. The query engine\n * supports partial indexed execution and merges the result from the index\n * lookup with documents that have not yet been indexed. The index evaluation\n * matches the backend's format and as such, the SDK can use indexing for all\n * queries that the backend supports.\n *\n * If no index exists, the query engine tries to take advantage of the target\n * document mapping in the TargetCache. These mappings exists for all queries\n * that have been synced with the backend at least once and allow the query\n * engine to only read documents that previously matched a query plus any\n * documents that were edited after the query was last listened to.\n *\n * There are some cases when this optimization is not guaranteed to produce\n * the same results as full collection scans. In these cases, query\n * processing falls back to full scans. These cases are:\n *\n * - Limit queries where a document that matched the query previously no longer\n *   matches the query.\n *\n * - Limit queries where a document edit may cause the document to sort below\n *   another document that is in the local cache.\n *\n * - Queries that have never been CURRENT or free of limbo documents.\n */ class eu {\n    constructor() {\n        this.qi = !1;\n    }\n    /** Sets the document view to query against. */    initialize(t, e) {\n        this.Ui = t, this.indexManager = e, this.qi = !0;\n    }\n    /** Returns all local documents matching the specified query. */    getDocumentsMatchingQuery(t, e, n, s) {\n        return this.Ki(t, e).next((i => i || this.Gi(t, e, s, n))).next((n => n || this.Qi(t, e)));\n    }\n    /**\n     * Performs an indexed query that evaluates the query based on a collection's\n     * persisted index values. Returns `null` if an index is not available.\n     */    Ki(t, e) {\n        if (Qn(e)) \n        // Queries that match all documents don't benefit from using\n        // key-based lookups. It is more efficient to scan all documents in a\n        // collection, rather than to perform individual lookups.\n        return Rt.resolve(null);\n        let n = Jn(e);\n        return this.indexManager.getIndexType(t, n).next((s => 0 /* IndexType.NONE */ === s ? null : (null !== e.limit && 1 /* IndexType.PARTIAL */ === s && (\n        // We cannot apply a limit for targets that are served using a partial\n        // index. If a partial index will be used to serve the target, the\n        // query may return a superset of documents that match the target\n        // (e.g. if the index doesn't include all the target's filters), or\n        // may return the correct set of documents in the wrong order (e.g. if\n        // the index doesn't include a segment for one of the orderBys).\n        // Therefore, a limit should not be applied in such cases.\n        e = Xn(e, null, \"F\" /* LimitType.First */), n = Jn(e)), this.indexManager.getDocumentsMatchingTarget(t, n).next((s => {\n            const i = gs(...s);\n            return this.Ui.getDocuments(t, i).next((s => this.indexManager.getMinOffset(t, n).next((n => {\n                const r = this.ji(e, s);\n                return this.zi(e, r, i, n.readTime) ? this.Ki(t, Xn(e, null, \"F\" /* LimitType.First */)) : this.Wi(t, r, e, n);\n            }))));\n        })))));\n    }\n    /**\n     * Performs a query based on the target's persisted query mapping. Returns\n     * `null` if the mapping is not available or cannot be used.\n     */    Gi(t, e, n, s) {\n        return Qn(e) || s.isEqual(rt.min()) ? this.Qi(t, e) : this.Ui.getDocuments(t, n).next((i => {\n            const r = this.ji(e, i);\n            return this.zi(e, r, n, s) ? this.Qi(t, e) : (C() <= LogLevel.DEBUG && N(\"QueryEngine\", \"Re-using previous result from %s to execute query: %s\", s.toString(), es(e)), \n            this.Wi(t, r, e, yt(s, -1)));\n        }));\n        // Queries that have never seen a snapshot without limbo free documents\n        // should also be run as a full collection scan.\n        }\n    /** Applies the query filter and sorting to the provided documents.  */    ji(t, e) {\n        // Sort the documents and re-apply the query filter since previously\n        // matching documents do not necessarily still match the query.\n        let n = new Ee(is(t));\n        return e.forEach(((e, s) => {\n            ns(t, s) && (n = n.add(s));\n        })), n;\n    }\n    /**\n     * Determines if a limit query needs to be refilled from cache, making it\n     * ineligible for index-free execution.\n     *\n     * @param query - The query.\n     * @param sortedPreviousResults - The documents that matched the query when it\n     * was last synchronized, sorted by the query's comparator.\n     * @param remoteKeys - The document keys that matched the query at the last\n     * snapshot.\n     * @param limboFreeSnapshotVersion - The version of the snapshot when the\n     * query was last synchronized.\n     */    zi(t, e, n, s) {\n        if (null === t.limit) \n        // Queries without limits do not need to be refilled.\n        return !1;\n        if (n.size !== e.size) \n        // The query needs to be refilled if a previously matching document no\n        // longer matches.\n        return !0;\n        // Limit queries are not eligible for index-free query execution if there is\n        // a potential that an older document from cache now sorts before a document\n        // that was previously part of the limit. This, however, can only happen if\n        // the document at the edge of the limit goes out of limit.\n        // If a document that is not the limit boundary sorts differently,\n        // the boundary of the limit itself did not change and documents from cache\n        // will continue to be \"rejected\" by this boundary. Therefore, we can ignore\n        // any modifications that don't affect the last document.\n                const i = \"F\" /* LimitType.First */ === t.limitType ? e.last() : e.first();\n        return !!i && (i.hasPendingWrites || i.version.compareTo(s) > 0);\n    }\n    Qi(t, e) {\n        return C() <= LogLevel.DEBUG && N(\"QueryEngine\", \"Using full collection scan to execute query:\", es(e)), \n        this.Ui.getDocumentsMatchingQuery(t, e, It.min());\n    }\n    /**\n     * Combines the results from an indexed execution with the remaining documents\n     * that have not yet been indexed.\n     */    Wi(t, e, n, s) {\n        // Retrieve all results for documents that were updated since the offset.\n        return this.Ui.getDocumentsMatchingQuery(t, n, s).next((t => (\n        // Merge with existing results\n        e.forEach((e => {\n            t = t.insert(e.key, e);\n        })), t)));\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Implements `LocalStore` interface.\n *\n * Note: some field defined in this class might have public access level, but\n * the class is not exported so they are only accessible from this module.\n * This is useful to implement optional features (like bundles) in free\n * functions, such that they are tree-shakeable.\n */\nclass nu {\n    constructor(\n    /** Manages our in-memory or durable persistence. */\n    t, e, n, s) {\n        this.persistence = t, this.Hi = e, this.serializer = s, \n        /**\n         * Maps a targetID to data about its target.\n         *\n         * PORTING NOTE: We are using an immutable data structure on Web to make re-runs\n         * of `applyRemoteEvent()` idempotent.\n         */\n        this.Ji = new pe(et), \n        /** Maps a target to its targetID. */\n        // TODO(wuandy): Evaluate if TargetId can be part of Target.\n        this.Yi = new os((t => $n(t)), On), \n        /**\n         * A per collection group index of the last read time processed by\n         * `getNewDocumentChanges()`.\n         *\n         * PORTING NOTE: This is only used for multi-tab synchronization.\n         */\n        this.Xi = new Map, this.Zi = t.getRemoteDocumentCache(), this.Bs = t.getTargetCache(), \n        this.qs = t.getBundleCache(), this.tr(n);\n    }\n    tr(t) {\n        // TODO(indexing): Add spec tests that test these components change after a\n        // user change\n        this.documentOverlayCache = this.persistence.getDocumentOverlayCache(t), this.indexManager = this.persistence.getIndexManager(t), \n        this.mutationQueue = this.persistence.getMutationQueue(t, this.indexManager), this.localDocuments = new ko(this.Zi, this.mutationQueue, this.documentOverlayCache, this.indexManager), \n        this.Zi.setIndexManager(this.indexManager), this.Hi.initialize(this.localDocuments, this.indexManager);\n    }\n    collectGarbage(t) {\n        return this.persistence.runTransaction(\"Collect garbage\", \"readwrite-primary\", (e => t.collect(e, this.Ji)));\n    }\n}\n\nfunction su(\n/** Manages our in-memory or durable persistence. */\nt, e, n, s) {\n    return new nu(t, e, n, s);\n}\n\n/**\n * Tells the LocalStore that the currently authenticated user has changed.\n *\n * In response the local store switches the mutation queue to the new user and\n * returns any resulting document changes.\n */\n// PORTING NOTE: Android and iOS only return the documents affected by the\n// change.\nasync function iu(t, e) {\n    const n = L(t);\n    return await n.persistence.runTransaction(\"Handle user change\", \"readonly\", (t => {\n        // Swap out the mutation queue, grabbing the pending mutation batches\n        // before and after.\n        let s;\n        return n.mutationQueue.getAllMutationBatches(t).next((i => (s = i, n.tr(e), n.mutationQueue.getAllMutationBatches(t)))).next((e => {\n            const i = [], r = [];\n            // Union the old/new changed keys.\n            let o = gs();\n            for (const t of s) {\n                i.push(t.batchId);\n                for (const e of t.mutations) o = o.add(e.key);\n            }\n            for (const t of e) {\n                r.push(t.batchId);\n                for (const e of t.mutations) o = o.add(e.key);\n            }\n            // Return the set of all (potentially) changed documents and the list\n            // of mutation batch IDs that were affected by change.\n                        return n.localDocuments.getDocuments(t, o).next((t => ({\n                er: t,\n                removedBatchIds: i,\n                addedBatchIds: r\n            })));\n        }));\n    }));\n}\n\n/* Accepts locally generated Mutations and commit them to storage. */\n/**\n * Acknowledges the given batch.\n *\n * On the happy path when a batch is acknowledged, the local store will\n *\n *  + remove the batch from the mutation queue;\n *  + apply the changes to the remote document cache;\n *  + recalculate the latency compensated view implied by those changes (there\n *    may be mutations in the queue that affect the documents but haven't been\n *    acknowledged yet); and\n *  + give the changed documents back the sync engine\n *\n * @returns The resulting (modified) documents.\n */\nfunction ru(t, e) {\n    const n = L(t);\n    return n.persistence.runTransaction(\"Acknowledge batch\", \"readwrite-primary\", (t => {\n        const s = e.batch.keys(), i = n.Zi.newChangeBuffer({\n            trackRemovals: !0\n        });\n        return function(t, e, n, s) {\n            const i = n.batch, r = i.keys();\n            let o = Rt.resolve();\n            return r.forEach((t => {\n                o = o.next((() => s.getEntry(e, t))).next((e => {\n                    const r = n.docVersions.get(t);\n                    F(null !== r), e.version.compareTo(r) < 0 && (i.applyToRemoteDocument(e, n), e.isValidDocument() && (\n                    // We use the commitVersion as the readTime rather than the\n                    // document's updateTime since the updateTime is not advanced\n                    // for updates that do not modify the underlying document.\n                    e.setReadTime(n.commitVersion), s.addEntry(e)));\n                }));\n            })), o.next((() => t.mutationQueue.removeMutationBatch(e, i)));\n        }\n        /** Returns the local view of the documents affected by a mutation batch. */\n        // PORTING NOTE: Multi-Tab only.\n        (n, t, e, i).next((() => i.apply(t))).next((() => n.mutationQueue.performConsistencyCheck(t))).next((() => n.documentOverlayCache.removeOverlaysForBatchId(t, s, e.batch.batchId))).next((() => n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(t, function(t) {\n            let e = gs();\n            for (let n = 0; n < t.mutationResults.length; ++n) {\n                t.mutationResults[n].transformResults.length > 0 && (e = e.add(t.batch.mutations[n].key));\n            }\n            return e;\n        }\n        /**\n * Removes mutations from the MutationQueue for the specified batch;\n * LocalDocuments will be recalculated.\n *\n * @returns The resulting modified documents.\n */ (e)))).next((() => n.localDocuments.getDocuments(t, s)));\n    }));\n}\n\n/**\n * Returns the last consistent snapshot processed (used by the RemoteStore to\n * determine whether to buffer incoming snapshots from the backend).\n */\nfunction ou(t) {\n    const e = L(t);\n    return e.persistence.runTransaction(\"Get last remote snapshot version\", \"readonly\", (t => e.Bs.getLastRemoteSnapshotVersion(t)));\n}\n\n/**\n * Updates the \"ground-state\" (remote) documents. We assume that the remote\n * event reflects any write batches that have been acknowledged or rejected\n * (i.e. we do not re-apply local mutations to updates from this event).\n *\n * LocalDocuments are re-calculated if there are remaining mutations in the\n * queue.\n */ function uu(t, e) {\n    const n = L(t), s = e.snapshotVersion;\n    let i = n.Ji;\n    return n.persistence.runTransaction(\"Apply remote event\", \"readwrite-primary\", (t => {\n        const r = n.Zi.newChangeBuffer({\n            trackRemovals: !0\n        });\n        // Reset newTargetDataByTargetMap in case this transaction gets re-run.\n                i = n.Ji;\n        const o = [];\n        e.targetChanges.forEach(((r, u) => {\n            const c = i.get(u);\n            if (!c) return;\n            // Only update the remote keys if the target is still active. This\n            // ensures that we can persist the updated target data along with\n            // the updated assignment.\n                        o.push(n.Bs.removeMatchingKeys(t, r.removedDocuments, u).next((() => n.Bs.addMatchingKeys(t, r.addedDocuments, u))));\n            let a = c.withSequenceNumber(t.currentSequenceNumber);\n            null !== e.targetMismatches.get(u) ? a = a.withResumeToken(Ve.EMPTY_BYTE_STRING, rt.min()).withLastLimboFreeSnapshotVersion(rt.min()) : r.resumeToken.approximateByteSize() > 0 && (a = a.withResumeToken(r.resumeToken, s)), \n            i = i.insert(u, a), \n            // Update the target data if there are target changes (or if\n            // sufficient time has passed since the last update).\n            /**\n * Returns true if the newTargetData should be persisted during an update of\n * an active target. TargetData should always be persisted when a target is\n * being released and should not call this function.\n *\n * While the target is active, TargetData updates can be omitted when nothing\n * about the target has changed except metadata like the resume token or\n * snapshot version. Occasionally it's worth the extra write to prevent these\n * values from getting too stale after a crash, but this doesn't have to be\n * too frequent.\n */\n            function(t, e, n) {\n                // Always persist target data if we don't already have a resume token.\n                if (0 === t.resumeToken.approximateByteSize()) return !0;\n                // Don't allow resume token changes to be buffered indefinitely. This\n                // allows us to be reasonably up-to-date after a crash and avoids needing\n                // to loop over all active queries on shutdown. Especially in the browser\n                // we may not get time to do anything interesting while the current tab is\n                // closing.\n                                if (e.snapshotVersion.toMicroseconds() - t.snapshotVersion.toMicroseconds() >= 3e8) return !0;\n                // Otherwise if the only thing that has changed about a target is its resume\n                // token it's not worth persisting. Note that the RemoteStore keeps an\n                // in-memory view of the currently active targets which includes the current\n                // resume token, so stream failure or user changes will still use an\n                // up-to-date resume token regardless of what we do here.\n                                return n.addedDocuments.size + n.modifiedDocuments.size + n.removedDocuments.size > 0;\n            }\n            /**\n * Notifies local store of the changed views to locally pin documents.\n */ (c, a, r) && o.push(n.Bs.updateTargetData(t, a));\n        }));\n        let u = cs(), c = gs();\n        // HACK: The only reason we allow a null snapshot version is so that we\n        // can synthesize remote events when we get permission denied errors while\n        // trying to resolve the state of a locally cached document that is in\n        // limbo.\n        if (e.documentUpdates.forEach((s => {\n            e.resolvedLimboDocuments.has(s) && o.push(n.persistence.referenceDelegate.updateLimboDocument(t, s));\n        })), \n        // Each loop iteration only affects its \"own\" doc, so it's safe to get all\n        // the remote documents in advance in a single call.\n        o.push(cu(t, r, e.documentUpdates).next((t => {\n            u = t.nr, c = t.sr;\n        }))), !s.isEqual(rt.min())) {\n            const e = n.Bs.getLastRemoteSnapshotVersion(t).next((e => n.Bs.setTargetsMetadata(t, t.currentSequenceNumber, s)));\n            o.push(e);\n        }\n        return Rt.waitFor(o).next((() => r.apply(t))).next((() => n.localDocuments.getLocalViewOfDocuments(t, u, c))).next((() => u));\n    })).then((t => (n.Ji = i, t)));\n}\n\n/**\n * Populates document change buffer with documents from backend or a bundle.\n * Returns the document changes resulting from applying those documents, and\n * also a set of documents whose existence state are changed as a result.\n *\n * @param txn - Transaction to use to read existing documents from storage.\n * @param documentBuffer - Document buffer to collect the resulted changes to be\n *        applied to storage.\n * @param documents - Documents to be applied.\n */ function cu(t, e, n) {\n    let s = gs(), i = gs();\n    return n.forEach((t => s = s.add(t))), e.getEntries(t, s).next((t => {\n        let s = cs();\n        return n.forEach(((n, r) => {\n            const o = t.get(n);\n            // Check if see if there is a existence state change for this document.\n                        r.isFoundDocument() !== o.isFoundDocument() && (i = i.add(n)), \n            // Note: The order of the steps below is important, since we want\n            // to ensure that rejected limbo resolutions (which fabricate\n            // NoDocuments with SnapshotVersion.min()) never add documents to\n            // cache.\n            r.isNoDocument() && r.version.isEqual(rt.min()) ? (\n            // NoDocuments with SnapshotVersion.min() are used in manufactured\n            // events. We remove these documents from cache since we lost\n            // access.\n            e.removeEntry(n, r.readTime), s = s.insert(n, r)) : !o.isValidDocument() || r.version.compareTo(o.version) > 0 || 0 === r.version.compareTo(o.version) && o.hasPendingWrites ? (e.addEntry(r), \n            s = s.insert(n, r)) : N(\"LocalStore\", \"Ignoring outdated watch update for \", n, \". Current version:\", o.version, \" Watch version:\", r.version);\n        })), {\n            nr: s,\n            sr: i\n        };\n    }));\n}\n\n/**\n * Gets the mutation batch after the passed in batchId in the mutation queue\n * or null if empty.\n * @param afterBatchId - If provided, the batch to search after.\n * @returns The next mutation or null if there wasn't one.\n */\nfunction au(t, e) {\n    const n = L(t);\n    return n.persistence.runTransaction(\"Get next mutation batch\", \"readonly\", (t => (void 0 === e && (e = -1), \n    n.mutationQueue.getNextMutationBatchAfterBatchId(t, e))));\n}\n\n/**\n * Reads the current value of a Document with a given key or null if not\n * found - used for testing.\n */\n/**\n * Assigns the given target an internal ID so that its results can be pinned so\n * they don't get GC'd. A target must be allocated in the local store before\n * the store can be used to manage its view.\n *\n * Allocating an already allocated `Target` will return the existing `TargetData`\n * for that `Target`.\n */\nfunction hu(t, e) {\n    const n = L(t);\n    return n.persistence.runTransaction(\"Allocate target\", \"readwrite\", (t => {\n        let s;\n        return n.Bs.getTargetData(t, e).next((i => i ? (\n        // This target has been listened to previously, so reuse the\n        // previous targetID.\n        // TODO(mcg): freshen last accessed date?\n        s = i, Rt.resolve(s)) : n.Bs.allocateTargetId(t).next((i => (s = new cr(e, i, \"TargetPurposeListen\" /* TargetPurpose.Listen */ , t.currentSequenceNumber), \n        n.Bs.addTargetData(t, s).next((() => s)))))));\n    })).then((t => {\n        // If Multi-Tab is enabled, the existing target data may be newer than\n        // the in-memory data\n        const s = n.Ji.get(t.targetId);\n        return (null === s || t.snapshotVersion.compareTo(s.snapshotVersion) > 0) && (n.Ji = n.Ji.insert(t.targetId, t), \n        n.Yi.set(e, t.targetId)), t;\n    }));\n}\n\n/**\n * Returns the TargetData as seen by the LocalStore, including updates that may\n * have not yet been persisted to the TargetCache.\n */\n// Visible for testing.\n/**\n * Unpins all the documents associated with the given target. If\n * `keepPersistedTargetData` is set to false and Eager GC enabled, the method\n * directly removes the associated target data from the target cache.\n *\n * Releasing a non-existing `Target` is a no-op.\n */\n// PORTING NOTE: `keepPersistedTargetData` is multi-tab only.\nasync function lu(t, e, n) {\n    const s = L(t), i = s.Ji.get(e), r = n ? \"readwrite\" : \"readwrite-primary\";\n    try {\n        n || await s.persistence.runTransaction(\"Release target\", r, (t => s.persistence.referenceDelegate.removeTarget(t, i)));\n    } catch (t) {\n        if (!Dt(t)) throw t;\n        // All `releaseTarget` does is record the final metadata state for the\n        // target, but we've been recording this periodically during target\n        // activity. If we lose this write this could cause a very slight\n        // difference in the order of target deletion during GC, but we\n        // don't define exact LRU semantics so this is acceptable.\n        N(\"LocalStore\", `Failed to update sequence numbers for target ${e}: ${t}`);\n    }\n    s.Ji = s.Ji.remove(e), s.Yi.delete(i.target);\n}\n\n/**\n * Runs the specified query against the local store and returns the results,\n * potentially taking advantage of query data from previous executions (such\n * as the set of remote keys).\n *\n * @param usePreviousResults - Whether results from previous executions can\n * be used to optimize this query execution.\n */ function fu(t, e, n) {\n    const s = L(t);\n    let i = rt.min(), r = gs();\n    return s.persistence.runTransaction(\"Execute query\", \"readonly\", (t => function(t, e, n) {\n        const s = L(t), i = s.Yi.get(n);\n        return void 0 !== i ? Rt.resolve(s.Ji.get(i)) : s.Bs.getTargetData(e, n);\n    }(s, t, Jn(e)).next((e => {\n        if (e) return i = e.lastLimboFreeSnapshotVersion, s.Bs.getMatchingKeysForTargetId(t, e.targetId).next((t => {\n            r = t;\n        }));\n    })).next((() => s.Hi.getDocumentsMatchingQuery(t, e, n ? i : rt.min(), n ? r : gs()))).next((t => (_u(s, ss(e), t), \n    {\n        documents: t,\n        ir: r\n    })))));\n}\n\n// PORTING NOTE: Multi-Tab only.\nfunction du(t, e) {\n    const n = L(t), s = L(n.Bs), i = n.Ji.get(e);\n    return i ? Promise.resolve(i.target) : n.persistence.runTransaction(\"Get target data\", \"readonly\", (t => s.le(t, e).next((t => t ? t.target : null))));\n}\n\n/**\n * Returns the set of documents that have been updated since the last call.\n * If this is the first call, returns the set of changes since client\n * initialization. Further invocations will return document that have changed\n * since the prior call.\n */\n// PORTING NOTE: Multi-Tab only.\nfunction wu(t, e) {\n    const n = L(t), s = n.Xi.get(e) || rt.min();\n    // Get the current maximum read time for the collection. This should always\n    // exist, but to reduce the chance for regressions we default to\n    // SnapshotVersion.Min()\n    // TODO(indexing): Consider removing the default value.\n        return n.persistence.runTransaction(\"Get new document changes\", \"readonly\", (t => n.Zi.getAllFromCollectionGroup(t, e, yt(s, -1), \n    /* limit= */ Number.MAX_SAFE_INTEGER))).then((t => (_u(n, e, t), t)));\n}\n\n/** Sets the collection group's maximum read time from the given documents. */\n// PORTING NOTE: Multi-Tab only.\nfunction _u(t, e, n) {\n    let s = t.Xi.get(e) || rt.min();\n    n.forEach(((t, e) => {\n        e.readTime.compareTo(s) > 0 && (s = e.readTime);\n    })), t.Xi.set(e, s);\n}\n\n/**\n * Creates a new target using the given bundle name, which will be used to\n * hold the keys of all documents from the bundle in query-document mappings.\n * This ensures that the loaded documents do not get garbage collected\n * right away.\n */\n/**\n * Applies the documents from a bundle to the \"ground-state\" (remote)\n * documents.\n *\n * LocalDocuments are re-calculated if there are remaining mutations in the\n * queue.\n */\nasync function mu(t, e, n, s) {\n    const i = L(t);\n    let r = gs(), o = cs();\n    for (const t of n) {\n        const n = e.rr(t.metadata.name);\n        t.document && (r = r.add(n));\n        const s = e.ur(t);\n        s.setReadTime(e.cr(t.metadata.readTime)), o = o.insert(n, s);\n    }\n    const u = i.Zi.newChangeBuffer({\n        trackRemovals: !0\n    }), c = await hu(i, function(t) {\n        // It is OK that the path used for the query is not valid, because this will\n        // not be read and queried.\n        return Jn(Gn(ut.fromString(`__bundle__/docs/${t}`)));\n    }(s));\n    // Allocates a target to hold all document keys from the bundle, such that\n    // they will not get garbage collected right away.\n        return i.persistence.runTransaction(\"Apply bundle documents\", \"readwrite\", (t => cu(t, u, o).next((e => (u.apply(t), \n    e))).next((e => i.Bs.removeMatchingKeysForTargetId(t, c.targetId).next((() => i.Bs.addMatchingKeys(t, r, c.targetId))).next((() => i.localDocuments.getLocalViewOfDocuments(t, e.nr, e.sr))).next((() => e.nr))))));\n}\n\n/**\n * Returns a promise of a boolean to indicate if the given bundle has already\n * been loaded and the create time is newer than the current loading bundle.\n */\n/**\n * Saves the given `NamedQuery` to local persistence.\n */\nasync function gu(t, e, n = gs()) {\n    // Allocate a target for the named query such that it can be resumed\n    // from associated read time if users use it to listen.\n    // NOTE: this also means if no corresponding target exists, the new target\n    // will remain active and will not get collected, unless users happen to\n    // unlisten the query somehow.\n    const s = await hu(t, Jn(yr(e.bundledQuery))), i = L(t);\n    return i.persistence.runTransaction(\"Save named query\", \"readwrite\", (t => {\n        const r = Ni(e.readTime);\n        // Simply save the query itself if it is older than what the SDK already\n        // has.\n                if (s.snapshotVersion.compareTo(r) >= 0) return i.qs.saveNamedQuery(t, e);\n        // Update existing target data because the query from the bundle is newer.\n                const o = s.withResumeToken(Ve.EMPTY_BYTE_STRING, r);\n        return i.Ji = i.Ji.insert(o.targetId, o), i.Bs.updateTargetData(t, o).next((() => i.Bs.removeMatchingKeysForTargetId(t, s.targetId))).next((() => i.Bs.addMatchingKeys(t, n, s.targetId))).next((() => i.qs.saveNamedQuery(t, e)));\n    }));\n}\n\n/** Assembles the key for a client state in WebStorage */\nfunction yu(t, e) {\n    return `firestore_clients_${t}_${e}`;\n}\n\n// The format of the WebStorage key that stores the mutation state is:\n//     firestore_mutations_<persistence_prefix>_<batch_id>\n//     (for unauthenticated users)\n// or: firestore_mutations_<persistence_prefix>_<batch_id>_<user_uid>\n\n// 'user_uid' is last to avoid needing to escape '_' characters that it might\n// contain.\n/** Assembles the key for a mutation batch in WebStorage */\nfunction pu(t, e, n) {\n    let s = `firestore_mutations_${t}_${n}`;\n    return e.isAuthenticated() && (s += `_${e.uid}`), s;\n}\n\n// The format of the WebStorage key that stores a query target's metadata is:\n//     firestore_targets_<persistence_prefix>_<target_id>\n/** Assembles the key for a query state in WebStorage */\nfunction Iu(t, e) {\n    return `firestore_targets_${t}_${e}`;\n}\n\n// The WebStorage prefix that stores the primary tab's online state. The\n// format of the key is:\n//     firestore_online_state_<persistence_prefix>\n/**\n * Holds the state of a mutation batch, including its user ID, batch ID and\n * whether the batch is 'pending', 'acknowledged' or 'rejected'.\n */\n// Visible for testing\nclass Tu {\n    constructor(t, e, n, s) {\n        this.user = t, this.batchId = e, this.state = n, this.error = s;\n    }\n    /**\n     * Parses a MutationMetadata from its JSON representation in WebStorage.\n     * Logs a warning and returns null if the format of the data is not valid.\n     */    static ar(t, e, n) {\n        const s = JSON.parse(n);\n        let i, r = \"object\" == typeof s && -1 !== [ \"pending\", \"acknowledged\", \"rejected\" ].indexOf(s.state) && (void 0 === s.error || \"object\" == typeof s.error);\n        return r && s.error && (r = \"string\" == typeof s.error.message && \"string\" == typeof s.error.code, \n        r && (i = new U(s.error.code, s.error.message))), r ? new Tu(t, e, s.state, i) : (k(\"SharedClientState\", `Failed to parse mutation state for ID '${e}': ${n}`), \n        null);\n    }\n    hr() {\n        const t = {\n            state: this.state,\n            updateTimeMs: Date.now()\n        };\n        return this.error && (t.error = {\n            code: this.error.code,\n            message: this.error.message\n        }), JSON.stringify(t);\n    }\n}\n\n/**\n * Holds the state of a query target, including its target ID and whether the\n * target is 'not-current', 'current' or 'rejected'.\n */\n// Visible for testing\nclass Eu {\n    constructor(t, e, n) {\n        this.targetId = t, this.state = e, this.error = n;\n    }\n    /**\n     * Parses a QueryTargetMetadata from its JSON representation in WebStorage.\n     * Logs a warning and returns null if the format of the data is not valid.\n     */    static ar(t, e) {\n        const n = JSON.parse(e);\n        let s, i = \"object\" == typeof n && -1 !== [ \"not-current\", \"current\", \"rejected\" ].indexOf(n.state) && (void 0 === n.error || \"object\" == typeof n.error);\n        return i && n.error && (i = \"string\" == typeof n.error.message && \"string\" == typeof n.error.code, \n        i && (s = new U(n.error.code, n.error.message))), i ? new Eu(t, n.state, s) : (k(\"SharedClientState\", `Failed to parse target state for ID '${t}': ${e}`), \n        null);\n    }\n    hr() {\n        const t = {\n            state: this.state,\n            updateTimeMs: Date.now()\n        };\n        return this.error && (t.error = {\n            code: this.error.code,\n            message: this.error.message\n        }), JSON.stringify(t);\n    }\n}\n\n/**\n * This class represents the immutable ClientState for a client read from\n * WebStorage, containing the list of active query targets.\n */ class Au {\n    constructor(t, e) {\n        this.clientId = t, this.activeTargetIds = e;\n    }\n    /**\n     * Parses a RemoteClientState from the JSON representation in WebStorage.\n     * Logs a warning and returns null if the format of the data is not valid.\n     */    static ar(t, e) {\n        const n = JSON.parse(e);\n        let s = \"object\" == typeof n && n.activeTargetIds instanceof Array, i = ps();\n        for (let t = 0; s && t < n.activeTargetIds.length; ++t) s = Lt(n.activeTargetIds[t]), \n        i = i.add(n.activeTargetIds[t]);\n        return s ? new Au(t, i) : (k(\"SharedClientState\", `Failed to parse client data for instance '${t}': ${e}`), \n        null);\n    }\n}\n\n/**\n * This class represents the online state for all clients participating in\n * multi-tab. The online state is only written to by the primary client, and\n * used in secondary clients to update their query views.\n */ class vu {\n    constructor(t, e) {\n        this.clientId = t, this.onlineState = e;\n    }\n    /**\n     * Parses a SharedOnlineState from its JSON representation in WebStorage.\n     * Logs a warning and returns null if the format of the data is not valid.\n     */    static ar(t) {\n        const e = JSON.parse(t);\n        return \"object\" == typeof e && -1 !== [ \"Unknown\", \"Online\", \"Offline\" ].indexOf(e.onlineState) && \"string\" == typeof e.clientId ? new vu(e.clientId, e.onlineState) : (k(\"SharedClientState\", `Failed to parse online state: ${t}`), \n        null);\n    }\n}\n\n/**\n * Metadata state of the local client. Unlike `RemoteClientState`, this class is\n * mutable and keeps track of all pending mutations, which allows us to\n * update the range of pending mutation batch IDs as new mutations are added or\n * removed.\n *\n * The data in `LocalClientState` is not read from WebStorage and instead\n * updated via its instance methods. The updated state can be serialized via\n * `toWebStorageJSON()`.\n */\n// Visible for testing.\nclass Ru {\n    constructor() {\n        this.activeTargetIds = ps();\n    }\n    lr(t) {\n        this.activeTargetIds = this.activeTargetIds.add(t);\n    }\n    dr(t) {\n        this.activeTargetIds = this.activeTargetIds.delete(t);\n    }\n    /**\n     * Converts this entry into a JSON-encoded format we can use for WebStorage.\n     * Does not encode `clientId` as it is part of the key in WebStorage.\n     */    hr() {\n        const t = {\n            activeTargetIds: this.activeTargetIds.toArray(),\n            updateTimeMs: Date.now()\n        };\n        return JSON.stringify(t);\n    }\n}\n\n/**\n * `WebStorageSharedClientState` uses WebStorage (window.localStorage) as the\n * backing store for the SharedClientState. It keeps track of all active\n * clients and supports modifications of the local client's data.\n */ class Pu {\n    constructor(t, e, n, s, i) {\n        this.window = t, this.ii = e, this.persistenceKey = n, this.wr = s, this.syncEngine = null, \n        this.onlineStateHandler = null, this.sequenceNumberHandler = null, this._r = this.mr.bind(this), \n        this.gr = new pe(et), this.started = !1, \n        /**\n         * Captures WebStorage events that occur before `start()` is called. These\n         * events are replayed once `WebStorageSharedClientState` is started.\n         */\n        this.yr = [];\n        // Escape the special characters mentioned here:\n        // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n        const r = n.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n        this.storage = this.window.localStorage, this.currentUser = i, this.pr = yu(this.persistenceKey, this.wr), \n        this.Ir = \n        /** Assembles the key for the current sequence number. */\n        function(t) {\n            return `firestore_sequence_number_${t}`;\n        }\n        /**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ (this.persistenceKey), this.gr = this.gr.insert(this.wr, new Ru), this.Tr = new RegExp(`^firestore_clients_${r}_([^_]*)$`), \n        this.Er = new RegExp(`^firestore_mutations_${r}_(\\\\d+)(?:_(.*))?$`), this.Ar = new RegExp(`^firestore_targets_${r}_(\\\\d+)$`), \n        this.vr = \n        /** Assembles the key for the online state of the primary tab. */\n        function(t) {\n            return `firestore_online_state_${t}`;\n        }\n        // The WebStorage prefix that plays as a event to indicate the remote documents\n        // might have changed due to some secondary tabs loading a bundle.\n        // format of the key is:\n        //     firestore_bundle_loaded_v2_<persistenceKey>\n        // The version ending with \"v2\" stores the list of modified collection groups.\n        (this.persistenceKey), this.Rr = function(t) {\n            return `firestore_bundle_loaded_v2_${t}`;\n        }\n        // The WebStorage key prefix for the key that stores the last sequence number allocated. The key\n        // looks like 'firestore_sequence_number_<persistence_prefix>'.\n        (this.persistenceKey), \n        // Rather than adding the storage observer during start(), we add the\n        // storage observer during initialization. This ensures that we collect\n        // events before other components populate their initial state (during their\n        // respective start() calls). Otherwise, we might for example miss a\n        // mutation that is added after LocalStore's start() processed the existing\n        // mutations but before we observe WebStorage events.\n        this.window.addEventListener(\"storage\", this._r);\n    }\n    /** Returns 'true' if WebStorage is available in the current environment. */    static D(t) {\n        return !(!t || !t.localStorage);\n    }\n    async start() {\n        // Retrieve the list of existing clients to backfill the data in\n        // SharedClientState.\n        const t = await this.syncEngine.$i();\n        for (const e of t) {\n            if (e === this.wr) continue;\n            const t = this.getItem(yu(this.persistenceKey, e));\n            if (t) {\n                const n = Au.ar(e, t);\n                n && (this.gr = this.gr.insert(n.clientId, n));\n            }\n        }\n        this.Pr();\n        // Check if there is an existing online state and call the callback handler\n        // if applicable.\n        const e = this.storage.getItem(this.vr);\n        if (e) {\n            const t = this.br(e);\n            t && this.Vr(t);\n        }\n        for (const t of this.yr) this.mr(t);\n        this.yr = [], \n        // Register a window unload hook to remove the client metadata entry from\n        // WebStorage even if `shutdown()` was not called.\n        this.window.addEventListener(\"pagehide\", (() => this.shutdown())), this.started = !0;\n    }\n    writeSequenceNumber(t) {\n        this.setItem(this.Ir, JSON.stringify(t));\n    }\n    getAllActiveQueryTargets() {\n        return this.Sr(this.gr);\n    }\n    isActiveQueryTarget(t) {\n        let e = !1;\n        return this.gr.forEach(((n, s) => {\n            s.activeTargetIds.has(t) && (e = !0);\n        })), e;\n    }\n    addPendingMutation(t) {\n        this.Dr(t, \"pending\");\n    }\n    updateMutationState(t, e, n) {\n        this.Dr(t, e, n), \n        // Once a final mutation result is observed by other clients, they no longer\n        // access the mutation's metadata entry. Since WebStorage replays events\n        // in order, it is safe to delete the entry right after updating it.\n        this.Cr(t);\n    }\n    addLocalQueryTarget(t) {\n        let e = \"not-current\";\n        // Lookup an existing query state if the target ID was already registered\n        // by another tab\n                if (this.isActiveQueryTarget(t)) {\n            const n = this.storage.getItem(Iu(this.persistenceKey, t));\n            if (n) {\n                const s = Eu.ar(t, n);\n                s && (e = s.state);\n            }\n        }\n        return this.Nr.lr(t), this.Pr(), e;\n    }\n    removeLocalQueryTarget(t) {\n        this.Nr.dr(t), this.Pr();\n    }\n    isLocalQueryTarget(t) {\n        return this.Nr.activeTargetIds.has(t);\n    }\n    clearQueryState(t) {\n        this.removeItem(Iu(this.persistenceKey, t));\n    }\n    updateQueryState(t, e, n) {\n        this.kr(t, e, n);\n    }\n    handleUserChange(t, e, n) {\n        e.forEach((t => {\n            this.Cr(t);\n        })), this.currentUser = t, n.forEach((t => {\n            this.addPendingMutation(t);\n        }));\n    }\n    setOnlineState(t) {\n        this.Mr(t);\n    }\n    notifyBundleLoaded(t) {\n        this.$r(t);\n    }\n    shutdown() {\n        this.started && (this.window.removeEventListener(\"storage\", this._r), this.removeItem(this.pr), \n        this.started = !1);\n    }\n    getItem(t) {\n        const e = this.storage.getItem(t);\n        return N(\"SharedClientState\", \"READ\", t, e), e;\n    }\n    setItem(t, e) {\n        N(\"SharedClientState\", \"SET\", t, e), this.storage.setItem(t, e);\n    }\n    removeItem(t) {\n        N(\"SharedClientState\", \"REMOVE\", t), this.storage.removeItem(t);\n    }\n    mr(t) {\n        // Note: The function is typed to take Event to be interface-compatible with\n        // `Window.addEventListener`.\n        const e = t;\n        if (e.storageArea === this.storage) {\n            if (N(\"SharedClientState\", \"EVENT\", e.key, e.newValue), e.key === this.pr) return void k(\"Received WebStorage notification for local change. Another client might have garbage-collected our state\");\n            this.ii.enqueueRetryable((async () => {\n                if (this.started) {\n                    if (null !== e.key) if (this.Tr.test(e.key)) {\n                        if (null == e.newValue) {\n                            const t = this.Or(e.key);\n                            return this.Fr(t, null);\n                        }\n                        {\n                            const t = this.Br(e.key, e.newValue);\n                            if (t) return this.Fr(t.clientId, t);\n                        }\n                    } else if (this.Er.test(e.key)) {\n                        if (null !== e.newValue) {\n                            const t = this.Lr(e.key, e.newValue);\n                            if (t) return this.qr(t);\n                        }\n                    } else if (this.Ar.test(e.key)) {\n                        if (null !== e.newValue) {\n                            const t = this.Ur(e.key, e.newValue);\n                            if (t) return this.Kr(t);\n                        }\n                    } else if (e.key === this.vr) {\n                        if (null !== e.newValue) {\n                            const t = this.br(e.newValue);\n                            if (t) return this.Vr(t);\n                        }\n                    } else if (e.key === this.Ir) {\n                        const t = function(t) {\n                            let e = Ot.ct;\n                            if (null != t) try {\n                                const n = JSON.parse(t);\n                                F(\"number\" == typeof n), e = n;\n                            } catch (t) {\n                                k(\"SharedClientState\", \"Failed to read sequence number from WebStorage\", t);\n                            }\n                            return e;\n                        }\n                        /**\n * `MemorySharedClientState` is a simple implementation of SharedClientState for\n * clients using memory persistence. The state in this class remains fully\n * isolated and no synchronization is performed.\n */ (e.newValue);\n                        t !== Ot.ct && this.sequenceNumberHandler(t);\n                    } else if (e.key === this.Rr) {\n                        const t = this.Gr(e.newValue);\n                        await Promise.all(t.map((t => this.syncEngine.Qr(t))));\n                    }\n                } else this.yr.push(e);\n            }));\n        }\n    }\n    get Nr() {\n        return this.gr.get(this.wr);\n    }\n    Pr() {\n        this.setItem(this.pr, this.Nr.hr());\n    }\n    Dr(t, e, n) {\n        const s = new Tu(this.currentUser, t, e, n), i = pu(this.persistenceKey, this.currentUser, t);\n        this.setItem(i, s.hr());\n    }\n    Cr(t) {\n        const e = pu(this.persistenceKey, this.currentUser, t);\n        this.removeItem(e);\n    }\n    Mr(t) {\n        const e = {\n            clientId: this.wr,\n            onlineState: t\n        };\n        this.storage.setItem(this.vr, JSON.stringify(e));\n    }\n    kr(t, e, n) {\n        const s = Iu(this.persistenceKey, t), i = new Eu(t, e, n);\n        this.setItem(s, i.hr());\n    }\n    $r(t) {\n        const e = JSON.stringify(Array.from(t));\n        this.setItem(this.Rr, e);\n    }\n    /**\n     * Parses a client state key in WebStorage. Returns null if the key does not\n     * match the expected key format.\n     */    Or(t) {\n        const e = this.Tr.exec(t);\n        return e ? e[1] : null;\n    }\n    /**\n     * Parses a client state in WebStorage. Returns 'null' if the value could not\n     * be parsed.\n     */    Br(t, e) {\n        const n = this.Or(t);\n        return Au.ar(n, e);\n    }\n    /**\n     * Parses a mutation batch state in WebStorage. Returns 'null' if the value\n     * could not be parsed.\n     */    Lr(t, e) {\n        const n = this.Er.exec(t), s = Number(n[1]), i = void 0 !== n[2] ? n[2] : null;\n        return Tu.ar(new V(i), s, e);\n    }\n    /**\n     * Parses a query target state from WebStorage. Returns 'null' if the value\n     * could not be parsed.\n     */    Ur(t, e) {\n        const n = this.Ar.exec(t), s = Number(n[1]);\n        return Eu.ar(s, e);\n    }\n    /**\n     * Parses an online state from WebStorage. Returns 'null' if the value\n     * could not be parsed.\n     */    br(t) {\n        return vu.ar(t);\n    }\n    Gr(t) {\n        return JSON.parse(t);\n    }\n    async qr(t) {\n        if (t.user.uid === this.currentUser.uid) return this.syncEngine.jr(t.batchId, t.state, t.error);\n        N(\"SharedClientState\", `Ignoring mutation for non-active user ${t.user.uid}`);\n    }\n    Kr(t) {\n        return this.syncEngine.zr(t.targetId, t.state, t.error);\n    }\n    Fr(t, e) {\n        const n = e ? this.gr.insert(t, e) : this.gr.remove(t), s = this.Sr(this.gr), i = this.Sr(n), r = [], o = [];\n        return i.forEach((t => {\n            s.has(t) || r.push(t);\n        })), s.forEach((t => {\n            i.has(t) || o.push(t);\n        })), this.syncEngine.Wr(r, o).then((() => {\n            this.gr = n;\n        }));\n    }\n    Vr(t) {\n        // We check whether the client that wrote this online state is still active\n        // by comparing its client ID to the list of clients kept active in\n        // IndexedDb. If a client does not update their IndexedDb client state\n        // within 5 seconds, it is considered inactive and we don't emit an online\n        // state event.\n        this.gr.get(t.clientId) && this.onlineStateHandler(t.onlineState);\n    }\n    Sr(t) {\n        let e = ps();\n        return t.forEach(((t, n) => {\n            e = e.unionWith(n.activeTargetIds);\n        })), e;\n    }\n}\n\nclass bu {\n    constructor() {\n        this.Hr = new Ru, this.Jr = {}, this.onlineStateHandler = null, this.sequenceNumberHandler = null;\n    }\n    addPendingMutation(t) {\n        // No op.\n    }\n    updateMutationState(t, e, n) {\n        // No op.\n    }\n    addLocalQueryTarget(t) {\n        return this.Hr.lr(t), this.Jr[t] || \"not-current\";\n    }\n    updateQueryState(t, e, n) {\n        this.Jr[t] = e;\n    }\n    removeLocalQueryTarget(t) {\n        this.Hr.dr(t);\n    }\n    isLocalQueryTarget(t) {\n        return this.Hr.activeTargetIds.has(t);\n    }\n    clearQueryState(t) {\n        delete this.Jr[t];\n    }\n    getAllActiveQueryTargets() {\n        return this.Hr.activeTargetIds;\n    }\n    isActiveQueryTarget(t) {\n        return this.Hr.activeTargetIds.has(t);\n    }\n    start() {\n        return this.Hr = new Ru, Promise.resolve();\n    }\n    handleUserChange(t, e, n) {\n        // No op.\n    }\n    setOnlineState(t) {\n        // No op.\n    }\n    shutdown() {}\n    writeSequenceNumber(t) {}\n    notifyBundleLoaded(t) {\n        // No op.\n    }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class Vu {\n    Yr(t) {\n        // No-op.\n    }\n    shutdown() {\n        // No-op.\n    }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// References to `window` are guarded by BrowserConnectivityMonitor.isAvailable()\n/* eslint-disable no-restricted-globals */\n/**\n * Browser implementation of ConnectivityMonitor.\n */\nclass Su {\n    constructor() {\n        this.Xr = () => this.Zr(), this.eo = () => this.no(), this.so = [], this.io();\n    }\n    Yr(t) {\n        this.so.push(t);\n    }\n    shutdown() {\n        window.removeEventListener(\"online\", this.Xr), window.removeEventListener(\"offline\", this.eo);\n    }\n    io() {\n        window.addEventListener(\"online\", this.Xr), window.addEventListener(\"offline\", this.eo);\n    }\n    Zr() {\n        N(\"ConnectivityMonitor\", \"Network connectivity changed: AVAILABLE\");\n        for (const t of this.so) t(0 /* NetworkStatus.AVAILABLE */);\n    }\n    no() {\n        N(\"ConnectivityMonitor\", \"Network connectivity changed: UNAVAILABLE\");\n        for (const t of this.so) t(1 /* NetworkStatus.UNAVAILABLE */);\n    }\n    // TODO(chenbrian): Consider passing in window either into this component or\n    // here for testing via FakeWindow.\n    /** Checks that all used attributes of window are available. */\n    static D() {\n        return \"undefined\" != typeof window && void 0 !== window.addEventListener && void 0 !== window.removeEventListener;\n    }\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The value returned from the most recent invocation of\n * `generateUniqueDebugId()`, or null if it has never been invoked.\n */ let Du = null;\n\n/**\n * Generates and returns an initial value for `lastUniqueDebugId`.\n *\n * The returned value is randomly selected from a range of integers that are\n * represented as 8 hexadecimal digits. This means that (within reason) any\n * numbers generated by incrementing the returned number by 1 will also be\n * represented by 8 hexadecimal digits. This leads to all \"IDs\" having the same\n * length when converted to a hexadecimal string, making reading logs containing\n * these IDs easier to follow. And since the return value is randomly selected\n * it will help to differentiate between logs from different executions.\n */\n/**\n * Generates and returns a unique ID as a hexadecimal string.\n *\n * The returned ID is intended to be used in debug logging messages to help\n * correlate log messages that may be spatially separated in the logs, but\n * logically related. For example, a network connection could include the same\n * \"debug ID\" string in all of its log messages to help trace a specific\n * connection over time.\n *\n * @return the 10-character generated ID (e.g. \"0xa1b2c3d4\").\n */\nfunction Cu() {\n    return null === Du ? Du = 268435456 + Math.round(2147483648 * Math.random()) : Du++, \n    \"0x\" + Du.toString(16);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const xu = {\n    BatchGetDocuments: \"batchGet\",\n    Commit: \"commit\",\n    RunQuery: \"runQuery\",\n    RunAggregationQuery: \"runAggregationQuery\"\n};\n\n/**\n * Maps RPC names to the corresponding REST endpoint name.\n *\n * We use array notation to avoid mangling.\n */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides a simple helper class that implements the Stream interface to\n * bridge to other implementations that are streams but do not implement the\n * interface. The stream callbacks are invoked with the callOn... methods.\n */\nclass Nu {\n    constructor(t) {\n        this.ro = t.ro, this.oo = t.oo;\n    }\n    uo(t) {\n        this.co = t;\n    }\n    ao(t) {\n        this.ho = t;\n    }\n    onMessage(t) {\n        this.lo = t;\n    }\n    close() {\n        this.oo();\n    }\n    send(t) {\n        this.ro(t);\n    }\n    fo() {\n        this.co();\n    }\n    wo(t) {\n        this.ho(t);\n    }\n    _o(t) {\n        this.lo(t);\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const ku = \"WebChannelConnection\";\n\nclass Mu extends \n/**\n * Base class for all Rest-based connections to the backend (WebChannel and\n * HTTP).\n */\nclass {\n    constructor(t) {\n        this.databaseInfo = t, this.databaseId = t.databaseId;\n        const e = t.ssl ? \"https\" : \"http\";\n        this.mo = e + \"://\" + t.host, this.yo = \"projects/\" + this.databaseId.projectId + \"/databases/\" + this.databaseId.database + \"/documents\";\n    }\n    get po() {\n        // Both `invokeRPC()` and `invokeStreamingRPC()` use their `path` arguments to determine\n        // where to run the query, and expect the `request` to NOT specify the \"path\".\n        return !1;\n    }\n    Io(t, e, n, s, i) {\n        const r = Cu(), o = this.To(t, e);\n        N(\"RestConnection\", `Sending RPC '${t}' ${r}:`, o, n);\n        const u = {};\n        return this.Eo(u, s, i), this.Ao(t, o, u, n).then((e => (N(\"RestConnection\", `Received RPC '${t}' ${r}: `, e), \n        e)), (e => {\n            throw M(\"RestConnection\", `RPC '${t}' ${r} failed with error: `, e, \"url: \", o, \"request:\", n), \n            e;\n        }));\n    }\n    vo(t, e, n, s, i, r) {\n        // The REST API automatically aggregates all of the streamed results, so we\n        // can just use the normal invoke() method.\n        return this.Io(t, e, n, s, i);\n    }\n    /**\n     * Modifies the headers for a request, adding any authorization token if\n     * present and any additional headers for the request.\n     */    Eo(t, e, n) {\n        t[\"X-Goog-Api-Client\"] = \"gl-js/ fire/\" + S, \n        // Content-Type: text/plain will avoid preflight requests which might\n        // mess with CORS and redirects by proxies. If we add custom headers\n        // we will need to change this code to potentially use the $httpOverwrite\n        // parameter supported by ESF to avoid triggering preflight requests.\n        t[\"Content-Type\"] = \"text/plain\", this.databaseInfo.appId && (t[\"X-Firebase-GMPID\"] = this.databaseInfo.appId), \n        e && e.headers.forEach(((e, n) => t[n] = e)), n && n.headers.forEach(((e, n) => t[n] = e));\n    }\n    To(t, e) {\n        const n = xu[t];\n        return `${this.mo}/v1/${e}:${n}`;\n    }\n} {\n    constructor(t) {\n        super(t), this.forceLongPolling = t.forceLongPolling, this.autoDetectLongPolling = t.autoDetectLongPolling, \n        this.useFetchStreams = t.useFetchStreams, this.longPollingOptions = t.longPollingOptions;\n    }\n    Ao(t, e, n, s) {\n        const i = Cu();\n        return new Promise(((r, o) => {\n            const u = new XhrIo;\n            u.setWithCredentials(!0), u.listenOnce(EventType.COMPLETE, (() => {\n                try {\n                    switch (u.getLastErrorCode()) {\n                      case ErrorCode.NO_ERROR:\n                        const e = u.getResponseJson();\n                        N(ku, `XHR for RPC '${t}' ${i} received:`, JSON.stringify(e)), r(e);\n                        break;\n\n                      case ErrorCode.TIMEOUT:\n                        N(ku, `RPC '${t}' ${i} timed out`), o(new U(q.DEADLINE_EXCEEDED, \"Request time out\"));\n                        break;\n\n                      case ErrorCode.HTTP_ERROR:\n                        const n = u.getStatus();\n                        if (N(ku, `RPC '${t}' ${i} failed with status:`, n, \"response text:\", u.getResponseText()), \n                        n > 0) {\n                            let t = u.getResponseJson();\n                            Array.isArray(t) && (t = t[0]);\n                            const e = null == t ? void 0 : t.error;\n                            if (e && e.status && e.message) {\n                                const t = function(t) {\n                                    const e = t.toLowerCase().replace(/_/g, \"-\");\n                                    return Object.values(q).indexOf(e) >= 0 ? e : q.UNKNOWN;\n                                }(e.status);\n                                o(new U(t, e.message));\n                            } else o(new U(q.UNKNOWN, \"Server responded with status \" + u.getStatus()));\n                        } else \n                        // If we received an HTTP_ERROR but there's no status code,\n                        // it's most probably a connection issue\n                        o(new U(q.UNAVAILABLE, \"Connection failed.\"));\n                        break;\n\n                      default:\n                        O();\n                    }\n                } finally {\n                    N(ku, `RPC '${t}' ${i} completed.`);\n                }\n            }));\n            const c = JSON.stringify(s);\n            N(ku, `RPC '${t}' ${i} sending request:`, s), u.send(e, \"POST\", c, n, 15);\n        }));\n    }\n    Ro(t, e, n) {\n        const s = Cu(), i = [ this.mo, \"/\", \"google.firestore.v1.Firestore\", \"/\", t, \"/channel\" ], r = createWebChannelTransport(), o = getStatEventTarget(), u = {\n            // Required for backend stickiness, routing behavior is based on this\n            // parameter.\n            httpSessionIdParam: \"gsessionid\",\n            initMessageHeaders: {},\n            messageUrlParams: {\n                // This param is used to improve routing and project isolation by the\n                // backend and must be included in every request.\n                database: `projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`\n            },\n            sendRawJson: !0,\n            supportsCrossDomainXhr: !0,\n            internalChannelParams: {\n                // Override the default timeout (randomized between 10-20 seconds) since\n                // a large write batch on a slow internet connection may take a long\n                // time to send to the backend. Rather than have WebChannel impose a\n                // tight timeout which could lead to infinite timeouts and retries, we\n                // set it very large (5-10 minutes) and rely on the browser's builtin\n                // timeouts to kick in if the request isn't working.\n                forwardChannelRequestTimeoutMs: 6e5\n            },\n            forceLongPolling: this.forceLongPolling,\n            detectBufferingProxy: this.autoDetectLongPolling\n        }, c = this.longPollingOptions.timeoutSeconds;\n        void 0 !== c && (u.longPollingTimeout = Math.round(1e3 * c)), this.useFetchStreams && (u.xmlHttpFactory = new FetchXmlHttpFactory({})), \n        this.Eo(u.initMessageHeaders, e, n), \n        // Sending the custom headers we just added to request.initMessageHeaders\n        // (Authorization, etc.) will trigger the browser to make a CORS preflight\n        // request because the XHR will no longer meet the criteria for a \"simple\"\n        // CORS request:\n        // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests\n        // Therefore to avoid the CORS preflight request (an extra network\n        // roundtrip), we use the encodeInitMessageHeaders option to specify that\n        // the headers should instead be encoded in the request's POST payload,\n        // which is recognized by the webchannel backend.\n        u.encodeInitMessageHeaders = !0;\n        const a = i.join(\"\");\n        N(ku, `Creating RPC '${t}' stream ${s}: ${a}`, u);\n        const h = r.createWebChannel(a, u);\n        // WebChannel supports sending the first message with the handshake - saving\n        // a network round trip. However, it will have to call send in the same\n        // JS event loop as open. In order to enforce this, we delay actually\n        // opening the WebChannel until send is called. Whether we have called\n        // open is tracked with this variable.\n                let l = !1, f = !1;\n        // A flag to determine whether the stream was closed (by us or through an\n        // error/close event) to avoid delivering multiple close events or sending\n        // on a closed stream\n                const d = new Nu({\n            ro: e => {\n                f ? N(ku, `Not sending because RPC '${t}' stream ${s} is closed:`, e) : (l || (N(ku, `Opening RPC '${t}' stream ${s} transport.`), \n                h.open(), l = !0), N(ku, `RPC '${t}' stream ${s} sending:`, e), h.send(e));\n            },\n            oo: () => h.close()\n        }), w = (t, e, n) => {\n            // TODO(dimond): closure typing seems broken because WebChannel does\n            // not implement goog.events.Listenable\n            t.listen(e, (t => {\n                try {\n                    n(t);\n                } catch (t) {\n                    setTimeout((() => {\n                        throw t;\n                    }), 0);\n                }\n            }));\n        };\n        // Closure events are guarded and exceptions are swallowed, so catch any\n        // exception and rethrow using a setTimeout so they become visible again.\n        // Note that eventually this function could go away if we are confident\n        // enough the code is exception free.\n                return w(h, WebChannel.EventType.OPEN, (() => {\n            f || N(ku, `RPC '${t}' stream ${s} transport opened.`);\n        })), w(h, WebChannel.EventType.CLOSE, (() => {\n            f || (f = !0, N(ku, `RPC '${t}' stream ${s} transport closed`), d.wo());\n        })), w(h, WebChannel.EventType.ERROR, (e => {\n            f || (f = !0, M(ku, `RPC '${t}' stream ${s} transport errored:`, e), d.wo(new U(q.UNAVAILABLE, \"The operation could not be completed\")));\n        })), w(h, WebChannel.EventType.MESSAGE, (e => {\n            var n;\n            if (!f) {\n                const i = e.data[0];\n                F(!!i);\n                // TODO(b/35143891): There is a bug in One Platform that caused errors\n                // (and only errors) to be wrapped in an extra array. To be forward\n                // compatible with the bug we need to check either condition. The latter\n                // can be removed once the fix has been rolled out.\n                // Use any because msgData.error is not typed.\n                const r = i, o = r.error || (null === (n = r[0]) || void 0 === n ? void 0 : n.error);\n                if (o) {\n                    N(ku, `RPC '${t}' stream ${s} received error:`, o);\n                    // error.status will be a string like 'OK' or 'NOT_FOUND'.\n                    const e = o.status;\n                    let n = \n                    /**\n * Maps an error Code from a GRPC status identifier like 'NOT_FOUND'.\n *\n * @returns The Code equivalent to the given status string or undefined if\n *     there is no match.\n */\n                    function(t) {\n                        // lookup by string\n                        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                        const e = ii[t];\n                        if (void 0 !== e) return ui(e);\n                    }(e), i = o.message;\n                    void 0 === n && (n = q.INTERNAL, i = \"Unknown error status: \" + e + \" with message \" + o.message), \n                    // Mark closed so no further events are propagated\n                    f = !0, d.wo(new U(n, i)), h.close();\n                } else N(ku, `RPC '${t}' stream ${s} received:`, i), d._o(i);\n            }\n        })), w(o, Event.STAT_EVENT, (e => {\n            e.stat === Stat.PROXY ? N(ku, `RPC '${t}' stream ${s} detected buffering proxy`) : e.stat === Stat.NOPROXY && N(ku, `RPC '${t}' stream ${s} detected no buffering proxy`);\n        })), setTimeout((() => {\n            // Technically we could/should wait for the WebChannel opened event,\n            // but because we want to send the first message with the WebChannel\n            // handshake we pretend the channel opened here (asynchronously), and\n            // then delay the actual open until the first message is sent.\n            d.fo();\n        }), 0), d;\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Initializes the WebChannelConnection for the browser. */\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** The Platform's 'window' implementation or null if not available. */\nfunction $u() {\n    // `window` is not always available, e.g. in ReactNative and WebWorkers.\n    // eslint-disable-next-line no-restricted-globals\n    return \"undefined\" != typeof window ? window : null;\n}\n\n/** The Platform's 'document' implementation or null if not available. */ function Ou() {\n    // `document` is not always available, e.g. in ReactNative and WebWorkers.\n    // eslint-disable-next-line no-restricted-globals\n    return \"undefined\" != typeof document ? document : null;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ function Fu(t) {\n    return new Vi(t, /* useProto3Json= */ !0);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A helper for running delayed tasks following an exponential backoff curve\n * between attempts.\n *\n * Each delay is made up of a \"base\" delay which follows the exponential\n * backoff curve, and a +/- 50% \"jitter\" that is calculated and added to the\n * base delay. This prevents clients from accidentally synchronizing their\n * delays causing spikes of load to the backend.\n */\nclass Bu {\n    constructor(\n    /**\n     * The AsyncQueue to run backoff operations on.\n     */\n    t, \n    /**\n     * The ID to use when scheduling backoff operations on the AsyncQueue.\n     */\n    e, \n    /**\n     * The initial delay (used as the base delay on the first retry attempt).\n     * Note that jitter will still be applied, so the actual delay could be as\n     * little as 0.5*initialDelayMs.\n     */\n    n = 1e3\n    /**\n     * The multiplier to use to determine the extended base delay after each\n     * attempt.\n     */ , s = 1.5\n    /**\n     * The maximum base delay after which no further backoff is performed.\n     * Note that jitter will still be applied, so the actual delay could be as\n     * much as 1.5*maxDelayMs.\n     */ , i = 6e4) {\n        this.ii = t, this.timerId = e, this.Po = n, this.bo = s, this.Vo = i, this.So = 0, \n        this.Do = null, \n        /** The last backoff attempt, as epoch milliseconds. */\n        this.Co = Date.now(), this.reset();\n    }\n    /**\n     * Resets the backoff delay.\n     *\n     * The very next backoffAndWait() will have no delay. If it is called again\n     * (i.e. due to an error), initialDelayMs (plus jitter) will be used, and\n     * subsequent ones will increase according to the backoffFactor.\n     */    reset() {\n        this.So = 0;\n    }\n    /**\n     * Resets the backoff delay to the maximum delay (e.g. for use after a\n     * RESOURCE_EXHAUSTED error).\n     */    xo() {\n        this.So = this.Vo;\n    }\n    /**\n     * Returns a promise that resolves after currentDelayMs, and increases the\n     * delay for any subsequent attempts. If there was a pending backoff operation\n     * already, it will be canceled.\n     */    No(t) {\n        // Cancel any pending backoff operation.\n        this.cancel();\n        // First schedule using the current base (which may be 0 and should be\n        // honored as such).\n        const e = Math.floor(this.So + this.ko()), n = Math.max(0, Date.now() - this.Co), s = Math.max(0, e - n);\n        // Guard against lastAttemptTime being in the future due to a clock change.\n                s > 0 && N(\"ExponentialBackoff\", `Backing off for ${s} ms (base delay: ${this.So} ms, delay with jitter: ${e} ms, last attempt: ${n} ms ago)`), \n        this.Do = this.ii.enqueueAfterDelay(this.timerId, s, (() => (this.Co = Date.now(), \n        t()))), \n        // Apply backoff factor to determine next delay and ensure it is within\n        // bounds.\n        this.So *= this.bo, this.So < this.Po && (this.So = this.Po), this.So > this.Vo && (this.So = this.Vo);\n    }\n    Mo() {\n        null !== this.Do && (this.Do.skipDelay(), this.Do = null);\n    }\n    cancel() {\n        null !== this.Do && (this.Do.cancel(), this.Do = null);\n    }\n    /** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */    ko() {\n        return (Math.random() - .5) * this.So;\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A PersistentStream is an abstract base class that represents a streaming RPC\n * to the Firestore backend. It's built on top of the connections own support\n * for streaming RPCs, and adds several critical features for our clients:\n *\n *   - Exponential backoff on failure\n *   - Authentication via CredentialsProvider\n *   - Dispatching all callbacks into the shared worker queue\n *   - Closing idle streams after 60 seconds of inactivity\n *\n * Subclasses of PersistentStream implement serialization of models to and\n * from the JSON representation of the protocol buffers for a specific\n * streaming RPC.\n *\n * ## Starting and Stopping\n *\n * Streaming RPCs are stateful and need to be start()ed before messages can\n * be sent and received. The PersistentStream will call the onOpen() function\n * of the listener once the stream is ready to accept requests.\n *\n * Should a start() fail, PersistentStream will call the registered onClose()\n * listener with a FirestoreError indicating what went wrong.\n *\n * A PersistentStream can be started and stopped repeatedly.\n *\n * Generic types:\n *  SendType: The type of the outgoing message of the underlying\n *    connection stream\n *  ReceiveType: The type of the incoming message of the underlying\n *    connection stream\n *  ListenerType: The type of the listener that will be used for callbacks\n */\nclass Lu {\n    constructor(t, e, n, s, i, r, o, u) {\n        this.ii = t, this.$o = n, this.Oo = s, this.connection = i, this.authCredentialsProvider = r, \n        this.appCheckCredentialsProvider = o, this.listener = u, this.state = 0 /* PersistentStreamState.Initial */ , \n        /**\n         * A close count that's incremented every time the stream is closed; used by\n         * getCloseGuardedDispatcher() to invalidate callbacks that happen after\n         * close.\n         */\n        this.Fo = 0, this.Bo = null, this.Lo = null, this.stream = null, this.qo = new Bu(t, e);\n    }\n    /**\n     * Returns true if start() has been called and no error has occurred. True\n     * indicates the stream is open or in the process of opening (which\n     * encompasses respecting backoff, getting auth tokens, and starting the\n     * actual RPC). Use isOpen() to determine if the stream is open and ready for\n     * outbound requests.\n     */    Uo() {\n        return 1 /* PersistentStreamState.Starting */ === this.state || 5 /* PersistentStreamState.Backoff */ === this.state || this.Ko();\n    }\n    /**\n     * Returns true if the underlying RPC is open (the onOpen() listener has been\n     * called) and the stream is ready for outbound requests.\n     */    Ko() {\n        return 2 /* PersistentStreamState.Open */ === this.state || 3 /* PersistentStreamState.Healthy */ === this.state;\n    }\n    /**\n     * Starts the RPC. Only allowed if isStarted() returns false. The stream is\n     * not immediately ready for use: onOpen() will be invoked when the RPC is\n     * ready for outbound requests, at which point isOpen() will return true.\n     *\n     * When start returns, isStarted() will return true.\n     */    start() {\n        4 /* PersistentStreamState.Error */ !== this.state ? this.auth() : this.Go();\n    }\n    /**\n     * Stops the RPC. This call is idempotent and allowed regardless of the\n     * current isStarted() state.\n     *\n     * When stop returns, isStarted() and isOpen() will both return false.\n     */    async stop() {\n        this.Uo() && await this.close(0 /* PersistentStreamState.Initial */);\n    }\n    /**\n     * After an error the stream will usually back off on the next attempt to\n     * start it. If the error warrants an immediate restart of the stream, the\n     * sender can use this to indicate that the receiver should not back off.\n     *\n     * Each error will call the onClose() listener. That function can decide to\n     * inhibit backoff if required.\n     */    Qo() {\n        this.state = 0 /* PersistentStreamState.Initial */ , this.qo.reset();\n    }\n    /**\n     * Marks this stream as idle. If no further actions are performed on the\n     * stream for one minute, the stream will automatically close itself and\n     * notify the stream's onClose() handler with Status.OK. The stream will then\n     * be in a !isStarted() state, requiring the caller to start the stream again\n     * before further use.\n     *\n     * Only streams that are in state 'Open' can be marked idle, as all other\n     * states imply pending network operations.\n     */    jo() {\n        // Starts the idle time if we are in state 'Open' and are not yet already\n        // running a timer (in which case the previous idle timeout still applies).\n        this.Ko() && null === this.Bo && (this.Bo = this.ii.enqueueAfterDelay(this.$o, 6e4, (() => this.zo())));\n    }\n    /** Sends a message to the underlying stream. */    Wo(t) {\n        this.Ho(), this.stream.send(t);\n    }\n    /** Called by the idle timer when the stream should close due to inactivity. */    async zo() {\n        if (this.Ko()) \n        // When timing out an idle stream there's no reason to force the stream into backoff when\n        // it restarts so set the stream state to Initial instead of Error.\n        return this.close(0 /* PersistentStreamState.Initial */);\n    }\n    /** Marks the stream as active again. */    Ho() {\n        this.Bo && (this.Bo.cancel(), this.Bo = null);\n    }\n    /** Cancels the health check delayed operation. */    Jo() {\n        this.Lo && (this.Lo.cancel(), this.Lo = null);\n    }\n    /**\n     * Closes the stream and cleans up as necessary:\n     *\n     * * closes the underlying GRPC stream;\n     * * calls the onClose handler with the given 'error';\n     * * sets internal stream state to 'finalState';\n     * * adjusts the backoff timer based on the error\n     *\n     * A new stream can be opened by calling start().\n     *\n     * @param finalState - the intended state of the stream after closing.\n     * @param error - the error the connection was closed with.\n     */    async close(t, e) {\n        // Cancel any outstanding timers (they're guaranteed not to execute).\n        this.Ho(), this.Jo(), this.qo.cancel(), \n        // Invalidates any stream-related callbacks (e.g. from auth or the\n        // underlying stream), guaranteeing they won't execute.\n        this.Fo++, 4 /* PersistentStreamState.Error */ !== t ? \n        // If this is an intentional close ensure we don't delay our next connection attempt.\n        this.qo.reset() : e && e.code === q.RESOURCE_EXHAUSTED ? (\n        // Log the error. (Probably either 'quota exceeded' or 'max queue length reached'.)\n        k(e.toString()), k(\"Using maximum backoff delay to prevent overloading the backend.\"), \n        this.qo.xo()) : e && e.code === q.UNAUTHENTICATED && 3 /* PersistentStreamState.Healthy */ !== this.state && (\n        // \"unauthenticated\" error means the token was rejected. This should rarely\n        // happen since both Auth and AppCheck ensure a sufficient TTL when we\n        // request a token. If a user manually resets their system clock this can\n        // fail, however. In this case, we should get a Code.UNAUTHENTICATED error\n        // before we received the first message and we need to invalidate the token\n        // to ensure that we fetch a new token.\n        this.authCredentialsProvider.invalidateToken(), this.appCheckCredentialsProvider.invalidateToken()), \n        // Clean up the underlying stream because we are no longer interested in events.\n        null !== this.stream && (this.Yo(), this.stream.close(), this.stream = null), \n        // This state must be assigned before calling onClose() to allow the callback to\n        // inhibit backoff or otherwise manipulate the state in its non-started state.\n        this.state = t, \n        // Notify the listener that the stream closed.\n        await this.listener.ao(e);\n    }\n    /**\n     * Can be overridden to perform additional cleanup before the stream is closed.\n     * Calling super.tearDown() is not required.\n     */    Yo() {}\n    auth() {\n        this.state = 1 /* PersistentStreamState.Starting */;\n        const t = this.Xo(this.Fo), e = this.Fo;\n        // TODO(mikelehen): Just use dispatchIfNotClosed, but see TODO below.\n                Promise.all([ this.authCredentialsProvider.getToken(), this.appCheckCredentialsProvider.getToken() ]).then((([t, n]) => {\n            // Stream can be stopped while waiting for authentication.\n            // TODO(mikelehen): We really should just use dispatchIfNotClosed\n            // and let this dispatch onto the queue, but that opened a spec test can\n            // of worms that I don't want to deal with in this PR.\n            this.Fo === e && \n            // Normally we'd have to schedule the callback on the AsyncQueue.\n            // However, the following calls are safe to be called outside the\n            // AsyncQueue since they don't chain asynchronous calls\n            this.Zo(t, n);\n        }), (e => {\n            t((() => {\n                const t = new U(q.UNKNOWN, \"Fetching auth token failed: \" + e.message);\n                return this.tu(t);\n            }));\n        }));\n    }\n    Zo(t, e) {\n        const n = this.Xo(this.Fo);\n        this.stream = this.eu(t, e), this.stream.uo((() => {\n            n((() => (this.state = 2 /* PersistentStreamState.Open */ , this.Lo = this.ii.enqueueAfterDelay(this.Oo, 1e4, (() => (this.Ko() && (this.state = 3 /* PersistentStreamState.Healthy */), \n            Promise.resolve()))), this.listener.uo())));\n        })), this.stream.ao((t => {\n            n((() => this.tu(t)));\n        })), this.stream.onMessage((t => {\n            n((() => this.onMessage(t)));\n        }));\n    }\n    Go() {\n        this.state = 5 /* PersistentStreamState.Backoff */ , this.qo.No((async () => {\n            this.state = 0 /* PersistentStreamState.Initial */ , this.start();\n        }));\n    }\n    // Visible for tests\n    tu(t) {\n        // In theory the stream could close cleanly, however, in our current model\n        // we never expect this to happen because if we stop a stream ourselves,\n        // this callback will never be called. To prevent cases where we retry\n        // without a backoff accidentally, we set the stream to error in all cases.\n        return N(\"PersistentStream\", `close with error: ${t}`), this.stream = null, this.close(4 /* PersistentStreamState.Error */ , t);\n    }\n    /**\n     * Returns a \"dispatcher\" function that dispatches operations onto the\n     * AsyncQueue but only runs them if closeCount remains unchanged. This allows\n     * us to turn auth / stream callbacks into no-ops if the stream is closed /\n     * re-opened, etc.\n     */    Xo(t) {\n        return e => {\n            this.ii.enqueueAndForget((() => this.Fo === t ? e() : (N(\"PersistentStream\", \"stream callback skipped by getCloseGuardedDispatcher.\"), \n            Promise.resolve())));\n        };\n    }\n}\n\n/**\n * A PersistentStream that implements the Listen RPC.\n *\n * Once the Listen stream has called the onOpen() listener, any number of\n * listen() and unlisten() calls can be made to control what changes will be\n * sent from the server for ListenResponses.\n */ class qu extends Lu {\n    constructor(t, e, n, s, i, r) {\n        super(t, \"listen_stream_connection_backoff\" /* TimerId.ListenStreamConnectionBackoff */ , \"listen_stream_idle\" /* TimerId.ListenStreamIdle */ , \"health_check_timeout\" /* TimerId.HealthCheckTimeout */ , e, n, s, r), \n        this.serializer = i;\n    }\n    eu(t, e) {\n        return this.connection.Ro(\"Listen\", t, e);\n    }\n    onMessage(t) {\n        // A successful response means the stream is healthy\n        this.qo.reset();\n        const e = Qi(this.serializer, t), n = function(t) {\n            // We have only reached a consistent snapshot for the entire stream if there\n            // is a read_time set and it applies to all targets (i.e. the list of\n            // targets is empty). The backend is guaranteed to send such responses.\n            if (!(\"targetChange\" in t)) return rt.min();\n            const e = t.targetChange;\n            return e.targetIds && e.targetIds.length ? rt.min() : e.readTime ? Ni(e.readTime) : rt.min();\n        }(t);\n        return this.listener.nu(e, n);\n    }\n    /**\n     * Registers interest in the results of the given target. If the target\n     * includes a resumeToken it will be included in the request. Results that\n     * affect the target will be streamed back as WatchChange messages that\n     * reference the targetId.\n     */    su(t) {\n        const e = {};\n        e.database = Li(this.serializer), e.addTarget = function(t, e) {\n            let n;\n            const s = e.target;\n            if (n = Fn(s) ? {\n                documents: Hi(t, s)\n            } : {\n                query: Ji(t, s)\n            }, n.targetId = e.targetId, e.resumeToken.approximateByteSize() > 0) {\n                n.resumeToken = Ci(t, e.resumeToken);\n                const s = Si(t, e.expectedCount);\n                null !== s && (n.expectedCount = s);\n            } else if (e.snapshotVersion.compareTo(rt.min()) > 0) {\n                // TODO(wuandy): Consider removing above check because it is most likely true.\n                // Right now, many tests depend on this behaviour though (leaving min() out\n                // of serialization).\n                n.readTime = Di(t, e.snapshotVersion.toTimestamp());\n                const s = Si(t, e.expectedCount);\n                null !== s && (n.expectedCount = s);\n            }\n            return n;\n        }(this.serializer, t);\n        const n = Xi(this.serializer, t);\n        n && (e.labels = n), this.Wo(e);\n    }\n    /**\n     * Unregisters interest in the results of the target associated with the\n     * given targetId.\n     */    iu(t) {\n        const e = {};\n        e.database = Li(this.serializer), e.removeTarget = t, this.Wo(e);\n    }\n}\n\n/**\n * A Stream that implements the Write RPC.\n *\n * The Write RPC requires the caller to maintain special streamToken\n * state in between calls, to help the server understand which responses the\n * client has processed by the time the next request is made. Every response\n * will contain a streamToken; this value must be passed to the next\n * request.\n *\n * After calling start() on this stream, the next request must be a handshake,\n * containing whatever streamToken is on hand. Once a response to this\n * request is received, all pending mutations may be submitted. When\n * submitting multiple batches of mutations at the same time, it's\n * okay to use the same streamToken for the calls to writeMutations.\n *\n * TODO(b/33271235): Use proto types\n */ class Uu extends Lu {\n    constructor(t, e, n, s, i, r) {\n        super(t, \"write_stream_connection_backoff\" /* TimerId.WriteStreamConnectionBackoff */ , \"write_stream_idle\" /* TimerId.WriteStreamIdle */ , \"health_check_timeout\" /* TimerId.HealthCheckTimeout */ , e, n, s, r), \n        this.serializer = i, this.ru = !1;\n    }\n    /**\n     * Tracks whether or not a handshake has been successfully exchanged and\n     * the stream is ready to accept mutations.\n     */    get ou() {\n        return this.ru;\n    }\n    // Override of PersistentStream.start\n    start() {\n        this.ru = !1, this.lastStreamToken = void 0, super.start();\n    }\n    Yo() {\n        this.ru && this.uu([]);\n    }\n    eu(t, e) {\n        return this.connection.Ro(\"Write\", t, e);\n    }\n    onMessage(t) {\n        if (\n        // Always capture the last stream token.\n        F(!!t.streamToken), this.lastStreamToken = t.streamToken, this.ru) {\n            // A successful first write response means the stream is healthy,\n            // Note, that we could consider a successful handshake healthy, however,\n            // the write itself might be causing an error we want to back off from.\n            this.qo.reset();\n            const e = Wi(t.writeResults, t.commitTime), n = Ni(t.commitTime);\n            return this.listener.cu(n, e);\n        }\n        // The first response is always the handshake response\n        return F(!t.writeResults || 0 === t.writeResults.length), this.ru = !0, this.listener.au();\n    }\n    /**\n     * Sends an initial streamToken to the server, performing the handshake\n     * required to make the StreamingWrite RPC work. Subsequent\n     * calls should wait until onHandshakeComplete was called.\n     */    hu() {\n        // TODO(dimond): Support stream resumption. We intentionally do not set the\n        // stream token on the handshake, ignoring any stream token we might have.\n        const t = {};\n        t.database = Li(this.serializer), this.Wo(t);\n    }\n    /** Sends a group of mutations to the Firestore backend to apply. */    uu(t) {\n        const e = {\n            streamToken: this.lastStreamToken,\n            writes: t.map((t => ji(this.serializer, t)))\n        };\n        this.Wo(e);\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Datastore and its related methods are a wrapper around the external Google\n * Cloud Datastore grpc API, which provides an interface that is more convenient\n * for the rest of the client SDK architecture to consume.\n */\n/**\n * An implementation of Datastore that exposes additional state for internal\n * consumption.\n */\nclass Ku extends class {} {\n    constructor(t, e, n, s) {\n        super(), this.authCredentials = t, this.appCheckCredentials = e, this.connection = n, \n        this.serializer = s, this.lu = !1;\n    }\n    fu() {\n        if (this.lu) throw new U(q.FAILED_PRECONDITION, \"The client has already been terminated.\");\n    }\n    /** Invokes the provided RPC with auth and AppCheck tokens. */    Io(t, e, n) {\n        return this.fu(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([s, i]) => this.connection.Io(t, e, n, s, i))).catch((t => {\n            throw \"FirebaseError\" === t.name ? (t.code === q.UNAUTHENTICATED && (this.authCredentials.invalidateToken(), \n            this.appCheckCredentials.invalidateToken()), t) : new U(q.UNKNOWN, t.toString());\n        }));\n    }\n    /** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */    vo(t, e, n, s) {\n        return this.fu(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([i, r]) => this.connection.vo(t, e, n, i, r, s))).catch((t => {\n            throw \"FirebaseError\" === t.name ? (t.code === q.UNAUTHENTICATED && (this.authCredentials.invalidateToken(), \n            this.appCheckCredentials.invalidateToken()), t) : new U(q.UNKNOWN, t.toString());\n        }));\n    }\n    terminate() {\n        this.lu = !0;\n    }\n}\n\n// TODO(firestorexp): Make sure there is only one Datastore instance per\n// firestore-exp client.\nasync function Gu(t, e, n) {\n    var s;\n    const i = L(t), {request: r, du: o} = function(t, e, n) {\n        const s = Ji(t, e), i = {}, r = [];\n        let o = 0;\n        return n.forEach((t => {\n            // Map all client-side aliases to a unique short-form\n            // alias. This avoids issues with client-side aliases that\n            // exceed the 1500-byte string size limit.\n            const e = \"aggregate_\" + o++;\n            i[e] = t.alias, \"count\" === t.yt ? r.push({\n                alias: e,\n                count: {}\n            }) : \"avg\" === t.yt ? r.push({\n                alias: e,\n                avg: {\n                    field: sr(t.fieldPath)\n                }\n            }) : \"sum\" === t.yt && r.push({\n                alias: e,\n                sum: {\n                    field: sr(t.fieldPath)\n                }\n            });\n        })), {\n            request: {\n                structuredAggregationQuery: {\n                    aggregations: r,\n                    structuredQuery: s.structuredQuery\n                },\n                parent: s.parent\n            },\n            du: i\n        };\n    }(i.serializer, Jn(e), n), u = r.parent;\n    i.connection.po || delete r.parent;\n    const c = (await i.vo(\"RunAggregationQuery\", u, r, /*expectedResponseCount=*/ 1)).filter((t => !!t.result));\n    // Omit RunAggregationQueryResponse that only contain readTimes.\n        F(1 === c.length);\n    // Remap the short-form aliases that were sent to the server\n    // to the client-side aliases. Users will access the results\n    // using the client-side alias.\n    const a = null === (s = c[0].result) || void 0 === s ? void 0 : s.aggregateFields;\n    return Object.keys(a).reduce(((t, e) => (t[o[e]] = a[e], t)), {});\n}\n\n/**\n * A component used by the RemoteStore to track the OnlineState (that is,\n * whether or not the client as a whole should be considered to be online or\n * offline), implementing the appropriate heuristics.\n *\n * In particular, when the client is trying to connect to the backend, we\n * allow up to MAX_WATCH_STREAM_FAILURES within ONLINE_STATE_TIMEOUT_MS for\n * a connection to succeed. If we have too many failures or the timeout elapses,\n * then we set the OnlineState to Offline, and the client will behave as if\n * it is offline (get()s will return cached data, etc.).\n */\nclass Qu {\n    constructor(t, e) {\n        this.asyncQueue = t, this.onlineStateHandler = e, \n        /** The current OnlineState. */\n        this.state = \"Unknown\" /* OnlineState.Unknown */ , \n        /**\n         * A count of consecutive failures to open the stream. If it reaches the\n         * maximum defined by MAX_WATCH_STREAM_FAILURES, we'll set the OnlineState to\n         * Offline.\n         */\n        this.wu = 0, \n        /**\n         * A timer that elapses after ONLINE_STATE_TIMEOUT_MS, at which point we\n         * transition from OnlineState.Unknown to OnlineState.Offline without waiting\n         * for the stream to actually fail (MAX_WATCH_STREAM_FAILURES times).\n         */\n        this._u = null, \n        /**\n         * Whether the client should log a warning message if it fails to connect to\n         * the backend (initially true, cleared after a successful stream, or if we've\n         * logged the message already).\n         */\n        this.mu = !0;\n    }\n    /**\n     * Called by RemoteStore when a watch stream is started (including on each\n     * backoff attempt).\n     *\n     * If this is the first attempt, it sets the OnlineState to Unknown and starts\n     * the onlineStateTimer.\n     */    gu() {\n        0 === this.wu && (this.yu(\"Unknown\" /* OnlineState.Unknown */), this._u = this.asyncQueue.enqueueAfterDelay(\"online_state_timeout\" /* TimerId.OnlineStateTimeout */ , 1e4, (() => (this._u = null, \n        this.pu(\"Backend didn't respond within 10 seconds.\"), this.yu(\"Offline\" /* OnlineState.Offline */), \n        Promise.resolve()))));\n    }\n    /**\n     * Updates our OnlineState as appropriate after the watch stream reports a\n     * failure. The first failure moves us to the 'Unknown' state. We then may\n     * allow multiple failures (based on MAX_WATCH_STREAM_FAILURES) before we\n     * actually transition to the 'Offline' state.\n     */    Iu(t) {\n        \"Online\" /* OnlineState.Online */ === this.state ? this.yu(\"Unknown\" /* OnlineState.Unknown */) : (this.wu++, \n        this.wu >= 1 && (this.Tu(), this.pu(`Connection failed 1 times. Most recent error: ${t.toString()}`), \n        this.yu(\"Offline\" /* OnlineState.Offline */)));\n    }\n    /**\n     * Explicitly sets the OnlineState to the specified state.\n     *\n     * Note that this resets our timers / failure counters, etc. used by our\n     * Offline heuristics, so must not be used in place of\n     * handleWatchStreamStart() and handleWatchStreamFailure().\n     */    set(t) {\n        this.Tu(), this.wu = 0, \"Online\" /* OnlineState.Online */ === t && (\n        // We've connected to watch at least once. Don't warn the developer\n        // about being offline going forward.\n        this.mu = !1), this.yu(t);\n    }\n    yu(t) {\n        t !== this.state && (this.state = t, this.onlineStateHandler(t));\n    }\n    pu(t) {\n        const e = `Could not reach Cloud Firestore backend. ${t}\\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;\n        this.mu ? (k(e), this.mu = !1) : N(\"OnlineStateTracker\", e);\n    }\n    Tu() {\n        null !== this._u && (this._u.cancel(), this._u = null);\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class ju {\n    constructor(\n    /**\n     * The local store, used to fill the write pipeline with outbound mutations.\n     */\n    t, \n    /** The client-side proxy for interacting with the backend. */\n    e, n, s, i) {\n        this.localStore = t, this.datastore = e, this.asyncQueue = n, this.remoteSyncer = {}, \n        /**\n         * A list of up to MAX_PENDING_WRITES writes that we have fetched from the\n         * LocalStore via fillWritePipeline() and have or will send to the write\n         * stream.\n         *\n         * Whenever writePipeline.length > 0 the RemoteStore will attempt to start or\n         * restart the write stream. When the stream is established the writes in the\n         * pipeline will be sent in order.\n         *\n         * Writes remain in writePipeline until they are acknowledged by the backend\n         * and thus will automatically be re-sent if the stream is interrupted /\n         * restarted before they're acknowledged.\n         *\n         * Write responses from the backend are linked to their originating request\n         * purely based on order, and so we can just shift() writes from the front of\n         * the writePipeline as we receive responses.\n         */\n        this.Eu = [], \n        /**\n         * A mapping of watched targets that the client cares about tracking and the\n         * user has explicitly called a 'listen' for this target.\n         *\n         * These targets may or may not have been sent to or acknowledged by the\n         * server. On re-establishing the listen stream, these targets should be sent\n         * to the server. The targets removed with unlistens are removed eagerly\n         * without waiting for confirmation from the listen stream.\n         */\n        this.Au = new Map, \n        /**\n         * A set of reasons for why the RemoteStore may be offline. If empty, the\n         * RemoteStore may start its network connections.\n         */\n        this.vu = new Set, \n        /**\n         * Event handlers that get called when the network is disabled or enabled.\n         *\n         * PORTING NOTE: These functions are used on the Web client to create the\n         * underlying streams (to support tree-shakeable streams). On Android and iOS,\n         * the streams are created during construction of RemoteStore.\n         */\n        this.Ru = [], this.Pu = i, this.Pu.Yr((t => {\n            n.enqueueAndForget((async () => {\n                // Porting Note: Unlike iOS, `restartNetwork()` is called even when the\n                // network becomes unreachable as we don't have any other way to tear\n                // down our streams.\n                ec(this) && (N(\"RemoteStore\", \"Restarting streams for network reachability change.\"), \n                await async function(t) {\n                    const e = L(t);\n                    e.vu.add(4 /* OfflineCause.ConnectivityChange */), await Wu(e), e.bu.set(\"Unknown\" /* OnlineState.Unknown */), \n                    e.vu.delete(4 /* OfflineCause.ConnectivityChange */), await zu(e);\n                }(this));\n            }));\n        })), this.bu = new Qu(n, s);\n    }\n}\n\nasync function zu(t) {\n    if (ec(t)) for (const e of t.Ru) await e(/* enabled= */ !0);\n}\n\n/**\n * Temporarily disables the network. The network can be re-enabled using\n * enableNetwork().\n */ async function Wu(t) {\n    for (const e of t.Ru) await e(/* enabled= */ !1);\n}\n\n/**\n * Starts new listen for the given target. Uses resume token if provided. It\n * is a no-op if the target of given `TargetData` is already being listened to.\n */\nfunction Hu(t, e) {\n    const n = L(t);\n    n.Au.has(e.targetId) || (\n    // Mark this as something the client is currently listening for.\n    n.Au.set(e.targetId, e), tc(n) ? \n    // The listen will be sent in onWatchStreamOpen\n    Zu(n) : pc(n).Ko() && Yu(n, e));\n}\n\n/**\n * Removes the listen from server. It is a no-op if the given target id is\n * not being listened to.\n */ function Ju(t, e) {\n    const n = L(t), s = pc(n);\n    n.Au.delete(e), s.Ko() && Xu(n, e), 0 === n.Au.size && (s.Ko() ? s.jo() : ec(n) && \n    // Revert to OnlineState.Unknown if the watch stream is not open and we\n    // have no listeners, since without any listens to send we cannot\n    // confirm if the stream is healthy and upgrade to OnlineState.Online.\n    n.bu.set(\"Unknown\" /* OnlineState.Unknown */));\n}\n\n/**\n * We need to increment the the expected number of pending responses we're due\n * from watch so we wait for the ack to process any messages from this target.\n */ function Yu(t, e) {\n    if (t.Vu.qt(e.targetId), e.resumeToken.approximateByteSize() > 0 || e.snapshotVersion.compareTo(rt.min()) > 0) {\n        const n = t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;\n        e = e.withExpectedCount(n);\n    }\n    pc(t).su(e);\n}\n\n/**\n * We need to increment the expected number of pending responses we're due\n * from watch so we wait for the removal on the server before we process any\n * messages from this target.\n */ function Xu(t, e) {\n    t.Vu.qt(e), pc(t).iu(e);\n}\n\nfunction Zu(t) {\n    t.Vu = new Ei({\n        getRemoteKeysForTarget: e => t.remoteSyncer.getRemoteKeysForTarget(e),\n        le: e => t.Au.get(e) || null,\n        ue: () => t.datastore.serializer.databaseId\n    }), pc(t).start(), t.bu.gu();\n}\n\n/**\n * Returns whether the watch stream should be started because it's necessary\n * and has not yet been started.\n */ function tc(t) {\n    return ec(t) && !pc(t).Uo() && t.Au.size > 0;\n}\n\nfunction ec(t) {\n    return 0 === L(t).vu.size;\n}\n\nfunction nc(t) {\n    t.Vu = void 0;\n}\n\nasync function sc(t) {\n    t.Au.forEach(((e, n) => {\n        Yu(t, e);\n    }));\n}\n\nasync function ic(t, e) {\n    nc(t), \n    // If we still need the watch stream, retry the connection.\n    tc(t) ? (t.bu.Iu(e), Zu(t)) : \n    // No need to restart watch stream because there are no active targets.\n    // The online state is set to unknown because there is no active attempt\n    // at establishing a connection\n    t.bu.set(\"Unknown\" /* OnlineState.Unknown */);\n}\n\nasync function rc(t, e, n) {\n    if (\n    // Mark the client as online since we got a message from the server\n    t.bu.set(\"Online\" /* OnlineState.Online */), e instanceof Ii && 2 /* WatchTargetChangeState.Removed */ === e.state && e.cause) \n    // There was an error on a target, don't wait for a consistent snapshot\n    // to raise events\n    try {\n        await \n        /** Handles an error on a target */\n        async function(t, e) {\n            const n = e.cause;\n            for (const s of e.targetIds) \n            // A watched target might have been removed already.\n            t.Au.has(s) && (await t.remoteSyncer.rejectListen(s, n), t.Au.delete(s), t.Vu.removeTarget(s));\n        }\n        /**\n * Attempts to fill our write pipeline with writes from the LocalStore.\n *\n * Called internally to bootstrap or refill the write pipeline and by\n * SyncEngine whenever there are new mutations to process.\n *\n * Starts the write stream if necessary.\n */ (t, e);\n    } catch (n) {\n        N(\"RemoteStore\", \"Failed to remove targets %s: %s \", e.targetIds.join(\",\"), n), \n        await oc(t, n);\n    } else if (e instanceof yi ? t.Vu.Ht(e) : e instanceof pi ? t.Vu.ne(e) : t.Vu.Xt(e), \n    !n.isEqual(rt.min())) try {\n        const e = await ou(t.localStore);\n        n.compareTo(e) >= 0 && \n        // We have received a target change with a global snapshot if the snapshot\n        // version is not equal to SnapshotVersion.min().\n        await \n        /**\n * Takes a batch of changes from the Datastore, repackages them as a\n * RemoteEvent, and passes that on to the listener, which is typically the\n * SyncEngine.\n */\n        function(t, e) {\n            const n = t.Vu.ce(e);\n            // Update in-memory resume tokens. LocalStore will update the\n            // persistent view of these when applying the completed RemoteEvent.\n                        return n.targetChanges.forEach(((n, s) => {\n                if (n.resumeToken.approximateByteSize() > 0) {\n                    const i = t.Au.get(s);\n                    // A watched target might have been removed already.\n                                        i && t.Au.set(s, i.withResumeToken(n.resumeToken, e));\n                }\n            })), \n            // Re-establish listens for the targets that have been invalidated by\n            // existence filter mismatches.\n            n.targetMismatches.forEach(((e, n) => {\n                const s = t.Au.get(e);\n                if (!s) \n                // A watched target might have been removed already.\n                return;\n                // Clear the resume token for the target, since we're in a known mismatch\n                // state.\n                                t.Au.set(e, s.withResumeToken(Ve.EMPTY_BYTE_STRING, s.snapshotVersion)), \n                // Cause a hard reset by unwatching and rewatching immediately, but\n                // deliberately don't send a resume token so that we get a full update.\n                Xu(t, e);\n                // Mark the target we send as being on behalf of an existence filter\n                // mismatch, but don't actually retain that in listenTargets. This ensures\n                // that we flag the first re-listen this way without impacting future\n                // listens of this target (that might happen e.g. on reconnect).\n                const i = new cr(s.target, e, n, s.sequenceNumber);\n                Yu(t, i);\n            })), t.remoteSyncer.applyRemoteEvent(n);\n        }(t, n);\n    } catch (e) {\n        N(\"RemoteStore\", \"Failed to raise snapshot:\", e), await oc(t, e);\n    }\n}\n\n/**\n * Recovery logic for IndexedDB errors that takes the network offline until\n * `op` succeeds. Retries are scheduled with backoff using\n * `enqueueRetryable()`. If `op()` is not provided, IndexedDB access is\n * validated via a generic operation.\n *\n * The returned Promise is resolved once the network is disabled and before\n * any retry attempt.\n */ async function oc(t, e, n) {\n    if (!Dt(e)) throw e;\n    t.vu.add(1 /* OfflineCause.IndexedDbFailed */), \n    // Disable network and raise offline snapshots\n    await Wu(t), t.bu.set(\"Offline\" /* OnlineState.Offline */), n || (\n    // Use a simple read operation to determine if IndexedDB recovered.\n    // Ideally, we would expose a health check directly on SimpleDb, but\n    // RemoteStore only has access to persistence through LocalStore.\n    n = () => ou(t.localStore)), \n    // Probe IndexedDB periodically and re-enable network\n    t.asyncQueue.enqueueRetryable((async () => {\n        N(\"RemoteStore\", \"Retrying IndexedDB access\"), await n(), t.vu.delete(1 /* OfflineCause.IndexedDbFailed */), \n        await zu(t);\n    }));\n}\n\n/**\n * Executes `op`. If `op` fails, takes the network offline until `op`\n * succeeds. Returns after the first attempt.\n */ function uc(t, e) {\n    return e().catch((n => oc(t, n, e)));\n}\n\nasync function cc(t) {\n    const e = L(t), n = Ic(e);\n    let s = e.Eu.length > 0 ? e.Eu[e.Eu.length - 1].batchId : -1;\n    for (;ac(e); ) try {\n        const t = await au(e.localStore, s);\n        if (null === t) {\n            0 === e.Eu.length && n.jo();\n            break;\n        }\n        s = t.batchId, hc(e, t);\n    } catch (t) {\n        await oc(e, t);\n    }\n    lc(e) && fc(e);\n}\n\n/**\n * Returns true if we can add to the write pipeline (i.e. the network is\n * enabled and the write pipeline is not full).\n */ function ac(t) {\n    return ec(t) && t.Eu.length < 10;\n}\n\n/**\n * Queues additional writes to be sent to the write stream, sending them\n * immediately if the write stream is established.\n */ function hc(t, e) {\n    t.Eu.push(e);\n    const n = Ic(t);\n    n.Ko() && n.ou && n.uu(e.mutations);\n}\n\nfunction lc(t) {\n    return ec(t) && !Ic(t).Uo() && t.Eu.length > 0;\n}\n\nfunction fc(t) {\n    Ic(t).start();\n}\n\nasync function dc(t) {\n    Ic(t).hu();\n}\n\nasync function wc(t) {\n    const e = Ic(t);\n    // Send the write pipeline now that the stream is established.\n        for (const n of t.Eu) e.uu(n.mutations);\n}\n\nasync function _c(t, e, n) {\n    const s = t.Eu.shift(), i = ti.from(s, e, n);\n    await uc(t, (() => t.remoteSyncer.applySuccessfulWrite(i))), \n    // It's possible that with the completion of this mutation another\n    // slot has freed up.\n    await cc(t);\n}\n\nasync function mc(t, e) {\n    // If the write stream closed after the write handshake completes, a write\n    // operation failed and we fail the pending operation.\n    e && Ic(t).ou && \n    // This error affects the actual write.\n    await async function(t, e) {\n        // Only handle permanent errors here. If it's transient, just let the retry\n        // logic kick in.\n        if (n = e.code, oi(n) && n !== q.ABORTED) {\n            // This was a permanent error, the request itself was the problem\n            // so it's not going to succeed if we resend it.\n            const n = t.Eu.shift();\n            // In this case it's also unlikely that the server itself is melting\n            // down -- this was just a bad request so inhibit backoff on the next\n            // restart.\n                        Ic(t).Qo(), await uc(t, (() => t.remoteSyncer.rejectFailedWrite(n.batchId, e))), \n            // It's possible that with the completion of this mutation\n            // another slot has freed up.\n            await cc(t);\n        }\n        var n;\n    }(t, e), \n    // The write stream might have been started by refilling the write\n    // pipeline for failed writes\n    lc(t) && fc(t);\n}\n\nasync function gc(t, e) {\n    const n = L(t);\n    n.asyncQueue.verifyOperationInProgress(), N(\"RemoteStore\", \"RemoteStore received new credentials\");\n    const s = ec(n);\n    // Tear down and re-create our network streams. This will ensure we get a\n    // fresh auth token for the new user and re-fill the write pipeline with\n    // new mutations from the LocalStore (since mutations are per-user).\n        n.vu.add(3 /* OfflineCause.CredentialChange */), await Wu(n), s && \n    // Don't set the network status to Unknown if we are offline.\n    n.bu.set(\"Unknown\" /* OnlineState.Unknown */), await n.remoteSyncer.handleCredentialChange(e), \n    n.vu.delete(3 /* OfflineCause.CredentialChange */), await zu(n);\n}\n\n/**\n * Toggles the network state when the client gains or loses its primary lease.\n */ async function yc(t, e) {\n    const n = L(t);\n    e ? (n.vu.delete(2 /* OfflineCause.IsSecondary */), await zu(n)) : e || (n.vu.add(2 /* OfflineCause.IsSecondary */), \n    await Wu(n), n.bu.set(\"Unknown\" /* OnlineState.Unknown */));\n}\n\n/**\n * If not yet initialized, registers the WatchStream and its network state\n * callback with `remoteStoreImpl`. Returns the existing stream if one is\n * already available.\n *\n * PORTING NOTE: On iOS and Android, the WatchStream gets registered on startup.\n * This is not done on Web to allow it to be tree-shaken.\n */ function pc(t) {\n    return t.Su || (\n    // Create stream (but note that it is not started yet).\n    t.Su = function(t, e, n) {\n        const s = L(t);\n        return s.fu(), new qu(e, s.connection, s.authCredentials, s.appCheckCredentials, s.serializer, n);\n    }\n    /**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ (t.datastore, t.asyncQueue, {\n        uo: sc.bind(null, t),\n        ao: ic.bind(null, t),\n        nu: rc.bind(null, t)\n    }), t.Ru.push((async e => {\n        e ? (t.Su.Qo(), tc(t) ? Zu(t) : t.bu.set(\"Unknown\" /* OnlineState.Unknown */)) : (await t.Su.stop(), \n        nc(t));\n    }))), t.Su;\n}\n\n/**\n * If not yet initialized, registers the WriteStream and its network state\n * callback with `remoteStoreImpl`. Returns the existing stream if one is\n * already available.\n *\n * PORTING NOTE: On iOS and Android, the WriteStream gets registered on startup.\n * This is not done on Web to allow it to be tree-shaken.\n */ function Ic(t) {\n    return t.Du || (\n    // Create stream (but note that it is not started yet).\n    t.Du = function(t, e, n) {\n        const s = L(t);\n        return s.fu(), new Uu(e, s.connection, s.authCredentials, s.appCheckCredentials, s.serializer, n);\n    }(t.datastore, t.asyncQueue, {\n        uo: dc.bind(null, t),\n        ao: mc.bind(null, t),\n        au: wc.bind(null, t),\n        cu: _c.bind(null, t)\n    }), t.Ru.push((async e => {\n        e ? (t.Du.Qo(), \n        // This will start the write stream if necessary.\n        await cc(t)) : (await t.Du.stop(), t.Eu.length > 0 && (N(\"RemoteStore\", `Stopping write stream with ${t.Eu.length} pending writes`), \n        t.Eu = []));\n    }))), t.Du;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents an operation scheduled to be run in the future on an AsyncQueue.\n *\n * It is created via DelayedOperation.createAndSchedule().\n *\n * Supports cancellation (via cancel()) and early execution (via skipDelay()).\n *\n * Note: We implement `PromiseLike` instead of `Promise`, as the `Promise` type\n * in newer versions of TypeScript defines `finally`, which is not available in\n * IE.\n */\nclass Tc {\n    constructor(t, e, n, s, i) {\n        this.asyncQueue = t, this.timerId = e, this.targetTimeMs = n, this.op = s, this.removalCallback = i, \n        this.deferred = new K, this.then = this.deferred.promise.then.bind(this.deferred.promise), \n        // It's normal for the deferred promise to be canceled (due to cancellation)\n        // and so we attach a dummy catch callback to avoid\n        // 'UnhandledPromiseRejectionWarning' log spam.\n        this.deferred.promise.catch((t => {}));\n    }\n    /**\n     * Creates and returns a DelayedOperation that has been scheduled to be\n     * executed on the provided asyncQueue after the provided delayMs.\n     *\n     * @param asyncQueue - The queue to schedule the operation on.\n     * @param id - A Timer ID identifying the type of operation this is.\n     * @param delayMs - The delay (ms) before the operation should be scheduled.\n     * @param op - The operation to run.\n     * @param removalCallback - A callback to be called synchronously once the\n     *   operation is executed or canceled, notifying the AsyncQueue to remove it\n     *   from its delayedOperations list.\n     *   PORTING NOTE: This exists to prevent making removeDelayedOperation() and\n     *   the DelayedOperation class public.\n     */    static createAndSchedule(t, e, n, s, i) {\n        const r = Date.now() + n, o = new Tc(t, e, r, s, i);\n        return o.start(n), o;\n    }\n    /**\n     * Starts the timer. This is called immediately after construction by\n     * createAndSchedule().\n     */    start(t) {\n        this.timerHandle = setTimeout((() => this.handleDelayElapsed()), t);\n    }\n    /**\n     * Queues the operation to run immediately (if it hasn't already been run or\n     * canceled).\n     */    skipDelay() {\n        return this.handleDelayElapsed();\n    }\n    /**\n     * Cancels the operation if it hasn't already been executed or canceled. The\n     * promise will be rejected.\n     *\n     * As long as the operation has not yet been run, calling cancel() provides a\n     * guarantee that the operation will not be run.\n     */    cancel(t) {\n        null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new U(q.CANCELLED, \"Operation cancelled\" + (t ? \": \" + t : \"\"))));\n    }\n    handleDelayElapsed() {\n        this.asyncQueue.enqueueAndForget((() => null !== this.timerHandle ? (this.clearTimeout(), \n        this.op().then((t => this.deferred.resolve(t)))) : Promise.resolve()));\n    }\n    clearTimeout() {\n        null !== this.timerHandle && (this.removalCallback(this), clearTimeout(this.timerHandle), \n        this.timerHandle = null);\n    }\n}\n\n/**\n * Returns a FirestoreError that can be surfaced to the user if the provided\n * error is an IndexedDbTransactionError. Re-throws the error otherwise.\n */ function Ec(t, e) {\n    if (k(\"AsyncQueue\", `${e}: ${t}`), Dt(t)) return new U(q.UNAVAILABLE, `${e}: ${t}`);\n    throw t;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * DocumentSet is an immutable (copy-on-write) collection that holds documents\n * in order specified by the provided comparator. We always add a document key\n * comparator on top of what is provided to guarantee document equality based on\n * the key.\n */ class Ac {\n    /** The default ordering is by key if the comparator is omitted */\n    constructor(t) {\n        // We are adding document key comparator to the end as it's the only\n        // guaranteed unique property of a document.\n        this.comparator = t ? (e, n) => t(e, n) || ht.comparator(e.key, n.key) : (t, e) => ht.comparator(t.key, e.key), \n        this.keyedMap = hs(), this.sortedSet = new pe(this.comparator);\n    }\n    /**\n     * Returns an empty copy of the existing DocumentSet, using the same\n     * comparator.\n     */    static emptySet(t) {\n        return new Ac(t.comparator);\n    }\n    has(t) {\n        return null != this.keyedMap.get(t);\n    }\n    get(t) {\n        return this.keyedMap.get(t);\n    }\n    first() {\n        return this.sortedSet.minKey();\n    }\n    last() {\n        return this.sortedSet.maxKey();\n    }\n    isEmpty() {\n        return this.sortedSet.isEmpty();\n    }\n    /**\n     * Returns the index of the provided key in the document set, or -1 if the\n     * document key is not present in the set;\n     */    indexOf(t) {\n        const e = this.keyedMap.get(t);\n        return e ? this.sortedSet.indexOf(e) : -1;\n    }\n    get size() {\n        return this.sortedSet.size;\n    }\n    /** Iterates documents in order defined by \"comparator\" */    forEach(t) {\n        this.sortedSet.inorderTraversal(((e, n) => (t(e), !1)));\n    }\n    /** Inserts or updates a document with the same key */    add(t) {\n        // First remove the element if we have it.\n        const e = this.delete(t.key);\n        return e.copy(e.keyedMap.insert(t.key, t), e.sortedSet.insert(t, null));\n    }\n    /** Deletes a document with a given key */    delete(t) {\n        const e = this.get(t);\n        return e ? this.copy(this.keyedMap.remove(t), this.sortedSet.remove(e)) : this;\n    }\n    isEqual(t) {\n        if (!(t instanceof Ac)) return !1;\n        if (this.size !== t.size) return !1;\n        const e = this.sortedSet.getIterator(), n = t.sortedSet.getIterator();\n        for (;e.hasNext(); ) {\n            const t = e.getNext().key, s = n.getNext().key;\n            if (!t.isEqual(s)) return !1;\n        }\n        return !0;\n    }\n    toString() {\n        const t = [];\n        return this.forEach((e => {\n            t.push(e.toString());\n        })), 0 === t.length ? \"DocumentSet ()\" : \"DocumentSet (\\n  \" + t.join(\"  \\n\") + \"\\n)\";\n    }\n    copy(t, e) {\n        const n = new Ac;\n        return n.comparator = this.comparator, n.keyedMap = t, n.sortedSet = e, n;\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * DocumentChangeSet keeps track of a set of changes to docs in a query, merging\n * duplicate events for the same doc.\n */ class vc {\n    constructor() {\n        this.Cu = new pe(ht.comparator);\n    }\n    track(t) {\n        const e = t.doc.key, n = this.Cu.get(e);\n        n ? \n        // Merge the new change with the existing change.\n        0 /* ChangeType.Added */ !== t.type && 3 /* ChangeType.Metadata */ === n.type ? this.Cu = this.Cu.insert(e, t) : 3 /* ChangeType.Metadata */ === t.type && 1 /* ChangeType.Removed */ !== n.type ? this.Cu = this.Cu.insert(e, {\n            type: n.type,\n            doc: t.doc\n        }) : 2 /* ChangeType.Modified */ === t.type && 2 /* ChangeType.Modified */ === n.type ? this.Cu = this.Cu.insert(e, {\n            type: 2 /* ChangeType.Modified */ ,\n            doc: t.doc\n        }) : 2 /* ChangeType.Modified */ === t.type && 0 /* ChangeType.Added */ === n.type ? this.Cu = this.Cu.insert(e, {\n            type: 0 /* ChangeType.Added */ ,\n            doc: t.doc\n        }) : 1 /* ChangeType.Removed */ === t.type && 0 /* ChangeType.Added */ === n.type ? this.Cu = this.Cu.remove(e) : 1 /* ChangeType.Removed */ === t.type && 2 /* ChangeType.Modified */ === n.type ? this.Cu = this.Cu.insert(e, {\n            type: 1 /* ChangeType.Removed */ ,\n            doc: n.doc\n        }) : 0 /* ChangeType.Added */ === t.type && 1 /* ChangeType.Removed */ === n.type ? this.Cu = this.Cu.insert(e, {\n            type: 2 /* ChangeType.Modified */ ,\n            doc: t.doc\n        }) : \n        // This includes these cases, which don't make sense:\n        // Added->Added\n        // Removed->Removed\n        // Modified->Added\n        // Removed->Modified\n        // Metadata->Added\n        // Removed->Metadata\n        O() : this.Cu = this.Cu.insert(e, t);\n    }\n    xu() {\n        const t = [];\n        return this.Cu.inorderTraversal(((e, n) => {\n            t.push(n);\n        })), t;\n    }\n}\n\nclass Rc {\n    constructor(t, e, n, s, i, r, o, u, c) {\n        this.query = t, this.docs = e, this.oldDocs = n, this.docChanges = s, this.mutatedKeys = i, \n        this.fromCache = r, this.syncStateChanged = o, this.excludesMetadataChanges = u, \n        this.hasCachedResults = c;\n    }\n    /** Returns a view snapshot as if all documents in the snapshot were added. */    static fromInitialDocuments(t, e, n, s, i) {\n        const r = [];\n        return e.forEach((t => {\n            r.push({\n                type: 0 /* ChangeType.Added */ ,\n                doc: t\n            });\n        })), new Rc(t, e, Ac.emptySet(e), r, n, s, \n        /* syncStateChanged= */ !0, \n        /* excludesMetadataChanges= */ !1, i);\n    }\n    get hasPendingWrites() {\n        return !this.mutatedKeys.isEmpty();\n    }\n    isEqual(t) {\n        if (!(this.fromCache === t.fromCache && this.hasCachedResults === t.hasCachedResults && this.syncStateChanged === t.syncStateChanged && this.mutatedKeys.isEqual(t.mutatedKeys) && Zn(this.query, t.query) && this.docs.isEqual(t.docs) && this.oldDocs.isEqual(t.oldDocs))) return !1;\n        const e = this.docChanges, n = t.docChanges;\n        if (e.length !== n.length) return !1;\n        for (let t = 0; t < e.length; t++) if (e[t].type !== n[t].type || !e[t].doc.isEqual(n[t].doc)) return !1;\n        return !0;\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Holds the listeners and the last received ViewSnapshot for a query being\n * tracked by EventManager.\n */ class Pc {\n    constructor() {\n        this.Nu = void 0, this.listeners = [];\n    }\n}\n\nclass bc {\n    constructor() {\n        this.queries = new os((t => ts(t)), Zn), this.onlineState = \"Unknown\" /* OnlineState.Unknown */ , \n        this.ku = new Set;\n    }\n}\n\nasync function Vc(t, e) {\n    const n = L(t), s = e.query;\n    let i = !1, r = n.queries.get(s);\n    if (r || (i = !0, r = new Pc), i) try {\n        r.Nu = await n.onListen(s);\n    } catch (t) {\n        const n = Ec(t, `Initialization of query '${es(e.query)}' failed`);\n        return void e.onError(n);\n    }\n    if (n.queries.set(s, r), r.listeners.push(e), \n    // Run global snapshot listeners if a consistent snapshot has been emitted.\n    e.Mu(n.onlineState), r.Nu) {\n        e.$u(r.Nu) && xc(n);\n    }\n}\n\nasync function Sc(t, e) {\n    const n = L(t), s = e.query;\n    let i = !1;\n    const r = n.queries.get(s);\n    if (r) {\n        const t = r.listeners.indexOf(e);\n        t >= 0 && (r.listeners.splice(t, 1), i = 0 === r.listeners.length);\n    }\n    if (i) return n.queries.delete(s), n.onUnlisten(s);\n}\n\nfunction Dc(t, e) {\n    const n = L(t);\n    let s = !1;\n    for (const t of e) {\n        const e = t.query, i = n.queries.get(e);\n        if (i) {\n            for (const e of i.listeners) e.$u(t) && (s = !0);\n            i.Nu = t;\n        }\n    }\n    s && xc(n);\n}\n\nfunction Cc(t, e, n) {\n    const s = L(t), i = s.queries.get(e);\n    if (i) for (const t of i.listeners) t.onError(n);\n    // Remove all listeners. NOTE: We don't need to call syncEngine.unlisten()\n    // after an error.\n        s.queries.delete(e);\n}\n\n// Call all global snapshot listeners that have been set.\nfunction xc(t) {\n    t.ku.forEach((t => {\n        t.next();\n    }));\n}\n\n/**\n * QueryListener takes a series of internal view snapshots and determines\n * when to raise the event.\n *\n * It uses an Observer to dispatch events.\n */ class Nc {\n    constructor(t, e, n) {\n        this.query = t, this.Ou = e, \n        /**\n         * Initial snapshots (e.g. from cache) may not be propagated to the wrapped\n         * observer. This flag is set to true once we've actually raised an event.\n         */\n        this.Fu = !1, this.Bu = null, this.onlineState = \"Unknown\" /* OnlineState.Unknown */ , \n        this.options = n || {};\n    }\n    /**\n     * Applies the new ViewSnapshot to this listener, raising a user-facing event\n     * if applicable (depending on what changed, whether the user has opted into\n     * metadata-only changes, etc.). Returns true if a user-facing event was\n     * indeed raised.\n     */    $u(t) {\n        if (!this.options.includeMetadataChanges) {\n            // Remove the metadata only changes.\n            const e = [];\n            for (const n of t.docChanges) 3 /* ChangeType.Metadata */ !== n.type && e.push(n);\n            t = new Rc(t.query, t.docs, t.oldDocs, e, t.mutatedKeys, t.fromCache, t.syncStateChanged, \n            /* excludesMetadataChanges= */ !0, t.hasCachedResults);\n        }\n        let e = !1;\n        return this.Fu ? this.Lu(t) && (this.Ou.next(t), e = !0) : this.qu(t, this.onlineState) && (this.Uu(t), \n        e = !0), this.Bu = t, e;\n    }\n    onError(t) {\n        this.Ou.error(t);\n    }\n    /** Returns whether a snapshot was raised. */    Mu(t) {\n        this.onlineState = t;\n        let e = !1;\n        return this.Bu && !this.Fu && this.qu(this.Bu, t) && (this.Uu(this.Bu), e = !0), \n        e;\n    }\n    qu(t, e) {\n        // Always raise the first event when we're synced\n        if (!t.fromCache) return !0;\n        // NOTE: We consider OnlineState.Unknown as online (it should become Offline\n        // or Online if we wait long enough).\n                const n = \"Offline\" /* OnlineState.Offline */ !== e;\n        // Don't raise the event if we're online, aren't synced yet (checked\n        // above) and are waiting for a sync.\n                return (!this.options.Ku || !n) && (!t.docs.isEmpty() || t.hasCachedResults || \"Offline\" /* OnlineState.Offline */ === e);\n        // Raise data from cache if we have any documents, have cached results before,\n        // or we are offline.\n        }\n    Lu(t) {\n        // We don't need to handle includeDocumentMetadataChanges here because\n        // the Metadata only changes have already been stripped out if needed.\n        // At this point the only changes we will see are the ones we should\n        // propagate.\n        if (t.docChanges.length > 0) return !0;\n        const e = this.Bu && this.Bu.hasPendingWrites !== t.hasPendingWrites;\n        return !(!t.syncStateChanged && !e) && !0 === this.options.includeMetadataChanges;\n        // Generally we should have hit one of the cases above, but it's possible\n        // to get here if there were only metadata docChanges and they got\n        // stripped out.\n        }\n    Uu(t) {\n        t = Rc.fromInitialDocuments(t.query, t.docs, t.mutatedKeys, t.fromCache, t.hasCachedResults), \n        this.Fu = !0, this.Ou.next(t);\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A complete element in the bundle stream, together with the byte length it\n * occupies in the stream.\n */ class kc {\n    constructor(t, \n    // How many bytes this element takes to store in the bundle.\n    e) {\n        this.Gu = t, this.byteLength = e;\n    }\n    Qu() {\n        return \"metadata\" in this.Gu;\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Helper to convert objects from bundles to model objects in the SDK.\n */ class Mc {\n    constructor(t) {\n        this.serializer = t;\n    }\n    rr(t) {\n        return Oi(this.serializer, t);\n    }\n    /**\n     * Converts a BundleDocument to a MutableDocument.\n     */    ur(t) {\n        return t.metadata.exists ? Ki(this.serializer, t.document, !1) : an.newNoDocument(this.rr(t.metadata.name), this.cr(t.metadata.readTime));\n    }\n    cr(t) {\n        return Ni(t);\n    }\n}\n\n/**\n * A class to process the elements from a bundle, load them into local\n * storage and provide progress update while loading.\n */ class $c {\n    constructor(t, e, n) {\n        this.ju = t, this.localStore = e, this.serializer = n, \n        /** Batched queries to be saved into storage */\n        this.queries = [], \n        /** Batched documents to be saved into storage */\n        this.documents = [], \n        /** The collection groups affected by this bundle. */\n        this.collectionGroups = new Set, this.progress = Oc(t);\n    }\n    /**\n     * Adds an element from the bundle to the loader.\n     *\n     * Returns a new progress if adding the element leads to a new progress,\n     * otherwise returns null.\n     */    zu(t) {\n        this.progress.bytesLoaded += t.byteLength;\n        let e = this.progress.documentsLoaded;\n        if (t.Gu.namedQuery) this.queries.push(t.Gu.namedQuery); else if (t.Gu.documentMetadata) {\n            this.documents.push({\n                metadata: t.Gu.documentMetadata\n            }), t.Gu.documentMetadata.exists || ++e;\n            const n = ut.fromString(t.Gu.documentMetadata.name);\n            this.collectionGroups.add(n.get(n.length - 2));\n        } else t.Gu.document && (this.documents[this.documents.length - 1].document = t.Gu.document, \n        ++e);\n        return e !== this.progress.documentsLoaded ? (this.progress.documentsLoaded = e, \n        Object.assign({}, this.progress)) : null;\n    }\n    Wu(t) {\n        const e = new Map, n = new Mc(this.serializer);\n        for (const s of t) if (s.metadata.queries) {\n            const t = n.rr(s.metadata.name);\n            for (const n of s.metadata.queries) {\n                const s = (e.get(n) || gs()).add(t);\n                e.set(n, s);\n            }\n        }\n        return e;\n    }\n    /**\n     * Update the progress to 'Success' and return the updated progress.\n     */    async complete() {\n        const t = await mu(this.localStore, new Mc(this.serializer), this.documents, this.ju.id), e = this.Wu(this.documents);\n        for (const t of this.queries) await gu(this.localStore, t, e.get(t.name));\n        return this.progress.taskState = \"Success\", {\n            progress: this.progress,\n            Hu: this.collectionGroups,\n            Ju: t\n        };\n    }\n}\n\n/**\n * Returns a `LoadBundleTaskProgress` representing the initial progress of\n * loading a bundle.\n */ function Oc(t) {\n    return {\n        taskState: \"Running\",\n        documentsLoaded: 0,\n        bytesLoaded: 0,\n        totalDocuments: t.totalDocuments,\n        totalBytes: t.totalBytes\n    };\n}\n\n/**\n * Returns a `LoadBundleTaskProgress` representing the progress that the loading\n * has succeeded.\n */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass Fc {\n    constructor(t) {\n        this.key = t;\n    }\n}\n\nclass Bc {\n    constructor(t) {\n        this.key = t;\n    }\n}\n\n/**\n * View is responsible for computing the final merged truth of what docs are in\n * a query. It gets notified of local and remote changes to docs, and applies\n * the query filters and limits to determine the most correct possible results.\n */ class Lc {\n    constructor(t, \n    /** Documents included in the remote target */\n    e) {\n        this.query = t, this.Yu = e, this.Xu = null, this.hasCachedResults = !1, \n        /**\n         * A flag whether the view is current with the backend. A view is considered\n         * current after it has seen the current flag from the backend and did not\n         * lose consistency within the watch stream (e.g. because of an existence\n         * filter mismatch).\n         */\n        this.current = !1, \n        /** Documents in the view but not in the remote target */\n        this.Zu = gs(), \n        /** Document Keys that have local changes */\n        this.mutatedKeys = gs(), this.tc = is(t), this.ec = new Ac(this.tc);\n    }\n    /**\n     * The set of remote documents that the server has told us belongs to the target associated with\n     * this view.\n     */    get nc() {\n        return this.Yu;\n    }\n    /**\n     * Iterates over a set of doc changes, applies the query limit, and computes\n     * what the new results should be, what the changes were, and whether we may\n     * need to go back to the local cache for more results. Does not make any\n     * changes to the view.\n     * @param docChanges - The doc changes to apply to this view.\n     * @param previousChanges - If this is being called with a refill, then start\n     *        with this set of docs and changes instead of the current view.\n     * @returns a new set of docs, changes, and refill flag.\n     */    sc(t, e) {\n        const n = e ? e.ic : new vc, s = e ? e.ec : this.ec;\n        let i = e ? e.mutatedKeys : this.mutatedKeys, r = s, o = !1;\n        // Track the last doc in a (full) limit. This is necessary, because some\n        // update (a delete, or an update moving a doc past the old limit) might\n        // mean there is some other document in the local cache that either should\n        // come (1) between the old last limit doc and the new last document, in the\n        // case of updates, or (2) after the new last document, in the case of\n        // deletes. So we keep this doc at the old limit to compare the updates to.\n        // Note that this should never get used in a refill (when previousChanges is\n        // set), because there will only be adds -- no deletes or updates.\n        const u = \"F\" /* LimitType.First */ === this.query.limitType && s.size === this.query.limit ? s.last() : null, c = \"L\" /* LimitType.Last */ === this.query.limitType && s.size === this.query.limit ? s.first() : null;\n        // Drop documents out to meet limit/limitToLast requirement.\n        if (t.inorderTraversal(((t, e) => {\n            const a = s.get(t), h = ns(this.query, e) ? e : null, l = !!a && this.mutatedKeys.has(a.key), f = !!h && (h.hasLocalMutations || \n            // We only consider committed mutations for documents that were\n            // mutated during the lifetime of the view.\n            this.mutatedKeys.has(h.key) && h.hasCommittedMutations);\n            let d = !1;\n            // Calculate change\n                        if (a && h) {\n                a.data.isEqual(h.data) ? l !== f && (n.track({\n                    type: 3 /* ChangeType.Metadata */ ,\n                    doc: h\n                }), d = !0) : this.rc(a, h) || (n.track({\n                    type: 2 /* ChangeType.Modified */ ,\n                    doc: h\n                }), d = !0, (u && this.tc(h, u) > 0 || c && this.tc(h, c) < 0) && (\n                // This doc moved from inside the limit to outside the limit.\n                // That means there may be some other doc in the local cache\n                // that should be included instead.\n                o = !0));\n            } else !a && h ? (n.track({\n                type: 0 /* ChangeType.Added */ ,\n                doc: h\n            }), d = !0) : a && !h && (n.track({\n                type: 1 /* ChangeType.Removed */ ,\n                doc: a\n            }), d = !0, (u || c) && (\n            // A doc was removed from a full limit query. We'll need to\n            // requery from the local cache to see if we know about some other\n            // doc that should be in the results.\n            o = !0));\n            d && (h ? (r = r.add(h), i = f ? i.add(t) : i.delete(t)) : (r = r.delete(t), i = i.delete(t)));\n        })), null !== this.query.limit) for (;r.size > this.query.limit; ) {\n            const t = \"F\" /* LimitType.First */ === this.query.limitType ? r.last() : r.first();\n            r = r.delete(t.key), i = i.delete(t.key), n.track({\n                type: 1 /* ChangeType.Removed */ ,\n                doc: t\n            });\n        }\n        return {\n            ec: r,\n            ic: n,\n            zi: o,\n            mutatedKeys: i\n        };\n    }\n    rc(t, e) {\n        // We suppress the initial change event for documents that were modified as\n        // part of a write acknowledgment (e.g. when the value of a server transform\n        // is applied) as Watch will send us the same document again.\n        // By suppressing the event, we only raise two user visible events (one with\n        // `hasPendingWrites` and the final state of the document) instead of three\n        // (one with `hasPendingWrites`, the modified document with\n        // `hasPendingWrites` and the final state of the document).\n        return t.hasLocalMutations && e.hasCommittedMutations && !e.hasLocalMutations;\n    }\n    /**\n     * Updates the view with the given ViewDocumentChanges and optionally updates\n     * limbo docs and sync state from the provided target change.\n     * @param docChanges - The set of changes to make to the view's docs.\n     * @param updateLimboDocuments - Whether to update limbo documents based on\n     *        this change.\n     * @param targetChange - A target change to apply for computing limbo docs and\n     *        sync state.\n     * @returns A new ViewChange with the given docs, changes, and sync state.\n     */\n    // PORTING NOTE: The iOS/Android clients always compute limbo document changes.\n    applyChanges(t, e, n) {\n        const s = this.ec;\n        this.ec = t.ec, this.mutatedKeys = t.mutatedKeys;\n        // Sort changes based on type and query comparator\n        const i = t.ic.xu();\n        i.sort(((t, e) => function(t, e) {\n            const n = t => {\n                switch (t) {\n                  case 0 /* ChangeType.Added */ :\n                    return 1;\n\n                  case 2 /* ChangeType.Modified */ :\n                  case 3 /* ChangeType.Metadata */ :\n                    // A metadata change is converted to a modified change at the public\n                    // api layer.  Since we sort by document key and then change type,\n                    // metadata and modified changes must be sorted equivalently.\n                    return 2;\n\n                  case 1 /* ChangeType.Removed */ :\n                    return 0;\n\n                  default:\n                    return O();\n                }\n            };\n            return n(t) - n(e);\n        }\n        /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ (t.type, e.type) || this.tc(t.doc, e.doc))), this.oc(n);\n        const r = e ? this.uc() : [], o = 0 === this.Zu.size && this.current ? 1 /* SyncState.Synced */ : 0 /* SyncState.Local */ , u = o !== this.Xu;\n        if (this.Xu = o, 0 !== i.length || u) {\n            return {\n                snapshot: new Rc(this.query, t.ec, s, i, t.mutatedKeys, 0 /* SyncState.Local */ === o, u, \n                /* excludesMetadataChanges= */ !1, !!n && n.resumeToken.approximateByteSize() > 0),\n                cc: r\n            };\n        }\n        // no changes\n        return {\n            cc: r\n        };\n    }\n    /**\n     * Applies an OnlineState change to the view, potentially generating a\n     * ViewChange if the view's syncState changes as a result.\n     */    Mu(t) {\n        return this.current && \"Offline\" /* OnlineState.Offline */ === t ? (\n        // If we're offline, set `current` to false and then call applyChanges()\n        // to refresh our syncState and generate a ViewChange as appropriate. We\n        // are guaranteed to get a new TargetChange that sets `current` back to\n        // true once the client is back online.\n        this.current = !1, this.applyChanges({\n            ec: this.ec,\n            ic: new vc,\n            mutatedKeys: this.mutatedKeys,\n            zi: !1\n        }, \n        /* updateLimboDocuments= */ !1)) : {\n            cc: []\n        };\n    }\n    /**\n     * Returns whether the doc for the given key should be in limbo.\n     */    ac(t) {\n        // If the remote end says it's part of this query, it's not in limbo.\n        return !this.Yu.has(t) && (\n        // The local store doesn't think it's a result, so it shouldn't be in limbo.\n        !!this.ec.has(t) && !this.ec.get(t).hasLocalMutations);\n    }\n    /**\n     * Updates syncedDocuments, current, and limbo docs based on the given change.\n     * Returns the list of changes to which docs are in limbo.\n     */    oc(t) {\n        t && (t.addedDocuments.forEach((t => this.Yu = this.Yu.add(t))), t.modifiedDocuments.forEach((t => {})), \n        t.removedDocuments.forEach((t => this.Yu = this.Yu.delete(t))), this.current = t.current);\n    }\n    uc() {\n        // We can only determine limbo documents when we're in-sync with the server.\n        if (!this.current) return [];\n        // TODO(klimt): Do this incrementally so that it's not quadratic when\n        // updating many documents.\n                const t = this.Zu;\n        this.Zu = gs(), this.ec.forEach((t => {\n            this.ac(t.key) && (this.Zu = this.Zu.add(t.key));\n        }));\n        // Diff the new limbo docs with the old limbo docs.\n        const e = [];\n        return t.forEach((t => {\n            this.Zu.has(t) || e.push(new Bc(t));\n        })), this.Zu.forEach((n => {\n            t.has(n) || e.push(new Fc(n));\n        })), e;\n    }\n    /**\n     * Update the in-memory state of the current view with the state read from\n     * persistence.\n     *\n     * We update the query view whenever a client's primary status changes:\n     * - When a client transitions from primary to secondary, it can miss\n     *   LocalStorage updates and its query views may temporarily not be\n     *   synchronized with the state on disk.\n     * - For secondary to primary transitions, the client needs to update the list\n     *   of `syncedDocuments` since secondary clients update their query views\n     *   based purely on synthesized RemoteEvents.\n     *\n     * @param queryResult.documents - The documents that match the query according\n     * to the LocalStore.\n     * @param queryResult.remoteKeys - The keys of the documents that match the\n     * query according to the backend.\n     *\n     * @returns The ViewChange that resulted from this synchronization.\n     */\n    // PORTING NOTE: Multi-tab only.\n    hc(t) {\n        this.Yu = t.ir, this.Zu = gs();\n        const e = this.sc(t.documents);\n        return this.applyChanges(e, /*updateLimboDocuments=*/ !0);\n    }\n    /**\n     * Returns a view snapshot as if this query was just listened to. Contains\n     * a document add for every existing document and the `fromCache` and\n     * `hasPendingWrites` status of the already established view.\n     */\n    // PORTING NOTE: Multi-tab only.\n    lc() {\n        return Rc.fromInitialDocuments(this.query, this.ec, this.mutatedKeys, 0 /* SyncState.Local */ === this.Xu, this.hasCachedResults);\n    }\n}\n\n/**\n * QueryView contains all of the data that SyncEngine needs to keep track of for\n * a particular query.\n */\nclass qc {\n    constructor(\n    /**\n     * The query itself.\n     */\n    t, \n    /**\n     * The target number created by the client that is used in the watch\n     * stream to identify this query.\n     */\n    e, \n    /**\n     * The view is responsible for computing the final merged truth of what\n     * docs are in the query. It gets notified of local and remote changes,\n     * and applies the query filters and limits to determine the most correct\n     * possible results.\n     */\n    n) {\n        this.query = t, this.targetId = e, this.view = n;\n    }\n}\n\n/** Tracks a limbo resolution. */ class Uc {\n    constructor(t) {\n        this.key = t, \n        /**\n         * Set to true once we've received a document. This is used in\n         * getRemoteKeysForTarget() and ultimately used by WatchChangeAggregator to\n         * decide whether it needs to manufacture a delete event for the target once\n         * the target is CURRENT.\n         */\n        this.fc = !1;\n    }\n}\n\n/**\n * An implementation of `SyncEngine` coordinating with other parts of SDK.\n *\n * The parts of SyncEngine that act as a callback to RemoteStore need to be\n * registered individually. This is done in `syncEngineWrite()` and\n * `syncEngineListen()` (as well as `applyPrimaryState()`) as these methods\n * serve as entry points to RemoteStore's functionality.\n *\n * Note: some field defined in this class might have public access level, but\n * the class is not exported so they are only accessible from this module.\n * This is useful to implement optional features (like bundles) in free\n * functions, such that they are tree-shakeable.\n */ class Kc {\n    constructor(t, e, n, \n    // PORTING NOTE: Manages state synchronization in multi-tab environments.\n    s, i, r) {\n        this.localStore = t, this.remoteStore = e, this.eventManager = n, this.sharedClientState = s, \n        this.currentUser = i, this.maxConcurrentLimboResolutions = r, this.dc = {}, this.wc = new os((t => ts(t)), Zn), \n        this._c = new Map, \n        /**\n         * The keys of documents that are in limbo for which we haven't yet started a\n         * limbo resolution query. The strings in this set are the result of calling\n         * `key.path.canonicalString()` where `key` is a `DocumentKey` object.\n         *\n         * The `Set` type was chosen because it provides efficient lookup and removal\n         * of arbitrary elements and it also maintains insertion order, providing the\n         * desired queue-like FIFO semantics.\n         */\n        this.mc = new Set, \n        /**\n         * Keeps track of the target ID for each document that is in limbo with an\n         * active target.\n         */\n        this.gc = new pe(ht.comparator), \n        /**\n         * Keeps track of the information about an active limbo resolution for each\n         * active target ID that was started for the purpose of limbo resolution.\n         */\n        this.yc = new Map, this.Ic = new Oo, \n        /** Stores user completion handlers, indexed by User and BatchId. */\n        this.Tc = {}, \n        /** Stores user callbacks waiting for all pending writes to be acknowledged. */\n        this.Ec = new Map, this.Ac = lo.Mn(), this.onlineState = \"Unknown\" /* OnlineState.Unknown */ , \n        // The primary state is set to `true` or `false` immediately after Firestore\n        // startup. In the interim, a client should only be considered primary if\n        // `isPrimary` is true.\n        this.vc = void 0;\n    }\n    get isPrimaryClient() {\n        return !0 === this.vc;\n    }\n}\n\n/**\n * Initiates the new listen, resolves promise when listen enqueued to the\n * server. All the subsequent view snapshots or errors are sent to the\n * subscribed handlers. Returns the initial snapshot.\n */\nasync function Gc(t, e) {\n    const n = pa(t);\n    let s, i;\n    const r = n.wc.get(e);\n    if (r) \n    // PORTING NOTE: With Multi-Tab Web, it is possible that a query view\n    // already exists when EventManager calls us for the first time. This\n    // happens when the primary tab is already listening to this query on\n    // behalf of another tab and the user of the primary also starts listening\n    // to the query. EventManager will not have an assigned target ID in this\n    // case and calls `listen` to obtain this ID.\n    s = r.targetId, n.sharedClientState.addLocalQueryTarget(s), i = r.view.lc(); else {\n        const t = await hu(n.localStore, Jn(e)), r = n.sharedClientState.addLocalQueryTarget(t.targetId);\n        s = t.targetId, i = await Qc(n, e, s, \"current\" === r, t.resumeToken), n.isPrimaryClient && Hu(n.remoteStore, t);\n    }\n    return i;\n}\n\n/**\n * Registers a view for a previously unknown query and computes its initial\n * snapshot.\n */ async function Qc(t, e, n, s, i) {\n    // PORTING NOTE: On Web only, we inject the code that registers new Limbo\n    // targets based on view changes. This allows us to only depend on Limbo\n    // changes when user code includes queries.\n    t.Rc = (e, n, s) => async function(t, e, n, s) {\n        let i = e.view.sc(n);\n        i.zi && (\n        // The query has a limit and some docs were removed, so we need\n        // to re-run the query against the local store to make sure we\n        // didn't lose any good docs that had been past the limit.\n        i = await fu(t.localStore, e.query, \n        /* usePreviousResults= */ !1).then((({documents: t}) => e.view.sc(t, i))));\n        const r = s && s.targetChanges.get(e.targetId), o = e.view.applyChanges(i, \n        /* updateLimboDocuments= */ t.isPrimaryClient, r);\n        return ia(t, e.targetId, o.cc), o.snapshot;\n    }(t, e, n, s);\n    const r = await fu(t.localStore, e, \n    /* usePreviousResults= */ !0), o = new Lc(e, r.ir), u = o.sc(r.documents), c = gi.createSynthesizedTargetChangeForCurrentChange(n, s && \"Offline\" /* OnlineState.Offline */ !== t.onlineState, i), a = o.applyChanges(u, \n    /* updateLimboDocuments= */ t.isPrimaryClient, c);\n    ia(t, n, a.cc);\n    const h = new qc(e, n, o);\n    return t.wc.set(e, h), t._c.has(n) ? t._c.get(n).push(e) : t._c.set(n, [ e ]), a.snapshot;\n}\n\n/** Stops listening to the query. */ async function jc(t, e) {\n    const n = L(t), s = n.wc.get(e), i = n._c.get(s.targetId);\n    if (i.length > 1) return n._c.set(s.targetId, i.filter((t => !Zn(t, e)))), void n.wc.delete(e);\n    // No other queries are mapped to the target, clean up the query and the target.\n        if (n.isPrimaryClient) {\n        // We need to remove the local query target first to allow us to verify\n        // whether any other client is still interested in this target.\n        n.sharedClientState.removeLocalQueryTarget(s.targetId);\n        n.sharedClientState.isActiveQueryTarget(s.targetId) || await lu(n.localStore, s.targetId, \n        /*keepPersistedTargetData=*/ !1).then((() => {\n            n.sharedClientState.clearQueryState(s.targetId), Ju(n.remoteStore, s.targetId), \n            na(n, s.targetId);\n        })).catch(vt);\n    } else na(n, s.targetId), await lu(n.localStore, s.targetId, \n    /*keepPersistedTargetData=*/ !0);\n}\n\n/**\n * Initiates the write of local mutation batch which involves adding the\n * writes to the mutation queue, notifying the remote store about new\n * mutations and raising events for any changes this write caused.\n *\n * The promise returned by this call is resolved when the above steps\n * have completed, *not* when the write was acked by the backend. The\n * userCallback is resolved once the write was acked/rejected by the\n * backend (or failed locally for any other reason).\n */ async function zc(t, e, n) {\n    const s = Ia(t);\n    try {\n        const t = await function(t, e) {\n            const n = L(t), s = it.now(), i = e.reduce(((t, e) => t.add(e.key)), gs());\n            let r, o;\n            return n.persistence.runTransaction(\"Locally write mutations\", \"readwrite\", (t => {\n                // Figure out which keys do not have a remote version in the cache, this\n                // is needed to create the right overlay mutation: if no remote version\n                // presents, we do not need to create overlays as patch mutations.\n                // TODO(Overlay): Is there a better way to determine this? Using the\n                //  document version does not work because local mutations set them back\n                //  to 0.\n                let u = cs(), c = gs();\n                return n.Zi.getEntries(t, i).next((t => {\n                    u = t, u.forEach(((t, e) => {\n                        e.isValidDocument() || (c = c.add(t));\n                    }));\n                })).next((() => n.localDocuments.getOverlayedDocuments(t, u))).next((i => {\n                    r = i;\n                    // For non-idempotent mutations (such as `FieldValue.increment()`),\n                    // we record the base state in a separate patch mutation. This is\n                    // later used to guarantee consistent values and prevents flicker\n                    // even if the backend sends us an update that already includes our\n                    // transform.\n                    const o = [];\n                    for (const t of e) {\n                        const e = Gs(t, r.get(t.key).overlayedDocument);\n                        null != e && \n                        // NOTE: The base state should only be applied if there's some\n                        // existing document to override, so use a Precondition of\n                        // exists=true\n                        o.push(new zs(t.key, e, cn(e.value.mapValue), Fs.exists(!0)));\n                    }\n                    return n.mutationQueue.addMutationBatch(t, s, o, e);\n                })).next((e => {\n                    o = e;\n                    const s = e.applyToLocalDocumentSet(r, c);\n                    return n.documentOverlayCache.saveOverlays(t, e.batchId, s);\n                }));\n            })).then((() => ({\n                batchId: o.batchId,\n                changes: ls(r)\n            })));\n        }(s.localStore, e);\n        s.sharedClientState.addPendingMutation(t.batchId), function(t, e, n) {\n            let s = t.Tc[t.currentUser.toKey()];\n            s || (s = new pe(et));\n            s = s.insert(e, n), t.Tc[t.currentUser.toKey()] = s;\n        }\n        /**\n * Resolves or rejects the user callback for the given batch and then discards\n * it.\n */ (s, t.batchId, n), await ua(s, t.changes), await cc(s.remoteStore);\n    } catch (t) {\n        // If we can't persist the mutation, we reject the user callback and\n        // don't send the mutation. The user can then retry the write.\n        const e = Ec(t, \"Failed to persist write\");\n        n.reject(e);\n    }\n}\n\n/**\n * Applies one remote event to the sync engine, notifying any views of the\n * changes, and releasing any pending mutation batches that would become\n * visible because of the snapshot version the remote event contains.\n */ async function Wc(t, e) {\n    const n = L(t);\n    try {\n        const t = await uu(n.localStore, e);\n        // Update `receivedDocument` as appropriate for any limbo targets.\n                e.targetChanges.forEach(((t, e) => {\n            const s = n.yc.get(e);\n            s && (\n            // Since this is a limbo resolution lookup, it's for a single document\n            // and it could be added, modified, or removed, but not a combination.\n            F(t.addedDocuments.size + t.modifiedDocuments.size + t.removedDocuments.size <= 1), \n            t.addedDocuments.size > 0 ? s.fc = !0 : t.modifiedDocuments.size > 0 ? F(s.fc) : t.removedDocuments.size > 0 && (F(s.fc), \n            s.fc = !1));\n        })), await ua(n, t, e);\n    } catch (t) {\n        await vt(t);\n    }\n}\n\n/**\n * Applies an OnlineState change to the sync engine and notifies any views of\n * the change.\n */ function Hc(t, e, n) {\n    const s = L(t);\n    // If we are the secondary client, we explicitly ignore the remote store's\n    // online state (the local client may go offline, even though the primary\n    // tab remains online) and only apply the primary tab's online state from\n    // SharedClientState.\n        if (s.isPrimaryClient && 0 /* OnlineStateSource.RemoteStore */ === n || !s.isPrimaryClient && 1 /* OnlineStateSource.SharedClientState */ === n) {\n        const t = [];\n        s.wc.forEach(((n, s) => {\n            const i = s.view.Mu(e);\n            i.snapshot && t.push(i.snapshot);\n        })), function(t, e) {\n            const n = L(t);\n            n.onlineState = e;\n            let s = !1;\n            n.queries.forEach(((t, n) => {\n                for (const t of n.listeners) \n                // Run global snapshot listeners if a consistent snapshot has been emitted.\n                t.Mu(e) && (s = !0);\n            })), s && xc(n);\n        }(s.eventManager, e), t.length && s.dc.nu(t), s.onlineState = e, s.isPrimaryClient && s.sharedClientState.setOnlineState(e);\n    }\n}\n\n/**\n * Rejects the listen for the given targetID. This can be triggered by the\n * backend for any active target.\n *\n * @param syncEngine - The sync engine implementation.\n * @param targetId - The targetID corresponds to one previously initiated by the\n * user as part of TargetData passed to listen() on RemoteStore.\n * @param err - A description of the condition that has forced the rejection.\n * Nearly always this will be an indication that the user is no longer\n * authorized to see the data matching the target.\n */ async function Jc(t, e, n) {\n    const s = L(t);\n    // PORTING NOTE: Multi-tab only.\n        s.sharedClientState.updateQueryState(e, \"rejected\", n);\n    const i = s.yc.get(e), r = i && i.key;\n    if (r) {\n        // TODO(klimt): We really only should do the following on permission\n        // denied errors, but we don't have the cause code here.\n        // It's a limbo doc. Create a synthetic event saying it was deleted.\n        // This is kind of a hack. Ideally, we would have a method in the local\n        // store to purge a document. However, it would be tricky to keep all of\n        // the local store's invariants with another method.\n        let t = new pe(ht.comparator);\n        // TODO(b/217189216): This limbo document should ideally have a read time,\n        // so that it is picked up by any read-time based scans. The backend,\n        // however, does not send a read time for target removals.\n                t = t.insert(r, an.newNoDocument(r, rt.min()));\n        const n = gs().add(r), i = new mi(rt.min(), \n        /* targetChanges= */ new Map, \n        /* targetMismatches= */ new pe(et), t, n);\n        await Wc(s, i), \n        // Since this query failed, we won't want to manually unlisten to it.\n        // We only remove it from bookkeeping after we successfully applied the\n        // RemoteEvent. If `applyRemoteEvent()` throws, we want to re-listen to\n        // this query when the RemoteStore restarts the Watch stream, which should\n        // re-trigger the target failure.\n        s.gc = s.gc.remove(r), s.yc.delete(e), oa(s);\n    } else await lu(s.localStore, e, \n    /* keepPersistedTargetData */ !1).then((() => na(s, e, n))).catch(vt);\n}\n\nasync function Yc(t, e) {\n    const n = L(t), s = e.batch.batchId;\n    try {\n        const t = await ru(n.localStore, e);\n        // The local store may or may not be able to apply the write result and\n        // raise events immediately (depending on whether the watcher is caught\n        // up), so we raise user callbacks first so that they consistently happen\n        // before listen events.\n                ea(n, s, /*error=*/ null), ta(n, s), n.sharedClientState.updateMutationState(s, \"acknowledged\"), \n        await ua(n, t);\n    } catch (t) {\n        await vt(t);\n    }\n}\n\nasync function Xc(t, e, n) {\n    const s = L(t);\n    try {\n        const t = await function(t, e) {\n            const n = L(t);\n            return n.persistence.runTransaction(\"Reject batch\", \"readwrite-primary\", (t => {\n                let s;\n                return n.mutationQueue.lookupMutationBatch(t, e).next((e => (F(null !== e), s = e.keys(), \n                n.mutationQueue.removeMutationBatch(t, e)))).next((() => n.mutationQueue.performConsistencyCheck(t))).next((() => n.documentOverlayCache.removeOverlaysForBatchId(t, s, e))).next((() => n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(t, s))).next((() => n.localDocuments.getDocuments(t, s)));\n            }));\n        }\n        /**\n * Returns the largest (latest) batch id in mutation queue that is pending\n * server response.\n *\n * Returns `BATCHID_UNKNOWN` if the queue is empty.\n */ (s.localStore, e);\n        // The local store may or may not be able to apply the write result and\n        // raise events immediately (depending on whether the watcher is caught up),\n        // so we raise user callbacks first so that they consistently happen before\n        // listen events.\n                ea(s, e, n), ta(s, e), s.sharedClientState.updateMutationState(e, \"rejected\", n), \n        await ua(s, t);\n    } catch (n) {\n        await vt(n);\n    }\n}\n\n/**\n * Registers a user callback that resolves when all pending mutations at the moment of calling\n * are acknowledged .\n */ async function Zc(t, e) {\n    const n = L(t);\n    ec(n.remoteStore) || N(\"SyncEngine\", \"The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled.\");\n    try {\n        const t = await function(t) {\n            const e = L(t);\n            return e.persistence.runTransaction(\"Get highest unacknowledged batch id\", \"readonly\", (t => e.mutationQueue.getHighestUnacknowledgedBatchId(t)));\n        }(n.localStore);\n        if (-1 === t) \n        // Trigger the callback right away if there is no pending writes at the moment.\n        return void e.resolve();\n        const s = n.Ec.get(t) || [];\n        s.push(e), n.Ec.set(t, s);\n    } catch (t) {\n        const n = Ec(t, \"Initialization of waitForPendingWrites() operation failed\");\n        e.reject(n);\n    }\n}\n\n/**\n * Triggers the callbacks that are waiting for this batch id to get acknowledged by server,\n * if there are any.\n */ function ta(t, e) {\n    (t.Ec.get(e) || []).forEach((t => {\n        t.resolve();\n    })), t.Ec.delete(e);\n}\n\n/** Reject all outstanding callbacks waiting for pending writes to complete. */ function ea(t, e, n) {\n    const s = L(t);\n    let i = s.Tc[s.currentUser.toKey()];\n    // NOTE: Mutations restored from persistence won't have callbacks, so it's\n    // okay for there to be no callback for this ID.\n        if (i) {\n        const t = i.get(e);\n        t && (n ? t.reject(n) : t.resolve(), i = i.remove(e)), s.Tc[s.currentUser.toKey()] = i;\n    }\n}\n\nfunction na(t, e, n = null) {\n    t.sharedClientState.removeLocalQueryTarget(e);\n    for (const s of t._c.get(e)) t.wc.delete(s), n && t.dc.Pc(s, n);\n    if (t._c.delete(e), t.isPrimaryClient) {\n        t.Ic.Is(e).forEach((e => {\n            t.Ic.containsKey(e) || \n            // We removed the last reference for this key\n            sa(t, e);\n        }));\n    }\n}\n\nfunction sa(t, e) {\n    t.mc.delete(e.path.canonicalString());\n    // It's possible that the target already got removed because the query failed. In that case,\n    // the key won't exist in `limboTargetsByKey`. Only do the cleanup if we still have the target.\n    const n = t.gc.get(e);\n    null !== n && (Ju(t.remoteStore, n), t.gc = t.gc.remove(e), t.yc.delete(n), oa(t));\n}\n\nfunction ia(t, e, n) {\n    for (const s of n) if (s instanceof Fc) t.Ic.addReference(s.key, e), ra(t, s); else if (s instanceof Bc) {\n        N(\"SyncEngine\", \"Document no longer in limbo: \" + s.key), t.Ic.removeReference(s.key, e);\n        t.Ic.containsKey(s.key) || \n        // We removed the last reference for this key\n        sa(t, s.key);\n    } else O();\n}\n\nfunction ra(t, e) {\n    const n = e.key, s = n.path.canonicalString();\n    t.gc.get(n) || t.mc.has(s) || (N(\"SyncEngine\", \"New document in limbo: \" + n), t.mc.add(s), \n    oa(t));\n}\n\n/**\n * Starts listens for documents in limbo that are enqueued for resolution,\n * subject to a maximum number of concurrent resolutions.\n *\n * Without bounding the number of concurrent resolutions, the server can fail\n * with \"resource exhausted\" errors which can lead to pathological client\n * behavior as seen in https://github.com/firebase/firebase-js-sdk/issues/2683.\n */ function oa(t) {\n    for (;t.mc.size > 0 && t.gc.size < t.maxConcurrentLimboResolutions; ) {\n        const e = t.mc.values().next().value;\n        t.mc.delete(e);\n        const n = new ht(ut.fromString(e)), s = t.Ac.next();\n        t.yc.set(s, new Uc(n)), t.gc = t.gc.insert(n, s), Hu(t.remoteStore, new cr(Jn(Gn(n.path)), s, \"TargetPurposeLimboResolution\" /* TargetPurpose.LimboResolution */ , Ot.ct));\n    }\n}\n\nasync function ua(t, e, n) {\n    const s = L(t), i = [], r = [], o = [];\n    s.wc.isEmpty() || (s.wc.forEach(((t, u) => {\n        o.push(s.Rc(u, e, n).then((t => {\n            // Update views if there are actual changes.\n            if (\n            // If there are changes, or we are handling a global snapshot, notify\n            // secondary clients to update query state.\n            (t || n) && s.isPrimaryClient && s.sharedClientState.updateQueryState(u.targetId, (null == t ? void 0 : t.fromCache) ? \"not-current\" : \"current\"), \n            t) {\n                i.push(t);\n                const e = tu.Li(u.targetId, t);\n                r.push(e);\n            }\n        })));\n    })), await Promise.all(o), s.dc.nu(i), await async function(t, e) {\n        const n = L(t);\n        try {\n            await n.persistence.runTransaction(\"notifyLocalViewChanges\", \"readwrite\", (t => Rt.forEach(e, (e => Rt.forEach(e.Fi, (s => n.persistence.referenceDelegate.addReference(t, e.targetId, s))).next((() => Rt.forEach(e.Bi, (s => n.persistence.referenceDelegate.removeReference(t, e.targetId, s)))))))));\n        } catch (t) {\n            if (!Dt(t)) throw t;\n            // If `notifyLocalViewChanges` fails, we did not advance the sequence\n            // number for the documents that were included in this transaction.\n            // This might trigger them to be deleted earlier than they otherwise\n            // would have, but it should not invalidate the integrity of the data.\n            N(\"LocalStore\", \"Failed to update sequence numbers: \" + t);\n        }\n        for (const t of e) {\n            const e = t.targetId;\n            if (!t.fromCache) {\n                const t = n.Ji.get(e), s = t.snapshotVersion, i = t.withLastLimboFreeSnapshotVersion(s);\n                // Advance the last limbo free snapshot version\n                                n.Ji = n.Ji.insert(e, i);\n            }\n        }\n    }(s.localStore, r));\n}\n\nasync function ca(t, e) {\n    const n = L(t);\n    if (!n.currentUser.isEqual(e)) {\n        N(\"SyncEngine\", \"User change. New user:\", e.toKey());\n        const t = await iu(n.localStore, e);\n        n.currentUser = e, \n        // Fails tasks waiting for pending writes requested by previous user.\n        function(t, e) {\n            t.Ec.forEach((t => {\n                t.forEach((t => {\n                    t.reject(new U(q.CANCELLED, e));\n                }));\n            })), t.Ec.clear();\n        }(n, \"'waitForPendingWrites' promise is rejected due to a user change.\"), \n        // TODO(b/114226417): Consider calling this only in the primary tab.\n        n.sharedClientState.handleUserChange(e, t.removedBatchIds, t.addedBatchIds), await ua(n, t.er);\n    }\n}\n\nfunction aa(t, e) {\n    const n = L(t), s = n.yc.get(e);\n    if (s && s.fc) return gs().add(s.key);\n    {\n        let t = gs();\n        const s = n._c.get(e);\n        if (!s) return t;\n        for (const e of s) {\n            const s = n.wc.get(e);\n            t = t.unionWith(s.view.nc);\n        }\n        return t;\n    }\n}\n\n/**\n * Reconcile the list of synced documents in an existing view with those\n * from persistence.\n */ async function ha(t, e) {\n    const n = L(t), s = await fu(n.localStore, e.query, \n    /* usePreviousResults= */ !0), i = e.view.hc(s);\n    return n.isPrimaryClient && ia(n, e.targetId, i.cc), i;\n}\n\n/**\n * Retrieves newly changed documents from remote document cache and raises\n * snapshots if needed.\n */\n// PORTING NOTE: Multi-Tab only.\nasync function la(t, e) {\n    const n = L(t);\n    return wu(n.localStore, e).then((t => ua(n, t)));\n}\n\n/** Applies a mutation state to an existing batch.  */\n// PORTING NOTE: Multi-Tab only.\nasync function fa(t, e, n, s) {\n    const i = L(t), r = await function(t, e) {\n        const n = L(t), s = L(n.mutationQueue);\n        return n.persistence.runTransaction(\"Lookup mutation documents\", \"readonly\", (t => s.Sn(t, e).next((e => e ? n.localDocuments.getDocuments(t, e) : Rt.resolve(null)))));\n    }\n    // PORTING NOTE: Multi-Tab only.\n    (i.localStore, e);\n    null !== r ? (\"pending\" === n ? \n    // If we are the primary client, we need to send this write to the\n    // backend. Secondary clients will ignore these writes since their remote\n    // connection is disabled.\n    await cc(i.remoteStore) : \"acknowledged\" === n || \"rejected\" === n ? (\n    // NOTE: Both these methods are no-ops for batches that originated from\n    // other clients.\n    ea(i, e, s || null), ta(i, e), function(t, e) {\n        L(L(t).mutationQueue).Cn(e);\n    }\n    // PORTING NOTE: Multi-Tab only.\n    (i.localStore, e)) : O(), await ua(i, r)) : \n    // A throttled tab may not have seen the mutation before it was completed\n    // and removed from the mutation queue, in which case we won't have cached\n    // the affected documents. In this case we can safely ignore the update\n    // since that means we didn't apply the mutation locally at all (if we\n    // had, we would have cached the affected documents), and so we will just\n    // see any resulting document changes via normal remote document updates\n    // as applicable.\n    N(\"SyncEngine\", \"Cannot apply mutation batch with id: \" + e);\n}\n\n/** Applies a query target change from a different tab. */\n// PORTING NOTE: Multi-Tab only.\nasync function da(t, e) {\n    const n = L(t);\n    if (pa(n), Ia(n), !0 === e && !0 !== n.vc) {\n        // Secondary tabs only maintain Views for their local listeners and the\n        // Views internal state may not be 100% populated (in particular\n        // secondary tabs don't track syncedDocuments, the set of documents the\n        // server considers to be in the target). So when a secondary becomes\n        // primary, we need to need to make sure that all views for all targets\n        // match the state on disk.\n        const t = n.sharedClientState.getAllActiveQueryTargets(), e = await wa(n, t.toArray());\n        n.vc = !0, await yc(n.remoteStore, !0);\n        for (const t of e) Hu(n.remoteStore, t);\n    } else if (!1 === e && !1 !== n.vc) {\n        const t = [];\n        let e = Promise.resolve();\n        n._c.forEach(((s, i) => {\n            n.sharedClientState.isLocalQueryTarget(i) ? t.push(i) : e = e.then((() => (na(n, i), \n            lu(n.localStore, i, \n            /*keepPersistedTargetData=*/ !0)))), Ju(n.remoteStore, i);\n        })), await e, await wa(n, t), \n        // PORTING NOTE: Multi-Tab only.\n        function(t) {\n            const e = L(t);\n            e.yc.forEach(((t, n) => {\n                Ju(e.remoteStore, n);\n            })), e.Ic.Ts(), e.yc = new Map, e.gc = new pe(ht.comparator);\n        }\n        /**\n * Reconcile the query views of the provided query targets with the state from\n * persistence. Raises snapshots for any changes that affect the local\n * client and returns the updated state of all target's query data.\n *\n * @param syncEngine - The sync engine implementation\n * @param targets - the list of targets with views that need to be recomputed\n * @param transitionToPrimary - `true` iff the tab transitions from a secondary\n * tab to a primary tab\n */\n        // PORTING NOTE: Multi-Tab only.\n        (n), n.vc = !1, await yc(n.remoteStore, !1);\n    }\n}\n\nasync function wa(t, e, n) {\n    const s = L(t), i = [], r = [];\n    for (const t of e) {\n        let e;\n        const n = s._c.get(t);\n        if (n && 0 !== n.length) {\n            // For queries that have a local View, we fetch their current state\n            // from LocalStore (as the resume token and the snapshot version\n            // might have changed) and reconcile their views with the persisted\n            // state (the list of syncedDocuments may have gotten out of sync).\n            e = await hu(s.localStore, Jn(n[0]));\n            for (const t of n) {\n                const e = s.wc.get(t), n = await ha(s, e);\n                n.snapshot && r.push(n.snapshot);\n            }\n        } else {\n            // For queries that never executed on this client, we need to\n            // allocate the target in LocalStore and initialize a new View.\n            const n = await du(s.localStore, t);\n            e = await hu(s.localStore, n), await Qc(s, _a(n), t, \n            /*current=*/ !1, e.resumeToken);\n        }\n        i.push(e);\n    }\n    return s.dc.nu(r), i;\n}\n\n/**\n * Creates a `Query` object from the specified `Target`. There is no way to\n * obtain the original `Query`, so we synthesize a `Query` from the `Target`\n * object.\n *\n * The synthesized result might be different from the original `Query`, but\n * since the synthesized `Query` should return the same results as the\n * original one (only the presentation of results might differ), the potential\n * difference will not cause issues.\n */\n// PORTING NOTE: Multi-Tab only.\nfunction _a(t) {\n    return Kn(t.path, t.collectionGroup, t.orderBy, t.filters, t.limit, \"F\" /* LimitType.First */ , t.startAt, t.endAt);\n}\n\n/** Returns the IDs of the clients that are currently active. */\n// PORTING NOTE: Multi-Tab only.\nfunction ma(t) {\n    const e = L(t);\n    return L(L(e.localStore).persistence).$i();\n}\n\n/** Applies a query target change from a different tab. */\n// PORTING NOTE: Multi-Tab only.\nasync function ga(t, e, n, s) {\n    const i = L(t);\n    if (i.vc) \n    // If we receive a target state notification via WebStorage, we are\n    // either already secondary or another tab has taken the primary lease.\n    return void N(\"SyncEngine\", \"Ignoring unexpected query state notification.\");\n    const r = i._c.get(e);\n    if (r && r.length > 0) switch (n) {\n      case \"current\":\n      case \"not-current\":\n        {\n            const t = await wu(i.localStore, ss(r[0])), s = mi.createSynthesizedRemoteEventForCurrentChange(e, \"current\" === n, Ve.EMPTY_BYTE_STRING);\n            await ua(i, t, s);\n            break;\n        }\n\n      case \"rejected\":\n        await lu(i.localStore, e, \n        /* keepPersistedTargetData */ !0), na(i, e, s);\n        break;\n\n      default:\n        O();\n    }\n}\n\n/** Adds or removes Watch targets for queries from different tabs. */ async function ya(t, e, n) {\n    const s = pa(t);\n    if (s.vc) {\n        for (const t of e) {\n            if (s._c.has(t)) {\n                // A target might have been added in a previous attempt\n                N(\"SyncEngine\", \"Adding an already active target \" + t);\n                continue;\n            }\n            const e = await du(s.localStore, t), n = await hu(s.localStore, e);\n            await Qc(s, _a(e), n.targetId, \n            /*current=*/ !1, n.resumeToken), Hu(s.remoteStore, n);\n        }\n        for (const t of n) \n        // Check that the target is still active since the target might have been\n        // removed if it has been rejected by the backend.\n        s._c.has(t) && \n        // Release queries that are still active.\n        await lu(s.localStore, t, \n        /* keepPersistedTargetData */ !1).then((() => {\n            Ju(s.remoteStore, t), na(s, t);\n        })).catch(vt);\n    }\n}\n\nfunction pa(t) {\n    const e = L(t);\n    return e.remoteStore.remoteSyncer.applyRemoteEvent = Wc.bind(null, e), e.remoteStore.remoteSyncer.getRemoteKeysForTarget = aa.bind(null, e), \n    e.remoteStore.remoteSyncer.rejectListen = Jc.bind(null, e), e.dc.nu = Dc.bind(null, e.eventManager), \n    e.dc.Pc = Cc.bind(null, e.eventManager), e;\n}\n\nfunction Ia(t) {\n    const e = L(t);\n    return e.remoteStore.remoteSyncer.applySuccessfulWrite = Yc.bind(null, e), e.remoteStore.remoteSyncer.rejectFailedWrite = Xc.bind(null, e), \n    e;\n}\n\n/**\n * Loads a Firestore bundle into the SDK. The returned promise resolves when\n * the bundle finished loading.\n *\n * @param syncEngine - SyncEngine to use.\n * @param bundleReader - Bundle to load into the SDK.\n * @param task - LoadBundleTask used to update the loading progress to public API.\n */ function Ta(t, e, n) {\n    const s = L(t);\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        (\n    /** Loads a bundle and returns the list of affected collection groups. */\n    async function(t, e, n) {\n        try {\n            const s = await e.getMetadata();\n            if (await function(t, e) {\n                const n = L(t), s = Ni(e.createTime);\n                return n.persistence.runTransaction(\"hasNewerBundle\", \"readonly\", (t => n.qs.getBundleMetadata(t, e.id))).then((t => !!t && t.createTime.compareTo(s) >= 0));\n            }\n            /**\n * Saves the given `BundleMetadata` to local persistence.\n */ (t.localStore, s)) return await e.close(), n._completeWith(function(t) {\n                return {\n                    taskState: \"Success\",\n                    documentsLoaded: t.totalDocuments,\n                    bytesLoaded: t.totalBytes,\n                    totalDocuments: t.totalDocuments,\n                    totalBytes: t.totalBytes\n                };\n            }(s)), Promise.resolve(new Set);\n            n._updateProgress(Oc(s));\n            const i = new $c(s, t.localStore, e.serializer);\n            let r = await e.bc();\n            for (;r; ) {\n                const t = await i.zu(r);\n                t && n._updateProgress(t), r = await e.bc();\n            }\n            const o = await i.complete();\n            return await ua(t, o.Ju, \n            /* remoteEvent */ void 0), \n            // Save metadata, so loading the same bundle will skip.\n            await function(t, e) {\n                const n = L(t);\n                return n.persistence.runTransaction(\"Save bundle\", \"readwrite\", (t => n.qs.saveBundleMetadata(t, e)));\n            }\n            /**\n * Returns a promise of a `NamedQuery` associated with given query name. Promise\n * resolves to undefined if no persisted data can be found.\n */ (t.localStore, s), n._completeWith(o.progress), Promise.resolve(o.Hu);\n        } catch (t) {\n            return M(\"SyncEngine\", `Loading bundle failed with ${t}`), n._failWith(t), Promise.resolve(new Set);\n        }\n    }\n    /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n    /**\n * Provides all components needed for Firestore with in-memory persistence.\n * Uses EagerGC garbage collection.\n */)(s, e, n).then((t => {\n        s.sharedClientState.notifyBundleLoaded(t);\n    }));\n}\n\nclass Ea {\n    constructor() {\n        this.synchronizeTabs = !1;\n    }\n    async initialize(t) {\n        this.serializer = Fu(t.databaseInfo.databaseId), this.sharedClientState = this.createSharedClientState(t), \n        this.persistence = this.createPersistence(t), await this.persistence.start(), this.localStore = this.createLocalStore(t), \n        this.gcScheduler = this.createGarbageCollectionScheduler(t, this.localStore), this.indexBackfillerScheduler = this.createIndexBackfillerScheduler(t, this.localStore);\n    }\n    createGarbageCollectionScheduler(t, e) {\n        return null;\n    }\n    createIndexBackfillerScheduler(t, e) {\n        return null;\n    }\n    createLocalStore(t) {\n        return su(this.persistence, new eu, t.initialUser, this.serializer);\n    }\n    createPersistence(t) {\n        return new Ko(Qo.zs, this.serializer);\n    }\n    createSharedClientState(t) {\n        return new bu;\n    }\n    async terminate() {\n        this.gcScheduler && this.gcScheduler.stop(), await this.sharedClientState.shutdown(), \n        await this.persistence.shutdown();\n    }\n}\n\nclass Aa extends Ea {\n    constructor(t) {\n        super(), this.cacheSizeBytes = t;\n    }\n    createGarbageCollectionScheduler(t, e) {\n        F(this.persistence.referenceDelegate instanceof jo);\n        const n = this.persistence.referenceDelegate.garbageCollector;\n        return new po(n, t.asyncQueue, e);\n    }\n    createPersistence(t) {\n        const e = void 0 !== this.cacheSizeBytes ? so.withCacheSize(this.cacheSizeBytes) : so.DEFAULT;\n        return new Ko((t => jo.zs(t, e)), this.serializer);\n    }\n}\n\n/**\n * Provides all components needed for Firestore with IndexedDB persistence.\n */ class va extends Ea {\n    constructor(t, e, n) {\n        super(), this.Vc = t, this.cacheSizeBytes = e, this.forceOwnership = n, this.synchronizeTabs = !1;\n    }\n    async initialize(t) {\n        await super.initialize(t), await this.Vc.initialize(this, t), \n        // Enqueue writes from a previous session\n        await Ia(this.Vc.syncEngine), await cc(this.Vc.remoteStore), \n        // NOTE: This will immediately call the listener, so we make sure to\n        // set it after localStore / remoteStore are started.\n        await this.persistence.Ii((() => (this.gcScheduler && !this.gcScheduler.started && this.gcScheduler.start(), \n        this.indexBackfillerScheduler && !this.indexBackfillerScheduler.started && this.indexBackfillerScheduler.start(), \n        Promise.resolve())));\n    }\n    createLocalStore(t) {\n        return su(this.persistence, new eu, t.initialUser, this.serializer);\n    }\n    createGarbageCollectionScheduler(t, e) {\n        const n = this.persistence.referenceDelegate.garbageCollector;\n        return new po(n, t.asyncQueue, e);\n    }\n    createIndexBackfillerScheduler(t, e) {\n        const n = new $t(e, this.persistence);\n        return new Mt(t.asyncQueue, n);\n    }\n    createPersistence(t) {\n        const e = Zo(t.databaseInfo.databaseId, t.databaseInfo.persistenceKey), n = void 0 !== this.cacheSizeBytes ? so.withCacheSize(this.cacheSizeBytes) : so.DEFAULT;\n        return new Jo(this.synchronizeTabs, e, t.clientId, n, t.asyncQueue, $u(), Ou(), this.serializer, this.sharedClientState, !!this.forceOwnership);\n    }\n    createSharedClientState(t) {\n        return new bu;\n    }\n}\n\n/**\n * Provides all components needed for Firestore with multi-tab IndexedDB\n * persistence.\n *\n * In the legacy client, this provider is used to provide both multi-tab and\n * non-multi-tab persistence since we cannot tell at build time whether\n * `synchronizeTabs` will be enabled.\n */ class Ra extends va {\n    constructor(t, e) {\n        super(t, e, /* forceOwnership= */ !1), this.Vc = t, this.cacheSizeBytes = e, this.synchronizeTabs = !0;\n    }\n    async initialize(t) {\n        await super.initialize(t);\n        const e = this.Vc.syncEngine;\n        this.sharedClientState instanceof Pu && (this.sharedClientState.syncEngine = {\n            jr: fa.bind(null, e),\n            zr: ga.bind(null, e),\n            Wr: ya.bind(null, e),\n            $i: ma.bind(null, e),\n            Qr: la.bind(null, e)\n        }, await this.sharedClientState.start()), \n        // NOTE: This will immediately call the listener, so we make sure to\n        // set it after localStore / remoteStore are started.\n        await this.persistence.Ii((async t => {\n            await da(this.Vc.syncEngine, t), this.gcScheduler && (t && !this.gcScheduler.started ? this.gcScheduler.start() : t || this.gcScheduler.stop()), \n            this.indexBackfillerScheduler && (t && !this.indexBackfillerScheduler.started ? this.indexBackfillerScheduler.start() : t || this.indexBackfillerScheduler.stop());\n        }));\n    }\n    createSharedClientState(t) {\n        const e = $u();\n        if (!Pu.D(e)) throw new U(q.UNIMPLEMENTED, \"IndexedDB persistence is only available on platforms that support LocalStorage.\");\n        const n = Zo(t.databaseInfo.databaseId, t.databaseInfo.persistenceKey);\n        return new Pu(e, t.asyncQueue, n, t.clientId, t.initialUser);\n    }\n}\n\n/**\n * Initializes and wires the components that are needed to interface with the\n * network.\n */ class Pa {\n    async initialize(t, e) {\n        this.localStore || (this.localStore = t.localStore, this.sharedClientState = t.sharedClientState, \n        this.datastore = this.createDatastore(e), this.remoteStore = this.createRemoteStore(e), \n        this.eventManager = this.createEventManager(e), this.syncEngine = this.createSyncEngine(e, \n        /* startAsPrimary=*/ !t.synchronizeTabs), this.sharedClientState.onlineStateHandler = t => Hc(this.syncEngine, t, 1 /* OnlineStateSource.SharedClientState */), \n        this.remoteStore.remoteSyncer.handleCredentialChange = ca.bind(null, this.syncEngine), \n        await yc(this.remoteStore, this.syncEngine.isPrimaryClient));\n    }\n    createEventManager(t) {\n        return new bc;\n    }\n    createDatastore(t) {\n        const e = Fu(t.databaseInfo.databaseId), n = (s = t.databaseInfo, new Mu(s));\n        var s;\n        /** Return the Platform-specific connectivity monitor. */        return function(t, e, n, s) {\n            return new Ku(t, e, n, s);\n        }(t.authCredentials, t.appCheckCredentials, n, e);\n    }\n    createRemoteStore(t) {\n        return e = this.localStore, n = this.datastore, s = t.asyncQueue, i = t => Hc(this.syncEngine, t, 0 /* OnlineStateSource.RemoteStore */), \n        r = Su.D() ? new Su : new Vu, new ju(e, n, s, i, r);\n        var e, n, s, i, r;\n        /** Re-enables the network. Idempotent. */    }\n    createSyncEngine(t, e) {\n        return function(t, e, n, \n        // PORTING NOTE: Manages state synchronization in multi-tab environments.\n        s, i, r, o) {\n            const u = new Kc(t, e, n, s, i, r);\n            return o && (u.vc = !0), u;\n        }(this.localStore, this.remoteStore, this.eventManager, this.sharedClientState, t.initialUser, t.maxConcurrentLimboResolutions, e);\n    }\n    terminate() {\n        return async function(t) {\n            const e = L(t);\n            N(\"RemoteStore\", \"RemoteStore shutting down.\"), e.vu.add(5 /* OfflineCause.Shutdown */), \n            await Wu(e), e.Pu.shutdown(), \n            // Set the OnlineState to Unknown (rather than Offline) to avoid potentially\n            // triggering spurious listener events with cached data, etc.\n            e.bu.set(\"Unknown\" /* OnlineState.Unknown */);\n        }(this.remoteStore);\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * How many bytes to read each time when `ReadableStreamReader.read()` is\n * called. Only applicable for byte streams that we control (e.g. those backed\n * by an UInt8Array).\n */\n/**\n * Builds a `ByteStreamReader` from a UInt8Array.\n * @param source - The data source to use.\n * @param bytesPerRead - How many bytes each `read()` from the returned reader\n *        will read.\n */\nfunction ba(t, e = 10240) {\n    let n = 0;\n    // The TypeScript definition for ReadableStreamReader changed. We use\n    // `any` here to allow this code to compile with different versions.\n    // See https://github.com/microsoft/TypeScript/issues/42970\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        async read() {\n            if (n < t.byteLength) {\n                const s = {\n                    value: t.slice(n, n + e),\n                    done: !1\n                };\n                return n += e, s;\n            }\n            return {\n                done: !0\n            };\n        },\n        async cancel() {},\n        releaseLock() {},\n        closed: Promise.resolve()\n    };\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * On web, a `ReadableStream` is wrapped around by a `ByteStreamReader`.\n */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * A wrapper implementation of Observer<T> that will dispatch events\n * asynchronously. To allow immediate silencing, a mute call is added which\n * causes events scheduled to no longer be raised.\n */\nclass Va {\n    constructor(t) {\n        this.observer = t, \n        /**\n         * When set to true, will not raise future events. Necessary to deal with\n         * async detachment of listener.\n         */\n        this.muted = !1;\n    }\n    next(t) {\n        this.observer.next && this.Sc(this.observer.next, t);\n    }\n    error(t) {\n        this.observer.error ? this.Sc(this.observer.error, t) : k(\"Uncaught Error in snapshot listener:\", t.toString());\n    }\n    Dc() {\n        this.muted = !0;\n    }\n    Sc(t, e) {\n        this.muted || setTimeout((() => {\n            this.muted || t(e);\n        }), 0);\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A class representing a bundle.\n *\n * Takes a bundle stream or buffer, and presents abstractions to read bundled\n * elements out of the underlying content.\n */ class Sa {\n    constructor(\n    /** The reader to read from underlying binary bundle data source. */\n    t, e) {\n        this.Cc = t, this.serializer = e, \n        /** Cached bundle metadata. */\n        this.metadata = new K, \n        /**\n         * Internal buffer to hold bundle content, accumulating incomplete element\n         * content.\n         */\n        this.buffer = new Uint8Array, this.xc = new TextDecoder(\"utf-8\"), \n        // Read the metadata (which is the first element).\n        this.Nc().then((t => {\n            t && t.Qu() ? this.metadata.resolve(t.Gu.metadata) : this.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is\\n             ${JSON.stringify(null == t ? void 0 : t.Gu)}`));\n        }), (t => this.metadata.reject(t)));\n    }\n    close() {\n        return this.Cc.cancel();\n    }\n    async getMetadata() {\n        return this.metadata.promise;\n    }\n    async bc() {\n        // Makes sure metadata is read before proceeding.\n        return await this.getMetadata(), this.Nc();\n    }\n    /**\n     * Reads from the head of internal buffer, and pulling more data from\n     * underlying stream if a complete element cannot be found, until an\n     * element(including the prefixed length and the JSON string) is found.\n     *\n     * Once a complete element is read, it is dropped from internal buffer.\n     *\n     * Returns either the bundled element, or null if we have reached the end of\n     * the stream.\n     */    async Nc() {\n        const t = await this.kc();\n        if (null === t) return null;\n        const e = this.xc.decode(t), n = Number(e);\n        isNaN(n) && this.Mc(`length string (${e}) is not valid number`);\n        const s = await this.$c(n);\n        return new kc(JSON.parse(s), t.length + n);\n    }\n    /** First index of '{' from the underlying buffer. */    Oc() {\n        return this.buffer.findIndex((t => t === \"{\".charCodeAt(0)));\n    }\n    /**\n     * Reads from the beginning of the internal buffer, until the first '{', and\n     * return the content.\n     *\n     * If reached end of the stream, returns a null.\n     */    async kc() {\n        for (;this.Oc() < 0; ) {\n            if (await this.Fc()) break;\n        }\n        // Broke out of the loop because underlying stream is closed, and there\n        // happens to be no more data to process.\n                if (0 === this.buffer.length) return null;\n        const t = this.Oc();\n        // Broke out of the loop because underlying stream is closed, but still\n        // cannot find an open bracket.\n                t < 0 && this.Mc(\"Reached the end of bundle when a length string is expected.\");\n        const e = this.buffer.slice(0, t);\n        // Update the internal buffer to drop the read length.\n                return this.buffer = this.buffer.slice(t), e;\n    }\n    /**\n     * Reads from a specified position from the internal buffer, for a specified\n     * number of bytes, pulling more data from the underlying stream if needed.\n     *\n     * Returns a string decoded from the read bytes.\n     */    async $c(t) {\n        for (;this.buffer.length < t; ) {\n            await this.Fc() && this.Mc(\"Reached the end of bundle when more is expected.\");\n        }\n        const e = this.xc.decode(this.buffer.slice(0, t));\n        // Update the internal buffer to drop the read json string.\n                return this.buffer = this.buffer.slice(t), e;\n    }\n    Mc(t) {\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        throw this.Cc.cancel(), new Error(`Invalid bundle format: ${t}`);\n    }\n    /**\n     * Pulls more data from underlying stream to internal buffer.\n     * Returns a boolean indicating whether the stream is finished.\n     */    async Fc() {\n        const t = await this.Cc.read();\n        if (!t.done) {\n            const e = new Uint8Array(this.buffer.length + t.value.length);\n            e.set(this.buffer), e.set(t.value, this.buffer.length), this.buffer = e;\n        }\n        return t.done;\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Internal transaction object responsible for accumulating the mutations to\n * perform and the base versions for any documents read.\n */\nclass Da {\n    constructor(t) {\n        this.datastore = t, \n        // The version of each document that was read during this transaction.\n        this.readVersions = new Map, this.mutations = [], this.committed = !1, \n        /**\n         * A deferred usage error that occurred previously in this transaction that\n         * will cause the transaction to fail once it actually commits.\n         */\n        this.lastWriteError = null, \n        /**\n         * Set of documents that have been written in the transaction.\n         *\n         * When there's more than one write to the same key in a transaction, any\n         * writes after the first are handled differently.\n         */\n        this.writtenDocs = new Set;\n    }\n    async lookup(t) {\n        if (this.ensureCommitNotCalled(), this.mutations.length > 0) throw new U(q.INVALID_ARGUMENT, \"Firestore transactions require all reads to be executed before all writes.\");\n        const e = await async function(t, e) {\n            const n = L(t), s = Li(n.serializer) + \"/documents\", i = {\n                documents: e.map((t => $i(n.serializer, t)))\n            }, r = await n.vo(\"BatchGetDocuments\", s, i, e.length), o = new Map;\n            r.forEach((t => {\n                const e = Gi(n.serializer, t);\n                o.set(e.key.toString(), e);\n            }));\n            const u = [];\n            return e.forEach((t => {\n                const e = o.get(t.toString());\n                F(!!e), u.push(e);\n            })), u;\n        }(this.datastore, t);\n        return e.forEach((t => this.recordVersion(t))), e;\n    }\n    set(t, e) {\n        this.write(e.toMutation(t, this.precondition(t))), this.writtenDocs.add(t.toString());\n    }\n    update(t, e) {\n        try {\n            this.write(e.toMutation(t, this.preconditionForUpdate(t)));\n        } catch (t) {\n            this.lastWriteError = t;\n        }\n        this.writtenDocs.add(t.toString());\n    }\n    delete(t) {\n        this.write(new Ys(t, this.precondition(t))), this.writtenDocs.add(t.toString());\n    }\n    async commit() {\n        if (this.ensureCommitNotCalled(), this.lastWriteError) throw this.lastWriteError;\n        const t = this.readVersions;\n        // For each mutation, note that the doc was written.\n                this.mutations.forEach((e => {\n            t.delete(e.key.toString());\n        })), \n        // For each document that was read but not written to, we want to perform\n        // a `verify` operation.\n        t.forEach(((t, e) => {\n            const n = ht.fromPath(e);\n            this.mutations.push(new Xs(n, this.precondition(n)));\n        })), await async function(t, e) {\n            const n = L(t), s = Li(n.serializer) + \"/documents\", i = {\n                writes: e.map((t => ji(n.serializer, t)))\n            };\n            await n.Io(\"Commit\", s, i);\n        }(this.datastore, this.mutations), this.committed = !0;\n    }\n    recordVersion(t) {\n        let e;\n        if (t.isFoundDocument()) e = t.version; else {\n            if (!t.isNoDocument()) throw O();\n            // Represent a deleted doc using SnapshotVersion.min().\n            e = rt.min();\n        }\n        const n = this.readVersions.get(t.key.toString());\n        if (n) {\n            if (!e.isEqual(n)) \n            // This transaction will fail no matter what.\n            throw new U(q.ABORTED, \"Document version changed between two reads.\");\n        } else this.readVersions.set(t.key.toString(), e);\n    }\n    /**\n     * Returns the version of this document when it was read in this transaction,\n     * as a precondition, or no precondition if it was not read.\n     */    precondition(t) {\n        const e = this.readVersions.get(t.toString());\n        return !this.writtenDocs.has(t.toString()) && e ? e.isEqual(rt.min()) ? Fs.exists(!1) : Fs.updateTime(e) : Fs.none();\n    }\n    /**\n     * Returns the precondition for a document if the operation is an update.\n     */    preconditionForUpdate(t) {\n        const e = this.readVersions.get(t.toString());\n        // The first time a document is written, we want to take into account the\n        // read time and existence\n                if (!this.writtenDocs.has(t.toString()) && e) {\n            if (e.isEqual(rt.min())) \n            // The document doesn't exist, so fail the transaction.\n            // This has to be validated locally because you can't send a\n            // precondition that a document does not exist without changing the\n            // semantics of the backend write to be an insert. This is the reverse\n            // of what we want, since we want to assert that the document doesn't\n            // exist but then send the update and have it fail. Since we can't\n            // express that to the backend, we have to validate locally.\n            // Note: this can change once we can send separate verify writes in the\n            // transaction.\n            throw new U(q.INVALID_ARGUMENT, \"Can't update a document that doesn't exist.\");\n            // Document exists, base precondition on document update time.\n                        return Fs.updateTime(e);\n        }\n        // Document was not read, so we just use the preconditions for a blind\n        // update.\n        return Fs.exists(!0);\n    }\n    write(t) {\n        this.ensureCommitNotCalled(), this.mutations.push(t);\n    }\n    ensureCommitNotCalled() {}\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * TransactionRunner encapsulates the logic needed to run and retry transactions\n * with backoff.\n */ class Ca {\n    constructor(t, e, n, s, i) {\n        this.asyncQueue = t, this.datastore = e, this.options = n, this.updateFunction = s, \n        this.deferred = i, this.Bc = n.maxAttempts, this.qo = new Bu(this.asyncQueue, \"transaction_retry\" /* TimerId.TransactionRetry */);\n    }\n    /** Runs the transaction and sets the result on deferred. */    run() {\n        this.Bc -= 1, this.Lc();\n    }\n    Lc() {\n        this.qo.No((async () => {\n            const t = new Da(this.datastore), e = this.qc(t);\n            e && e.then((e => {\n                this.asyncQueue.enqueueAndForget((() => t.commit().then((() => {\n                    this.deferred.resolve(e);\n                })).catch((t => {\n                    this.Uc(t);\n                }))));\n            })).catch((t => {\n                this.Uc(t);\n            }));\n        }));\n    }\n    qc(t) {\n        try {\n            const e = this.updateFunction(t);\n            return !Ft(e) && e.catch && e.then ? e : (this.deferred.reject(Error(\"Transaction callback must return a Promise\")), \n            null);\n        } catch (t) {\n            // Do not retry errors thrown by user provided updateFunction.\n            return this.deferred.reject(t), null;\n        }\n    }\n    Uc(t) {\n        this.Bc > 0 && this.Kc(t) ? (this.Bc -= 1, this.asyncQueue.enqueueAndForget((() => (this.Lc(), \n        Promise.resolve())))) : this.deferred.reject(t);\n    }\n    Kc(t) {\n        if (\"FirebaseError\" === t.name) {\n            // In transactions, the backend will fail outdated reads with FAILED_PRECONDITION and\n            // non-matching document versions with ABORTED. These errors should be retried.\n            const e = t.code;\n            return \"aborted\" === e || \"failed-precondition\" === e || \"already-exists\" === e || !oi(e);\n        }\n        return !1;\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * FirestoreClient is a top-level class that constructs and owns all of the //\n * pieces of the client SDK architecture. It is responsible for creating the //\n * async queue that is shared by all of the other components in the system. //\n */\nclass xa {\n    constructor(t, e, \n    /**\n     * Asynchronous queue responsible for all of our internal processing. When\n     * we get incoming work from the user (via public API) or the network\n     * (incoming GRPC messages), we should always schedule onto this queue.\n     * This ensures all of our work is properly serialized (e.g. we don't\n     * start processing a new operation while the previous one is waiting for\n     * an async I/O to complete).\n     */\n    n, s) {\n        this.authCredentials = t, this.appCheckCredentials = e, this.asyncQueue = n, this.databaseInfo = s, \n        this.user = V.UNAUTHENTICATED, this.clientId = tt.A(), this.authCredentialListener = () => Promise.resolve(), \n        this.appCheckCredentialListener = () => Promise.resolve(), this.authCredentials.start(n, (async t => {\n            N(\"FirestoreClient\", \"Received user=\", t.uid), await this.authCredentialListener(t), \n            this.user = t;\n        })), this.appCheckCredentials.start(n, (t => (N(\"FirestoreClient\", \"Received new app check token=\", t), \n        this.appCheckCredentialListener(t, this.user))));\n    }\n    async getConfiguration() {\n        return {\n            asyncQueue: this.asyncQueue,\n            databaseInfo: this.databaseInfo,\n            clientId: this.clientId,\n            authCredentials: this.authCredentials,\n            appCheckCredentials: this.appCheckCredentials,\n            initialUser: this.user,\n            maxConcurrentLimboResolutions: 100\n        };\n    }\n    setCredentialChangeListener(t) {\n        this.authCredentialListener = t;\n    }\n    setAppCheckTokenChangeListener(t) {\n        this.appCheckCredentialListener = t;\n    }\n    /**\n     * Checks that the client has not been terminated. Ensures that other methods on //\n     * this class cannot be called after the client is terminated. //\n     */    verifyNotTerminated() {\n        if (this.asyncQueue.isShuttingDown) throw new U(q.FAILED_PRECONDITION, \"The client has already been terminated.\");\n    }\n    terminate() {\n        this.asyncQueue.enterRestrictedMode();\n        const t = new K;\n        return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((async () => {\n            try {\n                this._onlineComponents && await this._onlineComponents.terminate(), this._offlineComponents && await this._offlineComponents.terminate(), \n                // The credentials provider must be terminated after shutting down the\n                // RemoteStore as it will prevent the RemoteStore from retrieving auth\n                // tokens.\n                this.authCredentials.shutdown(), this.appCheckCredentials.shutdown(), t.resolve();\n            } catch (e) {\n                const n = Ec(e, \"Failed to shutdown persistence\");\n                t.reject(n);\n            }\n        })), t.promise;\n    }\n}\n\nasync function Na(t, e) {\n    t.asyncQueue.verifyOperationInProgress(), N(\"FirestoreClient\", \"Initializing OfflineComponentProvider\");\n    const n = await t.getConfiguration();\n    await e.initialize(n);\n    let s = n.initialUser;\n    t.setCredentialChangeListener((async t => {\n        s.isEqual(t) || (await iu(e.localStore, t), s = t);\n    })), \n    // When a user calls clearPersistence() in one client, all other clients\n    // need to be terminated to allow the delete to succeed.\n    e.persistence.setDatabaseDeletedListener((() => t.terminate())), t._offlineComponents = e;\n}\n\nasync function ka(t, e) {\n    t.asyncQueue.verifyOperationInProgress();\n    const n = await $a(t);\n    N(\"FirestoreClient\", \"Initializing OnlineComponentProvider\");\n    const s = await t.getConfiguration();\n    await e.initialize(n, s), \n    // The CredentialChangeListener of the online component provider takes\n    // precedence over the offline component provider.\n    t.setCredentialChangeListener((t => gc(e.remoteStore, t))), t.setAppCheckTokenChangeListener(((t, n) => gc(e.remoteStore, n))), \n    t._onlineComponents = e;\n}\n\n/**\n * Decides whether the provided error allows us to gracefully disable\n * persistence (as opposed to crashing the client).\n */ function Ma(t) {\n    return \"FirebaseError\" === t.name ? t.code === q.FAILED_PRECONDITION || t.code === q.UNIMPLEMENTED : !(\"undefined\" != typeof DOMException && t instanceof DOMException) || (\n    // When the browser is out of quota we could get either quota exceeded\n    // or an aborted error depending on whether the error happened during\n    // schema migration.\n    22 === t.code || 20 === t.code || \n    // Firefox Private Browsing mode disables IndexedDb and returns\n    // INVALID_STATE for any usage.\n    11 === t.code);\n}\n\nasync function $a(t) {\n    if (!t._offlineComponents) if (t._uninitializedComponentsProvider) {\n        N(\"FirestoreClient\", \"Using user provided OfflineComponentProvider\");\n        try {\n            await Na(t, t._uninitializedComponentsProvider._offline);\n        } catch (e) {\n            const n = e;\n            if (!Ma(n)) throw n;\n            M(\"Error using user provided cache. Falling back to memory cache: \" + n), await Na(t, new Ea);\n        }\n    } else N(\"FirestoreClient\", \"Using default OfflineComponentProvider\"), await Na(t, new Ea);\n    return t._offlineComponents;\n}\n\nasync function Oa(t) {\n    return t._onlineComponents || (t._uninitializedComponentsProvider ? (N(\"FirestoreClient\", \"Using user provided OnlineComponentProvider\"), \n    await ka(t, t._uninitializedComponentsProvider._online)) : (N(\"FirestoreClient\", \"Using default OnlineComponentProvider\"), \n    await ka(t, new Pa))), t._onlineComponents;\n}\n\nfunction Fa(t) {\n    return $a(t).then((t => t.persistence));\n}\n\nfunction Ba(t) {\n    return $a(t).then((t => t.localStore));\n}\n\nfunction La(t) {\n    return Oa(t).then((t => t.remoteStore));\n}\n\nfunction qa(t) {\n    return Oa(t).then((t => t.syncEngine));\n}\n\nfunction Ua(t) {\n    return Oa(t).then((t => t.datastore));\n}\n\nasync function Ka(t) {\n    const e = await Oa(t), n = e.eventManager;\n    return n.onListen = Gc.bind(null, e.syncEngine), n.onUnlisten = jc.bind(null, e.syncEngine), \n    n;\n}\n\n/** Enables the network connection and re-enqueues all pending operations. */ function Ga(t) {\n    return t.asyncQueue.enqueue((async () => {\n        const e = await Fa(t), n = await La(t);\n        return e.setNetworkEnabled(!0), function(t) {\n            const e = L(t);\n            return e.vu.delete(0 /* OfflineCause.UserDisabled */), zu(e);\n        }(n);\n    }));\n}\n\n/** Disables the network connection. Pending operations will not complete. */ function Qa(t) {\n    return t.asyncQueue.enqueue((async () => {\n        const e = await Fa(t), n = await La(t);\n        return e.setNetworkEnabled(!1), async function(t) {\n            const e = L(t);\n            e.vu.add(0 /* OfflineCause.UserDisabled */), await Wu(e), \n            // Set the OnlineState to Offline so get()s return from cache, etc.\n            e.bu.set(\"Offline\" /* OnlineState.Offline */);\n        }(n);\n    }));\n}\n\n/**\n * Returns a Promise that resolves when all writes that were pending at the time\n * this method was called received server acknowledgement. An acknowledgement\n * can be either acceptance or rejection.\n */ function ja(t, e) {\n    const n = new K;\n    return t.asyncQueue.enqueueAndForget((async () => async function(t, e, n) {\n        try {\n            const s = await function(t, e) {\n                const n = L(t);\n                return n.persistence.runTransaction(\"read document\", \"readonly\", (t => n.localDocuments.getDocument(t, e)));\n            }(t, e);\n            s.isFoundDocument() ? n.resolve(s) : s.isNoDocument() ? n.resolve(null) : n.reject(new U(q.UNAVAILABLE, \"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)\"));\n        } catch (t) {\n            const s = Ec(t, `Failed to get document '${e} from cache`);\n            n.reject(s);\n        }\n    }\n    /**\n * Retrieves a latency-compensated document from the backend via a\n * SnapshotListener.\n */ (await Ba(t), e, n))), n.promise;\n}\n\nfunction za(t, e, n = {}) {\n    const s = new K;\n    return t.asyncQueue.enqueueAndForget((async () => function(t, e, n, s, i) {\n        const r = new Va({\n            next: r => {\n                // Remove query first before passing event to user to avoid\n                // user actions affecting the now stale query.\n                e.enqueueAndForget((() => Sc(t, o)));\n                const u = r.docs.has(n);\n                !u && r.fromCache ? \n                // TODO(dimond): If we're online and the document doesn't\n                // exist then we resolve with a doc.exists set to false. If\n                // we're offline however, we reject the Promise in this\n                // case. Two options: 1) Cache the negative response from\n                // the server so we can deliver that even when you're\n                // offline 2) Actually reject the Promise in the online case\n                // if the document doesn't exist.\n                i.reject(new U(q.UNAVAILABLE, \"Failed to get document because the client is offline.\")) : u && r.fromCache && s && \"server\" === s.source ? i.reject(new U(q.UNAVAILABLE, 'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to \"server\" to retrieve the cached document.)')) : i.resolve(r);\n            },\n            error: t => i.reject(t)\n        }), o = new Nc(Gn(n.path), r, {\n            includeMetadataChanges: !0,\n            Ku: !0\n        });\n        return Vc(t, o);\n    }(await Ka(t), t.asyncQueue, e, n, s))), s.promise;\n}\n\nfunction Wa(t, e) {\n    const n = new K;\n    return t.asyncQueue.enqueueAndForget((async () => async function(t, e, n) {\n        try {\n            const s = await fu(t, e, \n            /* usePreviousResults= */ !0), i = new Lc(e, s.ir), r = i.sc(s.documents), o = i.applyChanges(r, \n            /* updateLimboDocuments= */ !1);\n            n.resolve(o.snapshot);\n        } catch (t) {\n            const s = Ec(t, `Failed to execute query '${e} against cache`);\n            n.reject(s);\n        }\n    }\n    /**\n * Retrieves a latency-compensated query snapshot from the backend via a\n * SnapshotListener.\n */ (await Ba(t), e, n))), n.promise;\n}\n\nfunction Ha(t, e, n = {}) {\n    const s = new K;\n    return t.asyncQueue.enqueueAndForget((async () => function(t, e, n, s, i) {\n        const r = new Va({\n            next: n => {\n                // Remove query first before passing event to user to avoid\n                // user actions affecting the now stale query.\n                e.enqueueAndForget((() => Sc(t, o))), n.fromCache && \"server\" === s.source ? i.reject(new U(q.UNAVAILABLE, 'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to \"server\" to retrieve the cached documents.)')) : i.resolve(n);\n            },\n            error: t => i.reject(t)\n        }), o = new Nc(n, r, {\n            includeMetadataChanges: !0,\n            Ku: !0\n        });\n        return Vc(t, o);\n    }(await Ka(t), t.asyncQueue, e, n, s))), s.promise;\n}\n\nfunction Ja(t, e) {\n    const n = new Va(e);\n    return t.asyncQueue.enqueueAndForget((async () => function(t, e) {\n        L(t).ku.add(e), \n        // Immediately fire an initial event, indicating all existing listeners\n        // are in-sync.\n        e.next();\n    }(await Ka(t), n))), () => {\n        n.Dc(), t.asyncQueue.enqueueAndForget((async () => function(t, e) {\n            L(t).ku.delete(e);\n        }(await Ka(t), n)));\n    };\n}\n\n/**\n * Takes an updateFunction in which a set of reads and writes can be performed\n * atomically. In the updateFunction, the client can read and write values\n * using the supplied transaction object. After the updateFunction, all\n * changes will be committed. If a retryable error occurs (ex: some other\n * client has changed any of the data referenced), then the updateFunction\n * will be called again after a backoff. If the updateFunction still fails\n * after all retries, then the transaction will be rejected.\n *\n * The transaction object passed to the updateFunction contains methods for\n * accessing documents and collections. Unlike other datastore access, data\n * accessed with the transaction will not reflect local changes that have not\n * been committed. For this reason, it is required that all reads are\n * performed before any writes. Transactions must be performed while online.\n */ function Ya(t, e, n, s) {\n    const i = function(t, e) {\n        let n;\n        n = \"string\" == typeof t ? hi().encode(t) : t;\n        return function(t, e) {\n            return new Sa(t, e);\n        }(function(t, e) {\n            if (t instanceof Uint8Array) return ba(t, e);\n            if (t instanceof ArrayBuffer) return ba(new Uint8Array(t), e);\n            if (t instanceof ReadableStream) return t.getReader();\n            throw new Error(\"Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream\");\n        }(n), e);\n    }(n, Fu(e));\n    t.asyncQueue.enqueueAndForget((async () => {\n        Ta(await qa(t), i, s);\n    }));\n}\n\nfunction Xa(t, e) {\n    return t.asyncQueue.enqueue((async () => function(t, e) {\n        const n = L(t);\n        return n.persistence.runTransaction(\"Get named query\", \"readonly\", (t => n.qs.getNamedQuery(t, e)));\n    }(await Ba(t), e)));\n}\n\nfunction Za(t, e) {\n    return t.asyncQueue.enqueue((async () => async function(t, e) {\n        const n = L(t), s = n.indexManager, i = [];\n        return n.persistence.runTransaction(\"Configure indexes\", \"readwrite\", (t => s.getFieldIndexes(t).next((n => \n        /**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n        /**\n * Compares two array for equality using comparator. The method computes the\n * intersection and invokes `onAdd` for every element that is in `after` but not\n * `before`. `onRemove` is invoked for every element in `before` but missing\n * from `after`.\n *\n * The method creates a copy of both `before` and `after` and runs in O(n log\n * n), where n is the size of the two lists.\n *\n * @param before - The elements that exist in the original array.\n * @param after - The elements to diff against the original array.\n * @param comparator - The comparator for the elements in before and after.\n * @param onAdd - A function to invoke for every element that is part of `\n * after` but not `before`.\n * @param onRemove - A function to invoke for every element that is part of\n * `before` but not `after`.\n */\n        function(t, e, n, s, i) {\n            t = [ ...t ], e = [ ...e ], t.sort(n), e.sort(n);\n            const r = t.length, o = e.length;\n            let u = 0, c = 0;\n            for (;u < o && c < r; ) {\n                const r = n(t[c], e[u]);\n                r < 0 ? \n                // The element was removed if the next element in our ordered\n                // walkthrough is only in `before`.\n                i(t[c++]) : r > 0 ? \n                // The element was added if the next element in our ordered walkthrough\n                // is only in `after`.\n                s(e[u++]) : (u++, c++);\n            }\n            for (;u < o; ) s(e[u++]);\n            for (;c < r; ) i(t[c++]);\n        }(n, e, wt, (e => {\n            i.push(s.addFieldIndex(t, e));\n        }), (e => {\n            i.push(s.deleteFieldIndex(t, e));\n        })))).next((() => Rt.waitFor(i)))));\n    }\n    /**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n    // The format of the LocalStorage key that stores the client state is:\n    //     firestore_clients_<persistence_prefix>_<instance_key>\n    (await Ba(t), e)));\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Compares two `ExperimentalLongPollingOptions` objects for equality.\n */\n/**\n * Creates and returns a new `ExperimentalLongPollingOptions` with the same\n * option values as the given instance.\n */\nfunction th(t) {\n    const e = {};\n    return void 0 !== t.timeoutSeconds && (e.timeoutSeconds = t.timeoutSeconds), e;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const eh = new Map;\n\n/**\n * An instance map that ensures only one Datastore exists per Firestore\n * instance.\n */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction nh(t, e, n) {\n    if (!n) throw new U(q.INVALID_ARGUMENT, `Function ${t}() cannot be called with an empty ${e}.`);\n}\n\n/**\n * Validates that two boolean options are not set at the same time.\n * @internal\n */ function sh(t, e, n, s) {\n    if (!0 === e && !0 === s) throw new U(q.INVALID_ARGUMENT, `${t} and ${n} cannot be used together.`);\n}\n\n/**\n * Validates that `path` refers to a document (indicated by the fact it contains\n * an even numbers of segments).\n */ function ih(t) {\n    if (!ht.isDocumentKey(t)) throw new U(q.INVALID_ARGUMENT, `Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`);\n}\n\n/**\n * Validates that `path` refers to a collection (indicated by the fact it\n * contains an odd numbers of segments).\n */ function rh(t) {\n    if (ht.isDocumentKey(t)) throw new U(q.INVALID_ARGUMENT, `Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`);\n}\n\n/**\n * Returns true if it's a non-null object without a custom prototype\n * (i.e. excludes Array, Date, etc.).\n */\n/** Returns a string describing the type / value of the provided input. */\nfunction oh(t) {\n    if (void 0 === t) return \"undefined\";\n    if (null === t) return \"null\";\n    if (\"string\" == typeof t) return t.length > 20 && (t = `${t.substring(0, 20)}...`), \n    JSON.stringify(t);\n    if (\"number\" == typeof t || \"boolean\" == typeof t) return \"\" + t;\n    if (\"object\" == typeof t) {\n        if (t instanceof Array) return \"an array\";\n        {\n            const e = \n            /** try to get the constructor name for an object. */\n            function(t) {\n                if (t.constructor) return t.constructor.name;\n                return null;\n            }\n            /**\n * Casts `obj` to `T`, optionally unwrapping Compat types to expose the\n * underlying instance. Throws if  `obj` is not an instance of `T`.\n *\n * This cast is used in the Lite and Full SDK to verify instance types for\n * arguments passed to the public API.\n * @internal\n */ (t);\n            return e ? `a custom ${e} object` : \"an object\";\n        }\n    }\n    return \"function\" == typeof t ? \"a function\" : O();\n}\n\nfunction uh(t, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ne) {\n    if (\"_delegate\" in t && (\n    // Unwrap Compat types\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    t = t._delegate), !(t instanceof e)) {\n        if (e.name === t.constructor.name) throw new U(q.INVALID_ARGUMENT, \"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?\");\n        {\n            const n = oh(t);\n            throw new U(q.INVALID_ARGUMENT, `Expected type '${e.name}', but it was: ${n}`);\n        }\n    }\n    return t;\n}\n\nfunction ch(t, e) {\n    if (e <= 0) throw new U(q.INVALID_ARGUMENT, `Function ${t}() requires a positive number, but it was: ${e}.`);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// settings() defaults:\n/**\n * A concrete type describing all the values that can be applied via a\n * user-supplied `FirestoreSettings` object. This is a separate type so that\n * defaults can be supplied and the value can be checked for equality.\n */\nclass ah {\n    constructor(t) {\n        var e, n;\n        if (void 0 === t.host) {\n            if (void 0 !== t.ssl) throw new U(q.INVALID_ARGUMENT, \"Can't provide ssl option if host option is not set\");\n            this.host = \"firestore.googleapis.com\", this.ssl = true;\n        } else this.host = t.host, this.ssl = null === (e = t.ssl) || void 0 === e || e;\n        if (this.credentials = t.credentials, this.ignoreUndefinedProperties = !!t.ignoreUndefinedProperties, \n        this.cache = t.localCache, void 0 === t.cacheSizeBytes) this.cacheSizeBytes = 41943040; else {\n            if (-1 !== t.cacheSizeBytes && t.cacheSizeBytes < 1048576) throw new U(q.INVALID_ARGUMENT, \"cacheSizeBytes must be at least 1048576\");\n            this.cacheSizeBytes = t.cacheSizeBytes;\n        }\n        sh(\"experimentalForceLongPolling\", t.experimentalForceLongPolling, \"experimentalAutoDetectLongPolling\", t.experimentalAutoDetectLongPolling), \n        this.experimentalForceLongPolling = !!t.experimentalForceLongPolling, this.experimentalForceLongPolling ? this.experimentalAutoDetectLongPolling = !1 : void 0 === t.experimentalAutoDetectLongPolling ? this.experimentalAutoDetectLongPolling = true : \n        // For backwards compatibility, coerce the value to boolean even though\n        // the TypeScript compiler has narrowed the type to boolean already.\n        // noinspection PointlessBooleanExpressionJS\n        this.experimentalAutoDetectLongPolling = !!t.experimentalAutoDetectLongPolling, \n        this.experimentalLongPollingOptions = th(null !== (n = t.experimentalLongPollingOptions) && void 0 !== n ? n : {}), \n        function(t) {\n            if (void 0 !== t.timeoutSeconds) {\n                if (isNaN(t.timeoutSeconds)) throw new U(q.INVALID_ARGUMENT, `invalid long polling timeout: ${t.timeoutSeconds} (must not be NaN)`);\n                if (t.timeoutSeconds < 5) throw new U(q.INVALID_ARGUMENT, `invalid long polling timeout: ${t.timeoutSeconds} (minimum allowed value is 5)`);\n                if (t.timeoutSeconds > 30) throw new U(q.INVALID_ARGUMENT, `invalid long polling timeout: ${t.timeoutSeconds} (maximum allowed value is 30)`);\n            }\n        }\n        /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n        /**\n * The Cloud Firestore service interface.\n *\n * Do not call this constructor directly. Instead, use {@link (getFirestore:1)}.\n */ (this.experimentalLongPollingOptions), this.useFetchStreams = !!t.useFetchStreams;\n    }\n    isEqual(t) {\n        return this.host === t.host && this.ssl === t.ssl && this.credentials === t.credentials && this.cacheSizeBytes === t.cacheSizeBytes && this.experimentalForceLongPolling === t.experimentalForceLongPolling && this.experimentalAutoDetectLongPolling === t.experimentalAutoDetectLongPolling && (e = this.experimentalLongPollingOptions, \n        n = t.experimentalLongPollingOptions, e.timeoutSeconds === n.timeoutSeconds) && this.ignoreUndefinedProperties === t.ignoreUndefinedProperties && this.useFetchStreams === t.useFetchStreams;\n        var e, n;\n    }\n}\n\nclass hh {\n    /** @hideconstructor */\n    constructor(t, e, n, s) {\n        this._authCredentials = t, this._appCheckCredentials = e, this._databaseId = n, \n        this._app = s, \n        /**\n         * Whether it's a Firestore or Firestore Lite instance.\n         */\n        this.type = \"firestore-lite\", this._persistenceKey = \"(lite)\", this._settings = new ah({}), \n        this._settingsFrozen = !1;\n    }\n    /**\n     * The {@link @firebase/app#FirebaseApp} associated with this `Firestore` service\n     * instance.\n     */    get app() {\n        if (!this._app) throw new U(q.FAILED_PRECONDITION, \"Firestore was not initialized using the Firebase SDK. 'app' is not available\");\n        return this._app;\n    }\n    get _initialized() {\n        return this._settingsFrozen;\n    }\n    get _terminated() {\n        return void 0 !== this._terminateTask;\n    }\n    _setSettings(t) {\n        if (this._settingsFrozen) throw new U(q.FAILED_PRECONDITION, \"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.\");\n        this._settings = new ah(t), void 0 !== t.credentials && (this._authCredentials = function(t) {\n            if (!t) return new Q;\n            switch (t.type) {\n              case \"firstParty\":\n                return new H(t.sessionIndex || \"0\", t.iamToken || null, t.authTokenFactory || null);\n\n              case \"provider\":\n                return t.client;\n\n              default:\n                throw new U(q.INVALID_ARGUMENT, \"makeAuthCredentialsProvider failed due to invalid credential type\");\n            }\n        }(t.credentials));\n    }\n    _getSettings() {\n        return this._settings;\n    }\n    _freezeSettings() {\n        return this._settingsFrozen = !0, this._settings;\n    }\n    _delete() {\n        return this._terminateTask || (this._terminateTask = this._terminate()), this._terminateTask;\n    }\n    /** Returns a JSON-serializable representation of this `Firestore` instance. */    toJSON() {\n        return {\n            app: this._app,\n            databaseId: this._databaseId,\n            settings: this._settings\n        };\n    }\n    /**\n     * Terminates all components used by this client. Subclasses can override\n     * this method to clean up their own dependencies, but must also call this\n     * method.\n     *\n     * Only ever called once.\n     */    _terminate() {\n        /**\n * Removes all components associated with the provided instance. Must be called\n * when the `Firestore` instance is terminated.\n */\n        return function(t) {\n            const e = eh.get(t);\n            e && (N(\"ComponentProvider\", \"Removing Datastore\"), eh.delete(t), e.terminate());\n        }(this), Promise.resolve();\n    }\n}\n\n/**\n * Modify this instance to communicate with the Cloud Firestore emulator.\n *\n * Note: This must be called before this instance has been used to do any\n * operations.\n *\n * @param firestore - The `Firestore` instance to configure to connect to the\n * emulator.\n * @param host - the emulator host (ex: localhost).\n * @param port - the emulator port (ex: 9000).\n * @param options.mockUserToken - the mock auth token to use for unit testing\n * Security Rules.\n */ function lh(t, e, n, s = {}) {\n    var i;\n    const r = (t = uh(t, hh))._getSettings(), o = `${e}:${n}`;\n    if (\"firestore.googleapis.com\" !== r.host && r.host !== o && M(\"Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.\"), \n    t._setSettings(Object.assign(Object.assign({}, r), {\n        host: o,\n        ssl: !1\n    })), s.mockUserToken) {\n        let e, n;\n        if (\"string\" == typeof s.mockUserToken) e = s.mockUserToken, n = V.MOCK_USER; else {\n            // Let createMockUserToken validate first (catches common mistakes like\n            // invalid field \"uid\" and missing field \"sub\" / \"user_id\".)\n            e = createMockUserToken(s.mockUserToken, null === (i = t._app) || void 0 === i ? void 0 : i.options.projectId);\n            const r = s.mockUserToken.sub || s.mockUserToken.user_id;\n            if (!r) throw new U(q.INVALID_ARGUMENT, \"mockUserToken must contain 'sub' or 'user_id' field!\");\n            n = new V(r);\n        }\n        t._authCredentials = new j(new G(e, n));\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A `DocumentReference` refers to a document location in a Firestore database\n * and can be used to write, read, or listen to the location. The document at\n * the referenced location may or may not exist.\n */ class fh {\n    /** @hideconstructor */\n    constructor(t, \n    /**\n     * If provided, the `FirestoreDataConverter` associated with this instance.\n     */\n    e, n) {\n        this.converter = e, this._key = n, \n        /** The type of this Firestore reference. */\n        this.type = \"document\", this.firestore = t;\n    }\n    get _path() {\n        return this._key.path;\n    }\n    /**\n     * The document's identifier within its collection.\n     */    get id() {\n        return this._key.path.lastSegment();\n    }\n    /**\n     * A string representing the path of the referenced document (relative\n     * to the root of the database).\n     */    get path() {\n        return this._key.path.canonicalString();\n    }\n    /**\n     * The collection this `DocumentReference` belongs to.\n     */    get parent() {\n        return new wh(this.firestore, this.converter, this._key.path.popLast());\n    }\n    withConverter(t) {\n        return new fh(this.firestore, t, this._key);\n    }\n}\n\n/**\n * A `Query` refers to a query which you can read or listen to. You can also\n * construct refined `Query` objects by adding filters and ordering.\n */ class dh {\n    // This is the lite version of the Query class in the main SDK.\n    /** @hideconstructor protected */\n    constructor(t, \n    /**\n     * If provided, the `FirestoreDataConverter` associated with this instance.\n     */\n    e, n) {\n        this.converter = e, this._query = n, \n        /** The type of this Firestore reference. */\n        this.type = \"query\", this.firestore = t;\n    }\n    withConverter(t) {\n        return new dh(this.firestore, t, this._query);\n    }\n}\n\n/**\n * A `CollectionReference` object can be used for adding documents, getting\n * document references, and querying for documents (using {@link (query:1)}).\n */ class wh extends dh {\n    /** @hideconstructor */\n    constructor(t, e, n) {\n        super(t, e, Gn(n)), this._path = n, \n        /** The type of this Firestore reference. */\n        this.type = \"collection\";\n    }\n    /** The collection's identifier. */    get id() {\n        return this._query.path.lastSegment();\n    }\n    /**\n     * A string representing the path of the referenced collection (relative\n     * to the root of the database).\n     */    get path() {\n        return this._query.path.canonicalString();\n    }\n    /**\n     * A reference to the containing `DocumentReference` if this is a\n     * subcollection. If this isn't a subcollection, the reference is null.\n     */    get parent() {\n        const t = this._path.popLast();\n        return t.isEmpty() ? null : new fh(this.firestore, \n        /* converter= */ null, new ht(t));\n    }\n    withConverter(t) {\n        return new wh(this.firestore, t, this._path);\n    }\n}\n\nfunction _h(t, e, ...n) {\n    if (t = getModularInstance(t), nh(\"collection\", \"path\", e), t instanceof hh) {\n        const s = ut.fromString(e, ...n);\n        return rh(s), new wh(t, /* converter= */ null, s);\n    }\n    {\n        if (!(t instanceof fh || t instanceof wh)) throw new U(q.INVALID_ARGUMENT, \"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore\");\n        const s = t._path.child(ut.fromString(e, ...n));\n        return rh(s), new wh(t.firestore, \n        /* converter= */ null, s);\n    }\n}\n\n// TODO(firestorelite): Consider using ErrorFactory -\n// https://github.com/firebase/firebase-js-sdk/blob/0131e1f/packages/util/src/errors.ts#L106\n/**\n * Creates and returns a new `Query` instance that includes all documents in the\n * database that are contained in a collection or subcollection with the\n * given `collectionId`.\n *\n * @param firestore - A reference to the root `Firestore` instance.\n * @param collectionId - Identifies the collections to query over. Every\n * collection or subcollection with this ID as the last segment of its path\n * will be included. Cannot contain a slash.\n * @returns The created `Query`.\n */ function mh(t, e) {\n    if (t = uh(t, hh), nh(\"collectionGroup\", \"collection id\", e), e.indexOf(\"/\") >= 0) throw new U(q.INVALID_ARGUMENT, `Invalid collection ID '${e}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);\n    return new dh(t, \n    /* converter= */ null, function(t) {\n        return new Un(ut.emptyPath(), t);\n    }(e));\n}\n\nfunction gh(t, e, ...n) {\n    if (t = getModularInstance(t), \n    // We allow omission of 'pathString' but explicitly prohibit passing in both\n    // 'undefined' and 'null'.\n    1 === arguments.length && (e = tt.A()), nh(\"doc\", \"path\", e), t instanceof hh) {\n        const s = ut.fromString(e, ...n);\n        return ih(s), new fh(t, \n        /* converter= */ null, new ht(s));\n    }\n    {\n        if (!(t instanceof fh || t instanceof wh)) throw new U(q.INVALID_ARGUMENT, \"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore\");\n        const s = t._path.child(ut.fromString(e, ...n));\n        return ih(s), new fh(t.firestore, t instanceof wh ? t.converter : null, new ht(s));\n    }\n}\n\n/**\n * Returns true if the provided references are equal.\n *\n * @param left - A reference to compare.\n * @param right - A reference to compare.\n * @returns true if the references point to the same location in the same\n * Firestore database.\n */ function yh(t, e) {\n    return t = getModularInstance(t), e = getModularInstance(e), (t instanceof fh || t instanceof wh) && (e instanceof fh || e instanceof wh) && (t.firestore === e.firestore && t.path === e.path && t.converter === e.converter);\n}\n\n/**\n * Returns true if the provided queries point to the same collection and apply\n * the same constraints.\n *\n * @param left - A `Query` to compare.\n * @param right - A `Query` to compare.\n * @returns true if the references point to the same location in the same\n * Firestore database.\n */ function ph(t, e) {\n    return t = getModularInstance(t), e = getModularInstance(e), t instanceof dh && e instanceof dh && (t.firestore === e.firestore && Zn(t._query, e._query) && t.converter === e.converter);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ class Ih {\n    constructor() {\n        // The last promise in the queue.\n        this.Gc = Promise.resolve(), \n        // A list of retryable operations. Retryable operations are run in order and\n        // retried with backoff.\n        this.Qc = [], \n        // Is this AsyncQueue being shut down? Once it is set to true, it will not\n        // be changed again.\n        this.jc = !1, \n        // Operations scheduled to be queued in the future. Operations are\n        // automatically removed after they are run or canceled.\n        this.zc = [], \n        // visible for testing\n        this.Wc = null, \n        // Flag set while there's an outstanding AsyncQueue operation, used for\n        // assertion sanity-checks.\n        this.Hc = !1, \n        // Enabled during shutdown on Safari to prevent future access to IndexedDB.\n        this.Jc = !1, \n        // List of TimerIds to fast-forward delays for.\n        this.Yc = [], \n        // Backoff timer used to schedule retries for retryable operations\n        this.qo = new Bu(this, \"async_queue_retry\" /* TimerId.AsyncQueueRetry */), \n        // Visibility handler that triggers an immediate retry of all retryable\n        // operations. Meant to speed up recovery when we regain file system access\n        // after page comes into foreground.\n        this.Xc = () => {\n            const t = Ou();\n            t && N(\"AsyncQueue\", \"Visibility state changed to \" + t.visibilityState), this.qo.Mo();\n        };\n        const t = Ou();\n        t && \"function\" == typeof t.addEventListener && t.addEventListener(\"visibilitychange\", this.Xc);\n    }\n    get isShuttingDown() {\n        return this.jc;\n    }\n    /**\n     * Adds a new operation to the queue without waiting for it to complete (i.e.\n     * we ignore the Promise result).\n     */    enqueueAndForget(t) {\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.enqueue(t);\n    }\n    enqueueAndForgetEvenWhileRestricted(t) {\n        this.Zc(), \n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.ta(t);\n    }\n    enterRestrictedMode(t) {\n        if (!this.jc) {\n            this.jc = !0, this.Jc = t || !1;\n            const e = Ou();\n            e && \"function\" == typeof e.removeEventListener && e.removeEventListener(\"visibilitychange\", this.Xc);\n        }\n    }\n    enqueue(t) {\n        if (this.Zc(), this.jc) \n        // Return a Promise which never resolves.\n        return new Promise((() => {}));\n        // Create a deferred Promise that we can return to the callee. This\n        // allows us to return a \"hanging Promise\" only to the callee and still\n        // advance the queue even when the operation is not run.\n                const e = new K;\n        return this.ta((() => this.jc && this.Jc ? Promise.resolve() : (t().then(e.resolve, e.reject), \n        e.promise))).then((() => e.promise));\n    }\n    enqueueRetryable(t) {\n        this.enqueueAndForget((() => (this.Qc.push(t), this.ea())));\n    }\n    /**\n     * Runs the next operation from the retryable queue. If the operation fails,\n     * reschedules with backoff.\n     */    async ea() {\n        if (0 !== this.Qc.length) {\n            try {\n                await this.Qc[0](), this.Qc.shift(), this.qo.reset();\n            } catch (t) {\n                if (!Dt(t)) throw t;\n // Failure will be handled by AsyncQueue\n                                N(\"AsyncQueue\", \"Operation failed with retryable error: \" + t);\n            }\n            this.Qc.length > 0 && \n            // If there are additional operations, we re-schedule `retryNextOp()`.\n            // This is necessary to run retryable operations that failed during\n            // their initial attempt since we don't know whether they are already\n            // enqueued. If, for example, `op1`, `op2`, `op3` are enqueued and `op1`\n            // needs to  be re-run, we will run `op1`, `op1`, `op2` using the\n            // already enqueued calls to `retryNextOp()`. `op3()` will then run in the\n            // call scheduled here.\n            // Since `backoffAndRun()` cancels an existing backoff and schedules a\n            // new backoff on every call, there is only ever a single additional\n            // operation in the queue.\n            this.qo.No((() => this.ea()));\n        }\n    }\n    ta(t) {\n        const e = this.Gc.then((() => (this.Hc = !0, t().catch((t => {\n            this.Wc = t, this.Hc = !1;\n            const e = \n            /**\n * Chrome includes Error.message in Error.stack. Other browsers do not.\n * This returns expected output of message + stack when available.\n * @param error - Error or FirestoreError\n */\n            function(t) {\n                let e = t.message || \"\";\n                t.stack && (e = t.stack.includes(t.message) ? t.stack : t.message + \"\\n\" + t.stack);\n                return e;\n            }\n            /**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ (t);\n            // Re-throw the error so that this.tail becomes a rejected Promise and\n            // all further attempts to chain (via .then) will just short-circuit\n            // and return the rejected Promise.\n            throw k(\"INTERNAL UNHANDLED ERROR: \", e), t;\n        })).then((t => (this.Hc = !1, t))))));\n        return this.Gc = e, e;\n    }\n    enqueueAfterDelay(t, e, n) {\n        this.Zc(), \n        // Fast-forward delays for timerIds that have been overriden.\n        this.Yc.indexOf(t) > -1 && (e = 0);\n        const s = Tc.createAndSchedule(this, t, e, n, (t => this.na(t)));\n        return this.zc.push(s), s;\n    }\n    Zc() {\n        this.Wc && O();\n    }\n    verifyOperationInProgress() {}\n    /**\n     * Waits until all currently queued tasks are finished executing. Delayed\n     * operations are not run.\n     */    async sa() {\n        // Operations in the queue prior to draining may have enqueued additional\n        // operations. Keep draining the queue until the tail is no longer advanced,\n        // which indicates that no more new operations were enqueued and that all\n        // operations were executed.\n        let t;\n        do {\n            t = this.Gc, await t;\n        } while (t !== this.Gc);\n    }\n    /**\n     * For Tests: Determine if a delayed operation with a particular TimerId\n     * exists.\n     */    ia(t) {\n        for (const e of this.zc) if (e.timerId === t) return !0;\n        return !1;\n    }\n    /**\n     * For Tests: Runs some or all delayed operations early.\n     *\n     * @param lastTimerId - Delayed operations up to and including this TimerId\n     * will be drained. Pass TimerId.All to run all delayed operations.\n     * @returns a Promise that resolves once all operations have been run.\n     */    ra(t) {\n        // Note that draining may generate more delayed ops, so we do that first.\n        return this.sa().then((() => {\n            // Run ops in the same order they'd run if they ran naturally.\n            this.zc.sort(((t, e) => t.targetTimeMs - e.targetTimeMs));\n            for (const e of this.zc) if (e.skipDelay(), \"all\" /* TimerId.All */ !== t && e.timerId === t) break;\n            return this.sa();\n        }));\n    }\n    /**\n     * For Tests: Skip all subsequent delays for a timer id.\n     */    oa(t) {\n        this.Yc.push(t);\n    }\n    /** Called once a DelayedOperation is run or canceled. */    na(t) {\n        // NOTE: indexOf / slice are O(n), but delayedOperations is expected to be small.\n        const e = this.zc.indexOf(t);\n        this.zc.splice(e, 1);\n    }\n}\n\nfunction Th(t) {\n    /**\n * Returns true if obj is an object and contains at least one of the specified\n * methods.\n */\n    return function(t, e) {\n        if (\"object\" != typeof t || null === t) return !1;\n        const n = t;\n        for (const t of e) if (t in n && \"function\" == typeof n[t]) return !0;\n        return !1;\n    }\n    /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n    /**\n * Represents the task of loading a Firestore bundle. It provides progress of bundle\n * loading, as well as task completion and error events.\n *\n * The API is compatible with `Promise<LoadBundleTaskProgress>`.\n */ (t, [ \"next\", \"error\", \"complete\" ]);\n}\n\nclass Eh {\n    constructor() {\n        this._progressObserver = {}, this._taskCompletionResolver = new K, this._lastProgress = {\n            taskState: \"Running\",\n            totalBytes: 0,\n            totalDocuments: 0,\n            bytesLoaded: 0,\n            documentsLoaded: 0\n        };\n    }\n    /**\n     * Registers functions to listen to bundle loading progress events.\n     * @param next - Called when there is a progress update from bundle loading. Typically `next` calls occur\n     *   each time a Firestore document is loaded from the bundle.\n     * @param error - Called when an error occurs during bundle loading. The task aborts after reporting the\n     *   error, and there should be no more updates after this.\n     * @param complete - Called when the loading task is complete.\n     */    onProgress(t, e, n) {\n        this._progressObserver = {\n            next: t,\n            error: e,\n            complete: n\n        };\n    }\n    /**\n     * Implements the `Promise<LoadBundleTaskProgress>.catch` interface.\n     *\n     * @param onRejected - Called when an error occurs during bundle loading.\n     */    catch(t) {\n        return this._taskCompletionResolver.promise.catch(t);\n    }\n    /**\n     * Implements the `Promise<LoadBundleTaskProgress>.then` interface.\n     *\n     * @param onFulfilled - Called on the completion of the loading task with a final `LoadBundleTaskProgress` update.\n     *   The update will always have its `taskState` set to `\"Success\"`.\n     * @param onRejected - Called when an error occurs during bundle loading.\n     */    then(t, e) {\n        return this._taskCompletionResolver.promise.then(t, e);\n    }\n    /**\n     * Notifies all observers that bundle loading has completed, with a provided\n     * `LoadBundleTaskProgress` object.\n     *\n     * @private\n     */    _completeWith(t) {\n        this._updateProgress(t), this._progressObserver.complete && this._progressObserver.complete(), \n        this._taskCompletionResolver.resolve(t);\n    }\n    /**\n     * Notifies all observers that bundle loading has failed, with a provided\n     * `Error` as the reason.\n     *\n     * @private\n     */    _failWith(t) {\n        this._lastProgress.taskState = \"Error\", this._progressObserver.next && this._progressObserver.next(this._lastProgress), \n        this._progressObserver.error && this._progressObserver.error(t), this._taskCompletionResolver.reject(t);\n    }\n    /**\n     * Notifies a progress update of loading a bundle.\n     * @param progress - The new progress.\n     *\n     * @private\n     */    _updateProgress(t) {\n        this._lastProgress = t, this._progressObserver.next && this._progressObserver.next(t);\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Constant used to indicate the LRU garbage collection should be disabled.\n * Set this value as the `cacheSizeBytes` on the settings passed to the\n * {@link Firestore} instance.\n */ const Ah = -1;\n\n/**\n * The Cloud Firestore service interface.\n *\n * Do not call this constructor directly. Instead, use {@link (getFirestore:1)}.\n */ class vh extends hh {\n    /** @hideconstructor */\n    constructor(t, e, n, s) {\n        super(t, e, n, s), \n        /**\n         * Whether it's a {@link Firestore} or Firestore Lite instance.\n         */\n        this.type = \"firestore\", this._queue = new Ih, this._persistenceKey = (null == s ? void 0 : s.name) || \"[DEFAULT]\";\n    }\n    _terminate() {\n        return this._firestoreClient || \n        // The client must be initialized to ensure that all subsequent API\n        // usage throws an exception.\n        Vh(this), this._firestoreClient.terminate();\n    }\n}\n\n/**\n * Initializes a new instance of {@link Firestore} with the provided settings.\n * Can only be called before any other function, including\n * {@link (getFirestore:1)}. If the custom settings are empty, this function is\n * equivalent to calling {@link (getFirestore:1)}.\n *\n * @param app - The {@link @firebase/app#FirebaseApp} with which the {@link Firestore} instance will\n * be associated.\n * @param settings - A settings object to configure the {@link Firestore} instance.\n * @param databaseId - The name of the database.\n * @returns A newly initialized {@link Firestore} instance.\n */ function Rh(t, e, n) {\n    n || (n = \"(default)\");\n    const s = _getProvider(t, \"firestore\");\n    if (s.isInitialized(n)) {\n        const t = s.getImmediate({\n            identifier: n\n        }), i = s.getOptions(n);\n        if (deepEqual(i, e)) return t;\n        throw new U(q.FAILED_PRECONDITION, \"initializeFirestore() has already been called with different options. To avoid this error, call initializeFirestore() with the same options as when it was originally called, or call getFirestore() to return the already initialized instance.\");\n    }\n    if (void 0 !== e.cacheSizeBytes && void 0 !== e.localCache) throw new U(q.INVALID_ARGUMENT, \"cache and cacheSizeBytes cannot be specified at the same time as cacheSizeBytes willbe deprecated. Instead, specify the cache size in the cache object\");\n    if (void 0 !== e.cacheSizeBytes && -1 !== e.cacheSizeBytes && e.cacheSizeBytes < 1048576) throw new U(q.INVALID_ARGUMENT, \"cacheSizeBytes must be at least 1048576\");\n    return s.initialize({\n        options: e,\n        instanceIdentifier: n\n    });\n}\n\nfunction Ph(e, n) {\n    const s = \"object\" == typeof e ? e : getApp(), i = \"string\" == typeof e ? e : n || \"(default)\", r = _getProvider(s, \"firestore\").getImmediate({\n        identifier: i\n    });\n    if (!r._initialized) {\n        const t = getDefaultEmulatorHostnameAndPort(\"firestore\");\n        t && lh(r, ...t);\n    }\n    return r;\n}\n\n/**\n * @internal\n */ function bh(t) {\n    return t._firestoreClient || Vh(t), t._firestoreClient.verifyNotTerminated(), t._firestoreClient;\n}\n\nfunction Vh(t) {\n    var e, n, s;\n    const i = t._freezeSettings(), r = function(t, e, n, s) {\n        return new $e(t, e, n, s.host, s.ssl, s.experimentalForceLongPolling, s.experimentalAutoDetectLongPolling, th(s.experimentalLongPollingOptions), s.useFetchStreams);\n    }(t._databaseId, (null === (e = t._app) || void 0 === e ? void 0 : e.options.appId) || \"\", t._persistenceKey, i);\n    t._firestoreClient = new xa(t._authCredentials, t._appCheckCredentials, t._queue, r), \n    (null === (n = i.cache) || void 0 === n ? void 0 : n._offlineComponentProvider) && (null === (s = i.cache) || void 0 === s ? void 0 : s._onlineComponentProvider) && (t._firestoreClient._uninitializedComponentsProvider = {\n        _offlineKind: i.cache.kind,\n        _offline: i.cache._offlineComponentProvider,\n        _online: i.cache._onlineComponentProvider\n    });\n}\n\n/**\n * Attempts to enable persistent storage, if possible.\n *\n * Must be called before any other functions (other than\n * {@link initializeFirestore}, {@link (getFirestore:1)} or\n * {@link clearIndexedDbPersistence}.\n *\n * If this fails, `enableIndexedDbPersistence()` will reject the promise it\n * returns. Note that even after this failure, the {@link Firestore} instance will\n * remain usable, however offline persistence will be disabled.\n *\n * There are several reasons why this can fail, which can be identified by\n * the `code` on the error.\n *\n *   * failed-precondition: The app is already open in another browser tab.\n *   * unimplemented: The browser is incompatible with the offline\n *     persistence implementation.\n *\n * Persistence cannot be used in a Node.js environment.\n *\n * @param firestore - The {@link Firestore} instance to enable persistence for.\n * @param persistenceSettings - Optional settings object to configure\n * persistence.\n * @returns A `Promise` that represents successfully enabling persistent storage.\n * @deprecated This function will be removed in a future major release. Instead, set\n * `FirestoreSettings.cache` to an instance of `IndexedDbLocalCache` to\n * turn on IndexedDb cache. Calling this function when `FirestoreSettings.cache`\n * is already specified will throw an exception.\n */ function Sh(t, e) {\n    Bh(t = uh(t, vh));\n    const n = bh(t);\n    if (n._uninitializedComponentsProvider) throw new U(q.FAILED_PRECONDITION, \"SDK cache is already specified.\");\n    M(\"enableIndexedDbPersistence() will be deprecated in the future, you can use `FirestoreSettings.cache` instead.\");\n    const s = t._freezeSettings(), i = new Pa;\n    return Ch(n, i, new va(i, s.cacheSizeBytes, null == e ? void 0 : e.forceOwnership));\n}\n\n/**\n * Attempts to enable multi-tab persistent storage, if possible. If enabled\n * across all tabs, all operations share access to local persistence, including\n * shared execution of queries and latency-compensated local document updates\n * across all connected instances.\n *\n * If this fails, `enableMultiTabIndexedDbPersistence()` will reject the promise\n * it returns. Note that even after this failure, the {@link Firestore} instance will\n * remain usable, however offline persistence will be disabled.\n *\n * There are several reasons why this can fail, which can be identified by\n * the `code` on the error.\n *\n *   * failed-precondition: The app is already open in another browser tab and\n *     multi-tab is not enabled.\n *   * unimplemented: The browser is incompatible with the offline\n *     persistence implementation.\n *\n * @param firestore - The {@link Firestore} instance to enable persistence for.\n * @returns A `Promise` that represents successfully enabling persistent\n * storage.\n * @deprecated This function will be removed in a future major release. Instead, set\n * `FirestoreSettings.cache` to an instance of `IndexedDbLocalCache` to\n * turn on indexeddb cache. Calling this function when `FirestoreSettings.cache`\n * is already specified will throw an exception.\n */ function Dh(t) {\n    Bh(t = uh(t, vh));\n    const e = bh(t);\n    if (e._uninitializedComponentsProvider) throw new U(q.FAILED_PRECONDITION, \"SDK cache is already specified.\");\n    M(\"enableMultiTabIndexedDbPersistence() will be deprecated in the future, you can use `FirestoreSettings.cache` instead.\");\n    const n = t._freezeSettings(), s = new Pa;\n    return Ch(e, s, new Ra(s, n.cacheSizeBytes));\n}\n\n/**\n * Registers both the `OfflineComponentProvider` and `OnlineComponentProvider`.\n * If the operation fails with a recoverable error (see\n * `canRecoverFromIndexedDbError()` below), the returned Promise is rejected\n * but the client remains usable.\n */ function Ch(t, e, n) {\n    const s = new K;\n    return t.asyncQueue.enqueue((async () => {\n        try {\n            await Na(t, n), await ka(t, e), s.resolve();\n        } catch (t) {\n            const e = t;\n            if (!Ma(e)) throw e;\n            M(\"Error enabling indexeddb cache. Falling back to memory cache: \" + e), s.reject(e);\n        }\n    })).then((() => s.promise));\n}\n\n/**\n * Clears the persistent storage. This includes pending writes and cached\n * documents.\n *\n * Must be called while the {@link Firestore} instance is not started (after the app is\n * terminated or when the app is first initialized). On startup, this function\n * must be called before other functions (other than {@link\n * initializeFirestore} or {@link (getFirestore:1)})). If the {@link Firestore}\n * instance is still running, the promise will be rejected with the error code\n * of `failed-precondition`.\n *\n * Note: `clearIndexedDbPersistence()` is primarily intended to help write\n * reliable tests that use Cloud Firestore. It uses an efficient mechanism for\n * dropping existing data but does not attempt to securely overwrite or\n * otherwise make cached data unrecoverable. For applications that are sensitive\n * to the disclosure of cached data in between user sessions, we strongly\n * recommend not enabling persistence at all.\n *\n * @param firestore - The {@link Firestore} instance to clear persistence for.\n * @returns A `Promise` that is resolved when the persistent storage is\n * cleared. Otherwise, the promise is rejected with an error.\n */ function xh(t) {\n    if (t._initialized && !t._terminated) throw new U(q.FAILED_PRECONDITION, \"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.\");\n    const e = new K;\n    return t._queue.enqueueAndForgetEvenWhileRestricted((async () => {\n        try {\n            await async function(t) {\n                if (!bt.D()) return Promise.resolve();\n                const e = t + \"main\";\n                await bt.delete(e);\n            }(Zo(t._databaseId, t._persistenceKey)), e.resolve();\n        } catch (t) {\n            e.reject(t);\n        }\n    })), e.promise;\n}\n\n/**\n * Waits until all currently pending writes for the active user have been\n * acknowledged by the backend.\n *\n * The returned promise resolves immediately if there are no outstanding writes.\n * Otherwise, the promise waits for all previously issued writes (including\n * those written in a previous app session), but it does not wait for writes\n * that were added after the function is called. If you want to wait for\n * additional writes, call `waitForPendingWrites()` again.\n *\n * Any outstanding `waitForPendingWrites()` promises are rejected during user\n * changes.\n *\n * @returns A `Promise` which resolves when all currently pending writes have been\n * acknowledged by the backend.\n */ function Nh(t) {\n    return function(t) {\n        const e = new K;\n        return t.asyncQueue.enqueueAndForget((async () => Zc(await qa(t), e))), e.promise;\n    }(bh(t = uh(t, vh)));\n}\n\n/**\n * Re-enables use of the network for this {@link Firestore} instance after a prior\n * call to {@link disableNetwork}.\n *\n * @returns A `Promise` that is resolved once the network has been enabled.\n */ function kh(t) {\n    return Ga(bh(t = uh(t, vh)));\n}\n\n/**\n * Disables network usage for this instance. It can be re-enabled via {@link\n * enableNetwork}. While the network is disabled, any snapshot listeners,\n * `getDoc()` or `getDocs()` calls will return results from cache, and any write\n * operations will be queued until the network is restored.\n *\n * @returns A `Promise` that is resolved once the network has been disabled.\n */ function Mh(t) {\n    return Qa(bh(t = uh(t, vh)));\n}\n\n/**\n * Terminates the provided {@link Firestore} instance.\n *\n * After calling `terminate()` only the `clearIndexedDbPersistence()` function\n * may be used. Any other function will throw a `FirestoreError`.\n *\n * To restart after termination, create a new instance of FirebaseFirestore with\n * {@link (getFirestore:1)}.\n *\n * Termination does not cancel any pending writes, and any promises that are\n * awaiting a response from the server will not be resolved. If you have\n * persistence enabled, the next time you start this instance, it will resume\n * sending these writes to the server.\n *\n * Note: Under normal circumstances, calling `terminate()` is not required. This\n * function is useful only when you want to force this instance to release all\n * of its resources or in combination with `clearIndexedDbPersistence()` to\n * ensure that all local state is destroyed between test runs.\n *\n * @returns A `Promise` that is resolved when the instance has been successfully\n * terminated.\n */ function $h(t) {\n    return _removeServiceInstance(t.app, \"firestore\", t._databaseId.database), t._delete();\n}\n\n/**\n * Loads a Firestore bundle into the local cache.\n *\n * @param firestore - The {@link Firestore} instance to load bundles for.\n * @param bundleData - An object representing the bundle to be loaded. Valid\n * objects are `ArrayBuffer`, `ReadableStream<Uint8Array>` or `string`.\n *\n * @returns A `LoadBundleTask` object, which notifies callers with progress\n * updates, and completion or error events. It can be used as a\n * `Promise<LoadBundleTaskProgress>`.\n */ function Oh(t, e) {\n    const n = bh(t = uh(t, vh)), s = new Eh;\n    return Ya(n, t._databaseId, e, s), s;\n}\n\n/**\n * Reads a Firestore {@link Query} from local cache, identified by the given\n * name.\n *\n * The named queries are packaged  into bundles on the server side (along\n * with resulting documents), and loaded to local cache using `loadBundle`. Once\n * in local cache, use this method to extract a {@link Query} by name.\n *\n * @param firestore - The {@link Firestore} instance to read the query from.\n * @param name - The name of the query.\n * @returns A `Promise` that is resolved with the Query or `null`.\n */ function Fh(t, e) {\n    return Xa(bh(t = uh(t, vh)), e).then((e => e ? new dh(t, null, e.query) : null));\n}\n\nfunction Bh(t) {\n    if (t._initialized || t._terminated) throw new U(q.FAILED_PRECONDITION, \"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.\");\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents an aggregation that can be performed by Firestore.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nclass Lh {\n    /**\n     * Create a new AggregateField<T>\n     * @param _aggregateType Specifies the type of aggregation operation to perform.\n     * @param _internalFieldPath Optionally specifies the field that is aggregated.\n     * @internal\n     */\n    constructor(\n    // TODO (sum/avg) make aggregateType public when the feature is supported\n    t = \"count\", e) {\n        this._aggregateType = t, this._internalFieldPath = e, \n        /** A type string to uniquely identify instances of this class. */\n        this.type = \"AggregateField\";\n    }\n}\n\n/**\n * The results of executing an aggregation query.\n */ class qh {\n    /** @hideconstructor */\n    constructor(t, e, n) {\n        this._userDataWriter = e, this._data = n, \n        /** A type string to uniquely identify instances of this class. */\n        this.type = \"AggregateQuerySnapshot\", this.query = t;\n    }\n    /**\n     * Returns the results of the aggregations performed over the underlying\n     * query.\n     *\n     * The keys of the returned object will be the same as those of the\n     * `AggregateSpec` object specified to the aggregation method, and the values\n     * will be the corresponding aggregation result.\n     *\n     * @returns The results of the aggregations performed over the underlying\n     * query.\n     */    data() {\n        return this._userDataWriter.convertObjectMap(this._data);\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An immutable object representing an array of bytes.\n */ class Uh {\n    /** @hideconstructor */\n    constructor(t) {\n        this._byteString = t;\n    }\n    /**\n     * Creates a new `Bytes` object from the given Base64 string, converting it to\n     * bytes.\n     *\n     * @param base64 - The Base64 string used to create the `Bytes` object.\n     */    static fromBase64String(t) {\n        try {\n            return new Uh(Ve.fromBase64String(t));\n        } catch (t) {\n            throw new U(q.INVALID_ARGUMENT, \"Failed to construct data from Base64 string: \" + t);\n        }\n    }\n    /**\n     * Creates a new `Bytes` object from the given Uint8Array.\n     *\n     * @param array - The Uint8Array used to create the `Bytes` object.\n     */    static fromUint8Array(t) {\n        return new Uh(Ve.fromUint8Array(t));\n    }\n    /**\n     * Returns the underlying bytes as a Base64-encoded string.\n     *\n     * @returns The Base64-encoded string created from the `Bytes` object.\n     */    toBase64() {\n        return this._byteString.toBase64();\n    }\n    /**\n     * Returns the underlying bytes in a new `Uint8Array`.\n     *\n     * @returns The Uint8Array created from the `Bytes` object.\n     */    toUint8Array() {\n        return this._byteString.toUint8Array();\n    }\n    /**\n     * Returns a string representation of the `Bytes` object.\n     *\n     * @returns A string representation of the `Bytes` object.\n     */    toString() {\n        return \"Bytes(base64: \" + this.toBase64() + \")\";\n    }\n    /**\n     * Returns true if this `Bytes` object is equal to the provided one.\n     *\n     * @param other - The `Bytes` object to compare against.\n     * @returns true if this `Bytes` object is equal to the provided one.\n     */    isEqual(t) {\n        return this._byteString.isEqual(t._byteString);\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A `FieldPath` refers to a field in a document. The path may consist of a\n * single field name (referring to a top-level field in the document), or a\n * list of field names (referring to a nested field in the document).\n *\n * Create a `FieldPath` by providing field names. If more than one field\n * name is provided, the path will point to a nested field in a document.\n */ class Kh {\n    /**\n     * Creates a `FieldPath` from the provided field names. If more than one field\n     * name is provided, the path will point to a nested field in a document.\n     *\n     * @param fieldNames - A list of field names.\n     */\n    constructor(...t) {\n        for (let e = 0; e < t.length; ++e) if (0 === t[e].length) throw new U(q.INVALID_ARGUMENT, \"Invalid field name at argument $(i + 1). Field names must not be empty.\");\n        this._internalPath = new at(t);\n    }\n    /**\n     * Returns true if this `FieldPath` is equal to the provided one.\n     *\n     * @param other - The `FieldPath` to compare against.\n     * @returns true if this `FieldPath` is equal to the provided one.\n     */    isEqual(t) {\n        return this._internalPath.isEqual(t._internalPath);\n    }\n}\n\n/**\n * Returns a special sentinel `FieldPath` to refer to the ID of a document.\n * It can be used in queries to sort or filter by the document ID.\n */ function Gh() {\n    return new Kh(\"__name__\");\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Sentinel values that can be used when writing document fields with `set()`\n * or `update()`.\n */ class Qh {\n    /**\n     * @param _methodName - The public API endpoint that returns this class.\n     * @hideconstructor\n     */\n    constructor(t) {\n        this._methodName = t;\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An immutable object representing a geographic location in Firestore. The\n * location is represented as latitude/longitude pair.\n *\n * Latitude values are in the range of [-90, 90].\n * Longitude values are in the range of [-180, 180].\n */ class jh {\n    /**\n     * Creates a new immutable `GeoPoint` object with the provided latitude and\n     * longitude values.\n     * @param latitude - The latitude as number between -90 and 90.\n     * @param longitude - The longitude as number between -180 and 180.\n     */\n    constructor(t, e) {\n        if (!isFinite(t) || t < -90 || t > 90) throw new U(q.INVALID_ARGUMENT, \"Latitude must be a number between -90 and 90, but was: \" + t);\n        if (!isFinite(e) || e < -180 || e > 180) throw new U(q.INVALID_ARGUMENT, \"Longitude must be a number between -180 and 180, but was: \" + e);\n        this._lat = t, this._long = e;\n    }\n    /**\n     * The latitude of this `GeoPoint` instance.\n     */    get latitude() {\n        return this._lat;\n    }\n    /**\n     * The longitude of this `GeoPoint` instance.\n     */    get longitude() {\n        return this._long;\n    }\n    /**\n     * Returns true if this `GeoPoint` is equal to the provided one.\n     *\n     * @param other - The `GeoPoint` to compare against.\n     * @returns true if this `GeoPoint` is equal to the provided one.\n     */    isEqual(t) {\n        return this._lat === t._lat && this._long === t._long;\n    }\n    /** Returns a JSON-serializable representation of this GeoPoint. */    toJSON() {\n        return {\n            latitude: this._lat,\n            longitude: this._long\n        };\n    }\n    /**\n     * Actually private to JS consumers of our API, so this function is prefixed\n     * with an underscore.\n     */    _compareTo(t) {\n        return et(this._lat, t._lat) || et(this._long, t._long);\n    }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const zh = /^__.*__$/;\n\n/** The result of parsing document data (e.g. for a setData call). */ class Wh {\n    constructor(t, e, n) {\n        this.data = t, this.fieldMask = e, this.fieldTransforms = n;\n    }\n    toMutation(t, e) {\n        return null !== this.fieldMask ? new zs(t, this.data, this.fieldMask, e, this.fieldTransforms) : new js(t, this.data, e, this.fieldTransforms);\n    }\n}\n\n/** The result of parsing \"update\" data (i.e. for an updateData call). */ class Hh {\n    constructor(t, \n    // The fieldMask does not include document transforms.\n    e, n) {\n        this.data = t, this.fieldMask = e, this.fieldTransforms = n;\n    }\n    toMutation(t, e) {\n        return new zs(t, this.data, this.fieldMask, e, this.fieldTransforms);\n    }\n}\n\nfunction Jh(t) {\n    switch (t) {\n      case 0 /* UserDataSource.Set */ :\n // fall through\n              case 2 /* UserDataSource.MergeSet */ :\n // fall through\n              case 1 /* UserDataSource.Update */ :\n        return !0;\n\n      case 3 /* UserDataSource.Argument */ :\n      case 4 /* UserDataSource.ArrayArgument */ :\n        return !1;\n\n      default:\n        throw O();\n    }\n}\n\n/** A \"context\" object passed around while parsing user data. */ class Yh {\n    /**\n     * Initializes a ParseContext with the given source and path.\n     *\n     * @param settings - The settings for the parser.\n     * @param databaseId - The database ID of the Firestore instance.\n     * @param serializer - The serializer to use to generate the Value proto.\n     * @param ignoreUndefinedProperties - Whether to ignore undefined properties\n     * rather than throw.\n     * @param fieldTransforms - A mutable list of field transforms encountered\n     * while parsing the data.\n     * @param fieldMask - A mutable list of field paths encountered while parsing\n     * the data.\n     *\n     * TODO(b/34871131): We don't support array paths right now, so path can be\n     * null to indicate the context represents any location within an array (in\n     * which case certain features will not work and errors will be somewhat\n     * compromised).\n     */\n    constructor(t, e, n, s, i, r) {\n        this.settings = t, this.databaseId = e, this.serializer = n, this.ignoreUndefinedProperties = s, \n        // Minor hack: If fieldTransforms is undefined, we assume this is an\n        // external call and we need to validate the entire path.\n        void 0 === i && this.ua(), this.fieldTransforms = i || [], this.fieldMask = r || [];\n    }\n    get path() {\n        return this.settings.path;\n    }\n    get ca() {\n        return this.settings.ca;\n    }\n    /** Returns a new context with the specified settings overwritten. */    aa(t) {\n        return new Yh(Object.assign(Object.assign({}, this.settings), t), this.databaseId, this.serializer, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);\n    }\n    ha(t) {\n        var e;\n        const n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), s = this.aa({\n            path: n,\n            la: !1\n        });\n        return s.fa(t), s;\n    }\n    da(t) {\n        var e;\n        const n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), s = this.aa({\n            path: n,\n            la: !1\n        });\n        return s.ua(), s;\n    }\n    wa(t) {\n        // TODO(b/34871131): We don't support array paths right now; so make path\n        // undefined.\n        return this.aa({\n            path: void 0,\n            la: !0\n        });\n    }\n    _a(t) {\n        return gl(t, this.settings.methodName, this.settings.ma || !1, this.path, this.settings.ga);\n    }\n    /** Returns 'true' if 'fieldPath' was traversed when creating this context. */    contains(t) {\n        return void 0 !== this.fieldMask.find((e => t.isPrefixOf(e))) || void 0 !== this.fieldTransforms.find((e => t.isPrefixOf(e.field)));\n    }\n    ua() {\n        // TODO(b/34871131): Remove null check once we have proper paths for fields\n        // within arrays.\n        if (this.path) for (let t = 0; t < this.path.length; t++) this.fa(this.path.get(t));\n    }\n    fa(t) {\n        if (0 === t.length) throw this._a(\"Document fields must not be empty\");\n        if (Jh(this.ca) && zh.test(t)) throw this._a('Document fields cannot begin and end with \"__\"');\n    }\n}\n\n/**\n * Helper for parsing raw user input (provided via the API) into internal model\n * classes.\n */ class Xh {\n    constructor(t, e, n) {\n        this.databaseId = t, this.ignoreUndefinedProperties = e, this.serializer = n || Fu(t);\n    }\n    /** Creates a new top-level parse context. */    ya(t, e, n, s = !1) {\n        return new Yh({\n            ca: t,\n            methodName: e,\n            ga: n,\n            path: at.emptyPath(),\n            la: !1,\n            ma: s\n        }, this.databaseId, this.serializer, this.ignoreUndefinedProperties);\n    }\n}\n\nfunction Zh(t) {\n    const e = t._freezeSettings(), n = Fu(t._databaseId);\n    return new Xh(t._databaseId, !!e.ignoreUndefinedProperties, n);\n}\n\n/** Parse document data from a set() call. */ function tl(t, e, n, s, i, r = {}) {\n    const o = t.ya(r.merge || r.mergeFields ? 2 /* UserDataSource.MergeSet */ : 0 /* UserDataSource.Set */ , e, n, i);\n    dl(\"Data must be an object, but it was:\", o, s);\n    const u = ll(s, o);\n    let c, a;\n    if (r.merge) c = new Re(o.fieldMask), a = o.fieldTransforms; else if (r.mergeFields) {\n        const t = [];\n        for (const s of r.mergeFields) {\n            const i = wl(e, s, n);\n            if (!o.contains(i)) throw new U(q.INVALID_ARGUMENT, `Field '${i}' is specified in your field mask but missing from your input data.`);\n            yl(t, i) || t.push(i);\n        }\n        c = new Re(t), a = o.fieldTransforms.filter((t => c.covers(t.field)));\n    } else c = null, a = o.fieldTransforms;\n    return new Wh(new un(u), c, a);\n}\n\nclass el extends Qh {\n    _toFieldTransform(t) {\n        if (2 /* UserDataSource.MergeSet */ !== t.ca) throw 1 /* UserDataSource.Update */ === t.ca ? t._a(`${this._methodName}() can only appear at the top level of your update data`) : t._a(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);\n        // No transform to add for a delete, but we need to add it to our\n        // fieldMask so it gets deleted.\n        return t.fieldMask.push(t.path), null;\n    }\n    isEqual(t) {\n        return t instanceof el;\n    }\n}\n\n/**\n * Creates a child context for parsing SerializableFieldValues.\n *\n * This is different than calling `ParseContext.contextWith` because it keeps\n * the fieldTransforms and fieldMask separate.\n *\n * The created context has its `dataSource` set to `UserDataSource.Argument`.\n * Although these values are used with writes, any elements in these FieldValues\n * are not considered writes since they cannot contain any FieldValue sentinels,\n * etc.\n *\n * @param fieldValue - The sentinel FieldValue for which to create a child\n *     context.\n * @param context - The parent context.\n * @param arrayElement - Whether or not the FieldValue has an array.\n */ function nl(t, e, n) {\n    return new Yh({\n        ca: 3 /* UserDataSource.Argument */ ,\n        ga: e.settings.ga,\n        methodName: t._methodName,\n        la: n\n    }, e.databaseId, e.serializer, e.ignoreUndefinedProperties);\n}\n\nclass sl extends Qh {\n    _toFieldTransform(t) {\n        return new Ms(t.path, new bs);\n    }\n    isEqual(t) {\n        return t instanceof sl;\n    }\n}\n\nclass il extends Qh {\n    constructor(t, e) {\n        super(t), this.pa = e;\n    }\n    _toFieldTransform(t) {\n        const e = nl(this, t, \n        /*array=*/ !0), n = this.pa.map((t => hl(t, e))), s = new Vs(n);\n        return new Ms(t.path, s);\n    }\n    isEqual(t) {\n        // TODO(mrschmidt): Implement isEquals\n        return this === t;\n    }\n}\n\nclass rl extends Qh {\n    constructor(t, e) {\n        super(t), this.pa = e;\n    }\n    _toFieldTransform(t) {\n        const e = nl(this, t, \n        /*array=*/ !0), n = this.pa.map((t => hl(t, e))), s = new Ds(n);\n        return new Ms(t.path, s);\n    }\n    isEqual(t) {\n        // TODO(mrschmidt): Implement isEquals\n        return this === t;\n    }\n}\n\nclass ol extends Qh {\n    constructor(t, e) {\n        super(t), this.Ia = e;\n    }\n    _toFieldTransform(t) {\n        const e = new xs(t.serializer, Es(t.serializer, this.Ia));\n        return new Ms(t.path, e);\n    }\n    isEqual(t) {\n        // TODO(mrschmidt): Implement isEquals\n        return this === t;\n    }\n}\n\n/** Parse update data from an update() call. */ function ul(t, e, n, s) {\n    const i = t.ya(1 /* UserDataSource.Update */ , e, n);\n    dl(\"Data must be an object, but it was:\", i, s);\n    const r = [], o = un.empty();\n    ge(s, ((t, s) => {\n        const u = ml(e, t, n);\n        // For Compat types, we have to \"extract\" the underlying types before\n        // performing validation.\n                s = getModularInstance(s);\n        const c = i.da(u);\n        if (s instanceof el) \n        // Add it to the field mask, but don't add anything to updateData.\n        r.push(u); else {\n            const t = hl(s, c);\n            null != t && (r.push(u), o.set(u, t));\n        }\n    }));\n    const u = new Re(r);\n    return new Hh(o, u, i.fieldTransforms);\n}\n\n/** Parse update data from a list of field/value arguments. */ function cl(t, e, n, s, i, r) {\n    const o = t.ya(1 /* UserDataSource.Update */ , e, n), u = [ wl(e, s, n) ], c = [ i ];\n    if (r.length % 2 != 0) throw new U(q.INVALID_ARGUMENT, `Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);\n    for (let t = 0; t < r.length; t += 2) u.push(wl(e, r[t])), c.push(r[t + 1]);\n    const a = [], h = un.empty();\n    // We iterate in reverse order to pick the last value for a field if the\n    // user specified the field multiple times.\n    for (let t = u.length - 1; t >= 0; --t) if (!yl(a, u[t])) {\n        const e = u[t];\n        let n = c[t];\n        // For Compat types, we have to \"extract\" the underlying types before\n        // performing validation.\n                n = getModularInstance(n);\n        const s = o.da(e);\n        if (n instanceof el) \n        // Add it to the field mask, but don't add anything to updateData.\n        a.push(e); else {\n            const t = hl(n, s);\n            null != t && (a.push(e), h.set(e, t));\n        }\n    }\n    const l = new Re(a);\n    return new Hh(h, l, o.fieldTransforms);\n}\n\n/**\n * Parse a \"query value\" (e.g. value in a where filter or a value in a cursor\n * bound).\n *\n * @param allowArrays - Whether the query value is an array that may directly\n * contain additional arrays (e.g. the operand of an `in` query).\n */ function al(t, e, n, s = !1) {\n    return hl(n, t.ya(s ? 4 /* UserDataSource.ArrayArgument */ : 3 /* UserDataSource.Argument */ , e));\n}\n\n/**\n * Parses user data to Protobuf Values.\n *\n * @param input - Data to be parsed.\n * @param context - A context object representing the current path being parsed,\n * the source of the data being parsed, etc.\n * @returns The parsed value, or null if the value was a FieldValue sentinel\n * that should not be included in the resulting parsed data.\n */ function hl(t, e) {\n    if (fl(\n    // Unwrap the API type from the Compat SDK. This will return the API type\n    // from firestore-exp.\n    t = getModularInstance(t))) return dl(\"Unsupported field value:\", e, t), ll(t, e);\n    if (t instanceof Qh) \n    // FieldValues usually parse into transforms (except deleteField())\n    // in which case we do not want to include this field in our parsed data\n    // (as doing so will overwrite the field directly prior to the transform\n    // trying to transform it). So we don't add this location to\n    // context.fieldMask and we return null as our parsing result.\n    /**\n * \"Parses\" the provided FieldValueImpl, adding any necessary transforms to\n * context.fieldTransforms.\n */\n    return function(t, e) {\n        // Sentinels are only supported with writes, and not within arrays.\n        if (!Jh(e.ca)) throw e._a(`${t._methodName}() can only be used with update() and set()`);\n        if (!e.path) throw e._a(`${t._methodName}() is not currently supported inside arrays`);\n        const n = t._toFieldTransform(e);\n        n && e.fieldTransforms.push(n);\n    }\n    /**\n * Helper to parse a scalar value (i.e. not an Object, Array, or FieldValue)\n *\n * @returns The parsed value\n */ (t, e), null;\n    if (void 0 === t && e.ignoreUndefinedProperties) \n    // If the input is undefined it can never participate in the fieldMask, so\n    // don't handle this below. If `ignoreUndefinedProperties` is false,\n    // `parseScalarValue` will reject an undefined value.\n    return null;\n    if (\n    // If context.path is null we are inside an array and we don't support\n    // field mask paths more granular than the top-level array.\n    e.path && e.fieldMask.push(e.path), t instanceof Array) {\n        // TODO(b/34871131): Include the path containing the array in the error\n        // message.\n        // In the case of IN queries, the parsed data is an array (representing\n        // the set of values to be included for the IN query) that may directly\n        // contain additional arrays (each representing an individual field\n        // value), so we disable this validation.\n        if (e.settings.la && 4 /* UserDataSource.ArrayArgument */ !== e.ca) throw e._a(\"Nested arrays are not supported\");\n        return function(t, e) {\n            const n = [];\n            let s = 0;\n            for (const i of t) {\n                let t = hl(i, e.wa(s));\n                null == t && (\n                // Just include nulls in the array for fields being replaced with a\n                // sentinel.\n                t = {\n                    nullValue: \"NULL_VALUE\"\n                }), n.push(t), s++;\n            }\n            return {\n                arrayValue: {\n                    values: n\n                }\n            };\n        }(t, e);\n    }\n    return function(t, e) {\n        if (null === (t = getModularInstance(t))) return {\n            nullValue: \"NULL_VALUE\"\n        };\n        if (\"number\" == typeof t) return Es(e.serializer, t);\n        if (\"boolean\" == typeof t) return {\n            booleanValue: t\n        };\n        if (\"string\" == typeof t) return {\n            stringValue: t\n        };\n        if (t instanceof Date) {\n            const n = it.fromDate(t);\n            return {\n                timestampValue: Di(e.serializer, n)\n            };\n        }\n        if (t instanceof it) {\n            // Firestore backend truncates precision down to microseconds. To ensure\n            // offline mode works the same with regards to truncation, perform the\n            // truncation immediately without waiting for the backend to do that.\n            const n = new it(t.seconds, 1e3 * Math.floor(t.nanoseconds / 1e3));\n            return {\n                timestampValue: Di(e.serializer, n)\n            };\n        }\n        if (t instanceof jh) return {\n            geoPointValue: {\n                latitude: t.latitude,\n                longitude: t.longitude\n            }\n        };\n        if (t instanceof Uh) return {\n            bytesValue: Ci(e.serializer, t._byteString)\n        };\n        if (t instanceof fh) {\n            const n = e.databaseId, s = t.firestore._databaseId;\n            if (!s.isEqual(n)) throw e._a(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${n.projectId}/${n.database}`);\n            return {\n                referenceValue: ki(t.firestore._databaseId || e.databaseId, t._key.path)\n            };\n        }\n        throw e._a(`Unsupported field value: ${oh(t)}`);\n    }\n    /**\n * Checks whether an object looks like a JSON object that should be converted\n * into a struct. Normal class/prototype instances are considered to look like\n * JSON objects since they should be converted to a struct value. Arrays, Dates,\n * GeoPoints, etc. are not considered to look like JSON objects since they map\n * to specific FieldValue types other than ObjectValue.\n */ (t, e);\n}\n\nfunction ll(t, e) {\n    const n = {};\n    return ye(t) ? \n    // If we encounter an empty object, we explicitly add it to the update\n    // mask to ensure that the server creates a map entry.\n    e.path && e.path.length > 0 && e.fieldMask.push(e.path) : ge(t, ((t, s) => {\n        const i = hl(s, e.ha(t));\n        null != i && (n[t] = i);\n    })), {\n        mapValue: {\n            fields: n\n        }\n    };\n}\n\nfunction fl(t) {\n    return !(\"object\" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof it || t instanceof jh || t instanceof Uh || t instanceof fh || t instanceof Qh);\n}\n\nfunction dl(t, e, n) {\n    if (!fl(n) || !function(t) {\n        return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n    }(n)) {\n        const s = oh(n);\n        throw \"an object\" === s ? e._a(t + \" a custom object\") : e._a(t + \" \" + s);\n    }\n}\n\n/**\n * Helper that calls fromDotSeparatedString() but wraps any error thrown.\n */ function wl(t, e, n) {\n    if ((\n    // If required, replace the FieldPath Compat class with with the firestore-exp\n    // FieldPath.\n    e = getModularInstance(e)) instanceof Kh) return e._internalPath;\n    if (\"string\" == typeof e) return ml(t, e);\n    throw gl(\"Field path arguments must be of type string or \", t, \n    /* hasConverter= */ !1, \n    /* path= */ void 0, n);\n}\n\n/**\n * Matches any characters in a field path string that are reserved.\n */ const _l = new RegExp(\"[~\\\\*/\\\\[\\\\]]\");\n\n/**\n * Wraps fromDotSeparatedString with an error message about the method that\n * was thrown.\n * @param methodName - The publicly visible method name\n * @param path - The dot-separated string form of a field path which will be\n * split on dots.\n * @param targetDoc - The document against which the field path will be\n * evaluated.\n */ function ml(t, e, n) {\n    if (e.search(_l) >= 0) throw gl(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`, t, \n    /* hasConverter= */ !1, \n    /* path= */ void 0, n);\n    try {\n        return new Kh(...e.split(\".\"))._internalPath;\n    } catch (s) {\n        throw gl(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`, t, \n        /* hasConverter= */ !1, \n        /* path= */ void 0, n);\n    }\n}\n\nfunction gl(t, e, n, s, i) {\n    const r = s && !s.isEmpty(), o = void 0 !== i;\n    let u = `Function ${e}() called with invalid data`;\n    n && (u += \" (via `toFirestore()`)\"), u += \". \";\n    let c = \"\";\n    return (r || o) && (c += \" (found\", r && (c += ` in field ${s}`), o && (c += ` in document ${i}`), \n    c += \")\"), new U(q.INVALID_ARGUMENT, u + t + c);\n}\n\n/** Checks `haystack` if FieldPath `needle` is present. Runs in O(n). */ function yl(t, e) {\n    return t.some((t => t.isEqual(e)));\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A `DocumentSnapshot` contains data read from a document in your Firestore\n * database. The data can be extracted with `.data()` or `.get(<field>)` to\n * get a specific field.\n *\n * For a `DocumentSnapshot` that points to a non-existing document, any data\n * access will return 'undefined'. You can use the `exists()` method to\n * explicitly verify a document's existence.\n */ class pl {\n    // Note: This class is stripped down version of the DocumentSnapshot in\n    // the legacy SDK. The changes are:\n    // - No support for SnapshotMetadata.\n    // - No support for SnapshotOptions.\n    /** @hideconstructor protected */\n    constructor(t, e, n, s, i) {\n        this._firestore = t, this._userDataWriter = e, this._key = n, this._document = s, \n        this._converter = i;\n    }\n    /** Property of the `DocumentSnapshot` that provides the document's ID. */    get id() {\n        return this._key.path.lastSegment();\n    }\n    /**\n     * The `DocumentReference` for the document included in the `DocumentSnapshot`.\n     */    get ref() {\n        return new fh(this._firestore, this._converter, this._key);\n    }\n    /**\n     * Signals whether or not the document at the snapshot's location exists.\n     *\n     * @returns true if the document exists.\n     */    exists() {\n        return null !== this._document;\n    }\n    /**\n     * Retrieves all fields in the document as an `Object`. Returns `undefined` if\n     * the document doesn't exist.\n     *\n     * @returns An `Object` containing all fields in the document or `undefined`\n     * if the document doesn't exist.\n     */    data() {\n        if (this._document) {\n            if (this._converter) {\n                // We only want to use the converter and create a new DocumentSnapshot\n                // if a converter has been provided.\n                const t = new Il(this._firestore, this._userDataWriter, this._key, this._document, \n                /* converter= */ null);\n                return this._converter.fromFirestore(t);\n            }\n            return this._userDataWriter.convertValue(this._document.data.value);\n        }\n    }\n    /**\n     * Retrieves the field specified by `fieldPath`. Returns `undefined` if the\n     * document or field doesn't exist.\n     *\n     * @param fieldPath - The path (for example 'foo' or 'foo.bar') to a specific\n     * field.\n     * @returns The data at the specified field location or undefined if no such\n     * field exists in the document.\n     */\n    // We are using `any` here to avoid an explicit cast by our users.\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    get(t) {\n        if (this._document) {\n            const e = this._document.data.field(Tl(\"DocumentSnapshot.get\", t));\n            if (null !== e) return this._userDataWriter.convertValue(e);\n        }\n    }\n}\n\n/**\n * A `QueryDocumentSnapshot` contains data read from a document in your\n * Firestore database as part of a query. The document is guaranteed to exist\n * and its data can be extracted with `.data()` or `.get(<field>)` to get a\n * specific field.\n *\n * A `QueryDocumentSnapshot` offers the same API surface as a\n * `DocumentSnapshot`. Since query results contain only existing documents, the\n * `exists` property will always be true and `data()` will never return\n * 'undefined'.\n */ class Il extends pl {\n    /**\n     * Retrieves all fields in the document as an `Object`.\n     *\n     * @override\n     * @returns An `Object` containing all fields in the document.\n     */\n    data() {\n        return super.data();\n    }\n}\n\n/**\n * Helper that calls `fromDotSeparatedString()` but wraps any error thrown.\n */ function Tl(t, e) {\n    return \"string\" == typeof e ? ml(t, e) : e instanceof Kh ? e._internalPath : e._delegate._internalPath;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ function El(t) {\n    if (\"L\" /* LimitType.Last */ === t.limitType && 0 === t.explicitOrderBy.length) throw new U(q.UNIMPLEMENTED, \"limitToLast() queries require specifying at least one orderBy() clause\");\n}\n\n/**\n * An `AppliableConstraint` is an abstraction of a constraint that can be applied\n * to a Firestore query.\n */ class Al {}\n\n/**\n * A `QueryConstraint` is used to narrow the set of documents returned by a\n * Firestore query. `QueryConstraint`s are created by invoking {@link where},\n * {@link orderBy}, {@link (startAt:1)}, {@link (startAfter:1)}, {@link\n * (endBefore:1)}, {@link (endAt:1)}, {@link limit}, {@link limitToLast} and\n * can then be passed to {@link (query:1)} to create a new query instance that\n * also contains this `QueryConstraint`.\n */ class vl extends Al {}\n\nfunction Rl(t, e, ...n) {\n    let s = [];\n    e instanceof Al && s.push(e), s = s.concat(n), function(t) {\n        const e = t.filter((t => t instanceof Vl)).length, n = t.filter((t => t instanceof Pl)).length;\n        if (e > 1 || e > 0 && n > 0) throw new U(q.INVALID_ARGUMENT, \"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.\");\n    }\n    /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n    /**\n * Converts Firestore's internal types to the JavaScript types that we expose\n * to the user.\n *\n * @internal\n */ (s);\n    for (const e of s) t = e._apply(t);\n    return t;\n}\n\n/**\n * A `QueryFieldFilterConstraint` is used to narrow the set of documents returned by\n * a Firestore query by filtering on one or more document fields.\n * `QueryFieldFilterConstraint`s are created by invoking {@link where} and can then\n * be passed to {@link (query:1)} to create a new query instance that also contains\n * this `QueryFieldFilterConstraint`.\n */ class Pl extends vl {\n    /**\n     * @internal\n     */\n    constructor(t, e, n) {\n        super(), this._field = t, this._op = e, this._value = n, \n        /** The type of this query constraint */\n        this.type = \"where\";\n    }\n    static _create(t, e, n) {\n        return new Pl(t, e, n);\n    }\n    _apply(t) {\n        const e = this._parse(t);\n        return Ql(t._query, e), new dh(t.firestore, t.converter, Yn(t._query, e));\n    }\n    _parse(t) {\n        const e = Zh(t.firestore), n = function(t, e, n, s, i, r, o) {\n            let u;\n            if (i.isKeyField()) {\n                if (\"array-contains\" /* Operator.ARRAY_CONTAINS */ === r || \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ === r) throw new U(q.INVALID_ARGUMENT, `Invalid Query. You can't perform '${r}' queries on documentId().`);\n                if (\"in\" /* Operator.IN */ === r || \"not-in\" /* Operator.NOT_IN */ === r) {\n                    Gl(o, r);\n                    const e = [];\n                    for (const n of o) e.push(Kl(s, t, n));\n                    u = {\n                        arrayValue: {\n                            values: e\n                        }\n                    };\n                } else u = Kl(s, t, o);\n            } else \"in\" /* Operator.IN */ !== r && \"not-in\" /* Operator.NOT_IN */ !== r && \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ !== r || Gl(o, r), \n            u = al(n, e, o, \n            /* allowArrays= */ \"in\" /* Operator.IN */ === r || \"not-in\" /* Operator.NOT_IN */ === r);\n            return mn.create(i, r, u);\n        }(t._query, \"where\", e, t.firestore._databaseId, this._field, this._op, this._value);\n        return n;\n    }\n}\n\n/**\n * Creates a {@link QueryFieldFilterConstraint} that enforces that documents\n * must contain the specified field and that the value should satisfy the\n * relation constraint provided.\n *\n * @param fieldPath - The path to compare\n * @param opStr - The operation string (e.g \"&lt;\", \"&lt;=\", \"==\", \"&lt;\",\n *   \"&lt;=\", \"!=\").\n * @param value - The value for comparison\n * @returns The created {@link QueryFieldFilterConstraint}.\n */ function bl(t, e, n) {\n    const s = e, i = Tl(\"where\", t);\n    return Pl._create(i, s, n);\n}\n\n/**\n * A `QueryCompositeFilterConstraint` is used to narrow the set of documents\n * returned by a Firestore query by performing the logical OR or AND of multiple\n * {@link QueryFieldFilterConstraint}s or {@link QueryCompositeFilterConstraint}s.\n * `QueryCompositeFilterConstraint`s are created by invoking {@link or} or\n * {@link and} and can then be passed to {@link (query:1)} to create a new query\n * instance that also contains the `QueryCompositeFilterConstraint`.\n */ class Vl extends Al {\n    /**\n     * @internal\n     */\n    constructor(\n    /** The type of this query constraint */\n    t, e) {\n        super(), this.type = t, this._queryConstraints = e;\n    }\n    static _create(t, e) {\n        return new Vl(t, e);\n    }\n    _parse(t) {\n        const e = this._queryConstraints.map((e => e._parse(t))).filter((t => t.getFilters().length > 0));\n        return 1 === e.length ? e[0] : gn.create(e, this._getOperator());\n    }\n    _apply(t) {\n        const e = this._parse(t);\n        return 0 === e.getFilters().length ? t : (function(t, e) {\n            let n = t;\n            const s = e.getFlattenedFilters();\n            for (const t of s) Ql(n, t), n = Yn(n, t);\n        }\n        // Checks if any of the provided filter operators are included in the given list of filters and\n        // returns the first one that is, or null if none are.\n        (t._query, e), new dh(t.firestore, t.converter, Yn(t._query, e)));\n    }\n    _getQueryConstraints() {\n        return this._queryConstraints;\n    }\n    _getOperator() {\n        return \"and\" === this.type ? \"and\" /* CompositeOperator.AND */ : \"or\" /* CompositeOperator.OR */;\n    }\n}\n\n/**\n * Creates a new {@link QueryCompositeFilterConstraint} that is a disjunction of\n * the given filter constraints. A disjunction filter includes a document if it\n * satisfies any of the given filters.\n *\n * @param queryConstraints - Optional. The list of\n * {@link QueryFilterConstraint}s to perform a disjunction for. These must be\n * created with calls to {@link where}, {@link or}, or {@link and}.\n * @returns The newly created {@link QueryCompositeFilterConstraint}.\n */ function Sl(...t) {\n    // Only support QueryFilterConstraints\n    return t.forEach((t => zl(\"or\", t))), Vl._create(\"or\" /* CompositeOperator.OR */ , t);\n}\n\n/**\n * Creates a new {@link QueryCompositeFilterConstraint} that is a conjunction of\n * the given filter constraints. A conjunction filter includes a document if it\n * satisfies all of the given filters.\n *\n * @param queryConstraints - Optional. The list of\n * {@link QueryFilterConstraint}s to perform a conjunction for. These must be\n * created with calls to {@link where}, {@link or}, or {@link and}.\n * @returns The newly created {@link QueryCompositeFilterConstraint}.\n */ function Dl(...t) {\n    // Only support QueryFilterConstraints\n    return t.forEach((t => zl(\"and\", t))), Vl._create(\"and\" /* CompositeOperator.AND */ , t);\n}\n\n/**\n * A `QueryOrderByConstraint` is used to sort the set of documents returned by a\n * Firestore query. `QueryOrderByConstraint`s are created by invoking\n * {@link orderBy} and can then be passed to {@link (query:1)} to create a new query\n * instance that also contains this `QueryOrderByConstraint`.\n *\n * Note: Documents that do not contain the orderBy field will not be present in\n * the query result.\n */ class Cl extends vl {\n    /**\n     * @internal\n     */\n    constructor(t, e) {\n        super(), this._field = t, this._direction = e, \n        /** The type of this query constraint */\n        this.type = \"orderBy\";\n    }\n    static _create(t, e) {\n        return new Cl(t, e);\n    }\n    _apply(t) {\n        const e = function(t, e, n) {\n            if (null !== t.startAt) throw new U(q.INVALID_ARGUMENT, \"Invalid query. You must not call startAt() or startAfter() before calling orderBy().\");\n            if (null !== t.endAt) throw new U(q.INVALID_ARGUMENT, \"Invalid query. You must not call endAt() or endBefore() before calling orderBy().\");\n            const s = new dn(e, n);\n            return function(t, e) {\n                if (null === jn(t)) {\n                    // This is the first order by. It must match any inequality.\n                    const n = zn(t);\n                    null !== n && jl(t, n, e.field);\n                }\n            }(t, s), s;\n        }\n        /**\n * Create a `Bound` from a query and a document.\n *\n * Note that the `Bound` will always include the key of the document\n * and so only the provided document will compare equal to the returned\n * position.\n *\n * Will throw if the document does not contain all fields of the order by\n * of the query or if any of the fields in the order by are an uncommitted\n * server timestamp.\n */ (t._query, this._field, this._direction);\n        return new dh(t.firestore, t.converter, function(t, e) {\n            // TODO(dimond): validate that orderBy does not list the same key twice.\n            const n = t.explicitOrderBy.concat([ e ]);\n            return new Un(t.path, t.collectionGroup, n, t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);\n        }(t._query, e));\n    }\n}\n\n/**\n * Creates a {@link QueryOrderByConstraint} that sorts the query result by the\n * specified field, optionally in descending order instead of ascending.\n *\n * Note: Documents that do not contain the specified field will not be present\n * in the query result.\n *\n * @param fieldPath - The field to sort by.\n * @param directionStr - Optional direction to sort by ('asc' or 'desc'). If\n * not specified, order will be ascending.\n * @returns The created {@link QueryOrderByConstraint}.\n */ function xl(t, e = \"asc\") {\n    const n = e, s = Tl(\"orderBy\", t);\n    return Cl._create(s, n);\n}\n\n/**\n * A `QueryLimitConstraint` is used to limit the number of documents returned by\n * a Firestore query.\n * `QueryLimitConstraint`s are created by invoking {@link limit} or\n * {@link limitToLast} and can then be passed to {@link (query:1)} to create a new\n * query instance that also contains this `QueryLimitConstraint`.\n */ class Nl extends vl {\n    /**\n     * @internal\n     */\n    constructor(\n    /** The type of this query constraint */\n    t, e, n) {\n        super(), this.type = t, this._limit = e, this._limitType = n;\n    }\n    static _create(t, e, n) {\n        return new Nl(t, e, n);\n    }\n    _apply(t) {\n        return new dh(t.firestore, t.converter, Xn(t._query, this._limit, this._limitType));\n    }\n}\n\n/**\n * Creates a {@link QueryLimitConstraint} that only returns the first matching\n * documents.\n *\n * @param limit - The maximum number of items to return.\n * @returns The created {@link QueryLimitConstraint}.\n */ function kl(t) {\n    return ch(\"limit\", t), Nl._create(\"limit\", t, \"F\" /* LimitType.First */);\n}\n\n/**\n * Creates a {@link QueryLimitConstraint} that only returns the last matching\n * documents.\n *\n * You must specify at least one `orderBy` clause for `limitToLast` queries,\n * otherwise an exception will be thrown during execution.\n *\n * @param limit - The maximum number of items to return.\n * @returns The created {@link QueryLimitConstraint}.\n */ function Ml(t) {\n    return ch(\"limitToLast\", t), Nl._create(\"limitToLast\", t, \"L\" /* LimitType.Last */);\n}\n\n/**\n * A `QueryStartAtConstraint` is used to exclude documents from the start of a\n * result set returned by a Firestore query.\n * `QueryStartAtConstraint`s are created by invoking {@link (startAt:1)} or\n * {@link (startAfter:1)} and can then be passed to {@link (query:1)} to create a\n * new query instance that also contains this `QueryStartAtConstraint`.\n */ class $l extends vl {\n    /**\n     * @internal\n     */\n    constructor(\n    /** The type of this query constraint */\n    t, e, n) {\n        super(), this.type = t, this._docOrFields = e, this._inclusive = n;\n    }\n    static _create(t, e, n) {\n        return new $l(t, e, n);\n    }\n    _apply(t) {\n        const e = Ul(t, this.type, this._docOrFields, this._inclusive);\n        return new dh(t.firestore, t.converter, function(t, e) {\n            return new Un(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);\n        }(t._query, e));\n    }\n}\n\nfunction Ol(...t) {\n    return $l._create(\"startAt\", t, \n    /*inclusive=*/ !0);\n}\n\nfunction Fl(...t) {\n    return $l._create(\"startAfter\", t, \n    /*inclusive=*/ !1);\n}\n\n/**\n * A `QueryEndAtConstraint` is used to exclude documents from the end of a\n * result set returned by a Firestore query.\n * `QueryEndAtConstraint`s are created by invoking {@link (endAt:1)} or\n * {@link (endBefore:1)} and can then be passed to {@link (query:1)} to create a new\n * query instance that also contains this `QueryEndAtConstraint`.\n */ class Bl extends vl {\n    /**\n     * @internal\n     */\n    constructor(\n    /** The type of this query constraint */\n    t, e, n) {\n        super(), this.type = t, this._docOrFields = e, this._inclusive = n;\n    }\n    static _create(t, e, n) {\n        return new Bl(t, e, n);\n    }\n    _apply(t) {\n        const e = Ul(t, this.type, this._docOrFields, this._inclusive);\n        return new dh(t.firestore, t.converter, function(t, e) {\n            return new Un(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);\n        }(t._query, e));\n    }\n}\n\nfunction Ll(...t) {\n    return Bl._create(\"endBefore\", t, \n    /*inclusive=*/ !1);\n}\n\nfunction ql(...t) {\n    return Bl._create(\"endAt\", t, \n    /*inclusive=*/ !0);\n}\n\n/** Helper function to create a bound from a document or fields */ function Ul(t, e, n, s) {\n    if (n[0] = getModularInstance(n[0]), n[0] instanceof pl) return function(t, e, n, s, i) {\n        if (!s) throw new U(q.NOT_FOUND, `Can't use a DocumentSnapshot that doesn't exist for ${n}().`);\n        const r = [];\n        // Because people expect to continue/end a query at the exact document\n        // provided, we need to use the implicit sort order rather than the explicit\n        // sort order, because it's guaranteed to contain the document key. That way\n        // the position becomes unambiguous and the query continues/ends exactly at\n        // the provided document. Without the key (by using the explicit sort\n        // orders), multiple documents could match the position, yielding duplicate\n        // results.\n                for (const n of Hn(t)) if (n.field.isKeyField()) r.push(We(e, s.key)); else {\n            const t = s.data.field(n.field);\n            if (Ne(t)) throw new U(q.INVALID_ARGUMENT, 'Invalid query. You are trying to start or end a query using a document for which the field \"' + n.field + '\" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');\n            if (null === t) {\n                const t = n.field.canonicalString();\n                throw new U(q.INVALID_ARGUMENT, `Invalid query. You are trying to start or end a query using a document for which the field '${t}' (used as the orderBy) does not exist.`);\n            }\n            r.push(t);\n        }\n        return new hn(r, i);\n    }\n    /**\n * Converts a list of field values to a `Bound` for the given query.\n */ (t._query, t.firestore._databaseId, e, n[0]._document, s);\n    {\n        const i = Zh(t.firestore);\n        return function(t, e, n, s, i, r) {\n            // Use explicit order by's because it has to match the query the user made\n            const o = t.explicitOrderBy;\n            if (i.length > o.length) throw new U(q.INVALID_ARGUMENT, `Too many arguments provided to ${s}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);\n            const u = [];\n            for (let r = 0; r < i.length; r++) {\n                const c = i[r];\n                if (o[r].field.isKeyField()) {\n                    if (\"string\" != typeof c) throw new U(q.INVALID_ARGUMENT, `Invalid query. Expected a string for document ID in ${s}(), but got a ${typeof c}`);\n                    if (!Wn(t) && -1 !== c.indexOf(\"/\")) throw new U(q.INVALID_ARGUMENT, `Invalid query. When querying a collection and ordering by documentId(), the value passed to ${s}() must be a plain document ID, but '${c}' contains a slash.`);\n                    const n = t.path.child(ut.fromString(c));\n                    if (!ht.isDocumentKey(n)) throw new U(q.INVALID_ARGUMENT, `Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${s}() must result in a valid document path, but '${n}' is not because it contains an odd number of segments.`);\n                    const i = new ht(n);\n                    u.push(We(e, i));\n                } else {\n                    const t = al(n, s, c);\n                    u.push(t);\n                }\n            }\n            return new hn(u, r);\n        }\n        /**\n * Parses the given `documentIdValue` into a `ReferenceValue`, throwing\n * appropriate errors if the value is anything other than a `DocumentReference`\n * or `string`, or if the string is malformed.\n */ (t._query, t.firestore._databaseId, i, e, n, s);\n    }\n}\n\nfunction Kl(t, e, n) {\n    if (\"string\" == typeof (n = getModularInstance(n))) {\n        if (\"\" === n) throw new U(q.INVALID_ARGUMENT, \"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.\");\n        if (!Wn(e) && -1 !== n.indexOf(\"/\")) throw new U(q.INVALID_ARGUMENT, `Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);\n        const s = e.path.child(ut.fromString(n));\n        if (!ht.isDocumentKey(s)) throw new U(q.INVALID_ARGUMENT, `Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${s}' is not because it has an odd number of segments (${s.length}).`);\n        return We(t, new ht(s));\n    }\n    if (n instanceof fh) return We(t, n._key);\n    throw new U(q.INVALID_ARGUMENT, `Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${oh(n)}.`);\n}\n\n/**\n * Validates that the value passed into a disjunctive filter satisfies all\n * array requirements.\n */ function Gl(t, e) {\n    if (!Array.isArray(t) || 0 === t.length) throw new U(q.INVALID_ARGUMENT, `Invalid Query. A non-empty array is required for '${e.toString()}' filters.`);\n}\n\n/**\n * Given an operator, returns the set of operators that cannot be used with it.\n *\n * This is not a comprehensive check, and this function should be removed in the\n * long term. Validations should occur in the Firestore backend.\n *\n * Operators in a query must adhere to the following set of rules:\n * 1. Only one inequality per query.\n * 2. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.\n */ function Ql(t, e) {\n    if (e.isInequality()) {\n        const n = zn(t), s = e.field;\n        if (null !== n && !n.isEqual(s)) throw new U(q.INVALID_ARGUMENT, `Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${n.toString()}' and '${s.toString()}'`);\n        const i = jn(t);\n        null !== i && jl(t, s, i);\n    }\n    const n = function(t, e) {\n        for (const n of t) for (const t of n.getFlattenedFilters()) if (e.indexOf(t.op) >= 0) return t.op;\n        return null;\n    }(t.filters, function(t) {\n        switch (t) {\n          case \"!=\" /* Operator.NOT_EQUAL */ :\n            return [ \"!=\" /* Operator.NOT_EQUAL */ , \"not-in\" /* Operator.NOT_IN */ ];\n\n          case \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ :\n          case \"in\" /* Operator.IN */ :\n            return [ \"not-in\" /* Operator.NOT_IN */ ];\n\n          case \"not-in\" /* Operator.NOT_IN */ :\n            return [ \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ , \"in\" /* Operator.IN */ , \"not-in\" /* Operator.NOT_IN */ , \"!=\" /* Operator.NOT_EQUAL */ ];\n\n          default:\n            return [];\n        }\n    }(e.op));\n    if (null !== n) \n    // Special case when it's a duplicate op to give a slightly clearer error message.\n    throw n === e.op ? new U(q.INVALID_ARGUMENT, `Invalid query. You cannot use more than one '${e.op.toString()}' filter.`) : new U(q.INVALID_ARGUMENT, `Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`);\n}\n\nfunction jl(t, e, n) {\n    if (!n.isEqual(e)) throw new U(q.INVALID_ARGUMENT, `Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${e.toString()}' and so you must also use '${e.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${n.toString()}' instead.`);\n}\n\nfunction zl(t, e) {\n    if (!(e instanceof Pl || e instanceof Vl)) throw new U(q.INVALID_ARGUMENT, `Function ${t}() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'.`);\n}\n\nclass Wl {\n    convertValue(t, e = \"none\") {\n        switch (Le(t)) {\n          case 0 /* TypeOrder.NullValue */ :\n            return null;\n\n          case 1 /* TypeOrder.BooleanValue */ :\n            return t.booleanValue;\n\n          case 2 /* TypeOrder.NumberValue */ :\n            return Ce(t.integerValue || t.doubleValue);\n\n          case 3 /* TypeOrder.TimestampValue */ :\n            return this.convertTimestamp(t.timestampValue);\n\n          case 4 /* TypeOrder.ServerTimestampValue */ :\n            return this.convertServerTimestamp(t, e);\n\n          case 5 /* TypeOrder.StringValue */ :\n            return t.stringValue;\n\n          case 6 /* TypeOrder.BlobValue */ :\n            return this.convertBytes(xe(t.bytesValue));\n\n          case 7 /* TypeOrder.RefValue */ :\n            return this.convertReference(t.referenceValue);\n\n          case 8 /* TypeOrder.GeoPointValue */ :\n            return this.convertGeoPoint(t.geoPointValue);\n\n          case 9 /* TypeOrder.ArrayValue */ :\n            return this.convertArray(t.arrayValue, e);\n\n          case 10 /* TypeOrder.ObjectValue */ :\n            return this.convertObject(t.mapValue, e);\n\n          default:\n            throw O();\n        }\n    }\n    convertObject(t, e) {\n        return this.convertObjectMap(t.fields, e);\n    }\n    /**\n     * @internal\n     */    convertObjectMap(t, e = \"none\") {\n        const n = {};\n        return ge(t, ((t, s) => {\n            n[t] = this.convertValue(s, e);\n        })), n;\n    }\n    convertGeoPoint(t) {\n        return new jh(Ce(t.latitude), Ce(t.longitude));\n    }\n    convertArray(t, e) {\n        return (t.values || []).map((t => this.convertValue(t, e)));\n    }\n    convertServerTimestamp(t, e) {\n        switch (e) {\n          case \"previous\":\n            const n = ke(t);\n            return null == n ? null : this.convertValue(n, e);\n\n          case \"estimate\":\n            return this.convertTimestamp(Me(t));\n\n          default:\n            return null;\n        }\n    }\n    convertTimestamp(t) {\n        const e = De(t);\n        return new it(e.seconds, e.nanos);\n    }\n    convertDocumentKey(t, e) {\n        const n = ut.fromString(t);\n        F(ur(n));\n        const s = new Oe(n.get(1), n.get(3)), i = new ht(n.popFirst(5));\n        return s.isEqual(e) || \n        // TODO(b/64130202): Somehow support foreign references.\n        k(`Document ${i} contains a document reference within a different database (${s.projectId}/${s.database}) which is not supported. It will be treated as a reference in the current database (${e.projectId}/${e.database}) instead.`), \n        i;\n    }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Converts custom model object of type T into `DocumentData` by applying the\n * converter if it exists.\n *\n * This function is used when converting user objects to `DocumentData`\n * because we want to provide the user with a more specific error message if\n * their `set()` or fails due to invalid data originating from a `toFirestore()`\n * call.\n */ function Hl(t, e, n) {\n    let s;\n    // Cast to `any` in order to satisfy the union type constraint on\n    // toFirestore().\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    return s = t ? n && (n.merge || n.mergeFields) ? t.toFirestore(e, n) : t.toFirestore(e) : e, \n    s;\n}\n\nclass Jl extends Wl {\n    constructor(t) {\n        super(), this.firestore = t;\n    }\n    convertBytes(t) {\n        return new Uh(t);\n    }\n    convertReference(t) {\n        const e = this.convertDocumentKey(t, this.firestore._databaseId);\n        return new fh(this.firestore, /* converter= */ null, e);\n    }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Create an AggregateField object that can be used to compute the sum of\n * a specified field over a range of documents in the result set of a query.\n * @param field Specifies the field to sum across the result set.\n * @internal TODO (sum/avg) remove when public\n */ function Yl(t) {\n    return new Lh(\"sum\", wl(\"sum\", t));\n}\n\n/**\n * Create an AggregateField object that can be used to compute the average of\n * a specified field over a range of documents in the result set of a query.\n * @param field Specifies the field to average across the result set.\n * @internal TODO (sum/avg) remove when public\n */ function Xl(t) {\n    return new Lh(\"avg\", wl(\"average\", t));\n}\n\n/**\n * Create an AggregateField object that can be used to compute the count of\n * documents in the result set of a query.\n * @internal TODO (sum/avg) remove when public\n */ function Zl() {\n    return new Lh(\"count\");\n}\n\n/**\n * Compares two 'AggregateField` instances for equality.\n *\n * @param left Compare this AggregateField to the `right`.\n * @param right Compare this AggregateField to the `left`.\n * @internal TODO (sum/avg) remove when public\n */ function tf(t, e) {\n    var n, s;\n    return t instanceof Lh && e instanceof Lh && t._aggregateType === e._aggregateType && (null === (n = t._internalFieldPath) || void 0 === n ? void 0 : n.canonicalString()) === (null === (s = e._internalFieldPath) || void 0 === s ? void 0 : s.canonicalString());\n}\n\n/**\n * Compares two `AggregateQuerySnapshot` instances for equality.\n *\n * Two `AggregateQuerySnapshot` instances are considered \"equal\" if they have\n * underlying queries that compare equal, and the same data.\n *\n * @param left - The first `AggregateQuerySnapshot` to compare.\n * @param right - The second `AggregateQuerySnapshot` to compare.\n *\n * @returns `true` if the objects are \"equal\", as defined above, or `false`\n * otherwise.\n */ function ef(t, e) {\n    return ph(t.query, e.query) && deepEqual(t.data(), e.data());\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Metadata about a snapshot, describing the state of the snapshot.\n */ class nf {\n    /** @hideconstructor */\n    constructor(t, e) {\n        this.hasPendingWrites = t, this.fromCache = e;\n    }\n    /**\n     * Returns true if this `SnapshotMetadata` is equal to the provided one.\n     *\n     * @param other - The `SnapshotMetadata` to compare against.\n     * @returns true if this `SnapshotMetadata` is equal to the provided one.\n     */    isEqual(t) {\n        return this.hasPendingWrites === t.hasPendingWrites && this.fromCache === t.fromCache;\n    }\n}\n\n/**\n * A `DocumentSnapshot` contains data read from a document in your Firestore\n * database. The data can be extracted with `.data()` or `.get(<field>)` to\n * get a specific field.\n *\n * For a `DocumentSnapshot` that points to a non-existing document, any data\n * access will return 'undefined'. You can use the `exists()` method to\n * explicitly verify a document's existence.\n */ class sf extends pl {\n    /** @hideconstructor protected */\n    constructor(t, e, n, s, i, r) {\n        super(t, e, n, s, r), this._firestore = t, this._firestoreImpl = t, this.metadata = i;\n    }\n    /**\n     * Returns whether or not the data exists. True if the document exists.\n     */    exists() {\n        return super.exists();\n    }\n    /**\n     * Retrieves all fields in the document as an `Object`. Returns `undefined` if\n     * the document doesn't exist.\n     *\n     * By default, `serverTimestamp()` values that have not yet been\n     * set to their final value will be returned as `null`. You can override\n     * this by passing an options object.\n     *\n     * @param options - An options object to configure how data is retrieved from\n     * the snapshot (for example the desired behavior for server timestamps that\n     * have not yet been set to their final value).\n     * @returns An `Object` containing all fields in the document or `undefined` if\n     * the document doesn't exist.\n     */    data(t = {}) {\n        if (this._document) {\n            if (this._converter) {\n                // We only want to use the converter and create a new DocumentSnapshot\n                // if a converter has been provided.\n                const e = new rf(this._firestore, this._userDataWriter, this._key, this._document, this.metadata, \n                /* converter= */ null);\n                return this._converter.fromFirestore(e, t);\n            }\n            return this._userDataWriter.convertValue(this._document.data.value, t.serverTimestamps);\n        }\n    }\n    /**\n     * Retrieves the field specified by `fieldPath`. Returns `undefined` if the\n     * document or field doesn't exist.\n     *\n     * By default, a `serverTimestamp()` that has not yet been set to\n     * its final value will be returned as `null`. You can override this by\n     * passing an options object.\n     *\n     * @param fieldPath - The path (for example 'foo' or 'foo.bar') to a specific\n     * field.\n     * @param options - An options object to configure how the field is retrieved\n     * from the snapshot (for example the desired behavior for server timestamps\n     * that have not yet been set to their final value).\n     * @returns The data at the specified field location or undefined if no such\n     * field exists in the document.\n     */\n    // We are using `any` here to avoid an explicit cast by our users.\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    get(t, e = {}) {\n        if (this._document) {\n            const n = this._document.data.field(Tl(\"DocumentSnapshot.get\", t));\n            if (null !== n) return this._userDataWriter.convertValue(n, e.serverTimestamps);\n        }\n    }\n}\n\n/**\n * A `QueryDocumentSnapshot` contains data read from a document in your\n * Firestore database as part of a query. The document is guaranteed to exist\n * and its data can be extracted with `.data()` or `.get(<field>)` to get a\n * specific field.\n *\n * A `QueryDocumentSnapshot` offers the same API surface as a\n * `DocumentSnapshot`. Since query results contain only existing documents, the\n * `exists` property will always be true and `data()` will never return\n * 'undefined'.\n */ class rf extends sf {\n    /**\n     * Retrieves all fields in the document as an `Object`.\n     *\n     * By default, `serverTimestamp()` values that have not yet been\n     * set to their final value will be returned as `null`. You can override\n     * this by passing an options object.\n     *\n     * @override\n     * @param options - An options object to configure how data is retrieved from\n     * the snapshot (for example the desired behavior for server timestamps that\n     * have not yet been set to their final value).\n     * @returns An `Object` containing all fields in the document.\n     */\n    data(t = {}) {\n        return super.data(t);\n    }\n}\n\n/**\n * A `QuerySnapshot` contains zero or more `DocumentSnapshot` objects\n * representing the results of a query. The documents can be accessed as an\n * array via the `docs` property or enumerated using the `forEach` method. The\n * number of documents can be determined via the `empty` and `size`\n * properties.\n */ class of {\n    /** @hideconstructor */\n    constructor(t, e, n, s) {\n        this._firestore = t, this._userDataWriter = e, this._snapshot = s, this.metadata = new nf(s.hasPendingWrites, s.fromCache), \n        this.query = n;\n    }\n    /** An array of all the documents in the `QuerySnapshot`. */    get docs() {\n        const t = [];\n        return this.forEach((e => t.push(e))), t;\n    }\n    /** The number of documents in the `QuerySnapshot`. */    get size() {\n        return this._snapshot.docs.size;\n    }\n    /** True if there are no documents in the `QuerySnapshot`. */    get empty() {\n        return 0 === this.size;\n    }\n    /**\n     * Enumerates all of the documents in the `QuerySnapshot`.\n     *\n     * @param callback - A callback to be called with a `QueryDocumentSnapshot` for\n     * each document in the snapshot.\n     * @param thisArg - The `this` binding for the callback.\n     */    forEach(t, e) {\n        this._snapshot.docs.forEach((n => {\n            t.call(e, new rf(this._firestore, this._userDataWriter, n.key, n, new nf(this._snapshot.mutatedKeys.has(n.key), this._snapshot.fromCache), this.query.converter));\n        }));\n    }\n    /**\n     * Returns an array of the documents changes since the last snapshot. If this\n     * is the first snapshot, all documents will be in the list as 'added'\n     * changes.\n     *\n     * @param options - `SnapshotListenOptions` that control whether metadata-only\n     * changes (i.e. only `DocumentSnapshot.metadata` changed) should trigger\n     * snapshot events.\n     */    docChanges(t = {}) {\n        const e = !!t.includeMetadataChanges;\n        if (e && this._snapshot.excludesMetadataChanges) throw new U(q.INVALID_ARGUMENT, \"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().\");\n        return this._cachedChanges && this._cachedChangesIncludeMetadataChanges === e || (this._cachedChanges = \n        /** Calculates the array of `DocumentChange`s for a given `ViewSnapshot`. */\n        function(t, e) {\n            if (t._snapshot.oldDocs.isEmpty()) {\n                let e = 0;\n                return t._snapshot.docChanges.map((n => {\n                    const s = new rf(t._firestore, t._userDataWriter, n.doc.key, n.doc, new nf(t._snapshot.mutatedKeys.has(n.doc.key), t._snapshot.fromCache), t.query.converter);\n                    return n.doc, {\n                        type: \"added\",\n                        doc: s,\n                        oldIndex: -1,\n                        newIndex: e++\n                    };\n                }));\n            }\n            {\n                // A `DocumentSet` that is updated incrementally as changes are applied to use\n                // to lookup the index of a document.\n                let n = t._snapshot.oldDocs;\n                return t._snapshot.docChanges.filter((t => e || 3 /* ChangeType.Metadata */ !== t.type)).map((e => {\n                    const s = new rf(t._firestore, t._userDataWriter, e.doc.key, e.doc, new nf(t._snapshot.mutatedKeys.has(e.doc.key), t._snapshot.fromCache), t.query.converter);\n                    let i = -1, r = -1;\n                    return 0 /* ChangeType.Added */ !== e.type && (i = n.indexOf(e.doc.key), n = n.delete(e.doc.key)), \n                    1 /* ChangeType.Removed */ !== e.type && (n = n.add(e.doc), r = n.indexOf(e.doc.key)), \n                    {\n                        type: uf(e.type),\n                        doc: s,\n                        oldIndex: i,\n                        newIndex: r\n                    };\n                }));\n            }\n        }(this, e), this._cachedChangesIncludeMetadataChanges = e), this._cachedChanges;\n    }\n}\n\nfunction uf(t) {\n    switch (t) {\n      case 0 /* ChangeType.Added */ :\n        return \"added\";\n\n      case 2 /* ChangeType.Modified */ :\n      case 3 /* ChangeType.Metadata */ :\n        return \"modified\";\n\n      case 1 /* ChangeType.Removed */ :\n        return \"removed\";\n\n      default:\n        return O();\n    }\n}\n\n// TODO(firestoreexp): Add tests for snapshotEqual with different snapshot\n// metadata\n/**\n * Returns true if the provided snapshots are equal.\n *\n * @param left - A snapshot to compare.\n * @param right - A snapshot to compare.\n * @returns true if the snapshots are equal.\n */ function cf(t, e) {\n    return t instanceof sf && e instanceof sf ? t._firestore === e._firestore && t._key.isEqual(e._key) && (null === t._document ? null === e._document : t._document.isEqual(e._document)) && t._converter === e._converter : t instanceof of && e instanceof of && (t._firestore === e._firestore && ph(t.query, e.query) && t.metadata.isEqual(e.metadata) && t._snapshot.isEqual(e._snapshot));\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Reads the document referred to by this `DocumentReference`.\n *\n * Note: `getDoc()` attempts to provide up-to-date data when possible by waiting\n * for data from the server, but it may return cached data or fail if you are\n * offline and the server cannot be reached. To specify this behavior, invoke\n * {@link getDocFromCache} or {@link getDocFromServer}.\n *\n * @param reference - The reference of the document to fetch.\n * @returns A Promise resolved with a `DocumentSnapshot` containing the\n * current document contents.\n */ function af(t) {\n    t = uh(t, fh);\n    const e = uh(t.firestore, vh);\n    return za(bh(e), t._key).then((n => Af(e, t, n)));\n}\n\nclass hf extends Wl {\n    constructor(t) {\n        super(), this.firestore = t;\n    }\n    convertBytes(t) {\n        return new Uh(t);\n    }\n    convertReference(t) {\n        const e = this.convertDocumentKey(t, this.firestore._databaseId);\n        return new fh(this.firestore, /* converter= */ null, e);\n    }\n}\n\n/**\n * Reads the document referred to by this `DocumentReference` from cache.\n * Returns an error if the document is not currently cached.\n *\n * @returns A `Promise` resolved with a `DocumentSnapshot` containing the\n * current document contents.\n */ function lf(t) {\n    t = uh(t, fh);\n    const e = uh(t.firestore, vh), n = bh(e), s = new hf(e);\n    return ja(n, t._key).then((n => new sf(e, s, t._key, n, new nf(null !== n && n.hasLocalMutations, \n    /* fromCache= */ !0), t.converter)));\n}\n\n/**\n * Reads the document referred to by this `DocumentReference` from the server.\n * Returns an error if the network is not available.\n *\n * @returns A `Promise` resolved with a `DocumentSnapshot` containing the\n * current document contents.\n */ function ff(t) {\n    t = uh(t, fh);\n    const e = uh(t.firestore, vh);\n    return za(bh(e), t._key, {\n        source: \"server\"\n    }).then((n => Af(e, t, n)));\n}\n\n/**\n * Executes the query and returns the results as a `QuerySnapshot`.\n *\n * Note: `getDocs()` attempts to provide up-to-date data when possible by\n * waiting for data from the server, but it may return cached data or fail if\n * you are offline and the server cannot be reached. To specify this behavior,\n * invoke {@link getDocsFromCache} or {@link getDocsFromServer}.\n *\n * @returns A `Promise` that will be resolved with the results of the query.\n */ function df(t) {\n    t = uh(t, dh);\n    const e = uh(t.firestore, vh), n = bh(e), s = new hf(e);\n    return El(t._query), Ha(n, t._query).then((n => new of(e, s, t, n)));\n}\n\n/**\n * Executes the query and returns the results as a `QuerySnapshot` from cache.\n * Returns an empty result set if no documents matching the query are currently\n * cached.\n *\n * @returns A `Promise` that will be resolved with the results of the query.\n */ function wf(t) {\n    t = uh(t, dh);\n    const e = uh(t.firestore, vh), n = bh(e), s = new hf(e);\n    return Wa(n, t._query).then((n => new of(e, s, t, n)));\n}\n\n/**\n * Executes the query and returns the results as a `QuerySnapshot` from the\n * server. Returns an error if the network is not available.\n *\n * @returns A `Promise` that will be resolved with the results of the query.\n */ function _f(t) {\n    t = uh(t, dh);\n    const e = uh(t.firestore, vh), n = bh(e), s = new hf(e);\n    return Ha(n, t._query, {\n        source: \"server\"\n    }).then((n => new of(e, s, t, n)));\n}\n\nfunction mf(t, e, n) {\n    t = uh(t, fh);\n    const s = uh(t.firestore, vh), i = Hl(t.converter, e, n);\n    return Ef(s, [ tl(Zh(s), \"setDoc\", t._key, i, null !== t.converter, n).toMutation(t._key, Fs.none()) ]);\n}\n\nfunction gf(t, e, n, ...s) {\n    t = uh(t, fh);\n    const i = uh(t.firestore, vh), r = Zh(i);\n    let o;\n    o = \"string\" == typeof (\n    // For Compat types, we have to \"extract\" the underlying types before\n    // performing validation.\n    e = getModularInstance(e)) || e instanceof Kh ? cl(r, \"updateDoc\", t._key, e, n, s) : ul(r, \"updateDoc\", t._key, e);\n    return Ef(i, [ o.toMutation(t._key, Fs.exists(!0)) ]);\n}\n\n/**\n * Deletes the document referred to by the specified `DocumentReference`.\n *\n * @param reference - A reference to the document to delete.\n * @returns A Promise resolved once the document has been successfully\n * deleted from the backend (note that it won't resolve while you're offline).\n */ function yf(t) {\n    return Ef(uh(t.firestore, vh), [ new Ys(t._key, Fs.none()) ]);\n}\n\n/**\n * Add a new document to specified `CollectionReference` with the given data,\n * assigning it a document ID automatically.\n *\n * @param reference - A reference to the collection to add this document to.\n * @param data - An Object containing the data for the new document.\n * @returns A `Promise` resolved with a `DocumentReference` pointing to the\n * newly created document after it has been written to the backend (Note that it\n * won't resolve while you're offline).\n */ function pf(t, e) {\n    const n = uh(t.firestore, vh), s = gh(t), i = Hl(t.converter, e);\n    return Ef(n, [ tl(Zh(t.firestore), \"addDoc\", s._key, i, null !== t.converter, {}).toMutation(s._key, Fs.exists(!1)) ]).then((() => s));\n}\n\nfunction If(t, ...e) {\n    var n, s, i;\n    t = getModularInstance(t);\n    let r = {\n        includeMetadataChanges: !1\n    }, o = 0;\n    \"object\" != typeof e[o] || Th(e[o]) || (r = e[o], o++);\n    const u = {\n        includeMetadataChanges: r.includeMetadataChanges\n    };\n    if (Th(e[o])) {\n        const t = e[o];\n        e[o] = null === (n = t.next) || void 0 === n ? void 0 : n.bind(t), e[o + 1] = null === (s = t.error) || void 0 === s ? void 0 : s.bind(t), \n        e[o + 2] = null === (i = t.complete) || void 0 === i ? void 0 : i.bind(t);\n    }\n    let c, a, h;\n    if (t instanceof fh) a = uh(t.firestore, vh), h = Gn(t._key.path), c = {\n        next: n => {\n            e[o] && e[o](Af(a, t, n));\n        },\n        error: e[o + 1],\n        complete: e[o + 2]\n    }; else {\n        const n = uh(t, dh);\n        a = uh(n.firestore, vh), h = n._query;\n        const s = new hf(a);\n        c = {\n            next: t => {\n                e[o] && e[o](new of(a, s, n, t));\n            },\n            error: e[o + 1],\n            complete: e[o + 2]\n        }, El(t._query);\n    }\n    return function(t, e, n, s) {\n        const i = new Va(s), r = new Nc(e, i, n);\n        return t.asyncQueue.enqueueAndForget((async () => Vc(await Ka(t), r))), () => {\n            i.Dc(), t.asyncQueue.enqueueAndForget((async () => Sc(await Ka(t), r)));\n        };\n    }(bh(a), h, u, c);\n}\n\nfunction Tf(t, e) {\n    return Ja(bh(t = uh(t, vh)), Th(e) ? e : {\n        next: e\n    });\n}\n\n/**\n * Locally writes `mutations` on the async queue.\n * @internal\n */ function Ef(t, e) {\n    return function(t, e) {\n        const n = new K;\n        return t.asyncQueue.enqueueAndForget((async () => zc(await qa(t), e, n))), n.promise;\n    }(bh(t), e);\n}\n\n/**\n * Converts a {@link ViewSnapshot} that contains the single document specified by `ref`\n * to a {@link DocumentSnapshot}.\n */ function Af(t, e, n) {\n    const s = n.docs.get(e._key), i = new hf(t);\n    return new sf(t, i, e._key, s, new nf(n.hasPendingWrites, n.fromCache), e.converter);\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Calculates the number of documents in the result set of the given query,\n * without actually downloading the documents.\n *\n * Using this function to count the documents is efficient because only the\n * final count, not the documents' data, is downloaded. This function can even\n * count the documents if the result set would be prohibitively large to\n * download entirely (e.g. thousands of documents).\n *\n * The result received from the server is presented, unaltered, without\n * considering any local state. That is, documents in the local cache are not\n * taken into consideration, neither are local modifications not yet\n * synchronized with the server. Previously-downloaded results, if any, are not\n * used: every request using this source necessarily involves a round trip to\n * the server.\n *\n * @param query - The query whose result set size to calculate.\n * @returns A Promise that will be resolved with the count; the count can be\n * retrieved from `snapshot.data().count`, where `snapshot` is the\n * `AggregateQuerySnapshot` to which the returned Promise resolves.\n */ function vf(t) {\n    return Rf(t, {\n        count: Zl()\n    });\n}\n\n/**\n * Calculates the specified aggregations over the documents in the result\n * set of the given query, without actually downloading the documents.\n *\n * Using this function to perform aggregations is efficient because only the\n * final aggregation values, not the documents' data, is downloaded. This\n * function can even perform aggregations of the documents if the result set\n * would be prohibitively large to download entirely (e.g. thousands of documents).\n *\n * The result received from the server is presented, unaltered, without\n * considering any local state. That is, documents in the local cache are not\n * taken into consideration, neither are local modifications not yet\n * synchronized with the server. Previously-downloaded results, if any, are not\n * used: every request using this source necessarily involves a round trip to\n * the server.\n *\n * @param query The query whose result set to aggregate over.\n * @param aggregateSpec An `AggregateSpec` object that specifies the aggregates\n * to perform over the result set. The AggregateSpec specifies aliases for each\n * aggregate, which can be used to retrieve the aggregate result.\n * @example\n * ```typescript\n * const aggregateSnapshot = await getAggregateFromServer(query, {\n *   countOfDocs: count(),\n *   totalHours: sum('hours'),\n *   averageScore: average('score')\n * });\n *\n * const countOfDocs: number = aggregateSnapshot.data().countOfDocs;\n * const totalHours: number = aggregateSnapshot.data().totalHours;\n * const averageScore: number | null = aggregateSnapshot.data().averageScore;\n * ```\n * @internal TODO (sum/avg) remove when public\n */ function Rf(t, e) {\n    const n = uh(t.firestore, vh), s = bh(n), i = function(t, e) {\n        const n = [];\n        for (const s in t) Object.prototype.hasOwnProperty.call(t, s) && n.push(e(t[s], s, t));\n        return n;\n    }(e, ((t, e) => new ni(e, t._aggregateType, t._internalFieldPath)));\n    // Run the aggregation and convert the results\n    return function(t, e, n) {\n        const s = new K;\n        return t.asyncQueue.enqueueAndForget((async () => {\n            // TODO (sum/avg) should we update this to use the event manager?\n            // Implement and call executeAggregateQueryViaSnapshotListener, similar\n            // to the implementation in firestoreClientGetDocumentsViaSnapshotListener\n            // above\n            try {\n                // TODO(b/277628384): check `canUseNetwork()` and handle multi-tab.\n                const i = await Ua(t);\n                s.resolve(Gu(i, e, n));\n            } catch (t) {\n                s.reject(t);\n            }\n        })), s.promise;\n    }(s, t._query, i).then((e => \n    /**\n * Converts the core aggregration result to an `AggregateQuerySnapshot`\n * that can be returned to the consumer.\n * @param query\n * @param aggregateResult Core aggregation result\n * @internal\n */\n    function(t, e, n) {\n        const s = new hf(t);\n        return new qh(e, s, n);\n    }\n    /**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ (n, t, e)));\n}\n\nclass Pf {\n    constructor(t) {\n        this.kind = \"memory\", this._onlineComponentProvider = new Pa, (null == t ? void 0 : t.garbageCollector) ? this._offlineComponentProvider = t.garbageCollector._offlineComponentProvider : this._offlineComponentProvider = new Ea;\n    }\n    toJSON() {\n        return {\n            kind: this.kind\n        };\n    }\n}\n\nclass bf {\n    constructor(t) {\n        let e;\n        this.kind = \"persistent\", (null == t ? void 0 : t.tabManager) ? (t.tabManager._initialize(t), \n        e = t.tabManager) : (e = $f(void 0), e._initialize(t)), this._onlineComponentProvider = e._onlineComponentProvider, \n        this._offlineComponentProvider = e._offlineComponentProvider;\n    }\n    toJSON() {\n        return {\n            kind: this.kind\n        };\n    }\n}\n\nclass Vf {\n    constructor() {\n        this.kind = \"memoryEager\", this._offlineComponentProvider = new Ea;\n    }\n    toJSON() {\n        return {\n            kind: this.kind\n        };\n    }\n}\n\nclass Sf {\n    constructor(t) {\n        this.kind = \"memoryLru\", this._offlineComponentProvider = new Aa(t);\n    }\n    toJSON() {\n        return {\n            kind: this.kind\n        };\n    }\n}\n\n/**\n * Creates an instance of `MemoryEagerGarbageCollector`. This is also the\n * default garbage collector unless it is explicitly specified otherwise.\n */ function Df() {\n    return new Vf;\n}\n\n/**\n * Creates an instance of `MemoryLruGarbageCollector`.\n *\n * A target size can be specified as part of the setting parameter. The\n * collector will start deleting documents once the cache size exceeds\n * the given size. The default cache size is 40MB (40 * 1024 * 1024 bytes).\n */ function Cf(t) {\n    return new Sf(null == t ? void 0 : t.cacheSizeBytes);\n}\n\n/**\n * Creates an instance of `MemoryLocalCache`. The instance can be set to\n * `FirestoreSettings.cache` to tell the SDK which cache layer to use.\n */ function xf(t) {\n    return new Pf(t);\n}\n\n/**\n * Creates an instance of `PersistentLocalCache`. The instance can be set to\n * `FirestoreSettings.cache` to tell the SDK which cache layer to use.\n *\n * Persistent cache cannot be used in a Node.js environment.\n */ function Nf(t) {\n    return new bf(t);\n}\n\nclass kf {\n    constructor(t) {\n        this.forceOwnership = t, this.kind = \"persistentSingleTab\";\n    }\n    toJSON() {\n        return {\n            kind: this.kind\n        };\n    }\n    /**\n     * @internal\n     */    _initialize(t) {\n        this._onlineComponentProvider = new Pa, this._offlineComponentProvider = new va(this._onlineComponentProvider, null == t ? void 0 : t.cacheSizeBytes, this.forceOwnership);\n    }\n}\n\nclass Mf {\n    constructor() {\n        this.kind = \"PersistentMultipleTab\";\n    }\n    toJSON() {\n        return {\n            kind: this.kind\n        };\n    }\n    /**\n     * @internal\n     */    _initialize(t) {\n        this._onlineComponentProvider = new Pa, this._offlineComponentProvider = new Ra(this._onlineComponentProvider, null == t ? void 0 : t.cacheSizeBytes);\n    }\n}\n\n/**\n * Creates an instance of `PersistentSingleTabManager`.\n *\n * @param settings Configures the created tab manager.\n */ function $f(t) {\n    return new kf(null == t ? void 0 : t.forceOwnership);\n}\n\n/**\n * Creates an instance of `PersistentMultipleTabManager`.\n */ function Of() {\n    return new Mf;\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ const Ff = {\n    maxAttempts: 5\n};\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A write batch, used to perform multiple writes as a single atomic unit.\n *\n * A `WriteBatch` object can be acquired by calling {@link writeBatch}. It\n * provides methods for adding writes to the write batch. None of the writes\n * will be committed (or visible locally) until {@link WriteBatch.commit} is\n * called.\n */\nclass Bf {\n    /** @hideconstructor */\n    constructor(t, e) {\n        this._firestore = t, this._commitHandler = e, this._mutations = [], this._committed = !1, \n        this._dataReader = Zh(t);\n    }\n    set(t, e, n) {\n        this._verifyNotCommitted();\n        const s = Lf(t, this._firestore), i = Hl(s.converter, e, n), r = tl(this._dataReader, \"WriteBatch.set\", s._key, i, null !== s.converter, n);\n        return this._mutations.push(r.toMutation(s._key, Fs.none())), this;\n    }\n    update(t, e, n, ...s) {\n        this._verifyNotCommitted();\n        const i = Lf(t, this._firestore);\n        // For Compat types, we have to \"extract\" the underlying types before\n        // performing validation.\n                let r;\n        return r = \"string\" == typeof (e = getModularInstance(e)) || e instanceof Kh ? cl(this._dataReader, \"WriteBatch.update\", i._key, e, n, s) : ul(this._dataReader, \"WriteBatch.update\", i._key, e), \n        this._mutations.push(r.toMutation(i._key, Fs.exists(!0))), this;\n    }\n    /**\n     * Deletes the document referred to by the provided {@link DocumentReference}.\n     *\n     * @param documentRef - A reference to the document to be deleted.\n     * @returns This `WriteBatch` instance. Used for chaining method calls.\n     */    delete(t) {\n        this._verifyNotCommitted();\n        const e = Lf(t, this._firestore);\n        return this._mutations = this._mutations.concat(new Ys(e._key, Fs.none())), this;\n    }\n    /**\n     * Commits all of the writes in this write batch as a single atomic unit.\n     *\n     * The result of these writes will only be reflected in document reads that\n     * occur after the returned promise resolves. If the client is offline, the\n     * write fails. If you would like to see local modifications or buffer writes\n     * until the client is online, use the full Firestore SDK.\n     *\n     * @returns A `Promise` resolved once all of the writes in the batch have been\n     * successfully written to the backend as an atomic unit (note that it won't\n     * resolve while you're offline).\n     */    commit() {\n        return this._verifyNotCommitted(), this._committed = !0, this._mutations.length > 0 ? this._commitHandler(this._mutations) : Promise.resolve();\n    }\n    _verifyNotCommitted() {\n        if (this._committed) throw new U(q.FAILED_PRECONDITION, \"A write batch can no longer be used after commit() has been called.\");\n    }\n}\n\nfunction Lf(t, e) {\n    if ((t = getModularInstance(t)).firestore !== e) throw new U(q.INVALID_ARGUMENT, \"Provided document reference is from a different Firestore instance.\");\n    return t;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// TODO(mrschmidt) Consider using `BaseTransaction` as the base class in the\n// legacy SDK.\n/**\n * A reference to a transaction.\n *\n * The `Transaction` object passed to a transaction's `updateFunction` provides\n * the methods to read and write data within the transaction context. See\n * {@link runTransaction}.\n */\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A reference to a transaction.\n *\n * The `Transaction` object passed to a transaction's `updateFunction` provides\n * the methods to read and write data within the transaction context. See\n * {@link runTransaction}.\n */\nclass qf extends class {\n    /** @hideconstructor */\n    constructor(t, e) {\n        this._firestore = t, this._transaction = e, this._dataReader = Zh(t);\n    }\n    /**\n     * Reads the document referenced by the provided {@link DocumentReference}.\n     *\n     * @param documentRef - A reference to the document to be read.\n     * @returns A `DocumentSnapshot` with the read data.\n     */    get(t) {\n        const e = Lf(t, this._firestore), n = new Jl(this._firestore);\n        return this._transaction.lookup([ e._key ]).then((t => {\n            if (!t || 1 !== t.length) return O();\n            const s = t[0];\n            if (s.isFoundDocument()) return new pl(this._firestore, n, s.key, s, e.converter);\n            if (s.isNoDocument()) return new pl(this._firestore, n, e._key, null, e.converter);\n            throw O();\n        }));\n    }\n    set(t, e, n) {\n        const s = Lf(t, this._firestore), i = Hl(s.converter, e, n), r = tl(this._dataReader, \"Transaction.set\", s._key, i, null !== s.converter, n);\n        return this._transaction.set(s._key, r), this;\n    }\n    update(t, e, n, ...s) {\n        const i = Lf(t, this._firestore);\n        // For Compat types, we have to \"extract\" the underlying types before\n        // performing validation.\n                let r;\n        return r = \"string\" == typeof (e = getModularInstance(e)) || e instanceof Kh ? cl(this._dataReader, \"Transaction.update\", i._key, e, n, s) : ul(this._dataReader, \"Transaction.update\", i._key, e), \n        this._transaction.update(i._key, r), this;\n    }\n    /**\n     * Deletes the document referred to by the provided {@link DocumentReference}.\n     *\n     * @param documentRef - A reference to the document to be deleted.\n     * @returns This `Transaction` instance. Used for chaining method calls.\n     */    delete(t) {\n        const e = Lf(t, this._firestore);\n        return this._transaction.delete(e._key), this;\n    }\n} {\n    // This class implements the same logic as the Transaction API in the Lite SDK\n    // but is subclassed in order to return its own DocumentSnapshot types.\n    /** @hideconstructor */\n    constructor(t, e) {\n        super(t, e), this._firestore = t;\n    }\n    /**\n     * Reads the document referenced by the provided {@link DocumentReference}.\n     *\n     * @param documentRef - A reference to the document to be read.\n     * @returns A `DocumentSnapshot` with the read data.\n     */    get(t) {\n        const e = Lf(t, this._firestore), n = new hf(this._firestore);\n        return super.get(t).then((t => new sf(this._firestore, n, e._key, t._document, new nf(\n        /* hasPendingWrites= */ !1, \n        /* fromCache= */ !1), e.converter)));\n    }\n}\n\n/**\n * Executes the given `updateFunction` and then attempts to commit the changes\n * applied within the transaction. If any document read within the transaction\n * has changed, Cloud Firestore retries the `updateFunction`. If it fails to\n * commit after 5 attempts, the transaction fails.\n *\n * The maximum number of writes allowed in a single transaction is 500.\n *\n * @param firestore - A reference to the Firestore database to run this\n * transaction against.\n * @param updateFunction - The function to execute within the transaction\n * context.\n * @param options - An options object to configure maximum number of attempts to\n * commit.\n * @returns If the transaction completed successfully or was explicitly aborted\n * (the `updateFunction` returned a failed promise), the promise returned by the\n * `updateFunction `is returned here. Otherwise, if the transaction failed, a\n * rejected promise with the corresponding failure error is returned.\n */ function Uf(t, e, n) {\n    t = uh(t, vh);\n    const s = Object.assign(Object.assign({}, Ff), n);\n    !function(t) {\n        if (t.maxAttempts < 1) throw new U(q.INVALID_ARGUMENT, \"Max attempts must be at least 1\");\n    }(s);\n    return function(t, e, n) {\n        const s = new K;\n        return t.asyncQueue.enqueueAndForget((async () => {\n            const i = await Ua(t);\n            new Ca(t.asyncQueue, i, n, e, s).run();\n        })), s.promise;\n    }(bh(t), (n => e(new qf(t, n))), s);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Returns a sentinel for use with {@link @firebase/firestore/lite#(updateDoc:1)} or\n * {@link @firebase/firestore/lite#(setDoc:1)} with `{merge: true}` to mark a field for deletion.\n */ function Kf() {\n    return new el(\"deleteField\");\n}\n\n/**\n * Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to\n * include a server-generated timestamp in the written data.\n */ function Gf() {\n    return new sl(\"serverTimestamp\");\n}\n\n/**\n * Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link\n * @firebase/firestore/lite#(updateDoc:1)} that tells the server to union the given elements with any array\n * value that already exists on the server. Each specified element that doesn't\n * already exist in the array will be added to the end. If the field being\n * modified is not already an array it will be overwritten with an array\n * containing exactly the specified elements.\n *\n * @param elements - The elements to union into the array.\n * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or\n * `updateDoc()`.\n */ function Qf(...t) {\n    // NOTE: We don't actually parse the data until it's used in set() or\n    // update() since we'd need the Firestore instance to do this.\n    return new il(\"arrayUnion\", t);\n}\n\n/**\n * Returns a special value that can be used with {@link (setDoc:1)} or {@link\n * updateDoc:1} that tells the server to remove the given elements from any\n * array value that already exists on the server. All instances of each element\n * specified will be removed from the array. If the field being modified is not\n * already an array it will be overwritten with an empty array.\n *\n * @param elements - The elements to remove from the array.\n * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or\n * `updateDoc()`\n */ function jf(...t) {\n    // NOTE: We don't actually parse the data until it's used in set() or\n    // update() since we'd need the Firestore instance to do this.\n    return new rl(\"arrayRemove\", t);\n}\n\n/**\n * Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link\n * @firebase/firestore/lite#(updateDoc:1)} that tells the server to increment the field's current value by\n * the given value.\n *\n * If either the operand or the current field value uses floating point\n * precision, all arithmetic follows IEEE 754 semantics. If both values are\n * integers, values outside of JavaScript's safe number range\n * (`Number.MIN_SAFE_INTEGER` to `Number.MAX_SAFE_INTEGER`) are also subject to\n * precision loss. Furthermore, once processed by the Firestore backend, all\n * integer operations are capped between -2^63 and 2^63-1.\n *\n * If the current field value is not of type `number`, or if the field does not\n * yet exist, the transformation sets the field to the given value.\n *\n * @param n - The value to increment by.\n * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or\n * `updateDoc()`\n */ function zf(t) {\n    return new ol(\"increment\", t);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Creates a write batch, used for performing multiple writes as a single\n * atomic operation. The maximum number of writes allowed in a single {@link WriteBatch}\n * is 500.\n *\n * Unlike transactions, write batches are persisted offline and therefore are\n * preferable when you don't need to condition your writes on read data.\n *\n * @returns A {@link WriteBatch} that can be used to atomically execute multiple\n * writes.\n */ function Wf(t) {\n    return bh(t = uh(t, vh)), new Bf(t, (e => Ef(t, e)));\n}\n\n/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ function Hf(t, e) {\n    var n;\n    const s = bh(t = uh(t, vh));\n    if (!s._uninitializedComponentsProvider || \"memory\" === (null === (n = s._uninitializedComponentsProvider) || void 0 === n ? void 0 : n._offlineKind)) \n    // PORTING NOTE: We don't return an error if the user has not enabled\n    // persistence since `enableIndexeddbPersistence()` can fail on the Web.\n    return M(\"Cannot enable indexes when persistence is disabled\"), Promise.resolve();\n    const i = function(t) {\n        const e = \"string\" == typeof t ? function(t) {\n            try {\n                return JSON.parse(t);\n            } catch (t) {\n                throw new U(q.INVALID_ARGUMENT, \"Failed to parse JSON: \" + (null == t ? void 0 : t.message));\n            }\n        }(t) : t, n = [];\n        if (Array.isArray(e.indexes)) for (const t of e.indexes) {\n            const e = Jf(t, \"collectionGroup\"), s = [];\n            if (Array.isArray(t.fields)) for (const e of t.fields) {\n                const t = ml(\"setIndexConfiguration\", Jf(e, \"fieldPath\"));\n                \"CONTAINS\" === e.arrayConfig ? s.push(new _t(t, 2 /* IndexKind.CONTAINS */)) : \"ASCENDING\" === e.order ? s.push(new _t(t, 0 /* IndexKind.ASCENDING */)) : \"DESCENDING\" === e.order && s.push(new _t(t, 1 /* IndexKind.DESCENDING */));\n            }\n            n.push(new lt(lt.UNKNOWN_ID, e, s, gt.empty()));\n        }\n        return n;\n    }(e);\n    return Za(s, i);\n}\n\nfunction Jf(t, e) {\n    if (\"string\" != typeof t[e]) throw new U(q.INVALID_ARGUMENT, \"Missing string value for: \" + e);\n    return t[e];\n}\n\n/**\n * Cloud Firestore\n *\n * @packageDocumentation\n */ !function(t, e = !0) {\n    !function(t) {\n        S = t;\n    }(SDK_VERSION), _registerComponent(new Component(\"firestore\", ((t, {instanceIdentifier: n, options: s}) => {\n        const i = t.getProvider(\"app\").getImmediate(), r = new vh(new z(t.getProvider(\"auth-internal\")), new Y(t.getProvider(\"app-check-internal\")), function(t, e) {\n            if (!Object.prototype.hasOwnProperty.apply(t.options, [ \"projectId\" ])) throw new U(q.INVALID_ARGUMENT, '\"projectId\" not provided in firebase.initializeApp.');\n            return new Oe(t.options.projectId, e);\n        }(i, n), i);\n        return s = Object.assign({\n            useFetchStreams: e\n        }, s), r._setSettings(s), r;\n    }), \"PUBLIC\").setMultipleInstances(!0)), registerVersion(b, \"3.13.0\", t), \n    // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\n    registerVersion(b, \"3.13.0\", \"esm2017\");\n}();\n\nexport { Wl as AbstractUserDataWriter, Lh as AggregateField, qh as AggregateQuerySnapshot, Uh as Bytes, Ah as CACHE_SIZE_UNLIMITED, wh as CollectionReference, fh as DocumentReference, sf as DocumentSnapshot, Kh as FieldPath, Qh as FieldValue, vh as Firestore, U as FirestoreError, jh as GeoPoint, Eh as LoadBundleTask, dh as Query, Vl as QueryCompositeFilterConstraint, vl as QueryConstraint, rf as QueryDocumentSnapshot, Bl as QueryEndAtConstraint, Pl as QueryFieldFilterConstraint, Nl as QueryLimitConstraint, Cl as QueryOrderByConstraint, of as QuerySnapshot, $l as QueryStartAtConstraint, nf as SnapshotMetadata, it as Timestamp, qf as Transaction, Bf as WriteBatch, Oe as _DatabaseId, ht as _DocumentKey, X as _EmptyAppCheckTokenProvider, Q as _EmptyAuthCredentialsProvider, at as _FieldPath, ci as _TestingHooks, uh as _cast, B as _debugAssert, be as _isBase64Available, M as _logWarn, sh as _validateIsNotUsedTogether, pf as addDoc, tf as aggregateFieldEqual, ef as aggregateQuerySnapshotEqual, Dl as and, jf as arrayRemove, Qf as arrayUnion, Xl as average, xh as clearIndexedDbPersistence, _h as collection, mh as collectionGroup, lh as connectFirestoreEmulator, Zl as count, yf as deleteDoc, Kf as deleteField, Mh as disableNetwork, gh as doc, Gh as documentId, Sh as enableIndexedDbPersistence, Dh as enableMultiTabIndexedDbPersistence, kh as enableNetwork, ql as endAt, Ll as endBefore, bh as ensureFirestoreConfigured, Ef as executeWrite, Rf as getAggregateFromServer, vf as getCountFromServer, af as getDoc, lf as getDocFromCache, ff as getDocFromServer, df as getDocs, wf as getDocsFromCache, _f as getDocsFromServer, Ph as getFirestore, zf as increment, Rh as initializeFirestore, kl as limit, Ml as limitToLast, Oh as loadBundle, Df as memoryEagerGarbageCollector, xf as memoryLocalCache, Cf as memoryLruGarbageCollector, Fh as namedQuery, If as onSnapshot, Tf as onSnapshotsInSync, Sl as or, xl as orderBy, Nf as persistentLocalCache, Of as persistentMultipleTabManager, $f as persistentSingleTabManager, Rl as query, ph as queryEqual, yh as refEqual, Uf as runTransaction, Gf as serverTimestamp, mf as setDoc, Hf as setIndexConfiguration, x as setLogLevel, cf as snapshotEqual, Fl as startAfter, Ol as startAt, Yl as sum, $h as terminate, gf as updateDoc, Nh as waitForPendingWrites, bl as where, Wf as writeBatch };\n//# sourceMappingURL=index.esm2017.js.map\n","import { Timestamp } from '@firebase/firestore'\nimport { copy } from 'copy-anything'\n\n/**\n * 時間を文字に変換\n * @param payload Date | Timestamp | string | null\n * @param string 202301 | 20230101 | 2023/01/01 | 2023/01/01 00:00:00\n * @param format YYYY/MM/DD hh:mm:ss\n */\nexport const dateFormat = (payload: Date | Timestamp | string | null, format: string) => {\n  let date = copy(payload)\n  if (!date) return ''\n  if (typeof date === 'string') {\n    if (/^(\\d{6})$/.test(date)) {\n      date = date.replace(/^(\\d{4})(\\d{2}).*$/, '$1-$2-01')\n    }\n    if (/^(\\d{8})$/.test(date)) {\n      date = date.replace(/^(\\d{4})(\\d{2})(\\d{2}).*$/, '$1-$2-$3')\n    }\n    if (!/^(\\d{4}).([0-1]\\d).([0-3]\\d).*$/.test(date)) return 'error'\n    const strYear = Number(date.slice(0, 4))\n    const strMonth = Number(date.slice(5, 7)) - 1\n    const strDate = Number(date.slice(8, 10))\n    date = new Date(strYear, strMonth, strDate)\n  }\n  if (date instanceof Timestamp) {\n    date = date.toDate()\n  }\n\n  format = format.replace(/YYYY/g, date.getFullYear().toString())\n  format = format.replace(/MM/g, ('0' + (date.getMonth() + 1)).slice(-2))\n  format = format.replace(/DD/g, ('0' + date.getDate()).slice(-2))\n  format = format.replace(/hh/g, ('0' + date.getHours()).slice(-2))\n  format = format.replace(/mm/g, ('0' + date.getMinutes()).slice(-2))\n  format = format.replace(/ss/g, ('0' + date.getSeconds()).slice(-2))\n  format = format.replace(/SSS/g, ('00' + date.getMilliseconds()).slice(-3))\n  return format\n}\n\nexport const isDateFormatEnable = (date: Date | Timestamp | string | null) => {\n  if (dateFormat(date, 'YYYY-MM-DD') === 'error') return false\n  if (dateFormat(date, 'YYYY-MM-DD') === '') return false\n  return true\n}\n","<script setup lang=\"ts\" generic=\"TableType extends Record<string, any>\">\nimport { ref, onMounted, PropType, Ref, watch } from 'vue'\nimport { CCCard, CCMDIcon, CCInput, CCSelect, CCButton } from '../../index'\nimport { dateFormat } from './utils/dateFormat'\ntype ColumnType = {\n  name: keyof TableType\n  label: string\n  type: string\n}\nconst props = defineProps({\n  /**\n   * テーブル一覧に表示させるオブジェクト\n   * 複数のコレクションをjoinしている場合は、joinした後のデータを渡す\n   * 検索対象でないものもまとめて渡す\n   */\n  allTableDetailObj: { type: Array as PropType<TableType[]>, default: [] },\n  /**\n   * テーブル一覧の見出しに表示させるオブジェクト\n   */\n  tableTitleObj: {\n    type: Array as PropType<ColumnType[]>,\n    default: () => [],\n  },\n})\n\nconst emit = defineEmits<{\n  (e: 'searchData', value: { searchResults: TableType[]; flag: boolean }): void\n  (e: 'allData', value: boolean): void\n}>()\n\n/** 詳細検索メニュー表示非常時のフラグ */\nconst isSearchMenu = ref(false)\n/** tableTitleObjにcalendarのtypeプロパティがあるかのフラグ */\nconst isCalendarArea = ref(false)\n/** tableTitleObjにselectのtypeプロパティがあるかのフラグ */\nconst isSelectArea = ref(false)\n/** tableTitleObjにtextのtypeプロパティがあるかのフラグ */\nconst isTextArea = ref(false)\n/** typeプロパティがcalendarのオブジェクトを格納する配列 */\nconst calendarArray = ref<ColumnType[]>([]) as Ref<ColumnType[]>\n/** typeプロパティがselectのオブジェクトを格納する配列 */\nconst selectArray = ref<ColumnType[]>([]) as Ref<ColumnType[]>\n/** カレンダーの開始日付を格納する配列 */\nconst calendarStart = ref<string[]>([])\n/** カレンダーの終了日付を格納する配列 */\nconst calendarEnd = ref<string[]>([])\n/** ドロップダウンで選択された値を格納する配列\n * ドロップダウンが複数あった場合は選択されている値がどんどん追加されていく\n */\nconst selectValueArray = ref<string[]>([])\n/** ドロップダウンの選択肢を格納する配列 */\nconst selectDataArray = ref<string[][]>([])\n/** インプットフォームの入力値を格納 */\nconst textValue = ref('')\n\nonMounted(() => {\n  // tableTitleObjのtypeプロパティによって各フラグを切り替え\n  props.tableTitleObj.map(column => {\n    if (column.type === 'calendar') isCalendarArea.value = true\n    if (column.type === 'select') isSelectArea.value = true\n    if (column.type === 'text') isTextArea.value = true\n  })\n\n  calendarArray.value = props.tableTitleObj.filter(column => column.type === 'calendar')\n  selectArray.value = props.tableTitleObj.filter(column => column.type === 'select')\n\n  // typeプロパティselectのオブジェクトからnameプロパティを抽出\n  const tableName: (keyof TableType)[] = selectArray.value.map(column => column.name)\n\n  // allTableDetailObjからselectの選択肢を抽出\n  for (let i = 0; i < selectArray.value.length; i++) {\n    const tableDataArray: TableType[keyof TableType][] = []\n    props.allTableDetailObj.forEach(item => {\n      const value = item[tableName[i]]\n      if (value !== '-' && !tableDataArray.includes(value)) tableDataArray.push(value)\n    })\n    selectDataArray.value.push(tableDataArray)\n  }\n\n  // 詳細検索メニューの外側をクリックした時にメニューを閉じる\n  document.addEventListener('click', e => {\n    if (!(e.target as Element).closest('#menuArea') && isSearchMenu.value) {\n      searchMenuClose()\n    }\n  })\n})\n\n/**\n * 詳細検索メニューを開く\n */\nconst searchMenuOpen = (event: MouseEvent) => {\n  event.stopPropagation()\n  isSearchMenu.value = true\n}\n\n/**\n * 詳細検索メニューを閉じる\n */\nconst searchMenuClose = () => {\n  isSearchMenu.value = false\n}\n\n/**\n * カレンダーの値をクリアする\n * @param index インデックス\n */\nconst calendarClear = (index: number) => {\n  calendarStart.value[index] = ''\n  calendarEnd.value[index] = ''\n}\n\n/**\n * ドロップダウンの値をクリアする\n * @param index インデックス\n */\nconst selectClear = (index: number) => {\n  selectValueArray.value[index] = ''\n}\n\n/**\n * インプットフォームの値をクリアする\n */\nconst textClear = () => {\n  textValue.value = ''\n}\n\n/**\n * 各フォームで入力された全ての値をクリアする\n */\nconst allClear = () => {\n  calendarStart.value = []\n  calendarEnd.value = []\n  selectValueArray.value = []\n  textValue.value = ''\n  emit('allData', false)\n}\n\n/**\n * 検索対象のデータをemitする\n */\nconst runSearch = () => {\n  let searchResults: TableType[] = props.allTableDetailObj\n  type SearchType<T extends Record<string, any>> = { label: keyof TableType; data: T }\n  const searchCalendarArray: SearchType<{ start: string; end: string }>[] = []\n  const searchSelectArray: SearchType<{ value: string }>[] = []\n  // 大文字小文字、全角半角の区別をなくす\n  const searchText = textValue.value.toLowerCase().replace(/[Ａ-Ｚａ-ｚ０-９]/g, s => {\n    return String.fromCharCode(s.charCodeAt(0) - 0xfee0)\n  })\n\n  // typeプロパティがcalendarのオブジェクトを加工\n  calendarArray.value.forEach((obj, index) => {\n    const calendarObject = { start: calendarStart.value[index], end: calendarEnd.value[index] }\n    searchCalendarArray.push({ label: obj.name, data: calendarObject })\n  })\n\n  // typeプロパティがselectのオブジェクトを加工\n  selectArray.value.forEach((d, index) => {\n    const selectObject = { value: selectValueArray.value[index] }\n    searchSelectArray.push({ label: d.name, data: selectObject })\n  })\n\n  // カレンダーの日付で絞り込み\n  searchResults = props.allTableDetailObj.filter((tableObj: TableType) => {\n    return searchCalendarArray.every(calendarObj => {\n      const startDate = calendarObj.data.start\n        ? dateFormat(new Date(calendarObj.data.start.replace(/\\/(\\d)\\//, '-0$1-')), 'YYYY-MM-DD')\n        : null\n      const endDate = calendarObj.data.end\n        ? dateFormat(new Date(calendarObj.data.end.replace(/\\/(\\d)\\//, '-0$1-')), 'YYYY-MM-DD')\n        : null\n      const targetDate = tableObj[calendarObj.label]\n        ? dateFormat(\n            new Date(tableObj[calendarObj.label].replace(/\\/(\\d)\\//, '-0$1-')),\n            'YYYY-MM-DD'\n          )\n        : ''\n      if (startDate && endDate) {\n        return startDate <= targetDate && targetDate <= endDate\n      } else if (startDate) {\n        return startDate <= targetDate\n      } else if (endDate) {\n        return targetDate <= endDate\n      } else {\n        return true\n      }\n    })\n  })\n\n  // ドロップダウンの値で絞り込み\n  searchResults = searchResults.filter((tableObj: TableType) => {\n    return searchSelectArray.every(selectObj => {\n      if (selectObj.data.value) {\n        return tableObj[selectObj.label] === selectObj.data.value\n      } else {\n        return true\n      }\n    })\n  })\n\n  // インプットフォームの値で絞り込み\n  searchResults = searchResults.filter((tableObj: TableType) => {\n    const objValues = Object.values(tableObj).map((value: TableType) =>\n      String(value)\n        .toLowerCase()\n        .replace(/[Ａ-Ｚａ-ｚ０-９]/g, s => {\n          return String.fromCharCode(s.charCodeAt(0) - 0xfee0)\n        })\n    )\n    if (searchText) {\n      return objValues.some((value: string) => value.includes(searchText))\n    } else {\n      return true\n    }\n  })\n\n  emit('searchData', { searchResults, flag: true })\n}\n</script>\n\n<template>\n  <div class=\"_serch_container\" @click=\"searchMenuOpen\">\n    <span class=\"_serch_text\">search</span>\n    <CCMDIcon name=\"manage_search\" class=\"_search_icon\" />\n  </div>\n  <transition name=\"slide\">\n    <div class=\"_back_ground\" v-show=\"isSearchMenu\">\n      <CCCard id=\"menuArea\" class=\"_menu_container\">\n        <CCMDIcon @click=\"searchMenuClose\" name=\"arrow_forward\" class=\"_arrow_icon\" />\n        <div class=\"_feature_container\">\n          <div v-if=\"isCalendarArea\" class=\"_form_container\">\n            <div v-for=\"(calendar, index) in calendarArray\" :key=\"index\" class=\"_calendar_form\">\n              <div @click=\"calendarClear(index)\" class=\"_clear_button\">×&thinsp;クリア</div>\n              <CCInput\n                v-model=\"calendarStart[index]\"\n                :label=\"calendar.label\"\n                shadow\n                date\n                placeholder=\"開始する年月を選択\"\n              />\n              <CCInput v-model=\"calendarEnd[index]\" shadow date placeholder=\"終了する年月を選択\" />\n            </div>\n          </div>\n          <div\n            v-if=\"isSelectArea\"\n            v-for=\"(select, index) in selectArray\"\n            :key=\"index\"\n            class=\"_form_container\"\n            style=\"width: 92%\"\n          >\n            <div @click=\"selectClear(index)\" class=\"_clear_button\">×&thinsp;クリア</div>\n            <CCSelect\n              v-model=\"selectValueArray[index]\"\n              :options=\"selectDataArray[index]\"\n              :label=\"select.label\"\n              shadow\n              placeholder=\"選択してください\"\n            />\n          </div>\n          <div v-if=\"isSelectArea\" class=\"_form_container\">\n            <div @click=\"textClear()\" class=\"_clear_button\">×&thinsp;クリア</div>\n            <CCInput\n              v-model=\"textValue\"\n              label=\"フリーワード\"\n              shadow\n              placeholder=\"フリーワードを入れてください\"\n            />\n          </div>\n          <div class=\"_button_container\">\n            <CCButton @click=\"allClear()\" style=\"background: #333333\" label=\"全ての条件をクリア\" />\n            <CCButton @click=\"runSearch()\" style=\"background: #00bbc9\" label=\"検索\" />\n          </div>\n        </div>\n      </CCCard>\n    </div>\n  </transition>\n</template>\n\n<style lang=\"sass\" scoped>\n._serch_container\n  display: flex\n  align-items: center\n  gap: 15px\n  position: absolute\n  right: 100px\n  top: 40px\n  cursor: pointer\n  transition: 0.3s\n._serch_container:hover\n  opacity: 0.7\n\n._serch_text\n  font-size: 20px\n\n._search_icon\n  font-size: 40px\n\n._menu_container\n  background: #D2D2D2\n  width: 325px\n  // max-height: 100vh\n  min-height: 100%\n  position: absolute\n  top: 0\n  right: 0\n  z-index: 1\n\n._feature_container\n  width: 80%\n  margin: 20px auto 0 auto\n  display: flex\n  flex-direction: column\n  row-gap: 20px\n\n._form_container\n  display: flex\n  flex-direction: column\n  row-gap: 20px\n  position: relative\n\n._calendar_form\n  display: flex\n  flex-direction: column\n  row-gap: 10px\n\n._clear_button\n  font-size: 12px\n  font-weight: bold\n  color: var(--pm-text-black)\n  position: absolute\n  right: 0\n  z-index: 1\n  cursor: pointer\n\n._back_ground\n  position: absolute\n  top: 0\n  right: 0\n  width: 100%\n  height: 100vh\n  overflow-y: scroll\n\n._button_container\n  display: flex\n  flex-direction: column\n  row-gap: 20px\n  margin-top: 60px\n  margin-bottom: 80px\n\n._arrow_icon\n  font-size: 50px\n  font-weight: bold\n  color: #333333\n  margin: 10px 0 0 10px\n  cursor: pointer\n  transition: 0.3s\n\n::v-deep(._select_form_container)\n  background-color: white\n\n._arrow_icon:hover\n  opacity: 0.7\n\n.slide-enter-active, .slide-leave-active\n  transition: transform 0.5s ease\n\n.slide-enter-from, .slide-leave-to\n  transform: translateX(100%)\n\n.slide-enter-to, .slide-leave-from\n  transform: translateX(0)\n</style>\n","export default \"data:image/svg+xml;base64,PCEtLT94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPy0tPgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMS4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+Cgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9Il94MzJfIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHN0eWxlPSJ3aWR0aDogMTZweDsgaGVpZ2h0OiAxNnB4OyBvcGFjaXR5OiAxOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0QyMDAwMDt9Cjwvc3R5bGU+CjxnPgoJPHBhdGggY2xhc3M9InN0MCIgZD0iTTM0Ny43NDYsMzQ2LjIwNGMtOC4zOTgtMC41MDUtMjguNTg5LDAuNjkxLTQ4LjgxLDQuNTMzYy0xMS42OTctMTEuODM5LTIxLjgyNi0yNi43NTMtMjkuMzQtMzkuMDUzCgkJYzI0LjA3OC02OS4yMzIsOC44MjktODguOTEtMTEuNjk3LTg4LjkxYy0xNi4xMTksMC0yNC4xNjcsMTcuMDExLTIyLjM3NiwzNS44MDVjMC45MDYsOS40Nj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jQ5LTEuNzk4LTQuNzQxCgkJYy0xLjI2My0xLjEzLTIuOTI4LTEuNjgtNS4wOTgtMS42OGgtNS45NzV2MTIuODQ4aDUuOTc1QzEwNi40ODksMTM5LjM4NSwxMDguMTU1LDEzOC44MzYsMTA5LjQxOCwxMzcuNzA2eiIgc3R5bGU9ImZpbGw6IHJnYigyMTAsIDAsIDApOyI+PC9wYXRoPgoJPHBhdGggY2xhc3M9InN0MCIgZD0iTTE1Ni4xMzksMTU3LjQ4MWMxLjEzLTAuNDI0LDIuMTAzLTEuMTA3LDIuOTczLTIuMDg4YzAuOTQ0LTEuMDU1LDEuNTM4LTIuNTcxLDEuNzY5LTQuNTExCgkJYzAuMjYtMi4yMDgsMC4zODYtNS4wOTEsMC4zODYtOC41NjljMC0zLjQ4NS0wLjEyNi02LjM2OS0wLjM4Ni04LjU2OWMtMC4yMzEtMS45NDYtMC44MjUtMy40NjItMS43NjItNC41MQoJCWMtMC44NjktMC45ODItMS44NzMtMS42NzktMi45NzItMi4wODljLTEuMTgyLTAuNDUzLTIuNTM0LTAuNjc2LTQuMDQyLTAuNjc2aC03LjE2NHYzMS42OGg3LjE2NAoJCUMxNTMuNjA1LDE1OC4xNSwxNTQuOTY1LDE1Ny45MjcsMTU2LjEzOSwxNTcuNDgxeiIgc3R5bGU9ImZpbGw6IHJnYigyMTAsIDAsIDApOyI+PC9wYXRoPgo8L2c+Cjwvc3ZnPgo=\"","<script setup lang=\"ts\">\nimport { ref, watch, PropType } from 'vue'\nimport { CCButton, CCMDIcon, CCImageMenuButton } from '../../index'\nimport { SizeTypes, ColorTypes } from '../../types'\nimport pdfIcon from '../../assets/pdf_icon.svg'\n// import pdfIcon from '/image/pdf-icon.svg'\n\nconst props = defineProps({\n  modelValue: { type: Object as PropType<File | null | undefined> },\n  /**\n   * ボタンのラベル\n   * @example 'ファイルを選択'\n   */\n  label: { type: String, default: 'ファイルを選択' },\n  /**\n   * outline\n   * @example outline\n   */\n  outline: { type: Boolean, default: false },\n  /**\n   * ラウンドデザイン\n   * @example rounded\n   */\n  rounded: { type: Boolean, default: false },\n  /**\n   * スクエアデザイン\n   * @example square\n   */\n  square: { type: Boolean, default: false },\n  /**\n   * ボタンのサイズ\n   * @example 'xs' | 'XS' | 's' | 'S' | 'm' | 'M' | 'l' | 'L' | 'xl' | 'XL'\n   */\n  size: { type: String as PropType<SizeTypes>, default: 'xs' },\n  /**\n   * 画像幅\n   * -allMiniSizeの場合は使用しない\n   */\n  imageWidth: { type: String, default: '260px' },\n  /**\n   * 画像高さ\n   * -allMiniSizeの場合は使用しない\n   */\n  imageHeight: { type: String, default: '175px' },\n  /**\n   * allMiniSize\n   * 全てのサイズを最小にする（AFC用）\n   */\n  allMiniSize: { type: Boolean, default: false },\n  /**\n   * カラー\n   * @example 'primary' | 'secondary' | 'positive' | 'negative' | 'warning'\n   */\n  color: {\n    type: String as PropType<ColorTypes>,\n    default: 'secondary',\n  },\n  /**\n   * 画像のURL(表示のみを行う)\n   */\n  url: { type: String, default: '' },\n\n  /**\n   * アップロード済みの写真かどうか\n   * @example uploaded\n   */\n  uploaded: { type: Boolean, default: true },\n  /**\n   * メニューの項目を選択して表示\n   * @example showCustomMenu\n   */\n  showCustomMenu: {\n    type: Object as PropType<{\n      download: boolean\n      delete: boolean\n      shareUrl: boolean\n      edit: boolean\n      close: boolean\n    }>,\n    default: {\n      download: true,\n      delete: true,\n      shareUrl: true,\n      edit: true,\n      close: true,\n    },\n  },\n  /**\n   * メニューの表示非表示\n   */\n  isNotMenu: { type: Boolean, default: false },\n  /**\n   * pdfタイトル\n   */\n  pdfTitle: { type: String, default: '' },\n  /**\n   * mimeタイプ\n   * 2パターンのみ\n   * 影響しないように空も許容\n   */\n  mime: { type: String, default: '' },\n  /**\n   * mimeタイプ\n   * 2パターンのみ\n   * 影響しないように空も許容\n   */\n  accept: { type: String, default: '' },\n  /**\n   * nullの際にアップロード禁止プロパティ\n   * - allMiniSizeのみ対応\n   */\n  isNotUpload: { type: Boolean, default: false },\n  /**\n   * ドラックアンドドロップを単一のみ許可をするかどうか\n   */\n  isSingleDrop: { type: Boolean, default: false },\n  /**\n   * disabled\n   */\n  disabled: { type: Boolean, default: false },\n})\n/** 画像のプレビュー用URL */\nconst imagePreviewUrl = ref<string | null>(null)\n/** 画像のFileオブジェクト */\nconst imageFileObj = ref<File | null>(null)\n/** PDFのプレビュー用URL */\nconst pdfPreviewUrl = ref<string | null>(null)\n/** PDFのFileオブジェクト */\nconst pdfFileObj = ref<File | null>(null)\n/** 動画のプレビュー用URL */\nconst videoPreviewUrl = ref<string | null>(null)\n/** 動画のFileオブジェクト */\nconst videoFileObj = ref<File | null>(null)\n/** inputエレメントを参照するためのref */\nconst fileInput = ref<HTMLInputElement | null>(null)\n/** ドラッグしているファイルが範囲内にあるかのフラグ */\nconst isDragOver = ref(false)\n/** 画像拡大時のモーダルフラグ */\nconst isModalImage = ref(false)\n/** PDF拡大時のモーダルフラグ */\nconst isModalPdf = ref(false)\n/** video拡大時のモーダルフラグ */\nconst isModalVideo = ref(false)\n/** メニューの表示切り替え */\nconst isMenu = ref(false)\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', value: File | null): void\n  // 編集ボタン\n  (e: 'onSelect'): void\n  (e: 'storageToFile', file: File): void\n  // 削除ボタン\n  (e: 'fileObjDelete'): void\n  // 共有\n  (e: 'shareUrl'): void\n  // ダウンロード\n  (e: 'download'): void\n}>()\n\n/** ファイル選択のウィンドウを開く */\nconst chooseFile = () => {\n  if (props.isNotUpload) return\n  if (fileInput.value) {\n    fileInput.value.click()\n  }\n}\n\nwatch(\n  () => [props.url, props.mime],\n  () => {\n    if (props.url && props.mime.includes('image')) {\n      imagePreviewUrl.value = props.url\n      return\n    }\n    if (props.url && props.mime.includes('pdf')) {\n      pdfPreviewUrl.value = props.url\n      return\n    }\n    if (props.url && props.mime.includes('video')) {\n      videoPreviewUrl.value = props.url\n      return\n    }\n    if (props.url) {\n      imagePreviewUrl.value = props.url\n    }\n  },\n  { immediate: true }\n)\nconst isCheckAccept = (fileType: string, accept: string): boolean => {\n  // 拡張子を取得する\n  const fileExtension = fileType.split('/').pop()?.toLowerCase()\n\n  // 受け入れ可能な拡張子のリストを取得し、各拡張子をトリムして配列に格納します\n  const acceptedExtensions = accept.split(',').map((ext) => ext.trim().toLowerCase())\n\n  // 受け入れ可能な拡張子のリストをループします\n  for (const acceptedExtension of acceptedExtensions) {\n    // ワイルドカードがある場合、全てのファイルを許可します\n    if (acceptedExtension === '*') {\n      return true\n    }\n    // 受け入れ可能なタイプが image/* で、かつファイルの MIME タイプが image/* で始まる場合、画像ファイルを許可します\n    if (acceptedExtension.startsWith('image/') && fileType.startsWith('image/')) {\n      return true\n    }\n    // 拡張子に対応する場合、そのファイルを許可します\n    if (\n      acceptedExtensions.includes(`${fileExtension}`) ||\n      acceptedExtensions.includes(`.${fileExtension}`)\n    ) {\n      return true\n    }\n    // 拡張子に対応する MIME タイプがある場合、そのファイルを許可します（例: svg）\n    if (acceptedExtension === 'svg' && fileType === 'image/svg+xml') {\n      return true\n    }\n  }\n  // 上記の条件に一致しない場合、ファイルは許可されません\n  return false\n}\n\n/** 選択されたFileオブジェクトを親コンポーネントに渡す */\nconst handleFilePreview = (file: File) => {\n  if (props.accept) {\n    if (isCheckAccept(file.type, props.accept) && file.type.startsWith('image/')) {\n      // 画像ファイルの処理\n      imagePreviewUrl.value = URL.createObjectURL(file)\n      imageFileObj.value = file\n      pdfPreviewUrl.value = null\n      pdfFileObj.value = null\n      videoPreviewUrl.value = null\n      videoFileObj.value = null\n      emit('storageToFile', imageFileObj.value)\n      emit('update:modelValue', imageFileObj.value)\n      return\n    }\n    if (file.type === 'application/pdf' && props.accept.includes('pdf')) {\n      // PDFファイルの処理\n      pdfPreviewUrl.value = URL.createObjectURL(file)\n      pdfFileObj.value = file\n      imagePreviewUrl.value = null\n      imageFileObj.value = null\n      videoPreviewUrl.value = null\n      videoFileObj.value = null\n      emit('storageToFile', pdfFileObj.value)\n      emit('update:modelValue', pdfFileObj.value)\n      return\n    }\n    if (file.type.startsWith('video/') && props.accept.includes('video')) {\n      // 動画ファイルの処理\n      videoPreviewUrl.value = URL.createObjectURL(file)\n      videoFileObj.value = file\n      imagePreviewUrl.value = null\n      imageFileObj.value = null\n      pdfPreviewUrl.value = null\n      pdfFileObj.value = null\n      emit('storageToFile', videoFileObj.value)\n      emit('update:modelValue', videoFileObj.value)\n      return\n    }\n    // 許可されていない拡張子の処理\n    alert(\n      '設定された拡張子以外のファイルが選択されました。許可されている拡張子のファイルを選択してください。'\n    )\n    return\n  }\n\n  // `accept` が指定されていない場合、すべてのファイルを許可\n  if (file.type.startsWith('image/')) {\n    imagePreviewUrl.value = URL.createObjectURL(file)\n    imageFileObj.value = file\n    pdfPreviewUrl.value = null\n    pdfFileObj.value = null\n    videoPreviewUrl.value = null\n    videoFileObj.value = null\n    emit('storageToFile', imageFileObj.value)\n    emit('update:modelValue', imageFileObj.value)\n  } else if (file.type === 'application/pdf') {\n    pdfPreviewUrl.value = URL.createObjectURL(file)\n    pdfFileObj.value = file\n    imagePreviewUrl.value = null\n    imageFileObj.value = null\n    videoPreviewUrl.value = null\n    videoFileObj.value = null\n    emit('storageToFile', pdfFileObj.value)\n    emit('update:modelValue', pdfFileObj.value)\n  } else if (file.type.startsWith('video/')) {\n    videoPreviewUrl.value = URL.createObjectURL(file)\n    videoFileObj.value = file\n    imagePreviewUrl.value = null\n    imageFileObj.value = null\n    pdfPreviewUrl.value = null\n    pdfFileObj.value = null\n    emit('storageToFile', videoFileObj.value)\n    emit('update:modelValue', videoFileObj.value)\n  } else {\n    // 許可されていない拡張子の処理\n    alert('画像・PDF・動画ファイルを選択してください。')\n  }\n}\n\n/** 選択、またはドロップされたデータをFileオブジェクトに変換 */\nconst onFileChangeAndDrop = (event: Event) => {\n  // 複数のファイルが選択された場合、isSingleDropがtrueの場合、エラーを返す\n  if (props.isSingleDrop) {\n    if (event.target instanceof HTMLInputElement) {\n      if (event.target.files?.length !== 1) {\n        alert('複数のファイルが選択されました。単一のファイルを選択してください。')\n        return\n      }\n    }\n    if (event instanceof DragEvent) {\n      if (event.dataTransfer?.files.length !== 1) {\n        alert('複数のファイルが選択されました。単一のファイルを選択してください。')\n        return\n      }\n    }\n  }\n  if (props.isNotUpload) return\n  if (event.target instanceof HTMLInputElement) {\n    const file = event.target.files?.[0]\n    handleFilePreview(file as File)\n  }\n  if (event instanceof DragEvent) {\n    const file = event.dataTransfer?.files[0]\n    handleFilePreview(file as File)\n  }\n}\n\n/** メニューボタンのアクション機能 */\nconst menuAction = (action: 'download' | 'delete' | 'shareUrl' | 'edit') => {\n  if (action === 'delete') {\n    imagePreviewUrl.value = null\n    imageFileObj.value = null\n    pdfPreviewUrl.value = null\n    pdfFileObj.value = null\n    videoPreviewUrl.value = null\n    videoFileObj.value = null\n    isDragOver.value = false\n    emit('fileObjDelete')\n  }\n\n  if (action === 'edit') chooseFile()\n\n  if (action === 'shareUrl') emit('shareUrl')\n\n  if (action === 'download') emit('download')\n\n  isMenu.value = false\n}\n\n/** 子コンポーネントからemitで受け取ったFileオブジェクトを関数に渡す */\nconst fileChange = (file: File) => {\n  handleFilePreview(file)\n}\n\n/** ドラッグしているファイルが範囲内にある場合の処理 */\nconst onDragover = () => {\n  if (props.isNotUpload) return\n  isDragOver.value = true\n}\n\n/** ドラッグしているファイルが範囲外にある場合の処理 */\nconst onDragleave = () => {\n  if (props.isNotUpload) return\n  isDragOver.value = false\n}\n\n/** 画像・PDF・動画拡大時のモーダルを開く */\nconst openModal = (modal: string) => {\n  if (modal === 'image') {\n    isModalImage.value = true\n  } else if (modal === 'pdf') {\n    isModalPdf.value = true\n  } else if (modal === 'video') {\n    isModalVideo.value = true\n  }\n  document.body.style.overflow = 'hidden'\n}\n\n/** 画像・PDF・動画拡大時のモーダルを閉じる */\nconst closeModal = (modal: string) => {\n  if (modal === 'image') {\n    isModalImage.value = false\n  } else if (modal === 'pdf') {\n    isModalPdf.value = false\n  } else if (modal === 'video') {\n    isModalVideo.value = false\n  }\n  document.body.style.overflow = 'auto'\n}\n</script>\n\n<template>\n  <div v-if=\"imagePreviewUrl\" style=\"user-select: none\">\n    <input\n      type=\"file\"\n      ref=\"fileInput\"\n      style=\"display: none\"\n      @change=\"onFileChangeAndDrop\"\n      :accept=\"accept\"\n    />\n    <div :class=\"{ _preview_container_mini: allMiniSize, _preview_container: !allMiniSize }\">\n      <img :src=\"imagePreviewUrl\" class=\"_preview_image\" @click=\"openModal('image')\" />\n      <div class=\"_menu_button\" v-if=\"!isNotMenu\">\n        <CCImageMenuButton\n          :uploaded=\"true\"\n          :color=\"color\"\n          :miniSize=\"allMiniSize\"\n          :showCustomMenu=\"showCustomMenu\"\n          opacity\n          v-model=\"isMenu\"\n          @onClick=\"menuAction\"\n          @fileChange=\"fileChange\"\n        />\n      </div>\n    </div>\n    <Teleport to=\"body\">\n      <div v-if=\"isModalImage\" class=\"_modal\">\n        <div class=\"_modal_background\" @click=\"closeModal('image')\"></div>\n        <img :src=\"imagePreviewUrl\" class=\"_modal_image\" />\n        <CCMDIcon name=\"close\" @click=\"closeModal('image')\" class=\"_modal_close\" />\n      </div>\n    </Teleport>\n  </div>\n\n  <div v-else-if=\"pdfPreviewUrl\" style=\"user-select: none\">\n    <input\n      type=\"file\"\n      ref=\"fileInput\"\n      style=\"display: none\"\n      @change=\"onFileChangeAndDrop\"\n      :accept=\"accept\"\n    />\n    <div :class=\"{ _preview_container: !allMiniSize, _preview_container_mini: allMiniSize }\">\n      <div\n        :class=\"{ _preview_image: !allMiniSize, _preview_image_mini: allMiniSize }\"\n        @click=\"openModal('pdf')\"\n      >\n        <div :class=\"{ _pdf_container: !allMiniSize, _pdf_container_mini: allMiniSize }\">\n          <div>{{ pdfFileObj?.name ?? pdfTitle }}</div>\n          <img :src=\"pdfIcon\" />\n        </div>\n      </div>\n      <div class=\"_menu_button\" v-if=\"!isNotMenu\">\n        <CCImageMenuButton\n          :uploaded=\"uploaded\"\n          :color=\"color\"\n          :miniSize=\"allMiniSize\"\n          v-model=\"isMenu\"\n          opacity\n          :showCustomMenu=\"showCustomMenu\"\n          @onClick=\"menuAction\"\n          @fileChange=\"fileChange\"\n        />\n      </div>\n    </div>\n\n    <Teleport to=\"body\">\n      <div v-if=\"isModalPdf\" class=\"_modal\">\n        <div class=\"_modal_background\" @click=\"closeModal('pdf')\"></div>\n        <embed :src=\"pdfPreviewUrl ?? props.url\" class=\"_modal_image\" width=\"85%\" height=\"85%\" />\n        <CCMDIcon name=\"close\" @click=\"closeModal('pdf')\" class=\"_modal_close\" />\n      </div>\n    </Teleport>\n  </div>\n\n  <div v-else-if=\"videoPreviewUrl\" style=\"user-select: none\">\n    <input\n      type=\"file\"\n      ref=\"fileInput\"\n      style=\"display: none\"\n      @change=\"onFileChangeAndDrop\"\n      :accept=\"accept\"\n    />\n    <div :class=\"{ _preview_container: !allMiniSize, _preview_container_mini: allMiniSize }\">\n      <div\n        :class=\"{ _preview_video: !allMiniSize, _preview_video_mini: allMiniSize }\"\n        class=\"_video_thumb\"\n        @click=\"openModal('video')\"\n      >\n        <video :src=\"videoPreviewUrl\" class=\"_video_thumb\" controls muted></video>\n      </div>\n      <div class=\"_menu_button\" v-if=\"!isNotMenu\">\n        <CCImageMenuButton\n          :uploaded=\"uploaded\"\n          :color=\"color\"\n          :miniSize=\"allMiniSize\"\n          v-model=\"isMenu\"\n          opacity\n          :showCustomMenu=\"showCustomMenu\"\n          @onClick=\"menuAction\"\n          @fileChange=\"fileChange\"\n        />\n      </div>\n    </div>\n\n    <Teleport to=\"body\">\n      <div v-if=\"isModalVideo\" class=\"_modal\">\n        <div class=\"_modal_background\" @click=\"closeModal('video')\"></div>\n        <video :src=\"videoPreviewUrl\" class=\"_modal_video\" controls></video>\n        <CCMDIcon name=\"close\" @click=\"closeModal('video')\" class=\"_modal_close\" />\n      </div>\n    </Teleport>\n  </div>\n\n  <!-- 画像未選択状態 -->\n  <div v-else @click=\"allMiniSize ? chooseFile() : undefined\">\n    <div\n      class=\"_drop_area\"\n      :class=\"{ _drag: isDragOver, _drop_area_mini: allMiniSize }\"\n      @dragover.prevent=\"onDragover\"\n      @dragleave=\"onDragleave\"\n      @drop.prevent=\"onFileChangeAndDrop\"\n      :style=\"\n        isNotUpload ? { display: 'flex', alignItems: 'center', justifyContent: 'center' } : {}\n      \"\n    >\n      <input\n        type=\"file\"\n        ref=\"fileInput\"\n        style=\"display: none\"\n        @change=\"onFileChangeAndDrop\"\n        :accept=\"accept\"\n      />\n      <div v-if=\"!isNotUpload\">ドラッグ＆ドロップで<br />ファイルをアップロード</div>\n      <CCMDIcon\n        name=\"image_not_supported\"\n        style=\"align-items: center\"\n        :class=\"{\n          _image_not_supported: !allMiniSize,\n          _image_not_supported_mini: allMiniSize,\n          _not_upload: isNotUpload,\n        }\"\n      />\n      <CCButton\n        v-if=\"!allMiniSize\"\n        @click=\"chooseFile\"\n        :label=\"label\"\n        :size=\"size\"\n        :color=\"color\"\n        :square=\"square\"\n        :rounded=\"rounded\"\n        :outline=\"outline\"\n        class=\"_file_select_button\"\n        :disabled=\"disabled\"\n      />\n    </div>\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n._drop_area\n  user-select: none\n  border: 1px solid #707070\n  background: #ECECEC\n  color: #333333\n  font-size: 14px\n  padding: 15px 0\n  text-align: center\n  width: v-bind(imageWidth)\n  height: v-bind(imageHeight)\n  display: grid\n  grid-template-rows: repeat(3, min-content)\n  row-gap: 15px\n  justify-content: center\n  box-sizing: border-box\n// miniSizeの場合\n._drop_area_mini\n  user-select: none\n  font-size: 8px\n  width: 110px\n  height: 75px\n  gap: 5px\n  ._drag\n    border: 1px dashed #707070\n._drag\n  border: 1px dashed #707070\n._preview_image\n  width: 100%\n  height: 100%\n  background: #ECECEC\n  object-fit: contain\n  cursor: zoom-in\n._preview_image_mini\n  width: 100%\n  height: 100%\n  background: #ECECEC\n  object-fit: contain\n  cursor: zoom-in\n._pdf_container\n  box-sizing: border-box\n  width: v-bind(imageWidth)\n  height: v-bind(imageHeight)\n  padding: 20px 15px\n  text-align: center\n  display: flex\n  flex-direction: column\n  justify-content: space-between\n  position: relative\n._pdf_container img\n  height: 100px\n._pdf_container div\n  font-size: 14px\n  color: #333333\n  text-overflow: ellipsis\n  white-space: nowrap\n  overflow: hidden\n._pdf_container_mini\n  width: 60px\n  height: 100%\n  margin: 0 auto\n  position: relative\n._pdf_container_mini div\n  font-size: 8px\n  color: #333333\n  margin-bottom: 5px\n  text-align: center\n  line-height: 2\n  text-overflow: ellipsis\n  white-space: nowrap\n  overflow: hidden\n._pdf_container_mini img\n  width: 60px\n  margin: 0 auto\n  height: 50px\n._image_not_supported\n  color: #707070\n  font-size: 35px\n// miniSizeの場合\n._image_not_supported_mini\n  font-size: 20px\n\n._file_select_button\n  font-size: 14px\n  width: 150px\n._preview_container\n  position: relative\n  width: v-bind(imageWidth)\n  height: v-bind(imageHeight)\n._preview_container_mini\n  position: relative\n  width: 110px\n  height: 75px\n  object-fit: cover\n._menu_button\n  position: absolute\n  bottom: 10px\n  right: 10px\n._modal\n  position: fixed\n  top: 0\n  left: 0\n  width: 100vw\n  height: 100vh\n  background-color: rgba(0, 0, 0, 0.7)\n  display: flex\n  align-items: center\n  justify-content: center\n  z-index: 9999999\n\n._modal_background\n  position: absolute\n  top: 0\n  left: 0\n  width: 100%\n  height: 100%\n._modal_image\n  z-index: 20\n  max-width: 90vw\n  max-height: 90vh\n  margin: 0 auto\n._modal_video\n  z-index: 20\n  max-width: 90vw\n  max-height: 90vh\n  margin: 0 auto\n._video_thumb\n  width: 100%\n  height: 100%\n  object-fit: contain\n._modal_close\n  position: absolute\n  top: 20px\n  right: 20px\n  font-size: 40px\n  color: #FFFFFF\n  cursor: pointer\n</style>\n","<script setup lang=\"ts\">\nimport { PropType, computed, onMounted, ref, onBeforeUnmount } from 'vue'\nimport { CCCard } from '../../index'\nimport { ColorTypes } from '../../types'\n\nconst props = defineProps({\n  /**\n   * カラー\n   * @example 'primary' | 'secondary' | 'positive' | 'negative' | 'warning'\n   */\n  color: {\n    type: String as PropType<ColorTypes>,\n    default: 'secondary',\n  },\n  /**\n   * ボタンのサイズ(afc用)\n   */\n  miniSize: { type: Boolean, default: false },\n  /**\n   * アップロード済みの写真かどうか\n   * @example uploaded\n   */\n  uploaded: { type: Boolean, default: true },\n  /**\n   * ボタンの透明度\n   * @example opacity\n   */\n  opacity: { type: Boolean, default: false },\n  /**\n   *\n   */\n  modelValue: { type: Boolean },\n\n  /**\n   * メニューの項目を選択して表示\n   * @example showCustomMenu\n   */\n  showCustomMenu: {\n    type: Object as PropType<{\n      download: boolean\n      delete: boolean\n      shareUrl: boolean\n      edit: boolean\n      close: boolean\n    }>,\n    default: {\n      download: true,\n      delete: true,\n      shareUrl: true,\n      edit: true,\n      close: true,\n    },\n  },\n})\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', value: boolean): void\n  (e: 'onClick', action: 'download' | 'delete' | 'shareUrl' | 'edit'): void\n  (e: 'fileChange', file: File): void\n}>()\n\nonMounted(() => {\n  const menuButton = document.getElementById('menuButton')\n  if (menuButton) {\n    const rect = menuButton.getBoundingClientRect()\n    teleportPosition.value = {\n      top: rect.top + window.scrollY,\n      left: rect.left + window.scrollX,\n    }\n  }\n})\n\n/** メニューの表示非表示フラグ */\nconst isShowCard = computed<boolean>({\n  get() {\n    return props.modelValue\n  },\n  set(value) {\n    emit('update:modelValue', value)\n  },\n})\n\n/** メニューの表示非表示を切り替える */\nconst toggleCard = () => {\n  isShowCard.value = !isShowCard.value\n  updateMenuPosition() // メニューが表示される度に位置を更新\n}\n\nconst menuButtonRef = ref<HTMLElement | null>(null)\nconst menuCardRef = ref<HTMLElement | null>(null)\nconst handleClickOutside = (e: MouseEvent) => {\n  if (!menuButtonRef.value || !menuCardRef.value) return\n\n  if (\n    !menuButtonRef.value.contains(e.target as Node) &&\n    !menuCardRef.value.contains(e.target as Node) &&\n    isShowCard.value\n  ) {\n    isShowCard.value = false\n  }\n}\n\nonMounted(() => {\n  document.addEventListener('click', handleClickOutside)\n})\n\nonBeforeUnmount(() => {\n  document.removeEventListener('click', handleClickOutside)\n})\n\n/** 渡ってきたカラーに応じて色を変える */\nconst changeColor = computed(() => {\n  if (props.color === 'primary') return 'var(--c-primary)'\n  if (props.color === 'secondary') return 'var(--c-secondary)'\n  if (props.color === 'positive') return 'var(--c-positive)'\n  if (props.color === 'negative') return 'var(--c-negative)'\n  if (props.color === 'warning') return 'var(--c-warning)'\n})\nconst teleportPosition = ref({ top: 0, left: 0 })\n\n/**\n * メニューカードの位置を更新する\n */\n// const updateMenuPosition = () => {\n//   const menuButton = menuButtonRef.value\n//   if (menuButton) {\n//     const rect = menuButton.getBoundingClientRect()\n\n//     const cardWidth = 130 // メニューカードの幅\n//     const cardHeight = 200 // メニューカードの高さ\n//     const windowWidth = window.innerWidth\n//     const windowHeight = window.innerHeight\n//     const miniStandardOpHight = props.miniSize ? 30 : 50\n//     const miniDownOpHight = props.miniSize ? 160 : 80\n\n//     // メニューカードが画面右端にはみ出す場合または画面左端にはみ出す場合\n//     if (rect.left + cardWidth > windowWidth || rect.right + cardWidth > windowWidth) {\n//       teleportPosition.value = {\n//         top: rect.top - 120,\n//         left: rect.left - cardWidth,\n//       }\n//     }\n//     // メニューカードが画面下端にはみ出す場合\n//     else if (rect.bottom + cardHeight > windowHeight) {\n//       teleportPosition.value = {\n//         top: rect.top - cardHeight + miniDownOpHight,\n//         left: rect.left - 150,\n//       }\n//     }\n//     // メニューカードが画面内に収まる場合\n//     else {\n//       teleportPosition.value = {\n//         top: rect.top + miniStandardOpHight,\n//         left: rect.left,\n//       }\n//     }\n//   }\n// }\n\nconst updateMenuPosition = () => {\n  const menuButton = menuButtonRef.value\n  if (menuButton) {\n    const rect = menuButton.getBoundingClientRect()\n\n    const cardWidth = 130 // メニューカードの幅\n    const cardHeight = 200 // メニューカードの高さ\n    const windowWidth = window.innerWidth\n    const windowHeight = window.innerHeight\n    const miniStandardOpHeight = props.miniSize ? 30 : 50\n    const miniDownOpHeight = props.miniSize ? 160 : 80\n\n    // スクロール位置を考慮してtopとleftの基準位置を計算\n    const topPosition = rect.top + window.scrollY\n    const leftPosition = rect.left + window.scrollX\n\n    // メニューカードが画面右端または左端にはみ出す場合\n    if (leftPosition + cardWidth > windowWidth) {\n      teleportPosition.value = {\n        top: topPosition - 120,\n        left: leftPosition - cardWidth,\n      }\n    }\n    // メニューカードが画面下端にはみ出す場合\n    else if (rect.bottom + cardHeight > windowHeight) {\n      teleportPosition.value = {\n        top: topPosition - cardHeight + miniDownOpHeight,\n        left: leftPosition - 150,\n      }\n    }\n    // メニューカードが画面内に収まる場合\n    else {\n      teleportPosition.value = {\n        top: topPosition + miniStandardOpHeight,\n        left: leftPosition,\n      }\n    }\n  }\n}\n\n// 画面サイズが変更された時にメニューの位置を更新する\nwindow.addEventListener('resize', updateMenuPosition)\n\nonMounted(() => {\n  updateMenuPosition()\n})\n\nonBeforeUnmount(() => {\n  window.removeEventListener('resize', updateMenuPosition)\n})\n</script>\n\n<template>\n  <div\n    ref=\"menuButtonRef\"\n    :class=\"['_circle', { _opacity: opacity, _circle_mini: miniSize }]\"\n    @click=\"toggleCard()\"\n  >\n    <div :class=\"['_line', { _line_mini: miniSize }]\"></div>\n    <div :class=\"['_line', { _line_mini: miniSize }]\"></div>\n    <div :class=\"['_line', { _line_mini: miniSize }]\"></div>\n  </div>\n  <Teleport to=\"body\" ref=\"menuCardRef\">\n    <transition name=\"fade\">\n      <CCCard\n        class=\"_card\"\n        v-show=\"isShowCard\"\n        :style=\"{ top: teleportPosition.top + 'px', left: teleportPosition.left + 'px' }\"\n      >\n        <div v-if=\"uploaded\">\n          <div\n            v-if=\"showCustomMenu.download\"\n            class=\"_button\"\n            @click=\"() => emit('onClick', 'download')\"\n          >\n            ダウンロード\n          </div>\n          <div v-if=\"showCustomMenu.edit\" class=\"_button\" @click=\"() => emit('onClick', 'edit')\">\n            編集\n          </div>\n          <div\n            v-if=\"showCustomMenu.delete\"\n            class=\"_button\"\n            @click=\"() => emit('onClick', 'delete')\"\n          >\n            削除\n          </div>\n          <div\n            v-if=\"showCustomMenu.shareUrl\"\n            class=\"_button\"\n            @click=\"() => emit('onClick', 'shareUrl')\"\n          >\n            共有用URL\n          </div>\n        </div>\n        <div v-else>\n          <div v-if=\"showCustomMenu.edit\" class=\"_button\" @click=\"() => emit('onClick', 'edit')\">\n            編集\n          </div>\n          <div\n            v-if=\"showCustomMenu.delete\"\n            class=\"_button\"\n            @click=\"() => emit('onClick', 'delete')\"\n          >\n            削除\n          </div>\n        </div>\n        <div class=\"_button\" @click=\"toggleCard()\">閉じる</div>\n      </CCCard>\n    </transition>\n  </Teleport>\n</template>\n\n<style lang=\"sass\" scoped>\n._circle\n  user-select: none\n  width: 40px\n  height: 40px\n  background: rgba(255, 255, 255)\n  border-radius: 50%\n  position: relative\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1)\n  cursor: pointer\n._circle_mini\n  width: 20px\n  height: 20px\n\n._opacity\n  background: rgba(255, 255, 255, 0.5)\n._line\n  position: absolute\n  left: 50%\n  top: 50%\n  transform: translate(-50%, -50%)\n  width: 20px\n  height: 2px\n  background: v-bind(changeColor)\n._line_mini\n  width: 10px\n  height: 10px\n  height: 0.1px\n._line:nth-child(2)\n  top: 65%\n._line:nth-child(3)\n  top: 35%\n._card\n  // サイズの変更をする際は座標も変更してください\n  width: 130px\n  margin-top: 10px\n  margin: 0 auto\n  z-index: 9999999\n  position: absolute\n  user-select: none\n\n.fade-enter-active, .fade-leave-active\n  transition: opacity 0.2s\n.fade-enter, .fade-enter-from, .fade-leave-to\n  opacity: 0\n.fade-enter-to, .fade-leave\n  opacity: 1\n._button\n  font-size: 16px\n  color: #707070\n  padding: 10px 15px\n  cursor: pointer\n  transition: 0.3s\n._button:hover\n  background: v-bind(changeColor)\n  color: #ffffff\n</style>\n","/**\n * デフォルト情報\n * 長いから隔離\n */\nexport const defaultData = [\n  {\n    title: 'Subject1Subject1',\n    icon: 'rocket_launch',\n    path: '/a',\n    subtitle: [],\n  },\n  {\n    title: 'Subject2',\n    icon: 'diamond',\n    path: '/Test',\n    subtitle: [\n      {\n        title: 'Subtitle1',\n        icon: 'public',\n        path: '/Test1',\n        subjectIndex: 1,\n        infoNumber: 87,\n      },\n      {\n        title: 'Subtitle2',\n        icon: 'emoji_nature',\n        path: '/Test2',\n        subjectIndex: 1,\n      },\n      {\n        title: 'Subtitle3',\n        icon: 'sunny',\n        path: '/Test3',\n        subjectIndex: 1,\n      },\n    ],\n  },\n  {\n    title: 'Subject3',\n    icon: 'grade',\n\t\timage: 'https://firebasestorage.googleapis.com/v0/b/testafterfollowconcierge.appspot.com/o/pointItem%2F0dj4fSgjuHwKSLT9hgqy%2F1.jpg?alt=media&token=9d6ac2d8-878a-4133-9570-dbccdada91f9',\n    path: '/Test3',\n    subtitle: [],\n  },\n  {\n    title: 'Subject4',\n    icon: 'thumb_up',\n    path: '/Test4',\n    subtitle: [\n      {\n        title: 'Subtitle4',\n        icon: 'handshake',\n        path: '/Test41',\n        subjectIndex: 3,\n      },\n      {\n        title: 'Subtitle5',\n        icon: 'eco',\n        path: '/Test42',\n        subjectIndex: 3,\n      },\n      {\n        title: 'Subtitle6',\n        icon: 'emoji_people',\n        path: '/Test43',\n        subjectIndex: 3,\n      },\n      {\n        title: 'Subtitle7',\n        icon: 'recycling',\n        path: '/Test44',\n        subjectIndex: 3,\n      },\n      {\n        title: 'Subtitle8',\n        icon: 'wc',\n        path: '/Test45',\n        subjectIndex: 3,\n      },\n      {\n        title: '顧客情報',\n        icon: 'emoji_people',\n        path: '/customer/setting',\n        subjectIndex: 3,\n      },\n      {\n        title: '管理者情報',\n        icon: 'recycling',\n        path: '/admin/setting',\n        subjectIndex: 3,\n      },\n      {\n        title: 'Subtitle11',\n        icon: 'wc',\n        path: '/Test46',\n        subjectIndex: 3,\n      },\n    ],\n  },\n]\n","<script setup lang=\"ts\">\nimport { ref, PropType, computed, watch, onMounted } from 'vue'\nimport { CCMDIcon } from '../../index'\nimport { SubjectType } from './CCGlobalNavi.types'\nimport { copy } from 'copy-anything'\nimport { defaultData } from './default'\nimport { MDIconTypes } from '../../types'\n\nconst props = defineProps({\n  /**\n   * FullPath\n   * @example '/test'\n   */\n  fullPath: {\n    type: String,\n    default: '/',\n  },\n  /**\n   * グローバルナビ主題\n   * @example []\n   */\n  subjects: {\n    type: Array as PropType<SubjectType[]>,\n    default: defaultData,\n  },\n})\n\nconst emit = defineEmits<{\n  (e: 'update:fullPath', value: string): void\n  (e: 'push', value: string): void\n}>()\nconst fullPath = computed({\n  get: () => props.fullPath,\n  set: (value) => {\n    emit('update:fullPath', value)\n  },\n})\n\n//どこのメインメニューを選択しているかの入れ子\nconst holdIndex = ref(0)\n// pathがどこの階層にあるかを判定して、選択中subjectとsubの情報を更新する\nconst getNaviAddress = (path: string, route: SubjectType[]) => {\n  const pathArr = path.split('/')\n  const pathName = pathArr[pathArr.length - 1]\n  route.map((menu, menuIndex) => {\n    //サブメニューがある場合\n    if (menu.subtitle.length) {\n      menu.subtitle.map((sub, subindex) => {\n        if (sub.path === `/${pathName}`) {\n          holdIndex.value = menuIndex\n        }\n      })\n    } else {\n      //サブメニューがない場合\n      if (menu.path === `/${pathName}`) {\n        holdIndex.value = menuIndex\n      }\n    }\n  })\n}\n//computedでinfoの変動監視\nconst subjectsComp = ref(copy(props.subjects))\nwatch(\n  () => props.subjects,\n  () => {\n    subjectsComp.value = copy(props.subjects)\n  },\n  { deep: true }\n)\nwatch(\n  () => fullPath.value,\n  () => {\n    if (fullPath.value) return\n    getNaviAddress(fullPath.value, subjectsComp.value)\n  },\n  { immediate: true }\n)\n\nonMounted(() => {\n  getCurrentHoldIndex(fullPath.value)\n})\n\n/**\n * リロード時に元々のメニューが選択された状態で表示されるようにするための関数\n * @param path\n */\nconst getCurrentHoldIndex = (path: string) => {\n  subjectsComp.value.forEach((menu, menuIndex) => {\n    if (menu.subtitle.length) {\n      if (menu.subtitle.some((sub) => path === sub.path)) {\n        holdIndex.value = menuIndex\n      }\n    } else if (path === menu.path) {\n      holdIndex.value = menuIndex\n    }\n  })\n}\n\n/**\n * メインメニューをクリックした時の処理\n * @param subject メニュー情報\n * @param index 何番目のメニューか\n */\nconst subjectClickAction = (subject: SubjectType, index: number) => {\n  let path = ''\n  if (!subject.subtitle[0]) {\n    // 副題が設定されていない場合\n    path = subject.path\n  } else {\n    if (holdIndex.value !== index) {\n      path = subject.subtitle[0].path\n    }\n    // どこのメインメニューを選択しているかを保持する\n  }\n  emit('push', path)\n  fullPath.value = path\n  holdIndex.value = index\n}\n\nconst subtitleClickAction = (path: string) => {\n  // 副題の対象ページへ遷移する\n  fullPath.value = path\n  emit('push', path)\n}\n</script>\n\n<template>\n  <div class=\"_button_container\">\n    <div class=\"_left_contain\">\n      <div v-for=\"(subject, index) in subjectsComp\" :key=\"subject.title\" class=\"_left_area\">\n        <button\n          class=\"_subject_button\"\n          :class=\"{ _subject_button_active: index === holdIndex }\"\n          @click=\"subjectClickAction(subject, index)\"\n        >\n          <CCMDIcon\n            :name=\"(subject.icon as MDIconTypes)\"\n            class=\"_subject_icon\"\n            v-if=\"!subject.image\"\n          />\n          <img :src=\"subject.image\" :alt=\"subject.title\" class=\"_subject_image\" v-else />\n          <div v-html=\"subject.title\"></div>\n        </button>\n      </div>\n      <div class=\"_design1_space\" />\n    </div>\n\n    <div class=\"_right_area\">\n      <button\n        v-for=\"sub in subjectsComp[holdIndex]?.subtitle ?? []\"\n        :key=\"sub.path\"\n        @click=\"subtitleClickAction(sub.path)\"\n        :class=\"['_submenu_button', { _submenu_button_active: sub.path === fullPath }]\"\n      >\n        <div v-if=\"sub.path === fullPath\" class=\"_select_sign\" />\n        <div\n          v-html=\"sub.title\"\n          :style=\"`margin-left: ${sub.path === fullPath ? '15px' : '20px'}`\"\n        ></div>\n        <div v-if=\"sub.infoNumber\" class=\"_submenu_badge\">\n          {{ sub.infoNumber }}\n        </div>\n      </button>\n      <div class=\"_submenu_space\" />\n    </div>\n  </div>\n\n  <div class=\"_design1_space\">\n    <div class=\"_submenu_space _submenu_width\" />\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n._button_container\n  display: flex\n  background: var(--c-secondary)\n._left_contain\n  display: flex\n  flex-direction: column\n._left_area\n  width: 65px\n._subject_button\n  overflow-wrap: break-word\n  background: var(--c-primary)\n  border: none\n  outline: none\n  font-size: 10px\n  line-height: 13px\n  border-radius: 0px\n  height: 60px\n  width: 100%\n  align-items: center\n  justify-content: center\n  color: var(--c-text-color)\n  transition: 0.3s\n  cursor: pointer\n._right_area\n  width: 100%\n  display: flex\n  flex-direction: column\n  background: var(--c-secondary)\n._submenu_button\n  height: 48px\n  width: 100%\n  outline: none\n  border: none\n  font-size: 12px\n  background: var(--c-secondary)\n  display: flex\n  align-items: center\n  padding: 0\n  position: relative\n  cursor: pointer\n._submenu_button:hover\n  color: var(--c-text-color)\n._submenu_badge\n  color: var(--c-text-color)\n  position: absolute\n  right: 5px\n  display: flex\n  justify-content: center\n  background: var(--c-warning)\n  border-radius: 50%\n  width: 20px\n  height: 20px\n  justify-content: center\n  align-items: center\n  font-size: 10px\n._submenu_button_active\n  color: var(--c-text-color)\n._select_sign\n  width: 3px\n  height: 17px\n  background: var(--c-text-color)\n._subject_button_active\n  background: var(--c-secondary)\n  @media screen and (max-width: 700px)\n    opacity: 1\n._subject_button:hover\n  opacity: 0.7\n  @media screen and (max-width: 700px)\n    opacity: 1\n._subject_icon\n  font-size: 24px\n._subject_image\n  width: 24px\n  height: 24px\n  object-fit: contain\n._subtitle_button\n  border: none\n  outline: none\n  background: var(--c-primary)\n  border-radius: 0px\n  height: 60px\n  width: 100%\n  display: flex\n  align-items: center\n  padding: 0 15px 0 50px\n  color: var(--c-text-color)\n  transition: 0.3s\n  cursor: pointer\n._subtitle_button_active\n  opacity: 0.7\n  @media screen and (max-width: 700px)\n    opacity: 1\n._subtitle_button:hover\n  opacity: 0.7\n  @media screen and (max-width: 700px)\n    opacity: 1\n._subtitle_icon\n  font-size: 24px\n  margin-right: 20px\n._design1_space,._submenu_space\n  flex-grow: 1\n._design1_space\n  display: flex\n  flex-direction: column\n  background: var(--c-primary)\n._submenu_space\n  background: var(--c-secondary)\n._submenu_width\n  width: calc(100% - 65px)\n  margin-left: 65px\n</style>\n","<script setup lang=\"ts\" generic=\"TableType extends Record<string, any>\">\nimport { ref, onMounted, Ref, computed, watch } from 'vue'\nimport { CCCard, CCMDIcon, CCInput, CCSelect, CCButton, CCCheckbox, CCRadio } from '../../index'\nimport {\n  DrawerFilterType,\n  InputFilterType,\n  SelectFilterType,\n  CalendarFilterType,\n  CheckboxFilterType,\n  RadioFilterType,\n} from '../../types/Filter'\nimport { WhereClauseTuple } from '@magnetarjs/types'\n\nconst props = defineProps({\n  /**\n   * ドロワー内に表示させる項目\n   */\n  modelValue: {\n    type: Array as () => DrawerFilterType<TableType>[],\n    default: () => [],\n  },\n})\n\nconst emit = defineEmits<{\n  (e: 'filter', value: boolean): void\n  (e: 'update:modelValue', value: DrawerFilterType<TableType>[]): void\n}>()\n\n/** ページ側から受け取ったテーブル情報 */\nconst tableColumnObj = computed({\n  get: () => props.modelValue,\n  set: (value) => {\n    emit('update:modelValue', value)\n  },\n})\n\n/** 詳細検索メニュー表示非常時のフラグ */\nconst isSearchMenu = ref(false)\n\n/** tableColumnObjのtypeプロパティがinputであるかどうか */\nconst isInputType = ref(false)\n/** typeプロパティがinputのオブジェクトを格納 */\nconst inputObjArray: Ref<InputFilterType<TableType>[]> = ref([])\n/** 各インプットフォームで入力された値を格納 */\nconst inputValueArray = ref<string[]>([])\n\n/** tableColumnObjのtypeプロパティがselectであるかどうか */\nconst isSelectType = ref(false)\n/** typeプロパティがselectのオブジェクトを格納 */\nconst selectObjArray: Ref<SelectFilterType<TableType>[]> = ref([])\n/** 各ドロップダウンの選択肢を格納 */\nconst selectOptionsArray = ref<string[][]>([])\n/** 各ドロップダウンで選択された値を格納 */\nconst selectValueArray = ref<string[]>([])\n\n/** tableColumnObjのtypeプロパティがcheckboxesであるかどうか */\nconst isCheckboxesType = ref(false)\n/** typeプロパティがcheckboxesのオブジェクトを格納 */\nconst checkboxesObjArray: Ref<CheckboxFilterType<TableType>[]> = ref([])\n\n/** 各チェックボックスの選択肢を格納 */\nconst checkboxesOptionsArray = ref<string[][]>([])\n/** 各チェックボックスの真偽値を格納 */\nconst checkboxesValueArray = ref<boolean[][]>([])\n\n/** tableColumnObjにradioのtypeプロパティがあるかのフラグ */\nconst isRadioType = ref(false)\n/** typeプロパティがradioのオブジェクトを格納 */\nconst radioObjArray: Ref<RadioFilterType<TableType>[]> = ref([])\n/** 各ラジオボタンの選択肢を格納 */\nconst radioOptionsArray = ref<string[][]>([])\n/** 各ラジオボタンで選択された値を格納 */\nconst radioValueArray = ref<string[]>([])\n\n/** tableColumnObjのtypeプロパティがcalendarであるかどうか */\nconst isCalendarType = ref(false)\n/** typeプロパティがcalendarのオブジェクトを格納 */\nconst calendarObjArray: Ref<CalendarFilterType<TableType>[]> = ref([])\n/** 各カレンダーの開始日を格納 */\nconst calendarStartArray = ref<string[]>([])\n/** 各カレンダーの終了日を格納 */\nconst calendarEndArray = ref<string[]>([])\n\nonMounted(() => {\n  // 各オブジェクトのtypeプロパティを確認してフラグを切り替え\n  tableColumnObj.value.forEach((column) => {\n    if (column.filterType === 'input') isInputType.value = true\n    if (column.filterType === 'select') isSelectType.value = true\n    if (column.filterType === 'checkboxes') isCheckboxesType.value = true\n    if (column.filterType === 'radio') isRadioType.value = true\n    if (column.filterType === 'calendar') isCalendarType.value = true\n  })\n\n  // tableColumnObjにinputのtypeプロパティがあった場合\n  if (isInputType.value) {\n    inputObjArray.value = tableColumnObj.value.filter(\n      (column) => column.filterType === 'input'\n    ) as InputFilterType<TableType>[]\n  }\n\n  // tableColumnObjにselectのtypeプロパティがあった場合\n  if (isSelectType.value) {\n    selectObjArray.value = tableColumnObj.value.filter(\n      (column) => column.filterType === 'select'\n    ) as SelectFilterType<TableType>[]\n    // 各ドロップダウンの選択肢を格納\n    const selectOption = selectObjArray.value.map((column) => column.options ?? [])\n    selectOptionsArray.value.push(...selectOption)\n  }\n\n  // tableColumnObjにcheckboxesのtypeプロパティがあった場合\n  if (isCheckboxesType.value) {\n    checkboxesObjArray.value = tableColumnObj.value.filter(\n      (column) => column.filterType === 'checkboxes'\n    ) as CheckboxFilterType<TableType>[]\n    // 各チェックボックスの選択肢を格納\n    const checkboxesOption = checkboxesObjArray.value.map((column) => column.options ?? [])\n    checkboxesOptionsArray.value.push(...checkboxesOption)\n    // 各チェックボックスの初期値をfalseに設定\n    checkboxesObjArray.value.forEach((column, index) => {\n      checkboxesValueArray.value[index] = (column?.options ?? []).map(() => false)\n    })\n  }\n\n  // tableColumnObjにradioのtypeプロパティがあった場合\n  if (isRadioType.value) {\n    radioObjArray.value = tableColumnObj.value.filter(\n      (column) => column.filterType === 'radio'\n    ) as RadioFilterType<TableType>[]\n    // 各ラジオボタンの選択肢を格納\n    const radioOption = radioObjArray.value.map((column) => column.options ?? [])\n    radioOptionsArray.value.push(...radioOption)\n  }\n\n  // tableColumnObjにcalendarのtypeプロパティがあった場合\n  if (isCalendarType.value) {\n    calendarObjArray.value = tableColumnObj.value.filter(\n      (column) => column.filterType === 'calendar'\n    ) as CalendarFilterType<TableType>[]\n  }\n\n  // 詳細検索メニューの外側をクリックした時にメニューを閉じる\n  document.addEventListener('click', (e) => {\n    if (!(e.target as Element).closest('#menuArea') && isSearchMenu.value) searchMenuClose()\n  })\n  allClear()\n})\n\n/**\n * インプットフォームに入力された全角英数字、半角カタカナを変換\n * @param value 入力された値\n * @returns 変換済みの値\n */\nconst inputValueConvert = (value: string) => {\n  // 全角英数字を半角英数字に変換\n  let convertedValue = value.replace(/[０-９Ａ-Ｚａ-ｚ]/g, (s) =>\n    String.fromCharCode(s.charCodeAt(0) - 0xfee0)\n  )\n  // 半角カタカナを全角カタカナに変換\n  convertedValue = convertedValue.normalize('NFKC')\n  return convertedValue\n}\n\n// インプットフォームに入力された値を監視して、tableColumnObjのsearchプロパティに反映\nwatch(\n  inputValueArray,\n  (newValue) => {\n    inputObjArray.value.forEach((column, index) => {\n      const inputValue = newValue[index] || ''\n      column.search = inputValue as WhereClauseTuple<TableType>[2]\n      // const convertedValue = inputValueConvert(inputValue)\n      // column.search = convertedValue as WhereClauseTuple<TableType>[2]\n    })\n  },\n  { deep: true }\n)\n\n// ドロップダウンで選択された値を監視して、tableColumnObjのsearchプロパティに反映\nwatch(\n  selectValueArray,\n  (newValue) => {\n    selectObjArray.value.forEach((column, index) => {\n      column.search = (newValue[index] || '') as WhereClauseTuple<TableType>[2]\n    })\n  },\n  { deep: true }\n)\n\n// チェックボックスで選択された値を監視して、tableColumnObjのsearchプロパティに反映\nwatch(\n  checkboxesValueArray,\n  (newValue) => {\n    const checkboxesActive = checkboxesOptionsArray.value.map((column, index) =>\n      column.filter((_, subIndex) => newValue[index][subIndex])\n    )\n    checkboxesObjArray.value.forEach((column, index) => {\n      column.search = (checkboxesActive[index] || []) as WhereClauseTuple<TableType>[2]\n    })\n  },\n  { deep: true }\n)\n\n// ラジオボタンで選択された値を監視して、tableColumnObjのsearchプロパティに反映\nwatch(\n  radioValueArray,\n  (newValue) => {\n    radioObjArray.value.forEach((column, index) => {\n      column.search = (newValue[index] || '') as WhereClauseTuple<TableType>[2]\n    })\n  },\n  { deep: true }\n)\n\n// カレンダーで選択された値を監視して、tableColumnObjのsearchプロパティに反映\nwatch(\n  [calendarStartArray, calendarEndArray],\n  ([startValue, endValue]) => {\n    calendarObjArray.value.forEach((column, index) => {\n      column.search = { start: startValue[index] || '', end: endValue[index] || '' }\n    })\n  },\n  { deep: true }\n)\n\n/**\n * 詳細検索メニューを開く\n */\nconst searchMenuOpen = (event: MouseEvent) => {\n  event.stopPropagation()\n  isSearchMenu.value = true\n}\n\n/**\n * 詳細検索メニューを閉じる\n */\nconst searchMenuClose = () => {\n  isSearchMenu.value = false\n}\n\n/**\n * 各項目で入力された値をクリアする\n * @param type input | select | checkboxes | radio | calendar\n * @param index インデックス\n */\nconst valueClear = (\n  type: 'input' | 'select' | 'checkboxes' | 'radio' | 'calendar',\n  index: number\n) => {\n  if (type === 'input') inputValueArray.value[index] = ''\n  if (type === 'select') selectValueArray.value[index] = ''\n  if (type === 'checkboxes') checkboxesValueArray.value[index].fill(false)\n  if (type === 'radio') radioValueArray.value[index] = ''\n  if (type === 'calendar') {\n    calendarStartArray.value = new Array(calendarObjArray.value.length).fill('')\n    calendarEndArray.value = new Array(calendarObjArray.value.length).fill('')\n  }\n}\n\n/**\n * 各項目で入力されたすべての値をクリアしてページ側に伝える\n */\nconst allClear = () => {\n  calendarStartArray.value = new Array(calendarObjArray.value.length).fill('')\n  calendarEndArray.value = new Array(calendarObjArray.value.length).fill('')\n  selectValueArray.value = []\n  checkboxesValueArray.value.forEach((column) => {\n    column.fill(false)\n  })\n  radioValueArray.value = []\n  inputValueArray.value = []\n  emit('filter', false)\n}\n\n/**\n * 検索実行をページ側に伝える\n */\nconst runSearch = () => {\n  // カレンダーにエラーが発生していないかを確認\n  const hasError = calendarStartArray.value.some((start, index) => {\n    const end = calendarEndArray.value[index]\n    return getCalendarError(start) !== '' || getCalendarError(end) !== ''\n  })\n  if (hasError) {\n    return\n  }\n\n  emit('filter', true)\n}\n\n/**\n * カレンダーのエラーメッセージを取得 (YYYY/MM/DD形式で、存在しない日付もエラー)\n * @param value 入力された値\n * @returns エラーメッセージ\n */\nconst getCalendarError = (value: string) => {\n  if (value === '') return ''\n\n  // 形式チェック\n  const datePattern = /^\\d{4}\\/\\d{1,2}\\/\\d{1,2}$/\n  if (!datePattern.test(value)) {\n    return 'YYYY/MM/DD形式で入力してください'\n  }\n\n  const [yearStr, monthStr, dayStr] = value.split('/')\n  const year = Number(yearStr)\n  const month = Number(monthStr)\n  const day = Number(dayStr)\n\n  if (month < 1 || month > 12) {\n    return '月は1〜12の間で入力してください'\n  }\n\n  if (day < 1 || day > 31) {\n    return '日は1〜31の間で入力してください'\n  }\n\n  // 日付の存在チェック\n  const date = new Date(year, month - 1, day)\n  if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {\n    return '存在しない日付です'\n  }\n\n  return ''\n}\n</script>\n\n<template>\n  <div>\n    <div class=\"_serch_container\" @click=\"searchMenuOpen\">\n      <span class=\"_serch_text\">search</span>\n      <CCMDIcon name=\"manage_search\" class=\"_search_icon\" />\n    </div>\n    <transition name=\"slide\">\n      <div class=\"_back_ground\" v-show=\"isSearchMenu\">\n        <CCCard id=\"menuArea\" class=\"_menu_container\">\n          <CCMDIcon @click=\"searchMenuClose\" name=\"arrow_forward\" class=\"_arrow_icon\" />\n          <div class=\"_feature_container\">\n            <div\n              v-if=\"isInputType\"\n              v-for=\"(input, index) in inputObjArray\"\n              :key=\"index\"\n              class=\"_form_container\"\n            >\n              <div @click=\"valueClear(input.filterType, index)\" class=\"_clear_button\">\n                ×&thinsp;クリア\n              </div>\n              <CCInput\n                v-model=\"inputValueArray[index]\"\n                :label=\"input.label\"\n                :placeholder=\"input.placeholder\"\n                type=\"text\"\n                shadow\n              />\n            </div>\n            <div\n              v-if=\"isSelectType\"\n              v-for=\"(select, index) in selectObjArray\"\n              :key=\"index\"\n              class=\"_form_container\"\n            >\n              <div @click=\"valueClear(select.filterType, index)\" class=\"_clear_button\">\n                ×&thinsp;クリア\n              </div>\n              <CCSelect\n                v-model=\"selectValueArray[index]\"\n                :options=\"selectOptionsArray[index]\"\n                :label=\"select.label\"\n                shadow\n                :placeholder=\"select.placeholder\"\n              />\n            </div>\n            <div\n              v-if=\"isCheckboxesType\"\n              v-for=\"(checkbox, checkboxIndex) in checkboxesObjArray\"\n              :key=\"checkboxIndex\"\n              class=\"_checkbox_radio_container\"\n            >\n              <div class=\"_checbox_label\">{{ checkbox.label }}</div>\n              <div @click=\"valueClear(checkbox.filterType, checkboxIndex)\" class=\"_clear_button\">\n                ×&thinsp;クリア\n              </div>\n              <div class=\"_check_radio_content\">\n                <div v-for=\"(label, labelIndex) in checkbox.options\" :key=\"label\">\n                  <CCCheckbox\n                    :label=\"label\"\n                    v-model=\"checkboxesValueArray[checkboxIndex][labelIndex]\"\n                    labelColor=\"black\"\n                  />\n                </div>\n              </div>\n            </div>\n            <div\n              v-if=\"isRadioType\"\n              v-for=\"(radio, radioIndex) in radioObjArray\"\n              :key=\"radioIndex\"\n              class=\"_checkbox_radio_container\"\n            >\n              <div class=\"_checbox_label\">{{ radio.label }}</div>\n              <div @click=\"valueClear(radio.filterType, radioIndex)\" class=\"_clear_button\">\n                ×&thinsp;クリア\n              </div>\n              <div class=\"_check_radio_content\">\n                <div v-for=\"label in radio.options\" :key=\"label\">\n                  <CCRadio :value=\"label\" v-model=\"radioValueArray[radioIndex]\" />\n                </div>\n              </div>\n            </div>\n            <div\n              v-if=\"isCalendarType\"\n              v-for=\"(calendar, index) in calendarObjArray\"\n              :key=\"index\"\n              class=\"_form_container\"\n            >\n              <div class=\"_calendar_form\">\n                <div @click=\"valueClear(calendar.filterType, index)\" class=\"_clear_button\">\n                  ×&thinsp;クリア\n                </div>\n\n                <CCInput\n                  v-model=\"calendarStartArray[index]\"\n                  :label=\"calendar.label\"\n                  shadow\n                  date\n                  placeholder=\"開始する日を選択\"\n                  :error4=\"getCalendarError(calendarStartArray[index])\"\n                />\n                <CCInput\n                  v-model=\"calendarEndArray[index]\"\n                  shadow\n                  date\n                  placeholder=\"終了する日を選択\"\n                  :error4=\"getCalendarError(calendarEndArray[index])\"\n                />\n              </div>\n            </div>\n            <div class=\"_button_container\">\n              <CCButton\n                @click=\"allClear()\"\n                style=\"background: #333333\"\n                label=\"全ての条件をクリア\"\n              />\n              <CCButton @click=\"runSearch()\" style=\"background: #00bbc9\" label=\"検索\" />\n            </div>\n          </div>\n        </CCCard>\n      </div>\n    </transition>\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n._serch_container\n  display: flex\n  align-items: center\n  gap: 15px\n  cursor: pointer\n  transition: 0.3s\n._serch_container:hover\n  opacity: 0.7\n._serch_text\n  font-size: 20px\n._search_icon\n  font-size: 40px\n._menu_container\n  background: #D2D2D2\n  width: 325px\n  min-height: 100%\n  position: fixed\n  top: 0\n  bottom: 0\n  right: 0\n  overflow-y: scroll\n  z-index: 1\n._feature_container\n  width: 80%\n  margin: 20px auto 0 auto\n  display: flex\n  flex-direction: column\n  row-gap: 20px\n._form_container\n  display: flex\n  flex-direction: column\n  position: relative\n._checkbox_radio_container\n  position: relative\n  display: flex\n  flex-direction: column\n._checbox_label\n  padding: 0 5px\n  font-size: 16px\n  color: #707070\n  width: fit-content\n._check_radio_content\n  background: #FFFFFF\n  padding: 20px 20px 20px 15px\n  border-radius: 5px\n._calendar_form\n  display: flex\n  flex-direction: column\n  row-gap: 10px\n._clear_button\n  font-size: 12px\n  font-weight: bold\n  color: var(--pm-text-black)\n  position: absolute\n  right: 0\n  top: 2px\n  z-index: 1\n  cursor: pointer\n._back_ground\n  position: fixed\n  right: 0px\n  top: 0px\n  width: 100%\n  height: 100vh\n  overflow-y: scroll\n  z-index: 100\n._button_container\n  display: flex\n  flex-direction: column\n  row-gap: 20px\n  margin-top: 60px\n  margin-bottom: 80px\n._arrow_icon\n  font-size: 50px\n  font-weight: bold\n  color: #333333\n  margin: 10px 0 0 10px\n  cursor: pointer\n  transition: 0.3s\n::v-deep(._select_form_container)\n  background-color: white\n._arrow_icon:hover\n  opacity: 0.7\n.slide-enter-active, .slide-leave-active\n  transition: transform 0.5s ease\n.slide-enter-from, .slide-leave-to\n  transform: translateX(100%)\n.slide-enter-to, .slide-leave-from\n  transform: translateX(0)\n</style>\n","export default function(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import ascending from \"./ascending\";\n\nexport default function(compare) {\n  if (compare.length === 1) compare = ascendingComparator(compare);\n  return {\n    left: function(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) < 0) lo = mid + 1;\n        else hi = mid;\n      }\n      return lo;\n    },\n    right: function(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) > 0) hi = mid;\n        else lo = mid + 1;\n      }\n      return lo;\n    }\n  };\n}\n\nfunction ascendingComparator(f) {\n  return function(d, x) {\n    return ascending(f(d), x);\n  };\n}\n","import ascending from \"./ascending\";\nimport bisector from \"./bisector\";\n\nvar ascendingBisect = bisector(ascending);\nexport var bisectRight = ascendingBisect.right;\nexport var bisectLeft = ascendingBisect.left;\nexport default bisectRight;\n","var e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\nexport default function(start, stop, count) {\n  var reverse,\n      i = -1,\n      n,\n      ticks,\n      step;\n\n  stop = +stop, start = +start, count = +count;\n  if (start === stop && count > 0) return [start];\n  if (reverse = stop < start) n = start, start = stop, stop = n;\n  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n  if (step > 0) {\n    start = Math.ceil(start / step);\n    stop = Math.floor(stop / step);\n    ticks = new Array(n = Math.ceil(stop - start + 1));\n    while (++i < n) ticks[i] = (start + i) * step;\n  } else {\n    start = Math.floor(start * step);\n    stop = Math.ceil(stop * step);\n    ticks = new Array(n = Math.ceil(start - stop + 1));\n    while (++i < n) ticks[i] = (start - i) / step;\n  }\n\n  if (reverse) ticks.reverse();\n\n  return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n  var step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log(step) / Math.LN10),\n      error = step / Math.pow(10, power);\n  return power >= 0\n      ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n      : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nexport function tickStep(start, stop, count) {\n  var step0 = Math.abs(stop - start) / Math.max(0, count),\n      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n      error = step0 / step1;\n  if (error >= e10) step1 *= 10;\n  else if (error >= e5) step1 *= 5;\n  else if (error >= e2) step1 *= 2;\n  return stop < start ? -step1 : step1;\n}\n","export default function(values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      max;\n\n  if (valueof == null) {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = values[i]) != null && value > max) {\n            max = value;\n          }\n        }\n      }\n    }\n  }\n\n  else {\n    while (++i < n) { // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        max = value;\n        while (++i < n) { // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null && value > max) {\n            max = value;\n          }\n        }\n      }\n    }\n  }\n\n  return max;\n}\n","var noop = {value: function() {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\nexport default dispatch;\n","export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n","import namespaces from \"./namespaces\";\n\nexport default function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name;\n}\n","import namespace from \"./namespace\";\nimport {xhtml} from \"./namespaces\";\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === xhtml && document.documentElement.namespaceURI === xhtml\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\nexport default function(name) {\n  var fullname = namespace(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n}\n","function none() {}\n\nexport default function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n}\n","import {Selection} from \"./index\";\nimport selector from \"../selector\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n","function empty() {\n  return [];\n}\n\nexport default function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n}\n","import {Selection} from \"./index\";\nimport selectorAll from \"../selectorAll\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, parents);\n}\n","var matcher = function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n};\n\nif (typeof document !== \"undefined\") {\n  var element = document.documentElement;\n  if (!element.matches) {\n    var vendorMatches = element.webkitMatchesSelector\n        || element.msMatchesSelector\n        || element.mozMatchesSelector\n        || element.oMatchesSelector;\n    matcher = function(selector) {\n      return function() {\n        return vendorMatches.call(this, selector);\n      };\n    };\n  }\n}\n\nexport default matcher;\n","import {Selection} from \"./index\";\nimport matcher from \"../matcher\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n","export default function(update) {\n  return new Array(update.length);\n}\n","import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n  return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n","export default function(x) {\n  return function() {\n    return x;\n  };\n}\n","import {Selection} from \"./index\";\nimport {EnterNode} from \"./enter\";\nimport constant from \"../constant\";\n\nvar keyPrefix = \"$\"; // Protect against keys like “__proto__”.\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don’t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = {},\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);\n      if (keyValue in nodeByKeyValue) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue[keyValue] = node;\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = keyPrefix + key.call(parent, data[i], i, data);\n    if (node = nodeByKeyValue[keyValue]) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue[keyValue] = null;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\nexport default function(value, key) {\n  if (!value) {\n    data = new Array(this.size()), j = -1;\n    this.each(function(d) { data[++j] = d; });\n    return data;\n  }\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = constant(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = value.call(parent, parent && parent.__data__, j, parents),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new Selection(update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n}\n","import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n  return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n","import {Selection} from \"./index\";\n\nexport default function(selection) {\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Selection(merges, this._parents);\n}\n","export default function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n}\n","import {Selection} from \"./index\";\n\nexport default function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","export default function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n}\n","export default function() {\n  var nodes = new Array(this.size()), i = -1;\n  this.each(function() { nodes[++i] = this; });\n  return nodes;\n}\n","export default function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n}\n","export default function() {\n  var size = 0;\n  this.each(function() { ++size; });\n  return size;\n}\n","export default function() {\n  return !this.node();\n}\n","export default function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n}\n","import namespace from \"../namespace\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n","export default function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n}\n","import defaultView from \"../window\";\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\nexport default function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n","function propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\nexport default function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n}\n","function classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\nexport default function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n}\n","function textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n}\n","function htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n}\n","function raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n  return this.each(raise);\n}\n","function lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n  return this.each(lower);\n}\n","import creator from \"../creator\";\n\nexport default function(name) {\n  var create = typeof name === \"function\" ? name : creator(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n}\n","import creator from \"../creator\";\nimport selector from \"../selector\";\n\nfunction constantNull() {\n  return null;\n}\n\nexport default function(name, before) {\n  var create = typeof name === \"function\" ? name : creator(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n}\n","function remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n  return this.each(remove);\n}\n","function selection_cloneShallow() {\n  return this.parentNode.insertBefore(this.cloneNode(false), this.nextSibling);\n}\n\nfunction selection_cloneDeep() {\n  return this.parentNode.insertBefore(this.cloneNode(true), this.nextSibling);\n}\n\nexport default function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n","export default function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n}\n","var filterEvents = {};\n\nexport var event = null;\n\nif (typeof document !== \"undefined\") {\n  var element = document.documentElement;\n  if (!(\"onmouseenter\" in element)) {\n    filterEvents = {mouseenter: \"mouseover\", mouseleave: \"mouseout\"};\n  }\n}\n\nfunction filterContextListener(listener, index, group) {\n  listener = contextListener(listener, index, group);\n  return function(event) {\n    var related = event.relatedTarget;\n    if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {\n      listener.call(this, event);\n    }\n  };\n}\n\nfunction contextListener(listener, index, group) {\n  return function(event1) {\n    var event0 = event; // Events can be reentrant (e.g., focus).\n    event = event1;\n    try {\n      listener.call(this, this.__data__, index, group);\n    } finally {\n      event = event0;\n    }\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, capture) {\n  var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;\n  return function(d, i, group) {\n    var on = this.__on, o, listener = wrap(value, i, group);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.capture);\n        this.addEventListener(o.type, o.listener = listener, o.capture = capture);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, capture);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\nexport default function(typename, value, capture) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  if (capture == null) capture = false;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));\n  return this;\n}\n\nexport function customEvent(event1, listener, that, args) {\n  var event0 = event;\n  event1.sourceEvent = event;\n  event = event1;\n  try {\n    return listener.apply(that, args);\n  } finally {\n    event = event0;\n  }\n}\n","import defaultView from \"../window\";\n\nfunction dispatchEvent(node, type, params) {\n  var window = defaultView(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\nexport default function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n}\n","import selection_select from \"./select\";\nimport selection_selectAll from \"./selectAll\";\nimport selection_filter from \"./filter\";\nimport selection_data from \"./data\";\nimport selection_enter from \"./enter\";\nimport selection_exit from \"./exit\";\nimport selection_merge from \"./merge\";\nimport selection_order from \"./order\";\nimport selection_sort from \"./sort\";\nimport selection_call from \"./call\";\nimport selection_nodes from \"./nodes\";\nimport selection_node from \"./node\";\nimport selection_size from \"./size\";\nimport selection_empty from \"./empty\";\nimport selection_each from \"./each\";\nimport selection_attr from \"./attr\";\nimport selection_style from \"./style\";\nimport selection_property from \"./property\";\nimport selection_classed from \"./classed\";\nimport selection_text from \"./text\";\nimport selection_html from \"./html\";\nimport selection_raise from \"./raise\";\nimport selection_lower from \"./lower\";\nimport selection_append from \"./append\";\nimport selection_insert from \"./insert\";\nimport selection_remove from \"./remove\";\nimport selection_clone from \"./clone\";\nimport selection_datum from \"./datum\";\nimport selection_on from \"./on\";\nimport selection_dispatch from \"./dispatch\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: selection_select,\n  selectAll: selection_selectAll,\n  filter: selection_filter,\n  data: selection_data,\n  enter: selection_enter,\n  exit: selection_exit,\n  merge: selection_merge,\n  order: selection_order,\n  sort: selection_sort,\n  call: selection_call,\n  nodes: selection_nodes,\n  node: selection_node,\n  size: selection_size,\n  empty: selection_empty,\n  each: selection_each,\n  attr: selection_attr,\n  style: selection_style,\n  property: selection_property,\n  classed: selection_classed,\n  text: selection_text,\n  html: selection_html,\n  raise: selection_raise,\n  lower: selection_lower,\n  append: selection_append,\n  insert: selection_insert,\n  remove: selection_remove,\n  clone: selection_clone,\n  datum: selection_datum,\n  on: selection_on,\n  dispatch: selection_dispatch\n};\n\nexport default selection;\n","import {Selection, root} from \"./selection/index\";\n\nexport default function(selector) {\n  return typeof selector === \"string\"\n      ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n      : new Selection([[selector]], root);\n}\n","var nextId = 0;\n\nexport default function local() {\n  return new Local;\n}\n\nfunction Local() {\n  this._ = \"@\" + (++nextId).toString(36);\n}\n\nLocal.prototype = local.prototype = {\n  constructor: Local,\n  get: function(node) {\n    var id = this._;\n    while (!(id in node)) if (!(node = node.parentNode)) return;\n    return node[id];\n  },\n  set: function(node, value) {\n    return node[this._] = value;\n  },\n  remove: function(node) {\n    return this._ in node && delete node[this._];\n  },\n  toString: function() {\n    return this._;\n  }\n};\n","export default function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n","import define, {extend} from \"./define\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex3 = /^#([0-9a-f]{3})$/,\n    reHex6 = /^#([0-9a-f]{6})$/,\n    reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n    reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n    reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n    reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n    reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n    reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n  displayable: function() {\n    return this.rgb().displayable();\n  },\n  toString: function() {\n    return this.rgb() + \"\";\n  }\n});\n\nexport default function color(format) {\n  var m;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00\n      : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format])\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb: function() {\n    return this;\n  },\n  displayable: function() {\n    return (0 <= this.r && this.r <= 255)\n        && (0 <= this.g && this.g <= 255)\n        && (0 <= this.b && this.b <= 255)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  toString: function() {\n    var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n    return (a === 1 ? \"rgb(\" : \"rgba(\")\n        + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n        + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n        + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n        + (a === 1 ? \")\" : \", \" + a + \")\");\n  }\n}));\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  displayable: function() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n","export var deg2rad = Math.PI / 180;\nexport var rad2deg = 180 / Math.PI;\n","import define, {extend} from \"./define\";\nimport {Color, rgbConvert, Rgb} from \"./color\";\nimport {deg2rad, rad2deg} from \"./math\";\n\nvar Kn = 18,\n    Xn = 0.950470, // D65 standard referent\n    Yn = 1,\n    Zn = 1.088830,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) {\n    var h = o.h * deg2rad;\n    return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n  }\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var b = rgb2xyz(o.r),\n      a = rgb2xyz(o.g),\n      l = rgb2xyz(o.b),\n      x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),\n      y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn),\n      z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n  brighter: function(k) {\n    return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker: function(k) {\n    return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb: function() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    y = Yn * lab2xyz(y);\n    x = Xn * lab2xyz(x);\n    z = Zn * lab2xyz(z);\n    return new Rgb(\n      xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n      xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n      xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction xyz2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2xyz(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  var h = Math.atan2(o.b, o.a) * rad2deg;\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Hcl, hcl, extend(Color, {\n  brighter: function(k) {\n    return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k), this.opacity);\n  },\n  darker: function(k) {\n    return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k), this.opacity);\n  },\n  rgb: function() {\n    return labConvert(this).rgb();\n  }\n}));\n","import define, {extend} from \"./define\";\nimport {Color, rgbConvert, Rgb, darker, brighter} from \"./color\";\nimport {deg2rad, rad2deg} from \"./math\";\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nexport default function cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nexport function Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Cubehelix, cubehelix, extend(Color, {\n  brighter: function(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new Rgb(\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n","export default function(x) {\n  return function() {\n    return x;\n  };\n}\n","import constant from \"./constant\";\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nexport function hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n  };\n}\n\nexport default function nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis\";\nimport basisClosed from \"./basisClosed\";\nimport nogamma, {gamma} from \"./color\";\n\nexport default (function rgbGamma(y) {\n  var color = gamma(y);\n\n  function rgb(start, end) {\n    var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = nogamma(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = colorRgb(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","import value from \"./value\";\n\nexport default function(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n","export default function(a, b) {\n  var d = new Date;\n  return a = +a, b -= a, function(t) {\n    return d.setTime(a + b * t), d;\n  };\n}\n","export default function(a, b) {\n  return a = +a, b -= a, function(t) {\n    return a + b * t;\n  };\n}\n","import value from \"./value\";\n\nexport default function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = value(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n}\n","import number from \"./number\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\nexport default function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: number(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n}\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb\";\nimport array from \"./array\";\nimport date from \"./date\";\nimport number from \"./number\";\nimport object from \"./object\";\nimport string from \"./string\";\nimport constant from \"./constant\";\n\nexport default function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? constant(b)\n      : (t === \"number\" ? number\n      : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n      : b instanceof color ? rgb\n      : b instanceof Date ? date\n      : Array.isArray(b) ? array\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n      : number)(a, b);\n}\n","export default function(a, b) {\n  return a = +a, b -= a, function(t) {\n    return Math.round(a + b * t);\n  };\n}\n","var degrees = 180 / Math.PI;\n\nexport var identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n}\n","import decompose, {identity} from \"./decompose\";\n\nvar cssNode,\n    cssRoot,\n    cssView,\n    svgNode;\n\nexport function parseCss(value) {\n  if (value === \"none\") return identity;\n  if (!cssNode) cssNode = document.createElement(\"DIV\"), cssRoot = document.documentElement, cssView = document.defaultView;\n  cssNode.style.transform = value;\n  value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue(\"transform\");\n  cssRoot.removeChild(cssNode);\n  value = value.slice(7, -1).split(\",\");\n  return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);\n}\n\nexport function parseSvg(value) {\n  if (value == null) return identity;\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n  value = value.matrix;\n  return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n","import number from \"../number\";\nimport {parseCss, parseSvg} from \"./parse\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n","import {cubehelix as colorCubehelix} from \"d3-color\";\nimport color, {hue} from \"./color\";\n\nfunction cubehelix(hue) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n          s = color(start.s, end.s),\n          l = color(start.l, end.l),\n          opacity = color(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);\n","var frame = 0, // is an animation frame pending?\n    timeout = 0, // is a timeout pending?\n    interval = 0, // are any timers active?\n    pokeDelay = 1000, // how frequently we check for clock skew\n    taskHead,\n    taskTail,\n    clockLast = 0,\n    clockNow = 0,\n    clockSkew = 0,\n    clock = typeof performance === \"object\" && performance.now ? performance : Date,\n    setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nexport function Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nexport function timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nexport function timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n","import {Timer} from \"./timer\";\n\nexport default function(callback, delay, time) {\n  var t = new Timer;\n  delay = delay == null ? 0 : +delay;\n  t.restart(function(elapsed) {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n  var schedules = node.__transition;\n  if (!schedules) node.__transition = {};\n  else if (id in schedules) return;\n  create(node, id, {\n    name: name,\n    index: index, // For context during callback.\n    group: group, // For context during callback.\n    on: emptyOn,\n    tween: emptyTween,\n    time: timing.time,\n    delay: timing.delay,\n    duration: timing.duration,\n    ease: timing.ease,\n    timer: null,\n    state: CREATED\n  });\n}\n\nexport function init(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n  return schedule;\n}\n\nexport function set(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > STARTING) throw new Error(\"too late; already started\");\n  return schedule;\n}\n\nexport function get(node, id) {\n  var schedule = node.__transition;\n  if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n  return schedule;\n}\n\nfunction create(node, id, self) {\n  var schedules = node.__transition,\n      tween;\n\n  // Initialize the self timer when the transition is created.\n  // Note the actual delay is not known until the first callback!\n  schedules[id] = self;\n  self.timer = timer(schedule, 0, self.time);\n\n  function schedule(elapsed) {\n    self.state = SCHEDULED;\n    self.timer.restart(start, self.delay, self.time);\n\n    // If the elapsed delay is less than our first sleep, start immediately.\n    if (self.delay <= elapsed) start(elapsed - self.delay);\n  }\n\n  function start(elapsed) {\n    var i, j, n, o;\n\n    // If the state is not SCHEDULED, then we previously errored on start.\n    if (self.state !== SCHEDULED) return stop();\n\n    for (i in schedules) {\n      o = schedules[i];\n      if (o.name !== self.name) continue;\n\n      // While this element already has a starting transition during this frame,\n      // defer starting an interrupting transition until that transition has a\n      // chance to tick (and possibly end); see d3/d3-transition#54!\n      if (o.state === STARTED) return timeout(start);\n\n      // Interrupt the active transition, if any.\n      // Dispatch the interrupt event.\n      if (o.state === RUNNING) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n\n      // Cancel any pre-empted transitions. No interrupt event is dispatched\n      // because the cancelled transitions never started. Note that this also\n      // removes this transition from the pending list!\n      else if (+i < id) {\n        o.state = ENDED;\n        o.timer.stop();\n        delete schedules[i];\n      }\n    }\n\n    // Defer the first tick to end of the current frame; see d3/d3#1576.\n    // Note the transition may be canceled after start and before the first tick!\n    // Note this must be scheduled before the start event; see d3/d3-transition#16!\n    // Assuming this is successful, subsequent callbacks go straight to tick.\n    timeout(function() {\n      if (self.state === STARTED) {\n        self.state = RUNNING;\n        self.timer.restart(tick, self.delay, self.time);\n        tick(elapsed);\n      }\n    });\n\n    // Dispatch the start event.\n    // Note this must be done before the tween are initialized.\n    self.state = STARTING;\n    self.on.call(\"start\", node, node.__data__, self.index, self.group);\n    if (self.state !== STARTING) return; // interrupted\n    self.state = STARTED;\n\n    // Initialize the tween, deleting null tween.\n    tween = new Array(n = self.tween.length);\n    for (i = 0, j = -1; i < n; ++i) {\n      if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n        tween[++j] = o;\n      }\n    }\n    tween.length = j + 1;\n  }\n\n  function tick(elapsed) {\n    var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n        i = -1,\n        n = tween.length;\n\n    while (++i < n) {\n      tween[i].call(null, t);\n    }\n\n    // Dispatch the end event.\n    if (self.state === ENDING) {\n      self.on.call(\"end\", node, node.__data__, self.index, self.group);\n      stop();\n    }\n  }\n\n  function stop() {\n    self.state = ENDED;\n    self.timer.stop();\n    delete schedules[id];\n    for (var i in schedules) return; // eslint-disable-line no-unused-vars\n    delete node.__transition;\n  }\n}\n","import {STARTING, ENDING, ENDED} from \"./transition/schedule\";\n\nexport default function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      active,\n      empty = true,\n      i;\n\n  if (!schedules) return;\n\n  name = name == null ? null : name + \"\";\n\n  for (i in schedules) {\n    if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n    active = schedule.state > STARTING && schedule.state < ENDING;\n    schedule.state = ENDED;\n    schedule.timer.stop();\n    if (active) schedule.on.call(\"interrupt\", node, node.__data__, schedule.index, schedule.group);\n    delete schedules[i];\n  }\n\n  if (empty) delete node.__transition;\n}\n","import interrupt from \"../interrupt\";\n\nexport default function(name) {\n  return this.each(function() {\n    interrupt(this, name);\n  });\n}\n","import {get, set} from \"./schedule\";\n\nfunction tweenRemove(id, name) {\n  var tween0, tween1;\n  return function() {\n    var schedule = set(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = tween0 = tween;\n      for (var i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1 = tween1.slice();\n          tween1.splice(i, 1);\n          break;\n        }\n      }\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nfunction tweenFunction(id, name, value) {\n  var tween0, tween1;\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    var schedule = set(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we’re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = (tween0 = tween).slice();\n      for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1[i] = t;\n          break;\n        }\n      }\n      if (i === n) tween1.push(t);\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nexport default function(name, value) {\n  var id = this._id;\n\n  name += \"\";\n\n  if (arguments.length < 2) {\n    var tween = get(this.node(), id).tween;\n    for (var i = 0, n = tween.length, t; i < n; ++i) {\n      if ((t = tween[i]).name === name) {\n        return t.value;\n      }\n    }\n    return null;\n  }\n\n  return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n  var id = transition._id;\n\n  transition.each(function() {\n    var schedule = set(this, id);\n    (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n  });\n\n  return function(node) {\n    return get(node, id).value[name];\n  };\n}\n","import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n  var c;\n  return (typeof b === \"number\" ? interpolateNumber\n      : b instanceof color ? interpolateRgb\n      : (c = color(b)) ? (b = c, interpolateRgb)\n      : interpolateString)(a, b);\n}\n","import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween\";\nimport interpolate from \"./interpolate\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n  var value00,\n      interpolate0;\n  return function() {\n    var value0 = this.getAttribute(name);\n    return value0 === value1 ? null\n        : value0 === value00 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value1);\n  };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n  var value00,\n      interpolate0;\n  return function() {\n    var value0 = this.getAttributeNS(fullname.space, fullname.local);\n    return value0 === value1 ? null\n        : value0 === value00 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value1);\n  };\n}\n\nfunction attrFunction(name, interpolate, value) {\n  var value00,\n      value10,\n      interpolate0;\n  return function() {\n    var value0, value1 = value(this);\n    if (value1 == null) return void this.removeAttribute(name);\n    value0 = this.getAttribute(name);\n    return value0 === value1 ? null\n        : value0 === value00 && value1 === value10 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value10 = value1);\n  };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n  var value00,\n      value10,\n      interpolate0;\n  return function() {\n    var value0, value1 = value(this);\n    if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n    value0 = this.getAttributeNS(fullname.space, fullname.local);\n    return value0 === value1 ? null\n        : value0 === value00 && value1 === value10 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value10 = value1);\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n  return this.attrTween(name, typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n      : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n      : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value + \"\"));\n}\n","import {namespace} from \"d3-selection\";\n\nfunction attrTweenNS(fullname, value) {\n  function tween() {\n    var node = this, i = value.apply(node, arguments);\n    return i && function(t) {\n      node.setAttributeNS(fullname.space, fullname.local, i(t));\n    };\n  }\n  tween._value = value;\n  return tween;\n}\n\nfunction attrTween(name, value) {\n  function tween() {\n    var node = this, i = value.apply(node, arguments);\n    return i && function(t) {\n      node.setAttribute(name, i(t));\n    };\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(name, value) {\n  var key = \"attr.\" + name;\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  var fullname = namespace(name);\n  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n","import {get, init} from \"./schedule\";\n\nfunction delayFunction(id, value) {\n  return function() {\n    init(this, id).delay = +value.apply(this, arguments);\n  };\n}\n\nfunction delayConstant(id, value) {\n  return value = +value, function() {\n    init(this, id).delay = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? delayFunction\n          : delayConstant)(id, value))\n      : get(this.node(), id).delay;\n}\n","import {get, set} from \"./schedule\";\n\nfunction durationFunction(id, value) {\n  return function() {\n    set(this, id).duration = +value.apply(this, arguments);\n  };\n}\n\nfunction durationConstant(id, value) {\n  return value = +value, function() {\n    set(this, id).duration = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? durationFunction\n          : durationConstant)(id, value))\n      : get(this.node(), id).duration;\n}\n","import {get, set} from \"./schedule\";\n\nfunction easeConstant(id, value) {\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    set(this, id).ease = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each(easeConstant(id, value))\n      : get(this.node(), id).ease;\n}\n","import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Transition(subgroups, this._parents, this._name, this._id);\n}\n","import {Transition} from \"./index\";\n\nexport default function(transition) {\n  if (transition._id !== this._id) throw new Error;\n\n  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Transition(merges, this._parents, this._name, this._id);\n}\n","import {get, set, init} from \"./schedule\";\n\nfunction start(name) {\n  return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n    var i = t.indexOf(\".\");\n    if (i >= 0) t = t.slice(0, i);\n    return !t || t === \"start\";\n  });\n}\n\nfunction onFunction(id, name, listener) {\n  var on0, on1, sit = start(name) ? init : set;\n  return function() {\n    var schedule = sit(this, id),\n        on = schedule.on;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we’re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n    schedule.on = on1;\n  };\n}\n\nexport default function(name, listener) {\n  var id = this._id;\n\n  return arguments.length < 2\n      ? get(this.node(), id).on.on(name)\n      : this.each(onFunction(id, name, listener));\n}\n","function removeFunction(id) {\n  return function() {\n    var parent = this.parentNode;\n    for (var i in this.__transition) if (+i !== id) return;\n    if (parent) parent.removeChild(this);\n  };\n}\n\nexport default function() {\n  return this.on(\"end.remove\", removeFunction(this._id));\n}\n","import {selector} from \"d3-selection\";\nimport {Transition} from \"./index\";\nimport schedule, {get} from \"./schedule\";\n\nexport default function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n        schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n      }\n    }\n  }\n\n  return new Transition(subgroups, this._parents, name, id);\n}\n","import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index\";\nimport schedule, {get} from \"./schedule\";\n\nexport default function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n          if (child = children[k]) {\n            schedule(child, name, id, k, children, inherit);\n          }\n        }\n        subgroups.push(children);\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Transition(subgroups, parents, name, id);\n}\n","import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n  return new Selection(this._groups, this._parents);\n}\n","import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {tweenValue} from \"./tween\";\nimport interpolate from \"./interpolate\";\n\nfunction styleRemove(name, interpolate) {\n  var value00,\n      value10,\n      interpolate0;\n  return function() {\n    var value0 = style(this, name),\n        value1 = (this.style.removeProperty(name), style(this, name));\n    return value0 === value1 ? null\n        : value0 === value00 && value1 === value10 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value10 = value1);\n  };\n}\n\nfunction styleRemoveEnd(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n  var value00,\n      interpolate0;\n  return function() {\n    var value0 = style(this, name);\n    return value0 === value1 ? null\n        : value0 === value00 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value1);\n  };\n}\n\nfunction styleFunction(name, interpolate, value) {\n  var value00,\n      value10,\n      interpolate0;\n  return function() {\n    var value0 = style(this, name),\n        value1 = value(this);\n    if (value1 == null) value1 = (this.style.removeProperty(name), style(this, name));\n    return value0 === value1 ? null\n        : value0 === value00 && value1 === value10 ? interpolate0\n        : interpolate0 = interpolate(value00 = value0, value10 = value1);\n  };\n}\n\nexport default function(name, value, priority) {\n  var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n  return value == null ? this\n          .styleTween(name, styleRemove(name, i))\n          .on(\"end.style.\" + name, styleRemoveEnd(name))\n      : this.styleTween(name, typeof value === \"function\"\n          ? styleFunction(name, i, tweenValue(this, \"style.\" + name, value))\n          : styleConstant(name, i, value + \"\"), priority);\n}\n","function styleTween(name, value, priority) {\n  function tween() {\n    var node = this, i = value.apply(node, arguments);\n    return i && function(t) {\n      node.style.setProperty(name, i(t), priority);\n    };\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(name, value, priority) {\n  var key = \"style.\" + (name += \"\");\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n","import {tweenValue} from \"./tween\";\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var value1 = value(this);\n    this.textContent = value1 == null ? \"\" : value1;\n  };\n}\n\nexport default function(value) {\n  return this.tween(\"text\", typeof value === \"function\"\n      ? textFunction(tweenValue(this, \"text\", value))\n      : textConstant(value == null ? \"\" : value + \"\"));\n}\n","import {Transition, newId} from \"./index\";\nimport schedule, {get} from \"./schedule\";\n\nexport default function() {\n  var name = this._name,\n      id0 = this._id,\n      id1 = newId();\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        var inherit = get(node, id0);\n        schedule(node, name, id1, i, group, {\n          time: inherit.time + inherit.delay + inherit.duration,\n          delay: 0,\n          duration: inherit.duration,\n          ease: inherit.ease\n        });\n      }\n    }\n  }\n\n  return new Transition(groups, this._parents, name, id1);\n}\n","import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr\";\nimport transition_attrTween from \"./attrTween\";\nimport transition_delay from \"./delay\";\nimport transition_duration from \"./duration\";\nimport transition_ease from \"./ease\";\nimport transition_filter from \"./filter\";\nimport transition_merge from \"./merge\";\nimport transition_on from \"./on\";\nimport transition_remove from \"./remove\";\nimport transition_select from \"./select\";\nimport transition_selectAll from \"./selectAll\";\nimport transition_selection from \"./selection\";\nimport transition_style from \"./style\";\nimport transition_styleTween from \"./styleTween\";\nimport transition_text from \"./text\";\nimport transition_transition from \"./transition\";\nimport transition_tween from \"./tween\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n  this._groups = groups;\n  this._parents = parents;\n  this._name = name;\n  this._id = id;\n}\n\nexport default function transition(name) {\n  return selection().transition(name);\n}\n\nexport function newId() {\n  return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n  constructor: Transition,\n  select: transition_select,\n  selectAll: transition_selectAll,\n  filter: transition_filter,\n  merge: transition_merge,\n  selection: transition_selection,\n  transition: transition_transition,\n  call: selection_prototype.call,\n  nodes: selection_prototype.nodes,\n  node: selection_prototype.node,\n  size: selection_prototype.size,\n  empty: selection_prototype.empty,\n  each: selection_prototype.each,\n  on: transition_on,\n  attr: transition_attr,\n  attrTween: transition_attrTween,\n  style: transition_style,\n  styleTween: transition_styleTween,\n  text: transition_text,\n  remove: transition_remove,\n  tween: transition_tween,\n  delay: transition_delay,\n  duration: transition_duration,\n  ease: transition_ease\n};\n","export function cubicIn(t) {\n  return t * t * t;\n}\n\nexport function cubicOut(t) {\n  return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n","var exponent = 3;\n\nexport var polyIn = (function custom(e) {\n  e = +e;\n\n  function polyIn(t) {\n    return Math.pow(t, e);\n  }\n\n  polyIn.exponent = custom;\n\n  return polyIn;\n})(exponent);\n\nexport var polyOut = (function custom(e) {\n  e = +e;\n\n  function polyOut(t) {\n    return 1 - Math.pow(1 - t, e);\n  }\n\n  polyOut.exponent = custom;\n\n  return polyOut;\n})(exponent);\n\nexport var polyInOut = (function custom(e) {\n  e = +e;\n\n  function polyInOut(t) {\n    return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n  }\n\n  polyInOut.exponent = custom;\n\n  return polyInOut;\n})(exponent);\n","var overshoot = 1.70158;\n\nexport var backIn = (function custom(s) {\n  s = +s;\n\n  function backIn(t) {\n    return t * t * ((s + 1) * t - s);\n  }\n\n  backIn.overshoot = custom;\n\n  return backIn;\n})(overshoot);\n\nexport var backOut = (function custom(s) {\n  s = +s;\n\n  function backOut(t) {\n    return --t * t * ((s + 1) * t + s) + 1;\n  }\n\n  backOut.overshoot = custom;\n\n  return backOut;\n})(overshoot);\n\nexport var backInOut = (function custom(s) {\n  s = +s;\n\n  function backInOut(t) {\n    return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n  }\n\n  backInOut.overshoot = custom;\n\n  return backInOut;\n})(overshoot);\n","var tau = 2 * Math.PI,\n    amplitude = 1,\n    period = 0.3;\n\nexport var elasticIn = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticIn(t) {\n    return a * Math.pow(2, 10 * --t) * Math.sin((s - t) / p);\n  }\n\n  elasticIn.amplitude = function(a) { return custom(a, p * tau); };\n  elasticIn.period = function(p) { return custom(a, p); };\n\n  return elasticIn;\n})(amplitude, period);\n\nexport var elasticOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticOut(t) {\n    return 1 - a * Math.pow(2, -10 * (t = +t)) * Math.sin((t + s) / p);\n  }\n\n  elasticOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticOut.period = function(p) { return custom(a, p); };\n\n  return elasticOut;\n})(amplitude, period);\n\nexport var elasticInOut = (function custom(a, p) {\n  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n  function elasticInOut(t) {\n    return ((t = t * 2 - 1) < 0\n        ? a * Math.pow(2, 10 * t) * Math.sin((s - t) / p)\n        : 2 - a * Math.pow(2, -10 * t) * Math.sin((s + t) / p)) / 2;\n  }\n\n  elasticInOut.amplitude = function(a) { return custom(a, p * tau); };\n  elasticInOut.period = function(p) { return custom(a, p); };\n\n  return elasticInOut;\n})(amplitude, period);\n","import {Transition, newId} from \"../transition/index\";\nimport schedule from \"../transition/schedule\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n  time: null, // Set on use.\n  delay: 0,\n  duration: 250,\n  ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n  var timing;\n  while (!(timing = node.__transition) || !(timing = timing[id])) {\n    if (!(node = node.parentNode)) {\n      return defaultTiming.time = now(), defaultTiming;\n    }\n  }\n  return timing;\n}\n\nexport default function(name) {\n  var id,\n      timing;\n\n  if (name instanceof Transition) {\n    id = name._id, name = name._name;\n  } else {\n    id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n  }\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        schedule(node, name, id, i, group, timing || inherit(node, id));\n      }\n    }\n  }\n\n  return new Transition(groups, this._parents, name, id);\n}\n","import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt\";\nimport selection_transition from \"./transition\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n","var pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction Path() {\n  this._x0 = this._y0 = // start of current subpath\n  this._x1 = this._y1 = null; // end of current subpath\n  this._ = \"\";\n}\n\nfunction path() {\n  return new Path;\n}\n\nPath.prototype = path.prototype = {\n  constructor: Path,\n  moveTo: function(x, y) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n  },\n  closePath: function() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._ += \"Z\";\n    }\n  },\n  lineTo: function(x, y) {\n    this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  quadraticCurveTo: function(x1, y1, x, y) {\n    this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n    this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  arcTo: function(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n    var x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x1,y1).\n    if (this._x1 === null) {\n      this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon)) {}\n\n    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n    // Equivalently, is (x1,y1) coincident with (x2,y2)?\n    // Or, is the radius zero? Line to (x1,y1).\n    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n      this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    }\n\n    // Otherwise, draw an arc!\n    else {\n      var x20 = x2 - x0,\n          y20 = y2 - y0,\n          l21_2 = x21 * x21 + y21 * y21,\n          l20_2 = x20 * x20 + y20 * y20,\n          l21 = Math.sqrt(l21_2),\n          l01 = Math.sqrt(l01_2),\n          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n          t01 = l / l01,\n          t21 = l / l21;\n\n      // If the start tangent is not coincident with (x0,y0), line to.\n      if (Math.abs(t01 - 1) > epsilon) {\n        this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n      }\n\n      this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n    }\n  },\n  arc: function(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r;\n    var dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(\"negative radius: \" + r);\n\n    // Is this path empty? Move to (x0,y0).\n    if (this._x1 === null) {\n      this._ += \"M\" + x0 + \",\" + y0;\n    }\n\n    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n      this._ += \"L\" + x0 + \",\" + y0;\n    }\n\n    // Is this arc empty? We’re done.\n    if (!r) return;\n\n    // Does the angle go the wrong way? Flip the direction.\n    if (da < 0) da = da % tau + tau;\n\n    // Is this a complete circle? Draw two arcs to complete the circle.\n    if (da > tauEpsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n    }\n\n    // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n    }\n  },\n  rect: function(x, y, w, h) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n  },\n  toString: function() {\n    return this._;\n  }\n};\n\nexport default path;\n","export var prefix = \"$\";\n\nfunction Map() {}\n\nMap.prototype = map.prototype = {\n  constructor: Map,\n  has: function(key) {\n    return (prefix + key) in this;\n  },\n  get: function(key) {\n    return this[prefix + key];\n  },\n  set: function(key, value) {\n    this[prefix + key] = value;\n    return this;\n  },\n  remove: function(key) {\n    var property = prefix + key;\n    return property in this && delete this[property];\n  },\n  clear: function() {\n    for (var property in this) if (property[0] === prefix) delete this[property];\n  },\n  keys: function() {\n    var keys = [];\n    for (var property in this) if (property[0] === prefix) keys.push(property.slice(1));\n    return keys;\n  },\n  values: function() {\n    var values = [];\n    for (var property in this) if (property[0] === prefix) values.push(this[property]);\n    return values;\n  },\n  entries: function() {\n    var entries = [];\n    for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]});\n    return entries;\n  },\n  size: function() {\n    var size = 0;\n    for (var property in this) if (property[0] === prefix) ++size;\n    return size;\n  },\n  empty: function() {\n    for (var property in this) if (property[0] === prefix) return false;\n    return true;\n  },\n  each: function(f) {\n    for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this);\n  }\n};\n\nfunction map(object, f) {\n  var map = new Map;\n\n  // Copy constructor.\n  if (object instanceof Map) object.each(function(value, key) { map.set(key, value); });\n\n  // Index array by numeric index or specified key function.\n  else if (Array.isArray(object)) {\n    var i = -1,\n        n = object.length,\n        o;\n\n    if (f == null) while (++i < n) map.set(i, object[i]);\n    else while (++i < n) map.set(f(o = object[i], i, object), o);\n  }\n\n  // Convert object to map.\n  else if (object) for (var key in object) map.set(key, object[key]);\n\n  return map;\n}\n\nexport default map;\n","import {default as map, prefix} from \"./map\";\n\nfunction Set() {}\n\nvar proto = map.prototype;\n\nSet.prototype = set.prototype = {\n  constructor: Set,\n  has: proto.has,\n  add: function(value) {\n    value += \"\";\n    this[prefix + value] = value;\n    return this;\n  },\n  remove: proto.remove,\n  clear: proto.clear,\n  values: proto.keys,\n  size: proto.size,\n  empty: proto.empty,\n  each: proto.each\n};\n\nfunction set(object, f) {\n  var set = new Set;\n\n  // Copy constructor.\n  if (object instanceof Set) object.each(function(value) { set.add(value); });\n\n  // Otherwise, assume it’s an array.\n  else if (object) {\n    var i = -1, n = object.length;\n    if (f == null) while (++i < n) set.add(object[i]);\n    else while (++i < n) set.add(f(object[i], i, object));\n  }\n\n  return set;\n}\n\nexport default set;\n","var EOL = {},\n    EOF = {},\n    QUOTE = 34,\n    NEWLINE = 10,\n    RETURN = 13;\n\nfunction objectConverter(columns) {\n  return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n    return JSON.stringify(name) + \": d[\" + i + \"]\";\n  }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n  var object = objectConverter(columns);\n  return function(row, i) {\n    return f(object(row), i, columns);\n  };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n  var columnSet = Object.create(null),\n      columns = [];\n\n  rows.forEach(function(row) {\n    for (var column in row) {\n      if (!(column in columnSet)) {\n        columns.push(columnSet[column] = column);\n      }\n    }\n  });\n\n  return columns;\n}\n\nexport default function(delimiter) {\n  var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n      DELIMITER = delimiter.charCodeAt(0);\n\n  function parse(text, f) {\n    var convert, columns, rows = parseRows(text, function(row, i) {\n      if (convert) return convert(row, i - 1);\n      columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n    });\n    rows.columns = columns || [];\n    return rows;\n  }\n\n  function parseRows(text, f) {\n    var rows = [], // output rows\n        N = text.length,\n        I = 0, // current character index\n        n = 0, // current line number\n        t, // current token\n        eof = N <= 0, // current token followed by EOF?\n        eol = false; // current token followed by EOL?\n\n    // Strip the trailing newline.\n    if (text.charCodeAt(N - 1) === NEWLINE) --N;\n    if (text.charCodeAt(N - 1) === RETURN) --N;\n\n    function token() {\n      if (eof) return EOF;\n      if (eol) return eol = false, EOL;\n\n      // Unescape quotes.\n      var i, j = I, c;\n      if (text.charCodeAt(j) === QUOTE) {\n        while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n        if ((i = I) >= N) eof = true;\n        else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n        else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n        return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n      }\n\n      // Find next delimiter or newline.\n      while (I < N) {\n        if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n        else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n        else if (c !== DELIMITER) continue;\n        return text.slice(j, i);\n      }\n\n      // Return last token before EOF.\n      return eof = true, text.slice(j, N);\n    }\n\n    while ((t = token()) !== EOF) {\n      var row = [];\n      while (t !== EOL && t !== EOF) row.push(t), t = token();\n      if (f && (row = f(row, n++)) == null) continue;\n      rows.push(row);\n    }\n\n    return rows;\n  }\n\n  function format(rows, columns) {\n    if (columns == null) columns = inferColumns(rows);\n    return [columns.map(formatValue).join(delimiter)].concat(rows.map(function(row) {\n      return columns.map(function(column) {\n        return formatValue(row[column]);\n      }).join(delimiter);\n    })).join(\"\\n\");\n  }\n\n  function formatRows(rows) {\n    return rows.map(formatRow).join(\"\\n\");\n  }\n\n  function formatRow(row) {\n    return row.map(formatValue).join(delimiter);\n  }\n\n  function formatValue(text) {\n    return text == null ? \"\"\n        : reFormat.test(text += \"\") ? \"\\\"\" + text.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n        : text;\n  }\n\n  return {\n    parse: parse,\n    parseRows: parseRows,\n    format: format,\n    formatRows: formatRows\n  };\n}\n","export default function(d) {\n  var x = +this._x.call(null, d),\n      y = +this._y.call(null, d);\n  return add(this.cover(x, y), x, y, d);\n}\n\nfunction add(tree, x, y, d) {\n  if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n  var parent,\n      node = tree._root,\n      leaf = {data: d},\n      x0 = tree._x0,\n      y0 = tree._y0,\n      x1 = tree._x1,\n      y1 = tree._y1,\n      xm,\n      ym,\n      xp,\n      yp,\n      right,\n      bottom,\n      i,\n      j;\n\n  // If the tree is empty, initialize the root as a leaf.\n  if (!node) return tree._root = leaf, tree;\n\n  // Find the existing leaf for the new point, or add it.\n  while (node.length) {\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n    if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n  }\n\n  // Is the new point is exactly coincident with the existing point?\n  xp = +tree._x.call(null, node.data);\n  yp = +tree._y.call(null, node.data);\n  if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n  // Otherwise, split the leaf node until the old and new point are separated.\n  do {\n    parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n  } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n  return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n  var d, i, n = data.length,\n      x,\n      y,\n      xz = new Array(n),\n      yz = new Array(n),\n      x0 = Infinity,\n      y0 = Infinity,\n      x1 = -Infinity,\n      y1 = -Infinity;\n\n  // Compute the points and their extent.\n  for (i = 0; i < n; ++i) {\n    if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n    xz[i] = x;\n    yz[i] = y;\n    if (x < x0) x0 = x;\n    if (x > x1) x1 = x;\n    if (y < y0) y0 = y;\n    if (y > y1) y1 = y;\n  }\n\n  // If there were no (valid) points, inherit the existing extent.\n  if (x1 < x0) x0 = this._x0, x1 = this._x1;\n  if (y1 < y0) y0 = this._y0, y1 = this._y1;\n\n  // Expand the tree to cover the new points.\n  this.cover(x0, y0).cover(x1, y1);\n\n  // Add the new points.\n  for (i = 0; i < n; ++i) {\n    add(this, xz[i], yz[i], data[i]);\n  }\n\n  return this;\n}\n","export default function(x, y) {\n  if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n  var x0 = this._x0,\n      y0 = this._y0,\n      x1 = this._x1,\n      y1 = this._y1;\n\n  // If the quadtree has no extent, initialize them.\n  // Integer extent are necessary so that if we later double the extent,\n  // the existing quadrant boundaries don’t change due to floating point error!\n  if (isNaN(x0)) {\n    x1 = (x0 = Math.floor(x)) + 1;\n    y1 = (y0 = Math.floor(y)) + 1;\n  }\n\n  // Otherwise, double repeatedly to cover.\n  else if (x0 > x || x > x1 || y0 > y || y > y1) {\n    var z = x1 - x0,\n        node = this._root,\n        parent,\n        i;\n\n    switch (i = (y < (y0 + y1) / 2) << 1 | (x < (x0 + x1) / 2)) {\n      case 0: {\n        do parent = new Array(4), parent[i] = node, node = parent;\n        while (z *= 2, x1 = x0 + z, y1 = y0 + z, x > x1 || y > y1);\n        break;\n      }\n      case 1: {\n        do parent = new Array(4), parent[i] = node, node = parent;\n        while (z *= 2, x0 = x1 - z, y1 = y0 + z, x0 > x || y > y1);\n        break;\n      }\n      case 2: {\n        do parent = new Array(4), parent[i] = node, node = parent;\n        while (z *= 2, x1 = x0 + z, y0 = y1 - z, x > x1 || y0 > y);\n        break;\n      }\n      case 3: {\n        do parent = new Array(4), parent[i] = node, node = parent;\n        while (z *= 2, x0 = x1 - z, y0 = y1 - z, x0 > x || y0 > y);\n        break;\n      }\n    }\n\n    if (this._root && this._root.length) this._root = node;\n  }\n\n  // If the quadtree covers the point already, just return.\n  else return this;\n\n  this._x0 = x0;\n  this._y0 = y0;\n  this._x1 = x1;\n  this._y1 = y1;\n  return this;\n}\n","export default function() {\n  var data = [];\n  this.visit(function(node) {\n    if (!node.length) do data.push(node.data); while (node = node.next)\n  });\n  return data;\n}\n","export default function(_) {\n  return arguments.length\n      ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n      : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n}\n","export default function(node, x0, y0, x1, y1) {\n  this.node = node;\n  this.x0 = x0;\n  this.y0 = y0;\n  this.x1 = x1;\n  this.y1 = y1;\n}\n","import Quad from \"./quad\";\n\nexport default function(x, y, radius) {\n  var data,\n      x0 = this._x0,\n      y0 = this._y0,\n      x1,\n      y1,\n      x2,\n      y2,\n      x3 = this._x1,\n      y3 = this._y1,\n      quads = [],\n      node = this._root,\n      q,\n      i;\n\n  if (node) quads.push(new Quad(node, x0, y0, x3, y3));\n  if (radius == null) radius = Infinity;\n  else {\n    x0 = x - radius, y0 = y - radius;\n    x3 = x + radius, y3 = y + radius;\n    radius *= radius;\n  }\n\n  while (q = quads.pop()) {\n\n    // Stop searching if this quadrant can’t contain a closer node.\n    if (!(node = q.node)\n        || (x1 = q.x0) > x3\n        || (y1 = q.y0) > y3\n        || (x2 = q.x1) < x0\n        || (y2 = q.y1) < y0) continue;\n\n    // Bisect the current quadrant.\n    if (node.length) {\n      var xm = (x1 + x2) / 2,\n          ym = (y1 + y2) / 2;\n\n      quads.push(\n        new Quad(node[3], xm, ym, x2, y2),\n        new Quad(node[2], x1, ym, xm, y2),\n        new Quad(node[1], xm, y1, x2, ym),\n        new Quad(node[0], x1, y1, xm, ym)\n      );\n\n      // Visit the closest quadrant first.\n      if (i = (y >= ym) << 1 | (x >= xm)) {\n        q = quads[quads.length - 1];\n        quads[quads.length - 1] = quads[quads.length - 1 - i];\n        quads[quads.length - 1 - i] = q;\n      }\n    }\n\n    // Visit this point. (Visiting coincident points isn’t necessary!)\n    else {\n      var dx = x - +this._x.call(null, node.data),\n          dy = y - +this._y.call(null, node.data),\n          d2 = dx * dx + dy * dy;\n      if (d2 < radius) {\n        var d = Math.sqrt(radius = d2);\n        x0 = x - d, y0 = y - d;\n        x3 = x + d, y3 = y + d;\n        data = node.data;\n      }\n    }\n  }\n\n  return data;\n}\n","export default function(d) {\n  if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n  var parent,\n      node = this._root,\n      retainer,\n      previous,\n      next,\n      x0 = this._x0,\n      y0 = this._y0,\n      x1 = this._x1,\n      y1 = this._y1,\n      x,\n      y,\n      xm,\n      ym,\n      right,\n      bottom,\n      i,\n      j;\n\n  // If the tree is empty, initialize the root as a leaf.\n  if (!node) return this;\n\n  // Find the leaf node for the point.\n  // While descending, also retain the deepest parent with a non-removed sibling.\n  if (node.length) while (true) {\n    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n    if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n    if (!node.length) break;\n    if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n  }\n\n  // Find the point to remove.\n  while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n  if (next = node.next) delete node.next;\n\n  // If there are multiple coincident points, remove just the point.\n  if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n  // If this is the root point, remove it.\n  if (!parent) return this._root = next, this;\n\n  // Remove this leaf.\n  next ? parent[i] = next : delete parent[i];\n\n  // If the parent now contains exactly one leaf, collapse superfluous parents.\n  if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n      && node === (parent[3] || parent[2] || parent[1] || parent[0])\n      && !node.length) {\n    if (retainer) retainer[j] = node;\n    else this._root = node;\n  }\n\n  return this;\n}\n\nexport function removeAll(data) {\n  for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n  return this;\n}\n","export default function() {\n  return this._root;\n}\n","export default function() {\n  var size = 0;\n  this.visit(function(node) {\n    if (!node.length) do ++size; while (node = node.next)\n  });\n  return size;\n}\n","import Quad from \"./quad\";\n\nexport default function(callback) {\n  var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n  if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));\n  while (q = quads.pop()) {\n    if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n      var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n      if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n      if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n      if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n      if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n    }\n  }\n  return this;\n}\n","import Quad from \"./quad\";\n\nexport default function(callback) {\n  var quads = [], next = [], q;\n  if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));\n  while (q = quads.pop()) {\n    var node = q.node;\n    if (node.length) {\n      var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n      if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n      if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n      if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n      if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n    }\n    next.push(q);\n  }\n  while (q = next.pop()) {\n    callback(q.node, q.x0, q.y0, q.x1, q.y1);\n  }\n  return this;\n}\n","export function defaultX(d) {\n  return d[0];\n}\n\nexport default function(_) {\n  return arguments.length ? (this._x = _, this) : this._x;\n}\n","export function defaultY(d) {\n  return d[1];\n}\n\nexport default function(_) {\n  return arguments.length ? (this._y = _, this) : this._y;\n}\n","import tree_add, {addAll as tree_addAll} from \"./add\";\nimport tree_cover from \"./cover\";\nimport tree_data from \"./data\";\nimport tree_extent from \"./extent\";\nimport tree_find from \"./find\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove\";\nimport tree_root from \"./root\";\nimport tree_size from \"./size\";\nimport tree_visit from \"./visit\";\nimport tree_visitAfter from \"./visitAfter\";\nimport tree_x, {defaultX} from \"./x\";\nimport tree_y, {defaultY} from \"./y\";\n\nexport default function quadtree(nodes, x, y) {\n  var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);\n  return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n  this._x = x;\n  this._y = y;\n  this._x0 = x0;\n  this._y0 = y0;\n  this._x1 = x1;\n  this._y1 = y1;\n  this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n  var copy = {data: leaf.data}, next = copy;\n  while (leaf = leaf.next) next = next.next = {data: leaf.data};\n  return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n  var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n      node = this._root,\n      nodes,\n      child;\n\n  if (!node) return copy;\n\n  if (!node.length) return copy._root = leaf_copy(node), copy;\n\n  nodes = [{source: node, target: copy._root = new Array(4)}];\n  while (node = nodes.pop()) {\n    for (var i = 0; i < 4; ++i) {\n      if (child = node.source[i]) {\n        if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n        else node.target[i] = leaf_copy(child);\n      }\n    }\n  }\n\n  return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\n","import dsv from \"./dsv\";\n\nvar csv = dsv(\",\");\n\nexport var csvParse = csv.parse;\nexport var csvParseRows = csv.parseRows;\nexport var csvFormat = csv.format;\nexport var csvFormatRows = csv.formatRows;\n","import dsv from \"./dsv\";\n\nvar tsv = dsv(\"\\t\");\n\nexport var tsvParse = tsv.parse;\nexport var tsvParseRows = tsv.parseRows;\nexport var tsvFormat = tsv.format;\nexport var tsvFormatRows = tsv.formatRows;\n","import formatDecimal from \"./formatDecimal\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n  var d = formatDecimal(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient\n      : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n      : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n      : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n","// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimal(1.23) returns [\"123\", 0].\nexport default function(x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n  var i, coefficient = x.slice(0, i);\n\n  // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n  return [\n    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n    +x.slice(i + 1)\n  ];\n}\n","import formatDecimal from \"./formatDecimal\";\n\nexport default function(x) {\n  return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;\n}\n","export default function(grouping, thousands) {\n  return function(value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n}\n","export default function(numerals) {\n  return function(value) {\n    return value.replace(/[0-9]/g, function(i) {\n      return numerals[+i];\n    });\n  };\n}\n","export default function(x, p) {\n  x = x.toPrecision(p);\n\n  out: for (var n = x.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (x[i]) {\n      case \".\": i0 = i1 = i; break;\n      case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n      case \"e\": break out;\n      default: if (i0 > 0) i0 = 0; break;\n    }\n  }\n\n  return i0 > 0 ? x.slice(0, i0) + x.slice(i1 + 1) : x;\n}\n","import formatDecimal from \"./formatDecimal\";\n\nexport default function(x, p) {\n  var d = formatDecimal(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n      : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n","import formatDefault from \"./formatDefault\";\nimport formatPrefixAuto from \"./formatPrefixAuto\";\nimport formatRounded from \"./formatRounded\";\n\nexport default {\n  \"\": formatDefault,\n  \"%\": function(x, p) { return (x * 100).toFixed(p); },\n  \"b\": function(x) { return Math.round(x).toString(2); },\n  \"c\": function(x) { return x + \"\"; },\n  \"d\": function(x) { return Math.round(x).toString(10); },\n  \"e\": function(x, p) { return x.toExponential(p); },\n  \"f\": function(x, p) { return x.toFixed(p); },\n  \"g\": function(x, p) { return x.toPrecision(p); },\n  \"o\": function(x) { return Math.round(x).toString(8); },\n  \"p\": function(x, p) { return formatRounded(x * 100, p); },\n  \"r\": formatRounded,\n  \"s\": formatPrefixAuto,\n  \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n  \"x\": function(x) { return Math.round(x).toString(16); }\n};\n","import formatTypes from \"./formatTypes\";\n\n// [[fill]align][sign][symbol][0][width][,][.precision][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-\\( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n  return new FormatSpecifier(specifier);\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nfunction FormatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n\n  var match,\n      fill = match[1] || \" \",\n      align = match[2] || \">\",\n      sign = match[3] || \"-\",\n      symbol = match[4] || \"\",\n      zero = !!match[5],\n      width = match[6] && +match[6],\n      comma = !!match[7],\n      precision = match[8] && +match[8].slice(1),\n      type = match[9] || \"\";\n\n  // The \"n\" type is an alias for \",g\".\n  if (type === \"n\") comma = true, type = \"g\";\n\n  // Map invalid types to the default format.\n  else if (!formatTypes[type]) type = \"\";\n\n  // If zero fill is specified, padding goes after sign and before digits.\n  if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n  this.fill = fill;\n  this.align = align;\n  this.sign = sign;\n  this.symbol = symbol;\n  this.zero = zero;\n  this.width = width;\n  this.comma = comma;\n  this.precision = precision;\n  this.type = type;\n}\n\nFormatSpecifier.prototype.toString = function() {\n  return this.fill\n      + this.align\n      + this.sign\n      + this.symbol\n      + (this.zero ? \"0\" : \"\")\n      + (this.width == null ? \"\" : Math.max(1, this.width | 0))\n      + (this.comma ? \",\" : \"\")\n      + (this.precision == null ? \"\" : \".\" + Math.max(0, this.precision | 0))\n      + this.type;\n};\n","export default function(x) {\n  return x;\n}\n","import exponent from \"./exponent\";\nimport formatGroup from \"./formatGroup\";\nimport formatNumerals from \"./formatNumerals\";\nimport formatSpecifier from \"./formatSpecifier\";\nimport formatTypes from \"./formatTypes\";\nimport {prefixExponent} from \"./formatPrefixAuto\";\nimport identity from \"./identity\";\n\nvar prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n  var group = locale.grouping && locale.thousands ? formatGroup(locale.grouping, locale.thousands) : identity,\n      currency = locale.currency,\n      decimal = locale.decimal,\n      numerals = locale.numerals ? formatNumerals(locale.numerals) : identity,\n      percent = locale.percent || \"%\";\n\n  function newFormat(specifier) {\n    specifier = formatSpecifier(specifier);\n\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        type = specifier.type;\n\n    // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n    var prefix = symbol === \"$\" ? currency[0] : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currency[1] : /[%p]/.test(type) ? percent : \"\";\n\n    // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n    var formatType = formatTypes[type],\n        maybeSuffix = !type || /[defgprs%]/.test(type);\n\n    // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n    precision = precision == null ? (type ? 6 : 12)\n        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n        : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i, n, c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value;\n\n        // Perform the initial formatting.\n        var valueNegative = value < 0;\n        value = formatType(Math.abs(value), precision);\n\n        // If a negative value rounds to zero during formatting, treat as positive.\n        if (valueNegative && +value === 0) valueNegative = false;\n\n        // Compute the prefix and suffix.\n        valuePrefix = (valueNegative ? (sign === \"(\" ? sign : \"-\") : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n        // Break the formatted value into the integer “value” part that can be\n        // grouped, and fractional or exponential “suffix” part that is not.\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      }\n\n      // If the fill character is not \"0\", grouping is applied before padding.\n      if (comma && !zero) value = group(value, Infinity);\n\n      // Compute the padding.\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n      // If the fill character is \"0\", grouping is applied after padding.\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n      // Reconstruct the final output based on the desired alignment.\n      switch (align) {\n        case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n        case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n        case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n        default: value = padding + valuePrefix + value + valueSuffix; break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function() {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function(value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n}\n","import formatLocale from \"./locale\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n  decimal: \".\",\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}\n","import exponent from \"./exponent\";\n\nexport default function(step) {\n  return Math.max(0, -exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent\";\n\nexport default function(step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent\";\n\nexport default function(step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n","// Adds floating point numbers with twice the normal precision.\n// Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and\n// Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3)\n// 305–363 (1997).\n// Code adapted from GeographicLib by Charles F. F. Karney,\n// http://geographiclib.sourceforge.net/\n\nexport default function() {\n  return new Adder;\n}\n\nfunction Adder() {\n  this.reset();\n}\n\nAdder.prototype = {\n  constructor: Adder,\n  reset: function() {\n    this.s = // rounded value\n    this.t = 0; // exact error\n  },\n  add: function(y) {\n    add(temp, y, this.t);\n    add(this, temp.s, this.s);\n    if (this.s) this.t += temp.t;\n    else this.s = temp.t;\n  },\n  valueOf: function() {\n    return this.s;\n  }\n};\n\nvar temp = new Adder;\n\nfunction add(adder, a, b) {\n  var x = adder.s = a + b,\n      bv = x - a,\n      av = x - bv;\n  adder.t = (a - av) + (b - bv);\n}\n","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n  return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n  return (x = sin(x / 2)) * x;\n}\n","import compose from \"./compose\";\nimport {asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math\";\n\nfunction rotationIdentity(lambda, phi) {\n  return [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n  return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n    : rotationLambda(deltaLambda))\n    : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n    : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n  return function(lambda, phi) {\n    return lambda += deltaLambda, [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi];\n  };\n}\n\nfunction rotationLambda(deltaLambda) {\n  var rotation = forwardRotationLambda(deltaLambda);\n  rotation.invert = forwardRotationLambda(-deltaLambda);\n  return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n  var cosDeltaPhi = cos(deltaPhi),\n      sinDeltaPhi = sin(deltaPhi),\n      cosDeltaGamma = cos(deltaGamma),\n      sinDeltaGamma = sin(deltaGamma);\n\n  function rotation(lambda, phi) {\n    var cosPhi = cos(phi),\n        x = cos(lambda) * cosPhi,\n        y = sin(lambda) * cosPhi,\n        z = sin(phi),\n        k = z * cosDeltaPhi + x * sinDeltaPhi;\n    return [\n      atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n      asin(k * cosDeltaGamma + y * sinDeltaGamma)\n    ];\n  }\n\n  rotation.invert = function(lambda, phi) {\n    var cosPhi = cos(phi),\n        x = cos(lambda) * cosPhi,\n        y = sin(lambda) * cosPhi,\n        z = sin(phi),\n        k = z * cosDeltaGamma - y * sinDeltaGamma;\n    return [\n      atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n      asin(k * cosDeltaPhi - x * sinDeltaPhi)\n    ];\n  };\n\n  return rotation;\n}\n\nexport default function(rotate) {\n  rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n  function forward(coordinates) {\n    coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n    return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n  }\n\n  forward.invert = function(coordinates) {\n    coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n    return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n  };\n\n  return forward;\n}\n","export default function(methods) {\n  return {\n    stream: transformer(methods)\n  };\n}\n\nexport function transformer(methods) {\n  return function(stream) {\n    var s = new TransformStream;\n    for (var key in methods) s[key] = methods[key];\n    s.stream = stream;\n    return s;\n  };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n  constructor: TransformStream,\n  point: function(x, y) { this.stream.point(x, y); },\n  sphere: function() { this.stream.sphere(); },\n  lineStart: function() { this.stream.lineStart(); },\n  lineEnd: function() { this.stream.lineEnd(); },\n  polygonStart: function() { this.stream.polygonStart(); },\n  polygonEnd: function() { this.stream.polygonEnd(); }\n};\n","import projection from \"./index\";\n\nexport function equirectangularRaw(lambda, phi) {\n  return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\nexport default function() {\n  return projection(equirectangularRaw)\n      .scale(152.63);\n}\n","function count(node) {\n  var sum = 0,\n      children = node.children,\n      i = children && children.length;\n  if (!i) sum = 1;\n  else while (--i >= 0) sum += children[i].value;\n  node.value = sum;\n}\n\nexport default function() {\n  return this.eachAfter(count);\n}\n","export default function(callback) {\n  var node = this, current, next = [node], children, i, n;\n  do {\n    current = next.reverse(), next = [];\n    while (node = current.pop()) {\n      callback(node), children = node.children;\n      if (children) for (i = 0, n = children.length; i < n; ++i) {\n        next.push(children[i]);\n      }\n    }\n  } while (next.length);\n  return this;\n}\n","export default function(callback) {\n  var node = this, nodes = [node], children, i;\n  while (node = nodes.pop()) {\n    callback(node), children = node.children;\n    if (children) for (i = children.length - 1; i >= 0; --i) {\n      nodes.push(children[i]);\n    }\n  }\n  return this;\n}\n","export default function(callback) {\n  var node = this, nodes = [node], next = [], children, i, n;\n  while (node = nodes.pop()) {\n    next.push(node), children = node.children;\n    if (children) for (i = 0, n = children.length; i < n; ++i) {\n      nodes.push(children[i]);\n    }\n  }\n  while (node = next.pop()) {\n    callback(node);\n  }\n  return this;\n}\n","export default function(value) {\n  return this.eachAfter(function(node) {\n    var sum = +value(node.data) || 0,\n        children = node.children,\n        i = children && children.length;\n    while (--i >= 0) sum += children[i].value;\n    node.value = sum;\n  });\n}\n","export default function(compare) {\n  return this.eachBefore(function(node) {\n    if (node.children) {\n      node.children.sort(compare);\n    }\n  });\n}\n","export default function(end) {\n  var start = this,\n      ancestor = leastCommonAncestor(start, end),\n      nodes = [start];\n  while (start !== ancestor) {\n    start = start.parent;\n    nodes.push(start);\n  }\n  var k = nodes.length;\n  while (end !== ancestor) {\n    nodes.splice(k, 0, end);\n    end = end.parent;\n  }\n  return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n  if (a === b) return a;\n  var aNodes = a.ancestors(),\n      bNodes = b.ancestors(),\n      c = null;\n  a = aNodes.pop();\n  b = bNodes.pop();\n  while (a === b) {\n    c = a;\n    a = aNodes.pop();\n    b = bNodes.pop();\n  }\n  return c;\n}\n","export default function() {\n  var node = this, nodes = [node];\n  while (node = node.parent) {\n    nodes.push(node);\n  }\n  return nodes;\n}\n","export default function() {\n  var nodes = [];\n  this.each(function(node) {\n    nodes.push(node);\n  });\n  return nodes;\n}\n","export default function() {\n  var leaves = [];\n  this.eachBefore(function(node) {\n    if (!node.children) {\n      leaves.push(node);\n    }\n  });\n  return leaves;\n}\n","export default function() {\n  var root = this, links = [];\n  root.each(function(node) {\n    if (node !== root) { // Don’t include the root’s parent, if any.\n      links.push({source: node.parent, target: node});\n    }\n  });\n  return links;\n}\n","import node_count from \"./count\";\nimport node_each from \"./each\";\nimport node_eachBefore from \"./eachBefore\";\nimport node_eachAfter from \"./eachAfter\";\nimport node_sum from \"./sum\";\nimport node_sort from \"./sort\";\nimport node_path from \"./path\";\nimport node_ancestors from \"./ancestors\";\nimport node_descendants from \"./descendants\";\nimport node_leaves from \"./leaves\";\nimport node_links from \"./links\";\n\nexport default function hierarchy(data, children) {\n  var root = new Node(data),\n      valued = +data.value && (root.value = data.value),\n      node,\n      nodes = [root],\n      child,\n      childs,\n      i,\n      n;\n\n  if (children == null) children = defaultChildren;\n\n  while (node = nodes.pop()) {\n    if (valued) node.value = +node.data.value;\n    if ((childs = children(node.data)) && (n = childs.length)) {\n      node.children = new Array(n);\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = node.children[i] = new Node(childs[i]));\n        child.parent = node;\n        child.depth = node.depth + 1;\n      }\n    }\n  }\n\n  return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n  return hierarchy(this).eachBefore(copyData);\n}\n\nfunction defaultChildren(d) {\n  return d.children;\n}\n\nfunction copyData(node) {\n  node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n  var height = 0;\n  do node.height = height;\n  while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n  this.data = data;\n  this.depth =\n  this.height = 0;\n  this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n  constructor: Node,\n  count: node_count,\n  each: node_each,\n  eachAfter: node_eachAfter,\n  eachBefore: node_eachBefore,\n  sum: node_sum,\n  sort: node_sort,\n  path: node_path,\n  ancestors: node_ancestors,\n  descendants: node_descendants,\n  leaves: node_leaves,\n  links: node_links,\n  copy: node_copy\n};\n","export default function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (x1 - x0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.y0 = y0, node.y1 = y1;\n    node.x0 = x0, node.x1 = x0 += node.value * k;\n  }\n}\n","export default function(parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (y1 - y0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.x0 = x0, node.x1 = x1;\n    node.y0 = y0, node.y1 = y0 += node.value * k;\n  }\n}\n","import adder from \"./adder\";\nimport {atan2, cos, quarterPi, radians, sin, tau} from \"./math\";\nimport noop from \"./noop\";\nimport stream from \"./stream\";\n\nexport var areaRingSum = adder();\n\nvar areaSum = adder(),\n    lambda00,\n    phi00,\n    lambda0,\n    cosPhi0,\n    sinPhi0;\n\nexport var areaStream = {\n  point: noop,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: function() {\n    areaRingSum.reset();\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function() {\n    var areaRing = +areaRingSum;\n    areaSum.add(areaRing < 0 ? tau + areaRing : areaRing);\n    this.lineStart = this.lineEnd = this.point = noop;\n  },\n  sphere: function() {\n    areaSum.add(tau);\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaRingEnd() {\n  areaPoint(lambda00, phi00);\n}\n\nfunction areaPointFirst(lambda, phi) {\n  areaStream.point = areaPoint;\n  lambda00 = lambda, phi00 = phi;\n  lambda *= radians, phi *= radians;\n  lambda0 = lambda, cosPhi0 = cos(phi = phi / 2 + quarterPi), sinPhi0 = sin(phi);\n}\n\nfunction areaPoint(lambda, phi) {\n  lambda *= radians, phi *= radians;\n  phi = phi / 2 + quarterPi; // half the angular distance from south pole\n\n  // Spherical excess E for a spherical triangle with vertices: south pole,\n  // previous point, current point.  Uses a formula derived from Cagnoli’s\n  // theorem.  See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n  var dLambda = lambda - lambda0,\n      sdLambda = dLambda >= 0 ? 1 : -1,\n      adLambda = sdLambda * dLambda,\n      cosPhi = cos(phi),\n      sinPhi = sin(phi),\n      k = sinPhi0 * sinPhi,\n      u = cosPhi0 * cosPhi + k * cos(adLambda),\n      v = k * sdLambda * sin(adLambda);\n  areaRingSum.add(atan2(v, u));\n\n  // Advance the previous points.\n  lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;\n}\n\nexport default function(object) {\n  areaSum.reset();\n  stream(object, areaStream);\n  return areaSum * 2;\n}\n","import adder from \"./adder\";\nimport {areaStream, areaRingSum} from \"./area\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace, spherical} from \"./cartesian\";\nimport {abs, degrees, epsilon, radians} from \"./math\";\nimport stream from \"./stream\";\n\nvar lambda0, phi0, lambda1, phi1, // bounds\n    lambda2, // previous lambda-coordinate\n    lambda00, phi00, // first point\n    p0, // previous 3D point\n    deltaSum = adder(),\n    ranges,\n    range;\n\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: boundsLineStart,\n  lineEnd: boundsLineEnd,\n  polygonStart: function() {\n    boundsStream.point = boundsRingPoint;\n    boundsStream.lineStart = boundsRingStart;\n    boundsStream.lineEnd = boundsRingEnd;\n    deltaSum.reset();\n    areaStream.polygonStart();\n  },\n  polygonEnd: function() {\n    areaStream.polygonEnd();\n    boundsStream.point = boundsPoint;\n    boundsStream.lineStart = boundsLineStart;\n    boundsStream.lineEnd = boundsLineEnd;\n    if (areaRingSum < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n    else if (deltaSum > epsilon) phi1 = 90;\n    else if (deltaSum < -epsilon) phi0 = -90;\n    range[0] = lambda0, range[1] = lambda1;\n  }\n};\n\nfunction boundsPoint(lambda, phi) {\n  ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n  if (phi < phi0) phi0 = phi;\n  if (phi > phi1) phi1 = phi;\n}\n\nfunction linePoint(lambda, phi) {\n  var p = cartesian([lambda * radians, phi * radians]);\n  if (p0) {\n    var normal = cartesianCross(p0, p),\n        equatorial = [normal[1], -normal[0], 0],\n        inflection = cartesianCross(equatorial, normal);\n    cartesianNormalizeInPlace(inflection);\n    inflection = spherical(inflection);\n    var delta = lambda - lambda2,\n        sign = delta > 0 ? 1 : -1,\n        lambdai = inflection[0] * degrees * sign,\n        phii,\n        antimeridian = abs(delta) > 180;\n    if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n      phii = inflection[1] * degrees;\n      if (phii > phi1) phi1 = phii;\n    } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n      phii = -inflection[1] * degrees;\n      if (phii < phi0) phi0 = phii;\n    } else {\n      if (phi < phi0) phi0 = phi;\n      if (phi > phi1) phi1 = phi;\n    }\n    if (antimeridian) {\n      if (lambda < lambda2) {\n        if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n      } else {\n        if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n      }\n    } else {\n      if (lambda1 >= lambda0) {\n        if (lambda < lambda0) lambda0 = lambda;\n        if (lambda > lambda1) lambda1 = lambda;\n      } else {\n        if (lambda > lambda2) {\n          if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n        } else {\n          if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n        }\n      }\n    }\n  } else {\n    ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n  }\n  if (phi < phi0) phi0 = phi;\n  if (phi > phi1) phi1 = phi;\n  p0 = p, lambda2 = lambda;\n}\n\nfunction boundsLineStart() {\n  boundsStream.point = linePoint;\n}\n\nfunction boundsLineEnd() {\n  range[0] = lambda0, range[1] = lambda1;\n  boundsStream.point = boundsPoint;\n  p0 = null;\n}\n\nfunction boundsRingPoint(lambda, phi) {\n  if (p0) {\n    var delta = lambda - lambda2;\n    deltaSum.add(abs(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);\n  } else {\n    lambda00 = lambda, phi00 = phi;\n  }\n  areaStream.point(lambda, phi);\n  linePoint(lambda, phi);\n}\n\nfunction boundsRingStart() {\n  areaStream.lineStart();\n}\n\nfunction boundsRingEnd() {\n  boundsRingPoint(lambda00, phi00);\n  areaStream.lineEnd();\n  if (abs(deltaSum) > epsilon) lambda0 = -(lambda1 = 180);\n  range[0] = lambda0, range[1] = lambda1;\n  p0 = null;\n}\n\n// Finds the left-right distance between two longitudes.\n// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want\n// the distance between ±180° to be 360°.\nfunction angle(lambda0, lambda1) {\n  return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;\n}\n\nfunction rangeCompare(a, b) {\n  return a[0] - b[0];\n}\n\nfunction rangeContains(range, x) {\n  return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n}\n\nexport default function(feature) {\n  var i, n, a, b, merged, deltaMax, delta;\n\n  phi1 = lambda1 = -(lambda0 = phi0 = Infinity);\n  ranges = [];\n  stream(feature, boundsStream);\n\n  // First, sort ranges by their minimum longitudes.\n  if (n = ranges.length) {\n    ranges.sort(rangeCompare);\n\n    // Then, merge any ranges that overlap.\n    for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {\n      b = ranges[i];\n      if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {\n        if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n        if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n      } else {\n        merged.push(a = b);\n      }\n    }\n\n    // Finally, find the largest gap between the merged ranges.\n    // The final bounding box will be the inverse of this gap.\n    for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {\n      b = merged[i];\n      if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];\n    }\n  }\n\n  ranges = range = null;\n\n  return lambda0 === Infinity || phi0 === Infinity\n      ? [[NaN, NaN], [NaN, NaN]]\n      : [[lambda0, phi0], [lambda1, phi1]];\n}\n","import adder from \"./adder\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian\";\nimport {asin, atan2, cos, epsilon, pi, quarterPi, sin, tau} from \"./math\";\n\nvar sum = adder();\n\nexport default function(polygon, point) {\n  var lambda = point[0],\n      phi = point[1],\n      normal = [sin(lambda), -cos(lambda), 0],\n      angle = 0,\n      winding = 0;\n\n  sum.reset();\n\n  for (var i = 0, n = polygon.length; i < n; ++i) {\n    if (!(m = (ring = polygon[i]).length)) continue;\n    var ring,\n        m,\n        point0 = ring[m - 1],\n        lambda0 = point0[0],\n        phi0 = point0[1] / 2 + quarterPi,\n        sinPhi0 = sin(phi0),\n        cosPhi0 = cos(phi0);\n\n    for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n      var point1 = ring[j],\n          lambda1 = point1[0],\n          phi1 = point1[1] / 2 + quarterPi,\n          sinPhi1 = sin(phi1),\n          cosPhi1 = cos(phi1),\n          delta = lambda1 - lambda0,\n          sign = delta >= 0 ? 1 : -1,\n          absDelta = sign * delta,\n          antimeridian = absDelta > pi,\n          k = sinPhi0 * sinPhi1;\n\n      sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n      angle += antimeridian ? delta + sign * tau : delta;\n\n      // Are the longitudes either side of the point’s meridian (lambda),\n      // and are the latitudes smaller than the parallel (phi)?\n      if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n        var arc = cartesianCross(cartesian(point0), cartesian(point1));\n        cartesianNormalizeInPlace(arc);\n        var intersection = cartesianCross(normal, arc);\n        cartesianNormalizeInPlace(intersection);\n        var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n        if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n          winding += antimeridian ^ delta >= 0 ? 1 : -1;\n        }\n      }\n    }\n  }\n\n  // First, determine whether the South pole is inside or outside:\n  //\n  // It is inside if:\n  // * the polygon winds around it in a clockwise direction.\n  // * the polygon does not (cumulatively) wind around it, but has a negative\n  //   (counter-clockwise) area.\n  //\n  // Second, count the (signed) number of times a segment crosses a lambda\n  // from the point to the South pole.  If it is zero, then the point is the\n  // same side as the South pole.\n\n  return (angle < -epsilon || angle < epsilon && sum < -epsilon) ^ (winding & 1);\n}\n","import adder from \"./adder\";\nimport {abs, atan2, cos, radians, sin, sqrt} from \"./math\";\nimport noop from \"./noop\";\nimport stream from \"./stream\";\n\nvar lengthSum = adder(),\n    lambda0,\n    sinPhi0,\n    cosPhi0;\n\nvar lengthStream = {\n  sphere: noop,\n  point: noop,\n  lineStart: lengthLineStart,\n  lineEnd: noop,\n  polygonStart: noop,\n  polygonEnd: noop\n};\n\nfunction lengthLineStart() {\n  lengthStream.point = lengthPointFirst;\n  lengthStream.lineEnd = lengthLineEnd;\n}\n\nfunction lengthLineEnd() {\n  lengthStream.point = lengthStream.lineEnd = noop;\n}\n\nfunction lengthPointFirst(lambda, phi) {\n  lambda *= radians, phi *= radians;\n  lambda0 = lambda, sinPhi0 = sin(phi), cosPhi0 = cos(phi);\n  lengthStream.point = lengthPoint;\n}\n\nfunction lengthPoint(lambda, phi) {\n  lambda *= radians, phi *= radians;\n  var sinPhi = sin(phi),\n      cosPhi = cos(phi),\n      delta = abs(lambda - lambda0),\n      cosDelta = cos(delta),\n      sinDelta = sin(delta),\n      x = cosPhi * sinDelta,\n      y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,\n      z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;\n  lengthSum.add(atan2(sqrt(x * x + y * y), z));\n  lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;\n}\n\nexport default function(object) {\n  lengthSum.reset();\n  stream(object, lengthStream);\n  return +lengthSum;\n}\n","import adder from \"../adder\";\nimport {abs} from \"../math\";\nimport noop from \"../noop\";\n\nvar areaSum = adder(),\n    areaRingSum = adder(),\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar areaStream = {\n  point: noop,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: function() {\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function() {\n    areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n    areaSum.add(abs(areaRingSum));\n    areaRingSum.reset();\n  },\n  result: function() {\n    var area = areaSum / 2;\n    areaSum.reset();\n    return area;\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n  areaStream.point = areaPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n  areaRingSum.add(y0 * x - x0 * y);\n  x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n  areaPoint(x00, y00);\n}\n\nexport default areaStream;\n","import adder from \"../adder\";\nimport {sqrt} from \"../math\";\nimport noop from \"../noop\";\n\nvar lengthSum = adder(),\n    lengthRing,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar lengthStream = {\n  point: noop,\n  lineStart: function() {\n    lengthStream.point = lengthPointFirst;\n  },\n  lineEnd: function() {\n    if (lengthRing) lengthPoint(x00, y00);\n    lengthStream.point = noop;\n  },\n  polygonStart: function() {\n    lengthRing = true;\n  },\n  polygonEnd: function() {\n    lengthRing = null;\n  },\n  result: function() {\n    var length = +lengthSum;\n    lengthSum.reset();\n    return length;\n  }\n};\n\nfunction lengthPointFirst(x, y) {\n  lengthStream.point = lengthPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n  x0 -= x, y0 -= y;\n  lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n  x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n","import {Node} from \"./hierarchy/index\";\n\nfunction defaultSeparation(a, b) {\n  return a.parent === b.parent ? 1 : 2;\n}\n\n// function radialSeparation(a, b) {\n//   return (a.parent === b.parent ? 1 : 2) / a.depth;\n// }\n\n// This function is used to traverse the left contour of a subtree (or\n// subforest). It returns the successor of v on this contour. This successor is\n// either given by the leftmost child of v or by the thread of v. The function\n// returns null if and only if v is on the highest level of its subtree.\nfunction nextLeft(v) {\n  var children = v.children;\n  return children ? children[0] : v.t;\n}\n\n// This function works analogously to nextLeft.\nfunction nextRight(v) {\n  var children = v.children;\n  return children ? children[children.length - 1] : v.t;\n}\n\n// Shifts the current subtree rooted at w+. This is done by increasing\n// prelim(w+) and mod(w+) by shift.\nfunction moveSubtree(wm, wp, shift) {\n  var change = shift / (wp.i - wm.i);\n  wp.c -= change;\n  wp.s += shift;\n  wm.c += change;\n  wp.z += shift;\n  wp.m += shift;\n}\n\n// All other shifts, applied to the smaller subtrees between w- and w+, are\n// performed by this function. To prepare the shifts, we have to adjust\n// change(w+), shift(w+), and change(w-).\nfunction executeShifts(v) {\n  var shift = 0,\n      change = 0,\n      children = v.children,\n      i = children.length,\n      w;\n  while (--i >= 0) {\n    w = children[i];\n    w.z += shift;\n    w.m += shift;\n    shift += w.s + (change += w.c);\n  }\n}\n\n// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,\n// returns the specified (default) ancestor.\nfunction nextAncestor(vim, v, ancestor) {\n  return vim.a.parent === v.parent ? vim.a : ancestor;\n}\n\nfunction TreeNode(node, i) {\n  this._ = node;\n  this.parent = null;\n  this.children = null;\n  this.A = null; // default ancestor\n  this.a = this; // ancestor\n  this.z = 0; // prelim\n  this.m = 0; // mod\n  this.c = 0; // change\n  this.s = 0; // shift\n  this.t = null; // thread\n  this.i = i; // number\n}\n\nTreeNode.prototype = Object.create(Node.prototype);\n\nfunction treeRoot(root) {\n  var tree = new TreeNode(root, 0),\n      node,\n      nodes = [tree],\n      child,\n      children,\n      i,\n      n;\n\n  while (node = nodes.pop()) {\n    if (children = node._.children) {\n      node.children = new Array(n = children.length);\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = node.children[i] = new TreeNode(children[i], i));\n        child.parent = node;\n      }\n    }\n  }\n\n  (tree.parent = new TreeNode(null, 0)).children = [tree];\n  return tree;\n}\n\n// Node-link tree diagram using the Reingold-Tilford \"tidy\" algorithm\nexport default function() {\n  var separation = defaultSeparation,\n      dx = 1,\n      dy = 1,\n      nodeSize = null;\n\n  function tree(root) {\n    var t = treeRoot(root);\n\n    // Compute the layout using Buchheim et al.’s algorithm.\n    t.eachAfter(firstWalk), t.parent.m = -t.z;\n    t.eachBefore(secondWalk);\n\n    // If a fixed node size is specified, scale x and y.\n    if (nodeSize) root.eachBefore(sizeNode);\n\n    // If a fixed tree size is specified, scale x and y based on the extent.\n    // Compute the left-most, right-most, and depth-most nodes for extents.\n    else {\n      var left = root,\n          right = root,\n          bottom = root;\n      root.eachBefore(function(node) {\n        if (node.x < left.x) left = node;\n        if (node.x > right.x) right = node;\n        if (node.depth > bottom.depth) bottom = node;\n      });\n      var s = left === right ? 1 : separation(left, right) / 2,\n          tx = s - left.x,\n          kx = dx / (right.x + s + tx),\n          ky = dy / (bottom.depth || 1);\n      root.eachBefore(function(node) {\n        node.x = (node.x + tx) * kx;\n        node.y = node.depth * ky;\n      });\n    }\n\n    return root;\n  }\n\n  // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is\n  // applied recursively to the children of v, as well as the function\n  // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the\n  // node v is placed to the midpoint of its outermost children.\n  function firstWalk(v) {\n    var children = v.children,\n        siblings = v.parent.children,\n        w = v.i ? siblings[v.i - 1] : null;\n    if (children) {\n      executeShifts(v);\n      var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n      if (w) {\n        v.z = w.z + separation(v._, w._);\n        v.m = v.z - midpoint;\n      } else {\n        v.z = midpoint;\n      }\n    } else if (w) {\n      v.z = w.z + separation(v._, w._);\n    }\n    v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n  }\n\n  // Computes all real x-coordinates by summing up the modifiers recursively.\n  function secondWalk(v) {\n    v._.x = v.z + v.parent.m;\n    v.m += v.parent.m;\n  }\n\n  // The core of the algorithm. Here, a new subtree is combined with the\n  // previous subtrees. Threads are used to traverse the inside and outside\n  // contours of the left and right subtree up to the highest common level. The\n  // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the\n  // superscript o means outside and i means inside, the subscript - means left\n  // subtree and + means right subtree. For summing up the modifiers along the\n  // contour, we use respective variables si+, si-, so-, and so+. Whenever two\n  // nodes of the inside contours conflict, we compute the left one of the\n  // greatest uncommon ancestors using the function ANCESTOR and call MOVE\n  // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.\n  // Finally, we add a new thread (if necessary).\n  function apportion(v, w, ancestor) {\n    if (w) {\n      var vip = v,\n          vop = v,\n          vim = w,\n          vom = vip.parent.children[0],\n          sip = vip.m,\n          sop = vop.m,\n          sim = vim.m,\n          som = vom.m,\n          shift;\n      while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {\n        vom = nextLeft(vom);\n        vop = nextRight(vop);\n        vop.a = v;\n        shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n        if (shift > 0) {\n          moveSubtree(nextAncestor(vim, v, ancestor), v, shift);\n          sip += shift;\n          sop += shift;\n        }\n        sim += vim.m;\n        sip += vip.m;\n        som += vom.m;\n        sop += vop.m;\n      }\n      if (vim && !nextRight(vop)) {\n        vop.t = vim;\n        vop.m += sim - sop;\n      }\n      if (vip && !nextLeft(vom)) {\n        vom.t = vip;\n        vom.m += sip - som;\n        ancestor = v;\n      }\n    }\n    return ancestor;\n  }\n\n  function sizeNode(node) {\n    node.x *= dx;\n    node.y = node.depth * dy;\n  }\n\n  tree.separation = function(x) {\n    return arguments.length ? (separation = x, tree) : separation;\n  };\n\n  tree.size = function(x) {\n    return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);\n  };\n\n  tree.nodeSize = function(x) {\n    return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);\n  };\n\n  return tree;\n}\n","import treemapDice from \"./dice\";\nimport treemapSlice from \"./slice\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n  var rows = [],\n      nodes = parent.children,\n      row,\n      nodeValue,\n      i0 = 0,\n      i1 = 0,\n      n = nodes.length,\n      dx, dy,\n      value = parent.value,\n      sumValue,\n      minValue,\n      maxValue,\n      newRatio,\n      minRatio,\n      alpha,\n      beta;\n\n  while (i0 < n) {\n    dx = x1 - x0, dy = y1 - y0;\n\n    // Find the next non-empty node.\n    do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n    minValue = maxValue = sumValue;\n    alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n    beta = sumValue * sumValue * alpha;\n    minRatio = Math.max(maxValue / beta, beta / minValue);\n\n    // Keep adding nodes while the aspect ratio maintains or improves.\n    for (; i1 < n; ++i1) {\n      sumValue += nodeValue = nodes[i1].value;\n      if (nodeValue < minValue) minValue = nodeValue;\n      if (nodeValue > maxValue) maxValue = nodeValue;\n      beta = sumValue * sumValue * alpha;\n      newRatio = Math.max(maxValue / beta, beta / minValue);\n      if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n      minRatio = newRatio;\n    }\n\n    // Position and record the row orientation.\n    rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n    if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n    else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n    value -= sumValue, i0 = i1;\n  }\n\n  return rows;\n}\n\nexport default (function custom(ratio) {\n\n  function squarify(parent, x0, y0, x1, y1) {\n    squarifyRatio(ratio, parent, x0, y0, x1, y1);\n  }\n\n  squarify.ratio = function(x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return squarify;\n})(phi);\n","import treemapDice from \"./dice\";\nimport treemapSlice from \"./slice\";\nimport {phi, squarifyRatio} from \"./squarify\";\n\nexport default (function custom(ratio) {\n\n  function resquarify(parent, x0, y0, x1, y1) {\n    if ((rows = parent._squarify) && (rows.ratio === ratio)) {\n      var rows,\n          row,\n          nodes,\n          i,\n          j = -1,\n          n,\n          m = rows.length,\n          value = parent.value;\n\n      while (++j < m) {\n        row = rows[j], nodes = row.children;\n        for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;\n        if (row.dice) treemapDice(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value);\n        else treemapSlice(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1);\n        value -= row.value;\n      }\n    } else {\n      parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);\n      rows.ratio = ratio;\n    }\n  }\n\n  resquarify.ratio = function(x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return resquarify;\n})(phi);\n","export var slice = [].slice;\n","import {slice} from \"./array\";\n\nvar noabort = {};\n\nfunction Queue(size) {\n  this._size = size;\n  this._call =\n  this._error = null;\n  this._tasks = [];\n  this._data = [];\n  this._waiting =\n  this._active =\n  this._ended =\n  this._start = 0; // inside a synchronous task callback?\n}\n\nQueue.prototype = queue.prototype = {\n  constructor: Queue,\n  defer: function(callback) {\n    if (typeof callback !== \"function\") throw new Error(\"invalid callback\");\n    if (this._call) throw new Error(\"defer after await\");\n    if (this._error != null) return this;\n    var t = slice.call(arguments, 1);\n    t.push(callback);\n    ++this._waiting, this._tasks.push(t);\n    poke(this);\n    return this;\n  },\n  abort: function() {\n    if (this._error == null) abort(this, new Error(\"abort\"));\n    return this;\n  },\n  await: function(callback) {\n    if (typeof callback !== \"function\") throw new Error(\"invalid callback\");\n    if (this._call) throw new Error(\"multiple await\");\n    this._call = function(error, results) { callback.apply(null, [error].concat(results)); };\n    maybeNotify(this);\n    return this;\n  },\n  awaitAll: function(callback) {\n    if (typeof callback !== \"function\") throw new Error(\"invalid callback\");\n    if (this._call) throw new Error(\"multiple await\");\n    this._call = callback;\n    maybeNotify(this);\n    return this;\n  }\n};\n\nfunction poke(q) {\n  if (!q._start) {\n    try { start(q); } // let the current task complete\n    catch (e) {\n      if (q._tasks[q._ended + q._active - 1]) abort(q, e); // task errored synchronously\n      else if (!q._data) throw e; // await callback errored synchronously\n    }\n  }\n}\n\nfunction start(q) {\n  while (q._start = q._waiting && q._active < q._size) {\n    var i = q._ended + q._active,\n        t = q._tasks[i],\n        j = t.length - 1,\n        c = t[j];\n    t[j] = end(q, i);\n    --q._waiting, ++q._active;\n    t = c.apply(null, t);\n    if (!q._tasks[i]) continue; // task finished synchronously\n    q._tasks[i] = t || noabort;\n  }\n}\n\nfunction end(q, i) {\n  return function(e, r) {\n    if (!q._tasks[i]) return; // ignore multiple callbacks\n    --q._active, ++q._ended;\n    q._tasks[i] = null;\n    if (q._error != null) return; // ignore secondary errors\n    if (e != null) {\n      abort(q, e);\n    } else {\n      q._data[i] = r;\n      if (q._waiting) poke(q);\n      else maybeNotify(q);\n    }\n  };\n}\n\nfunction abort(q, e) {\n  var i = q._tasks.length, t;\n  q._error = e; // ignore active callbacks\n  q._data = undefined; // allow gc\n  q._waiting = NaN; // prevent starting\n\n  while (--i >= 0) {\n    if (t = q._tasks[i]) {\n      q._tasks[i] = null;\n      if (t.abort) {\n        try { t.abort(); }\n        catch (e) { /* ignore */ }\n      }\n    }\n  }\n\n  q._active = NaN; // allow notification\n  maybeNotify(q);\n}\n\nfunction maybeNotify(q) {\n  if (!q._active && q._call) {\n    var d = q._data;\n    q._data = undefined; // allow gc\n    q._call(q._error, d);\n  }\n}\n\nexport default function queue(concurrency) {\n  if (concurrency == null) concurrency = Infinity;\n  else if (!((concurrency = +concurrency) >= 1)) throw new Error(\"invalid concurrency\");\n  return new Queue(concurrency);\n}\n","export default function() {\n  return Math.random();\n}\n","import defaultSource from \"./defaultSource\";\n\nexport default (function sourceRandomUniform(source) {\n  function randomUniform(min, max) {\n    min = min == null ? 0 : +min;\n    max = max == null ? 1 : +max;\n    if (arguments.length === 1) max = min, min = 0;\n    else max -= min;\n    return function() {\n      return source() * max + min;\n    };\n  }\n\n  randomUniform.source = sourceRandomUniform;\n\n  return randomUniform;\n})(defaultSource);\n","import defaultSource from \"./defaultSource\";\n\nexport default (function sourceRandomNormal(source) {\n  function randomNormal(mu, sigma) {\n    var x, r;\n    mu = mu == null ? 0 : +mu;\n    sigma = sigma == null ? 1 : +sigma;\n    return function() {\n      var y;\n\n      // If available, use the second previously-generated uniform random.\n      if (x != null) y = x, x = null;\n\n      // Otherwise, generate a new x and y.\n      else do {\n        x = source() * 2 - 1;\n        y = source() * 2 - 1;\n        r = x * x + y * y;\n      } while (!r || r > 1);\n\n      return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r);\n    };\n  }\n\n  randomNormal.source = sourceRandomNormal;\n\n  return randomNormal;\n})(defaultSource);\n","import defaultSource from \"./defaultSource\";\nimport normal from \"./normal\";\n\nexport default (function sourceRandomLogNormal(source) {\n  function randomLogNormal() {\n    var randomNormal = normal.source(source).apply(this, arguments);\n    return function() {\n      return Math.exp(randomNormal());\n    };\n  }\n\n  randomLogNormal.source = sourceRandomLogNormal;\n\n  return randomLogNormal;\n})(defaultSource);\n","import defaultSource from \"./defaultSource\";\n\nexport default (function sourceRandomIrwinHall(source) {\n  function randomIrwinHall(n) {\n    return function() {\n      for (var sum = 0, i = 0; i < n; ++i) sum += source();\n      return sum;\n    };\n  }\n\n  randomIrwinHall.source = sourceRandomIrwinHall;\n\n  return randomIrwinHall;\n})(defaultSource);\n","import defaultSource from \"./defaultSource\";\nimport irwinHall from \"./irwinHall\";\n\nexport default (function sourceRandomBates(source) {\n  function randomBates(n) {\n    var randomIrwinHall = irwinHall.source(source)(n);\n    return function() {\n      return randomIrwinHall() / n;\n    };\n  }\n\n  randomBates.source = sourceRandomBates;\n\n  return randomBates;\n})(defaultSource);\n","import defaultSource from \"./defaultSource\";\n\nexport default (function sourceRandomExponential(source) {\n  function randomExponential(lambda) {\n    return function() {\n      return -Math.log(1 - source()) / lambda;\n    };\n  }\n\n  randomExponential.source = sourceRandomExponential;\n\n  return randomExponential;\n})(defaultSource);\n","var array = Array.prototype;\n\nexport var map = array.map;\nexport var slice = array.slice;\n","import {map} from \"d3-collection\";\nimport {slice} from \"./array\";\n\nexport var implicit = {name: \"implicit\"};\n\nexport default function ordinal(range) {\n  var index = map(),\n      domain = [],\n      unknown = implicit;\n\n  range = range == null ? [] : slice.call(range);\n\n  function scale(d) {\n    var key = d + \"\", i = index.get(key);\n    if (!i) {\n      if (unknown !== implicit) return unknown;\n      index.set(key, i = domain.push(d));\n    }\n    return range[(i - 1) % range.length];\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [], index = map();\n    var i = -1, n = _.length, d, key;\n    while (++i < n) if (!index.has(key = (d = _[i]) + \"\")) index.set(key, domain.push(d));\n    return scale;\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = slice.call(_), scale) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return ordinal()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return scale;\n}\n","export default function(x) {\n  return function() {\n    return x;\n  };\n}\n","export default function(x) {\n  return +x;\n}\n","import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateRound} from \"d3-interpolate\";\nimport {map, slice} from \"./array\";\nimport constant from \"./constant\";\nimport number from \"./number\";\n\nvar unit = [0, 1];\n\nexport function deinterpolateLinear(a, b) {\n  return (b -= (a = +a))\n      ? function(x) { return (x - a) / b; }\n      : constant(b);\n}\n\nfunction deinterpolateClamp(deinterpolate) {\n  return function(a, b) {\n    var d = deinterpolate(a = +a, b = +b);\n    return function(x) { return x <= a ? 0 : x >= b ? 1 : d(x); };\n  };\n}\n\nfunction reinterpolateClamp(reinterpolate) {\n  return function(a, b) {\n    var r = reinterpolate(a = +a, b = +b);\n    return function(t) { return t <= 0 ? a : t >= 1 ? b : r(t); };\n  };\n}\n\nfunction bimap(domain, range, deinterpolate, reinterpolate) {\n  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n  if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0);\n  else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1);\n  return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, deinterpolate, reinterpolate) {\n  var j = Math.min(domain.length, range.length) - 1,\n      d = new Array(j),\n      r = new Array(j),\n      i = -1;\n\n  // Reverse descending domains.\n  if (domain[j] < domain[0]) {\n    domain = domain.slice().reverse();\n    range = range.slice().reverse();\n  }\n\n  while (++i < j) {\n    d[i] = deinterpolate(domain[i], domain[i + 1]);\n    r[i] = reinterpolate(range[i], range[i + 1]);\n  }\n\n  return function(x) {\n    var i = bisect(domain, x, 1, j) - 1;\n    return r[i](d[i](x));\n  };\n}\n\nexport function copy(source, target) {\n  return target\n      .domain(source.domain())\n      .range(source.range())\n      .interpolate(source.interpolate())\n      .clamp(source.clamp());\n}\n\n// deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].\nexport default function continuous(deinterpolate, reinterpolate) {\n  var domain = unit,\n      range = unit,\n      interpolate = interpolateValue,\n      clamp = false,\n      piecewise,\n      output,\n      input;\n\n  function rescale() {\n    piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n    output = input = null;\n    return scale;\n  }\n\n  function scale(x) {\n    return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n  }\n\n  scale.invert = function(y) {\n    return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = map.call(_, number), rescale()) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = slice.call(_), rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = slice.call(_), interpolate = interpolateRound, rescale();\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, rescale()) : clamp;\n  };\n\n  scale.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, rescale()) : interpolate;\n  };\n\n  return rescale();\n}\n","import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function(domain, count, specifier) {\n  var start = domain[0],\n      stop = domain[domain.length - 1],\n      step = tickStep(start, stop, count == null ? 10 : count),\n      precision;\n  specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n  switch (specifier.type) {\n    case \"s\": {\n      var value = Math.max(Math.abs(start), Math.abs(stop));\n      if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n      return formatPrefix(specifier, value);\n    }\n    case \"\":\n    case \"e\":\n    case \"g\":\n    case \"p\":\n    case \"r\": {\n      if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n      break;\n    }\n    case \"f\":\n    case \"%\": {\n      if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n      break;\n    }\n  }\n  return format(specifier);\n}\n","import {ticks, tickIncrement} from \"d3-array\";\nimport {interpolateNumber as reinterpolate} from \"d3-interpolate\";\nimport {default as continuous, copy, deinterpolateLinear as deinterpolate} from \"./continuous\";\nimport tickFormat from \"./tickFormat\";\n\nexport function linearish(scale) {\n  var domain = scale.domain;\n\n  scale.ticks = function(count) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    return tickFormat(domain(), count, specifier);\n  };\n\n  scale.nice = function(count) {\n    if (count == null) count = 10;\n\n    var d = domain(),\n        i0 = 0,\n        i1 = d.length - 1,\n        start = d[i0],\n        stop = d[i1],\n        step;\n\n    if (stop < start) {\n      step = start, start = stop, stop = step;\n      step = i0, i0 = i1, i1 = step;\n    }\n\n    step = tickIncrement(start, stop, count);\n\n    if (step > 0) {\n      start = Math.floor(start / step) * step;\n      stop = Math.ceil(stop / step) * step;\n      step = tickIncrement(start, stop, count);\n    } else if (step < 0) {\n      start = Math.ceil(start * step) / step;\n      stop = Math.floor(stop * step) / step;\n      step = tickIncrement(start, stop, count);\n    }\n\n    if (step > 0) {\n      d[i0] = Math.floor(start / step) * step;\n      d[i1] = Math.ceil(stop / step) * step;\n      domain(d);\n    } else if (step < 0) {\n      d[i0] = Math.ceil(start * step) / step;\n      d[i1] = Math.floor(stop * step) / step;\n      domain(d);\n    }\n\n    return scale;\n  };\n\n  return scale;\n}\n\nexport default function linear() {\n  var scale = continuous(deinterpolate, reinterpolate);\n\n  scale.copy = function() {\n    return copy(scale, linear());\n  };\n\n  return linearish(scale);\n}\n","var t0 = new Date,\n    t1 = new Date;\n\nexport default function newInterval(floori, offseti, count, field) {\n\n  function interval(date) {\n    return floori(date = new Date(+date)), date;\n  }\n\n  interval.floor = interval;\n\n  interval.ceil = function(date) {\n    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n  };\n\n  interval.round = function(date) {\n    var d0 = interval(date),\n        d1 = interval.ceil(date);\n    return date - d0 < d1 - date ? d0 : d1;\n  };\n\n  interval.offset = function(date, step) {\n    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n  };\n\n  interval.range = function(start, stop, step) {\n    var range = [], previous;\n    start = interval.ceil(start);\n    step = step == null ? 1 : Math.floor(step);\n    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n    do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n    while (previous < start && start < stop);\n    return range;\n  };\n\n  interval.filter = function(test) {\n    return newInterval(function(date) {\n      if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n    }, function(date, step) {\n      if (date >= date) {\n        if (step < 0) while (++step <= 0) {\n          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n        } else while (--step >= 0) {\n          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n        }\n      }\n    });\n  };\n\n  if (count) {\n    interval.count = function(start, end) {\n      t0.setTime(+start), t1.setTime(+end);\n      floori(t0), floori(t1);\n      return Math.floor(count(t0, t1));\n    };\n\n    interval.every = function(step) {\n      step = Math.floor(step);\n      return !isFinite(step) || !(step > 0) ? null\n          : !(step > 1) ? interval\n          : interval.filter(field\n              ? function(d) { return field(d) % step === 0; }\n              : function(d) { return interval.count(0, d) % step === 0; });\n    };\n  }\n\n  return interval;\n}\n","import interval from \"./interval\";\n\nvar millisecond = interval(function() {\n  // noop\n}, function(date, step) {\n  date.setTime(+date + step);\n}, function(start, end) {\n  return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = function(k) {\n  k = Math.floor(k);\n  if (!isFinite(k) || !(k > 0)) return null;\n  if (!(k > 1)) return millisecond;\n  return interval(function(date) {\n    date.setTime(Math.floor(date / k) * k);\n  }, function(date, step) {\n    date.setTime(+date + step * k);\n  }, function(start, end) {\n    return (end - start) / k;\n  });\n};\n\nexport default millisecond;\nexport var milliseconds = millisecond.range;\n","export var durationSecond = 1e3;\nexport var durationMinute = 6e4;\nexport var durationHour = 36e5;\nexport var durationDay = 864e5;\nexport var durationWeek = 6048e5;\n","import interval from \"./interval\";\nimport {durationSecond} from \"./duration\";\n\nvar second = interval(function(date) {\n  date.setTime(Math.floor(date / durationSecond) * durationSecond);\n}, function(date, step) {\n  date.setTime(+date + step * durationSecond);\n}, function(start, end) {\n  return (end - start) / durationSecond;\n}, function(date) {\n  return date.getUTCSeconds();\n});\n\nexport default second;\nexport var seconds = second.range;\n","import interval from \"./interval\";\nimport {durationMinute} from \"./duration\";\n\nvar minute = interval(function(date) {\n  date.setTime(Math.floor(date / durationMinute) * durationMinute);\n}, function(date, step) {\n  date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n  return (end - start) / durationMinute;\n}, function(date) {\n  return date.getMinutes();\n});\n\nexport default minute;\nexport var minutes = minute.range;\n","import interval from \"./interval\";\nimport {durationHour, durationMinute} from \"./duration\";\n\nvar hour = interval(function(date) {\n  var offset = date.getTimezoneOffset() * durationMinute % durationHour;\n  if (offset < 0) offset += durationHour;\n  date.setTime(Math.floor((+date - offset) / durationHour) * durationHour + offset);\n}, function(date, step) {\n  date.setTime(+date + step * durationHour);\n}, function(start, end) {\n  return (end - start) / durationHour;\n}, function(date) {\n  return date.getHours();\n});\n\nexport default hour;\nexport var hours = hour.range;\n","import interval from \"./interval\";\nimport {durationDay, durationMinute} from \"./duration\";\n\nvar day = interval(function(date) {\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setDate(date.getDate() + step);\n}, function(start, end) {\n  return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;\n}, function(date) {\n  return date.getDate() - 1;\n});\n\nexport default day;\nexport var days = day.range;\n","import interval from \"./interval\";\nimport {durationMinute, durationWeek} from \"./duration\";\n\nfunction weekday(i) {\n  return interval(function(date) {\n    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setDate(date.getDate() + step * 7);\n  }, function(start, end) {\n    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n  });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\n\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;\n","import interval from \"./interval\";\n\nvar month = interval(function(date) {\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setMonth(date.getMonth() + step);\n}, function(start, end) {\n  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function(date) {\n  return date.getMonth();\n});\n\nexport default month;\nexport var months = month.range;\n","import interval from \"./interval\";\n\nvar year = interval(function(date) {\n  date.setMonth(0, 1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n  return end.getFullYear() - start.getFullYear();\n}, function(date) {\n  return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n    date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n    date.setMonth(0, 1);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setFullYear(date.getFullYear() + step * k);\n  });\n};\n\nexport default year;\nexport var years = year.range;\n","import interval from \"./interval\";\nimport {durationMinute} from \"./duration\";\n\nvar utcMinute = interval(function(date) {\n  date.setUTCSeconds(0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n  return (end - start) / durationMinute;\n}, function(date) {\n  return date.getUTCMinutes();\n});\n\nexport default utcMinute;\nexport var utcMinutes = utcMinute.range;\n","import interval from \"./interval\";\nimport {durationHour} from \"./duration\";\n\nvar utcHour = interval(function(date) {\n  date.setUTCMinutes(0, 0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * durationHour);\n}, function(start, end) {\n  return (end - start) / durationHour;\n}, function(date) {\n  return date.getUTCHours();\n});\n\nexport default utcHour;\nexport var utcHours = utcHour.range;\n","import interval from \"./interval\";\nimport {durationDay} from \"./duration\";\n\nvar utcDay = interval(function(date) {\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n  return (end - start) / durationDay;\n}, function(date) {\n  return date.getUTCDate() - 1;\n});\n\nexport default utcDay;\nexport var utcDays = utcDay.range;\n","import interval from \"./interval\";\nimport {durationWeek} from \"./duration\";\n\nfunction utcWeekday(i) {\n  return interval(function(date) {\n    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCDate(date.getUTCDate() + step * 7);\n  }, function(start, end) {\n    return (end - start) / durationWeek;\n  });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\n\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;\n","import interval from \"./interval\";\n\nvar utcMonth = interval(function(date) {\n  date.setUTCDate(1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCMonth(date.getUTCMonth() + step);\n}, function(start, end) {\n  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function(date) {\n  return date.getUTCMonth();\n});\n\nexport default utcMonth;\nexport var utcMonths = utcMonth.range;\n","import interval from \"./interval\";\n\nvar utcYear = interval(function(date) {\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n  return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n  return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n    date.setUTCMonth(0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCFullYear(date.getUTCFullYear() + step * k);\n  });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;\n","import {\n  timeDay,\n  timeSunday,\n  timeMonday,\n  timeThursday,\n  timeYear,\n  utcDay,\n  utcSunday,\n  utcMonday,\n  utcThursday,\n  utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n    date.setFullYear(d.y);\n    return date;\n  }\n  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n    date.setUTCFullYear(d.y);\n    return date;\n  }\n  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newYear(y) {\n  return {y: y, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n  var locale_dateTime = locale.dateTime,\n      locale_date = locale.date,\n      locale_time = locale.time,\n      locale_periods = locale.periods,\n      locale_weekdays = locale.days,\n      locale_shortWeekdays = locale.shortDays,\n      locale_months = locale.months,\n      locale_shortMonths = locale.shortMonths;\n\n  var periodRe = formatRe(locale_periods),\n      periodLookup = formatLookup(locale_periods),\n      weekdayRe = formatRe(locale_weekdays),\n      weekdayLookup = formatLookup(locale_weekdays),\n      shortWeekdayRe = formatRe(locale_shortWeekdays),\n      shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n      monthRe = formatRe(locale_months),\n      monthLookup = formatLookup(locale_months),\n      shortMonthRe = formatRe(locale_shortMonths),\n      shortMonthLookup = formatLookup(locale_shortMonths);\n\n  var formats = {\n    \"a\": formatShortWeekday,\n    \"A\": formatWeekday,\n    \"b\": formatShortMonth,\n    \"B\": formatMonth,\n    \"c\": null,\n    \"d\": formatDayOfMonth,\n    \"e\": formatDayOfMonth,\n    \"f\": formatMicroseconds,\n    \"H\": formatHour24,\n    \"I\": formatHour12,\n    \"j\": formatDayOfYear,\n    \"L\": formatMilliseconds,\n    \"m\": formatMonthNumber,\n    \"M\": formatMinutes,\n    \"p\": formatPeriod,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatSeconds,\n    \"u\": formatWeekdayNumberMonday,\n    \"U\": formatWeekNumberSunday,\n    \"V\": formatWeekNumberISO,\n    \"w\": formatWeekdayNumberSunday,\n    \"W\": formatWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatYear,\n    \"Y\": formatFullYear,\n    \"Z\": formatZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var utcFormats = {\n    \"a\": formatUTCShortWeekday,\n    \"A\": formatUTCWeekday,\n    \"b\": formatUTCShortMonth,\n    \"B\": formatUTCMonth,\n    \"c\": null,\n    \"d\": formatUTCDayOfMonth,\n    \"e\": formatUTCDayOfMonth,\n    \"f\": formatUTCMicroseconds,\n    \"H\": formatUTCHour24,\n    \"I\": formatUTCHour12,\n    \"j\": formatUTCDayOfYear,\n    \"L\": formatUTCMilliseconds,\n    \"m\": formatUTCMonthNumber,\n    \"M\": formatUTCMinutes,\n    \"p\": formatUTCPeriod,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatUTCSeconds,\n    \"u\": formatUTCWeekdayNumberMonday,\n    \"U\": formatUTCWeekNumberSunday,\n    \"V\": formatUTCWeekNumberISO,\n    \"w\": formatUTCWeekdayNumberSunday,\n    \"W\": formatUTCWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatUTCYear,\n    \"Y\": formatUTCFullYear,\n    \"Z\": formatUTCZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var parses = {\n    \"a\": parseShortWeekday,\n    \"A\": parseWeekday,\n    \"b\": parseShortMonth,\n    \"B\": parseMonth,\n    \"c\": parseLocaleDateTime,\n    \"d\": parseDayOfMonth,\n    \"e\": parseDayOfMonth,\n    \"f\": parseMicroseconds,\n    \"H\": parseHour24,\n    \"I\": parseHour24,\n    \"j\": parseDayOfYear,\n    \"L\": parseMilliseconds,\n    \"m\": parseMonthNumber,\n    \"M\": parseMinutes,\n    \"p\": parsePeriod,\n    \"Q\": parseUnixTimestamp,\n    \"s\": parseUnixTimestampSeconds,\n    \"S\": parseSeconds,\n    \"u\": parseWeekdayNumberMonday,\n    \"U\": parseWeekNumberSunday,\n    \"V\": parseWeekNumberISO,\n    \"w\": parseWeekdayNumberSunday,\n    \"W\": parseWeekNumberMonday,\n    \"x\": parseLocaleDate,\n    \"X\": parseLocaleTime,\n    \"y\": parseYear,\n    \"Y\": parseFullYear,\n    \"Z\": parseZone,\n    \"%\": parseLiteralPercent\n  };\n\n  // These recursive directive definitions must be deferred.\n  formats.x = newFormat(locale_date, formats);\n  formats.X = newFormat(locale_time, formats);\n  formats.c = newFormat(locale_dateTime, formats);\n  utcFormats.x = newFormat(locale_date, utcFormats);\n  utcFormats.X = newFormat(locale_time, utcFormats);\n  utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n  function newFormat(specifier, formats) {\n    return function(date) {\n      var string = [],\n          i = -1,\n          j = 0,\n          n = specifier.length,\n          c,\n          pad,\n          format;\n\n      if (!(date instanceof Date)) date = new Date(+date);\n\n      while (++i < n) {\n        if (specifier.charCodeAt(i) === 37) {\n          string.push(specifier.slice(j, i));\n          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n          else pad = c === \"e\" ? \" \" : \"0\";\n          if (format = formats[c]) c = format(date, pad);\n          string.push(c);\n          j = i + 1;\n        }\n      }\n\n      string.push(specifier.slice(j, i));\n      return string.join(\"\");\n    };\n  }\n\n  function newParse(specifier, newDate) {\n    return function(string) {\n      var d = newYear(1900),\n          i = parseSpecifier(d, specifier, string += \"\", 0),\n          week, day;\n      if (i != string.length) return null;\n\n      // If a UNIX timestamp is specified, return it.\n      if (\"Q\" in d) return new Date(d.Q);\n\n      // The am-pm flag is 0 for AM, and 1 for PM.\n      if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n      // Convert day-of-week and week-of-year to day-of-year.\n      if (\"V\" in d) {\n        if (d.V < 1 || d.V > 53) return null;\n        if (!(\"w\" in d)) d.w = 1;\n        if (\"Z\" in d) {\n          week = utcDate(newYear(d.y)), day = week.getUTCDay();\n          week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n          week = utcDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getUTCFullYear();\n          d.m = week.getUTCMonth();\n          d.d = week.getUTCDate() + (d.w + 6) % 7;\n        } else {\n          week = newDate(newYear(d.y)), day = week.getDay();\n          week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n          week = timeDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getFullYear();\n          d.m = week.getMonth();\n          d.d = week.getDate() + (d.w + 6) % 7;\n        }\n      } else if (\"W\" in d || \"U\" in d) {\n        if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n        day = \"Z\" in d ? utcDate(newYear(d.y)).getUTCDay() : newDate(newYear(d.y)).getDay();\n        d.m = 0;\n        d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n      }\n\n      // If a time zone is specified, all fields are interpreted as UTC and then\n      // offset according to the specified time zone.\n      if (\"Z\" in d) {\n        d.H += d.Z / 100 | 0;\n        d.M += d.Z % 100;\n        return utcDate(d);\n      }\n\n      // Otherwise, all fields are in local time.\n      return newDate(d);\n    };\n  }\n\n  function parseSpecifier(d, specifier, string, j) {\n    var i = 0,\n        n = specifier.length,\n        m = string.length,\n        c,\n        parse;\n\n    while (i < n) {\n      if (j >= m) return -1;\n      c = specifier.charCodeAt(i++);\n      if (c === 37) {\n        c = specifier.charAt(i++);\n        parse = parses[c in pads ? specifier.charAt(i++) : c];\n        if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n      } else if (c != string.charCodeAt(j++)) {\n        return -1;\n      }\n    }\n\n    return j;\n  }\n\n  function parsePeriod(d, string, i) {\n    var n = periodRe.exec(string.slice(i));\n    return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseShortWeekday(d, string, i) {\n    var n = shortWeekdayRe.exec(string.slice(i));\n    return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseWeekday(d, string, i) {\n    var n = weekdayRe.exec(string.slice(i));\n    return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseShortMonth(d, string, i) {\n    var n = shortMonthRe.exec(string.slice(i));\n    return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseMonth(d, string, i) {\n    var n = monthRe.exec(string.slice(i));\n    return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseLocaleDateTime(d, string, i) {\n    return parseSpecifier(d, locale_dateTime, string, i);\n  }\n\n  function parseLocaleDate(d, string, i) {\n    return parseSpecifier(d, locale_date, string, i);\n  }\n\n  function parseLocaleTime(d, string, i) {\n    return parseSpecifier(d, locale_time, string, i);\n  }\n\n  function formatShortWeekday(d) {\n    return locale_shortWeekdays[d.getDay()];\n  }\n\n  function formatWeekday(d) {\n    return locale_weekdays[d.getDay()];\n  }\n\n  function formatShortMonth(d) {\n    return locale_shortMonths[d.getMonth()];\n  }\n\n  function formatMonth(d) {\n    return locale_months[d.getMonth()];\n  }\n\n  function formatPeriod(d) {\n    return locale_periods[+(d.getHours() >= 12)];\n  }\n\n  function formatUTCShortWeekday(d) {\n    return locale_shortWeekdays[d.getUTCDay()];\n  }\n\n  function formatUTCWeekday(d) {\n    return locale_weekdays[d.getUTCDay()];\n  }\n\n  function formatUTCShortMonth(d) {\n    return locale_shortMonths[d.getUTCMonth()];\n  }\n\n  function formatUTCMonth(d) {\n    return locale_months[d.getUTCMonth()];\n  }\n\n  function formatUTCPeriod(d) {\n    return locale_periods[+(d.getUTCHours() >= 12)];\n  }\n\n  return {\n    format: function(specifier) {\n      var f = newFormat(specifier += \"\", formats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    parse: function(specifier) {\n      var p = newParse(specifier += \"\", localDate);\n      p.toString = function() { return specifier; };\n      return p;\n    },\n    utcFormat: function(specifier) {\n      var f = newFormat(specifier += \"\", utcFormats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    utcParse: function(specifier) {\n      var p = newParse(specifier, utcDate);\n      p.toString = function() { return specifier; };\n      return p;\n    }\n  };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n    numberRe = /^\\s*\\d+/, // note: ignores next directive\n    percentRe = /^%/,\n    requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n  var sign = value < 0 ? \"-\" : \"\",\n      string = (sign ? -value : value) + \"\",\n      length = string.length;\n  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n  return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n  return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n  var map = {}, i = -1, n = names.length;\n  while (++i < n) map[names[i].toLowerCase()] = i;\n  return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 4));\n  return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n  var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 6));\n  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n  var n = percentRe.exec(string.slice(i, i + 1));\n  return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = (+n[0]) * 1000, i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n  return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n  return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n  return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n  return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n  return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n  return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n  return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n  return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n  return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n  var day = d.getDay();\n  return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n  return pad(timeSunday.count(timeYear(d), d), p, 2);\n}\n\nfunction formatWeekNumberISO(d, p) {\n  var day = d.getDay();\n  d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n  return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n  return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n  return pad(timeMonday.count(timeYear(d), d), p, 2);\n}\n\nfunction formatYear(d, p) {\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n  var z = d.getTimezoneOffset();\n  return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n      + pad(z / 60 | 0, \"0\", 2)\n      + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n  return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n  return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n  return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n  return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n  return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n  return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n  return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n  return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n  return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n  var dow = d.getUTCDay();\n  return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n  return pad(utcSunday.count(utcYear(d), d), p, 2);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n  var day = d.getUTCDay();\n  d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n  return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n  return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n  return pad(utcMonday.count(utcYear(d), d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n  return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n  return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n  return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n  return Math.floor(+d / 1000);\n}\n","import formatLocale from \"./locale\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n  dateTime: \"%x, %X\",\n  date: \"%-m/%-d/%Y\",\n  time: \"%-I:%M:%S %p\",\n  periods: [\"AM\", \"PM\"],\n  days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n  shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n  shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  timeFormat = locale.format;\n  timeParse = locale.parse;\n  utcFormat = locale.utcFormat;\n  utcParse = locale.utcParse;\n  return locale;\n}\n","import {utcFormat} from \"./defaultLocale\";\n\nexport var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\nfunction formatIsoNative(date) {\n  return date.toISOString();\n}\n\nvar formatIso = Date.prototype.toISOString\n    ? formatIsoNative\n    : utcFormat(isoSpecifier);\n\nexport default formatIso;\n","import {isoSpecifier} from \"./isoFormat\";\nimport {utcParse} from \"./defaultLocale\";\n\nfunction parseIsoNative(string) {\n  var date = new Date(string);\n  return isNaN(date) ? null : date;\n}\n\nvar parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n    ? parseIsoNative\n    : utcParse(isoSpecifier);\n\nexport default parseIso;\n","export default function(s) {\n  return s.match(/.{6}/g).map(function(x) {\n    return \"#\" + x;\n  });\n}\n","import colors from \"./colors\";\n\nfunction ramp(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n}\n\nexport default ramp(colors(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\"));\n\nexport var magma = ramp(colors(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nexport var inferno = ramp(colors(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nexport var plasma = ramp(colors(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n","export default function(x) {\n  return function constant() {\n    return x;\n  };\n}\n","import colors from \"./colors\";\n\nexport default colors(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\");\n","import colors from \"./colors\";\n\nexport default colors(\"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6\");\n","import colors from \"./colors\";\n\nexport default colors(\"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9\");\n","import colors from \"./colors\";\n\nexport default colors(\"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5\");\n","import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport default interpolateCubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));\n","import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport var warm = interpolateCubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nexport var cool = interpolateCubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nvar rainbow = cubehelix();\n\nexport default function(t) {\n  if (t < 0 || t > 1) t -= Math.floor(t);\n  var ts = Math.abs(t - 0.5);\n  rainbow.h = 360 * t - 100;\n  rainbow.s = 1.5 - 1.5 * ts;\n  rainbow.l = 0.8 - 0.9 * ts;\n  return rainbow + \"\";\n}\n","export var abs = Math.abs;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var max = Math.max;\nexport var min = Math.min;\nexport var sin = Math.sin;\nexport var sqrt = Math.sqrt;\n\nexport var epsilon = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = 2 * pi;\n\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","import {path} from \"d3-path\";\nimport constant from \"./constant\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math\";\n\nfunction arcInnerRadius(d) {\n  return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n  return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n  return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n  return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n  return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n  var x10 = x1 - x0, y10 = y1 - y0,\n      x32 = x3 - x2, y32 = y3 - y2,\n      t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / (y32 * x10 - x32 * y10);\n  return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n  var x01 = x0 - x1,\n      y01 = y0 - y1,\n      lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n      ox = lo * y01,\n      oy = -lo * x01,\n      x11 = x0 + ox,\n      y11 = y0 + oy,\n      x10 = x1 + ox,\n      y10 = y1 + oy,\n      x00 = (x11 + x10) / 2,\n      y00 = (y11 + y10) / 2,\n      dx = x10 - x11,\n      dy = y10 - y11,\n      d2 = dx * dx + dy * dy,\n      r = r1 - rc,\n      D = x11 * y10 - x10 * y11,\n      d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n      cx0 = (D * dy - dx * d) / d2,\n      cy0 = (-D * dx - dy * d) / d2,\n      cx1 = (D * dy + dx * d) / d2,\n      cy1 = (-D * dx + dy * d) / d2,\n      dx0 = cx0 - x00,\n      dy0 = cy0 - y00,\n      dx1 = cx1 - x00,\n      dy1 = cy1 - y00;\n\n  // Pick the closer of the two intersection points.\n  // TODO Is there a faster way to determine which intersection to use?\n  if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n  return {\n    cx: cx0,\n    cy: cy0,\n    x01: -ox,\n    y01: -oy,\n    x11: cx0 * (r1 / r - 1),\n    y11: cy0 * (r1 / r - 1)\n  };\n}\n\nexport default function() {\n  var innerRadius = arcInnerRadius,\n      outerRadius = arcOuterRadius,\n      cornerRadius = constant(0),\n      padRadius = null,\n      startAngle = arcStartAngle,\n      endAngle = arcEndAngle,\n      padAngle = arcPadAngle,\n      context = null;\n\n  function arc() {\n    var buffer,\n        r,\n        r0 = +innerRadius.apply(this, arguments),\n        r1 = +outerRadius.apply(this, arguments),\n        a0 = startAngle.apply(this, arguments) - halfPi,\n        a1 = endAngle.apply(this, arguments) - halfPi,\n        da = abs(a1 - a0),\n        cw = a1 > a0;\n\n    if (!context) context = buffer = path();\n\n    // Ensure that the outer radius is always larger than the inner radius.\n    if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n    // Is it a point?\n    if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n    // Or is it a circle or annulus?\n    else if (da > tau - epsilon) {\n      context.moveTo(r1 * cos(a0), r1 * sin(a0));\n      context.arc(0, 0, r1, a0, a1, !cw);\n      if (r0 > epsilon) {\n        context.moveTo(r0 * cos(a1), r0 * sin(a1));\n        context.arc(0, 0, r0, a1, a0, cw);\n      }\n    }\n\n    // Or is it a circular or annular sector?\n    else {\n      var a01 = a0,\n          a11 = a1,\n          a00 = a0,\n          a10 = a1,\n          da0 = da,\n          da1 = da,\n          ap = padAngle.apply(this, arguments) / 2,\n          rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n          rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n          rc0 = rc,\n          rc1 = rc,\n          t0,\n          t1;\n\n      // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n      if (rp > epsilon) {\n        var p0 = asin(rp / r0 * sin(ap)),\n            p1 = asin(rp / r1 * sin(ap));\n        if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n        else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n        if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n        else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n      }\n\n      var x01 = r1 * cos(a01),\n          y01 = r1 * sin(a01),\n          x10 = r0 * cos(a10),\n          y10 = r0 * sin(a10);\n\n      // Apply rounded corners?\n      if (rc > epsilon) {\n        var x11 = r1 * cos(a11),\n            y11 = r1 * sin(a11),\n            x00 = r0 * cos(a00),\n            y00 = r0 * sin(a00);\n\n        // Restrict the corner radius according to the sector angle.\n        if (da < pi) {\n          var oc = da0 > epsilon ? intersect(x01, y01, x00, y00, x11, y11, x10, y10) : [x10, y10],\n              ax = x01 - oc[0],\n              ay = y01 - oc[1],\n              bx = x11 - oc[0],\n              by = y11 - oc[1],\n              kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n              lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n          rc0 = min(rc, (r0 - lc) / (kc - 1));\n          rc1 = min(rc, (r1 - lc) / (kc + 1));\n        }\n      }\n\n      // Is the sector collapsed to a line?\n      if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n      // Does the sector’s outer ring have rounded corners?\n      else if (rc1 > epsilon) {\n        t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n        t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n        context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n          context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the outer ring just a circular arc?\n      else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n      // Is there no inner ring, and it’s a circular sector?\n      // Or perhaps it’s an annular sector collapsed due to padding?\n      if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n      // Does the sector’s inner ring (or point) have rounded corners?\n      else if (rc0 > epsilon) {\n        t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n        t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n        context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n        // Have the corners merged?\n        if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n        // Otherwise, draw the two corners and the ring.\n        else {\n          context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n          context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n          context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n        }\n      }\n\n      // Or is the inner ring just a circular arc?\n      else context.arc(0, 0, r0, a10, a00, cw);\n    }\n\n    context.closePath();\n\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  arc.centroid = function() {\n    var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n        a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n    return [cos(a) * r, sin(a) * r];\n  };\n\n  arc.innerRadius = function(_) {\n    return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n  };\n\n  arc.outerRadius = function(_) {\n    return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n  };\n\n  arc.cornerRadius = function(_) {\n    return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n  };\n\n  arc.padRadius = function(_) {\n    return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n  };\n\n  arc.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n  };\n\n  arc.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n  };\n\n  arc.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n  };\n\n  arc.context = function(_) {\n    return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n  };\n\n  return arc;\n}\n","export default function(a, b) {\n  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n  return d;\n}\n","import constant from \"./constant\";\nimport descending from \"./descending\";\nimport identity from \"./identity\";\nimport {tau} from \"./math\";\n\nexport default function() {\n  var value = identity,\n      sortValues = descending,\n      sort = null,\n      startAngle = constant(0),\n      endAngle = constant(tau),\n      padAngle = constant(0);\n\n  function pie(data) {\n    var i,\n        n = data.length,\n        j,\n        k,\n        sum = 0,\n        index = new Array(n),\n        arcs = new Array(n),\n        a0 = +startAngle.apply(this, arguments),\n        da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n        a1,\n        p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n        pa = p * (da < 0 ? -1 : 1),\n        v;\n\n    for (i = 0; i < n; ++i) {\n      if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n        sum += v;\n      }\n    }\n\n    // Optionally sort the arcs by previously-computed values or by data.\n    if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n    else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n    // Compute the arcs! They are stored in the original data's order.\n    for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n      j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n        data: data[j],\n        index: i,\n        value: v,\n        startAngle: a0,\n        endAngle: a1,\n        padAngle: p\n      };\n    }\n\n    return arcs;\n  }\n\n  pie.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n  };\n\n  pie.sortValues = function(_) {\n    return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n  };\n\n  pie.sort = function(_) {\n    return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n  };\n\n  pie.startAngle = function(_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n  };\n\n  pie.endAngle = function(_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n  };\n\n  pie.padAngle = function(_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n  };\n\n  return pie;\n}\n","export default function() {}\n","export function point(that, x, y) {\n  that._context.bezierCurveTo(\n    (2 * that._x0 + that._x1) / 3,\n    (2 * that._y0 + that._y1) / 3,\n    (that._x0 + 2 * that._x1) / 3,\n    (that._y0 + 2 * that._y1) / 3,\n    (that._x0 + 4 * that._x1 + x) / 6,\n    (that._y0 + 4 * that._y1 + y) / 6\n  );\n}\n\nexport function Basis(context) {\n  this._context = context;\n}\n\nBasis.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 3: point(this, this._x1, this._y1); // proceed\n      case 2: this._context.lineTo(this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\n\nexport default function(context) {\n  return new Basis(context);\n}\n","import {Basis} from \"./basis\";\n\nfunction Bundle(context, beta) {\n  this._basis = new Basis(context);\n  this._beta = beta;\n}\n\nBundle.prototype = {\n  lineStart: function() {\n    this._x = [];\n    this._y = [];\n    this._basis.lineStart();\n  },\n  lineEnd: function() {\n    var x = this._x,\n        y = this._y,\n        j = x.length - 1;\n\n    if (j > 0) {\n      var x0 = x[0],\n          y0 = y[0],\n          dx = x[j] - x0,\n          dy = y[j] - y0,\n          i = -1,\n          t;\n\n      while (++i <= j) {\n        t = i / j;\n        this._basis.point(\n          this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n          this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n        );\n      }\n    }\n\n    this._x = this._y = null;\n    this._basis.lineEnd();\n  },\n  point: function(x, y) {\n    this._x.push(+x);\n    this._y.push(+y);\n  }\n};\n\nexport default (function custom(beta) {\n\n  function bundle(context) {\n    return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n  }\n\n  bundle.beta = function(beta) {\n    return custom(+beta);\n  };\n\n  return bundle;\n})(0.85);\n","export function point(that, x, y) {\n  that._context.bezierCurveTo(\n    that._x1 + that._k * (that._x2 - that._x0),\n    that._y1 + that._k * (that._y2 - that._y0),\n    that._x2 + that._k * (that._x1 - x),\n    that._y2 + that._k * (that._y1 - y),\n    that._x2,\n    that._y2\n  );\n}\n\nexport function Cardinal(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x2, this._y2); break;\n      case 3: point(this, this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n      case 2: this._point = 3; // proceed\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nexport default (function custom(tension) {\n\n  function cardinal(context) {\n    return new Cardinal(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0);\n","import noop from \"../noop\";\nimport {point} from \"./cardinal\";\n\nexport function CardinalClosed(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n  areaStart: noop,\n  areaEnd: noop,\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.lineTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        this.point(this._x5, this._y5);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nexport default (function custom(tension) {\n\n  function cardinal(context) {\n    return new CardinalClosed(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0);\n","import {point} from \"./cardinal\";\n\nexport function CardinalOpen(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n      case 3: this._point = 4; // proceed\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nexport default (function custom(tension) {\n\n  function cardinal(context) {\n    return new CardinalOpen(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0);\n","import {epsilon} from \"../math\";\nimport {Cardinal} from \"./cardinal\";\n\nexport function point(that, x, y) {\n  var x1 = that._x1,\n      y1 = that._y1,\n      x2 = that._x2,\n      y2 = that._y2;\n\n  if (that._l01_a > epsilon) {\n    var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n        n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n    x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n    y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n  }\n\n  if (that._l23_a > epsilon) {\n    var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n        m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n    x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n    y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n  }\n\n  that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x2, this._y2); break;\n      case 3: this.point(this._x2, this._y2); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; // proceed\n      default: point(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nexport default (function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5);\n","import {CardinalClosed} from \"./cardinalClosed\";\nimport noop from \"../noop\";\nimport {point} from \"./catmullRom\";\n\nfunction CatmullRomClosed(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n  areaStart: noop,\n  areaEnd: noop,\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.lineTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        this.point(this._x5, this._y5);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n      default: point(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nexport default (function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5);\n","import {CardinalOpen} from \"./cardinalOpen\";\nimport {point} from \"./catmullRom\";\n\nfunction CatmullRomOpen(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a =\n    this._l01_2a = this._l12_2a = this._l23_2a =\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0: this._point = 1; break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n      case 3: this._point = 4; // proceed\n      default: point(this, x, y); break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nexport default (function custom(alpha) {\n\n  function catmullRom(context) {\n    return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n  }\n\n  catmullRom.alpha = function(alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5);\n","function sign(x) {\n  return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n  var h0 = that._x1 - that._x0,\n      h1 = x2 - that._x1,\n      s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n      s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n      p = (s0 * h1 + s1 * h0) / (h0 + h1);\n  return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n  var h = that._x1 - that._x0;\n  return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n  var x0 = that._x0,\n      y0 = that._y0,\n      x1 = that._x1,\n      y1 = that._y1,\n      dx = (x1 - x0) / 3;\n  that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n  this._context = context;\n}\n\nMonotoneX.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 =\n    this._y0 = this._y1 =\n    this._t0 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x1, this._y1); break;\n      case 3: point(this, this._t0, slope2(this, this._t0)); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    var t1 = NaN;\n\n    x = +x, y = +y;\n    if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; break;\n      case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n      default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n    }\n\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n    this._t0 = t1;\n  }\n}\n\nfunction MonotoneY(context) {\n  this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n  MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n  this._context = context;\n}\n\nReflectContext.prototype = {\n  moveTo: function(x, y) { this._context.moveTo(y, x); },\n  closePath: function() { this._context.closePath(); },\n  lineTo: function(x, y) { this._context.lineTo(y, x); },\n  bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n  return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n  return new MonotoneY(context);\n}\n","function RedBlackTree() {\n  this._ = null; // root node\n}\n\nexport function RedBlackNode(node) {\n  node.U = // parent node\n  node.C = // color - true for red, false for black\n  node.L = // left node\n  node.R = // right node\n  node.P = // previous node\n  node.N = null; // next node\n}\n\nRedBlackTree.prototype = {\n  constructor: RedBlackTree,\n\n  insert: function(after, node) {\n    var parent, grandpa, uncle;\n\n    if (after) {\n      node.P = after;\n      node.N = after.N;\n      if (after.N) after.N.P = node;\n      after.N = node;\n      if (after.R) {\n        after = after.R;\n        while (after.L) after = after.L;\n        after.L = node;\n      } else {\n        after.R = node;\n      }\n      parent = after;\n    } else if (this._) {\n      after = RedBlackFirst(this._);\n      node.P = null;\n      node.N = after;\n      after.P = after.L = node;\n      parent = after;\n    } else {\n      node.P = node.N = null;\n      this._ = node;\n      parent = null;\n    }\n    node.L = node.R = null;\n    node.U = parent;\n    node.C = true;\n\n    after = node;\n    while (parent && parent.C) {\n      grandpa = parent.U;\n      if (parent === grandpa.L) {\n        uncle = grandpa.R;\n        if (uncle && uncle.C) {\n          parent.C = uncle.C = false;\n          grandpa.C = true;\n          after = grandpa;\n        } else {\n          if (after === parent.R) {\n            RedBlackRotateLeft(this, parent);\n            after = parent;\n            parent = after.U;\n          }\n          parent.C = false;\n          grandpa.C = true;\n          RedBlackRotateRight(this, grandpa);\n        }\n      } else {\n        uncle = grandpa.L;\n        if (uncle && uncle.C) {\n          parent.C = uncle.C = false;\n          grandpa.C = true;\n          after = grandpa;\n        } else {\n          if (after === parent.L) {\n            RedBlackRotateRight(this, parent);\n            after = parent;\n            parent = after.U;\n          }\n          parent.C = false;\n          grandpa.C = true;\n          RedBlackRotateLeft(this, grandpa);\n        }\n      }\n      parent = after.U;\n    }\n    this._.C = false;\n  },\n\n  remove: function(node) {\n    if (node.N) node.N.P = node.P;\n    if (node.P) node.P.N = node.N;\n    node.N = node.P = null;\n\n    var parent = node.U,\n        sibling,\n        left = node.L,\n        right = node.R,\n        next,\n        red;\n\n    if (!left) next = right;\n    else if (!right) next = left;\n    else next = RedBlackFirst(right);\n\n    if (parent) {\n      if (parent.L === node) parent.L = next;\n      else parent.R = next;\n    } else {\n      this._ = next;\n    }\n\n    if (left && right) {\n      red = next.C;\n      next.C = node.C;\n      next.L = left;\n      left.U = next;\n      if (next !== right) {\n        parent = next.U;\n        next.U = node.U;\n        node = next.R;\n        parent.L = node;\n        next.R = right;\n        right.U = next;\n      } else {\n        next.U = parent;\n        parent = next;\n        node = next.R;\n      }\n    } else {\n      red = node.C;\n      node = next;\n    }\n\n    if (node) node.U = parent;\n    if (red) return;\n    if (node && node.C) { node.C = false; return; }\n\n    do {\n      if (node === this._) break;\n      if (node === parent.L) {\n        sibling = parent.R;\n        if (sibling.C) {\n          sibling.C = false;\n          parent.C = true;\n          RedBlackRotateLeft(this, parent);\n          sibling = parent.R;\n        }\n        if ((sibling.L && sibling.L.C)\n            || (sibling.R && sibling.R.C)) {\n          if (!sibling.R || !sibling.R.C) {\n            sibling.L.C = false;\n            sibling.C = true;\n            RedBlackRotateRight(this, sibling);\n            sibling = parent.R;\n          }\n          sibling.C = parent.C;\n          parent.C = sibling.R.C = false;\n          RedBlackRotateLeft(this, parent);\n          node = this._;\n          break;\n        }\n      } else {\n        sibling = parent.L;\n        if (sibling.C) {\n          sibling.C = false;\n          parent.C = true;\n          RedBlackRotateRight(this, parent);\n          sibling = parent.L;\n        }\n        if ((sibling.L && sibling.L.C)\n          || (sibling.R && sibling.R.C)) {\n          if (!sibling.L || !sibling.L.C) {\n            sibling.R.C = false;\n            sibling.C = true;\n            RedBlackRotateLeft(this, sibling);\n            sibling = parent.L;\n          }\n          sibling.C = parent.C;\n          parent.C = sibling.L.C = false;\n          RedBlackRotateRight(this, parent);\n          node = this._;\n          break;\n        }\n      }\n      sibling.C = true;\n      node = parent;\n      parent = parent.U;\n    } while (!node.C);\n\n    if (node) node.C = false;\n  }\n};\n\nfunction RedBlackRotateLeft(tree, node) {\n  var p = node,\n      q = node.R,\n      parent = p.U;\n\n  if (parent) {\n    if (parent.L === p) parent.L = q;\n    else parent.R = q;\n  } else {\n    tree._ = q;\n  }\n\n  q.U = parent;\n  p.U = q;\n  p.R = q.L;\n  if (p.R) p.R.U = p;\n  q.L = p;\n}\n\nfunction RedBlackRotateRight(tree, node) {\n  var p = node,\n      q = node.L,\n      parent = p.U;\n\n  if (parent) {\n    if (parent.L === p) parent.L = q;\n    else parent.R = q;\n  } else {\n    tree._ = q;\n  }\n\n  q.U = parent;\n  p.U = q;\n  p.L = q.R;\n  if (p.L) p.L.U = p;\n  q.R = p;\n}\n\nfunction RedBlackFirst(node) {\n  while (node.L) node = node.L;\n  return node;\n}\n\nexport default RedBlackTree;\n","import {cells, edges, epsilon} from \"./Diagram\";\n\nexport function createEdge(left, right, v0, v1) {\n  var edge = [null, null],\n      index = edges.push(edge) - 1;\n  edge.left = left;\n  edge.right = right;\n  if (v0) setEdgeEnd(edge, left, right, v0);\n  if (v1) setEdgeEnd(edge, right, left, v1);\n  cells[left.index].halfedges.push(index);\n  cells[right.index].halfedges.push(index);\n  return edge;\n}\n\nexport function createBorderEdge(left, v0, v1) {\n  var edge = [v0, v1];\n  edge.left = left;\n  return edge;\n}\n\nexport function setEdgeEnd(edge, left, right, vertex) {\n  if (!edge[0] && !edge[1]) {\n    edge[0] = vertex;\n    edge.left = left;\n    edge.right = right;\n  } else if (edge.left === right) {\n    edge[1] = vertex;\n  } else {\n    edge[0] = vertex;\n  }\n}\n\n// Liang–Barsky line clipping.\nfunction clipEdge(edge, x0, y0, x1, y1) {\n  var a = edge[0],\n      b = edge[1],\n      ax = a[0],\n      ay = a[1],\n      bx = b[0],\n      by = b[1],\n      t0 = 0,\n      t1 = 1,\n      dx = bx - ax,\n      dy = by - ay,\n      r;\n\n  r = x0 - ax;\n  if (!dx && r > 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dx > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = x1 - ax;\n  if (!dx && r < 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dx > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  r = y0 - ay;\n  if (!dy && r > 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dy > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = y1 - ay;\n  if (!dy && r < 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dy > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  if (!(t0 > 0) && !(t1 < 1)) return true; // TODO Better check?\n\n  if (t0 > 0) edge[0] = [ax + t0 * dx, ay + t0 * dy];\n  if (t1 < 1) edge[1] = [ax + t1 * dx, ay + t1 * dy];\n  return true;\n}\n\nfunction connectEdge(edge, x0, y0, x1, y1) {\n  var v1 = edge[1];\n  if (v1) return true;\n\n  var v0 = edge[0],\n      left = edge.left,\n      right = edge.right,\n      lx = left[0],\n      ly = left[1],\n      rx = right[0],\n      ry = right[1],\n      fx = (lx + rx) / 2,\n      fy = (ly + ry) / 2,\n      fm,\n      fb;\n\n  if (ry === ly) {\n    if (fx < x0 || fx >= x1) return;\n    if (lx > rx) {\n      if (!v0) v0 = [fx, y0];\n      else if (v0[1] >= y1) return;\n      v1 = [fx, y1];\n    } else {\n      if (!v0) v0 = [fx, y1];\n      else if (v0[1] < y0) return;\n      v1 = [fx, y0];\n    }\n  } else {\n    fm = (lx - rx) / (ry - ly);\n    fb = fy - fm * fx;\n    if (fm < -1 || fm > 1) {\n      if (lx > rx) {\n        if (!v0) v0 = [(y0 - fb) / fm, y0];\n        else if (v0[1] >= y1) return;\n        v1 = [(y1 - fb) / fm, y1];\n      } else {\n        if (!v0) v0 = [(y1 - fb) / fm, y1];\n        else if (v0[1] < y0) return;\n        v1 = [(y0 - fb) / fm, y0];\n      }\n    } else {\n      if (ly < ry) {\n        if (!v0) v0 = [x0, fm * x0 + fb];\n        else if (v0[0] >= x1) return;\n        v1 = [x1, fm * x1 + fb];\n      } else {\n        if (!v0) v0 = [x1, fm * x1 + fb];\n        else if (v0[0] < x0) return;\n        v1 = [x0, fm * x0 + fb];\n      }\n    }\n  }\n\n  edge[0] = v0;\n  edge[1] = v1;\n  return true;\n}\n\nexport function clipEdges(x0, y0, x1, y1) {\n  var i = edges.length,\n      edge;\n\n  while (i--) {\n    if (!connectEdge(edge = edges[i], x0, y0, x1, y1)\n        || !clipEdge(edge, x0, y0, x1, y1)\n        || !(Math.abs(edge[0][0] - edge[1][0]) > epsilon\n            || Math.abs(edge[0][1] - edge[1][1]) > epsilon)) {\n      delete edges[i];\n    }\n  }\n}\n","import {createBorderEdge} from \"./Edge\";\nimport {cells, edges, epsilon} from \"./Diagram\";\n\nexport function createCell(site) {\n  return cells[site.index] = {\n    site: site,\n    halfedges: []\n  };\n}\n\nfunction cellHalfedgeAngle(cell, edge) {\n  var site = cell.site,\n      va = edge.left,\n      vb = edge.right;\n  if (site === vb) vb = va, va = site;\n  if (vb) return Math.atan2(vb[1] - va[1], vb[0] - va[0]);\n  if (site === va) va = edge[1], vb = edge[0];\n  else va = edge[0], vb = edge[1];\n  return Math.atan2(va[0] - vb[0], vb[1] - va[1]);\n}\n\nexport function cellHalfedgeStart(cell, edge) {\n  return edge[+(edge.left !== cell.site)];\n}\n\nexport function cellHalfedgeEnd(cell, edge) {\n  return edge[+(edge.left === cell.site)];\n}\n\nexport function sortCellHalfedges() {\n  for (var i = 0, n = cells.length, cell, halfedges, j, m; i < n; ++i) {\n    if ((cell = cells[i]) && (m = (halfedges = cell.halfedges).length)) {\n      var index = new Array(m),\n          array = new Array(m);\n      for (j = 0; j < m; ++j) index[j] = j, array[j] = cellHalfedgeAngle(cell, edges[halfedges[j]]);\n      index.sort(function(i, j) { return array[j] - array[i]; });\n      for (j = 0; j < m; ++j) array[j] = halfedges[index[j]];\n      for (j = 0; j < m; ++j) halfedges[j] = array[j];\n    }\n  }\n}\n\nexport function clipCells(x0, y0, x1, y1) {\n  var nCells = cells.length,\n      iCell,\n      cell,\n      site,\n      iHalfedge,\n      halfedges,\n      nHalfedges,\n      start,\n      startX,\n      startY,\n      end,\n      endX,\n      endY,\n      cover = true;\n\n  for (iCell = 0; iCell < nCells; ++iCell) {\n    if (cell = cells[iCell]) {\n      site = cell.site;\n      halfedges = cell.halfedges;\n      iHalfedge = halfedges.length;\n\n      // Remove any dangling clipped edges.\n      while (iHalfedge--) {\n        if (!edges[halfedges[iHalfedge]]) {\n          halfedges.splice(iHalfedge, 1);\n        }\n      }\n\n      // Insert any border edges as necessary.\n      iHalfedge = 0, nHalfedges = halfedges.length;\n      while (iHalfedge < nHalfedges) {\n        end = cellHalfedgeEnd(cell, edges[halfedges[iHalfedge]]), endX = end[0], endY = end[1];\n        start = cellHalfedgeStart(cell, edges[halfedges[++iHalfedge % nHalfedges]]), startX = start[0], startY = start[1];\n        if (Math.abs(endX - startX) > epsilon || Math.abs(endY - startY) > epsilon) {\n          halfedges.splice(iHalfedge, 0, edges.push(createBorderEdge(site, end,\n              Math.abs(endX - x0) < epsilon && y1 - endY > epsilon ? [x0, Math.abs(startX - x0) < epsilon ? startY : y1]\n              : Math.abs(endY - y1) < epsilon && x1 - endX > epsilon ? [Math.abs(startY - y1) < epsilon ? startX : x1, y1]\n              : Math.abs(endX - x1) < epsilon && endY - y0 > epsilon ? [x1, Math.abs(startX - x1) < epsilon ? startY : y0]\n              : Math.abs(endY - y0) < epsilon && endX - x0 > epsilon ? [Math.abs(startY - y0) < epsilon ? startX : x0, y0]\n              : null)) - 1);\n          ++nHalfedges;\n        }\n      }\n\n      if (nHalfedges) cover = false;\n    }\n  }\n\n  // If there weren’t any edges, have the closest site cover the extent.\n  // It doesn’t matter which corner of the extent we measure!\n  if (cover) {\n    var dx, dy, d2, dc = Infinity;\n\n    for (iCell = 0, cover = null; iCell < nCells; ++iCell) {\n      if (cell = cells[iCell]) {\n        site = cell.site;\n        dx = site[0] - x0;\n        dy = site[1] - y0;\n        d2 = dx * dx + dy * dy;\n        if (d2 < dc) dc = d2, cover = cell;\n      }\n    }\n\n    if (cover) {\n      var v00 = [x0, y0], v01 = [x0, y1], v11 = [x1, y1], v10 = [x1, y0];\n      cover.halfedges.push(\n        edges.push(createBorderEdge(site = cover.site, v00, v01)) - 1,\n        edges.push(createBorderEdge(site, v01, v11)) - 1,\n        edges.push(createBorderEdge(site, v11, v10)) - 1,\n        edges.push(createBorderEdge(site, v10, v00)) - 1\n      );\n    }\n  }\n\n  // Lastly delete any cells with no edges; these were entirely clipped.\n  for (iCell = 0; iCell < nCells; ++iCell) {\n    if (cell = cells[iCell]) {\n      if (!cell.halfedges.length) {\n        delete cells[iCell];\n      }\n    }\n  }\n}\n","import {RedBlackNode} from \"./RedBlackTree\";\nimport {circles, epsilon2} from \"./Diagram\";\n\nvar circlePool = [];\n\nexport var firstCircle;\n\nfunction Circle() {\n  RedBlackNode(this);\n  this.x =\n  this.y =\n  this.arc =\n  this.site =\n  this.cy = null;\n}\n\nexport function attachCircle(arc) {\n  var lArc = arc.P,\n      rArc = arc.N;\n\n  if (!lArc || !rArc) return;\n\n  var lSite = lArc.site,\n      cSite = arc.site,\n      rSite = rArc.site;\n\n  if (lSite === rSite) return;\n\n  var bx = cSite[0],\n      by = cSite[1],\n      ax = lSite[0] - bx,\n      ay = lSite[1] - by,\n      cx = rSite[0] - bx,\n      cy = rSite[1] - by;\n\n  var d = 2 * (ax * cy - ay * cx);\n  if (d >= -epsilon2) return;\n\n  var ha = ax * ax + ay * ay,\n      hc = cx * cx + cy * cy,\n      x = (cy * ha - ay * hc) / d,\n      y = (ax * hc - cx * ha) / d;\n\n  var circle = circlePool.pop() || new Circle;\n  circle.arc = arc;\n  circle.site = cSite;\n  circle.x = x + bx;\n  circle.y = (circle.cy = y + by) + Math.sqrt(x * x + y * y); // y bottom\n\n  arc.circle = circle;\n\n  var before = null,\n      node = circles._;\n\n  while (node) {\n    if (circle.y < node.y || (circle.y === node.y && circle.x <= node.x)) {\n      if (node.L) node = node.L;\n      else { before = node.P; break; }\n    } else {\n      if (node.R) node = node.R;\n      else { before = node; break; }\n    }\n  }\n\n  circles.insert(before, circle);\n  if (!before) firstCircle = circle;\n}\n\nexport function detachCircle(arc) {\n  var circle = arc.circle;\n  if (circle) {\n    if (!circle.P) firstCircle = circle.N;\n    circles.remove(circle);\n    circlePool.push(circle);\n    RedBlackNode(circle);\n    arc.circle = null;\n  }\n}\n","import {RedBlackNode} from \"./RedBlackTree\";\nimport {createCell} from \"./Cell\";\nimport {attachCircle, detachCircle} from \"./Circle\";\nimport {createEdge, setEdgeEnd} from \"./Edge\";\nimport {beaches, epsilon} from \"./Diagram\";\n\nvar beachPool = [];\n\nfunction Beach() {\n  RedBlackNode(this);\n  this.edge =\n  this.site =\n  this.circle = null;\n}\n\nfunction createBeach(site) {\n  var beach = beachPool.pop() || new Beach;\n  beach.site = site;\n  return beach;\n}\n\nfunction detachBeach(beach) {\n  detachCircle(beach);\n  beaches.remove(beach);\n  beachPool.push(beach);\n  RedBlackNode(beach);\n}\n\nexport function removeBeach(beach) {\n  var circle = beach.circle,\n      x = circle.x,\n      y = circle.cy,\n      vertex = [x, y],\n      previous = beach.P,\n      next = beach.N,\n      disappearing = [beach];\n\n  detachBeach(beach);\n\n  var lArc = previous;\n  while (lArc.circle\n      && Math.abs(x - lArc.circle.x) < epsilon\n      && Math.abs(y - lArc.circle.cy) < epsilon) {\n    previous = lArc.P;\n    disappearing.unshift(lArc);\n    detachBeach(lArc);\n    lArc = previous;\n  }\n\n  disappearing.unshift(lArc);\n  detachCircle(lArc);\n\n  var rArc = next;\n  while (rArc.circle\n      && Math.abs(x - rArc.circle.x) < epsilon\n      && Math.abs(y - rArc.circle.cy) < epsilon) {\n    next = rArc.N;\n    disappearing.push(rArc);\n    detachBeach(rArc);\n    rArc = next;\n  }\n\n  disappearing.push(rArc);\n  detachCircle(rArc);\n\n  var nArcs = disappearing.length,\n      iArc;\n  for (iArc = 1; iArc < nArcs; ++iArc) {\n    rArc = disappearing[iArc];\n    lArc = disappearing[iArc - 1];\n    setEdgeEnd(rArc.edge, lArc.site, rArc.site, vertex);\n  }\n\n  lArc = disappearing[0];\n  rArc = disappearing[nArcs - 1];\n  rArc.edge = createEdge(lArc.site, rArc.site, null, vertex);\n\n  attachCircle(lArc);\n  attachCircle(rArc);\n}\n\nexport function addBeach(site) {\n  var x = site[0],\n      directrix = site[1],\n      lArc,\n      rArc,\n      dxl,\n      dxr,\n      node = beaches._;\n\n  while (node) {\n    dxl = leftBreakPoint(node, directrix) - x;\n    if (dxl > epsilon) node = node.L; else {\n      dxr = x - rightBreakPoint(node, directrix);\n      if (dxr > epsilon) {\n        if (!node.R) {\n          lArc = node;\n          break;\n        }\n        node = node.R;\n      } else {\n        if (dxl > -epsilon) {\n          lArc = node.P;\n          rArc = node;\n        } else if (dxr > -epsilon) {\n          lArc = node;\n          rArc = node.N;\n        } else {\n          lArc = rArc = node;\n        }\n        break;\n      }\n    }\n  }\n\n  createCell(site);\n  var newArc = createBeach(site);\n  beaches.insert(lArc, newArc);\n\n  if (!lArc && !rArc) return;\n\n  if (lArc === rArc) {\n    detachCircle(lArc);\n    rArc = createBeach(lArc.site);\n    beaches.insert(newArc, rArc);\n    newArc.edge = rArc.edge = createEdge(lArc.site, newArc.site);\n    attachCircle(lArc);\n    attachCircle(rArc);\n    return;\n  }\n\n  if (!rArc) { // && lArc\n    newArc.edge = createEdge(lArc.site, newArc.site);\n    return;\n  }\n\n  // else lArc !== rArc\n  detachCircle(lArc);\n  detachCircle(rArc);\n\n  var lSite = lArc.site,\n      ax = lSite[0],\n      ay = lSite[1],\n      bx = site[0] - ax,\n      by = site[1] - ay,\n      rSite = rArc.site,\n      cx = rSite[0] - ax,\n      cy = rSite[1] - ay,\n      d = 2 * (bx * cy - by * cx),\n      hb = bx * bx + by * by,\n      hc = cx * cx + cy * cy,\n      vertex = [(cy * hb - by * hc) / d + ax, (bx * hc - cx * hb) / d + ay];\n\n  setEdgeEnd(rArc.edge, lSite, rSite, vertex);\n  newArc.edge = createEdge(lSite, site, null, vertex);\n  rArc.edge = createEdge(site, rSite, null, vertex);\n  attachCircle(lArc);\n  attachCircle(rArc);\n}\n\nfunction leftBreakPoint(arc, directrix) {\n  var site = arc.site,\n      rfocx = site[0],\n      rfocy = site[1],\n      pby2 = rfocy - directrix;\n\n  if (!pby2) return rfocx;\n\n  var lArc = arc.P;\n  if (!lArc) return -Infinity;\n\n  site = lArc.site;\n  var lfocx = site[0],\n      lfocy = site[1],\n      plby2 = lfocy - directrix;\n\n  if (!plby2) return lfocx;\n\n  var hl = lfocx - rfocx,\n      aby2 = 1 / pby2 - 1 / plby2,\n      b = hl / plby2;\n\n  if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx;\n\n  return (rfocx + lfocx) / 2;\n}\n\nfunction rightBreakPoint(arc, directrix) {\n  var rArc = arc.N;\n  if (rArc) return leftBreakPoint(rArc, directrix);\n  var site = arc.site;\n  return site[1] === directrix ? site[0] : Infinity;\n}\n","import {addBeach, removeBeach} from \"./Beach\";\nimport {sortCellHalfedges, cellHalfedgeStart, clipCells} from \"./Cell\";\nimport {firstCircle} from \"./Circle\";\nimport {clipEdges} from \"./Edge\";\nimport RedBlackTree from \"./RedBlackTree\";\n\nexport var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var beaches;\nexport var cells;\nexport var circles;\nexport var edges;\n\nfunction triangleArea(a, b, c) {\n  return (a[0] - c[0]) * (b[1] - a[1]) - (a[0] - b[0]) * (c[1] - a[1]);\n}\n\nfunction lexicographic(a, b) {\n  return b[1] - a[1]\n      || b[0] - a[0];\n}\n\nexport default function Diagram(sites, extent) {\n  var site = sites.sort(lexicographic).pop(),\n      x,\n      y,\n      circle;\n\n  edges = [];\n  cells = new Array(sites.length);\n  beaches = new RedBlackTree;\n  circles = new RedBlackTree;\n\n  while (true) {\n    circle = firstCircle;\n    if (site && (!circle || site[1] < circle.y || (site[1] === circle.y && site[0] < circle.x))) {\n      if (site[0] !== x || site[1] !== y) {\n        addBeach(site);\n        x = site[0], y = site[1];\n      }\n      site = sites.pop();\n    } else if (circle) {\n      removeBeach(circle.arc);\n    } else {\n      break;\n    }\n  }\n\n  sortCellHalfedges();\n\n  if (extent) {\n    var x0 = +extent[0][0],\n        y0 = +extent[0][1],\n        x1 = +extent[1][0],\n        y1 = +extent[1][1];\n    clipEdges(x0, y0, x1, y1);\n    clipCells(x0, y0, x1, y1);\n  }\n\n  this.edges = edges;\n  this.cells = cells;\n\n  beaches =\n  circles =\n  edges =\n  cells = null;\n}\n\nDiagram.prototype = {\n  constructor: Diagram,\n\n  polygons: function() {\n    var edges = this.edges;\n\n    return this.cells.map(function(cell) {\n      var polygon = cell.halfedges.map(function(i) { return cellHalfedgeStart(cell, edges[i]); });\n      polygon.data = cell.site.data;\n      return polygon;\n    });\n  },\n\n  triangles: function() {\n    var triangles = [],\n        edges = this.edges;\n\n    this.cells.forEach(function(cell, i) {\n      if (!(m = (halfedges = cell.halfedges).length)) return;\n      var site = cell.site,\n          halfedges,\n          j = -1,\n          m,\n          s0,\n          e1 = edges[halfedges[m - 1]],\n          s1 = e1.left === site ? e1.right : e1.left;\n\n      while (++j < m) {\n        s0 = s1;\n        e1 = edges[halfedges[j]];\n        s1 = e1.left === site ? e1.right : e1.left;\n        if (s0 && s1 && i < s0.index && i < s1.index && triangleArea(site, s0, s1) < 0) {\n          triangles.push([site.data, s0.data, s1.data]);\n        }\n      }\n    });\n\n    return triangles;\n  },\n\n  links: function() {\n    return this.edges.filter(function(edge) {\n      return edge.right;\n    }).map(function(edge) {\n      return {\n        source: edge.left.data,\n        target: edge.right.data\n      };\n    });\n  },\n\n  find: function(x, y, radius) {\n    var that = this, i0, i1 = that._found || 0, n = that.cells.length, cell;\n\n    // Use the previously-found cell, or start with an arbitrary one.\n    while (!(cell = that.cells[i1])) if (++i1 >= n) return null;\n    var dx = x - cell.site[0], dy = y - cell.site[1], d2 = dx * dx + dy * dy;\n\n    // Traverse the half-edges to find a closer cell, if any.\n    do {\n      cell = that.cells[i0 = i1], i1 = null;\n      cell.halfedges.forEach(function(e) {\n        var edge = that.edges[e], v = edge.left;\n        if ((v === cell.site || !v) && !(v = edge.right)) return;\n        var vx = x - v[0], vy = y - v[1], v2 = vx * vx + vy * vy;\n        if (v2 < d2) d2 = v2, i1 = v.index;\n      });\n    } while (i1 !== null);\n\n    that._found = i0;\n\n    return radius == null || d2 <= radius * radius ? cell.site : null;\n  }\n}\n","export function Transform(k, x, y) {\n  this.k = k;\n  this.x = x;\n  this.y = y;\n}\n\nTransform.prototype = {\n  constructor: Transform,\n  scale: function(k) {\n    return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n  },\n  translate: function(x, y) {\n    return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n  },\n  apply: function(point) {\n    return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n  },\n  applyX: function(x) {\n    return x * this.k + this.x;\n  },\n  applyY: function(y) {\n    return y * this.k + this.y;\n  },\n  invert: function(location) {\n    return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n  },\n  invertX: function(x) {\n    return (x - this.x) / this.k;\n  },\n  invertY: function(y) {\n    return (y - this.y) / this.k;\n  },\n  rescaleX: function(x) {\n    return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n  },\n  rescaleY: function(y) {\n    return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n  },\n  toString: function() {\n    return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n  }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n  return node.__zoom || identity;\n}\n","<script setup lang=\"ts\">\nimport { ref, reactive, onMounted, computed } from 'vue'\nimport * as d3 from 'd3'\n\ntype barType = {\n  label: string\n  value: number\n}\n\nconst props = defineProps({\n  /**\n   * 基準となる金額\n   * @example 2000\n   */\n  standardAmount: { type: Number, default: 0 },\n  /**\n   * 比較する金額\n   * @example 1000\n   */\n  comparisonAmount: { type: Number, default: 0 },\n  /**\n   * 基準となる金額のラベル\n   * @example '請求額'\n   */\n  standardLabel: { type: String, default: '請求額' },\n  /**\n   * 比較する金額のラベル\n   * @example '支払額'\n   */\n  comparisonLabel: { type: String, default: '支払額' },\n  /**\n   * 円グラフ内のラベル\n   * @example '支払率'\n   */\n  pieChartLabel: { type: String, default: '支払率' },\n  /**\n   * グラフのメインカラー\n   * @example '#00BBC9'\n   */\n  color: { type: String, default: '#00BBC9' },\n})\n\n/** 基準となる金額 */\nconst standardAmount = computed(() => props.standardAmount)\n/** 比較する金額 */\nconst comparisonAmount = computed(() => props.comparisonAmount)\n\n/** グラフを描写させるhtml要素 */\nconst chart = ref<HTMLElement | null>(null)\n/** 比較する金額 ÷ 基準となる金額のレート */\nconst paymentRate = ref(\n  standardAmount.value !== 0 ? (comparisonAmount.value / standardAmount.value) * 100 : 0\n)\n/** 円グラフに表示させるデータ */\nconst pieData = reactive([paymentRate.value, 100 - paymentRate.value])\n/** 円グラフのサイズ */\nconst pieSize = reactive({ width: 90, height: 90 })\n/** 円グラフのカラー */\nconst pieColor = d3\n  .scaleOrdinal([props.color, '#D5D5D5'])\n  .range(paymentRate.value > 100 ? ['#D20000', '#D5D5D5'] : [props.color, '#D5D5D5'])\n\n/** 棒グラフに表示させるデータ */\nconst barData = reactive([\n  {\n    label: `${props.standardLabel}　${standardAmount.value.toLocaleString()}円`,\n    value: standardAmount.value,\n  },\n  {\n    label: `${props.comparisonLabel}　${comparisonAmount.value.toLocaleString()}円`,\n    value: comparisonAmount.value,\n  },\n])\n/** 棒グラフのサイズ */\nconst barSize = reactive({ width: 150, height: 90 })\n/** 棒グラフのカラー */\nconst barColor = d3\n  .scaleOrdinal(['#D5D5D5', props.color])\n  .range(paymentRate.value > 100 ? ['#D5D5D5', '#D20000'] : ['#D5D5D5', props.color])\n\n/** グラフを描写する関数 */\nconst chartCreate = () => {\n  const svg = d3\n    .select(chart.value)\n    .append('svg')\n    .attr('width', pieSize.width + barSize.width)\n    .attr('height', Math.max(pieSize.height, barSize.height))\n    .append('g')\n    .attr('transform', 'translate(10, 0)')\n\n  const pieGroup = svg\n    .append('g')\n    .attr('transform', `translate(${pieSize.width / 2 - 10},${pieSize.height / 2})`)\n  const barGroup = svg.append('g').attr('transform', `translate(${pieSize.width}, 25)`)\n\n  const pie = d3.pie().sort(null)\n  const arc = d3\n    .arc()\n    .innerRadius(pieSize.width / 2 - 5)\n    .outerRadius(pieSize.width / 2)\n\n  pieGroup\n    .selectAll('path')\n    .data(pie(pieData))\n    .enter()\n    .append('path')\n    .attr('d', arc)\n    .attr('fill', (_: string[], i: number) => pieColor(i))\n\n  pieGroup\n    .append('text')\n    .text(props.pieChartLabel)\n    .attr('text-anchor', 'middle')\n    .attr('dy', '-1.5em')\n    .style('font-size', '12px')\n    .style('fill', '#707070')\n\n  pieGroup\n    .append('text')\n    .text(`${paymentRate.value.toFixed(0)}`)\n    .attr('text-anchor', 'middle')\n    .attr('dy', '0.4em')\n    .style('font-size', '30px')\n    .style('font-weight', 'bold')\n    .style('fill', pieColor(0))\n\n  pieGroup\n    .append('text')\n    .text('％')\n    .attr('dy', '1.9em')\n    .attr('dx', '0.5em')\n    .style('font-size', '14px')\n    .style('fill', '#707070')\n\n  const xScale = d3\n    .scaleLinear()\n    .domain([0, d3.max(barData, (d: barType) => d.value)])\n    .range([0, barSize.width - 10])\n\n  barGroup\n    .selectAll('rect')\n    .data(barData)\n    .enter()\n    .append('rect')\n    .attr('y', (_: barType, i: number) => i * 50)\n    .attr('width', (d: barType) => xScale(d.value))\n    .attr('height', '15px')\n    .attr('fill', (_: barType, i: number) => barColor(i))\n\n  barGroup\n    .selectAll('text')\n    .data(barData)\n    .enter()\n    .append('text')\n    .text((d: barType) => d.label)\n    .attr('y', (_: barType, i: number) => i * 50 + -10)\n    .attr('dy', '4px')\n    .style('font-size', '12px')\n    .style('fill', '#333333')\n}\n\nonMounted(() => {\n  chartCreate()\n})\n</script>\n\n<template>\n  <div style=\"width: fit-content\" ref=\"chart\"></div>\n</template>\n\n<style lang=\"sass\" scoped></style>\n","<script setup lang=\"ts\">\nimport { ref, computed } from 'vue'\n\nconst emit = defineEmits<{\n  (e: 'update:toastSwitch', value: boolean): void\n}>()\n\nconst props = defineProps({\n  /**\n   * トーストのオンオフはv-modelと連動\n   */\n  toastSwitch: { type: Boolean, default: false, required: true },\n  /**\n   * トースト内に表示させる文字列\n   */\n  toastText: { type: String, default: '登録完了' },\n  /**\n   * トーストを表示、非表示の時間\n   */\n  toastMovingTime: { type: Number, default: 4 }\n})\n\nconst isToastOnStatus = computed(() => {\n  if (toastMove.value === true) {\n    return setTimeout(() => {\n      ;(toastMove.value = false), props.toastMovingTime * 1000\n    })\n  } else {\n    return\n  }\n})\n\n//親コンポーネントからv-modelのBoolean値を元に表示、非表示を切り替える\nconst toastMove = computed({\n  get: () => props.toastSwitch,\n  set: value => {\n    emit('update:toastSwitch', value)\n  }\n})\n\n// トーストの表示時間をpropsの値から文字列の秒数に変換\nconst toastFadeTime = ref<string>()\ntoastFadeTime.value = `${String(props.toastMovingTime)}s`\n</script>\n\n<template>\n  <div>\n    <Teleport to=\"body\">\n      <div>\n        <Transition name=\"toast\">\n          <div class=\"_toast\" v-if=\"isToastOnStatus\">\n            <div class=\"_toast_text\">{{ toastText }}</div>\n          </div>\n        </Transition>\n      </div>\n    </Teleport>\n  </div>\n</template>\n\n<style lang=\"sass\" scoped>\n._toast\n  height: 109px\n  width: 238px\n  background-color: var(--c-primary)\n  position: fixed\n  right:0\n  bottom:0\n  z-index: 100\n  display: grid\n  place-items: center\n._toast_text\n  color: var(--c-text-color)\n  text-align: center\n\n.toast-enter\n  opacity: 0\n  transform: translateY(100px)\n\n.toast-enter-active\n  animation: movein v-bind(toastFadeTime)\n  animation-timing-function: ease-in\n\n\n.toast-leave-active\n  animation: movein v-bind(toastFadeTime) reverse\n  animation-timing-function: ease-in\n\n\n@keyframes movein\n  0%\n    opacity: 0\n    transform: translateY(100px)\n  50%\n    opacity: 1\n    transform: translateY(0px)\n  80%\n    opacity: 1\n    transform: translateY(0px)\n  100%\n    opacity: 0\n    transform: translateY(100px)\n</style>\n","/*!\n * Quasar Framework v2.17.5\n * (c) 2015-present Razvan Stoenescu\n * Released under the MIT License.\n */\n\n\n// src/flags.dev.js\nvar attachPoint = null;\nfunction getAttachPoint() {\n  if (attachPoint !== null) return attachPoint;\n  return attachPoint = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nif (typeof __QUASAR_SSR__ !== \"boolean\") {\n  getAttachPoint().__QUASAR_SSR__ = false;\n}\nif (typeof __QUASAR_SSR_CLIENT__ !== \"boolean\") {\n  getAttachPoint().__QUASAR_SSR_CLIENT__ = false;\n}\nif (typeof __QUASAR_SSR_PWA__ !== \"boolean\") {\n  getAttachPoint().__QUASAR_SSR_PWA__ = false;\n}\n\n// src/install-quasar.js\nimport { createApp } from \"vue\";\n\n// src/plugins/platform/Platform.js\nimport { ref, reactive } from \"vue\";\n\n// src/utils/private.inject-obj-prop/inject-obj-prop.js\nfunction injectProp(target2, propName, get2, set2) {\n  Object.defineProperty(target2, propName, {\n    get: get2,\n    set: set2,\n    enumerable: true\n  });\n  return target2;\n}\nfunction injectMultipleProps(target2, props4) {\n  for (const key in props4) {\n    injectProp(target2, key, props4[key]);\n  }\n  return target2;\n}\n\n// src/plugins/platform/Platform.js\nvar isRuntimeSsrPreHydration = false ? { value: true } : ref(\n  __QUASAR_SSR_CLIENT__ && (__QUASAR_SSR_PWA__ ? document.body.getAttribute(\"data-server-rendered\") !== null : true)\n);\nvar preHydrationBrowser;\nfunction getMatch(userAgent2, platformMatch) {\n  const match = /(edg|edge|edga|edgios)\\/([\\w.]+)/.exec(userAgent2) || /(opr)[\\/]([\\w.]+)/.exec(userAgent2) || /(vivaldi)[\\/]([\\w.]+)/.exec(userAgent2) || /(chrome|crios)[\\/]([\\w.]+)/.exec(userAgent2) || /(version)(applewebkit)[\\/]([\\w.]+).*(safari)[\\/]([\\w.]+)/.exec(userAgent2) || /(webkit)[\\/]([\\w.]+).*(version)[\\/]([\\w.]+).*(safari)[\\/]([\\w.]+)/.exec(userAgent2) || /(firefox|fxios)[\\/]([\\w.]+)/.exec(userAgent2) || /(webkit)[\\/]([\\w.]+)/.exec(userAgent2) || /(opera)(?:.*version|)[\\/]([\\w.]+)/.exec(userAgent2) || [];\n  return {\n    browser: match[5] || match[3] || match[1] || \"\",\n    version: match[4] || match[2] || \"0\",\n    platform: platformMatch[0] || \"\"\n  };\n}\nfunction getPlatformMatch(userAgent2) {\n  return /(ipad)/.exec(userAgent2) || /(ipod)/.exec(userAgent2) || /(windows phone)/.exec(userAgent2) || /(iphone)/.exec(userAgent2) || /(kindle)/.exec(userAgent2) || /(silk)/.exec(userAgent2) || /(android)/.exec(userAgent2) || /(win)/.exec(userAgent2) || /(mac)/.exec(userAgent2) || /(linux)/.exec(userAgent2) || /(cros)/.exec(userAgent2) || /(playbook)/.exec(userAgent2) || /(bb)/.exec(userAgent2) || /(blackberry)/.exec(userAgent2) || [];\n}\nvar hasTouch = false ? false : \"ontouchstart\" in window || window.navigator.maxTouchPoints > 0;\nfunction getPlatform(UA) {\n  const userAgent2 = UA.toLowerCase();\n  const platformMatch = getPlatformMatch(userAgent2);\n  const matched = getMatch(userAgent2, platformMatch);\n  const browser = {\n    mobile: false,\n    desktop: false,\n    cordova: false,\n    capacitor: false,\n    nativeMobile: false,\n    // nativeMobileWrapper: void 0,\n    electron: false,\n    bex: false,\n    linux: false,\n    mac: false,\n    win: false,\n    cros: false,\n    chrome: false,\n    firefox: false,\n    opera: false,\n    safari: false,\n    vivaldi: false,\n    edge: false,\n    edgeChromium: false,\n    ie: false,\n    webkit: false,\n    android: false,\n    ios: false,\n    ipad: false,\n    iphone: false,\n    ipod: false,\n    kindle: false,\n    winphone: false,\n    blackberry: false,\n    playbook: false,\n    silk: false\n  };\n  if (matched.browser) {\n    browser[matched.browser] = true;\n    browser.version = matched.version;\n    browser.versionNumber = parseInt(matched.version, 10);\n  }\n  if (matched.platform) {\n    browser[matched.platform] = true;\n  }\n  const knownMobiles = browser.android || browser.ios || browser.bb || browser.blackberry || browser.ipad || browser.iphone || browser.ipod || browser.kindle || browser.playbook || browser.silk || browser[\"windows phone\"];\n  if (knownMobiles === true || userAgent2.indexOf(\"mobile\") !== -1) {\n    browser.mobile = true;\n  } else {\n    browser.desktop = true;\n  }\n  if (browser[\"windows phone\"]) {\n    browser.winphone = true;\n    delete browser[\"windows phone\"];\n  }\n  if (browser.edga || browser.edgios || browser.edg) {\n    browser.edge = true;\n    matched.browser = \"edge\";\n  } else if (browser.crios) {\n    browser.chrome = true;\n    matched.browser = \"chrome\";\n  } else if (browser.fxios) {\n    browser.firefox = true;\n    matched.browser = \"firefox\";\n  }\n  if (browser.ipod || browser.ipad || browser.iphone) {\n    browser.ios = true;\n  }\n  if (browser.vivaldi) {\n    matched.browser = \"vivaldi\";\n    browser.vivaldi = true;\n  }\n  if (\n    // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers\n    browser.chrome || browser.opr || browser.safari || browser.vivaldi || browser.mobile === true && browser.ios !== true && knownMobiles !== true\n  ) {\n    browser.webkit = true;\n  }\n  if (browser.opr) {\n    matched.browser = \"opera\";\n    browser.opera = true;\n  }\n  if (browser.safari) {\n    if (browser.blackberry || browser.bb) {\n      matched.browser = \"blackberry\";\n      browser.blackberry = true;\n    } else if (browser.playbook) {\n      matched.browser = \"playbook\";\n      browser.playbook = true;\n    } else if (browser.android) {\n      matched.browser = \"android\";\n      browser.android = true;\n    } else if (browser.kindle) {\n      matched.browser = \"kindle\";\n      browser.kindle = true;\n    } else if (browser.silk) {\n      matched.browser = \"silk\";\n      browser.silk = true;\n    }\n  }\n  browser.name = matched.browser;\n  browser.platform = matched.platform;\n  if (true) {\n    if (userAgent2.indexOf(\"electron\") !== -1) {\n      browser.electron = true;\n    } else if (document.location.href.indexOf(\"-extension://\") !== -1) {\n      browser.bex = true;\n    } else {\n      if (window.Capacitor !== void 0) {\n        browser.capacitor = true;\n        browser.nativeMobile = true;\n        browser.nativeMobileWrapper = \"capacitor\";\n      } else if (window._cordovaNative !== void 0 || window.cordova !== void 0) {\n        browser.cordova = true;\n        browser.nativeMobile = true;\n        browser.nativeMobileWrapper = \"cordova\";\n      }\n      if (isRuntimeSsrPreHydration.value === true) {\n        preHydrationBrowser = { is: { ...browser } };\n      }\n      if (hasTouch === true && browser.mac === true && (browser.desktop === true && browser.safari === true || browser.nativeMobile === true && browser.android !== true && browser.ios !== true && browser.ipad !== true)) {\n        delete browser.mac;\n        delete browser.desktop;\n        const platform = Math.min(window.innerHeight, window.innerWidth) > 414 ? \"ipad\" : \"iphone\";\n        Object.assign(browser, {\n          mobile: true,\n          ios: true,\n          platform,\n          [platform]: true\n        });\n      }\n      if (browser.mobile !== true && window.navigator.userAgentData && window.navigator.userAgentData.mobile) {\n        delete browser.desktop;\n        browser.mobile = true;\n      }\n    }\n  }\n  return browser;\n}\nvar userAgent = false ? \"\" : navigator.userAgent || navigator.vendor || window.opera;\nvar ssrClient = {\n  has: {\n    touch: false,\n    webStorage: false\n  },\n  within: { iframe: false }\n};\nvar client = false ? ssrClient : {\n  userAgent,\n  is: getPlatform(userAgent),\n  has: {\n    touch: hasTouch\n  },\n  within: {\n    iframe: window.self !== window.top\n  }\n};\nvar Platform = {\n  install(opts) {\n    const { $q } = opts;\n    if (false) {\n      $q.platform = this.parseSSR(opts.ssrContext);\n    } else if (isRuntimeSsrPreHydration.value === true) {\n      opts.onSSRHydrated.push(() => {\n        Object.assign($q.platform, client);\n        isRuntimeSsrPreHydration.value = false;\n      });\n      $q.platform = reactive(this);\n    } else {\n      $q.platform = this;\n    }\n  }\n};\nif (false) {\n  Platform.parseSSR = (ssrContext) => {\n    const userAgent2 = ssrContext.req.headers[\"user-agent\"] || ssrContext.req.headers[\"User-Agent\"] || \"\";\n    return {\n      ...client,\n      userAgent: userAgent2,\n      is: getPlatform(userAgent2)\n    };\n  };\n} else {\n  let hasWebStorage;\n  injectProp(client.has, \"webStorage\", () => {\n    if (hasWebStorage !== void 0) {\n      return hasWebStorage;\n    }\n    try {\n      if (window.localStorage) {\n        hasWebStorage = true;\n        return true;\n      }\n    } catch (_) {\n    }\n    hasWebStorage = false;\n    return false;\n  });\n  Object.assign(Platform, client);\n  if (isRuntimeSsrPreHydration.value === true) {\n    Object.assign(Platform, preHydrationBrowser, ssrClient);\n    preHydrationBrowser = null;\n  }\n}\nvar Platform_default = Platform;\n\n// src/utils/private.create/create.js\nimport { defineComponent, markRaw, reactive as reactive2 } from \"vue\";\nfunction createComponent(raw) {\n  return markRaw(defineComponent(raw));\n}\nfunction createDirective(raw) {\n  return markRaw(raw);\n}\nvar createReactivePlugin = false ? (state, plugin) => {\n  Object.assign(plugin, state);\n  return plugin;\n} : (state, plugin) => {\n  const reactiveState = reactive2(state);\n  for (const name2 in state) {\n    injectProp(\n      plugin,\n      name2,\n      () => reactiveState[name2],\n      (val) => {\n        reactiveState[name2] = val;\n      }\n    );\n  }\n  return plugin;\n};\n\n// src/utils/event/event.js\nvar listenOpts = {\n  hasPassive: false,\n  passiveCapture: true,\n  notPassiveCapture: true\n};\ntry {\n  const opts = Object.defineProperty({}, \"passive\", {\n    get() {\n      Object.assign(listenOpts, {\n        hasPassive: true,\n        passive: { passive: true },\n        notPassive: { passive: false },\n        passiveCapture: { passive: true, capture: true },\n        notPassiveCapture: { passive: false, capture: true }\n      });\n    }\n  });\n  window.addEventListener(\"qtest\", null, opts);\n  window.removeEventListener(\"qtest\", null, opts);\n} catch (_) {\n}\nfunction noop() {\n}\nfunction leftClick(e) {\n  return e.button === 0;\n}\nfunction middleClick(e) {\n  return e.button === 1;\n}\nfunction rightClick(e) {\n  return e.button === 2;\n}\nfunction position(e) {\n  if (e.touches && e.touches[0]) {\n    e = e.touches[0];\n  } else if (e.changedTouches && e.changedTouches[0]) {\n    e = e.changedTouches[0];\n  } else if (e.targetTouches && e.targetTouches[0]) {\n    e = e.targetTouches[0];\n  }\n  return {\n    top: e.clientY,\n    left: e.clientX\n  };\n}\nfunction getEventPath(e) {\n  if (e.path) {\n    return e.path;\n  }\n  if (e.composedPath) {\n    return e.composedPath();\n  }\n  const path = [];\n  let el = e.target;\n  while (el) {\n    path.push(el);\n    if (el.tagName === \"HTML\") {\n      path.push(document);\n      path.push(window);\n      return path;\n    }\n    el = el.parentElement;\n  }\n}\nvar LINE_HEIGHT = 40;\nvar PAGE_HEIGHT = 800;\nfunction getMouseWheelDistance(e) {\n  let x = e.deltaX, y = e.deltaY;\n  if ((x || y) && e.deltaMode) {\n    const multiplier = e.deltaMode === 1 ? LINE_HEIGHT : PAGE_HEIGHT;\n    x *= multiplier;\n    y *= multiplier;\n  }\n  if (e.shiftKey && !x) {\n    [y, x] = [x, y];\n  }\n  return { x, y };\n}\nfunction stop(e) {\n  e.stopPropagation();\n}\nfunction prevent(e) {\n  e.cancelable !== false && e.preventDefault();\n}\nfunction stopAndPrevent(e) {\n  e.cancelable !== false && e.preventDefault();\n  e.stopPropagation();\n}\nfunction preventDraggable(el, status) {\n  if (el === void 0 || status === true && el.__dragPrevented === true) {\n    return;\n  }\n  const fn = status === true ? (el2) => {\n    el2.__dragPrevented = true;\n    el2.addEventListener(\"dragstart\", prevent, listenOpts.notPassiveCapture);\n  } : (el2) => {\n    delete el2.__dragPrevented;\n    el2.removeEventListener(\"dragstart\", prevent, listenOpts.notPassiveCapture);\n  };\n  el.querySelectorAll(\"a, img\").forEach(fn);\n}\nfunction addEvt(ctx, targetName, events) {\n  const name2 = `__q_${targetName}_evt`;\n  ctx[name2] = ctx[name2] !== void 0 ? ctx[name2].concat(events) : events;\n  events.forEach((evt) => {\n    evt[0].addEventListener(evt[1], ctx[evt[2]], listenOpts[evt[3]]);\n  });\n}\nfunction cleanEvt(ctx, targetName) {\n  const name2 = `__q_${targetName}_evt`;\n  if (ctx[name2] !== void 0) {\n    ctx[name2].forEach((evt) => {\n      evt[0].removeEventListener(evt[1], ctx[evt[2]], listenOpts[evt[3]]);\n    });\n    ctx[name2] = void 0;\n  }\n}\nvar event_default = {\n  listenOpts,\n  leftClick,\n  middleClick,\n  rightClick,\n  position,\n  getEventPath,\n  getMouseWheelDistance,\n  stop,\n  prevent,\n  stopAndPrevent,\n  preventDraggable\n};\n\n// src/utils/debounce/debounce.js\nfunction debounce_default(fn, wait = 250, immediate) {\n  let timer2 = null;\n  function debounced() {\n    const args = arguments;\n    const later = () => {\n      timer2 = null;\n      if (immediate !== true) {\n        fn.apply(this, args);\n      }\n    };\n    if (timer2 !== null) {\n      clearTimeout(timer2);\n    } else if (immediate === true) {\n      fn.apply(this, args);\n    }\n    timer2 = setTimeout(later, wait);\n  }\n  debounced.cancel = () => {\n    timer2 !== null && clearTimeout(timer2);\n  };\n  return debounced;\n}\n\n// src/plugins/screen/Screen.js\nvar SIZE_LIST = [\"sm\", \"md\", \"lg\", \"xl\"];\nvar { passive } = listenOpts;\nvar Screen_default = createReactivePlugin({\n  width: 0,\n  height: 0,\n  name: \"xs\",\n  sizes: {\n    sm: 600,\n    md: 1024,\n    lg: 1440,\n    xl: 1920\n  },\n  lt: {\n    sm: true,\n    md: true,\n    lg: true,\n    xl: true\n  },\n  gt: {\n    xs: false,\n    sm: false,\n    md: false,\n    lg: false\n  },\n  xs: true,\n  sm: false,\n  md: false,\n  lg: false,\n  xl: false\n}, {\n  setSizes: noop,\n  setDebounce: noop,\n  install({ $q, onSSRHydrated }) {\n    $q.screen = this;\n    if (false) return;\n    if (this.__installed === true) {\n      if ($q.config.screen !== void 0) {\n        if ($q.config.screen.bodyClasses === false) {\n          document.body.classList.remove(`screen--${this.name}`);\n        } else {\n          this.__update(true);\n        }\n      }\n      return;\n    }\n    const { visualViewport } = window;\n    const target2 = visualViewport || window;\n    const scrollingElement = document.scrollingElement || document.documentElement;\n    const getSize = visualViewport === void 0 || client.is.mobile === true ? () => [\n      Math.max(window.innerWidth, scrollingElement.clientWidth),\n      Math.max(window.innerHeight, scrollingElement.clientHeight)\n    ] : () => [\n      visualViewport.width * visualViewport.scale + window.innerWidth - scrollingElement.clientWidth,\n      visualViewport.height * visualViewport.scale + window.innerHeight - scrollingElement.clientHeight\n    ];\n    const classes = $q.config.screen !== void 0 && $q.config.screen.bodyClasses === true;\n    this.__update = (force) => {\n      const [w, h138] = getSize();\n      if (h138 !== this.height) {\n        this.height = h138;\n      }\n      if (w !== this.width) {\n        this.width = w;\n      } else if (force !== true) {\n        return;\n      }\n      let s = this.sizes;\n      this.gt.xs = w >= s.sm;\n      this.gt.sm = w >= s.md;\n      this.gt.md = w >= s.lg;\n      this.gt.lg = w >= s.xl;\n      this.lt.sm = w < s.sm;\n      this.lt.md = w < s.md;\n      this.lt.lg = w < s.lg;\n      this.lt.xl = w < s.xl;\n      this.xs = this.lt.sm;\n      this.sm = this.gt.xs === true && this.lt.md === true;\n      this.md = this.gt.sm === true && this.lt.lg === true;\n      this.lg = this.gt.md === true && this.lt.xl === true;\n      this.xl = this.gt.lg;\n      s = this.xs === true && \"xs\" || this.sm === true && \"sm\" || this.md === true && \"md\" || this.lg === true && \"lg\" || \"xl\";\n      if (s !== this.name) {\n        if (classes === true) {\n          document.body.classList.remove(`screen--${this.name}`);\n          document.body.classList.add(`screen--${s}`);\n        }\n        this.name = s;\n      }\n    };\n    let updateEvt, updateSizes = {}, updateDebounce = 16;\n    this.setSizes = (sizes) => {\n      SIZE_LIST.forEach((name2) => {\n        if (sizes[name2] !== void 0) {\n          updateSizes[name2] = sizes[name2];\n        }\n      });\n    };\n    this.setDebounce = (deb) => {\n      updateDebounce = deb;\n    };\n    const start = () => {\n      const style2 = getComputedStyle(document.body);\n      if (style2.getPropertyValue(\"--q-size-sm\")) {\n        SIZE_LIST.forEach((name2) => {\n          this.sizes[name2] = parseInt(style2.getPropertyValue(`--q-size-${name2}`), 10);\n        });\n      }\n      this.setSizes = (sizes) => {\n        SIZE_LIST.forEach((name2) => {\n          if (sizes[name2]) {\n            this.sizes[name2] = sizes[name2];\n          }\n        });\n        this.__update(true);\n      };\n      this.setDebounce = (delay) => {\n        updateEvt !== void 0 && target2.removeEventListener(\"resize\", updateEvt, passive);\n        updateEvt = delay > 0 ? debounce_default(this.__update, delay) : this.__update;\n        target2.addEventListener(\"resize\", updateEvt, passive);\n      };\n      this.setDebounce(updateDebounce);\n      if (Object.keys(updateSizes).length !== 0) {\n        this.setSizes(updateSizes);\n        updateSizes = void 0;\n      } else {\n        this.__update();\n      }\n      classes === true && this.name === \"xs\" && document.body.classList.add(\"screen--xs\");\n    };\n    if (isRuntimeSsrPreHydration.value === true) {\n      onSSRHydrated.push(start);\n    } else {\n      start();\n    }\n  }\n});\n\n// src/plugins/dark/Dark.js\nvar Plugin = createReactivePlugin({\n  isActive: false,\n  mode: false\n}, {\n  __media: void 0,\n  set(val) {\n    if (false) return;\n    Plugin.mode = val;\n    if (val === \"auto\") {\n      if (Plugin.__media === void 0) {\n        Plugin.__media = window.matchMedia(\"(prefers-color-scheme: dark)\");\n        Plugin.__updateMedia = () => {\n          Plugin.set(\"auto\");\n        };\n        Plugin.__media.addListener(Plugin.__updateMedia);\n      }\n      val = Plugin.__media.matches;\n    } else if (Plugin.__media !== void 0) {\n      Plugin.__media.removeListener(Plugin.__updateMedia);\n      Plugin.__media = void 0;\n    }\n    Plugin.isActive = val === true;\n    document.body.classList.remove(`body--${val === true ? \"light\" : \"dark\"}`);\n    document.body.classList.add(`body--${val === true ? \"dark\" : \"light\"}`);\n  },\n  toggle() {\n    if (true) {\n      Plugin.set(Plugin.isActive === false);\n    }\n  },\n  install({ $q, ssrContext }) {\n    const { dark } = $q.config;\n    if (false) {\n      this.isActive = dark === true;\n      $q.dark = {\n        isActive: false,\n        mode: false,\n        set: (val) => {\n          ssrContext._meta.bodyClasses = ssrContext._meta.bodyClasses.replace(\" body--light\", \"\").replace(\" body--dark\", \"\") + ` body--${val === true ? \"dark\" : \"light\"}`;\n          $q.dark.isActive = val === true;\n          $q.dark.mode = val;\n        },\n        toggle: () => {\n          $q.dark.set($q.dark.isActive === false);\n        }\n      };\n      $q.dark.set(dark);\n      return;\n    }\n    $q.dark = this;\n    if (this.__installed !== true) {\n      this.set(dark !== void 0 ? dark : false);\n    }\n  }\n});\nvar Dark_default = Plugin;\n\n// src/utils/css-var/set-css-var.js\nfunction setCssVar(propName, value2, element = document.body) {\n  if (typeof propName !== \"string\") {\n    throw new TypeError(\"Expected a string as propName\");\n  }\n  if (typeof value2 !== \"string\") {\n    throw new TypeError(\"Expected a string as value\");\n  }\n  if (!(element instanceof Element)) {\n    throw new TypeError(\"Expected a DOM element\");\n  }\n  element.style.setProperty(`--q-${propName}`, value2);\n}\n\n// src/utils/private.keyboard/key-composition.js\nvar lastKeyCompositionStatus = false;\nfunction onKeyDownComposition(evt) {\n  lastKeyCompositionStatus = evt.isComposing === true;\n}\nfunction shouldIgnoreKey(evt) {\n  return lastKeyCompositionStatus === true || evt !== Object(evt) || evt.isComposing === true || evt.qKeyEvent === true;\n}\nfunction isKeyCode(evt, keyCodes4) {\n  return shouldIgnoreKey(evt) === true ? false : [].concat(keyCodes4).includes(evt.keyCode);\n}\n\n// src/plugins/private.body/Body.js\nfunction getMobilePlatform(is) {\n  if (is.ios === true) return \"ios\";\n  if (is.android === true) return \"android\";\n}\nfunction getBodyClasses({ is, has: has2, within }, cfg) {\n  const cls = [\n    is.desktop === true ? \"desktop\" : \"mobile\",\n    `${has2.touch === false ? \"no-\" : \"\"}touch`\n  ];\n  if (is.mobile === true) {\n    const mobile = getMobilePlatform(is);\n    mobile !== void 0 && cls.push(\"platform-\" + mobile);\n  }\n  if (is.nativeMobile === true) {\n    const type = is.nativeMobileWrapper;\n    cls.push(type);\n    cls.push(\"native-mobile\");\n    if (is.ios === true && (cfg[type] === void 0 || cfg[type].iosStatusBarPadding !== false)) {\n      cls.push(\"q-ios-padding\");\n    }\n  } else if (is.electron === true) {\n    cls.push(\"electron\");\n  } else if (is.bex === true) {\n    cls.push(\"bex\");\n  }\n  within.iframe === true && cls.push(\"within-iframe\");\n  return cls;\n}\nfunction applyClientSsrCorrections() {\n  const { is } = client;\n  const classes = document.body.className;\n  const classList = new Set(classes.replace(/ {2}/g, \" \").split(\" \"));\n  if (is.nativeMobile !== true && is.electron !== true && is.bex !== true) {\n    if (is.desktop === true) {\n      classList.delete(\"mobile\");\n      classList.delete(\"platform-ios\");\n      classList.delete(\"platform-android\");\n      classList.add(\"desktop\");\n    } else if (is.mobile === true) {\n      classList.delete(\"desktop\");\n      classList.add(\"mobile\");\n      classList.delete(\"platform-ios\");\n      classList.delete(\"platform-android\");\n      const mobile = getMobilePlatform(is);\n      if (mobile !== void 0) {\n        classList.add(`platform-${mobile}`);\n      }\n    }\n  }\n  if (client.has.touch === true) {\n    classList.delete(\"no-touch\");\n    classList.add(\"touch\");\n  }\n  if (client.within.iframe === true) {\n    classList.add(\"within-iframe\");\n  }\n  const newCls = Array.from(classList).join(\" \");\n  if (classes !== newCls) {\n    document.body.className = newCls;\n  }\n}\nfunction setColors(brand) {\n  for (const color in brand) {\n    setCssVar(color, brand[color]);\n  }\n}\nvar Body_default = {\n  install(opts) {\n    if (false) {\n      const { $q, ssrContext } = opts;\n      const cls = getBodyClasses($q.platform, $q.config);\n      if ($q.config.screen !== void 0 && $q.config.screen.bodyClass === true) {\n        cls.push(\"screen--xs\");\n      }\n      ssrContext._meta.bodyClasses += cls.join(\" \");\n      const brand = $q.config.brand;\n      if (brand !== void 0) {\n        const vars = Object.keys(brand).map((key) => `--q-${key}:${brand[key]};`).join(\"\");\n        ssrContext._meta.endingHeadTags += `<style>:root{${vars}}</style>`;\n      }\n      return;\n    }\n    if (this.__installed === true) return;\n    if (isRuntimeSsrPreHydration.value === true) {\n      applyClientSsrCorrections();\n    } else {\n      const { $q } = opts;\n      $q.config.brand !== void 0 && setColors($q.config.brand);\n      const cls = getBodyClasses(client, $q.config);\n      document.body.classList.add.apply(document.body.classList, cls);\n    }\n    if (client.is.ios === true) {\n      document.body.addEventListener(\"touchstart\", noop);\n    }\n    window.addEventListener(\"keydown\", onKeyDownComposition, true);\n  }\n};\n\n// src/plugins/private.history/History.js\nvar getTrue = () => true;\nfunction filterInvalidPath(path) {\n  return typeof path === \"string\" && path !== \"\" && path !== \"/\" && path !== \"#/\";\n}\nfunction normalizeExitPath(path) {\n  path.startsWith(\"#\") === true && (path = path.substring(1));\n  path.startsWith(\"/\") === false && (path = \"/\" + path);\n  path.endsWith(\"/\") === true && (path = path.substring(0, path.length - 1));\n  return \"#\" + path;\n}\nfunction getShouldExitFn(cfg) {\n  if (cfg.backButtonExit === false) {\n    return () => false;\n  }\n  if (cfg.backButtonExit === \"*\") {\n    return getTrue;\n  }\n  const exitPaths = [\"#/\"];\n  Array.isArray(cfg.backButtonExit) === true && exitPaths.push(\n    ...cfg.backButtonExit.filter(filterInvalidPath).map(normalizeExitPath)\n  );\n  return () => exitPaths.includes(window.location.hash);\n}\nvar History_default = {\n  __history: [],\n  add: noop,\n  remove: noop,\n  install({ $q }) {\n    if (this.__installed === true) return;\n    const { cordova: cordova2, capacitor } = client.is;\n    if (cordova2 !== true && capacitor !== true) return;\n    const qConf = $q.config[cordova2 === true ? \"cordova\" : \"capacitor\"];\n    if (qConf !== void 0 && qConf.backButton === false) return;\n    if (\n      // if we're on Capacitor mode\n      capacitor === true && (window.Capacitor === void 0 || window.Capacitor.Plugins.App === void 0)\n    ) return;\n    this.add = (entry) => {\n      if (entry.condition === void 0) {\n        entry.condition = getTrue;\n      }\n      this.__history.push(entry);\n    };\n    this.remove = (entry) => {\n      const index = this.__history.indexOf(entry);\n      if (index >= 0) {\n        this.__history.splice(index, 1);\n      }\n    };\n    const shouldExit = getShouldExitFn(\n      Object.assign(\n        { backButtonExit: true },\n        qConf\n      )\n    );\n    const backHandler = () => {\n      if (this.__history.length) {\n        const entry = this.__history[this.__history.length - 1];\n        if (entry.condition() === true) {\n          this.__history.pop();\n          entry.handler();\n        }\n      } else if (shouldExit() === true) {\n        navigator.app.exitApp();\n      } else {\n        window.history.back();\n      }\n    };\n    if (cordova2 === true) {\n      document.addEventListener(\"deviceready\", () => {\n        document.addEventListener(\"backbutton\", backHandler, false);\n      });\n    } else {\n      window.Capacitor.Plugins.App.addListener(\"backButton\", backHandler);\n    }\n  }\n};\n\n// lang/en-US.js\nvar en_US_default = {\n  isoName: \"en-US\",\n  nativeName: \"English (US)\",\n  label: {\n    clear: \"Clear\",\n    ok: \"OK\",\n    cancel: \"Cancel\",\n    close: \"Close\",\n    set: \"Set\",\n    select: \"Select\",\n    reset: \"Reset\",\n    remove: \"Remove\",\n    update: \"Update\",\n    create: \"Create\",\n    search: \"Search\",\n    filter: \"Filter\",\n    refresh: \"Refresh\",\n    expand: (label) => label ? `Expand \"${label}\"` : \"Expand\",\n    collapse: (label) => label ? `Collapse \"${label}\"` : \"Collapse\"\n  },\n  date: {\n    days: \"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),\n    daysShort: \"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\"),\n    months: \"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),\n    monthsShort: \"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\"),\n    firstDayOfWeek: 0,\n    // 0-6, 0 - Sunday, 1 Monday, ...\n    format24h: false,\n    pluralDay: \"days\"\n  },\n  table: {\n    noData: \"No data available\",\n    noResults: \"No matching records found\",\n    loading: \"Loading...\",\n    selectedRecords: (rows) => rows === 1 ? \"1 record selected.\" : (rows === 0 ? \"No\" : rows) + \" records selected.\",\n    recordsPerPage: \"Records per page:\",\n    allRows: \"All\",\n    pagination: (start, end, total) => start + \"-\" + end + \" of \" + total,\n    columns: \"Columns\"\n  },\n  editor: {\n    url: \"URL\",\n    bold: \"Bold\",\n    italic: \"Italic\",\n    strikethrough: \"Strikethrough\",\n    underline: \"Underline\",\n    unorderedList: \"Unordered List\",\n    orderedList: \"Ordered List\",\n    subscript: \"Subscript\",\n    superscript: \"Superscript\",\n    hyperlink: \"Hyperlink\",\n    toggleFullscreen: \"Toggle Fullscreen\",\n    quote: \"Quote\",\n    left: \"Left align\",\n    center: \"Center align\",\n    right: \"Right align\",\n    justify: \"Justify align\",\n    print: \"Print\",\n    outdent: \"Decrease indentation\",\n    indent: \"Increase indentation\",\n    removeFormat: \"Remove formatting\",\n    formatting: \"Formatting\",\n    fontSize: \"Font Size\",\n    align: \"Align\",\n    hr: \"Insert Horizontal Rule\",\n    undo: \"Undo\",\n    redo: \"Redo\",\n    heading1: \"Heading 1\",\n    heading2: \"Heading 2\",\n    heading3: \"Heading 3\",\n    heading4: \"Heading 4\",\n    heading5: \"Heading 5\",\n    heading6: \"Heading 6\",\n    paragraph: \"Paragraph\",\n    code: \"Code\",\n    size1: \"Very small\",\n    size2: \"A bit small\",\n    size3: \"Normal\",\n    size4: \"Medium-large\",\n    size5: \"Big\",\n    size6: \"Very big\",\n    size7: \"Maximum\",\n    defaultFont: \"Default Font\",\n    viewSource: \"View Source\"\n  },\n  tree: {\n    noNodes: \"No nodes available\",\n    noResults: \"No matching nodes found\"\n  }\n};\n\n// src/plugins/lang/Lang.js\nfunction getLocale() {\n  if (false) return;\n  const val = Array.isArray(navigator.languages) === true && navigator.languages.length !== 0 ? navigator.languages[0] : navigator.language;\n  if (typeof val === \"string\") {\n    return val.split(/[-_]/).map((v, i) => i === 0 ? v.toLowerCase() : i > 1 || v.length < 4 ? v.toUpperCase() : v[0].toUpperCase() + v.slice(1).toLowerCase()).join(\"-\");\n  }\n}\nvar Plugin2 = createReactivePlugin({\n  __qLang: {}\n}, {\n  // props: object\n  // __langConfig: object\n  getLocale,\n  set(langObject = en_US_default, ssrContext) {\n    const lang = {\n      ...langObject,\n      rtl: langObject.rtl === true,\n      getLocale\n    };\n    if (false) {\n      if (ssrContext === void 0) {\n        console.error(\"SSR ERROR: second param required: Lang.set(lang, ssrContext)\");\n        return;\n      }\n      lang.set = ssrContext.$q.lang.set;\n      if (ssrContext.$q.config.lang === void 0 || ssrContext.$q.config.lang.noHtmlAttrs !== true) {\n        const dir = lang.rtl === true ? \"rtl\" : \"ltr\";\n        const attrs = `lang=${lang.isoName} dir=${dir}`;\n        ssrContext._meta.htmlAttrs = ssrContext.__qPrevLang !== void 0 ? ssrContext._meta.htmlAttrs.replace(ssrContext.__qPrevLang, attrs) : attrs;\n        ssrContext.__qPrevLang = attrs;\n      }\n      ssrContext.$q.lang = lang;\n    } else {\n      lang.set = Plugin2.set;\n      if (Plugin2.__langConfig === void 0 || Plugin2.__langConfig.noHtmlAttrs !== true) {\n        const el = document.documentElement;\n        el.setAttribute(\"dir\", lang.rtl === true ? \"rtl\" : \"ltr\");\n        el.setAttribute(\"lang\", lang.isoName);\n      }\n      Object.assign(Plugin2.__qLang, lang);\n    }\n  },\n  install({ $q, lang, ssrContext }) {\n    if (false) {\n      const initialLang = lang || en_US_default;\n      $q.lang = {};\n      $q.lang.set = (langObject) => {\n        this.set(langObject, ssrContext);\n      };\n      $q.lang.set(initialLang);\n      if (this.props === void 0 || this.props.isoName !== initialLang.isoName) {\n        this.props = { ...initialLang };\n      }\n    } else {\n      $q.lang = Plugin2.__qLang;\n      Plugin2.__langConfig = $q.config.lang;\n      if (this.__installed === true) {\n        lang !== void 0 && this.set(lang);\n      } else {\n        this.props = new Proxy(this.__qLang, {\n          get() {\n            return Reflect.get(...arguments);\n          },\n          ownKeys(target2) {\n            return Reflect.ownKeys(target2).filter((key) => key !== \"set\" && key !== \"getLocale\");\n          }\n        });\n        this.set(lang || en_US_default);\n      }\n    }\n  }\n});\nvar Lang_default = Plugin2;\n\n// icon-set/material-icons.js\nvar material_icons_default = {\n  name: \"material-icons\",\n  type: {\n    positive: \"check_circle\",\n    negative: \"warning\",\n    info: \"info\",\n    warning: \"priority_high\"\n  },\n  arrow: {\n    up: \"arrow_upward\",\n    right: \"arrow_forward\",\n    down: \"arrow_downward\",\n    left: \"arrow_back\",\n    dropdown: \"arrow_drop_down\"\n  },\n  chevron: {\n    left: \"chevron_left\",\n    right: \"chevron_right\"\n  },\n  colorPicker: {\n    spectrum: \"gradient\",\n    tune: \"tune\",\n    palette: \"style\"\n  },\n  pullToRefresh: {\n    icon: \"refresh\"\n  },\n  carousel: {\n    left: \"chevron_left\",\n    right: \"chevron_right\",\n    up: \"keyboard_arrow_up\",\n    down: \"keyboard_arrow_down\",\n    navigationIcon: \"lens\"\n  },\n  chip: {\n    remove: \"cancel\",\n    selected: \"check\"\n  },\n  datetime: {\n    arrowLeft: \"chevron_left\",\n    arrowRight: \"chevron_right\",\n    now: \"access_time\",\n    today: \"today\"\n  },\n  editor: {\n    bold: \"format_bold\",\n    italic: \"format_italic\",\n    strikethrough: \"strikethrough_s\",\n    underline: \"format_underlined\",\n    unorderedList: \"format_list_bulleted\",\n    orderedList: \"format_list_numbered\",\n    subscript: \"vertical_align_bottom\",\n    superscript: \"vertical_align_top\",\n    hyperlink: \"link\",\n    toggleFullscreen: \"fullscreen\",\n    quote: \"format_quote\",\n    left: \"format_align_left\",\n    center: \"format_align_center\",\n    right: \"format_align_right\",\n    justify: \"format_align_justify\",\n    print: \"print\",\n    outdent: \"format_indent_decrease\",\n    indent: \"format_indent_increase\",\n    removeFormat: \"format_clear\",\n    formatting: \"text_format\",\n    fontSize: \"format_size\",\n    align: \"format_align_left\",\n    hr: \"remove\",\n    undo: \"undo\",\n    redo: \"redo\",\n    heading: \"format_size\",\n    code: \"code\",\n    size: \"format_size\",\n    font: \"font_download\",\n    viewSource: \"code\"\n  },\n  expansionItem: {\n    icon: \"keyboard_arrow_down\",\n    denseIcon: \"arrow_drop_down\"\n  },\n  fab: {\n    icon: \"add\",\n    activeIcon: \"close\"\n  },\n  field: {\n    clear: \"cancel\",\n    error: \"error\"\n  },\n  pagination: {\n    first: \"first_page\",\n    prev: \"keyboard_arrow_left\",\n    next: \"keyboard_arrow_right\",\n    last: \"last_page\"\n  },\n  rating: {\n    icon: \"grade\"\n  },\n  stepper: {\n    done: \"check\",\n    active: \"edit\",\n    error: \"warning\"\n  },\n  tabs: {\n    left: \"chevron_left\",\n    right: \"chevron_right\",\n    up: \"keyboard_arrow_up\",\n    down: \"keyboard_arrow_down\"\n  },\n  table: {\n    arrowUp: \"arrow_upward\",\n    warning: \"warning\",\n    firstPage: \"first_page\",\n    prevPage: \"chevron_left\",\n    nextPage: \"chevron_right\",\n    lastPage: \"last_page\"\n  },\n  tree: {\n    icon: \"play_arrow\"\n  },\n  uploader: {\n    done: \"done\",\n    clear: \"clear\",\n    add: \"add_box\",\n    upload: \"cloud_upload\",\n    removeQueue: \"clear_all\",\n    removeUploaded: \"done_all\"\n  }\n};\n\n// src/plugins/icon-set/IconSet.js\nvar Plugin3 = createReactivePlugin({\n  iconMapFn: null,\n  __qIconSet: {}\n}, {\n  // props: object\n  set(setObject, ssrContext) {\n    const def = { ...setObject };\n    if (false) {\n      if (ssrContext === void 0) {\n        console.error(\"SSR ERROR: second param required: IconSet.set(iconSet, ssrContext)\");\n        return;\n      }\n      def.set = ssrContext.$q.iconSet.set;\n      Object.assign(ssrContext.$q.iconSet, def);\n    } else {\n      def.set = Plugin3.set;\n      Object.assign(Plugin3.__qIconSet, def);\n    }\n  },\n  install({ $q, iconSet, ssrContext }) {\n    if (false) {\n      const initialSet = iconSet || material_icons_default;\n      $q.iconMapFn = ssrContext.$q.config.iconMapFn || this.iconMapFn || null;\n      $q.iconSet = {};\n      $q.iconSet.set = (setObject) => {\n        this.set(setObject, ssrContext);\n      };\n      $q.iconSet.set(initialSet);\n      if (this.props === void 0 || this.props.name !== initialSet.name) {\n        this.props = { ...initialSet };\n      }\n    } else {\n      if ($q.config.iconMapFn !== void 0) {\n        this.iconMapFn = $q.config.iconMapFn;\n      }\n      $q.iconSet = this.__qIconSet;\n      injectProp($q, \"iconMapFn\", () => this.iconMapFn, (val) => {\n        this.iconMapFn = val;\n      });\n      if (this.__installed === true) {\n        iconSet !== void 0 && this.set(iconSet);\n      } else {\n        this.props = new Proxy(this.__qIconSet, {\n          get() {\n            return Reflect.get(...arguments);\n          },\n          ownKeys(target2) {\n            return Reflect.ownKeys(target2).filter((key) => key !== \"set\");\n          }\n        });\n        this.set(iconSet || material_icons_default);\n      }\n    }\n  }\n});\nvar IconSet_default = Plugin3;\n\n// src/utils/private.symbols/symbols.js\nvar quasarKey = \"_q_\";\nvar timelineKey = \"_q_t_\";\nvar stepperKey = \"_q_s_\";\nvar layoutKey = \"_q_l_\";\nvar pageContainerKey = \"_q_pc_\";\nvar fabKey = \"_q_f_\";\nvar formKey = \"_q_fo_\";\nvar tabsKey = \"_q_tabs_\";\nvar uploaderKey = \"_q_u_\";\nfunction emptyRenderFn() {\n}\n\n// src/utils/private.config/instance-config.js\nvar globalConfig = {};\nvar globalConfigIsFrozen = false;\nfunction freezeGlobalConfig() {\n  globalConfigIsFrozen = true;\n}\n\n// src/utils/is/is.js\nfunction isDeepEqual(a, b) {\n  if (a === b) {\n    return true;\n  }\n  if (a !== null && b !== null && typeof a === \"object\" && typeof b === \"object\") {\n    if (a.constructor !== b.constructor) {\n      return false;\n    }\n    let length, i;\n    if (a.constructor === Array) {\n      length = a.length;\n      if (length !== b.length) {\n        return false;\n      }\n      for (i = length; i-- !== 0; ) {\n        if (isDeepEqual(a[i], b[i]) !== true) {\n          return false;\n        }\n      }\n      return true;\n    }\n    if (a.constructor === Map) {\n      if (a.size !== b.size) {\n        return false;\n      }\n      let iter = a.entries();\n      i = iter.next();\n      while (i.done !== true) {\n        if (b.has(i.value[0]) !== true) {\n          return false;\n        }\n        i = iter.next();\n      }\n      iter = a.entries();\n      i = iter.next();\n      while (i.done !== true) {\n        if (isDeepEqual(i.value[1], b.get(i.value[0])) !== true) {\n          return false;\n        }\n        i = iter.next();\n      }\n      return true;\n    }\n    if (a.constructor === Set) {\n      if (a.size !== b.size) {\n        return false;\n      }\n      const iter = a.entries();\n      i = iter.next();\n      while (i.done !== true) {\n        if (b.has(i.value[0]) !== true) {\n          return false;\n        }\n        i = iter.next();\n      }\n      return true;\n    }\n    if (a.buffer != null && a.buffer.constructor === ArrayBuffer) {\n      length = a.length;\n      if (length !== b.length) {\n        return false;\n      }\n      for (i = length; i-- !== 0; ) {\n        if (a[i] !== b[i]) {\n          return false;\n        }\n      }\n      return true;\n    }\n    if (a.constructor === RegExp) {\n      return a.source === b.source && a.flags === b.flags;\n    }\n    if (a.valueOf !== Object.prototype.valueOf) {\n      return a.valueOf() === b.valueOf();\n    }\n    if (a.toString !== Object.prototype.toString) {\n      return a.toString() === b.toString();\n    }\n    const keys = Object.keys(a).filter((key) => a[key] !== void 0);\n    length = keys.length;\n    if (length !== Object.keys(b).filter((key) => b[key] !== void 0).length) {\n      return false;\n    }\n    for (i = length; i-- !== 0; ) {\n      const key = keys[i];\n      if (isDeepEqual(a[key], b[key]) !== true) {\n        return false;\n      }\n    }\n    return true;\n  }\n  return a !== a && b !== b;\n}\nfunction isObject(v) {\n  return v !== null && typeof v === \"object\" && Array.isArray(v) !== true;\n}\nfunction isDate(v) {\n  return Object.prototype.toString.call(v) === \"[object Date]\";\n}\nfunction isRegexp(v) {\n  return Object.prototype.toString.call(v) === \"[object RegExp]\";\n}\nfunction isNumber(v) {\n  return typeof v === \"number\" && isFinite(v);\n}\nvar is_default = {\n  deepEqual: isDeepEqual,\n  object: isObject,\n  date: isDate,\n  regexp: isRegexp,\n  number: isNumber\n};\n\n// src/install-quasar.js\nvar autoInstalledPlugins = [\n  Platform_default,\n  Body_default,\n  Dark_default,\n  Screen_default,\n  History_default,\n  Lang_default,\n  IconSet_default\n];\nfunction createChildApp(appCfg, parentApp) {\n  const app2 = createApp(appCfg);\n  app2.config.globalProperties = parentApp.config.globalProperties;\n  const { reload, ...appContext } = parentApp._context;\n  Object.assign(app2._context, appContext);\n  return app2;\n}\nfunction installPlugins(pluginOpts, pluginList) {\n  pluginList.forEach((Plugin11) => {\n    Plugin11.install(pluginOpts);\n    Plugin11.__installed = true;\n  });\n}\nfunction prepareApp(app2, uiOpts, pluginOpts) {\n  app2.config.globalProperties.$q = pluginOpts.$q;\n  app2.provide(quasarKey, pluginOpts.$q);\n  installPlugins(pluginOpts, autoInstalledPlugins);\n  uiOpts.components !== void 0 && Object.values(uiOpts.components).forEach((c) => {\n    if (isObject(c) === true && c.name !== void 0) {\n      app2.component(c.name, c);\n    }\n  });\n  uiOpts.directives !== void 0 && Object.values(uiOpts.directives).forEach((d) => {\n    if (isObject(d) === true && d.name !== void 0) {\n      app2.directive(d.name, d);\n    }\n  });\n  uiOpts.plugins !== void 0 && installPlugins(\n    pluginOpts,\n    Object.values(uiOpts.plugins).filter(\n      (p) => typeof p.install === \"function\" && autoInstalledPlugins.includes(p) === false\n    )\n  );\n  if (isRuntimeSsrPreHydration.value === true) {\n    pluginOpts.$q.onSSRHydrated = () => {\n      pluginOpts.onSSRHydrated.forEach((fn) => {\n        fn();\n      });\n      pluginOpts.$q.onSSRHydrated = () => {\n      };\n    };\n  }\n}\nvar install_quasar_default = false ? function(parentApp, opts = {}, ssrContext) {\n  const $q = {\n    version: \"2.17.5\",\n    config: opts.config || {}\n  };\n  Object.assign(ssrContext, {\n    $q,\n    _meta: {\n      htmlAttrs: \"\",\n      headTags: \"\",\n      endingHeadTags: \"\",\n      bodyClasses: \"\",\n      bodyAttrs: \"data-server-rendered\",\n      bodyTags: \"\"\n    }\n  });\n  if (ssrContext._modules === void 0) {\n    ssrContext._modules = [];\n  }\n  if (ssrContext.onRendered === void 0) {\n    ssrContext.onRendered = () => {\n    };\n  }\n  parentApp.config.globalProperties.ssrContext = ssrContext;\n  prepareApp(parentApp, opts, {\n    parentApp,\n    $q,\n    lang: opts.lang,\n    iconSet: opts.iconSet,\n    ssrContext\n  });\n} : function(parentApp, opts = {}) {\n  const $q = { version: \"2.17.5\" };\n  if (globalConfigIsFrozen === false) {\n    if (opts.config !== void 0) {\n      Object.assign(globalConfig, opts.config);\n    }\n    $q.config = { ...globalConfig };\n    freezeGlobalConfig();\n  } else {\n    $q.config = opts.config || {};\n  }\n  prepareApp(parentApp, opts, {\n    parentApp,\n    $q,\n    lang: opts.lang,\n    iconSet: opts.iconSet,\n    onSSRHydrated: []\n  });\n};\n\n// src/components/ajax-bar/QAjaxBar.js\nimport { h, ref as ref2, computed, onMounted, onBeforeUnmount, getCurrentInstance } from \"vue\";\n\n// src/utils/format/format.js\nvar units = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"];\nfunction humanStorageSize(bytes, decimals = 1) {\n  let u = 0;\n  while (parseInt(bytes, 10) >= 1024 && u < units.length - 1) {\n    bytes /= 1024;\n    ++u;\n  }\n  return `${bytes.toFixed(decimals)}${units[u]}`;\n}\nfunction capitalize(str) {\n  return str.charAt(0).toUpperCase() + str.slice(1);\n}\nfunction between(v, min, max) {\n  return max <= min ? min : Math.min(max, Math.max(min, v));\n}\nfunction normalizeToInterval(v, min, max) {\n  if (max <= min) {\n    return min;\n  }\n  const size2 = max - min + 1;\n  let index = min + (v - min) % size2;\n  if (index < min) {\n    index = size2 + index;\n  }\n  return index === 0 ? 0 : index;\n}\nfunction pad(v, length = 2, char = \"0\") {\n  if (v === void 0 || v === null) {\n    return v;\n  }\n  const val = \"\" + v;\n  return val.length >= length ? val : new Array(length - val.length + 1).join(char) + val;\n}\nvar format_default = {\n  humanStorageSize,\n  capitalize,\n  between,\n  normalizeToInterval,\n  pad\n};\n\n// src/components/ajax-bar/QAjaxBar.js\nvar xhr = false ? null : XMLHttpRequest;\nvar open = false ? null : xhr.prototype.open;\nvar positionValues = [\"top\", \"right\", \"bottom\", \"left\"];\nvar stack = [];\nvar highjackCount = 0;\nfunction translate({ p, pos, active, horiz, reverse, dir }) {\n  let x = 1, y = 1;\n  if (horiz === true) {\n    if (reverse === true) {\n      x = -1;\n    }\n    if (pos === \"bottom\") {\n      y = -1;\n    }\n    return { transform: `translate3d(${x * (p - 100)}%,${active ? 0 : y * -200}%,0)` };\n  }\n  if (reverse === true) {\n    y = -1;\n  }\n  if (pos === \"right\") {\n    x = -1;\n  }\n  return { transform: `translate3d(${active ? 0 : dir * x * -200}%,${y * (p - 100)}%,0)` };\n}\nfunction inc(p, amount) {\n  if (typeof amount !== \"number\") {\n    if (p < 25) {\n      amount = Math.random() * 3 + 3;\n    } else if (p < 65) {\n      amount = Math.random() * 3;\n    } else if (p < 85) {\n      amount = Math.random() * 2;\n    } else if (p < 99) {\n      amount = 0.6;\n    } else {\n      amount = 0;\n    }\n  }\n  return between(p + amount, 0, 100);\n}\nfunction highjackAjax(stackEntry) {\n  highjackCount++;\n  stack.push(stackEntry);\n  if (highjackCount > 1) return;\n  xhr.prototype.open = function(_, url) {\n    const stopStack = [];\n    const loadStart = () => {\n      stack.forEach((entry) => {\n        if (entry.hijackFilter.value === null || entry.hijackFilter.value(url) === true) {\n          entry.start();\n          stopStack.push(entry.stop);\n        }\n      });\n    };\n    const loadEnd = () => {\n      stopStack.forEach((stop2) => {\n        stop2();\n      });\n    };\n    this.addEventListener(\"loadstart\", loadStart, { once: true });\n    this.addEventListener(\"loadend\", loadEnd, { once: true });\n    open.apply(this, arguments);\n  };\n}\nfunction restoreAjax(start) {\n  stack = stack.filter((entry) => entry.start !== start);\n  highjackCount = Math.max(0, highjackCount - 1);\n  if (highjackCount === 0) {\n    xhr.prototype.open = open;\n  }\n}\nvar QAjaxBar_default = createComponent({\n  name: \"QAjaxBar\",\n  props: {\n    position: {\n      type: String,\n      default: \"top\",\n      validator: (val) => positionValues.includes(val)\n    },\n    size: {\n      type: String,\n      default: \"2px\"\n    },\n    color: String,\n    skipHijack: Boolean,\n    reverse: Boolean,\n    hijackFilter: Function\n  },\n  emits: [\"start\", \"stop\"],\n  setup(props4, { emit }) {\n    const { proxy } = getCurrentInstance();\n    const progress = ref2(0);\n    const onScreen = ref2(false);\n    const animate = ref2(true);\n    let sessions = 0, timer2 = null, speed;\n    const classes = computed(\n      () => `q-loading-bar q-loading-bar--${props4.position}` + (props4.color !== void 0 ? ` bg-${props4.color}` : \"\") + (animate.value === true ? \"\" : \" no-transition\")\n    );\n    const horizontal = computed(() => props4.position === \"top\" || props4.position === \"bottom\");\n    const sizeProp = computed(() => horizontal.value === true ? \"height\" : \"width\");\n    const style2 = computed(() => {\n      const active = onScreen.value;\n      const obj = translate({\n        p: progress.value,\n        pos: props4.position,\n        active,\n        horiz: horizontal.value,\n        reverse: proxy.$q.lang.rtl === true && [\"top\", \"bottom\"].includes(props4.position) ? props4.reverse === false : props4.reverse,\n        dir: proxy.$q.lang.rtl === true ? -1 : 1\n      });\n      obj[sizeProp.value] = props4.size;\n      obj.opacity = active ? 1 : 0;\n      return obj;\n    });\n    const attributes = computed(() => onScreen.value === true ? {\n      role: \"progressbar\",\n      \"aria-valuemin\": 0,\n      \"aria-valuemax\": 100,\n      \"aria-valuenow\": progress.value\n    } : { \"aria-hidden\": \"true\" });\n    function start(newSpeed = 300) {\n      const oldSpeed = speed;\n      speed = Math.max(0, newSpeed) || 0;\n      sessions++;\n      if (sessions > 1) {\n        if (oldSpeed === 0 && newSpeed > 0) {\n          planNextStep();\n        } else if (timer2 !== null && oldSpeed > 0 && newSpeed <= 0) {\n          clearTimeout(timer2);\n          timer2 = null;\n        }\n        return sessions;\n      }\n      timer2 !== null && clearTimeout(timer2);\n      emit(\"start\");\n      progress.value = 0;\n      timer2 = setTimeout(() => {\n        timer2 = null;\n        animate.value = true;\n        newSpeed > 0 && planNextStep();\n      }, onScreen._value === true ? 500 : 1);\n      if (onScreen._value !== true) {\n        onScreen.value = true;\n        animate.value = false;\n      }\n      return sessions;\n    }\n    function increment(amount) {\n      if (sessions > 0) {\n        progress.value = inc(progress.value, amount);\n      }\n      return sessions;\n    }\n    function stop2() {\n      sessions = Math.max(0, sessions - 1);\n      if (sessions > 0) {\n        return sessions;\n      }\n      if (timer2 !== null) {\n        clearTimeout(timer2);\n        timer2 = null;\n      }\n      emit(\"stop\");\n      const end = () => {\n        animate.value = true;\n        progress.value = 100;\n        timer2 = setTimeout(() => {\n          timer2 = null;\n          onScreen.value = false;\n        }, 1e3);\n      };\n      if (progress.value === 0) {\n        timer2 = setTimeout(end, 1);\n      } else {\n        end();\n      }\n      return sessions;\n    }\n    function planNextStep() {\n      if (progress.value < 100) {\n        timer2 = setTimeout(() => {\n          timer2 = null;\n          increment();\n          planNextStep();\n        }, speed);\n      }\n    }\n    let hijacked;\n    onMounted(() => {\n      if (props4.skipHijack !== true) {\n        hijacked = true;\n        highjackAjax({\n          start,\n          stop: stop2,\n          hijackFilter: computed(() => props4.hijackFilter || null)\n        });\n      }\n    });\n    onBeforeUnmount(() => {\n      timer2 !== null && clearTimeout(timer2);\n      hijacked === true && restoreAjax(start);\n    });\n    Object.assign(proxy, { start, stop: stop2, increment });\n    return () => h(\"div\", {\n      class: classes.value,\n      style: style2.value,\n      ...attributes.value\n    });\n  }\n});\n\n// src/components/avatar/QAvatar.js\nimport { h as h4, computed as computed4 } from \"vue\";\n\n// src/components/icon/QIcon.js\nimport { h as h3, computed as computed3, getCurrentInstance as getCurrentInstance2 } from \"vue\";\n\n// src/composables/private.use-size/use-size.js\nimport { computed as computed2 } from \"vue\";\nvar useSizeDefaults = {\n  xs: 18,\n  sm: 24,\n  md: 32,\n  lg: 38,\n  xl: 46\n};\nvar useSizeProps = {\n  size: String\n};\nfunction use_size_default(props4, sizes = useSizeDefaults) {\n  return computed2(() => props4.size !== void 0 ? { fontSize: props4.size in sizes ? `${sizes[props4.size]}px` : props4.size } : null);\n}\n\n// src/utils/private.render/render.js\nimport { h as h2, withDirectives } from \"vue\";\nfunction hSlot(slot, otherwise) {\n  return slot !== void 0 ? slot() || otherwise : otherwise;\n}\nfunction hUniqueSlot(slot, otherwise) {\n  if (slot !== void 0) {\n    const vnode = slot();\n    if (vnode !== void 0 && vnode !== null) {\n      return vnode.slice();\n    }\n  }\n  return otherwise;\n}\nfunction hMergeSlot(slot, source) {\n  return slot !== void 0 ? source.concat(slot()) : source;\n}\nfunction hMergeSlotSafely(slot, source) {\n  if (slot === void 0) {\n    return source;\n  }\n  return source !== void 0 ? source.concat(slot()) : slot();\n}\nfunction hDir(tag, data, children, key, condition, getDirsFn) {\n  data.key = key + condition;\n  const vnode = h2(tag, data, children);\n  return condition === true ? withDirectives(vnode, getDirsFn()) : vnode;\n}\n\n// src/components/icon/QIcon.js\nvar defaultViewBox = \"0 0 24 24\";\nvar sameFn = (i) => i;\nvar ionFn = (i) => `ionicons ${i}`;\nvar libMap = {\n  \"mdi-\": (i) => `mdi ${i}`,\n  \"icon-\": sameFn,\n  // fontawesome equiv\n  \"bt-\": (i) => `bt ${i}`,\n  \"eva-\": (i) => `eva ${i}`,\n  \"ion-md\": ionFn,\n  \"ion-ios\": ionFn,\n  \"ion-logo\": ionFn,\n  \"iconfont \": sameFn,\n  \"ti-\": (i) => `themify-icon ${i}`,\n  \"bi-\": (i) => `bootstrap-icons ${i}`\n};\nvar matMap = {\n  o_: \"-outlined\",\n  r_: \"-round\",\n  s_: \"-sharp\"\n};\nvar symMap = {\n  sym_o_: \"-outlined\",\n  sym_r_: \"-rounded\",\n  sym_s_: \"-sharp\"\n};\nvar libRE = new RegExp(\"^(\" + Object.keys(libMap).join(\"|\") + \")\");\nvar matRE = new RegExp(\"^(\" + Object.keys(matMap).join(\"|\") + \")\");\nvar symRE = new RegExp(\"^(\" + Object.keys(symMap).join(\"|\") + \")\");\nvar mRE = /^[Mm]\\s?[-+]?\\.?\\d/;\nvar imgRE = /^img:/;\nvar svgUseRE = /^svguse:/;\nvar ionRE = /^ion-/;\nvar faRE = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /;\nvar QIcon_default = createComponent({\n  name: \"QIcon\",\n  props: {\n    ...useSizeProps,\n    tag: {\n      type: String,\n      default: \"i\"\n    },\n    name: String,\n    color: String,\n    left: Boolean,\n    right: Boolean\n  },\n  setup(props4, { slots }) {\n    const { proxy: { $q } } = getCurrentInstance2();\n    const sizeStyle = use_size_default(props4);\n    const classes = computed3(\n      () => \"q-icon\" + (props4.left === true ? \" on-left\" : \"\") + (props4.right === true ? \" on-right\" : \"\") + (props4.color !== void 0 ? ` text-${props4.color}` : \"\")\n    );\n    const type = computed3(() => {\n      let cls;\n      let icon = props4.name;\n      if (icon === \"none\" || !icon) {\n        return { none: true };\n      }\n      if ($q.iconMapFn !== null) {\n        const res = $q.iconMapFn(icon);\n        if (res !== void 0) {\n          if (res.icon !== void 0) {\n            icon = res.icon;\n            if (icon === \"none\" || !icon) {\n              return { none: true };\n            }\n          } else {\n            return {\n              cls: res.cls,\n              content: res.content !== void 0 ? res.content : \" \"\n            };\n          }\n        }\n      }\n      if (mRE.test(icon) === true) {\n        const [def, viewBox = defaultViewBox] = icon.split(\"|\");\n        return {\n          svg: true,\n          viewBox,\n          nodes: def.split(\"&&\").map((path) => {\n            const [d, style2, transform] = path.split(\"@@\");\n            return h3(\"path\", { style: style2, d, transform });\n          })\n        };\n      }\n      if (imgRE.test(icon) === true) {\n        return {\n          img: true,\n          src: icon.substring(4)\n        };\n      }\n      if (svgUseRE.test(icon) === true) {\n        const [def, viewBox = defaultViewBox] = icon.split(\"|\");\n        return {\n          svguse: true,\n          src: def.substring(7),\n          viewBox\n        };\n      }\n      let content = \" \";\n      const matches = icon.match(libRE);\n      if (matches !== null) {\n        cls = libMap[matches[1]](icon);\n      } else if (faRE.test(icon) === true) {\n        cls = icon;\n      } else if (ionRE.test(icon) === true) {\n        cls = `ionicons ion-${$q.platform.is.ios === true ? \"ios\" : \"md\"}${icon.substring(3)}`;\n      } else if (symRE.test(icon) === true) {\n        cls = \"notranslate material-symbols\";\n        const matches2 = icon.match(symRE);\n        if (matches2 !== null) {\n          icon = icon.substring(6);\n          cls += symMap[matches2[1]];\n        }\n        content = icon;\n      } else {\n        cls = \"notranslate material-icons\";\n        const matches2 = icon.match(matRE);\n        if (matches2 !== null) {\n          icon = icon.substring(2);\n          cls += matMap[matches2[1]];\n        }\n        content = icon;\n      }\n      return {\n        cls,\n        content\n      };\n    });\n    return () => {\n      const data = {\n        class: classes.value,\n        style: sizeStyle.value,\n        \"aria-hidden\": \"true\",\n        role: \"presentation\"\n      };\n      if (type.value.none === true) {\n        return h3(props4.tag, data, hSlot(slots.default));\n      }\n      if (type.value.img === true) {\n        return h3(props4.tag, data, hMergeSlot(slots.default, [\n          h3(\"img\", { src: type.value.src })\n        ]));\n      }\n      if (type.value.svg === true) {\n        return h3(props4.tag, data, hMergeSlot(slots.default, [\n          h3(\"svg\", {\n            viewBox: type.value.viewBox || \"0 0 24 24\"\n          }, type.value.nodes)\n        ]));\n      }\n      if (type.value.svguse === true) {\n        return h3(props4.tag, data, hMergeSlot(slots.default, [\n          h3(\"svg\", {\n            viewBox: type.value.viewBox\n          }, [\n            h3(\"use\", { \"xlink:href\": type.value.src })\n          ])\n        ]));\n      }\n      if (type.value.cls !== void 0) {\n        data.class += \" \" + type.value.cls;\n      }\n      return h3(props4.tag, data, hMergeSlot(slots.default, [\n        type.value.content\n      ]));\n    };\n  }\n});\n\n// src/components/avatar/QAvatar.js\nvar QAvatar_default = createComponent({\n  name: \"QAvatar\",\n  props: {\n    ...useSizeProps,\n    fontSize: String,\n    color: String,\n    textColor: String,\n    icon: String,\n    square: Boolean,\n    rounded: Boolean\n  },\n  setup(props4, { slots }) {\n    const sizeStyle = use_size_default(props4);\n    const classes = computed4(\n      () => \"q-avatar\" + (props4.color ? ` bg-${props4.color}` : \"\") + (props4.textColor ? ` text-${props4.textColor} q-chip--colored` : \"\") + (props4.square === true ? \" q-avatar--square\" : props4.rounded === true ? \" rounded-borders\" : \"\")\n    );\n    const contentStyle = computed4(() => props4.fontSize ? { fontSize: props4.fontSize } : null);\n    return () => {\n      const icon = props4.icon !== void 0 ? [h4(QIcon_default, { name: props4.icon })] : void 0;\n      return h4(\"div\", {\n        class: classes.value,\n        style: sizeStyle.value\n      }, [\n        h4(\"div\", {\n          class: \"q-avatar__content row flex-center overflow-hidden\",\n          style: contentStyle.value\n        }, hMergeSlotSafely(slots.default, icon))\n      ]);\n    };\n  }\n});\n\n// src/components/badge/QBadge.js\nimport { h as h5, computed as computed5 } from \"vue\";\nvar alignValues = [\"top\", \"middle\", \"bottom\"];\nvar QBadge_default = createComponent({\n  name: \"QBadge\",\n  props: {\n    color: String,\n    textColor: String,\n    floating: Boolean,\n    transparent: Boolean,\n    multiLine: Boolean,\n    outline: Boolean,\n    rounded: Boolean,\n    label: [Number, String],\n    align: {\n      type: String,\n      validator: (v) => alignValues.includes(v)\n    }\n  },\n  setup(props4, { slots }) {\n    const style2 = computed5(() => {\n      return props4.align !== void 0 ? { verticalAlign: props4.align } : null;\n    });\n    const classes = computed5(() => {\n      const text = props4.outline === true ? props4.color || props4.textColor : props4.textColor;\n      return `q-badge flex inline items-center no-wrap q-badge--${props4.multiLine === true ? \"multi\" : \"single\"}-line` + (props4.outline === true ? \" q-badge--outline\" : props4.color !== void 0 ? ` bg-${props4.color}` : \"\") + (text !== void 0 ? ` text-${text}` : \"\") + (props4.floating === true ? \" q-badge--floating\" : \"\") + (props4.rounded === true ? \" q-badge--rounded\" : \"\") + (props4.transparent === true ? \" q-badge--transparent\" : \"\");\n    });\n    return () => h5(\"div\", {\n      class: classes.value,\n      style: style2.value,\n      role: \"status\",\n      \"aria-label\": props4.label\n    }, hMergeSlot(slots.default, props4.label !== void 0 ? [props4.label] : []));\n  }\n});\n\n// src/components/banner/QBanner.js\nimport { h as h6, computed as computed7, getCurrentInstance as getCurrentInstance3 } from \"vue\";\n\n// src/composables/private.use-dark/use-dark.js\nimport { computed as computed6 } from \"vue\";\nvar useDarkProps = {\n  dark: {\n    type: Boolean,\n    default: null\n  }\n};\nfunction use_dark_default(props4, $q) {\n  return computed6(() => props4.dark === null ? $q.dark.isActive : props4.dark);\n}\n\n// src/components/banner/QBanner.js\nvar QBanner_default = createComponent({\n  name: \"QBanner\",\n  props: {\n    ...useDarkProps,\n    inlineActions: Boolean,\n    dense: Boolean,\n    rounded: Boolean\n  },\n  setup(props4, { slots }) {\n    const { proxy: { $q } } = getCurrentInstance3();\n    const isDark = use_dark_default(props4, $q);\n    const classes = computed7(\n      () => \"q-banner row items-center\" + (props4.dense === true ? \" q-banner--dense\" : \"\") + (isDark.value === true ? \" q-banner--dark q-dark\" : \"\") + (props4.rounded === true ? \" rounded-borders\" : \"\")\n    );\n    const actionClass = computed7(\n      () => `q-banner__actions row items-center justify-end col-${props4.inlineActions === true ? \"auto\" : \"all\"}`\n    );\n    return () => {\n      const child = [\n        h6(\"div\", {\n          class: \"q-banner__avatar col-auto row items-center self-start\"\n        }, hSlot(slots.avatar)),\n        h6(\"div\", {\n          class: \"q-banner__content col text-body2\"\n        }, hSlot(slots.default))\n      ];\n      const actions = hSlot(slots.action);\n      actions !== void 0 && child.push(\n        h6(\"div\", { class: actionClass.value }, actions)\n      );\n      return h6(\"div\", {\n        class: classes.value + (props4.inlineActions === false && actions !== void 0 ? \" q-banner--top-padding\" : \"\"),\n        role: \"alert\"\n      }, child);\n    };\n  }\n});\n\n// src/components/bar/QBar.js\nimport { h as h7, computed as computed8, getCurrentInstance as getCurrentInstance4 } from \"vue\";\nvar QBar_default = createComponent({\n  name: \"QBar\",\n  props: {\n    ...useDarkProps,\n    dense: Boolean\n  },\n  setup(props4, { slots }) {\n    const { proxy: { $q } } = getCurrentInstance4();\n    const isDark = use_dark_default(props4, $q);\n    const classes = computed8(\n      () => `q-bar row no-wrap items-center q-bar--${props4.dense === true ? \"dense\" : \"standard\"}  q-bar--${isDark.value === true ? \"dark\" : \"light\"}`\n    );\n    return () => h7(\"div\", {\n      class: classes.value,\n      role: \"toolbar\"\n    }, hSlot(slots.default));\n  }\n});\n\n// src/components/breadcrumbs/QBreadcrumbs.js\nimport { h as h8, computed as computed10 } from \"vue\";\n\n// src/composables/private.use-align/use-align.js\nimport { computed as computed9 } from \"vue\";\nvar alignMap = {\n  left: \"start\",\n  center: \"center\",\n  right: \"end\",\n  between: \"between\",\n  around: \"around\",\n  evenly: \"evenly\",\n  stretch: \"stretch\"\n};\nvar alignValues2 = Object.keys(alignMap);\nvar useAlignProps = {\n  align: {\n    type: String,\n    validator: (v) => alignValues2.includes(v)\n  }\n};\nfunction use_align_default(props4) {\n  return computed9(() => {\n    const align = props4.align === void 0 ? props4.vertical === true ? \"stretch\" : \"left\" : props4.align;\n    return `${props4.vertical === true ? \"items\" : \"justify\"}-${alignMap[align]}`;\n  });\n}\n\n// src/utils/private.vm/vm.js\nfunction getParentProxy(proxy) {\n  if (Object(proxy.$parent) === proxy.$parent) {\n    return proxy.$parent;\n  }\n  let { parent } = proxy.$;\n  while (Object(parent) === parent) {\n    if (Object(parent.proxy) === parent.proxy) {\n      return parent.proxy;\n    }\n    parent = parent.parent;\n  }\n}\nfunction fillNormalizedVNodes(children, vnode) {\n  if (typeof vnode.type === \"symbol\") {\n    if (Array.isArray(vnode.children) === true) {\n      vnode.children.forEach((child) => {\n        fillNormalizedVNodes(children, child);\n      });\n    }\n  } else {\n    children.add(vnode);\n  }\n}\nfunction getNormalizedVNodes(vnodes) {\n  const children = /* @__PURE__ */ new Set();\n  vnodes.forEach((vnode) => {\n    fillNormalizedVNodes(children, vnode);\n  });\n  return Array.from(children);\n}\nfunction vmHasRouter(vm2) {\n  return vm2.appContext.config.globalProperties.$router !== void 0;\n}\nfunction vmIsDestroyed(vm2) {\n  return vm2.isUnmounted === true || vm2.isDeactivated === true;\n}\n\n// src/components/breadcrumbs/QBreadcrumbs.js\nvar disabledValues = [\"\", true];\nvar QBreadcrumbs_default = createComponent({\n  name: \"QBreadcrumbs\",\n  props: {\n    ...useAlignProps,\n    separator: {\n      type: String,\n      default: \"/\"\n    },\n    separatorColor: String,\n    activeColor: {\n      type: String,\n      default: \"primary\"\n    },\n    gutter: {\n      type: String,\n      validator: (v) => [\"none\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"].includes(v),\n      default: \"sm\"\n    }\n  },\n  setup(props4, { slots }) {\n    const alignClass = use_align_default(props4);\n    const classes = computed10(\n      () => `flex items-center ${alignClass.value}${props4.gutter === \"none\" ? \"\" : ` q-gutter-${props4.gutter}`}`\n    );\n    const sepClass = computed10(() => props4.separatorColor ? ` text-${props4.separatorColor}` : \"\");\n    const activeClass = computed10(() => ` text-${props4.activeColor}`);\n    return () => {\n      if (slots.default === void 0) return;\n      const vnodes = getNormalizedVNodes(\n        hSlot(slots.default)\n      );\n      if (vnodes.length === 0) return;\n      let els = 1;\n      const child = [], len = vnodes.filter((c) => c.type !== void 0 && c.type.name === \"QBreadcrumbsEl\").length, separator = slots.separator !== void 0 ? slots.separator : () => props4.separator;\n      vnodes.forEach((comp) => {\n        if (comp.type !== void 0 && comp.type.name === \"QBreadcrumbsEl\") {\n          const middle = els < len;\n          const disabled = comp.props !== null && disabledValues.includes(comp.props.disable);\n          const cls = (middle === true ? \"\" : \" q-breadcrumbs--last\") + (disabled !== true && middle === true ? activeClass.value : \"\");\n          els++;\n          child.push(\n            h8(\"div\", {\n              class: `flex items-center${cls}`\n            }, [comp])\n          );\n          if (middle === true) {\n            child.push(\n              h8(\"div\", {\n                class: \"q-breadcrumbs__separator\" + sepClass.value\n              }, separator())\n            );\n          }\n        } else {\n          child.push(comp);\n        }\n      });\n      return h8(\"div\", {\n        class: \"q-breadcrumbs\"\n      }, [\n        h8(\"div\", { class: classes.value }, child)\n      ]);\n    };\n  }\n});\n\n// src/components/breadcrumbs/QBreadcrumbsEl.js\nimport { h as h9, computed as computed12 } from \"vue\";\n\n// src/composables/private.use-router-link/use-router-link.js\nimport { computed as computed11, getCurrentInstance as getCurrentInstance5 } from \"vue\";\nfunction getOriginalPath(record) {\n  return record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\nfunction isSameRouteRecord(a, b) {\n  return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction includesParams(outer, inner) {\n  for (const key in inner) {\n    const innerValue = inner[key], outerValue = outer[key];\n    if (typeof innerValue === \"string\") {\n      if (innerValue !== outerValue) {\n        return false;\n      }\n    } else if (Array.isArray(outerValue) === false || outerValue.length !== innerValue.length || innerValue.some((value2, i) => value2 !== outerValue[i])) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction isEquivalentArray(a, b) {\n  return Array.isArray(b) === true ? a.length === b.length && a.every((value2, i) => value2 === b[i]) : a.length === 1 && a[0] === b;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n  return Array.isArray(a) === true ? isEquivalentArray(a, b) : Array.isArray(b) === true ? isEquivalentArray(b, a) : a === b;\n}\nfunction isSameRouteLocationParams(a, b) {\n  if (Object.keys(a).length !== Object.keys(b).length) {\n    return false;\n  }\n  for (const key in a) {\n    if (isSameRouteLocationParamsValue(a[key], b[key]) === false) {\n      return false;\n    }\n  }\n  return true;\n}\nvar useRouterLinkNonMatchingProps = {\n  // router-link\n  to: [String, Object],\n  replace: Boolean,\n  // regular <a> link\n  href: String,\n  target: String,\n  // state\n  disable: Boolean\n};\nvar useRouterLinkProps = {\n  ...useRouterLinkNonMatchingProps,\n  // router-link\n  exact: Boolean,\n  activeClass: {\n    type: String,\n    default: \"q-router-link--active\"\n  },\n  exactActiveClass: {\n    type: String,\n    default: \"q-router-link--exact-active\"\n  }\n};\nfunction use_router_link_default({ fallbackTag, useDisableForRouterLinkProps = true } = {}) {\n  const vm2 = getCurrentInstance5();\n  const { props: props4, proxy, emit } = vm2;\n  const hasRouter = vmHasRouter(vm2);\n  const hasHrefLink = computed11(() => props4.disable !== true && props4.href !== void 0);\n  const hasRouterLinkProps = useDisableForRouterLinkProps === true ? computed11(\n    () => hasRouter === true && props4.disable !== true && hasHrefLink.value !== true && props4.to !== void 0 && props4.to !== null && props4.to !== \"\"\n  ) : computed11(\n    () => hasRouter === true && hasHrefLink.value !== true && props4.to !== void 0 && props4.to !== null && props4.to !== \"\"\n  );\n  const resolvedLink = computed11(() => hasRouterLinkProps.value === true ? getLink(props4.to) : null);\n  const hasRouterLink = computed11(() => resolvedLink.value !== null);\n  const hasLink = computed11(() => hasHrefLink.value === true || hasRouterLink.value === true);\n  const linkTag = computed11(() => props4.type === \"a\" || hasLink.value === true ? \"a\" : props4.tag || fallbackTag || \"div\");\n  const linkAttrs = computed11(() => hasHrefLink.value === true ? {\n    href: props4.href,\n    target: props4.target\n  } : hasRouterLink.value === true ? {\n    href: resolvedLink.value.href,\n    target: props4.target\n  } : {});\n  const linkActiveIndex = computed11(() => {\n    if (hasRouterLink.value === false) {\n      return -1;\n    }\n    const { matched } = resolvedLink.value, { length } = matched, routeMatched = matched[length - 1];\n    if (routeMatched === void 0) {\n      return -1;\n    }\n    const currentMatched = proxy.$route.matched;\n    if (currentMatched.length === 0) {\n      return -1;\n    }\n    const index = currentMatched.findIndex(\n      isSameRouteRecord.bind(null, routeMatched)\n    );\n    if (index !== -1) {\n      return index;\n    }\n    const parentRecordPath = getOriginalPath(matched[length - 2]);\n    return (\n      // we are dealing with nested routes\n      length > 1 && getOriginalPath(routeMatched) === parentRecordPath && currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(\n        isSameRouteRecord.bind(null, matched[length - 2])\n      ) : index\n    );\n  });\n  const linkIsActive = computed11(\n    () => hasRouterLink.value === true && linkActiveIndex.value !== -1 && includesParams(proxy.$route.params, resolvedLink.value.params)\n  );\n  const linkIsExactActive = computed11(\n    () => linkIsActive.value === true && linkActiveIndex.value === proxy.$route.matched.length - 1 && isSameRouteLocationParams(proxy.$route.params, resolvedLink.value.params)\n  );\n  const linkClass = computed11(() => hasRouterLink.value === true ? linkIsExactActive.value === true ? ` ${props4.exactActiveClass} ${props4.activeClass}` : props4.exact === true ? \"\" : linkIsActive.value === true ? ` ${props4.activeClass}` : \"\" : \"\");\n  function getLink(to) {\n    try {\n      return proxy.$router.resolve(to);\n    } catch (_) {\n    }\n    return null;\n  }\n  function navigateToRouterLink(e, { returnRouterError, to = props4.to, replace = props4.replace } = {}) {\n    if (props4.disable === true) {\n      e.preventDefault();\n      return Promise.resolve(false);\n    }\n    if (\n      // don't redirect with control keys;\n      // should match RouterLink from Vue Router\n      e.metaKey || e.altKey || e.ctrlKey || e.shiftKey || e.button !== void 0 && e.button !== 0 || props4.target === \"_blank\"\n    ) {\n      return Promise.resolve(false);\n    }\n    e.preventDefault();\n    const promise = proxy.$router[replace === true ? \"replace\" : \"push\"](to);\n    return returnRouterError === true ? promise : promise.then(() => {\n    }).catch(() => {\n    });\n  }\n  function navigateOnClick(e) {\n    if (hasRouterLink.value === true) {\n      const go = (opts) => navigateToRouterLink(e, opts);\n      emit(\"click\", e, go);\n      e.defaultPrevented !== true && go();\n    } else {\n      emit(\"click\", e);\n    }\n  }\n  return {\n    hasRouterLink,\n    hasHrefLink,\n    hasLink,\n    linkTag,\n    resolvedLink,\n    linkIsActive,\n    linkIsExactActive,\n    linkClass,\n    linkAttrs,\n    getLink,\n    navigateToRouterLink,\n    navigateOnClick\n  };\n}\n\n// src/components/breadcrumbs/QBreadcrumbsEl.js\nvar QBreadcrumbsEl_default = createComponent({\n  name: \"QBreadcrumbsEl\",\n  props: {\n    ...useRouterLinkProps,\n    label: String,\n    icon: String,\n    tag: {\n      type: String,\n      default: \"span\"\n    }\n  },\n  emits: [\"click\"],\n  setup(props4, { slots }) {\n    const { linkTag, linkAttrs, linkClass, navigateOnClick } = use_router_link_default();\n    const data = computed12(() => {\n      return {\n        class: \"q-breadcrumbs__el q-link flex inline items-center relative-position \" + (props4.disable !== true ? \"q-link--focusable\" + linkClass.value : \"q-breadcrumbs__el--disable\"),\n        ...linkAttrs.value,\n        onClick: navigateOnClick\n      };\n    });\n    const iconClass = computed12(\n      () => \"q-breadcrumbs__el-icon\" + (props4.label !== void 0 ? \" q-breadcrumbs__el-icon--with-label\" : \"\")\n    );\n    return () => {\n      const child = [];\n      props4.icon !== void 0 && child.push(\n        h9(QIcon_default, {\n          class: iconClass.value,\n          name: props4.icon\n        })\n      );\n      props4.label !== void 0 && child.push(props4.label);\n      return h9(\n        linkTag.value,\n        { ...data.value },\n        hMergeSlot(slots.default, child)\n      );\n    };\n  }\n});\n\n// src/components/btn/QBtn.js\nimport { h as h11, ref as ref3, computed as computed15, Transition, onBeforeUnmount as onBeforeUnmount2, withDirectives as withDirectives2, getCurrentInstance as getCurrentInstance6 } from \"vue\";\n\n// src/components/spinner/QSpinner.js\nimport { h as h10 } from \"vue\";\n\n// src/components/spinner/use-spinner.js\nimport { computed as computed13 } from \"vue\";\nvar useSpinnerProps = {\n  size: {\n    type: [String, Number],\n    default: \"1em\"\n  },\n  color: String\n};\nfunction useSpinner(props4) {\n  return {\n    cSize: computed13(() => props4.size in useSizeDefaults ? `${useSizeDefaults[props4.size]}px` : props4.size),\n    classes: computed13(\n      () => \"q-spinner\" + (props4.color ? ` text-${props4.color}` : \"\")\n    )\n  };\n}\n\n// src/components/spinner/QSpinner.js\nvar QSpinner_default = createComponent({\n  name: \"QSpinner\",\n  props: {\n    ...useSpinnerProps,\n    thickness: {\n      type: Number,\n      default: 5\n    }\n  },\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h10(\"svg\", {\n      class: classes.value + \" q-spinner-mat\",\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"25 25 50 50\"\n    }, [\n      h10(\"circle\", {\n        class: \"path\",\n        cx: \"50\",\n        cy: \"50\",\n        r: \"20\",\n        fill: \"none\",\n        stroke: \"currentColor\",\n        \"stroke-width\": props4.thickness,\n        \"stroke-miterlimit\": \"10\"\n      })\n    ]);\n  }\n});\n\n// src/utils/dom/dom.js\nimport { unref } from \"vue\";\nfunction offset(el) {\n  if (el === window) {\n    return { top: 0, left: 0 };\n  }\n  const { top, left } = el.getBoundingClientRect();\n  return { top, left };\n}\nfunction style(el, property) {\n  return window.getComputedStyle(el).getPropertyValue(property);\n}\nfunction height(el) {\n  return el === window ? window.innerHeight : el.getBoundingClientRect().height;\n}\nfunction width(el) {\n  return el === window ? window.innerWidth : el.getBoundingClientRect().width;\n}\nfunction css(element, css2) {\n  const style2 = element.style;\n  for (const prop in css2) {\n    style2[prop] = css2[prop];\n  }\n}\nfunction cssBatch(elements, style2) {\n  elements.forEach((el) => css(el, style2));\n}\nfunction ready(fn) {\n  if (typeof fn !== \"function\") return;\n  if (document.readyState !== \"loading\") {\n    return fn();\n  }\n  document.addEventListener(\"DOMContentLoaded\", fn, false);\n}\nfunction getElement(el) {\n  if (el === void 0 || el === null) {\n    return void 0;\n  }\n  if (typeof el === \"string\") {\n    try {\n      return document.querySelector(el) || void 0;\n    } catch (err) {\n      return void 0;\n    }\n  }\n  const target2 = unref(el);\n  if (target2) {\n    return target2.$el || target2;\n  }\n}\nfunction childHasFocus(el, focusedEl) {\n  if (el === void 0 || el === null || el.contains(focusedEl) === true) {\n    return true;\n  }\n  for (let next = el.nextElementSibling; next !== null; next = next.nextElementSibling) {\n    if (next.contains(focusedEl)) {\n      return true;\n    }\n  }\n  return false;\n}\nvar dom_default = {\n  offset,\n  style,\n  height,\n  width,\n  css,\n  cssBatch,\n  ready\n};\n\n// src/utils/throttle/throttle.js\nfunction throttle_default(fn, limit = 250) {\n  let wait = false, result;\n  return function() {\n    if (wait === false) {\n      wait = true;\n      setTimeout(() => {\n        wait = false;\n      }, limit);\n      result = fn.apply(this, arguments);\n    }\n    return result;\n  };\n}\n\n// src/directives/ripple/Ripple.js\nfunction showRipple(evt, el, ctx, forceCenter) {\n  ctx.modifiers.stop === true && stop(evt);\n  const color = ctx.modifiers.color;\n  let center = ctx.modifiers.center;\n  center = center === true || forceCenter === true;\n  const node = document.createElement(\"span\"), innerNode = document.createElement(\"span\"), pos = position(evt), { left, top, width: width3, height: height2 } = el.getBoundingClientRect(), diameter2 = Math.sqrt(width3 * width3 + height2 * height2), radius2 = diameter2 / 2, centerX = `${(width3 - diameter2) / 2}px`, x = center ? centerX : `${pos.left - left - radius2}px`, centerY = `${(height2 - diameter2) / 2}px`, y = center ? centerY : `${pos.top - top - radius2}px`;\n  innerNode.className = \"q-ripple__inner\";\n  css(innerNode, {\n    height: `${diameter2}px`,\n    width: `${diameter2}px`,\n    transform: `translate3d(${x},${y},0) scale3d(.2,.2,1)`,\n    opacity: 0\n  });\n  node.className = `q-ripple${color ? \" text-\" + color : \"\"}`;\n  node.setAttribute(\"dir\", \"ltr\");\n  node.appendChild(innerNode);\n  el.appendChild(node);\n  const abort = () => {\n    node.remove();\n    clearTimeout(timer2);\n  };\n  ctx.abort.push(abort);\n  let timer2 = setTimeout(() => {\n    innerNode.classList.add(\"q-ripple__inner--enter\");\n    innerNode.style.transform = `translate3d(${centerX},${centerY},0) scale3d(1,1,1)`;\n    innerNode.style.opacity = 0.2;\n    timer2 = setTimeout(() => {\n      innerNode.classList.remove(\"q-ripple__inner--enter\");\n      innerNode.classList.add(\"q-ripple__inner--leave\");\n      innerNode.style.opacity = 0;\n      timer2 = setTimeout(() => {\n        node.remove();\n        ctx.abort.splice(ctx.abort.indexOf(abort), 1);\n      }, 275);\n    }, 250);\n  }, 50);\n}\nfunction updateModifiers(ctx, { modifiers, value: value2, arg }) {\n  const cfg = Object.assign({}, ctx.cfg.ripple, modifiers, value2);\n  ctx.modifiers = {\n    early: cfg.early === true,\n    stop: cfg.stop === true,\n    center: cfg.center === true,\n    color: cfg.color || arg,\n    keyCodes: [].concat(cfg.keyCodes || 13)\n  };\n}\nvar Ripple_default = createDirective(\n  false ? { name: \"ripple\", getSSRProps: noop_ssr_directive_transform_default } : {\n    name: \"ripple\",\n    beforeMount(el, binding) {\n      const cfg = binding.instance.$.appContext.config.globalProperties.$q.config || {};\n      if (cfg.ripple === false) return;\n      const ctx = {\n        cfg,\n        enabled: binding.value !== false,\n        modifiers: {},\n        abort: [],\n        start(evt) {\n          if (ctx.enabled === true && evt.qSkipRipple !== true && evt.type === (ctx.modifiers.early === true ? \"pointerdown\" : \"click\")) {\n            showRipple(evt, el, ctx, evt.qKeyEvent === true);\n          }\n        },\n        keystart: throttle_default((evt) => {\n          if (ctx.enabled === true && evt.qSkipRipple !== true && isKeyCode(evt, ctx.modifiers.keyCodes) === true && evt.type === `key${ctx.modifiers.early === true ? \"down\" : \"up\"}`) {\n            showRipple(evt, el, ctx, true);\n          }\n        }, 300)\n      };\n      updateModifiers(ctx, binding);\n      el.__qripple = ctx;\n      addEvt(ctx, \"main\", [\n        [el, \"pointerdown\", \"start\", \"passive\"],\n        [el, \"click\", \"start\", \"passive\"],\n        [el, \"keydown\", \"keystart\", \"passive\"],\n        [el, \"keyup\", \"keystart\", \"passive\"]\n      ]);\n    },\n    updated(el, binding) {\n      if (binding.oldValue !== binding.value) {\n        const ctx = el.__qripple;\n        if (ctx !== void 0) {\n          ctx.enabled = binding.value !== false;\n          if (ctx.enabled === true && Object(binding.value) === binding.value) {\n            updateModifiers(ctx, binding);\n          }\n        }\n      }\n    },\n    beforeUnmount(el) {\n      const ctx = el.__qripple;\n      if (ctx !== void 0) {\n        ctx.abort.forEach((fn) => {\n          fn();\n        });\n        cleanEvt(ctx, \"main\");\n        delete el._qripple;\n      }\n    }\n  }\n);\n\n// src/components/btn/use-btn.js\nimport { computed as computed14 } from \"vue\";\nvar btnPadding = {\n  none: 0,\n  xs: 4,\n  sm: 8,\n  md: 16,\n  lg: 24,\n  xl: 32\n};\nvar defaultSizes = {\n  xs: 8,\n  sm: 10,\n  md: 14,\n  lg: 20,\n  xl: 24\n};\nvar formTypes = [\"button\", \"submit\", \"reset\"];\nvar mediaTypeRE = /[^\\s]\\/[^\\s]/;\nvar btnDesignOptions = [\"flat\", \"outline\", \"push\", \"unelevated\"];\nfunction getBtnDesign(props4, defaultValue) {\n  if (props4.flat === true) return \"flat\";\n  if (props4.outline === true) return \"outline\";\n  if (props4.push === true) return \"push\";\n  if (props4.unelevated === true) return \"unelevated\";\n  return defaultValue;\n}\nfunction getBtnDesignAttr(props4) {\n  const design = getBtnDesign(props4);\n  return design !== void 0 ? { [design]: true } : {};\n}\nvar nonRoundBtnProps = {\n  ...useSizeProps,\n  ...useRouterLinkNonMatchingProps,\n  type: {\n    type: String,\n    default: \"button\"\n  },\n  label: [Number, String],\n  icon: String,\n  iconRight: String,\n  ...btnDesignOptions.reduce(\n    (acc, val) => (acc[val] = Boolean) && acc,\n    {}\n  ),\n  square: Boolean,\n  rounded: Boolean,\n  glossy: Boolean,\n  size: String,\n  fab: Boolean,\n  fabMini: Boolean,\n  padding: String,\n  color: String,\n  textColor: String,\n  noCaps: Boolean,\n  noWrap: Boolean,\n  dense: Boolean,\n  tabindex: [Number, String],\n  ripple: {\n    type: [Boolean, Object],\n    default: true\n  },\n  align: {\n    ...useAlignProps.align,\n    default: \"center\"\n  },\n  stack: Boolean,\n  stretch: Boolean,\n  loading: {\n    type: Boolean,\n    default: null\n  },\n  disable: Boolean\n};\nvar useBtnProps = {\n  ...nonRoundBtnProps,\n  round: Boolean\n};\nfunction use_btn_default(props4) {\n  const sizeStyle = use_size_default(props4, defaultSizes);\n  const alignClass = use_align_default(props4);\n  const { hasRouterLink, hasLink, linkTag, linkAttrs, navigateOnClick } = use_router_link_default({\n    fallbackTag: \"button\"\n  });\n  const style2 = computed14(() => {\n    const obj = props4.fab === false && props4.fabMini === false ? sizeStyle.value : {};\n    return props4.padding !== void 0 ? Object.assign({}, obj, {\n      padding: props4.padding.split(/\\s+/).map((v) => v in btnPadding ? btnPadding[v] + \"px\" : v).join(\" \"),\n      minWidth: \"0\",\n      minHeight: \"0\"\n    }) : obj;\n  });\n  const isRounded = computed14(\n    () => props4.rounded === true || props4.fab === true || props4.fabMini === true\n  );\n  const isActionable = computed14(\n    () => props4.disable !== true && props4.loading !== true\n  );\n  const tabIndex = computed14(() => isActionable.value === true ? props4.tabindex || 0 : -1);\n  const design = computed14(() => getBtnDesign(props4, \"standard\"));\n  const attributes = computed14(() => {\n    const acc = { tabindex: tabIndex.value };\n    if (hasLink.value === true) {\n      Object.assign(acc, linkAttrs.value);\n    } else if (formTypes.includes(props4.type) === true) {\n      acc.type = props4.type;\n    }\n    if (linkTag.value === \"a\") {\n      if (props4.disable === true) {\n        acc[\"aria-disabled\"] = \"true\";\n      } else if (acc.href === void 0) {\n        acc.role = \"button\";\n      }\n      if (hasRouterLink.value !== true && mediaTypeRE.test(props4.type) === true) {\n        acc.type = props4.type;\n      }\n    } else if (props4.disable === true) {\n      acc.disabled = \"\";\n      acc[\"aria-disabled\"] = \"true\";\n    }\n    if (props4.loading === true && props4.percentage !== void 0) {\n      Object.assign(acc, {\n        role: \"progressbar\",\n        \"aria-valuemin\": 0,\n        \"aria-valuemax\": 100,\n        \"aria-valuenow\": props4.percentage\n      });\n    }\n    return acc;\n  });\n  const classes = computed14(() => {\n    let colors;\n    if (props4.color !== void 0) {\n      if (props4.flat === true || props4.outline === true) {\n        colors = `text-${props4.textColor || props4.color}`;\n      } else {\n        colors = `bg-${props4.color} text-${props4.textColor || \"white\"}`;\n      }\n    } else if (props4.textColor) {\n      colors = `text-${props4.textColor}`;\n    }\n    const shape = props4.round === true ? \"round\" : `rectangle${isRounded.value === true ? \" q-btn--rounded\" : props4.square === true ? \" q-btn--square\" : \"\"}`;\n    return `q-btn--${design.value} q-btn--${shape}` + (colors !== void 0 ? \" \" + colors : \"\") + (isActionable.value === true ? \" q-btn--actionable q-focusable q-hoverable\" : props4.disable === true ? \" disabled\" : \"\") + (props4.fab === true ? \" q-btn--fab\" : props4.fabMini === true ? \" q-btn--fab-mini\" : \"\") + (props4.noCaps === true ? \" q-btn--no-uppercase\" : \"\") + (props4.dense === true ? \" q-btn--dense\" : \"\") + (props4.stretch === true ? \" no-border-radius self-stretch\" : \"\") + (props4.glossy === true ? \" glossy\" : \"\") + (props4.square ? \" q-btn--square\" : \"\");\n  });\n  const innerClasses = computed14(\n    () => alignClass.value + (props4.stack === true ? \" column\" : \" row\") + (props4.noWrap === true ? \" no-wrap text-no-wrap\" : \"\") + (props4.loading === true ? \" q-btn__content--hidden\" : \"\")\n  );\n  return {\n    classes,\n    style: style2,\n    innerClasses,\n    attributes,\n    hasLink,\n    linkTag,\n    navigateOnClick,\n    isActionable\n  };\n}\n\n// src/components/btn/QBtn.js\nvar { passiveCapture } = listenOpts;\nvar touchTarget = null;\nvar keyboardTarget = null;\nvar mouseTarget = null;\nvar QBtn_default = createComponent({\n  name: \"QBtn\",\n  props: {\n    ...useBtnProps,\n    percentage: Number,\n    darkPercentage: Boolean,\n    onTouchstart: [Function, Array]\n  },\n  emits: [\"click\", \"keydown\", \"mousedown\", \"keyup\"],\n  setup(props4, { slots, emit }) {\n    const { proxy } = getCurrentInstance6();\n    const {\n      classes,\n      style: style2,\n      innerClasses,\n      attributes,\n      hasLink,\n      linkTag,\n      navigateOnClick,\n      isActionable\n    } = use_btn_default(props4);\n    const rootRef = ref3(null);\n    const blurTargetRef = ref3(null);\n    let localTouchTargetEl = null, avoidMouseRipple, mouseTimer = null;\n    const hasLabel = computed15(\n      () => props4.label !== void 0 && props4.label !== null && props4.label !== \"\"\n    );\n    const ripple = computed15(() => props4.disable === true || props4.ripple === false ? false : {\n      keyCodes: hasLink.value === true ? [13, 32] : [13],\n      ...props4.ripple === true ? {} : props4.ripple\n    });\n    const rippleProps = computed15(() => ({ center: props4.round }));\n    const percentageStyle = computed15(() => {\n      const val = Math.max(0, Math.min(100, props4.percentage));\n      return val > 0 ? { transition: \"transform 0.6s\", transform: `translateX(${val - 100}%)` } : {};\n    });\n    const onEvents = computed15(() => {\n      if (props4.loading === true) {\n        return {\n          onMousedown: onLoadingEvt,\n          onTouchstart: onLoadingEvt,\n          onClick: onLoadingEvt,\n          onKeydown: onLoadingEvt,\n          onKeyup: onLoadingEvt\n        };\n      }\n      if (isActionable.value === true) {\n        const acc = {\n          onClick,\n          onKeydown: onKeydown2,\n          onMousedown\n        };\n        if (proxy.$q.platform.has.touch === true) {\n          const suffix = props4.onTouchstart !== void 0 ? \"\" : \"Passive\";\n          acc[`onTouchstart${suffix}`] = onTouchstart;\n        }\n        return acc;\n      }\n      return {\n        // needed; especially for disabled <a> tags\n        onClick: stopAndPrevent\n      };\n    });\n    const nodeProps = computed15(() => ({\n      ref: rootRef,\n      class: \"q-btn q-btn-item non-selectable no-outline \" + classes.value,\n      style: style2.value,\n      ...attributes.value,\n      ...onEvents.value\n    }));\n    function onClick(e) {\n      if (rootRef.value === null) return;\n      if (e !== void 0) {\n        if (e.defaultPrevented === true) return;\n        const el = document.activeElement;\n        if (props4.type === \"submit\" && el !== document.body && rootRef.value.contains(el) === false && el.contains(rootRef.value) === false) {\n          rootRef.value.focus();\n          const onClickCleanup = () => {\n            document.removeEventListener(\"keydown\", stopAndPrevent, true);\n            document.removeEventListener(\"keyup\", onClickCleanup, passiveCapture);\n            rootRef.value !== null && rootRef.value.removeEventListener(\"blur\", onClickCleanup, passiveCapture);\n          };\n          document.addEventListener(\"keydown\", stopAndPrevent, true);\n          document.addEventListener(\"keyup\", onClickCleanup, passiveCapture);\n          rootRef.value.addEventListener(\"blur\", onClickCleanup, passiveCapture);\n        }\n      }\n      navigateOnClick(e);\n    }\n    function onKeydown2(e) {\n      if (rootRef.value === null) return;\n      emit(\"keydown\", e);\n      if (isKeyCode(e, [13, 32]) === true && keyboardTarget !== rootRef.value) {\n        keyboardTarget !== null && cleanup();\n        if (e.defaultPrevented !== true) {\n          rootRef.value.focus();\n          keyboardTarget = rootRef.value;\n          rootRef.value.classList.add(\"q-btn--active\");\n          document.addEventListener(\"keyup\", onPressEnd, true);\n          rootRef.value.addEventListener(\"blur\", onPressEnd, passiveCapture);\n        }\n        stopAndPrevent(e);\n      }\n    }\n    function onTouchstart(e) {\n      if (rootRef.value === null) return;\n      emit(\"touchstart\", e);\n      if (e.defaultPrevented === true) return;\n      if (touchTarget !== rootRef.value) {\n        touchTarget !== null && cleanup();\n        touchTarget = rootRef.value;\n        localTouchTargetEl = e.target;\n        localTouchTargetEl.addEventListener(\"touchcancel\", onPressEnd, passiveCapture);\n        localTouchTargetEl.addEventListener(\"touchend\", onPressEnd, passiveCapture);\n      }\n      avoidMouseRipple = true;\n      mouseTimer !== null && clearTimeout(mouseTimer);\n      mouseTimer = setTimeout(() => {\n        mouseTimer = null;\n        avoidMouseRipple = false;\n      }, 200);\n    }\n    function onMousedown(e) {\n      if (rootRef.value === null) return;\n      e.qSkipRipple = avoidMouseRipple === true;\n      emit(\"mousedown\", e);\n      if (e.defaultPrevented !== true && mouseTarget !== rootRef.value) {\n        mouseTarget !== null && cleanup();\n        mouseTarget = rootRef.value;\n        rootRef.value.classList.add(\"q-btn--active\");\n        document.addEventListener(\"mouseup\", onPressEnd, passiveCapture);\n      }\n    }\n    function onPressEnd(e) {\n      if (rootRef.value === null) return;\n      if (e !== void 0 && e.type === \"blur\" && document.activeElement === rootRef.value) return;\n      if (e !== void 0 && e.type === \"keyup\") {\n        if (keyboardTarget === rootRef.value && isKeyCode(e, [13, 32]) === true) {\n          const evt = new MouseEvent(\"click\", e);\n          evt.qKeyEvent = true;\n          e.defaultPrevented === true && prevent(evt);\n          e.cancelBubble === true && stop(evt);\n          rootRef.value.dispatchEvent(evt);\n          stopAndPrevent(e);\n          e.qKeyEvent = true;\n        }\n        emit(\"keyup\", e);\n      }\n      cleanup();\n    }\n    function cleanup(destroying) {\n      const blurTarget = blurTargetRef.value;\n      if (destroying !== true && (touchTarget === rootRef.value || mouseTarget === rootRef.value) && blurTarget !== null && blurTarget !== document.activeElement) {\n        blurTarget.setAttribute(\"tabindex\", -1);\n        blurTarget.focus();\n      }\n      if (touchTarget === rootRef.value) {\n        if (localTouchTargetEl !== null) {\n          localTouchTargetEl.removeEventListener(\"touchcancel\", onPressEnd, passiveCapture);\n          localTouchTargetEl.removeEventListener(\"touchend\", onPressEnd, passiveCapture);\n        }\n        touchTarget = localTouchTargetEl = null;\n      }\n      if (mouseTarget === rootRef.value) {\n        document.removeEventListener(\"mouseup\", onPressEnd, passiveCapture);\n        mouseTarget = null;\n      }\n      if (keyboardTarget === rootRef.value) {\n        document.removeEventListener(\"keyup\", onPressEnd, true);\n        rootRef.value !== null && rootRef.value.removeEventListener(\"blur\", onPressEnd, passiveCapture);\n        keyboardTarget = null;\n      }\n      rootRef.value !== null && rootRef.value.classList.remove(\"q-btn--active\");\n    }\n    function onLoadingEvt(evt) {\n      stopAndPrevent(evt);\n      evt.qSkipRipple = true;\n    }\n    onBeforeUnmount2(() => {\n      cleanup(true);\n    });\n    Object.assign(proxy, {\n      click: (e) => {\n        if (isActionable.value === true) {\n          onClick(e);\n        }\n      }\n    });\n    return () => {\n      let inner = [];\n      props4.icon !== void 0 && inner.push(\n        h11(QIcon_default, {\n          name: props4.icon,\n          left: props4.stack !== true && hasLabel.value === true,\n          role: \"img\"\n        })\n      );\n      hasLabel.value === true && inner.push(\n        h11(\"span\", { class: \"block\" }, [props4.label])\n      );\n      inner = hMergeSlot(slots.default, inner);\n      if (props4.iconRight !== void 0 && props4.round === false) {\n        inner.push(\n          h11(QIcon_default, {\n            name: props4.iconRight,\n            right: props4.stack !== true && hasLabel.value === true,\n            role: \"img\"\n          })\n        );\n      }\n      const child = [\n        h11(\"span\", {\n          class: \"q-focus-helper\",\n          ref: blurTargetRef\n        })\n      ];\n      if (props4.loading === true && props4.percentage !== void 0) {\n        child.push(\n          h11(\"span\", {\n            class: \"q-btn__progress absolute-full overflow-hidden\" + (props4.darkPercentage === true ? \" q-btn__progress--dark\" : \"\")\n          }, [\n            h11(\"span\", {\n              class: \"q-btn__progress-indicator fit block\",\n              style: percentageStyle.value\n            })\n          ])\n        );\n      }\n      child.push(\n        h11(\"span\", {\n          class: \"q-btn__content text-center col items-center q-anchor--skip \" + innerClasses.value\n        }, inner)\n      );\n      props4.loading !== null && child.push(\n        h11(Transition, {\n          name: \"q-transition--fade\"\n        }, () => props4.loading === true ? [\n          h11(\"span\", {\n            key: \"loading\",\n            class: \"absolute-full flex flex-center\"\n          }, slots.loading !== void 0 ? slots.loading() : [h11(QSpinner_default)])\n        ] : null)\n      );\n      return withDirectives2(\n        h11(\n          linkTag.value,\n          nodeProps.value,\n          child\n        ),\n        [[\n          Ripple_default,\n          ripple.value,\n          void 0,\n          rippleProps.value\n        ]]\n      );\n    };\n  }\n});\n\n// src/components/btn-dropdown/QBtnDropdown.js\nimport { h as h15, ref as ref9, computed as computed20, watch as watch6, onMounted as onMounted5, getCurrentInstance as getCurrentInstance12 } from \"vue\";\n\n// src/components/btn-group/QBtnGroup.js\nimport { h as h12, computed as computed16 } from \"vue\";\nvar QBtnGroup_default = createComponent({\n  name: \"QBtnGroup\",\n  props: {\n    unelevated: Boolean,\n    outline: Boolean,\n    flat: Boolean,\n    rounded: Boolean,\n    square: Boolean,\n    push: Boolean,\n    stretch: Boolean,\n    glossy: Boolean,\n    spread: Boolean\n  },\n  setup(props4, { slots }) {\n    const classes = computed16(() => {\n      const cls = [\"unelevated\", \"outline\", \"flat\", \"rounded\", \"square\", \"push\", \"stretch\", \"glossy\"].filter((t) => props4[t] === true).map((t) => `q-btn-group--${t}`).join(\" \");\n      return `q-btn-group row no-wrap${cls.length !== 0 ? \" \" + cls : \"\"}` + (props4.spread === true ? \" q-btn-group--spread\" : \" inline\");\n    });\n    return () => h12(\"div\", { class: classes.value }, hSlot(slots.default));\n  }\n});\n\n// src/components/menu/QMenu.js\nimport { h as h14, ref as ref7, computed as computed18, watch as watch4, Transition as Transition2, onBeforeUnmount as onBeforeUnmount7, getCurrentInstance as getCurrentInstance11 } from \"vue\";\n\n// src/composables/private.use-anchor/use-anchor.js\nimport { ref as ref4, watch, onMounted as onMounted2, onBeforeUnmount as onBeforeUnmount3, nextTick, getCurrentInstance as getCurrentInstance7 } from \"vue\";\n\n// src/utils/private.selection/selection.js\nfunction clearSelection() {\n  if (window.getSelection !== void 0) {\n    const selection = window.getSelection();\n    if (selection.empty !== void 0) {\n      selection.empty();\n    } else if (selection.removeAllRanges !== void 0) {\n      selection.removeAllRanges();\n      Platform_default.is.mobile !== true && selection.addRange(document.createRange());\n    }\n  } else if (document.selection !== void 0) {\n    document.selection.empty();\n  }\n}\n\n// src/composables/private.use-anchor/use-anchor.js\nvar useAnchorStaticProps = {\n  /* SSR does not know about Element */\n  target: false ? { default: true } : {\n    type: [Boolean, String, Element],\n    default: true\n  },\n  noParentEvent: Boolean\n};\nvar useAnchorProps = {\n  ...useAnchorStaticProps,\n  contextMenu: Boolean\n};\nfunction use_anchor_default({\n  showing,\n  avoidEmit,\n  // required for QPopupProxy (true)\n  configureAnchorEl\n  // optional\n}) {\n  const { props: props4, proxy, emit } = getCurrentInstance7();\n  const anchorEl = ref4(null);\n  let touchTimer = null;\n  function canShow(evt) {\n    return anchorEl.value === null ? false : evt === void 0 || evt.touches === void 0 || evt.touches.length <= 1;\n  }\n  const anchorEvents = {};\n  if (configureAnchorEl === void 0) {\n    Object.assign(anchorEvents, {\n      hide(evt) {\n        proxy.hide(evt);\n      },\n      toggle(evt) {\n        proxy.toggle(evt);\n        evt.qAnchorHandled = true;\n      },\n      toggleKey(evt) {\n        isKeyCode(evt, 13) === true && anchorEvents.toggle(evt);\n      },\n      contextClick(evt) {\n        proxy.hide(evt);\n        prevent(evt);\n        nextTick(() => {\n          proxy.show(evt);\n          evt.qAnchorHandled = true;\n        });\n      },\n      prevent,\n      mobileTouch(evt) {\n        anchorEvents.mobileCleanup(evt);\n        if (canShow(evt) !== true) return;\n        proxy.hide(evt);\n        anchorEl.value.classList.add(\"non-selectable\");\n        const target2 = evt.target;\n        addEvt(anchorEvents, \"anchor\", [\n          [target2, \"touchmove\", \"mobileCleanup\", \"passive\"],\n          [target2, \"touchend\", \"mobileCleanup\", \"passive\"],\n          [target2, \"touchcancel\", \"mobileCleanup\", \"passive\"],\n          [anchorEl.value, \"contextmenu\", \"prevent\", \"notPassive\"]\n        ]);\n        touchTimer = setTimeout(() => {\n          touchTimer = null;\n          proxy.show(evt);\n          evt.qAnchorHandled = true;\n        }, 300);\n      },\n      mobileCleanup(evt) {\n        anchorEl.value.classList.remove(\"non-selectable\");\n        if (touchTimer !== null) {\n          clearTimeout(touchTimer);\n          touchTimer = null;\n        }\n        if (showing.value === true && evt !== void 0) {\n          clearSelection();\n        }\n      }\n    });\n    configureAnchorEl = function(context = props4.contextMenu) {\n      if (props4.noParentEvent === true || anchorEl.value === null) return;\n      let evts;\n      if (context === true) {\n        if (proxy.$q.platform.is.mobile === true) {\n          evts = [\n            [anchorEl.value, \"touchstart\", \"mobileTouch\", \"passive\"]\n          ];\n        } else {\n          evts = [\n            [anchorEl.value, \"mousedown\", \"hide\", \"passive\"],\n            [anchorEl.value, \"contextmenu\", \"contextClick\", \"notPassive\"]\n          ];\n        }\n      } else {\n        evts = [\n          [anchorEl.value, \"click\", \"toggle\", \"passive\"],\n          [anchorEl.value, \"keyup\", \"toggleKey\", \"passive\"]\n        ];\n      }\n      addEvt(anchorEvents, \"anchor\", evts);\n    };\n  }\n  function unconfigureAnchorEl() {\n    cleanEvt(anchorEvents, \"anchor\");\n  }\n  function setAnchorEl(el) {\n    anchorEl.value = el;\n    while (anchorEl.value.classList.contains(\"q-anchor--skip\")) {\n      anchorEl.value = anchorEl.value.parentNode;\n    }\n    configureAnchorEl();\n  }\n  function pickAnchorEl() {\n    if (props4.target === false || props4.target === \"\" || proxy.$el.parentNode === null) {\n      anchorEl.value = null;\n    } else if (props4.target === true) {\n      setAnchorEl(proxy.$el.parentNode);\n    } else {\n      let el = props4.target;\n      if (typeof props4.target === \"string\") {\n        try {\n          el = document.querySelector(props4.target);\n        } catch (err) {\n          el = void 0;\n        }\n      }\n      if (el !== void 0 && el !== null) {\n        anchorEl.value = el.$el || el;\n        configureAnchorEl();\n      } else {\n        anchorEl.value = null;\n        console.error(`Anchor: target \"${props4.target}\" not found`);\n      }\n    }\n  }\n  watch(() => props4.contextMenu, (val) => {\n    if (anchorEl.value !== null) {\n      unconfigureAnchorEl();\n      configureAnchorEl(val);\n    }\n  });\n  watch(() => props4.target, () => {\n    if (anchorEl.value !== null) {\n      unconfigureAnchorEl();\n    }\n    pickAnchorEl();\n  });\n  watch(() => props4.noParentEvent, (val) => {\n    if (anchorEl.value !== null) {\n      if (val === true) {\n        unconfigureAnchorEl();\n      } else {\n        configureAnchorEl();\n      }\n    }\n  });\n  onMounted2(() => {\n    pickAnchorEl();\n    if (avoidEmit !== true && props4.modelValue === true && anchorEl.value === null) {\n      emit(\"update:modelValue\", false);\n    }\n  });\n  onBeforeUnmount3(() => {\n    touchTimer !== null && clearTimeout(touchTimer);\n    unconfigureAnchorEl();\n  });\n  return {\n    anchorEl,\n    canShow,\n    anchorEvents\n  };\n}\n\n// src/composables/private.use-scroll-target/use-scroll-target.js\nimport { ref as ref5, watch as watch2, onBeforeUnmount as onBeforeUnmount4 } from \"vue\";\nfunction use_scroll_target_default(props4, configureScrollTarget) {\n  const localScrollTarget = ref5(null);\n  let scrollFn;\n  function changeScrollEvent(scrollTarget, fn) {\n    const fnProp = `${fn !== void 0 ? \"add\" : \"remove\"}EventListener`;\n    const fnHandler = fn !== void 0 ? fn : scrollFn;\n    if (scrollTarget !== window) {\n      scrollTarget[fnProp](\"scroll\", fnHandler, listenOpts.passive);\n    }\n    window[fnProp](\"scroll\", fnHandler, listenOpts.passive);\n    scrollFn = fn;\n  }\n  function unconfigureScrollTarget() {\n    if (localScrollTarget.value !== null) {\n      changeScrollEvent(localScrollTarget.value);\n      localScrollTarget.value = null;\n    }\n  }\n  const noParentEventWatcher = watch2(() => props4.noParentEvent, () => {\n    if (localScrollTarget.value !== null) {\n      unconfigureScrollTarget();\n      configureScrollTarget();\n    }\n  });\n  onBeforeUnmount4(noParentEventWatcher);\n  return {\n    localScrollTarget,\n    unconfigureScrollTarget,\n    changeScrollEvent\n  };\n}\n\n// src/composables/private.use-model-toggle/use-model-toggle.js\nimport { watch as watch3, nextTick as nextTick2, onMounted as onMounted3, getCurrentInstance as getCurrentInstance8 } from \"vue\";\nvar useModelToggleProps = {\n  modelValue: {\n    type: Boolean,\n    default: null\n  },\n  \"onUpdate:modelValue\": [Function, Array]\n};\nvar useModelToggleEmits = [\n  \"beforeShow\",\n  \"show\",\n  \"beforeHide\",\n  \"hide\"\n];\nfunction use_model_toggle_default({\n  showing,\n  canShow,\n  // optional\n  hideOnRouteChange,\n  // optional\n  handleShow,\n  // optional\n  handleHide,\n  // optional\n  processOnMount\n  // optional\n}) {\n  const vm2 = getCurrentInstance8();\n  const { props: props4, emit, proxy } = vm2;\n  let payload;\n  function toggle(evt) {\n    if (showing.value === true) {\n      hide(evt);\n    } else {\n      show(evt);\n    }\n  }\n  function show(evt) {\n    if (props4.disable === true || evt !== void 0 && evt.qAnchorHandled === true || canShow !== void 0 && canShow(evt) !== true) return;\n    const listener = props4[\"onUpdate:modelValue\"] !== void 0;\n    if (listener === true && true) {\n      emit(\"update:modelValue\", true);\n      payload = evt;\n      nextTick2(() => {\n        if (payload === evt) {\n          payload = void 0;\n        }\n      });\n    }\n    if (props4.modelValue === null || listener === false || false) {\n      processShow(evt);\n    }\n  }\n  function processShow(evt) {\n    if (showing.value === true) return;\n    showing.value = true;\n    emit(\"beforeShow\", evt);\n    if (handleShow !== void 0) {\n      handleShow(evt);\n    } else {\n      emit(\"show\", evt);\n    }\n  }\n  function hide(evt) {\n    if (props4.disable === true) return;\n    const listener = props4[\"onUpdate:modelValue\"] !== void 0;\n    if (listener === true && true) {\n      emit(\"update:modelValue\", false);\n      payload = evt;\n      nextTick2(() => {\n        if (payload === evt) {\n          payload = void 0;\n        }\n      });\n    }\n    if (props4.modelValue === null || listener === false || false) {\n      processHide(evt);\n    }\n  }\n  function processHide(evt) {\n    if (showing.value === false) return;\n    showing.value = false;\n    emit(\"beforeHide\", evt);\n    if (handleHide !== void 0) {\n      handleHide(evt);\n    } else {\n      emit(\"hide\", evt);\n    }\n  }\n  function processModelChange(val) {\n    if (props4.disable === true && val === true) {\n      if (props4[\"onUpdate:modelValue\"] !== void 0) {\n        emit(\"update:modelValue\", false);\n      }\n    } else if (val === true !== showing.value) {\n      const fn = val === true ? processShow : processHide;\n      fn(payload);\n    }\n  }\n  watch3(() => props4.modelValue, processModelChange);\n  if (hideOnRouteChange !== void 0 && vmHasRouter(vm2) === true) {\n    watch3(() => proxy.$route.fullPath, () => {\n      if (hideOnRouteChange.value === true && showing.value === true) {\n        hide();\n      }\n    });\n  }\n  processOnMount === true && onMounted3(() => {\n    processModelChange(props4.modelValue);\n  });\n  const publicMethods = { show, hide, toggle };\n  Object.assign(proxy, publicMethods);\n  return publicMethods;\n}\n\n// src/composables/private.use-portal/use-portal.js\nimport { h as h13, ref as ref6, onUnmounted, Teleport } from \"vue\";\n\n// src/utils/private.focus/focus-manager.js\nvar queue = [];\nvar waitFlags = [];\nfunction clearFlag(flag) {\n  waitFlags = waitFlags.filter((entry) => entry !== flag);\n}\nfunction addFocusWaitFlag(flag) {\n  clearFlag(flag);\n  waitFlags.push(flag);\n}\nfunction removeFocusWaitFlag(flag) {\n  clearFlag(flag);\n  if (waitFlags.length === 0 && queue.length !== 0) {\n    queue[queue.length - 1]();\n    queue = [];\n  }\n}\nfunction addFocusFn(fn) {\n  if (waitFlags.length === 0) {\n    fn();\n  } else {\n    queue.push(fn);\n  }\n}\nfunction removeFocusFn(fn) {\n  queue = queue.filter((entry) => entry !== fn);\n}\n\n// src/utils/private.config/nodes.js\nvar nodesList = [];\nvar portalTypeList = [];\nvar portalIndex = 1;\nvar target = false ? void 0 : document.body;\nfunction createGlobalNode(id3, portalType) {\n  const el = document.createElement(\"div\");\n  el.id = portalType !== void 0 ? `q-portal--${portalType}--${portalIndex++}` : id3;\n  if (globalConfig.globalNodes !== void 0) {\n    const cls = globalConfig.globalNodes.class;\n    if (cls !== void 0) {\n      el.className = cls;\n    }\n  }\n  target.appendChild(el);\n  nodesList.push(el);\n  portalTypeList.push(portalType);\n  return el;\n}\nfunction removeGlobalNode(el) {\n  const nodeIndex = nodesList.indexOf(el);\n  nodesList.splice(nodeIndex, 1);\n  portalTypeList.splice(nodeIndex, 1);\n  el.remove();\n}\nfunction changeGlobalNodesTarget(newTarget) {\n  if (newTarget === target) return;\n  target = newTarget;\n  if (target === document.body || portalTypeList.reduce((acc, type) => type === \"dialog\" ? acc + 1 : acc, 0) < 2) {\n    nodesList.forEach((node) => {\n      if (node.contains(target) === false) {\n        target.appendChild(node);\n      }\n    });\n    return;\n  }\n  const lastDialogIndex = portalTypeList.lastIndexOf(\"dialog\");\n  for (let i = 0; i < nodesList.length; i++) {\n    const el = nodesList[i];\n    if ((i === lastDialogIndex || portalTypeList[i] !== \"dialog\") && el.contains(target) === false) {\n      target.appendChild(el);\n    }\n  }\n}\n\n// src/utils/private.portal/portal.js\nvar portalProxyList = [];\nfunction getPortalProxy(el) {\n  return portalProxyList.find(\n    (proxy) => proxy.contentEl !== null && proxy.contentEl.contains(el)\n  );\n}\nfunction closePortalMenus(proxy, evt) {\n  do {\n    if (proxy.$options.name === \"QMenu\") {\n      proxy.hide(evt);\n      if (proxy.$props.separateClosePopup === true) {\n        return getParentProxy(proxy);\n      }\n    } else if (proxy.__qPortal === true) {\n      const parent = getParentProxy(proxy);\n      if (parent !== void 0 && parent.$options.name === \"QPopupProxy\") {\n        proxy.hide(evt);\n        return parent;\n      } else {\n        return proxy;\n      }\n    }\n    proxy = getParentProxy(proxy);\n  } while (proxy !== void 0 && proxy !== null);\n}\nfunction closePortals(proxy, evt, depth) {\n  while (depth !== 0 && proxy !== void 0 && proxy !== null) {\n    if (proxy.__qPortal === true) {\n      depth--;\n      if (proxy.$options.name === \"QMenu\") {\n        proxy = closePortalMenus(proxy, evt);\n        continue;\n      }\n      proxy.hide(evt);\n    }\n    proxy = getParentProxy(proxy);\n  }\n}\n\n// src/composables/private.use-portal/use-portal.js\nvar QPortal = createComponent({\n  name: \"QPortal\",\n  setup(_, { slots }) {\n    return () => slots.default();\n  }\n});\nfunction isOnGlobalDialog(vm2) {\n  vm2 = vm2.parent;\n  while (vm2 !== void 0 && vm2 !== null) {\n    if (vm2.type.name === \"QGlobalDialog\") {\n      return true;\n    }\n    if (vm2.type.name === \"QDialog\" || vm2.type.name === \"QMenu\") {\n      return false;\n    }\n    vm2 = vm2.parent;\n  }\n  return false;\n}\nfunction use_portal_default(vm2, innerRef, renderPortalContent, type) {\n  const portalIsActive = ref6(false);\n  const portalIsAccessible = ref6(false);\n  if (false) {\n    return {\n      portalIsActive,\n      portalIsAccessible,\n      showPortal: noop,\n      hidePortal: noop,\n      renderPortal: noop\n    };\n  }\n  let portalEl = null;\n  const focusObj = {};\n  const onGlobalDialog = type === \"dialog\" && isOnGlobalDialog(vm2);\n  function showPortal(isReady) {\n    if (isReady === true) {\n      removeFocusWaitFlag(focusObj);\n      portalIsAccessible.value = true;\n      return;\n    }\n    portalIsAccessible.value = false;\n    if (portalIsActive.value === false) {\n      if (onGlobalDialog === false && portalEl === null) {\n        portalEl = createGlobalNode(false, type);\n      }\n      portalIsActive.value = true;\n      portalProxyList.push(vm2.proxy);\n      addFocusWaitFlag(focusObj);\n    }\n  }\n  function hidePortal(isReady) {\n    portalIsAccessible.value = false;\n    if (isReady !== true) return;\n    removeFocusWaitFlag(focusObj);\n    portalIsActive.value = false;\n    const index = portalProxyList.indexOf(vm2.proxy);\n    if (index !== -1) {\n      portalProxyList.splice(index, 1);\n    }\n    if (portalEl !== null) {\n      removeGlobalNode(portalEl);\n      portalEl = null;\n    }\n  }\n  onUnmounted(() => {\n    hidePortal(true);\n  });\n  vm2.proxy.__qPortal = true;\n  injectProp(vm2.proxy, \"contentEl\", () => innerRef.value);\n  return {\n    showPortal,\n    hidePortal,\n    portalIsActive,\n    portalIsAccessible,\n    renderPortal: () => onGlobalDialog === true ? renderPortalContent() : portalIsActive.value === true ? [h13(Teleport, { to: portalEl }, h13(QPortal, renderPortalContent))] : void 0\n  };\n}\n\n// src/composables/private.use-transition/use-transition.js\nimport { computed as computed17 } from \"vue\";\nvar useTransitionProps = {\n  transitionShow: {\n    type: String,\n    default: \"fade\"\n  },\n  transitionHide: {\n    type: String,\n    default: \"fade\"\n  },\n  transitionDuration: {\n    type: [String, Number],\n    default: 300\n  }\n};\nfunction use_transition_default(props4, defaultShowFn = () => {\n}, defaultHideFn = () => {\n}) {\n  return {\n    transitionProps: computed17(() => {\n      const show = `q-transition--${props4.transitionShow || defaultShowFn()}`;\n      const hide = `q-transition--${props4.transitionHide || defaultHideFn()}`;\n      return {\n        appear: true,\n        enterFromClass: `${show}-enter-from`,\n        enterActiveClass: `${show}-enter-active`,\n        enterToClass: `${show}-enter-to`,\n        leaveFromClass: `${hide}-leave-from`,\n        leaveActiveClass: `${hide}-leave-active`,\n        leaveToClass: `${hide}-leave-to`\n      };\n    }),\n    transitionStyle: computed17(() => `--q-transition-duration: ${props4.transitionDuration}ms`)\n  };\n}\n\n// src/composables/use-tick/use-tick.js\nimport { nextTick as nextTick3, onDeactivated, onBeforeUnmount as onBeforeUnmount5, getCurrentInstance as getCurrentInstance9 } from \"vue\";\nfunction use_tick_default() {\n  let tickFn;\n  const vm2 = getCurrentInstance9();\n  function removeTick() {\n    tickFn = void 0;\n  }\n  onDeactivated(removeTick);\n  onBeforeUnmount5(removeTick);\n  return {\n    removeTick,\n    registerTick(fn) {\n      tickFn = fn;\n      nextTick3(() => {\n        if (tickFn === fn) {\n          vmIsDestroyed(vm2) === false && tickFn();\n          tickFn = void 0;\n        }\n      });\n    }\n  };\n}\n\n// src/composables/use-timeout/use-timeout.js\nimport { onDeactivated as onDeactivated2, onBeforeUnmount as onBeforeUnmount6, getCurrentInstance as getCurrentInstance10 } from \"vue\";\nfunction use_timeout_default() {\n  let timer2 = null;\n  const vm2 = getCurrentInstance10();\n  function removeTimeout() {\n    if (timer2 !== null) {\n      clearTimeout(timer2);\n      timer2 = null;\n    }\n  }\n  onDeactivated2(removeTimeout);\n  onBeforeUnmount6(removeTimeout);\n  return {\n    removeTimeout,\n    registerTimeout(fn, delay) {\n      removeTimeout();\n      if (vmIsDestroyed(vm2) === false) {\n        timer2 = setTimeout(() => {\n          timer2 = null;\n          fn();\n        }, delay);\n      }\n    }\n  };\n}\n\n// src/utils/scroll/scroll.js\nvar scrollTargetProp = false ? {} : [Element, String];\nvar scrollTargets = false ? [] : [null, document, document.body, document.scrollingElement, document.documentElement];\nfunction getScrollTarget(el, targetEl) {\n  let target2 = getElement(targetEl);\n  if (target2 === void 0) {\n    if (el === void 0 || el === null) {\n      return window;\n    }\n    target2 = el.closest(\".scroll,.scroll-y,.overflow-auto\");\n  }\n  return scrollTargets.includes(target2) ? window : target2;\n}\nfunction getScrollHeight(el) {\n  return (el === window ? document.body : el).scrollHeight;\n}\nfunction getScrollWidth(el) {\n  return (el === window ? document.body : el).scrollWidth;\n}\nfunction getVerticalScrollPosition(scrollTarget) {\n  return scrollTarget === window ? window.pageYOffset || window.scrollY || document.body.scrollTop || 0 : scrollTarget.scrollTop;\n}\nfunction getHorizontalScrollPosition(scrollTarget) {\n  return scrollTarget === window ? window.pageXOffset || window.scrollX || document.body.scrollLeft || 0 : scrollTarget.scrollLeft;\n}\nfunction animVerticalScrollTo(el, to, duration2 = 0) {\n  const prevTime = arguments[3] === void 0 ? performance.now() : arguments[3];\n  const pos = getVerticalScrollPosition(el);\n  if (duration2 <= 0) {\n    if (pos !== to) {\n      setScroll(el, to);\n    }\n    return;\n  }\n  requestAnimationFrame((nowTime) => {\n    const frameTime = nowTime - prevTime;\n    const newPos = pos + (to - pos) / Math.max(frameTime, duration2) * frameTime;\n    setScroll(el, newPos);\n    if (newPos !== to) {\n      animVerticalScrollTo(el, to, duration2 - frameTime, nowTime);\n    }\n  });\n}\nfunction animHorizontalScrollTo(el, to, duration2 = 0) {\n  const prevTime = arguments[3] === void 0 ? performance.now() : arguments[3];\n  const pos = getHorizontalScrollPosition(el);\n  if (duration2 <= 0) {\n    if (pos !== to) {\n      setHorizontalScroll(el, to);\n    }\n    return;\n  }\n  requestAnimationFrame((nowTime) => {\n    const frameTime = nowTime - prevTime;\n    const newPos = pos + (to - pos) / Math.max(frameTime, duration2) * frameTime;\n    setHorizontalScroll(el, newPos);\n    if (newPos !== to) {\n      animHorizontalScrollTo(el, to, duration2 - frameTime, nowTime);\n    }\n  });\n}\nfunction setScroll(scrollTarget, offset2) {\n  if (scrollTarget === window) {\n    window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, offset2);\n    return;\n  }\n  scrollTarget.scrollTop = offset2;\n}\nfunction setHorizontalScroll(scrollTarget, offset2) {\n  if (scrollTarget === window) {\n    window.scrollTo(offset2, window.pageYOffset || window.scrollY || document.body.scrollTop || 0);\n    return;\n  }\n  scrollTarget.scrollLeft = offset2;\n}\nfunction setVerticalScrollPosition(scrollTarget, offset2, duration2) {\n  if (duration2) {\n    animVerticalScrollTo(scrollTarget, offset2, duration2);\n    return;\n  }\n  setScroll(scrollTarget, offset2);\n}\nfunction setHorizontalScrollPosition(scrollTarget, offset2, duration2) {\n  if (duration2) {\n    animHorizontalScrollTo(scrollTarget, offset2, duration2);\n    return;\n  }\n  setHorizontalScroll(scrollTarget, offset2);\n}\nvar size;\nfunction getScrollbarWidth() {\n  if (size !== void 0) {\n    return size;\n  }\n  const inner = document.createElement(\"p\"), outer = document.createElement(\"div\");\n  css(inner, {\n    width: \"100%\",\n    height: \"200px\"\n  });\n  css(outer, {\n    position: \"absolute\",\n    top: \"0px\",\n    left: \"0px\",\n    visibility: \"hidden\",\n    width: \"200px\",\n    height: \"150px\",\n    overflow: \"hidden\"\n  });\n  outer.appendChild(inner);\n  document.body.appendChild(outer);\n  const w1 = inner.offsetWidth;\n  outer.style.overflow = \"scroll\";\n  let w2 = inner.offsetWidth;\n  if (w1 === w2) {\n    w2 = outer.clientWidth;\n  }\n  outer.remove();\n  size = w1 - w2;\n  return size;\n}\nfunction hasScrollbar(el, onY = true) {\n  if (!el || el.nodeType !== Node.ELEMENT_NODE) {\n    return false;\n  }\n  return onY ? el.scrollHeight > el.clientHeight && (el.classList.contains(\"scroll\") || el.classList.contains(\"overflow-auto\") || [\"auto\", \"scroll\"].includes(window.getComputedStyle(el)[\"overflow-y\"])) : el.scrollWidth > el.clientWidth && (el.classList.contains(\"scroll\") || el.classList.contains(\"overflow-auto\") || [\"auto\", \"scroll\"].includes(window.getComputedStyle(el)[\"overflow-x\"]));\n}\nvar scroll_default = {\n  getScrollTarget,\n  getScrollHeight,\n  getScrollWidth,\n  getVerticalScrollPosition,\n  getHorizontalScrollPosition,\n  animVerticalScrollTo,\n  animHorizontalScrollTo,\n  setVerticalScrollPosition,\n  setHorizontalScrollPosition,\n  getScrollbarWidth,\n  hasScrollbar\n};\n\n// src/utils/private.keyboard/escape-key.js\nvar handlers = [];\nvar escDown;\nfunction onKeydown(evt) {\n  escDown = evt.keyCode === 27;\n}\nfunction onBlur() {\n  if (escDown === true) {\n    escDown = false;\n  }\n}\nfunction onKeyup(evt) {\n  if (escDown === true) {\n    escDown = false;\n    if (isKeyCode(evt, 27) === true) {\n      handlers[handlers.length - 1](evt);\n    }\n  }\n}\nfunction update(action) {\n  window[action](\"keydown\", onKeydown);\n  window[action](\"blur\", onBlur);\n  window[action](\"keyup\", onKeyup);\n  escDown = false;\n}\nfunction addEscapeKey(fn) {\n  if (client.is.desktop === true) {\n    handlers.push(fn);\n    if (handlers.length === 1) {\n      update(\"addEventListener\");\n    }\n  }\n}\nfunction removeEscapeKey(fn) {\n  const index = handlers.indexOf(fn);\n  if (index !== -1) {\n    handlers.splice(index, 1);\n    if (handlers.length === 0) {\n      update(\"removeEventListener\");\n    }\n  }\n}\n\n// src/utils/private.focus/focusout.js\nvar handlers2 = [];\nfunction trigger(e) {\n  handlers2[handlers2.length - 1](e);\n}\nfunction addFocusout(fn) {\n  if (client.is.desktop === true) {\n    handlers2.push(fn);\n    if (handlers2.length === 1) {\n      document.body.addEventListener(\"focusin\", trigger);\n    }\n  }\n}\nfunction removeFocusout(fn) {\n  const index = handlers2.indexOf(fn);\n  if (index !== -1) {\n    handlers2.splice(index, 1);\n    if (handlers2.length === 0) {\n      document.body.removeEventListener(\"focusin\", trigger);\n    }\n  }\n}\n\n// src/utils/private.click-outside/click-outside.js\nvar timer = null;\nvar { notPassiveCapture } = listenOpts;\nvar registeredList = [];\nfunction globalHandler(evt) {\n  if (timer !== null) {\n    clearTimeout(timer);\n    timer = null;\n  }\n  const target2 = evt.target;\n  if (target2 === void 0 || target2.nodeType === 8 || target2.classList.contains(\"no-pointer-events\") === true) return;\n  let portalIndex2 = portalProxyList.length - 1;\n  while (portalIndex2 >= 0) {\n    const proxy = portalProxyList[portalIndex2].$;\n    if (proxy.type.name === \"QTooltip\") {\n      portalIndex2--;\n      continue;\n    }\n    if (proxy.type.name !== \"QDialog\") {\n      break;\n    }\n    if (proxy.props.seamless !== true) return;\n    portalIndex2--;\n  }\n  for (let i = registeredList.length - 1; i >= 0; i--) {\n    const state = registeredList[i];\n    if ((state.anchorEl.value === null || state.anchorEl.value.contains(target2) === false) && (target2 === document.body || state.innerRef.value !== null && state.innerRef.value.contains(target2) === false)) {\n      evt.qClickOutside = true;\n      state.onClickOutside(evt);\n    } else {\n      return;\n    }\n  }\n}\nfunction addClickOutside(clickOutsideProps) {\n  registeredList.push(clickOutsideProps);\n  if (registeredList.length === 1) {\n    document.addEventListener(\"mousedown\", globalHandler, notPassiveCapture);\n    document.addEventListener(\"touchstart\", globalHandler, notPassiveCapture);\n  }\n}\nfunction removeClickOutside(clickOutsideProps) {\n  const index = registeredList.findIndex((h138) => h138 === clickOutsideProps);\n  if (index !== -1) {\n    registeredList.splice(index, 1);\n    if (registeredList.length === 0) {\n      if (timer !== null) {\n        clearTimeout(timer);\n        timer = null;\n      }\n      document.removeEventListener(\"mousedown\", globalHandler, notPassiveCapture);\n      document.removeEventListener(\"touchstart\", globalHandler, notPassiveCapture);\n    }\n  }\n}\n\n// src/utils/private.position-engine/position-engine.js\nvar vpLeft;\nvar vpTop;\nfunction validatePosition(pos) {\n  const parts = pos.split(\" \");\n  if (parts.length !== 2) {\n    return false;\n  }\n  if ([\"top\", \"center\", \"bottom\"].includes(parts[0]) !== true) {\n    console.error(\"Anchor/Self position must start with one of top/center/bottom\");\n    return false;\n  }\n  if ([\"left\", \"middle\", \"right\", \"start\", \"end\"].includes(parts[1]) !== true) {\n    console.error(\"Anchor/Self position must end with one of left/middle/right/start/end\");\n    return false;\n  }\n  return true;\n}\nfunction validateOffset(val) {\n  if (!val) {\n    return true;\n  }\n  if (val.length !== 2) {\n    return false;\n  }\n  if (typeof val[0] !== \"number\" || typeof val[1] !== \"number\") {\n    return false;\n  }\n  return true;\n}\nvar horizontalPos = {\n  \"start#ltr\": \"left\",\n  \"start#rtl\": \"right\",\n  \"end#ltr\": \"right\",\n  \"end#rtl\": \"left\"\n};\n[\"left\", \"middle\", \"right\"].forEach((pos) => {\n  horizontalPos[`${pos}#ltr`] = pos;\n  horizontalPos[`${pos}#rtl`] = pos;\n});\nfunction parsePosition(pos, rtl) {\n  const parts = pos.split(\" \");\n  return {\n    vertical: parts[0],\n    horizontal: horizontalPos[`${parts[1]}#${rtl === true ? \"rtl\" : \"ltr\"}`]\n  };\n}\nfunction getAnchorProps(el, offset2) {\n  let { top, left, right, bottom, width: width3, height: height2 } = el.getBoundingClientRect();\n  if (offset2 !== void 0) {\n    top -= offset2[1];\n    left -= offset2[0];\n    bottom += offset2[1];\n    right += offset2[0];\n    width3 += offset2[0];\n    height2 += offset2[1];\n  }\n  return {\n    top,\n    bottom,\n    height: height2,\n    left,\n    right,\n    width: width3,\n    middle: left + (right - left) / 2,\n    center: top + (bottom - top) / 2\n  };\n}\nfunction getAbsoluteAnchorProps(el, absoluteOffset, offset2) {\n  let { top, left } = el.getBoundingClientRect();\n  top += absoluteOffset.top;\n  left += absoluteOffset.left;\n  if (offset2 !== void 0) {\n    top += offset2[1];\n    left += offset2[0];\n  }\n  return {\n    top,\n    bottom: top + 1,\n    height: 1,\n    left,\n    right: left + 1,\n    width: 1,\n    middle: left,\n    center: top\n  };\n}\nfunction getTargetProps(width3, height2) {\n  return {\n    top: 0,\n    center: height2 / 2,\n    bottom: height2,\n    left: 0,\n    middle: width3 / 2,\n    right: width3\n  };\n}\nfunction getTopLeftProps(anchorProps, targetProps, anchorOrigin, selfOrigin) {\n  return {\n    top: anchorProps[anchorOrigin.vertical] - targetProps[selfOrigin.vertical],\n    left: anchorProps[anchorOrigin.horizontal] - targetProps[selfOrigin.horizontal]\n  };\n}\nfunction setPosition(cfg, retryNumber = 0) {\n  if (cfg.targetEl === null || cfg.anchorEl === null || retryNumber > 5) return;\n  if (cfg.targetEl.offsetHeight === 0 || cfg.targetEl.offsetWidth === 0) {\n    setTimeout(() => {\n      setPosition(cfg, retryNumber + 1);\n    }, 10);\n    return;\n  }\n  const {\n    targetEl,\n    offset: offset2,\n    anchorEl,\n    anchorOrigin,\n    selfOrigin,\n    absoluteOffset,\n    fit,\n    cover,\n    maxHeight,\n    maxWidth\n  } = cfg;\n  if (client.is.ios === true && window.visualViewport !== void 0) {\n    const el = document.body.style;\n    const { offsetLeft: left, offsetTop: top } = window.visualViewport;\n    if (left !== vpLeft) {\n      el.setProperty(\"--q-pe-left\", left + \"px\");\n      vpLeft = left;\n    }\n    if (top !== vpTop) {\n      el.setProperty(\"--q-pe-top\", top + \"px\");\n      vpTop = top;\n    }\n  }\n  const { scrollLeft, scrollTop } = targetEl;\n  const anchorProps = absoluteOffset === void 0 ? getAnchorProps(anchorEl, cover === true ? [0, 0] : offset2) : getAbsoluteAnchorProps(anchorEl, absoluteOffset, offset2);\n  Object.assign(targetEl.style, {\n    top: 0,\n    left: 0,\n    minWidth: null,\n    minHeight: null,\n    maxWidth,\n    maxHeight,\n    visibility: \"visible\"\n  });\n  const { offsetWidth: origElWidth, offsetHeight: origElHeight } = targetEl;\n  const { elWidth, elHeight } = fit === true || cover === true ? { elWidth: Math.max(anchorProps.width, origElWidth), elHeight: cover === true ? Math.max(anchorProps.height, origElHeight) : origElHeight } : { elWidth: origElWidth, elHeight: origElHeight };\n  let elStyle = { maxWidth, maxHeight };\n  if (fit === true || cover === true) {\n    elStyle.minWidth = anchorProps.width + \"px\";\n    if (cover === true) {\n      elStyle.minHeight = anchorProps.height + \"px\";\n    }\n  }\n  Object.assign(targetEl.style, elStyle);\n  const targetProps = getTargetProps(elWidth, elHeight);\n  let props4 = getTopLeftProps(anchorProps, targetProps, anchorOrigin, selfOrigin);\n  if (absoluteOffset === void 0 || offset2 === void 0) {\n    applyBoundaries(props4, anchorProps, targetProps, anchorOrigin, selfOrigin);\n  } else {\n    const { top, left } = props4;\n    applyBoundaries(props4, anchorProps, targetProps, anchorOrigin, selfOrigin);\n    let hasChanged = false;\n    if (props4.top !== top) {\n      hasChanged = true;\n      const offsetY = 2 * offset2[1];\n      anchorProps.center = anchorProps.top -= offsetY;\n      anchorProps.bottom -= offsetY + 2;\n    }\n    if (props4.left !== left) {\n      hasChanged = true;\n      const offsetX = 2 * offset2[0];\n      anchorProps.middle = anchorProps.left -= offsetX;\n      anchorProps.right -= offsetX + 2;\n    }\n    if (hasChanged === true) {\n      props4 = getTopLeftProps(anchorProps, targetProps, anchorOrigin, selfOrigin);\n      applyBoundaries(props4, anchorProps, targetProps, anchorOrigin, selfOrigin);\n    }\n  }\n  elStyle = {\n    top: props4.top + \"px\",\n    left: props4.left + \"px\"\n  };\n  if (props4.maxHeight !== void 0) {\n    elStyle.maxHeight = props4.maxHeight + \"px\";\n    if (anchorProps.height > props4.maxHeight) {\n      elStyle.minHeight = elStyle.maxHeight;\n    }\n  }\n  if (props4.maxWidth !== void 0) {\n    elStyle.maxWidth = props4.maxWidth + \"px\";\n    if (anchorProps.width > props4.maxWidth) {\n      elStyle.minWidth = elStyle.maxWidth;\n    }\n  }\n  Object.assign(targetEl.style, elStyle);\n  if (targetEl.scrollTop !== scrollTop) {\n    targetEl.scrollTop = scrollTop;\n  }\n  if (targetEl.scrollLeft !== scrollLeft) {\n    targetEl.scrollLeft = scrollLeft;\n  }\n}\nfunction applyBoundaries(props4, anchorProps, targetProps, anchorOrigin, selfOrigin) {\n  const currentHeight = targetProps.bottom, currentWidth = targetProps.right, margin = getScrollbarWidth(), innerHeight = window.innerHeight - margin, innerWidth = document.body.clientWidth;\n  if (props4.top < 0 || props4.top + currentHeight > innerHeight) {\n    if (selfOrigin.vertical === \"center\") {\n      props4.top = anchorProps[anchorOrigin.vertical] > innerHeight / 2 ? Math.max(0, innerHeight - currentHeight) : 0;\n      props4.maxHeight = Math.min(currentHeight, innerHeight);\n    } else if (anchorProps[anchorOrigin.vertical] > innerHeight / 2) {\n      const anchorY = Math.min(\n        innerHeight,\n        anchorOrigin.vertical === \"center\" ? anchorProps.center : anchorOrigin.vertical === selfOrigin.vertical ? anchorProps.bottom : anchorProps.top\n      );\n      props4.maxHeight = Math.min(currentHeight, anchorY);\n      props4.top = Math.max(0, anchorY - currentHeight);\n    } else {\n      props4.top = Math.max(\n        0,\n        anchorOrigin.vertical === \"center\" ? anchorProps.center : anchorOrigin.vertical === selfOrigin.vertical ? anchorProps.top : anchorProps.bottom\n      );\n      props4.maxHeight = Math.min(currentHeight, innerHeight - props4.top);\n    }\n  }\n  if (props4.left < 0 || props4.left + currentWidth > innerWidth) {\n    props4.maxWidth = Math.min(currentWidth, innerWidth);\n    if (selfOrigin.horizontal === \"middle\") {\n      props4.left = anchorProps[anchorOrigin.horizontal] > innerWidth / 2 ? Math.max(0, innerWidth - currentWidth) : 0;\n    } else if (anchorProps[anchorOrigin.horizontal] > innerWidth / 2) {\n      const anchorX = Math.min(\n        innerWidth,\n        anchorOrigin.horizontal === \"middle\" ? anchorProps.middle : anchorOrigin.horizontal === selfOrigin.horizontal ? anchorProps.right : anchorProps.left\n      );\n      props4.maxWidth = Math.min(currentWidth, anchorX);\n      props4.left = Math.max(0, anchorX - props4.maxWidth);\n    } else {\n      props4.left = Math.max(\n        0,\n        anchorOrigin.horizontal === \"middle\" ? anchorProps.middle : anchorOrigin.horizontal === selfOrigin.horizontal ? anchorProps.left : anchorProps.right\n      );\n      props4.maxWidth = Math.min(currentWidth, innerWidth - props4.left);\n    }\n  }\n}\n\n// src/components/menu/QMenu.js\nvar QMenu_default = createComponent({\n  name: \"QMenu\",\n  inheritAttrs: false,\n  props: {\n    ...useAnchorProps,\n    ...useModelToggleProps,\n    ...useDarkProps,\n    ...useTransitionProps,\n    persistent: Boolean,\n    autoClose: Boolean,\n    separateClosePopup: Boolean,\n    noRouteDismiss: Boolean,\n    noRefocus: Boolean,\n    noFocus: Boolean,\n    fit: Boolean,\n    cover: Boolean,\n    square: Boolean,\n    anchor: {\n      type: String,\n      validator: validatePosition\n    },\n    self: {\n      type: String,\n      validator: validatePosition\n    },\n    offset: {\n      type: Array,\n      validator: validateOffset\n    },\n    scrollTarget: scrollTargetProp,\n    touchPosition: Boolean,\n    maxHeight: {\n      type: String,\n      default: null\n    },\n    maxWidth: {\n      type: String,\n      default: null\n    }\n  },\n  emits: [\n    ...useModelToggleEmits,\n    \"click\",\n    \"escapeKey\"\n  ],\n  setup(props4, { slots, emit, attrs }) {\n    let refocusTarget = null, absoluteOffset, unwatchPosition, avoidAutoClose;\n    const vm2 = getCurrentInstance11();\n    const { proxy } = vm2;\n    const { $q } = proxy;\n    const innerRef = ref7(null);\n    const showing = ref7(false);\n    const hideOnRouteChange = computed18(\n      () => props4.persistent !== true && props4.noRouteDismiss !== true\n    );\n    const isDark = use_dark_default(props4, $q);\n    const { registerTick, removeTick } = use_tick_default();\n    const { registerTimeout } = use_timeout_default();\n    const { transitionProps, transitionStyle } = use_transition_default(props4);\n    const { localScrollTarget, changeScrollEvent, unconfigureScrollTarget } = use_scroll_target_default(props4, configureScrollTarget);\n    const { anchorEl, canShow } = use_anchor_default({ showing });\n    const { hide } = use_model_toggle_default({\n      showing,\n      canShow,\n      handleShow,\n      handleHide,\n      hideOnRouteChange,\n      processOnMount: true\n    });\n    const { showPortal, hidePortal, renderPortal } = use_portal_default(vm2, innerRef, renderPortalContent, \"menu\");\n    const clickOutsideProps = {\n      anchorEl,\n      innerRef,\n      onClickOutside(e) {\n        if (props4.persistent !== true && showing.value === true) {\n          hide(e);\n          if (\n            // always prevent touch event\n            e.type === \"touchstart\" || e.target.classList.contains(\"q-dialog__backdrop\")\n          ) {\n            stopAndPrevent(e);\n          }\n          return true;\n        }\n      }\n    };\n    const anchorOrigin = computed18(\n      () => parsePosition(\n        props4.anchor || (props4.cover === true ? \"center middle\" : \"bottom start\"),\n        $q.lang.rtl\n      )\n    );\n    const selfOrigin = computed18(() => props4.cover === true ? anchorOrigin.value : parsePosition(props4.self || \"top start\", $q.lang.rtl));\n    const menuClass = computed18(\n      () => (props4.square === true ? \" q-menu--square\" : \"\") + (isDark.value === true ? \" q-menu--dark q-dark\" : \"\")\n    );\n    const onEvents = computed18(() => props4.autoClose === true ? { onClick: onAutoClose } : {});\n    const handlesFocus = computed18(\n      () => showing.value === true && props4.persistent !== true\n    );\n    watch4(handlesFocus, (val) => {\n      if (val === true) {\n        addEscapeKey(onEscapeKey);\n        addClickOutside(clickOutsideProps);\n      } else {\n        removeEscapeKey(onEscapeKey);\n        removeClickOutside(clickOutsideProps);\n      }\n    });\n    function focus() {\n      addFocusFn(() => {\n        let node = innerRef.value;\n        if (node && node.contains(document.activeElement) !== true) {\n          node = node.querySelector(\"[autofocus][tabindex], [data-autofocus][tabindex]\") || node.querySelector(\"[autofocus] [tabindex], [data-autofocus] [tabindex]\") || node.querySelector(\"[autofocus], [data-autofocus]\") || node;\n          node.focus({ preventScroll: true });\n        }\n      });\n    }\n    function handleShow(evt) {\n      refocusTarget = props4.noRefocus === false ? document.activeElement : null;\n      addFocusout(onFocusout);\n      showPortal();\n      configureScrollTarget();\n      absoluteOffset = void 0;\n      if (evt !== void 0 && (props4.touchPosition || props4.contextMenu)) {\n        const pos = position(evt);\n        if (pos.left !== void 0) {\n          const { top, left } = anchorEl.value.getBoundingClientRect();\n          absoluteOffset = { left: pos.left - left, top: pos.top - top };\n        }\n      }\n      if (unwatchPosition === void 0) {\n        unwatchPosition = watch4(\n          () => $q.screen.width + \"|\" + $q.screen.height + \"|\" + props4.self + \"|\" + props4.anchor + \"|\" + $q.lang.rtl,\n          updatePosition\n        );\n      }\n      if (props4.noFocus !== true) {\n        document.activeElement.blur();\n      }\n      registerTick(() => {\n        updatePosition();\n        props4.noFocus !== true && focus();\n      });\n      registerTimeout(() => {\n        if ($q.platform.is.ios === true) {\n          avoidAutoClose = props4.autoClose;\n          innerRef.value.click();\n        }\n        updatePosition();\n        showPortal(true);\n        emit(\"show\", evt);\n      }, props4.transitionDuration);\n    }\n    function handleHide(evt) {\n      removeTick();\n      hidePortal();\n      anchorCleanup(true);\n      if (refocusTarget !== null && // menu was hidden from code or ESC plugin\n      (evt === void 0 || evt.qClickOutside !== true)) {\n        ((evt && evt.type.indexOf(\"key\") === 0 ? refocusTarget.closest('[tabindex]:not([tabindex^=\"-\"])') : void 0) || refocusTarget).focus();\n        refocusTarget = null;\n      }\n      registerTimeout(() => {\n        hidePortal(true);\n        emit(\"hide\", evt);\n      }, props4.transitionDuration);\n    }\n    function anchorCleanup(hiding) {\n      absoluteOffset = void 0;\n      if (unwatchPosition !== void 0) {\n        unwatchPosition();\n        unwatchPosition = void 0;\n      }\n      if (hiding === true || showing.value === true) {\n        removeFocusout(onFocusout);\n        unconfigureScrollTarget();\n        removeClickOutside(clickOutsideProps);\n        removeEscapeKey(onEscapeKey);\n      }\n      if (hiding !== true) {\n        refocusTarget = null;\n      }\n    }\n    function configureScrollTarget() {\n      if (anchorEl.value !== null || props4.scrollTarget !== void 0) {\n        localScrollTarget.value = getScrollTarget(anchorEl.value, props4.scrollTarget);\n        changeScrollEvent(localScrollTarget.value, updatePosition);\n      }\n    }\n    function onAutoClose(e) {\n      if (avoidAutoClose !== true) {\n        closePortalMenus(proxy, e);\n        emit(\"click\", e);\n      } else {\n        avoidAutoClose = false;\n      }\n    }\n    function onFocusout(evt) {\n      if (handlesFocus.value === true && props4.noFocus !== true && childHasFocus(innerRef.value, evt.target) !== true) {\n        focus();\n      }\n    }\n    function onEscapeKey(evt) {\n      emit(\"escapeKey\");\n      hide(evt);\n    }\n    function updatePosition() {\n      setPosition({\n        targetEl: innerRef.value,\n        offset: props4.offset,\n        anchorEl: anchorEl.value,\n        anchorOrigin: anchorOrigin.value,\n        selfOrigin: selfOrigin.value,\n        absoluteOffset,\n        fit: props4.fit,\n        cover: props4.cover,\n        maxHeight: props4.maxHeight,\n        maxWidth: props4.maxWidth\n      });\n    }\n    function renderPortalContent() {\n      return h14(\n        Transition2,\n        transitionProps.value,\n        () => showing.value === true ? h14(\"div\", {\n          role: \"menu\",\n          ...attrs,\n          ref: innerRef,\n          tabindex: -1,\n          class: [\n            \"q-menu q-position-engine scroll\" + menuClass.value,\n            attrs.class\n          ],\n          style: [\n            attrs.style,\n            transitionStyle.value\n          ],\n          ...onEvents.value\n        }, hSlot(slots.default)) : null\n      );\n    }\n    onBeforeUnmount7(anchorCleanup);\n    Object.assign(proxy, { focus, updatePosition });\n    return renderPortal;\n  }\n});\n\n// src/composables/use-id/use-id.js\nimport { ref as ref8, computed as computed19, watch as watch5, onMounted as onMounted4 } from \"vue\";\n\n// src/utils/uid/uid.js\nvar buf;\nvar bufIdx = 0;\nvar hexBytes = new Array(256);\nfor (let i = 0; i < 256; i++) {\n  hexBytes[i] = (i + 256).toString(16).substring(1);\n}\nvar randomBytes = (() => {\n  const lib = typeof crypto !== \"undefined\" ? crypto : typeof window !== \"undefined\" ? window.crypto || window.msCrypto : void 0;\n  if (lib !== void 0) {\n    if (lib.randomBytes !== void 0) {\n      return lib.randomBytes;\n    }\n    if (lib.getRandomValues !== void 0) {\n      return (n) => {\n        const bytes = new Uint8Array(n);\n        lib.getRandomValues(bytes);\n        return bytes;\n      };\n    }\n  }\n  return (n) => {\n    const r = [];\n    for (let i = n; i > 0; i--) {\n      r.push(Math.floor(Math.random() * 256));\n    }\n    return r;\n  };\n})();\nvar BUFFER_SIZE = 4096;\nfunction uid_default() {\n  if (buf === void 0 || bufIdx + 16 > BUFFER_SIZE) {\n    bufIdx = 0;\n    buf = randomBytes(BUFFER_SIZE);\n  }\n  const b = Array.prototype.slice.call(buf, bufIdx, bufIdx += 16);\n  b[6] = b[6] & 15 | 64;\n  b[8] = b[8] & 63 | 128;\n  return hexBytes[b[0]] + hexBytes[b[1]] + hexBytes[b[2]] + hexBytes[b[3]] + \"-\" + hexBytes[b[4]] + hexBytes[b[5]] + \"-\" + hexBytes[b[6]] + hexBytes[b[7]] + \"-\" + hexBytes[b[8]] + hexBytes[b[9]] + \"-\" + hexBytes[b[10]] + hexBytes[b[11]] + hexBytes[b[12]] + hexBytes[b[13]] + hexBytes[b[14]] + hexBytes[b[15]];\n}\n\n// src/composables/use-id/use-id.js\nfunction parseValue(val) {\n  return val === void 0 || val === null ? null : val;\n}\nfunction getId(val, required) {\n  return val === void 0 || val === null ? required === true ? `f_${uid_default()}` : null : val;\n}\nfunction use_id_default({ getValue, required = true } = {}) {\n  if (isRuntimeSsrPreHydration.value === true) {\n    const id3 = getValue !== void 0 ? ref8(parseValue(getValue())) : ref8(null);\n    if (required === true && id3.value === null) {\n      onMounted4(() => {\n        id3.value = `f_${uid_default()}`;\n      });\n    }\n    if (getValue !== void 0) {\n      watch5(getValue, (newId) => {\n        id3.value = getId(newId, required);\n      });\n    }\n    return id3;\n  }\n  return getValue !== void 0 ? computed19(() => getId(getValue(), required)) : ref8(`f_${uid_default()}`);\n}\n\n// src/components/btn-dropdown/QBtnDropdown.js\nvar btnPropsList = Object.keys(nonRoundBtnProps);\nfunction passBtnProps(props4) {\n  return btnPropsList.reduce((acc, key) => {\n    const val = props4[key];\n    if (val !== void 0) {\n      acc[key] = val;\n    }\n    return acc;\n  }, {});\n}\nvar QBtnDropdown_default = createComponent({\n  name: \"QBtnDropdown\",\n  props: {\n    ...nonRoundBtnProps,\n    ...useTransitionProps,\n    modelValue: Boolean,\n    split: Boolean,\n    dropdownIcon: String,\n    contentClass: [Array, String, Object],\n    contentStyle: [Array, String, Object],\n    cover: Boolean,\n    persistent: Boolean,\n    noRouteDismiss: Boolean,\n    autoClose: Boolean,\n    menuAnchor: {\n      type: String,\n      default: \"bottom end\"\n    },\n    menuSelf: {\n      type: String,\n      default: \"top end\"\n    },\n    menuOffset: Array,\n    disableMainBtn: Boolean,\n    disableDropdown: Boolean,\n    noIconAnimation: Boolean,\n    toggleAriaLabel: String\n  },\n  emits: [\"update:modelValue\", \"click\", \"beforeShow\", \"show\", \"beforeHide\", \"hide\"],\n  setup(props4, { slots, emit }) {\n    const { proxy } = getCurrentInstance12();\n    const showing = ref9(props4.modelValue);\n    const menuRef = ref9(null);\n    const targetUid = use_id_default();\n    const ariaAttrs = computed20(() => {\n      const acc = {\n        \"aria-expanded\": showing.value === true ? \"true\" : \"false\",\n        \"aria-haspopup\": \"true\",\n        \"aria-controls\": targetUid.value,\n        \"aria-label\": props4.toggleAriaLabel || proxy.$q.lang.label[showing.value === true ? \"collapse\" : \"expand\"](props4.label)\n      };\n      if (props4.disable === true || (props4.split === false && props4.disableMainBtn === true || props4.disableDropdown === true)) {\n        acc[\"aria-disabled\"] = \"true\";\n      }\n      return acc;\n    });\n    const iconClass = computed20(\n      () => \"q-btn-dropdown__arrow\" + (showing.value === true && props4.noIconAnimation === false ? \" rotate-180\" : \"\") + (props4.split === false ? \" q-btn-dropdown__arrow-container\" : \"\")\n    );\n    const btnDesignAttr = computed20(() => getBtnDesignAttr(props4));\n    const btnProps = computed20(() => passBtnProps(props4));\n    watch6(() => props4.modelValue, (val) => {\n      menuRef.value !== null && menuRef.value[val ? \"show\" : \"hide\"]();\n    });\n    watch6(() => props4.split, hide);\n    function onBeforeShow(e) {\n      showing.value = true;\n      emit(\"beforeShow\", e);\n    }\n    function onShow(e) {\n      emit(\"show\", e);\n      emit(\"update:modelValue\", true);\n    }\n    function onBeforeHide(e) {\n      showing.value = false;\n      emit(\"beforeHide\", e);\n    }\n    function onHide(e) {\n      emit(\"hide\", e);\n      emit(\"update:modelValue\", false);\n    }\n    function onClick(e) {\n      emit(\"click\", e);\n    }\n    function onClickHide(e) {\n      stop(e);\n      hide();\n      emit(\"click\", e);\n    }\n    function toggle(evt) {\n      menuRef.value !== null && menuRef.value.toggle(evt);\n    }\n    function show(evt) {\n      menuRef.value !== null && menuRef.value.show(evt);\n    }\n    function hide(evt) {\n      menuRef.value !== null && menuRef.value.hide(evt);\n    }\n    Object.assign(proxy, {\n      show,\n      hide,\n      toggle\n    });\n    onMounted5(() => {\n      props4.modelValue === true && show();\n    });\n    return () => {\n      const Arrow = [\n        h15(QIcon_default, {\n          class: iconClass.value,\n          name: props4.dropdownIcon || proxy.$q.iconSet.arrow.dropdown\n        })\n      ];\n      props4.disableDropdown !== true && Arrow.push(\n        h15(QMenu_default, {\n          ref: menuRef,\n          id: targetUid.value,\n          class: props4.contentClass,\n          style: props4.contentStyle,\n          cover: props4.cover,\n          fit: true,\n          persistent: props4.persistent,\n          noRouteDismiss: props4.noRouteDismiss,\n          autoClose: props4.autoClose,\n          anchor: props4.menuAnchor,\n          self: props4.menuSelf,\n          offset: props4.menuOffset,\n          separateClosePopup: true,\n          transitionShow: props4.transitionShow,\n          transitionHide: props4.transitionHide,\n          transitionDuration: props4.transitionDuration,\n          onBeforeShow,\n          onShow,\n          onBeforeHide,\n          onHide\n        }, slots.default)\n      );\n      if (props4.split === false) {\n        return h15(QBtn_default, {\n          class: \"q-btn-dropdown q-btn-dropdown--simple\",\n          ...btnProps.value,\n          ...ariaAttrs.value,\n          disable: props4.disable === true || props4.disableMainBtn === true,\n          noWrap: true,\n          round: false,\n          onClick\n        }, {\n          default: () => hSlot(slots.label, []).concat(Arrow),\n          loading: slots.loading\n        });\n      }\n      return h15(QBtnGroup_default, {\n        class: \"q-btn-dropdown q-btn-dropdown--split no-wrap q-btn-item\",\n        rounded: props4.rounded,\n        square: props4.square,\n        ...btnDesignAttr.value,\n        glossy: props4.glossy,\n        stretch: props4.stretch\n      }, () => [\n        h15(QBtn_default, {\n          class: \"q-btn-dropdown--current\",\n          ...btnProps.value,\n          disable: props4.disable === true || props4.disableMainBtn === true,\n          noWrap: true,\n          round: false,\n          onClick: onClickHide\n        }, {\n          default: slots.label,\n          loading: slots.loading\n        }),\n        h15(QBtn_default, {\n          class: \"q-btn-dropdown__arrow-container q-anchor--skip\",\n          ...ariaAttrs.value,\n          ...btnDesignAttr.value,\n          disable: props4.disable === true || props4.disableDropdown === true,\n          rounded: props4.rounded,\n          color: props4.color,\n          textColor: props4.textColor,\n          dense: props4.dense,\n          size: props4.size,\n          padding: props4.padding,\n          ripple: props4.ripple\n        }, () => Arrow)\n      ]);\n    };\n  }\n});\n\n// src/components/btn-toggle/QBtnToggle.js\nimport { h as h17, computed as computed22 } from \"vue\";\n\n// src/composables/use-form/private.use-form.js\nimport { h as h16, computed as computed21 } from \"vue\";\nvar useFormProps = {\n  name: String\n};\nfunction useFormAttrs(props4) {\n  return computed21(() => ({\n    type: \"hidden\",\n    name: props4.name,\n    value: props4.modelValue\n  }));\n}\nfunction useFormInject(formAttrs = {}) {\n  return (child, action, className) => {\n    child[action](\n      h16(\"input\", {\n        class: \"hidden\" + (className || \"\"),\n        ...formAttrs.value\n      })\n    );\n  };\n}\nfunction useFormInputNameAttr(props4) {\n  return computed21(() => props4.name || props4.for);\n}\n\n// src/components/btn-toggle/QBtnToggle.js\nvar QBtnToggle_default = createComponent({\n  name: \"QBtnToggle\",\n  props: {\n    ...useFormProps,\n    modelValue: {\n      required: true\n    },\n    options: {\n      type: Array,\n      required: true,\n      validator: (v) => v.every(\n        (opt) => (\"label\" in opt || \"icon\" in opt || \"slot\" in opt) && \"value\" in opt\n      )\n    },\n    // To avoid seeing the active raise shadow through\n    // the transparent button, give it a color (even white)\n    color: String,\n    textColor: String,\n    toggleColor: {\n      type: String,\n      default: \"primary\"\n    },\n    toggleTextColor: String,\n    outline: Boolean,\n    flat: Boolean,\n    unelevated: Boolean,\n    rounded: Boolean,\n    push: Boolean,\n    glossy: Boolean,\n    size: String,\n    padding: String,\n    noCaps: Boolean,\n    noWrap: Boolean,\n    dense: Boolean,\n    readonly: Boolean,\n    disable: Boolean,\n    stack: Boolean,\n    stretch: Boolean,\n    spread: Boolean,\n    clearable: Boolean,\n    ripple: {\n      type: [Boolean, Object],\n      default: true\n    }\n  },\n  emits: [\"update:modelValue\", \"clear\", \"click\"],\n  setup(props4, { slots, emit }) {\n    const hasActiveValue = computed22(\n      () => props4.options.find((opt) => opt.value === props4.modelValue) !== void 0\n    );\n    const formAttrs = computed22(() => ({\n      type: \"hidden\",\n      name: props4.name,\n      value: props4.modelValue\n    }));\n    const injectFormInput = useFormInject(formAttrs);\n    const btnDesignAttr = computed22(() => getBtnDesignAttr(props4));\n    const btnOptionDesign = computed22(() => ({\n      rounded: props4.rounded,\n      dense: props4.dense,\n      ...btnDesignAttr.value\n    }));\n    const btnOptions = computed22(() => props4.options.map((item, i) => {\n      const { attrs, value: value2, slot, ...opt } = item;\n      return {\n        slot,\n        props: {\n          key: i,\n          \"aria-pressed\": value2 === props4.modelValue ? \"true\" : \"false\",\n          ...attrs,\n          ...opt,\n          ...btnOptionDesign.value,\n          disable: props4.disable === true || opt.disable === true,\n          // Options that come from the button specific options first, then from general props\n          color: value2 === props4.modelValue ? mergeOpt(opt, \"toggleColor\") : mergeOpt(opt, \"color\"),\n          textColor: value2 === props4.modelValue ? mergeOpt(opt, \"toggleTextColor\") : mergeOpt(opt, \"textColor\"),\n          noCaps: mergeOpt(opt, \"noCaps\") === true,\n          noWrap: mergeOpt(opt, \"noWrap\") === true,\n          size: mergeOpt(opt, \"size\"),\n          padding: mergeOpt(opt, \"padding\"),\n          ripple: mergeOpt(opt, \"ripple\"),\n          stack: mergeOpt(opt, \"stack\") === true,\n          stretch: mergeOpt(opt, \"stretch\") === true,\n          onClick(e) {\n            set2(value2, item, e);\n          }\n        }\n      };\n    }));\n    function set2(value2, opt, e) {\n      if (props4.readonly !== true) {\n        if (props4.modelValue === value2) {\n          if (props4.clearable === true) {\n            emit(\"update:modelValue\", null, null);\n            emit(\"clear\");\n          }\n        } else {\n          emit(\"update:modelValue\", value2, opt);\n        }\n        emit(\"click\", e);\n      }\n    }\n    function mergeOpt(opt, key) {\n      return opt[key] === void 0 ? props4[key] : opt[key];\n    }\n    function getContent() {\n      const child = btnOptions.value.map((opt) => {\n        return h17(QBtn_default, opt.props, opt.slot !== void 0 ? slots[opt.slot] : void 0);\n      });\n      if (props4.name !== void 0 && props4.disable !== true && hasActiveValue.value === true) {\n        injectFormInput(child, \"push\");\n      }\n      return hMergeSlot(slots.default, child);\n    }\n    return () => h17(QBtnGroup_default, {\n      class: \"q-btn-toggle\",\n      ...btnDesignAttr.value,\n      rounded: props4.rounded,\n      stretch: props4.stretch,\n      glossy: props4.glossy,\n      spread: props4.spread\n    }, getContent);\n  }\n});\n\n// src/components/card/QCard.js\nimport { h as h18, computed as computed23, getCurrentInstance as getCurrentInstance13 } from \"vue\";\nvar QCard_default = createComponent({\n  name: \"QCard\",\n  props: {\n    ...useDarkProps,\n    tag: {\n      type: String,\n      default: \"div\"\n    },\n    square: Boolean,\n    flat: Boolean,\n    bordered: Boolean\n  },\n  setup(props4, { slots }) {\n    const { proxy: { $q } } = getCurrentInstance13();\n    const isDark = use_dark_default(props4, $q);\n    const classes = computed23(\n      () => \"q-card\" + (isDark.value === true ? \" q-card--dark q-dark\" : \"\") + (props4.bordered === true ? \" q-card--bordered\" : \"\") + (props4.square === true ? \" q-card--square no-border-radius\" : \"\") + (props4.flat === true ? \" q-card--flat no-shadow\" : \"\")\n    );\n    return () => h18(props4.tag, { class: classes.value }, hSlot(slots.default));\n  }\n});\n\n// src/components/card/QCardSection.js\nimport { h as h19, computed as computed24 } from \"vue\";\nvar QCardSection_default = createComponent({\n  name: \"QCardSection\",\n  props: {\n    tag: {\n      type: String,\n      default: \"div\"\n    },\n    horizontal: Boolean\n  },\n  setup(props4, { slots }) {\n    const classes = computed24(\n      () => `q-card__section q-card__section--${props4.horizontal === true ? \"horiz row no-wrap\" : \"vert\"}`\n    );\n    return () => h19(props4.tag, { class: classes.value }, hSlot(slots.default));\n  }\n});\n\n// src/components/card/QCardActions.js\nimport { h as h20, computed as computed25 } from \"vue\";\nvar QCardActions_default = createComponent({\n  name: \"QCardActions\",\n  props: {\n    ...useAlignProps,\n    vertical: Boolean\n  },\n  setup(props4, { slots }) {\n    const alignClass = use_align_default(props4);\n    const classes = computed25(\n      () => `q-card__actions ${alignClass.value} q-card__actions--${props4.vertical === true ? \"vert column\" : \"horiz row\"}`\n    );\n    return () => h20(\"div\", { class: classes.value }, hSlot(slots.default));\n  }\n});\n\n// src/components/carousel/QCarousel.js\nimport { h as h22, computed as computed27, watch as watch9, onMounted as onMounted7, onBeforeUnmount as onBeforeUnmount9, getCurrentInstance as getCurrentInstance16 } from \"vue\";\n\n// src/composables/private.use-panel/use-panel.js\nimport { h as h21, ref as ref10, computed as computed26, watch as watch7, getCurrentInstance as getCurrentInstance14, Transition as Transition3, KeepAlive } from \"vue\";\n\n// src/utils/private.touch/touch.js\nvar modifiersAll = {\n  left: true,\n  right: true,\n  up: true,\n  down: true,\n  horizontal: true,\n  vertical: true\n};\nvar directionList = Object.keys(modifiersAll);\nmodifiersAll.all = true;\nfunction getModifierDirections(mod2) {\n  const dir = {};\n  for (const direction of directionList) {\n    if (mod2[direction] === true) {\n      dir[direction] = true;\n    }\n  }\n  if (Object.keys(dir).length === 0) {\n    return modifiersAll;\n  }\n  if (dir.horizontal === true) {\n    dir.left = dir.right = true;\n  } else if (dir.left === true && dir.right === true) {\n    dir.horizontal = true;\n  }\n  if (dir.vertical === true) {\n    dir.up = dir.down = true;\n  } else if (dir.up === true && dir.down === true) {\n    dir.vertical = true;\n  }\n  if (dir.horizontal === true && dir.vertical === true) {\n    dir.all = true;\n  }\n  return dir;\n}\nvar avoidNodeNamesList = [\"INPUT\", \"TEXTAREA\"];\nfunction shouldStart(evt, ctx) {\n  return ctx.event === void 0 && evt.target !== void 0 && evt.target.draggable !== true && typeof ctx.handler === \"function\" && avoidNodeNamesList.includes(evt.target.nodeName.toUpperCase()) === false && (evt.qClonedBy === void 0 || evt.qClonedBy.indexOf(ctx.uid) === -1);\n}\n\n// src/directives/touch-swipe/TouchSwipe.js\nfunction parseArg(arg) {\n  const data = [0.06, 6, 50];\n  if (typeof arg === \"string\" && arg.length) {\n    arg.split(\":\").forEach((val, index) => {\n      const v = parseFloat(val);\n      v && (data[index] = v);\n    });\n  }\n  return data;\n}\nvar TouchSwipe_default = createDirective(\n  false ? { name: \"touch-swipe\", getSSRProps: noop_ssr_directive_transform_default } : {\n    name: \"touch-swipe\",\n    beforeMount(el, { value: value2, arg, modifiers }) {\n      if (modifiers.mouse !== true && client.has.touch !== true) return;\n      const mouseCapture = modifiers.mouseCapture === true ? \"Capture\" : \"\";\n      const ctx = {\n        handler: value2,\n        sensitivity: parseArg(arg),\n        direction: getModifierDirections(modifiers),\n        noop,\n        mouseStart(evt) {\n          if (shouldStart(evt, ctx) && leftClick(evt)) {\n            addEvt(ctx, \"temp\", [\n              [document, \"mousemove\", \"move\", `notPassive${mouseCapture}`],\n              [document, \"mouseup\", \"end\", \"notPassiveCapture\"]\n            ]);\n            ctx.start(evt, true);\n          }\n        },\n        touchStart(evt) {\n          if (shouldStart(evt, ctx)) {\n            const target2 = evt.target;\n            addEvt(ctx, \"temp\", [\n              [target2, \"touchmove\", \"move\", \"notPassiveCapture\"],\n              [target2, \"touchcancel\", \"end\", \"notPassiveCapture\"],\n              [target2, \"touchend\", \"end\", \"notPassiveCapture\"]\n            ]);\n            ctx.start(evt);\n          }\n        },\n        start(evt, mouseEvent) {\n          client.is.firefox === true && preventDraggable(el, true);\n          const pos = position(evt);\n          ctx.event = {\n            x: pos.left,\n            y: pos.top,\n            time: Date.now(),\n            mouse: mouseEvent === true,\n            dir: false\n          };\n        },\n        move(evt) {\n          if (ctx.event === void 0) return;\n          if (ctx.event.dir !== false) {\n            stopAndPrevent(evt);\n            return;\n          }\n          const time = Date.now() - ctx.event.time;\n          if (time === 0) return;\n          const pos = position(evt), distX = pos.left - ctx.event.x, absX = Math.abs(distX), distY = pos.top - ctx.event.y, absY = Math.abs(distY);\n          if (ctx.event.mouse !== true) {\n            if (absX < ctx.sensitivity[1] && absY < ctx.sensitivity[1]) {\n              ctx.end(evt);\n              return;\n            }\n          } else if (window.getSelection().toString() !== \"\") {\n            ctx.end(evt);\n            return;\n          } else if (absX < ctx.sensitivity[2] && absY < ctx.sensitivity[2]) {\n            return;\n          }\n          const velX = absX / time, velY = absY / time;\n          if (ctx.direction.vertical === true && absX < absY && absX < 100 && velY > ctx.sensitivity[0]) {\n            ctx.event.dir = distY < 0 ? \"up\" : \"down\";\n          }\n          if (ctx.direction.horizontal === true && absX > absY && absY < 100 && velX > ctx.sensitivity[0]) {\n            ctx.event.dir = distX < 0 ? \"left\" : \"right\";\n          }\n          if (ctx.direction.up === true && absX < absY && distY < 0 && absX < 100 && velY > ctx.sensitivity[0]) {\n            ctx.event.dir = \"up\";\n          }\n          if (ctx.direction.down === true && absX < absY && distY > 0 && absX < 100 && velY > ctx.sensitivity[0]) {\n            ctx.event.dir = \"down\";\n          }\n          if (ctx.direction.left === true && absX > absY && distX < 0 && absY < 100 && velX > ctx.sensitivity[0]) {\n            ctx.event.dir = \"left\";\n          }\n          if (ctx.direction.right === true && absX > absY && distX > 0 && absY < 100 && velX > ctx.sensitivity[0]) {\n            ctx.event.dir = \"right\";\n          }\n          if (ctx.event.dir !== false) {\n            stopAndPrevent(evt);\n            if (ctx.event.mouse === true) {\n              document.body.classList.add(\"no-pointer-events--children\");\n              document.body.classList.add(\"non-selectable\");\n              clearSelection();\n              ctx.styleCleanup = (withDelay) => {\n                ctx.styleCleanup = void 0;\n                document.body.classList.remove(\"non-selectable\");\n                const remove2 = () => {\n                  document.body.classList.remove(\"no-pointer-events--children\");\n                };\n                if (withDelay === true) {\n                  setTimeout(remove2, 50);\n                } else {\n                  remove2();\n                }\n              };\n            }\n            ctx.handler({\n              evt,\n              touch: ctx.event.mouse !== true,\n              mouse: ctx.event.mouse,\n              direction: ctx.event.dir,\n              duration: time,\n              distance: {\n                x: absX,\n                y: absY\n              }\n            });\n          } else {\n            ctx.end(evt);\n          }\n        },\n        end(evt) {\n          if (ctx.event === void 0) return;\n          cleanEvt(ctx, \"temp\");\n          client.is.firefox === true && preventDraggable(el, false);\n          ctx.styleCleanup !== void 0 && ctx.styleCleanup(true);\n          evt !== void 0 && ctx.event.dir !== false && stopAndPrevent(evt);\n          ctx.event = void 0;\n        }\n      };\n      el.__qtouchswipe = ctx;\n      if (modifiers.mouse === true) {\n        const capture = modifiers.mouseCapture === true || modifiers.mousecapture === true ? \"Capture\" : \"\";\n        addEvt(ctx, \"main\", [\n          [el, \"mousedown\", \"mouseStart\", `passive${capture}`]\n        ]);\n      }\n      client.has.touch === true && addEvt(ctx, \"main\", [\n        [el, \"touchstart\", \"touchStart\", `passive${modifiers.capture === true ? \"Capture\" : \"\"}`],\n        [el, \"touchmove\", \"noop\", \"notPassiveCapture\"]\n        // cannot be passive (ex: iOS scroll)\n      ]);\n    },\n    updated(el, bindings) {\n      const ctx = el.__qtouchswipe;\n      if (ctx !== void 0) {\n        if (bindings.oldValue !== bindings.value) {\n          typeof bindings.value !== \"function\" && ctx.end();\n          ctx.handler = bindings.value;\n        }\n        ctx.direction = getModifierDirections(bindings.modifiers);\n      }\n    },\n    beforeUnmount(el) {\n      const ctx = el.__qtouchswipe;\n      if (ctx !== void 0) {\n        cleanEvt(ctx, \"main\");\n        cleanEvt(ctx, \"temp\");\n        client.is.firefox === true && preventDraggable(el, false);\n        ctx.styleCleanup !== void 0 && ctx.styleCleanup();\n        delete el.__qtouchswipe;\n      }\n    }\n  }\n);\n\n// src/composables/use-render-cache/use-render-cache.js\nfunction use_render_cache_default() {\n  let cache = /* @__PURE__ */ Object.create(null);\n  return {\n    getCache: false ? (_, defaultValue) => typeof defaultValue === \"function\" ? defaultValue() : defaultValue : (key, defaultValue) => cache[key] === void 0 ? cache[key] = typeof defaultValue === \"function\" ? defaultValue() : defaultValue : cache[key],\n    setCache(key, obj) {\n      cache[key] = obj;\n    },\n    hasCache(key) {\n      return Object.hasOwnProperty.call(cache, key);\n    },\n    clearCache(key) {\n      if (key !== void 0) {\n        delete cache[key];\n      } else {\n        cache = /* @__PURE__ */ Object.create(null);\n      }\n    }\n  };\n}\n\n// src/composables/private.use-panel/use-panel.js\nvar usePanelChildProps = {\n  name: { required: true },\n  disable: Boolean\n};\nvar PanelWrapper = {\n  setup(_, { slots }) {\n    return () => h21(\"div\", {\n      class: \"q-panel scroll\",\n      role: \"tabpanel\"\n    }, hSlot(slots.default));\n  }\n};\nvar usePanelProps = {\n  modelValue: {\n    required: true\n  },\n  animated: Boolean,\n  infinite: Boolean,\n  swipeable: Boolean,\n  vertical: Boolean,\n  transitionPrev: String,\n  transitionNext: String,\n  transitionDuration: {\n    type: [String, Number],\n    default: 300\n  },\n  keepAlive: Boolean,\n  keepAliveInclude: [String, Array, RegExp],\n  keepAliveExclude: [String, Array, RegExp],\n  keepAliveMax: Number\n};\nvar usePanelEmits = [\"update:modelValue\", \"beforeTransition\", \"transition\"];\nfunction use_panel_default() {\n  const { props: props4, emit, proxy } = getCurrentInstance14();\n  const { getCache } = use_render_cache_default();\n  const { registerTimeout } = use_timeout_default();\n  let panels, forcedPanelTransition;\n  const panelTransition = ref10(null);\n  const panelIndex = { value: null };\n  function onSwipe(evt) {\n    const dir = props4.vertical === true ? \"up\" : \"left\";\n    goToPanelByOffset((proxy.$q.lang.rtl === true ? -1 : 1) * (evt.direction === dir ? 1 : -1));\n  }\n  const panelDirectives = computed26(() => {\n    return [[\n      TouchSwipe_default,\n      onSwipe,\n      void 0,\n      {\n        horizontal: props4.vertical !== true,\n        vertical: props4.vertical,\n        mouse: true\n      }\n    ]];\n  });\n  const transitionPrev = computed26(\n    () => props4.transitionPrev || `slide-${props4.vertical === true ? \"down\" : \"right\"}`\n  );\n  const transitionNext = computed26(\n    () => props4.transitionNext || `slide-${props4.vertical === true ? \"up\" : \"left\"}`\n  );\n  const transitionStyle = computed26(\n    () => `--q-transition-duration: ${props4.transitionDuration}ms`\n  );\n  const contentKey = computed26(() => typeof props4.modelValue === \"string\" || typeof props4.modelValue === \"number\" ? props4.modelValue : String(props4.modelValue));\n  const keepAliveProps = computed26(() => ({\n    include: props4.keepAliveInclude,\n    exclude: props4.keepAliveExclude,\n    max: props4.keepAliveMax\n  }));\n  const needsUniqueKeepAliveWrapper = computed26(\n    () => props4.keepAliveInclude !== void 0 || props4.keepAliveExclude !== void 0\n  );\n  watch7(() => props4.modelValue, (newVal, oldVal) => {\n    const index = isValidPanelName(newVal) === true ? getPanelIndex(newVal) : -1;\n    if (forcedPanelTransition !== true) {\n      updatePanelTransition(\n        index === -1 ? 0 : index < getPanelIndex(oldVal) ? -1 : 1\n      );\n    }\n    if (panelIndex.value !== index) {\n      panelIndex.value = index;\n      emit(\"beforeTransition\", newVal, oldVal);\n      registerTimeout(() => {\n        emit(\"transition\", newVal, oldVal);\n      }, props4.transitionDuration);\n    }\n  });\n  function nextPanel() {\n    goToPanelByOffset(1);\n  }\n  function previousPanel() {\n    goToPanelByOffset(-1);\n  }\n  function goToPanel(name2) {\n    emit(\"update:modelValue\", name2);\n  }\n  function isValidPanelName(name2) {\n    return name2 !== void 0 && name2 !== null && name2 !== \"\";\n  }\n  function getPanelIndex(name2) {\n    return panels.findIndex((panel) => {\n      return panel.props.name === name2 && panel.props.disable !== \"\" && panel.props.disable !== true;\n    });\n  }\n  function getEnabledPanels() {\n    return panels.filter((panel) => {\n      return panel.props.disable !== \"\" && panel.props.disable !== true;\n    });\n  }\n  function updatePanelTransition(direction) {\n    const val = direction !== 0 && props4.animated === true && panelIndex.value !== -1 ? \"q-transition--\" + (direction === -1 ? transitionPrev.value : transitionNext.value) : null;\n    if (panelTransition.value !== val) {\n      panelTransition.value = val;\n    }\n  }\n  function goToPanelByOffset(direction, startIndex = panelIndex.value) {\n    let index = startIndex + direction;\n    while (index !== -1 && index < panels.length) {\n      const opt = panels[index];\n      if (opt !== void 0 && opt.props.disable !== \"\" && opt.props.disable !== true) {\n        updatePanelTransition(direction);\n        forcedPanelTransition = true;\n        emit(\"update:modelValue\", opt.props.name);\n        setTimeout(() => {\n          forcedPanelTransition = false;\n        });\n        return;\n      }\n      index += direction;\n    }\n    if (props4.infinite === true && panels.length !== 0 && startIndex !== -1 && startIndex !== panels.length) {\n      goToPanelByOffset(direction, direction === -1 ? panels.length : -1);\n    }\n  }\n  function updatePanelIndex() {\n    const index = getPanelIndex(props4.modelValue);\n    if (panelIndex.value !== index) {\n      panelIndex.value = index;\n    }\n    return true;\n  }\n  function getPanelContentChild() {\n    const panel = isValidPanelName(props4.modelValue) === true && updatePanelIndex() && panels[panelIndex.value];\n    return props4.keepAlive === true ? [\n      h21(KeepAlive, keepAliveProps.value, [\n        h21(\n          needsUniqueKeepAliveWrapper.value === true ? getCache(contentKey.value, () => ({ ...PanelWrapper, name: contentKey.value })) : PanelWrapper,\n          { key: contentKey.value, style: transitionStyle.value },\n          () => panel\n        )\n      ])\n    ] : [\n      h21(\"div\", {\n        class: \"q-panel scroll\",\n        style: transitionStyle.value,\n        key: contentKey.value,\n        role: \"tabpanel\"\n      }, [panel])\n    ];\n  }\n  function getPanelContent() {\n    if (panels.length === 0) return;\n    return props4.animated === true ? [h21(Transition3, { name: panelTransition.value }, getPanelContentChild)] : getPanelContentChild();\n  }\n  function updatePanelsList(slots) {\n    panels = getNormalizedVNodes(\n      hSlot(slots.default, [])\n    ).filter(\n      (panel) => panel.props !== null && panel.props.slot === void 0 && isValidPanelName(panel.props.name) === true\n    );\n    return panels.length;\n  }\n  function getPanels() {\n    return panels;\n  }\n  Object.assign(proxy, {\n    next: nextPanel,\n    previous: previousPanel,\n    goTo: goToPanel\n  });\n  return {\n    panelIndex,\n    panelDirectives,\n    updatePanelsList,\n    updatePanelIndex,\n    getPanelContent,\n    getEnabledPanels,\n    getPanels,\n    isValidPanelName,\n    keepAliveProps,\n    needsUniqueKeepAliveWrapper,\n    goToPanelByOffset,\n    goToPanel,\n    nextPanel,\n    previousPanel\n  };\n}\n\n// src/composables/private.use-fullscreen/use-fullscreen.js\nimport { ref as ref11, watch as watch8, onBeforeMount, onMounted as onMounted6, onBeforeUnmount as onBeforeUnmount8, getCurrentInstance as getCurrentInstance15 } from \"vue\";\nvar counter = 0;\nvar useFullscreenProps = {\n  fullscreen: Boolean,\n  noRouteFullscreenExit: Boolean\n};\nvar useFullscreenEmits = [\"update:fullscreen\", \"fullscreen\"];\nfunction use_fullscreen_default() {\n  const vm2 = getCurrentInstance15();\n  const { props: props4, emit, proxy } = vm2;\n  let historyEntry, fullscreenFillerNode, container;\n  const inFullscreen = ref11(false);\n  vmHasRouter(vm2) === true && watch8(() => proxy.$route.fullPath, () => {\n    props4.noRouteFullscreenExit !== true && exitFullscreen();\n  });\n  watch8(() => props4.fullscreen, (v) => {\n    if (inFullscreen.value !== v) {\n      toggleFullscreen();\n    }\n  });\n  watch8(inFullscreen, (v) => {\n    emit(\"update:fullscreen\", v);\n    emit(\"fullscreen\", v);\n  });\n  function toggleFullscreen() {\n    if (inFullscreen.value === true) {\n      exitFullscreen();\n    } else {\n      setFullscreen();\n    }\n  }\n  function setFullscreen() {\n    if (inFullscreen.value === true) return;\n    inFullscreen.value = true;\n    container = proxy.$el.parentNode;\n    container.replaceChild(fullscreenFillerNode, proxy.$el);\n    document.body.appendChild(proxy.$el);\n    counter++;\n    if (counter === 1) {\n      document.body.classList.add(\"q-body--fullscreen-mixin\");\n    }\n    historyEntry = {\n      handler: exitFullscreen\n    };\n    History_default.add(historyEntry);\n  }\n  function exitFullscreen() {\n    if (inFullscreen.value !== true) return;\n    if (historyEntry !== void 0) {\n      History_default.remove(historyEntry);\n      historyEntry = void 0;\n    }\n    container.replaceChild(proxy.$el, fullscreenFillerNode);\n    inFullscreen.value = false;\n    counter = Math.max(0, counter - 1);\n    if (counter === 0) {\n      document.body.classList.remove(\"q-body--fullscreen-mixin\");\n      if (proxy.$el.scrollIntoView !== void 0) {\n        setTimeout(() => {\n          proxy.$el.scrollIntoView();\n        });\n      }\n    }\n  }\n  onBeforeMount(() => {\n    fullscreenFillerNode = document.createElement(\"span\");\n  });\n  onMounted6(() => {\n    props4.fullscreen === true && setFullscreen();\n  });\n  onBeforeUnmount8(exitFullscreen);\n  Object.assign(proxy, {\n    toggleFullscreen,\n    setFullscreen,\n    exitFullscreen\n  });\n  return {\n    inFullscreen,\n    toggleFullscreen\n  };\n}\n\n// src/components/carousel/QCarousel.js\nvar navigationPositionOptions = [\"top\", \"right\", \"bottom\", \"left\"];\nvar controlTypeOptions = [\"regular\", \"flat\", \"outline\", \"push\", \"unelevated\"];\nvar QCarousel_default = createComponent({\n  name: \"QCarousel\",\n  props: {\n    ...useDarkProps,\n    ...usePanelProps,\n    ...useFullscreenProps,\n    transitionPrev: {\n      // usePanelParentProps override\n      type: String,\n      default: \"fade\"\n    },\n    transitionNext: {\n      // usePanelParentProps override\n      type: String,\n      default: \"fade\"\n    },\n    height: String,\n    padding: Boolean,\n    controlColor: String,\n    controlTextColor: String,\n    controlType: {\n      type: String,\n      validator: (v) => controlTypeOptions.includes(v),\n      default: \"flat\"\n    },\n    autoplay: [Number, Boolean],\n    arrows: Boolean,\n    prevIcon: String,\n    nextIcon: String,\n    navigation: Boolean,\n    navigationPosition: {\n      type: String,\n      validator: (v) => navigationPositionOptions.includes(v)\n    },\n    navigationIcon: String,\n    navigationActiveIcon: String,\n    thumbnails: Boolean\n  },\n  emits: [\n    ...useFullscreenEmits,\n    ...usePanelEmits\n  ],\n  setup(props4, { slots }) {\n    const { proxy: { $q } } = getCurrentInstance16();\n    const isDark = use_dark_default(props4, $q);\n    let timer2 = null, panelsLen;\n    const {\n      updatePanelsList,\n      getPanelContent,\n      panelDirectives,\n      goToPanel,\n      previousPanel,\n      nextPanel,\n      getEnabledPanels,\n      panelIndex\n    } = use_panel_default();\n    const { inFullscreen } = use_fullscreen_default();\n    const style2 = computed27(() => inFullscreen.value !== true && props4.height !== void 0 ? { height: props4.height } : {});\n    const direction = computed27(() => props4.vertical === true ? \"vertical\" : \"horizontal\");\n    const navigationPosition = computed27(\n      () => props4.navigationPosition || (props4.vertical === true ? \"right\" : \"bottom\")\n    );\n    const classes = computed27(\n      () => `q-carousel q-panel-parent q-carousel--with${props4.padding === true ? \"\" : \"out\"}-padding` + (inFullscreen.value === true ? \" fullscreen\" : \"\") + (isDark.value === true ? \" q-carousel--dark q-dark\" : \"\") + (props4.arrows === true ? ` q-carousel--arrows-${direction.value}` : \"\") + (props4.navigation === true ? ` q-carousel--navigation-${navigationPosition.value}` : \"\")\n    );\n    const arrowIcons = computed27(() => {\n      const ico = [\n        props4.prevIcon || $q.iconSet.carousel[props4.vertical === true ? \"up\" : \"left\"],\n        props4.nextIcon || $q.iconSet.carousel[props4.vertical === true ? \"down\" : \"right\"]\n      ];\n      return props4.vertical === false && $q.lang.rtl === true ? ico.reverse() : ico;\n    });\n    const navIcon = computed27(() => props4.navigationIcon || $q.iconSet.carousel.navigationIcon);\n    const navActiveIcon = computed27(() => props4.navigationActiveIcon || navIcon.value);\n    const controlProps = computed27(() => ({\n      color: props4.controlColor,\n      textColor: props4.controlTextColor,\n      round: true,\n      [props4.controlType]: true,\n      dense: true\n    }));\n    watch9(() => props4.modelValue, () => {\n      if (props4.autoplay) {\n        startTimer();\n      }\n    });\n    watch9(() => props4.autoplay, (val) => {\n      if (val) {\n        startTimer();\n      } else if (timer2 !== null) {\n        clearTimeout(timer2);\n        timer2 = null;\n      }\n    });\n    function startTimer() {\n      const duration2 = isNumber(props4.autoplay) === true ? Math.abs(props4.autoplay) : 5e3;\n      timer2 !== null && clearTimeout(timer2);\n      timer2 = setTimeout(() => {\n        timer2 = null;\n        if (duration2 >= 0) {\n          nextPanel();\n        } else {\n          previousPanel();\n        }\n      }, duration2);\n    }\n    onMounted7(() => {\n      props4.autoplay && startTimer();\n    });\n    onBeforeUnmount9(() => {\n      timer2 !== null && clearTimeout(timer2);\n    });\n    function getNavigationContainer(type, mapping) {\n      return h22(\"div\", {\n        class: `q-carousel__control q-carousel__navigation no-wrap absolute flex q-carousel__navigation--${type} q-carousel__navigation--${navigationPosition.value}` + (props4.controlColor !== void 0 ? ` text-${props4.controlColor}` : \"\")\n      }, [\n        h22(\"div\", {\n          class: \"q-carousel__navigation-inner flex flex-center no-wrap\"\n        }, getEnabledPanels().map(mapping))\n      ]);\n    }\n    function getContent() {\n      const node = [];\n      if (props4.navigation === true) {\n        const fn = slots[\"navigation-icon\"] !== void 0 ? slots[\"navigation-icon\"] : (opts) => h22(QBtn_default, {\n          key: \"nav\" + opts.name,\n          class: `q-carousel__navigation-icon q-carousel__navigation-icon--${opts.active === true ? \"\" : \"in\"}active`,\n          ...opts.btnProps,\n          onClick: opts.onClick\n        });\n        const maxIndex = panelsLen - 1;\n        node.push(\n          getNavigationContainer(\"buttons\", (panel, index) => {\n            const name2 = panel.props.name;\n            const active = panelIndex.value === index;\n            return fn({\n              index,\n              maxIndex,\n              name: name2,\n              active,\n              btnProps: {\n                icon: active === true ? navActiveIcon.value : navIcon.value,\n                size: \"sm\",\n                ...controlProps.value\n              },\n              onClick: () => {\n                goToPanel(name2);\n              }\n            });\n          })\n        );\n      } else if (props4.thumbnails === true) {\n        const color = props4.controlColor !== void 0 ? ` text-${props4.controlColor}` : \"\";\n        node.push(getNavigationContainer(\"thumbnails\", (panel) => {\n          const slide = panel.props;\n          return h22(\"img\", {\n            key: \"tmb#\" + slide.name,\n            class: `q-carousel__thumbnail q-carousel__thumbnail--${slide.name === props4.modelValue ? \"\" : \"in\"}active` + color,\n            src: slide.imgSrc || slide[\"img-src\"],\n            onClick: () => {\n              goToPanel(slide.name);\n            }\n          });\n        }));\n      }\n      if (props4.arrows === true && panelIndex.value >= 0) {\n        if (props4.infinite === true || panelIndex.value > 0) {\n          node.push(\n            h22(\"div\", {\n              key: \"prev\",\n              class: `q-carousel__control q-carousel__arrow q-carousel__prev-arrow q-carousel__prev-arrow--${direction.value} absolute flex flex-center`\n            }, [\n              h22(QBtn_default, {\n                icon: arrowIcons.value[0],\n                ...controlProps.value,\n                onClick: previousPanel\n              })\n            ])\n          );\n        }\n        if (props4.infinite === true || panelIndex.value < panelsLen - 1) {\n          node.push(\n            h22(\"div\", {\n              key: \"next\",\n              class: `q-carousel__control q-carousel__arrow q-carousel__next-arrow q-carousel__next-arrow--${direction.value} absolute flex flex-center`\n            }, [\n              h22(QBtn_default, {\n                icon: arrowIcons.value[1],\n                ...controlProps.value,\n                onClick: nextPanel\n              })\n            ])\n          );\n        }\n      }\n      return hMergeSlot(slots.control, node);\n    }\n    return () => {\n      panelsLen = updatePanelsList(slots);\n      return h22(\"div\", {\n        class: classes.value,\n        style: style2.value\n      }, [\n        hDir(\n          \"div\",\n          { class: \"q-carousel__slides-container\" },\n          getPanelContent(),\n          \"sl-cont\",\n          props4.swipeable,\n          () => panelDirectives.value\n        )\n      ].concat(getContent()));\n    };\n  }\n});\n\n// src/components/carousel/QCarouselSlide.js\nimport { h as h23, computed as computed28 } from \"vue\";\nvar QCarouselSlide_default = createComponent({\n  name: \"QCarouselSlide\",\n  props: {\n    ...usePanelChildProps,\n    imgSrc: String\n  },\n  setup(props4, { slots }) {\n    const style2 = computed28(() => props4.imgSrc ? { backgroundImage: `url(\"${props4.imgSrc}\")` } : {});\n    return () => h23(\"div\", {\n      class: \"q-carousel__slide\",\n      style: style2.value\n    }, hSlot(slots.default));\n  }\n});\n\n// src/components/carousel/QCarouselControl.js\nimport { h as h24, computed as computed29 } from \"vue\";\nvar QCarouselControl_default = createComponent({\n  name: \"QCarouselControl\",\n  props: {\n    position: {\n      type: String,\n      default: \"bottom-right\",\n      validator: (v) => [\n        \"top-right\",\n        \"top-left\",\n        \"bottom-right\",\n        \"bottom-left\",\n        \"top\",\n        \"right\",\n        \"bottom\",\n        \"left\"\n      ].includes(v)\n    },\n    offset: {\n      type: Array,\n      default: () => [18, 18],\n      validator: (v) => v.length === 2\n    }\n  },\n  setup(props4, { slots }) {\n    const classes = computed29(() => `q-carousel__control absolute absolute-${props4.position}`);\n    const style2 = computed29(() => ({\n      margin: `${props4.offset[1]}px ${props4.offset[0]}px`\n    }));\n    return () => h24(\"div\", {\n      class: classes.value,\n      style: style2.value\n    }, hSlot(slots.default));\n  }\n});\n\n// src/components/chat/QChatMessage.js\nimport { h as h25, computed as computed30 } from \"vue\";\nvar QChatMessage_default = createComponent({\n  name: \"QChatMessage\",\n  props: {\n    sent: Boolean,\n    label: String,\n    bgColor: String,\n    textColor: String,\n    name: String,\n    avatar: String,\n    text: Array,\n    stamp: String,\n    size: String,\n    labelHtml: Boolean,\n    nameHtml: Boolean,\n    textHtml: Boolean,\n    stampHtml: Boolean\n  },\n  setup(props4, { slots }) {\n    const op = computed30(() => props4.sent === true ? \"sent\" : \"received\");\n    const textClass = computed30(\n      () => `q-message-text-content q-message-text-content--${op.value}` + (props4.textColor !== void 0 ? ` text-${props4.textColor}` : \"\")\n    );\n    const messageClass = computed30(\n      () => `q-message-text q-message-text--${op.value}` + (props4.bgColor !== void 0 ? ` text-${props4.bgColor}` : \"\")\n    );\n    const containerClass = computed30(\n      () => \"q-message-container row items-end no-wrap\" + (props4.sent === true ? \" reverse\" : \"\")\n    );\n    const sizeClass = computed30(() => props4.size !== void 0 ? `col-${props4.size}` : \"\");\n    const domProps = computed30(() => ({\n      msg: props4.textHtml === true ? \"innerHTML\" : \"textContent\",\n      stamp: props4.stampHtml === true ? \"innerHTML\" : \"textContent\",\n      name: props4.nameHtml === true ? \"innerHTML\" : \"textContent\",\n      label: props4.labelHtml === true ? \"innerHTML\" : \"textContent\"\n    }));\n    function wrapStamp(node) {\n      if (slots.stamp !== void 0) {\n        return [node, h25(\"div\", { class: \"q-message-stamp\" }, slots.stamp())];\n      }\n      if (props4.stamp) {\n        return [\n          node,\n          h25(\"div\", {\n            class: \"q-message-stamp\",\n            [domProps.value.stamp]: props4.stamp\n          })\n        ];\n      }\n      return [node];\n    }\n    function getText(contentList, withSlots) {\n      const content = withSlots === true ? contentList.length > 1 ? (text) => text : (text) => h25(\"div\", [text]) : (text) => h25(\"div\", { [domProps.value.msg]: text });\n      return contentList.map((msg, index) => h25(\"div\", {\n        key: index,\n        class: messageClass.value\n      }, [\n        h25(\"div\", { class: textClass.value }, wrapStamp(content(msg)))\n      ]));\n    }\n    return () => {\n      const container = [];\n      if (slots.avatar !== void 0) {\n        container.push(slots.avatar());\n      } else if (props4.avatar !== void 0) {\n        container.push(\n          h25(\"img\", {\n            class: `q-message-avatar q-message-avatar--${op.value}`,\n            src: props4.avatar,\n            \"aria-hidden\": \"true\"\n          })\n        );\n      }\n      const msg = [];\n      if (slots.name !== void 0) {\n        msg.push(\n          h25(\"div\", { class: `q-message-name q-message-name--${op.value}` }, slots.name())\n        );\n      } else if (props4.name !== void 0) {\n        msg.push(\n          h25(\"div\", {\n            class: `q-message-name q-message-name--${op.value}`,\n            [domProps.value.name]: props4.name\n          })\n        );\n      }\n      if (slots.default !== void 0) {\n        msg.push(\n          getText(\n            getNormalizedVNodes(slots.default()),\n            true\n          )\n        );\n      } else if (props4.text !== void 0) {\n        msg.push(getText(props4.text));\n      }\n      container.push(\n        h25(\"div\", { class: sizeClass.value }, msg)\n      );\n      const child = [];\n      if (slots.label !== void 0) {\n        child.push(\n          h25(\"div\", { class: \"q-message-label\" }, slots.label())\n        );\n      } else if (props4.label !== void 0) {\n        child.push(\n          h25(\"div\", {\n            class: \"q-message-label\",\n            [domProps.value.label]: props4.label\n          })\n        );\n      }\n      child.push(\n        h25(\"div\", { class: containerClass.value }, container)\n      );\n      return h25(\"div\", {\n        class: `q-message q-message-${op.value}`\n      }, child);\n    };\n  }\n});\n\n// src/components/checkbox/QCheckbox.js\nimport { h as h28, computed as computed33 } from \"vue\";\n\n// src/components/checkbox/use-checkbox.js\nimport { h as h27, ref as ref13, computed as computed32, getCurrentInstance as getCurrentInstance17, toRaw } from \"vue\";\n\n// src/composables/private.use-refocus-target/use-refocus-target.js\nimport { h as h26, computed as computed31, ref as ref12 } from \"vue\";\nfunction use_refocus_target_default(props4, rootRef) {\n  const refocusRef = ref12(null);\n  const refocusTargetEl = computed31(() => {\n    if (props4.disable === true) {\n      return null;\n    }\n    return h26(\"span\", {\n      ref: refocusRef,\n      class: \"no-outline\",\n      tabindex: -1\n    });\n  });\n  function refocusTarget(e) {\n    const root = rootRef.value;\n    if (e !== void 0 && e.type.indexOf(\"key\") === 0) {\n      if (root !== null && document.activeElement !== root && root.contains(document.activeElement) === true) {\n        root.focus();\n      }\n    } else if (refocusRef.value !== null && (e === void 0 || root !== null && root.contains(e.target) === true)) {\n      refocusRef.value.focus();\n    }\n  }\n  return {\n    refocusTargetEl,\n    refocusTarget\n  };\n}\n\n// src/utils/private.option-sizes/option-sizes.js\nvar option_sizes_default = {\n  xs: 30,\n  sm: 35,\n  md: 40,\n  lg: 50,\n  xl: 60\n};\n\n// src/components/checkbox/use-checkbox.js\nvar useCheckboxProps = {\n  ...useDarkProps,\n  ...useSizeProps,\n  ...useFormProps,\n  modelValue: {\n    required: true,\n    default: null\n  },\n  val: {},\n  trueValue: { default: true },\n  falseValue: { default: false },\n  indeterminateValue: { default: null },\n  checkedIcon: String,\n  uncheckedIcon: String,\n  indeterminateIcon: String,\n  toggleOrder: {\n    type: String,\n    validator: (v) => v === \"tf\" || v === \"ft\"\n  },\n  toggleIndeterminate: Boolean,\n  label: String,\n  leftLabel: Boolean,\n  color: String,\n  keepColor: Boolean,\n  dense: Boolean,\n  disable: Boolean,\n  tabindex: [String, Number]\n};\nvar useCheckboxEmits = [\"update:modelValue\"];\nfunction use_checkbox_default(type, getInner) {\n  const { props: props4, slots, emit, proxy } = getCurrentInstance17();\n  const { $q } = proxy;\n  const isDark = use_dark_default(props4, $q);\n  const rootRef = ref13(null);\n  const { refocusTargetEl, refocusTarget } = use_refocus_target_default(props4, rootRef);\n  const sizeStyle = use_size_default(props4, option_sizes_default);\n  const modelIsArray = computed32(\n    () => props4.val !== void 0 && Array.isArray(props4.modelValue)\n  );\n  const index = computed32(() => {\n    const val = toRaw(props4.val);\n    return modelIsArray.value === true ? props4.modelValue.findIndex((opt) => toRaw(opt) === val) : -1;\n  });\n  const isTrue = computed32(() => modelIsArray.value === true ? index.value !== -1 : toRaw(props4.modelValue) === toRaw(props4.trueValue));\n  const isFalse = computed32(() => modelIsArray.value === true ? index.value === -1 : toRaw(props4.modelValue) === toRaw(props4.falseValue));\n  const isIndeterminate = computed32(\n    () => isTrue.value === false && isFalse.value === false\n  );\n  const tabindex = computed32(() => props4.disable === true ? -1 : props4.tabindex || 0);\n  const classes = computed32(\n    () => `q-${type} cursor-pointer no-outline row inline no-wrap items-center` + (props4.disable === true ? \" disabled\" : \"\") + (isDark.value === true ? ` q-${type}--dark` : \"\") + (props4.dense === true ? ` q-${type}--dense` : \"\") + (props4.leftLabel === true ? \" reverse\" : \"\")\n  );\n  const innerClass = computed32(() => {\n    const state = isTrue.value === true ? \"truthy\" : isFalse.value === true ? \"falsy\" : \"indet\";\n    const color = props4.color !== void 0 && (props4.keepColor === true || (type === \"toggle\" ? isTrue.value === true : isFalse.value !== true)) ? ` text-${props4.color}` : \"\";\n    return `q-${type}__inner relative-position non-selectable q-${type}__inner--${state}${color}`;\n  });\n  const formAttrs = computed32(() => {\n    const prop = { type: \"checkbox\" };\n    props4.name !== void 0 && Object.assign(prop, {\n      // see https://vuejs.org/guide/extras/render-function.html#creating-vnodes (.prop)\n      \".checked\": isTrue.value,\n      \"^checked\": isTrue.value === true ? \"checked\" : void 0,\n      name: props4.name,\n      value: modelIsArray.value === true ? props4.val : props4.trueValue\n    });\n    return prop;\n  });\n  const injectFormInput = useFormInject(formAttrs);\n  const attributes = computed32(() => {\n    const attrs = {\n      tabindex: tabindex.value,\n      role: type === \"toggle\" ? \"switch\" : \"checkbox\",\n      \"aria-label\": props4.label,\n      \"aria-checked\": isIndeterminate.value === true ? \"mixed\" : isTrue.value === true ? \"true\" : \"false\"\n    };\n    if (props4.disable === true) {\n      attrs[\"aria-disabled\"] = \"true\";\n    }\n    return attrs;\n  });\n  function onClick(e) {\n    if (e !== void 0) {\n      stopAndPrevent(e);\n      refocusTarget(e);\n    }\n    if (props4.disable !== true) {\n      emit(\"update:modelValue\", getNextValue(), e);\n    }\n  }\n  function getNextValue() {\n    if (modelIsArray.value === true) {\n      if (isTrue.value === true) {\n        const val = props4.modelValue.slice();\n        val.splice(index.value, 1);\n        return val;\n      }\n      return props4.modelValue.concat([props4.val]);\n    }\n    if (isTrue.value === true) {\n      if (props4.toggleOrder !== \"ft\" || props4.toggleIndeterminate === false) {\n        return props4.falseValue;\n      }\n    } else if (isFalse.value === true) {\n      if (props4.toggleOrder === \"ft\" || props4.toggleIndeterminate === false) {\n        return props4.trueValue;\n      }\n    } else {\n      return props4.toggleOrder !== \"ft\" ? props4.trueValue : props4.falseValue;\n    }\n    return props4.indeterminateValue;\n  }\n  function onKeydown2(e) {\n    if (e.keyCode === 13 || e.keyCode === 32) {\n      stopAndPrevent(e);\n    }\n  }\n  function onKeyup2(e) {\n    if (e.keyCode === 13 || e.keyCode === 32) {\n      onClick(e);\n    }\n  }\n  const getInnerContent = getInner(isTrue, isIndeterminate);\n  Object.assign(proxy, { toggle: onClick });\n  return () => {\n    const inner = getInnerContent();\n    props4.disable !== true && injectFormInput(\n      inner,\n      \"unshift\",\n      ` q-${type}__native absolute q-ma-none q-pa-none`\n    );\n    const child = [\n      h27(\"div\", {\n        class: innerClass.value,\n        style: sizeStyle.value,\n        \"aria-hidden\": \"true\"\n      }, inner)\n    ];\n    if (refocusTargetEl.value !== null) {\n      child.push(refocusTargetEl.value);\n    }\n    const label = props4.label !== void 0 ? hMergeSlot(slots.default, [props4.label]) : hSlot(slots.default);\n    label !== void 0 && child.push(\n      h27(\"div\", {\n        class: `q-${type}__label q-anchor--skip`\n      }, label)\n    );\n    return h27(\"div\", {\n      ref: rootRef,\n      class: classes.value,\n      ...attributes.value,\n      onClick,\n      onKeydown: onKeydown2,\n      onKeyup: onKeyup2\n    }, child);\n  };\n}\n\n// src/components/checkbox/QCheckbox.js\nvar createBgNode = () => h28(\"div\", {\n  key: \"svg\",\n  class: \"q-checkbox__bg absolute\"\n}, [\n  h28(\"svg\", {\n    class: \"q-checkbox__svg fit absolute-full\",\n    viewBox: \"0 0 24 24\"\n  }, [\n    h28(\"path\", {\n      class: \"q-checkbox__truthy\",\n      fill: \"none\",\n      d: \"M1.73,12.91 8.1,19.28 22.79,4.59\"\n    }),\n    h28(\"path\", {\n      class: \"q-checkbox__indet\",\n      d: \"M4,14H20V10H4\"\n    })\n  ])\n]);\nvar QCheckbox_default = createComponent({\n  name: \"QCheckbox\",\n  props: useCheckboxProps,\n  emits: useCheckboxEmits,\n  setup(props4) {\n    const bgNode = createBgNode();\n    function getInner(isTrue, isIndeterminate) {\n      const icon = computed33(\n        () => (isTrue.value === true ? props4.checkedIcon : isIndeterminate.value === true ? props4.indeterminateIcon : props4.uncheckedIcon) || null\n      );\n      return () => icon.value !== null ? [\n        h28(\"div\", {\n          key: \"icon\",\n          class: \"q-checkbox__icon-container absolute-full flex flex-center no-wrap\"\n        }, [\n          h28(QIcon_default, {\n            class: \"q-checkbox__icon\",\n            name: icon.value\n          })\n        ])\n      ] : [bgNode];\n    }\n    return use_checkbox_default(\"checkbox\", getInner);\n  }\n});\n\n// src/components/chip/QChip.js\nimport { h as h29, computed as computed34, getCurrentInstance as getCurrentInstance18 } from \"vue\";\nvar defaultSizes2 = {\n  xs: 8,\n  sm: 10,\n  md: 14,\n  lg: 20,\n  xl: 24\n};\nvar QChip_default = createComponent({\n  name: \"QChip\",\n  props: {\n    ...useDarkProps,\n    ...useSizeProps,\n    dense: Boolean,\n    icon: String,\n    iconRight: String,\n    iconRemove: String,\n    iconSelected: String,\n    label: [String, Number],\n    color: String,\n    textColor: String,\n    modelValue: {\n      type: Boolean,\n      default: true\n    },\n    selected: {\n      type: Boolean,\n      default: null\n    },\n    square: Boolean,\n    outline: Boolean,\n    clickable: Boolean,\n    removable: Boolean,\n    removeAriaLabel: String,\n    tabindex: [String, Number],\n    disable: Boolean,\n    ripple: {\n      type: [Boolean, Object],\n      default: true\n    }\n  },\n  emits: [\"update:modelValue\", \"update:selected\", \"remove\", \"click\"],\n  setup(props4, { slots, emit }) {\n    const { proxy: { $q } } = getCurrentInstance18();\n    const isDark = use_dark_default(props4, $q);\n    const sizeStyle = use_size_default(props4, defaultSizes2);\n    const hasLeftIcon = computed34(() => props4.selected === true || props4.icon !== void 0);\n    const leftIcon = computed34(() => props4.selected === true ? props4.iconSelected || $q.iconSet.chip.selected : props4.icon);\n    const removeIcon = computed34(() => props4.iconRemove || $q.iconSet.chip.remove);\n    const isClickable = computed34(\n      () => props4.disable === false && (props4.clickable === true || props4.selected !== null)\n    );\n    const classes = computed34(() => {\n      const text = props4.outline === true ? props4.color || props4.textColor : props4.textColor;\n      return \"q-chip row inline no-wrap items-center\" + (props4.outline === false && props4.color !== void 0 ? ` bg-${props4.color}` : \"\") + (text ? ` text-${text} q-chip--colored` : \"\") + (props4.disable === true ? \" disabled\" : \"\") + (props4.dense === true ? \" q-chip--dense\" : \"\") + (props4.outline === true ? \" q-chip--outline\" : \"\") + (props4.selected === true ? \" q-chip--selected\" : \"\") + (isClickable.value === true ? \" q-chip--clickable cursor-pointer non-selectable q-hoverable\" : \"\") + (props4.square === true ? \" q-chip--square\" : \"\") + (isDark.value === true ? \" q-chip--dark q-dark\" : \"\");\n    });\n    const attributes = computed34(() => {\n      const chip = props4.disable === true ? { tabindex: -1, \"aria-disabled\": \"true\" } : { tabindex: props4.tabindex || 0 };\n      const remove2 = {\n        ...chip,\n        role: \"button\",\n        \"aria-hidden\": \"false\",\n        \"aria-label\": props4.removeAriaLabel || $q.lang.label.remove\n      };\n      return { chip, remove: remove2 };\n    });\n    function onKeyup2(e) {\n      e.keyCode === 13 && onClick(e);\n    }\n    function onClick(e) {\n      if (!props4.disable) {\n        emit(\"update:selected\", !props4.selected);\n        emit(\"click\", e);\n      }\n    }\n    function onRemove(e) {\n      if (e.keyCode === void 0 || e.keyCode === 13) {\n        stopAndPrevent(e);\n        if (props4.disable === false) {\n          emit(\"update:modelValue\", false);\n          emit(\"remove\");\n        }\n      }\n    }\n    function getContent() {\n      const child = [];\n      isClickable.value === true && child.push(\n        h29(\"div\", { class: \"q-focus-helper\" })\n      );\n      hasLeftIcon.value === true && child.push(\n        h29(QIcon_default, {\n          class: \"q-chip__icon q-chip__icon--left\",\n          name: leftIcon.value\n        })\n      );\n      const label = props4.label !== void 0 ? [h29(\"div\", { class: \"ellipsis\" }, [props4.label])] : void 0;\n      child.push(\n        h29(\"div\", {\n          class: \"q-chip__content col row no-wrap items-center q-anchor--skip\"\n        }, hMergeSlotSafely(slots.default, label))\n      );\n      props4.iconRight && child.push(\n        h29(QIcon_default, {\n          class: \"q-chip__icon q-chip__icon--right\",\n          name: props4.iconRight\n        })\n      );\n      props4.removable === true && child.push(\n        h29(QIcon_default, {\n          class: \"q-chip__icon q-chip__icon--remove cursor-pointer\",\n          name: removeIcon.value,\n          ...attributes.value.remove,\n          onClick: onRemove,\n          onKeyup: onRemove\n        })\n      );\n      return child;\n    }\n    return () => {\n      if (props4.modelValue === false) return;\n      const data = {\n        class: classes.value,\n        style: sizeStyle.value\n      };\n      isClickable.value === true && Object.assign(\n        data,\n        attributes.value.chip,\n        { onClick, onKeyup: onKeyup2 }\n      );\n      return hDir(\n        \"div\",\n        data,\n        getContent(),\n        \"ripple\",\n        props4.ripple !== false && props4.disable !== true,\n        () => [[Ripple_default, props4.ripple]]\n      );\n    };\n  }\n});\n\n// src/components/circular-progress/QCircularProgress.js\nimport { h as h30, computed as computed35, getCurrentInstance as getCurrentInstance19 } from \"vue\";\n\n// src/components/circular-progress/circular-progress.js\nvar useCircularCommonProps = {\n  ...useSizeProps,\n  min: {\n    type: Number,\n    default: 0\n  },\n  max: {\n    type: Number,\n    default: 100\n  },\n  color: String,\n  centerColor: String,\n  trackColor: String,\n  fontSize: String,\n  rounded: Boolean,\n  // ratio\n  thickness: {\n    type: Number,\n    default: 0.2,\n    validator: (v) => v >= 0 && v <= 1\n  },\n  angle: {\n    type: Number,\n    default: 0\n  },\n  showValue: Boolean,\n  reverse: Boolean,\n  instantFeedback: Boolean\n};\n\n// src/components/circular-progress/QCircularProgress.js\nvar radius = 50;\nvar diameter = 2 * radius;\nvar circumference = diameter * Math.PI;\nvar strokeDashArray = Math.round(circumference * 1e3) / 1e3;\nvar QCircularProgress_default = createComponent({\n  name: \"QCircularProgress\",\n  props: {\n    ...useCircularCommonProps,\n    value: {\n      type: Number,\n      default: 0\n    },\n    animationSpeed: {\n      type: [String, Number],\n      default: 600\n    },\n    indeterminate: Boolean\n  },\n  setup(props4, { slots }) {\n    const { proxy: { $q } } = getCurrentInstance19();\n    const sizeStyle = use_size_default(props4);\n    const svgStyle = computed35(() => {\n      const angle = ($q.lang.rtl === true ? -1 : 1) * props4.angle;\n      return {\n        transform: props4.reverse !== ($q.lang.rtl === true) ? `scale3d(-1, 1, 1) rotate3d(0, 0, 1, ${-90 - angle}deg)` : `rotate3d(0, 0, 1, ${angle - 90}deg)`\n      };\n    });\n    const circleStyle = computed35(() => props4.instantFeedback !== true && props4.indeterminate !== true ? { transition: `stroke-dashoffset ${props4.animationSpeed}ms ease 0s, stroke ${props4.animationSpeed}ms ease` } : \"\");\n    const viewBox = computed35(() => diameter / (1 - props4.thickness / 2));\n    const viewBoxAttr = computed35(\n      () => `${viewBox.value / 2} ${viewBox.value / 2} ${viewBox.value} ${viewBox.value}`\n    );\n    const normalized = computed35(() => between(props4.value, props4.min, props4.max));\n    const range = computed35(() => props4.max - props4.min);\n    const strokeWidth = computed35(() => props4.thickness / 2 * viewBox.value);\n    const strokeDashOffset = computed35(() => {\n      const dashRatio = (props4.max - normalized.value) / range.value;\n      const dashGap = props4.rounded === true && normalized.value < props4.max && dashRatio < 0.25 ? strokeWidth.value / 2 * (1 - dashRatio / 0.25) : 0;\n      return circumference * dashRatio + dashGap;\n    });\n    function getCircle({ thickness, offset: offset2, color, cls, rounded }) {\n      return h30(\"circle\", {\n        class: \"q-circular-progress__\" + cls + (color !== void 0 ? ` text-${color}` : \"\"),\n        style: circleStyle.value,\n        fill: \"transparent\",\n        stroke: \"currentColor\",\n        \"stroke-width\": thickness,\n        \"stroke-dasharray\": strokeDashArray,\n        \"stroke-dashoffset\": offset2,\n        \"stroke-linecap\": rounded,\n        cx: viewBox.value,\n        cy: viewBox.value,\n        r: radius\n      });\n    }\n    return () => {\n      const svgChild = [];\n      props4.centerColor !== void 0 && props4.centerColor !== \"transparent\" && svgChild.push(\n        h30(\"circle\", {\n          class: `q-circular-progress__center text-${props4.centerColor}`,\n          fill: \"currentColor\",\n          r: radius - strokeWidth.value / 2,\n          cx: viewBox.value,\n          cy: viewBox.value\n        })\n      );\n      props4.trackColor !== void 0 && props4.trackColor !== \"transparent\" && svgChild.push(\n        getCircle({\n          cls: \"track\",\n          thickness: strokeWidth.value,\n          offset: 0,\n          color: props4.trackColor\n        })\n      );\n      svgChild.push(\n        getCircle({\n          cls: \"circle\",\n          thickness: strokeWidth.value,\n          offset: strokeDashOffset.value,\n          color: props4.color,\n          rounded: props4.rounded === true ? \"round\" : void 0\n        })\n      );\n      const child = [\n        h30(\"svg\", {\n          class: \"q-circular-progress__svg\",\n          style: svgStyle.value,\n          viewBox: viewBoxAttr.value,\n          \"aria-hidden\": \"true\"\n        }, svgChild)\n      ];\n      props4.showValue === true && child.push(\n        h30(\"div\", {\n          class: \"q-circular-progress__text absolute-full row flex-center content-center\",\n          style: { fontSize: props4.fontSize }\n        }, slots.default !== void 0 ? slots.default() : [h30(\"div\", normalized.value)])\n      );\n      return h30(\"div\", {\n        class: `q-circular-progress q-circular-progress--${props4.indeterminate === true ? \"in\" : \"\"}determinate`,\n        style: sizeStyle.value,\n        role: \"progressbar\",\n        \"aria-valuemin\": props4.min,\n        \"aria-valuemax\": props4.max,\n        \"aria-valuenow\": props4.indeterminate === true ? void 0 : normalized.value\n      }, hMergeSlotSafely(slots.internal, child));\n    };\n  }\n});\n\n// src/components/color/QColor.js\nimport { h as h37, ref as ref19, computed as computed41, watch as watch12, nextTick as nextTick5, getCurrentInstance as getCurrentInstance26 } from \"vue\";\n\n// src/directives/touch-pan/TouchPan.js\nfunction getChanges(evt, ctx, isFinal) {\n  const pos = position(evt);\n  let dir, distX = pos.left - ctx.event.x, distY = pos.top - ctx.event.y, absX = Math.abs(distX), absY = Math.abs(distY);\n  const direction = ctx.direction;\n  if (direction.horizontal === true && direction.vertical !== true) {\n    dir = distX < 0 ? \"left\" : \"right\";\n  } else if (direction.horizontal !== true && direction.vertical === true) {\n    dir = distY < 0 ? \"up\" : \"down\";\n  } else if (direction.up === true && distY < 0) {\n    dir = \"up\";\n    if (absX > absY) {\n      if (direction.left === true && distX < 0) {\n        dir = \"left\";\n      } else if (direction.right === true && distX > 0) {\n        dir = \"right\";\n      }\n    }\n  } else if (direction.down === true && distY > 0) {\n    dir = \"down\";\n    if (absX > absY) {\n      if (direction.left === true && distX < 0) {\n        dir = \"left\";\n      } else if (direction.right === true && distX > 0) {\n        dir = \"right\";\n      }\n    }\n  } else if (direction.left === true && distX < 0) {\n    dir = \"left\";\n    if (absX < absY) {\n      if (direction.up === true && distY < 0) {\n        dir = \"up\";\n      } else if (direction.down === true && distY > 0) {\n        dir = \"down\";\n      }\n    }\n  } else if (direction.right === true && distX > 0) {\n    dir = \"right\";\n    if (absX < absY) {\n      if (direction.up === true && distY < 0) {\n        dir = \"up\";\n      } else if (direction.down === true && distY > 0) {\n        dir = \"down\";\n      }\n    }\n  }\n  let synthetic = false;\n  if (dir === void 0 && isFinal === false) {\n    if (ctx.event.isFirst === true || ctx.event.lastDir === void 0) {\n      return {};\n    }\n    dir = ctx.event.lastDir;\n    synthetic = true;\n    if (dir === \"left\" || dir === \"right\") {\n      pos.left -= distX;\n      absX = 0;\n      distX = 0;\n    } else {\n      pos.top -= distY;\n      absY = 0;\n      distY = 0;\n    }\n  }\n  return {\n    synthetic,\n    payload: {\n      evt,\n      touch: ctx.event.mouse !== true,\n      mouse: ctx.event.mouse === true,\n      position: pos,\n      direction: dir,\n      isFirst: ctx.event.isFirst,\n      isFinal: isFinal === true,\n      duration: Date.now() - ctx.event.time,\n      distance: {\n        x: absX,\n        y: absY\n      },\n      offset: {\n        x: distX,\n        y: distY\n      },\n      delta: {\n        x: pos.left - ctx.event.lastX,\n        y: pos.top - ctx.event.lastY\n      }\n    }\n  };\n}\nvar uid = 0;\nvar TouchPan_default = createDirective(\n  false ? { name: \"touch-pan\", getSSRProps: noop_ssr_directive_transform_default } : {\n    name: \"touch-pan\",\n    beforeMount(el, { value: value2, modifiers }) {\n      if (modifiers.mouse !== true && client.has.touch !== true) return;\n      function handleEvent(evt, mouseEvent) {\n        if (modifiers.mouse === true && mouseEvent === true) {\n          stopAndPrevent(evt);\n        } else {\n          modifiers.stop === true && stop(evt);\n          modifiers.prevent === true && prevent(evt);\n        }\n      }\n      const ctx = {\n        uid: \"qvtp_\" + uid++,\n        handler: value2,\n        modifiers,\n        direction: getModifierDirections(modifiers),\n        noop,\n        mouseStart(evt) {\n          if (shouldStart(evt, ctx) && leftClick(evt)) {\n            addEvt(ctx, \"temp\", [\n              [document, \"mousemove\", \"move\", \"notPassiveCapture\"],\n              [document, \"mouseup\", \"end\", \"passiveCapture\"]\n            ]);\n            ctx.start(evt, true);\n          }\n        },\n        touchStart(evt) {\n          if (shouldStart(evt, ctx)) {\n            const target2 = evt.target;\n            addEvt(ctx, \"temp\", [\n              [target2, \"touchmove\", \"move\", \"notPassiveCapture\"],\n              [target2, \"touchcancel\", \"end\", \"passiveCapture\"],\n              [target2, \"touchend\", \"end\", \"passiveCapture\"]\n            ]);\n            ctx.start(evt);\n          }\n        },\n        start(evt, mouseEvent) {\n          client.is.firefox === true && preventDraggable(el, true);\n          ctx.lastEvt = evt;\n          if (mouseEvent === true || modifiers.stop === true) {\n            if (ctx.direction.all !== true && (mouseEvent !== true || ctx.modifiers.mouseAllDir !== true && ctx.modifiers.mousealldir !== true)) {\n              const clone2 = evt.type.indexOf(\"mouse\") !== -1 ? new MouseEvent(evt.type, evt) : new TouchEvent(evt.type, evt);\n              evt.defaultPrevented === true && prevent(clone2);\n              evt.cancelBubble === true && stop(clone2);\n              Object.assign(clone2, {\n                qKeyEvent: evt.qKeyEvent,\n                qClickOutside: evt.qClickOutside,\n                qAnchorHandled: evt.qAnchorHandled,\n                qClonedBy: evt.qClonedBy === void 0 ? [ctx.uid] : evt.qClonedBy.concat(ctx.uid)\n              });\n              ctx.initialEvent = {\n                target: evt.target,\n                event: clone2\n              };\n            }\n            stop(evt);\n          }\n          const { left, top } = position(evt);\n          ctx.event = {\n            x: left,\n            y: top,\n            time: Date.now(),\n            mouse: mouseEvent === true,\n            detected: false,\n            isFirst: true,\n            isFinal: false,\n            lastX: left,\n            lastY: top\n          };\n        },\n        move(evt) {\n          if (ctx.event === void 0) return;\n          const pos = position(evt), distX = pos.left - ctx.event.x, distY = pos.top - ctx.event.y;\n          if (distX === 0 && distY === 0) return;\n          ctx.lastEvt = evt;\n          const isMouseEvt = ctx.event.mouse === true;\n          const start = () => {\n            handleEvent(evt, isMouseEvt);\n            let cursor;\n            if (modifiers.preserveCursor !== true && modifiers.preservecursor !== true) {\n              cursor = document.documentElement.style.cursor || \"\";\n              document.documentElement.style.cursor = \"grabbing\";\n            }\n            isMouseEvt === true && document.body.classList.add(\"no-pointer-events--children\");\n            document.body.classList.add(\"non-selectable\");\n            clearSelection();\n            ctx.styleCleanup = (withDelayedFn) => {\n              ctx.styleCleanup = void 0;\n              if (cursor !== void 0) {\n                document.documentElement.style.cursor = cursor;\n              }\n              document.body.classList.remove(\"non-selectable\");\n              if (isMouseEvt === true) {\n                const remove2 = () => {\n                  document.body.classList.remove(\"no-pointer-events--children\");\n                };\n                if (withDelayedFn !== void 0) {\n                  setTimeout(() => {\n                    remove2();\n                    withDelayedFn();\n                  }, 50);\n                } else {\n                  remove2();\n                }\n              } else if (withDelayedFn !== void 0) {\n                withDelayedFn();\n              }\n            };\n          };\n          if (ctx.event.detected === true) {\n            ctx.event.isFirst !== true && handleEvent(evt, ctx.event.mouse);\n            const { payload, synthetic } = getChanges(evt, ctx, false);\n            if (payload !== void 0) {\n              if (ctx.handler(payload) === false) {\n                ctx.end(evt);\n              } else {\n                if (ctx.styleCleanup === void 0 && ctx.event.isFirst === true) {\n                  start();\n                }\n                ctx.event.lastX = payload.position.left;\n                ctx.event.lastY = payload.position.top;\n                ctx.event.lastDir = synthetic === true ? void 0 : payload.direction;\n                ctx.event.isFirst = false;\n              }\n            }\n            return;\n          }\n          if (ctx.direction.all === true || isMouseEvt === true && (ctx.modifiers.mouseAllDir === true || ctx.modifiers.mousealldir === true)) {\n            start();\n            ctx.event.detected = true;\n            ctx.move(evt);\n            return;\n          }\n          const absX = Math.abs(distX), absY = Math.abs(distY);\n          if (absX !== absY) {\n            if (ctx.direction.horizontal === true && absX > absY || ctx.direction.vertical === true && absX < absY || ctx.direction.up === true && absX < absY && distY < 0 || ctx.direction.down === true && absX < absY && distY > 0 || ctx.direction.left === true && absX > absY && distX < 0 || ctx.direction.right === true && absX > absY && distX > 0) {\n              ctx.event.detected = true;\n              ctx.move(evt);\n            } else {\n              ctx.end(evt, true);\n            }\n          }\n        },\n        end(evt, abort) {\n          if (ctx.event === void 0) return;\n          cleanEvt(ctx, \"temp\");\n          client.is.firefox === true && preventDraggable(el, false);\n          if (abort === true) {\n            ctx.styleCleanup !== void 0 && ctx.styleCleanup();\n            if (ctx.event.detected !== true && ctx.initialEvent !== void 0) {\n              ctx.initialEvent.target.dispatchEvent(ctx.initialEvent.event);\n            }\n          } else if (ctx.event.detected === true) {\n            ctx.event.isFirst === true && ctx.handler(getChanges(evt === void 0 ? ctx.lastEvt : evt, ctx).payload);\n            const { payload } = getChanges(evt === void 0 ? ctx.lastEvt : evt, ctx, true);\n            const fn = () => {\n              ctx.handler(payload);\n            };\n            if (ctx.styleCleanup !== void 0) {\n              ctx.styleCleanup(fn);\n            } else {\n              fn();\n            }\n          }\n          ctx.event = void 0;\n          ctx.initialEvent = void 0;\n          ctx.lastEvt = void 0;\n        }\n      };\n      el.__qtouchpan = ctx;\n      if (modifiers.mouse === true) {\n        const capture = modifiers.mouseCapture === true || modifiers.mousecapture === true ? \"Capture\" : \"\";\n        addEvt(ctx, \"main\", [\n          [el, \"mousedown\", \"mouseStart\", `passive${capture}`]\n        ]);\n      }\n      client.has.touch === true && addEvt(ctx, \"main\", [\n        [el, \"touchstart\", \"touchStart\", `passive${modifiers.capture === true ? \"Capture\" : \"\"}`],\n        [el, \"touchmove\", \"noop\", \"notPassiveCapture\"]\n        // cannot be passive (ex: iOS scroll)\n      ]);\n    },\n    updated(el, bindings) {\n      const ctx = el.__qtouchpan;\n      if (ctx !== void 0) {\n        if (bindings.oldValue !== bindings.value) {\n          typeof value !== \"function\" && ctx.end();\n          ctx.handler = bindings.value;\n        }\n        ctx.direction = getModifierDirections(bindings.modifiers);\n      }\n    },\n    beforeUnmount(el) {\n      const ctx = el.__qtouchpan;\n      if (ctx !== void 0) {\n        ctx.event !== void 0 && ctx.end();\n        cleanEvt(ctx, \"main\");\n        cleanEvt(ctx, \"temp\");\n        client.is.firefox === true && preventDraggable(el, false);\n        ctx.styleCleanup !== void 0 && ctx.styleCleanup();\n        delete el.__qtouchpan;\n      }\n    }\n  }\n);\n\n// src/components/slider/QSlider.js\nimport { h as h32, ref as ref15, computed as computed37, watch as watch10, getCurrentInstance as getCurrentInstance21 } from \"vue\";\n\n// src/components/slider/use-slider.js\nimport { h as h31, ref as ref14, computed as computed36, onBeforeUnmount as onBeforeUnmount10, getCurrentInstance as getCurrentInstance20 } from \"vue\";\nvar markerPrefixClass = \"q-slider__marker-labels\";\nvar defaultMarkerConvertFn = (v) => ({ value: v });\nvar defaultMarkerLabelRenderFn = ({ marker }) => h31(\"div\", {\n  key: marker.value,\n  style: marker.style,\n  class: marker.classes\n}, marker.label);\nvar keyCodes = [34, 37, 40, 33, 39, 38];\nvar useSliderProps = {\n  ...useDarkProps,\n  ...useFormProps,\n  min: {\n    type: Number,\n    default: 0\n  },\n  max: {\n    type: Number,\n    default: 100\n  },\n  innerMin: Number,\n  innerMax: Number,\n  step: {\n    type: Number,\n    default: 1,\n    validator: (v) => v >= 0\n  },\n  snap: Boolean,\n  vertical: Boolean,\n  reverse: Boolean,\n  color: String,\n  markerLabelsClass: String,\n  label: Boolean,\n  labelColor: String,\n  labelTextColor: String,\n  labelAlways: Boolean,\n  switchLabelSide: Boolean,\n  markers: [Boolean, Number],\n  markerLabels: [Boolean, Array, Object, Function],\n  switchMarkerLabelsSide: Boolean,\n  trackImg: String,\n  trackColor: String,\n  innerTrackImg: String,\n  innerTrackColor: String,\n  selectionColor: String,\n  selectionImg: String,\n  thumbSize: {\n    type: String,\n    default: \"20px\"\n  },\n  trackSize: {\n    type: String,\n    default: \"4px\"\n  },\n  disable: Boolean,\n  readonly: Boolean,\n  dense: Boolean,\n  tabindex: [String, Number],\n  thumbColor: String,\n  thumbPath: {\n    type: String,\n    default: \"M 4, 10 a 6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0\"\n  }\n};\nvar useSliderEmits = [\"pan\", \"update:modelValue\", \"change\"];\nfunction use_slider_default({ updateValue: updateValue2, updatePosition, getDragging, formAttrs }) {\n  const { props: props4, emit, slots, proxy: { $q } } = getCurrentInstance20();\n  const isDark = use_dark_default(props4, $q);\n  const injectFormInput = useFormInject(formAttrs);\n  const active = ref14(false);\n  const preventFocus = ref14(false);\n  const focus = ref14(false);\n  const dragging = ref14(false);\n  const axis = computed36(() => props4.vertical === true ? \"--v\" : \"--h\");\n  const labelSide = computed36(() => \"-\" + (props4.switchLabelSide === true ? \"switched\" : \"standard\"));\n  const isReversed = computed36(() => props4.vertical === true ? props4.reverse === true : props4.reverse !== ($q.lang.rtl === true));\n  const innerMin = computed36(() => isNaN(props4.innerMin) === true || props4.innerMin < props4.min ? props4.min : props4.innerMin);\n  const innerMax = computed36(() => isNaN(props4.innerMax) === true || props4.innerMax > props4.max ? props4.max : props4.innerMax);\n  const editable = computed36(() => props4.disable !== true && props4.readonly !== true && innerMin.value < innerMax.value);\n  const roundValueFn = computed36(() => {\n    if (props4.step === 0) {\n      return (v) => v;\n    }\n    const decimals = (String(props4.step).trim().split(\".\")[1] || \"\").length;\n    return (v) => parseFloat(v.toFixed(decimals));\n  });\n  const keyStep = computed36(() => props4.step === 0 ? 1 : props4.step);\n  const tabindex = computed36(() => editable.value === true ? props4.tabindex || 0 : -1);\n  const trackLen = computed36(() => props4.max - props4.min);\n  const innerBarLen = computed36(() => innerMax.value - innerMin.value);\n  const innerMinRatio = computed36(() => convertModelToRatio(innerMin.value));\n  const innerMaxRatio = computed36(() => convertModelToRatio(innerMax.value));\n  const positionProp = computed36(() => props4.vertical === true ? isReversed.value === true ? \"bottom\" : \"top\" : isReversed.value === true ? \"right\" : \"left\");\n  const sizeProp = computed36(() => props4.vertical === true ? \"height\" : \"width\");\n  const thicknessProp = computed36(() => props4.vertical === true ? \"width\" : \"height\");\n  const orientation = computed36(() => props4.vertical === true ? \"vertical\" : \"horizontal\");\n  const attributes = computed36(() => {\n    const acc = {\n      role: \"slider\",\n      \"aria-valuemin\": innerMin.value,\n      \"aria-valuemax\": innerMax.value,\n      \"aria-orientation\": orientation.value,\n      \"data-step\": props4.step\n    };\n    if (props4.disable === true) {\n      acc[\"aria-disabled\"] = \"true\";\n    } else if (props4.readonly === true) {\n      acc[\"aria-readonly\"] = \"true\";\n    }\n    return acc;\n  });\n  const classes = computed36(\n    () => `q-slider q-slider${axis.value} q-slider--${active.value === true ? \"\" : \"in\"}active inline no-wrap ` + (props4.vertical === true ? \"row\" : \"column\") + (props4.disable === true ? \" disabled\" : \" q-slider--enabled\" + (editable.value === true ? \" q-slider--editable\" : \"\")) + (focus.value === \"both\" ? \" q-slider--focus\" : \"\") + (props4.label || props4.labelAlways === true ? \" q-slider--label\" : \"\") + (props4.labelAlways === true ? \" q-slider--label-always\" : \"\") + (isDark.value === true ? \" q-slider--dark\" : \"\") + (props4.dense === true ? \" q-slider--dense q-slider--dense\" + axis.value : \"\")\n  );\n  function getPositionClass(name2) {\n    const cls = \"q-slider__\" + name2;\n    return `${cls} ${cls}${axis.value} ${cls}${axis.value}${labelSide.value}`;\n  }\n  function getAxisClass(name2) {\n    const cls = \"q-slider__\" + name2;\n    return `${cls} ${cls}${axis.value}`;\n  }\n  const selectionBarClass = computed36(() => {\n    const color = props4.selectionColor || props4.color;\n    return \"q-slider__selection absolute\" + (color !== void 0 ? ` text-${color}` : \"\");\n  });\n  const markerClass = computed36(() => getAxisClass(\"markers\") + \" absolute overflow-hidden\");\n  const trackContainerClass = computed36(() => getAxisClass(\"track-container\"));\n  const pinClass = computed36(() => getPositionClass(\"pin\"));\n  const labelClass = computed36(() => getPositionClass(\"label\"));\n  const textContainerClass = computed36(() => getPositionClass(\"text-container\"));\n  const markerLabelsContainerClass = computed36(\n    () => getPositionClass(\"marker-labels-container\") + (props4.markerLabelsClass !== void 0 ? ` ${props4.markerLabelsClass}` : \"\")\n  );\n  const trackClass = computed36(\n    () => \"q-slider__track relative-position no-outline\" + (props4.trackColor !== void 0 ? ` bg-${props4.trackColor}` : \"\")\n  );\n  const trackStyle = computed36(() => {\n    const acc = { [thicknessProp.value]: props4.trackSize };\n    if (props4.trackImg !== void 0) {\n      acc.backgroundImage = `url(${props4.trackImg}) !important`;\n    }\n    return acc;\n  });\n  const innerBarClass = computed36(\n    () => \"q-slider__inner absolute\" + (props4.innerTrackColor !== void 0 ? ` bg-${props4.innerTrackColor}` : \"\")\n  );\n  const innerBarStyle = computed36(() => {\n    const innerDiff = innerMaxRatio.value - innerMinRatio.value;\n    const acc = {\n      [positionProp.value]: `${100 * innerMinRatio.value}%`,\n      [sizeProp.value]: innerDiff === 0 ? \"2px\" : `${100 * innerDiff}%`\n    };\n    if (props4.innerTrackImg !== void 0) {\n      acc.backgroundImage = `url(${props4.innerTrackImg}) !important`;\n    }\n    return acc;\n  });\n  function convertRatioToModel(ratio) {\n    const { min, max, step } = props4;\n    let model = min + ratio * (max - min);\n    if (step > 0) {\n      const modulo = (model - innerMin.value) % step;\n      model += (Math.abs(modulo) >= step / 2 ? (modulo < 0 ? -1 : 1) * step : 0) - modulo;\n    }\n    model = roundValueFn.value(model);\n    return between(model, innerMin.value, innerMax.value);\n  }\n  function convertModelToRatio(model) {\n    return trackLen.value === 0 ? 0 : (model - props4.min) / trackLen.value;\n  }\n  function getDraggingRatio(evt, dragging2) {\n    const pos = position(evt), val = props4.vertical === true ? between((pos.top - dragging2.top) / dragging2.height, 0, 1) : between((pos.left - dragging2.left) / dragging2.width, 0, 1);\n    return between(\n      isReversed.value === true ? 1 - val : val,\n      innerMinRatio.value,\n      innerMaxRatio.value\n    );\n  }\n  const markerStep = computed36(\n    () => isNumber(props4.markers) === true ? props4.markers : keyStep.value\n  );\n  const markerTicks = computed36(() => {\n    const acc = [];\n    const step = markerStep.value;\n    const max = props4.max;\n    let value2 = props4.min;\n    do {\n      acc.push(value2);\n      value2 += step;\n    } while (value2 < max);\n    acc.push(max);\n    return acc;\n  });\n  const markerLabelClass = computed36(() => {\n    const prefix = ` ${markerPrefixClass}${axis.value}-`;\n    return markerPrefixClass + `${prefix}${props4.switchMarkerLabelsSide === true ? \"switched\" : \"standard\"}${prefix}${isReversed.value === true ? \"rtl\" : \"ltr\"}`;\n  });\n  const markerLabelsList = computed36(() => {\n    if (props4.markerLabels === false) {\n      return null;\n    }\n    return getMarkerList(props4.markerLabels).map((entry, index) => ({\n      index,\n      value: entry.value,\n      label: entry.label || entry.value,\n      classes: markerLabelClass.value + (entry.classes !== void 0 ? \" \" + entry.classes : \"\"),\n      style: {\n        ...getMarkerLabelStyle(entry.value),\n        ...entry.style || {}\n      }\n    }));\n  });\n  const markerScope = computed36(() => ({\n    markerList: markerLabelsList.value,\n    markerMap: markerLabelsMap.value,\n    classes: markerLabelClass.value,\n    // TODO ts definition\n    getStyle: getMarkerLabelStyle\n  }));\n  const markerStyle = computed36(() => {\n    const size2 = innerBarLen.value === 0 ? \"2px\" : 100 * markerStep.value / innerBarLen.value;\n    return {\n      ...innerBarStyle.value,\n      backgroundSize: props4.vertical === true ? `2px ${size2}%` : `${size2}% 2px`\n    };\n  });\n  function getMarkerList(def) {\n    if (def === false) {\n      return null;\n    }\n    if (def === true) {\n      return markerTicks.value.map(defaultMarkerConvertFn);\n    }\n    if (typeof def === \"function\") {\n      return markerTicks.value.map((value2) => {\n        const item = def(value2);\n        return isObject(item) === true ? { ...item, value: value2 } : { value: value2, label: item };\n      });\n    }\n    const filterFn = ({ value: value2 }) => value2 >= props4.min && value2 <= props4.max;\n    if (Array.isArray(def) === true) {\n      return def.map((item) => isObject(item) === true ? item : { value: item }).filter(filterFn);\n    }\n    return Object.keys(def).map((key) => {\n      const item = def[key];\n      const value2 = Number(key);\n      return isObject(item) === true ? { ...item, value: value2 } : { value: value2, label: item };\n    }).filter(filterFn);\n  }\n  function getMarkerLabelStyle(val) {\n    return { [positionProp.value]: `${100 * (val - props4.min) / trackLen.value}%` };\n  }\n  const markerLabelsMap = computed36(() => {\n    if (props4.markerLabels === false) {\n      return null;\n    }\n    const acc = {};\n    markerLabelsList.value.forEach((entry) => {\n      acc[entry.value] = entry;\n    });\n    return acc;\n  });\n  function getMarkerLabelsContent() {\n    if (slots[\"marker-label-group\"] !== void 0) {\n      return slots[\"marker-label-group\"](markerScope.value);\n    }\n    const fn = slots[\"marker-label\"] || defaultMarkerLabelRenderFn;\n    return markerLabelsList.value.map((marker) => fn({\n      marker,\n      ...markerScope.value\n    }));\n  }\n  const panDirective = computed36(() => {\n    return [[\n      TouchPan_default,\n      onPan,\n      void 0,\n      {\n        [orientation.value]: true,\n        prevent: true,\n        stop: true,\n        mouse: true,\n        mouseAllDir: true\n      }\n    ]];\n  });\n  function onPan(event) {\n    if (event.isFinal === true) {\n      if (dragging.value !== void 0) {\n        updatePosition(event.evt);\n        event.touch === true && updateValue2(true);\n        dragging.value = void 0;\n        emit(\"pan\", \"end\");\n      }\n      active.value = false;\n      focus.value = false;\n    } else if (event.isFirst === true) {\n      dragging.value = getDragging(event.evt);\n      updatePosition(event.evt);\n      updateValue2();\n      active.value = true;\n      emit(\"pan\", \"start\");\n    } else {\n      updatePosition(event.evt);\n      updateValue2();\n    }\n  }\n  function onBlur2() {\n    focus.value = false;\n  }\n  function onActivate(evt) {\n    updatePosition(evt, getDragging(evt));\n    updateValue2();\n    preventFocus.value = true;\n    active.value = true;\n    document.addEventListener(\"mouseup\", onDeactivate, true);\n  }\n  function onDeactivate() {\n    preventFocus.value = false;\n    active.value = false;\n    updateValue2(true);\n    onBlur2();\n    document.removeEventListener(\"mouseup\", onDeactivate, true);\n  }\n  function onMobileClick(evt) {\n    updatePosition(evt, getDragging(evt));\n    updateValue2(true);\n  }\n  function onKeyup2(evt) {\n    if (keyCodes.includes(evt.keyCode)) {\n      updateValue2(true);\n    }\n  }\n  function getTextContainerStyle(ratio) {\n    if (props4.vertical === true) {\n      return null;\n    }\n    const p = $q.lang.rtl !== props4.reverse ? 1 - ratio : ratio;\n    return {\n      transform: `translateX(calc(${2 * p - 1} * ${props4.thumbSize} / 2 + ${50 - 100 * p}%))`\n    };\n  }\n  function getThumbRenderFn(thumb) {\n    const focusClass = computed36(() => preventFocus.value === false && (focus.value === thumb.focusValue || focus.value === \"both\") ? \" q-slider--focus\" : \"\");\n    const classes2 = computed36(\n      () => `q-slider__thumb q-slider__thumb${axis.value} q-slider__thumb${axis.value}-${isReversed.value === true ? \"rtl\" : \"ltr\"} absolute non-selectable` + focusClass.value + (thumb.thumbColor.value !== void 0 ? ` text-${thumb.thumbColor.value}` : \"\")\n    );\n    const style2 = computed36(() => ({\n      width: props4.thumbSize,\n      height: props4.thumbSize,\n      [positionProp.value]: `${100 * thumb.ratio.value}%`,\n      zIndex: focus.value === thumb.focusValue ? 2 : void 0\n    }));\n    const pinColor = computed36(() => thumb.labelColor.value !== void 0 ? ` text-${thumb.labelColor.value}` : \"\");\n    const textContainerStyle = computed36(() => getTextContainerStyle(thumb.ratio.value));\n    const textClass = computed36(() => \"q-slider__text\" + (thumb.labelTextColor.value !== void 0 ? ` text-${thumb.labelTextColor.value}` : \"\"));\n    return () => {\n      const thumbContent = [\n        h31(\"svg\", {\n          class: \"q-slider__thumb-shape absolute-full\",\n          viewBox: \"0 0 20 20\",\n          \"aria-hidden\": \"true\"\n        }, [\n          h31(\"path\", { d: props4.thumbPath })\n        ]),\n        h31(\"div\", { class: \"q-slider__focus-ring fit\" })\n      ];\n      if (props4.label === true || props4.labelAlways === true) {\n        thumbContent.push(\n          h31(\"div\", {\n            class: pinClass.value + \" absolute fit no-pointer-events\" + pinColor.value\n          }, [\n            h31(\"div\", {\n              class: labelClass.value,\n              style: { minWidth: props4.thumbSize }\n            }, [\n              h31(\"div\", {\n                class: textContainerClass.value,\n                style: textContainerStyle.value\n              }, [\n                h31(\"span\", { class: textClass.value }, thumb.label.value)\n              ])\n            ])\n          ])\n        );\n        if (props4.name !== void 0 && props4.disable !== true) {\n          injectFormInput(thumbContent, \"push\");\n        }\n      }\n      return h31(\"div\", {\n        class: classes2.value,\n        style: style2.value,\n        ...thumb.getNodeData()\n      }, thumbContent);\n    };\n  }\n  function getContent(selectionBarStyle, trackContainerTabindex, trackContainerEvents, injectThumb) {\n    const trackContent = [];\n    props4.innerTrackColor !== \"transparent\" && trackContent.push(\n      h31(\"div\", {\n        key: \"inner\",\n        class: innerBarClass.value,\n        style: innerBarStyle.value\n      })\n    );\n    props4.selectionColor !== \"transparent\" && trackContent.push(\n      h31(\"div\", {\n        key: \"selection\",\n        class: selectionBarClass.value,\n        style: selectionBarStyle.value\n      })\n    );\n    props4.markers !== false && trackContent.push(\n      h31(\"div\", {\n        key: \"marker\",\n        class: markerClass.value,\n        style: markerStyle.value\n      })\n    );\n    injectThumb(trackContent);\n    const content = [\n      hDir(\n        \"div\",\n        {\n          key: \"trackC\",\n          class: trackContainerClass.value,\n          tabindex: trackContainerTabindex.value,\n          ...trackContainerEvents.value\n        },\n        [\n          h31(\"div\", {\n            class: trackClass.value,\n            style: trackStyle.value\n          }, trackContent)\n        ],\n        \"slide\",\n        editable.value,\n        () => panDirective.value\n      )\n    ];\n    if (props4.markerLabels !== false) {\n      const action = props4.switchMarkerLabelsSide === true ? \"unshift\" : \"push\";\n      content[action](\n        h31(\"div\", {\n          key: \"markerL\",\n          class: markerLabelsContainerClass.value\n        }, getMarkerLabelsContent())\n      );\n    }\n    return content;\n  }\n  onBeforeUnmount10(() => {\n    document.removeEventListener(\"mouseup\", onDeactivate, true);\n  });\n  return {\n    state: {\n      active,\n      focus,\n      preventFocus,\n      dragging,\n      editable,\n      classes,\n      tabindex,\n      attributes,\n      roundValueFn,\n      keyStep,\n      trackLen,\n      innerMin,\n      innerMinRatio,\n      innerMax,\n      innerMaxRatio,\n      positionProp,\n      sizeProp,\n      isReversed\n    },\n    methods: {\n      onActivate,\n      onMobileClick,\n      onBlur: onBlur2,\n      onKeyup: onKeyup2,\n      getContent,\n      getThumbRenderFn,\n      convertRatioToModel,\n      convertModelToRatio,\n      getDraggingRatio\n    }\n  };\n}\n\n// src/components/slider/QSlider.js\nvar getNodeData = () => ({});\nvar QSlider_default = createComponent({\n  name: \"QSlider\",\n  props: {\n    ...useSliderProps,\n    modelValue: {\n      required: true,\n      default: null,\n      validator: (v) => typeof v === \"number\" || v === null\n    },\n    labelValue: [String, Number]\n  },\n  emits: useSliderEmits,\n  setup(props4, { emit }) {\n    const { proxy: { $q } } = getCurrentInstance21();\n    const { state, methods } = use_slider_default({\n      updateValue: updateValue2,\n      updatePosition,\n      getDragging,\n      formAttrs: useFormAttrs(props4)\n    });\n    const rootRef = ref15(null);\n    const curRatio = ref15(0);\n    const model = ref15(0);\n    function normalizeModel() {\n      model.value = props4.modelValue === null ? state.innerMin.value : between(props4.modelValue, state.innerMin.value, state.innerMax.value);\n    }\n    watch10(\n      () => `${props4.modelValue}|${state.innerMin.value}|${state.innerMax.value}`,\n      normalizeModel\n    );\n    normalizeModel();\n    const modelRatio = computed37(() => methods.convertModelToRatio(model.value));\n    const ratio = computed37(() => state.active.value === true ? curRatio.value : modelRatio.value);\n    const selectionBarStyle = computed37(() => {\n      const acc = {\n        [state.positionProp.value]: `${100 * state.innerMinRatio.value}%`,\n        [state.sizeProp.value]: `${100 * (ratio.value - state.innerMinRatio.value)}%`\n      };\n      if (props4.selectionImg !== void 0) {\n        acc.backgroundImage = `url(${props4.selectionImg}) !important`;\n      }\n      return acc;\n    });\n    const getThumb = methods.getThumbRenderFn({\n      focusValue: true,\n      getNodeData,\n      ratio,\n      label: computed37(() => props4.labelValue !== void 0 ? props4.labelValue : model.value),\n      thumbColor: computed37(() => props4.thumbColor || props4.color),\n      labelColor: computed37(() => props4.labelColor),\n      labelTextColor: computed37(() => props4.labelTextColor)\n    });\n    const trackContainerEvents = computed37(() => {\n      if (state.editable.value !== true) {\n        return {};\n      }\n      return $q.platform.is.mobile === true ? { onClick: methods.onMobileClick } : {\n        onMousedown: methods.onActivate,\n        onFocus,\n        onBlur: methods.onBlur,\n        onKeydown: onKeydown2,\n        onKeyup: methods.onKeyup\n      };\n    });\n    function updateValue2(change) {\n      if (model.value !== props4.modelValue) {\n        emit(\"update:modelValue\", model.value);\n      }\n      change === true && emit(\"change\", model.value);\n    }\n    function getDragging() {\n      return rootRef.value.getBoundingClientRect();\n    }\n    function updatePosition(event, dragging = state.dragging.value) {\n      const ratio2 = methods.getDraggingRatio(event, dragging);\n      model.value = methods.convertRatioToModel(ratio2);\n      curRatio.value = props4.snap !== true || props4.step === 0 ? ratio2 : methods.convertModelToRatio(model.value);\n    }\n    function onFocus() {\n      state.focus.value = true;\n    }\n    function onKeydown2(evt) {\n      if (keyCodes.includes(evt.keyCode) === false) return;\n      stopAndPrevent(evt);\n      const stepVal = ([34, 33].includes(evt.keyCode) ? 10 : 1) * state.keyStep.value, offset2 = ([34, 37, 40].includes(evt.keyCode) ? -1 : 1) * (state.isReversed.value === true ? -1 : 1) * (props4.vertical === true ? -1 : 1) * stepVal;\n      model.value = between(\n        state.roundValueFn.value(model.value + offset2),\n        state.innerMin.value,\n        state.innerMax.value\n      );\n      updateValue2();\n    }\n    return () => {\n      const content = methods.getContent(\n        selectionBarStyle,\n        state.tabindex,\n        trackContainerEvents,\n        (node) => {\n          node.push(getThumb());\n        }\n      );\n      return h32(\"div\", {\n        ref: rootRef,\n        class: state.classes.value + (props4.modelValue === null ? \" q-slider--no-value\" : \"\"),\n        ...state.attributes.value,\n        \"aria-valuenow\": props4.modelValue\n      }, content);\n    };\n  }\n});\n\n// src/components/tabs/QTabs.js\nimport { h as h34, ref as ref17, computed as computed38, watch as watch11, onBeforeUnmount as onBeforeUnmount12, onActivated, onDeactivated as onDeactivated3, getCurrentInstance as getCurrentInstance23, provide } from \"vue\";\n\n// src/components/resize-observer/QResizeObserver.js\nimport { h as h33, onMounted as onMounted9, onBeforeUnmount as onBeforeUnmount11, getCurrentInstance as getCurrentInstance22, nextTick as nextTick4 } from \"vue\";\n\n// src/composables/use-hydration/use-hydration.js\nimport { ref as ref16, onMounted as onMounted8 } from \"vue\";\nfunction use_hydration_default() {\n  const isHydrated = ref16(!isRuntimeSsrPreHydration.value);\n  if (isHydrated.value === false) {\n    onMounted8(() => {\n      isHydrated.value = true;\n    });\n  }\n  return { isHydrated };\n}\n\n// src/components/resize-observer/QResizeObserver.js\nvar hasObserver = typeof ResizeObserver !== \"undefined\";\nvar resizeProps = hasObserver === true ? {} : {\n  style: \"display:block;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;\",\n  url: \"about:blank\"\n};\nvar QResizeObserver_default = createComponent({\n  name: \"QResizeObserver\",\n  props: {\n    debounce: {\n      type: [String, Number],\n      default: 100\n    }\n  },\n  emits: [\"resize\"],\n  setup(props4, { emit }) {\n    if (false) {\n      return noop;\n    }\n    let timer2 = null, targetEl, size2 = { width: -1, height: -1 };\n    function trigger3(immediately) {\n      if (immediately === true || props4.debounce === 0 || props4.debounce === \"0\") {\n        emitEvent();\n      } else if (timer2 === null) {\n        timer2 = setTimeout(emitEvent, props4.debounce);\n      }\n    }\n    function emitEvent() {\n      if (timer2 !== null) {\n        clearTimeout(timer2);\n        timer2 = null;\n      }\n      if (targetEl) {\n        const { offsetWidth: width3, offsetHeight: height2 } = targetEl;\n        if (width3 !== size2.width || height2 !== size2.height) {\n          size2 = { width: width3, height: height2 };\n          emit(\"resize\", size2);\n        }\n      }\n    }\n    const { proxy } = getCurrentInstance22();\n    proxy.trigger = trigger3;\n    if (hasObserver === true) {\n      let observer;\n      const init = (stop2) => {\n        targetEl = proxy.$el.parentNode;\n        if (targetEl) {\n          observer = new ResizeObserver(trigger3);\n          observer.observe(targetEl);\n          emitEvent();\n        } else if (stop2 !== true) {\n          nextTick4(() => {\n            init(true);\n          });\n        }\n      };\n      onMounted9(() => {\n        init();\n      });\n      onBeforeUnmount11(() => {\n        timer2 !== null && clearTimeout(timer2);\n        if (observer !== void 0) {\n          if (observer.disconnect !== void 0) {\n            observer.disconnect();\n          } else if (targetEl) {\n            observer.unobserve(targetEl);\n          }\n        }\n      });\n      return noop;\n    } else {\n      let cleanup = function() {\n        if (timer2 !== null) {\n          clearTimeout(timer2);\n          timer2 = null;\n        }\n        if (curDocView !== void 0) {\n          if (curDocView.removeEventListener !== void 0) {\n            curDocView.removeEventListener(\"resize\", trigger3, listenOpts.passive);\n          }\n          curDocView = void 0;\n        }\n      }, onObjLoad = function() {\n        cleanup();\n        if (targetEl && targetEl.contentDocument) {\n          curDocView = targetEl.contentDocument.defaultView;\n          curDocView.addEventListener(\"resize\", trigger3, listenOpts.passive);\n          emitEvent();\n        }\n      };\n      const { isHydrated } = use_hydration_default();\n      let curDocView;\n      onMounted9(() => {\n        nextTick4(() => {\n          targetEl = proxy.$el;\n          targetEl && onObjLoad();\n        });\n      });\n      onBeforeUnmount11(cleanup);\n      return () => {\n        if (isHydrated.value === true) {\n          return h33(\"object\", {\n            class: \"q--avoid-card-border\",\n            style: resizeProps.style,\n            tabindex: -1,\n            // fix for Firefox\n            type: \"text/html\",\n            data: resizeProps.url,\n            \"aria-hidden\": \"true\",\n            onLoad: onObjLoad\n          });\n        }\n      };\n    }\n  }\n});\n\n// src/utils/private.rtl/rtl.js\nvar rtlHasScrollBug = false;\nif (!__QUASAR_SSR__) {\n  const scroller = document.createElement(\"div\");\n  scroller.setAttribute(\"dir\", \"rtl\");\n  Object.assign(scroller.style, {\n    width: \"1px\",\n    height: \"1px\",\n    overflow: \"auto\"\n  });\n  const spacer = document.createElement(\"div\");\n  Object.assign(spacer.style, {\n    width: \"1000px\",\n    height: \"1px\"\n  });\n  document.body.appendChild(scroller);\n  scroller.appendChild(spacer);\n  scroller.scrollLeft = -1e3;\n  rtlHasScrollBug = scroller.scrollLeft >= 0;\n  scroller.remove();\n}\n\n// src/components/tabs/QTabs.js\nfunction getIndicatorClass(color, top, vertical) {\n  const pos = vertical === true ? [\"left\", \"right\"] : [\"top\", \"bottom\"];\n  return `absolute-${top === true ? pos[0] : pos[1]}${color ? ` text-${color}` : \"\"}`;\n}\nvar alignValues3 = [\"left\", \"center\", \"right\", \"justify\"];\nvar QTabs_default = createComponent({\n  name: \"QTabs\",\n  props: {\n    modelValue: [Number, String],\n    align: {\n      type: String,\n      default: \"center\",\n      validator: (v) => alignValues3.includes(v)\n    },\n    breakpoint: {\n      type: [String, Number],\n      default: 600\n    },\n    vertical: Boolean,\n    shrink: Boolean,\n    stretch: Boolean,\n    activeClass: String,\n    activeColor: String,\n    activeBgColor: String,\n    indicatorColor: String,\n    leftIcon: String,\n    rightIcon: String,\n    outsideArrows: Boolean,\n    mobileArrows: Boolean,\n    switchIndicator: Boolean,\n    narrowIndicator: Boolean,\n    inlineLabel: Boolean,\n    noCaps: Boolean,\n    dense: Boolean,\n    contentClass: String,\n    \"onUpdate:modelValue\": [Function, Array]\n  },\n  setup(props4, { slots, emit }) {\n    const { proxy } = getCurrentInstance23();\n    const { $q } = proxy;\n    const { registerTick: registerScrollTick } = use_tick_default();\n    const { registerTick: registerUpdateArrowsTick } = use_tick_default();\n    const { registerTick: registerAnimateTick } = use_tick_default();\n    const { registerTimeout: registerFocusTimeout, removeTimeout: removeFocusTimeout } = use_timeout_default();\n    const { registerTimeout: registerScrollToTabTimeout, removeTimeout: removeScrollToTabTimeout } = use_timeout_default();\n    const rootRef = ref17(null);\n    const contentRef = ref17(null);\n    const currentModel = ref17(props4.modelValue);\n    const scrollable = ref17(false);\n    const leftArrow = ref17(true);\n    const rightArrow = ref17(false);\n    const justify = ref17(false);\n    const tabDataList = [];\n    const tabDataListLen = ref17(0);\n    const hasFocus = ref17(false);\n    let animateTimer = null, scrollTimer = null, unwatchRoute;\n    const tabProps = computed38(() => ({\n      activeClass: props4.activeClass,\n      activeColor: props4.activeColor,\n      activeBgColor: props4.activeBgColor,\n      indicatorClass: getIndicatorClass(\n        props4.indicatorColor,\n        props4.switchIndicator,\n        props4.vertical\n      ),\n      narrowIndicator: props4.narrowIndicator,\n      inlineLabel: props4.inlineLabel,\n      noCaps: props4.noCaps\n    }));\n    const hasActiveTab = computed38(() => {\n      const len = tabDataListLen.value;\n      const val = currentModel.value;\n      for (let i = 0; i < len; i++) {\n        if (tabDataList[i].name.value === val) {\n          return true;\n        }\n      }\n      return false;\n    });\n    const alignClass = computed38(() => {\n      const align = scrollable.value === true ? \"left\" : justify.value === true ? \"justify\" : props4.align;\n      return `q-tabs__content--align-${align}`;\n    });\n    const classes = computed38(\n      () => `q-tabs row no-wrap items-center q-tabs--${scrollable.value === true ? \"\" : \"not-\"}scrollable q-tabs--${props4.vertical === true ? \"vertical\" : \"horizontal\"} q-tabs__arrows--${props4.outsideArrows === true ? \"outside\" : \"inside\"} q-tabs--mobile-with${props4.mobileArrows === true ? \"\" : \"out\"}-arrows` + (props4.dense === true ? \" q-tabs--dense\" : \"\") + (props4.shrink === true ? \" col-shrink\" : \"\") + (props4.stretch === true ? \" self-stretch\" : \"\")\n    );\n    const innerClass = computed38(\n      () => \"q-tabs__content scroll--mobile row no-wrap items-center self-stretch hide-scrollbar relative-position \" + alignClass.value + (props4.contentClass !== void 0 ? ` ${props4.contentClass}` : \"\")\n    );\n    const domProps = computed38(() => props4.vertical === true ? { container: \"height\", content: \"offsetHeight\", scroll: \"scrollHeight\" } : { container: \"width\", content: \"offsetWidth\", scroll: \"scrollWidth\" });\n    const isRTL = computed38(() => props4.vertical !== true && $q.lang.rtl === true);\n    const rtlPosCorrection = computed38(() => rtlHasScrollBug === false && isRTL.value === true);\n    watch11(isRTL, updateArrows);\n    watch11(() => props4.modelValue, (name2) => {\n      updateModel2({ name: name2, setCurrent: true, skipEmit: true });\n    });\n    watch11(() => props4.outsideArrows, recalculateScroll);\n    function updateModel2({ name: name2, setCurrent, skipEmit }) {\n      if (currentModel.value === name2) return;\n      if (skipEmit !== true && props4[\"onUpdate:modelValue\"] !== void 0) {\n        emit(\"update:modelValue\", name2);\n      }\n      if (setCurrent === true || props4[\"onUpdate:modelValue\"] === void 0) {\n        animate(currentModel.value, name2);\n        currentModel.value = name2;\n      }\n    }\n    function recalculateScroll() {\n      registerScrollTick(() => {\n        rootRef.value && updateContainer({\n          width: rootRef.value.offsetWidth,\n          height: rootRef.value.offsetHeight\n        });\n      });\n    }\n    function updateContainer(domSize) {\n      if (domProps.value === void 0 || contentRef.value === null) return;\n      const size2 = domSize[domProps.value.container], scrollSize = Math.min(\n        contentRef.value[domProps.value.scroll],\n        Array.prototype.reduce.call(\n          contentRef.value.children,\n          (acc, el) => acc + (el[domProps.value.content] || 0),\n          0\n        )\n      ), scroll = size2 > 0 && scrollSize > size2;\n      scrollable.value = scroll;\n      scroll === true && registerUpdateArrowsTick(updateArrows);\n      justify.value = size2 < parseInt(props4.breakpoint, 10);\n    }\n    function animate(oldName, newName) {\n      const oldTab = oldName !== void 0 && oldName !== null && oldName !== \"\" ? tabDataList.find((tab) => tab.name.value === oldName) : null, newTab = newName !== void 0 && newName !== null && newName !== \"\" ? tabDataList.find((tab) => tab.name.value === newName) : null;\n      if (hadActivated === true) {\n        hadActivated = false;\n      } else if (oldTab && newTab) {\n        const oldEl = oldTab.tabIndicatorRef.value, newEl = newTab.tabIndicatorRef.value;\n        if (animateTimer !== null) {\n          clearTimeout(animateTimer);\n          animateTimer = null;\n        }\n        oldEl.style.transition = \"none\";\n        oldEl.style.transform = \"none\";\n        newEl.style.transition = \"none\";\n        newEl.style.transform = \"none\";\n        const oldPos = oldEl.getBoundingClientRect(), newPos = newEl.getBoundingClientRect();\n        newEl.style.transform = props4.vertical === true ? `translate3d(0,${oldPos.top - newPos.top}px,0) scale3d(1,${newPos.height ? oldPos.height / newPos.height : 1},1)` : `translate3d(${oldPos.left - newPos.left}px,0,0) scale3d(${newPos.width ? oldPos.width / newPos.width : 1},1,1)`;\n        registerAnimateTick(() => {\n          animateTimer = setTimeout(() => {\n            animateTimer = null;\n            newEl.style.transition = \"transform .25s cubic-bezier(.4, 0, .2, 1)\";\n            newEl.style.transform = \"none\";\n          }, 70);\n        });\n      }\n      if (newTab && scrollable.value === true) {\n        scrollToTabEl(newTab.rootRef.value);\n      }\n    }\n    function scrollToTabEl(el) {\n      const { left, width: width3, top, height: height2 } = contentRef.value.getBoundingClientRect(), newPos = el.getBoundingClientRect();\n      let offset2 = props4.vertical === true ? newPos.top - top : newPos.left - left;\n      if (offset2 < 0) {\n        contentRef.value[props4.vertical === true ? \"scrollTop\" : \"scrollLeft\"] += Math.floor(offset2);\n        updateArrows();\n        return;\n      }\n      offset2 += props4.vertical === true ? newPos.height - height2 : newPos.width - width3;\n      if (offset2 > 0) {\n        contentRef.value[props4.vertical === true ? \"scrollTop\" : \"scrollLeft\"] += Math.ceil(offset2);\n        updateArrows();\n      }\n    }\n    function updateArrows() {\n      const content = contentRef.value;\n      if (content === null) return;\n      const rect = content.getBoundingClientRect(), pos = props4.vertical === true ? content.scrollTop : Math.abs(content.scrollLeft);\n      if (isRTL.value === true) {\n        leftArrow.value = Math.ceil(pos + rect.width) < content.scrollWidth - 1;\n        rightArrow.value = pos > 0;\n      } else {\n        leftArrow.value = pos > 0;\n        rightArrow.value = props4.vertical === true ? Math.ceil(pos + rect.height) < content.scrollHeight : Math.ceil(pos + rect.width) < content.scrollWidth;\n      }\n    }\n    function animScrollTo(value2) {\n      scrollTimer !== null && clearInterval(scrollTimer);\n      scrollTimer = setInterval(() => {\n        if (scrollTowards(value2) === true) {\n          stopAnimScroll();\n        }\n      }, 5);\n    }\n    function scrollToStart() {\n      animScrollTo(rtlPosCorrection.value === true ? Number.MAX_SAFE_INTEGER : 0);\n    }\n    function scrollToEnd() {\n      animScrollTo(rtlPosCorrection.value === true ? 0 : Number.MAX_SAFE_INTEGER);\n    }\n    function stopAnimScroll() {\n      if (scrollTimer !== null) {\n        clearInterval(scrollTimer);\n        scrollTimer = null;\n      }\n    }\n    function onKbdNavigate(keyCode, fromEl) {\n      const tabs = Array.prototype.filter.call(\n        contentRef.value.children,\n        (el) => el === fromEl || el.matches && el.matches(\".q-tab.q-focusable\") === true\n      );\n      const len = tabs.length;\n      if (len === 0) return;\n      if (keyCode === 36) {\n        scrollToTabEl(tabs[0]);\n        tabs[0].focus();\n        return true;\n      }\n      if (keyCode === 35) {\n        scrollToTabEl(tabs[len - 1]);\n        tabs[len - 1].focus();\n        return true;\n      }\n      const dirPrev = keyCode === (props4.vertical === true ? 38 : 37);\n      const dirNext = keyCode === (props4.vertical === true ? 40 : 39);\n      const dir = dirPrev === true ? -1 : dirNext === true ? 1 : void 0;\n      if (dir !== void 0) {\n        const rtlDir = isRTL.value === true ? -1 : 1;\n        const index = tabs.indexOf(fromEl) + dir * rtlDir;\n        if (index >= 0 && index < len) {\n          scrollToTabEl(tabs[index]);\n          tabs[index].focus({ preventScroll: true });\n        }\n        return true;\n      }\n    }\n    const posFn = computed38(() => rtlPosCorrection.value === true ? { get: (content) => Math.abs(content.scrollLeft), set: (content, pos) => {\n      content.scrollLeft = -pos;\n    } } : props4.vertical === true ? { get: (content) => content.scrollTop, set: (content, pos) => {\n      content.scrollTop = pos;\n    } } : { get: (content) => content.scrollLeft, set: (content, pos) => {\n      content.scrollLeft = pos;\n    } });\n    function scrollTowards(value2) {\n      const content = contentRef.value, { get: get2, set: set2 } = posFn.value;\n      let done = false, pos = get2(content);\n      const direction = value2 < pos ? -1 : 1;\n      pos += direction * 5;\n      if (pos < 0) {\n        done = true;\n        pos = 0;\n      } else if (direction === -1 && pos <= value2 || direction === 1 && pos >= value2) {\n        done = true;\n        pos = value2;\n      }\n      set2(content, pos);\n      updateArrows();\n      return done;\n    }\n    function hasQueryIncluded(targetQuery, matchingQuery) {\n      for (const key in targetQuery) {\n        if (targetQuery[key] !== matchingQuery[key]) {\n          return false;\n        }\n      }\n      return true;\n    }\n    function updateActiveRoute() {\n      let name2 = null, bestScore = { matchedLen: 0, queryDiff: 9999, hrefLen: 0 };\n      const list = tabDataList.filter((tab) => tab.routeData !== void 0 && tab.routeData.hasRouterLink.value === true);\n      const { hash: currentHash, query: currentQuery } = proxy.$route;\n      const currentQueryLen = Object.keys(currentQuery).length;\n      for (const tab of list) {\n        const exact = tab.routeData.exact.value === true;\n        if (tab.routeData[exact === true ? \"linkIsExactActive\" : \"linkIsActive\"].value !== true) {\n          continue;\n        }\n        const { hash, query, matched, href: href2 } = tab.routeData.resolvedLink.value;\n        const queryLen = Object.keys(query).length;\n        if (exact === true) {\n          if (hash !== currentHash) {\n            continue;\n          }\n          if (queryLen !== currentQueryLen || hasQueryIncluded(currentQuery, query) === false) {\n            continue;\n          }\n          name2 = tab.name.value;\n          break;\n        }\n        if (hash !== \"\" && hash !== currentHash) {\n          continue;\n        }\n        if (queryLen !== 0 && hasQueryIncluded(query, currentQuery) === false) {\n          continue;\n        }\n        const newScore = {\n          matchedLen: matched.length,\n          queryDiff: currentQueryLen - queryLen,\n          hrefLen: href2.length - hash.length\n        };\n        if (newScore.matchedLen > bestScore.matchedLen) {\n          name2 = tab.name.value;\n          bestScore = newScore;\n          continue;\n        } else if (newScore.matchedLen !== bestScore.matchedLen) {\n          continue;\n        }\n        if (newScore.queryDiff < bestScore.queryDiff) {\n          name2 = tab.name.value;\n          bestScore = newScore;\n        } else if (newScore.queryDiff !== bestScore.queryDiff) {\n          continue;\n        }\n        if (newScore.hrefLen > bestScore.hrefLen) {\n          name2 = tab.name.value;\n          bestScore = newScore;\n        }\n      }\n      if (name2 === null && tabDataList.some((tab) => tab.routeData === void 0 && tab.name.value === currentModel.value) === true) {\n        hadActivated = false;\n        return;\n      }\n      updateModel2({ name: name2, setCurrent: true });\n    }\n    function onFocusin(e) {\n      removeFocusTimeout();\n      if (hasFocus.value !== true && rootRef.value !== null && e.target && typeof e.target.closest === \"function\") {\n        const tab = e.target.closest(\".q-tab\");\n        if (tab && rootRef.value.contains(tab) === true) {\n          hasFocus.value = true;\n          scrollable.value === true && scrollToTabEl(tab);\n        }\n      }\n    }\n    function onFocusout() {\n      registerFocusTimeout(() => {\n        hasFocus.value = false;\n      }, 30);\n    }\n    function verifyRouteModel() {\n      if ($tabs.avoidRouteWatcher === false) {\n        registerScrollToTabTimeout(updateActiveRoute);\n      } else {\n        removeScrollToTabTimeout();\n      }\n    }\n    function watchRoute() {\n      if (unwatchRoute === void 0) {\n        const unwatch = watch11(() => proxy.$route.fullPath, verifyRouteModel);\n        unwatchRoute = () => {\n          unwatch();\n          unwatchRoute = void 0;\n        };\n      }\n    }\n    function registerTab(tabData) {\n      tabDataList.push(tabData);\n      tabDataListLen.value++;\n      recalculateScroll();\n      if (tabData.routeData === void 0 || proxy.$route === void 0) {\n        registerScrollToTabTimeout(() => {\n          if (scrollable.value === true) {\n            const value2 = currentModel.value;\n            const newTab = value2 !== void 0 && value2 !== null && value2 !== \"\" ? tabDataList.find((tab) => tab.name.value === value2) : null;\n            newTab && scrollToTabEl(newTab.rootRef.value);\n          }\n        });\n      } else {\n        watchRoute();\n        if (tabData.routeData.hasRouterLink.value === true) {\n          verifyRouteModel();\n        }\n      }\n    }\n    function unregisterTab(tabData) {\n      tabDataList.splice(tabDataList.indexOf(tabData), 1);\n      tabDataListLen.value--;\n      recalculateScroll();\n      if (unwatchRoute !== void 0 && tabData.routeData !== void 0) {\n        if (tabDataList.every((tab) => tab.routeData === void 0) === true) {\n          unwatchRoute();\n        }\n        verifyRouteModel();\n      }\n    }\n    const $tabs = {\n      currentModel,\n      tabProps,\n      hasFocus,\n      hasActiveTab,\n      registerTab,\n      unregisterTab,\n      verifyRouteModel,\n      updateModel: updateModel2,\n      onKbdNavigate,\n      avoidRouteWatcher: false\n      // false | string (uid)\n    };\n    provide(tabsKey, $tabs);\n    function cleanup() {\n      animateTimer !== null && clearTimeout(animateTimer);\n      stopAnimScroll();\n      unwatchRoute !== void 0 && unwatchRoute();\n    }\n    let hadRouteWatcher, hadActivated;\n    onBeforeUnmount12(cleanup);\n    onDeactivated3(() => {\n      hadRouteWatcher = unwatchRoute !== void 0;\n      cleanup();\n    });\n    onActivated(() => {\n      if (hadRouteWatcher === true) {\n        watchRoute();\n        hadActivated = true;\n        verifyRouteModel();\n      }\n      recalculateScroll();\n    });\n    return () => {\n      return h34(\"div\", {\n        ref: rootRef,\n        class: classes.value,\n        role: \"tablist\",\n        onFocusin,\n        onFocusout\n      }, [\n        h34(QResizeObserver_default, { onResize: updateContainer }),\n        h34(\"div\", {\n          ref: contentRef,\n          class: innerClass.value,\n          onScroll: updateArrows\n        }, hSlot(slots.default)),\n        h34(QIcon_default, {\n          class: \"q-tabs__arrow q-tabs__arrow--left absolute q-tab__icon\" + (leftArrow.value === true ? \"\" : \" q-tabs__arrow--faded\"),\n          name: props4.leftIcon || $q.iconSet.tabs[props4.vertical === true ? \"up\" : \"left\"],\n          onMousedownPassive: scrollToStart,\n          onTouchstartPassive: scrollToStart,\n          onMouseupPassive: stopAnimScroll,\n          onMouseleavePassive: stopAnimScroll,\n          onTouchendPassive: stopAnimScroll\n        }),\n        h34(QIcon_default, {\n          class: \"q-tabs__arrow q-tabs__arrow--right absolute q-tab__icon\" + (rightArrow.value === true ? \"\" : \" q-tabs__arrow--faded\"),\n          name: props4.rightIcon || $q.iconSet.tabs[props4.vertical === true ? \"down\" : \"right\"],\n          onMousedownPassive: scrollToEnd,\n          onTouchstartPassive: scrollToEnd,\n          onMouseupPassive: stopAnimScroll,\n          onMouseleavePassive: stopAnimScroll,\n          onTouchendPassive: stopAnimScroll\n        })\n      ]);\n    };\n  }\n});\n\n// src/components/tabs/use-tab.js\nimport { h as h35, ref as ref18, computed as computed39, inject, onBeforeUnmount as onBeforeUnmount13, onMounted as onMounted10, withDirectives as withDirectives3, getCurrentInstance as getCurrentInstance24 } from \"vue\";\nvar id = 0;\nvar useTabEmits = [\"click\", \"keydown\"];\nvar useTabProps = {\n  icon: String,\n  label: [Number, String],\n  alert: [Boolean, String],\n  alertIcon: String,\n  name: {\n    type: [Number, String],\n    default: () => `t_${id++}`\n  },\n  noCaps: Boolean,\n  tabindex: [String, Number],\n  disable: Boolean,\n  contentClass: String,\n  ripple: {\n    type: [Boolean, Object],\n    default: true\n  }\n};\nfunction use_tab_default(props4, slots, emit, routeData) {\n  const $tabs = inject(tabsKey, emptyRenderFn);\n  if ($tabs === emptyRenderFn) {\n    console.error(\"QTab/QRouteTab component needs to be child of QTabs\");\n    return emptyRenderFn;\n  }\n  const { proxy } = getCurrentInstance24();\n  const blurTargetRef = ref18(null);\n  const rootRef = ref18(null);\n  const tabIndicatorRef = ref18(null);\n  const ripple = computed39(() => props4.disable === true || props4.ripple === false ? false : Object.assign(\n    { keyCodes: [13, 32], early: true },\n    props4.ripple === true ? {} : props4.ripple\n  ));\n  const isActive = computed39(() => $tabs.currentModel.value === props4.name);\n  const classes = computed39(\n    () => \"q-tab relative-position self-stretch flex flex-center text-center\" + (isActive.value === true ? \" q-tab--active\" + ($tabs.tabProps.value.activeClass ? \" \" + $tabs.tabProps.value.activeClass : \"\") + ($tabs.tabProps.value.activeColor ? ` text-${$tabs.tabProps.value.activeColor}` : \"\") + ($tabs.tabProps.value.activeBgColor ? ` bg-${$tabs.tabProps.value.activeBgColor}` : \"\") : \" q-tab--inactive\") + (props4.icon && props4.label && $tabs.tabProps.value.inlineLabel === false ? \" q-tab--full\" : \"\") + (props4.noCaps === true || $tabs.tabProps.value.noCaps === true ? \" q-tab--no-caps\" : \"\") + (props4.disable === true ? \" disabled\" : \" q-focusable q-hoverable cursor-pointer\") + (routeData !== void 0 ? routeData.linkClass.value : \"\")\n  );\n  const innerClass = computed39(\n    () => \"q-tab__content self-stretch flex-center relative-position q-anchor--skip non-selectable \" + ($tabs.tabProps.value.inlineLabel === true ? \"row no-wrap q-tab__content--inline\" : \"column\") + (props4.contentClass !== void 0 ? ` ${props4.contentClass}` : \"\")\n  );\n  const tabIndex = computed39(() => props4.disable === true || $tabs.hasFocus.value === true || isActive.value === false && $tabs.hasActiveTab.value === true ? -1 : props4.tabindex || 0);\n  function onClick(e, keyboard) {\n    if (keyboard !== true && blurTargetRef.value !== null) {\n      blurTargetRef.value.focus();\n    }\n    if (props4.disable === true) {\n      if (routeData !== void 0 && routeData.hasRouterLink.value === true) {\n        stopAndPrevent(e);\n      }\n      return;\n    }\n    if (routeData === void 0) {\n      $tabs.updateModel({ name: props4.name });\n      emit(\"click\", e);\n      return;\n    }\n    if (routeData.hasRouterLink.value === true) {\n      const go = (opts = {}) => {\n        let hardError;\n        const reqId = opts.to === void 0 || isDeepEqual(opts.to, props4.to) === true ? $tabs.avoidRouteWatcher = uid_default() : null;\n        return routeData.navigateToRouterLink(e, { ...opts, returnRouterError: true }).catch((err) => {\n          hardError = err;\n        }).then((softError) => {\n          if (reqId === $tabs.avoidRouteWatcher) {\n            $tabs.avoidRouteWatcher = false;\n            if (hardError === void 0 && (softError === void 0 || softError.message !== void 0 && softError.message.startsWith(\"Avoided redundant navigation\") === true)) {\n              $tabs.updateModel({ name: props4.name });\n            }\n          }\n          if (opts.returnRouterError === true) {\n            return hardError !== void 0 ? Promise.reject(hardError) : softError;\n          }\n        });\n      };\n      emit(\"click\", e, go);\n      e.defaultPrevented !== true && go();\n      return;\n    }\n    emit(\"click\", e);\n  }\n  function onKeydown2(e) {\n    if (isKeyCode(e, [13, 32])) {\n      onClick(e, true);\n    } else if (shouldIgnoreKey(e) !== true && e.keyCode >= 35 && e.keyCode <= 40 && e.altKey !== true && e.metaKey !== true) {\n      $tabs.onKbdNavigate(e.keyCode, proxy.$el) === true && stopAndPrevent(e);\n    }\n    emit(\"keydown\", e);\n  }\n  function getContent() {\n    const narrow = $tabs.tabProps.value.narrowIndicator, content = [], indicator = h35(\"div\", {\n      ref: tabIndicatorRef,\n      class: [\n        \"q-tab__indicator\",\n        $tabs.tabProps.value.indicatorClass\n      ]\n    });\n    props4.icon !== void 0 && content.push(\n      h35(QIcon_default, {\n        class: \"q-tab__icon\",\n        name: props4.icon\n      })\n    );\n    props4.label !== void 0 && content.push(\n      h35(\"div\", { class: \"q-tab__label\" }, props4.label)\n    );\n    props4.alert !== false && content.push(\n      props4.alertIcon !== void 0 ? h35(QIcon_default, {\n        class: \"q-tab__alert-icon\",\n        color: props4.alert !== true ? props4.alert : void 0,\n        name: props4.alertIcon\n      }) : h35(\"div\", {\n        class: \"q-tab__alert\" + (props4.alert !== true ? ` text-${props4.alert}` : \"\")\n      })\n    );\n    narrow === true && content.push(indicator);\n    const node = [\n      h35(\"div\", { class: \"q-focus-helper\", tabindex: -1, ref: blurTargetRef }),\n      h35(\"div\", { class: innerClass.value }, hMergeSlot(slots.default, content))\n    ];\n    narrow === false && node.push(indicator);\n    return node;\n  }\n  const tabData = {\n    name: computed39(() => props4.name),\n    rootRef,\n    tabIndicatorRef,\n    routeData\n  };\n  onBeforeUnmount13(() => {\n    $tabs.unregisterTab(tabData);\n  });\n  onMounted10(() => {\n    $tabs.registerTab(tabData);\n  });\n  function renderTab(tag, customData) {\n    const data = {\n      ref: rootRef,\n      class: classes.value,\n      tabindex: tabIndex.value,\n      role: \"tab\",\n      \"aria-selected\": isActive.value === true ? \"true\" : \"false\",\n      \"aria-disabled\": props4.disable === true ? \"true\" : void 0,\n      onClick,\n      onKeydown: onKeydown2,\n      ...customData\n    };\n    return withDirectives3(\n      h35(tag, data, getContent()),\n      [[Ripple_default, ripple.value]]\n    );\n  }\n  return { renderTab, $tabs };\n}\n\n// src/components/tabs/QTab.js\nvar QTab_default = createComponent({\n  name: \"QTab\",\n  props: useTabProps,\n  emits: useTabEmits,\n  setup(props4, { slots, emit }) {\n    const { renderTab } = use_tab_default(props4, slots, emit);\n    return () => renderTab(\"div\");\n  }\n});\n\n// src/components/tab-panels/QTabPanels.js\nimport { computed as computed40, getCurrentInstance as getCurrentInstance25 } from \"vue\";\nvar QTabPanels_default = createComponent({\n  name: \"QTabPanels\",\n  props: {\n    ...usePanelProps,\n    ...useDarkProps\n  },\n  emits: usePanelEmits,\n  setup(props4, { slots }) {\n    const vm2 = getCurrentInstance25();\n    const isDark = use_dark_default(props4, vm2.proxy.$q);\n    const { updatePanelsList, getPanelContent, panelDirectives } = use_panel_default();\n    const classes = computed40(\n      () => \"q-tab-panels q-panel-parent\" + (isDark.value === true ? \" q-tab-panels--dark q-dark\" : \"\")\n    );\n    return () => {\n      updatePanelsList(slots);\n      return hDir(\n        \"div\",\n        { class: classes.value },\n        getPanelContent(),\n        \"pan\",\n        props4.swipeable,\n        () => panelDirectives.value\n      );\n    };\n  }\n});\n\n// src/components/tab-panels/QTabPanel.js\nimport { h as h36 } from \"vue\";\nvar QTabPanel_default = createComponent({\n  name: \"QTabPanel\",\n  props: usePanelChildProps,\n  setup(_, { slots }) {\n    return () => h36(\"div\", { class: \"q-tab-panel\", role: \"tabpanel\" }, hSlot(slots.default));\n  }\n});\n\n// src/utils/patterns/patterns.js\nvar hex = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/;\nvar hexa = /^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/;\nvar hexOrHexa = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;\nvar rgb = /^rgb\\(((0|[1-9][\\d]?|1[\\d]{0,2}|2[\\d]?|2[0-4][\\d]|25[0-5]),){2}(0|[1-9][\\d]?|1[\\d]{0,2}|2[\\d]?|2[0-4][\\d]|25[0-5])\\)$/;\nvar rgba = /^rgba\\(((0|[1-9][\\d]?|1[\\d]{0,2}|2[\\d]?|2[0-4][\\d]|25[0-5]),){2}(0|[1-9][\\d]?|1[\\d]{0,2}|2[\\d]?|2[0-4][\\d]|25[0-5]),(0|0\\.[0-9]+[1-9]|0\\.[1-9]+|1)\\)$/;\nvar testPattern = {\n  date: (v) => /^-?[\\d]+\\/[0-1]\\d\\/[0-3]\\d$/.test(v),\n  time: (v) => /^([0-1]?\\d|2[0-3]):[0-5]\\d$/.test(v),\n  fulltime: (v) => /^([0-1]?\\d|2[0-3]):[0-5]\\d:[0-5]\\d$/.test(v),\n  timeOrFulltime: (v) => /^([0-1]?\\d|2[0-3]):[0-5]\\d(:[0-5]\\d)?$/.test(v),\n  // -- RFC 5322 --\n  // -- Added in v2.6.6 --\n  // This is a basic helper validation.\n  // For something more complex (like RFC 822) you should write and use your own rule.\n  // We won't be accepting PRs to enhance the one below because of the reason above.\n  // eslint-disable-next-line\n  email: (v) => /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(v),\n  hexColor: (v) => hex.test(v),\n  hexaColor: (v) => hexa.test(v),\n  hexOrHexaColor: (v) => hexOrHexa.test(v),\n  rgbColor: (v) => rgb.test(v),\n  rgbaColor: (v) => rgba.test(v),\n  rgbOrRgbaColor: (v) => rgb.test(v) || rgba.test(v),\n  hexOrRgbColor: (v) => hex.test(v) || rgb.test(v),\n  hexaOrRgbaColor: (v) => hexa.test(v) || rgba.test(v),\n  anyColor: (v) => hexOrHexa.test(v) || rgb.test(v) || rgba.test(v)\n};\nvar patterns_default = {\n  testPattern\n};\n\n// src/utils/colors/colors.js\nvar reRGBA = /^rgb(a)?\\((\\d{1,3}),(\\d{1,3}),(\\d{1,3}),?([01]?\\.?\\d*?)?\\)$/;\nfunction rgbToHex({ r, g, b, a }) {\n  const alpha = a !== void 0;\n  r = Math.round(r);\n  g = Math.round(g);\n  b = Math.round(b);\n  if (r > 255 || g > 255 || b > 255 || alpha && a > 100) {\n    throw new TypeError(\"Expected 3 numbers below 256 (and optionally one below 100)\");\n  }\n  a = alpha ? (Math.round(255 * a / 100) | 1 << 8).toString(16).slice(1) : \"\";\n  return \"#\" + (b | g << 8 | r << 16 | 1 << 24).toString(16).slice(1) + a;\n}\nfunction rgbToString({ r, g, b, a }) {\n  return `rgb${a !== void 0 ? \"a\" : \"\"}(${r},${g},${b}${a !== void 0 ? \",\" + a / 100 : \"\"})`;\n}\nfunction hexToRgb(hex2) {\n  if (typeof hex2 !== \"string\") {\n    throw new TypeError(\"Expected a string\");\n  }\n  hex2 = hex2.replace(/^#/, \"\");\n  if (hex2.length === 3) {\n    hex2 = hex2[0] + hex2[0] + hex2[1] + hex2[1] + hex2[2] + hex2[2];\n  } else if (hex2.length === 4) {\n    hex2 = hex2[0] + hex2[0] + hex2[1] + hex2[1] + hex2[2] + hex2[2] + hex2[3] + hex2[3];\n  }\n  const num = parseInt(hex2, 16);\n  return hex2.length > 6 ? { r: num >> 24 & 255, g: num >> 16 & 255, b: num >> 8 & 255, a: Math.round((num & 255) / 2.55) } : { r: num >> 16, g: num >> 8 & 255, b: num & 255 };\n}\nfunction hsvToRgb({ h: h138, s, v, a }) {\n  let r, g, b;\n  s = s / 100;\n  v = v / 100;\n  h138 = h138 / 360;\n  const i = Math.floor(h138 * 6), f = h138 * 6 - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s);\n  switch (i % 6) {\n    case 0:\n      r = v;\n      g = t;\n      b = p;\n      break;\n    case 1:\n      r = q;\n      g = v;\n      b = p;\n      break;\n    case 2:\n      r = p;\n      g = v;\n      b = t;\n      break;\n    case 3:\n      r = p;\n      g = q;\n      b = v;\n      break;\n    case 4:\n      r = t;\n      g = p;\n      b = v;\n      break;\n    case 5:\n      r = v;\n      g = p;\n      b = q;\n      break;\n  }\n  return {\n    r: Math.round(r * 255),\n    g: Math.round(g * 255),\n    b: Math.round(b * 255),\n    a\n  };\n}\nfunction rgbToHsv({ r, g, b, a }) {\n  const max = Math.max(r, g, b), min = Math.min(r, g, b), d = max - min, s = max === 0 ? 0 : d / max, v = max / 255;\n  let h138;\n  switch (max) {\n    case min:\n      h138 = 0;\n      break;\n    case r:\n      h138 = g - b + d * (g < b ? 6 : 0);\n      h138 /= 6 * d;\n      break;\n    case g:\n      h138 = b - r + d * 2;\n      h138 /= 6 * d;\n      break;\n    case b:\n      h138 = r - g + d * 4;\n      h138 /= 6 * d;\n      break;\n  }\n  return {\n    h: Math.round(h138 * 360),\n    s: Math.round(s * 100),\n    v: Math.round(v * 100),\n    a\n  };\n}\nfunction textToRgb(str) {\n  if (typeof str !== \"string\") {\n    throw new TypeError(\"Expected a string\");\n  }\n  const color = str.replace(/ /g, \"\");\n  const m = reRGBA.exec(color);\n  if (m === null) {\n    return hexToRgb(color);\n  }\n  const rgb2 = {\n    r: Math.min(255, parseInt(m[2], 10)),\n    g: Math.min(255, parseInt(m[3], 10)),\n    b: Math.min(255, parseInt(m[4], 10))\n  };\n  if (m[1]) {\n    const alpha = parseFloat(m[5]);\n    rgb2.a = Math.min(1, isNaN(alpha) === true ? 1 : alpha) * 100;\n  }\n  return rgb2;\n}\nfunction lighten(color, percent) {\n  if (typeof color !== \"string\") {\n    throw new TypeError(\"Expected a string as color\");\n  }\n  if (typeof percent !== \"number\") {\n    throw new TypeError(\"Expected a numeric percent\");\n  }\n  const rgb2 = textToRgb(color), t = percent < 0 ? 0 : 255, p = Math.abs(percent) / 100, R = rgb2.r, G = rgb2.g, B = rgb2.b;\n  return \"#\" + (16777216 + (Math.round((t - R) * p) + R) * 65536 + (Math.round((t - G) * p) + G) * 256 + (Math.round((t - B) * p) + B)).toString(16).slice(1);\n}\nfunction luminosity(color) {\n  if (typeof color !== \"string\" && (!color || color.r === void 0)) {\n    throw new TypeError(\"Expected a string or a {r, g, b} object as color\");\n  }\n  const rgb2 = typeof color === \"string\" ? textToRgb(color) : color, r = rgb2.r / 255, g = rgb2.g / 255, b = rgb2.b / 255, R = r <= 0.03928 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4), G = g <= 0.03928 ? g / 12.92 : Math.pow((g + 0.055) / 1.055, 2.4), B = b <= 0.03928 ? b / 12.92 : Math.pow((b + 0.055) / 1.055, 2.4);\n  return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n}\nfunction brightness(color) {\n  if (typeof color !== \"string\" && (!color || color.r === void 0)) {\n    throw new TypeError(\"Expected a string or a {r, g, b} object as color\");\n  }\n  const rgb2 = typeof color === \"string\" ? textToRgb(color) : color;\n  return (rgb2.r * 299 + rgb2.g * 587 + rgb2.b * 114) / 1e3;\n}\nfunction blend(fgColor, bgColor) {\n  if (typeof fgColor !== \"string\" && (!fgColor || fgColor.r === void 0)) {\n    throw new TypeError(\"Expected a string or a {r, g, b[, a]} object as fgColor\");\n  }\n  if (typeof bgColor !== \"string\" && (!bgColor || bgColor.r === void 0)) {\n    throw new TypeError(\"Expected a string or a {r, g, b[, a]} object as bgColor\");\n  }\n  const rgb1 = typeof fgColor === \"string\" ? textToRgb(fgColor) : fgColor, r1 = rgb1.r / 255, g1 = rgb1.g / 255, b1 = rgb1.b / 255, a1 = rgb1.a !== void 0 ? rgb1.a / 100 : 1, rgb2 = typeof bgColor === \"string\" ? textToRgb(bgColor) : bgColor, r2 = rgb2.r / 255, g2 = rgb2.g / 255, b2 = rgb2.b / 255, a2 = rgb2.a !== void 0 ? rgb2.a / 100 : 1, a = a1 + a2 * (1 - a1), r = Math.round((r1 * a1 + r2 * a2 * (1 - a1)) / a * 255), g = Math.round((g1 * a1 + g2 * a2 * (1 - a1)) / a * 255), b = Math.round((b1 * a1 + b2 * a2 * (1 - a1)) / a * 255);\n  const ret = { r, g, b, a: Math.round(a * 100) };\n  return typeof fgColor === \"string\" ? rgbToHex(ret) : ret;\n}\nfunction changeAlpha(color, offset2) {\n  if (typeof color !== \"string\") {\n    throw new TypeError(\"Expected a string as color\");\n  }\n  if (offset2 === void 0 || offset2 < -1 || offset2 > 1) {\n    throw new TypeError(\"Expected offset to be between -1 and 1\");\n  }\n  const { r, g, b, a } = textToRgb(color);\n  const alpha = a !== void 0 ? a / 100 : 0;\n  return rgbToHex({\n    r,\n    g,\n    b,\n    a: Math.round(Math.min(1, Math.max(0, alpha + offset2)) * 100)\n  });\n}\nfunction getPaletteColor(colorName) {\n  if (typeof colorName !== \"string\") {\n    throw new TypeError(\"Expected a string as color\");\n  }\n  const el = document.createElement(\"div\");\n  el.className = `text-${colorName} invisible fixed no-pointer-events`;\n  document.body.appendChild(el);\n  const result = getComputedStyle(el).getPropertyValue(\"color\");\n  el.remove();\n  return rgbToHex(textToRgb(result));\n}\nvar colors_default = {\n  rgbToHex,\n  hexToRgb,\n  hsvToRgb,\n  rgbToHsv,\n  textToRgb,\n  lighten,\n  luminosity,\n  brightness,\n  blend,\n  changeAlpha,\n  getPaletteColor\n};\n\n// src/components/color/QColor.js\nvar palette = [\n  \"rgb(255,204,204)\",\n  \"rgb(255,230,204)\",\n  \"rgb(255,255,204)\",\n  \"rgb(204,255,204)\",\n  \"rgb(204,255,230)\",\n  \"rgb(204,255,255)\",\n  \"rgb(204,230,255)\",\n  \"rgb(204,204,255)\",\n  \"rgb(230,204,255)\",\n  \"rgb(255,204,255)\",\n  \"rgb(255,153,153)\",\n  \"rgb(255,204,153)\",\n  \"rgb(255,255,153)\",\n  \"rgb(153,255,153)\",\n  \"rgb(153,255,204)\",\n  \"rgb(153,255,255)\",\n  \"rgb(153,204,255)\",\n  \"rgb(153,153,255)\",\n  \"rgb(204,153,255)\",\n  \"rgb(255,153,255)\",\n  \"rgb(255,102,102)\",\n  \"rgb(255,179,102)\",\n  \"rgb(255,255,102)\",\n  \"rgb(102,255,102)\",\n  \"rgb(102,255,179)\",\n  \"rgb(102,255,255)\",\n  \"rgb(102,179,255)\",\n  \"rgb(102,102,255)\",\n  \"rgb(179,102,255)\",\n  \"rgb(255,102,255)\",\n  \"rgb(255,51,51)\",\n  \"rgb(255,153,51)\",\n  \"rgb(255,255,51)\",\n  \"rgb(51,255,51)\",\n  \"rgb(51,255,153)\",\n  \"rgb(51,255,255)\",\n  \"rgb(51,153,255)\",\n  \"rgb(51,51,255)\",\n  \"rgb(153,51,255)\",\n  \"rgb(255,51,255)\",\n  \"rgb(255,0,0)\",\n  \"rgb(255,128,0)\",\n  \"rgb(255,255,0)\",\n  \"rgb(0,255,0)\",\n  \"rgb(0,255,128)\",\n  \"rgb(0,255,255)\",\n  \"rgb(0,128,255)\",\n  \"rgb(0,0,255)\",\n  \"rgb(128,0,255)\",\n  \"rgb(255,0,255)\",\n  \"rgb(245,0,0)\",\n  \"rgb(245,123,0)\",\n  \"rgb(245,245,0)\",\n  \"rgb(0,245,0)\",\n  \"rgb(0,245,123)\",\n  \"rgb(0,245,245)\",\n  \"rgb(0,123,245)\",\n  \"rgb(0,0,245)\",\n  \"rgb(123,0,245)\",\n  \"rgb(245,0,245)\",\n  \"rgb(214,0,0)\",\n  \"rgb(214,108,0)\",\n  \"rgb(214,214,0)\",\n  \"rgb(0,214,0)\",\n  \"rgb(0,214,108)\",\n  \"rgb(0,214,214)\",\n  \"rgb(0,108,214)\",\n  \"rgb(0,0,214)\",\n  \"rgb(108,0,214)\",\n  \"rgb(214,0,214)\",\n  \"rgb(163,0,0)\",\n  \"rgb(163,82,0)\",\n  \"rgb(163,163,0)\",\n  \"rgb(0,163,0)\",\n  \"rgb(0,163,82)\",\n  \"rgb(0,163,163)\",\n  \"rgb(0,82,163)\",\n  \"rgb(0,0,163)\",\n  \"rgb(82,0,163)\",\n  \"rgb(163,0,163)\",\n  \"rgb(92,0,0)\",\n  \"rgb(92,46,0)\",\n  \"rgb(92,92,0)\",\n  \"rgb(0,92,0)\",\n  \"rgb(0,92,46)\",\n  \"rgb(0,92,92)\",\n  \"rgb(0,46,92)\",\n  \"rgb(0,0,92)\",\n  \"rgb(46,0,92)\",\n  \"rgb(92,0,92)\",\n  \"rgb(255,255,255)\",\n  \"rgb(205,205,205)\",\n  \"rgb(178,178,178)\",\n  \"rgb(153,153,153)\",\n  \"rgb(127,127,127)\",\n  \"rgb(102,102,102)\",\n  \"rgb(76,76,76)\",\n  \"rgb(51,51,51)\",\n  \"rgb(25,25,25)\",\n  \"rgb(0,0,0)\"\n];\nvar thumbPath = \"M5 5 h10 v10 h-10 v-10 z\";\nvar alphaTrackImg = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg==\";\nvar QColor_default = createComponent({\n  name: \"QColor\",\n  props: {\n    ...useDarkProps,\n    ...useFormProps,\n    modelValue: String,\n    defaultValue: String,\n    defaultView: {\n      type: String,\n      default: \"spectrum\",\n      validator: (v) => [\"spectrum\", \"tune\", \"palette\"].includes(v)\n    },\n    formatModel: {\n      type: String,\n      default: \"auto\",\n      validator: (v) => [\"auto\", \"hex\", \"rgb\", \"hexa\", \"rgba\"].includes(v)\n    },\n    palette: Array,\n    noHeader: Boolean,\n    noHeaderTabs: Boolean,\n    noFooter: Boolean,\n    square: Boolean,\n    flat: Boolean,\n    bordered: Boolean,\n    disable: Boolean,\n    readonly: Boolean\n  },\n  emits: [\"update:modelValue\", \"change\"],\n  setup(props4, { emit }) {\n    const { proxy } = getCurrentInstance26();\n    const { $q } = proxy;\n    const isDark = use_dark_default(props4, $q);\n    const { getCache } = use_render_cache_default();\n    const spectrumRef = ref19(null);\n    const errorIconRef = ref19(null);\n    const forceHex = computed41(() => props4.formatModel === \"auto\" ? null : props4.formatModel.indexOf(\"hex\") !== -1);\n    const forceAlpha = computed41(() => props4.formatModel === \"auto\" ? null : props4.formatModel.indexOf(\"a\") !== -1);\n    const topView = ref19(\n      props4.formatModel === \"auto\" ? props4.modelValue === void 0 || props4.modelValue === null || props4.modelValue === \"\" || props4.modelValue.startsWith(\"#\") ? \"hex\" : \"rgb\" : props4.formatModel.startsWith(\"hex\") ? \"hex\" : \"rgb\"\n    );\n    const view = ref19(props4.defaultView);\n    const model = ref19(parseModel(props4.modelValue || props4.defaultValue));\n    const editable = computed41(() => props4.disable !== true && props4.readonly !== true);\n    const isHex = computed41(\n      () => props4.modelValue === void 0 || props4.modelValue === null || props4.modelValue === \"\" || props4.modelValue.startsWith(\"#\")\n    );\n    const isOutputHex = computed41(() => forceHex.value !== null ? forceHex.value : isHex.value);\n    const formAttrs = computed41(() => ({\n      type: \"hidden\",\n      name: props4.name,\n      value: model.value[isOutputHex.value === true ? \"hex\" : \"rgb\"]\n    }));\n    const injectFormInput = useFormInject(formAttrs);\n    const hasAlpha = computed41(() => forceAlpha.value !== null ? forceAlpha.value : model.value.a !== void 0);\n    const currentBgColor = computed41(() => ({\n      backgroundColor: model.value.rgb || \"#000\"\n    }));\n    const headerClass = computed41(() => {\n      const light = model.value.a !== void 0 && model.value.a < 65 ? true : luminosity(model.value) > 0.4;\n      return `q-color-picker__header-content q-color-picker__header-content--${light ? \"light\" : \"dark\"}`;\n    });\n    const spectrumStyle = computed41(() => ({\n      background: `hsl(${model.value.h},100%,50%)`\n    }));\n    const spectrumPointerStyle = computed41(() => ({\n      top: `${100 - model.value.v}%`,\n      [$q.lang.rtl === true ? \"right\" : \"left\"]: `${model.value.s}%`\n    }));\n    const computedPalette = computed41(() => props4.palette !== void 0 && props4.palette.length !== 0 ? props4.palette : palette);\n    const classes = computed41(\n      () => \"q-color-picker\" + (props4.bordered === true ? \" q-color-picker--bordered\" : \"\") + (props4.square === true ? \" q-color-picker--square no-border-radius\" : \"\") + (props4.flat === true ? \" q-color-picker--flat no-shadow\" : \"\") + (props4.disable === true ? \" disabled\" : \"\") + (isDark.value === true ? \" q-color-picker--dark q-dark\" : \"\")\n    );\n    const attributes = computed41(() => props4.disable === true ? { \"aria-disabled\": \"true\" } : {});\n    const spectrumDirective = computed41(() => {\n      return [[\n        TouchPan_default,\n        onSpectrumPan,\n        void 0,\n        { prevent: true, stop: true, mouse: true }\n      ]];\n    });\n    watch12(() => props4.modelValue, (v) => {\n      const localModel = parseModel(v || props4.defaultValue);\n      if (localModel.hex !== model.value.hex) {\n        model.value = localModel;\n      }\n    });\n    watch12(() => props4.defaultValue, (v) => {\n      if (!props4.modelValue && v) {\n        const localModel = parseModel(v);\n        if (localModel.hex !== model.value.hex) {\n          model.value = localModel;\n        }\n      }\n    });\n    function updateModel2(rgb2, change) {\n      model.value.hex = rgbToHex(rgb2);\n      model.value.rgb = rgbToString(rgb2);\n      model.value.r = rgb2.r;\n      model.value.g = rgb2.g;\n      model.value.b = rgb2.b;\n      model.value.a = rgb2.a;\n      const value2 = model.value[isOutputHex.value === true ? \"hex\" : \"rgb\"];\n      emit(\"update:modelValue\", value2);\n      change === true && emit(\"change\", value2);\n    }\n    function parseModel(v) {\n      const alpha = forceAlpha.value !== void 0 ? forceAlpha.value : props4.formatModel === \"auto\" ? null : props4.formatModel.indexOf(\"a\") !== -1;\n      if (typeof v !== \"string\" || v.length === 0 || testPattern.anyColor(v.replace(/ /g, \"\")) !== true) {\n        return {\n          h: 0,\n          s: 0,\n          v: 0,\n          r: 0,\n          g: 0,\n          b: 0,\n          a: alpha === true ? 100 : void 0,\n          hex: void 0,\n          rgb: void 0\n        };\n      }\n      const model2 = textToRgb(v);\n      if (alpha === true && model2.a === void 0) {\n        model2.a = 100;\n      }\n      model2.hex = rgbToHex(model2);\n      model2.rgb = rgbToString(model2);\n      return Object.assign(model2, rgbToHsv(model2));\n    }\n    function changeSpectrum(left, top, change) {\n      const panel = spectrumRef.value;\n      if (panel === null) return;\n      const width3 = panel.clientWidth, height2 = panel.clientHeight, rect = panel.getBoundingClientRect();\n      let x = Math.min(width3, Math.max(0, left - rect.left));\n      if ($q.lang.rtl === true) {\n        x = width3 - x;\n      }\n      const y = Math.min(height2, Math.max(0, top - rect.top)), s = Math.round(100 * x / width3), v = Math.round(100 * Math.max(0, Math.min(1, -(y / height2) + 1))), rgb2 = hsvToRgb({\n        h: model.value.h,\n        s,\n        v,\n        a: hasAlpha.value === true ? model.value.a : void 0\n      });\n      model.value.s = s;\n      model.value.v = v;\n      updateModel2(rgb2, change);\n    }\n    function onHue(val, change) {\n      const h138 = Math.round(val);\n      const rgb2 = hsvToRgb({\n        h: h138,\n        s: model.value.s,\n        v: model.value.v,\n        a: hasAlpha.value === true ? model.value.a : void 0\n      });\n      model.value.h = h138;\n      updateModel2(rgb2, change);\n    }\n    function onHueChange(val) {\n      onHue(val, true);\n    }\n    function onNumericChange(value2, formatModel, max, evt, change) {\n      evt !== void 0 && stop(evt);\n      if (!/^[0-9]+$/.test(value2)) {\n        change === true && proxy.$forceUpdate();\n        return;\n      }\n      const val = Math.floor(Number(value2));\n      if (val < 0 || val > max) {\n        change === true && proxy.$forceUpdate();\n        return;\n      }\n      const rgb2 = {\n        r: formatModel === \"r\" ? val : model.value.r,\n        g: formatModel === \"g\" ? val : model.value.g,\n        b: formatModel === \"b\" ? val : model.value.b,\n        a: hasAlpha.value === true ? formatModel === \"a\" ? val : model.value.a : void 0\n      };\n      if (formatModel !== \"a\") {\n        const hsv = rgbToHsv(rgb2);\n        model.value.h = hsv.h;\n        model.value.s = hsv.s;\n        model.value.v = hsv.v;\n      }\n      updateModel2(rgb2, change);\n      if (evt !== void 0 && change !== true && evt.target.selectionEnd !== void 0) {\n        const index = evt.target.selectionEnd;\n        nextTick5(() => {\n          evt.target.setSelectionRange(index, index);\n        });\n      }\n    }\n    function onEditorChange(evt, change) {\n      let rgb2;\n      const inp = evt.target.value;\n      stop(evt);\n      if (topView.value === \"hex\") {\n        if (inp.length !== (hasAlpha.value === true ? 9 : 7) || !/^#[0-9A-Fa-f]+$/.test(inp)) {\n          return true;\n        }\n        rgb2 = hexToRgb(inp);\n      } else {\n        let model2;\n        if (!inp.endsWith(\")\")) {\n          return true;\n        } else if (hasAlpha.value !== true && inp.startsWith(\"rgb(\")) {\n          model2 = inp.substring(4, inp.length - 1).split(\",\").map((n) => parseInt(n, 10));\n          if (model2.length !== 3 || !/^rgb\\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3}\\)$/.test(inp)) {\n            return true;\n          }\n        } else if (hasAlpha.value === true && inp.startsWith(\"rgba(\")) {\n          model2 = inp.substring(5, inp.length - 1).split(\",\");\n          if (model2.length !== 4 || !/^rgba\\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},(0|0\\.[0-9]+[1-9]|0\\.[1-9]+|1)\\)$/.test(inp)) {\n            return true;\n          }\n          for (let i = 0; i < 3; i++) {\n            const v2 = parseInt(model2[i], 10);\n            if (v2 < 0 || v2 > 255) {\n              return true;\n            }\n            model2[i] = v2;\n          }\n          const v = parseFloat(model2[3]);\n          if (v < 0 || v > 1) {\n            return true;\n          }\n          model2[3] = v;\n        } else {\n          return true;\n        }\n        if (model2[0] < 0 || model2[0] > 255 || model2[1] < 0 || model2[1] > 255 || model2[2] < 0 || model2[2] > 255 || hasAlpha.value === true && (model2[3] < 0 || model2[3] > 1)) {\n          return true;\n        }\n        rgb2 = {\n          r: model2[0],\n          g: model2[1],\n          b: model2[2],\n          a: hasAlpha.value === true ? model2[3] * 100 : void 0\n        };\n      }\n      const hsv = rgbToHsv(rgb2);\n      model.value.h = hsv.h;\n      model.value.s = hsv.s;\n      model.value.v = hsv.v;\n      updateModel2(rgb2, change);\n      if (change !== true) {\n        const index = evt.target.selectionEnd;\n        nextTick5(() => {\n          evt.target.setSelectionRange(index, index);\n        });\n      }\n    }\n    function onPalettePick(color) {\n      const def = parseModel(color);\n      const rgb2 = { r: def.r, g: def.g, b: def.b, a: def.a };\n      if (rgb2.a === void 0) {\n        rgb2.a = model.value.a;\n      }\n      model.value.h = def.h;\n      model.value.s = def.s;\n      model.value.v = def.v;\n      updateModel2(rgb2, true);\n    }\n    function onSpectrumPan(evt) {\n      if (evt.isFinal) {\n        changeSpectrum(\n          evt.position.left,\n          evt.position.top,\n          true\n        );\n      } else {\n        onSpectrumChange(evt);\n      }\n    }\n    const onSpectrumChange = throttle_default(\n      (evt) => {\n        changeSpectrum(evt.position.left, evt.position.top);\n      },\n      20\n    );\n    function onSpectrumClick(evt) {\n      changeSpectrum(\n        evt.pageX - window.pageXOffset,\n        evt.pageY - window.pageYOffset,\n        true\n      );\n    }\n    function onActivate(evt) {\n      changeSpectrum(\n        evt.pageX - window.pageXOffset,\n        evt.pageY - window.pageYOffset\n      );\n    }\n    function updateErrorIcon(val) {\n      if (errorIconRef.value !== null) {\n        errorIconRef.value.$el.style.opacity = val ? 1 : 0;\n      }\n    }\n    function setTopView(val) {\n      topView.value = val;\n    }\n    function getHeader() {\n      const child = [];\n      props4.noHeaderTabs !== true && child.push(\n        h37(QTabs_default, {\n          class: \"q-color-picker__header-tabs\",\n          modelValue: topView.value,\n          dense: true,\n          align: \"justify\",\n          \"onUpdate:modelValue\": setTopView\n        }, () => [\n          h37(QTab_default, {\n            label: \"HEX\" + (hasAlpha.value === true ? \"A\" : \"\"),\n            name: \"hex\",\n            ripple: false\n          }),\n          h37(QTab_default, {\n            label: \"RGB\" + (hasAlpha.value === true ? \"A\" : \"\"),\n            name: \"rgb\",\n            ripple: false\n          })\n        ])\n      );\n      child.push(\n        h37(\"div\", {\n          class: \"q-color-picker__header-banner row flex-center no-wrap\"\n        }, [\n          h37(\"input\", {\n            class: \"fit\",\n            value: model.value[topView.value],\n            ...editable.value !== true ? { readonly: true } : {},\n            ...getCache(\"topIn\", {\n              onInput: (evt) => {\n                updateErrorIcon(onEditorChange(evt) === true);\n              },\n              onChange: stop,\n              onBlur: (evt) => {\n                onEditorChange(evt, true) === true && proxy.$forceUpdate();\n                updateErrorIcon(false);\n              }\n            })\n          }),\n          h37(QIcon_default, {\n            ref: errorIconRef,\n            class: \"q-color-picker__error-icon absolute no-pointer-events\",\n            name: $q.iconSet.type.negative\n          })\n        ])\n      );\n      return h37(\"div\", {\n        class: \"q-color-picker__header relative-position overflow-hidden\"\n      }, [\n        h37(\"div\", { class: \"q-color-picker__header-bg absolute-full\" }),\n        h37(\"div\", {\n          class: headerClass.value,\n          style: currentBgColor.value\n        }, child)\n      ]);\n    }\n    function getContent() {\n      return h37(QTabPanels_default, {\n        modelValue: view.value,\n        animated: true\n      }, () => [\n        h37(QTabPanel_default, {\n          class: \"q-color-picker__spectrum-tab overflow-hidden\",\n          name: \"spectrum\"\n        }, getSpectrumTab),\n        h37(QTabPanel_default, {\n          class: \"q-pa-md q-color-picker__tune-tab\",\n          name: \"tune\"\n        }, getTuneTab),\n        h37(QTabPanel_default, {\n          class: \"q-color-picker__palette-tab\",\n          name: \"palette\"\n        }, getPaletteTab)\n      ]);\n    }\n    function setView(val) {\n      view.value = val;\n    }\n    function getFooter() {\n      return h37(\"div\", {\n        class: \"q-color-picker__footer relative-position overflow-hidden\"\n      }, [\n        h37(QTabs_default, {\n          class: \"absolute-full\",\n          modelValue: view.value,\n          dense: true,\n          align: \"justify\",\n          \"onUpdate:modelValue\": setView\n        }, () => [\n          h37(QTab_default, {\n            icon: $q.iconSet.colorPicker.spectrum,\n            name: \"spectrum\",\n            ripple: false\n          }),\n          h37(QTab_default, {\n            icon: $q.iconSet.colorPicker.tune,\n            name: \"tune\",\n            ripple: false\n          }),\n          h37(QTab_default, {\n            icon: $q.iconSet.colorPicker.palette,\n            name: \"palette\",\n            ripple: false\n          })\n        ])\n      ]);\n    }\n    function getSpectrumTab() {\n      const data = {\n        ref: spectrumRef,\n        class: \"q-color-picker__spectrum non-selectable relative-position cursor-pointer\" + (editable.value !== true ? \" readonly\" : \"\"),\n        style: spectrumStyle.value,\n        ...editable.value === true ? {\n          onClick: onSpectrumClick,\n          onMousedown: onActivate\n        } : {}\n      };\n      const child = [\n        h37(\"div\", { style: { paddingBottom: \"100%\" } }),\n        h37(\"div\", { class: \"q-color-picker__spectrum-white absolute-full\" }),\n        h37(\"div\", { class: \"q-color-picker__spectrum-black absolute-full\" }),\n        h37(\"div\", {\n          class: \"absolute\",\n          style: spectrumPointerStyle.value\n        }, [\n          model.value.hex !== void 0 ? h37(\"div\", { class: \"q-color-picker__spectrum-circle\" }) : null\n        ])\n      ];\n      const sliders = [\n        h37(QSlider_default, {\n          class: \"q-color-picker__hue non-selectable\",\n          modelValue: model.value.h,\n          min: 0,\n          max: 360,\n          trackSize: \"8px\",\n          innerTrackColor: \"transparent\",\n          selectionColor: \"transparent\",\n          readonly: editable.value !== true,\n          thumbPath,\n          \"onUpdate:modelValue\": onHue,\n          onChange: onHueChange\n        })\n      ];\n      hasAlpha.value === true && sliders.push(\n        h37(QSlider_default, {\n          class: \"q-color-picker__alpha non-selectable\",\n          modelValue: model.value.a,\n          min: 0,\n          max: 100,\n          trackSize: \"8px\",\n          trackColor: \"white\",\n          innerTrackColor: \"transparent\",\n          selectionColor: \"transparent\",\n          trackImg: alphaTrackImg,\n          readonly: editable.value !== true,\n          hideSelection: true,\n          thumbPath,\n          ...getCache(\"alphaSlide\", {\n            \"onUpdate:modelValue\": (value2) => onNumericChange(value2, \"a\", 100),\n            onChange: (value2) => onNumericChange(value2, \"a\", 100, void 0, true)\n          })\n        })\n      );\n      return [\n        hDir(\"div\", data, child, \"spec\", editable.value, () => spectrumDirective.value),\n        h37(\"div\", { class: \"q-color-picker__sliders\" }, sliders)\n      ];\n    }\n    function getTuneTab() {\n      return [\n        h37(\"div\", { class: \"row items-center no-wrap\" }, [\n          h37(\"div\", \"R\"),\n          h37(QSlider_default, {\n            modelValue: model.value.r,\n            min: 0,\n            max: 255,\n            color: \"red\",\n            dark: isDark.value,\n            readonly: editable.value !== true,\n            ...getCache(\"rSlide\", {\n              \"onUpdate:modelValue\": (value2) => onNumericChange(value2, \"r\", 255),\n              onChange: (value2) => onNumericChange(value2, \"r\", 255, void 0, true)\n            })\n          }),\n          h37(\"input\", {\n            value: model.value.r,\n            maxlength: 3,\n            readonly: editable.value !== true,\n            onChange: stop,\n            ...getCache(\"rIn\", {\n              onInput: (evt) => onNumericChange(evt.target.value, \"r\", 255, evt),\n              onBlur: (evt) => onNumericChange(evt.target.value, \"r\", 255, evt, true)\n            })\n          })\n        ]),\n        h37(\"div\", { class: \"row items-center no-wrap\" }, [\n          h37(\"div\", \"G\"),\n          h37(QSlider_default, {\n            modelValue: model.value.g,\n            min: 0,\n            max: 255,\n            color: \"green\",\n            dark: isDark.value,\n            readonly: editable.value !== true,\n            ...getCache(\"gSlide\", {\n              \"onUpdate:modelValue\": (value2) => onNumericChange(value2, \"g\", 255),\n              onChange: (value2) => onNumericChange(value2, \"g\", 255, void 0, true)\n            })\n          }),\n          h37(\"input\", {\n            value: model.value.g,\n            maxlength: 3,\n            readonly: editable.value !== true,\n            onChange: stop,\n            ...getCache(\"gIn\", {\n              onInput: (evt) => onNumericChange(evt.target.value, \"g\", 255, evt),\n              onBlur: (evt) => onNumericChange(evt.target.value, \"g\", 255, evt, true)\n            })\n          })\n        ]),\n        h37(\"div\", { class: \"row items-center no-wrap\" }, [\n          h37(\"div\", \"B\"),\n          h37(QSlider_default, {\n            modelValue: model.value.b,\n            min: 0,\n            max: 255,\n            color: \"blue\",\n            readonly: editable.value !== true,\n            dark: isDark.value,\n            ...getCache(\"bSlide\", {\n              \"onUpdate:modelValue\": (value2) => onNumericChange(value2, \"b\", 255),\n              onChange: (value2) => onNumericChange(value2, \"b\", 255, void 0, true)\n            })\n          }),\n          h37(\"input\", {\n            value: model.value.b,\n            maxlength: 3,\n            readonly: editable.value !== true,\n            onChange: stop,\n            ...getCache(\"bIn\", {\n              onInput: (evt) => onNumericChange(evt.target.value, \"b\", 255, evt),\n              onBlur: (evt) => onNumericChange(evt.target.value, \"b\", 255, evt, true)\n            })\n          })\n        ]),\n        hasAlpha.value === true ? h37(\"div\", { class: \"row items-center no-wrap\" }, [\n          h37(\"div\", \"A\"),\n          h37(QSlider_default, {\n            modelValue: model.value.a,\n            color: \"grey\",\n            readonly: editable.value !== true,\n            dark: isDark.value,\n            ...getCache(\"aSlide\", {\n              \"onUpdate:modelValue\": (value2) => onNumericChange(value2, \"a\", 100),\n              onChange: (value2) => onNumericChange(value2, \"a\", 100, void 0, true)\n            })\n          }),\n          h37(\"input\", {\n            value: model.value.a,\n            maxlength: 3,\n            readonly: editable.value !== true,\n            onChange: stop,\n            ...getCache(\"aIn\", {\n              onInput: (evt) => onNumericChange(evt.target.value, \"a\", 100, evt),\n              onBlur: (evt) => onNumericChange(evt.target.value, \"a\", 100, evt, true)\n            })\n          })\n        ]) : null\n      ];\n    }\n    function getPaletteTab() {\n      const fn = (color) => h37(\"div\", {\n        class: \"q-color-picker__cube col-auto\",\n        style: { backgroundColor: color },\n        ...editable.value === true ? getCache(\"palette#\" + color, {\n          onClick: () => {\n            onPalettePick(color);\n          }\n        }) : {}\n      });\n      return [\n        h37(\"div\", {\n          class: \"row items-center q-color-picker__palette-rows\" + (editable.value === true ? \" q-color-picker__palette-rows--editable\" : \"\")\n        }, computedPalette.value.map(fn))\n      ];\n    }\n    return () => {\n      const child = [getContent()];\n      if (props4.name !== void 0 && props4.disable !== true) {\n        injectFormInput(child, \"push\");\n      }\n      props4.noHeader !== true && child.unshift(\n        getHeader()\n      );\n      props4.noFooter !== true && child.push(\n        getFooter()\n      );\n      return h37(\"div\", {\n        class: classes.value,\n        ...attributes.value\n      }, child);\n    };\n  }\n});\n\n// src/components/date/QDate.js\nimport { h as h38, ref as ref20, computed as computed43, watch as watch13, Transition as Transition4, nextTick as nextTick6, getCurrentInstance as getCurrentInstance27 } from \"vue\";\n\n// src/components/date/use-datetime.js\nimport { computed as computed42 } from \"vue\";\n\n// src/utils/date/private.persian.js\nvar breaks = [\n  -61,\n  9,\n  38,\n  199,\n  426,\n  686,\n  756,\n  818,\n  1111,\n  1181,\n  1210,\n  1635,\n  2060,\n  2097,\n  2192,\n  2262,\n  2324,\n  2394,\n  2456,\n  3178\n];\nfunction toJalaali(gy, gm, gd) {\n  if (Object.prototype.toString.call(gy) === \"[object Date]\") {\n    gd = gy.getDate();\n    gm = gy.getMonth() + 1;\n    gy = gy.getFullYear();\n  }\n  return d2j(g2d(gy, gm, gd));\n}\nfunction toGregorian(jy, jm, jd) {\n  return d2g(j2d(jy, jm, jd));\n}\nfunction isLeapJalaaliYear(jy) {\n  return jalCalLeap(jy) === 0;\n}\nfunction jalaaliMonthLength(jy, jm) {\n  if (jm <= 6) return 31;\n  if (jm <= 11) return 30;\n  if (isLeapJalaaliYear(jy)) return 30;\n  return 29;\n}\nfunction jalCalLeap(jy) {\n  const bl = breaks.length;\n  let jp = breaks[0], jm, jump, leap, n, i;\n  if (jy < jp || jy >= breaks[bl - 1]) {\n    throw new Error(\"Invalid Jalaali year \" + jy);\n  }\n  for (i = 1; i < bl; i += 1) {\n    jm = breaks[i];\n    jump = jm - jp;\n    if (jy < jm) {\n      break;\n    }\n    jp = jm;\n  }\n  n = jy - jp;\n  if (jump - n < 6) {\n    n = n - jump + div(jump + 4, 33) * 33;\n  }\n  leap = mod(mod(n + 1, 33) - 1, 4);\n  if (leap === -1) {\n    leap = 4;\n  }\n  return leap;\n}\nfunction jalCal(jy, withoutLeap) {\n  const bl = breaks.length, gy = jy + 621;\n  let leapJ = -14, jp = breaks[0], jm, jump, leap, n, i;\n  if (jy < jp || jy >= breaks[bl - 1]) {\n    throw new Error(\"Invalid Jalaali year \" + jy);\n  }\n  for (i = 1; i < bl; i += 1) {\n    jm = breaks[i];\n    jump = jm - jp;\n    if (jy < jm) {\n      break;\n    }\n    leapJ = leapJ + div(jump, 33) * 8 + div(mod(jump, 33), 4);\n    jp = jm;\n  }\n  n = jy - jp;\n  leapJ = leapJ + div(n, 33) * 8 + div(mod(n, 33) + 3, 4);\n  if (mod(jump, 33) === 4 && jump - n === 4) {\n    leapJ += 1;\n  }\n  const leapG = div(gy, 4) - div((div(gy, 100) + 1) * 3, 4) - 150;\n  const march = 20 + leapJ - leapG;\n  if (!withoutLeap) {\n    if (jump - n < 6) {\n      n = n - jump + div(jump + 4, 33) * 33;\n    }\n    leap = mod(mod(n + 1, 33) - 1, 4);\n    if (leap === -1) {\n      leap = 4;\n    }\n  }\n  return {\n    leap,\n    gy,\n    march\n  };\n}\nfunction j2d(jy, jm, jd) {\n  const r = jalCal(jy, true);\n  return g2d(r.gy, 3, r.march) + (jm - 1) * 31 - div(jm, 7) * (jm - 7) + jd - 1;\n}\nfunction d2j(jdn) {\n  const gy = d2g(jdn).gy;\n  let jy = gy - 621, jd, jm, k;\n  const r = jalCal(jy, false), jdn1f = g2d(gy, 3, r.march);\n  k = jdn - jdn1f;\n  if (k >= 0) {\n    if (k <= 185) {\n      jm = 1 + div(k, 31);\n      jd = mod(k, 31) + 1;\n      return {\n        jy,\n        jm,\n        jd\n      };\n    } else {\n      k -= 186;\n    }\n  } else {\n    jy -= 1;\n    k += 179;\n    if (r.leap === 1) {\n      k += 1;\n    }\n  }\n  jm = 7 + div(k, 30);\n  jd = mod(k, 30) + 1;\n  return {\n    jy,\n    jm,\n    jd\n  };\n}\nfunction g2d(gy, gm, gd) {\n  let d = div((gy + div(gm - 8, 6) + 100100) * 1461, 4) + div(153 * mod(gm + 9, 12) + 2, 5) + gd - 34840408;\n  d = d - div(div(gy + 100100 + div(gm - 8, 6), 100) * 3, 4) + 752;\n  return d;\n}\nfunction d2g(jdn) {\n  let j = 4 * jdn + 139361631;\n  j = j + div(div(4 * jdn + 183187720, 146097) * 3, 4) * 4 - 3908;\n  const i = div(mod(j, 1461), 4) * 5 + 308, gd = div(mod(i, 153), 5) + 1, gm = mod(div(i, 153), 12) + 1, gy = div(j, 1461) - 100100 + div(8 - gm, 6);\n  return {\n    gy,\n    gm,\n    gd\n  };\n}\nfunction div(a, b) {\n  return ~~(a / b);\n}\nfunction mod(a, b) {\n  return a - ~~(a / b) * b;\n}\n\n// src/components/date/use-datetime.js\nvar calendars = [\"gregorian\", \"persian\"];\nvar useDatetimeProps = {\n  // should define modelValue in the target component\n  mask: {\n    type: String\n  },\n  locale: Object,\n  calendar: {\n    type: String,\n    validator: (v) => calendars.includes(v),\n    default: \"gregorian\"\n  },\n  landscape: Boolean,\n  color: String,\n  textColor: String,\n  square: Boolean,\n  flat: Boolean,\n  bordered: Boolean,\n  readonly: Boolean,\n  disable: Boolean\n};\nvar useDatetimeEmits = [\"update:modelValue\"];\nfunction getDayHash(date) {\n  return date.year + \"/\" + pad(date.month) + \"/\" + pad(date.day);\n}\nfunction use_datetime_default(props4, $q) {\n  const editable = computed42(() => {\n    return props4.disable !== true && props4.readonly !== true;\n  });\n  const tabindex = computed42(() => {\n    return editable.value === true ? 0 : -1;\n  });\n  const headerClass = computed42(() => {\n    const cls = [];\n    props4.color !== void 0 && cls.push(`bg-${props4.color}`);\n    props4.textColor !== void 0 && cls.push(`text-${props4.textColor}`);\n    return cls.join(\" \");\n  });\n  function getLocale2() {\n    return props4.locale !== void 0 ? { ...$q.lang.date, ...props4.locale } : $q.lang.date;\n  }\n  function getCurrentDate(dateOnly) {\n    const d = /* @__PURE__ */ new Date();\n    const timeFill = dateOnly === true ? null : 0;\n    if (props4.calendar === \"persian\") {\n      const jDate = toJalaali(d);\n      return {\n        year: jDate.jy,\n        month: jDate.jm,\n        day: jDate.jd\n      };\n    }\n    return {\n      year: d.getFullYear(),\n      month: d.getMonth() + 1,\n      day: d.getDate(),\n      hour: timeFill,\n      minute: timeFill,\n      second: timeFill,\n      millisecond: timeFill\n    };\n  }\n  return {\n    editable,\n    tabindex,\n    headerClass,\n    getLocale: getLocale2,\n    getCurrentDate\n  };\n}\n\n// src/utils/date/date.js\nvar MILLISECONDS_IN_DAY = 864e5;\nvar MILLISECONDS_IN_HOUR = 36e5;\nvar MILLISECONDS_IN_MINUTE = 6e4;\nvar defaultMask = \"YYYY-MM-DDTHH:mm:ss.SSSZ\";\nvar token = /\\[((?:[^\\]\\\\]|\\\\]|\\\\)*)\\]|do|d{1,4}|Mo|M{1,4}|m{1,2}|wo|w{1,2}|Qo|Do|DDDo|D{1,4}|YY(?:YY)?|H{1,2}|h{1,2}|s{1,2}|S{1,3}|Z{1,2}|a{1,2}|[AQExX]/g;\nvar reverseToken = /(\\[[^\\]]*\\])|do|d{1,4}|Mo|M{1,4}|m{1,2}|wo|w{1,2}|Qo|Do|DDDo|D{1,4}|YY(?:YY)?|H{1,2}|h{1,2}|s{1,2}|S{1,3}|Z{1,2}|a{1,2}|[AQExX]|([.*+:?^,\\s${}()|\\\\]+)/g;\nvar regexStore = {};\nfunction getRegexData(mask, dateLocale) {\n  const days = \"(\" + dateLocale.days.join(\"|\") + \")\", key = mask + days;\n  if (regexStore[key] !== void 0) {\n    return regexStore[key];\n  }\n  const daysShort = \"(\" + dateLocale.daysShort.join(\"|\") + \")\", months = \"(\" + dateLocale.months.join(\"|\") + \")\", monthsShort = \"(\" + dateLocale.monthsShort.join(\"|\") + \")\";\n  const map = {};\n  let index = 0;\n  const regexText = mask.replace(reverseToken, (match) => {\n    index++;\n    switch (match) {\n      case \"YY\":\n        map.YY = index;\n        return \"(-?\\\\d{1,2})\";\n      case \"YYYY\":\n        map.YYYY = index;\n        return \"(-?\\\\d{1,4})\";\n      case \"M\":\n        map.M = index;\n        return \"(\\\\d{1,2})\";\n      case \"Mo\":\n        map.M = index++;\n        return \"(\\\\d{1,2}(st|nd|rd|th))\";\n      case \"MM\":\n        map.M = index;\n        return \"(\\\\d{2})\";\n      case \"MMM\":\n        map.MMM = index;\n        return monthsShort;\n      case \"MMMM\":\n        map.MMMM = index;\n        return months;\n      case \"D\":\n        map.D = index;\n        return \"(\\\\d{1,2})\";\n      case \"Do\":\n        map.D = index++;\n        return \"(\\\\d{1,2}(st|nd|rd|th))\";\n      case \"DD\":\n        map.D = index;\n        return \"(\\\\d{2})\";\n      case \"H\":\n        map.H = index;\n        return \"(\\\\d{1,2})\";\n      case \"HH\":\n        map.H = index;\n        return \"(\\\\d{2})\";\n      case \"h\":\n        map.h = index;\n        return \"(\\\\d{1,2})\";\n      case \"hh\":\n        map.h = index;\n        return \"(\\\\d{2})\";\n      case \"m\":\n        map.m = index;\n        return \"(\\\\d{1,2})\";\n      case \"mm\":\n        map.m = index;\n        return \"(\\\\d{2})\";\n      case \"s\":\n        map.s = index;\n        return \"(\\\\d{1,2})\";\n      case \"ss\":\n        map.s = index;\n        return \"(\\\\d{2})\";\n      case \"S\":\n        map.S = index;\n        return \"(\\\\d{1})\";\n      case \"SS\":\n        map.S = index;\n        return \"(\\\\d{2})\";\n      case \"SSS\":\n        map.S = index;\n        return \"(\\\\d{3})\";\n      case \"A\":\n        map.A = index;\n        return \"(AM|PM)\";\n      case \"a\":\n        map.a = index;\n        return \"(am|pm)\";\n      case \"aa\":\n        map.aa = index;\n        return \"(a\\\\.m\\\\.|p\\\\.m\\\\.)\";\n      case \"ddd\":\n        return daysShort;\n      case \"dddd\":\n        return days;\n      case \"Q\":\n      case \"d\":\n      case \"E\":\n        return \"(\\\\d{1})\";\n      case \"do\":\n        index++;\n        return \"(\\\\d{1}(st|nd|rd|th))\";\n      case \"Qo\":\n        return \"(1st|2nd|3rd|4th)\";\n      case \"DDD\":\n      case \"DDDD\":\n        return \"(\\\\d{1,3})\";\n      case \"DDDo\":\n        index++;\n        return \"(\\\\d{1,3}(st|nd|rd|th))\";\n      case \"w\":\n        return \"(\\\\d{1,2})\";\n      case \"wo\":\n        index++;\n        return \"(\\\\d{1,2}(st|nd|rd|th))\";\n      case \"ww\":\n        return \"(\\\\d{2})\";\n      case \"Z\":\n        map.Z = index;\n        return \"(Z|[+-]\\\\d{2}:\\\\d{2})\";\n      case \"ZZ\":\n        map.ZZ = index;\n        return \"(Z|[+-]\\\\d{2}\\\\d{2})\";\n      case \"X\":\n        map.X = index;\n        return \"(-?\\\\d+)\";\n      case \"x\":\n        map.x = index;\n        return \"(-?\\\\d{4,})\";\n      default:\n        index--;\n        if (match[0] === \"[\") {\n          match = match.substring(1, match.length - 1);\n        }\n        return match.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n    }\n  });\n  const res = { map, regex: new RegExp(\"^\" + regexText) };\n  regexStore[key] = res;\n  return res;\n}\nfunction getDateLocale(paramDateLocale, langProps) {\n  return paramDateLocale !== void 0 ? paramDateLocale : langProps !== void 0 ? langProps.date : en_US_default.date;\n}\nfunction formatTimezone(offset2, delimeter = \"\") {\n  const sign = offset2 > 0 ? \"-\" : \"+\", absOffset = Math.abs(offset2), hours = Math.floor(absOffset / 60), minutes = absOffset % 60;\n  return sign + pad(hours) + delimeter + pad(minutes);\n}\nfunction applyYearMonthDayChange(date, mod2, sign) {\n  let year = date.getFullYear(), month = date.getMonth();\n  const day = date.getDate();\n  if (mod2.year !== void 0) {\n    year += sign * mod2.year;\n    delete mod2.year;\n  }\n  if (mod2.month !== void 0) {\n    month += sign * mod2.month;\n    delete mod2.month;\n  }\n  date.setDate(1);\n  date.setMonth(2);\n  date.setFullYear(year);\n  date.setMonth(month);\n  date.setDate(Math.min(day, daysInMonth(date)));\n  if (mod2.date !== void 0) {\n    date.setDate(date.getDate() + sign * mod2.date);\n    delete mod2.date;\n  }\n  return date;\n}\nfunction applyYearMonthDay(date, mod2, middle) {\n  const year = mod2.year !== void 0 ? mod2.year : date[`get${middle}FullYear`](), month = mod2.month !== void 0 ? mod2.month - 1 : date[`get${middle}Month`](), maxDay = new Date(year, month + 1, 0).getDate(), day = Math.min(maxDay, mod2.date !== void 0 ? mod2.date : date[`get${middle}Date`]());\n  date[`set${middle}Date`](1);\n  date[`set${middle}Month`](2);\n  date[`set${middle}FullYear`](year);\n  date[`set${middle}Month`](month);\n  date[`set${middle}Date`](day);\n  delete mod2.year;\n  delete mod2.month;\n  delete mod2.date;\n  return date;\n}\nfunction getChange(date, rawMod, sign) {\n  const mod2 = normalizeMod(rawMod), d = new Date(date), t = mod2.year !== void 0 || mod2.month !== void 0 || mod2.date !== void 0 ? applyYearMonthDayChange(d, mod2, sign) : d;\n  for (const key in mod2) {\n    const op = capitalize(key);\n    t[`set${op}`](t[`get${op}`]() + sign * mod2[key]);\n  }\n  return t;\n}\nfunction normalizeMod(mod2) {\n  const acc = { ...mod2 };\n  if (mod2.years !== void 0) {\n    acc.year = mod2.years;\n    delete acc.years;\n  }\n  if (mod2.months !== void 0) {\n    acc.month = mod2.months;\n    delete acc.months;\n  }\n  if (mod2.days !== void 0) {\n    acc.date = mod2.days;\n    delete acc.days;\n  }\n  if (mod2.day !== void 0) {\n    acc.date = mod2.day;\n    delete acc.day;\n  }\n  if (mod2.hour !== void 0) {\n    acc.hours = mod2.hour;\n    delete acc.hour;\n  }\n  if (mod2.minute !== void 0) {\n    acc.minutes = mod2.minute;\n    delete acc.minute;\n  }\n  if (mod2.second !== void 0) {\n    acc.seconds = mod2.second;\n    delete acc.second;\n  }\n  if (mod2.millisecond !== void 0) {\n    acc.milliseconds = mod2.millisecond;\n    delete acc.millisecond;\n  }\n  return acc;\n}\nfunction adjustDate(date, rawMod, utc) {\n  const mod2 = normalizeMod(rawMod), middle = utc === true ? \"UTC\" : \"\", d = new Date(date), t = mod2.year !== void 0 || mod2.month !== void 0 || mod2.date !== void 0 ? applyYearMonthDay(d, mod2, middle) : d;\n  for (const key in mod2) {\n    const op = key.charAt(0).toUpperCase() + key.slice(1);\n    t[`set${middle}${op}`](mod2[key]);\n  }\n  return t;\n}\nfunction extractDate(str, mask, dateLocale) {\n  const d = __splitDate(str, mask, dateLocale);\n  const date = new Date(\n    d.year,\n    d.month === null ? null : d.month - 1,\n    d.day === null ? 1 : d.day,\n    d.hour,\n    d.minute,\n    d.second,\n    d.millisecond\n  );\n  const tzOffset = date.getTimezoneOffset();\n  return d.timezoneOffset === null || d.timezoneOffset === tzOffset ? date : getChange(date, { minutes: d.timezoneOffset - tzOffset }, 1);\n}\nfunction __splitDate(str, mask, dateLocale, calendar, defaultModel) {\n  const date = {\n    year: null,\n    month: null,\n    day: null,\n    hour: null,\n    minute: null,\n    second: null,\n    millisecond: null,\n    timezoneOffset: null,\n    dateHash: null,\n    timeHash: null\n  };\n  defaultModel !== void 0 && Object.assign(date, defaultModel);\n  if (str === void 0 || str === null || str === \"\" || typeof str !== \"string\") {\n    return date;\n  }\n  if (mask === void 0) {\n    mask = defaultMask;\n  }\n  const langOpts = getDateLocale(dateLocale, Lang_default.props), months = langOpts.months, monthsShort = langOpts.monthsShort;\n  const { regex, map } = getRegexData(mask, langOpts);\n  const match = str.match(regex);\n  if (match === null) {\n    return date;\n  }\n  let tzString = \"\";\n  if (map.X !== void 0 || map.x !== void 0) {\n    const stamp = parseInt(match[map.X !== void 0 ? map.X : map.x], 10);\n    if (isNaN(stamp) === true || stamp < 0) {\n      return date;\n    }\n    const d = new Date(stamp * (map.X !== void 0 ? 1e3 : 1));\n    date.year = d.getFullYear();\n    date.month = d.getMonth() + 1;\n    date.day = d.getDate();\n    date.hour = d.getHours();\n    date.minute = d.getMinutes();\n    date.second = d.getSeconds();\n    date.millisecond = d.getMilliseconds();\n  } else {\n    if (map.YYYY !== void 0) {\n      date.year = parseInt(match[map.YYYY], 10);\n    } else if (map.YY !== void 0) {\n      const y = parseInt(match[map.YY], 10);\n      date.year = y < 0 ? y : 2e3 + y;\n    }\n    if (map.M !== void 0) {\n      date.month = parseInt(match[map.M], 10);\n      if (date.month < 1 || date.month > 12) {\n        return date;\n      }\n    } else if (map.MMM !== void 0) {\n      date.month = monthsShort.indexOf(match[map.MMM]) + 1;\n    } else if (map.MMMM !== void 0) {\n      date.month = months.indexOf(match[map.MMMM]) + 1;\n    }\n    if (map.D !== void 0) {\n      date.day = parseInt(match[map.D], 10);\n      if (date.year === null || date.month === null || date.day < 1) {\n        return date;\n      }\n      const maxDay = calendar !== \"persian\" ? new Date(date.year, date.month, 0).getDate() : jalaaliMonthLength(date.year, date.month);\n      if (date.day > maxDay) {\n        return date;\n      }\n    }\n    if (map.H !== void 0) {\n      date.hour = parseInt(match[map.H], 10) % 24;\n    } else if (map.h !== void 0) {\n      date.hour = parseInt(match[map.h], 10) % 12;\n      if (map.A && match[map.A] === \"PM\" || map.a && match[map.a] === \"pm\" || map.aa && match[map.aa] === \"p.m.\") {\n        date.hour += 12;\n      }\n      date.hour = date.hour % 24;\n    }\n    if (map.m !== void 0) {\n      date.minute = parseInt(match[map.m], 10) % 60;\n    }\n    if (map.s !== void 0) {\n      date.second = parseInt(match[map.s], 10) % 60;\n    }\n    if (map.S !== void 0) {\n      date.millisecond = parseInt(match[map.S], 10) * 10 ** (3 - match[map.S].length);\n    }\n    if (map.Z !== void 0 || map.ZZ !== void 0) {\n      tzString = map.Z !== void 0 ? match[map.Z].replace(\":\", \"\") : match[map.ZZ];\n      date.timezoneOffset = (tzString[0] === \"+\" ? -1 : 1) * (60 * tzString.slice(1, 3) + 1 * tzString.slice(3, 5));\n    }\n  }\n  date.dateHash = pad(date.year, 6) + \"/\" + pad(date.month) + \"/\" + pad(date.day);\n  date.timeHash = pad(date.hour) + \":\" + pad(date.minute) + \":\" + pad(date.second) + tzString;\n  return date;\n}\nfunction isValid(date) {\n  return typeof date === \"number\" ? true : isNaN(Date.parse(date)) === false;\n}\nfunction buildDate(mod2, utc) {\n  return adjustDate(/* @__PURE__ */ new Date(), mod2, utc);\n}\nfunction getDayOfWeek(date) {\n  const dow = new Date(date).getDay();\n  return dow === 0 ? 7 : dow;\n}\nfunction getWeekOfYear(date) {\n  const thursday = new Date(date.getFullYear(), date.getMonth(), date.getDate());\n  thursday.setDate(thursday.getDate() - (thursday.getDay() + 6) % 7 + 3);\n  const firstThursday = new Date(thursday.getFullYear(), 0, 4);\n  firstThursday.setDate(firstThursday.getDate() - (firstThursday.getDay() + 6) % 7 + 3);\n  const ds = thursday.getTimezoneOffset() - firstThursday.getTimezoneOffset();\n  thursday.setHours(thursday.getHours() - ds);\n  const weekDiff = (thursday - firstThursday) / (MILLISECONDS_IN_DAY * 7);\n  return 1 + Math.floor(weekDiff);\n}\nfunction getDayIdentifier(date) {\n  return date.getFullYear() * 1e4 + date.getMonth() * 100 + date.getDate();\n}\nfunction getDateIdentifier(date, onlyDate) {\n  const d = new Date(date);\n  return onlyDate === true ? getDayIdentifier(d) : d.getTime();\n}\nfunction isBetweenDates(date, from, to, opts = {}) {\n  const d1 = getDateIdentifier(from, opts.onlyDate), d2 = getDateIdentifier(to, opts.onlyDate), cur = getDateIdentifier(date, opts.onlyDate);\n  return (cur > d1 || opts.inclusiveFrom === true && cur === d1) && (cur < d2 || opts.inclusiveTo === true && cur === d2);\n}\nfunction addToDate(date, mod2) {\n  return getChange(date, mod2, 1);\n}\nfunction subtractFromDate(date, mod2) {\n  return getChange(date, mod2, -1);\n}\nfunction startOfDate(date, unit, utc) {\n  const t = new Date(date), prefix = `set${utc === true ? \"UTC\" : \"\"}`;\n  switch (unit) {\n    case \"year\":\n    case \"years\":\n      t[`${prefix}Month`](0);\n    case \"month\":\n    case \"months\":\n      t[`${prefix}Date`](1);\n    case \"day\":\n    case \"days\":\n    case \"date\":\n      t[`${prefix}Hours`](0);\n    case \"hour\":\n    case \"hours\":\n      t[`${prefix}Minutes`](0);\n    case \"minute\":\n    case \"minutes\":\n      t[`${prefix}Seconds`](0);\n    case \"second\":\n    case \"seconds\":\n      t[`${prefix}Milliseconds`](0);\n  }\n  return t;\n}\nfunction endOfDate(date, unit, utc) {\n  const t = new Date(date), prefix = `set${utc === true ? \"UTC\" : \"\"}`;\n  switch (unit) {\n    case \"year\":\n    case \"years\":\n      t[`${prefix}Month`](11);\n    case \"month\":\n    case \"months\":\n      t[`${prefix}Date`](daysInMonth(t));\n    case \"day\":\n    case \"days\":\n    case \"date\":\n      t[`${prefix}Hours`](23);\n    case \"hour\":\n    case \"hours\":\n      t[`${prefix}Minutes`](59);\n    case \"minute\":\n    case \"minutes\":\n      t[`${prefix}Seconds`](59);\n    case \"second\":\n    case \"seconds\":\n      t[`${prefix}Milliseconds`](999);\n  }\n  return t;\n}\nfunction getMaxDate(date) {\n  let t = new Date(date);\n  Array.prototype.slice.call(arguments, 1).forEach((d) => {\n    t = Math.max(t, new Date(d));\n  });\n  return t;\n}\nfunction getMinDate(date) {\n  let t = new Date(date);\n  Array.prototype.slice.call(arguments, 1).forEach((d) => {\n    t = Math.min(t, new Date(d));\n  });\n  return t;\n}\nfunction getDiff(t, sub, interval) {\n  return (t.getTime() - t.getTimezoneOffset() * MILLISECONDS_IN_MINUTE - (sub.getTime() - sub.getTimezoneOffset() * MILLISECONDS_IN_MINUTE)) / interval;\n}\nfunction getDateDiff(date, subtract, unit = \"days\") {\n  const t = new Date(date), sub = new Date(subtract);\n  switch (unit) {\n    case \"years\":\n    case \"year\":\n      return t.getFullYear() - sub.getFullYear();\n    case \"months\":\n    case \"month\":\n      return (t.getFullYear() - sub.getFullYear()) * 12 + t.getMonth() - sub.getMonth();\n    case \"days\":\n    case \"day\":\n    case \"date\":\n      return getDiff(startOfDate(t, \"day\"), startOfDate(sub, \"day\"), MILLISECONDS_IN_DAY);\n    case \"hours\":\n    case \"hour\":\n      return getDiff(startOfDate(t, \"hour\"), startOfDate(sub, \"hour\"), MILLISECONDS_IN_HOUR);\n    case \"minutes\":\n    case \"minute\":\n      return getDiff(startOfDate(t, \"minute\"), startOfDate(sub, \"minute\"), MILLISECONDS_IN_MINUTE);\n    case \"seconds\":\n    case \"second\":\n      return getDiff(startOfDate(t, \"second\"), startOfDate(sub, \"second\"), 1e3);\n  }\n}\nfunction getDayOfYear(date) {\n  return getDateDiff(date, startOfDate(date, \"year\"), \"days\") + 1;\n}\nfunction inferDateFormat(date) {\n  return isDate(date) === true ? \"date\" : typeof date === \"number\" ? \"number\" : \"string\";\n}\nfunction getDateBetween(date, min, max) {\n  const t = new Date(date);\n  if (min) {\n    const low = new Date(min);\n    if (t < low) {\n      return low;\n    }\n  }\n  if (max) {\n    const high = new Date(max);\n    if (t > high) {\n      return high;\n    }\n  }\n  return t;\n}\nfunction isSameDate(date, date2, unit) {\n  const t = new Date(date), d = new Date(date2);\n  if (unit === void 0) {\n    return t.getTime() === d.getTime();\n  }\n  switch (unit) {\n    case \"second\":\n    case \"seconds\":\n      if (t.getSeconds() !== d.getSeconds()) {\n        return false;\n      }\n    case \"minute\":\n    // intentional fall-through\n    case \"minutes\":\n      if (t.getMinutes() !== d.getMinutes()) {\n        return false;\n      }\n    case \"hour\":\n    // intentional fall-through\n    case \"hours\":\n      if (t.getHours() !== d.getHours()) {\n        return false;\n      }\n    case \"day\":\n    // intentional fall-through\n    case \"days\":\n    case \"date\":\n      if (t.getDate() !== d.getDate()) {\n        return false;\n      }\n    case \"month\":\n    // intentional fall-through\n    case \"months\":\n      if (t.getMonth() !== d.getMonth()) {\n        return false;\n      }\n    case \"year\":\n    // intentional fall-through\n    case \"years\":\n      if (t.getFullYear() !== d.getFullYear()) {\n        return false;\n      }\n      break;\n    default:\n      throw new Error(`date isSameDate unknown unit ${unit}`);\n  }\n  return true;\n}\nfunction daysInMonth(date) {\n  return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();\n}\nfunction getOrdinal(n) {\n  if (n >= 11 && n <= 13) {\n    return `${n}th`;\n  }\n  switch (n % 10) {\n    case 1:\n      return `${n}st`;\n    case 2:\n      return `${n}nd`;\n    case 3:\n      return `${n}rd`;\n  }\n  return `${n}th`;\n}\nvar formatter = {\n  // Year: 00, 01, ..., 99\n  YY(date, dateLocale, forcedYear) {\n    const y = this.YYYY(date, dateLocale, forcedYear) % 100;\n    return y >= 0 ? pad(y) : \"-\" + pad(Math.abs(y));\n  },\n  // Year: 1900, 1901, ..., 2099\n  YYYY(date, _dateLocale, forcedYear) {\n    return forcedYear !== void 0 && forcedYear !== null ? forcedYear : date.getFullYear();\n  },\n  // Month: 1, 2, ..., 12\n  M(date) {\n    return date.getMonth() + 1;\n  },\n  // Month: 1st, 2nd, ..., 12th\n  Mo(date) {\n    return getOrdinal(date.getMonth() + 1);\n  },\n  // Month: 01, 02, ..., 12\n  MM(date) {\n    return pad(date.getMonth() + 1);\n  },\n  // Month Short Name: Jan, Feb, ...\n  MMM(date, dateLocale) {\n    return dateLocale.monthsShort[date.getMonth()];\n  },\n  // Month Name: January, February, ...\n  MMMM(date, dateLocale) {\n    return dateLocale.months[date.getMonth()];\n  },\n  // Quarter: 1, 2, 3, 4\n  Q(date) {\n    return Math.ceil((date.getMonth() + 1) / 3);\n  },\n  // Quarter: 1st, 2nd, 3rd, 4th\n  Qo(date) {\n    return getOrdinal(this.Q(date));\n  },\n  // Day of month: 1, 2, ..., 31\n  D(date) {\n    return date.getDate();\n  },\n  // Day of month: 1st, 2nd, ..., 31st\n  Do(date) {\n    return getOrdinal(date.getDate());\n  },\n  // Day of month: 01, 02, ..., 31\n  DD(date) {\n    return pad(date.getDate());\n  },\n  // Day of year: 1, 2, ..., 366\n  DDD(date) {\n    return getDayOfYear(date);\n  },\n  // Day of year: 1st, 2nd, ..., 366th\n  DDDo(date) {\n    return getOrdinal(getDayOfYear(date));\n  },\n  // Day of year: 001, 002, ..., 366\n  DDDD(date) {\n    return pad(getDayOfYear(date), 3);\n  },\n  // Day of week: 0, 1, ..., 6\n  d(date) {\n    return date.getDay();\n  },\n  // Day of week: 0th, 1st, ..., 6th\n  do(date) {\n    return getOrdinal(date.getDay());\n  },\n  // Day of week: Su, Mo, ...\n  dd(date, dateLocale) {\n    return dateLocale.days[date.getDay()].slice(0, 2);\n  },\n  // Day of week: Sun, Mon, ...\n  ddd(date, dateLocale) {\n    return dateLocale.daysShort[date.getDay()];\n  },\n  // Day of week: Sunday, Monday, ...\n  dddd(date, dateLocale) {\n    return dateLocale.days[date.getDay()];\n  },\n  // Day of ISO week: 1, 2, ..., 7\n  E(date) {\n    return date.getDay() || 7;\n  },\n  // Week of Year: 1 2 ... 52 53\n  w(date) {\n    return getWeekOfYear(date);\n  },\n  // Week of Year: 1st 2nd ... 52nd 53rd\n  wo(date) {\n    return getOrdinal(getWeekOfYear(date));\n  },\n  // Week of Year: 01 02 ... 52 53\n  ww(date) {\n    return pad(getWeekOfYear(date));\n  },\n  // Hour: 0, 1, ... 23\n  H(date) {\n    return date.getHours();\n  },\n  // Hour: 00, 01, ..., 23\n  HH(date) {\n    return pad(date.getHours());\n  },\n  // Hour: 1, 2, ..., 12\n  h(date) {\n    const hours = date.getHours();\n    return hours === 0 ? 12 : hours > 12 ? hours % 12 : hours;\n  },\n  // Hour: 01, 02, ..., 12\n  hh(date) {\n    return pad(this.h(date));\n  },\n  // Minute: 0, 1, ..., 59\n  m(date) {\n    return date.getMinutes();\n  },\n  // Minute: 00, 01, ..., 59\n  mm(date) {\n    return pad(date.getMinutes());\n  },\n  // Second: 0, 1, ..., 59\n  s(date) {\n    return date.getSeconds();\n  },\n  // Second: 00, 01, ..., 59\n  ss(date) {\n    return pad(date.getSeconds());\n  },\n  // 1/10 of second: 0, 1, ..., 9\n  S(date) {\n    return Math.floor(date.getMilliseconds() / 100);\n  },\n  // 1/100 of second: 00, 01, ..., 99\n  SS(date) {\n    return pad(Math.floor(date.getMilliseconds() / 10));\n  },\n  // Millisecond: 000, 001, ..., 999\n  SSS(date) {\n    return pad(date.getMilliseconds(), 3);\n  },\n  // Meridiem: AM, PM\n  A(date) {\n    return date.getHours() < 12 ? \"AM\" : \"PM\";\n  },\n  // Meridiem: am, pm\n  a(date) {\n    return date.getHours() < 12 ? \"am\" : \"pm\";\n  },\n  // Meridiem: a.m., p.m.\n  aa(date) {\n    return date.getHours() < 12 ? \"a.m.\" : \"p.m.\";\n  },\n  // Timezone: -01:00, +00:00, ... +12:00\n  Z(date, _dateLocale, _forcedYear, forcedTimezoneOffset) {\n    const tzOffset = forcedTimezoneOffset === void 0 || forcedTimezoneOffset === null ? date.getTimezoneOffset() : forcedTimezoneOffset;\n    return formatTimezone(tzOffset, \":\");\n  },\n  // Timezone: -0100, +0000, ... +1200\n  ZZ(date, _dateLocale, _forcedYear, forcedTimezoneOffset) {\n    const tzOffset = forcedTimezoneOffset === void 0 || forcedTimezoneOffset === null ? date.getTimezoneOffset() : forcedTimezoneOffset;\n    return formatTimezone(tzOffset);\n  },\n  // Seconds timestamp: 512969520\n  X(date) {\n    return Math.floor(date.getTime() / 1e3);\n  },\n  // Milliseconds timestamp: 512969520900\n  x(date) {\n    return date.getTime();\n  }\n};\nfunction formatDate(val, mask, dateLocale, __forcedYear, __forcedTimezoneOffset) {\n  if (val !== 0 && !val || val === Infinity || val === -Infinity) return;\n  const date = new Date(val);\n  if (isNaN(date)) return;\n  if (mask === void 0) {\n    mask = defaultMask;\n  }\n  const locale = getDateLocale(dateLocale, Lang_default.props);\n  return mask.replace(\n    token,\n    (match, text) => match in formatter ? formatter[match](date, locale, __forcedYear, __forcedTimezoneOffset) : text === void 0 ? match : text.split(\"\\\\]\").join(\"]\")\n  );\n}\nfunction clone(date) {\n  return isDate(date) === true ? new Date(date.getTime()) : date;\n}\nvar date_default = {\n  isValid,\n  extractDate,\n  buildDate,\n  getDayOfWeek,\n  getWeekOfYear,\n  isBetweenDates,\n  addToDate,\n  subtractFromDate,\n  adjustDate,\n  startOfDate,\n  endOfDate,\n  getMaxDate,\n  getMinDate,\n  getDateDiff,\n  getDayOfYear,\n  inferDateFormat,\n  getDateBetween,\n  isSameDate,\n  daysInMonth,\n  formatDate,\n  clone\n};\n\n// src/components/date/QDate.js\nvar yearsInterval = 20;\nvar views = [\"Calendar\", \"Years\", \"Months\"];\nvar viewIsValid = (v) => views.includes(v);\nvar yearMonthValidator = (v) => /^-?[\\d]+\\/[0-1]\\d$/.test(v);\nvar lineStr = \" \\u2014 \";\nfunction getMonthHash(date) {\n  return date.year + \"/\" + pad(date.month);\n}\nvar QDate_default = createComponent({\n  name: \"QDate\",\n  props: {\n    ...useDatetimeProps,\n    ...useFormProps,\n    ...useDarkProps,\n    modelValue: {\n      required: true,\n      validator: (val) => typeof val === \"string\" || Array.isArray(val) === true || Object(val) === val || val === null\n    },\n    multiple: Boolean,\n    range: Boolean,\n    title: String,\n    subtitle: String,\n    mask: {\n      ...useDatetimeProps.mask,\n      // this mask is forced\n      // when using persian calendar\n      default: \"YYYY/MM/DD\"\n    },\n    defaultYearMonth: {\n      type: String,\n      validator: yearMonthValidator\n    },\n    yearsInMonthView: Boolean,\n    events: [Array, Function],\n    eventColor: [String, Function],\n    emitImmediately: Boolean,\n    options: [Array, Function],\n    navigationMinYearMonth: {\n      type: String,\n      validator: yearMonthValidator\n    },\n    navigationMaxYearMonth: {\n      type: String,\n      validator: yearMonthValidator\n    },\n    noUnset: Boolean,\n    firstDayOfWeek: [String, Number],\n    todayBtn: Boolean,\n    minimal: Boolean,\n    defaultView: {\n      type: String,\n      default: \"Calendar\",\n      validator: viewIsValid\n    }\n  },\n  emits: [\n    ...useDatetimeEmits,\n    \"rangeStart\",\n    \"rangeEnd\",\n    \"navigation\"\n  ],\n  setup(props4, { slots, emit }) {\n    const { proxy } = getCurrentInstance27();\n    const { $q } = proxy;\n    const isDark = use_dark_default(props4, $q);\n    const { getCache } = use_render_cache_default();\n    const { tabindex, headerClass, getLocale: getLocale2, getCurrentDate } = use_datetime_default(props4, $q);\n    let lastEmitValue;\n    const formAttrs = useFormAttrs(props4);\n    const injectFormInput = useFormInject(formAttrs);\n    const blurTargetRef = ref20(null);\n    const innerMask = ref20(getMask());\n    const innerLocale = ref20(getLocale2());\n    const mask = computed43(() => getMask());\n    const locale = computed43(() => getLocale2());\n    const today = computed43(() => getCurrentDate());\n    const viewModel = ref20(getViewModel(innerMask.value, innerLocale.value));\n    const view = ref20(props4.defaultView);\n    const direction = computed43(() => $q.lang.rtl === true ? \"right\" : \"left\");\n    const monthDirection = ref20(direction.value);\n    const yearDirection = ref20(direction.value);\n    const year = viewModel.value.year;\n    const startYear = ref20(year - year % yearsInterval - (year < 0 ? yearsInterval : 0));\n    const editRange = ref20(null);\n    const classes = computed43(() => {\n      const type = props4.landscape === true ? \"landscape\" : \"portrait\";\n      return `q-date q-date--${type} q-date--${type}-${props4.minimal === true ? \"minimal\" : \"standard\"}` + (isDark.value === true ? \" q-date--dark q-dark\" : \"\") + (props4.bordered === true ? \" q-date--bordered\" : \"\") + (props4.square === true ? \" q-date--square no-border-radius\" : \"\") + (props4.flat === true ? \" q-date--flat no-shadow\" : \"\") + (props4.disable === true ? \" disabled\" : props4.readonly === true ? \" q-date--readonly\" : \"\");\n    });\n    const computedColor = computed43(() => {\n      return props4.color || \"primary\";\n    });\n    const computedTextColor = computed43(() => {\n      return props4.textColor || \"white\";\n    });\n    const isImmediate = computed43(\n      () => props4.emitImmediately === true && props4.multiple !== true && props4.range !== true\n    );\n    const normalizedModel = computed43(() => Array.isArray(props4.modelValue) === true ? props4.modelValue : props4.modelValue !== null && props4.modelValue !== void 0 ? [props4.modelValue] : []);\n    const daysModel = computed43(\n      () => normalizedModel.value.filter((date) => typeof date === \"string\").map((date) => decodeString(date, innerMask.value, innerLocale.value)).filter(\n        (date) => date.dateHash !== null && date.day !== null && date.month !== null && date.year !== null\n      )\n    );\n    const rangeModel = computed43(() => {\n      const fn = (date) => decodeString(date, innerMask.value, innerLocale.value);\n      return normalizedModel.value.filter((date) => isObject(date) === true && date.from !== void 0 && date.to !== void 0).map((range) => ({ from: fn(range.from), to: fn(range.to) })).filter((range) => range.from.dateHash !== null && range.to.dateHash !== null && range.from.dateHash < range.to.dateHash);\n    });\n    const getNativeDateFn = computed43(() => props4.calendar !== \"persian\" ? (model) => new Date(model.year, model.month - 1, model.day) : (model) => {\n      const gDate = toGregorian(model.year, model.month, model.day);\n      return new Date(gDate.gy, gDate.gm - 1, gDate.gd);\n    });\n    const encodeObjectFn = computed43(() => props4.calendar === \"persian\" ? getDayHash : (date, mask2, locale2) => formatDate(\n      new Date(\n        date.year,\n        date.month - 1,\n        date.day,\n        date.hour,\n        date.minute,\n        date.second,\n        date.millisecond\n      ),\n      mask2 === void 0 ? innerMask.value : mask2,\n      locale2 === void 0 ? innerLocale.value : locale2,\n      date.year,\n      date.timezoneOffset\n    ));\n    const daysInModel = computed43(\n      () => daysModel.value.length + rangeModel.value.reduce(\n        (acc, range) => acc + 1 + getDateDiff(\n          getNativeDateFn.value(range.to),\n          getNativeDateFn.value(range.from)\n        ),\n        0\n      )\n    );\n    const headerTitle = computed43(() => {\n      if (props4.title !== void 0 && props4.title !== null && props4.title.length !== 0) {\n        return props4.title;\n      }\n      if (editRange.value !== null) {\n        const model2 = editRange.value.init;\n        const date2 = getNativeDateFn.value(model2);\n        return innerLocale.value.daysShort[date2.getDay()] + \", \" + innerLocale.value.monthsShort[model2.month - 1] + \" \" + model2.day + lineStr + \"?\";\n      }\n      if (daysInModel.value === 0) {\n        return lineStr;\n      }\n      if (daysInModel.value > 1) {\n        return `${daysInModel.value} ${innerLocale.value.pluralDay}`;\n      }\n      const model = daysModel.value[0];\n      const date = getNativeDateFn.value(model);\n      if (isNaN(date.valueOf()) === true) {\n        return lineStr;\n      }\n      if (innerLocale.value.headerTitle !== void 0) {\n        return innerLocale.value.headerTitle(date, model);\n      }\n      return innerLocale.value.daysShort[date.getDay()] + \", \" + innerLocale.value.monthsShort[model.month - 1] + \" \" + model.day;\n    });\n    const minSelectedModel = computed43(() => {\n      const model = daysModel.value.concat(rangeModel.value.map((range) => range.from)).sort((a, b) => a.year - b.year || a.month - b.month);\n      return model[0];\n    });\n    const maxSelectedModel = computed43(() => {\n      const model = daysModel.value.concat(rangeModel.value.map((range) => range.to)).sort((a, b) => b.year - a.year || b.month - a.month);\n      return model[0];\n    });\n    const headerSubtitle = computed43(() => {\n      if (props4.subtitle !== void 0 && props4.subtitle !== null && props4.subtitle.length !== 0) {\n        return props4.subtitle;\n      }\n      if (daysInModel.value === 0) {\n        return lineStr;\n      }\n      if (daysInModel.value > 1) {\n        const from = minSelectedModel.value;\n        const to = maxSelectedModel.value;\n        const month = innerLocale.value.monthsShort;\n        return month[from.month - 1] + (from.year !== to.year ? \" \" + from.year + lineStr + month[to.month - 1] + \" \" : from.month !== to.month ? lineStr + month[to.month - 1] : \"\") + \" \" + to.year;\n      }\n      return daysModel.value[0].year;\n    });\n    const dateArrow = computed43(() => {\n      const val = [$q.iconSet.datetime.arrowLeft, $q.iconSet.datetime.arrowRight];\n      return $q.lang.rtl === true ? val.reverse() : val;\n    });\n    const computedFirstDayOfWeek = computed43(() => props4.firstDayOfWeek !== void 0 ? Number(props4.firstDayOfWeek) : innerLocale.value.firstDayOfWeek);\n    const daysOfWeek = computed43(() => {\n      const days2 = innerLocale.value.daysShort, first = computedFirstDayOfWeek.value;\n      return first > 0 ? days2.slice(first, 7).concat(days2.slice(0, first)) : days2;\n    });\n    const daysInMonth2 = computed43(() => {\n      const date = viewModel.value;\n      return props4.calendar !== \"persian\" ? new Date(date.year, date.month, 0).getDate() : jalaaliMonthLength(date.year, date.month);\n    });\n    const evtColor = computed43(() => typeof props4.eventColor === \"function\" ? props4.eventColor : () => props4.eventColor);\n    const minNav = computed43(() => {\n      if (props4.navigationMinYearMonth === void 0) {\n        return null;\n      }\n      const data = props4.navigationMinYearMonth.split(\"/\");\n      return { year: parseInt(data[0], 10), month: parseInt(data[1], 10) };\n    });\n    const maxNav = computed43(() => {\n      if (props4.navigationMaxYearMonth === void 0) {\n        return null;\n      }\n      const data = props4.navigationMaxYearMonth.split(\"/\");\n      return { year: parseInt(data[0], 10), month: parseInt(data[1], 10) };\n    });\n    const navBoundaries = computed43(() => {\n      const data = {\n        month: { prev: true, next: true },\n        year: { prev: true, next: true }\n      };\n      if (minNav.value !== null && minNav.value.year >= viewModel.value.year) {\n        data.year.prev = false;\n        if (minNav.value.year === viewModel.value.year && minNav.value.month >= viewModel.value.month) {\n          data.month.prev = false;\n        }\n      }\n      if (maxNav.value !== null && maxNav.value.year <= viewModel.value.year) {\n        data.year.next = false;\n        if (maxNav.value.year === viewModel.value.year && maxNav.value.month <= viewModel.value.month) {\n          data.month.next = false;\n        }\n      }\n      return data;\n    });\n    const daysMap = computed43(() => {\n      const map = {};\n      daysModel.value.forEach((entry) => {\n        const hash = getMonthHash(entry);\n        if (map[hash] === void 0) {\n          map[hash] = [];\n        }\n        map[hash].push(entry.day);\n      });\n      return map;\n    });\n    const rangeMap = computed43(() => {\n      const map = {};\n      rangeModel.value.forEach((entry) => {\n        const hashFrom = getMonthHash(entry.from);\n        const hashTo = getMonthHash(entry.to);\n        if (map[hashFrom] === void 0) {\n          map[hashFrom] = [];\n        }\n        map[hashFrom].push({\n          from: entry.from.day,\n          to: hashFrom === hashTo ? entry.to.day : void 0,\n          range: entry\n        });\n        if (hashFrom < hashTo) {\n          let hash;\n          const { year: year2, month } = entry.from;\n          const cur = month < 12 ? { year: year2, month: month + 1 } : { year: year2 + 1, month: 1 };\n          while ((hash = getMonthHash(cur)) <= hashTo) {\n            if (map[hash] === void 0) {\n              map[hash] = [];\n            }\n            map[hash].push({\n              from: void 0,\n              to: hash === hashTo ? entry.to.day : void 0,\n              range: entry\n            });\n            cur.month++;\n            if (cur.month > 12) {\n              cur.year++;\n              cur.month = 1;\n            }\n          }\n        }\n      });\n      return map;\n    });\n    const rangeView = computed43(() => {\n      if (editRange.value === null) return;\n      const { init, initHash, final, finalHash } = editRange.value;\n      const [from, to] = initHash <= finalHash ? [init, final] : [final, init];\n      const fromHash = getMonthHash(from);\n      const toHash = getMonthHash(to);\n      if (fromHash !== viewMonthHash.value && toHash !== viewMonthHash.value) return;\n      const view2 = {};\n      if (fromHash === viewMonthHash.value) {\n        view2.from = from.day;\n        view2.includeFrom = true;\n      } else {\n        view2.from = 1;\n      }\n      if (toHash === viewMonthHash.value) {\n        view2.to = to.day;\n        view2.includeTo = true;\n      } else {\n        view2.to = daysInMonth2.value;\n      }\n      return view2;\n    });\n    const viewMonthHash = computed43(() => getMonthHash(viewModel.value));\n    const selectionDaysMap = computed43(() => {\n      const map = {};\n      if (props4.options === void 0) {\n        for (let i = 1; i <= daysInMonth2.value; i++) {\n          map[i] = true;\n        }\n        return map;\n      }\n      const fn = typeof props4.options === \"function\" ? props4.options : (date) => props4.options.includes(date);\n      for (let i = 1; i <= daysInMonth2.value; i++) {\n        const dayHash = viewMonthHash.value + \"/\" + pad(i);\n        map[i] = fn(dayHash);\n      }\n      return map;\n    });\n    const eventDaysMap = computed43(() => {\n      const map = {};\n      if (props4.events === void 0) {\n        for (let i = 1; i <= daysInMonth2.value; i++) {\n          map[i] = false;\n        }\n      } else {\n        const fn = typeof props4.events === \"function\" ? props4.events : (date) => props4.events.includes(date);\n        for (let i = 1; i <= daysInMonth2.value; i++) {\n          const dayHash = viewMonthHash.value + \"/\" + pad(i);\n          map[i] = fn(dayHash) === true && evtColor.value(dayHash);\n        }\n      }\n      return map;\n    });\n    const viewDays = computed43(() => {\n      let date, endDay;\n      const { year: year2, month } = viewModel.value;\n      if (props4.calendar !== \"persian\") {\n        date = new Date(year2, month - 1, 1);\n        endDay = new Date(year2, month - 1, 0).getDate();\n      } else {\n        const gDate = toGregorian(year2, month, 1);\n        date = new Date(gDate.gy, gDate.gm - 1, gDate.gd);\n        let prevJM = month - 1;\n        let prevJY = year2;\n        if (prevJM === 0) {\n          prevJM = 12;\n          prevJY--;\n        }\n        endDay = jalaaliMonthLength(prevJY, prevJM);\n      }\n      return {\n        days: date.getDay() - computedFirstDayOfWeek.value - 1,\n        endDay\n      };\n    });\n    const days = computed43(() => {\n      const res = [];\n      const { days: days2, endDay } = viewDays.value;\n      const len = days2 < 0 ? days2 + 7 : days2;\n      if (len < 6) {\n        for (let i = endDay - len; i <= endDay; i++) {\n          res.push({ i, fill: true });\n        }\n      }\n      const index = res.length;\n      for (let i = 1; i <= daysInMonth2.value; i++) {\n        const day = { i, event: eventDaysMap.value[i], classes: [] };\n        if (selectionDaysMap.value[i] === true) {\n          day.in = true;\n          day.flat = true;\n        }\n        res.push(day);\n      }\n      if (daysMap.value[viewMonthHash.value] !== void 0) {\n        daysMap.value[viewMonthHash.value].forEach((day) => {\n          const i = index + day - 1;\n          Object.assign(res[i], {\n            selected: true,\n            unelevated: true,\n            flat: false,\n            color: computedColor.value,\n            textColor: computedTextColor.value\n          });\n        });\n      }\n      if (rangeMap.value[viewMonthHash.value] !== void 0) {\n        rangeMap.value[viewMonthHash.value].forEach((entry) => {\n          if (entry.from !== void 0) {\n            const from = index + entry.from - 1;\n            const to = index + (entry.to || daysInMonth2.value) - 1;\n            for (let day = from; day <= to; day++) {\n              Object.assign(res[day], {\n                range: entry.range,\n                unelevated: true,\n                color: computedColor.value,\n                textColor: computedTextColor.value\n              });\n            }\n            Object.assign(res[from], {\n              rangeFrom: true,\n              flat: false\n            });\n            entry.to !== void 0 && Object.assign(res[to], {\n              rangeTo: true,\n              flat: false\n            });\n          } else if (entry.to !== void 0) {\n            const to = index + entry.to - 1;\n            for (let day = index; day <= to; day++) {\n              Object.assign(res[day], {\n                range: entry.range,\n                unelevated: true,\n                color: computedColor.value,\n                textColor: computedTextColor.value\n              });\n            }\n            Object.assign(res[to], {\n              flat: false,\n              rangeTo: true\n            });\n          } else {\n            const to = index + daysInMonth2.value - 1;\n            for (let day = index; day <= to; day++) {\n              Object.assign(res[day], {\n                range: entry.range,\n                unelevated: true,\n                color: computedColor.value,\n                textColor: computedTextColor.value\n              });\n            }\n          }\n        });\n      }\n      if (rangeView.value !== void 0) {\n        const from = index + rangeView.value.from - 1;\n        const to = index + rangeView.value.to - 1;\n        for (let day = from; day <= to; day++) {\n          res[day].color = computedColor.value;\n          res[day].editRange = true;\n        }\n        if (rangeView.value.includeFrom === true) {\n          res[from].editRangeFrom = true;\n        }\n        if (rangeView.value.includeTo === true) {\n          res[to].editRangeTo = true;\n        }\n      }\n      if (viewModel.value.year === today.value.year && viewModel.value.month === today.value.month) {\n        res[index + today.value.day - 1].today = true;\n      }\n      const left = res.length % 7;\n      if (left > 0) {\n        const afterDays = 7 - left;\n        for (let i = 1; i <= afterDays; i++) {\n          res.push({ i, fill: true });\n        }\n      }\n      res.forEach((day) => {\n        let cls = \"q-date__calendar-item \";\n        if (day.fill === true) {\n          cls += \"q-date__calendar-item--fill\";\n        } else {\n          cls += `q-date__calendar-item--${day.in === true ? \"in\" : \"out\"}`;\n          if (day.range !== void 0) {\n            cls += ` q-date__range${day.rangeTo === true ? \"-to\" : day.rangeFrom === true ? \"-from\" : \"\"}`;\n          }\n          if (day.editRange === true) {\n            cls += ` q-date__edit-range${day.editRangeFrom === true ? \"-from\" : \"\"}${day.editRangeTo === true ? \"-to\" : \"\"}`;\n          }\n          if (day.range !== void 0 || day.editRange === true) {\n            cls += ` text-${day.color}`;\n          }\n        }\n        day.classes = cls;\n      });\n      return res;\n    });\n    const attributes = computed43(() => props4.disable === true ? { \"aria-disabled\": \"true\" } : {});\n    watch13(() => props4.modelValue, (v) => {\n      if (lastEmitValue === v) {\n        lastEmitValue = 0;\n      } else {\n        const model = getViewModel(innerMask.value, innerLocale.value);\n        updateViewModel(model.year, model.month, model);\n      }\n    });\n    watch13(view, () => {\n      if (blurTargetRef.value !== null && proxy.$el.contains(document.activeElement) === true) {\n        blurTargetRef.value.focus();\n      }\n    });\n    watch13(() => viewModel.value.year + \"|\" + viewModel.value.month, () => {\n      emit(\"navigation\", { year: viewModel.value.year, month: viewModel.value.month });\n    });\n    watch13(mask, (val) => {\n      updateValue2(val, innerLocale.value, \"mask\");\n      innerMask.value = val;\n    });\n    watch13(locale, (val) => {\n      updateValue2(innerMask.value, val, \"locale\");\n      innerLocale.value = val;\n    });\n    function setToday() {\n      const { year: year2, month, day } = today.value;\n      const date = {\n        // contains more props than needed (hour, minute, second, millisecond)\n        // but those aren't used in the processing of this \"date\" variable\n        ...viewModel.value,\n        // overwriting with today's date\n        year: year2,\n        month,\n        day\n      };\n      const monthMap = daysMap.value[getMonthHash(date)];\n      if (monthMap === void 0 || monthMap.includes(date.day) === false) {\n        addToModel(date);\n      }\n      setCalendarTo(date.year, date.month);\n    }\n    function setView(viewMode) {\n      if (viewIsValid(viewMode) === true) {\n        view.value = viewMode;\n      }\n    }\n    function offsetCalendar(type, descending) {\n      if ([\"month\", \"year\"].includes(type)) {\n        const fn = type === \"month\" ? goToMonth : goToYear;\n        fn(descending === true ? -1 : 1);\n      }\n    }\n    function setCalendarTo(year2, month) {\n      view.value = \"Calendar\";\n      updateViewModel(year2, month);\n    }\n    function setEditingRange(from, to) {\n      if (props4.range === false || !from) {\n        editRange.value = null;\n        return;\n      }\n      const init = Object.assign({ ...viewModel.value }, from);\n      const final = to !== void 0 ? Object.assign({ ...viewModel.value }, to) : init;\n      editRange.value = {\n        init,\n        initHash: getDayHash(init),\n        final,\n        finalHash: getDayHash(final)\n      };\n      setCalendarTo(init.year, init.month);\n    }\n    function getMask() {\n      return props4.calendar === \"persian\" ? \"YYYY/MM/DD\" : props4.mask;\n    }\n    function decodeString(date, mask2, locale2) {\n      return __splitDate(\n        date,\n        mask2,\n        locale2,\n        props4.calendar,\n        {\n          hour: 0,\n          minute: 0,\n          second: 0,\n          millisecond: 0\n        }\n      );\n    }\n    function getViewModel(mask2, locale2) {\n      const model = Array.isArray(props4.modelValue) === true ? props4.modelValue : props4.modelValue ? [props4.modelValue] : [];\n      if (model.length === 0) {\n        return getDefaultViewModel();\n      }\n      const target2 = model[model.length - 1];\n      const decoded = decodeString(\n        target2.from !== void 0 ? target2.from : target2,\n        mask2,\n        locale2\n      );\n      return decoded.dateHash === null ? getDefaultViewModel() : decoded;\n    }\n    function getDefaultViewModel() {\n      let year2, month;\n      if (props4.defaultYearMonth !== void 0) {\n        const d = props4.defaultYearMonth.split(\"/\");\n        year2 = parseInt(d[0], 10);\n        month = parseInt(d[1], 10);\n      } else {\n        const d = today.value !== void 0 ? today.value : getCurrentDate();\n        year2 = d.year;\n        month = d.month;\n      }\n      return {\n        year: year2,\n        month,\n        day: 1,\n        hour: 0,\n        minute: 0,\n        second: 0,\n        millisecond: 0,\n        dateHash: year2 + \"/\" + pad(month) + \"/01\"\n      };\n    }\n    function goToMonth(offset2) {\n      let year2 = viewModel.value.year;\n      let month = Number(viewModel.value.month) + offset2;\n      if (month === 13) {\n        month = 1;\n        year2++;\n      } else if (month === 0) {\n        month = 12;\n        year2--;\n      }\n      updateViewModel(year2, month);\n      isImmediate.value === true && emitImmediately(\"month\");\n    }\n    function goToYear(offset2) {\n      const year2 = Number(viewModel.value.year) + offset2;\n      updateViewModel(year2, viewModel.value.month);\n      isImmediate.value === true && emitImmediately(\"year\");\n    }\n    function setYear(year2) {\n      updateViewModel(year2, viewModel.value.month);\n      view.value = props4.defaultView === \"Years\" ? \"Months\" : \"Calendar\";\n      isImmediate.value === true && emitImmediately(\"year\");\n    }\n    function setMonth(month) {\n      updateViewModel(viewModel.value.year, month);\n      view.value = \"Calendar\";\n      isImmediate.value === true && emitImmediately(\"month\");\n    }\n    function toggleDate(date, monthHash) {\n      const month = daysMap.value[monthHash];\n      const fn = month !== void 0 && month.includes(date.day) === true ? removeFromModel : addToModel;\n      fn(date);\n    }\n    function getShortDate(date) {\n      return { year: date.year, month: date.month, day: date.day };\n    }\n    function updateViewModel(year2, month, time) {\n      if (minNav.value !== null && year2 <= minNav.value.year) {\n        if (month < minNav.value.month || year2 < minNav.value.year) {\n          month = minNav.value.month;\n        }\n        year2 = minNav.value.year;\n      }\n      if (maxNav.value !== null && year2 >= maxNav.value.year) {\n        if (month > maxNav.value.month || year2 > maxNav.value.year) {\n          month = maxNav.value.month;\n        }\n        year2 = maxNav.value.year;\n      }\n      if (time !== void 0) {\n        const { hour, minute, second, millisecond, timezoneOffset, timeHash } = time;\n        Object.assign(viewModel.value, { hour, minute, second, millisecond, timezoneOffset, timeHash });\n      }\n      const newHash = year2 + \"/\" + pad(month) + \"/01\";\n      if (newHash !== viewModel.value.dateHash) {\n        monthDirection.value = viewModel.value.dateHash < newHash === ($q.lang.rtl !== true) ? \"left\" : \"right\";\n        if (year2 !== viewModel.value.year) {\n          yearDirection.value = monthDirection.value;\n        }\n        nextTick6(() => {\n          startYear.value = year2 - year2 % yearsInterval - (year2 < 0 ? yearsInterval : 0);\n          Object.assign(viewModel.value, {\n            year: year2,\n            month,\n            day: 1,\n            dateHash: newHash\n          });\n        });\n      }\n    }\n    function emitValue(val, action, date) {\n      const value2 = val !== null && val.length === 1 && props4.multiple === false ? val[0] : val;\n      lastEmitValue = value2;\n      const { reason, details } = getEmitParams(action, date);\n      emit(\"update:modelValue\", value2, reason, details);\n    }\n    function emitImmediately(reason) {\n      const date = daysModel.value[0] !== void 0 && daysModel.value[0].dateHash !== null ? { ...daysModel.value[0] } : { ...viewModel.value };\n      nextTick6(() => {\n        date.year = viewModel.value.year;\n        date.month = viewModel.value.month;\n        const maxDay = props4.calendar !== \"persian\" ? new Date(date.year, date.month, 0).getDate() : jalaaliMonthLength(date.year, date.month);\n        date.day = Math.min(Math.max(1, date.day), maxDay);\n        const value2 = encodeEntry(date);\n        lastEmitValue = value2;\n        const { details } = getEmitParams(\"\", date);\n        emit(\"update:modelValue\", value2, reason, details);\n      });\n    }\n    function getEmitParams(action, date) {\n      return date.from !== void 0 ? {\n        reason: `${action}-range`,\n        details: {\n          ...getShortDate(date.target),\n          from: getShortDate(date.from),\n          to: getShortDate(date.to)\n        }\n      } : {\n        reason: `${action}-day`,\n        details: getShortDate(date)\n      };\n    }\n    function encodeEntry(date, mask2, locale2) {\n      return date.from !== void 0 ? { from: encodeObjectFn.value(date.from, mask2, locale2), to: encodeObjectFn.value(date.to, mask2, locale2) } : encodeObjectFn.value(date, mask2, locale2);\n    }\n    function addToModel(date) {\n      let value2;\n      if (props4.multiple === true) {\n        if (date.from !== void 0) {\n          const fromHash = getDayHash(date.from);\n          const toHash = getDayHash(date.to);\n          const days2 = daysModel.value.filter((day) => day.dateHash < fromHash || day.dateHash > toHash);\n          const ranges = rangeModel.value.filter(({ from, to }) => to.dateHash < fromHash || from.dateHash > toHash);\n          value2 = days2.concat(ranges).concat(date).map((entry) => encodeEntry(entry));\n        } else {\n          const model = normalizedModel.value.slice();\n          model.push(encodeEntry(date));\n          value2 = model;\n        }\n      } else {\n        value2 = encodeEntry(date);\n      }\n      emitValue(value2, \"add\", date);\n    }\n    function removeFromModel(date) {\n      if (props4.noUnset === true) return;\n      let model = null;\n      if (props4.multiple === true && Array.isArray(props4.modelValue) === true) {\n        const val = encodeEntry(date);\n        if (date.from !== void 0) {\n          model = props4.modelValue.filter(\n            (date2) => date2.from !== void 0 ? date2.from !== val.from && date2.to !== val.to : true\n          );\n        } else {\n          model = props4.modelValue.filter((date2) => date2 !== val);\n        }\n        if (model.length === 0) {\n          model = null;\n        }\n      }\n      emitValue(model, \"remove\", date);\n    }\n    function updateValue2(mask2, locale2, reason) {\n      const model = daysModel.value.concat(rangeModel.value).map((entry) => encodeEntry(entry, mask2, locale2)).filter((entry) => {\n        return entry.from !== void 0 ? entry.from.dateHash !== null && entry.to.dateHash !== null : entry.dateHash !== null;\n      });\n      emit(\"update:modelValue\", (props4.multiple === true ? model : model[0]) || null, reason);\n    }\n    function getHeader() {\n      if (props4.minimal === true) return;\n      return h38(\"div\", {\n        class: \"q-date__header \" + headerClass.value\n      }, [\n        h38(\"div\", {\n          class: \"relative-position\"\n        }, [\n          h38(Transition4, {\n            name: \"q-transition--fade\"\n          }, () => h38(\"div\", {\n            key: \"h-yr-\" + headerSubtitle.value,\n            class: \"q-date__header-subtitle q-date__header-link \" + (view.value === \"Years\" ? \"q-date__header-link--active\" : \"cursor-pointer\"),\n            tabindex: tabindex.value,\n            ...getCache(\"vY\", {\n              onClick() {\n                view.value = \"Years\";\n              },\n              onKeyup(e) {\n                e.keyCode === 13 && (view.value = \"Years\");\n              }\n            })\n          }, [headerSubtitle.value]))\n        ]),\n        h38(\"div\", {\n          class: \"q-date__header-title relative-position flex no-wrap\"\n        }, [\n          h38(\"div\", {\n            class: \"relative-position col\"\n          }, [\n            h38(Transition4, {\n              name: \"q-transition--fade\"\n            }, () => h38(\"div\", {\n              key: \"h-sub\" + headerTitle.value,\n              class: \"q-date__header-title-label q-date__header-link \" + (view.value === \"Calendar\" ? \"q-date__header-link--active\" : \"cursor-pointer\"),\n              tabindex: tabindex.value,\n              ...getCache(\"vC\", {\n                onClick() {\n                  view.value = \"Calendar\";\n                },\n                onKeyup(e) {\n                  e.keyCode === 13 && (view.value = \"Calendar\");\n                }\n              })\n            }, [headerTitle.value]))\n          ]),\n          props4.todayBtn === true ? h38(QBtn_default, {\n            class: \"q-date__header-today self-start\",\n            icon: $q.iconSet.datetime.today,\n            flat: true,\n            size: \"sm\",\n            round: true,\n            tabindex: tabindex.value,\n            onClick: setToday\n          }) : null\n        ])\n      ]);\n    }\n    function getNavigation({ label, type, key, dir, goTo, boundaries, cls }) {\n      return [\n        h38(\"div\", {\n          class: \"row items-center q-date__arrow\"\n        }, [\n          h38(QBtn_default, {\n            round: true,\n            dense: true,\n            size: \"sm\",\n            flat: true,\n            icon: dateArrow.value[0],\n            tabindex: tabindex.value,\n            disable: boundaries.prev === false,\n            ...getCache(\"go-#\" + type, { onClick() {\n              goTo(-1);\n            } })\n          })\n        ]),\n        h38(\"div\", {\n          class: \"relative-position overflow-hidden flex flex-center\" + cls\n        }, [\n          h38(Transition4, {\n            name: \"q-transition--jump-\" + dir\n          }, () => h38(\"div\", { key }, [\n            h38(QBtn_default, {\n              flat: true,\n              dense: true,\n              noCaps: true,\n              label,\n              tabindex: tabindex.value,\n              ...getCache(\"view#\" + type, { onClick: () => {\n                view.value = type;\n              } })\n            })\n          ]))\n        ]),\n        h38(\"div\", {\n          class: \"row items-center q-date__arrow\"\n        }, [\n          h38(QBtn_default, {\n            round: true,\n            dense: true,\n            size: \"sm\",\n            flat: true,\n            icon: dateArrow.value[1],\n            tabindex: tabindex.value,\n            disable: boundaries.next === false,\n            ...getCache(\"go+#\" + type, { onClick() {\n              goTo(1);\n            } })\n          })\n        ])\n      ];\n    }\n    const renderViews = {\n      Calendar: () => [\n        h38(\"div\", {\n          key: \"calendar-view\",\n          class: \"q-date__view q-date__calendar\"\n        }, [\n          h38(\"div\", {\n            class: \"q-date__navigation row items-center no-wrap\"\n          }, getNavigation({\n            label: innerLocale.value.months[viewModel.value.month - 1],\n            type: \"Months\",\n            key: viewModel.value.month,\n            dir: monthDirection.value,\n            goTo: goToMonth,\n            boundaries: navBoundaries.value.month,\n            cls: \" col\"\n          }).concat(getNavigation({\n            label: viewModel.value.year,\n            type: \"Years\",\n            key: viewModel.value.year,\n            dir: yearDirection.value,\n            goTo: goToYear,\n            boundaries: navBoundaries.value.year,\n            cls: \"\"\n          }))),\n          h38(\"div\", {\n            class: \"q-date__calendar-weekdays row items-center no-wrap\"\n          }, daysOfWeek.value.map((day) => h38(\"div\", { class: \"q-date__calendar-item\" }, [h38(\"div\", day)]))),\n          h38(\"div\", {\n            class: \"q-date__calendar-days-container relative-position overflow-hidden\"\n          }, [\n            h38(Transition4, {\n              name: \"q-transition--slide-\" + monthDirection.value\n            }, () => h38(\"div\", {\n              key: viewMonthHash.value,\n              class: \"q-date__calendar-days fit\"\n            }, days.value.map((day) => h38(\"div\", { class: day.classes }, [\n              day.in === true ? h38(\n                QBtn_default,\n                {\n                  class: day.today === true ? \"q-date__today\" : \"\",\n                  dense: true,\n                  flat: day.flat,\n                  unelevated: day.unelevated,\n                  color: day.color,\n                  textColor: day.textColor,\n                  label: day.i,\n                  tabindex: tabindex.value,\n                  ...getCache(\"day#\" + day.i, {\n                    onClick: () => {\n                      onDayClick(day.i);\n                    },\n                    onMouseover: () => {\n                      onDayMouseover(day.i);\n                    }\n                  })\n                },\n                day.event !== false ? () => h38(\"div\", { class: \"q-date__event bg-\" + day.event }) : null\n              ) : h38(\"div\", \"\" + day.i)\n            ]))))\n          ])\n        ])\n      ],\n      Months() {\n        const currentYear = viewModel.value.year === today.value.year;\n        const isDisabled = (month) => {\n          return minNav.value !== null && viewModel.value.year === minNav.value.year && minNav.value.month > month || maxNav.value !== null && viewModel.value.year === maxNav.value.year && maxNav.value.month < month;\n        };\n        const content = innerLocale.value.monthsShort.map((month, i) => {\n          const active = viewModel.value.month === i + 1;\n          return h38(\"div\", {\n            class: \"q-date__months-item flex flex-center\"\n          }, [\n            h38(QBtn_default, {\n              class: currentYear === true && today.value.month === i + 1 ? \"q-date__today\" : null,\n              flat: active !== true,\n              label: month,\n              unelevated: active,\n              color: active === true ? computedColor.value : null,\n              textColor: active === true ? computedTextColor.value : null,\n              tabindex: tabindex.value,\n              disable: isDisabled(i + 1),\n              ...getCache(\"month#\" + i, { onClick: () => {\n                setMonth(i + 1);\n              } })\n            })\n          ]);\n        });\n        props4.yearsInMonthView === true && content.unshift(\n          h38(\"div\", { class: \"row no-wrap full-width\" }, [\n            getNavigation({\n              label: viewModel.value.year,\n              type: \"Years\",\n              key: viewModel.value.year,\n              dir: yearDirection.value,\n              goTo: goToYear,\n              boundaries: navBoundaries.value.year,\n              cls: \" col\"\n            })\n          ])\n        );\n        return h38(\"div\", {\n          key: \"months-view\",\n          class: \"q-date__view q-date__months flex flex-center\"\n        }, content);\n      },\n      Years() {\n        const start = startYear.value, stop2 = start + yearsInterval, years = [];\n        const isDisabled = (year2) => {\n          return minNav.value !== null && minNav.value.year > year2 || maxNav.value !== null && maxNav.value.year < year2;\n        };\n        for (let i = start; i <= stop2; i++) {\n          const active = viewModel.value.year === i;\n          years.push(\n            h38(\"div\", {\n              class: \"q-date__years-item flex flex-center\"\n            }, [\n              h38(QBtn_default, {\n                key: \"yr\" + i,\n                class: today.value.year === i ? \"q-date__today\" : null,\n                flat: !active,\n                label: i,\n                dense: true,\n                unelevated: active,\n                color: active === true ? computedColor.value : null,\n                textColor: active === true ? computedTextColor.value : null,\n                tabindex: tabindex.value,\n                disable: isDisabled(i),\n                ...getCache(\"yr#\" + i, { onClick: () => {\n                  setYear(i);\n                } })\n              })\n            ])\n          );\n        }\n        return h38(\"div\", {\n          class: \"q-date__view q-date__years flex flex-center\"\n        }, [\n          h38(\"div\", {\n            class: \"col-auto\"\n          }, [\n            h38(QBtn_default, {\n              round: true,\n              dense: true,\n              flat: true,\n              icon: dateArrow.value[0],\n              tabindex: tabindex.value,\n              disable: isDisabled(start),\n              ...getCache(\"y-\", { onClick: () => {\n                startYear.value -= yearsInterval;\n              } })\n            })\n          ]),\n          h38(\"div\", {\n            class: \"q-date__years-content col self-stretch row items-center\"\n          }, years),\n          h38(\"div\", {\n            class: \"col-auto\"\n          }, [\n            h38(QBtn_default, {\n              round: true,\n              dense: true,\n              flat: true,\n              icon: dateArrow.value[1],\n              tabindex: tabindex.value,\n              disable: isDisabled(stop2),\n              ...getCache(\"y+\", { onClick: () => {\n                startYear.value += yearsInterval;\n              } })\n            })\n          ])\n        ]);\n      }\n    };\n    function onDayClick(dayIndex) {\n      const day = { ...viewModel.value, day: dayIndex };\n      if (props4.range === false) {\n        toggleDate(day, viewMonthHash.value);\n        return;\n      }\n      if (editRange.value === null) {\n        const dayProps = days.value.find((day2) => day2.fill !== true && day2.i === dayIndex);\n        if (props4.noUnset !== true && dayProps.range !== void 0) {\n          removeFromModel({ target: day, from: dayProps.range.from, to: dayProps.range.to });\n          return;\n        }\n        if (dayProps.selected === true) {\n          removeFromModel(day);\n          return;\n        }\n        const initHash = getDayHash(day);\n        editRange.value = {\n          init: day,\n          initHash,\n          final: day,\n          finalHash: initHash\n        };\n        emit(\"rangeStart\", getShortDate(day));\n      } else {\n        const initHash = editRange.value.initHash, finalHash = getDayHash(day), payload = initHash <= finalHash ? { from: editRange.value.init, to: day } : { from: day, to: editRange.value.init };\n        editRange.value = null;\n        addToModel(initHash === finalHash ? day : { target: day, ...payload });\n        emit(\"rangeEnd\", {\n          from: getShortDate(payload.from),\n          to: getShortDate(payload.to)\n        });\n      }\n    }\n    function onDayMouseover(dayIndex) {\n      if (editRange.value !== null) {\n        const final = { ...viewModel.value, day: dayIndex };\n        Object.assign(editRange.value, {\n          final,\n          finalHash: getDayHash(final)\n        });\n      }\n    }\n    Object.assign(proxy, {\n      setToday,\n      setView,\n      offsetCalendar,\n      setCalendarTo,\n      setEditingRange\n    });\n    return () => {\n      const content = [\n        h38(\"div\", {\n          class: \"q-date__content col relative-position\"\n        }, [\n          h38(Transition4, {\n            name: \"q-transition--fade\"\n          }, renderViews[view.value])\n        ])\n      ];\n      const def = hSlot(slots.default);\n      def !== void 0 && content.push(\n        h38(\"div\", { class: \"q-date__actions\" }, def)\n      );\n      if (props4.name !== void 0 && props4.disable !== true) {\n        injectFormInput(content, \"push\");\n      }\n      return h38(\"div\", {\n        class: classes.value,\n        ...attributes.value\n      }, [\n        getHeader(),\n        h38(\"div\", {\n          ref: blurTargetRef,\n          class: \"q-date__main col column\",\n          tabindex: -1\n        }, content)\n      ]);\n    };\n  }\n});\n\n// src/components/dialog/QDialog.js\nimport { h as h39, ref as ref21, computed as computed44, watch as watch14, onBeforeUnmount as onBeforeUnmount15, Transition as Transition5, getCurrentInstance as getCurrentInstance28 } from \"vue\";\n\n// src/composables/private.use-history/use-history.js\nimport { onBeforeUnmount as onBeforeUnmount14 } from \"vue\";\nfunction use_history_default(showing, hide, hideOnRouteChange) {\n  let historyEntry;\n  function removeFromHistory() {\n    if (historyEntry !== void 0) {\n      History_default.remove(historyEntry);\n      historyEntry = void 0;\n    }\n  }\n  onBeforeUnmount14(() => {\n    showing.value === true && removeFromHistory();\n  });\n  return {\n    removeFromHistory,\n    addToHistory() {\n      historyEntry = {\n        condition: () => hideOnRouteChange.value === true,\n        handler: hide\n      };\n      History_default.add(historyEntry);\n    }\n  };\n}\n\n// src/utils/scroll/prevent-scroll.js\nvar registered = 0;\nvar scrollPositionX;\nvar scrollPositionY;\nvar maxScrollTop;\nvar vpPendingUpdate = false;\nvar bodyLeft;\nvar bodyTop;\nvar href;\nvar closeTimer = null;\nfunction onWheel(e) {\n  if (shouldPreventScroll(e)) {\n    stopAndPrevent(e);\n  }\n}\nfunction shouldPreventScroll(e) {\n  if (e.target === document.body || e.target.classList.contains(\"q-layout__backdrop\")) {\n    return true;\n  }\n  const path = getEventPath(e), shift = e.shiftKey && !e.deltaX, scrollY = !shift && Math.abs(e.deltaX) <= Math.abs(e.deltaY), delta = shift || scrollY ? e.deltaY : e.deltaX;\n  for (let index = 0; index < path.length; index++) {\n    const el = path[index];\n    if (hasScrollbar(el, scrollY)) {\n      return scrollY ? delta < 0 && el.scrollTop === 0 ? true : delta > 0 && el.scrollTop + el.clientHeight === el.scrollHeight : delta < 0 && el.scrollLeft === 0 ? true : delta > 0 && el.scrollLeft + el.clientWidth === el.scrollWidth;\n    }\n  }\n  return true;\n}\nfunction onAppleScroll(e) {\n  if (e.target === document) {\n    document.scrollingElement.scrollTop = document.scrollingElement.scrollTop;\n  }\n}\nfunction onAppleResize(evt) {\n  if (vpPendingUpdate === true) return;\n  vpPendingUpdate = true;\n  requestAnimationFrame(() => {\n    vpPendingUpdate = false;\n    const { height: height2 } = evt.target, { clientHeight, scrollTop } = document.scrollingElement;\n    if (maxScrollTop === void 0 || height2 !== window.innerHeight) {\n      maxScrollTop = clientHeight - height2;\n      document.scrollingElement.scrollTop = scrollTop;\n    }\n    if (scrollTop > maxScrollTop) {\n      document.scrollingElement.scrollTop -= Math.ceil((scrollTop - maxScrollTop) / 8);\n    }\n  });\n}\nfunction apply(action) {\n  const body = document.body, hasViewport = window.visualViewport !== void 0;\n  if (action === \"add\") {\n    const { overflowY, overflowX } = window.getComputedStyle(body);\n    scrollPositionX = getHorizontalScrollPosition(window);\n    scrollPositionY = getVerticalScrollPosition(window);\n    bodyLeft = body.style.left;\n    bodyTop = body.style.top;\n    href = window.location.href;\n    body.style.left = `-${scrollPositionX}px`;\n    body.style.top = `-${scrollPositionY}px`;\n    if (overflowX !== \"hidden\" && (overflowX === \"scroll\" || body.scrollWidth > window.innerWidth)) {\n      body.classList.add(\"q-body--force-scrollbar-x\");\n    }\n    if (overflowY !== \"hidden\" && (overflowY === \"scroll\" || body.scrollHeight > window.innerHeight)) {\n      body.classList.add(\"q-body--force-scrollbar-y\");\n    }\n    body.classList.add(\"q-body--prevent-scroll\");\n    document.qScrollPrevented = true;\n    if (client.is.ios === true) {\n      if (hasViewport === true) {\n        window.scrollTo(0, 0);\n        window.visualViewport.addEventListener(\"resize\", onAppleResize, listenOpts.passiveCapture);\n        window.visualViewport.addEventListener(\"scroll\", onAppleResize, listenOpts.passiveCapture);\n        window.scrollTo(0, 0);\n      } else {\n        window.addEventListener(\"scroll\", onAppleScroll, listenOpts.passiveCapture);\n      }\n    }\n  }\n  if (client.is.desktop === true && client.is.mac === true) {\n    window[`${action}EventListener`](\"wheel\", onWheel, listenOpts.notPassive);\n  }\n  if (action === \"remove\") {\n    if (client.is.ios === true) {\n      if (hasViewport === true) {\n        window.visualViewport.removeEventListener(\"resize\", onAppleResize, listenOpts.passiveCapture);\n        window.visualViewport.removeEventListener(\"scroll\", onAppleResize, listenOpts.passiveCapture);\n      } else {\n        window.removeEventListener(\"scroll\", onAppleScroll, listenOpts.passiveCapture);\n      }\n    }\n    body.classList.remove(\"q-body--prevent-scroll\");\n    body.classList.remove(\"q-body--force-scrollbar-x\");\n    body.classList.remove(\"q-body--force-scrollbar-y\");\n    document.qScrollPrevented = false;\n    body.style.left = bodyLeft;\n    body.style.top = bodyTop;\n    if (window.location.href === href) {\n      window.scrollTo(scrollPositionX, scrollPositionY);\n    }\n    maxScrollTop = void 0;\n  }\n}\nfunction prevent_scroll_default(state) {\n  let action = \"add\";\n  if (state === true) {\n    registered++;\n    if (closeTimer !== null) {\n      clearTimeout(closeTimer);\n      closeTimer = null;\n      return;\n    }\n    if (registered > 1) return;\n  } else {\n    if (registered === 0) return;\n    registered--;\n    if (registered > 0) return;\n    action = \"remove\";\n    if (client.is.ios === true && client.is.nativeMobile === true) {\n      closeTimer !== null && clearTimeout(closeTimer);\n      closeTimer = setTimeout(() => {\n        apply(action);\n        closeTimer = null;\n      }, 100);\n      return;\n    }\n  }\n  apply(action);\n}\n\n// src/composables/private.use-prevent-scroll/use-prevent-scroll.js\nfunction use_prevent_scroll_default() {\n  let currentState;\n  return {\n    preventBodyScroll(state) {\n      if (state !== currentState && (currentState !== void 0 || state === true)) {\n        currentState = state;\n        prevent_scroll_default(state);\n      }\n    }\n  };\n}\n\n// src/components/dialog/QDialog.js\nvar maximizedModals = 0;\nvar positionClass = {\n  standard: \"fixed-full flex-center\",\n  top: \"fixed-top justify-center\",\n  bottom: \"fixed-bottom justify-center\",\n  right: \"fixed-right items-center\",\n  left: \"fixed-left items-center\"\n};\nvar defaultTransitions = {\n  standard: [\"scale\", \"scale\"],\n  top: [\"slide-down\", \"slide-up\"],\n  bottom: [\"slide-up\", \"slide-down\"],\n  right: [\"slide-left\", \"slide-right\"],\n  left: [\"slide-right\", \"slide-left\"]\n};\nvar QDialog_default = createComponent({\n  name: \"QDialog\",\n  inheritAttrs: false,\n  props: {\n    ...useModelToggleProps,\n    ...useTransitionProps,\n    transitionShow: String,\n    // override useTransitionProps\n    transitionHide: String,\n    // override useTransitionProps\n    persistent: Boolean,\n    autoClose: Boolean,\n    allowFocusOutside: Boolean,\n    noEscDismiss: Boolean,\n    noBackdropDismiss: Boolean,\n    noRouteDismiss: Boolean,\n    noRefocus: Boolean,\n    noFocus: Boolean,\n    noShake: Boolean,\n    seamless: Boolean,\n    maximized: Boolean,\n    fullWidth: Boolean,\n    fullHeight: Boolean,\n    square: Boolean,\n    backdropFilter: String,\n    position: {\n      type: String,\n      default: \"standard\",\n      validator: (val) => [\"standard\", \"top\", \"bottom\", \"left\", \"right\"].includes(val)\n    }\n  },\n  emits: [\n    ...useModelToggleEmits,\n    \"shake\",\n    \"click\",\n    \"escapeKey\"\n  ],\n  setup(props4, { slots, emit, attrs }) {\n    const vm2 = getCurrentInstance28();\n    const innerRef = ref21(null);\n    const showing = ref21(false);\n    const animating = ref21(false);\n    let shakeTimeout = null, refocusTarget = null, isMaximized, avoidAutoClose;\n    const hideOnRouteChange = computed44(\n      () => props4.persistent !== true && props4.noRouteDismiss !== true && props4.seamless !== true\n    );\n    const { preventBodyScroll } = use_prevent_scroll_default();\n    const { registerTimeout } = use_timeout_default();\n    const { registerTick, removeTick } = use_tick_default();\n    const { transitionProps, transitionStyle } = use_transition_default(\n      props4,\n      () => defaultTransitions[props4.position][0],\n      () => defaultTransitions[props4.position][1]\n    );\n    const backdropStyle = computed44(() => transitionStyle.value + (props4.backdropFilter !== void 0 ? `;backdrop-filter:${props4.backdropFilter};-webkit-backdrop-filter:${props4.backdropFilter}` : \"\"));\n    const { showPortal, hidePortal, portalIsAccessible, renderPortal } = use_portal_default(\n      vm2,\n      innerRef,\n      renderPortalContent,\n      \"dialog\"\n    );\n    const { hide } = use_model_toggle_default({\n      showing,\n      hideOnRouteChange,\n      handleShow,\n      handleHide,\n      processOnMount: true\n    });\n    const { addToHistory, removeFromHistory } = use_history_default(showing, hide, hideOnRouteChange);\n    const classes = computed44(\n      () => `q-dialog__inner flex no-pointer-events q-dialog__inner--${props4.maximized === true ? \"maximized\" : \"minimized\"} q-dialog__inner--${props4.position} ${positionClass[props4.position]}` + (animating.value === true ? \" q-dialog__inner--animating\" : \"\") + (props4.fullWidth === true ? \" q-dialog__inner--fullwidth\" : \"\") + (props4.fullHeight === true ? \" q-dialog__inner--fullheight\" : \"\") + (props4.square === true ? \" q-dialog__inner--square\" : \"\")\n    );\n    const useBackdrop = computed44(() => showing.value === true && props4.seamless !== true);\n    const onEvents = computed44(() => props4.autoClose === true ? { onClick: onAutoClose } : {});\n    const rootClasses = computed44(() => [\n      `q-dialog fullscreen no-pointer-events q-dialog--${useBackdrop.value === true ? \"modal\" : \"seamless\"}`,\n      attrs.class\n    ]);\n    watch14(() => props4.maximized, (state) => {\n      showing.value === true && updateMaximized(state);\n    });\n    watch14(useBackdrop, (val) => {\n      preventBodyScroll(val);\n      if (val === true) {\n        addFocusout(onFocusChange);\n        addEscapeKey(onEscapeKey);\n      } else {\n        removeFocusout(onFocusChange);\n        removeEscapeKey(onEscapeKey);\n      }\n    });\n    function handleShow(evt) {\n      addToHistory();\n      refocusTarget = props4.noRefocus === false && document.activeElement !== null ? document.activeElement : null;\n      updateMaximized(props4.maximized);\n      showPortal();\n      animating.value = true;\n      if (props4.noFocus !== true) {\n        document.activeElement !== null && document.activeElement.blur();\n        registerTick(focus);\n      } else {\n        removeTick();\n      }\n      registerTimeout(() => {\n        if (vm2.proxy.$q.platform.is.ios === true) {\n          if (props4.seamless !== true && document.activeElement) {\n            const { top, bottom } = document.activeElement.getBoundingClientRect(), { innerHeight } = window, height2 = window.visualViewport !== void 0 ? window.visualViewport.height : innerHeight;\n            if (top > 0 && bottom > height2 / 2) {\n              document.scrollingElement.scrollTop = Math.min(\n                document.scrollingElement.scrollHeight - height2,\n                bottom >= innerHeight ? Infinity : Math.ceil(document.scrollingElement.scrollTop + bottom - height2 / 2)\n              );\n            }\n            document.activeElement.scrollIntoView();\n          }\n          avoidAutoClose = true;\n          innerRef.value.click();\n          avoidAutoClose = false;\n        }\n        showPortal(true);\n        animating.value = false;\n        emit(\"show\", evt);\n      }, props4.transitionDuration);\n    }\n    function handleHide(evt) {\n      removeTick();\n      removeFromHistory();\n      cleanup(true);\n      animating.value = true;\n      hidePortal();\n      if (refocusTarget !== null) {\n        ((evt && evt.type.indexOf(\"key\") === 0 ? refocusTarget.closest('[tabindex]:not([tabindex^=\"-\"])') : void 0) || refocusTarget).focus();\n        refocusTarget = null;\n      }\n      registerTimeout(() => {\n        hidePortal(true);\n        animating.value = false;\n        emit(\"hide\", evt);\n      }, props4.transitionDuration);\n    }\n    function focus(selector) {\n      addFocusFn(() => {\n        let node = innerRef.value;\n        if (node === null) return;\n        if (selector !== void 0) {\n          const target2 = node.querySelector(selector);\n          if (target2 !== null) {\n            target2.focus({ preventScroll: true });\n            return;\n          }\n        }\n        if (node.contains(document.activeElement) !== true) {\n          node = node.querySelector(\"[autofocus][tabindex], [data-autofocus][tabindex]\") || node.querySelector(\"[autofocus] [tabindex], [data-autofocus] [tabindex]\") || node.querySelector(\"[autofocus], [data-autofocus]\") || node;\n          node.focus({ preventScroll: true });\n        }\n      });\n    }\n    function shake(focusTarget) {\n      if (focusTarget && typeof focusTarget.focus === \"function\") {\n        focusTarget.focus({ preventScroll: true });\n      } else {\n        focus();\n      }\n      emit(\"shake\");\n      const node = innerRef.value;\n      if (node !== null) {\n        node.classList.remove(\"q-animate--scale\");\n        node.classList.add(\"q-animate--scale\");\n        shakeTimeout !== null && clearTimeout(shakeTimeout);\n        shakeTimeout = setTimeout(() => {\n          shakeTimeout = null;\n          if (innerRef.value !== null) {\n            node.classList.remove(\"q-animate--scale\");\n            focus();\n          }\n        }, 170);\n      }\n    }\n    function onEscapeKey() {\n      if (props4.seamless !== true) {\n        if (props4.persistent === true || props4.noEscDismiss === true) {\n          props4.maximized !== true && props4.noShake !== true && shake();\n        } else {\n          emit(\"escapeKey\");\n          hide();\n        }\n      }\n    }\n    function cleanup(hiding) {\n      if (shakeTimeout !== null) {\n        clearTimeout(shakeTimeout);\n        shakeTimeout = null;\n      }\n      if (hiding === true || showing.value === true) {\n        updateMaximized(false);\n        if (props4.seamless !== true) {\n          preventBodyScroll(false);\n          removeFocusout(onFocusChange);\n          removeEscapeKey(onEscapeKey);\n        }\n      }\n      if (hiding !== true) {\n        refocusTarget = null;\n      }\n    }\n    function updateMaximized(active) {\n      if (active === true) {\n        if (isMaximized !== true) {\n          maximizedModals < 1 && document.body.classList.add(\"q-body--dialog\");\n          maximizedModals++;\n          isMaximized = true;\n        }\n      } else if (isMaximized === true) {\n        if (maximizedModals < 2) {\n          document.body.classList.remove(\"q-body--dialog\");\n        }\n        maximizedModals--;\n        isMaximized = false;\n      }\n    }\n    function onAutoClose(e) {\n      if (avoidAutoClose !== true) {\n        hide(e);\n        emit(\"click\", e);\n      }\n    }\n    function onBackdropClick(e) {\n      if (props4.persistent !== true && props4.noBackdropDismiss !== true) {\n        hide(e);\n      } else if (props4.noShake !== true) {\n        shake();\n      }\n    }\n    function onFocusChange(evt) {\n      if (props4.allowFocusOutside !== true && portalIsAccessible.value === true && childHasFocus(innerRef.value, evt.target) !== true) {\n        focus('[tabindex]:not([tabindex=\"-1\"])');\n      }\n    }\n    Object.assign(vm2.proxy, {\n      // expose public methods\n      focus,\n      shake,\n      // private but needed by QSelect\n      __updateRefocusTarget(target2) {\n        refocusTarget = target2 || null;\n      }\n    });\n    onBeforeUnmount15(cleanup);\n    function renderPortalContent() {\n      return h39(\"div\", {\n        role: \"dialog\",\n        \"aria-modal\": useBackdrop.value === true ? \"true\" : \"false\",\n        ...attrs,\n        class: rootClasses.value\n      }, [\n        h39(Transition5, {\n          name: \"q-transition--fade\",\n          appear: true\n        }, () => useBackdrop.value === true ? h39(\"div\", {\n          class: \"q-dialog__backdrop fixed-full\",\n          style: backdropStyle.value,\n          \"aria-hidden\": \"true\",\n          tabindex: -1,\n          onClick: onBackdropClick\n        }) : null),\n        h39(\n          Transition5,\n          transitionProps.value,\n          () => showing.value === true ? h39(\"div\", {\n            ref: innerRef,\n            class: classes.value,\n            style: transitionStyle.value,\n            tabindex: -1,\n            ...onEvents.value\n          }, hSlot(slots.default)) : null\n        )\n      ]);\n    }\n    return renderPortal;\n  }\n});\n\n// src/components/drawer/QDrawer.js\nimport { h as h40, withDirectives as withDirectives4, ref as ref22, computed as computed45, watch as watch15, onMounted as onMounted11, onBeforeUnmount as onBeforeUnmount16, nextTick as nextTick7, inject as inject2, getCurrentInstance as getCurrentInstance29 } from \"vue\";\nvar duration = 150;\nvar QDrawer_default = createComponent({\n  name: \"QDrawer\",\n  inheritAttrs: false,\n  props: {\n    ...useModelToggleProps,\n    ...useDarkProps,\n    side: {\n      type: String,\n      default: \"left\",\n      validator: (v) => [\"left\", \"right\"].includes(v)\n    },\n    width: {\n      type: Number,\n      default: 300\n    },\n    mini: Boolean,\n    miniToOverlay: Boolean,\n    miniWidth: {\n      type: Number,\n      default: 57\n    },\n    noMiniAnimation: Boolean,\n    breakpoint: {\n      type: Number,\n      default: 1023\n    },\n    showIfAbove: Boolean,\n    behavior: {\n      type: String,\n      validator: (v) => [\"default\", \"desktop\", \"mobile\"].includes(v),\n      default: \"default\"\n    },\n    bordered: Boolean,\n    elevated: Boolean,\n    overlay: Boolean,\n    persistent: Boolean,\n    noSwipeOpen: Boolean,\n    noSwipeClose: Boolean,\n    noSwipeBackdrop: Boolean\n  },\n  emits: [\n    ...useModelToggleEmits,\n    \"onLayout\",\n    \"miniState\"\n  ],\n  setup(props4, { slots, emit, attrs }) {\n    const vm2 = getCurrentInstance29();\n    const { proxy: { $q } } = vm2;\n    const isDark = use_dark_default(props4, $q);\n    const { preventBodyScroll } = use_prevent_scroll_default();\n    const { registerTimeout, removeTimeout } = use_timeout_default();\n    const $layout = inject2(layoutKey, emptyRenderFn);\n    if ($layout === emptyRenderFn) {\n      console.error(\"QDrawer needs to be child of QLayout\");\n      return emptyRenderFn;\n    }\n    let lastDesktopState, timerMini = null, layoutTotalWidthWatcher;\n    const belowBreakpoint = ref22(\n      props4.behavior === \"mobile\" || props4.behavior !== \"desktop\" && $layout.totalWidth.value <= props4.breakpoint\n    );\n    const isMini = computed45(\n      () => props4.mini === true && belowBreakpoint.value !== true\n    );\n    const size2 = computed45(() => isMini.value === true ? props4.miniWidth : props4.width);\n    const showing = ref22(\n      props4.showIfAbove === true && belowBreakpoint.value === false ? true : props4.modelValue === true\n    );\n    const hideOnRouteChange = computed45(\n      () => props4.persistent !== true && (belowBreakpoint.value === true || onScreenOverlay.value === true)\n    );\n    function handleShow(evt, noEvent) {\n      addToHistory();\n      evt !== false && $layout.animate();\n      applyPosition(0);\n      if (belowBreakpoint.value === true) {\n        const otherInstance = $layout.instances[otherSide.value];\n        if (otherInstance !== void 0 && otherInstance.belowBreakpoint === true) {\n          otherInstance.hide(false);\n        }\n        applyBackdrop(1);\n        $layout.isContainer.value !== true && preventBodyScroll(true);\n      } else {\n        applyBackdrop(0);\n        evt !== false && setScrollable(false);\n      }\n      registerTimeout(() => {\n        evt !== false && setScrollable(true);\n        noEvent !== true && emit(\"show\", evt);\n      }, duration);\n    }\n    function handleHide(evt, noEvent) {\n      removeFromHistory();\n      evt !== false && $layout.animate();\n      applyBackdrop(0);\n      applyPosition(stateDirection.value * size2.value);\n      cleanup();\n      if (noEvent !== true) {\n        registerTimeout(() => {\n          emit(\"hide\", evt);\n        }, duration);\n      } else {\n        removeTimeout();\n      }\n    }\n    const { show, hide } = use_model_toggle_default({\n      showing,\n      hideOnRouteChange,\n      handleShow,\n      handleHide\n    });\n    const { addToHistory, removeFromHistory } = use_history_default(showing, hide, hideOnRouteChange);\n    const instance = {\n      belowBreakpoint,\n      hide\n    };\n    const rightSide = computed45(() => props4.side === \"right\");\n    const stateDirection = computed45(\n      () => ($q.lang.rtl === true ? -1 : 1) * (rightSide.value === true ? 1 : -1)\n    );\n    const flagBackdropBg = ref22(0);\n    const flagPanning = ref22(false);\n    const flagMiniAnimate = ref22(false);\n    const flagContentPosition = ref22(\n      // starting with \"hidden\" for SSR\n      size2.value * stateDirection.value\n    );\n    const otherSide = computed45(() => rightSide.value === true ? \"left\" : \"right\");\n    const offset2 = computed45(() => showing.value === true && belowBreakpoint.value === false && props4.overlay === false ? props4.miniToOverlay === true ? props4.miniWidth : size2.value : 0);\n    const fixed = computed45(\n      () => props4.overlay === true || props4.miniToOverlay === true || $layout.view.value.indexOf(rightSide.value ? \"R\" : \"L\") !== -1 || $q.platform.is.ios === true && $layout.isContainer.value === true\n    );\n    const onLayout = computed45(\n      () => props4.overlay === false && showing.value === true && belowBreakpoint.value === false\n    );\n    const onScreenOverlay = computed45(\n      () => props4.overlay === true && showing.value === true && belowBreakpoint.value === false\n    );\n    const backdropClass = computed45(\n      () => \"fullscreen q-drawer__backdrop\" + (showing.value === false && flagPanning.value === false ? \" hidden\" : \"\")\n    );\n    const backdropStyle = computed45(() => ({\n      backgroundColor: `rgba(0,0,0,${flagBackdropBg.value * 0.4})`\n    }));\n    const headerSlot = computed45(() => rightSide.value === true ? $layout.rows.value.top[2] === \"r\" : $layout.rows.value.top[0] === \"l\");\n    const footerSlot = computed45(() => rightSide.value === true ? $layout.rows.value.bottom[2] === \"r\" : $layout.rows.value.bottom[0] === \"l\");\n    const aboveStyle = computed45(() => {\n      const css2 = {};\n      if ($layout.header.space === true && headerSlot.value === false) {\n        if (fixed.value === true) {\n          css2.top = `${$layout.header.offset}px`;\n        } else if ($layout.header.space === true) {\n          css2.top = `${$layout.header.size}px`;\n        }\n      }\n      if ($layout.footer.space === true && footerSlot.value === false) {\n        if (fixed.value === true) {\n          css2.bottom = `${$layout.footer.offset}px`;\n        } else if ($layout.footer.space === true) {\n          css2.bottom = `${$layout.footer.size}px`;\n        }\n      }\n      return css2;\n    });\n    const style2 = computed45(() => {\n      const style3 = {\n        width: `${size2.value}px`,\n        transform: `translateX(${flagContentPosition.value}px)`\n      };\n      return belowBreakpoint.value === true ? style3 : Object.assign(style3, aboveStyle.value);\n    });\n    const contentClass = computed45(\n      () => \"q-drawer__content fit \" + ($layout.isContainer.value !== true ? \"scroll\" : \"overflow-auto\")\n    );\n    const classes = computed45(\n      () => `q-drawer q-drawer--${props4.side}` + (flagMiniAnimate.value === true ? \" q-drawer--mini-animate\" : \"\") + (props4.bordered === true ? \" q-drawer--bordered\" : \"\") + (isDark.value === true ? \" q-drawer--dark q-dark\" : \"\") + (flagPanning.value === true ? \" no-transition\" : showing.value === true ? \"\" : \" q-layout--prevent-focus\") + (belowBreakpoint.value === true ? \" fixed q-drawer--on-top q-drawer--mobile q-drawer--top-padding\" : ` q-drawer--${isMini.value === true ? \"mini\" : \"standard\"}` + (fixed.value === true || onLayout.value !== true ? \" fixed\" : \"\") + (props4.overlay === true || props4.miniToOverlay === true ? \" q-drawer--on-top\" : \"\") + (headerSlot.value === true ? \" q-drawer--top-padding\" : \"\"))\n    );\n    const openDirective = computed45(() => {\n      const dir = $q.lang.rtl === true ? props4.side : otherSide.value;\n      return [[\n        TouchPan_default,\n        onOpenPan,\n        void 0,\n        {\n          [dir]: true,\n          mouse: true\n        }\n      ]];\n    });\n    const contentCloseDirective = computed45(() => {\n      const dir = $q.lang.rtl === true ? otherSide.value : props4.side;\n      return [[\n        TouchPan_default,\n        onClosePan,\n        void 0,\n        {\n          [dir]: true,\n          mouse: true\n        }\n      ]];\n    });\n    const backdropCloseDirective = computed45(() => {\n      const dir = $q.lang.rtl === true ? otherSide.value : props4.side;\n      return [[\n        TouchPan_default,\n        onClosePan,\n        void 0,\n        {\n          [dir]: true,\n          mouse: true,\n          mouseAllDir: true\n        }\n      ]];\n    });\n    function updateBelowBreakpoint() {\n      updateLocal(belowBreakpoint, props4.behavior === \"mobile\" || props4.behavior !== \"desktop\" && $layout.totalWidth.value <= props4.breakpoint);\n    }\n    watch15(belowBreakpoint, (val) => {\n      if (val === true) {\n        lastDesktopState = showing.value;\n        showing.value === true && hide(false);\n      } else if (props4.overlay === false && props4.behavior !== \"mobile\" && lastDesktopState !== false) {\n        if (showing.value === true) {\n          applyPosition(0);\n          applyBackdrop(0);\n          cleanup();\n        } else {\n          show(false);\n        }\n      }\n    });\n    watch15(() => props4.side, (newSide, oldSide) => {\n      if ($layout.instances[oldSide] === instance) {\n        $layout.instances[oldSide] = void 0;\n        $layout[oldSide].space = false;\n        $layout[oldSide].offset = 0;\n      }\n      $layout.instances[newSide] = instance;\n      $layout[newSide].size = size2.value;\n      $layout[newSide].space = onLayout.value;\n      $layout[newSide].offset = offset2.value;\n    });\n    watch15($layout.totalWidth, () => {\n      if ($layout.isContainer.value === true || document.qScrollPrevented !== true) {\n        updateBelowBreakpoint();\n      }\n    });\n    watch15(\n      () => props4.behavior + props4.breakpoint,\n      updateBelowBreakpoint\n    );\n    watch15($layout.isContainer, (val) => {\n      showing.value === true && preventBodyScroll(val !== true);\n      val === true && updateBelowBreakpoint();\n    });\n    watch15($layout.scrollbarWidth, () => {\n      applyPosition(showing.value === true ? 0 : void 0);\n    });\n    watch15(offset2, (val) => {\n      updateLayout(\"offset\", val);\n    });\n    watch15(onLayout, (val) => {\n      emit(\"onLayout\", val);\n      updateLayout(\"space\", val);\n    });\n    watch15(rightSide, () => {\n      applyPosition();\n    });\n    watch15(size2, (val) => {\n      applyPosition();\n      updateSizeOnLayout(props4.miniToOverlay, val);\n    });\n    watch15(() => props4.miniToOverlay, (val) => {\n      updateSizeOnLayout(val, size2.value);\n    });\n    watch15(() => $q.lang.rtl, () => {\n      applyPosition();\n    });\n    watch15(() => props4.mini, () => {\n      if (props4.noMiniAnimation) return;\n      if (props4.modelValue === true) {\n        animateMini();\n        $layout.animate();\n      }\n    });\n    watch15(isMini, (val) => {\n      emit(\"miniState\", val);\n    });\n    function applyPosition(position2) {\n      if (position2 === void 0) {\n        nextTick7(() => {\n          position2 = showing.value === true ? 0 : size2.value;\n          applyPosition(stateDirection.value * position2);\n        });\n      } else {\n        if ($layout.isContainer.value === true && rightSide.value === true && (belowBreakpoint.value === true || Math.abs(position2) === size2.value)) {\n          position2 += stateDirection.value * $layout.scrollbarWidth.value;\n        }\n        flagContentPosition.value = position2;\n      }\n    }\n    function applyBackdrop(x) {\n      flagBackdropBg.value = x;\n    }\n    function setScrollable(v) {\n      const action = v === true ? \"remove\" : $layout.isContainer.value !== true ? \"add\" : \"\";\n      action !== \"\" && document.body.classList[action](\"q-body--drawer-toggle\");\n    }\n    function animateMini() {\n      timerMini !== null && clearTimeout(timerMini);\n      if (vm2.proxy && vm2.proxy.$el) {\n        vm2.proxy.$el.classList.add(\"q-drawer--mini-animate\");\n      }\n      flagMiniAnimate.value = true;\n      timerMini = setTimeout(() => {\n        timerMini = null;\n        flagMiniAnimate.value = false;\n        if (vm2 && vm2.proxy && vm2.proxy.$el) {\n          vm2.proxy.$el.classList.remove(\"q-drawer--mini-animate\");\n        }\n      }, 150);\n    }\n    function onOpenPan(evt) {\n      if (showing.value !== false) {\n        return;\n      }\n      const width3 = size2.value, position2 = between(evt.distance.x, 0, width3);\n      if (evt.isFinal === true) {\n        const opened = position2 >= Math.min(75, width3);\n        if (opened === true) {\n          show();\n        } else {\n          $layout.animate();\n          applyBackdrop(0);\n          applyPosition(stateDirection.value * width3);\n        }\n        flagPanning.value = false;\n        return;\n      }\n      applyPosition(\n        ($q.lang.rtl === true ? rightSide.value !== true : rightSide.value) ? Math.max(width3 - position2, 0) : Math.min(0, position2 - width3)\n      );\n      applyBackdrop(\n        between(position2 / width3, 0, 1)\n      );\n      if (evt.isFirst === true) {\n        flagPanning.value = true;\n      }\n    }\n    function onClosePan(evt) {\n      if (showing.value !== true) {\n        return;\n      }\n      const width3 = size2.value, dir = evt.direction === props4.side, position2 = ($q.lang.rtl === true ? dir !== true : dir) ? between(evt.distance.x, 0, width3) : 0;\n      if (evt.isFinal === true) {\n        const opened = Math.abs(position2) < Math.min(75, width3);\n        if (opened === true) {\n          $layout.animate();\n          applyBackdrop(1);\n          applyPosition(0);\n        } else {\n          hide();\n        }\n        flagPanning.value = false;\n        return;\n      }\n      applyPosition(stateDirection.value * position2);\n      applyBackdrop(between(1 - position2 / width3, 0, 1));\n      if (evt.isFirst === true) {\n        flagPanning.value = true;\n      }\n    }\n    function cleanup() {\n      preventBodyScroll(false);\n      setScrollable(true);\n    }\n    function updateLayout(prop, val) {\n      $layout.update(props4.side, prop, val);\n    }\n    function updateLocal(prop, val) {\n      if (prop.value !== val) {\n        prop.value = val;\n      }\n    }\n    function updateSizeOnLayout(miniToOverlay, size3) {\n      updateLayout(\"size\", miniToOverlay === true ? props4.miniWidth : size3);\n    }\n    $layout.instances[props4.side] = instance;\n    updateSizeOnLayout(props4.miniToOverlay, size2.value);\n    updateLayout(\"space\", onLayout.value);\n    updateLayout(\"offset\", offset2.value);\n    if (props4.showIfAbove === true && props4.modelValue !== true && showing.value === true && props4[\"onUpdate:modelValue\"] !== void 0) {\n      emit(\"update:modelValue\", true);\n    }\n    onMounted11(() => {\n      emit(\"onLayout\", onLayout.value);\n      emit(\"miniState\", isMini.value);\n      lastDesktopState = props4.showIfAbove === true;\n      const fn = () => {\n        const action = showing.value === true ? handleShow : handleHide;\n        action(false, true);\n      };\n      if ($layout.totalWidth.value !== 0) {\n        nextTick7(fn);\n        return;\n      }\n      layoutTotalWidthWatcher = watch15($layout.totalWidth, () => {\n        layoutTotalWidthWatcher();\n        layoutTotalWidthWatcher = void 0;\n        if (showing.value === false && props4.showIfAbove === true && belowBreakpoint.value === false) {\n          show(false);\n        } else {\n          fn();\n        }\n      });\n    });\n    onBeforeUnmount16(() => {\n      layoutTotalWidthWatcher !== void 0 && layoutTotalWidthWatcher();\n      if (timerMini !== null) {\n        clearTimeout(timerMini);\n        timerMini = null;\n      }\n      showing.value === true && cleanup();\n      if ($layout.instances[props4.side] === instance) {\n        $layout.instances[props4.side] = void 0;\n        updateLayout(\"size\", 0);\n        updateLayout(\"offset\", 0);\n        updateLayout(\"space\", false);\n      }\n    });\n    return () => {\n      const child = [];\n      if (belowBreakpoint.value === true) {\n        props4.noSwipeOpen === false && child.push(\n          withDirectives4(\n            h40(\"div\", {\n              key: \"open\",\n              class: `q-drawer__opener fixed-${props4.side}`,\n              \"aria-hidden\": \"true\"\n            }),\n            openDirective.value\n          )\n        );\n        child.push(\n          hDir(\n            \"div\",\n            {\n              ref: \"backdrop\",\n              class: backdropClass.value,\n              style: backdropStyle.value,\n              \"aria-hidden\": \"true\",\n              onClick: hide\n            },\n            void 0,\n            \"backdrop\",\n            props4.noSwipeBackdrop !== true && showing.value === true,\n            () => backdropCloseDirective.value\n          )\n        );\n      }\n      const mini = isMini.value === true && slots.mini !== void 0;\n      const content = [\n        h40(\n          \"div\",\n          {\n            ...attrs,\n            key: \"\" + mini,\n            // required otherwise Vue will not diff correctly\n            class: [\n              contentClass.value,\n              attrs.class\n            ]\n          },\n          mini === true ? slots.mini() : hSlot(slots.default)\n        )\n      ];\n      if (props4.elevated === true && showing.value === true) {\n        content.push(\n          h40(\"div\", {\n            class: \"q-layout__shadow absolute-full overflow-hidden no-pointer-events\"\n          })\n        );\n      }\n      child.push(\n        hDir(\n          \"aside\",\n          { ref: \"content\", class: classes.value, style: style2.value },\n          content,\n          \"contentclose\",\n          props4.noSwipeClose !== true && belowBreakpoint.value === true,\n          () => contentCloseDirective.value\n        )\n      );\n      return h40(\"div\", { class: \"q-drawer-container\" }, child);\n    };\n  }\n});\n\n// src/components/editor/QEditor.js\nimport { h as h45, ref as ref26, computed as computed49, watch as watch17, onMounted as onMounted12, onBeforeUnmount as onBeforeUnmount18, nextTick as nextTick8, getCurrentInstance as getCurrentInstance33 } from \"vue\";\n\n// src/components/editor/editor-caret.js\nfunction getBlockElement(el, parent) {\n  if (parent && el === parent) {\n    return null;\n  }\n  const nodeName = el.nodeName.toLowerCase();\n  if ([\"div\", \"li\", \"ul\", \"ol\", \"blockquote\"].includes(nodeName) === true) {\n    return el;\n  }\n  const style2 = window.getComputedStyle ? window.getComputedStyle(el) : el.currentStyle, display = style2.display;\n  if (display === \"block\" || display === \"table\") {\n    return el;\n  }\n  return getBlockElement(el.parentNode);\n}\nfunction isChildOf(el, parent, orSame) {\n  return !el || el === document.body ? false : orSame === true && el === parent || (parent === document ? document.body : parent).contains(el.parentNode);\n}\nfunction createRange(node, chars, range) {\n  if (!range) {\n    range = document.createRange();\n    range.selectNode(node);\n    range.setStart(node, 0);\n  }\n  if (chars.count === 0) {\n    range.setEnd(node, chars.count);\n  } else if (chars.count > 0) {\n    if (node.nodeType === Node.TEXT_NODE) {\n      if (node.textContent.length < chars.count) {\n        chars.count -= node.textContent.length;\n      } else {\n        range.setEnd(node, chars.count);\n        chars.count = 0;\n      }\n    } else {\n      for (let lp = 0; chars.count !== 0 && lp < node.childNodes.length; lp++) {\n        range = createRange(node.childNodes[lp], chars, range);\n      }\n    }\n  }\n  return range;\n}\nvar urlRegex = /^https?:\\/\\//;\nvar Caret = class {\n  constructor(el, eVm) {\n    this.el = el;\n    this.eVm = eVm;\n    this._range = null;\n  }\n  get selection() {\n    if (this.el) {\n      const sel = document.getSelection();\n      if (isChildOf(sel.anchorNode, this.el, true) && isChildOf(sel.focusNode, this.el, true)) {\n        return sel;\n      }\n    }\n    return null;\n  }\n  get hasSelection() {\n    return this.selection !== null ? this.selection.toString().length !== 0 : false;\n  }\n  get range() {\n    const sel = this.selection;\n    if (sel !== null && sel.rangeCount) {\n      return sel.getRangeAt(0);\n    }\n    return this._range;\n  }\n  get parent() {\n    const range = this.range;\n    if (range !== null) {\n      const node = range.startContainer;\n      return node.nodeType === document.ELEMENT_NODE ? node : node.parentNode;\n    }\n    return null;\n  }\n  get blockParent() {\n    const parent = this.parent;\n    if (parent !== null) {\n      return getBlockElement(parent, this.el);\n    }\n    return null;\n  }\n  save(range = this.range) {\n    if (range !== null) {\n      this._range = range;\n    }\n  }\n  restore(range = this._range) {\n    const r = document.createRange(), sel = document.getSelection();\n    if (range !== null) {\n      r.setStart(range.startContainer, range.startOffset);\n      r.setEnd(range.endContainer, range.endOffset);\n      sel.removeAllRanges();\n      sel.addRange(r);\n    } else {\n      sel.selectAllChildren(this.el);\n      sel.collapseToEnd();\n    }\n  }\n  savePosition() {\n    let charCount = -1, node;\n    const selection = document.getSelection(), parentEl = this.el.parentNode;\n    if (selection.focusNode && isChildOf(selection.focusNode, parentEl)) {\n      node = selection.focusNode;\n      charCount = selection.focusOffset;\n      while (node && node !== parentEl) {\n        if (node !== this.el && node.previousSibling) {\n          node = node.previousSibling;\n          charCount += node.textContent.length;\n        } else {\n          node = node.parentNode;\n        }\n      }\n    }\n    this.savedPos = charCount;\n  }\n  restorePosition(length = 0) {\n    if (this.savedPos > 0 && this.savedPos < length) {\n      const selection = window.getSelection(), range = createRange(this.el, { count: this.savedPos });\n      if (range) {\n        range.collapse(false);\n        selection.removeAllRanges();\n        selection.addRange(range);\n      }\n    }\n  }\n  hasParent(name2, spanLevel) {\n    const el = spanLevel ? this.parent : this.blockParent;\n    return el !== null ? el.nodeName.toLowerCase() === name2.toLowerCase() : false;\n  }\n  hasParents(list, recursive, el = this.parent) {\n    if (el === null) {\n      return false;\n    }\n    if (list.includes(el.nodeName.toLowerCase()) === true) {\n      return true;\n    }\n    return recursive === true ? this.hasParents(list, recursive, el.parentNode) : false;\n  }\n  is(cmd, param) {\n    if (this.selection === null) {\n      return false;\n    }\n    switch (cmd) {\n      case \"formatBlock\":\n        return param === \"DIV\" && this.parent === this.el || this.hasParent(param, param === \"PRE\");\n      case \"link\":\n        return this.hasParent(\"A\", true);\n      case \"fontSize\":\n        return document.queryCommandValue(cmd) === param;\n      case \"fontName\":\n        const res = document.queryCommandValue(cmd);\n        return res === `\"${param}\"` || res === param;\n      case \"fullscreen\":\n        return this.eVm.inFullscreen.value;\n      case \"viewsource\":\n        return this.eVm.isViewingSource.value;\n      case void 0:\n        return false;\n      default:\n        const state = document.queryCommandState(cmd);\n        return param !== void 0 ? state === param : state;\n    }\n  }\n  getParentAttribute(attrib) {\n    if (this.parent !== null) {\n      return this.parent.getAttribute(attrib);\n    }\n    return null;\n  }\n  can(name2) {\n    if (name2 === \"outdent\") {\n      return this.hasParents([\"blockquote\", \"li\"], true);\n    }\n    if (name2 === \"indent\") {\n      return this.hasParents([\"li\"], true);\n    }\n    if (name2 === \"link\") {\n      return this.selection !== null || this.is(\"link\");\n    }\n  }\n  apply(cmd, param, done = noop) {\n    if (cmd === \"formatBlock\") {\n      if ([\"BLOCKQUOTE\", \"H1\", \"H2\", \"H3\", \"H4\", \"H5\", \"H6\"].includes(param) && this.is(cmd, param)) {\n        cmd = \"outdent\";\n        param = null;\n      }\n      if (param === \"PRE\" && this.is(cmd, \"PRE\")) {\n        param = \"P\";\n      }\n    } else if (cmd === \"print\") {\n      done();\n      const win = window.open();\n      win.document.write(`\n        <!doctype html>\n        <html>\n          <head>\n            <title>Print - ${document.title}</title>\n          </head>\n          <body>\n            <div>${this.el.innerHTML}</div>\n          </body>\n        </html>\n      `);\n      win.print();\n      win.close();\n      return;\n    } else if (cmd === \"link\") {\n      const link = this.getParentAttribute(\"href\");\n      if (link === null) {\n        const selection = this.selectWord(this.selection);\n        const url = selection ? selection.toString() : \"\";\n        if (!url.length && (!this.range || !this.range.cloneContents().querySelector(\"img\"))) return;\n        this.eVm.editLinkUrl.value = urlRegex.test(url) ? url : \"https://\";\n        document.execCommand(\"createLink\", false, this.eVm.editLinkUrl.value);\n        this.save(selection.getRangeAt(0));\n      } else {\n        this.eVm.editLinkUrl.value = link;\n        this.range.selectNodeContents(this.parent);\n        this.save();\n      }\n      return;\n    } else if (cmd === \"fullscreen\") {\n      this.eVm.toggleFullscreen();\n      done();\n      return;\n    } else if (cmd === \"viewsource\") {\n      this.eVm.isViewingSource.value = this.eVm.isViewingSource.value === false;\n      this.eVm.setContent(this.eVm.props.modelValue);\n      done();\n      return;\n    }\n    document.execCommand(cmd, false, param);\n    done();\n  }\n  selectWord(sel) {\n    if (sel === null || sel.isCollapsed !== true || /* IE 11 */\n    sel.modify === void 0) {\n      return sel;\n    }\n    const range = document.createRange();\n    range.setStart(sel.anchorNode, sel.anchorOffset);\n    range.setEnd(sel.focusNode, sel.focusOffset);\n    const direction = range.collapsed ? [\"backward\", \"forward\"] : [\"forward\", \"backward\"];\n    range.detach();\n    const endNode = sel.focusNode, endOffset = sel.focusOffset;\n    sel.collapse(sel.anchorNode, sel.anchorOffset);\n    sel.modify(\"move\", direction[0], \"character\");\n    sel.modify(\"move\", direction[1], \"word\");\n    sel.extend(endNode, endOffset);\n    sel.modify(\"extend\", direction[1], \"character\");\n    sel.modify(\"extend\", direction[0], \"word\");\n    return sel;\n  }\n};\n\n// src/components/editor/editor-utils.js\nimport { h as h44 } from \"vue\";\n\n// src/components/tooltip/QTooltip.js\nimport { h as h41, ref as ref23, computed as computed46, watch as watch16, onBeforeUnmount as onBeforeUnmount17, Transition as Transition6, getCurrentInstance as getCurrentInstance30 } from \"vue\";\nvar QTooltip_default = createComponent({\n  name: \"QTooltip\",\n  inheritAttrs: false,\n  props: {\n    ...useAnchorStaticProps,\n    ...useModelToggleProps,\n    ...useTransitionProps,\n    maxHeight: {\n      type: String,\n      default: null\n    },\n    maxWidth: {\n      type: String,\n      default: null\n    },\n    transitionShow: {\n      ...useTransitionProps.transitionShow,\n      default: \"jump-down\"\n    },\n    transitionHide: {\n      ...useTransitionProps.transitionHide,\n      default: \"jump-up\"\n    },\n    anchor: {\n      type: String,\n      default: \"bottom middle\",\n      validator: validatePosition\n    },\n    self: {\n      type: String,\n      default: \"top middle\",\n      validator: validatePosition\n    },\n    offset: {\n      type: Array,\n      default: () => [14, 14],\n      validator: validateOffset\n    },\n    scrollTarget: scrollTargetProp,\n    delay: {\n      type: Number,\n      default: 0\n    },\n    hideDelay: {\n      type: Number,\n      default: 0\n    },\n    persistent: Boolean\n  },\n  emits: [\n    ...useModelToggleEmits\n  ],\n  setup(props4, { slots, emit, attrs }) {\n    let unwatchPosition, observer;\n    const vm2 = getCurrentInstance30();\n    const { proxy: { $q } } = vm2;\n    const innerRef = ref23(null);\n    const showing = ref23(false);\n    const anchorOrigin = computed46(() => parsePosition(props4.anchor, $q.lang.rtl));\n    const selfOrigin = computed46(() => parsePosition(props4.self, $q.lang.rtl));\n    const hideOnRouteChange = computed46(() => props4.persistent !== true);\n    const { registerTick, removeTick } = use_tick_default();\n    const { registerTimeout } = use_timeout_default();\n    const { transitionProps, transitionStyle } = use_transition_default(props4);\n    const { localScrollTarget, changeScrollEvent, unconfigureScrollTarget } = use_scroll_target_default(props4, configureScrollTarget);\n    const { anchorEl, canShow, anchorEvents } = use_anchor_default({ showing, configureAnchorEl });\n    const { show, hide } = use_model_toggle_default({\n      showing,\n      canShow,\n      handleShow,\n      handleHide,\n      hideOnRouteChange,\n      processOnMount: true\n    });\n    Object.assign(anchorEvents, { delayShow, delayHide });\n    const { showPortal, hidePortal, renderPortal } = use_portal_default(vm2, innerRef, renderPortalContent, \"tooltip\");\n    if ($q.platform.is.mobile === true) {\n      const clickOutsideProps = {\n        anchorEl,\n        innerRef,\n        onClickOutside(e) {\n          hide(e);\n          if (e.target.classList.contains(\"q-dialog__backdrop\")) {\n            stopAndPrevent(e);\n          }\n          return true;\n        }\n      };\n      const hasClickOutside = computed46(\n        () => (\n          // it doesn't has external model\n          // (null is the default value)\n          props4.modelValue === null && props4.persistent !== true && showing.value === true\n        )\n      );\n      watch16(hasClickOutside, (val) => {\n        const fn = val === true ? addClickOutside : removeClickOutside;\n        fn(clickOutsideProps);\n      });\n      onBeforeUnmount17(() => {\n        removeClickOutside(clickOutsideProps);\n      });\n    }\n    function handleShow(evt) {\n      showPortal();\n      registerTick(() => {\n        observer = new MutationObserver(() => updatePosition());\n        observer.observe(innerRef.value, { attributes: false, childList: true, characterData: true, subtree: true });\n        updatePosition();\n        configureScrollTarget();\n      });\n      if (unwatchPosition === void 0) {\n        unwatchPosition = watch16(\n          () => $q.screen.width + \"|\" + $q.screen.height + \"|\" + props4.self + \"|\" + props4.anchor + \"|\" + $q.lang.rtl,\n          updatePosition\n        );\n      }\n      registerTimeout(() => {\n        showPortal(true);\n        emit(\"show\", evt);\n      }, props4.transitionDuration);\n    }\n    function handleHide(evt) {\n      removeTick();\n      hidePortal();\n      anchorCleanup();\n      registerTimeout(() => {\n        hidePortal(true);\n        emit(\"hide\", evt);\n      }, props4.transitionDuration);\n    }\n    function anchorCleanup() {\n      if (observer !== void 0) {\n        observer.disconnect();\n        observer = void 0;\n      }\n      if (unwatchPosition !== void 0) {\n        unwatchPosition();\n        unwatchPosition = void 0;\n      }\n      unconfigureScrollTarget();\n      cleanEvt(anchorEvents, \"tooltipTemp\");\n    }\n    function updatePosition() {\n      setPosition({\n        targetEl: innerRef.value,\n        offset: props4.offset,\n        anchorEl: anchorEl.value,\n        anchorOrigin: anchorOrigin.value,\n        selfOrigin: selfOrigin.value,\n        maxHeight: props4.maxHeight,\n        maxWidth: props4.maxWidth\n      });\n    }\n    function delayShow(evt) {\n      if ($q.platform.is.mobile === true) {\n        clearSelection();\n        document.body.classList.add(\"non-selectable\");\n        const target2 = anchorEl.value;\n        const evts = [\"touchmove\", \"touchcancel\", \"touchend\", \"click\"].map((e) => [target2, e, \"delayHide\", \"passiveCapture\"]);\n        addEvt(anchorEvents, \"tooltipTemp\", evts);\n      }\n      registerTimeout(() => {\n        show(evt);\n      }, props4.delay);\n    }\n    function delayHide(evt) {\n      if ($q.platform.is.mobile === true) {\n        cleanEvt(anchorEvents, \"tooltipTemp\");\n        clearSelection();\n        setTimeout(() => {\n          document.body.classList.remove(\"non-selectable\");\n        }, 10);\n      }\n      registerTimeout(() => {\n        hide(evt);\n      }, props4.hideDelay);\n    }\n    function configureAnchorEl() {\n      if (props4.noParentEvent === true || anchorEl.value === null) return;\n      const evts = $q.platform.is.mobile === true ? [\n        [anchorEl.value, \"touchstart\", \"delayShow\", \"passive\"]\n      ] : [\n        [anchorEl.value, \"mouseenter\", \"delayShow\", \"passive\"],\n        [anchorEl.value, \"mouseleave\", \"delayHide\", \"passive\"]\n      ];\n      addEvt(anchorEvents, \"anchor\", evts);\n    }\n    function configureScrollTarget() {\n      if (anchorEl.value !== null || props4.scrollTarget !== void 0) {\n        localScrollTarget.value = getScrollTarget(anchorEl.value, props4.scrollTarget);\n        const fn = props4.noParentEvent === true ? updatePosition : hide;\n        changeScrollEvent(localScrollTarget.value, fn);\n      }\n    }\n    function getTooltipContent() {\n      return showing.value === true ? h41(\"div\", {\n        ...attrs,\n        ref: innerRef,\n        class: [\n          \"q-tooltip q-tooltip--style q-position-engine no-pointer-events\",\n          attrs.class\n        ],\n        style: [\n          attrs.style,\n          transitionStyle.value\n        ],\n        role: \"tooltip\"\n      }, hSlot(slots.default)) : null;\n    }\n    function renderPortalContent() {\n      return h41(Transition6, transitionProps.value, getTooltipContent);\n    }\n    onBeforeUnmount17(anchorCleanup);\n    Object.assign(vm2.proxy, { updatePosition });\n    return renderPortal;\n  }\n});\n\n// src/components/item/QItem.js\nimport { h as h42, ref as ref24, computed as computed47, getCurrentInstance as getCurrentInstance31 } from \"vue\";\nvar QItem_default = createComponent({\n  name: \"QItem\",\n  props: {\n    ...useDarkProps,\n    ...useRouterLinkProps,\n    tag: {\n      type: String,\n      default: \"div\"\n    },\n    active: {\n      type: Boolean,\n      default: null\n    },\n    clickable: Boolean,\n    dense: Boolean,\n    insetLevel: Number,\n    tabindex: [String, Number],\n    focused: Boolean,\n    manualFocus: Boolean\n  },\n  emits: [\"click\", \"keyup\"],\n  setup(props4, { slots, emit }) {\n    const { proxy: { $q } } = getCurrentInstance31();\n    const isDark = use_dark_default(props4, $q);\n    const { hasLink, linkAttrs, linkClass, linkTag, navigateOnClick } = use_router_link_default();\n    const rootRef = ref24(null);\n    const blurTargetRef = ref24(null);\n    const isActionable = computed47(\n      () => props4.clickable === true || hasLink.value === true || props4.tag === \"label\"\n    );\n    const isClickable = computed47(\n      () => props4.disable !== true && isActionable.value === true\n    );\n    const classes = computed47(\n      () => \"q-item q-item-type row no-wrap\" + (props4.dense === true ? \" q-item--dense\" : \"\") + (isDark.value === true ? \" q-item--dark\" : \"\") + (hasLink.value === true && props4.active === null ? linkClass.value : props4.active === true ? ` q-item--active${props4.activeClass !== void 0 ? ` ${props4.activeClass}` : \"\"}` : \"\") + (props4.disable === true ? \" disabled\" : \"\") + (isClickable.value === true ? \" q-item--clickable q-link cursor-pointer \" + (props4.manualFocus === true ? \"q-manual-focusable\" : \"q-focusable q-hoverable\") + (props4.focused === true ? \" q-manual-focusable--focused\" : \"\") : \"\")\n    );\n    const style2 = computed47(() => {\n      if (props4.insetLevel === void 0) {\n        return null;\n      }\n      const dir = $q.lang.rtl === true ? \"Right\" : \"Left\";\n      return {\n        [\"padding\" + dir]: 16 + props4.insetLevel * 56 + \"px\"\n      };\n    });\n    function onClick(e) {\n      if (isClickable.value === true) {\n        if (blurTargetRef.value !== null) {\n          if (e.qKeyEvent !== true && document.activeElement === rootRef.value) {\n            blurTargetRef.value.focus();\n          } else if (document.activeElement === blurTargetRef.value) {\n            rootRef.value.focus();\n          }\n        }\n        navigateOnClick(e);\n      }\n    }\n    function onKeyup2(e) {\n      if (isClickable.value === true && isKeyCode(e, [13, 32]) === true) {\n        stopAndPrevent(e);\n        e.qKeyEvent = true;\n        const evt = new MouseEvent(\"click\", e);\n        evt.qKeyEvent = true;\n        rootRef.value.dispatchEvent(evt);\n      }\n      emit(\"keyup\", e);\n    }\n    function getContent() {\n      const child = hUniqueSlot(slots.default, []);\n      isClickable.value === true && child.unshift(\n        h42(\"div\", { class: \"q-focus-helper\", tabindex: -1, ref: blurTargetRef })\n      );\n      return child;\n    }\n    return () => {\n      const data = {\n        ref: rootRef,\n        class: classes.value,\n        style: style2.value,\n        role: \"listitem\",\n        onClick,\n        onKeyup: onKeyup2\n      };\n      if (isClickable.value === true) {\n        data.tabindex = props4.tabindex || \"0\";\n        Object.assign(data, linkAttrs.value);\n      } else if (isActionable.value === true) {\n        data[\"aria-disabled\"] = \"true\";\n      }\n      return h42(\n        linkTag.value,\n        data,\n        getContent()\n      );\n    };\n  }\n});\n\n// src/components/item/QItemSection.js\nimport { h as h43, computed as computed48 } from \"vue\";\nvar QItemSection_default = createComponent({\n  name: \"QItemSection\",\n  props: {\n    avatar: Boolean,\n    thumbnail: Boolean,\n    side: Boolean,\n    top: Boolean,\n    noWrap: Boolean\n  },\n  setup(props4, { slots }) {\n    const classes = computed48(\n      () => `q-item__section column q-item__section--${props4.avatar === true || props4.side === true || props4.thumbnail === true ? \"side\" : \"main\"}` + (props4.top === true ? \" q-item__section--top justify-start\" : \" justify-center\") + (props4.avatar === true ? \" q-item__section--avatar\" : \"\") + (props4.thumbnail === true ? \" q-item__section--thumbnail\" : \"\") + (props4.noWrap === true ? \" q-item__section--nowrap\" : \"\")\n    );\n    return () => h43(\"div\", { class: classes.value }, hSlot(slots.default));\n  }\n});\n\n// src/components/editor/editor-utils.js\nfunction run(e, btn, eVm) {\n  if (btn.handler) {\n    btn.handler(e, eVm, eVm.caret);\n  } else {\n    eVm.runCmd(btn.cmd, btn.param);\n  }\n}\nfunction getGroup(children) {\n  return h44(\"div\", { class: \"q-editor__toolbar-group\" }, children);\n}\nfunction getBtn(eVm, btn, clickHandler, active = false) {\n  const toggled = active || (btn.type === \"toggle\" ? btn.toggled ? btn.toggled(eVm) : btn.cmd && eVm.caret.is(btn.cmd, btn.param) : false), child = [];\n  if (btn.tip && eVm.$q.platform.is.desktop) {\n    const Key = btn.key ? h44(\"div\", [\n      h44(\"small\", `(CTRL + ${String.fromCharCode(btn.key)})`)\n    ]) : null;\n    child.push(\n      h44(QTooltip_default, { delay: 1e3 }, () => [\n        h44(\"div\", { innerHTML: btn.tip }),\n        Key\n      ])\n    );\n  }\n  return h44(QBtn_default, {\n    ...eVm.buttonProps.value,\n    icon: btn.icon !== null ? btn.icon : void 0,\n    color: toggled ? btn.toggleColor || eVm.props.toolbarToggleColor : btn.color || eVm.props.toolbarColor,\n    textColor: toggled && !eVm.props.toolbarPush ? null : btn.textColor || eVm.props.toolbarTextColor,\n    label: btn.label,\n    disable: btn.disable ? typeof btn.disable === \"function\" ? btn.disable(eVm) : true : false,\n    size: \"sm\",\n    onClick(e) {\n      clickHandler && clickHandler();\n      run(e, btn, eVm);\n    }\n  }, () => child);\n}\nfunction getDropdown(eVm, btn) {\n  const onlyIcons = btn.list === \"only-icons\";\n  let label = btn.label, icon = btn.icon !== null ? btn.icon : void 0, contentClass, Items;\n  function closeDropdown() {\n    Dropdown.component.proxy.hide();\n  }\n  if (onlyIcons) {\n    Items = btn.options.map((btn2) => {\n      const active = btn2.type === void 0 ? eVm.caret.is(btn2.cmd, btn2.param) : false;\n      if (active) {\n        label = btn2.tip;\n        icon = btn2.icon !== null ? btn2.icon : void 0;\n      }\n      return getBtn(eVm, btn2, closeDropdown, active);\n    });\n    contentClass = eVm.toolbarBackgroundClass.value;\n    Items = [\n      getGroup(Items)\n    ];\n  } else {\n    const activeClass = eVm.props.toolbarToggleColor !== void 0 ? `text-${eVm.props.toolbarToggleColor}` : null;\n    const inactiveClass = eVm.props.toolbarTextColor !== void 0 ? `text-${eVm.props.toolbarTextColor}` : null;\n    const noIcons = btn.list === \"no-icons\";\n    Items = btn.options.map((btn2) => {\n      const disable = btn2.disable ? btn2.disable(eVm) : false;\n      const active = btn2.type === void 0 ? eVm.caret.is(btn2.cmd, btn2.param) : false;\n      if (active) {\n        label = btn2.tip;\n        icon = btn2.icon !== null ? btn2.icon : void 0;\n      }\n      const htmlTip = btn2.htmlTip;\n      return h44(QItem_default, {\n        active,\n        activeClass,\n        clickable: true,\n        disable,\n        dense: true,\n        onClick(e) {\n          closeDropdown();\n          eVm.contentRef.value !== null && eVm.contentRef.value.focus();\n          eVm.caret.restore();\n          run(e, btn2, eVm);\n        }\n      }, () => [\n        noIcons === true ? null : h44(\n          QItemSection_default,\n          {\n            class: active ? activeClass : inactiveClass,\n            side: true\n          },\n          () => h44(QIcon_default, { name: btn2.icon !== null ? btn2.icon : void 0 })\n        ),\n        h44(\n          QItemSection_default,\n          htmlTip ? () => h44(\"div\", { class: \"text-no-wrap\", innerHTML: btn2.htmlTip }) : btn2.tip ? () => h44(\"div\", { class: \"text-no-wrap\" }, btn2.tip) : void 0\n        )\n      ]);\n    });\n    contentClass = [eVm.toolbarBackgroundClass.value, inactiveClass];\n  }\n  const highlight = btn.highlight && label !== btn.label;\n  const Dropdown = h44(QBtnDropdown_default, {\n    ...eVm.buttonProps.value,\n    noCaps: true,\n    noWrap: true,\n    color: highlight ? eVm.props.toolbarToggleColor : eVm.props.toolbarColor,\n    textColor: highlight && !eVm.props.toolbarPush ? null : eVm.props.toolbarTextColor,\n    label: btn.fixedLabel ? btn.label : label,\n    icon: btn.fixedIcon ? btn.icon !== null ? btn.icon : void 0 : icon,\n    contentClass,\n    onShow: (evt) => eVm.emit(\"dropdownShow\", evt),\n    onHide: (evt) => eVm.emit(\"dropdownHide\", evt),\n    onBeforeShow: (evt) => eVm.emit(\"dropdownBeforeShow\", evt),\n    onBeforeHide: (evt) => eVm.emit(\"dropdownBeforeHide\", evt)\n  }, () => Items);\n  return Dropdown;\n}\nfunction getToolbar(eVm) {\n  if (eVm.caret) {\n    return eVm.buttons.value.filter((f) => {\n      return !eVm.isViewingSource.value || f.find((fb) => fb.cmd === \"viewsource\");\n    }).map((group) => getGroup(\n      group.map((btn) => {\n        if (eVm.isViewingSource.value && btn.cmd !== \"viewsource\") {\n          return false;\n        }\n        if (btn.type === \"slot\") {\n          return hSlot(eVm.slots[btn.slot]);\n        }\n        if (btn.type === \"dropdown\") {\n          return getDropdown(eVm, btn);\n        }\n        return getBtn(eVm, btn);\n      })\n    ));\n  }\n}\nfunction getFonts(defaultFont, defaultFontLabel, defaultFontIcon, fonts = {}) {\n  const aliases = Object.keys(fonts);\n  if (aliases.length === 0) {\n    return {};\n  }\n  const def = {\n    default_font: {\n      cmd: \"fontName\",\n      param: defaultFont,\n      icon: defaultFontIcon,\n      tip: defaultFontLabel\n    }\n  };\n  aliases.forEach((alias) => {\n    const name2 = fonts[alias];\n    def[alias] = {\n      cmd: \"fontName\",\n      param: name2,\n      icon: defaultFontIcon,\n      tip: name2,\n      htmlTip: `<font face=\"${name2}\">${name2}</font>`\n    };\n  });\n  return def;\n}\nfunction getLinkEditor(eVm) {\n  if (eVm.caret) {\n    const color = eVm.props.toolbarColor || eVm.props.toolbarTextColor;\n    let link = eVm.editLinkUrl.value;\n    const updateLink = () => {\n      eVm.caret.restore();\n      if (link !== eVm.editLinkUrl.value) {\n        document.execCommand(\"createLink\", false, link === \"\" ? \" \" : link);\n      }\n      eVm.editLinkUrl.value = null;\n    };\n    return [\n      h44(\"div\", { class: `q-mx-xs text-${color}` }, `${eVm.$q.lang.editor.url}: `),\n      h44(\"input\", {\n        key: \"qedt_btm_input\",\n        class: \"col q-editor__link-input\",\n        value: link,\n        onInput: (evt) => {\n          stop(evt);\n          link = evt.target.value;\n        },\n        onKeydown: (evt) => {\n          if (shouldIgnoreKey(evt) === true) return;\n          switch (evt.keyCode) {\n            case 13:\n              prevent(evt);\n              return updateLink();\n            case 27:\n              prevent(evt);\n              eVm.caret.restore();\n              if (!eVm.editLinkUrl.value || eVm.editLinkUrl.value === \"https://\") {\n                document.execCommand(\"unlink\");\n              }\n              eVm.editLinkUrl.value = null;\n              break;\n          }\n        }\n      }),\n      getGroup([\n        h44(QBtn_default, {\n          key: \"qedt_btm_rem\",\n          tabindex: -1,\n          ...eVm.buttonProps.value,\n          label: eVm.$q.lang.label.remove,\n          noCaps: true,\n          onClick: () => {\n            eVm.caret.restore();\n            document.execCommand(\"unlink\");\n            eVm.editLinkUrl.value = null;\n          }\n        }),\n        h44(QBtn_default, {\n          key: \"qedt_btm_upd\",\n          ...eVm.buttonProps.value,\n          label: eVm.$q.lang.label.update,\n          noCaps: true,\n          onClick: updateLink\n        })\n      ])\n    ];\n  }\n}\n\n// src/composables/use-split-attrs/use-split-attrs.js\nimport { ref as ref25, onBeforeUpdate, getCurrentInstance as getCurrentInstance32 } from \"vue\";\nvar listenerRE = /^on[A-Z]/;\nfunction use_split_attrs_default() {\n  const { attrs, vnode } = getCurrentInstance32();\n  const acc = {\n    listeners: ref25({}),\n    attributes: ref25({})\n  };\n  function update6() {\n    const attributes = {};\n    const listeners = {};\n    for (const key in attrs) {\n      if (key !== \"class\" && key !== \"style\" && listenerRE.test(key) === false) {\n        attributes[key] = attrs[key];\n      }\n    }\n    for (const key in vnode.props) {\n      if (listenerRE.test(key) === true) {\n        listeners[key] = vnode.props[key];\n      }\n    }\n    acc.attributes.value = attributes;\n    acc.listeners.value = listeners;\n  }\n  onBeforeUpdate(update6);\n  update6();\n  return acc;\n}\n\n// src/utils/extend/extend.js\nvar toString = Object.prototype.toString;\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar notPlainObject = new Set(\n  [\"Boolean\", \"Number\", \"String\", \"Function\", \"Array\", \"Date\", \"RegExp\"].map((name2) => \"[object \" + name2 + \"]\")\n);\nfunction isPlainObject(obj) {\n  if (obj !== Object(obj) || notPlainObject.has(toString.call(obj)) === true) {\n    return false;\n  }\n  if (obj.constructor && hasOwn.call(obj, \"constructor\") === false && hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\") === false) {\n    return false;\n  }\n  let key;\n  for (key in obj) {\n  }\n  return key === void 0 || hasOwn.call(obj, key);\n}\nfunction extend() {\n  let options, name2, src, copy, copyIsArray, clone2, target2 = arguments[0] || {}, i = 1, deep = false;\n  const length = arguments.length;\n  if (typeof target2 === \"boolean\") {\n    deep = target2;\n    target2 = arguments[1] || {};\n    i = 2;\n  }\n  if (Object(target2) !== target2 && typeof target2 !== \"function\") {\n    target2 = {};\n  }\n  if (length === i) {\n    target2 = this;\n    i--;\n  }\n  for (; i < length; i++) {\n    if ((options = arguments[i]) !== null) {\n      for (name2 in options) {\n        src = target2[name2];\n        copy = options[name2];\n        if (target2 === copy) {\n          continue;\n        }\n        if (deep === true && copy && ((copyIsArray = Array.isArray(copy)) || isPlainObject(copy) === true)) {\n          if (copyIsArray === true) {\n            clone2 = Array.isArray(src) === true ? src : [];\n          } else {\n            clone2 = isPlainObject(src) === true ? src : {};\n          }\n          target2[name2] = extend(deep, clone2, copy);\n        } else if (copy !== void 0) {\n          target2[name2] = copy;\n        }\n      }\n    }\n  }\n  return target2;\n}\n\n// src/components/editor/QEditor.js\nvar QEditor_default = createComponent({\n  name: \"QEditor\",\n  props: {\n    ...useDarkProps,\n    ...useFullscreenProps,\n    modelValue: {\n      type: String,\n      required: true\n    },\n    readonly: Boolean,\n    disable: Boolean,\n    minHeight: {\n      type: String,\n      default: \"10rem\"\n    },\n    maxHeight: String,\n    height: String,\n    definitions: Object,\n    fonts: Object,\n    placeholder: String,\n    toolbar: {\n      type: Array,\n      validator: (v) => v.length === 0 || v.every((group) => group.length),\n      // long line on purpose for API validation purposes:\n      default: () => [[\"left\", \"center\", \"right\", \"justify\"], [\"bold\", \"italic\", \"underline\", \"strike\"], [\"undo\", \"redo\"]]\n    },\n    toolbarColor: String,\n    toolbarBg: String,\n    toolbarTextColor: String,\n    toolbarToggleColor: {\n      type: String,\n      default: \"primary\"\n    },\n    toolbarOutline: Boolean,\n    toolbarPush: Boolean,\n    toolbarRounded: Boolean,\n    paragraphTag: {\n      type: String,\n      validator: (v) => [\"div\", \"p\"].includes(v),\n      default: \"div\"\n    },\n    contentStyle: Object,\n    contentClass: [Object, Array, String],\n    square: Boolean,\n    flat: Boolean,\n    dense: Boolean\n  },\n  emits: [\n    ...useFullscreenEmits,\n    \"update:modelValue\",\n    \"keydown\",\n    \"click\",\n    \"focus\",\n    \"blur\",\n    \"dropdownShow\",\n    \"dropdownHide\",\n    \"dropdownBeforeShow\",\n    \"dropdownBeforeHide\",\n    \"linkShow\",\n    \"linkHide\"\n  ],\n  setup(props4, { slots, emit }) {\n    const { proxy } = getCurrentInstance33();\n    const { $q } = proxy;\n    const isDark = use_dark_default(props4, $q);\n    const { inFullscreen, toggleFullscreen } = use_fullscreen_default();\n    const splitAttrs = use_split_attrs_default();\n    const rootRef = ref26(null);\n    const contentRef = ref26(null);\n    const editLinkUrl = ref26(null);\n    const isViewingSource = ref26(false);\n    const editable = computed49(() => !props4.readonly && !props4.disable);\n    let defaultFont, offsetBottom;\n    let lastEmit = props4.modelValue;\n    if (true) {\n      document.execCommand(\"defaultParagraphSeparator\", false, props4.paragraphTag);\n      defaultFont = window.getComputedStyle(document.body).fontFamily;\n    }\n    const toolbarBackgroundClass = computed49(() => props4.toolbarBg ? ` bg-${props4.toolbarBg}` : \"\");\n    const buttonProps = computed49(() => {\n      const flat = props4.toolbarOutline !== true && props4.toolbarPush !== true;\n      return {\n        type: \"a\",\n        flat,\n        noWrap: true,\n        outline: props4.toolbarOutline,\n        push: props4.toolbarPush,\n        rounded: props4.toolbarRounded,\n        dense: true,\n        color: props4.toolbarColor,\n        disable: !editable.value,\n        size: \"sm\"\n      };\n    });\n    const buttonDef = computed49(() => {\n      const e = $q.lang.editor, i = $q.iconSet.editor;\n      return {\n        bold: { cmd: \"bold\", icon: i.bold, tip: e.bold, key: 66 },\n        italic: { cmd: \"italic\", icon: i.italic, tip: e.italic, key: 73 },\n        strike: { cmd: \"strikeThrough\", icon: i.strikethrough, tip: e.strikethrough, key: 83 },\n        underline: { cmd: \"underline\", icon: i.underline, tip: e.underline, key: 85 },\n        unordered: { cmd: \"insertUnorderedList\", icon: i.unorderedList, tip: e.unorderedList },\n        ordered: { cmd: \"insertOrderedList\", icon: i.orderedList, tip: e.orderedList },\n        subscript: { cmd: \"subscript\", icon: i.subscript, tip: e.subscript, htmlTip: \"x<subscript>2</subscript>\" },\n        superscript: { cmd: \"superscript\", icon: i.superscript, tip: e.superscript, htmlTip: \"x<superscript>2</superscript>\" },\n        link: { cmd: \"link\", disable: (eVm2) => eVm2.caret && !eVm2.caret.can(\"link\"), icon: i.hyperlink, tip: e.hyperlink, key: 76 },\n        fullscreen: { cmd: \"fullscreen\", icon: i.toggleFullscreen, tip: e.toggleFullscreen, key: 70 },\n        viewsource: { cmd: \"viewsource\", icon: i.viewSource, tip: e.viewSource },\n        quote: { cmd: \"formatBlock\", param: \"BLOCKQUOTE\", icon: i.quote, tip: e.quote, key: 81 },\n        left: { cmd: \"justifyLeft\", icon: i.left, tip: e.left },\n        center: { cmd: \"justifyCenter\", icon: i.center, tip: e.center },\n        right: { cmd: \"justifyRight\", icon: i.right, tip: e.right },\n        justify: { cmd: \"justifyFull\", icon: i.justify, tip: e.justify },\n        print: { type: \"no-state\", cmd: \"print\", icon: i.print, tip: e.print, key: 80 },\n        outdent: { type: \"no-state\", disable: (eVm2) => eVm2.caret && !eVm2.caret.can(\"outdent\"), cmd: \"outdent\", icon: i.outdent, tip: e.outdent },\n        indent: { type: \"no-state\", disable: (eVm2) => eVm2.caret && !eVm2.caret.can(\"indent\"), cmd: \"indent\", icon: i.indent, tip: e.indent },\n        removeFormat: { type: \"no-state\", cmd: \"removeFormat\", icon: i.removeFormat, tip: e.removeFormat },\n        hr: { type: \"no-state\", cmd: \"insertHorizontalRule\", icon: i.hr, tip: e.hr },\n        undo: { type: \"no-state\", cmd: \"undo\", icon: i.undo, tip: e.undo, key: 90 },\n        redo: { type: \"no-state\", cmd: \"redo\", icon: i.redo, tip: e.redo, key: 89 },\n        h1: { cmd: \"formatBlock\", param: \"H1\", icon: i.heading1 || i.heading, tip: e.heading1, htmlTip: `<h1 class=\"q-ma-none\">${e.heading1}</h1>` },\n        h2: { cmd: \"formatBlock\", param: \"H2\", icon: i.heading2 || i.heading, tip: e.heading2, htmlTip: `<h2 class=\"q-ma-none\">${e.heading2}</h2>` },\n        h3: { cmd: \"formatBlock\", param: \"H3\", icon: i.heading3 || i.heading, tip: e.heading3, htmlTip: `<h3 class=\"q-ma-none\">${e.heading3}</h3>` },\n        h4: { cmd: \"formatBlock\", param: \"H4\", icon: i.heading4 || i.heading, tip: e.heading4, htmlTip: `<h4 class=\"q-ma-none\">${e.heading4}</h4>` },\n        h5: { cmd: \"formatBlock\", param: \"H5\", icon: i.heading5 || i.heading, tip: e.heading5, htmlTip: `<h5 class=\"q-ma-none\">${e.heading5}</h5>` },\n        h6: { cmd: \"formatBlock\", param: \"H6\", icon: i.heading6 || i.heading, tip: e.heading6, htmlTip: `<h6 class=\"q-ma-none\">${e.heading6}</h6>` },\n        p: { cmd: \"formatBlock\", param: props4.paragraphTag, icon: i.heading, tip: e.paragraph },\n        code: { cmd: \"formatBlock\", param: \"PRE\", icon: i.code, htmlTip: `<code>${e.code}</code>` },\n        \"size-1\": { cmd: \"fontSize\", param: \"1\", icon: i.size1 || i.size, tip: e.size1, htmlTip: `<font size=\"1\">${e.size1}</font>` },\n        \"size-2\": { cmd: \"fontSize\", param: \"2\", icon: i.size2 || i.size, tip: e.size2, htmlTip: `<font size=\"2\">${e.size2}</font>` },\n        \"size-3\": { cmd: \"fontSize\", param: \"3\", icon: i.size3 || i.size, tip: e.size3, htmlTip: `<font size=\"3\">${e.size3}</font>` },\n        \"size-4\": { cmd: \"fontSize\", param: \"4\", icon: i.size4 || i.size, tip: e.size4, htmlTip: `<font size=\"4\">${e.size4}</font>` },\n        \"size-5\": { cmd: \"fontSize\", param: \"5\", icon: i.size5 || i.size, tip: e.size5, htmlTip: `<font size=\"5\">${e.size5}</font>` },\n        \"size-6\": { cmd: \"fontSize\", param: \"6\", icon: i.size6 || i.size, tip: e.size6, htmlTip: `<font size=\"6\">${e.size6}</font>` },\n        \"size-7\": { cmd: \"fontSize\", param: \"7\", icon: i.size7 || i.size, tip: e.size7, htmlTip: `<font size=\"7\">${e.size7}</font>` }\n      };\n    });\n    const buttons = computed49(() => {\n      const userDef = props4.definitions || {};\n      const def = props4.definitions || props4.fonts ? extend(\n        true,\n        {},\n        buttonDef.value,\n        userDef,\n        getFonts(\n          defaultFont,\n          $q.lang.editor.defaultFont,\n          $q.iconSet.editor.font,\n          props4.fonts\n        )\n      ) : buttonDef.value;\n      return props4.toolbar.map(\n        (group) => group.map((token2) => {\n          if (token2.options) {\n            return {\n              type: \"dropdown\",\n              icon: token2.icon,\n              label: token2.label,\n              size: \"sm\",\n              dense: true,\n              fixedLabel: token2.fixedLabel,\n              fixedIcon: token2.fixedIcon,\n              highlight: token2.highlight,\n              list: token2.list,\n              options: token2.options.map((item) => def[item])\n            };\n          }\n          const obj = def[token2];\n          if (obj) {\n            return obj.type === \"no-state\" || userDef[token2] && (obj.cmd === void 0 || buttonDef.value[obj.cmd] && buttonDef.value[obj.cmd].type === \"no-state\") ? obj : Object.assign({ type: \"toggle\" }, obj);\n          } else {\n            return {\n              type: \"slot\",\n              slot: token2\n            };\n          }\n        })\n      );\n    });\n    const eVm = {\n      $q,\n      props: props4,\n      slots,\n      emit,\n      // caret (will get injected after mount)\n      inFullscreen,\n      toggleFullscreen,\n      runCmd,\n      isViewingSource,\n      editLinkUrl,\n      toolbarBackgroundClass,\n      buttonProps,\n      contentRef,\n      buttons,\n      setContent\n    };\n    watch17(() => props4.modelValue, (v) => {\n      if (lastEmit !== v) {\n        lastEmit = v;\n        setContent(v, true);\n      }\n    });\n    watch17(editLinkUrl, (v) => {\n      emit(`link${v ? \"Show\" : \"Hide\"}`);\n    });\n    const hasToolbar = computed49(() => props4.toolbar && props4.toolbar.length !== 0);\n    const keys = computed49(() => {\n      const k = {}, add = (btn) => {\n        if (btn.key) {\n          k[btn.key] = {\n            cmd: btn.cmd,\n            param: btn.param\n          };\n        }\n      };\n      buttons.value.forEach((group) => {\n        group.forEach((token2) => {\n          if (token2.options) {\n            token2.options.forEach(add);\n          } else {\n            add(token2);\n          }\n        });\n      });\n      return k;\n    });\n    const innerStyle = computed49(() => inFullscreen.value ? props4.contentStyle : [\n      {\n        minHeight: props4.minHeight,\n        height: props4.height,\n        maxHeight: props4.maxHeight\n      },\n      props4.contentStyle\n    ]);\n    const classes = computed49(\n      () => `q-editor q-editor--${isViewingSource.value === true ? \"source\" : \"default\"}` + (props4.disable === true ? \" disabled\" : \"\") + (inFullscreen.value === true ? \" fullscreen column\" : \"\") + (props4.square === true ? \" q-editor--square no-border-radius\" : \"\") + (props4.flat === true ? \" q-editor--flat\" : \"\") + (props4.dense === true ? \" q-editor--dense\" : \"\") + (isDark.value === true ? \" q-editor--dark q-dark\" : \"\")\n    );\n    const innerClass = computed49(() => [\n      props4.contentClass,\n      \"q-editor__content\",\n      { col: inFullscreen.value, \"overflow-auto\": inFullscreen.value || props4.maxHeight }\n    ]);\n    const attributes = computed49(() => props4.disable === true ? { \"aria-disabled\": \"true\" } : {});\n    function onInput() {\n      if (contentRef.value !== null) {\n        const prop = `inner${isViewingSource.value === true ? \"Text\" : \"HTML\"}`;\n        const val = contentRef.value[prop];\n        if (val !== props4.modelValue) {\n          lastEmit = val;\n          emit(\"update:modelValue\", val);\n        }\n      }\n    }\n    function onKeydown2(e) {\n      emit(\"keydown\", e);\n      if (e.ctrlKey !== true || shouldIgnoreKey(e) === true) {\n        refreshToolbar();\n        return;\n      }\n      const key = e.keyCode;\n      const target2 = keys.value[key];\n      if (target2 !== void 0) {\n        const { cmd, param } = target2;\n        stopAndPrevent(e);\n        runCmd(cmd, param, false);\n      }\n    }\n    function onClick(e) {\n      refreshToolbar();\n      emit(\"click\", e);\n    }\n    function onBlur2(e) {\n      if (contentRef.value !== null) {\n        const { scrollTop, scrollHeight } = contentRef.value;\n        offsetBottom = scrollHeight - scrollTop;\n      }\n      eVm.caret.save();\n      emit(\"blur\", e);\n    }\n    function onFocus(e) {\n      nextTick8(() => {\n        if (contentRef.value !== null && offsetBottom !== void 0) {\n          contentRef.value.scrollTop = contentRef.value.scrollHeight - offsetBottom;\n        }\n      });\n      emit(\"focus\", e);\n    }\n    function onFocusin(e) {\n      const root = rootRef.value;\n      if (root !== null && root.contains(e.target) === true && (e.relatedTarget === null || root.contains(e.relatedTarget) !== true)) {\n        const prop = `inner${isViewingSource.value === true ? \"Text\" : \"HTML\"}`;\n        eVm.caret.restorePosition(contentRef.value[prop].length);\n        refreshToolbar();\n      }\n    }\n    function onFocusout(e) {\n      const root = rootRef.value;\n      if (root !== null && root.contains(e.target) === true && (e.relatedTarget === null || root.contains(e.relatedTarget) !== true)) {\n        eVm.caret.savePosition();\n        refreshToolbar();\n      }\n    }\n    function onPointerStart() {\n      offsetBottom = void 0;\n    }\n    function onSelectionchange(e) {\n      eVm.caret.save();\n    }\n    function setContent(v, restorePosition) {\n      if (contentRef.value !== null) {\n        if (restorePosition === true) {\n          eVm.caret.savePosition();\n        }\n        const prop = `inner${isViewingSource.value === true ? \"Text\" : \"HTML\"}`;\n        contentRef.value[prop] = v;\n        if (restorePosition === true) {\n          eVm.caret.restorePosition(contentRef.value[prop].length);\n          refreshToolbar();\n        }\n      }\n    }\n    function runCmd(cmd, param, update6 = true) {\n      focus();\n      eVm.caret.restore();\n      eVm.caret.apply(cmd, param, () => {\n        focus();\n        eVm.caret.save();\n        if (update6) {\n          refreshToolbar();\n        }\n      });\n    }\n    function refreshToolbar() {\n      setTimeout(() => {\n        editLinkUrl.value = null;\n        proxy.$forceUpdate();\n      }, 1);\n    }\n    function focus() {\n      addFocusFn(() => {\n        contentRef.value !== null && contentRef.value.focus({ preventScroll: true });\n      });\n    }\n    function getContentEl() {\n      return contentRef.value;\n    }\n    onMounted12(() => {\n      eVm.caret = proxy.caret = new Caret(contentRef.value, eVm);\n      setContent(props4.modelValue);\n      refreshToolbar();\n      document.addEventListener(\"selectionchange\", onSelectionchange);\n    });\n    onBeforeUnmount18(() => {\n      document.removeEventListener(\"selectionchange\", onSelectionchange);\n    });\n    Object.assign(proxy, {\n      runCmd,\n      refreshToolbar,\n      focus,\n      getContentEl\n    });\n    return () => {\n      let toolbars;\n      if (hasToolbar.value) {\n        const bars = [\n          h45(\"div\", {\n            key: \"qedt_top\",\n            class: \"q-editor__toolbar row no-wrap scroll-x\" + toolbarBackgroundClass.value\n          }, getToolbar(eVm))\n        ];\n        editLinkUrl.value !== null && bars.push(\n          h45(\"div\", {\n            key: \"qedt_btm\",\n            class: \"q-editor__toolbar row no-wrap items-center scroll-x\" + toolbarBackgroundClass.value\n          }, getLinkEditor(eVm))\n        );\n        toolbars = h45(\"div\", {\n          key: \"toolbar_ctainer\",\n          class: \"q-editor__toolbars-container\"\n        }, bars);\n      }\n      return h45(\"div\", {\n        ref: rootRef,\n        class: classes.value,\n        style: { height: inFullscreen.value === true ? \"100%\" : null },\n        ...attributes.value,\n        onFocusin,\n        onFocusout\n      }, [\n        toolbars,\n        h45(\"div\", {\n          ref: contentRef,\n          style: innerStyle.value,\n          class: innerClass.value,\n          contenteditable: editable.value,\n          placeholder: props4.placeholder,\n          ...false ? { innerHTML: props4.modelValue } : {},\n          ...splitAttrs.listeners.value,\n          onInput,\n          onKeydown: onKeydown2,\n          onClick,\n          onBlur: onBlur2,\n          onFocus,\n          // clean saved scroll position\n          onMousedown: onPointerStart,\n          onTouchstartPassive: onPointerStart\n        })\n      ]);\n    };\n  }\n});\n\n// src/components/expansion-item/QExpansionItem.js\nimport { h as h49, shallowReactive, ref as ref27, computed as computed52, watch as watch18, withDirectives as withDirectives5, getCurrentInstance as getCurrentInstance35, vShow, onBeforeUnmount as onBeforeUnmount20 } from \"vue\";\n\n// src/components/item/QItemLabel.js\nimport { h as h46, computed as computed50 } from \"vue\";\nvar QItemLabel_default = createComponent({\n  name: \"QItemLabel\",\n  props: {\n    overline: Boolean,\n    caption: Boolean,\n    header: Boolean,\n    lines: [Number, String]\n  },\n  setup(props4, { slots }) {\n    const parsedLines = computed50(() => parseInt(props4.lines, 10));\n    const classes = computed50(\n      () => \"q-item__label\" + (props4.overline === true ? \" q-item__label--overline text-overline\" : \"\") + (props4.caption === true ? \" q-item__label--caption text-caption\" : \"\") + (props4.header === true ? \" q-item__label--header\" : \"\") + (parsedLines.value === 1 ? \" ellipsis\" : \"\")\n    );\n    const style2 = computed50(() => {\n      return props4.lines !== void 0 && parsedLines.value > 1 ? {\n        overflow: \"hidden\",\n        display: \"-webkit-box\",\n        \"-webkit-box-orient\": \"vertical\",\n        \"-webkit-line-clamp\": parsedLines.value\n      } : null;\n    });\n    return () => h46(\"div\", {\n      style: style2.value,\n      class: classes.value\n    }, hSlot(slots.default));\n  }\n});\n\n// src/components/slide-transition/QSlideTransition.js\nimport { h as h47, onBeforeUnmount as onBeforeUnmount19, Transition as Transition7 } from \"vue\";\nvar QSlideTransition_default = createComponent({\n  name: \"QSlideTransition\",\n  props: {\n    appear: Boolean,\n    duration: {\n      type: Number,\n      default: 300\n    }\n  },\n  emits: [\"show\", \"hide\"],\n  setup(props4, { slots, emit }) {\n    let animating = false, doneFn, element;\n    let timer2 = null, timerFallback = null, animListener, lastEvent;\n    function cleanup() {\n      doneFn && doneFn();\n      doneFn = null;\n      animating = false;\n      if (timer2 !== null) {\n        clearTimeout(timer2);\n        timer2 = null;\n      }\n      if (timerFallback !== null) {\n        clearTimeout(timerFallback);\n        timerFallback = null;\n      }\n      element !== void 0 && element.removeEventListener(\"transitionend\", animListener);\n      animListener = null;\n    }\n    function begin(el, height2, done) {\n      if (height2 !== void 0) {\n        el.style.height = `${height2}px`;\n      }\n      el.style.transition = `height ${props4.duration}ms cubic-bezier(.25, .8, .50, 1)`;\n      animating = true;\n      doneFn = done;\n    }\n    function end(el, event) {\n      el.style.overflowY = null;\n      el.style.height = null;\n      el.style.transition = null;\n      cleanup();\n      event !== lastEvent && emit(event);\n    }\n    function onEnter(el, done) {\n      let pos = 0;\n      element = el;\n      if (animating === true) {\n        cleanup();\n        pos = el.offsetHeight === el.scrollHeight ? 0 : void 0;\n      } else {\n        lastEvent = \"hide\";\n        el.style.overflowY = \"hidden\";\n      }\n      begin(el, pos, done);\n      timer2 = setTimeout(() => {\n        timer2 = null;\n        el.style.height = `${el.scrollHeight}px`;\n        animListener = (evt) => {\n          timerFallback = null;\n          if (Object(evt) !== evt || evt.target === el) {\n            end(el, \"show\");\n          }\n        };\n        el.addEventListener(\"transitionend\", animListener);\n        timerFallback = setTimeout(animListener, props4.duration * 1.1);\n      }, 100);\n    }\n    function onLeave(el, done) {\n      let pos;\n      element = el;\n      if (animating === true) {\n        cleanup();\n      } else {\n        lastEvent = \"show\";\n        el.style.overflowY = \"hidden\";\n        pos = el.scrollHeight;\n      }\n      begin(el, pos, done);\n      timer2 = setTimeout(() => {\n        timer2 = null;\n        el.style.height = 0;\n        animListener = (evt) => {\n          timerFallback = null;\n          if (Object(evt) !== evt || evt.target === el) {\n            end(el, \"hide\");\n          }\n        };\n        el.addEventListener(\"transitionend\", animListener);\n        timerFallback = setTimeout(animListener, props4.duration * 1.1);\n      }, 100);\n    }\n    onBeforeUnmount19(() => {\n      animating === true && cleanup();\n    });\n    return () => h47(Transition7, {\n      css: false,\n      appear: props4.appear,\n      onEnter,\n      onLeave\n    }, slots.default);\n  }\n});\n\n// src/components/separator/QSeparator.js\nimport { h as h48, computed as computed51, getCurrentInstance as getCurrentInstance34 } from \"vue\";\nvar insetMap = {\n  true: \"inset\",\n  item: \"item-inset\",\n  \"item-thumbnail\": \"item-thumbnail-inset\"\n};\nvar margins = {\n  xs: 2,\n  sm: 4,\n  md: 8,\n  lg: 16,\n  xl: 24\n};\nvar QSeparator_default = createComponent({\n  name: \"QSeparator\",\n  props: {\n    ...useDarkProps,\n    spaced: [Boolean, String],\n    inset: [Boolean, String],\n    vertical: Boolean,\n    color: String,\n    size: String\n  },\n  setup(props4) {\n    const vm2 = getCurrentInstance34();\n    const isDark = use_dark_default(props4, vm2.proxy.$q);\n    const orientation = computed51(() => props4.vertical === true ? \"vertical\" : \"horizontal\");\n    const orientClass = computed51(() => ` q-separator--${orientation.value}`);\n    const insetClass = computed51(() => props4.inset !== false ? `${orientClass.value}-${insetMap[props4.inset]}` : \"\");\n    const classes = computed51(\n      () => `q-separator${orientClass.value}${insetClass.value}` + (props4.color !== void 0 ? ` bg-${props4.color}` : \"\") + (isDark.value === true ? \" q-separator--dark\" : \"\")\n    );\n    const style2 = computed51(() => {\n      const acc = {};\n      if (props4.size !== void 0) {\n        acc[props4.vertical === true ? \"width\" : \"height\"] = props4.size;\n      }\n      if (props4.spaced !== false) {\n        const size2 = props4.spaced === true ? `${margins.md}px` : props4.spaced in margins ? `${margins[props4.spaced]}px` : props4.spaced;\n        const dir = props4.vertical === true ? [\"Left\", \"Right\"] : [\"Top\", \"Bottom\"];\n        acc[`margin${dir[0]}`] = acc[`margin${dir[1]}`] = size2;\n      }\n      return acc;\n    });\n    return () => h48(\"hr\", {\n      class: classes.value,\n      style: style2.value,\n      \"aria-orientation\": orientation.value\n    });\n  }\n});\n\n// src/components/expansion-item/QExpansionItem.js\nvar itemGroups = shallowReactive({});\nvar LINK_PROPS = Object.keys(useRouterLinkProps);\nvar QExpansionItem_default = createComponent({\n  name: \"QExpansionItem\",\n  props: {\n    ...useRouterLinkProps,\n    ...useModelToggleProps,\n    ...useDarkProps,\n    icon: String,\n    label: String,\n    labelLines: [Number, String],\n    caption: String,\n    captionLines: [Number, String],\n    dense: Boolean,\n    toggleAriaLabel: String,\n    expandIcon: String,\n    expandedIcon: String,\n    expandIconClass: [Array, String, Object],\n    duration: {},\n    headerInsetLevel: Number,\n    contentInsetLevel: Number,\n    expandSeparator: Boolean,\n    defaultOpened: Boolean,\n    hideExpandIcon: Boolean,\n    expandIconToggle: Boolean,\n    switchToggleSide: Boolean,\n    denseToggle: Boolean,\n    group: String,\n    popup: Boolean,\n    headerStyle: [Array, String, Object],\n    headerClass: [Array, String, Object]\n  },\n  emits: [\n    ...useModelToggleEmits,\n    \"click\",\n    \"afterShow\",\n    \"afterHide\"\n  ],\n  setup(props4, { slots, emit }) {\n    const { proxy: { $q } } = getCurrentInstance35();\n    const isDark = use_dark_default(props4, $q);\n    const showing = ref27(\n      props4.modelValue !== null ? props4.modelValue : props4.defaultOpened\n    );\n    const blurTargetRef = ref27(null);\n    const targetUid = use_id_default();\n    const { show, hide, toggle } = use_model_toggle_default({ showing });\n    let uniqueId, exitGroup;\n    const classes = computed52(\n      () => `q-expansion-item q-item-type q-expansion-item--${showing.value === true ? \"expanded\" : \"collapsed\"} q-expansion-item--${props4.popup === true ? \"popup\" : \"standard\"}`\n    );\n    const contentStyle = computed52(() => {\n      if (props4.contentInsetLevel === void 0) {\n        return null;\n      }\n      const dir = $q.lang.rtl === true ? \"Right\" : \"Left\";\n      return {\n        [\"padding\" + dir]: props4.contentInsetLevel * 56 + \"px\"\n      };\n    });\n    const hasLink = computed52(\n      () => props4.disable !== true && (props4.href !== void 0 || props4.to !== void 0 && props4.to !== null && props4.to !== \"\")\n    );\n    const linkProps = computed52(() => {\n      const acc = {};\n      LINK_PROPS.forEach((key) => {\n        acc[key] = props4[key];\n      });\n      return acc;\n    });\n    const isClickable = computed52(\n      () => hasLink.value === true || props4.expandIconToggle !== true\n    );\n    const expansionIcon = computed52(() => props4.expandedIcon !== void 0 && showing.value === true ? props4.expandedIcon : props4.expandIcon || $q.iconSet.expansionItem[props4.denseToggle === true ? \"denseIcon\" : \"icon\"]);\n    const activeToggleIcon = computed52(\n      () => props4.disable !== true && (hasLink.value === true || props4.expandIconToggle === true)\n    );\n    const headerSlotScope = computed52(() => ({\n      expanded: showing.value === true,\n      detailsId: targetUid.value,\n      toggle,\n      show,\n      hide\n    }));\n    const toggleAriaAttrs = computed52(() => {\n      const toggleAriaLabel = props4.toggleAriaLabel !== void 0 ? props4.toggleAriaLabel : $q.lang.label[showing.value === true ? \"collapse\" : \"expand\"](props4.label);\n      return {\n        role: \"button\",\n        \"aria-expanded\": showing.value === true ? \"true\" : \"false\",\n        \"aria-controls\": targetUid.value,\n        \"aria-label\": toggleAriaLabel\n      };\n    });\n    watch18(() => props4.group, (name2) => {\n      exitGroup !== void 0 && exitGroup();\n      name2 !== void 0 && enterGroup();\n    });\n    function onHeaderClick(e) {\n      hasLink.value !== true && toggle(e);\n      emit(\"click\", e);\n    }\n    function toggleIconKeyboard(e) {\n      e.keyCode === 13 && toggleIcon(e, true);\n    }\n    function toggleIcon(e, keyboard) {\n      keyboard !== true && blurTargetRef.value !== null && blurTargetRef.value.focus();\n      toggle(e);\n      stopAndPrevent(e);\n    }\n    function onShow() {\n      emit(\"afterShow\");\n    }\n    function onHide() {\n      emit(\"afterHide\");\n    }\n    function enterGroup() {\n      if (uniqueId === void 0) {\n        uniqueId = uid_default();\n      }\n      if (showing.value === true) {\n        itemGroups[props4.group] = uniqueId;\n      }\n      const show2 = watch18(showing, (val) => {\n        if (val === true) {\n          itemGroups[props4.group] = uniqueId;\n        } else if (itemGroups[props4.group] === uniqueId) {\n          delete itemGroups[props4.group];\n        }\n      });\n      const group = watch18(\n        () => itemGroups[props4.group],\n        (val, oldVal) => {\n          if (oldVal === uniqueId && val !== void 0 && val !== uniqueId) {\n            hide();\n          }\n        }\n      );\n      exitGroup = () => {\n        show2();\n        group();\n        if (itemGroups[props4.group] === uniqueId) {\n          delete itemGroups[props4.group];\n        }\n        exitGroup = void 0;\n      };\n    }\n    function getToggleIcon() {\n      const data = {\n        class: [\n          `q-focusable relative-position cursor-pointer${props4.denseToggle === true && props4.switchToggleSide === true ? \" items-end\" : \"\"}`,\n          props4.expandIconClass\n        ],\n        side: props4.switchToggleSide !== true,\n        avatar: props4.switchToggleSide\n      };\n      const child = [\n        h49(QIcon_default, {\n          class: \"q-expansion-item__toggle-icon\" + (props4.expandedIcon === void 0 && showing.value === true ? \" q-expansion-item__toggle-icon--rotated\" : \"\"),\n          name: expansionIcon.value\n        })\n      ];\n      if (activeToggleIcon.value === true) {\n        Object.assign(data, {\n          tabindex: 0,\n          ...toggleAriaAttrs.value,\n          onClick: toggleIcon,\n          onKeyup: toggleIconKeyboard\n        });\n        child.unshift(\n          h49(\"div\", {\n            ref: blurTargetRef,\n            class: \"q-expansion-item__toggle-focus q-icon q-focus-helper q-focus-helper--rounded\",\n            tabindex: -1\n          })\n        );\n      }\n      return h49(QItemSection_default, data, () => child);\n    }\n    function getHeaderChild() {\n      let child;\n      if (slots.header !== void 0) {\n        child = [].concat(slots.header(headerSlotScope.value));\n      } else {\n        child = [\n          h49(QItemSection_default, () => [\n            h49(QItemLabel_default, { lines: props4.labelLines }, () => props4.label || \"\"),\n            props4.caption ? h49(QItemLabel_default, { lines: props4.captionLines, caption: true }, () => props4.caption) : null\n          ])\n        ];\n        props4.icon && child[props4.switchToggleSide === true ? \"push\" : \"unshift\"](\n          h49(QItemSection_default, {\n            side: props4.switchToggleSide === true,\n            avatar: props4.switchToggleSide !== true\n          }, () => h49(QIcon_default, { name: props4.icon }))\n        );\n      }\n      if (props4.disable !== true && props4.hideExpandIcon !== true) {\n        child[props4.switchToggleSide === true ? \"unshift\" : \"push\"](\n          getToggleIcon()\n        );\n      }\n      return child;\n    }\n    function getHeader() {\n      const data = {\n        ref: \"item\",\n        style: props4.headerStyle,\n        class: props4.headerClass,\n        dark: isDark.value,\n        disable: props4.disable,\n        dense: props4.dense,\n        insetLevel: props4.headerInsetLevel\n      };\n      if (isClickable.value === true) {\n        data.clickable = true;\n        data.onClick = onHeaderClick;\n        Object.assign(\n          data,\n          hasLink.value === true ? linkProps.value : toggleAriaAttrs.value\n        );\n      }\n      return h49(QItem_default, data, getHeaderChild);\n    }\n    function getTransitionChild() {\n      return withDirectives5(\n        h49(\"div\", {\n          key: \"e-content\",\n          class: \"q-expansion-item__content relative-position\",\n          style: contentStyle.value,\n          id: targetUid.value\n        }, hSlot(slots.default)),\n        [[\n          vShow,\n          showing.value\n        ]]\n      );\n    }\n    function getContent() {\n      const node = [\n        getHeader(),\n        h49(QSlideTransition_default, {\n          duration: props4.duration,\n          onShow,\n          onHide\n        }, getTransitionChild)\n      ];\n      if (props4.expandSeparator === true) {\n        node.push(\n          h49(QSeparator_default, {\n            class: \"q-expansion-item__border q-expansion-item__border--top absolute-top\",\n            dark: isDark.value\n          }),\n          h49(QSeparator_default, {\n            class: \"q-expansion-item__border q-expansion-item__border--bottom absolute-bottom\",\n            dark: isDark.value\n          })\n        );\n      }\n      return node;\n    }\n    props4.group !== void 0 && enterGroup();\n    onBeforeUnmount20(() => {\n      exitGroup !== void 0 && exitGroup();\n    });\n    return () => h49(\"div\", { class: classes.value }, [\n      h49(\"div\", { class: \"q-expansion-item__container relative-position\" }, getContent())\n    ]);\n  }\n});\n\n// src/components/fab/QFab.js\nimport { h as h50, ref as ref28, computed as computed54, provide as provide2, getCurrentInstance as getCurrentInstance36 } from \"vue\";\n\n// src/components/fab/use-fab.js\nimport { computed as computed53 } from \"vue\";\nvar labelPositions = [\"top\", \"right\", \"bottom\", \"left\"];\nvar useFabProps = {\n  type: {\n    type: String,\n    default: \"a\"\n  },\n  outline: Boolean,\n  push: Boolean,\n  flat: Boolean,\n  unelevated: Boolean,\n  color: String,\n  textColor: String,\n  glossy: Boolean,\n  square: Boolean,\n  padding: String,\n  label: {\n    type: [String, Number],\n    default: \"\"\n  },\n  labelPosition: {\n    type: String,\n    default: \"right\",\n    validator: (v) => labelPositions.includes(v)\n  },\n  externalLabel: Boolean,\n  hideLabel: {\n    type: Boolean\n  },\n  labelClass: [Array, String, Object],\n  labelStyle: [Array, String, Object],\n  disable: Boolean,\n  tabindex: [Number, String]\n};\nfunction use_fab_default(props4, showing) {\n  return {\n    formClass: computed53(\n      () => `q-fab--form-${props4.square === true ? \"square\" : \"rounded\"}`\n    ),\n    stacked: computed53(\n      () => props4.externalLabel === false && [\"top\", \"bottom\"].includes(props4.labelPosition)\n    ),\n    labelProps: computed53(() => {\n      if (props4.externalLabel === true) {\n        const hideLabel = props4.hideLabel === null ? showing.value === false : props4.hideLabel;\n        return {\n          action: \"push\",\n          data: {\n            class: [\n              props4.labelClass,\n              `q-fab__label q-tooltip--style q-fab__label--external q-fab__label--external-${props4.labelPosition}` + (hideLabel === true ? \" q-fab__label--external-hidden\" : \"\")\n            ],\n            style: props4.labelStyle\n          }\n        };\n      }\n      return {\n        action: [\"left\", \"top\"].includes(props4.labelPosition) ? \"unshift\" : \"push\",\n        data: {\n          class: [\n            props4.labelClass,\n            `q-fab__label q-fab__label--internal q-fab__label--internal-${props4.labelPosition}` + (props4.hideLabel === true ? \" q-fab__label--internal-hidden\" : \"\")\n          ],\n          style: props4.labelStyle\n        }\n      };\n    })\n  };\n}\n\n// src/components/fab/QFab.js\nvar directions = [\"up\", \"right\", \"down\", \"left\"];\nvar alignValues4 = [\"left\", \"center\", \"right\"];\nvar QFab_default = createComponent({\n  name: \"QFab\",\n  props: {\n    ...useFabProps,\n    ...useModelToggleProps,\n    icon: String,\n    activeIcon: String,\n    hideIcon: Boolean,\n    hideLabel: {\n      ...useFabProps.hideLabel,\n      default: null\n    },\n    direction: {\n      type: String,\n      default: \"right\",\n      validator: (v) => directions.includes(v)\n    },\n    persistent: Boolean,\n    verticalActionsAlign: {\n      type: String,\n      default: \"center\",\n      validator: (v) => alignValues4.includes(v)\n    }\n  },\n  emits: useModelToggleEmits,\n  setup(props4, { slots }) {\n    const triggerRef = ref28(null);\n    const showing = ref28(props4.modelValue === true);\n    const targetUid = use_id_default();\n    const { proxy: { $q } } = getCurrentInstance36();\n    const { formClass, labelProps } = use_fab_default(props4, showing);\n    const hideOnRouteChange = computed54(() => props4.persistent !== true);\n    const { hide, toggle } = use_model_toggle_default({\n      showing,\n      hideOnRouteChange\n    });\n    const slotScope = computed54(() => ({ opened: showing.value }));\n    const classes = computed54(\n      () => `q-fab z-fab row inline justify-center q-fab--align-${props4.verticalActionsAlign} ${formClass.value}` + (showing.value === true ? \" q-fab--opened\" : \" q-fab--closed\")\n    );\n    const actionClass = computed54(\n      () => `q-fab__actions flex no-wrap inline q-fab__actions--${props4.direction} q-fab__actions--${showing.value === true ? \"opened\" : \"closed\"}`\n    );\n    const actionAttrs = computed54(() => {\n      const attrs = {\n        id: targetUid.value,\n        role: \"menu\"\n      };\n      if (showing.value !== true) {\n        attrs[\"aria-hidden\"] = \"true\";\n      }\n      return attrs;\n    });\n    const iconHolderClass = computed54(\n      () => `q-fab__icon-holder  q-fab__icon-holder--${showing.value === true ? \"opened\" : \"closed\"}`\n    );\n    function getIcon(kebab, camel) {\n      const slotFn = slots[kebab];\n      const classes2 = `q-fab__${kebab} absolute-full`;\n      return slotFn === void 0 ? h50(QIcon_default, { class: classes2, name: props4[camel] || $q.iconSet.fab[camel] }) : h50(\"div\", { class: classes2 }, slotFn(slotScope.value));\n    }\n    function getTriggerContent() {\n      const child = [];\n      props4.hideIcon !== true && child.push(\n        h50(\"div\", { class: iconHolderClass.value }, [\n          getIcon(\"icon\", \"icon\"),\n          getIcon(\"active-icon\", \"activeIcon\")\n        ])\n      );\n      if (props4.label !== \"\" || slots.label !== void 0) {\n        child[labelProps.value.action](\n          h50(\"div\", labelProps.value.data, slots.label !== void 0 ? slots.label(slotScope.value) : [props4.label])\n        );\n      }\n      return hMergeSlot(slots.tooltip, child);\n    }\n    provide2(fabKey, {\n      showing,\n      onChildClick(evt) {\n        hide(evt);\n        if (triggerRef.value !== null) {\n          triggerRef.value.$el.focus();\n        }\n      }\n    });\n    return () => h50(\"div\", {\n      class: classes.value\n    }, [\n      h50(QBtn_default, {\n        ref: triggerRef,\n        class: formClass.value,\n        ...props4,\n        noWrap: true,\n        stack: props4.stacked,\n        align: void 0,\n        icon: void 0,\n        label: void 0,\n        noCaps: true,\n        fab: true,\n        \"aria-expanded\": showing.value === true ? \"true\" : \"false\",\n        \"aria-haspopup\": \"true\",\n        \"aria-controls\": targetUid.value,\n        onClick: toggle\n      }, getTriggerContent),\n      h50(\"div\", { class: actionClass.value, ...actionAttrs.value }, hSlot(slots.default))\n    ]);\n  }\n});\n\n// src/components/fab/QFabAction.js\nimport { h as h51, computed as computed55, inject as inject3, getCurrentInstance as getCurrentInstance37 } from \"vue\";\nvar anchorMap = {\n  start: \"self-end\",\n  center: \"self-center\",\n  end: \"self-start\"\n};\nvar anchorValues = Object.keys(anchorMap);\nvar QFabAction_default = createComponent({\n  name: \"QFabAction\",\n  props: {\n    ...useFabProps,\n    icon: {\n      type: String,\n      default: \"\"\n    },\n    anchor: {\n      type: String,\n      validator: (v) => anchorValues.includes(v)\n    },\n    to: [String, Object],\n    replace: Boolean\n  },\n  emits: [\"click\"],\n  setup(props4, { slots, emit }) {\n    const $fab = inject3(fabKey, () => ({\n      showing: { value: true },\n      onChildClick: noop\n    }));\n    const { formClass, labelProps } = use_fab_default(props4, $fab.showing);\n    const classes = computed55(() => {\n      const align = anchorMap[props4.anchor];\n      return formClass.value + (align !== void 0 ? ` ${align}` : \"\");\n    });\n    const isDisabled = computed55(\n      () => props4.disable === true || $fab.showing.value !== true\n    );\n    function click(e) {\n      $fab.onChildClick(e);\n      emit(\"click\", e);\n    }\n    function getContent() {\n      const child = [];\n      if (slots.icon !== void 0) {\n        child.push(slots.icon());\n      } else if (props4.icon !== \"\") {\n        child.push(\n          h51(QIcon_default, { name: props4.icon })\n        );\n      }\n      if (props4.label !== \"\" || slots.label !== void 0) {\n        child[labelProps.value.action](\n          h51(\"div\", labelProps.value.data, slots.label !== void 0 ? slots.label() : [props4.label])\n        );\n      }\n      return hMergeSlot(slots.default, child);\n    }\n    const vm2 = getCurrentInstance37();\n    Object.assign(vm2.proxy, { click });\n    return () => h51(QBtn_default, {\n      class: classes.value,\n      ...props4,\n      noWrap: true,\n      stack: props4.stacked,\n      icon: void 0,\n      label: void 0,\n      noCaps: true,\n      fabMini: true,\n      disable: isDisabled.value,\n      onClick: click\n    }, getContent);\n  }\n});\n\n// src/composables/private.use-field/use-field.js\nimport { h as h52, ref as ref30, computed as computed57, Transition as Transition8, nextTick as nextTick9, onActivated as onActivated2, onDeactivated as onDeactivated4, onBeforeUnmount as onBeforeUnmount23, onMounted as onMounted14, getCurrentInstance as getCurrentInstance40 } from \"vue\";\n\n// src/composables/private.use-validate/use-validate.js\nimport { ref as ref29, computed as computed56, watch as watch20, onBeforeUnmount as onBeforeUnmount22, getCurrentInstance as getCurrentInstance39 } from \"vue\";\n\n// src/composables/use-form/use-form-child.js\nimport { inject as inject4, watch as watch19, getCurrentInstance as getCurrentInstance38, onMounted as onMounted13, onBeforeUnmount as onBeforeUnmount21 } from \"vue\";\nfunction use_form_child_default({ validate, resetValidation, requiresQForm }) {\n  const $form = inject4(formKey, false);\n  if ($form !== false) {\n    const { props: props4, proxy } = getCurrentInstance38();\n    Object.assign(proxy, { validate, resetValidation });\n    watch19(() => props4.disable, (val) => {\n      if (val === true) {\n        typeof resetValidation === \"function\" && resetValidation();\n        $form.unbindComponent(proxy);\n      } else {\n        $form.bindComponent(proxy);\n      }\n    });\n    onMounted13(() => {\n      props4.disable !== true && $form.bindComponent(proxy);\n    });\n    onBeforeUnmount21(() => {\n      props4.disable !== true && $form.unbindComponent(proxy);\n    });\n  } else if (requiresQForm === true) {\n    console.error(\"Parent QForm not found on useFormChild()!\");\n  }\n}\n\n// src/composables/private.use-validate/use-validate.js\nvar lazyRulesValues = [true, false, \"ondemand\"];\nvar useValidateProps = {\n  modelValue: {},\n  error: {\n    type: Boolean,\n    default: null\n  },\n  errorMessage: String,\n  noErrorIcon: Boolean,\n  rules: Array,\n  reactiveRules: Boolean,\n  lazyRules: {\n    type: [Boolean, String],\n    default: false,\n    // statement unneeded but avoids future vue implementation changes\n    validator: (v) => lazyRulesValues.includes(v)\n  }\n};\nfunction use_validate_default(focused, innerLoading) {\n  const { props: props4, proxy } = getCurrentInstance39();\n  const innerError = ref29(false);\n  const innerErrorMessage = ref29(null);\n  const isDirtyModel = ref29(false);\n  use_form_child_default({ validate, resetValidation });\n  let validateIndex = 0, unwatchRules;\n  const hasRules = computed56(\n    () => props4.rules !== void 0 && props4.rules !== null && props4.rules.length !== 0\n  );\n  const canDebounceValidate = computed56(() => props4.disable !== true && hasRules.value === true && innerLoading.value === false);\n  const hasError = computed56(\n    () => props4.error === true || innerError.value === true\n  );\n  const errorMessage = computed56(() => typeof props4.errorMessage === \"string\" && props4.errorMessage.length !== 0 ? props4.errorMessage : innerErrorMessage.value);\n  watch20(() => props4.modelValue, () => {\n    isDirtyModel.value = true;\n    if (canDebounceValidate.value === true && props4.lazyRules === false) {\n      debouncedValidate();\n    }\n  });\n  function onRulesChange() {\n    if (props4.lazyRules !== \"ondemand\" && canDebounceValidate.value === true && isDirtyModel.value === true) {\n      debouncedValidate();\n    }\n  }\n  watch20(() => props4.reactiveRules, (val) => {\n    if (val === true) {\n      if (unwatchRules === void 0) {\n        unwatchRules = watch20(() => props4.rules, onRulesChange, { immediate: true, deep: true });\n      }\n    } else if (unwatchRules !== void 0) {\n      unwatchRules();\n      unwatchRules = void 0;\n    }\n  }, { immediate: true });\n  watch20(() => props4.lazyRules, onRulesChange);\n  watch20(focused, (val) => {\n    if (val === true) {\n      isDirtyModel.value = true;\n    } else if (canDebounceValidate.value === true && props4.lazyRules !== \"ondemand\") {\n      debouncedValidate();\n    }\n  });\n  function resetValidation() {\n    validateIndex++;\n    innerLoading.value = false;\n    isDirtyModel.value = false;\n    innerError.value = false;\n    innerErrorMessage.value = null;\n    debouncedValidate.cancel();\n  }\n  function validate(val = props4.modelValue) {\n    if (props4.disable === true || hasRules.value === false) {\n      return true;\n    }\n    const index = ++validateIndex;\n    const setDirty = innerLoading.value !== true ? () => {\n      isDirtyModel.value = true;\n    } : () => {\n    };\n    const update6 = (err, msg) => {\n      err === true && setDirty();\n      innerError.value = err;\n      innerErrorMessage.value = msg || null;\n      innerLoading.value = false;\n    };\n    const promises = [];\n    for (let i = 0; i < props4.rules.length; i++) {\n      const rule = props4.rules[i];\n      let res;\n      if (typeof rule === \"function\") {\n        res = rule(val, testPattern);\n      } else if (typeof rule === \"string\" && testPattern[rule] !== void 0) {\n        res = testPattern[rule](val);\n      }\n      if (res === false || typeof res === \"string\") {\n        update6(true, res);\n        return false;\n      } else if (res !== true && res !== void 0) {\n        promises.push(res);\n      }\n    }\n    if (promises.length === 0) {\n      update6(false);\n      return true;\n    }\n    innerLoading.value = true;\n    return Promise.all(promises).then(\n      (res) => {\n        if (res === void 0 || Array.isArray(res) === false || res.length === 0) {\n          index === validateIndex && update6(false);\n          return true;\n        }\n        const msg = res.find((r) => r === false || typeof r === \"string\");\n        index === validateIndex && update6(msg !== void 0, msg);\n        return msg === void 0;\n      },\n      (e) => {\n        if (index === validateIndex) {\n          console.error(e);\n          update6(true);\n        }\n        return false;\n      }\n    );\n  }\n  const debouncedValidate = debounce_default(validate, 0);\n  onBeforeUnmount22(() => {\n    unwatchRules !== void 0 && unwatchRules();\n    debouncedValidate.cancel();\n  });\n  Object.assign(proxy, { resetValidation, validate });\n  injectProp(proxy, \"hasError\", () => hasError.value);\n  return {\n    isDirtyModel,\n    hasRules,\n    hasError,\n    errorMessage,\n    validate,\n    resetValidation\n  };\n}\n\n// src/composables/private.use-field/use-field.js\nfunction fieldValueIsFilled(val) {\n  return val !== void 0 && val !== null && (\"\" + val).length !== 0;\n}\nvar useNonInputFieldProps = {\n  ...useDarkProps,\n  ...useValidateProps,\n  label: String,\n  stackLabel: Boolean,\n  hint: String,\n  hideHint: Boolean,\n  prefix: String,\n  suffix: String,\n  labelColor: String,\n  color: String,\n  bgColor: String,\n  filled: Boolean,\n  outlined: Boolean,\n  borderless: Boolean,\n  standout: [Boolean, String],\n  square: Boolean,\n  loading: Boolean,\n  labelSlot: Boolean,\n  bottomSlots: Boolean,\n  hideBottomSpace: Boolean,\n  rounded: Boolean,\n  dense: Boolean,\n  itemAligned: Boolean,\n  counter: Boolean,\n  clearable: Boolean,\n  clearIcon: String,\n  disable: Boolean,\n  readonly: Boolean,\n  autofocus: Boolean,\n  for: String\n};\nvar useFieldProps = {\n  ...useNonInputFieldProps,\n  maxlength: [Number, String]\n};\nvar useFieldEmits = [\"update:modelValue\", \"clear\", \"focus\", \"blur\"];\nfunction useFieldState({ requiredForAttr = true, tagProp, changeEvent = false } = {}) {\n  const { props: props4, proxy } = getCurrentInstance40();\n  const isDark = use_dark_default(props4, proxy.$q);\n  const targetUid = use_id_default({\n    required: requiredForAttr,\n    getValue: () => props4.for\n  });\n  return {\n    requiredForAttr,\n    changeEvent,\n    tag: tagProp === true ? computed57(() => props4.tag) : { value: \"label\" },\n    isDark,\n    editable: computed57(\n      () => props4.disable !== true && props4.readonly !== true\n    ),\n    innerLoading: ref30(false),\n    focused: ref30(false),\n    hasPopupOpen: false,\n    splitAttrs: use_split_attrs_default(),\n    targetUid,\n    rootRef: ref30(null),\n    targetRef: ref30(null),\n    controlRef: ref30(null)\n    /**\n         * user supplied additionals:\n    \n         * innerValue - computed\n         * floatingLabel - computed\n         * inputRef - computed\n    \n         * fieldClass - computed\n         * hasShadow - computed\n    \n         * controlEvents - Object with fn(e)\n    \n         * getControl - fn\n         * getInnerAppend - fn\n         * getControlChild - fn\n         * getShadowControl - fn\n         * showPopup - fn\n         */\n  };\n}\nfunction use_field_default(state) {\n  const { props: props4, emit, slots, attrs, proxy } = getCurrentInstance40();\n  const { $q } = proxy;\n  let focusoutTimer = null;\n  if (state.hasValue === void 0) {\n    state.hasValue = computed57(() => fieldValueIsFilled(props4.modelValue));\n  }\n  if (state.emitValue === void 0) {\n    state.emitValue = (value2) => {\n      emit(\"update:modelValue\", value2);\n    };\n  }\n  if (state.controlEvents === void 0) {\n    state.controlEvents = {\n      onFocusin: onControlFocusin,\n      onFocusout: onControlFocusout\n    };\n  }\n  Object.assign(state, {\n    clearValue,\n    onControlFocusin,\n    onControlFocusout,\n    focus\n  });\n  if (state.computedCounter === void 0) {\n    state.computedCounter = computed57(() => {\n      if (props4.counter !== false) {\n        const len = typeof props4.modelValue === \"string\" || typeof props4.modelValue === \"number\" ? (\"\" + props4.modelValue).length : Array.isArray(props4.modelValue) === true ? props4.modelValue.length : 0;\n        const max = props4.maxlength !== void 0 ? props4.maxlength : props4.maxValues;\n        return len + (max !== void 0 ? \" / \" + max : \"\");\n      }\n    });\n  }\n  const {\n    isDirtyModel,\n    hasRules,\n    hasError,\n    errorMessage,\n    resetValidation\n  } = use_validate_default(state.focused, state.innerLoading);\n  const floatingLabel = state.floatingLabel !== void 0 ? computed57(() => props4.stackLabel === true || state.focused.value === true || state.floatingLabel.value === true) : computed57(() => props4.stackLabel === true || state.focused.value === true || state.hasValue.value === true);\n  const shouldRenderBottom = computed57(\n    () => props4.bottomSlots === true || props4.hint !== void 0 || hasRules.value === true || props4.counter === true || props4.error !== null\n  );\n  const styleType = computed57(() => {\n    if (props4.filled === true) {\n      return \"filled\";\n    }\n    if (props4.outlined === true) {\n      return \"outlined\";\n    }\n    if (props4.borderless === true) {\n      return \"borderless\";\n    }\n    if (props4.standout) {\n      return \"standout\";\n    }\n    return \"standard\";\n  });\n  const classes = computed57(\n    () => `q-field row no-wrap items-start q-field--${styleType.value}` + (state.fieldClass !== void 0 ? ` ${state.fieldClass.value}` : \"\") + (props4.rounded === true ? \" q-field--rounded\" : \"\") + (props4.square === true ? \" q-field--square\" : \"\") + (floatingLabel.value === true ? \" q-field--float\" : \"\") + (hasLabel.value === true ? \" q-field--labeled\" : \"\") + (props4.dense === true ? \" q-field--dense\" : \"\") + (props4.itemAligned === true ? \" q-field--item-aligned q-item-type\" : \"\") + (state.isDark.value === true ? \" q-field--dark\" : \"\") + (state.getControl === void 0 ? \" q-field--auto-height\" : \"\") + (state.focused.value === true ? \" q-field--focused\" : \"\") + (hasError.value === true ? \" q-field--error\" : \"\") + (hasError.value === true || state.focused.value === true ? \" q-field--highlighted\" : \"\") + (props4.hideBottomSpace !== true && shouldRenderBottom.value === true ? \" q-field--with-bottom\" : \"\") + (props4.disable === true ? \" q-field--disabled\" : props4.readonly === true ? \" q-field--readonly\" : \"\")\n  );\n  const contentClass = computed57(\n    () => \"q-field__control relative-position row no-wrap\" + (props4.bgColor !== void 0 ? ` bg-${props4.bgColor}` : \"\") + (hasError.value === true ? \" text-negative\" : typeof props4.standout === \"string\" && props4.standout.length !== 0 && state.focused.value === true ? ` ${props4.standout}` : props4.color !== void 0 ? ` text-${props4.color}` : \"\")\n  );\n  const hasLabel = computed57(\n    () => props4.labelSlot === true || props4.label !== void 0\n  );\n  const labelClass = computed57(\n    () => \"q-field__label no-pointer-events absolute ellipsis\" + (props4.labelColor !== void 0 && hasError.value !== true ? ` text-${props4.labelColor}` : \"\")\n  );\n  const controlSlotScope = computed57(() => ({\n    id: state.targetUid.value,\n    editable: state.editable.value,\n    focused: state.focused.value,\n    floatingLabel: floatingLabel.value,\n    modelValue: props4.modelValue,\n    emitValue: state.emitValue\n  }));\n  const attributes = computed57(() => {\n    const acc = {};\n    if (state.targetUid.value) {\n      acc.for = state.targetUid.value;\n    }\n    if (props4.disable === true) {\n      acc[\"aria-disabled\"] = \"true\";\n    }\n    return acc;\n  });\n  function focusHandler() {\n    const el = document.activeElement;\n    let target2 = state.targetRef !== void 0 && state.targetRef.value;\n    if (target2 && (el === null || el.id !== state.targetUid.value)) {\n      target2.hasAttribute(\"tabindex\") === true || (target2 = target2.querySelector(\"[tabindex]\"));\n      if (target2 && target2 !== el) {\n        target2.focus({ preventScroll: true });\n      }\n    }\n  }\n  function focus() {\n    addFocusFn(focusHandler);\n  }\n  function blur() {\n    removeFocusFn(focusHandler);\n    const el = document.activeElement;\n    if (el !== null && state.rootRef.value.contains(el)) {\n      el.blur();\n    }\n  }\n  function onControlFocusin(e) {\n    if (focusoutTimer !== null) {\n      clearTimeout(focusoutTimer);\n      focusoutTimer = null;\n    }\n    if (state.editable.value === true && state.focused.value === false) {\n      state.focused.value = true;\n      emit(\"focus\", e);\n    }\n  }\n  function onControlFocusout(e, then) {\n    focusoutTimer !== null && clearTimeout(focusoutTimer);\n    focusoutTimer = setTimeout(() => {\n      focusoutTimer = null;\n      if (document.hasFocus() === true && (state.hasPopupOpen === true || state.controlRef === void 0 || state.controlRef.value === null || state.controlRef.value.contains(document.activeElement) !== false)) return;\n      if (state.focused.value === true) {\n        state.focused.value = false;\n        emit(\"blur\", e);\n      }\n      then !== void 0 && then();\n    });\n  }\n  function clearValue(e) {\n    stopAndPrevent(e);\n    if ($q.platform.is.mobile !== true) {\n      const el = state.targetRef !== void 0 && state.targetRef.value || state.rootRef.value;\n      el.focus();\n    } else if (state.rootRef.value.contains(document.activeElement) === true) {\n      document.activeElement.blur();\n    }\n    if (props4.type === \"file\") {\n      state.inputRef.value.value = null;\n    }\n    emit(\"update:modelValue\", null);\n    state.changeEvent === true && emit(\"change\", null);\n    emit(\"clear\", props4.modelValue);\n    nextTick9(() => {\n      const isDirty = isDirtyModel.value;\n      resetValidation();\n      isDirtyModel.value = isDirty;\n    });\n  }\n  function onClearableKeyup(evt) {\n    [13, 32].includes(evt.keyCode) && clearValue(evt);\n  }\n  function getContent() {\n    const node = [];\n    slots.prepend !== void 0 && node.push(\n      h52(\"div\", {\n        class: \"q-field__prepend q-field__marginal row no-wrap items-center\",\n        key: \"prepend\",\n        onClick: prevent\n      }, slots.prepend())\n    );\n    node.push(\n      h52(\"div\", {\n        class: \"q-field__control-container col relative-position row no-wrap q-anchor--skip\"\n      }, getControlContainer())\n    );\n    hasError.value === true && props4.noErrorIcon === false && node.push(\n      getInnerAppendNode(\"error\", [\n        h52(QIcon_default, { name: $q.iconSet.field.error, color: \"negative\" })\n      ])\n    );\n    if (props4.loading === true || state.innerLoading.value === true) {\n      node.push(\n        getInnerAppendNode(\n          \"inner-loading-append\",\n          slots.loading !== void 0 ? slots.loading() : [h52(QSpinner_default, { color: props4.color })]\n        )\n      );\n    } else if (props4.clearable === true && state.hasValue.value === true && state.editable.value === true) {\n      node.push(\n        getInnerAppendNode(\"inner-clearable-append\", [\n          h52(QIcon_default, {\n            class: \"q-field__focusable-action\",\n            name: props4.clearIcon || $q.iconSet.field.clear,\n            tabindex: 0,\n            role: \"button\",\n            \"aria-hidden\": \"false\",\n            \"aria-label\": $q.lang.label.clear,\n            onKeyup: onClearableKeyup,\n            onClick: clearValue\n          })\n        ])\n      );\n    }\n    slots.append !== void 0 && node.push(\n      h52(\"div\", {\n        class: \"q-field__append q-field__marginal row no-wrap items-center\",\n        key: \"append\",\n        onClick: prevent\n      }, slots.append())\n    );\n    state.getInnerAppend !== void 0 && node.push(\n      getInnerAppendNode(\"inner-append\", state.getInnerAppend())\n    );\n    state.getControlChild !== void 0 && node.push(\n      state.getControlChild()\n    );\n    return node;\n  }\n  function getControlContainer() {\n    const node = [];\n    props4.prefix !== void 0 && props4.prefix !== null && node.push(\n      h52(\"div\", {\n        class: \"q-field__prefix no-pointer-events row items-center\"\n      }, props4.prefix)\n    );\n    if (state.getShadowControl !== void 0 && state.hasShadow.value === true) {\n      node.push(\n        state.getShadowControl()\n      );\n    }\n    if (state.getControl !== void 0) {\n      node.push(state.getControl());\n    } else if (slots.rawControl !== void 0) {\n      node.push(slots.rawControl());\n    } else if (slots.control !== void 0) {\n      node.push(\n        h52(\"div\", {\n          ref: state.targetRef,\n          class: \"q-field__native row\",\n          tabindex: -1,\n          ...state.splitAttrs.attributes.value,\n          \"data-autofocus\": props4.autofocus === true || void 0\n        }, slots.control(controlSlotScope.value))\n      );\n    }\n    hasLabel.value === true && node.push(\n      h52(\"div\", {\n        class: labelClass.value\n      }, hSlot(slots.label, props4.label))\n    );\n    props4.suffix !== void 0 && props4.suffix !== null && node.push(\n      h52(\"div\", {\n        class: \"q-field__suffix no-pointer-events row items-center\"\n      }, props4.suffix)\n    );\n    return node.concat(hSlot(slots.default));\n  }\n  function getBottom() {\n    let msg, key;\n    if (hasError.value === true) {\n      if (errorMessage.value !== null) {\n        msg = [h52(\"div\", { role: \"alert\" }, errorMessage.value)];\n        key = `q--slot-error-${errorMessage.value}`;\n      } else {\n        msg = hSlot(slots.error);\n        key = \"q--slot-error\";\n      }\n    } else if (props4.hideHint !== true || state.focused.value === true) {\n      if (props4.hint !== void 0) {\n        msg = [h52(\"div\", props4.hint)];\n        key = `q--slot-hint-${props4.hint}`;\n      } else {\n        msg = hSlot(slots.hint);\n        key = \"q--slot-hint\";\n      }\n    }\n    const hasCounter = props4.counter === true || slots.counter !== void 0;\n    if (props4.hideBottomSpace === true && hasCounter === false && msg === void 0) return;\n    const main = h52(\"div\", {\n      key,\n      class: \"q-field__messages col\"\n    }, msg);\n    return h52(\"div\", {\n      class: \"q-field__bottom row items-start q-field__bottom--\" + (props4.hideBottomSpace !== true ? \"animated\" : \"stale\"),\n      onClick: prevent\n    }, [\n      props4.hideBottomSpace === true ? main : h52(Transition8, { name: \"q-transition--field-message\" }, () => main),\n      hasCounter === true ? h52(\"div\", {\n        class: \"q-field__counter\"\n      }, slots.counter !== void 0 ? slots.counter() : state.computedCounter.value) : null\n    ]);\n  }\n  function getInnerAppendNode(key, content) {\n    return content === null ? null : h52(\"div\", {\n      key,\n      class: \"q-field__append q-field__marginal row no-wrap items-center q-anchor--skip\"\n    }, content);\n  }\n  let shouldActivate = false;\n  onDeactivated4(() => {\n    shouldActivate = true;\n  });\n  onActivated2(() => {\n    shouldActivate === true && props4.autofocus === true && proxy.focus();\n  });\n  props4.autofocus === true && onMounted14(() => {\n    proxy.focus();\n  });\n  onBeforeUnmount23(() => {\n    focusoutTimer !== null && clearTimeout(focusoutTimer);\n  });\n  Object.assign(proxy, { focus, blur });\n  return function renderField() {\n    const labelAttrs = state.getControl === void 0 && slots.control === void 0 ? {\n      ...state.splitAttrs.attributes.value,\n      \"data-autofocus\": props4.autofocus === true || void 0,\n      ...attributes.value\n    } : attributes.value;\n    return h52(state.tag.value, {\n      ref: state.rootRef,\n      class: [\n        classes.value,\n        attrs.class\n      ],\n      style: attrs.style,\n      ...labelAttrs\n    }, [\n      slots.before !== void 0 ? h52(\"div\", {\n        class: \"q-field__before q-field__marginal row no-wrap items-center\",\n        onClick: prevent\n      }, slots.before()) : null,\n      h52(\"div\", {\n        class: \"q-field__inner relative-position col self-stretch\"\n      }, [\n        h52(\"div\", {\n          ref: state.controlRef,\n          class: contentClass.value,\n          tabindex: -1,\n          ...state.controlEvents\n        }, getContent()),\n        shouldRenderBottom.value === true ? getBottom() : null\n      ]),\n      slots.after !== void 0 ? h52(\"div\", {\n        class: \"q-field__after q-field__marginal row no-wrap items-center\",\n        onClick: prevent\n      }, slots.after()) : null\n    ]);\n  };\n}\n\n// src/components/field/QField.js\nvar QField_default = createComponent({\n  name: \"QField\",\n  inheritAttrs: false,\n  props: {\n    ...useFieldProps,\n    tag: {\n      type: String,\n      default: \"label\"\n    }\n  },\n  emits: useFieldEmits,\n  setup() {\n    return use_field_default(\n      useFieldState({ tagProp: true })\n    );\n  }\n});\n\n// src/components/file/QFile.js\nimport { h as h54, ref as ref32, computed as computed60, getCurrentInstance as getCurrentInstance42 } from \"vue\";\n\n// src/composables/private.use-file/use-file.js\nimport { h as h53, ref as ref31, computed as computed58, getCurrentInstance as getCurrentInstance41 } from \"vue\";\nfunction filterFiles(files, rejectedFiles, failedPropValidation, filterFn) {\n  const acceptedFiles = [];\n  files.forEach((file) => {\n    if (filterFn(file) === true) {\n      acceptedFiles.push(file);\n    } else {\n      rejectedFiles.push({ failedPropValidation, file });\n    }\n  });\n  return acceptedFiles;\n}\nfunction stopAndPreventDrag(e) {\n  e && e.dataTransfer && (e.dataTransfer.dropEffect = \"copy\");\n  stopAndPrevent(e);\n}\nvar useFileProps = {\n  multiple: Boolean,\n  accept: String,\n  capture: String,\n  maxFileSize: [Number, String],\n  maxTotalSize: [Number, String],\n  maxFiles: [Number, String],\n  filter: Function\n};\nvar useFileEmits = [\"rejected\"];\nfunction use_file_default({\n  editable,\n  dnd,\n  getFileInput,\n  addFilesToQueue\n}) {\n  const { props: props4, emit, proxy } = getCurrentInstance41();\n  const dndRef = ref31(null);\n  const extensions = computed58(() => props4.accept !== void 0 ? props4.accept.split(\",\").map((ext) => {\n    ext = ext.trim();\n    if (ext === \"*\") {\n      return \"*/\";\n    } else if (ext.endsWith(\"/*\")) {\n      ext = ext.slice(0, ext.length - 1);\n    }\n    return ext.toUpperCase();\n  }) : null);\n  const maxFilesNumber = computed58(() => parseInt(props4.maxFiles, 10));\n  const maxTotalSizeNumber = computed58(() => parseInt(props4.maxTotalSize, 10));\n  function pickFiles(e) {\n    if (editable.value) {\n      if (e !== Object(e)) {\n        e = { target: null };\n      }\n      if (e.target !== null && e.target.matches('input[type=\"file\"]') === true) {\n        e.clientX === 0 && e.clientY === 0 && stop(e);\n      } else {\n        const input = getFileInput();\n        input && input !== e.target && input.click(e);\n      }\n    }\n  }\n  function addFiles(files) {\n    if (editable.value && files) {\n      addFilesToQueue(null, files);\n    }\n  }\n  function processFiles(e, filesToProcess, currentFileList, append) {\n    let files = Array.from(filesToProcess || e.target.files);\n    const rejectedFiles = [];\n    const done = () => {\n      if (rejectedFiles.length !== 0) {\n        emit(\"rejected\", rejectedFiles);\n      }\n    };\n    if (props4.accept !== void 0 && extensions.value.indexOf(\"*/\") === -1) {\n      files = filterFiles(files, rejectedFiles, \"accept\", (file) => {\n        return extensions.value.some((ext) => file.type.toUpperCase().startsWith(ext) || file.name.toUpperCase().endsWith(ext));\n      });\n      if (files.length === 0) {\n        return done();\n      }\n    }\n    if (props4.maxFileSize !== void 0) {\n      const maxFileSize = parseInt(props4.maxFileSize, 10);\n      files = filterFiles(files, rejectedFiles, \"max-file-size\", (file) => {\n        return file.size <= maxFileSize;\n      });\n      if (files.length === 0) {\n        return done();\n      }\n    }\n    if (props4.multiple !== true && files.length !== 0) {\n      files = [files[0]];\n    }\n    files.forEach((file) => {\n      file.__key = file.webkitRelativePath + file.lastModified + file.name + file.size;\n    });\n    if (append === true) {\n      const filenameMap = currentFileList.map((entry) => entry.__key);\n      files = filterFiles(files, rejectedFiles, \"duplicate\", (file) => {\n        return filenameMap.includes(file.__key) === false;\n      });\n    }\n    if (files.length === 0) {\n      return done();\n    }\n    if (props4.maxTotalSize !== void 0) {\n      let size2 = append === true ? currentFileList.reduce((total, file) => total + file.size, 0) : 0;\n      files = filterFiles(files, rejectedFiles, \"max-total-size\", (file) => {\n        size2 += file.size;\n        return size2 <= maxTotalSizeNumber.value;\n      });\n      if (files.length === 0) {\n        return done();\n      }\n    }\n    if (typeof props4.filter === \"function\") {\n      const filteredFiles = props4.filter(files);\n      files = filterFiles(files, rejectedFiles, \"filter\", (file) => {\n        return filteredFiles.includes(file);\n      });\n    }\n    if (props4.maxFiles !== void 0) {\n      let filesNumber = append === true ? currentFileList.length : 0;\n      files = filterFiles(files, rejectedFiles, \"max-files\", () => {\n        filesNumber++;\n        return filesNumber <= maxFilesNumber.value;\n      });\n      if (files.length === 0) {\n        return done();\n      }\n    }\n    done();\n    if (files.length !== 0) {\n      return files;\n    }\n  }\n  function onDragover(e) {\n    stopAndPreventDrag(e);\n    dnd.value !== true && (dnd.value = true);\n  }\n  function onDragleave(e) {\n    stopAndPrevent(e);\n    const gone = e.relatedTarget !== null || client.is.safari !== true ? e.relatedTarget !== dndRef.value : document.elementsFromPoint(e.clientX, e.clientY).includes(dndRef.value) === false;\n    gone === true && (dnd.value = false);\n  }\n  function onDrop(e) {\n    stopAndPreventDrag(e);\n    const files = e.dataTransfer.files;\n    if (files.length !== 0) {\n      addFilesToQueue(null, files);\n    }\n    dnd.value = false;\n  }\n  function getDndNode(type) {\n    if (dnd.value === true) {\n      return h53(\"div\", {\n        ref: dndRef,\n        class: `q-${type}__dnd absolute-full`,\n        onDragenter: stopAndPreventDrag,\n        onDragover: stopAndPreventDrag,\n        onDragleave,\n        onDrop\n      });\n    }\n  }\n  Object.assign(proxy, { pickFiles, addFiles });\n  return {\n    pickFiles,\n    addFiles,\n    onDragover,\n    onDragleave,\n    processFiles,\n    getDndNode,\n    maxFilesNumber,\n    maxTotalSizeNumber\n  };\n}\n\n// src/composables/private.use-file/use-file-dom-props.js\nimport { computed as computed59 } from \"vue\";\nfunction use_file_dom_props_default(props4, typeGuard) {\n  function getFormDomProps() {\n    const model = props4.modelValue;\n    try {\n      const dt = \"DataTransfer\" in window ? new DataTransfer() : \"ClipboardEvent\" in window ? new ClipboardEvent(\"\").clipboardData : void 0;\n      if (Object(model) === model) {\n        (\"length\" in model ? Array.from(model) : [model]).forEach((file) => {\n          dt.items.add(file);\n        });\n      }\n      return {\n        files: dt.files\n      };\n    } catch (e) {\n      return {\n        files: void 0\n      };\n    }\n  }\n  return typeGuard === true ? computed59(() => {\n    if (props4.type !== \"file\") return;\n    return getFormDomProps();\n  }) : computed59(getFormDomProps);\n}\n\n// src/components/file/QFile.js\nvar QFile_default = createComponent({\n  name: \"QFile\",\n  inheritAttrs: false,\n  props: {\n    ...useNonInputFieldProps,\n    ...useFormProps,\n    ...useFileProps,\n    /* SSR does not know about File & FileList */\n    modelValue: false ? {} : [File, FileList, Array],\n    append: Boolean,\n    useChips: Boolean,\n    displayValue: [String, Number],\n    tabindex: {\n      type: [String, Number],\n      default: 0\n    },\n    counterLabel: Function,\n    inputClass: [Array, String, Object],\n    inputStyle: [Array, String, Object]\n  },\n  emits: [\n    ...useFieldEmits,\n    ...useFileEmits\n  ],\n  setup(props4, { slots, emit, attrs }) {\n    const { proxy } = getCurrentInstance42();\n    const state = useFieldState();\n    const inputRef = ref32(null);\n    const dnd = ref32(false);\n    const nameProp = useFormInputNameAttr(props4);\n    const {\n      pickFiles,\n      onDragover,\n      onDragleave,\n      processFiles,\n      getDndNode\n    } = use_file_default({ editable: state.editable, dnd, getFileInput, addFilesToQueue });\n    const formDomProps = use_file_dom_props_default(props4);\n    const innerValue = computed60(() => Object(props4.modelValue) === props4.modelValue ? \"length\" in props4.modelValue ? Array.from(props4.modelValue) : [props4.modelValue] : []);\n    const hasValue = computed60(() => fieldValueIsFilled(innerValue.value));\n    const selectedString = computed60(\n      () => innerValue.value.map((file) => file.name).join(\", \")\n    );\n    const totalSize = computed60(\n      () => humanStorageSize(\n        innerValue.value.reduce((acc, file) => acc + file.size, 0)\n      )\n    );\n    const counterProps = computed60(() => ({\n      totalSize: totalSize.value,\n      filesNumber: innerValue.value.length,\n      maxFiles: props4.maxFiles\n    }));\n    const inputAttrs = computed60(() => ({\n      tabindex: -1,\n      type: \"file\",\n      title: \"\",\n      // try to remove default tooltip,\n      accept: props4.accept,\n      capture: props4.capture,\n      name: nameProp.value,\n      ...attrs,\n      id: state.targetUid.value,\n      disabled: state.editable.value !== true\n    }));\n    const fieldClass = computed60(\n      () => \"q-file q-field--auto-height\" + (dnd.value === true ? \" q-file--dnd\" : \"\")\n    );\n    const isAppending = computed60(\n      () => props4.multiple === true && props4.append === true\n    );\n    function removeAtIndex(index) {\n      const files = innerValue.value.slice();\n      files.splice(index, 1);\n      emitValue(files);\n    }\n    function removeFile(file) {\n      const index = innerValue.value.indexOf(file);\n      if (index !== -1) {\n        removeAtIndex(index);\n      }\n    }\n    function emitValue(files) {\n      emit(\"update:modelValue\", props4.multiple === true ? files : files[0]);\n    }\n    function onKeydown2(e) {\n      e.keyCode === 13 && prevent(e);\n    }\n    function onKeyup2(e) {\n      if (e.keyCode === 13 || e.keyCode === 32) {\n        pickFiles(e);\n      }\n    }\n    function getFileInput() {\n      return inputRef.value;\n    }\n    function addFilesToQueue(e, fileList) {\n      const files = processFiles(e, fileList, innerValue.value, isAppending.value);\n      const fileInput = getFileInput();\n      if (fileInput !== void 0 && fileInput !== null) {\n        fileInput.value = \"\";\n      }\n      if (files === void 0) return;\n      if (props4.multiple === true ? props4.modelValue && files.every((f) => innerValue.value.includes(f)) : props4.modelValue === files[0]) return;\n      emitValue(\n        isAppending.value === true ? innerValue.value.concat(files) : files\n      );\n    }\n    function getFiller() {\n      return [\n        h54(\"input\", {\n          class: [props4.inputClass, \"q-file__filler\"],\n          style: props4.inputStyle\n        })\n      ];\n    }\n    function getSelection() {\n      if (slots.file !== void 0) {\n        return innerValue.value.length === 0 ? getFiller() : innerValue.value.map(\n          (file, index) => slots.file({ index, file, ref: this })\n        );\n      }\n      if (slots.selected !== void 0) {\n        return innerValue.value.length === 0 ? getFiller() : slots.selected({ files: innerValue.value, ref: this });\n      }\n      if (props4.useChips === true) {\n        return innerValue.value.length === 0 ? getFiller() : innerValue.value.map((file, i) => h54(QChip_default, {\n          key: \"file-\" + i,\n          removable: state.editable.value,\n          dense: true,\n          textColor: props4.color,\n          tabindex: props4.tabindex,\n          onRemove: () => {\n            removeAtIndex(i);\n          }\n        }, () => h54(\"span\", {\n          class: \"ellipsis\",\n          textContent: file.name\n        })));\n      }\n      const textContent = props4.displayValue !== void 0 ? props4.displayValue : selectedString.value;\n      return textContent.length !== 0 ? [\n        h54(\"div\", {\n          class: props4.inputClass,\n          style: props4.inputStyle,\n          textContent\n        })\n      ] : getFiller();\n    }\n    function getInput() {\n      const data = {\n        ref: inputRef,\n        ...inputAttrs.value,\n        ...formDomProps.value,\n        class: \"q-field__input fit absolute-full cursor-pointer\",\n        onChange: addFilesToQueue\n      };\n      if (props4.multiple === true) {\n        data.multiple = true;\n      }\n      return h54(\"input\", data);\n    }\n    Object.assign(state, {\n      fieldClass,\n      emitValue,\n      hasValue,\n      inputRef,\n      innerValue,\n      floatingLabel: computed60(\n        () => hasValue.value === true || fieldValueIsFilled(props4.displayValue)\n      ),\n      computedCounter: computed60(() => {\n        if (props4.counterLabel !== void 0) {\n          return props4.counterLabel(counterProps.value);\n        }\n        const max = props4.maxFiles;\n        return `${innerValue.value.length}${max !== void 0 ? \" / \" + max : \"\"} (${totalSize.value})`;\n      }),\n      getControlChild: () => getDndNode(\"file\"),\n      getControl: () => {\n        const data = {\n          ref: state.targetRef,\n          class: \"q-field__native row items-center cursor-pointer\",\n          tabindex: props4.tabindex\n        };\n        if (state.editable.value === true) {\n          Object.assign(data, { onDragover, onDragleave, onKeydown: onKeydown2, onKeyup: onKeyup2 });\n        }\n        return h54(\"div\", data, [getInput()].concat(getSelection()));\n      }\n    });\n    Object.assign(proxy, {\n      removeAtIndex,\n      removeFile,\n      getNativeElement: () => inputRef.value\n      // deprecated\n    });\n    injectProp(proxy, \"nativeEl\", () => inputRef.value);\n    return use_field_default(state);\n  }\n});\n\n// src/components/footer/QFooter.js\nimport { h as h55, ref as ref33, computed as computed61, watch as watch21, onBeforeUnmount as onBeforeUnmount24, inject as inject5, getCurrentInstance as getCurrentInstance43 } from \"vue\";\nvar QFooter_default = createComponent({\n  name: \"QFooter\",\n  props: {\n    modelValue: {\n      type: Boolean,\n      default: true\n    },\n    reveal: Boolean,\n    bordered: Boolean,\n    elevated: Boolean,\n    heightHint: {\n      type: [String, Number],\n      default: 50\n    }\n  },\n  emits: [\"reveal\", \"focusin\"],\n  setup(props4, { slots, emit }) {\n    const { proxy: { $q } } = getCurrentInstance43();\n    const $layout = inject5(layoutKey, emptyRenderFn);\n    if ($layout === emptyRenderFn) {\n      console.error(\"QFooter needs to be child of QLayout\");\n      return emptyRenderFn;\n    }\n    const size2 = ref33(parseInt(props4.heightHint, 10));\n    const revealed = ref33(true);\n    const windowHeight = ref33(\n      isRuntimeSsrPreHydration.value === true || $layout.isContainer.value === true ? 0 : window.innerHeight\n    );\n    const fixed = computed61(\n      () => props4.reveal === true || $layout.view.value.indexOf(\"F\") !== -1 || $q.platform.is.ios && $layout.isContainer.value === true\n    );\n    const containerHeight = computed61(() => $layout.isContainer.value === true ? $layout.containerHeight.value : windowHeight.value);\n    const offset2 = computed61(() => {\n      if (props4.modelValue !== true) {\n        return 0;\n      }\n      if (fixed.value === true) {\n        return revealed.value === true ? size2.value : 0;\n      }\n      const offset3 = $layout.scroll.value.position + containerHeight.value + size2.value - $layout.height.value;\n      return offset3 > 0 ? offset3 : 0;\n    });\n    const hidden = computed61(\n      () => props4.modelValue !== true || fixed.value === true && revealed.value !== true\n    );\n    const revealOnFocus = computed61(\n      () => props4.modelValue === true && hidden.value === true && props4.reveal === true\n    );\n    const classes = computed61(\n      () => \"q-footer q-layout__section--marginal \" + (fixed.value === true ? \"fixed\" : \"absolute\") + \"-bottom\" + (props4.bordered === true ? \" q-footer--bordered\" : \"\") + (hidden.value === true ? \" q-footer--hidden\" : \"\") + (props4.modelValue !== true ? \" q-layout--prevent-focus\" + (fixed.value !== true ? \" hidden\" : \"\") : \"\")\n    );\n    const style2 = computed61(() => {\n      const view = $layout.rows.value.bottom, css2 = {};\n      if (view[0] === \"l\" && $layout.left.space === true) {\n        css2[$q.lang.rtl === true ? \"right\" : \"left\"] = `${$layout.left.size}px`;\n      }\n      if (view[2] === \"r\" && $layout.right.space === true) {\n        css2[$q.lang.rtl === true ? \"left\" : \"right\"] = `${$layout.right.size}px`;\n      }\n      return css2;\n    });\n    function updateLayout(prop, val) {\n      $layout.update(\"footer\", prop, val);\n    }\n    function updateLocal(prop, val) {\n      if (prop.value !== val) {\n        prop.value = val;\n      }\n    }\n    function onResize({ height: height2 }) {\n      updateLocal(size2, height2);\n      updateLayout(\"size\", height2);\n    }\n    function updateRevealed() {\n      if (props4.reveal !== true) return;\n      const { direction, position: position2, inflectionPoint } = $layout.scroll.value;\n      updateLocal(revealed, direction === \"up\" || position2 - inflectionPoint < 100 || $layout.height.value - containerHeight.value - position2 - size2.value < 300);\n    }\n    function onFocusin(evt) {\n      if (revealOnFocus.value === true) {\n        updateLocal(revealed, true);\n      }\n      emit(\"focusin\", evt);\n    }\n    watch21(() => props4.modelValue, (val) => {\n      updateLayout(\"space\", val);\n      updateLocal(revealed, true);\n      $layout.animate();\n    });\n    watch21(offset2, (val) => {\n      updateLayout(\"offset\", val);\n    });\n    watch21(() => props4.reveal, (val) => {\n      val === false && updateLocal(revealed, props4.modelValue);\n    });\n    watch21(revealed, (val) => {\n      $layout.animate();\n      emit(\"reveal\", val);\n    });\n    watch21([size2, $layout.scroll, $layout.height], updateRevealed);\n    watch21(() => $q.screen.height, (val) => {\n      $layout.isContainer.value !== true && updateLocal(windowHeight, val);\n    });\n    const instance = {};\n    $layout.instances.footer = instance;\n    props4.modelValue === true && updateLayout(\"size\", size2.value);\n    updateLayout(\"space\", props4.modelValue);\n    updateLayout(\"offset\", offset2.value);\n    onBeforeUnmount24(() => {\n      if ($layout.instances.footer === instance) {\n        $layout.instances.footer = void 0;\n        updateLayout(\"size\", 0);\n        updateLayout(\"offset\", 0);\n        updateLayout(\"space\", false);\n      }\n    });\n    return () => {\n      const child = hMergeSlot(slots.default, [\n        h55(QResizeObserver_default, {\n          debounce: 0,\n          onResize\n        })\n      ]);\n      props4.elevated === true && child.push(\n        h55(\"div\", {\n          class: \"q-layout__shadow absolute-full overflow-hidden no-pointer-events\"\n        })\n      );\n      return h55(\"footer\", {\n        class: classes.value,\n        style: style2.value,\n        onFocusin\n      }, child);\n    };\n  }\n});\n\n// src/components/form/QForm.js\nimport { h as h56, ref as ref34, onActivated as onActivated3, onDeactivated as onDeactivated5, onMounted as onMounted15, getCurrentInstance as getCurrentInstance44, nextTick as nextTick10, provide as provide3 } from \"vue\";\nvar QForm_default = createComponent({\n  name: \"QForm\",\n  props: {\n    autofocus: Boolean,\n    noErrorFocus: Boolean,\n    noResetFocus: Boolean,\n    greedy: Boolean,\n    onSubmit: Function\n  },\n  emits: [\"reset\", \"validationSuccess\", \"validationError\"],\n  setup(props4, { slots, emit }) {\n    const vm2 = getCurrentInstance44();\n    const rootRef = ref34(null);\n    let validateIndex = 0;\n    const registeredComponents = [];\n    function validate(shouldFocus) {\n      const focus2 = typeof shouldFocus === \"boolean\" ? shouldFocus : props4.noErrorFocus !== true;\n      const index = ++validateIndex;\n      const emitEvent = (res, ref73) => {\n        emit(`validation${res === true ? \"Success\" : \"Error\"}`, ref73);\n      };\n      const validateComponent = (comp) => {\n        const valid = comp.validate();\n        return typeof valid.then === \"function\" ? valid.then(\n          (valid2) => ({ valid: valid2, comp }),\n          (err) => ({ valid: false, comp, err })\n        ) : Promise.resolve({ valid, comp });\n      };\n      const errorsPromise = props4.greedy === true ? Promise.all(registeredComponents.map(validateComponent)).then((res) => res.filter((r) => r.valid !== true)) : registeredComponents.reduce(\n        (acc, comp) => acc.then(() => {\n          return validateComponent(comp).then((r) => {\n            if (r.valid === false) {\n              return Promise.reject(r);\n            }\n          });\n        }),\n        Promise.resolve()\n      ).catch((error) => [error]);\n      return errorsPromise.then((errors) => {\n        if (errors === void 0 || errors.length === 0) {\n          index === validateIndex && emitEvent(true);\n          return true;\n        }\n        if (index === validateIndex) {\n          const { comp, err } = errors[0];\n          err !== void 0 && console.error(err);\n          emitEvent(false, comp);\n          if (focus2 === true) {\n            const activeError = errors.find(({ comp: comp2 }) => typeof comp2.focus === \"function\" && vmIsDestroyed(comp2.$) === false);\n            if (activeError !== void 0) {\n              activeError.comp.focus();\n            }\n          }\n        }\n        return false;\n      });\n    }\n    function resetValidation() {\n      validateIndex++;\n      registeredComponents.forEach((comp) => {\n        typeof comp.resetValidation === \"function\" && comp.resetValidation();\n      });\n    }\n    function submit(evt) {\n      evt !== void 0 && stopAndPrevent(evt);\n      const index = validateIndex + 1;\n      validate().then((val) => {\n        if (index === validateIndex && val === true) {\n          if (props4.onSubmit !== void 0) {\n            emit(\"submit\", evt);\n          } else if (evt !== void 0 && evt.target !== void 0 && typeof evt.target.submit === \"function\") {\n            evt.target.submit();\n          }\n        }\n      });\n    }\n    function reset(evt) {\n      evt !== void 0 && stopAndPrevent(evt);\n      emit(\"reset\");\n      nextTick10(() => {\n        resetValidation();\n        if (props4.autofocus === true && props4.noResetFocus !== true) {\n          focus();\n        }\n      });\n    }\n    function focus() {\n      addFocusFn(() => {\n        if (rootRef.value === null) return;\n        const target2 = rootRef.value.querySelector(\"[autofocus][tabindex], [data-autofocus][tabindex]\") || rootRef.value.querySelector(\"[autofocus] [tabindex], [data-autofocus] [tabindex]\") || rootRef.value.querySelector(\"[autofocus], [data-autofocus]\") || Array.prototype.find.call(rootRef.value.querySelectorAll(\"[tabindex]\"), (el) => el.tabIndex !== -1);\n        target2 !== null && target2 !== void 0 && target2.focus({ preventScroll: true });\n      });\n    }\n    provide3(formKey, {\n      bindComponent(vmProxy) {\n        registeredComponents.push(vmProxy);\n      },\n      unbindComponent(vmProxy) {\n        const index = registeredComponents.indexOf(vmProxy);\n        if (index !== -1) {\n          registeredComponents.splice(index, 1);\n        }\n      }\n    });\n    let shouldActivate = false;\n    onDeactivated5(() => {\n      shouldActivate = true;\n    });\n    onActivated3(() => {\n      shouldActivate === true && props4.autofocus === true && focus();\n    });\n    onMounted15(() => {\n      props4.autofocus === true && focus();\n    });\n    Object.assign(vm2.proxy, {\n      validate,\n      resetValidation,\n      submit,\n      reset,\n      focus,\n      getValidationComponents: () => registeredComponents\n    });\n    return () => h56(\"form\", {\n      class: \"q-form\",\n      ref: rootRef,\n      onSubmit: submit,\n      onReset: reset\n    }, hSlot(slots.default));\n  }\n});\n\n// src/components/form/QFormChildMixin.js\nvar QFormChildMixin_default = {\n  inject: {\n    [formKey]: {\n      default: noop\n    }\n  },\n  watch: {\n    disable(val) {\n      const $form = this.$.provides[formKey];\n      if ($form !== void 0) {\n        if (val === true) {\n          this.resetValidation();\n          $form.unbindComponent(this);\n        } else {\n          $form.bindComponent(this);\n        }\n      }\n    }\n  },\n  methods: {\n    validate() {\n    },\n    resetValidation() {\n    }\n  },\n  mounted() {\n    const $form = this.$.provides[formKey];\n    $form !== void 0 && this.disable !== true && $form.bindComponent(this);\n  },\n  beforeUnmount() {\n    const $form = this.$.provides[formKey];\n    $form !== void 0 && this.disable !== true && $form.unbindComponent(this);\n  }\n};\n\n// src/components/header/QHeader.js\nimport { h as h57, ref as ref35, computed as computed62, watch as watch22, onBeforeUnmount as onBeforeUnmount25, inject as inject6, getCurrentInstance as getCurrentInstance45 } from \"vue\";\nvar QHeader_default = createComponent({\n  name: \"QHeader\",\n  props: {\n    modelValue: {\n      type: Boolean,\n      default: true\n    },\n    reveal: Boolean,\n    revealOffset: {\n      type: Number,\n      default: 250\n    },\n    bordered: Boolean,\n    elevated: Boolean,\n    heightHint: {\n      type: [String, Number],\n      default: 50\n    }\n  },\n  emits: [\"reveal\", \"focusin\"],\n  setup(props4, { slots, emit }) {\n    const { proxy: { $q } } = getCurrentInstance45();\n    const $layout = inject6(layoutKey, emptyRenderFn);\n    if ($layout === emptyRenderFn) {\n      console.error(\"QHeader needs to be child of QLayout\");\n      return emptyRenderFn;\n    }\n    const size2 = ref35(parseInt(props4.heightHint, 10));\n    const revealed = ref35(true);\n    const fixed = computed62(\n      () => props4.reveal === true || $layout.view.value.indexOf(\"H\") !== -1 || $q.platform.is.ios && $layout.isContainer.value === true\n    );\n    const offset2 = computed62(() => {\n      if (props4.modelValue !== true) {\n        return 0;\n      }\n      if (fixed.value === true) {\n        return revealed.value === true ? size2.value : 0;\n      }\n      const offset3 = size2.value - $layout.scroll.value.position;\n      return offset3 > 0 ? offset3 : 0;\n    });\n    const hidden = computed62(\n      () => props4.modelValue !== true || fixed.value === true && revealed.value !== true\n    );\n    const revealOnFocus = computed62(\n      () => props4.modelValue === true && hidden.value === true && props4.reveal === true\n    );\n    const classes = computed62(\n      () => \"q-header q-layout__section--marginal \" + (fixed.value === true ? \"fixed\" : \"absolute\") + \"-top\" + (props4.bordered === true ? \" q-header--bordered\" : \"\") + (hidden.value === true ? \" q-header--hidden\" : \"\") + (props4.modelValue !== true ? \" q-layout--prevent-focus\" : \"\")\n    );\n    const style2 = computed62(() => {\n      const view = $layout.rows.value.top, css2 = {};\n      if (view[0] === \"l\" && $layout.left.space === true) {\n        css2[$q.lang.rtl === true ? \"right\" : \"left\"] = `${$layout.left.size}px`;\n      }\n      if (view[2] === \"r\" && $layout.right.space === true) {\n        css2[$q.lang.rtl === true ? \"left\" : \"right\"] = `${$layout.right.size}px`;\n      }\n      return css2;\n    });\n    function updateLayout(prop, val) {\n      $layout.update(\"header\", prop, val);\n    }\n    function updateLocal(prop, val) {\n      if (prop.value !== val) {\n        prop.value = val;\n      }\n    }\n    function onResize({ height: height2 }) {\n      updateLocal(size2, height2);\n      updateLayout(\"size\", height2);\n    }\n    function onFocusin(evt) {\n      if (revealOnFocus.value === true) {\n        updateLocal(revealed, true);\n      }\n      emit(\"focusin\", evt);\n    }\n    watch22(() => props4.modelValue, (val) => {\n      updateLayout(\"space\", val);\n      updateLocal(revealed, true);\n      $layout.animate();\n    });\n    watch22(offset2, (val) => {\n      updateLayout(\"offset\", val);\n    });\n    watch22(() => props4.reveal, (val) => {\n      val === false && updateLocal(revealed, props4.modelValue);\n    });\n    watch22(revealed, (val) => {\n      $layout.animate();\n      emit(\"reveal\", val);\n    });\n    watch22($layout.scroll, (scroll) => {\n      props4.reveal === true && updateLocal(\n        revealed,\n        scroll.direction === \"up\" || scroll.position <= props4.revealOffset || scroll.position - scroll.inflectionPoint < 100\n      );\n    });\n    const instance = {};\n    $layout.instances.header = instance;\n    props4.modelValue === true && updateLayout(\"size\", size2.value);\n    updateLayout(\"space\", props4.modelValue);\n    updateLayout(\"offset\", offset2.value);\n    onBeforeUnmount25(() => {\n      if ($layout.instances.header === instance) {\n        $layout.instances.header = void 0;\n        updateLayout(\"size\", 0);\n        updateLayout(\"offset\", 0);\n        updateLayout(\"space\", false);\n      }\n    });\n    return () => {\n      const child = hUniqueSlot(slots.default, []);\n      props4.elevated === true && child.push(\n        h57(\"div\", {\n          class: \"q-layout__shadow absolute-full overflow-hidden no-pointer-events\"\n        })\n      );\n      child.push(\n        h57(QResizeObserver_default, {\n          debounce: 0,\n          onResize\n        })\n      );\n      return h57(\"header\", {\n        class: classes.value,\n        style: style2.value,\n        onFocusin\n      }, child);\n    };\n  }\n});\n\n// src/components/img/QImg.js\nimport { h as h58, ref as ref36, computed as computed64, watch as watch23, onMounted as onMounted16, Transition as Transition9, getCurrentInstance as getCurrentInstance46 } from \"vue\";\n\n// src/composables/private.use-ratio/use-ratio.js\nimport { computed as computed63 } from \"vue\";\nvar useRatioProps = {\n  ratio: [String, Number]\n};\nfunction use_ratio_default(props4, naturalRatio) {\n  return computed63(() => {\n    const ratio = Number(\n      props4.ratio || (naturalRatio !== void 0 ? naturalRatio.value : void 0)\n    );\n    return isNaN(ratio) !== true && ratio > 0 ? { paddingBottom: `${100 / ratio}%` } : null;\n  });\n}\n\n// src/components/img/QImg.js\nvar defaultRatio = 1.7778;\nvar QImg_default = createComponent({\n  name: \"QImg\",\n  props: {\n    ...useRatioProps,\n    src: String,\n    srcset: String,\n    sizes: String,\n    alt: String,\n    crossorigin: String,\n    decoding: String,\n    referrerpolicy: String,\n    draggable: Boolean,\n    loading: {\n      type: String,\n      default: \"lazy\"\n    },\n    loadingShowDelay: {\n      type: [Number, String],\n      default: 0\n    },\n    fetchpriority: {\n      type: String,\n      default: \"auto\"\n    },\n    width: String,\n    height: String,\n    initialRatio: {\n      type: [Number, String],\n      default: defaultRatio\n    },\n    placeholderSrc: String,\n    errorSrc: String,\n    fit: {\n      type: String,\n      default: \"cover\"\n    },\n    position: {\n      type: String,\n      default: \"50% 50%\"\n    },\n    imgClass: String,\n    imgStyle: Object,\n    noSpinner: Boolean,\n    noNativeMenu: Boolean,\n    noTransition: Boolean,\n    spinnerColor: String,\n    spinnerSize: String\n  },\n  emits: [\"load\", \"error\"],\n  setup(props4, { slots, emit }) {\n    const naturalRatio = ref36(props4.initialRatio);\n    const ratioStyle = use_ratio_default(props4, naturalRatio);\n    const vm2 = getCurrentInstance46();\n    const { registerTimeout: registerLoadTimeout, removeTimeout: removeLoadTimeout } = use_timeout_default();\n    const { registerTimeout: registerLoadShowTimeout, removeTimeout: removeLoadShowTimeout } = use_timeout_default();\n    const placeholderImg = computed64(() => props4.placeholderSrc !== void 0 ? { src: props4.placeholderSrc } : null);\n    const errorImg = computed64(() => props4.errorSrc !== void 0 ? { src: props4.errorSrc, __qerror: true } : null);\n    const images = [\n      ref36(null),\n      ref36(placeholderImg.value)\n    ];\n    const position2 = ref36(0);\n    const isLoading = ref36(false);\n    const hasError = ref36(false);\n    const classes = computed64(\n      () => `q-img q-img--${props4.noNativeMenu === true ? \"no-\" : \"\"}menu`\n    );\n    const style2 = computed64(() => ({\n      width: props4.width,\n      height: props4.height\n    }));\n    const imgClass = computed64(\n      () => `q-img__image ${props4.imgClass !== void 0 ? props4.imgClass + \" \" : \"\"}q-img__image--with${props4.noTransition === true ? \"out\" : \"\"}-transition q-img__image--`\n    );\n    const imgStyle = computed64(() => ({\n      ...props4.imgStyle,\n      objectFit: props4.fit,\n      objectPosition: props4.position\n    }));\n    function setLoading() {\n      removeLoadShowTimeout();\n      if (props4.loadingShowDelay === 0) {\n        isLoading.value = true;\n        return;\n      }\n      registerLoadShowTimeout(() => {\n        isLoading.value = true;\n      }, props4.loadingShowDelay);\n    }\n    function clearLoading() {\n      removeLoadShowTimeout();\n      isLoading.value = false;\n    }\n    function onLoad({ target: target2 }) {\n      if (vmIsDestroyed(vm2) === false) {\n        removeLoadTimeout();\n        naturalRatio.value = target2.naturalHeight === 0 ? 0.5 : target2.naturalWidth / target2.naturalHeight;\n        waitForCompleteness(target2, 1);\n      }\n    }\n    function waitForCompleteness(target2, count) {\n      if (count === 1e3 || vmIsDestroyed(vm2) === true) return;\n      if (target2.complete === true) {\n        onReady(target2);\n      } else {\n        registerLoadTimeout(() => {\n          waitForCompleteness(target2, count + 1);\n        }, 50);\n      }\n    }\n    function onReady(target2) {\n      if (vmIsDestroyed(vm2) === true) return;\n      position2.value = position2.value ^ 1;\n      images[position2.value].value = null;\n      clearLoading();\n      if (target2.getAttribute(\"__qerror\") !== \"true\") {\n        hasError.value = false;\n      }\n      emit(\"load\", target2.currentSrc || target2.src);\n    }\n    function onError(err) {\n      removeLoadTimeout();\n      clearLoading();\n      hasError.value = true;\n      images[position2.value].value = errorImg.value;\n      images[position2.value ^ 1].value = placeholderImg.value;\n      emit(\"error\", err);\n    }\n    function getImage(index) {\n      const img = images[index].value;\n      const data = {\n        key: \"img_\" + index,\n        class: imgClass.value,\n        style: imgStyle.value,\n        alt: props4.alt,\n        crossorigin: props4.crossorigin,\n        decoding: props4.decoding,\n        referrerpolicy: props4.referrerpolicy,\n        height: props4.height,\n        width: props4.width,\n        loading: props4.loading,\n        fetchpriority: props4.fetchpriority,\n        \"aria-hidden\": \"true\",\n        draggable: props4.draggable,\n        ...img\n      };\n      if (position2.value === index) {\n        Object.assign(data, {\n          class: data.class + \"current\",\n          onLoad,\n          onError\n        });\n      } else {\n        data.class += \"loaded\";\n      }\n      return h58(\n        \"div\",\n        { class: \"q-img__container absolute-full\", key: \"img\" + index },\n        h58(\"img\", data)\n      );\n    }\n    function getContent() {\n      if (isLoading.value === false) {\n        return h58(\"div\", {\n          key: \"content\",\n          class: \"q-img__content absolute-full q-anchor--skip\"\n        }, hSlot(slots[hasError.value === true ? \"error\" : \"default\"]));\n      }\n      return h58(\"div\", {\n        key: \"loading\",\n        class: \"q-img__loading absolute-full flex flex-center\"\n      }, slots.loading !== void 0 ? slots.loading() : props4.noSpinner === true ? void 0 : [\n        h58(QSpinner_default, {\n          color: props4.spinnerColor,\n          size: props4.spinnerSize\n        })\n      ]);\n    }\n    if (true) {\n      let watchSrc = function() {\n        watch23(\n          () => props4.src || props4.srcset || props4.sizes ? {\n            src: props4.src,\n            srcset: props4.srcset,\n            sizes: props4.sizes\n          } : null,\n          (imgProps) => {\n            removeLoadTimeout();\n            hasError.value = false;\n            if (imgProps === null) {\n              clearLoading();\n              images[position2.value ^ 1].value = placeholderImg.value;\n            } else {\n              setLoading();\n            }\n            images[position2.value].value = imgProps;\n          },\n          { immediate: true }\n        );\n      };\n      if (isRuntimeSsrPreHydration.value === true) {\n        onMounted16(watchSrc);\n      } else {\n        watchSrc();\n      }\n    }\n    return () => {\n      const content = [];\n      if (ratioStyle.value !== null) {\n        content.push(\n          h58(\"div\", { key: \"filler\", style: ratioStyle.value })\n        );\n      }\n      if (images[0].value !== null) {\n        content.push(\n          getImage(0)\n        );\n      }\n      if (images[1].value !== null) {\n        content.push(\n          getImage(1)\n        );\n      }\n      content.push(\n        h58(Transition9, { name: \"q-transition--fade\" }, getContent)\n      );\n      return h58(\"div\", {\n        key: \"main\",\n        class: classes.value,\n        style: style2.value,\n        role: \"img\",\n        \"aria-label\": props4.alt\n      }, content);\n    };\n  }\n});\n\n// src/components/infinite-scroll/QInfiniteScroll.js\nimport { h as h59, ref as ref37, computed as computed65, watch as watch24, onMounted as onMounted17, onActivated as onActivated4, onDeactivated as onDeactivated6, onBeforeUnmount as onBeforeUnmount26, nextTick as nextTick11, getCurrentInstance as getCurrentInstance47 } from \"vue\";\nvar { passive: passive2 } = listenOpts;\nvar QInfiniteScroll_default = createComponent({\n  name: \"QInfiniteScroll\",\n  props: {\n    offset: {\n      type: Number,\n      default: 500\n    },\n    debounce: {\n      type: [String, Number],\n      default: 100\n    },\n    scrollTarget: scrollTargetProp,\n    initialIndex: {\n      type: Number,\n      default: 0\n    },\n    disable: Boolean,\n    reverse: Boolean\n  },\n  emits: [\"load\"],\n  setup(props4, { slots, emit }) {\n    const isFetching = ref37(false);\n    const isWorking = ref37(true);\n    const rootRef = ref37(null);\n    const loadingRef = ref37(null);\n    let index = props4.initialIndex;\n    let localScrollTarget, poll;\n    const classes = computed65(\n      () => \"q-infinite-scroll__loading\" + (isFetching.value === true ? \"\" : \" invisible\")\n    );\n    function immediatePoll() {\n      if (props4.disable === true || isFetching.value === true || isWorking.value === false) return;\n      const scrollHeight = getScrollHeight(localScrollTarget), scrollPosition = getVerticalScrollPosition(localScrollTarget), containerHeight = height(localScrollTarget);\n      if (props4.reverse === false) {\n        if (Math.round(scrollPosition + containerHeight + props4.offset) >= Math.round(scrollHeight)) {\n          trigger3();\n        }\n      } else if (Math.round(scrollPosition) <= props4.offset) {\n        trigger3();\n      }\n    }\n    function trigger3() {\n      if (props4.disable === true || isFetching.value === true || isWorking.value === false) return;\n      index++;\n      isFetching.value = true;\n      const heightBefore = getScrollHeight(localScrollTarget);\n      emit(\"load\", index, (isDone) => {\n        if (isWorking.value === true) {\n          isFetching.value = false;\n          nextTick11(() => {\n            if (props4.reverse === true) {\n              const heightAfter = getScrollHeight(localScrollTarget), scrollPosition = getVerticalScrollPosition(localScrollTarget), heightDifference = heightAfter - heightBefore;\n              setVerticalScrollPosition(localScrollTarget, scrollPosition + heightDifference);\n            }\n            if (isDone === true) {\n              stop2();\n            } else if (rootRef.value) {\n              rootRef.value.closest(\"body\") && poll();\n            }\n          });\n        }\n      });\n    }\n    function reset() {\n      index = 0;\n    }\n    function resume() {\n      if (isWorking.value === false) {\n        isWorking.value = true;\n        localScrollTarget.addEventListener(\"scroll\", poll, passive2);\n      }\n      immediatePoll();\n    }\n    function stop2() {\n      if (isWorking.value === true) {\n        isWorking.value = false;\n        isFetching.value = false;\n        localScrollTarget.removeEventListener(\"scroll\", poll, passive2);\n        if (poll !== void 0 && poll.cancel !== void 0) {\n          poll.cancel();\n        }\n      }\n    }\n    function updateScrollTarget() {\n      if (localScrollTarget && isWorking.value === true) {\n        localScrollTarget.removeEventListener(\"scroll\", poll, passive2);\n      }\n      localScrollTarget = getScrollTarget(rootRef.value, props4.scrollTarget);\n      if (isWorking.value === true) {\n        localScrollTarget.addEventListener(\"scroll\", poll, passive2);\n        if (props4.reverse === true) {\n          const scrollHeight = getScrollHeight(localScrollTarget), containerHeight = height(localScrollTarget);\n          setVerticalScrollPosition(localScrollTarget, scrollHeight - containerHeight);\n        }\n        immediatePoll();\n      }\n    }\n    function setIndex(newIndex) {\n      index = newIndex;\n    }\n    function setDebounce(val) {\n      val = parseInt(val, 10);\n      const oldPoll = poll;\n      poll = val <= 0 ? immediatePoll : debounce_default(immediatePoll, isNaN(val) === true ? 100 : val);\n      if (localScrollTarget && isWorking.value === true) {\n        if (oldPoll !== void 0) {\n          localScrollTarget.removeEventListener(\"scroll\", oldPoll, passive2);\n        }\n        localScrollTarget.addEventListener(\"scroll\", poll, passive2);\n      }\n    }\n    function updateSvgAnimations(isRetry) {\n      if (renderLoadingSlot.value === true) {\n        if (loadingRef.value === null) {\n          isRetry !== true && nextTick11(() => {\n            updateSvgAnimations(true);\n          });\n          return;\n        }\n        const action = `${isFetching.value === true ? \"un\" : \"\"}pauseAnimations`;\n        Array.from(loadingRef.value.getElementsByTagName(\"svg\")).forEach((el) => {\n          el[action]();\n        });\n      }\n    }\n    const renderLoadingSlot = computed65(() => props4.disable !== true && isWorking.value === true);\n    watch24([isFetching, renderLoadingSlot], () => {\n      updateSvgAnimations();\n    });\n    watch24(() => props4.disable, (val) => {\n      if (val === true) {\n        stop2();\n      } else {\n        resume();\n      }\n    });\n    watch24(() => props4.reverse, () => {\n      if (isFetching.value === false && isWorking.value === true) {\n        immediatePoll();\n      }\n    });\n    watch24(() => props4.scrollTarget, updateScrollTarget);\n    watch24(() => props4.debounce, setDebounce);\n    let scrollPos = false;\n    onActivated4(() => {\n      if (scrollPos !== false && localScrollTarget) {\n        setVerticalScrollPosition(localScrollTarget, scrollPos);\n      }\n    });\n    onDeactivated6(() => {\n      scrollPos = localScrollTarget ? getVerticalScrollPosition(localScrollTarget) : false;\n    });\n    onBeforeUnmount26(() => {\n      if (isWorking.value === true) {\n        localScrollTarget.removeEventListener(\"scroll\", poll, passive2);\n      }\n    });\n    onMounted17(() => {\n      setDebounce(props4.debounce);\n      updateScrollTarget();\n      isFetching.value === false && updateSvgAnimations();\n    });\n    const vm2 = getCurrentInstance47();\n    Object.assign(vm2.proxy, {\n      poll: () => {\n        poll !== void 0 && poll();\n      },\n      trigger: trigger3,\n      stop: stop2,\n      reset,\n      resume,\n      setIndex,\n      updateScrollTarget\n    });\n    return () => {\n      const child = hUniqueSlot(slots.default, []);\n      if (renderLoadingSlot.value === true) {\n        child[props4.reverse === false ? \"push\" : \"unshift\"](\n          h59(\"div\", { ref: loadingRef, class: classes.value }, hSlot(slots.loading))\n        );\n      }\n      return h59(\"div\", {\n        class: \"q-infinite-scroll\",\n        ref: rootRef\n      }, child);\n    };\n  }\n});\n\n// src/components/inner-loading/QInnerLoading.js\nimport { h as h60, computed as computed66, Transition as Transition10, getCurrentInstance as getCurrentInstance48 } from \"vue\";\nvar QInnerLoading_default = createComponent({\n  name: \"QInnerLoading\",\n  props: {\n    ...useDarkProps,\n    ...useTransitionProps,\n    showing: Boolean,\n    color: String,\n    size: {\n      type: [String, Number],\n      default: \"42px\"\n    },\n    label: String,\n    labelClass: String,\n    labelStyle: [String, Array, Object]\n  },\n  setup(props4, { slots }) {\n    const vm2 = getCurrentInstance48();\n    const isDark = use_dark_default(props4, vm2.proxy.$q);\n    const { transitionProps, transitionStyle } = use_transition_default(props4);\n    const classes = computed66(\n      () => \"q-inner-loading q--avoid-card-border absolute-full column flex-center\" + (isDark.value === true ? \" q-inner-loading--dark\" : \"\")\n    );\n    const labelClass = computed66(\n      () => \"q-inner-loading__label\" + (props4.labelClass !== void 0 ? ` ${props4.labelClass}` : \"\")\n    );\n    function getInner() {\n      const child = [\n        h60(QSpinner_default, {\n          size: props4.size,\n          color: props4.color\n        })\n      ];\n      if (props4.label !== void 0) {\n        child.push(\n          h60(\"div\", {\n            class: labelClass.value,\n            style: props4.labelStyle\n          }, [props4.label])\n        );\n      }\n      return child;\n    }\n    function getContent() {\n      return props4.showing === true ? h60(\n        \"div\",\n        { class: classes.value, style: transitionStyle.value },\n        slots.default !== void 0 ? slots.default() : getInner()\n      ) : null;\n    }\n    return () => h60(Transition10, transitionProps.value, getContent);\n  }\n});\n\n// src/components/input/QInput.js\nimport { h as h61, ref as ref39, computed as computed67, watch as watch26, onBeforeUnmount as onBeforeUnmount27, onMounted as onMounted18, nextTick as nextTick13, getCurrentInstance as getCurrentInstance49 } from \"vue\";\n\n// src/components/input/use-mask.js\nimport { ref as ref38, watch as watch25, nextTick as nextTick12 } from \"vue\";\nvar NAMED_MASKS = {\n  date: \"####/##/##\",\n  datetime: \"####/##/## ##:##\",\n  time: \"##:##\",\n  fulltime: \"##:##:##\",\n  phone: \"(###) ### - ####\",\n  card: \"#### #### #### ####\"\n};\nvar TOKENS = {\n  \"#\": { pattern: \"[\\\\d]\", negate: \"[^\\\\d]\" },\n  S: { pattern: \"[a-zA-Z]\", negate: \"[^a-zA-Z]\" },\n  N: { pattern: \"[0-9a-zA-Z]\", negate: \"[^0-9a-zA-Z]\" },\n  A: { pattern: \"[a-zA-Z]\", negate: \"[^a-zA-Z]\", transform: (v) => v.toLocaleUpperCase() },\n  a: { pattern: \"[a-zA-Z]\", negate: \"[^a-zA-Z]\", transform: (v) => v.toLocaleLowerCase() },\n  X: { pattern: \"[0-9a-zA-Z]\", negate: \"[^0-9a-zA-Z]\", transform: (v) => v.toLocaleUpperCase() },\n  x: { pattern: \"[0-9a-zA-Z]\", negate: \"[^0-9a-zA-Z]\", transform: (v) => v.toLocaleLowerCase() }\n};\nvar KEYS = Object.keys(TOKENS);\nKEYS.forEach((key) => {\n  TOKENS[key].regex = new RegExp(TOKENS[key].pattern);\n});\nvar tokenRegexMask = new RegExp(\"\\\\\\\\([^.*+?^${}()|([\\\\]])|([.*+?^${}()|[\\\\]])|([\" + KEYS.join(\"\") + \"])|(.)\", \"g\");\nvar escRegex = /[.*+?^${}()|[\\]\\\\]/g;\nvar MARKER = String.fromCharCode(1);\nvar useMaskProps = {\n  mask: String,\n  reverseFillMask: Boolean,\n  fillMask: [Boolean, String],\n  unmaskedValue: Boolean\n};\nfunction use_mask_default(props4, emit, emitValue, inputRef) {\n  let maskMarked, maskReplaced, computedMask, computedUnmask, pastedTextStart, selectionAnchor;\n  const hasMask = ref38(null);\n  const innerValue = ref38(getInitialMaskedValue());\n  function getIsTypeText() {\n    return props4.autogrow === true || [\"textarea\", \"text\", \"search\", \"url\", \"tel\", \"password\"].includes(props4.type);\n  }\n  watch25(() => props4.type + props4.autogrow, updateMaskInternals);\n  watch25(() => props4.mask, (v) => {\n    if (v !== void 0) {\n      updateMaskValue(innerValue.value, true);\n    } else {\n      const val = unmaskValue(innerValue.value);\n      updateMaskInternals();\n      props4.modelValue !== val && emit(\"update:modelValue\", val);\n    }\n  });\n  watch25(() => props4.fillMask + props4.reverseFillMask, () => {\n    hasMask.value === true && updateMaskValue(innerValue.value, true);\n  });\n  watch25(() => props4.unmaskedValue, () => {\n    hasMask.value === true && updateMaskValue(innerValue.value);\n  });\n  function getInitialMaskedValue() {\n    updateMaskInternals();\n    if (hasMask.value === true) {\n      const masked = maskValue(unmaskValue(props4.modelValue));\n      return props4.fillMask !== false ? fillWithMask(masked) : masked;\n    }\n    return props4.modelValue;\n  }\n  function getPaddedMaskMarked(size2) {\n    if (size2 < maskMarked.length) {\n      return maskMarked.slice(-size2);\n    }\n    let pad2 = \"\", localMaskMarked = maskMarked;\n    const padPos = localMaskMarked.indexOf(MARKER);\n    if (padPos !== -1) {\n      for (let i = size2 - localMaskMarked.length; i > 0; i--) {\n        pad2 += MARKER;\n      }\n      localMaskMarked = localMaskMarked.slice(0, padPos) + pad2 + localMaskMarked.slice(padPos);\n    }\n    return localMaskMarked;\n  }\n  function updateMaskInternals() {\n    hasMask.value = props4.mask !== void 0 && props4.mask.length !== 0 && getIsTypeText();\n    if (hasMask.value === false) {\n      computedUnmask = void 0;\n      maskMarked = \"\";\n      maskReplaced = \"\";\n      return;\n    }\n    const localComputedMask = NAMED_MASKS[props4.mask] === void 0 ? props4.mask : NAMED_MASKS[props4.mask], fillChar = typeof props4.fillMask === \"string\" && props4.fillMask.length !== 0 ? props4.fillMask.slice(0, 1) : \"_\", fillCharEscaped = fillChar.replace(escRegex, \"\\\\$&\"), unmask = [], extract = [], mask = [];\n    let firstMatch = props4.reverseFillMask === true, unmaskChar = \"\", negateChar = \"\";\n    localComputedMask.replace(tokenRegexMask, (_, char1, esc, token2, char2) => {\n      if (token2 !== void 0) {\n        const c = TOKENS[token2];\n        mask.push(c);\n        negateChar = c.negate;\n        if (firstMatch === true) {\n          extract.push(\"(?:\" + negateChar + \"+)?(\" + c.pattern + \"+)?(?:\" + negateChar + \"+)?(\" + c.pattern + \"+)?\");\n          firstMatch = false;\n        }\n        extract.push(\"(?:\" + negateChar + \"+)?(\" + c.pattern + \")?\");\n      } else if (esc !== void 0) {\n        unmaskChar = \"\\\\\" + (esc === \"\\\\\" ? \"\" : esc);\n        mask.push(esc);\n        unmask.push(\"([^\" + unmaskChar + \"]+)?\" + unmaskChar + \"?\");\n      } else {\n        const c = char1 !== void 0 ? char1 : char2;\n        unmaskChar = c === \"\\\\\" ? \"\\\\\\\\\\\\\\\\\" : c.replace(escRegex, \"\\\\\\\\$&\");\n        mask.push(c);\n        unmask.push(\"([^\" + unmaskChar + \"]+)?\" + unmaskChar + \"?\");\n      }\n    });\n    const unmaskMatcher = new RegExp(\n      \"^\" + unmask.join(\"\") + \"(\" + (unmaskChar === \"\" ? \".\" : \"[^\" + unmaskChar + \"]\") + \"+)?\" + (unmaskChar === \"\" ? \"\" : \"[\" + unmaskChar + \"]*\") + \"$\"\n    ), extractLast = extract.length - 1, extractMatcher = extract.map((re, index) => {\n      if (index === 0 && props4.reverseFillMask === true) {\n        return new RegExp(\"^\" + fillCharEscaped + \"*\" + re);\n      } else if (index === extractLast) {\n        return new RegExp(\n          \"^\" + re + \"(\" + (negateChar === \"\" ? \".\" : negateChar) + \"+)?\" + (props4.reverseFillMask === true ? \"$\" : fillCharEscaped + \"*\")\n        );\n      }\n      return new RegExp(\"^\" + re);\n    });\n    computedMask = mask;\n    computedUnmask = (val) => {\n      const unmaskMatch = unmaskMatcher.exec(props4.reverseFillMask === true ? val : val.slice(0, mask.length + 1));\n      if (unmaskMatch !== null) {\n        val = unmaskMatch.slice(1).join(\"\");\n      }\n      const extractMatch = [], extractMatcherLength = extractMatcher.length;\n      for (let i = 0, str = val; i < extractMatcherLength; i++) {\n        const m = extractMatcher[i].exec(str);\n        if (m === null) {\n          break;\n        }\n        str = str.slice(m.shift().length);\n        extractMatch.push(...m);\n      }\n      if (extractMatch.length !== 0) {\n        return extractMatch.join(\"\");\n      }\n      return val;\n    };\n    maskMarked = mask.map((v) => typeof v === \"string\" ? v : MARKER).join(\"\");\n    maskReplaced = maskMarked.split(MARKER).join(fillChar);\n  }\n  function updateMaskValue(rawVal, updateMaskInternalsFlag, inputType) {\n    const inp = inputRef.value, end = inp.selectionEnd, endReverse = inp.value.length - end, unmasked = unmaskValue(rawVal);\n    updateMaskInternalsFlag === true && updateMaskInternals();\n    const preMasked = maskValue(unmasked), masked = props4.fillMask !== false ? fillWithMask(preMasked) : preMasked, changed2 = innerValue.value !== masked;\n    inp.value !== masked && (inp.value = masked);\n    changed2 === true && (innerValue.value = masked);\n    document.activeElement === inp && nextTick12(() => {\n      if (masked === maskReplaced) {\n        const cursor = props4.reverseFillMask === true ? maskReplaced.length : 0;\n        inp.setSelectionRange(cursor, cursor, \"forward\");\n        return;\n      }\n      if (inputType === \"insertFromPaste\" && props4.reverseFillMask !== true) {\n        const maxEnd = inp.selectionEnd;\n        let cursor = end - 1;\n        for (let i = pastedTextStart; i <= cursor && i < maxEnd; i++) {\n          if (maskMarked[i] !== MARKER) {\n            cursor++;\n          }\n        }\n        moveCursor.right(inp, cursor);\n        return;\n      }\n      if ([\"deleteContentBackward\", \"deleteContentForward\"].indexOf(inputType) !== -1) {\n        const cursor = props4.reverseFillMask === true ? end === 0 ? masked.length > preMasked.length ? 1 : 0 : Math.max(0, masked.length - (masked === maskReplaced ? 0 : Math.min(preMasked.length, endReverse) + 1)) + 1 : end;\n        inp.setSelectionRange(cursor, cursor, \"forward\");\n        return;\n      }\n      if (props4.reverseFillMask === true) {\n        if (changed2 === true) {\n          const cursor = Math.max(0, masked.length - (masked === maskReplaced ? 0 : Math.min(preMasked.length, endReverse + 1)));\n          if (cursor === 1 && end === 1) {\n            inp.setSelectionRange(cursor, cursor, \"forward\");\n          } else {\n            moveCursor.rightReverse(inp, cursor);\n          }\n        } else {\n          const cursor = masked.length - endReverse;\n          inp.setSelectionRange(cursor, cursor, \"backward\");\n        }\n      } else {\n        if (changed2 === true) {\n          const cursor = Math.max(0, maskMarked.indexOf(MARKER), Math.min(preMasked.length, end) - 1);\n          moveCursor.right(inp, cursor);\n        } else {\n          const cursor = end - 1;\n          moveCursor.right(inp, cursor);\n        }\n      }\n    });\n    const val = props4.unmaskedValue === true ? unmaskValue(masked) : masked;\n    if (String(props4.modelValue) !== val && (props4.modelValue !== null || val !== \"\")) {\n      emitValue(val, true);\n    }\n  }\n  function moveCursorForPaste(inp, start, end) {\n    const preMasked = maskValue(unmaskValue(inp.value));\n    start = Math.max(0, maskMarked.indexOf(MARKER), Math.min(preMasked.length, start));\n    pastedTextStart = start;\n    inp.setSelectionRange(start, end, \"forward\");\n  }\n  const moveCursor = {\n    left(inp, cursor) {\n      const noMarkBefore = maskMarked.slice(cursor - 1).indexOf(MARKER) === -1;\n      let i = Math.max(0, cursor - 1);\n      for (; i >= 0; i--) {\n        if (maskMarked[i] === MARKER) {\n          cursor = i;\n          noMarkBefore === true && cursor++;\n          break;\n        }\n      }\n      if (i < 0 && maskMarked[cursor] !== void 0 && maskMarked[cursor] !== MARKER) {\n        return moveCursor.right(inp, 0);\n      }\n      cursor >= 0 && inp.setSelectionRange(cursor, cursor, \"backward\");\n    },\n    right(inp, cursor) {\n      const limit = inp.value.length;\n      let i = Math.min(limit, cursor + 1);\n      for (; i <= limit; i++) {\n        if (maskMarked[i] === MARKER) {\n          cursor = i;\n          break;\n        } else if (maskMarked[i - 1] === MARKER) {\n          cursor = i;\n        }\n      }\n      if (i > limit && maskMarked[cursor - 1] !== void 0 && maskMarked[cursor - 1] !== MARKER) {\n        return moveCursor.left(inp, limit);\n      }\n      inp.setSelectionRange(cursor, cursor, \"forward\");\n    },\n    leftReverse(inp, cursor) {\n      const localMaskMarked = getPaddedMaskMarked(inp.value.length);\n      let i = Math.max(0, cursor - 1);\n      for (; i >= 0; i--) {\n        if (localMaskMarked[i - 1] === MARKER) {\n          cursor = i;\n          break;\n        } else if (localMaskMarked[i] === MARKER) {\n          cursor = i;\n          if (i === 0) {\n            break;\n          }\n        }\n      }\n      if (i < 0 && localMaskMarked[cursor] !== void 0 && localMaskMarked[cursor] !== MARKER) {\n        return moveCursor.rightReverse(inp, 0);\n      }\n      cursor >= 0 && inp.setSelectionRange(cursor, cursor, \"backward\");\n    },\n    rightReverse(inp, cursor) {\n      const limit = inp.value.length, localMaskMarked = getPaddedMaskMarked(limit), noMarkBefore = localMaskMarked.slice(0, cursor + 1).indexOf(MARKER) === -1;\n      let i = Math.min(limit, cursor + 1);\n      for (; i <= limit; i++) {\n        if (localMaskMarked[i - 1] === MARKER) {\n          cursor = i;\n          cursor > 0 && noMarkBefore === true && cursor--;\n          break;\n        }\n      }\n      if (i > limit && localMaskMarked[cursor - 1] !== void 0 && localMaskMarked[cursor - 1] !== MARKER) {\n        return moveCursor.leftReverse(inp, limit);\n      }\n      inp.setSelectionRange(cursor, cursor, \"forward\");\n    }\n  };\n  function onMaskedClick(e) {\n    emit(\"click\", e);\n    selectionAnchor = void 0;\n  }\n  function onMaskedKeydown(e) {\n    emit(\"keydown\", e);\n    if (shouldIgnoreKey(e) === true || e.altKey === true) return;\n    const inp = inputRef.value, start = inp.selectionStart, end = inp.selectionEnd;\n    if (!e.shiftKey) {\n      selectionAnchor = void 0;\n    }\n    if (e.keyCode === 37 || e.keyCode === 39) {\n      if (e.shiftKey && selectionAnchor === void 0) {\n        selectionAnchor = inp.selectionDirection === \"forward\" ? start : end;\n      }\n      const fn = moveCursor[(e.keyCode === 39 ? \"right\" : \"left\") + (props4.reverseFillMask === true ? \"Reverse\" : \"\")];\n      e.preventDefault();\n      fn(inp, selectionAnchor === start ? end : start);\n      if (e.shiftKey) {\n        const cursor = inp.selectionStart;\n        inp.setSelectionRange(Math.min(selectionAnchor, cursor), Math.max(selectionAnchor, cursor), \"forward\");\n      }\n    } else if (e.keyCode === 8 && props4.reverseFillMask !== true && start === end) {\n      moveCursor.left(inp, start);\n      inp.setSelectionRange(inp.selectionStart, end, \"backward\");\n    } else if (e.keyCode === 46 && props4.reverseFillMask === true && start === end) {\n      moveCursor.rightReverse(inp, end);\n      inp.setSelectionRange(start, inp.selectionEnd, \"forward\");\n    }\n  }\n  function maskValue(val) {\n    if (val === void 0 || val === null || val === \"\") {\n      return \"\";\n    }\n    if (props4.reverseFillMask === true) {\n      return maskValueReverse(val);\n    }\n    const mask = computedMask;\n    let valIndex = 0, output = \"\";\n    for (let maskIndex = 0; maskIndex < mask.length; maskIndex++) {\n      const valChar = val[valIndex], maskDef = mask[maskIndex];\n      if (typeof maskDef === \"string\") {\n        output += maskDef;\n        valChar === maskDef && valIndex++;\n      } else if (valChar !== void 0 && maskDef.regex.test(valChar)) {\n        output += maskDef.transform !== void 0 ? maskDef.transform(valChar) : valChar;\n        valIndex++;\n      } else {\n        return output;\n      }\n    }\n    return output;\n  }\n  function maskValueReverse(val) {\n    const mask = computedMask, firstTokenIndex = maskMarked.indexOf(MARKER);\n    let valIndex = val.length - 1, output = \"\";\n    for (let maskIndex = mask.length - 1; maskIndex >= 0 && valIndex !== -1; maskIndex--) {\n      const maskDef = mask[maskIndex];\n      let valChar = val[valIndex];\n      if (typeof maskDef === \"string\") {\n        output = maskDef + output;\n        valChar === maskDef && valIndex--;\n      } else if (valChar !== void 0 && maskDef.regex.test(valChar)) {\n        do {\n          output = (maskDef.transform !== void 0 ? maskDef.transform(valChar) : valChar) + output;\n          valIndex--;\n          valChar = val[valIndex];\n        } while (firstTokenIndex === maskIndex && valChar !== void 0 && maskDef.regex.test(valChar));\n      } else {\n        return output;\n      }\n    }\n    return output;\n  }\n  function unmaskValue(val) {\n    return typeof val !== \"string\" || computedUnmask === void 0 ? typeof val === \"number\" ? computedUnmask(\"\" + val) : val : computedUnmask(val);\n  }\n  function fillWithMask(val) {\n    if (maskReplaced.length - val.length <= 0) {\n      return val;\n    }\n    return props4.reverseFillMask === true && val.length !== 0 ? maskReplaced.slice(0, -val.length) + val : val + maskReplaced.slice(val.length);\n  }\n  return {\n    innerValue,\n    hasMask,\n    moveCursorForPaste,\n    updateMaskValue,\n    onMaskedKeydown,\n    onMaskedClick\n  };\n}\n\n// src/composables/private.use-key-composition/use-key-composition.js\nvar isJapanese = /[\\u3000-\\u303f\\u3040-\\u309f\\u30a0-\\u30ff\\uff00-\\uff9f\\u4e00-\\u9faf\\u3400-\\u4dbf]/;\nvar isChinese = /[\\u4e00-\\u9fff\\u3400-\\u4dbf\\u{20000}-\\u{2a6df}\\u{2a700}-\\u{2b73f}\\u{2b740}-\\u{2b81f}\\u{2b820}-\\u{2ceaf}\\uf900-\\ufaff\\u3300-\\u33ff\\ufe30-\\ufe4f\\uf900-\\ufaff\\u{2f800}-\\u{2fa1f}]/u;\nvar isKorean = /[\\u3131-\\u314e\\u314f-\\u3163\\uac00-\\ud7a3]/;\nvar isPlainText = /[a-z0-9_ -]$/i;\nfunction use_key_composition_default(onInput) {\n  return function onComposition(e) {\n    if (e.type === \"compositionend\" || e.type === \"change\") {\n      if (e.target.qComposing !== true) return;\n      e.target.qComposing = false;\n      onInput(e);\n    } else if (e.type === \"compositionupdate\" && e.target.qComposing !== true && typeof e.data === \"string\") {\n      const isComposing = client.is.firefox === true ? isPlainText.test(e.data) === false : isJapanese.test(e.data) === true || isChinese.test(e.data) === true || isKorean.test(e.data) === true;\n      if (isComposing === true) {\n        e.target.qComposing = true;\n      }\n    }\n  };\n}\n\n// src/components/input/QInput.js\nvar QInput_default = createComponent({\n  name: \"QInput\",\n  inheritAttrs: false,\n  props: {\n    ...useFieldProps,\n    ...useMaskProps,\n    ...useFormProps,\n    // override of useFieldProps > modelValue\n    modelValue: false ? {} : [String, Number, FileList],\n    shadowText: String,\n    type: {\n      type: String,\n      default: \"text\"\n    },\n    debounce: [String, Number],\n    autogrow: Boolean,\n    // makes a textarea\n    inputClass: [Array, String, Object],\n    inputStyle: [Array, String, Object]\n  },\n  emits: [\n    ...useFieldEmits,\n    \"paste\",\n    \"change\",\n    \"keydown\",\n    \"click\",\n    \"animationend\"\n  ],\n  setup(props4, { emit, attrs }) {\n    const { proxy } = getCurrentInstance49();\n    const { $q } = proxy;\n    const temp = {};\n    let emitCachedValue = NaN, typedNumber, stopValueWatcher, emitTimer = null, emitValueFn;\n    const inputRef = ref39(null);\n    const nameProp = useFormInputNameAttr(props4);\n    const {\n      innerValue,\n      hasMask,\n      moveCursorForPaste,\n      updateMaskValue,\n      onMaskedKeydown,\n      onMaskedClick\n    } = use_mask_default(props4, emit, emitValue, inputRef);\n    const formDomProps = use_file_dom_props_default(\n      props4,\n      /* type guard */\n      true\n    );\n    const hasValue = computed67(() => fieldValueIsFilled(innerValue.value));\n    const onComposition = use_key_composition_default(onInput);\n    const state = useFieldState({ changeEvent: true });\n    const isTextarea = computed67(\n      () => props4.type === \"textarea\" || props4.autogrow === true\n    );\n    const isTypeText = computed67(\n      () => isTextarea.value === true || [\"text\", \"search\", \"url\", \"tel\", \"password\"].includes(props4.type)\n    );\n    const onEvents = computed67(() => {\n      const evt = {\n        ...state.splitAttrs.listeners.value,\n        onInput,\n        onPaste,\n        // Safari < 10.2 & UIWebView doesn't fire compositionend when\n        // switching focus before confirming composition choice\n        // this also fixes the issue where some browsers e.g. iOS Chrome\n        // fires \"change\" instead of \"input\" on autocomplete.\n        onChange,\n        onBlur: onFinishEditing,\n        onFocus: stop\n      };\n      evt.onCompositionstart = evt.onCompositionupdate = evt.onCompositionend = onComposition;\n      if (hasMask.value === true) {\n        evt.onKeydown = onMaskedKeydown;\n        evt.onClick = onMaskedClick;\n      }\n      if (props4.autogrow === true) {\n        evt.onAnimationend = onAnimationend;\n      }\n      return evt;\n    });\n    const inputAttrs = computed67(() => {\n      const attrs2 = {\n        tabindex: 0,\n        \"data-autofocus\": props4.autofocus === true || void 0,\n        rows: props4.type === \"textarea\" ? 6 : void 0,\n        \"aria-label\": props4.label,\n        name: nameProp.value,\n        ...state.splitAttrs.attributes.value,\n        id: state.targetUid.value,\n        maxlength: props4.maxlength,\n        disabled: props4.disable === true,\n        readonly: props4.readonly === true\n      };\n      if (isTextarea.value === false) {\n        attrs2.type = props4.type;\n      }\n      if (props4.autogrow === true) {\n        attrs2.rows = 1;\n      }\n      return attrs2;\n    });\n    watch26(() => props4.type, () => {\n      if (inputRef.value) {\n        inputRef.value.value = props4.modelValue;\n      }\n    });\n    watch26(() => props4.modelValue, (v) => {\n      if (hasMask.value === true) {\n        if (stopValueWatcher === true) {\n          stopValueWatcher = false;\n          if (String(v) === emitCachedValue) return;\n        }\n        updateMaskValue(v);\n      } else if (innerValue.value !== v) {\n        innerValue.value = v;\n        if (props4.type === \"number\" && temp.hasOwnProperty(\"value\") === true) {\n          if (typedNumber === true) {\n            typedNumber = false;\n          } else {\n            delete temp.value;\n          }\n        }\n      }\n      props4.autogrow === true && nextTick13(adjustHeight);\n    });\n    watch26(() => props4.autogrow, (val) => {\n      if (val === true) {\n        nextTick13(adjustHeight);\n      } else if (inputRef.value !== null && attrs.rows > 0) {\n        inputRef.value.style.height = \"auto\";\n      }\n    });\n    watch26(() => props4.dense, () => {\n      props4.autogrow === true && nextTick13(adjustHeight);\n    });\n    function focus() {\n      addFocusFn(() => {\n        const el = document.activeElement;\n        if (inputRef.value !== null && inputRef.value !== el && (el === null || el.id !== state.targetUid.value)) {\n          inputRef.value.focus({ preventScroll: true });\n        }\n      });\n    }\n    function select() {\n      inputRef.value !== null && inputRef.value.select();\n    }\n    function onPaste(e) {\n      if (hasMask.value === true && props4.reverseFillMask !== true) {\n        const inp = e.target;\n        moveCursorForPaste(inp, inp.selectionStart, inp.selectionEnd);\n      }\n      emit(\"paste\", e);\n    }\n    function onInput(e) {\n      if (!e || !e.target) return;\n      if (props4.type === \"file\") {\n        emit(\"update:modelValue\", e.target.files);\n        return;\n      }\n      const val = e.target.value;\n      if (e.target.qComposing === true) {\n        temp.value = val;\n        return;\n      }\n      if (hasMask.value === true) {\n        updateMaskValue(val, false, e.inputType);\n      } else {\n        emitValue(val);\n        if (isTypeText.value === true && e.target === document.activeElement) {\n          const { selectionStart, selectionEnd } = e.target;\n          if (selectionStart !== void 0 && selectionEnd !== void 0) {\n            nextTick13(() => {\n              if (e.target === document.activeElement && val.indexOf(e.target.value) === 0) {\n                e.target.setSelectionRange(selectionStart, selectionEnd);\n              }\n            });\n          }\n        }\n      }\n      props4.autogrow === true && adjustHeight();\n    }\n    function onAnimationend(e) {\n      emit(\"animationend\", e);\n      adjustHeight();\n    }\n    function emitValue(val, stopWatcher) {\n      emitValueFn = () => {\n        emitTimer = null;\n        if (props4.type !== \"number\" && temp.hasOwnProperty(\"value\") === true) {\n          delete temp.value;\n        }\n        if (props4.modelValue !== val && emitCachedValue !== val) {\n          emitCachedValue = val;\n          stopWatcher === true && (stopValueWatcher = true);\n          emit(\"update:modelValue\", val);\n          nextTick13(() => {\n            emitCachedValue === val && (emitCachedValue = NaN);\n          });\n        }\n        emitValueFn = void 0;\n      };\n      if (props4.type === \"number\") {\n        typedNumber = true;\n        temp.value = val;\n      }\n      if (props4.debounce !== void 0) {\n        emitTimer !== null && clearTimeout(emitTimer);\n        temp.value = val;\n        emitTimer = setTimeout(emitValueFn, props4.debounce);\n      } else {\n        emitValueFn();\n      }\n    }\n    function adjustHeight() {\n      requestAnimationFrame(() => {\n        const inp = inputRef.value;\n        if (inp !== null) {\n          const parentStyle = inp.parentNode.style;\n          const { scrollTop } = inp;\n          const { overflowY, maxHeight } = $q.platform.is.firefox === true ? {} : window.getComputedStyle(inp);\n          const changeOverflow = overflowY !== void 0 && overflowY !== \"scroll\";\n          changeOverflow === true && (inp.style.overflowY = \"hidden\");\n          parentStyle.marginBottom = inp.scrollHeight - 1 + \"px\";\n          inp.style.height = \"1px\";\n          inp.style.height = inp.scrollHeight + \"px\";\n          changeOverflow === true && (inp.style.overflowY = parseInt(maxHeight, 10) < inp.scrollHeight ? \"auto\" : \"hidden\");\n          parentStyle.marginBottom = \"\";\n          inp.scrollTop = scrollTop;\n        }\n      });\n    }\n    function onChange(e) {\n      onComposition(e);\n      if (emitTimer !== null) {\n        clearTimeout(emitTimer);\n        emitTimer = null;\n      }\n      emitValueFn !== void 0 && emitValueFn();\n      emit(\"change\", e.target.value);\n    }\n    function onFinishEditing(e) {\n      e !== void 0 && stop(e);\n      if (emitTimer !== null) {\n        clearTimeout(emitTimer);\n        emitTimer = null;\n      }\n      emitValueFn !== void 0 && emitValueFn();\n      typedNumber = false;\n      stopValueWatcher = false;\n      delete temp.value;\n      props4.type !== \"file\" && setTimeout(() => {\n        if (inputRef.value !== null) {\n          inputRef.value.value = innerValue.value !== void 0 ? innerValue.value : \"\";\n        }\n      });\n    }\n    function getCurValue() {\n      return temp.hasOwnProperty(\"value\") === true ? temp.value : innerValue.value !== void 0 ? innerValue.value : \"\";\n    }\n    onBeforeUnmount27(() => {\n      onFinishEditing();\n    });\n    onMounted18(() => {\n      props4.autogrow === true && adjustHeight();\n    });\n    Object.assign(state, {\n      innerValue,\n      fieldClass: computed67(\n        () => `q-${isTextarea.value === true ? \"textarea\" : \"input\"}` + (props4.autogrow === true ? \" q-textarea--autogrow\" : \"\")\n      ),\n      hasShadow: computed67(\n        () => props4.type !== \"file\" && typeof props4.shadowText === \"string\" && props4.shadowText.length !== 0\n      ),\n      inputRef,\n      emitValue,\n      hasValue,\n      floatingLabel: computed67(\n        () => hasValue.value === true && (props4.type !== \"number\" || isNaN(innerValue.value) === false) || fieldValueIsFilled(props4.displayValue)\n      ),\n      getControl: () => {\n        return h61(isTextarea.value === true ? \"textarea\" : \"input\", {\n          ref: inputRef,\n          class: [\n            \"q-field__native q-placeholder\",\n            props4.inputClass\n          ],\n          style: props4.inputStyle,\n          ...inputAttrs.value,\n          ...onEvents.value,\n          ...props4.type !== \"file\" ? { value: getCurValue() } : formDomProps.value\n        });\n      },\n      getShadowControl: () => {\n        return h61(\"div\", {\n          class: \"q-field__native q-field__shadow absolute-bottom no-pointer-events\" + (isTextarea.value === true ? \"\" : \" text-no-wrap\")\n        }, [\n          h61(\"span\", { class: \"invisible\" }, getCurValue()),\n          h61(\"span\", props4.shadowText)\n        ]);\n      }\n    });\n    const renderFn = use_field_default(state);\n    Object.assign(proxy, {\n      focus,\n      select,\n      getNativeElement: () => inputRef.value\n      // deprecated\n    });\n    injectProp(proxy, \"nativeEl\", () => inputRef.value);\n    return renderFn;\n  }\n});\n\n// src/components/intersection/QIntersection.js\nimport { h as h62, ref as ref40, computed as computed68, Transition as Transition11 } from \"vue\";\n\n// src/directives/intersection/Intersection.js\nvar defaultCfg = {\n  threshold: 0,\n  root: null,\n  rootMargin: \"0px\"\n};\nfunction update2(el, ctx, value2) {\n  let handler, cfg, changed2;\n  if (typeof value2 === \"function\") {\n    handler = value2;\n    cfg = defaultCfg;\n    changed2 = ctx.cfg === void 0;\n  } else {\n    handler = value2.handler;\n    cfg = Object.assign({}, defaultCfg, value2.cfg);\n    changed2 = ctx.cfg === void 0 || isDeepEqual(ctx.cfg, cfg) === false;\n  }\n  if (ctx.handler !== handler) {\n    ctx.handler = handler;\n  }\n  if (changed2 === true) {\n    ctx.cfg = cfg;\n    ctx.observer !== void 0 && ctx.observer.unobserve(el);\n    ctx.observer = new IntersectionObserver(([entry]) => {\n      if (typeof ctx.handler === \"function\") {\n        if (entry.rootBounds === null && document.body.contains(el) === true) {\n          ctx.observer.unobserve(el);\n          ctx.observer.observe(el);\n          return;\n        }\n        const res = ctx.handler(entry, ctx.observer);\n        if (res === false || ctx.once === true && entry.isIntersecting === true) {\n          destroy(el);\n        }\n      }\n    }, cfg);\n    ctx.observer.observe(el);\n  }\n}\nfunction destroy(el) {\n  const ctx = el.__qvisible;\n  if (ctx !== void 0) {\n    ctx.observer !== void 0 && ctx.observer.unobserve(el);\n    delete el.__qvisible;\n  }\n}\nvar Intersection_default = createDirective(\n  false ? { name: \"intersection\", getSSRProps: noop_ssr_directive_transform_default } : {\n    name: \"intersection\",\n    mounted(el, { modifiers, value: value2 }) {\n      const ctx = {\n        once: modifiers.once === true\n      };\n      update2(el, ctx, value2);\n      el.__qvisible = ctx;\n    },\n    updated(el, binding) {\n      const ctx = el.__qvisible;\n      ctx !== void 0 && update2(el, ctx, binding.value);\n    },\n    beforeUnmount: destroy\n  }\n);\n\n// src/components/intersection/QIntersection.js\nvar QIntersection_default = createComponent({\n  name: \"QIntersection\",\n  props: {\n    tag: {\n      type: String,\n      default: \"div\"\n    },\n    once: Boolean,\n    transition: String,\n    transitionDuration: {\n      type: [String, Number],\n      default: 300\n    },\n    ssrPrerender: Boolean,\n    margin: String,\n    threshold: [Number, Array],\n    root: {\n      default: null\n    },\n    disable: Boolean,\n    onVisibility: Function\n  },\n  setup(props4, { slots, emit }) {\n    const showing = ref40(isRuntimeSsrPreHydration.value === true ? props4.ssrPrerender : false);\n    const intersectionProps = computed68(() => props4.root !== void 0 || props4.margin !== void 0 || props4.threshold !== void 0 ? {\n      handler: trigger3,\n      cfg: {\n        root: props4.root,\n        rootMargin: props4.margin,\n        threshold: props4.threshold\n      }\n    } : trigger3);\n    const hasDirective = computed68(\n      () => props4.disable !== true && (isRuntimeSsrPreHydration.value !== true || props4.once !== true || props4.ssrPrerender !== true)\n    );\n    const directives = computed68(() => {\n      return [[\n        Intersection_default,\n        intersectionProps.value,\n        void 0,\n        { once: props4.once }\n      ]];\n    });\n    const transitionStyle = computed68(\n      () => `--q-transition-duration: ${props4.transitionDuration}ms`\n    );\n    function trigger3(entry) {\n      if (showing.value !== entry.isIntersecting) {\n        showing.value = entry.isIntersecting;\n        props4.onVisibility !== void 0 && emit(\"visibility\", showing.value);\n      }\n    }\n    function getContent() {\n      if (showing.value === true) {\n        return [h62(\"div\", { key: \"content\", style: transitionStyle.value }, hSlot(slots.default))];\n      }\n      if (slots.hidden !== void 0) {\n        return [h62(\"div\", { key: \"hidden\", style: transitionStyle.value }, slots.hidden())];\n      }\n    }\n    return () => {\n      const child = props4.transition ? [\n        h62(Transition11, {\n          name: \"q-transition--\" + props4.transition\n        }, getContent)\n      ] : getContent();\n      return hDir(\n        props4.tag,\n        { class: \"q-intersection\" },\n        child,\n        \"main\",\n        hasDirective.value,\n        () => directives.value\n      );\n    };\n  }\n});\n\n// src/components/item/QList.js\nimport { h as h63, computed as computed69, getCurrentInstance as getCurrentInstance50 } from \"vue\";\nvar roleAttrExceptions = [\"ul\", \"ol\"];\nvar QList_default = createComponent({\n  name: \"QList\",\n  props: {\n    ...useDarkProps,\n    bordered: Boolean,\n    dense: Boolean,\n    separator: Boolean,\n    padding: Boolean,\n    tag: {\n      type: String,\n      default: \"div\"\n    }\n  },\n  setup(props4, { slots }) {\n    const vm2 = getCurrentInstance50();\n    const isDark = use_dark_default(props4, vm2.proxy.$q);\n    const role = computed69(\n      () => roleAttrExceptions.includes(props4.tag) ? null : \"list\"\n    );\n    const classes = computed69(\n      () => \"q-list\" + (props4.bordered === true ? \" q-list--bordered\" : \"\") + (props4.dense === true ? \" q-list--dense\" : \"\") + (props4.separator === true ? \" q-list--separator\" : \"\") + (isDark.value === true ? \" q-list--dark\" : \"\") + (props4.padding === true ? \" q-list--padding\" : \"\")\n    );\n    return () => h63(props4.tag, { class: classes.value, role: role.value }, hSlot(slots.default));\n  }\n});\n\n// src/components/knob/QKnob.js\nimport { h as h64, ref as ref41, computed as computed70, watch as watch27, getCurrentInstance as getCurrentInstance51 } from \"vue\";\nvar keyCodes2 = [34, 37, 40, 33, 39, 38];\nvar commonPropsName = Object.keys(useCircularCommonProps);\nvar QKnob_default = createComponent({\n  name: \"QKnob\",\n  props: {\n    ...useFormProps,\n    ...useCircularCommonProps,\n    modelValue: {\n      type: Number,\n      required: true\n    },\n    innerMin: Number,\n    innerMax: Number,\n    step: {\n      type: Number,\n      default: 1,\n      validator: (v) => v >= 0\n    },\n    tabindex: {\n      type: [Number, String],\n      default: 0\n    },\n    disable: Boolean,\n    readonly: Boolean\n  },\n  emits: [\"update:modelValue\", \"change\", \"dragValue\"],\n  setup(props4, { slots, emit }) {\n    const { proxy } = getCurrentInstance51();\n    const { $q } = proxy;\n    const model = ref41(props4.modelValue);\n    const dragging = ref41(false);\n    const innerMin = computed70(() => isNaN(props4.innerMin) === true || props4.innerMin < props4.min ? props4.min : props4.innerMin);\n    const innerMax = computed70(() => isNaN(props4.innerMax) === true || props4.innerMax > props4.max ? props4.max : props4.innerMax);\n    let centerPosition;\n    function normalizeModel() {\n      model.value = props4.modelValue === null ? innerMin.value : between(props4.modelValue, innerMin.value, innerMax.value);\n      updateValue2(true);\n    }\n    watch27(\n      () => `${props4.modelValue}|${innerMin.value}|${innerMax.value}`,\n      normalizeModel\n    );\n    normalizeModel();\n    const editable = computed70(() => props4.disable === false && props4.readonly === false);\n    const classes = computed70(\n      () => \"q-knob non-selectable\" + (editable.value === true ? \" q-knob--editable\" : props4.disable === true ? \" disabled\" : \"\")\n    );\n    const decimals = computed70(() => (String(props4.step).trim().split(\".\")[1] || \"\").length);\n    const step = computed70(() => props4.step === 0 ? 1 : props4.step);\n    const instantFeedback = computed70(() => props4.instantFeedback === true || dragging.value === true);\n    const onEvents = $q.platform.is.mobile === true ? computed70(() => editable.value === true ? { onClick } : {}) : computed70(() => editable.value === true ? {\n      onMousedown,\n      onClick,\n      onKeydown: onKeydown2,\n      onKeyup: onKeyup2\n    } : {});\n    const attrs = computed70(() => editable.value === true ? { tabindex: props4.tabindex } : { [`aria-${props4.disable === true ? \"disabled\" : \"readonly\"}`]: \"true\" });\n    const circularProps = computed70(() => {\n      const agg = {};\n      commonPropsName.forEach((name2) => {\n        agg[name2] = props4[name2];\n      });\n      return agg;\n    });\n    function pan(event) {\n      if (event.isFinal) {\n        updatePosition(event.evt, true);\n        dragging.value = false;\n      } else if (event.isFirst) {\n        updateCenterPosition();\n        dragging.value = true;\n        updatePosition(event.evt);\n      } else {\n        updatePosition(event.evt);\n      }\n    }\n    const directives = computed70(() => {\n      return [[\n        TouchPan_default,\n        pan,\n        void 0,\n        { prevent: true, stop: true, mouse: true }\n      ]];\n    });\n    function updateCenterPosition() {\n      const { top, left, width: width3, height: height2 } = proxy.$el.getBoundingClientRect();\n      centerPosition = {\n        top: top + height2 / 2,\n        left: left + width3 / 2\n      };\n    }\n    function onMousedown(evt) {\n      updateCenterPosition();\n      updatePosition(evt);\n    }\n    function onClick(evt) {\n      updateCenterPosition();\n      updatePosition(evt, true);\n    }\n    function onKeydown2(evt) {\n      if (keyCodes2.includes(evt.keyCode) === false) return;\n      stopAndPrevent(evt);\n      const stepVal = ([34, 33].includes(evt.keyCode) ? 10 : 1) * step.value, offset2 = [34, 37, 40].includes(evt.keyCode) ? -stepVal : stepVal;\n      model.value = between(\n        parseFloat((model.value + offset2).toFixed(decimals.value)),\n        innerMin.value,\n        innerMax.value\n      );\n      updateValue2();\n    }\n    function updatePosition(evt, change) {\n      const pos = position(evt), height2 = Math.abs(pos.top - centerPosition.top), distance = Math.sqrt(\n        height2 ** 2 + Math.abs(pos.left - centerPosition.left) ** 2\n      );\n      let angle = Math.asin(height2 / distance) * (180 / Math.PI);\n      if (pos.top < centerPosition.top) {\n        angle = centerPosition.left < pos.left ? 90 - angle : 270 + angle;\n      } else {\n        angle = centerPosition.left < pos.left ? angle + 90 : 270 - angle;\n      }\n      if ($q.lang.rtl === true) {\n        angle = normalizeToInterval(-angle - props4.angle, 0, 360);\n      } else if (props4.angle) {\n        angle = normalizeToInterval(angle - props4.angle, 0, 360);\n      }\n      if (props4.reverse === true) {\n        angle = 360 - angle;\n      }\n      let newModel = props4.min + angle / 360 * (props4.max - props4.min);\n      if (step.value !== 0) {\n        const modulo = newModel % step.value;\n        newModel = newModel - modulo + (Math.abs(modulo) >= step.value / 2 ? (modulo < 0 ? -1 : 1) * step.value : 0);\n        newModel = parseFloat(newModel.toFixed(decimals.value));\n      }\n      newModel = between(newModel, innerMin.value, innerMax.value);\n      emit(\"dragValue\", newModel);\n      if (model.value !== newModel) {\n        model.value = newModel;\n      }\n      updateValue2(change);\n    }\n    function onKeyup2(evt) {\n      if (keyCodes2.includes(evt.keyCode)) {\n        updateValue2(true);\n      }\n    }\n    function updateValue2(change) {\n      props4.modelValue !== model.value && emit(\"update:modelValue\", model.value);\n      change === true && emit(\"change\", model.value);\n    }\n    const formAttrs = useFormAttrs(props4);\n    function getNameInput() {\n      return h64(\"input\", formAttrs.value);\n    }\n    return () => {\n      const data = {\n        class: classes.value,\n        role: \"slider\",\n        \"aria-valuemin\": innerMin.value,\n        \"aria-valuemax\": innerMax.value,\n        \"aria-valuenow\": props4.modelValue,\n        ...attrs.value,\n        ...circularProps.value,\n        value: model.value,\n        instantFeedback: instantFeedback.value,\n        ...onEvents.value\n      };\n      const child = {\n        default: slots.default\n      };\n      if (editable.value === true && props4.name !== void 0) {\n        child.internal = getNameInput;\n      }\n      return hDir(\n        QCircularProgress_default,\n        data,\n        child,\n        \"knob\",\n        editable.value,\n        () => directives.value\n      );\n    };\n  }\n});\n\n// src/components/layout/QLayout.js\nimport { h as h65, ref as ref42, reactive as reactive3, computed as computed71, watch as watch29, provide as provide4, onUnmounted as onUnmounted2, getCurrentInstance as getCurrentInstance53 } from \"vue\";\n\n// src/components/scroll-observer/QScrollObserver.js\nimport { watch as watch28, onMounted as onMounted19, onBeforeUnmount as onBeforeUnmount28, getCurrentInstance as getCurrentInstance52 } from \"vue\";\nvar { passive: passive3 } = listenOpts;\nvar axisValues = [\"both\", \"horizontal\", \"vertical\"];\nvar QScrollObserver_default = createComponent({\n  name: \"QScrollObserver\",\n  props: {\n    axis: {\n      type: String,\n      validator: (v) => axisValues.includes(v),\n      default: \"vertical\"\n    },\n    debounce: [String, Number],\n    scrollTarget: scrollTargetProp\n  },\n  emits: [\"scroll\"],\n  setup(props4, { emit }) {\n    const scroll = {\n      position: {\n        top: 0,\n        left: 0\n      },\n      direction: \"down\",\n      directionChanged: false,\n      delta: {\n        top: 0,\n        left: 0\n      },\n      inflectionPoint: {\n        top: 0,\n        left: 0\n      }\n    };\n    let clearTimer = null, localScrollTarget, parentEl;\n    watch28(() => props4.scrollTarget, () => {\n      unconfigureScrollTarget();\n      configureScrollTarget();\n    });\n    function emitEvent() {\n      clearTimer !== null && clearTimer();\n      const top = Math.max(0, getVerticalScrollPosition(localScrollTarget));\n      const left = getHorizontalScrollPosition(localScrollTarget);\n      const delta = {\n        top: top - scroll.position.top,\n        left: left - scroll.position.left\n      };\n      if (props4.axis === \"vertical\" && delta.top === 0 || props4.axis === \"horizontal\" && delta.left === 0) return;\n      const curDir = Math.abs(delta.top) >= Math.abs(delta.left) ? delta.top < 0 ? \"up\" : \"down\" : delta.left < 0 ? \"left\" : \"right\";\n      scroll.position = { top, left };\n      scroll.directionChanged = scroll.direction !== curDir;\n      scroll.delta = delta;\n      if (scroll.directionChanged === true) {\n        scroll.direction = curDir;\n        scroll.inflectionPoint = scroll.position;\n      }\n      emit(\"scroll\", { ...scroll });\n    }\n    function configureScrollTarget() {\n      localScrollTarget = getScrollTarget(parentEl, props4.scrollTarget);\n      localScrollTarget.addEventListener(\"scroll\", trigger3, passive3);\n      trigger3(true);\n    }\n    function unconfigureScrollTarget() {\n      if (localScrollTarget !== void 0) {\n        localScrollTarget.removeEventListener(\"scroll\", trigger3, passive3);\n        localScrollTarget = void 0;\n      }\n    }\n    function trigger3(immediately) {\n      if (immediately === true || props4.debounce === 0 || props4.debounce === \"0\") {\n        emitEvent();\n      } else if (clearTimer === null) {\n        const [timer2, fn] = props4.debounce ? [setTimeout(emitEvent, props4.debounce), clearTimeout] : [requestAnimationFrame(emitEvent), cancelAnimationFrame];\n        clearTimer = () => {\n          fn(timer2);\n          clearTimer = null;\n        };\n      }\n    }\n    const { proxy } = getCurrentInstance52();\n    watch28(() => proxy.$q.lang.rtl, emitEvent);\n    onMounted19(() => {\n      parentEl = proxy.$el.parentNode;\n      configureScrollTarget();\n    });\n    onBeforeUnmount28(() => {\n      clearTimer !== null && clearTimer();\n      unconfigureScrollTarget();\n    });\n    Object.assign(proxy, {\n      trigger: trigger3,\n      getPosition: () => scroll\n    });\n    return noop;\n  }\n});\n\n// src/components/layout/QLayout.js\nvar QLayout_default = createComponent({\n  name: \"QLayout\",\n  props: {\n    container: Boolean,\n    view: {\n      type: String,\n      default: \"hhh lpr fff\",\n      validator: (v) => /^(h|l)h(h|r) lpr (f|l)f(f|r)$/.test(v.toLowerCase())\n    },\n    onScroll: Function,\n    onScrollHeight: Function,\n    onResize: Function\n  },\n  setup(props4, { slots, emit }) {\n    const { proxy: { $q } } = getCurrentInstance53();\n    const rootRef = ref42(null);\n    const height2 = ref42($q.screen.height);\n    const width3 = ref42(props4.container === true ? 0 : $q.screen.width);\n    const scroll = ref42({ position: 0, direction: \"down\", inflectionPoint: 0 });\n    const containerHeight = ref42(0);\n    const scrollbarWidth = ref42(isRuntimeSsrPreHydration.value === true ? 0 : getScrollbarWidth());\n    const classes = computed71(\n      () => \"q-layout q-layout--\" + (props4.container === true ? \"containerized\" : \"standard\")\n    );\n    const style2 = computed71(() => props4.container === false ? { minHeight: $q.screen.height + \"px\" } : null);\n    const targetStyle = computed71(() => scrollbarWidth.value !== 0 ? { [$q.lang.rtl === true ? \"left\" : \"right\"]: `${scrollbarWidth.value}px` } : null);\n    const targetChildStyle = computed71(() => scrollbarWidth.value !== 0 ? {\n      [$q.lang.rtl === true ? \"right\" : \"left\"]: 0,\n      [$q.lang.rtl === true ? \"left\" : \"right\"]: `-${scrollbarWidth.value}px`,\n      width: `calc(100% + ${scrollbarWidth.value}px)`\n    } : null);\n    function onPageScroll(data) {\n      if (props4.container === true || document.qScrollPrevented !== true) {\n        const info = {\n          position: data.position.top,\n          direction: data.direction,\n          directionChanged: data.directionChanged,\n          inflectionPoint: data.inflectionPoint.top,\n          delta: data.delta.top\n        };\n        scroll.value = info;\n        props4.onScroll !== void 0 && emit(\"scroll\", info);\n      }\n    }\n    function onPageResize(data) {\n      const { height: newHeight, width: newWidth } = data;\n      let resized = false;\n      if (height2.value !== newHeight) {\n        resized = true;\n        height2.value = newHeight;\n        props4.onScrollHeight !== void 0 && emit(\"scrollHeight\", newHeight);\n        updateScrollbarWidth();\n      }\n      if (width3.value !== newWidth) {\n        resized = true;\n        width3.value = newWidth;\n      }\n      if (resized === true && props4.onResize !== void 0) {\n        emit(\"resize\", data);\n      }\n    }\n    function onContainerResize({ height: height3 }) {\n      if (containerHeight.value !== height3) {\n        containerHeight.value = height3;\n        updateScrollbarWidth();\n      }\n    }\n    function updateScrollbarWidth() {\n      if (props4.container === true) {\n        const width4 = height2.value > containerHeight.value ? getScrollbarWidth() : 0;\n        if (scrollbarWidth.value !== width4) {\n          scrollbarWidth.value = width4;\n        }\n      }\n    }\n    let animateTimer = null;\n    const $layout = {\n      instances: {},\n      view: computed71(() => props4.view),\n      isContainer: computed71(() => props4.container),\n      rootRef,\n      height: height2,\n      containerHeight,\n      scrollbarWidth,\n      totalWidth: computed71(() => width3.value + scrollbarWidth.value),\n      rows: computed71(() => {\n        const rows = props4.view.toLowerCase().split(\" \");\n        return {\n          top: rows[0].split(\"\"),\n          middle: rows[1].split(\"\"),\n          bottom: rows[2].split(\"\")\n        };\n      }),\n      header: reactive3({ size: 0, offset: 0, space: false }),\n      right: reactive3({ size: 300, offset: 0, space: false }),\n      footer: reactive3({ size: 0, offset: 0, space: false }),\n      left: reactive3({ size: 300, offset: 0, space: false }),\n      scroll,\n      animate() {\n        if (animateTimer !== null) {\n          clearTimeout(animateTimer);\n        } else {\n          document.body.classList.add(\"q-body--layout-animate\");\n        }\n        animateTimer = setTimeout(() => {\n          animateTimer = null;\n          document.body.classList.remove(\"q-body--layout-animate\");\n        }, 155);\n      },\n      update(part, prop, val) {\n        $layout[part][prop] = val;\n      }\n    };\n    provide4(layoutKey, $layout);\n    if (getScrollbarWidth() > 0) {\n      let restoreScrollbar = function() {\n        timer2 = null;\n        el.classList.remove(\"hide-scrollbar\");\n      }, hideScrollbar = function() {\n        if (timer2 === null) {\n          if (el.scrollHeight > $q.screen.height) return;\n          el.classList.add(\"hide-scrollbar\");\n        } else {\n          clearTimeout(timer2);\n        }\n        timer2 = setTimeout(restoreScrollbar, 300);\n      }, updateScrollEvent = function(action) {\n        if (timer2 !== null && action === \"remove\") {\n          clearTimeout(timer2);\n          restoreScrollbar();\n        }\n        window[`${action}EventListener`](\"resize\", hideScrollbar);\n      };\n      let timer2 = null;\n      const el = document.body;\n      watch29(\n        () => props4.container !== true ? \"add\" : \"remove\",\n        updateScrollEvent\n      );\n      props4.container !== true && updateScrollEvent(\"add\");\n      onUnmounted2(() => {\n        updateScrollEvent(\"remove\");\n      });\n    }\n    return () => {\n      const content = hMergeSlot(slots.default, [\n        h65(QScrollObserver_default, { onScroll: onPageScroll }),\n        h65(QResizeObserver_default, { onResize: onPageResize })\n      ]);\n      const layout = h65(\"div\", {\n        class: classes.value,\n        style: style2.value,\n        ref: props4.container === true ? void 0 : rootRef,\n        tabindex: -1\n      }, content);\n      if (props4.container === true) {\n        return h65(\"div\", {\n          class: \"q-layout-container overflow-hidden\",\n          ref: rootRef\n        }, [\n          h65(QResizeObserver_default, { onResize: onContainerResize }),\n          h65(\"div\", {\n            class: \"absolute-full\",\n            style: targetStyle.value\n          }, [\n            h65(\"div\", {\n              class: \"scroll\",\n              style: targetChildStyle.value\n            }, [layout])\n          ])\n        ]);\n      }\n      return layout;\n    };\n  }\n});\n\n// src/components/markup-table/QMarkupTable.js\nimport { h as h66, computed as computed72, getCurrentInstance as getCurrentInstance54 } from \"vue\";\nvar separatorValues = [\"horizontal\", \"vertical\", \"cell\", \"none\"];\nvar QMarkupTable_default = createComponent({\n  name: \"QMarkupTable\",\n  props: {\n    ...useDarkProps,\n    dense: Boolean,\n    flat: Boolean,\n    bordered: Boolean,\n    square: Boolean,\n    wrapCells: Boolean,\n    separator: {\n      type: String,\n      default: \"horizontal\",\n      validator: (v) => separatorValues.includes(v)\n    }\n  },\n  setup(props4, { slots }) {\n    const vm2 = getCurrentInstance54();\n    const isDark = use_dark_default(props4, vm2.proxy.$q);\n    const classes = computed72(\n      () => `q-markup-table q-table__container q-table__card q-table--${props4.separator}-separator` + (isDark.value === true ? \" q-table--dark q-table__card--dark q-dark\" : \"\") + (props4.dense === true ? \" q-table--dense\" : \"\") + (props4.flat === true ? \" q-table--flat\" : \"\") + (props4.bordered === true ? \" q-table--bordered\" : \"\") + (props4.square === true ? \" q-table--square\" : \"\") + (props4.wrapCells === false ? \" q-table--no-wrap\" : \"\")\n    );\n    return () => h66(\"div\", {\n      class: classes.value\n    }, [\n      h66(\"table\", { class: \"q-table\" }, hSlot(slots.default))\n    ]);\n  }\n});\n\n// src/components/no-ssr/QNoSsr.js\nimport { h as h67 } from \"vue\";\nvar QNoSsr_default = createComponent({\n  name: \"QNoSsr\",\n  props: {\n    tag: {\n      type: String,\n      default: \"div\"\n    },\n    placeholder: String\n  },\n  setup(props4, { slots }) {\n    const { isHydrated } = use_hydration_default();\n    return () => {\n      if (isHydrated.value === true) {\n        const node2 = hSlot(slots.default);\n        return node2 === void 0 ? node2 : node2.length > 1 ? h67(props4.tag, {}, node2) : node2[0];\n      }\n      const data = {\n        class: \"q-no-ssr-placeholder\"\n      };\n      const node = hSlot(slots.placeholder);\n      if (node !== void 0) {\n        return node.length > 1 ? h67(props4.tag, data, node) : node[0];\n      }\n      if (props4.placeholder !== void 0) {\n        return h67(props4.tag, data, props4.placeholder);\n      }\n    };\n  }\n});\n\n// src/components/option-group/QOptionGroup.js\nimport { h as h70, computed as computed75, getCurrentInstance as getCurrentInstance56 } from \"vue\";\n\n// src/components/radio/QRadio.js\nimport { h as h68, ref as ref43, computed as computed73, getCurrentInstance as getCurrentInstance55, toRaw as toRaw2 } from \"vue\";\nvar createSvg = () => h68(\"svg\", {\n  key: \"svg\",\n  class: \"q-radio__bg absolute non-selectable\",\n  viewBox: \"0 0 24 24\"\n}, [\n  h68(\"path\", {\n    d: \"M12,22a10,10 0 0 1 -10,-10a10,10 0 0 1 10,-10a10,10 0 0 1 10,10a10,10 0 0 1 -10,10m0,-22a12,12 0 0 0 -12,12a12,12 0 0 0 12,12a12,12 0 0 0 12,-12a12,12 0 0 0 -12,-12\"\n  }),\n  h68(\"path\", {\n    class: \"q-radio__check\",\n    d: \"M12,6a6,6 0 0 0 -6,6a6,6 0 0 0 6,6a6,6 0 0 0 6,-6a6,6 0 0 0 -6,-6\"\n  })\n]);\nvar QRadio_default = createComponent({\n  name: \"QRadio\",\n  props: {\n    ...useDarkProps,\n    ...useSizeProps,\n    ...useFormProps,\n    modelValue: { required: true },\n    val: { required: true },\n    label: String,\n    leftLabel: Boolean,\n    checkedIcon: String,\n    uncheckedIcon: String,\n    color: String,\n    keepColor: Boolean,\n    dense: Boolean,\n    disable: Boolean,\n    tabindex: [String, Number]\n  },\n  emits: [\"update:modelValue\"],\n  setup(props4, { slots, emit }) {\n    const { proxy } = getCurrentInstance55();\n    const isDark = use_dark_default(props4, proxy.$q);\n    const sizeStyle = use_size_default(props4, option_sizes_default);\n    const rootRef = ref43(null);\n    const { refocusTargetEl, refocusTarget } = use_refocus_target_default(props4, rootRef);\n    const isTrue = computed73(() => toRaw2(props4.modelValue) === toRaw2(props4.val));\n    const classes = computed73(\n      () => \"q-radio cursor-pointer no-outline row inline no-wrap items-center\" + (props4.disable === true ? \" disabled\" : \"\") + (isDark.value === true ? \" q-radio--dark\" : \"\") + (props4.dense === true ? \" q-radio--dense\" : \"\") + (props4.leftLabel === true ? \" reverse\" : \"\")\n    );\n    const innerClass = computed73(() => {\n      const color = props4.color !== void 0 && (props4.keepColor === true || isTrue.value === true) ? ` text-${props4.color}` : \"\";\n      return `q-radio__inner relative-position q-radio__inner--${isTrue.value === true ? \"truthy\" : \"falsy\"}${color}`;\n    });\n    const icon = computed73(\n      () => (isTrue.value === true ? props4.checkedIcon : props4.uncheckedIcon) || null\n    );\n    const tabindex = computed73(() => props4.disable === true ? -1 : props4.tabindex || 0);\n    const formAttrs = computed73(() => {\n      const prop = { type: \"radio\" };\n      props4.name !== void 0 && Object.assign(prop, {\n        // see https://vuejs.org/guide/extras/render-function.html#creating-vnodes (.prop)\n        \".checked\": isTrue.value === true,\n        \"^checked\": isTrue.value === true ? \"checked\" : void 0,\n        name: props4.name,\n        value: props4.val\n      });\n      return prop;\n    });\n    const injectFormInput = useFormInject(formAttrs);\n    function onClick(e) {\n      if (e !== void 0) {\n        stopAndPrevent(e);\n        refocusTarget(e);\n      }\n      if (props4.disable !== true && isTrue.value !== true) {\n        emit(\"update:modelValue\", props4.val, e);\n      }\n    }\n    function onKeydown2(e) {\n      if (e.keyCode === 13 || e.keyCode === 32) {\n        stopAndPrevent(e);\n      }\n    }\n    function onKeyup2(e) {\n      if (e.keyCode === 13 || e.keyCode === 32) {\n        onClick(e);\n      }\n    }\n    Object.assign(proxy, { set: onClick });\n    const svg = createSvg();\n    return () => {\n      const content = icon.value !== null ? [\n        h68(\"div\", {\n          key: \"icon\",\n          class: \"q-radio__icon-container absolute-full flex flex-center no-wrap\"\n        }, [\n          h68(QIcon_default, {\n            class: \"q-radio__icon\",\n            name: icon.value\n          })\n        ])\n      ] : [svg];\n      props4.disable !== true && injectFormInput(\n        content,\n        \"unshift\",\n        \" q-radio__native q-ma-none q-pa-none\"\n      );\n      const child = [\n        h68(\"div\", {\n          class: innerClass.value,\n          style: sizeStyle.value,\n          \"aria-hidden\": \"true\"\n        }, content)\n      ];\n      if (refocusTargetEl.value !== null) {\n        child.push(refocusTargetEl.value);\n      }\n      const label = props4.label !== void 0 ? hMergeSlot(slots.default, [props4.label]) : hSlot(slots.default);\n      label !== void 0 && child.push(\n        h68(\"div\", {\n          class: \"q-radio__label q-anchor--skip\"\n        }, label)\n      );\n      return h68(\"div\", {\n        ref: rootRef,\n        class: classes.value,\n        tabindex: tabindex.value,\n        role: \"radio\",\n        \"aria-label\": props4.label,\n        \"aria-checked\": isTrue.value === true ? \"true\" : \"false\",\n        \"aria-disabled\": props4.disable === true ? \"true\" : void 0,\n        onClick,\n        onKeydown: onKeydown2,\n        onKeyup: onKeyup2\n      }, child);\n    };\n  }\n});\n\n// src/components/toggle/QToggle.js\nimport { h as h69, computed as computed74 } from \"vue\";\nvar QToggle_default = createComponent({\n  name: \"QToggle\",\n  props: {\n    ...useCheckboxProps,\n    icon: String,\n    iconColor: String\n  },\n  emits: useCheckboxEmits,\n  setup(props4) {\n    function getInner(isTrue, isIndeterminate) {\n      const icon = computed74(\n        () => (isTrue.value === true ? props4.checkedIcon : isIndeterminate.value === true ? props4.indeterminateIcon : props4.uncheckedIcon) || props4.icon\n      );\n      const color = computed74(() => isTrue.value === true ? props4.iconColor : null);\n      return () => [\n        h69(\"div\", { class: \"q-toggle__track\" }),\n        h69(\n          \"div\",\n          {\n            class: \"q-toggle__thumb absolute flex flex-center no-wrap\"\n          },\n          icon.value !== void 0 ? [\n            h69(QIcon_default, {\n              name: icon.value,\n              color: color.value\n            })\n          ] : void 0\n        )\n      ];\n    }\n    return use_checkbox_default(\"toggle\", getInner);\n  }\n});\n\n// src/components/option-group/QOptionGroup.js\nvar components = {\n  radio: QRadio_default,\n  checkbox: QCheckbox_default,\n  toggle: QToggle_default\n};\nvar typeValues = Object.keys(components);\nfunction getPropValueFn(userPropName, defaultPropName) {\n  if (typeof userPropName === \"function\") return userPropName;\n  const propName = userPropName !== void 0 ? userPropName : defaultPropName;\n  return (opt) => opt[propName];\n}\nvar QOptionGroup_default = createComponent({\n  name: \"QOptionGroup\",\n  props: {\n    ...useDarkProps,\n    modelValue: {\n      required: true\n    },\n    options: {\n      type: Array,\n      validator: (opts) => opts.every(isObject),\n      default: () => []\n    },\n    optionValue: [Function, String],\n    optionLabel: [Function, String],\n    optionDisable: [Function, String],\n    name: String,\n    type: {\n      type: String,\n      default: \"radio\",\n      validator: (v) => typeValues.includes(v)\n    },\n    color: String,\n    keepColor: Boolean,\n    dense: Boolean,\n    size: String,\n    leftLabel: Boolean,\n    inline: Boolean,\n    disable: Boolean\n  },\n  emits: [\"update:modelValue\"],\n  setup(props4, { emit, slots }) {\n    const { proxy: { $q } } = getCurrentInstance56();\n    const arrayModel = Array.isArray(props4.modelValue);\n    if (props4.type === \"radio\") {\n      if (arrayModel === true) {\n        console.error(\"q-option-group: model should not be array\");\n      }\n    } else if (arrayModel === false) {\n      console.error(\"q-option-group: model should be array in your case\");\n    }\n    const isDark = use_dark_default(props4, $q);\n    const component = computed75(() => components[props4.type]);\n    const getOptionValue = computed75(() => getPropValueFn(props4.optionValue, \"value\"));\n    const getOptionLabel = computed75(() => getPropValueFn(props4.optionLabel, \"label\"));\n    const getOptionDisable = computed75(() => getPropValueFn(props4.optionDisable, \"disable\"));\n    const innerOptions = computed75(() => props4.options.map((opt) => ({\n      val: getOptionValue.value(opt),\n      name: opt.name === void 0 ? props4.name : opt.name,\n      disable: props4.disable || getOptionDisable.value(opt),\n      leftLabel: opt.leftLabel === void 0 ? props4.leftLabel : opt.leftLabel,\n      color: opt.color === void 0 ? props4.color : opt.color,\n      checkedIcon: opt.checkedIcon,\n      uncheckedIcon: opt.uncheckedIcon,\n      dark: opt.dark === void 0 ? isDark.value : opt.dark,\n      size: opt.size === void 0 ? props4.size : opt.size,\n      dense: props4.dense,\n      keepColor: opt.keepColor === void 0 ? props4.keepColor : opt.keepColor\n    })));\n    const classes = computed75(\n      () => \"q-option-group q-gutter-x-sm\" + (props4.inline === true ? \" q-option-group--inline\" : \"\")\n    );\n    const attrs = computed75(() => {\n      const attrs2 = { role: \"group\" };\n      if (props4.type === \"radio\") {\n        attrs2.role = \"radiogroup\";\n        if (props4.disable === true) {\n          attrs2[\"aria-disabled\"] = \"true\";\n        }\n      }\n      return attrs2;\n    });\n    function onUpdateModelValue(value2) {\n      emit(\"update:modelValue\", value2);\n    }\n    return () => h70(\"div\", {\n      class: classes.value,\n      ...attrs.value\n    }, props4.options.map((opt, i) => {\n      const child = slots[\"label-\" + i] !== void 0 ? () => slots[\"label-\" + i](opt) : slots.label !== void 0 ? () => slots.label(opt) : void 0;\n      return h70(\"div\", [\n        h70(component.value, {\n          label: child === void 0 ? getOptionLabel.value(opt) : null,\n          modelValue: props4.modelValue,\n          \"onUpdate:modelValue\": onUpdateModelValue,\n          ...innerOptions.value[i]\n        }, child)\n      ]);\n    }));\n  }\n});\n\n// src/components/page/QPage.js\nimport { h as h71, computed as computed76, inject as inject7, getCurrentInstance as getCurrentInstance57 } from \"vue\";\nvar QPage_default = createComponent({\n  name: \"QPage\",\n  props: {\n    padding: Boolean,\n    styleFn: Function\n  },\n  setup(props4, { slots }) {\n    const { proxy: { $q } } = getCurrentInstance57();\n    const $layout = inject7(layoutKey, emptyRenderFn);\n    if ($layout === emptyRenderFn) {\n      console.error(\"QPage needs to be a deep child of QLayout\");\n      return emptyRenderFn;\n    }\n    const $pageContainer = inject7(pageContainerKey, emptyRenderFn);\n    if ($pageContainer === emptyRenderFn) {\n      console.error(\"QPage needs to be child of QPageContainer\");\n      return emptyRenderFn;\n    }\n    const style2 = computed76(() => {\n      const offset2 = ($layout.header.space === true ? $layout.header.size : 0) + ($layout.footer.space === true ? $layout.footer.size : 0);\n      if (typeof props4.styleFn === \"function\") {\n        const height2 = $layout.isContainer.value === true ? $layout.containerHeight.value : $q.screen.height;\n        return props4.styleFn(offset2, height2);\n      }\n      return {\n        minHeight: $layout.isContainer.value === true ? $layout.containerHeight.value - offset2 + \"px\" : $q.screen.height === 0 ? offset2 !== 0 ? `calc(100vh - ${offset2}px)` : \"100vh\" : $q.screen.height - offset2 + \"px\"\n      };\n    });\n    const classes = computed76(\n      () => `q-page${props4.padding === true ? \" q-layout-padding\" : \"\"}`\n    );\n    return () => h71(\"main\", {\n      class: classes.value,\n      style: style2.value\n    }, hSlot(slots.default));\n  }\n});\n\n// src/components/page/QPageContainer.js\nimport { h as h72, computed as computed77, provide as provide5, inject as inject8, getCurrentInstance as getCurrentInstance58 } from \"vue\";\nvar QPageContainer_default = createComponent({\n  name: \"QPageContainer\",\n  setup(_, { slots }) {\n    const { proxy: { $q } } = getCurrentInstance58();\n    const $layout = inject8(layoutKey, emptyRenderFn);\n    if ($layout === emptyRenderFn) {\n      console.error(\"QPageContainer needs to be child of QLayout\");\n      return emptyRenderFn;\n    }\n    provide5(pageContainerKey, true);\n    const style2 = computed77(() => {\n      const css2 = {};\n      if ($layout.header.space === true) {\n        css2.paddingTop = `${$layout.header.size}px`;\n      }\n      if ($layout.right.space === true) {\n        css2[`padding${$q.lang.rtl === true ? \"Left\" : \"Right\"}`] = `${$layout.right.size}px`;\n      }\n      if ($layout.footer.space === true) {\n        css2.paddingBottom = `${$layout.footer.size}px`;\n      }\n      if ($layout.left.space === true) {\n        css2[`padding${$q.lang.rtl === true ? \"Right\" : \"Left\"}`] = `${$layout.left.size}px`;\n      }\n      return css2;\n    });\n    return () => h72(\"div\", {\n      class: \"q-page-container\",\n      style: style2.value\n    }, hSlot(slots.default));\n  }\n});\n\n// src/components/page-scroller/QPageScroller.js\nimport { h as h74, ref as ref44, computed as computed79, watch as watch30, onBeforeUnmount as onBeforeUnmount29, getCurrentInstance as getCurrentInstance60, Transition as Transition12 } from \"vue\";\n\n// src/components/page-sticky/use-page-sticky.js\nimport { h as h73, computed as computed78, inject as inject9, getCurrentInstance as getCurrentInstance59 } from \"vue\";\nvar usePageStickyProps = {\n  position: {\n    type: String,\n    default: \"bottom-right\",\n    validator: (v) => [\n      \"top-right\",\n      \"top-left\",\n      \"bottom-right\",\n      \"bottom-left\",\n      \"top\",\n      \"right\",\n      \"bottom\",\n      \"left\"\n    ].includes(v)\n  },\n  offset: {\n    type: Array,\n    validator: (v) => v.length === 2\n  },\n  expand: Boolean\n};\nfunction use_page_sticky_default() {\n  const { props: props4, proxy: { $q } } = getCurrentInstance59();\n  const $layout = inject9(layoutKey, emptyRenderFn);\n  if ($layout === emptyRenderFn) {\n    console.error(\"QPageSticky needs to be child of QLayout\");\n    return emptyRenderFn;\n  }\n  const attach = computed78(() => {\n    const pos = props4.position;\n    return {\n      top: pos.indexOf(\"top\") !== -1,\n      right: pos.indexOf(\"right\") !== -1,\n      bottom: pos.indexOf(\"bottom\") !== -1,\n      left: pos.indexOf(\"left\") !== -1,\n      vertical: pos === \"top\" || pos === \"bottom\",\n      horizontal: pos === \"left\" || pos === \"right\"\n    };\n  });\n  const top = computed78(() => $layout.header.offset);\n  const right = computed78(() => $layout.right.offset);\n  const bottom = computed78(() => $layout.footer.offset);\n  const left = computed78(() => $layout.left.offset);\n  const style2 = computed78(() => {\n    let posX = 0, posY = 0;\n    const side = attach.value;\n    const dir = $q.lang.rtl === true ? -1 : 1;\n    if (side.top === true && top.value !== 0) {\n      posY = `${top.value}px`;\n    } else if (side.bottom === true && bottom.value !== 0) {\n      posY = `${-bottom.value}px`;\n    }\n    if (side.left === true && left.value !== 0) {\n      posX = `${dir * left.value}px`;\n    } else if (side.right === true && right.value !== 0) {\n      posX = `${-dir * right.value}px`;\n    }\n    const css2 = { transform: `translate(${posX}, ${posY})` };\n    if (props4.offset) {\n      css2.margin = `${props4.offset[1]}px ${props4.offset[0]}px`;\n    }\n    if (side.vertical === true) {\n      if (left.value !== 0) {\n        css2[$q.lang.rtl === true ? \"right\" : \"left\"] = `${left.value}px`;\n      }\n      if (right.value !== 0) {\n        css2[$q.lang.rtl === true ? \"left\" : \"right\"] = `${right.value}px`;\n      }\n    } else if (side.horizontal === true) {\n      if (top.value !== 0) {\n        css2.top = `${top.value}px`;\n      }\n      if (bottom.value !== 0) {\n        css2.bottom = `${bottom.value}px`;\n      }\n    }\n    return css2;\n  });\n  const classes = computed78(\n    () => `q-page-sticky row flex-center fixed-${props4.position} q-page-sticky--${props4.expand === true ? \"expand\" : \"shrink\"}`\n  );\n  function getStickyContent(slots) {\n    const content = hSlot(slots.default);\n    return h73(\n      \"div\",\n      {\n        class: classes.value,\n        style: style2.value\n      },\n      props4.expand === true ? content : [h73(\"div\", content)]\n    );\n  }\n  return {\n    $layout,\n    getStickyContent\n  };\n}\n\n// src/components/page-scroller/QPageScroller.js\nvar QPageScroller_default = createComponent({\n  name: \"QPageScroller\",\n  props: {\n    ...usePageStickyProps,\n    scrollOffset: {\n      type: Number,\n      default: 1e3\n    },\n    reverse: Boolean,\n    duration: {\n      type: Number,\n      default: 300\n    },\n    offset: {\n      ...usePageStickyProps.offset,\n      default: () => [18, 18]\n    }\n  },\n  emits: [\"click\"],\n  setup(props4, { slots, emit }) {\n    const { proxy: { $q } } = getCurrentInstance60();\n    const { $layout, getStickyContent } = use_page_sticky_default();\n    const rootRef = ref44(null);\n    let heightWatcher;\n    const scrollHeight = computed79(() => $layout.height.value - ($layout.isContainer.value === true ? $layout.containerHeight.value : $q.screen.height));\n    function isVisible() {\n      return props4.reverse === true ? scrollHeight.value - $layout.scroll.value.position > props4.scrollOffset : $layout.scroll.value.position > props4.scrollOffset;\n    }\n    const showing = ref44(isVisible());\n    function updateVisibility() {\n      const newVal = isVisible();\n      if (showing.value !== newVal) {\n        showing.value = newVal;\n      }\n    }\n    function updateReverse() {\n      if (props4.reverse === true) {\n        if (heightWatcher === void 0) {\n          heightWatcher = watch30(scrollHeight, updateVisibility);\n        }\n      } else {\n        cleanup();\n      }\n    }\n    watch30($layout.scroll, updateVisibility);\n    watch30(() => props4.reverse, updateReverse);\n    function cleanup() {\n      if (heightWatcher !== void 0) {\n        heightWatcher();\n        heightWatcher = void 0;\n      }\n    }\n    function onClick(e) {\n      const target2 = getScrollTarget(\n        $layout.isContainer.value === true ? rootRef.value : $layout.rootRef.value\n      );\n      setVerticalScrollPosition(\n        target2,\n        props4.reverse === true ? $layout.height.value : 0,\n        props4.duration\n      );\n      emit(\"click\", e);\n    }\n    function getContent() {\n      return showing.value === true ? h74(\"div\", {\n        ref: rootRef,\n        class: \"q-page-scroller\",\n        onClick\n      }, getStickyContent(slots)) : null;\n    }\n    updateReverse();\n    onBeforeUnmount29(cleanup);\n    return () => h74(\n      Transition12,\n      { name: \"q-transition--fade\" },\n      getContent\n    );\n  }\n});\n\n// src/components/page-sticky/QPageSticky.js\nvar QPageSticky_default = createComponent({\n  name: \"QPageSticky\",\n  props: usePageStickyProps,\n  setup(_, { slots }) {\n    const { getStickyContent } = use_page_sticky_default();\n    return () => getStickyContent(slots);\n  }\n});\n\n// src/components/pagination/QPagination.js\nimport { h as h75, ref as ref45, watch as watch31, computed as computed80, getCurrentInstance as getCurrentInstance61 } from \"vue\";\nfunction getBool(val, otherwise) {\n  return [true, false].includes(val) ? val : otherwise;\n}\nvar QPagination_default = createComponent({\n  name: \"QPagination\",\n  props: {\n    ...useDarkProps,\n    modelValue: {\n      type: Number,\n      required: true\n    },\n    min: {\n      type: [Number, String],\n      default: 1\n    },\n    max: {\n      type: [Number, String],\n      required: true\n    },\n    maxPages: {\n      type: [Number, String],\n      default: 0,\n      validator: (v) => (typeof v === \"string\" ? parseInt(v, 10) : v) >= 0\n    },\n    inputStyle: [Array, String, Object],\n    inputClass: [Array, String, Object],\n    size: String,\n    disable: Boolean,\n    input: Boolean,\n    iconPrev: String,\n    iconNext: String,\n    iconFirst: String,\n    iconLast: String,\n    toFn: Function,\n    boundaryLinks: {\n      type: Boolean,\n      default: null\n    },\n    boundaryNumbers: {\n      type: Boolean,\n      default: null\n    },\n    directionLinks: {\n      type: Boolean,\n      default: null\n    },\n    ellipses: {\n      type: Boolean,\n      default: null\n    },\n    ripple: {\n      type: [Boolean, Object],\n      default: null\n    },\n    round: Boolean,\n    rounded: Boolean,\n    flat: Boolean,\n    outline: Boolean,\n    unelevated: Boolean,\n    push: Boolean,\n    glossy: Boolean,\n    color: {\n      type: String,\n      default: \"primary\"\n    },\n    textColor: String,\n    activeDesign: {\n      type: String,\n      default: \"\",\n      values: (v) => v === \"\" || btnDesignOptions.includes(v)\n    },\n    activeColor: String,\n    activeTextColor: String,\n    gutter: String,\n    padding: {\n      type: String,\n      default: \"3px 2px\"\n    }\n  },\n  emits: [\"update:modelValue\"],\n  setup(props4, { emit }) {\n    const { proxy } = getCurrentInstance61();\n    const { $q } = proxy;\n    const isDark = use_dark_default(props4, $q);\n    const minProp = computed80(() => parseInt(props4.min, 10));\n    const maxProp = computed80(() => parseInt(props4.max, 10));\n    const maxPagesProp = computed80(() => parseInt(props4.maxPages, 10));\n    const inputPlaceholder = computed80(() => model.value + \" / \" + maxProp.value);\n    const boundaryLinksProp = computed80(() => getBool(props4.boundaryLinks, props4.input));\n    const boundaryNumbersProp = computed80(() => getBool(props4.boundaryNumbers, !props4.input));\n    const directionLinksProp = computed80(() => getBool(props4.directionLinks, props4.input));\n    const ellipsesProp = computed80(() => getBool(props4.ellipses, !props4.input));\n    const newPage = ref45(null);\n    const model = computed80({\n      get: () => props4.modelValue,\n      set: (val) => {\n        val = parseInt(val, 10);\n        if (props4.disable || isNaN(val)) return;\n        const value2 = between(val, minProp.value, maxProp.value);\n        if (props4.modelValue !== value2) {\n          emit(\"update:modelValue\", value2);\n        }\n      }\n    });\n    watch31(() => `${minProp.value}|${maxProp.value}`, () => {\n      model.value = props4.modelValue;\n    });\n    const classes = computed80(\n      () => \"q-pagination row no-wrap items-center\" + (props4.disable === true ? \" disabled\" : \"\")\n    );\n    const gutterProp = computed80(() => props4.gutter in btnPadding ? `${btnPadding[props4.gutter]}px` : props4.gutter || null);\n    const gutterStyle = computed80(() => gutterProp.value !== null ? `--q-pagination-gutter-parent:-${gutterProp.value};--q-pagination-gutter-child:${gutterProp.value}` : null);\n    const icons = computed80(() => {\n      const ico = [\n        props4.iconFirst || $q.iconSet.pagination.first,\n        props4.iconPrev || $q.iconSet.pagination.prev,\n        props4.iconNext || $q.iconSet.pagination.next,\n        props4.iconLast || $q.iconSet.pagination.last\n      ];\n      return $q.lang.rtl === true ? ico.reverse() : ico;\n    });\n    const attrs = computed80(() => ({\n      \"aria-disabled\": props4.disable === true ? \"true\" : \"false\",\n      role: \"navigation\"\n    }));\n    const btnDesignProp = computed80(() => getBtnDesign(props4, \"flat\"));\n    const btnProps = computed80(() => ({\n      [btnDesignProp.value]: true,\n      round: props4.round,\n      rounded: props4.rounded,\n      padding: props4.padding,\n      color: props4.color,\n      textColor: props4.textColor,\n      size: props4.size,\n      ripple: props4.ripple !== null ? props4.ripple : true\n    }));\n    const btnActiveDesignProp = computed80(() => {\n      const acc = { [btnDesignProp.value]: false };\n      if (props4.activeDesign !== \"\") {\n        acc[props4.activeDesign] = true;\n      }\n      return acc;\n    });\n    const activeBtnProps = computed80(() => ({\n      ...btnActiveDesignProp.value,\n      color: props4.activeColor || props4.color,\n      textColor: props4.activeTextColor || props4.textColor\n    }));\n    const btnConfig = computed80(() => {\n      let maxPages = Math.max(\n        maxPagesProp.value,\n        1 + (ellipsesProp.value ? 2 : 0) + (boundaryNumbersProp.value ? 2 : 0)\n      );\n      const acc = {\n        pgFrom: minProp.value,\n        pgTo: maxProp.value,\n        ellipsesStart: false,\n        ellipsesEnd: false,\n        boundaryStart: false,\n        boundaryEnd: false,\n        marginalStyle: {\n          minWidth: `${Math.max(2, String(maxProp.value).length)}em`\n        }\n      };\n      if (maxPagesProp.value && maxPages < maxProp.value - minProp.value + 1) {\n        maxPages = 1 + Math.floor(maxPages / 2) * 2;\n        acc.pgFrom = Math.max(minProp.value, Math.min(maxProp.value - maxPages + 1, props4.modelValue - Math.floor(maxPages / 2)));\n        acc.pgTo = Math.min(maxProp.value, acc.pgFrom + maxPages - 1);\n        if (boundaryNumbersProp.value) {\n          acc.boundaryStart = true;\n          acc.pgFrom++;\n        }\n        if (ellipsesProp.value && acc.pgFrom > minProp.value + (boundaryNumbersProp.value ? 1 : 0)) {\n          acc.ellipsesStart = true;\n          acc.pgFrom++;\n        }\n        if (boundaryNumbersProp.value) {\n          acc.boundaryEnd = true;\n          acc.pgTo--;\n        }\n        if (ellipsesProp.value && acc.pgTo < maxProp.value - (boundaryNumbersProp.value ? 1 : 0)) {\n          acc.ellipsesEnd = true;\n          acc.pgTo--;\n        }\n      }\n      return acc;\n    });\n    function set2(value2) {\n      model.value = value2;\n    }\n    function setByOffset(offset2) {\n      model.value = model.value + offset2;\n    }\n    const inputEvents = computed80(() => {\n      function updateModel2() {\n        model.value = newPage.value;\n        newPage.value = null;\n      }\n      return {\n        \"onUpdate:modelValue\": (val) => {\n          newPage.value = val;\n        },\n        onKeyup: (e) => {\n          isKeyCode(e, 13) === true && updateModel2();\n        },\n        onBlur: updateModel2\n      };\n    });\n    function getBtn2(cfg, page, active) {\n      const data = {\n        \"aria-label\": page,\n        \"aria-current\": \"false\",\n        ...btnProps.value,\n        ...cfg\n      };\n      if (active === true) {\n        Object.assign(data, {\n          \"aria-current\": \"true\",\n          ...activeBtnProps.value\n        });\n      }\n      if (page !== void 0) {\n        if (props4.toFn !== void 0) {\n          data.to = props4.toFn(page);\n        } else {\n          data.onClick = () => {\n            set2(page);\n          };\n        }\n      }\n      return h75(QBtn_default, data);\n    }\n    Object.assign(proxy, { set: set2, setByOffset });\n    return () => {\n      const contentStart = [];\n      const contentEnd = [];\n      let contentMiddle;\n      if (boundaryLinksProp.value === true) {\n        contentStart.push(\n          getBtn2({\n            key: \"bls\",\n            disable: props4.disable || props4.modelValue <= minProp.value,\n            icon: icons.value[0]\n          }, minProp.value)\n        );\n        contentEnd.unshift(\n          getBtn2({\n            key: \"ble\",\n            disable: props4.disable || props4.modelValue >= maxProp.value,\n            icon: icons.value[3]\n          }, maxProp.value)\n        );\n      }\n      if (directionLinksProp.value === true) {\n        contentStart.push(\n          getBtn2({\n            key: \"bdp\",\n            disable: props4.disable || props4.modelValue <= minProp.value,\n            icon: icons.value[1]\n          }, props4.modelValue - 1)\n        );\n        contentEnd.unshift(\n          getBtn2({\n            key: \"bdn\",\n            disable: props4.disable || props4.modelValue >= maxProp.value,\n            icon: icons.value[2]\n          }, props4.modelValue + 1)\n        );\n      }\n      if (props4.input !== true) {\n        contentMiddle = [];\n        const { pgFrom, pgTo, marginalStyle: style2 } = btnConfig.value;\n        if (btnConfig.value.boundaryStart === true) {\n          const active = minProp.value === props4.modelValue;\n          contentStart.push(\n            getBtn2({\n              key: \"bns\",\n              style: style2,\n              disable: props4.disable,\n              label: minProp.value\n            }, minProp.value, active)\n          );\n        }\n        if (btnConfig.value.boundaryEnd === true) {\n          const active = maxProp.value === props4.modelValue;\n          contentEnd.unshift(\n            getBtn2({\n              key: \"bne\",\n              style: style2,\n              disable: props4.disable,\n              label: maxProp.value\n            }, maxProp.value, active)\n          );\n        }\n        if (btnConfig.value.ellipsesStart === true) {\n          contentStart.push(\n            getBtn2({\n              key: \"bes\",\n              style: style2,\n              disable: props4.disable,\n              label: \"\\u2026\",\n              ripple: false\n            }, pgFrom - 1)\n          );\n        }\n        if (btnConfig.value.ellipsesEnd === true) {\n          contentEnd.unshift(\n            getBtn2({\n              key: \"bee\",\n              style: style2,\n              disable: props4.disable,\n              label: \"\\u2026\",\n              ripple: false\n            }, pgTo + 1)\n          );\n        }\n        for (let i = pgFrom; i <= pgTo; i++) {\n          contentMiddle.push(\n            getBtn2({\n              key: `bpg${i}`,\n              style: style2,\n              disable: props4.disable,\n              label: i\n            }, i, i === props4.modelValue)\n          );\n        }\n      }\n      return h75(\"div\", {\n        class: classes.value,\n        ...attrs.value\n      }, [\n        h75(\"div\", {\n          class: \"q-pagination__content row no-wrap items-center\",\n          style: gutterStyle.value\n        }, [\n          ...contentStart,\n          props4.input === true ? h75(QInput_default, {\n            class: \"inline\",\n            style: { width: `${inputPlaceholder.value.length / 1.5}em` },\n            type: \"number\",\n            dense: true,\n            value: newPage.value,\n            disable: props4.disable,\n            dark: isDark.value,\n            borderless: true,\n            inputClass: props4.inputClass,\n            inputStyle: props4.inputStyle,\n            placeholder: inputPlaceholder.value,\n            min: minProp.value,\n            max: maxProp.value,\n            ...inputEvents.value\n          }) : h75(\"div\", {\n            class: \"q-pagination__middle row justify-center\"\n          }, contentMiddle),\n          ...contentEnd\n        ])\n      ]);\n    };\n  }\n});\n\n// src/components/parallax/QParallax.js\nimport { h as h76, ref as ref46, watch as watch32, onMounted as onMounted20, onBeforeUnmount as onBeforeUnmount30 } from \"vue\";\n\n// src/utils/frame-debounce/frame-debounce.js\nfunction frame_debounce_default(fn) {\n  let wait = false, frame, callArgs;\n  function debounced() {\n    callArgs = arguments;\n    if (wait === true) return;\n    wait = true;\n    frame = window.requestAnimationFrame(() => {\n      fn.apply(this, callArgs);\n      callArgs = void 0;\n      wait = false;\n    });\n  }\n  debounced.cancel = () => {\n    window.cancelAnimationFrame(frame);\n    wait = false;\n  };\n  return debounced;\n}\n\n// src/components/parallax/QParallax.js\nvar { passive: passive4 } = listenOpts;\nvar QParallax_default = createComponent({\n  name: \"QParallax\",\n  props: {\n    src: String,\n    height: {\n      type: Number,\n      default: 500\n    },\n    speed: {\n      type: Number,\n      default: 1,\n      validator: (v) => v >= 0 && v <= 1\n    },\n    scrollTarget: scrollTargetProp,\n    onScroll: Function\n  },\n  setup(props4, { slots, emit }) {\n    const percentScrolled = ref46(0);\n    const rootRef = ref46(null);\n    const mediaParentRef = ref46(null);\n    const mediaRef = ref46(null);\n    let isWorking, mediaEl, mediaHeight, resizeHandler, observer, localScrollTarget;\n    watch32(() => props4.height, () => {\n      isWorking === true && updatePos();\n    });\n    watch32(() => props4.scrollTarget, () => {\n      if (isWorking === true) {\n        stop2();\n        start();\n      }\n    });\n    let update6 = (percentage) => {\n      percentScrolled.value = percentage;\n      props4.onScroll !== void 0 && emit(\"scroll\", percentage);\n    };\n    function updatePos() {\n      let containerTop, containerHeight, containerBottom;\n      if (localScrollTarget === window) {\n        containerTop = 0;\n        containerBottom = containerHeight = window.innerHeight;\n      } else {\n        containerTop = offset(localScrollTarget).top;\n        containerHeight = height(localScrollTarget);\n        containerBottom = containerTop + containerHeight;\n      }\n      const top = offset(rootRef.value).top;\n      const bottom = top + props4.height;\n      if (observer !== void 0 || bottom > containerTop && top < containerBottom) {\n        const percent = (containerBottom - top) / (props4.height + containerHeight);\n        setPos((mediaHeight - props4.height) * percent * props4.speed);\n        update6(percent);\n      }\n    }\n    let setPos = (offset2) => {\n      mediaEl.style.transform = `translate3d(-50%,${Math.round(offset2)}px,0)`;\n    };\n    function onResize() {\n      mediaHeight = mediaEl.naturalHeight || mediaEl.videoHeight || height(mediaEl);\n      isWorking === true && updatePos();\n    }\n    function start() {\n      isWorking = true;\n      localScrollTarget = getScrollTarget(rootRef.value, props4.scrollTarget);\n      localScrollTarget.addEventListener(\"scroll\", updatePos, passive4);\n      window.addEventListener(\"resize\", resizeHandler, passive4);\n      updatePos();\n    }\n    function stop2() {\n      if (isWorking === true) {\n        isWorking = false;\n        localScrollTarget.removeEventListener(\"scroll\", updatePos, passive4);\n        window.removeEventListener(\"resize\", resizeHandler, passive4);\n        localScrollTarget = void 0;\n        setPos.cancel();\n        update6.cancel();\n        resizeHandler.cancel();\n      }\n    }\n    onMounted20(() => {\n      setPos = frame_debounce_default(setPos);\n      update6 = frame_debounce_default(update6);\n      resizeHandler = frame_debounce_default(onResize);\n      mediaEl = slots.media !== void 0 ? mediaParentRef.value.children[0] : mediaRef.value;\n      mediaEl.onload = mediaEl.onloadstart = mediaEl.loadedmetadata = onResize;\n      onResize();\n      mediaEl.style.display = \"initial\";\n      if (window.IntersectionObserver !== void 0) {\n        observer = new IntersectionObserver((entries) => {\n          const fn = entries[0].isIntersecting === true ? start : stop2;\n          fn();\n        });\n        observer.observe(rootRef.value);\n      } else {\n        start();\n      }\n    });\n    onBeforeUnmount30(() => {\n      stop2();\n      observer !== void 0 && observer.disconnect();\n      mediaEl.onload = mediaEl.onloadstart = mediaEl.loadedmetadata = null;\n    });\n    return () => {\n      return h76(\"div\", {\n        ref: rootRef,\n        class: \"q-parallax\",\n        style: { height: `${props4.height}px` }\n      }, [\n        h76(\"div\", {\n          ref: mediaParentRef,\n          class: \"q-parallax__media absolute-full\"\n        }, slots.media !== void 0 ? slots.media() : [\n          h76(\"img\", {\n            ref: mediaRef,\n            src: props4.src\n          })\n        ]),\n        h76(\n          \"div\",\n          { class: \"q-parallax__content absolute-full column flex-center\" },\n          slots.content !== void 0 ? slots.content({ percentScrolled: percentScrolled.value }) : hSlot(slots.default)\n        )\n      ]);\n    };\n  }\n});\n\n// src/components/popup-edit/QPopupEdit.js\nimport { h as h77, ref as ref47, computed as computed81, nextTick as nextTick14, getCurrentInstance as getCurrentInstance62 } from \"vue\";\n\n// src/utils/clone/clone.js\nfunction cloneDeep(data, hash = /* @__PURE__ */ new WeakMap()) {\n  if (Object(data) !== data) return data;\n  if (hash.has(data)) return hash.get(data);\n  const result = data instanceof Date ? new Date(data) : data instanceof RegExp ? new RegExp(data.source, data.flags) : data instanceof Set ? /* @__PURE__ */ new Set() : data instanceof Map ? /* @__PURE__ */ new Map() : typeof data.constructor !== \"function\" ? /* @__PURE__ */ Object.create(null) : data.prototype !== void 0 && typeof data.prototype.constructor === \"function\" ? data : new data.constructor();\n  if (typeof data.constructor === \"function\" && typeof data.valueOf === \"function\") {\n    const val = data.valueOf();\n    if (Object(val) !== val) {\n      const result2 = new data.constructor(val);\n      hash.set(data, result2);\n      return result2;\n    }\n  }\n  hash.set(data, result);\n  if (data instanceof Set) {\n    data.forEach((val) => {\n      result.add(cloneDeep(val, hash));\n    });\n  } else if (data instanceof Map) {\n    data.forEach((val, key) => {\n      result.set(key, cloneDeep(val, hash));\n    });\n  }\n  return Object.assign(\n    result,\n    ...Object.keys(data).map((key) => ({ [key]: cloneDeep(data[key], hash) }))\n  );\n}\n\n// src/components/popup-edit/QPopupEdit.js\nvar QPopupEdit_default = createComponent({\n  name: \"QPopupEdit\",\n  props: {\n    modelValue: {\n      required: true\n    },\n    title: String,\n    buttons: Boolean,\n    labelSet: String,\n    labelCancel: String,\n    color: {\n      type: String,\n      default: \"primary\"\n    },\n    validate: {\n      type: Function,\n      default: () => true\n    },\n    autoSave: Boolean,\n    /* menu props overrides */\n    cover: {\n      type: Boolean,\n      default: true\n    },\n    /* end of menu props */\n    disable: Boolean\n  },\n  emits: [\n    \"update:modelValue\",\n    \"save\",\n    \"cancel\",\n    \"beforeShow\",\n    \"show\",\n    \"beforeHide\",\n    \"hide\"\n  ],\n  setup(props4, { slots, emit }) {\n    const { proxy } = getCurrentInstance62();\n    const { $q } = proxy;\n    const menuRef = ref47(null);\n    const initialValue = ref47(\"\");\n    const currentModel = ref47(\"\");\n    let validated = false;\n    const scope = computed81(() => {\n      return injectProp({\n        initialValue: initialValue.value,\n        validate: props4.validate,\n        set: set2,\n        cancel,\n        updatePosition\n      }, \"value\", () => currentModel.value, (val) => {\n        currentModel.value = val;\n      });\n    });\n    function set2() {\n      if (props4.validate(currentModel.value) === false) return;\n      if (hasModelChanged() === true) {\n        emit(\"save\", currentModel.value, initialValue.value);\n        emit(\"update:modelValue\", currentModel.value);\n      }\n      closeMenu();\n    }\n    function cancel() {\n      if (hasModelChanged() === true) {\n        emit(\"cancel\", currentModel.value, initialValue.value);\n      }\n      closeMenu();\n    }\n    function updatePosition() {\n      nextTick14(() => {\n        menuRef.value.updatePosition();\n      });\n    }\n    function hasModelChanged() {\n      return isDeepEqual(currentModel.value, initialValue.value) === false;\n    }\n    function closeMenu() {\n      validated = true;\n      menuRef.value.hide();\n    }\n    function onBeforeShow() {\n      validated = false;\n      initialValue.value = cloneDeep(props4.modelValue);\n      currentModel.value = cloneDeep(props4.modelValue);\n      emit(\"beforeShow\");\n    }\n    function onShow() {\n      emit(\"show\");\n    }\n    function onBeforeHide() {\n      if (validated === false && hasModelChanged() === true) {\n        if (props4.autoSave === true && props4.validate(currentModel.value) === true) {\n          emit(\"save\", currentModel.value, initialValue.value);\n          emit(\"update:modelValue\", currentModel.value);\n        } else {\n          emit(\"cancel\", currentModel.value, initialValue.value);\n        }\n      }\n      emit(\"beforeHide\");\n    }\n    function onHide() {\n      emit(\"hide\");\n    }\n    function getContent() {\n      const child = slots.default !== void 0 ? [].concat(slots.default(scope.value)) : [];\n      props4.title && child.unshift(\n        h77(\"div\", { class: \"q-dialog__title q-mt-sm q-mb-sm\" }, props4.title)\n      );\n      props4.buttons === true && child.push(\n        h77(\"div\", { class: \"q-popup-edit__buttons row justify-center no-wrap\" }, [\n          h77(QBtn_default, {\n            flat: true,\n            color: props4.color,\n            label: props4.labelCancel || $q.lang.label.cancel,\n            onClick: cancel\n          }),\n          h77(QBtn_default, {\n            flat: true,\n            color: props4.color,\n            label: props4.labelSet || $q.lang.label.set,\n            onClick: set2\n          })\n        ])\n      );\n      return child;\n    }\n    Object.assign(proxy, {\n      set: set2,\n      cancel,\n      show(e) {\n        menuRef.value !== null && menuRef.value.show(e);\n      },\n      hide(e) {\n        menuRef.value !== null && menuRef.value.hide(e);\n      },\n      updatePosition\n    });\n    return () => {\n      if (props4.disable === true) return;\n      return h77(QMenu_default, {\n        ref: menuRef,\n        class: \"q-popup-edit\",\n        cover: props4.cover,\n        onBeforeShow,\n        onShow,\n        onBeforeHide,\n        onHide,\n        onEscapeKey: cancel\n      }, getContent);\n    };\n  }\n});\n\n// src/components/popup-proxy/QPopupProxy.js\nimport { h as h78, ref as ref48, computed as computed82, watch as watch33, getCurrentInstance as getCurrentInstance63 } from \"vue\";\nvar QPopupProxy_default = createComponent({\n  name: \"QPopupProxy\",\n  props: {\n    ...useAnchorProps,\n    breakpoint: {\n      type: [String, Number],\n      default: 450\n    }\n  },\n  emits: [\"show\", \"hide\"],\n  setup(props4, { slots, emit, attrs }) {\n    const { proxy } = getCurrentInstance63();\n    const { $q } = proxy;\n    const showing = ref48(false);\n    const popupRef = ref48(null);\n    const breakpoint = computed82(() => parseInt(props4.breakpoint, 10));\n    const { canShow } = use_anchor_default({ showing });\n    function getType() {\n      return $q.screen.width < breakpoint.value || $q.screen.height < breakpoint.value ? \"dialog\" : \"menu\";\n    }\n    const type = ref48(getType());\n    const popupProps = computed82(\n      () => type.value === \"menu\" ? { maxHeight: \"99vh\" } : {}\n    );\n    watch33(() => getType(), (val) => {\n      if (showing.value !== true) {\n        type.value = val;\n      }\n    });\n    function onShow(evt) {\n      showing.value = true;\n      emit(\"show\", evt);\n    }\n    function onHide(evt) {\n      showing.value = false;\n      type.value = getType();\n      emit(\"hide\", evt);\n    }\n    Object.assign(proxy, {\n      show(evt) {\n        canShow(evt) === true && popupRef.value.show(evt);\n      },\n      hide(evt) {\n        popupRef.value.hide(evt);\n      },\n      toggle(evt) {\n        popupRef.value.toggle(evt);\n      }\n    });\n    injectProp(proxy, \"currentComponent\", () => ({\n      type: type.value,\n      ref: popupRef.value\n    }));\n    return () => {\n      const data = {\n        ref: popupRef,\n        ...popupProps.value,\n        ...attrs,\n        onShow,\n        onHide\n      };\n      let component;\n      if (type.value === \"dialog\") {\n        component = QDialog_default;\n      } else {\n        component = QMenu_default;\n        Object.assign(data, {\n          target: props4.target,\n          contextMenu: props4.contextMenu,\n          noParentEvent: true,\n          separateClosePopup: true\n        });\n      }\n      return h78(component, data, slots.default);\n    };\n  }\n});\n\n// src/components/linear-progress/QLinearProgress.js\nimport { h as h79, computed as computed83, getCurrentInstance as getCurrentInstance64 } from \"vue\";\nvar defaultSizes3 = {\n  xs: 2,\n  sm: 4,\n  md: 6,\n  lg: 10,\n  xl: 14\n};\nfunction width2(val, reverse, $q) {\n  return {\n    transform: reverse === true ? `translateX(${$q.lang.rtl === true ? \"-\" : \"\"}100%) scale3d(${-val},1,1)` : `scale3d(${val},1,1)`\n  };\n}\nvar QLinearProgress_default = createComponent({\n  name: \"QLinearProgress\",\n  props: {\n    ...useDarkProps,\n    ...useSizeProps,\n    value: {\n      type: Number,\n      default: 0\n    },\n    buffer: Number,\n    color: String,\n    trackColor: String,\n    reverse: Boolean,\n    stripe: Boolean,\n    indeterminate: Boolean,\n    query: Boolean,\n    rounded: Boolean,\n    animationSpeed: {\n      type: [String, Number],\n      default: 2100\n    },\n    instantFeedback: Boolean\n  },\n  setup(props4, { slots }) {\n    const { proxy } = getCurrentInstance64();\n    const isDark = use_dark_default(props4, proxy.$q);\n    const sizeStyle = use_size_default(props4, defaultSizes3);\n    const motion = computed83(() => props4.indeterminate === true || props4.query === true);\n    const widthReverse = computed83(() => props4.reverse !== props4.query);\n    const style2 = computed83(() => ({\n      ...sizeStyle.value !== null ? sizeStyle.value : {},\n      \"--q-linear-progress-speed\": `${props4.animationSpeed}ms`\n    }));\n    const classes = computed83(\n      () => \"q-linear-progress\" + (props4.color !== void 0 ? ` text-${props4.color}` : \"\") + (props4.reverse === true || props4.query === true ? \" q-linear-progress--reverse\" : \"\") + (props4.rounded === true ? \" rounded-borders\" : \"\")\n    );\n    const trackStyle = computed83(() => width2(props4.buffer !== void 0 ? props4.buffer : 1, widthReverse.value, proxy.$q));\n    const transitionSuffix = computed83(() => `with${props4.instantFeedback === true ? \"out\" : \"\"}-transition`);\n    const trackClass = computed83(\n      () => `q-linear-progress__track absolute-full q-linear-progress__track--${transitionSuffix.value} q-linear-progress__track--${isDark.value === true ? \"dark\" : \"light\"}` + (props4.trackColor !== void 0 ? ` bg-${props4.trackColor}` : \"\")\n    );\n    const modelStyle = computed83(() => width2(motion.value === true ? 1 : props4.value, widthReverse.value, proxy.$q));\n    const modelClass = computed83(\n      () => `q-linear-progress__model absolute-full q-linear-progress__model--${transitionSuffix.value} q-linear-progress__model--${motion.value === true ? \"in\" : \"\"}determinate`\n    );\n    const stripeStyle = computed83(() => ({ width: `${props4.value * 100}%` }));\n    const stripeClass = computed83(\n      () => `q-linear-progress__stripe absolute-${props4.reverse === true ? \"right\" : \"left\"} q-linear-progress__stripe--${transitionSuffix.value}`\n    );\n    return () => {\n      const child = [\n        h79(\"div\", {\n          class: trackClass.value,\n          style: trackStyle.value\n        }),\n        h79(\"div\", {\n          class: modelClass.value,\n          style: modelStyle.value\n        })\n      ];\n      props4.stripe === true && motion.value === false && child.push(\n        h79(\"div\", {\n          class: stripeClass.value,\n          style: stripeStyle.value\n        })\n      );\n      return h79(\"div\", {\n        class: classes.value,\n        style: style2.value,\n        role: \"progressbar\",\n        \"aria-valuemin\": 0,\n        \"aria-valuemax\": 1,\n        \"aria-valuenow\": props4.indeterminate === true ? void 0 : props4.value\n      }, hMergeSlot(slots.default, child));\n    };\n  }\n});\n\n// src/components/pull-to-refresh/QPullToRefresh.js\nimport { h as h80, ref as ref49, computed as computed84, watch as watch34, onMounted as onMounted21, onBeforeUnmount as onBeforeUnmount31, getCurrentInstance as getCurrentInstance65 } from \"vue\";\nvar PULLER_HEIGHT = 40;\nvar OFFSET_TOP = 20;\nvar QPullToRefresh_default = createComponent({\n  name: \"QPullToRefresh\",\n  props: {\n    color: String,\n    bgColor: String,\n    icon: String,\n    noMouse: Boolean,\n    disable: Boolean,\n    scrollTarget: scrollTargetProp\n  },\n  emits: [\"refresh\"],\n  setup(props4, { slots, emit }) {\n    const { proxy } = getCurrentInstance65();\n    const { $q } = proxy;\n    const state = ref49(\"pull\");\n    const pullRatio = ref49(0);\n    const pulling = ref49(false);\n    const pullPosition = ref49(-PULLER_HEIGHT);\n    const animating = ref49(false);\n    const positionCSS = ref49({});\n    const style2 = computed84(() => ({\n      opacity: pullRatio.value,\n      transform: `translateY(${pullPosition.value}px) rotate(${pullRatio.value * 360}deg)`\n    }));\n    const classes = computed84(\n      () => \"q-pull-to-refresh__puller row flex-center\" + (animating.value === true ? \" q-pull-to-refresh__puller--animating\" : \"\") + (props4.bgColor !== void 0 ? ` bg-${props4.bgColor}` : \"\")\n    );\n    function pull(event) {\n      if (event.isFinal === true) {\n        if (pulling.value === true) {\n          pulling.value = false;\n          if (state.value === \"pulled\") {\n            state.value = \"refreshing\";\n            animateTo({ pos: OFFSET_TOP });\n            trigger3();\n          } else if (state.value === \"pull\") {\n            animateTo({ pos: -PULLER_HEIGHT, ratio: 0 });\n          }\n        }\n        return;\n      }\n      if (animating.value === true || state.value === \"refreshing\") {\n        return false;\n      }\n      if (event.isFirst === true) {\n        if (getVerticalScrollPosition(localScrollTarget) !== 0 || event.direction !== \"down\") {\n          if (pulling.value === true) {\n            pulling.value = false;\n            state.value = \"pull\";\n            animateTo({ pos: -PULLER_HEIGHT, ratio: 0 });\n          }\n          return false;\n        }\n        pulling.value = true;\n        const { top, left } = proxy.$el.getBoundingClientRect();\n        positionCSS.value = {\n          top: top + \"px\",\n          left: left + \"px\",\n          width: window.getComputedStyle(proxy.$el).getPropertyValue(\"width\")\n        };\n      }\n      prevent(event.evt);\n      const distance = Math.min(140, Math.max(0, event.distance.y));\n      pullPosition.value = distance - PULLER_HEIGHT;\n      pullRatio.value = between(distance / (OFFSET_TOP + PULLER_HEIGHT), 0, 1);\n      const newState = pullPosition.value > OFFSET_TOP ? \"pulled\" : \"pull\";\n      if (state.value !== newState) {\n        state.value = newState;\n      }\n    }\n    const directives = computed84(() => {\n      const modifiers = { down: true };\n      if (props4.noMouse !== true) {\n        modifiers.mouse = true;\n      }\n      return [[\n        TouchPan_default,\n        pull,\n        void 0,\n        modifiers\n      ]];\n    });\n    const contentClass = computed84(\n      () => `q-pull-to-refresh__content${pulling.value === true ? \" no-pointer-events\" : \"\"}`\n    );\n    function trigger3() {\n      emit(\"refresh\", () => {\n        animateTo({ pos: -PULLER_HEIGHT, ratio: 0 }, () => {\n          state.value = \"pull\";\n        });\n      });\n    }\n    let localScrollTarget, timer2 = null;\n    function animateTo({ pos, ratio }, done) {\n      animating.value = true;\n      pullPosition.value = pos;\n      if (ratio !== void 0) {\n        pullRatio.value = ratio;\n      }\n      timer2 !== null && clearTimeout(timer2);\n      timer2 = setTimeout(() => {\n        timer2 = null;\n        animating.value = false;\n        done && done();\n      }, 300);\n    }\n    function updateScrollTarget() {\n      localScrollTarget = getScrollTarget(proxy.$el, props4.scrollTarget);\n    }\n    watch34(() => props4.scrollTarget, updateScrollTarget);\n    onMounted21(updateScrollTarget);\n    onBeforeUnmount31(() => {\n      timer2 !== null && clearTimeout(timer2);\n    });\n    Object.assign(proxy, { trigger: trigger3, updateScrollTarget });\n    return () => {\n      const child = [\n        h80(\"div\", { class: contentClass.value }, hSlot(slots.default)),\n        h80(\"div\", {\n          class: \"q-pull-to-refresh__puller-container fixed row flex-center no-pointer-events z-top\",\n          style: positionCSS.value\n        }, [\n          h80(\"div\", {\n            class: classes.value,\n            style: style2.value\n          }, [\n            state.value !== \"refreshing\" ? h80(QIcon_default, {\n              name: props4.icon || $q.iconSet.pullToRefresh.icon,\n              color: props4.color,\n              size: \"32px\"\n            }) : h80(QSpinner_default, {\n              size: \"24px\",\n              color: props4.color\n            })\n          ])\n        ])\n      ];\n      return hDir(\n        \"div\",\n        { class: \"q-pull-to-refresh\" },\n        child,\n        \"main\",\n        props4.disable === false,\n        () => directives.value\n      );\n    };\n  }\n});\n\n// src/components/range/QRange.js\nimport { h as h81, ref as ref50, computed as computed85, watch as watch35, getCurrentInstance as getCurrentInstance66 } from \"vue\";\nvar dragType = {\n  MIN: 0,\n  RANGE: 1,\n  MAX: 2\n};\nvar QRange_default = createComponent({\n  name: \"QRange\",\n  props: {\n    ...useSliderProps,\n    modelValue: {\n      type: Object,\n      default: () => ({ min: null, max: null }),\n      validator: (v) => \"min\" in v && \"max\" in v\n    },\n    dragRange: Boolean,\n    dragOnlyRange: Boolean,\n    leftLabelColor: String,\n    leftLabelTextColor: String,\n    rightLabelColor: String,\n    rightLabelTextColor: String,\n    leftLabelValue: [String, Number],\n    rightLabelValue: [String, Number],\n    leftThumbColor: String,\n    rightThumbColor: String\n  },\n  emits: useSliderEmits,\n  setup(props4, { emit }) {\n    const { proxy: { $q } } = getCurrentInstance66();\n    const { state, methods } = use_slider_default({\n      updateValue: updateValue2,\n      updatePosition,\n      getDragging,\n      formAttrs: computed85(() => ({\n        type: \"hidden\",\n        name: props4.name,\n        value: `${props4.modelValue.min}|${props4.modelValue.max}`\n      }))\n    });\n    const rootRef = ref50(null);\n    const curMinRatio = ref50(0);\n    const curMaxRatio = ref50(0);\n    const model = ref50({ min: 0, max: 0 });\n    function normalizeModel() {\n      model.value.min = props4.modelValue.min === null ? state.innerMin.value : between(props4.modelValue.min, state.innerMin.value, state.innerMax.value);\n      model.value.max = props4.modelValue.max === null ? state.innerMax.value : between(props4.modelValue.max, state.innerMin.value, state.innerMax.value);\n    }\n    watch35(\n      () => `${props4.modelValue.min}|${props4.modelValue.max}|${state.innerMin.value}|${state.innerMax.value}`,\n      normalizeModel\n    );\n    normalizeModel();\n    const modelMinRatio = computed85(() => methods.convertModelToRatio(model.value.min));\n    const modelMaxRatio = computed85(() => methods.convertModelToRatio(model.value.max));\n    const ratioMin = computed85(() => state.active.value === true ? curMinRatio.value : modelMinRatio.value);\n    const ratioMax = computed85(() => state.active.value === true ? curMaxRatio.value : modelMaxRatio.value);\n    const selectionBarStyle = computed85(() => {\n      const acc = {\n        [state.positionProp.value]: `${100 * ratioMin.value}%`,\n        [state.sizeProp.value]: `${100 * (ratioMax.value - ratioMin.value)}%`\n      };\n      if (props4.selectionImg !== void 0) {\n        acc.backgroundImage = `url(${props4.selectionImg}) !important`;\n      }\n      return acc;\n    });\n    const trackContainerEvents = computed85(() => {\n      if (state.editable.value !== true) {\n        return {};\n      }\n      if ($q.platform.is.mobile === true) {\n        return { onClick: methods.onMobileClick };\n      }\n      const evt = { onMousedown: methods.onActivate };\n      if (props4.dragRange === true || props4.dragOnlyRange === true) {\n        Object.assign(evt, {\n          onFocus: () => {\n            state.focus.value = \"both\";\n          },\n          onBlur: methods.onBlur,\n          onKeydown: onKeydown2,\n          onKeyup: methods.onKeyup\n        });\n      }\n      return evt;\n    });\n    function getEvents(side) {\n      return $q.platform.is.mobile !== true && state.editable.value === true && props4.dragOnlyRange !== true ? {\n        onFocus: () => {\n          state.focus.value = side;\n        },\n        onBlur: methods.onBlur,\n        onKeydown: onKeydown2,\n        onKeyup: methods.onKeyup\n      } : {};\n    }\n    const thumbTabindex = computed85(() => props4.dragOnlyRange !== true ? state.tabindex.value : null);\n    const trackContainerTabindex = computed85(() => $q.platform.is.mobile !== true && (props4.dragRange || props4.dragOnlyRange === true) ? state.tabindex.value : null);\n    const minThumbRef = ref50(null);\n    const minEvents = computed85(() => getEvents(\"min\"));\n    const getMinThumb = methods.getThumbRenderFn({\n      focusValue: \"min\",\n      getNodeData: () => ({\n        ref: minThumbRef,\n        key: \"tmin\",\n        ...minEvents.value,\n        tabindex: thumbTabindex.value\n      }),\n      ratio: ratioMin,\n      label: computed85(() => props4.leftLabelValue !== void 0 ? props4.leftLabelValue : model.value.min),\n      thumbColor: computed85(() => props4.leftThumbColor || props4.thumbColor || props4.color),\n      labelColor: computed85(() => props4.leftLabelColor || props4.labelColor),\n      labelTextColor: computed85(() => props4.leftLabelTextColor || props4.labelTextColor)\n    });\n    const maxEvents = computed85(() => getEvents(\"max\"));\n    const getMaxThumb = methods.getThumbRenderFn({\n      focusValue: \"max\",\n      getNodeData: () => ({\n        ...maxEvents.value,\n        key: \"tmax\",\n        tabindex: thumbTabindex.value\n      }),\n      ratio: ratioMax,\n      label: computed85(() => props4.rightLabelValue !== void 0 ? props4.rightLabelValue : model.value.max),\n      thumbColor: computed85(() => props4.rightThumbColor || props4.thumbColor || props4.color),\n      labelColor: computed85(() => props4.rightLabelColor || props4.labelColor),\n      labelTextColor: computed85(() => props4.rightLabelTextColor || props4.labelTextColor)\n    });\n    function updateValue2(change) {\n      if (model.value.min !== props4.modelValue.min || model.value.max !== props4.modelValue.max) {\n        emit(\"update:modelValue\", { ...model.value });\n      }\n      change === true && emit(\"change\", { ...model.value });\n    }\n    function getDragging(event) {\n      const { left, top, width: width3, height: height2 } = rootRef.value.getBoundingClientRect(), sensitivity = props4.dragOnlyRange === true ? 0 : props4.vertical === true ? minThumbRef.value.offsetHeight / (2 * height2) : minThumbRef.value.offsetWidth / (2 * width3);\n      const dragging = {\n        left,\n        top,\n        width: width3,\n        height: height2,\n        valueMin: model.value.min,\n        valueMax: model.value.max,\n        ratioMin: modelMinRatio.value,\n        ratioMax: modelMaxRatio.value\n      };\n      const ratio = methods.getDraggingRatio(event, dragging);\n      if (props4.dragOnlyRange !== true && ratio < dragging.ratioMin + sensitivity) {\n        dragging.type = dragType.MIN;\n      } else if (props4.dragOnlyRange === true || ratio < dragging.ratioMax - sensitivity) {\n        if (props4.dragRange === true || props4.dragOnlyRange === true) {\n          dragging.type = dragType.RANGE;\n          Object.assign(dragging, {\n            offsetRatio: ratio,\n            offsetModel: methods.convertRatioToModel(ratio),\n            rangeValue: dragging.valueMax - dragging.valueMin,\n            rangeRatio: dragging.ratioMax - dragging.ratioMin\n          });\n        } else {\n          dragging.type = dragging.ratioMax - ratio < ratio - dragging.ratioMin ? dragType.MAX : dragType.MIN;\n        }\n      } else {\n        dragging.type = dragType.MAX;\n      }\n      return dragging;\n    }\n    function updatePosition(event, dragging = state.dragging.value) {\n      let pos;\n      const ratio = methods.getDraggingRatio(event, dragging);\n      const localModel = methods.convertRatioToModel(ratio);\n      switch (dragging.type) {\n        case dragType.MIN:\n          if (ratio <= dragging.ratioMax) {\n            pos = {\n              minR: ratio,\n              maxR: dragging.ratioMax,\n              min: localModel,\n              max: dragging.valueMax\n            };\n            state.focus.value = \"min\";\n          } else {\n            pos = {\n              minR: dragging.ratioMax,\n              maxR: ratio,\n              min: dragging.valueMax,\n              max: localModel\n            };\n            state.focus.value = \"max\";\n          }\n          break;\n        case dragType.MAX:\n          if (ratio >= dragging.ratioMin) {\n            pos = {\n              minR: dragging.ratioMin,\n              maxR: ratio,\n              min: dragging.valueMin,\n              max: localModel\n            };\n            state.focus.value = \"max\";\n          } else {\n            pos = {\n              minR: ratio,\n              maxR: dragging.ratioMin,\n              min: localModel,\n              max: dragging.valueMin\n            };\n            state.focus.value = \"min\";\n          }\n          break;\n        case dragType.RANGE:\n          const ratioDelta = ratio - dragging.offsetRatio, minR = between(dragging.ratioMin + ratioDelta, state.innerMinRatio.value, state.innerMaxRatio.value - dragging.rangeRatio), modelDelta = localModel - dragging.offsetModel, min = between(dragging.valueMin + modelDelta, state.innerMin.value, state.innerMax.value - dragging.rangeValue);\n          pos = {\n            minR,\n            maxR: minR + dragging.rangeRatio,\n            min: state.roundValueFn.value(min),\n            max: state.roundValueFn.value(min + dragging.rangeValue)\n          };\n          state.focus.value = \"both\";\n          break;\n      }\n      model.value = model.value.min === null || model.value.max === null ? { min: pos.min || props4.min, max: pos.max || props4.max } : { min: pos.min, max: pos.max };\n      if (props4.snap !== true || props4.step === 0) {\n        curMinRatio.value = pos.minR;\n        curMaxRatio.value = pos.maxR;\n      } else {\n        curMinRatio.value = methods.convertModelToRatio(model.value.min);\n        curMaxRatio.value = methods.convertModelToRatio(model.value.max);\n      }\n    }\n    function onKeydown2(evt) {\n      if (keyCodes.includes(evt.keyCode) === false) return;\n      stopAndPrevent(evt);\n      const stepVal = ([34, 33].includes(evt.keyCode) ? 10 : 1) * state.keyStep.value, offset2 = ([34, 37, 40].includes(evt.keyCode) ? -1 : 1) * (state.isReversed.value === true ? -1 : 1) * (props4.vertical === true ? -1 : 1) * stepVal;\n      if (state.focus.value === \"both\") {\n        const interval = model.value.max - model.value.min;\n        const min = between(\n          state.roundValueFn.value(model.value.min + offset2),\n          state.innerMin.value,\n          state.innerMax.value - interval\n        );\n        model.value = {\n          min,\n          max: state.roundValueFn.value(min + interval)\n        };\n      } else if (state.focus.value === false) {\n        return;\n      } else {\n        const which = state.focus.value;\n        model.value = {\n          ...model.value,\n          [which]: between(\n            state.roundValueFn.value(model.value[which] + offset2),\n            which === \"min\" ? state.innerMin.value : model.value.min,\n            which === \"max\" ? state.innerMax.value : model.value.max\n          )\n        };\n      }\n      updateValue2();\n    }\n    return () => {\n      const content = methods.getContent(\n        selectionBarStyle,\n        trackContainerTabindex,\n        trackContainerEvents,\n        (node) => {\n          node.push(\n            getMinThumb(),\n            getMaxThumb()\n          );\n        }\n      );\n      return h81(\"div\", {\n        ref: rootRef,\n        class: \"q-range \" + state.classes.value + (props4.modelValue.min === null || props4.modelValue.max === null ? \" q-slider--no-value\" : \"\"),\n        ...state.attributes.value,\n        \"aria-valuenow\": props4.modelValue.min + \"|\" + props4.modelValue.max\n      }, content);\n    };\n  }\n});\n\n// src/components/rating/QRating.js\nimport { h as h82, ref as ref51, computed as computed86, onBeforeUpdate as onBeforeUpdate2, getCurrentInstance as getCurrentInstance67 } from \"vue\";\nvar QRating_default = createComponent({\n  name: \"QRating\",\n  props: {\n    ...useSizeProps,\n    ...useFormProps,\n    modelValue: {\n      type: Number,\n      required: true\n    },\n    max: {\n      type: [String, Number],\n      default: 5\n    },\n    icon: [String, Array],\n    iconHalf: [String, Array],\n    iconSelected: [String, Array],\n    iconAriaLabel: [String, Array],\n    color: [String, Array],\n    colorHalf: [String, Array],\n    colorSelected: [String, Array],\n    noReset: Boolean,\n    noDimming: Boolean,\n    readonly: Boolean,\n    disable: Boolean\n  },\n  emits: [\"update:modelValue\"],\n  setup(props4, { slots, emit }) {\n    const { proxy: { $q } } = getCurrentInstance67();\n    const sizeStyle = use_size_default(props4);\n    const formAttrs = useFormAttrs(props4);\n    const injectFormInput = useFormInject(formAttrs);\n    const mouseModel = ref51(0);\n    let iconRefs = {};\n    const editable = computed86(\n      () => props4.readonly !== true && props4.disable !== true\n    );\n    const classes = computed86(\n      () => `q-rating row inline items-center q-rating--${editable.value === true ? \"\" : \"non-\"}editable` + (props4.noDimming === true ? \" q-rating--no-dimming\" : \"\") + (props4.disable === true ? \" disabled\" : \"\") + (props4.color !== void 0 && Array.isArray(props4.color) === false ? ` text-${props4.color}` : \"\")\n    );\n    const iconData = computed86(() => {\n      const iconLen = Array.isArray(props4.icon) === true ? props4.icon.length : 0, selIconLen = Array.isArray(props4.iconSelected) === true ? props4.iconSelected.length : 0, halfIconLen = Array.isArray(props4.iconHalf) === true ? props4.iconHalf.length : 0, colorLen = Array.isArray(props4.color) === true ? props4.color.length : 0, selColorLen = Array.isArray(props4.colorSelected) === true ? props4.colorSelected.length : 0, halfColorLen = Array.isArray(props4.colorHalf) === true ? props4.colorHalf.length : 0;\n      return {\n        iconLen,\n        icon: iconLen > 0 ? props4.icon[iconLen - 1] : props4.icon,\n        selIconLen,\n        selIcon: selIconLen > 0 ? props4.iconSelected[selIconLen - 1] : props4.iconSelected,\n        halfIconLen,\n        halfIcon: halfIconLen > 0 ? props4.iconHalf[selIconLen - 1] : props4.iconHalf,\n        colorLen,\n        color: colorLen > 0 ? props4.color[colorLen - 1] : props4.color,\n        selColorLen,\n        selColor: selColorLen > 0 ? props4.colorSelected[selColorLen - 1] : props4.colorSelected,\n        halfColorLen,\n        halfColor: halfColorLen > 0 ? props4.colorHalf[halfColorLen - 1] : props4.colorHalf\n      };\n    });\n    const iconLabel = computed86(() => {\n      if (typeof props4.iconAriaLabel === \"string\") {\n        const label = props4.iconAriaLabel.length !== 0 ? `${props4.iconAriaLabel} ` : \"\";\n        return (i) => `${label}${i}`;\n      }\n      if (Array.isArray(props4.iconAriaLabel) === true) {\n        const iMax = props4.iconAriaLabel.length;\n        if (iMax > 0) {\n          return (i) => props4.iconAriaLabel[Math.min(i, iMax) - 1];\n        }\n      }\n      return (i, label) => `${label} ${i}`;\n    });\n    const stars = computed86(() => {\n      const acc = [], icons = iconData.value, ceil = Math.ceil(props4.modelValue), tabindex = editable.value === true ? 0 : null;\n      const halfIndex = props4.iconHalf === void 0 || ceil === props4.modelValue ? -1 : ceil;\n      for (let i = 1; i <= props4.max; i++) {\n        const active = mouseModel.value === 0 && props4.modelValue >= i || mouseModel.value > 0 && mouseModel.value >= i, half = halfIndex === i && mouseModel.value < i, exSelected = mouseModel.value > 0 && (half === true ? ceil : props4.modelValue) >= i && mouseModel.value < i, color = half === true ? i <= icons.halfColorLen ? props4.colorHalf[i - 1] : icons.halfColor : icons.selColor !== void 0 && active === true ? i <= icons.selColorLen ? props4.colorSelected[i - 1] : icons.selColor : i <= icons.colorLen ? props4.color[i - 1] : icons.color, name2 = (half === true ? i <= icons.halfIconLen ? props4.iconHalf[i - 1] : icons.halfIcon : icons.selIcon !== void 0 && (active === true || exSelected === true) ? i <= icons.selIconLen ? props4.iconSelected[i - 1] : icons.selIcon : i <= icons.iconLen ? props4.icon[i - 1] : icons.icon) || $q.iconSet.rating.icon;\n        acc.push({\n          name: (half === true ? i <= icons.halfIconLen ? props4.iconHalf[i - 1] : icons.halfIcon : icons.selIcon !== void 0 && (active === true || exSelected === true) ? i <= icons.selIconLen ? props4.iconSelected[i - 1] : icons.selIcon : i <= icons.iconLen ? props4.icon[i - 1] : icons.icon) || $q.iconSet.rating.icon,\n          attrs: {\n            tabindex,\n            role: \"radio\",\n            \"aria-checked\": props4.modelValue === i ? \"true\" : \"false\",\n            \"aria-label\": iconLabel.value(i, name2)\n          },\n          iconClass: \"q-rating__icon\" + (active === true || half === true ? \" q-rating__icon--active\" : \"\") + (exSelected === true ? \" q-rating__icon--exselected\" : \"\") + (mouseModel.value === i ? \" q-rating__icon--hovered\" : \"\") + (color !== void 0 ? ` text-${color}` : \"\")\n        });\n      }\n      return acc;\n    });\n    const attributes = computed86(() => {\n      const attrs = { role: \"radiogroup\" };\n      if (props4.disable === true) {\n        attrs[\"aria-disabled\"] = \"true\";\n      }\n      if (props4.readonly === true) {\n        attrs[\"aria-readonly\"] = \"true\";\n      }\n      return attrs;\n    });\n    function set2(value2) {\n      if (editable.value === true) {\n        const model = between(parseInt(value2, 10), 1, parseInt(props4.max, 10)), newVal = props4.noReset !== true && props4.modelValue === model ? 0 : model;\n        newVal !== props4.modelValue && emit(\"update:modelValue\", newVal);\n        mouseModel.value = 0;\n      }\n    }\n    function setHoverValue(value2) {\n      if (editable.value === true) {\n        mouseModel.value = value2;\n      }\n    }\n    function onKeyup2(e, i) {\n      switch (e.keyCode) {\n        case 13:\n        case 32:\n          set2(i);\n          return stopAndPrevent(e);\n        case 37:\n        // LEFT ARROW\n        case 40:\n          if (iconRefs[`rt${i - 1}`]) {\n            iconRefs[`rt${i - 1}`].focus();\n          }\n          return stopAndPrevent(e);\n        case 39:\n        // RIGHT ARROW\n        case 38:\n          if (iconRefs[`rt${i + 1}`]) {\n            iconRefs[`rt${i + 1}`].focus();\n          }\n          return stopAndPrevent(e);\n      }\n    }\n    function resetMouseModel() {\n      mouseModel.value = 0;\n    }\n    onBeforeUpdate2(() => {\n      iconRefs = {};\n    });\n    return () => {\n      const child = [];\n      stars.value.forEach(({ iconClass, name: name2, attrs }, index) => {\n        const i = index + 1;\n        child.push(\n          h82(\"div\", {\n            key: i,\n            ref: (el) => {\n              iconRefs[`rt${i}`] = el;\n            },\n            class: \"q-rating__icon-container flex flex-center\",\n            ...attrs,\n            onClick() {\n              set2(i);\n            },\n            onMouseover() {\n              setHoverValue(i);\n            },\n            onMouseout: resetMouseModel,\n            onFocus() {\n              setHoverValue(i);\n            },\n            onBlur: resetMouseModel,\n            onKeyup(e) {\n              onKeyup2(e, i);\n            }\n          }, hMergeSlot(\n            slots[`tip-${i}`],\n            [h82(QIcon_default, { class: iconClass, name: name2 })]\n          ))\n        );\n      });\n      if (props4.name !== void 0 && props4.disable !== true) {\n        injectFormInput(child, \"push\");\n      }\n      return h82(\"div\", {\n        class: classes.value,\n        style: sizeStyle.value,\n        ...attributes.value\n      }, child);\n    };\n  }\n});\n\n// src/components/responsive/QResponsive.js\nimport { h as h83 } from \"vue\";\nvar QResponsive_default = createComponent({\n  name: \"QResponsive\",\n  props: useRatioProps,\n  setup(props4, { slots }) {\n    const ratioStyle = use_ratio_default(props4);\n    return () => h83(\"div\", {\n      class: \"q-responsive\"\n    }, [\n      h83(\"div\", {\n        class: \"q-responsive__filler overflow-hidden\"\n      }, [\n        h83(\"div\", { style: ratioStyle.value })\n      ]),\n      h83(\"div\", {\n        class: \"q-responsive__content absolute-full fit\"\n      }, hSlot(slots.default))\n    ]);\n  }\n});\n\n// src/components/scroll-area/QScrollArea.js\nimport { h as h85, ref as ref52, computed as computed87, watch as watch36, onActivated as onActivated5, onDeactivated as onDeactivated7, onBeforeUnmount as onBeforeUnmount32, getCurrentInstance as getCurrentInstance68 } from \"vue\";\n\n// src/components/scroll-area/ScrollAreaControls.js\nimport { h as h84, withDirectives as withDirectives6 } from \"vue\";\nvar ScrollAreaControls_default = createComponent({\n  props: [\n    \"store\",\n    \"barStyle\",\n    \"verticalBarStyle\",\n    \"horizontalBarStyle\"\n  ],\n  setup(props4) {\n    return () => [\n      h84(\"div\", {\n        class: props4.store.scroll.vertical.barClass.value,\n        style: [props4.barStyle, props4.verticalBarStyle],\n        \"aria-hidden\": \"true\",\n        onMousedown: props4.store.onVerticalMousedown\n      }),\n      h84(\"div\", {\n        class: props4.store.scroll.horizontal.barClass.value,\n        style: [props4.barStyle, props4.horizontalBarStyle],\n        \"aria-hidden\": \"true\",\n        onMousedown: props4.store.onHorizontalMousedown\n      }),\n      withDirectives6(\n        h84(\"div\", {\n          ref: props4.store.scroll.vertical.ref,\n          class: props4.store.scroll.vertical.thumbClass.value,\n          style: props4.store.scroll.vertical.style.value,\n          \"aria-hidden\": \"true\"\n        }),\n        props4.store.thumbVertDir\n      ),\n      withDirectives6(\n        h84(\"div\", {\n          ref: props4.store.scroll.horizontal.ref,\n          class: props4.store.scroll.horizontal.thumbClass.value,\n          style: props4.store.scroll.horizontal.style.value,\n          \"aria-hidden\": \"true\"\n        }),\n        props4.store.thumbHorizDir\n      )\n    ];\n  }\n});\n\n// src/components/scroll-area/QScrollArea.js\nvar axisList = [\"vertical\", \"horizontal\"];\nvar dirProps = {\n  vertical: { offset: \"offsetY\", scroll: \"scrollTop\", dir: \"down\", dist: \"y\" },\n  horizontal: { offset: \"offsetX\", scroll: \"scrollLeft\", dir: \"right\", dist: \"x\" }\n};\nvar panOpts = {\n  prevent: true,\n  mouse: true,\n  mouseAllDir: true\n};\nvar getMinThumbSize = (size2) => size2 >= 250 ? 50 : Math.ceil(size2 / 5);\nvar QScrollArea_default = createComponent({\n  name: \"QScrollArea\",\n  props: {\n    ...useDarkProps,\n    thumbStyle: Object,\n    verticalThumbStyle: Object,\n    horizontalThumbStyle: Object,\n    barStyle: [Array, String, Object],\n    verticalBarStyle: [Array, String, Object],\n    horizontalBarStyle: [Array, String, Object],\n    verticalOffset: {\n      type: Array,\n      default: [0, 0]\n    },\n    horizontalOffset: {\n      type: Array,\n      default: [0, 0]\n    },\n    contentStyle: [Array, String, Object],\n    contentActiveStyle: [Array, String, Object],\n    delay: {\n      type: [String, Number],\n      default: 1e3\n    },\n    visible: {\n      type: Boolean,\n      default: null\n    },\n    tabindex: [String, Number],\n    onScroll: Function\n  },\n  setup(props4, { slots, emit }) {\n    const tempShowing = ref52(false);\n    const panning = ref52(false);\n    const hover = ref52(false);\n    const container = {\n      vertical: ref52(0),\n      horizontal: ref52(0)\n    };\n    const scroll = {\n      vertical: {\n        ref: ref52(null),\n        position: ref52(0),\n        size: ref52(0)\n      },\n      horizontal: {\n        ref: ref52(null),\n        position: ref52(0),\n        size: ref52(0)\n      }\n    };\n    const { proxy } = getCurrentInstance68();\n    const isDark = use_dark_default(props4, proxy.$q);\n    let timer2 = null, panRefPos;\n    const targetRef = ref52(null);\n    const classes = computed87(\n      () => \"q-scrollarea\" + (isDark.value === true ? \" q-scrollarea--dark\" : \"\")\n    );\n    Object.assign(container, {\n      verticalInner: computed87(() => container.vertical.value - props4.verticalOffset[0] - props4.verticalOffset[1]),\n      horizontalInner: computed87(() => container.horizontal.value - props4.horizontalOffset[0] - props4.horizontalOffset[1])\n    });\n    scroll.vertical.percentage = computed87(() => {\n      const diff2 = scroll.vertical.size.value - container.vertical.value;\n      if (diff2 <= 0) {\n        return 0;\n      }\n      const p = between(scroll.vertical.position.value / diff2, 0, 1);\n      return Math.round(p * 1e4) / 1e4;\n    });\n    scroll.vertical.thumbHidden = computed87(() => (props4.visible === null ? hover.value : props4.visible) !== true && tempShowing.value === false && panning.value === false || scroll.vertical.size.value <= container.vertical.value + 1);\n    scroll.vertical.thumbStart = computed87(() => props4.verticalOffset[0] + scroll.vertical.percentage.value * (container.verticalInner.value - scroll.vertical.thumbSize.value));\n    scroll.vertical.thumbSize = computed87(\n      () => Math.round(\n        between(\n          container.verticalInner.value * container.verticalInner.value / scroll.vertical.size.value,\n          getMinThumbSize(container.verticalInner.value),\n          container.verticalInner.value\n        )\n      )\n    );\n    scroll.vertical.style = computed87(() => ({\n      ...props4.thumbStyle,\n      ...props4.verticalThumbStyle,\n      top: `${scroll.vertical.thumbStart.value}px`,\n      height: `${scroll.vertical.thumbSize.value}px`,\n      right: `${props4.horizontalOffset[1]}px`\n    }));\n    scroll.vertical.thumbClass = computed87(() => \"q-scrollarea__thumb q-scrollarea__thumb--v absolute-right\" + (scroll.vertical.thumbHidden.value === true ? \" q-scrollarea__thumb--invisible\" : \"\"));\n    scroll.vertical.barClass = computed87(() => \"q-scrollarea__bar q-scrollarea__bar--v absolute-right\" + (scroll.vertical.thumbHidden.value === true ? \" q-scrollarea__bar--invisible\" : \"\"));\n    scroll.horizontal.percentage = computed87(() => {\n      const diff2 = scroll.horizontal.size.value - container.horizontal.value;\n      if (diff2 <= 0) {\n        return 0;\n      }\n      const p = between(Math.abs(scroll.horizontal.position.value) / diff2, 0, 1);\n      return Math.round(p * 1e4) / 1e4;\n    });\n    scroll.horizontal.thumbHidden = computed87(() => (props4.visible === null ? hover.value : props4.visible) !== true && tempShowing.value === false && panning.value === false || scroll.horizontal.size.value <= container.horizontal.value + 1);\n    scroll.horizontal.thumbStart = computed87(() => props4.horizontalOffset[0] + scroll.horizontal.percentage.value * (container.horizontalInner.value - scroll.horizontal.thumbSize.value));\n    scroll.horizontal.thumbSize = computed87(\n      () => Math.round(\n        between(\n          container.horizontalInner.value * container.horizontalInner.value / scroll.horizontal.size.value,\n          getMinThumbSize(container.horizontalInner.value),\n          container.horizontalInner.value\n        )\n      )\n    );\n    scroll.horizontal.style = computed87(() => ({\n      ...props4.thumbStyle,\n      ...props4.horizontalThumbStyle,\n      [proxy.$q.lang.rtl === true ? \"right\" : \"left\"]: `${scroll.horizontal.thumbStart.value}px`,\n      width: `${scroll.horizontal.thumbSize.value}px`,\n      bottom: `${props4.verticalOffset[1]}px`\n    }));\n    scroll.horizontal.thumbClass = computed87(() => \"q-scrollarea__thumb q-scrollarea__thumb--h absolute-bottom\" + (scroll.horizontal.thumbHidden.value === true ? \" q-scrollarea__thumb--invisible\" : \"\"));\n    scroll.horizontal.barClass = computed87(() => \"q-scrollarea__bar q-scrollarea__bar--h absolute-bottom\" + (scroll.horizontal.thumbHidden.value === true ? \" q-scrollarea__bar--invisible\" : \"\"));\n    const mainStyle = computed87(() => scroll.vertical.thumbHidden.value === true && scroll.horizontal.thumbHidden.value === true ? props4.contentStyle : props4.contentActiveStyle);\n    function getScroll() {\n      const info = {};\n      axisList.forEach((axis) => {\n        const data = scroll[axis];\n        Object.assign(info, {\n          [axis + \"Position\"]: data.position.value,\n          [axis + \"Percentage\"]: data.percentage.value,\n          [axis + \"Size\"]: data.size.value,\n          [axis + \"ContainerSize\"]: container[axis].value,\n          [axis + \"ContainerInnerSize\"]: container[axis + \"Inner\"].value\n        });\n      });\n      return info;\n    }\n    const emitScroll = debounce_default(() => {\n      const info = getScroll();\n      info.ref = proxy;\n      emit(\"scroll\", info);\n    }, 0);\n    function localSetScrollPosition(axis, offset2, duration2) {\n      if (axisList.includes(axis) === false) {\n        console.error(\"[QScrollArea]: wrong first param of setScrollPosition (vertical/horizontal)\");\n        return;\n      }\n      const fn = axis === \"vertical\" ? setVerticalScrollPosition : setHorizontalScrollPosition;\n      fn(targetRef.value, offset2, duration2);\n    }\n    function updateContainer({ height: height2, width: width3 }) {\n      let change = false;\n      if (container.vertical.value !== height2) {\n        container.vertical.value = height2;\n        change = true;\n      }\n      if (container.horizontal.value !== width3) {\n        container.horizontal.value = width3;\n        change = true;\n      }\n      change === true && startTimer();\n    }\n    function updateScroll({ position: position2 }) {\n      let change = false;\n      if (scroll.vertical.position.value !== position2.top) {\n        scroll.vertical.position.value = position2.top;\n        change = true;\n      }\n      if (scroll.horizontal.position.value !== position2.left) {\n        scroll.horizontal.position.value = position2.left;\n        change = true;\n      }\n      change === true && startTimer();\n    }\n    function updateScrollSize({ height: height2, width: width3 }) {\n      if (scroll.horizontal.size.value !== width3) {\n        scroll.horizontal.size.value = width3;\n        startTimer();\n      }\n      if (scroll.vertical.size.value !== height2) {\n        scroll.vertical.size.value = height2;\n        startTimer();\n      }\n    }\n    function onPanThumb(e, axis) {\n      const data = scroll[axis];\n      if (e.isFirst === true) {\n        if (data.thumbHidden.value === true) return;\n        panRefPos = data.position.value;\n        panning.value = true;\n      } else if (panning.value !== true) {\n        return;\n      }\n      if (e.isFinal === true) {\n        panning.value = false;\n      }\n      const dProp = dirProps[axis];\n      const multiplier = (data.size.value - container[axis].value) / (container[axis + \"Inner\"].value - data.thumbSize.value);\n      const distance = e.distance[dProp.dist];\n      const pos = panRefPos + (e.direction === dProp.dir ? 1 : -1) * distance * multiplier;\n      setScroll3(pos, axis);\n    }\n    function onMousedown(evt, axis) {\n      const data = scroll[axis];\n      if (data.thumbHidden.value !== true) {\n        const startOffset = axis === \"vertical\" ? props4.verticalOffset[0] : props4.horizontalOffset[0];\n        const offset2 = evt[dirProps[axis].offset] - startOffset;\n        const thumbStart = data.thumbStart.value - startOffset;\n        if (offset2 < thumbStart || offset2 > thumbStart + data.thumbSize.value) {\n          const targetThumbStart = offset2 - data.thumbSize.value / 2;\n          const percentage = between(targetThumbStart / (container[axis + \"Inner\"].value - data.thumbSize.value), 0, 1);\n          setScroll3(percentage * Math.max(0, data.size.value - container[axis].value), axis);\n        }\n        if (data.ref.value !== null) {\n          data.ref.value.dispatchEvent(new MouseEvent(evt.type, evt));\n        }\n      }\n    }\n    function startTimer() {\n      tempShowing.value = true;\n      timer2 !== null && clearTimeout(timer2);\n      timer2 = setTimeout(() => {\n        timer2 = null;\n        tempShowing.value = false;\n      }, props4.delay);\n      props4.onScroll !== void 0 && emitScroll();\n    }\n    function setScroll3(offset2, axis) {\n      targetRef.value[dirProps[axis].scroll] = offset2;\n    }\n    let mouseEventTimer = null;\n    function onMouseenter() {\n      if (mouseEventTimer !== null) {\n        clearTimeout(mouseEventTimer);\n      }\n      mouseEventTimer = setTimeout(() => {\n        mouseEventTimer = null;\n        hover.value = true;\n      }, proxy.$q.platform.is.ios ? 50 : 0);\n    }\n    function onMouseleave() {\n      if (mouseEventTimer !== null) {\n        clearTimeout(mouseEventTimer);\n        mouseEventTimer = null;\n      }\n      hover.value = false;\n    }\n    let scrollPosition = null;\n    watch36(() => proxy.$q.lang.rtl, (rtl) => {\n      if (targetRef.value !== null) {\n        setHorizontalScrollPosition(\n          targetRef.value,\n          Math.abs(scroll.horizontal.position.value) * (rtl === true ? -1 : 1)\n        );\n      }\n    });\n    onDeactivated7(() => {\n      scrollPosition = {\n        top: scroll.vertical.position.value,\n        left: scroll.horizontal.position.value\n      };\n    });\n    onActivated5(() => {\n      if (scrollPosition === null) return;\n      const scrollTarget = targetRef.value;\n      if (scrollTarget !== null) {\n        setHorizontalScrollPosition(scrollTarget, scrollPosition.left);\n        setVerticalScrollPosition(scrollTarget, scrollPosition.top);\n      }\n    });\n    onBeforeUnmount32(emitScroll.cancel);\n    Object.assign(proxy, {\n      getScrollTarget: () => targetRef.value,\n      getScroll,\n      getScrollPosition: () => ({\n        top: scroll.vertical.position.value,\n        left: scroll.horizontal.position.value\n      }),\n      getScrollPercentage: () => ({\n        top: scroll.vertical.percentage.value,\n        left: scroll.horizontal.percentage.value\n      }),\n      setScrollPosition: localSetScrollPosition,\n      setScrollPercentage(axis, percentage, duration2) {\n        localSetScrollPosition(\n          axis,\n          percentage * (scroll[axis].size.value - container[axis].value) * (axis === \"horizontal\" && proxy.$q.lang.rtl === true ? -1 : 1),\n          duration2\n        );\n      }\n    });\n    const store = {\n      scroll,\n      thumbVertDir: [[\n        TouchPan_default,\n        (e) => {\n          onPanThumb(e, \"vertical\");\n        },\n        void 0,\n        { vertical: true, ...panOpts }\n      ]],\n      thumbHorizDir: [[\n        TouchPan_default,\n        (e) => {\n          onPanThumb(e, \"horizontal\");\n        },\n        void 0,\n        { horizontal: true, ...panOpts }\n      ]],\n      onVerticalMousedown(evt) {\n        onMousedown(evt, \"vertical\");\n      },\n      onHorizontalMousedown(evt) {\n        onMousedown(evt, \"horizontal\");\n      }\n    };\n    return () => {\n      return h85(\"div\", {\n        class: classes.value,\n        onMouseenter,\n        onMouseleave\n      }, [\n        h85(\"div\", {\n          ref: targetRef,\n          class: \"q-scrollarea__container scroll relative-position fit hide-scrollbar\",\n          tabindex: props4.tabindex !== void 0 ? props4.tabindex : void 0\n        }, [\n          h85(\"div\", {\n            class: \"q-scrollarea__content absolute\",\n            style: mainStyle.value\n          }, hMergeSlot(slots.default, [\n            h85(QResizeObserver_default, {\n              debounce: 0,\n              onResize: updateScrollSize\n            })\n          ])),\n          h85(QScrollObserver_default, {\n            axis: \"both\",\n            onScroll: updateScroll\n          })\n        ]),\n        h85(QResizeObserver_default, {\n          debounce: 0,\n          onResize: updateContainer\n        }),\n        h85(ScrollAreaControls_default, {\n          store,\n          barStyle: props4.barStyle,\n          verticalBarStyle: props4.verticalBarStyle,\n          horizontalBarStyle: props4.horizontalBarStyle\n        })\n      ]);\n    };\n  }\n});\n\n// src/components/select/QSelect.js\nimport { h as h87, ref as ref54, computed as computed89, watch as watch38, onBeforeUpdate as onBeforeUpdate3, onUpdated, onBeforeUnmount as onBeforeUnmount34, nextTick as nextTick16, getCurrentInstance as getCurrentInstance70 } from \"vue\";\n\n// src/components/virtual-scroll/use-virtual-scroll.js\nimport { h as h86, ref as ref53, computed as computed88, watch as watch37, onActivated as onActivated6, onDeactivated as onDeactivated8, onBeforeMount as onBeforeMount2, onBeforeUnmount as onBeforeUnmount33, nextTick as nextTick15, getCurrentInstance as getCurrentInstance69 } from \"vue\";\nvar aggBucketSize = 1e3;\nvar scrollToEdges = [\n  \"start\",\n  \"center\",\n  \"end\",\n  \"start-force\",\n  \"center-force\",\n  \"end-force\"\n];\nvar filterProto = Array.prototype.filter;\nvar setOverflowAnchor = __QUASAR_SSR__ || window.getComputedStyle(document.body).overflowAnchor === void 0 ? noop : function(contentEl, index) {\n  if (contentEl === null) return;\n  if (contentEl._qOverflowAnimationFrame !== void 0) {\n    cancelAnimationFrame(contentEl._qOverflowAnimationFrame);\n  }\n  contentEl._qOverflowAnimationFrame = requestAnimationFrame(() => {\n    if (contentEl === null) return;\n    contentEl._qOverflowAnimationFrame = void 0;\n    const children = contentEl.children || [];\n    filterProto.call(children, (el2) => el2.dataset && el2.dataset.qVsAnchor !== void 0).forEach((el2) => {\n      delete el2.dataset.qVsAnchor;\n    });\n    const el = children[index];\n    if (el && el.dataset) {\n      el.dataset.qVsAnchor = \"\";\n    }\n  });\n};\nfunction sumFn(acc, h138) {\n  return acc + h138;\n}\nfunction getScrollDetails(parent, child, beforeRef, afterRef, horizontal, rtl, stickyStart, stickyEnd) {\n  const parentCalc = parent === window ? document.scrollingElement || document.documentElement : parent, propElSize = horizontal === true ? \"offsetWidth\" : \"offsetHeight\", details = {\n    scrollStart: 0,\n    scrollViewSize: -stickyStart - stickyEnd,\n    scrollMaxSize: 0,\n    offsetStart: -stickyStart,\n    offsetEnd: -stickyEnd\n  };\n  if (horizontal === true) {\n    if (parent === window) {\n      details.scrollStart = window.pageXOffset || window.scrollX || document.body.scrollLeft || 0;\n      details.scrollViewSize += document.documentElement.clientWidth;\n    } else {\n      details.scrollStart = parentCalc.scrollLeft;\n      details.scrollViewSize += parentCalc.clientWidth;\n    }\n    details.scrollMaxSize = parentCalc.scrollWidth;\n    if (rtl === true) {\n      details.scrollStart = (rtlHasScrollBug === true ? details.scrollMaxSize - details.scrollViewSize : 0) - details.scrollStart;\n    }\n  } else {\n    if (parent === window) {\n      details.scrollStart = window.pageYOffset || window.scrollY || document.body.scrollTop || 0;\n      details.scrollViewSize += document.documentElement.clientHeight;\n    } else {\n      details.scrollStart = parentCalc.scrollTop;\n      details.scrollViewSize += parentCalc.clientHeight;\n    }\n    details.scrollMaxSize = parentCalc.scrollHeight;\n  }\n  if (beforeRef !== null) {\n    for (let el = beforeRef.previousElementSibling; el !== null; el = el.previousElementSibling) {\n      if (el.classList.contains(\"q-virtual-scroll--skip\") === false) {\n        details.offsetStart += el[propElSize];\n      }\n    }\n  }\n  if (afterRef !== null) {\n    for (let el = afterRef.nextElementSibling; el !== null; el = el.nextElementSibling) {\n      if (el.classList.contains(\"q-virtual-scroll--skip\") === false) {\n        details.offsetEnd += el[propElSize];\n      }\n    }\n  }\n  if (child !== parent) {\n    const parentRect = parentCalc.getBoundingClientRect(), childRect = child.getBoundingClientRect();\n    if (horizontal === true) {\n      details.offsetStart += childRect.left - parentRect.left;\n      details.offsetEnd -= childRect.width;\n    } else {\n      details.offsetStart += childRect.top - parentRect.top;\n      details.offsetEnd -= childRect.height;\n    }\n    if (parent !== window) {\n      details.offsetStart += details.scrollStart;\n    }\n    details.offsetEnd += details.scrollMaxSize - details.offsetStart;\n  }\n  return details;\n}\nfunction setScroll2(parent, scroll, horizontal, rtl) {\n  if (scroll === \"end\") {\n    scroll = (parent === window ? document.body : parent)[horizontal === true ? \"scrollWidth\" : \"scrollHeight\"];\n  }\n  if (parent === window) {\n    if (horizontal === true) {\n      if (rtl === true) {\n        scroll = (rtlHasScrollBug === true ? document.body.scrollWidth - document.documentElement.clientWidth : 0) - scroll;\n      }\n      window.scrollTo(scroll, window.pageYOffset || window.scrollY || document.body.scrollTop || 0);\n    } else {\n      window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, scroll);\n    }\n  } else if (horizontal === true) {\n    if (rtl === true) {\n      scroll = (rtlHasScrollBug === true ? parent.scrollWidth - parent.offsetWidth : 0) - scroll;\n    }\n    parent.scrollLeft = scroll;\n  } else {\n    parent.scrollTop = scroll;\n  }\n}\nfunction sumSize(sizeAgg, size2, from, to) {\n  if (from >= to) {\n    return 0;\n  }\n  const lastTo = size2.length, fromAgg = Math.floor(from / aggBucketSize), toAgg = Math.floor((to - 1) / aggBucketSize) + 1;\n  let total = sizeAgg.slice(fromAgg, toAgg).reduce(sumFn, 0);\n  if (from % aggBucketSize !== 0) {\n    total -= size2.slice(fromAgg * aggBucketSize, from).reduce(sumFn, 0);\n  }\n  if (to % aggBucketSize !== 0 && to !== lastTo) {\n    total -= size2.slice(to, toAgg * aggBucketSize).reduce(sumFn, 0);\n  }\n  return total;\n}\nvar commonVirtScrollProps = {\n  virtualScrollSliceSize: {\n    type: [Number, String],\n    default: 10\n  },\n  virtualScrollSliceRatioBefore: {\n    type: [Number, String],\n    default: 1\n  },\n  virtualScrollSliceRatioAfter: {\n    type: [Number, String],\n    default: 1\n  },\n  virtualScrollItemSize: {\n    type: [Number, String],\n    default: 24\n  },\n  virtualScrollStickySizeStart: {\n    type: [Number, String],\n    default: 0\n  },\n  virtualScrollStickySizeEnd: {\n    type: [Number, String],\n    default: 0\n  },\n  tableColspan: [Number, String]\n};\nvar commonVirtScrollPropsList = Object.keys(commonVirtScrollProps);\nvar useVirtualScrollProps = {\n  virtualScrollHorizontal: Boolean,\n  onVirtualScroll: Function,\n  ...commonVirtScrollProps\n};\nfunction useVirtualScroll({\n  virtualScrollLength,\n  getVirtualScrollTarget,\n  getVirtualScrollEl,\n  virtualScrollItemSizeComputed\n  // optional\n}) {\n  const vm2 = getCurrentInstance69();\n  const { props: props4, emit, proxy } = vm2;\n  const { $q } = proxy;\n  let prevScrollStart, prevToIndex, localScrollViewSize, virtualScrollSizesAgg = [], virtualScrollSizes;\n  const virtualScrollPaddingBefore = ref53(0);\n  const virtualScrollPaddingAfter = ref53(0);\n  const virtualScrollSliceSizeComputed = ref53({});\n  const beforeRef = ref53(null);\n  const afterRef = ref53(null);\n  const contentRef = ref53(null);\n  const virtualScrollSliceRange = ref53({ from: 0, to: 0 });\n  const colspanAttr = computed88(() => props4.tableColspan !== void 0 ? props4.tableColspan : 100);\n  if (virtualScrollItemSizeComputed === void 0) {\n    virtualScrollItemSizeComputed = computed88(() => props4.virtualScrollItemSize);\n  }\n  const needsReset = computed88(() => virtualScrollItemSizeComputed.value + \";\" + props4.virtualScrollHorizontal);\n  const needsSliceRecalc = computed88(\n    () => needsReset.value + \";\" + props4.virtualScrollSliceRatioBefore + \";\" + props4.virtualScrollSliceRatioAfter\n  );\n  watch37(needsSliceRecalc, () => {\n    setVirtualScrollSize();\n  });\n  watch37(needsReset, reset);\n  function reset() {\n    localResetVirtualScroll(prevToIndex, true);\n  }\n  function refresh(toIndex) {\n    localResetVirtualScroll(toIndex === void 0 ? prevToIndex : toIndex);\n  }\n  function scrollTo(toIndex, edge) {\n    const scrollEl = getVirtualScrollTarget();\n    if (scrollEl === void 0 || scrollEl === null || scrollEl.nodeType === 8) return;\n    const scrollDetails = getScrollDetails(\n      scrollEl,\n      getVirtualScrollEl(),\n      beforeRef.value,\n      afterRef.value,\n      props4.virtualScrollHorizontal,\n      $q.lang.rtl,\n      props4.virtualScrollStickySizeStart,\n      props4.virtualScrollStickySizeEnd\n    );\n    localScrollViewSize !== scrollDetails.scrollViewSize && setVirtualScrollSize(scrollDetails.scrollViewSize);\n    setVirtualScrollSliceRange(\n      scrollEl,\n      scrollDetails,\n      Math.min(virtualScrollLength.value - 1, Math.max(0, parseInt(toIndex, 10) || 0)),\n      0,\n      scrollToEdges.indexOf(edge) !== -1 ? edge : prevToIndex !== -1 && toIndex > prevToIndex ? \"end\" : \"start\"\n    );\n  }\n  function localOnVirtualScrollEvt() {\n    const scrollEl = getVirtualScrollTarget();\n    if (scrollEl === void 0 || scrollEl === null || scrollEl.nodeType === 8) return;\n    const scrollDetails = getScrollDetails(\n      scrollEl,\n      getVirtualScrollEl(),\n      beforeRef.value,\n      afterRef.value,\n      props4.virtualScrollHorizontal,\n      $q.lang.rtl,\n      props4.virtualScrollStickySizeStart,\n      props4.virtualScrollStickySizeEnd\n    ), listLastIndex = virtualScrollLength.value - 1, listEndOffset = scrollDetails.scrollMaxSize - scrollDetails.offsetStart - scrollDetails.offsetEnd - virtualScrollPaddingAfter.value;\n    if (prevScrollStart === scrollDetails.scrollStart) return;\n    if (scrollDetails.scrollMaxSize <= 0) {\n      setVirtualScrollSliceRange(scrollEl, scrollDetails, 0, 0);\n      return;\n    }\n    localScrollViewSize !== scrollDetails.scrollViewSize && setVirtualScrollSize(scrollDetails.scrollViewSize);\n    updateVirtualScrollSizes(virtualScrollSliceRange.value.from);\n    const scrollMaxStart = Math.floor(scrollDetails.scrollMaxSize - Math.max(scrollDetails.scrollViewSize, scrollDetails.offsetEnd) - Math.min(virtualScrollSizes[listLastIndex], scrollDetails.scrollViewSize / 2));\n    if (scrollMaxStart > 0 && Math.ceil(scrollDetails.scrollStart) >= scrollMaxStart) {\n      setVirtualScrollSliceRange(\n        scrollEl,\n        scrollDetails,\n        listLastIndex,\n        scrollDetails.scrollMaxSize - scrollDetails.offsetEnd - virtualScrollSizesAgg.reduce(sumFn, 0)\n      );\n      return;\n    }\n    let toIndex = 0, listOffset = scrollDetails.scrollStart - scrollDetails.offsetStart, offset2 = listOffset;\n    if (listOffset <= listEndOffset && listOffset + scrollDetails.scrollViewSize >= virtualScrollPaddingBefore.value) {\n      listOffset -= virtualScrollPaddingBefore.value;\n      toIndex = virtualScrollSliceRange.value.from;\n      offset2 = listOffset;\n    } else {\n      for (let j = 0; listOffset >= virtualScrollSizesAgg[j] && toIndex < listLastIndex; j++) {\n        listOffset -= virtualScrollSizesAgg[j];\n        toIndex += aggBucketSize;\n      }\n    }\n    while (listOffset > 0 && toIndex < listLastIndex) {\n      listOffset -= virtualScrollSizes[toIndex];\n      if (listOffset > -scrollDetails.scrollViewSize) {\n        toIndex++;\n        offset2 = listOffset;\n      } else {\n        offset2 = virtualScrollSizes[toIndex] + listOffset;\n      }\n    }\n    setVirtualScrollSliceRange(\n      scrollEl,\n      scrollDetails,\n      toIndex,\n      offset2\n    );\n  }\n  function setVirtualScrollSliceRange(scrollEl, scrollDetails, toIndex, offset2, align) {\n    const alignForce = typeof align === \"string\" && align.indexOf(\"-force\") !== -1;\n    const alignEnd = alignForce === true ? align.replace(\"-force\", \"\") : align;\n    const alignRange = alignEnd !== void 0 ? alignEnd : \"start\";\n    let from = Math.max(0, toIndex - virtualScrollSliceSizeComputed.value[alignRange]), to = from + virtualScrollSliceSizeComputed.value.total;\n    if (to > virtualScrollLength.value) {\n      to = virtualScrollLength.value;\n      from = Math.max(0, to - virtualScrollSliceSizeComputed.value.total);\n    }\n    prevScrollStart = scrollDetails.scrollStart;\n    const rangeChanged = from !== virtualScrollSliceRange.value.from || to !== virtualScrollSliceRange.value.to;\n    if (rangeChanged === false && alignEnd === void 0) {\n      emitScroll(toIndex);\n      return;\n    }\n    const { activeElement } = document;\n    const contentEl = contentRef.value;\n    if (rangeChanged === true && contentEl !== null && contentEl !== activeElement && contentEl.contains(activeElement) === true) {\n      contentEl.addEventListener(\"focusout\", onBlurRefocusFn);\n      setTimeout(() => {\n        contentEl !== null && contentEl.removeEventListener(\"focusout\", onBlurRefocusFn);\n      });\n    }\n    setOverflowAnchor(contentEl, toIndex - from);\n    const sizeBefore = alignEnd !== void 0 ? virtualScrollSizes.slice(from, toIndex).reduce(sumFn, 0) : 0;\n    if (rangeChanged === true) {\n      const tempTo = to >= virtualScrollSliceRange.value.from && from <= virtualScrollSliceRange.value.to ? virtualScrollSliceRange.value.to : to;\n      virtualScrollSliceRange.value = { from, to: tempTo };\n      virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, from);\n      virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, to, virtualScrollLength.value);\n      requestAnimationFrame(() => {\n        if (virtualScrollSliceRange.value.to !== to && prevScrollStart === scrollDetails.scrollStart) {\n          virtualScrollSliceRange.value = { from: virtualScrollSliceRange.value.from, to };\n          virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, to, virtualScrollLength.value);\n        }\n      });\n    }\n    requestAnimationFrame(() => {\n      if (prevScrollStart !== scrollDetails.scrollStart) return;\n      if (rangeChanged === true) {\n        updateVirtualScrollSizes(from);\n      }\n      const sizeAfter = virtualScrollSizes.slice(from, toIndex).reduce(sumFn, 0), posStart = sizeAfter + scrollDetails.offsetStart + virtualScrollPaddingBefore.value, posEnd = posStart + virtualScrollSizes[toIndex];\n      let scrollPosition = posStart + offset2;\n      if (alignEnd !== void 0) {\n        const sizeDiff = sizeAfter - sizeBefore;\n        const scrollStart = scrollDetails.scrollStart + sizeDiff;\n        scrollPosition = alignForce !== true && scrollStart < posStart && posEnd < scrollStart + scrollDetails.scrollViewSize ? scrollStart : alignEnd === \"end\" ? posEnd - scrollDetails.scrollViewSize : posStart - (alignEnd === \"start\" ? 0 : Math.round((scrollDetails.scrollViewSize - virtualScrollSizes[toIndex]) / 2));\n      }\n      prevScrollStart = scrollPosition;\n      setScroll2(\n        scrollEl,\n        scrollPosition,\n        props4.virtualScrollHorizontal,\n        $q.lang.rtl\n      );\n      emitScroll(toIndex);\n    });\n  }\n  function updateVirtualScrollSizes(from) {\n    const contentEl = contentRef.value;\n    if (contentEl) {\n      const children = filterProto.call(\n        contentEl.children,\n        (el) => el.classList && el.classList.contains(\"q-virtual-scroll--skip\") === false\n      ), childrenLength = children.length, sizeFn = props4.virtualScrollHorizontal === true ? (el) => el.getBoundingClientRect().width : (el) => el.offsetHeight;\n      let index = from, size2, diff2;\n      for (let i = 0; i < childrenLength; ) {\n        size2 = sizeFn(children[i]);\n        i++;\n        while (i < childrenLength && children[i].classList.contains(\"q-virtual-scroll--with-prev\") === true) {\n          size2 += sizeFn(children[i]);\n          i++;\n        }\n        diff2 = size2 - virtualScrollSizes[index];\n        if (diff2 !== 0) {\n          virtualScrollSizes[index] += diff2;\n          virtualScrollSizesAgg[Math.floor(index / aggBucketSize)] += diff2;\n        }\n        index++;\n      }\n    }\n  }\n  function onBlurRefocusFn() {\n    contentRef.value !== null && contentRef.value !== void 0 && contentRef.value.focus();\n  }\n  function localResetVirtualScroll(toIndex, fullReset) {\n    const defaultSize = 1 * virtualScrollItemSizeComputed.value;\n    if (fullReset === true || Array.isArray(virtualScrollSizes) === false) {\n      virtualScrollSizes = [];\n    }\n    const oldVirtualScrollSizesLength = virtualScrollSizes.length;\n    virtualScrollSizes.length = virtualScrollLength.value;\n    for (let i = virtualScrollLength.value - 1; i >= oldVirtualScrollSizesLength; i--) {\n      virtualScrollSizes[i] = defaultSize;\n    }\n    const jMax = Math.floor((virtualScrollLength.value - 1) / aggBucketSize);\n    virtualScrollSizesAgg = [];\n    for (let j = 0; j <= jMax; j++) {\n      let size2 = 0;\n      const iMax = Math.min((j + 1) * aggBucketSize, virtualScrollLength.value);\n      for (let i = j * aggBucketSize; i < iMax; i++) {\n        size2 += virtualScrollSizes[i];\n      }\n      virtualScrollSizesAgg.push(size2);\n    }\n    prevToIndex = -1;\n    prevScrollStart = void 0;\n    virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from);\n    virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value);\n    if (toIndex >= 0) {\n      updateVirtualScrollSizes(virtualScrollSliceRange.value.from);\n      nextTick15(() => {\n        scrollTo(toIndex);\n      });\n    } else {\n      onVirtualScrollEvt();\n    }\n  }\n  function setVirtualScrollSize(scrollViewSize) {\n    if (scrollViewSize === void 0 && typeof window !== \"undefined\") {\n      const scrollEl = getVirtualScrollTarget();\n      if (scrollEl !== void 0 && scrollEl !== null && scrollEl.nodeType !== 8) {\n        scrollViewSize = getScrollDetails(\n          scrollEl,\n          getVirtualScrollEl(),\n          beforeRef.value,\n          afterRef.value,\n          props4.virtualScrollHorizontal,\n          $q.lang.rtl,\n          props4.virtualScrollStickySizeStart,\n          props4.virtualScrollStickySizeEnd\n        ).scrollViewSize;\n      }\n    }\n    localScrollViewSize = scrollViewSize;\n    const virtualScrollSliceRatioBefore = parseFloat(props4.virtualScrollSliceRatioBefore) || 0;\n    const virtualScrollSliceRatioAfter = parseFloat(props4.virtualScrollSliceRatioAfter) || 0;\n    const multiplier = 1 + virtualScrollSliceRatioBefore + virtualScrollSliceRatioAfter;\n    const view = scrollViewSize === void 0 || scrollViewSize <= 0 ? 1 : Math.ceil(scrollViewSize / virtualScrollItemSizeComputed.value);\n    const baseSize = Math.max(\n      1,\n      view,\n      Math.ceil((props4.virtualScrollSliceSize > 0 ? props4.virtualScrollSliceSize : 10) / multiplier)\n    );\n    virtualScrollSliceSizeComputed.value = {\n      total: Math.ceil(baseSize * multiplier),\n      start: Math.ceil(baseSize * virtualScrollSliceRatioBefore),\n      center: Math.ceil(baseSize * (0.5 + virtualScrollSliceRatioBefore)),\n      end: Math.ceil(baseSize * (1 + virtualScrollSliceRatioBefore)),\n      view\n    };\n  }\n  function padVirtualScroll(tag, content) {\n    const paddingSize = props4.virtualScrollHorizontal === true ? \"width\" : \"height\";\n    const style2 = {\n      [\"--q-virtual-scroll-item-\" + paddingSize]: virtualScrollItemSizeComputed.value + \"px\"\n    };\n    return [\n      tag === \"tbody\" ? h86(tag, {\n        class: \"q-virtual-scroll__padding\",\n        key: \"before\",\n        ref: beforeRef\n      }, [\n        h86(\"tr\", [\n          h86(\"td\", {\n            style: { [paddingSize]: `${virtualScrollPaddingBefore.value}px`, ...style2 },\n            colspan: colspanAttr.value\n          })\n        ])\n      ]) : h86(tag, {\n        class: \"q-virtual-scroll__padding\",\n        key: \"before\",\n        ref: beforeRef,\n        style: { [paddingSize]: `${virtualScrollPaddingBefore.value}px`, ...style2 }\n      }),\n      h86(tag, {\n        class: \"q-virtual-scroll__content\",\n        key: \"content\",\n        ref: contentRef,\n        tabindex: -1\n      }, content.flat()),\n      tag === \"tbody\" ? h86(tag, {\n        class: \"q-virtual-scroll__padding\",\n        key: \"after\",\n        ref: afterRef\n      }, [\n        h86(\"tr\", [\n          h86(\"td\", {\n            style: { [paddingSize]: `${virtualScrollPaddingAfter.value}px`, ...style2 },\n            colspan: colspanAttr.value\n          })\n        ])\n      ]) : h86(tag, {\n        class: \"q-virtual-scroll__padding\",\n        key: \"after\",\n        ref: afterRef,\n        style: { [paddingSize]: `${virtualScrollPaddingAfter.value}px`, ...style2 }\n      })\n    ];\n  }\n  function emitScroll(index) {\n    if (prevToIndex !== index) {\n      props4.onVirtualScroll !== void 0 && emit(\"virtualScroll\", {\n        index,\n        from: virtualScrollSliceRange.value.from,\n        to: virtualScrollSliceRange.value.to - 1,\n        direction: index < prevToIndex ? \"decrease\" : \"increase\",\n        ref: proxy\n      });\n      prevToIndex = index;\n    }\n  }\n  setVirtualScrollSize();\n  const onVirtualScrollEvt = debounce_default(\n    localOnVirtualScrollEvt,\n    $q.platform.is.ios === true ? 120 : 35\n  );\n  onBeforeMount2(() => {\n    setVirtualScrollSize();\n  });\n  let shouldActivate = false;\n  onDeactivated8(() => {\n    shouldActivate = true;\n  });\n  onActivated6(() => {\n    if (shouldActivate !== true) return;\n    const scrollEl = getVirtualScrollTarget();\n    if (prevScrollStart !== void 0 && scrollEl !== void 0 && scrollEl !== null && scrollEl.nodeType !== 8) {\n      setScroll2(\n        scrollEl,\n        prevScrollStart,\n        props4.virtualScrollHorizontal,\n        $q.lang.rtl\n      );\n    } else {\n      scrollTo(prevToIndex);\n    }\n  });\n  __QUASAR_SSR__ || onBeforeUnmount33(() => {\n    onVirtualScrollEvt.cancel();\n  });\n  Object.assign(proxy, { scrollTo, reset, refresh });\n  return {\n    virtualScrollSliceRange,\n    virtualScrollSliceSizeComputed,\n    setVirtualScrollSize,\n    onVirtualScrollEvt,\n    localResetVirtualScroll,\n    padVirtualScroll,\n    scrollTo,\n    reset,\n    refresh\n  };\n}\n\n// src/components/select/QSelect.js\nvar validateNewValueMode = (v) => [\"add\", \"add-unique\", \"toggle\"].includes(v);\nvar reEscapeList = \".*+?^${}()|[]\\\\\";\nvar fieldPropsList = Object.keys(useFieldProps);\nfunction getPropValueFn2(userPropName, defaultPropName) {\n  if (typeof userPropName === \"function\") return userPropName;\n  const propName = userPropName !== void 0 ? userPropName : defaultPropName;\n  return (opt) => opt !== null && typeof opt === \"object\" && propName in opt ? opt[propName] : opt;\n}\nvar QSelect_default = createComponent({\n  name: \"QSelect\",\n  inheritAttrs: false,\n  props: {\n    ...useVirtualScrollProps,\n    ...useFormProps,\n    ...useFieldProps,\n    // override of useFieldProps > modelValue\n    modelValue: {\n      required: true\n    },\n    multiple: Boolean,\n    displayValue: [String, Number],\n    displayValueHtml: Boolean,\n    dropdownIcon: String,\n    options: {\n      type: Array,\n      default: () => []\n    },\n    optionValue: [Function, String],\n    optionLabel: [Function, String],\n    optionDisable: [Function, String],\n    hideSelected: Boolean,\n    hideDropdownIcon: Boolean,\n    fillInput: Boolean,\n    maxValues: [Number, String],\n    optionsDense: Boolean,\n    optionsDark: {\n      type: Boolean,\n      default: null\n    },\n    optionsSelectedClass: String,\n    optionsHtml: Boolean,\n    optionsCover: Boolean,\n    menuShrink: Boolean,\n    menuAnchor: String,\n    menuSelf: String,\n    menuOffset: Array,\n    popupContentClass: String,\n    popupContentStyle: [String, Array, Object],\n    popupNoRouteDismiss: Boolean,\n    useInput: Boolean,\n    useChips: Boolean,\n    newValueMode: {\n      type: String,\n      validator: validateNewValueMode\n    },\n    mapOptions: Boolean,\n    emitValue: Boolean,\n    disableTabSelection: Boolean,\n    inputDebounce: {\n      type: [Number, String],\n      default: 500\n    },\n    inputClass: [Array, String, Object],\n    inputStyle: [Array, String, Object],\n    tabindex: {\n      type: [String, Number],\n      default: 0\n    },\n    autocomplete: String,\n    transitionShow: {},\n    transitionHide: {},\n    transitionDuration: {},\n    behavior: {\n      type: String,\n      validator: (v) => [\"default\", \"menu\", \"dialog\"].includes(v),\n      default: \"default\"\n    },\n    // override of useVirtualScrollProps > virtualScrollItemSize (no default)\n    virtualScrollItemSize: useVirtualScrollProps.virtualScrollItemSize.type,\n    onNewValue: Function,\n    onFilter: Function\n  },\n  emits: [\n    ...useFieldEmits,\n    \"add\",\n    \"remove\",\n    \"inputValue\",\n    \"keyup\",\n    \"keypress\",\n    \"keydown\",\n    \"popupShow\",\n    \"popupHide\",\n    \"filterAbort\"\n  ],\n  setup(props4, { slots, emit }) {\n    const { proxy } = getCurrentInstance70();\n    const { $q } = proxy;\n    const menu = ref54(false);\n    const dialog = ref54(false);\n    const optionIndex = ref54(-1);\n    const inputValue = ref54(\"\");\n    const dialogFieldFocused = ref54(false);\n    const innerLoadingIndicator = ref54(false);\n    let filterTimer = null, inputValueTimer = null, innerValueCache, hasDialog, userInputValue, filterId = null, defaultInputValue, transitionShowComputed, searchBuffer, searchBufferExp;\n    const inputRef = ref54(null);\n    const targetRef = ref54(null);\n    const menuRef = ref54(null);\n    const dialogRef = ref54(null);\n    const menuContentRef = ref54(null);\n    const nameProp = useFormInputNameAttr(props4);\n    const onComposition = use_key_composition_default(onInput);\n    const virtualScrollLength = computed89(() => Array.isArray(props4.options) ? props4.options.length : 0);\n    const virtualScrollItemSizeComputed = computed89(() => props4.virtualScrollItemSize === void 0 ? props4.optionsDense === true ? 24 : 48 : props4.virtualScrollItemSize);\n    const {\n      virtualScrollSliceRange,\n      virtualScrollSliceSizeComputed,\n      localResetVirtualScroll,\n      padVirtualScroll,\n      onVirtualScrollEvt,\n      scrollTo,\n      setVirtualScrollSize\n    } = useVirtualScroll({\n      virtualScrollLength,\n      getVirtualScrollTarget,\n      getVirtualScrollEl,\n      virtualScrollItemSizeComputed\n    });\n    const state = useFieldState();\n    const innerValue = computed89(() => {\n      const mapNull = props4.mapOptions === true && props4.multiple !== true, val = props4.modelValue !== void 0 && (props4.modelValue !== null || mapNull === true) ? props4.multiple === true && Array.isArray(props4.modelValue) ? props4.modelValue : [props4.modelValue] : [];\n      if (props4.mapOptions === true && Array.isArray(props4.options) === true) {\n        const cache = props4.mapOptions === true && innerValueCache !== void 0 ? innerValueCache : [];\n        const values = val.map((v) => getOption(v, cache));\n        return props4.modelValue === null && mapNull === true ? values.filter((v) => v !== null) : values;\n      }\n      return val;\n    });\n    const innerFieldProps = computed89(() => {\n      const acc = {};\n      fieldPropsList.forEach((key) => {\n        const val = props4[key];\n        if (val !== void 0) {\n          acc[key] = val;\n        }\n      });\n      return acc;\n    });\n    const isOptionsDark = computed89(() => props4.optionsDark === null ? state.isDark.value : props4.optionsDark);\n    const hasValue = computed89(() => fieldValueIsFilled(innerValue.value));\n    const computedInputClass = computed89(() => {\n      let cls = \"q-field__input q-placeholder col\";\n      if (props4.hideSelected === true || innerValue.value.length === 0) {\n        return [cls, props4.inputClass];\n      }\n      cls += \" q-field__input--padding\";\n      return props4.inputClass === void 0 ? cls : [cls, props4.inputClass];\n    });\n    const menuContentClass = computed89(\n      () => (props4.virtualScrollHorizontal === true ? \"q-virtual-scroll--horizontal\" : \"\") + (props4.popupContentClass ? \" \" + props4.popupContentClass : \"\")\n    );\n    const noOptions = computed89(() => virtualScrollLength.value === 0);\n    const selectedString = computed89(\n      () => innerValue.value.map((opt) => getOptionLabel.value(opt)).join(\", \")\n    );\n    const ariaCurrentValue = computed89(() => props4.displayValue !== void 0 ? props4.displayValue : selectedString.value);\n    const needsHtmlFn = computed89(() => props4.optionsHtml === true ? () => true : (opt) => opt !== void 0 && opt !== null && opt.html === true);\n    const valueAsHtml = computed89(() => props4.displayValueHtml === true || props4.displayValue === void 0 && (props4.optionsHtml === true || innerValue.value.some(needsHtmlFn.value)));\n    const tabindex = computed89(() => state.focused.value === true ? props4.tabindex : -1);\n    const comboboxAttrs = computed89(() => {\n      const attrs = {\n        tabindex: props4.tabindex,\n        role: \"combobox\",\n        \"aria-label\": props4.label,\n        \"aria-readonly\": props4.readonly === true ? \"true\" : \"false\",\n        \"aria-autocomplete\": props4.useInput === true ? \"list\" : \"none\",\n        \"aria-expanded\": menu.value === true ? \"true\" : \"false\",\n        \"aria-controls\": `${state.targetUid.value}_lb`\n      };\n      if (optionIndex.value >= 0) {\n        attrs[\"aria-activedescendant\"] = `${state.targetUid.value}_${optionIndex.value}`;\n      }\n      return attrs;\n    });\n    const listboxAttrs = computed89(() => ({\n      id: `${state.targetUid.value}_lb`,\n      role: \"listbox\",\n      \"aria-multiselectable\": props4.multiple === true ? \"true\" : \"false\"\n    }));\n    const selectedScope = computed89(() => {\n      return innerValue.value.map((opt, i) => ({\n        index: i,\n        opt,\n        html: needsHtmlFn.value(opt),\n        selected: true,\n        removeAtIndex: removeAtIndexAndFocus,\n        toggleOption,\n        tabindex: tabindex.value\n      }));\n    });\n    const optionScope = computed89(() => {\n      if (virtualScrollLength.value === 0) {\n        return [];\n      }\n      const { from, to } = virtualScrollSliceRange.value;\n      return props4.options.slice(from, to).map((opt, i) => {\n        const disable = isOptionDisabled.value(opt) === true;\n        const active = isOptionSelected(opt) === true;\n        const index = from + i;\n        const itemProps = {\n          clickable: true,\n          active,\n          activeClass: computedOptionsSelectedClass.value,\n          manualFocus: true,\n          focused: false,\n          disable,\n          tabindex: -1,\n          dense: props4.optionsDense,\n          dark: isOptionsDark.value,\n          role: \"option\",\n          \"aria-selected\": active === true ? \"true\" : \"false\",\n          id: `${state.targetUid.value}_${index}`,\n          onClick: () => {\n            toggleOption(opt);\n          }\n        };\n        if (disable !== true) {\n          optionIndex.value === index && (itemProps.focused = true);\n          if ($q.platform.is.desktop === true) {\n            itemProps.onMousemove = () => {\n              menu.value === true && setOptionIndex(index);\n            };\n          }\n        }\n        return {\n          index,\n          opt,\n          html: needsHtmlFn.value(opt),\n          label: getOptionLabel.value(opt),\n          selected: itemProps.active,\n          focused: itemProps.focused,\n          toggleOption,\n          setOptionIndex,\n          itemProps\n        };\n      });\n    });\n    const dropdownArrowIcon = computed89(() => props4.dropdownIcon !== void 0 ? props4.dropdownIcon : $q.iconSet.arrow.dropdown);\n    const squaredMenu = computed89(\n      () => props4.optionsCover === false && props4.outlined !== true && props4.standout !== true && props4.borderless !== true && props4.rounded !== true\n    );\n    const computedOptionsSelectedClass = computed89(() => props4.optionsSelectedClass !== void 0 ? props4.optionsSelectedClass : props4.color !== void 0 ? `text-${props4.color}` : \"\");\n    const getOptionValue = computed89(() => getPropValueFn2(props4.optionValue, \"value\"));\n    const getOptionLabel = computed89(() => getPropValueFn2(props4.optionLabel, \"label\"));\n    const isOptionDisabled = computed89(() => getPropValueFn2(props4.optionDisable, \"disable\"));\n    const innerOptionsValue = computed89(() => innerValue.value.map(getOptionValue.value));\n    const inputControlEvents = computed89(() => {\n      const evt = {\n        onInput,\n        // Safari < 10.2 & UIWebView doesn't fire compositionend when\n        // switching focus before confirming composition choice\n        // this also fixes the issue where some browsers e.g. iOS Chrome\n        // fires \"change\" instead of \"input\" on autocomplete.\n        onChange: onComposition,\n        onKeydown: onTargetKeydown,\n        onKeyup: onTargetAutocomplete,\n        onKeypress: onTargetKeypress,\n        onFocus: selectInputText,\n        onClick(e) {\n          hasDialog === true && stop(e);\n        }\n      };\n      evt.onCompositionstart = evt.onCompositionupdate = evt.onCompositionend = onComposition;\n      return evt;\n    });\n    watch38(innerValue, (val) => {\n      innerValueCache = val;\n      if (props4.useInput === true && props4.fillInput === true && props4.multiple !== true && state.innerLoading.value !== true && (dialog.value !== true && menu.value !== true || hasValue.value !== true)) {\n        userInputValue !== true && resetInputValue();\n        if (dialog.value === true || menu.value === true) {\n          filter(\"\");\n        }\n      }\n    }, { immediate: true });\n    watch38(() => props4.fillInput, resetInputValue);\n    watch38(menu, updateMenu);\n    watch38(virtualScrollLength, rerenderMenu);\n    function getEmittingOptionValue(opt) {\n      return props4.emitValue === true ? getOptionValue.value(opt) : opt;\n    }\n    function removeAtIndex(index) {\n      if (index !== -1 && index < innerValue.value.length) {\n        if (props4.multiple === true) {\n          const model = props4.modelValue.slice();\n          emit(\"remove\", { index, value: model.splice(index, 1)[0] });\n          emit(\"update:modelValue\", model);\n        } else {\n          emit(\"update:modelValue\", null);\n        }\n      }\n    }\n    function removeAtIndexAndFocus(index) {\n      removeAtIndex(index);\n      state.focus();\n    }\n    function add(opt, unique) {\n      const val = getEmittingOptionValue(opt);\n      if (props4.multiple !== true) {\n        props4.fillInput === true && updateInputValue(\n          getOptionLabel.value(opt),\n          true,\n          true\n        );\n        emit(\"update:modelValue\", val);\n        return;\n      }\n      if (innerValue.value.length === 0) {\n        emit(\"add\", { index: 0, value: val });\n        emit(\"update:modelValue\", props4.multiple === true ? [val] : val);\n        return;\n      }\n      if (unique === true && isOptionSelected(opt) === true) return;\n      if (props4.maxValues !== void 0 && props4.modelValue.length >= props4.maxValues) return;\n      const model = props4.modelValue.slice();\n      emit(\"add\", { index: model.length, value: val });\n      model.push(val);\n      emit(\"update:modelValue\", model);\n    }\n    function toggleOption(opt, keepOpen) {\n      if (state.editable.value !== true || opt === void 0 || isOptionDisabled.value(opt) === true) return;\n      const optValue = getOptionValue.value(opt);\n      if (props4.multiple !== true) {\n        if (keepOpen !== true) {\n          updateInputValue(\n            props4.fillInput === true ? getOptionLabel.value(opt) : \"\",\n            true,\n            true\n          );\n          hidePopup();\n        }\n        targetRef.value !== null && targetRef.value.focus();\n        if (innerValue.value.length === 0 || isDeepEqual(getOptionValue.value(innerValue.value[0]), optValue) !== true) {\n          emit(\"update:modelValue\", props4.emitValue === true ? optValue : opt);\n        }\n        return;\n      }\n      (hasDialog !== true || dialogFieldFocused.value === true) && state.focus();\n      selectInputText();\n      if (innerValue.value.length === 0) {\n        const val = props4.emitValue === true ? optValue : opt;\n        emit(\"add\", { index: 0, value: val });\n        emit(\"update:modelValue\", props4.multiple === true ? [val] : val);\n        return;\n      }\n      const model = props4.modelValue.slice(), index = innerOptionsValue.value.findIndex((v) => isDeepEqual(v, optValue));\n      if (index !== -1) {\n        emit(\"remove\", { index, value: model.splice(index, 1)[0] });\n      } else {\n        if (props4.maxValues !== void 0 && model.length >= props4.maxValues) return;\n        const val = props4.emitValue === true ? optValue : opt;\n        emit(\"add\", { index: model.length, value: val });\n        model.push(val);\n      }\n      emit(\"update:modelValue\", model);\n    }\n    function setOptionIndex(index) {\n      if ($q.platform.is.desktop !== true) return;\n      const val = index !== -1 && index < virtualScrollLength.value ? index : -1;\n      if (optionIndex.value !== val) {\n        optionIndex.value = val;\n      }\n    }\n    function moveOptionSelection(offset2 = 1, skipInputValue) {\n      if (menu.value === true) {\n        let index = optionIndex.value;\n        do {\n          index = normalizeToInterval(\n            index + offset2,\n            -1,\n            virtualScrollLength.value - 1\n          );\n        } while (index !== -1 && index !== optionIndex.value && isOptionDisabled.value(props4.options[index]) === true);\n        if (optionIndex.value !== index) {\n          setOptionIndex(index);\n          scrollTo(index);\n          if (skipInputValue !== true && props4.useInput === true && props4.fillInput === true) {\n            setInputValue(\n              index >= 0 ? getOptionLabel.value(props4.options[index]) : defaultInputValue,\n              true\n            );\n          }\n        }\n      }\n    }\n    function getOption(value2, valueCache) {\n      const fn = (opt) => isDeepEqual(getOptionValue.value(opt), value2);\n      return props4.options.find(fn) || valueCache.find(fn) || value2;\n    }\n    function isOptionSelected(opt) {\n      const val = getOptionValue.value(opt);\n      return innerOptionsValue.value.find((v) => isDeepEqual(v, val)) !== void 0;\n    }\n    function selectInputText(e) {\n      if (props4.useInput === true && targetRef.value !== null && (e === void 0 || targetRef.value === e.target && e.target.value === selectedString.value)) {\n        targetRef.value.select();\n      }\n    }\n    function onTargetKeyup(e) {\n      if (isKeyCode(e, 27) === true && menu.value === true) {\n        stop(e);\n        hidePopup();\n        resetInputValue();\n      }\n      emit(\"keyup\", e);\n    }\n    function onTargetAutocomplete(e) {\n      const { value: value2 } = e.target;\n      if (e.keyCode !== void 0) {\n        onTargetKeyup(e);\n        return;\n      }\n      e.target.value = \"\";\n      if (filterTimer !== null) {\n        clearTimeout(filterTimer);\n        filterTimer = null;\n      }\n      if (inputValueTimer !== null) {\n        clearTimeout(inputValueTimer);\n        inputValueTimer = null;\n      }\n      resetInputValue();\n      if (typeof value2 === \"string\" && value2.length !== 0) {\n        const needle = value2.toLocaleLowerCase();\n        const findFn = (extractFn) => {\n          const option = props4.options.find((opt) => String(extractFn.value(opt)).toLocaleLowerCase() === needle);\n          if (option === void 0) return false;\n          if (innerValue.value.indexOf(option) === -1) {\n            toggleOption(option);\n          } else {\n            hidePopup();\n          }\n          return true;\n        };\n        const fillFn = (afterFilter) => {\n          if (findFn(getOptionValue) !== true && afterFilter !== true && findFn(getOptionLabel) !== true) {\n            filter(value2, true, () => fillFn(true));\n          }\n        };\n        fillFn();\n      } else {\n        state.clearValue(e);\n      }\n    }\n    function onTargetKeypress(e) {\n      emit(\"keypress\", e);\n    }\n    function onTargetKeydown(e) {\n      emit(\"keydown\", e);\n      if (shouldIgnoreKey(e) === true) return;\n      const newValueModeValid = inputValue.value.length !== 0 && (props4.newValueMode !== void 0 || props4.onNewValue !== void 0);\n      const tabShouldSelect = e.shiftKey !== true && props4.disableTabSelection !== true && props4.multiple !== true && (optionIndex.value !== -1 || newValueModeValid === true);\n      if (e.keyCode === 27) {\n        prevent(e);\n        return;\n      }\n      if (e.keyCode === 9 && tabShouldSelect === false) {\n        closeMenu();\n        return;\n      }\n      if (e.target === void 0 || e.target.id !== state.targetUid.value || state.editable.value !== true) return;\n      if (e.keyCode === 40 && state.innerLoading.value !== true && menu.value === false) {\n        stopAndPrevent(e);\n        showPopup();\n        return;\n      }\n      if (e.keyCode === 8 && (props4.useChips === true || props4.clearable === true) && props4.hideSelected !== true && inputValue.value.length === 0) {\n        if (props4.multiple === true && Array.isArray(props4.modelValue) === true) {\n          removeAtIndex(props4.modelValue.length - 1);\n        } else if (props4.multiple !== true && props4.modelValue !== null) {\n          emit(\"update:modelValue\", null);\n        }\n        return;\n      }\n      if ((e.keyCode === 35 || e.keyCode === 36) && (typeof inputValue.value !== \"string\" || inputValue.value.length === 0)) {\n        stopAndPrevent(e);\n        optionIndex.value = -1;\n        moveOptionSelection(e.keyCode === 36 ? 1 : -1, props4.multiple);\n      }\n      if ((e.keyCode === 33 || e.keyCode === 34) && virtualScrollSliceSizeComputed.value !== void 0) {\n        stopAndPrevent(e);\n        optionIndex.value = Math.max(\n          -1,\n          Math.min(\n            virtualScrollLength.value,\n            optionIndex.value + (e.keyCode === 33 ? -1 : 1) * virtualScrollSliceSizeComputed.value.view\n          )\n        );\n        moveOptionSelection(e.keyCode === 33 ? 1 : -1, props4.multiple);\n      }\n      if (e.keyCode === 38 || e.keyCode === 40) {\n        stopAndPrevent(e);\n        moveOptionSelection(e.keyCode === 38 ? -1 : 1, props4.multiple);\n      }\n      const optionsLength = virtualScrollLength.value;\n      if (searchBuffer === void 0 || searchBufferExp < Date.now()) {\n        searchBuffer = \"\";\n      }\n      if (optionsLength > 0 && props4.useInput !== true && e.key !== void 0 && e.key.length === 1 && e.altKey === false && e.ctrlKey === false && e.metaKey === false && (e.keyCode !== 32 || searchBuffer.length !== 0)) {\n        menu.value !== true && showPopup(e);\n        const char = e.key.toLocaleLowerCase(), keyRepeat = searchBuffer.length === 1 && searchBuffer[0] === char;\n        searchBufferExp = Date.now() + 1500;\n        if (keyRepeat === false) {\n          stopAndPrevent(e);\n          searchBuffer += char;\n        }\n        const searchRe = new RegExp(\"^\" + searchBuffer.split(\"\").map((l) => reEscapeList.indexOf(l) !== -1 ? \"\\\\\" + l : l).join(\".*\"), \"i\");\n        let index = optionIndex.value;\n        if (keyRepeat === true || index < 0 || searchRe.test(getOptionLabel.value(props4.options[index])) !== true) {\n          do {\n            index = normalizeToInterval(index + 1, -1, optionsLength - 1);\n          } while (index !== optionIndex.value && (isOptionDisabled.value(props4.options[index]) === true || searchRe.test(getOptionLabel.value(props4.options[index])) !== true));\n        }\n        if (optionIndex.value !== index) {\n          nextTick16(() => {\n            setOptionIndex(index);\n            scrollTo(index);\n            if (index >= 0 && props4.useInput === true && props4.fillInput === true) {\n              setInputValue(getOptionLabel.value(props4.options[index]), true);\n            }\n          });\n        }\n        return;\n      }\n      if (e.keyCode !== 13 && (e.keyCode !== 32 || props4.useInput === true || searchBuffer !== \"\") && (e.keyCode !== 9 || tabShouldSelect === false)) return;\n      e.keyCode !== 9 && stopAndPrevent(e);\n      if (optionIndex.value !== -1 && optionIndex.value < optionsLength) {\n        toggleOption(props4.options[optionIndex.value]);\n        return;\n      }\n      if (newValueModeValid === true) {\n        const done = (val, mode) => {\n          if (mode) {\n            if (validateNewValueMode(mode) !== true) return;\n          } else {\n            mode = props4.newValueMode;\n          }\n          updateInputValue(\"\", props4.multiple !== true, true);\n          if (val === void 0 || val === null) return;\n          const fn = mode === \"toggle\" ? toggleOption : add;\n          fn(val, mode === \"add-unique\");\n          if (props4.multiple !== true) {\n            targetRef.value !== null && targetRef.value.focus();\n            hidePopup();\n          }\n        };\n        if (props4.onNewValue !== void 0) {\n          emit(\"newValue\", inputValue.value, done);\n        } else {\n          done(inputValue.value);\n        }\n        if (props4.multiple !== true) return;\n      }\n      if (menu.value === true) {\n        closeMenu();\n      } else if (state.innerLoading.value !== true) {\n        showPopup();\n      }\n    }\n    function getVirtualScrollEl() {\n      return hasDialog === true ? menuContentRef.value : menuRef.value !== null && menuRef.value.contentEl !== null ? menuRef.value.contentEl : void 0;\n    }\n    function getVirtualScrollTarget() {\n      return getVirtualScrollEl();\n    }\n    function getSelection() {\n      if (props4.hideSelected === true) {\n        return [];\n      }\n      if (slots[\"selected-item\"] !== void 0) {\n        return selectedScope.value.map((scope) => slots[\"selected-item\"](scope)).slice();\n      }\n      if (slots.selected !== void 0) {\n        return [].concat(slots.selected());\n      }\n      if (props4.useChips === true) {\n        return selectedScope.value.map((scope, i) => h87(QChip_default, {\n          key: \"option-\" + i,\n          removable: state.editable.value === true && isOptionDisabled.value(scope.opt) !== true,\n          dense: true,\n          textColor: props4.color,\n          tabindex: tabindex.value,\n          onRemove() {\n            scope.removeAtIndex(i);\n          }\n        }, () => h87(\"span\", {\n          class: \"ellipsis\",\n          [scope.html === true ? \"innerHTML\" : \"textContent\"]: getOptionLabel.value(scope.opt)\n        })));\n      }\n      return [\n        h87(\"span\", {\n          [valueAsHtml.value === true ? \"innerHTML\" : \"textContent\"]: ariaCurrentValue.value\n        })\n      ];\n    }\n    function getAllOptions() {\n      if (noOptions.value === true) {\n        return slots[\"no-option\"] !== void 0 ? slots[\"no-option\"]({ inputValue: inputValue.value }) : void 0;\n      }\n      const fn = slots.option !== void 0 ? slots.option : (scope) => {\n        return h87(QItem_default, {\n          key: scope.index,\n          ...scope.itemProps\n        }, () => {\n          return h87(\n            QItemSection_default,\n            () => h87(\n              QItemLabel_default,\n              () => h87(\"span\", {\n                [scope.html === true ? \"innerHTML\" : \"textContent\"]: scope.label\n              })\n            )\n          );\n        });\n      };\n      let options = padVirtualScroll(\"div\", optionScope.value.map(fn));\n      if (slots[\"before-options\"] !== void 0) {\n        options = slots[\"before-options\"]().concat(options);\n      }\n      return hMergeSlot(slots[\"after-options\"], options);\n    }\n    function getInput(fromDialog, isTarget) {\n      const attrs = isTarget === true ? { ...comboboxAttrs.value, ...state.splitAttrs.attributes.value } : void 0;\n      const data = {\n        ref: isTarget === true ? targetRef : void 0,\n        key: \"i_t\",\n        class: computedInputClass.value,\n        style: props4.inputStyle,\n        value: inputValue.value !== void 0 ? inputValue.value : \"\",\n        // required for Android in order to show ENTER key when in form\n        type: \"search\",\n        ...attrs,\n        id: isTarget === true ? state.targetUid.value : void 0,\n        maxlength: props4.maxlength,\n        autocomplete: props4.autocomplete,\n        \"data-autofocus\": fromDialog === true || props4.autofocus === true || void 0,\n        disabled: props4.disable === true,\n        readonly: props4.readonly === true,\n        ...inputControlEvents.value\n      };\n      if (fromDialog !== true && hasDialog === true) {\n        if (Array.isArray(data.class) === true) {\n          data.class = [...data.class, \"no-pointer-events\"];\n        } else {\n          data.class += \" no-pointer-events\";\n        }\n      }\n      return h87(\"input\", data);\n    }\n    function onInput(e) {\n      if (filterTimer !== null) {\n        clearTimeout(filterTimer);\n        filterTimer = null;\n      }\n      if (inputValueTimer !== null) {\n        clearTimeout(inputValueTimer);\n        inputValueTimer = null;\n      }\n      if (e && e.target && e.target.qComposing === true) return;\n      setInputValue(e.target.value || \"\");\n      userInputValue = true;\n      defaultInputValue = inputValue.value;\n      if (state.focused.value !== true && (hasDialog !== true || dialogFieldFocused.value === true)) {\n        state.focus();\n      }\n      if (props4.onFilter !== void 0) {\n        filterTimer = setTimeout(() => {\n          filterTimer = null;\n          filter(inputValue.value);\n        }, props4.inputDebounce);\n      }\n    }\n    function setInputValue(val, emitImmediately) {\n      if (inputValue.value !== val) {\n        inputValue.value = val;\n        if (emitImmediately === true || props4.inputDebounce === 0 || props4.inputDebounce === \"0\") {\n          emit(\"inputValue\", val);\n        } else {\n          inputValueTimer = setTimeout(() => {\n            inputValueTimer = null;\n            emit(\"inputValue\", val);\n          }, props4.inputDebounce);\n        }\n      }\n    }\n    function updateInputValue(val, noFiltering, internal) {\n      userInputValue = internal !== true;\n      if (props4.useInput === true) {\n        setInputValue(val, true);\n        if (noFiltering === true || internal !== true) {\n          defaultInputValue = val;\n        }\n        noFiltering !== true && filter(val);\n      }\n    }\n    function filter(val, keepClosed, afterUpdateFn) {\n      if (props4.onFilter === void 0 || keepClosed !== true && state.focused.value !== true) return;\n      if (state.innerLoading.value === true) {\n        emit(\"filterAbort\");\n      } else {\n        state.innerLoading.value = true;\n        innerLoadingIndicator.value = true;\n      }\n      if (val !== \"\" && props4.multiple !== true && innerValue.value.length !== 0 && userInputValue !== true && val === getOptionLabel.value(innerValue.value[0])) {\n        val = \"\";\n      }\n      const localFilterId = setTimeout(() => {\n        menu.value === true && (menu.value = false);\n      }, 10);\n      filterId !== null && clearTimeout(filterId);\n      filterId = localFilterId;\n      emit(\n        \"filter\",\n        val,\n        (fn, afterFn) => {\n          if ((keepClosed === true || state.focused.value === true) && filterId === localFilterId) {\n            clearTimeout(filterId);\n            typeof fn === \"function\" && fn();\n            innerLoadingIndicator.value = false;\n            nextTick16(() => {\n              state.innerLoading.value = false;\n              if (state.editable.value === true) {\n                if (keepClosed === true) {\n                  menu.value === true && hidePopup();\n                } else if (menu.value === true) {\n                  updateMenu(true);\n                } else {\n                  menu.value = true;\n                }\n              }\n              typeof afterFn === \"function\" && nextTick16(() => {\n                afterFn(proxy);\n              });\n              typeof afterUpdateFn === \"function\" && nextTick16(() => {\n                afterUpdateFn(proxy);\n              });\n            });\n          }\n        },\n        () => {\n          if (state.focused.value === true && filterId === localFilterId) {\n            clearTimeout(filterId);\n            state.innerLoading.value = false;\n            innerLoadingIndicator.value = false;\n          }\n          menu.value === true && (menu.value = false);\n        }\n      );\n    }\n    function getMenu() {\n      return h87(QMenu_default, {\n        ref: menuRef,\n        class: menuContentClass.value,\n        style: props4.popupContentStyle,\n        modelValue: menu.value,\n        fit: props4.menuShrink !== true,\n        cover: props4.optionsCover === true && noOptions.value !== true && props4.useInput !== true,\n        anchor: props4.menuAnchor,\n        self: props4.menuSelf,\n        offset: props4.menuOffset,\n        dark: isOptionsDark.value,\n        noParentEvent: true,\n        noRefocus: true,\n        noFocus: true,\n        noRouteDismiss: props4.popupNoRouteDismiss,\n        square: squaredMenu.value,\n        transitionShow: props4.transitionShow,\n        transitionHide: props4.transitionHide,\n        transitionDuration: props4.transitionDuration,\n        separateClosePopup: true,\n        ...listboxAttrs.value,\n        onScrollPassive: onVirtualScrollEvt,\n        onBeforeShow: onControlPopupShow,\n        onBeforeHide: onMenuBeforeHide,\n        onShow: onMenuShow\n      }, getAllOptions);\n    }\n    function onMenuBeforeHide(e) {\n      onControlPopupHide(e);\n      closeMenu();\n    }\n    function onMenuShow() {\n      setVirtualScrollSize();\n    }\n    function onDialogFieldFocus(e) {\n      stop(e);\n      targetRef.value !== null && targetRef.value.focus();\n      dialogFieldFocused.value = true;\n      window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, 0);\n    }\n    function onDialogFieldBlur(e) {\n      stop(e);\n      nextTick16(() => {\n        dialogFieldFocused.value = false;\n      });\n    }\n    function getDialog() {\n      const content = [\n        h87(QField_default, {\n          class: `col-auto ${state.fieldClass.value}`,\n          ...innerFieldProps.value,\n          for: state.targetUid.value,\n          dark: isOptionsDark.value,\n          square: true,\n          loading: innerLoadingIndicator.value,\n          itemAligned: false,\n          filled: true,\n          stackLabel: inputValue.value.length !== 0,\n          ...state.splitAttrs.listeners.value,\n          onFocus: onDialogFieldFocus,\n          onBlur: onDialogFieldBlur\n        }, {\n          ...slots,\n          rawControl: () => state.getControl(true),\n          before: void 0,\n          after: void 0\n        })\n      ];\n      menu.value === true && content.push(\n        h87(\"div\", {\n          ref: menuContentRef,\n          class: menuContentClass.value + \" scroll\",\n          style: props4.popupContentStyle,\n          ...listboxAttrs.value,\n          onClick: prevent,\n          onScrollPassive: onVirtualScrollEvt\n        }, getAllOptions())\n      );\n      return h87(QDialog_default, {\n        ref: dialogRef,\n        modelValue: dialog.value,\n        position: props4.useInput === true ? \"top\" : void 0,\n        transitionShow: transitionShowComputed,\n        transitionHide: props4.transitionHide,\n        transitionDuration: props4.transitionDuration,\n        noRouteDismiss: props4.popupNoRouteDismiss,\n        onBeforeShow: onControlPopupShow,\n        onBeforeHide: onDialogBeforeHide,\n        onHide: onDialogHide,\n        onShow: onDialogShow\n      }, () => h87(\"div\", {\n        class: \"q-select__dialog\" + (isOptionsDark.value === true ? \" q-select__dialog--dark q-dark\" : \"\") + (dialogFieldFocused.value === true ? \" q-select__dialog--focused\" : \"\")\n      }, content));\n    }\n    function onDialogBeforeHide(e) {\n      onControlPopupHide(e);\n      if (dialogRef.value !== null) {\n        dialogRef.value.__updateRefocusTarget(\n          state.rootRef.value.querySelector(\".q-field__native > [tabindex]:last-child\")\n        );\n      }\n      state.focused.value = false;\n    }\n    function onDialogHide(e) {\n      hidePopup();\n      state.focused.value === false && emit(\"blur\", e);\n      resetInputValue();\n    }\n    function onDialogShow() {\n      const el = document.activeElement;\n      if ((el === null || el.id !== state.targetUid.value) && targetRef.value !== null && targetRef.value !== el) {\n        targetRef.value.focus();\n      }\n      setVirtualScrollSize();\n    }\n    function closeMenu() {\n      if (dialog.value === true) return;\n      optionIndex.value = -1;\n      if (menu.value === true) {\n        menu.value = false;\n      }\n      if (state.focused.value === false) {\n        if (filterId !== null) {\n          clearTimeout(filterId);\n          filterId = null;\n        }\n        if (state.innerLoading.value === true) {\n          emit(\"filterAbort\");\n          state.innerLoading.value = false;\n          innerLoadingIndicator.value = false;\n        }\n      }\n    }\n    function showPopup(e) {\n      if (state.editable.value !== true) return;\n      if (hasDialog === true) {\n        state.onControlFocusin(e);\n        dialog.value = true;\n        nextTick16(() => {\n          state.focus();\n        });\n      } else {\n        state.focus();\n      }\n      if (props4.onFilter !== void 0) {\n        filter(inputValue.value);\n      } else if (noOptions.value !== true || slots[\"no-option\"] !== void 0) {\n        menu.value = true;\n      }\n    }\n    function hidePopup() {\n      dialog.value = false;\n      closeMenu();\n    }\n    function resetInputValue() {\n      props4.useInput === true && updateInputValue(\n        props4.multiple !== true && props4.fillInput === true && innerValue.value.length !== 0 ? getOptionLabel.value(innerValue.value[0]) || \"\" : \"\",\n        true,\n        true\n      );\n    }\n    function updateMenu(show) {\n      let optionIndex2 = -1;\n      if (show === true) {\n        if (innerValue.value.length !== 0) {\n          const val = getOptionValue.value(innerValue.value[0]);\n          optionIndex2 = props4.options.findIndex((v) => isDeepEqual(getOptionValue.value(v), val));\n        }\n        localResetVirtualScroll(optionIndex2);\n      }\n      setOptionIndex(optionIndex2);\n    }\n    function rerenderMenu(newLength, oldLength) {\n      if (menu.value === true && state.innerLoading.value === false) {\n        localResetVirtualScroll(-1, true);\n        nextTick16(() => {\n          if (menu.value === true && state.innerLoading.value === false) {\n            if (newLength > oldLength) {\n              localResetVirtualScroll();\n            } else {\n              updateMenu(true);\n            }\n          }\n        });\n      }\n    }\n    function updateMenuPosition() {\n      if (dialog.value === false && menuRef.value !== null) {\n        menuRef.value.updatePosition();\n      }\n    }\n    function onControlPopupShow(e) {\n      e !== void 0 && stop(e);\n      emit(\"popupShow\", e);\n      state.hasPopupOpen = true;\n      state.onControlFocusin(e);\n    }\n    function onControlPopupHide(e) {\n      e !== void 0 && stop(e);\n      emit(\"popupHide\", e);\n      state.hasPopupOpen = false;\n      state.onControlFocusout(e);\n    }\n    function updatePreState() {\n      hasDialog = $q.platform.is.mobile !== true && props4.behavior !== \"dialog\" ? false : props4.behavior !== \"menu\" && (props4.useInput === true ? slots[\"no-option\"] !== void 0 || props4.onFilter !== void 0 || noOptions.value === false : true);\n      transitionShowComputed = $q.platform.is.ios === true && hasDialog === true && props4.useInput === true ? \"fade\" : props4.transitionShow;\n    }\n    onBeforeUpdate3(updatePreState);\n    onUpdated(updateMenuPosition);\n    updatePreState();\n    onBeforeUnmount34(() => {\n      filterTimer !== null && clearTimeout(filterTimer);\n      inputValueTimer !== null && clearTimeout(inputValueTimer);\n    });\n    Object.assign(proxy, {\n      showPopup,\n      hidePopup,\n      removeAtIndex,\n      add,\n      toggleOption,\n      getOptionIndex: () => optionIndex.value,\n      setOptionIndex,\n      moveOptionSelection,\n      filter,\n      updateMenuPosition,\n      updateInputValue,\n      isOptionSelected,\n      getEmittingOptionValue,\n      isOptionDisabled: (...args) => isOptionDisabled.value.apply(null, args) === true,\n      getOptionValue: (...args) => getOptionValue.value.apply(null, args),\n      getOptionLabel: (...args) => getOptionLabel.value.apply(null, args)\n    });\n    Object.assign(state, {\n      innerValue,\n      fieldClass: computed89(\n        () => `q-select q-field--auto-height q-select--with${props4.useInput !== true ? \"out\" : \"\"}-input q-select--with${props4.useChips !== true ? \"out\" : \"\"}-chips q-select--${props4.multiple === true ? \"multiple\" : \"single\"}`\n      ),\n      inputRef,\n      targetRef,\n      hasValue,\n      showPopup,\n      floatingLabel: computed89(\n        () => props4.hideSelected !== true && hasValue.value === true || typeof inputValue.value === \"number\" || inputValue.value.length !== 0 || fieldValueIsFilled(props4.displayValue)\n      ),\n      getControlChild: () => {\n        if (state.editable.value !== false && (dialog.value === true || noOptions.value !== true || slots[\"no-option\"] !== void 0)) {\n          return hasDialog === true ? getDialog() : getMenu();\n        } else if (state.hasPopupOpen === true) {\n          state.hasPopupOpen = false;\n        }\n      },\n      controlEvents: {\n        onFocusin(e) {\n          state.onControlFocusin(e);\n        },\n        onFocusout(e) {\n          state.onControlFocusout(e, () => {\n            resetInputValue();\n            closeMenu();\n          });\n        },\n        onClick(e) {\n          prevent(e);\n          if (hasDialog !== true && menu.value === true) {\n            closeMenu();\n            targetRef.value !== null && targetRef.value.focus();\n            return;\n          }\n          showPopup(e);\n        }\n      },\n      getControl: (fromDialog) => {\n        const child = getSelection();\n        const isTarget = fromDialog === true || dialog.value !== true || hasDialog !== true;\n        if (props4.useInput === true) {\n          child.push(getInput(fromDialog, isTarget));\n        } else if (state.editable.value === true) {\n          const attrs2 = isTarget === true ? comboboxAttrs.value : void 0;\n          child.push(\n            h87(\"input\", {\n              ref: isTarget === true ? targetRef : void 0,\n              key: \"d_t\",\n              class: \"q-select__focus-target\",\n              id: isTarget === true ? state.targetUid.value : void 0,\n              value: ariaCurrentValue.value,\n              readonly: true,\n              \"data-autofocus\": fromDialog === true || props4.autofocus === true || void 0,\n              ...attrs2,\n              onKeydown: onTargetKeydown,\n              onKeyup: onTargetKeyup,\n              onKeypress: onTargetKeypress\n            })\n          );\n          if (isTarget === true && typeof props4.autocomplete === \"string\" && props4.autocomplete.length !== 0) {\n            child.push(\n              h87(\"input\", {\n                class: \"q-select__autocomplete-input\",\n                autocomplete: props4.autocomplete,\n                tabindex: -1,\n                onKeyup: onTargetAutocomplete\n              })\n            );\n          }\n        }\n        if (nameProp.value !== void 0 && props4.disable !== true && innerOptionsValue.value.length !== 0) {\n          const opts = innerOptionsValue.value.map((value2) => h87(\"option\", { value: value2, selected: true }));\n          child.push(\n            h87(\"select\", {\n              class: \"hidden\",\n              name: nameProp.value,\n              multiple: props4.multiple\n            }, opts)\n          );\n        }\n        const attrs = props4.useInput === true || isTarget !== true ? void 0 : state.splitAttrs.attributes.value;\n        return h87(\"div\", {\n          class: \"q-field__native row items-center\",\n          ...attrs,\n          ...state.splitAttrs.listeners.value\n        }, child);\n      },\n      getInnerAppend: () => props4.loading !== true && innerLoadingIndicator.value !== true && props4.hideDropdownIcon !== true ? [\n        h87(QIcon_default, {\n          class: \"q-select__dropdown-icon\" + (menu.value === true ? \" rotate-180\" : \"\"),\n          name: dropdownArrowIcon.value\n        })\n      ] : null\n    });\n    return use_field_default(state);\n  }\n});\n\n// src/components/skeleton/QSkeleton.js\nimport { h as h88, computed as computed90, getCurrentInstance as getCurrentInstance71 } from \"vue\";\nvar skeletonTypes = [\n  \"text\",\n  \"rect\",\n  \"circle\",\n  \"QBtn\",\n  \"QBadge\",\n  \"QChip\",\n  \"QToolbar\",\n  \"QCheckbox\",\n  \"QRadio\",\n  \"QToggle\",\n  \"QSlider\",\n  \"QRange\",\n  \"QInput\",\n  \"QAvatar\"\n];\nvar skeletonAnimations = [\n  \"wave\",\n  \"pulse\",\n  \"pulse-x\",\n  \"pulse-y\",\n  \"fade\",\n  \"blink\",\n  \"none\"\n];\nvar QSkeleton_default = createComponent({\n  name: \"QSkeleton\",\n  props: {\n    ...useDarkProps,\n    tag: {\n      type: String,\n      default: \"div\"\n    },\n    type: {\n      type: String,\n      validator: (v) => skeletonTypes.includes(v),\n      default: \"rect\"\n    },\n    animation: {\n      type: String,\n      validator: (v) => skeletonAnimations.includes(v),\n      default: \"wave\"\n    },\n    animationSpeed: {\n      type: [String, Number],\n      default: 1500\n    },\n    square: Boolean,\n    bordered: Boolean,\n    size: String,\n    width: String,\n    height: String\n  },\n  setup(props4, { slots }) {\n    const vm2 = getCurrentInstance71();\n    const isDark = use_dark_default(props4, vm2.proxy.$q);\n    const style2 = computed90(() => {\n      const size2 = props4.size !== void 0 ? [props4.size, props4.size] : [props4.width, props4.height];\n      return {\n        \"--q-skeleton-speed\": `${props4.animationSpeed}ms`,\n        width: size2[0],\n        height: size2[1]\n      };\n    });\n    const classes = computed90(\n      () => `q-skeleton q-skeleton--${isDark.value === true ? \"dark\" : \"light\"} q-skeleton--type-${props4.type}` + (props4.animation !== \"none\" ? ` q-skeleton--anim q-skeleton--anim-${props4.animation}` : \"\") + (props4.square === true ? \" q-skeleton--square\" : \"\") + (props4.bordered === true ? \" q-skeleton--bordered\" : \"\")\n    );\n    return () => h88(props4.tag, {\n      class: classes.value,\n      style: style2.value\n    }, hSlot(slots.default));\n  }\n});\n\n// src/components/slide-item/QSlideItem.js\nimport { h as h89, ref as ref55, computed as computed91, withDirectives as withDirectives7, onBeforeUnmount as onBeforeUnmount35, onBeforeUpdate as onBeforeUpdate4, getCurrentInstance as getCurrentInstance72 } from \"vue\";\nvar slotsDef = [\n  [\"left\", \"center\", \"start\", \"width\"],\n  [\"right\", \"center\", \"end\", \"width\"],\n  [\"top\", \"start\", \"center\", \"height\"],\n  [\"bottom\", \"end\", \"center\", \"height\"]\n];\nvar QSlideItem_default = createComponent({\n  name: \"QSlideItem\",\n  props: {\n    ...useDarkProps,\n    leftColor: String,\n    rightColor: String,\n    topColor: String,\n    bottomColor: String,\n    onSlide: Function\n  },\n  emits: [\"action\", \"top\", \"right\", \"bottom\", \"left\"],\n  setup(props4, { slots, emit }) {\n    const { proxy } = getCurrentInstance72();\n    const { $q } = proxy;\n    const isDark = use_dark_default(props4, $q);\n    const { getCache } = use_render_cache_default();\n    const contentRef = ref55(null);\n    let timer2 = null, pan = {}, dirRefs = {}, dirContentRefs = {};\n    const langDir = computed91(() => $q.lang.rtl === true ? { left: \"right\", right: \"left\" } : { left: \"left\", right: \"right\" });\n    const classes = computed91(\n      () => \"q-slide-item q-item-type overflow-hidden\" + (isDark.value === true ? \" q-slide-item--dark q-dark\" : \"\")\n    );\n    function reset() {\n      contentRef.value.style.transform = \"translate(0,0)\";\n    }\n    function emitSlide(side, ratio, isReset) {\n      props4.onSlide !== void 0 && emit(\"slide\", { side, ratio, isReset });\n    }\n    function onPan(evt) {\n      const node = contentRef.value;\n      if (evt.isFirst) {\n        pan = {\n          dir: null,\n          size: { left: 0, right: 0, top: 0, bottom: 0 },\n          scale: 0\n        };\n        node.classList.add(\"no-transition\");\n        slotsDef.forEach((slotName) => {\n          if (slots[slotName[0]] !== void 0) {\n            const node2 = dirContentRefs[slotName[0]];\n            node2.style.transform = \"scale(1)\";\n            pan.size[slotName[0]] = node2.getBoundingClientRect()[slotName[3]];\n          }\n        });\n        pan.axis = evt.direction === \"up\" || evt.direction === \"down\" ? \"Y\" : \"X\";\n      } else if (evt.isFinal) {\n        node.classList.remove(\"no-transition\");\n        if (pan.scale === 1) {\n          node.style.transform = `translate${pan.axis}(${pan.dir * 100}%)`;\n          timer2 !== null && clearTimeout(timer2);\n          timer2 = setTimeout(() => {\n            timer2 = null;\n            emit(pan.showing, { reset });\n            emit(\"action\", { side: pan.showing, reset });\n          }, 230);\n        } else {\n          node.style.transform = \"translate(0,0)\";\n          emitSlide(pan.showing, 0, true);\n        }\n        return;\n      } else {\n        evt.direction = pan.axis === \"X\" ? evt.offset.x < 0 ? \"left\" : \"right\" : evt.offset.y < 0 ? \"up\" : \"down\";\n      }\n      if (slots.left === void 0 && evt.direction === langDir.value.right || slots.right === void 0 && evt.direction === langDir.value.left || slots.top === void 0 && evt.direction === \"down\" || slots.bottom === void 0 && evt.direction === \"up\") {\n        node.style.transform = \"translate(0,0)\";\n        return;\n      }\n      let showing, dir, dist;\n      if (pan.axis === \"X\") {\n        dir = evt.direction === \"left\" ? -1 : 1;\n        showing = dir === 1 ? langDir.value.left : langDir.value.right;\n        dist = evt.distance.x;\n      } else {\n        dir = evt.direction === \"up\" ? -2 : 2;\n        showing = dir === 2 ? \"top\" : \"bottom\";\n        dist = evt.distance.y;\n      }\n      if (pan.dir !== null && Math.abs(dir) !== Math.abs(pan.dir)) return;\n      if (pan.dir !== dir) {\n        [\"left\", \"right\", \"top\", \"bottom\"].forEach((d) => {\n          if (dirRefs[d]) {\n            dirRefs[d].style.visibility = showing === d ? \"visible\" : \"hidden\";\n          }\n        });\n        pan.showing = showing;\n        pan.dir = dir;\n      }\n      pan.scale = Math.max(0, Math.min(1, (dist - 40) / pan.size[showing]));\n      node.style.transform = `translate${pan.axis}(${dist * dir / Math.abs(dir)}px)`;\n      dirContentRefs[showing].style.transform = `scale(${pan.scale})`;\n      emitSlide(showing, pan.scale, false);\n    }\n    onBeforeUpdate4(() => {\n      dirRefs = {};\n      dirContentRefs = {};\n    });\n    onBeforeUnmount35(() => {\n      timer2 !== null && clearTimeout(timer2);\n    });\n    Object.assign(proxy, { reset });\n    return () => {\n      const content = [], slotsList = {\n        left: slots[langDir.value.right] !== void 0,\n        right: slots[langDir.value.left] !== void 0,\n        up: slots.bottom !== void 0,\n        down: slots.top !== void 0\n      }, dirs = Object.keys(slotsList).filter((key) => slotsList[key] === true);\n      slotsDef.forEach((slotName) => {\n        const dir = slotName[0];\n        if (slots[dir] !== void 0) {\n          content.push(\n            h89(\"div\", {\n              key: dir,\n              ref: (el) => {\n                dirRefs[dir] = el;\n              },\n              class: `q-slide-item__${dir} absolute-full row no-wrap items-${slotName[1]} justify-${slotName[2]}` + (props4[dir + \"Color\"] !== void 0 ? ` bg-${props4[dir + \"Color\"]}` : \"\")\n            }, [\n              h89(\"div\", { ref: (el) => {\n                dirContentRefs[dir] = el;\n              } }, slots[dir]())\n            ])\n          );\n        }\n      });\n      const node = h89(\"div\", {\n        key: `${dirs.length === 0 ? \"only-\" : \"\"} content`,\n        ref: contentRef,\n        class: \"q-slide-item__content\"\n      }, hSlot(slots.default));\n      if (dirs.length === 0) {\n        content.push(node);\n      } else {\n        content.push(\n          withDirectives7(node, getCache(\"dir#\" + dirs.join(\"\"), () => {\n            const modifiers = {\n              prevent: true,\n              stop: true,\n              mouse: true\n            };\n            dirs.forEach((dir) => {\n              modifiers[dir] = true;\n            });\n            return [[\n              TouchPan_default,\n              onPan,\n              void 0,\n              modifiers\n            ]];\n          }))\n        );\n      }\n      return h89(\"div\", { class: classes.value }, content);\n    };\n  }\n});\n\n// src/components/space/QSpace.js\nimport { h as h90 } from \"vue\";\nvar QSpace_default = createComponent({\n  name: \"QSpace\",\n  setup() {\n    const space = h90(\"div\", { class: \"q-space\" });\n    return () => space;\n  }\n});\n\n// src/components/spinner/QSpinnerAudio.js\nimport { h as h91 } from \"vue\";\nvar innerHTML = '<g transform=\"matrix(1 0 0 -1 0 80)\"><rect width=\"10\" height=\"20\" rx=\"3\"><animate attributeName=\"height\" begin=\"0s\" dur=\"4.3s\" values=\"20;45;57;80;64;32;66;45;64;23;66;13;64;56;34;34;2;23;76;79;20\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></rect><rect x=\"15\" width=\"10\" height=\"80\" rx=\"3\"><animate attributeName=\"height\" begin=\"0s\" dur=\"2s\" values=\"80;55;33;5;75;23;73;33;12;14;60;80\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></rect><rect x=\"30\" width=\"10\" height=\"50\" rx=\"3\"><animate attributeName=\"height\" begin=\"0s\" dur=\"1.4s\" values=\"50;34;78;23;56;23;34;76;80;54;21;50\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></rect><rect x=\"45\" width=\"10\" height=\"30\" rx=\"3\"><animate attributeName=\"height\" begin=\"0s\" dur=\"2s\" values=\"30;45;13;80;56;72;45;76;34;23;67;30\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></rect></g>';\nvar QSpinnerAudio_default = createComponent({\n  name: \"QSpinnerAudio\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h91(\"svg\", {\n      class: classes.value,\n      fill: \"currentColor\",\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 55 80\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerBall.js\nimport { h as h92 } from \"vue\";\nvar innerHTML2 = '<g transform=\"translate(1 1)\" stroke-width=\"2\" fill=\"none\" fill-rule=\"evenodd\"><circle cx=\"5\" cy=\"50\" r=\"5\"><animate attributeName=\"cy\" begin=\"0s\" dur=\"2.2s\" values=\"50;5;50;50\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"cx\" begin=\"0s\" dur=\"2.2s\" values=\"5;27;49;5\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"27\" cy=\"5\" r=\"5\"><animate attributeName=\"cy\" begin=\"0s\" dur=\"2.2s\" from=\"5\" to=\"5\" values=\"5;50;50;5\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"cx\" begin=\"0s\" dur=\"2.2s\" from=\"27\" to=\"27\" values=\"27;49;5;27\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"49\" cy=\"50\" r=\"5\"><animate attributeName=\"cy\" begin=\"0s\" dur=\"2.2s\" values=\"50;50;5;50\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"cx\" from=\"49\" to=\"49\" begin=\"0s\" dur=\"2.2s\" values=\"49;5;27;49\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle></g>';\nvar QSpinnerBall_default = createComponent({\n  name: \"QSpinnerBall\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h92(\"svg\", {\n      class: classes.value,\n      stroke: \"currentColor\",\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 57 57\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML2\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerBars.js\nimport { h as h93 } from \"vue\";\nvar innerHTML3 = '<rect y=\"10\" width=\"15\" height=\"120\" rx=\"6\"><animate attributeName=\"height\" begin=\"0.5s\" dur=\"1s\" values=\"120;110;100;90;80;70;60;50;40;140;120\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"y\" begin=\"0.5s\" dur=\"1s\" values=\"10;15;20;25;30;35;40;45;50;0;10\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></rect><rect x=\"30\" y=\"10\" width=\"15\" height=\"120\" rx=\"6\"><animate attributeName=\"height\" begin=\"0.25s\" dur=\"1s\" values=\"120;110;100;90;80;70;60;50;40;140;120\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"y\" begin=\"0.25s\" dur=\"1s\" values=\"10;15;20;25;30;35;40;45;50;0;10\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></rect><rect x=\"60\" width=\"15\" height=\"140\" rx=\"6\"><animate attributeName=\"height\" begin=\"0s\" dur=\"1s\" values=\"120;110;100;90;80;70;60;50;40;140;120\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"y\" begin=\"0s\" dur=\"1s\" values=\"10;15;20;25;30;35;40;45;50;0;10\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></rect><rect x=\"90\" y=\"10\" width=\"15\" height=\"120\" rx=\"6\"><animate attributeName=\"height\" begin=\"0.25s\" dur=\"1s\" values=\"120;110;100;90;80;70;60;50;40;140;120\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"y\" begin=\"0.25s\" dur=\"1s\" values=\"10;15;20;25;30;35;40;45;50;0;10\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></rect><rect x=\"120\" y=\"10\" width=\"15\" height=\"120\" rx=\"6\"><animate attributeName=\"height\" begin=\"0.5s\" dur=\"1s\" values=\"120;110;100;90;80;70;60;50;40;140;120\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"y\" begin=\"0.5s\" dur=\"1s\" values=\"10;15;20;25;30;35;40;45;50;0;10\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></rect>';\nvar QSpinnerBars_default = createComponent({\n  name: \"QSpinnerBars\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h93(\"svg\", {\n      class: classes.value,\n      fill: \"currentColor\",\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 135 140\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML3\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerBox.js\nimport { h as h94 } from \"vue\";\nvar innerHTML4 = '<rect x=\"25\" y=\"25\" width=\"50\" height=\"50\" fill=\"none\" stroke-width=\"4\" stroke=\"currentColor\"><animateTransform id=\"spinnerBox\" attributeName=\"transform\" type=\"rotate\" from=\"0 50 50\" to=\"180 50 50\" dur=\"0.5s\" begin=\"rectBox.end\"></animateTransform></rect><rect x=\"27\" y=\"27\" width=\"46\" height=\"50\" fill=\"currentColor\"><animate id=\"rectBox\" attributeName=\"height\" begin=\"0s;spinnerBox.end\" dur=\"1.3s\" from=\"50\" to=\"0\" fill=\"freeze\"></animate></rect>';\nvar QSpinnerBox_default = createComponent({\n  name: \"QSpinnerBox\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h94(\"svg\", {\n      class: classes.value,\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 100 100\",\n      preserveAspectRatio: \"xMidYMid\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML4\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerClock.js\nimport { h as h95 } from \"vue\";\nvar innerHTML5 = '<circle cx=\"50\" cy=\"50\" r=\"48\" fill=\"none\" stroke-width=\"4\" stroke-miterlimit=\"10\" stroke=\"currentColor\"></circle><line stroke-linecap=\"round\" stroke-width=\"4\" stroke-miterlimit=\"10\" stroke=\"currentColor\" x1=\"50\" y1=\"50\" x2=\"85\" y2=\"50.5\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 50 50\" to=\"360 50 50\" dur=\"2s\" repeatCount=\"indefinite\"></animateTransform></line><line stroke-linecap=\"round\" stroke-width=\"4\" stroke-miterlimit=\"10\" stroke=\"currentColor\" x1=\"50\" y1=\"50\" x2=\"49.5\" y2=\"74\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 50 50\" to=\"360 50 50\" dur=\"15s\" repeatCount=\"indefinite\"></animateTransform></line>';\nvar QSpinnerClock_default = createComponent({\n  name: \"QSpinnerClock\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h95(\"svg\", {\n      class: classes.value,\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 100 100\",\n      preserveAspectRatio: \"xMidYMid\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML5\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerComment.js\nimport { h as h96 } from \"vue\";\nvar innerHTML6 = '<rect x=\"0\" y=\"0\" width=\"100\" height=\"100\" fill=\"none\"></rect><path d=\"M78,19H22c-6.6,0-12,5.4-12,12v31c0,6.6,5.4,12,12,12h37.2c0.4,3,1.8,5.6,3.7,7.6c2.4,2.5,5.1,4.1,9.1,4 c-1.4-2.1-2-7.2-2-10.3c0-0.4,0-0.8,0-1.3h8c6.6,0,12-5.4,12-12V31C90,24.4,84.6,19,78,19z\" fill=\"currentColor\"></path><circle cx=\"30\" cy=\"47\" r=\"5\" fill=\"#fff\"><animate attributeName=\"opacity\" from=\"0\" to=\"1\" values=\"0;1;1\" keyTimes=\"0;0.2;1\" dur=\"1s\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"50\" cy=\"47\" r=\"5\" fill=\"#fff\"><animate attributeName=\"opacity\" from=\"0\" to=\"1\" values=\"0;0;1;1\" keyTimes=\"0;0.2;0.4;1\" dur=\"1s\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"70\" cy=\"47\" r=\"5\" fill=\"#fff\"><animate attributeName=\"opacity\" from=\"0\" to=\"1\" values=\"0;0;1;1\" keyTimes=\"0;0.4;0.6;1\" dur=\"1s\" repeatCount=\"indefinite\"></animate></circle>';\nvar QSpinnerComment_default = createComponent({\n  name: \"QSpinnerComment\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h96(\"svg\", {\n      class: classes.value,\n      width: cSize.value,\n      height: cSize.value,\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 100 100\",\n      preserveAspectRatio: \"xMidYMid\",\n      innerHTML: innerHTML6\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerCube.js\nimport { h as h97 } from \"vue\";\nvar innerHTML7 = '<rect x=\"0\" y=\"0\" width=\"100\" height=\"100\" fill=\"none\"></rect><g transform=\"translate(25 25)\"><rect x=\"-20\" y=\"-20\" width=\"40\" height=\"40\" fill=\"currentColor\" opacity=\"0.9\"><animateTransform attributeName=\"transform\" type=\"scale\" from=\"1.5\" to=\"1\" repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" calcMode=\"spline\" keySplines=\"0.2 0.8 0.2 0.8\" keyTimes=\"0;1\"></animateTransform></rect></g><g transform=\"translate(75 25)\"><rect x=\"-20\" y=\"-20\" width=\"40\" height=\"40\" fill=\"currentColor\" opacity=\"0.8\"><animateTransform attributeName=\"transform\" type=\"scale\" from=\"1.5\" to=\"1\" repeatCount=\"indefinite\" begin=\"0.1s\" dur=\"1s\" calcMode=\"spline\" keySplines=\"0.2 0.8 0.2 0.8\" keyTimes=\"0;1\"></animateTransform></rect></g><g transform=\"translate(25 75)\"><rect x=\"-20\" y=\"-20\" width=\"40\" height=\"40\" fill=\"currentColor\" opacity=\"0.7\"><animateTransform attributeName=\"transform\" type=\"scale\" from=\"1.5\" to=\"1\" repeatCount=\"indefinite\" begin=\"0.3s\" dur=\"1s\" calcMode=\"spline\" keySplines=\"0.2 0.8 0.2 0.8\" keyTimes=\"0;1\"></animateTransform></rect></g><g transform=\"translate(75 75)\"><rect x=\"-20\" y=\"-20\" width=\"40\" height=\"40\" fill=\"currentColor\" opacity=\"0.6\"><animateTransform attributeName=\"transform\" type=\"scale\" from=\"1.5\" to=\"1\" repeatCount=\"indefinite\" begin=\"0.2s\" dur=\"1s\" calcMode=\"spline\" keySplines=\"0.2 0.8 0.2 0.8\" keyTimes=\"0;1\"></animateTransform></rect></g>';\nvar QSpinnerCube_default = createComponent({\n  name: \"QSpinnerCube\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h97(\"svg\", {\n      class: classes.value,\n      width: cSize.value,\n      height: cSize.value,\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 100 100\",\n      preserveAspectRatio: \"xMidYMid\",\n      innerHTML: innerHTML7\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerDots.js\nimport { h as h98 } from \"vue\";\nvar innerHTML8 = '<circle cx=\"15\" cy=\"15\" r=\"15\"><animate attributeName=\"r\" from=\"15\" to=\"15\" begin=\"0s\" dur=\"0.8s\" values=\"15;9;15\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"fill-opacity\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"0.8s\" values=\"1;.5;1\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"60\" cy=\"15\" r=\"9\" fill-opacity=\".3\"><animate attributeName=\"r\" from=\"9\" to=\"9\" begin=\"0s\" dur=\"0.8s\" values=\"9;15;9\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"fill-opacity\" from=\".5\" to=\".5\" begin=\"0s\" dur=\"0.8s\" values=\".5;1;.5\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"105\" cy=\"15\" r=\"15\"><animate attributeName=\"r\" from=\"15\" to=\"15\" begin=\"0s\" dur=\"0.8s\" values=\"15;9;15\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"fill-opacity\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"0.8s\" values=\"1;.5;1\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle>';\nvar QSpinnerDots_default = createComponent({\n  name: \"QSpinnerDots\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h98(\"svg\", {\n      class: classes.value,\n      fill: \"currentColor\",\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 120 30\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML8\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerFacebook.js\nimport { h as h99 } from \"vue\";\nvar innerHTML9 = '<g transform=\"translate(20 50)\"><rect x=\"-10\" y=\"-30\" width=\"20\" height=\"60\" fill=\"currentColor\" opacity=\"0.6\"><animateTransform attributeName=\"transform\" type=\"scale\" from=\"2\" to=\"1\" begin=\"0s\" repeatCount=\"indefinite\" dur=\"1s\" calcMode=\"spline\" keySplines=\"0.1 0.9 0.4 1\" keyTimes=\"0;1\" values=\"2;1\"></animateTransform></rect></g><g transform=\"translate(50 50)\"><rect x=\"-10\" y=\"-30\" width=\"20\" height=\"60\" fill=\"currentColor\" opacity=\"0.8\"><animateTransform attributeName=\"transform\" type=\"scale\" from=\"2\" to=\"1\" begin=\"0.1s\" repeatCount=\"indefinite\" dur=\"1s\" calcMode=\"spline\" keySplines=\"0.1 0.9 0.4 1\" keyTimes=\"0;1\" values=\"2;1\"></animateTransform></rect></g><g transform=\"translate(80 50)\"><rect x=\"-10\" y=\"-30\" width=\"20\" height=\"60\" fill=\"currentColor\" opacity=\"0.9\"><animateTransform attributeName=\"transform\" type=\"scale\" from=\"2\" to=\"1\" begin=\"0.2s\" repeatCount=\"indefinite\" dur=\"1s\" calcMode=\"spline\" keySplines=\"0.1 0.9 0.4 1\" keyTimes=\"0;1\" values=\"2;1\"></animateTransform></rect></g>';\nvar QSpinnerFacebook_default = createComponent({\n  name: \"QSpinnerFacebook\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h99(\"svg\", {\n      class: classes.value,\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 100 100\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      preserveAspectRatio: \"xMidYMid\",\n      innerHTML: innerHTML9\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerGears.js\nimport { h as h100 } from \"vue\";\nvar innerHTML10 = '<g transform=\"translate(-20,-20)\"><path d=\"M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z\" fill=\"currentColor\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"90 50 50\" to=\"0 50 50\" dur=\"1s\" repeatCount=\"indefinite\"></animateTransform></path></g><g transform=\"translate(20,20) rotate(15 50 50)\"><path d=\"M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z\" fill=\"currentColor\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 50 50\" to=\"90 50 50\" dur=\"1s\" repeatCount=\"indefinite\"></animateTransform></path></g>';\nvar QSpinnerGears_default = createComponent({\n  name: \"QSpinnerGears\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h100(\"svg\", {\n      class: classes.value,\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 100 100\",\n      preserveAspectRatio: \"xMidYMid\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML10\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerGrid.js\nimport { h as h101 } from \"vue\";\nvar innerHTML11 = '<circle cx=\"12.5\" cy=\"12.5\" r=\"12.5\"><animate attributeName=\"fill-opacity\" begin=\"0s\" dur=\"1s\" values=\"1;.2;1\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"12.5\" cy=\"52.5\" r=\"12.5\" fill-opacity=\".5\"><animate attributeName=\"fill-opacity\" begin=\"100ms\" dur=\"1s\" values=\"1;.2;1\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"52.5\" cy=\"12.5\" r=\"12.5\"><animate attributeName=\"fill-opacity\" begin=\"300ms\" dur=\"1s\" values=\"1;.2;1\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"52.5\" cy=\"52.5\" r=\"12.5\"><animate attributeName=\"fill-opacity\" begin=\"600ms\" dur=\"1s\" values=\"1;.2;1\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"92.5\" cy=\"12.5\" r=\"12.5\"><animate attributeName=\"fill-opacity\" begin=\"800ms\" dur=\"1s\" values=\"1;.2;1\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"92.5\" cy=\"52.5\" r=\"12.5\"><animate attributeName=\"fill-opacity\" begin=\"400ms\" dur=\"1s\" values=\"1;.2;1\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"12.5\" cy=\"92.5\" r=\"12.5\"><animate attributeName=\"fill-opacity\" begin=\"700ms\" dur=\"1s\" values=\"1;.2;1\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"52.5\" cy=\"92.5\" r=\"12.5\"><animate attributeName=\"fill-opacity\" begin=\"500ms\" dur=\"1s\" values=\"1;.2;1\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"92.5\" cy=\"92.5\" r=\"12.5\"><animate attributeName=\"fill-opacity\" begin=\"200ms\" dur=\"1s\" values=\"1;.2;1\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle>';\nvar QSpinnerGrid_default = createComponent({\n  name: \"QSpinnerGrid\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h101(\"svg\", {\n      class: classes.value,\n      fill: \"currentColor\",\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 105 105\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML11\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerHearts.js\nimport { h as h102 } from \"vue\";\nvar innerHTML12 = '<path d=\"M30.262 57.02L7.195 40.723c-5.84-3.976-7.56-12.06-3.842-18.063 3.715-6 11.467-7.65 17.306-3.68l4.52 3.76 2.6-5.274c3.716-6.002 11.47-7.65 17.304-3.68 5.84 3.97 7.56 12.054 3.842 18.062L34.49 56.118c-.897 1.512-2.793 1.915-4.228.9z\" fill-opacity=\".5\"><animate attributeName=\"fill-opacity\" begin=\"0s\" dur=\"1.4s\" values=\"0.5;1;0.5\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></path><path d=\"M105.512 56.12l-14.44-24.272c-3.716-6.008-1.996-14.093 3.843-18.062 5.835-3.97 13.588-2.322 17.306 3.68l2.6 5.274 4.52-3.76c5.84-3.97 13.593-2.32 17.308 3.68 3.718 6.003 1.998 14.088-3.842 18.064L109.74 57.02c-1.434 1.014-3.33.61-4.228-.9z\" fill-opacity=\".5\"><animate attributeName=\"fill-opacity\" begin=\"0.7s\" dur=\"1.4s\" values=\"0.5;1;0.5\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></path><path d=\"M67.408 57.834l-23.01-24.98c-5.864-6.15-5.864-16.108 0-22.248 5.86-6.14 15.37-6.14 21.234 0L70 16.168l4.368-5.562c5.863-6.14 15.375-6.14 21.235 0 5.863 6.14 5.863 16.098 0 22.247l-23.007 24.98c-1.43 1.556-3.757 1.556-5.188 0z\"></path>';\nvar QSpinnerHearts_default = createComponent({\n  name: \"QSpinnerHearts\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h102(\"svg\", {\n      class: classes.value,\n      fill: \"currentColor\",\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 140 64\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML12\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerHourglass.js\nimport { h as h103 } from \"vue\";\nvar innerHTML13 = '<g><path fill=\"none\" stroke=\"currentColor\" stroke-width=\"5\" stroke-miterlimit=\"10\" d=\"M58.4,51.7c-0.9-0.9-1.4-2-1.4-2.3s0.5-0.4,1.4-1.4 C70.8,43.8,79.8,30.5,80,15.5H70H30H20c0.2,15,9.2,28.1,21.6,32.3c0.9,0.9,1.4,1.2,1.4,1.5s-0.5,1.6-1.4,2.5 C29.2,56.1,20.2,69.5,20,85.5h10h40h10C79.8,69.5,70.8,55.9,58.4,51.7z\"></path><clipPath id=\"uil-hourglass-clip1\"><rect x=\"15\" y=\"20\" width=\"70\" height=\"25\"><animate attributeName=\"height\" from=\"25\" to=\"0\" dur=\"1s\" repeatCount=\"indefinite\" values=\"25;0;0\" keyTimes=\"0;0.5;1\"></animate><animate attributeName=\"y\" from=\"20\" to=\"45\" dur=\"1s\" repeatCount=\"indefinite\" values=\"20;45;45\" keyTimes=\"0;0.5;1\"></animate></rect></clipPath><clipPath id=\"uil-hourglass-clip2\"><rect x=\"15\" y=\"55\" width=\"70\" height=\"25\"><animate attributeName=\"height\" from=\"0\" to=\"25\" dur=\"1s\" repeatCount=\"indefinite\" values=\"0;25;25\" keyTimes=\"0;0.5;1\"></animate><animate attributeName=\"y\" from=\"80\" to=\"55\" dur=\"1s\" repeatCount=\"indefinite\" values=\"80;55;55\" keyTimes=\"0;0.5;1\"></animate></rect></clipPath><path d=\"M29,23c3.1,11.4,11.3,19.5,21,19.5S67.9,34.4,71,23H29z\" clip-path=\"url(#uil-hourglass-clip1)\" fill=\"currentColor\"></path><path d=\"M71.6,78c-3-11.6-11.5-20-21.5-20s-18.5,8.4-21.5,20H71.6z\" clip-path=\"url(#uil-hourglass-clip2)\" fill=\"currentColor\"></path><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 50 50\" to=\"180 50 50\" repeatCount=\"indefinite\" dur=\"1s\" values=\"0 50 50;0 50 50;180 50 50\" keyTimes=\"0;0.7;1\"></animateTransform></g>';\nvar QSpinnerHourglass_default = createComponent({\n  name: \"QSpinnerHourglass\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h103(\"svg\", {\n      class: classes.value,\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 100 100\",\n      preserveAspectRatio: \"xMidYMid\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML13\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerInfinity.js\nimport { h as h104 } from \"vue\";\nvar innerHTML14 = '<path d=\"M24.3,30C11.4,30,5,43.3,5,50s6.4,20,19.3,20c19.3,0,32.1-40,51.4-40C88.6,30,95,43.3,95,50s-6.4,20-19.3,20C56.4,70,43.6,30,24.3,30z\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"8\" stroke-dasharray=\"10.691205342610678 10.691205342610678\" stroke-dashoffset=\"0\"><animate attributeName=\"stroke-dashoffset\" from=\"0\" to=\"21.382410685221355\" begin=\"0\" dur=\"2s\" repeatCount=\"indefinite\" fill=\"freeze\"></animate></path>';\nvar QSpinnerInfinity_default = createComponent({\n  name: \"QSpinnerInfinity\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h104(\"svg\", {\n      class: classes.value,\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 100 100\",\n      preserveAspectRatio: \"xMidYMid\",\n      innerHTML: innerHTML14\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerIos.js\nimport { h as h105 } from \"vue\";\nvar innerHTML15 = '<g stroke-width=\"4\" stroke-linecap=\"round\"><line y1=\"17\" y2=\"29\" transform=\"translate(32,32) rotate(180)\"><animate attributeName=\"stroke-opacity\" dur=\"750ms\" values=\"1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1\" repeatCount=\"indefinite\"></animate></line><line y1=\"17\" y2=\"29\" transform=\"translate(32,32) rotate(210)\"><animate attributeName=\"stroke-opacity\" dur=\"750ms\" values=\"0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0\" repeatCount=\"indefinite\"></animate></line><line y1=\"17\" y2=\"29\" transform=\"translate(32,32) rotate(240)\"><animate attributeName=\"stroke-opacity\" dur=\"750ms\" values=\".1;0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1\" repeatCount=\"indefinite\"></animate></line><line y1=\"17\" y2=\"29\" transform=\"translate(32,32) rotate(270)\"><animate attributeName=\"stroke-opacity\" dur=\"750ms\" values=\".15;.1;0;1;.85;.7;.65;.55;.45;.35;.25;.15\" repeatCount=\"indefinite\"></animate></line><line y1=\"17\" y2=\"29\" transform=\"translate(32,32) rotate(300)\"><animate attributeName=\"stroke-opacity\" dur=\"750ms\" values=\".25;.15;.1;0;1;.85;.7;.65;.55;.45;.35;.25\" repeatCount=\"indefinite\"></animate></line><line y1=\"17\" y2=\"29\" transform=\"translate(32,32) rotate(330)\"><animate attributeName=\"stroke-opacity\" dur=\"750ms\" values=\".35;.25;.15;.1;0;1;.85;.7;.65;.55;.45;.35\" repeatCount=\"indefinite\"></animate></line><line y1=\"17\" y2=\"29\" transform=\"translate(32,32) rotate(0)\"><animate attributeName=\"stroke-opacity\" dur=\"750ms\" values=\".45;.35;.25;.15;.1;0;1;.85;.7;.65;.55;.45\" repeatCount=\"indefinite\"></animate></line><line y1=\"17\" y2=\"29\" transform=\"translate(32,32) rotate(30)\"><animate attributeName=\"stroke-opacity\" dur=\"750ms\" values=\".55;.45;.35;.25;.15;.1;0;1;.85;.7;.65;.55\" repeatCount=\"indefinite\"></animate></line><line y1=\"17\" y2=\"29\" transform=\"translate(32,32) rotate(60)\"><animate attributeName=\"stroke-opacity\" dur=\"750ms\" values=\".65;.55;.45;.35;.25;.15;.1;0;1;.85;.7;.65\" repeatCount=\"indefinite\"></animate></line><line y1=\"17\" y2=\"29\" transform=\"translate(32,32) rotate(90)\"><animate attributeName=\"stroke-opacity\" dur=\"750ms\" values=\".7;.65;.55;.45;.35;.25;.15;.1;0;1;.85;.7\" repeatCount=\"indefinite\"></animate></line><line y1=\"17\" y2=\"29\" transform=\"translate(32,32) rotate(120)\"><animate attributeName=\"stroke-opacity\" dur=\"750ms\" values=\".85;.7;.65;.55;.45;.35;.25;.15;.1;0;1;.85\" repeatCount=\"indefinite\"></animate></line><line y1=\"17\" y2=\"29\" transform=\"translate(32,32) rotate(150)\"><animate attributeName=\"stroke-opacity\" dur=\"750ms\" values=\"1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1\" repeatCount=\"indefinite\"></animate></line></g>';\nvar QSpinnerIos_default = createComponent({\n  name: \"QSpinnerIos\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h105(\"svg\", {\n      class: classes.value,\n      width: cSize.value,\n      height: cSize.value,\n      stroke: \"currentColor\",\n      fill: \"currentColor\",\n      viewBox: \"0 0 64 64\",\n      innerHTML: innerHTML15\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerOrbit.js\nimport { h as h106 } from \"vue\";\nvar innerHTML16 = '<circle cx=\"50\" cy=\"50\" r=\"44\" fill=\"none\" stroke-width=\"4\" stroke-opacity=\".5\" stroke=\"currentColor\"></circle><circle cx=\"8\" cy=\"54\" r=\"6\" fill=\"currentColor\" stroke-width=\"3\" stroke=\"currentColor\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 50 48\" to=\"360 50 52\" dur=\"2s\" repeatCount=\"indefinite\"></animateTransform></circle>';\nvar QSpinnerOrbit_default = createComponent({\n  name: \"QSpinnerOrbit\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h106(\"svg\", {\n      class: classes.value,\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 100 100\",\n      preserveAspectRatio: \"xMidYMid\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML16\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerOval.js\nimport { h as h107 } from \"vue\";\nvar innerHTML17 = '<g transform=\"translate(1 1)\" stroke-width=\"2\" fill=\"none\" fill-rule=\"evenodd\"><circle stroke-opacity=\".5\" cx=\"18\" cy=\"18\" r=\"18\"></circle><path d=\"M36 18c0-9.94-8.06-18-18-18\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 18 18\" to=\"360 18 18\" dur=\"1s\" repeatCount=\"indefinite\"></animateTransform></path></g>';\nvar QSpinnerOval_default = createComponent({\n  name: \"QSpinnerOval\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h107(\"svg\", {\n      class: classes.value,\n      stroke: \"currentColor\",\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 38 38\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML17\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerPie.js\nimport { h as h108 } from \"vue\";\nvar innerHTML18 = '<path d=\"M0 50A50 50 0 0 1 50 0L50 50L0 50\" fill=\"currentColor\" opacity=\"0.5\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 50 50\" to=\"360 50 50\" dur=\"0.8s\" repeatCount=\"indefinite\"></animateTransform></path><path d=\"M50 0A50 50 0 0 1 100 50L50 50L50 0\" fill=\"currentColor\" opacity=\"0.5\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 50 50\" to=\"360 50 50\" dur=\"1.6s\" repeatCount=\"indefinite\"></animateTransform></path><path d=\"M100 50A50 50 0 0 1 50 100L50 50L100 50\" fill=\"currentColor\" opacity=\"0.5\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 50 50\" to=\"360 50 50\" dur=\"2.4s\" repeatCount=\"indefinite\"></animateTransform></path><path d=\"M50 100A50 50 0 0 1 0 50L50 50L50 100\" fill=\"currentColor\" opacity=\"0.5\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 50 50\" to=\"360 50 50\" dur=\"3.2s\" repeatCount=\"indefinite\"></animateTransform></path>';\nvar QSpinnerPie_default = createComponent({\n  name: \"QSpinnerPie\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h108(\"svg\", {\n      class: classes.value,\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 100 100\",\n      preserveAspectRatio: \"xMidYMid\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML18\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerPuff.js\nimport { h as h109 } from \"vue\";\nvar innerHTML19 = '<g fill=\"none\" fill-rule=\"evenodd\" stroke-width=\"2\"><circle cx=\"22\" cy=\"22\" r=\"1\"><animate attributeName=\"r\" begin=\"0s\" dur=\"1.8s\" values=\"1; 20\" calcMode=\"spline\" keyTimes=\"0; 1\" keySplines=\"0.165, 0.84, 0.44, 1\" repeatCount=\"indefinite\"></animate><animate attributeName=\"stroke-opacity\" begin=\"0s\" dur=\"1.8s\" values=\"1; 0\" calcMode=\"spline\" keyTimes=\"0; 1\" keySplines=\"0.3, 0.61, 0.355, 1\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"22\" cy=\"22\" r=\"1\"><animate attributeName=\"r\" begin=\"-0.9s\" dur=\"1.8s\" values=\"1; 20\" calcMode=\"spline\" keyTimes=\"0; 1\" keySplines=\"0.165, 0.84, 0.44, 1\" repeatCount=\"indefinite\"></animate><animate attributeName=\"stroke-opacity\" begin=\"-0.9s\" dur=\"1.8s\" values=\"1; 0\" calcMode=\"spline\" keyTimes=\"0; 1\" keySplines=\"0.3, 0.61, 0.355, 1\" repeatCount=\"indefinite\"></animate></circle></g>';\nvar QSpinnerPuff_default = createComponent({\n  name: \"QSpinnerPuff\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h109(\"svg\", {\n      class: classes.value,\n      stroke: \"currentColor\",\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 44 44\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML19\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerRadio.js\nimport { h as h110 } from \"vue\";\nvar innerHTML20 = '<g transform=\"scale(0.55)\"><circle cx=\"30\" cy=\"150\" r=\"30\" fill=\"currentColor\"><animate attributeName=\"opacity\" from=\"0\" to=\"1\" dur=\"1s\" begin=\"0\" repeatCount=\"indefinite\" keyTimes=\"0;0.5;1\" values=\"0;1;1\"></animate></circle><path d=\"M90,150h30c0-49.7-40.3-90-90-90v30C63.1,90,90,116.9,90,150z\" fill=\"currentColor\"><animate attributeName=\"opacity\" from=\"0\" to=\"1\" dur=\"1s\" begin=\"0.1\" repeatCount=\"indefinite\" keyTimes=\"0;0.5;1\" values=\"0;1;1\"></animate></path><path d=\"M150,150h30C180,67.2,112.8,0,30,0v30C96.3,30,150,83.7,150,150z\" fill=\"currentColor\"><animate attributeName=\"opacity\" from=\"0\" to=\"1\" dur=\"1s\" begin=\"0.2\" repeatCount=\"indefinite\" keyTimes=\"0;0.5;1\" values=\"0;1;1\"></animate></path></g>';\nvar QSpinnerRadio_default = createComponent({\n  name: \"QSpinnerRadio\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h110(\"svg\", {\n      class: classes.value,\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 100 100\",\n      preserveAspectRatio: \"xMidYMid\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML20\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerRings.js\nimport { h as h111 } from \"vue\";\nvar innerHTML21 = '<g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\" stroke-width=\"2\"><circle cx=\"22\" cy=\"22\" r=\"6\"><animate attributeName=\"r\" begin=\"1.5s\" dur=\"3s\" values=\"6;22\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"stroke-opacity\" begin=\"1.5s\" dur=\"3s\" values=\"1;0\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"stroke-width\" begin=\"1.5s\" dur=\"3s\" values=\"2;0\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"22\" cy=\"22\" r=\"6\"><animate attributeName=\"r\" begin=\"3s\" dur=\"3s\" values=\"6;22\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"stroke-opacity\" begin=\"3s\" dur=\"3s\" values=\"1;0\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate><animate attributeName=\"stroke-width\" begin=\"3s\" dur=\"3s\" values=\"2;0\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle><circle cx=\"22\" cy=\"22\" r=\"8\"><animate attributeName=\"r\" begin=\"0s\" dur=\"1.5s\" values=\"6;1;2;3;4;5;6\" calcMode=\"linear\" repeatCount=\"indefinite\"></animate></circle></g>';\nvar QSpinnerRings_default = createComponent({\n  name: \"QSpinnerRings\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h111(\"svg\", {\n      class: classes.value,\n      stroke: \"currentColor\",\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 45 45\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML21\n    });\n  }\n});\n\n// src/components/spinner/QSpinnerTail.js\nimport { h as h112 } from \"vue\";\nvar innerHTML22 = '<defs><linearGradient x1=\"8.042%\" y1=\"0%\" x2=\"65.682%\" y2=\"23.865%\" id=\"a\"><stop stop-color=\"currentColor\" stop-opacity=\"0\" offset=\"0%\"></stop><stop stop-color=\"currentColor\" stop-opacity=\".631\" offset=\"63.146%\"></stop><stop stop-color=\"currentColor\" offset=\"100%\"></stop></linearGradient></defs><g transform=\"translate(1 1)\" fill=\"none\" fill-rule=\"evenodd\"><path d=\"M36 18c0-9.94-8.06-18-18-18\" stroke=\"url(#a)\" stroke-width=\"2\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 18 18\" to=\"360 18 18\" dur=\"0.9s\" repeatCount=\"indefinite\"></animateTransform></path><circle fill=\"currentColor\" cx=\"36\" cy=\"18\" r=\"1\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 18 18\" to=\"360 18 18\" dur=\"0.9s\" repeatCount=\"indefinite\"></animateTransform></circle></g>';\nvar QSpinnerTail_default = createComponent({\n  name: \"QSpinnerTail\",\n  props: useSpinnerProps,\n  setup(props4) {\n    const { cSize, classes } = useSpinner(props4);\n    return () => h112(\"svg\", {\n      class: classes.value,\n      width: cSize.value,\n      height: cSize.value,\n      viewBox: \"0 0 38 38\",\n      xmlns: \"http://www.w3.org/2000/svg\",\n      innerHTML: innerHTML22\n    });\n  }\n});\n\n// src/components/splitter/QSplitter.js\nimport { h as h113, ref as ref56, computed as computed92, watch as watch39, nextTick as nextTick17, getCurrentInstance as getCurrentInstance73 } from \"vue\";\nvar QSplitter_default = createComponent({\n  name: \"QSplitter\",\n  props: {\n    ...useDarkProps,\n    modelValue: {\n      type: Number,\n      required: true\n    },\n    reverse: Boolean,\n    unit: {\n      type: String,\n      default: \"%\",\n      validator: (v) => [\"%\", \"px\"].includes(v)\n    },\n    limits: {\n      type: Array,\n      validator: (v) => {\n        if (v.length !== 2) return false;\n        if (typeof v[0] !== \"number\" || typeof v[1] !== \"number\") return false;\n        return v[0] >= 0 && v[0] <= v[1];\n      }\n    },\n    emitImmediately: Boolean,\n    horizontal: Boolean,\n    disable: Boolean,\n    beforeClass: [Array, String, Object],\n    afterClass: [Array, String, Object],\n    separatorClass: [Array, String, Object],\n    separatorStyle: [Array, String, Object]\n  },\n  emits: [\"update:modelValue\"],\n  setup(props4, { slots, emit }) {\n    const { proxy: { $q } } = getCurrentInstance73();\n    const isDark = use_dark_default(props4, $q);\n    const rootRef = ref56(null);\n    const sideRefs = {\n      before: ref56(null),\n      after: ref56(null)\n    };\n    const classes = computed92(\n      () => `q-splitter no-wrap ${props4.horizontal === true ? \"q-splitter--horizontal column\" : \"q-splitter--vertical row\"} q-splitter--${props4.disable === true ? \"disabled\" : \"workable\"}` + (isDark.value === true ? \" q-splitter--dark\" : \"\")\n    );\n    const propName = computed92(() => props4.horizontal === true ? \"height\" : \"width\");\n    const side = computed92(() => props4.reverse !== true ? \"before\" : \"after\");\n    const computedLimits = computed92(() => props4.limits !== void 0 ? props4.limits : props4.unit === \"%\" ? [10, 90] : [50, Infinity]);\n    function getCSSValue(value2) {\n      return (props4.unit === \"%\" ? value2 : Math.round(value2)) + props4.unit;\n    }\n    const styles = computed92(() => ({\n      [side.value]: {\n        [propName.value]: getCSSValue(props4.modelValue)\n      }\n    }));\n    let __dir, __maxValue, __value, __multiplier, __normalized;\n    function pan(evt) {\n      if (evt.isFirst === true) {\n        const size2 = rootRef.value.getBoundingClientRect()[propName.value];\n        __dir = props4.horizontal === true ? \"up\" : \"left\";\n        __maxValue = props4.unit === \"%\" ? 100 : size2;\n        __value = Math.min(__maxValue, computedLimits.value[1], Math.max(computedLimits.value[0], props4.modelValue));\n        __multiplier = (props4.reverse !== true ? 1 : -1) * (props4.horizontal === true ? 1 : $q.lang.rtl === true ? -1 : 1) * (props4.unit === \"%\" ? size2 === 0 ? 0 : 100 / size2 : 1);\n        rootRef.value.classList.add(\"q-splitter--active\");\n        return;\n      }\n      if (evt.isFinal === true) {\n        if (__normalized !== props4.modelValue) {\n          emit(\"update:modelValue\", __normalized);\n        }\n        rootRef.value.classList.remove(\"q-splitter--active\");\n        return;\n      }\n      const val = __value + __multiplier * (evt.direction === __dir ? -1 : 1) * evt.distance[props4.horizontal === true ? \"y\" : \"x\"];\n      __normalized = Math.min(__maxValue, computedLimits.value[1], Math.max(computedLimits.value[0], val));\n      sideRefs[side.value].value.style[propName.value] = getCSSValue(__normalized);\n      if (props4.emitImmediately === true && props4.modelValue !== __normalized) {\n        emit(\"update:modelValue\", __normalized);\n      }\n    }\n    const sepDirective = computed92(() => {\n      return [[\n        TouchPan_default,\n        pan,\n        void 0,\n        {\n          [props4.horizontal === true ? \"vertical\" : \"horizontal\"]: true,\n          prevent: true,\n          stop: true,\n          mouse: true,\n          mouseAllDir: true\n        }\n      ]];\n    });\n    function normalize2(val, limits) {\n      if (val < limits[0]) {\n        emit(\"update:modelValue\", limits[0]);\n      } else if (val > limits[1]) {\n        emit(\"update:modelValue\", limits[1]);\n      }\n    }\n    watch39(() => props4.modelValue, (v) => {\n      normalize2(v, computedLimits.value);\n    });\n    watch39(() => props4.limits, () => {\n      nextTick17(() => {\n        normalize2(props4.modelValue, computedLimits.value);\n      });\n    });\n    return () => {\n      const child = [\n        h113(\"div\", {\n          ref: sideRefs.before,\n          class: [\n            \"q-splitter__panel q-splitter__before\" + (props4.reverse === true ? \" col\" : \"\"),\n            props4.beforeClass\n          ],\n          style: styles.value.before\n        }, hSlot(slots.before)),\n        h113(\"div\", {\n          class: [\n            \"q-splitter__separator\",\n            props4.separatorClass\n          ],\n          style: props4.separatorStyle,\n          \"aria-disabled\": props4.disable === true ? \"true\" : void 0\n        }, [\n          hDir(\n            \"div\",\n            { class: \"q-splitter__separator-area absolute-full\" },\n            hSlot(slots.separator),\n            \"sep\",\n            props4.disable !== true,\n            () => sepDirective.value\n          )\n        ]),\n        h113(\"div\", {\n          ref: sideRefs.after,\n          class: [\n            \"q-splitter__panel q-splitter__after\" + (props4.reverse === true ? \"\" : \" col\"),\n            props4.afterClass\n          ],\n          style: styles.value.after\n        }, hSlot(slots.after))\n      ];\n      return h113(\"div\", {\n        class: classes.value,\n        ref: rootRef\n      }, hMergeSlot(slots.default, child));\n    };\n  }\n});\n\n// src/components/stepper/QStep.js\nimport { h as h115, ref as ref58, computed as computed94, inject as inject10, getCurrentInstance as getCurrentInstance75, KeepAlive as KeepAlive2 } from \"vue\";\n\n// src/components/stepper/StepHeader.js\nimport { h as h114, ref as ref57, computed as computed93, withDirectives as withDirectives8, getCurrentInstance as getCurrentInstance74 } from \"vue\";\nvar StepHeader_default = createComponent({\n  name: \"StepHeader\",\n  props: {\n    stepper: {},\n    step: {},\n    goToPanel: Function\n  },\n  setup(props4, { attrs }) {\n    const { proxy: { $q } } = getCurrentInstance74();\n    const blurRef = ref57(null);\n    const isActive = computed93(() => props4.stepper.modelValue === props4.step.name);\n    const isDisable = computed93(() => {\n      const opt = props4.step.disable;\n      return opt === true || opt === \"\";\n    });\n    const isError = computed93(() => {\n      const opt = props4.step.error;\n      return opt === true || opt === \"\";\n    });\n    const isDone = computed93(() => {\n      const opt = props4.step.done;\n      return isDisable.value === false && (opt === true || opt === \"\");\n    });\n    const headerNav = computed93(() => {\n      const opt = props4.step.headerNav, nav = opt === true || opt === \"\" || opt === void 0;\n      return isDisable.value === false && props4.stepper.headerNav && nav;\n    });\n    const hasPrefix = computed93(() => {\n      return props4.step.prefix && (isActive.value === false || props4.stepper.activeIcon === \"none\") && (isError.value === false || props4.stepper.errorIcon === \"none\") && (isDone.value === false || props4.stepper.doneIcon === \"none\");\n    });\n    const icon = computed93(() => {\n      const defaultIcon = props4.step.icon || props4.stepper.inactiveIcon;\n      if (isActive.value === true) {\n        const icon2 = props4.step.activeIcon || props4.stepper.activeIcon;\n        return icon2 === \"none\" ? defaultIcon : icon2 || $q.iconSet.stepper.active;\n      }\n      if (isError.value === true) {\n        const icon2 = props4.step.errorIcon || props4.stepper.errorIcon;\n        return icon2 === \"none\" ? defaultIcon : icon2 || $q.iconSet.stepper.error;\n      }\n      if (isDisable.value === false && isDone.value === true) {\n        const icon2 = props4.step.doneIcon || props4.stepper.doneIcon;\n        return icon2 === \"none\" ? defaultIcon : icon2 || $q.iconSet.stepper.done;\n      }\n      return defaultIcon;\n    });\n    const color = computed93(() => {\n      const errorColor = isError.value === true ? props4.step.errorColor || props4.stepper.errorColor : void 0;\n      if (isActive.value === true) {\n        const color2 = props4.step.activeColor || props4.stepper.activeColor || props4.step.color;\n        return color2 !== void 0 ? color2 : errorColor;\n      }\n      if (errorColor !== void 0) {\n        return errorColor;\n      }\n      if (isDisable.value === false && isDone.value === true) {\n        return props4.step.doneColor || props4.stepper.doneColor || props4.step.color || props4.stepper.inactiveColor;\n      }\n      return props4.step.color || props4.stepper.inactiveColor;\n    });\n    const classes = computed93(() => {\n      return \"q-stepper__tab col-grow flex items-center no-wrap relative-position\" + (color.value !== void 0 ? ` text-${color.value}` : \"\") + (isError.value === true ? \" q-stepper__tab--error q-stepper__tab--error-with-\" + (hasPrefix.value === true ? \"prefix\" : \"icon\") : \"\") + (isActive.value === true ? \" q-stepper__tab--active\" : \"\") + (isDone.value === true ? \" q-stepper__tab--done\" : \"\") + (headerNav.value === true ? \" q-stepper__tab--navigation q-focusable q-hoverable\" : \"\") + (isDisable.value === true ? \" q-stepper__tab--disabled\" : \"\");\n    });\n    const ripple = computed93(() => props4.stepper.headerNav !== true ? false : headerNav.value);\n    function onActivate() {\n      blurRef.value !== null && blurRef.value.focus();\n      isActive.value === false && props4.goToPanel(props4.step.name);\n    }\n    function onKeyup2(e) {\n      if (e.keyCode === 13 && isActive.value === false) {\n        props4.goToPanel(props4.step.name);\n      }\n    }\n    return () => {\n      const data = { class: classes.value };\n      if (headerNav.value === true) {\n        data.onClick = onActivate;\n        data.onKeyup = onKeyup2;\n        Object.assign(\n          data,\n          isDisable.value === true ? { tabindex: -1, \"aria-disabled\": \"true\" } : { tabindex: attrs.tabindex || 0 }\n        );\n      }\n      const child = [\n        h114(\"div\", { class: \"q-focus-helper\", tabindex: -1, ref: blurRef }),\n        h114(\"div\", { class: \"q-stepper__dot row flex-center q-stepper__line relative-position\" }, [\n          h114(\"span\", { class: \"row flex-center\" }, [\n            hasPrefix.value === true ? props4.step.prefix : h114(QIcon_default, { name: icon.value })\n          ])\n        ])\n      ];\n      if (props4.step.title !== void 0 && props4.step.title !== null) {\n        const content = [\n          h114(\"div\", { class: \"q-stepper__title\" }, props4.step.title)\n        ];\n        if (props4.step.caption !== void 0 && props4.step.caption !== null) {\n          content.push(\n            h114(\"div\", { class: \"q-stepper__caption\" }, props4.step.caption)\n          );\n        }\n        child.push(\n          h114(\"div\", {\n            class: \"q-stepper__label q-stepper__line relative-position\"\n          }, content)\n        );\n      }\n      return withDirectives8(\n        h114(\"div\", data, child),\n        [[Ripple_default, ripple.value]]\n      );\n    };\n  }\n});\n\n// src/components/stepper/QStep.js\nfunction getStepWrapper(slots) {\n  return h115(\"div\", {\n    class: \"q-stepper__step-content\"\n  }, [\n    h115(\"div\", {\n      class: \"q-stepper__step-inner\"\n    }, hSlot(slots.default))\n  ]);\n}\nvar PanelWrapper2 = {\n  setup(_, { slots }) {\n    return () => getStepWrapper(slots);\n  }\n};\nvar QStep_default = createComponent({\n  name: \"QStep\",\n  props: {\n    ...usePanelChildProps,\n    icon: String,\n    color: String,\n    title: {\n      type: String,\n      required: true\n    },\n    caption: String,\n    prefix: [String, Number],\n    doneIcon: String,\n    doneColor: String,\n    activeIcon: String,\n    activeColor: String,\n    errorIcon: String,\n    errorColor: String,\n    headerNav: {\n      type: Boolean,\n      default: true\n    },\n    done: Boolean,\n    error: Boolean,\n    onScroll: [Function, Array]\n  },\n  setup(props4, { slots, emit }) {\n    const { proxy: { $q } } = getCurrentInstance75();\n    const $stepper = inject10(stepperKey, emptyRenderFn);\n    if ($stepper === emptyRenderFn) {\n      console.error(\"QStep needs to be a child of QStepper\");\n      return emptyRenderFn;\n    }\n    const { getCache } = use_render_cache_default();\n    const rootRef = ref58(null);\n    const isActive = computed94(() => $stepper.value.modelValue === props4.name);\n    const scrollEvent = computed94(() => $q.platform.is.ios !== true && $q.platform.is.chrome === true || isActive.value !== true || $stepper.value.vertical !== true ? {} : {\n      onScroll(e) {\n        const { target: target2 } = e;\n        if (target2.scrollTop > 0) {\n          target2.scrollTop = 0;\n        }\n        props4.onScroll !== void 0 && emit(\"scroll\", e);\n      }\n    });\n    const contentKey = computed94(() => typeof props4.name === \"string\" || typeof props4.name === \"number\" ? props4.name : String(props4.name));\n    function getStepContent() {\n      const vertical = $stepper.value.vertical;\n      if (vertical === true && $stepper.value.keepAlive === true) {\n        return h115(\n          KeepAlive2,\n          $stepper.value.keepAliveProps.value,\n          isActive.value === true ? [\n            h115(\n              $stepper.value.needsUniqueKeepAliveWrapper.value === true ? getCache(contentKey.value, () => ({ ...PanelWrapper2, name: contentKey.value })) : PanelWrapper2,\n              { key: contentKey.value },\n              slots.default\n            )\n          ] : void 0\n        );\n      }\n      return vertical !== true || isActive.value === true ? getStepWrapper(slots) : void 0;\n    }\n    return () => h115(\n      \"div\",\n      { ref: rootRef, class: \"q-stepper__step\", role: \"tabpanel\", ...scrollEvent.value },\n      $stepper.value.vertical === true ? [\n        h115(StepHeader_default, {\n          stepper: $stepper.value,\n          step: props4,\n          goToPanel: $stepper.value.goToPanel\n        }),\n        $stepper.value.animated === true ? h115(QSlideTransition_default, getStepContent) : getStepContent()\n      ] : [getStepContent()]\n    );\n  }\n});\n\n// src/components/stepper/QStepper.js\nimport { h as h116, computed as computed95, provide as provide6, getCurrentInstance as getCurrentInstance76 } from \"vue\";\nvar camelRE = /(-\\w)/g;\nfunction camelizeProps(props4) {\n  const acc = {};\n  for (const key in props4) {\n    const newKey = key.replace(camelRE, (m) => m[1].toUpperCase());\n    acc[newKey] = props4[key];\n  }\n  return acc;\n}\nvar QStepper_default = createComponent({\n  name: \"QStepper\",\n  props: {\n    ...useDarkProps,\n    ...usePanelProps,\n    flat: Boolean,\n    bordered: Boolean,\n    alternativeLabels: Boolean,\n    headerNav: Boolean,\n    contracted: Boolean,\n    headerClass: String,\n    inactiveColor: String,\n    inactiveIcon: String,\n    doneIcon: String,\n    doneColor: String,\n    activeIcon: String,\n    activeColor: String,\n    errorIcon: String,\n    errorColor: String\n  },\n  emits: usePanelEmits,\n  setup(props4, { slots }) {\n    const vm2 = getCurrentInstance76();\n    const isDark = use_dark_default(props4, vm2.proxy.$q);\n    const {\n      updatePanelsList,\n      isValidPanelName,\n      updatePanelIndex,\n      getPanelContent,\n      getPanels,\n      panelDirectives,\n      goToPanel,\n      keepAliveProps,\n      needsUniqueKeepAliveWrapper\n    } = use_panel_default();\n    provide6(stepperKey, computed95(() => ({\n      goToPanel,\n      keepAliveProps,\n      needsUniqueKeepAliveWrapper,\n      ...props4\n    })));\n    const classes = computed95(\n      () => `q-stepper q-stepper--${props4.vertical === true ? \"vertical\" : \"horizontal\"}` + (props4.flat === true ? \" q-stepper--flat\" : \"\") + (props4.bordered === true ? \" q-stepper--bordered\" : \"\") + (isDark.value === true ? \" q-stepper--dark q-dark\" : \"\")\n    );\n    const headerClasses = computed95(\n      () => `q-stepper__header row items-stretch justify-between q-stepper__header--${props4.alternativeLabels === true ? \"alternative\" : \"standard\"}-labels` + (props4.flat === false || props4.bordered === true ? \" q-stepper__header--border\" : \"\") + (props4.contracted === true ? \" q-stepper__header--contracted\" : \"\") + (props4.headerClass !== void 0 ? ` ${props4.headerClass}` : \"\")\n    );\n    function getContent() {\n      const top = hSlot(slots.message, []);\n      if (props4.vertical === true) {\n        isValidPanelName(props4.modelValue) && updatePanelIndex();\n        const content = h116(\"div\", {\n          class: \"q-stepper__content\"\n        }, hSlot(slots.default));\n        return top === void 0 ? [content] : top.concat(content);\n      }\n      return [\n        h116(\n          \"div\",\n          { class: headerClasses.value },\n          getPanels().map((panel) => {\n            const step = camelizeProps(panel.props);\n            return h116(StepHeader_default, {\n              key: step.name,\n              stepper: props4,\n              step,\n              goToPanel\n            });\n          })\n        ),\n        top,\n        hDir(\n          \"div\",\n          { class: \"q-stepper__content q-panel-parent\" },\n          getPanelContent(),\n          \"cont\",\n          props4.swipeable,\n          () => panelDirectives.value\n        )\n      ];\n    }\n    return () => {\n      updatePanelsList(slots);\n      return h116(\"div\", {\n        class: classes.value\n      }, hMergeSlot(slots.navigation, getContent()));\n    };\n  }\n});\n\n// src/components/stepper/QStepperNavigation.js\nimport { h as h117 } from \"vue\";\nvar QStepperNavigation_default = createComponent({\n  name: \"QStepperNavigation\",\n  setup(_, { slots }) {\n    return () => h117(\"div\", { class: \"q-stepper__nav\" }, hSlot(slots.default));\n  }\n});\n\n// src/components/table/QTable.js\nimport { h as h121, ref as ref62, computed as computed102, watch as watch44, getCurrentInstance as getCurrentInstance78 } from \"vue\";\n\n// src/components/table/QTh.js\nimport { h as h118, getCurrentInstance as getCurrentInstance77 } from \"vue\";\nvar QTh_default = createComponent({\n  name: \"QTh\",\n  props: {\n    props: Object,\n    autoWidth: Boolean\n  },\n  emits: [\"click\"],\n  setup(props4, { slots, emit }) {\n    const vm2 = getCurrentInstance77();\n    const { proxy: { $q } } = vm2;\n    const onClick = (evt) => {\n      emit(\"click\", evt);\n    };\n    return () => {\n      if (props4.props === void 0) {\n        return h118(\"th\", {\n          class: props4.autoWidth === true ? \"q-table--col-auto-width\" : \"\",\n          onClick\n        }, hSlot(slots.default));\n      }\n      let col, child;\n      const name2 = vm2.vnode.key;\n      if (name2) {\n        col = props4.props.colsMap[name2];\n        if (col === void 0) return;\n      } else {\n        col = props4.props.col;\n      }\n      if (col.sortable === true) {\n        const action = col.align === \"right\" ? \"unshift\" : \"push\";\n        child = hUniqueSlot(slots.default, []);\n        child[action](\n          h118(QIcon_default, {\n            class: col.__iconClass,\n            name: $q.iconSet.table.arrowUp\n          })\n        );\n      } else {\n        child = hSlot(slots.default);\n      }\n      const data = {\n        class: col.__thClass + (props4.autoWidth === true ? \" q-table--col-auto-width\" : \"\"),\n        style: col.headerStyle,\n        onClick: (evt) => {\n          col.sortable === true && props4.props.sort(col);\n          onClick(evt);\n        }\n      };\n      return h118(\"th\", data, child);\n    };\n  }\n});\n\n// src/components/virtual-scroll/QVirtualScroll.js\nimport { h as h120, ref as ref59, computed as computed96, watch as watch40, onBeforeMount as onBeforeMount3, onMounted as onMounted22, onBeforeUnmount as onBeforeUnmount36, onActivated as onActivated7, onDeactivated as onDeactivated9 } from \"vue\";\n\n// src/components/table/get-table-middle.js\nimport { h as h119 } from \"vue\";\nfunction get_table_middle_default(props4, content) {\n  return h119(\"div\", props4, [\n    h119(\"table\", { class: \"q-table\" }, content)\n  ]);\n}\n\n// src/components/virtual-scroll/QVirtualScroll.js\nvar comps = {\n  list: QList_default,\n  table: QMarkupTable_default\n};\nvar typeOptions = [\"list\", \"table\", \"__qtable\"];\nvar QVirtualScroll_default = createComponent({\n  name: \"QVirtualScroll\",\n  props: {\n    ...useVirtualScrollProps,\n    type: {\n      type: String,\n      default: \"list\",\n      validator: (v) => typeOptions.includes(v)\n    },\n    items: {\n      type: Array,\n      default: () => []\n    },\n    itemsFn: Function,\n    itemsSize: Number,\n    scrollTarget: scrollTargetProp\n  },\n  setup(props4, { slots, attrs }) {\n    let localScrollTarget;\n    const rootRef = ref59(null);\n    const virtualScrollLength = computed96(() => props4.itemsSize >= 0 && props4.itemsFn !== void 0 ? parseInt(props4.itemsSize, 10) : Array.isArray(props4.items) ? props4.items.length : 0);\n    const {\n      virtualScrollSliceRange,\n      localResetVirtualScroll,\n      padVirtualScroll,\n      onVirtualScrollEvt\n    } = useVirtualScroll({\n      virtualScrollLength,\n      getVirtualScrollTarget,\n      getVirtualScrollEl\n    });\n    const virtualScrollScope = computed96(() => {\n      if (virtualScrollLength.value === 0) {\n        return [];\n      }\n      const mapFn = (item, i) => ({\n        index: virtualScrollSliceRange.value.from + i,\n        item\n      });\n      return props4.itemsFn === void 0 ? props4.items.slice(virtualScrollSliceRange.value.from, virtualScrollSliceRange.value.to).map(mapFn) : props4.itemsFn(virtualScrollSliceRange.value.from, virtualScrollSliceRange.value.to - virtualScrollSliceRange.value.from).map(mapFn);\n    });\n    const classes = computed96(\n      () => \"q-virtual-scroll q-virtual-scroll\" + (props4.virtualScrollHorizontal === true ? \"--horizontal\" : \"--vertical\") + (props4.scrollTarget !== void 0 ? \"\" : \" scroll\")\n    );\n    const attributes = computed96(() => props4.scrollTarget !== void 0 ? {} : { tabindex: 0 });\n    watch40(virtualScrollLength, () => {\n      localResetVirtualScroll();\n    });\n    watch40(() => props4.scrollTarget, () => {\n      unconfigureScrollTarget();\n      configureScrollTarget();\n    });\n    function getVirtualScrollEl() {\n      return rootRef.value.$el || rootRef.value;\n    }\n    function getVirtualScrollTarget() {\n      return localScrollTarget;\n    }\n    function configureScrollTarget() {\n      localScrollTarget = getScrollTarget(getVirtualScrollEl(), props4.scrollTarget);\n      localScrollTarget.addEventListener(\"scroll\", onVirtualScrollEvt, listenOpts.passive);\n    }\n    function unconfigureScrollTarget() {\n      if (localScrollTarget !== void 0) {\n        localScrollTarget.removeEventListener(\"scroll\", onVirtualScrollEvt, listenOpts.passive);\n        localScrollTarget = void 0;\n      }\n    }\n    function __getVirtualChildren() {\n      let child = padVirtualScroll(\n        props4.type === \"list\" ? \"div\" : \"tbody\",\n        virtualScrollScope.value.map(slots.default)\n      );\n      if (slots.before !== void 0) {\n        child = slots.before().concat(child);\n      }\n      return hMergeSlot(slots.after, child);\n    }\n    onBeforeMount3(() => {\n      localResetVirtualScroll();\n    });\n    onMounted22(() => {\n      configureScrollTarget();\n    });\n    onActivated7(() => {\n      configureScrollTarget();\n    });\n    onDeactivated9(() => {\n      unconfigureScrollTarget();\n    });\n    onBeforeUnmount36(() => {\n      unconfigureScrollTarget();\n    });\n    return () => {\n      if (slots.default === void 0) {\n        console.error(\"QVirtualScroll: default scoped slot is required for rendering\");\n        return;\n      }\n      return props4.type === \"__qtable\" ? get_table_middle_default(\n        { ref: rootRef, class: \"q-table__middle \" + classes.value },\n        __getVirtualChildren()\n      ) : h120(comps[props4.type], {\n        ...attrs,\n        ref: rootRef,\n        class: [attrs.class, classes.value],\n        ...attributes.value\n      }, __getVirtualChildren);\n    };\n  }\n});\n\n// src/components/table/table-sort.js\nimport { computed as computed97 } from \"vue\";\n\n// src/utils/private.sort/sort.js\nfunction sortDate(a, b) {\n  return new Date(a) - new Date(b);\n}\n\n// src/components/table/table-sort.js\nvar useTableSortProps = {\n  sortMethod: Function,\n  binaryStateSort: Boolean,\n  columnSortOrder: {\n    type: String,\n    validator: (v) => v === \"ad\" || v === \"da\",\n    default: \"ad\"\n  }\n};\nfunction useTableSort(props4, computedPagination, colList, setPagination) {\n  const columnToSort = computed97(() => {\n    const { sortBy } = computedPagination.value;\n    return sortBy ? colList.value.find((def) => def.name === sortBy) || null : null;\n  });\n  const computedSortMethod = computed97(() => props4.sortMethod !== void 0 ? props4.sortMethod : (data, sortBy, descending) => {\n    const col = colList.value.find((def) => def.name === sortBy);\n    if (col === void 0 || col.field === void 0) {\n      return data;\n    }\n    const dir = descending === true ? -1 : 1, val = typeof col.field === \"function\" ? (v) => col.field(v) : (v) => v[col.field];\n    return data.sort((a, b) => {\n      let A = val(a), B = val(b);\n      if (col.rawSort !== void 0) {\n        return col.rawSort(A, B, a, b) * dir;\n      }\n      if (A === null || A === void 0) {\n        return -1 * dir;\n      }\n      if (B === null || B === void 0) {\n        return 1 * dir;\n      }\n      if (col.sort !== void 0) {\n        return col.sort(A, B, a, b) * dir;\n      }\n      if (isNumber(A) === true && isNumber(B) === true) {\n        return (A - B) * dir;\n      }\n      if (isDate(A) === true && isDate(B) === true) {\n        return sortDate(A, B) * dir;\n      }\n      if (typeof A === \"boolean\" && typeof B === \"boolean\") {\n        return (A - B) * dir;\n      }\n      [A, B] = [A, B].map((s) => (s + \"\").toLocaleString().toLowerCase());\n      return A < B ? -1 * dir : A === B ? 0 : dir;\n    });\n  });\n  function sort(col) {\n    let sortOrder = props4.columnSortOrder;\n    if (isObject(col) === true) {\n      if (col.sortOrder) {\n        sortOrder = col.sortOrder;\n      }\n      col = col.name;\n    } else {\n      const def = colList.value.find((def2) => def2.name === col);\n      if (def !== void 0 && def.sortOrder) {\n        sortOrder = def.sortOrder;\n      }\n    }\n    let { sortBy, descending } = computedPagination.value;\n    if (sortBy !== col) {\n      sortBy = col;\n      descending = sortOrder === \"da\";\n    } else if (props4.binaryStateSort === true) {\n      descending = !descending;\n    } else if (descending === true) {\n      if (sortOrder === \"ad\") {\n        sortBy = null;\n      } else {\n        descending = false;\n      }\n    } else {\n      if (sortOrder === \"ad\") {\n        descending = true;\n      } else {\n        sortBy = null;\n      }\n    }\n    setPagination({ sortBy, descending, page: 1 });\n  }\n  return {\n    columnToSort,\n    computedSortMethod,\n    sort\n  };\n}\n\n// src/components/table/table-filter.js\nimport { computed as computed98, watch as watch41, nextTick as nextTick18 } from \"vue\";\nvar useTableFilterProps = {\n  filter: [String, Object],\n  filterMethod: Function\n};\nfunction useTableFilter(props4, setPagination) {\n  const computedFilterMethod = computed98(() => props4.filterMethod !== void 0 ? props4.filterMethod : (rows, terms, cols, cellValue) => {\n    const lowerTerms = terms ? terms.toLowerCase() : \"\";\n    return rows.filter(\n      (row) => cols.some((col) => {\n        const val = cellValue(col, row) + \"\";\n        const haystack = val === \"undefined\" || val === \"null\" ? \"\" : val.toLowerCase();\n        return haystack.indexOf(lowerTerms) !== -1;\n      })\n    );\n  });\n  watch41(\n    () => props4.filter,\n    () => {\n      nextTick18(() => {\n        setPagination({ page: 1 }, true);\n      });\n    },\n    { deep: true }\n  );\n  return { computedFilterMethod };\n}\n\n// src/components/table/table-pagination.js\nimport { ref as ref60, computed as computed99, watch as watch42, nextTick as nextTick19 } from \"vue\";\nfunction samePagination(oldPag, newPag) {\n  for (const prop in newPag) {\n    if (newPag[prop] !== oldPag[prop]) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction fixPagination(p) {\n  if (p.page < 1) {\n    p.page = 1;\n  }\n  if (p.rowsPerPage !== void 0 && p.rowsPerPage < 1) {\n    p.rowsPerPage = 0;\n  }\n  return p;\n}\nvar useTablePaginationProps = {\n  pagination: Object,\n  rowsPerPageOptions: {\n    type: Array,\n    default: () => [5, 7, 10, 15, 20, 25, 50, 0]\n  },\n  \"onUpdate:pagination\": [Function, Array]\n};\nfunction useTablePaginationState(vm2, getCellValue) {\n  const { props: props4, emit } = vm2;\n  const innerPagination = ref60(\n    Object.assign({\n      sortBy: null,\n      descending: false,\n      page: 1,\n      rowsPerPage: props4.rowsPerPageOptions.length !== 0 ? props4.rowsPerPageOptions[0] : 5\n    }, props4.pagination)\n  );\n  const computedPagination = computed99(() => {\n    const pag = props4[\"onUpdate:pagination\"] !== void 0 ? { ...innerPagination.value, ...props4.pagination } : innerPagination.value;\n    return fixPagination(pag);\n  });\n  const isServerSide = computed99(() => computedPagination.value.rowsNumber !== void 0);\n  function sendServerRequest(pagination) {\n    requestServerInteraction({\n      pagination,\n      filter: props4.filter\n    });\n  }\n  function requestServerInteraction(prop = {}) {\n    nextTick19(() => {\n      emit(\"request\", {\n        pagination: prop.pagination || computedPagination.value,\n        filter: prop.filter || props4.filter,\n        getCellValue\n      });\n    });\n  }\n  function setPagination(val, forceServerRequest) {\n    const newPagination = fixPagination({\n      ...computedPagination.value,\n      ...val\n    });\n    if (samePagination(computedPagination.value, newPagination) === true) {\n      if (isServerSide.value === true && forceServerRequest === true) {\n        sendServerRequest(newPagination);\n      }\n      return;\n    }\n    if (isServerSide.value === true) {\n      sendServerRequest(newPagination);\n      return;\n    }\n    if (props4.pagination !== void 0 && props4[\"onUpdate:pagination\"] !== void 0) {\n      emit(\"update:pagination\", newPagination);\n    } else {\n      innerPagination.value = newPagination;\n    }\n  }\n  return {\n    innerPagination,\n    computedPagination,\n    isServerSide,\n    requestServerInteraction,\n    setPagination\n  };\n}\nfunction useTablePagination(vm2, innerPagination, computedPagination, isServerSide, setPagination, filteredSortedRowsNumber) {\n  const { props: props4, emit, proxy: { $q } } = vm2;\n  const computedRowsNumber = computed99(() => isServerSide.value === true ? computedPagination.value.rowsNumber || 0 : filteredSortedRowsNumber.value);\n  const firstRowIndex = computed99(() => {\n    const { page, rowsPerPage } = computedPagination.value;\n    return (page - 1) * rowsPerPage;\n  });\n  const lastRowIndex = computed99(() => {\n    const { page, rowsPerPage } = computedPagination.value;\n    return page * rowsPerPage;\n  });\n  const isFirstPage = computed99(() => computedPagination.value.page === 1);\n  const pagesNumber = computed99(() => computedPagination.value.rowsPerPage === 0 ? 1 : Math.max(\n    1,\n    Math.ceil(computedRowsNumber.value / computedPagination.value.rowsPerPage)\n  ));\n  const isLastPage = computed99(() => lastRowIndex.value === 0 ? true : computedPagination.value.page >= pagesNumber.value);\n  const computedRowsPerPageOptions = computed99(() => {\n    const opts = props4.rowsPerPageOptions.includes(innerPagination.value.rowsPerPage) ? props4.rowsPerPageOptions : [innerPagination.value.rowsPerPage].concat(props4.rowsPerPageOptions);\n    return opts.map((count) => ({\n      label: count === 0 ? $q.lang.table.allRows : \"\" + count,\n      value: count\n    }));\n  });\n  watch42(pagesNumber, (lastPage2, oldLastPage) => {\n    if (lastPage2 === oldLastPage) return;\n    const currentPage = computedPagination.value.page;\n    if (lastPage2 && !currentPage) {\n      setPagination({ page: 1 });\n    } else if (lastPage2 < currentPage) {\n      setPagination({ page: lastPage2 });\n    }\n  });\n  function firstPage() {\n    setPagination({ page: 1 });\n  }\n  function prevPage() {\n    const { page } = computedPagination.value;\n    if (page > 1) {\n      setPagination({ page: page - 1 });\n    }\n  }\n  function nextPage() {\n    const { page, rowsPerPage } = computedPagination.value;\n    if (lastRowIndex.value > 0 && page * rowsPerPage < computedRowsNumber.value) {\n      setPagination({ page: page + 1 });\n    }\n  }\n  function lastPage() {\n    setPagination({ page: pagesNumber.value });\n  }\n  if (props4[\"onUpdate:pagination\"] !== void 0) {\n    emit(\"update:pagination\", { ...computedPagination.value });\n  }\n  return {\n    firstRowIndex,\n    lastRowIndex,\n    isFirstPage,\n    isLastPage,\n    pagesNumber,\n    computedRowsPerPageOptions,\n    computedRowsNumber,\n    firstPage,\n    prevPage,\n    nextPage,\n    lastPage\n  };\n}\n\n// src/components/table/table-row-selection.js\nimport { computed as computed100 } from \"vue\";\nvar useTableRowSelectionProps = {\n  selection: {\n    type: String,\n    default: \"none\",\n    validator: (v) => [\"single\", \"multiple\", \"none\"].includes(v)\n  },\n  selected: {\n    type: Array,\n    default: () => []\n  }\n};\nvar useTableRowSelectionEmits = [\"update:selected\", \"selection\"];\nfunction useTableRowSelection(props4, emit, computedRows, getRowKey) {\n  const selectedKeys = computed100(() => {\n    const keys = {};\n    props4.selected.map(getRowKey.value).forEach((key) => {\n      keys[key] = true;\n    });\n    return keys;\n  });\n  const hasSelectionMode = computed100(() => {\n    return props4.selection !== \"none\";\n  });\n  const singleSelection = computed100(() => {\n    return props4.selection === \"single\";\n  });\n  const multipleSelection = computed100(() => {\n    return props4.selection === \"multiple\";\n  });\n  const allRowsSelected = computed100(\n    () => computedRows.value.length !== 0 && computedRows.value.every(\n      (row) => selectedKeys.value[getRowKey.value(row)] === true\n    )\n  );\n  const someRowsSelected = computed100(\n    () => allRowsSelected.value !== true && computedRows.value.some((row) => selectedKeys.value[getRowKey.value(row)] === true)\n  );\n  const rowsSelectedNumber = computed100(() => props4.selected.length);\n  function isRowSelected(key) {\n    return selectedKeys.value[key] === true;\n  }\n  function clearSelection2() {\n    emit(\"update:selected\", []);\n  }\n  function updateSelection(keys, rows, added, evt) {\n    emit(\"selection\", { rows, added, keys, evt });\n    const payload = singleSelection.value === true ? added === true ? rows : [] : added === true ? props4.selected.concat(rows) : props4.selected.filter(\n      (row) => keys.includes(getRowKey.value(row)) === false\n    );\n    emit(\"update:selected\", payload);\n  }\n  return {\n    hasSelectionMode,\n    singleSelection,\n    multipleSelection,\n    allRowsSelected,\n    someRowsSelected,\n    rowsSelectedNumber,\n    isRowSelected,\n    clearSelection: clearSelection2,\n    updateSelection\n  };\n}\n\n// src/components/table/table-row-expand.js\nimport { ref as ref61, watch as watch43 } from \"vue\";\nfunction getVal(val) {\n  return Array.isArray(val) ? val.slice() : [];\n}\nvar useTableRowExpandProps = {\n  expanded: Array\n  // v-model:expanded\n};\nvar useTableRowExpandEmits = [\"update:expanded\"];\nfunction useTableRowExpand(props4, emit) {\n  const innerExpanded = ref61(getVal(props4.expanded));\n  watch43(() => props4.expanded, (val) => {\n    innerExpanded.value = getVal(val);\n  });\n  function isRowExpanded(key) {\n    return innerExpanded.value.includes(key);\n  }\n  function setExpanded(val) {\n    if (props4.expanded !== void 0) {\n      emit(\"update:expanded\", val);\n    } else {\n      innerExpanded.value = val;\n    }\n  }\n  function updateExpanded(key, add) {\n    const target2 = innerExpanded.value.slice();\n    const index = target2.indexOf(key);\n    if (add === true) {\n      if (index === -1) {\n        target2.push(key);\n        setExpanded(target2);\n      }\n    } else if (index !== -1) {\n      target2.splice(index, 1);\n      setExpanded(target2);\n    }\n  }\n  return {\n    isRowExpanded,\n    setExpanded,\n    updateExpanded\n  };\n}\n\n// src/components/table/table-column-selection.js\nimport { computed as computed101 } from \"vue\";\nvar useTableColumnSelectionProps = {\n  visibleColumns: Array\n};\nfunction useTableColumnSelection(props4, computedPagination, hasSelectionMode) {\n  const colList = computed101(() => {\n    if (props4.columns !== void 0) {\n      return props4.columns;\n    }\n    const row = props4.rows[0];\n    return row !== void 0 ? Object.keys(row).map((name2) => ({\n      name: name2,\n      label: name2.toUpperCase(),\n      field: name2,\n      align: isNumber(row[name2]) ? \"right\" : \"left\",\n      sortable: true\n    })) : [];\n  });\n  const computedCols = computed101(() => {\n    const { sortBy, descending } = computedPagination.value;\n    const cols = props4.visibleColumns !== void 0 ? colList.value.filter((col) => col.required === true || props4.visibleColumns.includes(col.name) === true) : colList.value;\n    return cols.map((col) => {\n      const align = col.align || \"right\";\n      const alignClass = `text-${align}`;\n      return {\n        ...col,\n        align,\n        __iconClass: `q-table__sort-icon q-table__sort-icon--${align}`,\n        __thClass: alignClass + (col.headerClasses !== void 0 ? \" \" + col.headerClasses : \"\") + (col.sortable === true ? \" sortable\" : \"\") + (col.name === sortBy ? ` sorted ${descending === true ? \"sort-desc\" : \"\"}` : \"\"),\n        __tdStyle: col.style !== void 0 ? typeof col.style !== \"function\" ? () => col.style : col.style : () => null,\n        __tdClass: col.classes !== void 0 ? typeof col.classes !== \"function\" ? () => alignClass + \" \" + col.classes : (row) => alignClass + \" \" + col.classes(row) : () => alignClass\n      };\n    });\n  });\n  const computedColsMap = computed101(() => {\n    const names = {};\n    computedCols.value.forEach((col) => {\n      names[col.name] = col;\n    });\n    return names;\n  });\n  const computedColspan = computed101(() => {\n    return props4.tableColspan !== void 0 ? props4.tableColspan : computedCols.value.length + (hasSelectionMode.value === true ? 1 : 0);\n  });\n  return {\n    colList,\n    computedCols,\n    computedColsMap,\n    computedColspan\n  };\n}\n\n// src/components/table/QTable.js\nvar bottomClass = \"q-table__bottom row items-center\";\nvar virtScrollPassthroughProps = {};\ncommonVirtScrollPropsList.forEach((p) => {\n  virtScrollPassthroughProps[p] = {};\n});\nvar QTable_default = createComponent({\n  name: \"QTable\",\n  props: {\n    rows: {\n      type: Array,\n      required: true\n    },\n    rowKey: {\n      type: [String, Function],\n      default: \"id\"\n    },\n    columns: Array,\n    loading: Boolean,\n    iconFirstPage: String,\n    iconPrevPage: String,\n    iconNextPage: String,\n    iconLastPage: String,\n    title: String,\n    hideHeader: Boolean,\n    grid: Boolean,\n    gridHeader: Boolean,\n    dense: Boolean,\n    flat: Boolean,\n    bordered: Boolean,\n    square: Boolean,\n    separator: {\n      type: String,\n      default: \"horizontal\",\n      validator: (v) => [\"horizontal\", \"vertical\", \"cell\", \"none\"].includes(v)\n    },\n    wrapCells: Boolean,\n    virtualScroll: Boolean,\n    virtualScrollTarget: {},\n    ...virtScrollPassthroughProps,\n    noDataLabel: String,\n    noResultsLabel: String,\n    loadingLabel: String,\n    selectedRowsLabel: Function,\n    rowsPerPageLabel: String,\n    paginationLabel: Function,\n    color: {\n      type: String,\n      default: \"grey-8\"\n    },\n    titleClass: [String, Array, Object],\n    tableStyle: [String, Array, Object],\n    tableClass: [String, Array, Object],\n    tableHeaderStyle: [String, Array, Object],\n    tableHeaderClass: [String, Array, Object],\n    cardContainerClass: [String, Array, Object],\n    cardContainerStyle: [String, Array, Object],\n    cardStyle: [String, Array, Object],\n    cardClass: [String, Array, Object],\n    hideBottom: Boolean,\n    hideSelectedBanner: Boolean,\n    hideNoData: Boolean,\n    hidePagination: Boolean,\n    onRowClick: Function,\n    onRowDblclick: Function,\n    onRowContextmenu: Function,\n    ...useDarkProps,\n    ...useFullscreenProps,\n    ...useTableColumnSelectionProps,\n    ...useTableFilterProps,\n    ...useTablePaginationProps,\n    ...useTableRowExpandProps,\n    ...useTableRowSelectionProps,\n    ...useTableSortProps\n  },\n  emits: [\n    \"request\",\n    \"virtualScroll\",\n    ...useFullscreenEmits,\n    ...useTableRowExpandEmits,\n    ...useTableRowSelectionEmits\n  ],\n  setup(props4, { slots, emit }) {\n    const vm2 = getCurrentInstance78();\n    const { proxy: { $q } } = vm2;\n    const isDark = use_dark_default(props4, $q);\n    const { inFullscreen, toggleFullscreen } = use_fullscreen_default();\n    const getRowKey = computed102(() => typeof props4.rowKey === \"function\" ? props4.rowKey : (row) => row[props4.rowKey]);\n    const rootRef = ref62(null);\n    const virtScrollRef = ref62(null);\n    const hasVirtScroll = computed102(() => props4.grid !== true && props4.virtualScroll === true);\n    const cardDefaultClass = computed102(\n      () => \" q-table__card\" + (isDark.value === true ? \" q-table__card--dark q-dark\" : \"\") + (props4.square === true ? \" q-table--square\" : \"\") + (props4.flat === true ? \" q-table--flat\" : \"\") + (props4.bordered === true ? \" q-table--bordered\" : \"\")\n    );\n    const __containerClass = computed102(\n      () => `q-table__container q-table--${props4.separator}-separator column no-wrap` + (props4.grid === true ? \" q-table--grid\" : cardDefaultClass.value) + (isDark.value === true ? \" q-table--dark\" : \"\") + (props4.dense === true ? \" q-table--dense\" : \"\") + (props4.wrapCells === false ? \" q-table--no-wrap\" : \"\") + (inFullscreen.value === true ? \" fullscreen scroll\" : \"\")\n    );\n    const containerClass = computed102(\n      () => __containerClass.value + (props4.loading === true ? \" q-table--loading\" : \"\")\n    );\n    watch44(\n      () => props4.tableStyle + props4.tableClass + props4.tableHeaderStyle + props4.tableHeaderClass + __containerClass.value,\n      () => {\n        hasVirtScroll.value === true && virtScrollRef.value !== null && virtScrollRef.value.reset();\n      }\n    );\n    const {\n      innerPagination,\n      computedPagination,\n      isServerSide,\n      requestServerInteraction,\n      setPagination\n    } = useTablePaginationState(vm2, getCellValue);\n    const { computedFilterMethod } = useTableFilter(props4, setPagination);\n    const { isRowExpanded, setExpanded, updateExpanded } = useTableRowExpand(props4, emit);\n    const filteredSortedRows = computed102(() => {\n      let rows = props4.rows;\n      if (isServerSide.value === true || rows.length === 0) {\n        return rows;\n      }\n      const { sortBy, descending } = computedPagination.value;\n      if (props4.filter) {\n        rows = computedFilterMethod.value(rows, props4.filter, computedCols.value, getCellValue);\n      }\n      if (columnToSort.value !== null) {\n        rows = computedSortMethod.value(\n          props4.rows === rows ? rows.slice() : rows,\n          sortBy,\n          descending\n        );\n      }\n      return rows;\n    });\n    const filteredSortedRowsNumber = computed102(() => filteredSortedRows.value.length);\n    const computedRows = computed102(() => {\n      let rows = filteredSortedRows.value;\n      if (isServerSide.value === true) {\n        return rows;\n      }\n      const { rowsPerPage } = computedPagination.value;\n      if (rowsPerPage !== 0) {\n        if (firstRowIndex.value === 0 && props4.rows !== rows) {\n          if (rows.length > lastRowIndex.value) {\n            rows = rows.slice(0, lastRowIndex.value);\n          }\n        } else {\n          rows = rows.slice(firstRowIndex.value, lastRowIndex.value);\n        }\n      }\n      return rows;\n    });\n    const {\n      hasSelectionMode,\n      singleSelection,\n      multipleSelection,\n      allRowsSelected,\n      someRowsSelected,\n      rowsSelectedNumber,\n      isRowSelected,\n      clearSelection: clearSelection2,\n      updateSelection\n    } = useTableRowSelection(props4, emit, computedRows, getRowKey);\n    const { colList, computedCols, computedColsMap, computedColspan } = useTableColumnSelection(props4, computedPagination, hasSelectionMode);\n    const { columnToSort, computedSortMethod, sort } = useTableSort(props4, computedPagination, colList, setPagination);\n    const {\n      firstRowIndex,\n      lastRowIndex,\n      isFirstPage,\n      isLastPage,\n      pagesNumber,\n      computedRowsPerPageOptions,\n      computedRowsNumber,\n      firstPage,\n      prevPage,\n      nextPage,\n      lastPage\n    } = useTablePagination(vm2, innerPagination, computedPagination, isServerSide, setPagination, filteredSortedRowsNumber);\n    const nothingToDisplay = computed102(() => computedRows.value.length === 0);\n    const virtProps = computed102(() => {\n      const acc = {};\n      commonVirtScrollPropsList.forEach((p) => {\n        acc[p] = props4[p];\n      });\n      if (acc.virtualScrollItemSize === void 0) {\n        acc.virtualScrollItemSize = props4.dense === true ? 28 : 48;\n      }\n      return acc;\n    });\n    function resetVirtualScroll() {\n      hasVirtScroll.value === true && virtScrollRef.value.reset();\n    }\n    function getBody() {\n      if (props4.grid === true) {\n        return getGridBody();\n      }\n      const header = props4.hideHeader !== true ? getTHead : null;\n      if (hasVirtScroll.value === true) {\n        const topRow = slots[\"top-row\"];\n        const bottomRow = slots[\"bottom-row\"];\n        const virtSlots = {\n          default: (props5) => getTBodyTR(props5.item, slots.body, props5.index)\n        };\n        if (topRow !== void 0) {\n          const topContent = h121(\"tbody\", topRow({ cols: computedCols.value }));\n          virtSlots.before = header === null ? () => topContent : () => [header()].concat(topContent);\n        } else if (header !== null) {\n          virtSlots.before = header;\n        }\n        if (bottomRow !== void 0) {\n          virtSlots.after = () => h121(\"tbody\", bottomRow({ cols: computedCols.value }));\n        }\n        return h121(QVirtualScroll_default, {\n          ref: virtScrollRef,\n          class: props4.tableClass,\n          style: props4.tableStyle,\n          ...virtProps.value,\n          scrollTarget: props4.virtualScrollTarget,\n          items: computedRows.value,\n          type: \"__qtable\",\n          tableColspan: computedColspan.value,\n          onVirtualScroll: onVScroll\n        }, virtSlots);\n      }\n      const child = [\n        getTBody()\n      ];\n      if (header !== null) {\n        child.unshift(header());\n      }\n      return get_table_middle_default({\n        class: [\"q-table__middle scroll\", props4.tableClass],\n        style: props4.tableStyle\n      }, child);\n    }\n    function scrollTo(toIndex, edge) {\n      if (virtScrollRef.value !== null) {\n        virtScrollRef.value.scrollTo(toIndex, edge);\n        return;\n      }\n      toIndex = parseInt(toIndex, 10);\n      const rowEl = rootRef.value.querySelector(`tbody tr:nth-of-type(${toIndex + 1})`);\n      if (rowEl !== null) {\n        const scrollTarget = rootRef.value.querySelector(\".q-table__middle.scroll\");\n        const offsetTop = rowEl.offsetTop - props4.virtualScrollStickySizeStart;\n        const direction = offsetTop < scrollTarget.scrollTop ? \"decrease\" : \"increase\";\n        scrollTarget.scrollTop = offsetTop;\n        emit(\"virtualScroll\", {\n          index: toIndex,\n          from: 0,\n          to: innerPagination.value.rowsPerPage - 1,\n          direction\n        });\n      }\n    }\n    function onVScroll(info) {\n      emit(\"virtualScroll\", info);\n    }\n    function getProgress() {\n      return [\n        h121(QLinearProgress_default, {\n          class: \"q-table__linear-progress\",\n          color: props4.color,\n          dark: isDark.value,\n          indeterminate: true,\n          trackColor: \"transparent\"\n        })\n      ];\n    }\n    function getTBodyTR(row, bodySlot, pageIndex) {\n      const key = getRowKey.value(row), selected = isRowSelected(key);\n      if (bodySlot !== void 0) {\n        return bodySlot(\n          getBodyScope({\n            key,\n            row,\n            pageIndex,\n            __trClass: selected ? \"selected\" : \"\"\n          })\n        );\n      }\n      const bodyCell = slots[\"body-cell\"], child = computedCols.value.map((col) => {\n        const bodyCellCol = slots[`body-cell-${col.name}`], slot = bodyCellCol !== void 0 ? bodyCellCol : bodyCell;\n        return slot !== void 0 ? slot(getBodyCellScope({ key, row, pageIndex, col })) : h121(\"td\", {\n          class: col.__tdClass(row),\n          style: col.__tdStyle(row)\n        }, getCellValue(col, row));\n      });\n      if (hasSelectionMode.value === true) {\n        const slot = slots[\"body-selection\"];\n        const content = slot !== void 0 ? slot(getBodySelectionScope({ key, row, pageIndex })) : [\n          h121(QCheckbox_default, {\n            modelValue: selected,\n            color: props4.color,\n            dark: isDark.value,\n            dense: props4.dense,\n            \"onUpdate:modelValue\": (adding, evt) => {\n              updateSelection([key], [row], adding, evt);\n            }\n          })\n        ];\n        child.unshift(\n          h121(\"td\", { class: \"q-table--col-auto-width\" }, content)\n        );\n      }\n      const data = { key, class: { selected } };\n      if (props4.onRowClick !== void 0) {\n        data.class[\"cursor-pointer\"] = true;\n        data.onClick = (evt) => {\n          emit(\"rowClick\", evt, row, pageIndex);\n        };\n      }\n      if (props4.onRowDblclick !== void 0) {\n        data.class[\"cursor-pointer\"] = true;\n        data.onDblclick = (evt) => {\n          emit(\"rowDblclick\", evt, row, pageIndex);\n        };\n      }\n      if (props4.onRowContextmenu !== void 0) {\n        data.class[\"cursor-pointer\"] = true;\n        data.onContextmenu = (evt) => {\n          emit(\"rowContextmenu\", evt, row, pageIndex);\n        };\n      }\n      return h121(\"tr\", data, child);\n    }\n    function getTBody() {\n      const body = slots.body, topRow = slots[\"top-row\"], bottomRow = slots[\"bottom-row\"];\n      let child = computedRows.value.map(\n        (row, pageIndex) => getTBodyTR(row, body, pageIndex)\n      );\n      if (topRow !== void 0) {\n        child = topRow({ cols: computedCols.value }).concat(child);\n      }\n      if (bottomRow !== void 0) {\n        child = child.concat(bottomRow({ cols: computedCols.value }));\n      }\n      return h121(\"tbody\", child);\n    }\n    function getBodyScope(data) {\n      injectBodyCommonScope(data);\n      data.cols = data.cols.map(\n        (col) => injectProp({ ...col }, \"value\", () => getCellValue(col, data.row))\n      );\n      return data;\n    }\n    function getBodyCellScope(data) {\n      injectBodyCommonScope(data);\n      injectProp(data, \"value\", () => getCellValue(data.col, data.row));\n      return data;\n    }\n    function getBodySelectionScope(data) {\n      injectBodyCommonScope(data);\n      return data;\n    }\n    function injectBodyCommonScope(data) {\n      Object.assign(data, {\n        cols: computedCols.value,\n        colsMap: computedColsMap.value,\n        sort,\n        rowIndex: firstRowIndex.value + data.pageIndex,\n        color: props4.color,\n        dark: isDark.value,\n        dense: props4.dense\n      });\n      hasSelectionMode.value === true && injectProp(\n        data,\n        \"selected\",\n        () => isRowSelected(data.key),\n        (adding, evt) => {\n          updateSelection([data.key], [data.row], adding, evt);\n        }\n      );\n      injectProp(\n        data,\n        \"expand\",\n        () => isRowExpanded(data.key),\n        (adding) => {\n          updateExpanded(data.key, adding);\n        }\n      );\n    }\n    function getCellValue(col, row) {\n      const val = typeof col.field === \"function\" ? col.field(row) : row[col.field];\n      return col.format !== void 0 ? col.format(val, row) : val;\n    }\n    const marginalsScope = computed102(() => ({\n      pagination: computedPagination.value,\n      pagesNumber: pagesNumber.value,\n      isFirstPage: isFirstPage.value,\n      isLastPage: isLastPage.value,\n      firstPage,\n      prevPage,\n      nextPage,\n      lastPage,\n      inFullscreen: inFullscreen.value,\n      toggleFullscreen\n    }));\n    function getTopDiv() {\n      const top = slots.top, topLeft = slots[\"top-left\"], topRight = slots[\"top-right\"], topSelection = slots[\"top-selection\"], hasSelection = hasSelectionMode.value === true && topSelection !== void 0 && rowsSelectedNumber.value > 0, topClass = \"q-table__top relative-position row items-center\";\n      if (top !== void 0) {\n        return h121(\"div\", { class: topClass }, [top(marginalsScope.value)]);\n      }\n      let child;\n      if (hasSelection === true) {\n        child = topSelection(marginalsScope.value).slice();\n      } else {\n        child = [];\n        if (topLeft !== void 0) {\n          child.push(\n            h121(\"div\", { class: \"q-table__control\" }, [\n              topLeft(marginalsScope.value)\n            ])\n          );\n        } else if (props4.title) {\n          child.push(\n            h121(\"div\", { class: \"q-table__control\" }, [\n              h121(\"div\", {\n                class: [\"q-table__title\", props4.titleClass]\n              }, props4.title)\n            ])\n          );\n        }\n      }\n      if (topRight !== void 0) {\n        child.push(\n          h121(\"div\", { class: \"q-table__separator col\" })\n        );\n        child.push(\n          h121(\"div\", { class: \"q-table__control\" }, [\n            topRight(marginalsScope.value)\n          ])\n        );\n      }\n      if (child.length === 0) return;\n      return h121(\"div\", { class: topClass }, child);\n    }\n    const headerSelectedValue = computed102(() => someRowsSelected.value === true ? null : allRowsSelected.value);\n    function getTHead() {\n      const child = getTHeadTR();\n      if (props4.loading === true && slots.loading === void 0) {\n        child.push(\n          h121(\"tr\", { class: \"q-table__progress\" }, [\n            h121(\"th\", {\n              class: \"relative-position\",\n              colspan: computedColspan.value\n            }, getProgress())\n          ])\n        );\n      }\n      return h121(\"thead\", child);\n    }\n    function getTHeadTR() {\n      const header = slots.header, headerCell = slots[\"header-cell\"];\n      if (header !== void 0) {\n        return header(\n          getHeaderScope({ header: true })\n        ).slice();\n      }\n      const child = computedCols.value.map((col) => {\n        const headerCellCol = slots[`header-cell-${col.name}`], slot = headerCellCol !== void 0 ? headerCellCol : headerCell, props5 = getHeaderScope({ col });\n        return slot !== void 0 ? slot(props5) : h121(QTh_default, {\n          key: col.name,\n          props: props5\n        }, () => col.label);\n      });\n      if (singleSelection.value === true && props4.grid !== true) {\n        child.unshift(\n          h121(\"th\", { class: \"q-table--col-auto-width\" }, \" \")\n        );\n      } else if (multipleSelection.value === true) {\n        const slot = slots[\"header-selection\"];\n        const content = slot !== void 0 ? slot(getHeaderScope({})) : [\n          h121(QCheckbox_default, {\n            color: props4.color,\n            modelValue: headerSelectedValue.value,\n            dark: isDark.value,\n            dense: props4.dense,\n            \"onUpdate:modelValue\": onMultipleSelectionSet\n          })\n        ];\n        child.unshift(\n          h121(\"th\", { class: \"q-table--col-auto-width\" }, content)\n        );\n      }\n      return [\n        h121(\"tr\", {\n          class: props4.tableHeaderClass,\n          style: props4.tableHeaderStyle\n        }, child)\n      ];\n    }\n    function getHeaderScope(data) {\n      Object.assign(data, {\n        cols: computedCols.value,\n        sort,\n        colsMap: computedColsMap.value,\n        color: props4.color,\n        dark: isDark.value,\n        dense: props4.dense\n      });\n      if (multipleSelection.value === true) {\n        injectProp(\n          data,\n          \"selected\",\n          () => headerSelectedValue.value,\n          onMultipleSelectionSet\n        );\n      }\n      return data;\n    }\n    function onMultipleSelectionSet(val) {\n      if (someRowsSelected.value === true) {\n        val = false;\n      }\n      updateSelection(\n        computedRows.value.map(getRowKey.value),\n        computedRows.value,\n        val\n      );\n    }\n    const navIcon = computed102(() => {\n      const ico = [\n        props4.iconFirstPage || $q.iconSet.table.firstPage,\n        props4.iconPrevPage || $q.iconSet.table.prevPage,\n        props4.iconNextPage || $q.iconSet.table.nextPage,\n        props4.iconLastPage || $q.iconSet.table.lastPage\n      ];\n      return $q.lang.rtl === true ? ico.reverse() : ico;\n    });\n    function getBottomDiv() {\n      if (props4.hideBottom === true) return;\n      if (nothingToDisplay.value === true) {\n        if (props4.hideNoData === true) return;\n        const message = props4.loading === true ? props4.loadingLabel || $q.lang.table.loading : props4.filter ? props4.noResultsLabel || $q.lang.table.noResults : props4.noDataLabel || $q.lang.table.noData;\n        const noData = slots[\"no-data\"];\n        const children = noData !== void 0 ? [noData({ message, icon: $q.iconSet.table.warning, filter: props4.filter })] : [\n          h121(QIcon_default, {\n            class: \"q-table__bottom-nodata-icon\",\n            name: $q.iconSet.table.warning\n          }),\n          message\n        ];\n        return h121(\"div\", { class: bottomClass + \" q-table__bottom--nodata\" }, children);\n      }\n      const bottom = slots.bottom;\n      if (bottom !== void 0) {\n        return h121(\"div\", { class: bottomClass }, [bottom(marginalsScope.value)]);\n      }\n      const child = props4.hideSelectedBanner !== true && hasSelectionMode.value === true && rowsSelectedNumber.value > 0 ? [\n        h121(\"div\", { class: \"q-table__control\" }, [\n          h121(\"div\", [\n            (props4.selectedRowsLabel || $q.lang.table.selectedRecords)(rowsSelectedNumber.value)\n          ])\n        ])\n      ] : [];\n      if (props4.hidePagination !== true) {\n        return h121(\"div\", {\n          class: bottomClass + \" justify-end\"\n        }, getPaginationDiv(child));\n      }\n      if (child.length !== 0) {\n        return h121(\"div\", { class: bottomClass }, child);\n      }\n    }\n    function onPagSelection(pag) {\n      setPagination({\n        page: 1,\n        rowsPerPage: pag.value\n      });\n    }\n    function getPaginationDiv(child) {\n      let control;\n      const { rowsPerPage } = computedPagination.value, paginationLabel = props4.paginationLabel || $q.lang.table.pagination, paginationSlot = slots.pagination, hasOpts = props4.rowsPerPageOptions.length > 1;\n      child.push(\n        h121(\"div\", { class: \"q-table__separator col\" })\n      );\n      if (hasOpts === true) {\n        child.push(\n          h121(\"div\", { class: \"q-table__control\" }, [\n            h121(\"span\", { class: \"q-table__bottom-item\" }, [\n              props4.rowsPerPageLabel || $q.lang.table.recordsPerPage\n            ]),\n            h121(QSelect_default, {\n              class: \"q-table__select inline q-table__bottom-item\",\n              color: props4.color,\n              modelValue: rowsPerPage,\n              options: computedRowsPerPageOptions.value,\n              displayValue: rowsPerPage === 0 ? $q.lang.table.allRows : rowsPerPage,\n              dark: isDark.value,\n              borderless: true,\n              dense: true,\n              optionsDense: true,\n              optionsCover: true,\n              \"onUpdate:modelValue\": onPagSelection\n            })\n          ])\n        );\n      }\n      if (paginationSlot !== void 0) {\n        control = paginationSlot(marginalsScope.value);\n      } else {\n        control = [\n          h121(\"span\", rowsPerPage !== 0 ? { class: \"q-table__bottom-item\" } : {}, [\n            rowsPerPage ? paginationLabel(firstRowIndex.value + 1, Math.min(lastRowIndex.value, computedRowsNumber.value), computedRowsNumber.value) : paginationLabel(1, filteredSortedRowsNumber.value, computedRowsNumber.value)\n          ])\n        ];\n        if (rowsPerPage !== 0 && pagesNumber.value > 1) {\n          const btnProps = {\n            color: props4.color,\n            round: true,\n            dense: true,\n            flat: true\n          };\n          if (props4.dense === true) {\n            btnProps.size = \"sm\";\n          }\n          pagesNumber.value > 2 && control.push(\n            h121(QBtn_default, {\n              key: \"pgFirst\",\n              ...btnProps,\n              icon: navIcon.value[0],\n              disable: isFirstPage.value,\n              onClick: firstPage\n            })\n          );\n          control.push(\n            h121(QBtn_default, {\n              key: \"pgPrev\",\n              ...btnProps,\n              icon: navIcon.value[1],\n              disable: isFirstPage.value,\n              onClick: prevPage\n            }),\n            h121(QBtn_default, {\n              key: \"pgNext\",\n              ...btnProps,\n              icon: navIcon.value[2],\n              disable: isLastPage.value,\n              onClick: nextPage\n            })\n          );\n          pagesNumber.value > 2 && control.push(\n            h121(QBtn_default, {\n              key: \"pgLast\",\n              ...btnProps,\n              icon: navIcon.value[3],\n              disable: isLastPage.value,\n              onClick: lastPage\n            })\n          );\n        }\n      }\n      child.push(\n        h121(\"div\", { class: \"q-table__control\" }, control)\n      );\n      return child;\n    }\n    function getGridHeader() {\n      const child = props4.gridHeader === true ? [\n        h121(\"table\", { class: \"q-table\" }, [\n          getTHead(h121)\n        ])\n      ] : props4.loading === true && slots.loading === void 0 ? getProgress(h121) : void 0;\n      return h121(\"div\", { class: \"q-table__middle\" }, child);\n    }\n    function getGridBody() {\n      const item = slots.item !== void 0 ? slots.item : (scope) => {\n        const child = scope.cols.map(\n          (col) => h121(\"div\", { class: \"q-table__grid-item-row\" }, [\n            h121(\"div\", { class: \"q-table__grid-item-title\" }, [col.label]),\n            h121(\"div\", { class: \"q-table__grid-item-value\" }, [col.value])\n          ])\n        );\n        if (hasSelectionMode.value === true) {\n          const slot = slots[\"body-selection\"];\n          const content = slot !== void 0 ? slot(scope) : [\n            h121(QCheckbox_default, {\n              modelValue: scope.selected,\n              color: props4.color,\n              dark: isDark.value,\n              dense: props4.dense,\n              \"onUpdate:modelValue\": (adding, evt) => {\n                updateSelection([scope.key], [scope.row], adding, evt);\n              }\n            })\n          ];\n          child.unshift(\n            h121(\"div\", { class: \"q-table__grid-item-row\" }, content),\n            h121(QSeparator_default, { dark: isDark.value })\n          );\n        }\n        const data = {\n          class: [\n            \"q-table__grid-item-card\" + cardDefaultClass.value,\n            props4.cardClass\n          ],\n          style: props4.cardStyle\n        };\n        if (props4.onRowClick !== void 0 || props4.onRowDblclick !== void 0) {\n          data.class[0] += \" cursor-pointer\";\n          if (props4.onRowClick !== void 0) {\n            data.onClick = (evt) => {\n              emit(\"RowClick\", evt, scope.row, scope.pageIndex);\n            };\n          }\n          if (props4.onRowDblclick !== void 0) {\n            data.onDblclick = (evt) => {\n              emit(\"RowDblclick\", evt, scope.row, scope.pageIndex);\n            };\n          }\n        }\n        return h121(\"div\", {\n          class: \"q-table__grid-item col-xs-12 col-sm-6 col-md-4 col-lg-3\" + (scope.selected === true ? \" q-table__grid-item--selected\" : \"\")\n        }, [\n          h121(\"div\", data, child)\n        ]);\n      };\n      return h121(\"div\", {\n        class: [\n          \"q-table__grid-content row\",\n          props4.cardContainerClass\n        ],\n        style: props4.cardContainerStyle\n      }, computedRows.value.map((row, pageIndex) => {\n        return item(getBodyScope({\n          key: getRowKey.value(row),\n          row,\n          pageIndex\n        }));\n      }));\n    }\n    Object.assign(vm2.proxy, {\n      requestServerInteraction,\n      setPagination,\n      firstPage,\n      prevPage,\n      nextPage,\n      lastPage,\n      isRowSelected,\n      clearSelection: clearSelection2,\n      isRowExpanded,\n      setExpanded,\n      sort,\n      resetVirtualScroll,\n      scrollTo,\n      getCellValue\n    });\n    injectMultipleProps(vm2.proxy, {\n      filteredSortedRows: () => filteredSortedRows.value,\n      computedRows: () => computedRows.value,\n      computedRowsNumber: () => computedRowsNumber.value\n    });\n    return () => {\n      const child = [getTopDiv()];\n      const data = { ref: rootRef, class: containerClass.value };\n      if (props4.grid === true) {\n        child.push(getGridHeader());\n      } else {\n        Object.assign(data, {\n          class: [data.class, props4.cardClass],\n          style: props4.cardStyle\n        });\n      }\n      child.push(\n        getBody(),\n        getBottomDiv()\n      );\n      if (props4.loading === true && slots.loading !== void 0) {\n        child.push(\n          slots.loading()\n        );\n      }\n      return h121(\"div\", data, child);\n    };\n  }\n});\n\n// src/components/table/QTr.js\nimport { h as h122, computed as computed103 } from \"vue\";\nvar QTr_default = createComponent({\n  name: \"QTr\",\n  props: {\n    props: Object,\n    noHover: Boolean\n  },\n  setup(props4, { slots }) {\n    const classes = computed103(\n      () => \"q-tr\" + (props4.props === void 0 || props4.props.header === true ? \"\" : \" \" + props4.props.__trClass) + (props4.noHover === true ? \" q-tr--no-hover\" : \"\")\n    );\n    return () => h122(\"tr\", { class: classes.value }, hSlot(slots.default));\n  }\n});\n\n// src/components/table/QTd.js\nimport { h as h123, computed as computed104, getCurrentInstance as getCurrentInstance79 } from \"vue\";\nvar QTd_default = createComponent({\n  name: \"QTd\",\n  props: {\n    props: Object,\n    autoWidth: Boolean,\n    noHover: Boolean\n  },\n  setup(props4, { slots }) {\n    const vm2 = getCurrentInstance79();\n    const classes = computed104(\n      () => \"q-td\" + (props4.autoWidth === true ? \" q-table--col-auto-width\" : \"\") + (props4.noHover === true ? \" q-td--no-hover\" : \"\") + \" \"\n    );\n    return () => {\n      if (props4.props === void 0) {\n        return h123(\"td\", { class: classes.value }, hSlot(slots.default));\n      }\n      const name2 = vm2.vnode.key;\n      const col = (props4.props.colsMap !== void 0 ? props4.props.colsMap[name2] : null) || props4.props.col;\n      if (col === void 0) return;\n      const { row } = props4.props;\n      return h123(\"td\", {\n        class: classes.value + col.__tdClass(row),\n        style: col.__tdStyle(row)\n      }, hSlot(slots.default));\n    };\n  }\n});\n\n// src/components/tabs/QRouteTab.js\nimport { computed as computed105, watch as watch45 } from \"vue\";\nvar QRouteTab_default = createComponent({\n  name: \"QRouteTab\",\n  props: {\n    ...useRouterLinkProps,\n    ...useTabProps\n  },\n  emits: useTabEmits,\n  setup(props4, { slots, emit }) {\n    const routeData = use_router_link_default({\n      useDisableForRouterLinkProps: false\n    });\n    const { renderTab, $tabs } = use_tab_default(\n      props4,\n      slots,\n      emit,\n      {\n        exact: computed105(() => props4.exact),\n        ...routeData\n      }\n    );\n    watch45(\n      () => `${props4.name} | ${props4.exact} | ${(routeData.resolvedLink.value || {}).href}`,\n      $tabs.verifyRouteModel\n    );\n    return () => renderTab(routeData.linkTag.value, routeData.linkAttrs.value);\n  }\n});\n\n// src/components/time/QTime.js\nimport { h as h124, ref as ref63, computed as computed106, watch as watch46, withDirectives as withDirectives9, Transition as Transition13, nextTick as nextTick20, getCurrentInstance as getCurrentInstance80 } from \"vue\";\nfunction getViewByModel(model, withSeconds) {\n  if (model.hour !== null) {\n    if (model.minute === null) {\n      return \"minute\";\n    } else if (withSeconds === true && model.second === null) {\n      return \"second\";\n    }\n  }\n  return \"hour\";\n}\nfunction getCurrentTime() {\n  const d = /* @__PURE__ */ new Date();\n  return {\n    hour: d.getHours(),\n    minute: d.getMinutes(),\n    second: d.getSeconds(),\n    millisecond: d.getMilliseconds()\n  };\n}\nvar QTime_default = createComponent({\n  name: \"QTime\",\n  props: {\n    ...useDarkProps,\n    ...useFormProps,\n    ...useDatetimeProps,\n    modelValue: {\n      required: true,\n      validator: (val) => typeof val === \"string\" || val === null\n    },\n    mask: {\n      ...useDatetimeProps.mask,\n      default: null\n    },\n    format24h: {\n      type: Boolean,\n      default: null\n    },\n    defaultDate: {\n      type: String,\n      validator: (v) => /^-?[\\d]+\\/[0-1]\\d\\/[0-3]\\d$/.test(v)\n    },\n    options: Function,\n    hourOptions: Array,\n    minuteOptions: Array,\n    secondOptions: Array,\n    withSeconds: Boolean,\n    nowBtn: Boolean\n  },\n  emits: useDatetimeEmits,\n  setup(props4, { slots, emit }) {\n    const vm2 = getCurrentInstance80();\n    const { $q } = vm2.proxy;\n    const isDark = use_dark_default(props4, $q);\n    const { tabindex, headerClass, getLocale: getLocale2, getCurrentDate } = use_datetime_default(props4, $q);\n    const formAttrs = useFormAttrs(props4);\n    const injectFormInput = useFormInject(formAttrs);\n    let draggingClockRect, dragCache;\n    const clockRef = ref63(null);\n    const mask = computed106(() => getMask());\n    const locale = computed106(() => getLocale2());\n    const defaultDateModel = computed106(() => getDefaultDateModel());\n    const model = __splitDate(\n      props4.modelValue,\n      mask.value,\n      // initial mask\n      locale.value,\n      // initial locale\n      props4.calendar,\n      defaultDateModel.value\n    );\n    const view = ref63(getViewByModel(model));\n    const innerModel = ref63(model);\n    const isAM = ref63(model.hour === null || model.hour < 12);\n    const classes = computed106(\n      () => `q-time q-time--${props4.landscape === true ? \"landscape\" : \"portrait\"}` + (isDark.value === true ? \" q-time--dark q-dark\" : \"\") + (props4.disable === true ? \" disabled\" : props4.readonly === true ? \" q-time--readonly\" : \"\") + (props4.bordered === true ? \" q-time--bordered\" : \"\") + (props4.square === true ? \" q-time--square no-border-radius\" : \"\") + (props4.flat === true ? \" q-time--flat no-shadow\" : \"\")\n    );\n    const stringModel = computed106(() => {\n      const time = innerModel.value;\n      return {\n        hour: time.hour === null ? \"--\" : computedFormat24h.value === true ? pad(time.hour) : String(\n          isAM.value === true ? time.hour === 0 ? 12 : time.hour : time.hour > 12 ? time.hour - 12 : time.hour\n        ),\n        minute: time.minute === null ? \"--\" : pad(time.minute),\n        second: time.second === null ? \"--\" : pad(time.second)\n      };\n    });\n    const computedFormat24h = computed106(() => props4.format24h !== null ? props4.format24h : $q.lang.date.format24h);\n    const pointerStyle = computed106(() => {\n      const forHour = view.value === \"hour\", divider = forHour === true ? 12 : 60, amount = innerModel.value[view.value], degrees = Math.round(amount * (360 / divider)) - 180;\n      let transform = `rotate(${degrees}deg) translateX(-50%)`;\n      if (forHour === true && computedFormat24h.value === true && innerModel.value.hour >= 12) {\n        transform += \" scale(.7)\";\n      }\n      return { transform };\n    });\n    const minLink = computed106(() => innerModel.value.hour !== null);\n    const secLink = computed106(() => minLink.value === true && innerModel.value.minute !== null);\n    const hourInSelection = computed106(() => props4.hourOptions !== void 0 ? (val) => props4.hourOptions.includes(val) : props4.options !== void 0 ? (val) => props4.options(val, null, null) : null);\n    const minuteInSelection = computed106(() => props4.minuteOptions !== void 0 ? (val) => props4.minuteOptions.includes(val) : props4.options !== void 0 ? (val) => props4.options(innerModel.value.hour, val, null) : null);\n    const secondInSelection = computed106(() => props4.secondOptions !== void 0 ? (val) => props4.secondOptions.includes(val) : props4.options !== void 0 ? (val) => props4.options(innerModel.value.hour, innerModel.value.minute, val) : null);\n    const validHours = computed106(() => {\n      if (hourInSelection.value === null) {\n        return null;\n      }\n      const am = getValidValues(0, 11, hourInSelection.value);\n      const pm = getValidValues(12, 11, hourInSelection.value);\n      return { am, pm, values: am.values.concat(pm.values) };\n    });\n    const validMinutes = computed106(() => minuteInSelection.value !== null ? getValidValues(0, 59, minuteInSelection.value) : null);\n    const validSeconds = computed106(() => secondInSelection.value !== null ? getValidValues(0, 59, secondInSelection.value) : null);\n    const viewValidOptions = computed106(() => {\n      switch (view.value) {\n        case \"hour\":\n          return validHours.value;\n        case \"minute\":\n          return validMinutes.value;\n        case \"second\":\n          return validSeconds.value;\n      }\n    });\n    const positions = computed106(() => {\n      let start, end, offset2 = 0, step = 1;\n      const values = viewValidOptions.value !== null ? viewValidOptions.value.values : void 0;\n      if (view.value === \"hour\") {\n        if (computedFormat24h.value === true) {\n          start = 0;\n          end = 23;\n        } else {\n          start = 0;\n          end = 11;\n          if (isAM.value === false) {\n            offset2 = 12;\n          }\n        }\n      } else {\n        start = 0;\n        end = 55;\n        step = 5;\n      }\n      const pos = [];\n      for (let val = start, index = start; val <= end; val += step, index++) {\n        const actualVal = val + offset2, disable = values !== void 0 && values.includes(actualVal) === false, label = view.value === \"hour\" && val === 0 ? computedFormat24h.value === true ? \"00\" : \"12\" : val;\n        pos.push({ val: actualVal, index, disable, label });\n      }\n      return pos;\n    });\n    const clockDirectives = computed106(() => {\n      return [[\n        TouchPan_default,\n        onPan,\n        void 0,\n        {\n          stop: true,\n          prevent: true,\n          mouse: true\n        }\n      ]];\n    });\n    watch46(() => props4.modelValue, (v) => {\n      const model2 = __splitDate(\n        v,\n        mask.value,\n        locale.value,\n        props4.calendar,\n        defaultDateModel.value\n      );\n      if (model2.dateHash !== innerModel.value.dateHash || model2.timeHash !== innerModel.value.timeHash) {\n        innerModel.value = model2;\n        if (model2.hour === null) {\n          view.value = \"hour\";\n        } else {\n          isAM.value = model2.hour < 12;\n        }\n      }\n    });\n    watch46([mask, locale], () => {\n      nextTick20(() => {\n        updateValue2();\n      });\n    });\n    function setNow() {\n      const date = {\n        ...getCurrentDate(),\n        ...getCurrentTime()\n      };\n      updateValue2(date);\n      Object.assign(innerModel.value, date);\n      view.value = \"hour\";\n    }\n    function getValidValues(start, count, testFn) {\n      const values = Array.apply(null, { length: count + 1 }).map((_, index) => {\n        const i = index + start;\n        return {\n          index: i,\n          val: testFn(i) === true\n          // force boolean\n        };\n      }).filter((v) => v.val === true).map((v) => v.index);\n      return {\n        min: values[0],\n        max: values[values.length - 1],\n        values,\n        threshold: count + 1\n      };\n    }\n    function getWheelDist(a, b, threshold) {\n      const diff2 = Math.abs(a - b);\n      return Math.min(diff2, threshold - diff2);\n    }\n    function getNormalizedClockValue(val, { min, max, values, threshold }) {\n      if (val === min) {\n        return min;\n      }\n      if (val < min || val > max) {\n        return getWheelDist(val, min, threshold) <= getWheelDist(val, max, threshold) ? min : max;\n      }\n      const index = values.findIndex((v) => val <= v), before = values[index - 1], after = values[index];\n      return val - before <= after - val ? before : after;\n    }\n    function getMask() {\n      return props4.calendar !== \"persian\" && props4.mask !== null ? props4.mask : `HH:mm${props4.withSeconds === true ? \":ss\" : \"\"}`;\n    }\n    function getDefaultDateModel() {\n      if (typeof props4.defaultDate !== \"string\") {\n        const date = getCurrentDate(true);\n        date.dateHash = getDayHash(date);\n        return date;\n      }\n      return __splitDate(props4.defaultDate, \"YYYY/MM/DD\", void 0, props4.calendar);\n    }\n    function shouldAbortInteraction() {\n      return vmIsDestroyed(vm2) === true || viewValidOptions.value !== null && (viewValidOptions.value.values.length === 0 || view.value === \"hour\" && computedFormat24h.value !== true && validHours.value[isAM.value === true ? \"am\" : \"pm\"].values.length === 0);\n    }\n    function getClockRect() {\n      const clock = clockRef.value, { top, left, width: width3 } = clock.getBoundingClientRect(), dist = width3 / 2;\n      return {\n        top: top + dist,\n        left: left + dist,\n        dist: dist * 0.7\n      };\n    }\n    function onPan(event) {\n      if (shouldAbortInteraction() === true) return;\n      if (event.isFirst === true) {\n        draggingClockRect = getClockRect();\n        dragCache = updateClock(event.evt, draggingClockRect);\n        return;\n      }\n      dragCache = updateClock(event.evt, draggingClockRect, dragCache);\n      if (event.isFinal === true) {\n        draggingClockRect = false;\n        dragCache = null;\n        goToNextView();\n      }\n    }\n    function goToNextView() {\n      if (view.value === \"hour\") {\n        view.value = \"minute\";\n      } else if (props4.withSeconds && view.value === \"minute\") {\n        view.value = \"second\";\n      }\n    }\n    function updateClock(evt, clockRect, cacheVal) {\n      const pos = position(evt), height2 = Math.abs(pos.top - clockRect.top), distance = Math.sqrt(\n        Math.pow(Math.abs(pos.top - clockRect.top), 2) + Math.pow(Math.abs(pos.left - clockRect.left), 2)\n      );\n      let val, angle = Math.asin(height2 / distance) * (180 / Math.PI);\n      if (pos.top < clockRect.top) {\n        angle = clockRect.left < pos.left ? 90 - angle : 270 + angle;\n      } else {\n        angle = clockRect.left < pos.left ? angle + 90 : 270 - angle;\n      }\n      if (view.value === \"hour\") {\n        val = angle / 30;\n        if (validHours.value !== null) {\n          const am = computedFormat24h.value !== true ? isAM.value === true : validHours.value.am.values.length !== 0 && validHours.value.pm.values.length !== 0 ? distance >= clockRect.dist : validHours.value.am.values.length !== 0;\n          val = getNormalizedClockValue(\n            val + (am === true ? 0 : 12),\n            validHours.value[am === true ? \"am\" : \"pm\"]\n          );\n        } else {\n          val = Math.round(val);\n          if (computedFormat24h.value === true) {\n            if (distance < clockRect.dist) {\n              if (val < 12) {\n                val += 12;\n              }\n            } else if (val === 12) {\n              val = 0;\n            }\n          } else if (isAM.value === true && val === 12) {\n            val = 0;\n          } else if (isAM.value === false && val !== 12) {\n            val += 12;\n          }\n        }\n        if (computedFormat24h.value === true) {\n          isAM.value = val < 12;\n        }\n      } else {\n        val = Math.round(angle / 6) % 60;\n        if (view.value === \"minute\" && validMinutes.value !== null) {\n          val = getNormalizedClockValue(val, validMinutes.value);\n        } else if (view.value === \"second\" && validSeconds.value !== null) {\n          val = getNormalizedClockValue(val, validSeconds.value);\n        }\n      }\n      if (cacheVal !== val) {\n        setModel[view.value](val);\n      }\n      return val;\n    }\n    const setView = {\n      hour() {\n        view.value = \"hour\";\n      },\n      minute() {\n        view.value = \"minute\";\n      },\n      second() {\n        view.value = \"second\";\n      }\n    };\n    function setAmOnKey(e) {\n      e.keyCode === 13 && setAm();\n    }\n    function setPmOnKey(e) {\n      e.keyCode === 13 && setPm();\n    }\n    function onClick(evt) {\n      if (shouldAbortInteraction() !== true) {\n        if ($q.platform.is.desktop !== true) {\n          updateClock(evt, getClockRect());\n        }\n        goToNextView();\n      }\n    }\n    function onMousedown(evt) {\n      if (shouldAbortInteraction() !== true) {\n        updateClock(evt, getClockRect());\n      }\n    }\n    function onKeyupHour(e) {\n      if (e.keyCode === 13) {\n        view.value = \"hour\";\n      } else if ([37, 39].includes(e.keyCode)) {\n        const payload = e.keyCode === 37 ? -1 : 1;\n        if (validHours.value !== null) {\n          const values = computedFormat24h.value === true ? validHours.value.values : validHours.value[isAM.value === true ? \"am\" : \"pm\"].values;\n          if (values.length === 0) return;\n          if (innerModel.value.hour === null) {\n            setHour(values[0]);\n          } else {\n            const index = (values.length + values.indexOf(innerModel.value.hour) + payload) % values.length;\n            setHour(values[index]);\n          }\n        } else {\n          const wrap = computedFormat24h.value === true ? 24 : 12, offset2 = computedFormat24h.value !== true && isAM.value === false ? 12 : 0, val = innerModel.value.hour === null ? -payload : innerModel.value.hour;\n          setHour(offset2 + (24 + val + payload) % wrap);\n        }\n      }\n    }\n    function onKeyupMinute(e) {\n      if (e.keyCode === 13) {\n        view.value = \"minute\";\n      } else if ([37, 39].includes(e.keyCode)) {\n        const payload = e.keyCode === 37 ? -1 : 1;\n        if (validMinutes.value !== null) {\n          const values = validMinutes.value.values;\n          if (values.length === 0) return;\n          if (innerModel.value.minute === null) {\n            setMinute(values[0]);\n          } else {\n            const index = (values.length + values.indexOf(innerModel.value.minute) + payload) % values.length;\n            setMinute(values[index]);\n          }\n        } else {\n          const val = innerModel.value.minute === null ? -payload : innerModel.value.minute;\n          setMinute((60 + val + payload) % 60);\n        }\n      }\n    }\n    function onKeyupSecond(e) {\n      if (e.keyCode === 13) {\n        view.value = \"second\";\n      } else if ([37, 39].includes(e.keyCode)) {\n        const payload = e.keyCode === 37 ? -1 : 1;\n        if (validSeconds.value !== null) {\n          const values = validSeconds.value.values;\n          if (values.length === 0) return;\n          if (innerModel.value.seconds === null) {\n            setSecond(values[0]);\n          } else {\n            const index = (values.length + values.indexOf(innerModel.value.second) + payload) % values.length;\n            setSecond(values[index]);\n          }\n        } else {\n          const val = innerModel.value.second === null ? -payload : innerModel.value.second;\n          setSecond((60 + val + payload) % 60);\n        }\n      }\n    }\n    function setHour(hour) {\n      if (innerModel.value.hour !== hour) {\n        innerModel.value.hour = hour;\n        verifyAndUpdate();\n      }\n    }\n    function setMinute(minute) {\n      if (innerModel.value.minute !== minute) {\n        innerModel.value.minute = minute;\n        verifyAndUpdate();\n      }\n    }\n    function setSecond(second) {\n      if (innerModel.value.second !== second) {\n        innerModel.value.second = second;\n        verifyAndUpdate();\n      }\n    }\n    const setModel = {\n      hour: setHour,\n      minute: setMinute,\n      second: setSecond\n    };\n    function setAm() {\n      if (isAM.value === false) {\n        isAM.value = true;\n        if (innerModel.value.hour !== null) {\n          innerModel.value.hour -= 12;\n          verifyAndUpdate();\n        }\n      }\n    }\n    function setPm() {\n      if (isAM.value === true) {\n        isAM.value = false;\n        if (innerModel.value.hour !== null) {\n          innerModel.value.hour += 12;\n          verifyAndUpdate();\n        }\n      }\n    }\n    function goToViewWhenHasModel(newView) {\n      const model2 = props4.modelValue;\n      if (view.value !== newView && model2 !== void 0 && model2 !== null && model2 !== \"\" && typeof model2 !== \"string\") {\n        view.value = newView;\n      }\n    }\n    function verifyAndUpdate() {\n      if (hourInSelection.value !== null && hourInSelection.value(innerModel.value.hour) !== true) {\n        innerModel.value = __splitDate();\n        goToViewWhenHasModel(\"hour\");\n        return;\n      }\n      if (minuteInSelection.value !== null && minuteInSelection.value(innerModel.value.minute) !== true) {\n        innerModel.value.minute = null;\n        innerModel.value.second = null;\n        goToViewWhenHasModel(\"minute\");\n        return;\n      }\n      if (props4.withSeconds === true && secondInSelection.value !== null && secondInSelection.value(innerModel.value.second) !== true) {\n        innerModel.value.second = null;\n        goToViewWhenHasModel(\"second\");\n        return;\n      }\n      if (innerModel.value.hour === null || innerModel.value.minute === null || props4.withSeconds === true && innerModel.value.second === null) return;\n      updateValue2();\n    }\n    function updateValue2(obj) {\n      const date = Object.assign({ ...innerModel.value }, obj);\n      const val = props4.calendar === \"persian\" ? pad(date.hour) + \":\" + pad(date.minute) + (props4.withSeconds === true ? \":\" + pad(date.second) : \"\") : formatDate(\n        new Date(\n          date.year,\n          date.month === null ? null : date.month - 1,\n          date.day,\n          date.hour,\n          date.minute,\n          date.second,\n          date.millisecond\n        ),\n        mask.value,\n        locale.value,\n        date.year,\n        date.timezoneOffset\n      );\n      date.changed = val !== props4.modelValue;\n      emit(\"update:modelValue\", val, date);\n    }\n    function getHeader() {\n      const label = [\n        h124(\"div\", {\n          class: \"q-time__link \" + (view.value === \"hour\" ? \"q-time__link--active\" : \"cursor-pointer\"),\n          tabindex: tabindex.value,\n          onClick: setView.hour,\n          onKeyup: onKeyupHour\n        }, stringModel.value.hour),\n        h124(\"div\", \":\"),\n        h124(\n          \"div\",\n          minLink.value === true ? {\n            class: \"q-time__link \" + (view.value === \"minute\" ? \"q-time__link--active\" : \"cursor-pointer\"),\n            tabindex: tabindex.value,\n            onKeyup: onKeyupMinute,\n            onClick: setView.minute\n          } : { class: \"q-time__link\" },\n          stringModel.value.minute\n        )\n      ];\n      if (props4.withSeconds === true) {\n        label.push(\n          h124(\"div\", \":\"),\n          h124(\n            \"div\",\n            secLink.value === true ? {\n              class: \"q-time__link \" + (view.value === \"second\" ? \"q-time__link--active\" : \"cursor-pointer\"),\n              tabindex: tabindex.value,\n              onKeyup: onKeyupSecond,\n              onClick: setView.second\n            } : { class: \"q-time__link\" },\n            stringModel.value.second\n          )\n        );\n      }\n      const child = [\n        h124(\"div\", {\n          class: \"q-time__header-label row items-center no-wrap\",\n          dir: \"ltr\"\n        }, label)\n      ];\n      computedFormat24h.value === false && child.push(\n        h124(\"div\", {\n          class: \"q-time__header-ampm column items-between no-wrap\"\n        }, [\n          h124(\"div\", {\n            class: \"q-time__link \" + (isAM.value === true ? \"q-time__link--active\" : \"cursor-pointer\"),\n            tabindex: tabindex.value,\n            onClick: setAm,\n            onKeyup: setAmOnKey\n          }, \"AM\"),\n          h124(\"div\", {\n            class: \"q-time__link \" + (isAM.value !== true ? \"q-time__link--active\" : \"cursor-pointer\"),\n            tabindex: tabindex.value,\n            onClick: setPm,\n            onKeyup: setPmOnKey\n          }, \"PM\")\n        ])\n      );\n      return h124(\"div\", {\n        class: \"q-time__header flex flex-center no-wrap \" + headerClass.value\n      }, child);\n    }\n    function getClock() {\n      const current = innerModel.value[view.value];\n      return h124(\"div\", {\n        class: \"q-time__content col relative-position\"\n      }, [\n        h124(Transition13, {\n          name: \"q-transition--scale\"\n        }, () => h124(\"div\", {\n          key: \"clock\" + view.value,\n          class: \"q-time__container-parent absolute-full\"\n        }, [\n          h124(\"div\", {\n            ref: clockRef,\n            class: \"q-time__container-child fit overflow-hidden\"\n          }, [\n            withDirectives9(\n              h124(\"div\", {\n                class: \"q-time__clock cursor-pointer non-selectable\",\n                onClick,\n                onMousedown\n              }, [\n                h124(\"div\", { class: \"q-time__clock-circle fit\" }, [\n                  h124(\"div\", {\n                    class: \"q-time__clock-pointer\" + (innerModel.value[view.value] === null ? \" hidden\" : props4.color !== void 0 ? ` text-${props4.color}` : \"\"),\n                    style: pointerStyle.value\n                  }),\n                  positions.value.map((pos) => h124(\"div\", {\n                    class: `q-time__clock-position row flex-center q-time__clock-pos-${pos.index}` + (pos.val === current ? \" q-time__clock-position--active \" + headerClass.value : pos.disable === true ? \" q-time__clock-position--disable\" : \"\")\n                  }, [h124(\"span\", pos.label)]))\n                ])\n              ]),\n              clockDirectives.value\n            )\n          ])\n        ])),\n        props4.nowBtn === true ? h124(QBtn_default, {\n          class: \"q-time__now-button absolute\",\n          icon: $q.iconSet.datetime.now,\n          unelevated: true,\n          size: \"sm\",\n          round: true,\n          color: props4.color,\n          textColor: props4.textColor,\n          tabindex: tabindex.value,\n          onClick: setNow\n        }) : null\n      ]);\n    }\n    vm2.proxy.setNow = setNow;\n    return () => {\n      const child = [getClock()];\n      const def = hSlot(slots.default);\n      def !== void 0 && child.push(\n        h124(\"div\", { class: \"q-time__actions\" }, def)\n      );\n      if (props4.name !== void 0 && props4.disable !== true) {\n        injectFormInput(child, \"push\");\n      }\n      return h124(\"div\", {\n        class: classes.value,\n        tabindex: -1\n      }, [\n        getHeader(),\n        h124(\"div\", { class: \"q-time__main col overflow-auto\" }, child)\n      ]);\n    };\n  }\n});\n\n// src/components/timeline/QTimeline.js\nimport { h as h125, computed as computed107, provide as provide7, getCurrentInstance as getCurrentInstance81 } from \"vue\";\nvar QTimeline_default = createComponent({\n  name: \"QTimeline\",\n  props: {\n    ...useDarkProps,\n    color: {\n      type: String,\n      default: \"primary\"\n    },\n    side: {\n      type: String,\n      default: \"right\",\n      validator: (v) => [\"left\", \"right\"].includes(v)\n    },\n    layout: {\n      type: String,\n      default: \"dense\",\n      validator: (v) => [\"dense\", \"comfortable\", \"loose\"].includes(v)\n    }\n  },\n  setup(props4, { slots }) {\n    const vm2 = getCurrentInstance81();\n    const isDark = use_dark_default(props4, vm2.proxy.$q);\n    provide7(timelineKey, props4);\n    const classes = computed107(\n      () => `q-timeline q-timeline--${props4.layout} q-timeline--${props4.layout}--${props4.side}` + (isDark.value === true ? \" q-timeline--dark\" : \"\")\n    );\n    return () => h125(\"ul\", { class: classes.value }, hSlot(slots.default));\n  }\n});\n\n// src/components/timeline/QTimelineEntry.js\nimport { h as h126, computed as computed108, inject as inject11 } from \"vue\";\nvar QTimelineEntry_default = createComponent({\n  name: \"QTimelineEntry\",\n  props: {\n    heading: Boolean,\n    tag: {\n      type: String,\n      default: \"h3\"\n    },\n    side: {\n      type: String,\n      default: \"right\",\n      validator: (v) => [\"left\", \"right\"].includes(v)\n    },\n    icon: String,\n    avatar: String,\n    color: String,\n    title: String,\n    subtitle: String,\n    body: String\n  },\n  setup(props4, { slots }) {\n    const $timeline = inject11(timelineKey, emptyRenderFn);\n    if ($timeline === emptyRenderFn) {\n      console.error(\"QTimelineEntry needs to be child of QTimeline\");\n      return emptyRenderFn;\n    }\n    const classes = computed108(\n      () => `q-timeline__entry q-timeline__entry--${props4.side}` + (props4.icon !== void 0 || props4.avatar !== void 0 ? \" q-timeline__entry--icon\" : \"\")\n    );\n    const dotClass = computed108(\n      () => `q-timeline__dot text-${props4.color || $timeline.color}`\n    );\n    const reverse = computed108(\n      () => $timeline.layout === \"comfortable\" && $timeline.side === \"left\"\n    );\n    return () => {\n      const child = hUniqueSlot(slots.default, []);\n      if (props4.body !== void 0) {\n        child.unshift(props4.body);\n      }\n      if (props4.heading === true) {\n        const content2 = [\n          h126(\"div\"),\n          h126(\"div\"),\n          h126(\n            props4.tag,\n            { class: \"q-timeline__heading-title\" },\n            child\n          )\n        ];\n        return h126(\"div\", {\n          class: \"q-timeline__heading\"\n        }, reverse.value === true ? content2.reverse() : content2);\n      }\n      let dot;\n      if (props4.icon !== void 0) {\n        dot = [\n          h126(QIcon_default, {\n            class: \"row items-center justify-center\",\n            name: props4.icon\n          })\n        ];\n      } else if (props4.avatar !== void 0) {\n        dot = [\n          h126(\"img\", {\n            class: \"q-timeline__dot-img\",\n            src: props4.avatar\n          })\n        ];\n      }\n      const content = [\n        h126(\"div\", { class: \"q-timeline__subtitle\" }, [\n          h126(\"span\", {}, hSlot(slots.subtitle, [props4.subtitle]))\n        ]),\n        h126(\"div\", { class: dotClass.value }, dot),\n        h126(\"div\", { class: \"q-timeline__content\" }, [\n          h126(\"h6\", { class: \"q-timeline__title\" }, hSlot(slots.title, [props4.title]))\n        ].concat(child))\n      ];\n      return h126(\"li\", {\n        class: classes.value\n      }, reverse.value === true ? content.reverse() : content);\n    };\n  }\n});\n\n// src/components/toolbar/QToolbar.js\nimport { h as h127, computed as computed109 } from \"vue\";\nvar QToolbar_default = createComponent({\n  name: \"QToolbar\",\n  props: {\n    inset: Boolean\n  },\n  setup(props4, { slots }) {\n    const classes = computed109(\n      () => \"q-toolbar row no-wrap items-center\" + (props4.inset === true ? \" q-toolbar--inset\" : \"\")\n    );\n    return () => h127(\"div\", { class: classes.value, role: \"toolbar\" }, hSlot(slots.default));\n  }\n});\n\n// src/components/toolbar/QToolbarTitle.js\nimport { h as h128, computed as computed110 } from \"vue\";\nvar QToolbarTitle_default = createComponent({\n  name: \"QToolbarTitle\",\n  props: {\n    shrink: Boolean\n  },\n  setup(props4, { slots }) {\n    const classes = computed110(\n      () => \"q-toolbar__title ellipsis\" + (props4.shrink === true ? \" col-shrink\" : \"\")\n    );\n    return () => h128(\"div\", { class: classes.value }, hSlot(slots.default));\n  }\n});\n\n// src/components/tree/QTree.js\nimport {\n  h as h129,\n  ref as ref64,\n  computed as computed111,\n  watch as watch47,\n  withDirectives as withDirectives10,\n  vShow as vShow2,\n  nextTick as nextTick21,\n  getCurrentInstance as getCurrentInstance82,\n  onBeforeUpdate as onBeforeUpdate5\n} from \"vue\";\nvar tickStrategyOptions = [\"none\", \"strict\", \"leaf\", \"leaf-filtered\"];\nvar QTree_default = createComponent({\n  name: \"QTree\",\n  props: {\n    ...useDarkProps,\n    nodes: {\n      type: Array,\n      required: true\n    },\n    nodeKey: {\n      type: String,\n      required: true\n    },\n    labelKey: {\n      type: String,\n      default: \"label\"\n    },\n    childrenKey: {\n      type: String,\n      default: \"children\"\n    },\n    dense: Boolean,\n    color: String,\n    controlColor: String,\n    textColor: String,\n    selectedColor: String,\n    icon: String,\n    tickStrategy: {\n      type: String,\n      default: \"none\",\n      validator: (v) => tickStrategyOptions.includes(v)\n    },\n    ticked: Array,\n    // v-model:ticked\n    expanded: Array,\n    // v-model:expanded\n    selected: {},\n    // v-model:selected\n    noSelectionUnset: Boolean,\n    defaultExpandAll: Boolean,\n    accordion: Boolean,\n    filter: String,\n    filterMethod: Function,\n    duration: {},\n    noConnectors: Boolean,\n    noTransition: Boolean,\n    noNodesLabel: String,\n    noResultsLabel: String\n  },\n  emits: [\n    \"update:expanded\",\n    \"update:ticked\",\n    \"update:selected\",\n    \"lazyLoad\",\n    \"afterShow\",\n    \"afterHide\"\n  ],\n  setup(props4, { slots, emit }) {\n    const { proxy } = getCurrentInstance82();\n    const { $q } = proxy;\n    const isDark = use_dark_default(props4, $q);\n    const lazy = ref64({});\n    const innerTicked = ref64(props4.ticked || []);\n    const innerExpanded = ref64(props4.expanded || []);\n    let blurTargets = {};\n    onBeforeUpdate5(() => {\n      blurTargets = {};\n    });\n    const classes = computed111(\n      () => `q-tree q-tree--${props4.dense === true ? \"dense\" : \"standard\"}` + (props4.noConnectors === true ? \" q-tree--no-connectors\" : \"\") + (isDark.value === true ? \" q-tree--dark\" : \"\") + (props4.color !== void 0 ? ` text-${props4.color}` : \"\")\n    );\n    const hasSelection = computed111(() => props4.selected !== void 0);\n    const computedIcon = computed111(() => props4.icon || $q.iconSet.tree.icon);\n    const computedControlColor = computed111(() => props4.controlColor || props4.color);\n    const textColorClass = computed111(() => props4.textColor !== void 0 ? ` text-${props4.textColor}` : \"\");\n    const selectedColorClass = computed111(() => {\n      const color = props4.selectedColor || props4.color;\n      return color ? ` text-${color}` : \"\";\n    });\n    const computedFilterMethod = computed111(() => props4.filterMethod !== void 0 ? props4.filterMethod : (node, filter) => {\n      const filt = filter.toLowerCase();\n      return node[props4.labelKey] && node[props4.labelKey].toLowerCase().indexOf(filt) !== -1;\n    });\n    const meta = computed111(() => {\n      const meta2 = {};\n      const travel = (node, parent) => {\n        const tickStrategy = node.tickStrategy || (parent ? parent.tickStrategy : props4.tickStrategy);\n        const key = node[props4.nodeKey], isParent = node[props4.childrenKey] && Array.isArray(node[props4.childrenKey]) && node[props4.childrenKey].length !== 0, selectable = node.disabled !== true && hasSelection.value === true && node.selectable !== false, expandable = node.disabled !== true && node.expandable !== false, hasTicking = tickStrategy !== \"none\", strictTicking = tickStrategy === \"strict\", leafFilteredTicking = tickStrategy === \"leaf-filtered\", leafTicking = tickStrategy === \"leaf\" || tickStrategy === \"leaf-filtered\";\n        let tickable = node.disabled !== true && node.tickable !== false;\n        if (leafTicking === true && tickable === true && parent && parent.tickable !== true) {\n          tickable = false;\n        }\n        let localLazy = node.lazy;\n        if (localLazy === true && lazy.value[key] !== void 0 && Array.isArray(node[props4.childrenKey]) === true) {\n          localLazy = lazy.value[key];\n        }\n        const m = {\n          key,\n          parent,\n          isParent,\n          lazy: localLazy,\n          disabled: node.disabled,\n          link: node.disabled !== true && (selectable === true || expandable === true && (isParent === true || localLazy === true)),\n          children: [],\n          matchesFilter: props4.filter ? computedFilterMethod.value(node, props4.filter) : true,\n          selected: key === props4.selected && selectable === true,\n          selectable,\n          expanded: isParent === true ? innerExpanded.value.includes(key) : false,\n          expandable,\n          noTick: node.noTick === true || strictTicking !== true && localLazy && localLazy !== \"loaded\",\n          tickable,\n          tickStrategy,\n          hasTicking,\n          strictTicking,\n          leafFilteredTicking,\n          leafTicking,\n          ticked: strictTicking === true ? innerTicked.value.includes(key) : isParent === true ? false : innerTicked.value.includes(key)\n        };\n        meta2[key] = m;\n        if (isParent === true) {\n          m.children = node[props4.childrenKey].map((n) => travel(n, m));\n          if (props4.filter) {\n            if (m.matchesFilter !== true) {\n              m.matchesFilter = m.children.some((n) => n.matchesFilter);\n            } else if (m.noTick !== true && m.disabled !== true && m.tickable === true && leafFilteredTicking === true && m.children.every((n) => n.matchesFilter !== true || n.noTick === true || n.tickable !== true) === true) {\n              m.tickable = false;\n            }\n          }\n          if (m.matchesFilter === true) {\n            if (m.noTick !== true && strictTicking !== true && m.children.every((n) => n.noTick) === true) {\n              m.noTick = true;\n            }\n            if (leafTicking) {\n              m.ticked = false;\n              m.indeterminate = m.children.some((node2) => node2.indeterminate === true);\n              m.tickable = m.tickable === true && m.children.some((node2) => node2.tickable);\n              if (m.indeterminate !== true) {\n                const sel = m.children.reduce((acc, meta3) => meta3.ticked === true ? acc + 1 : acc, 0);\n                if (sel === m.children.length) {\n                  m.ticked = true;\n                } else if (sel > 0) {\n                  m.indeterminate = true;\n                }\n              }\n              if (m.indeterminate === true) {\n                m.indeterminateNextState = m.children.every((meta3) => meta3.tickable !== true || meta3.ticked !== true);\n              }\n            }\n          }\n        }\n        return m;\n      };\n      props4.nodes.forEach((node) => travel(node, null));\n      return meta2;\n    });\n    watch47(() => props4.ticked, (val) => {\n      innerTicked.value = val;\n    });\n    watch47(() => props4.expanded, (val) => {\n      innerExpanded.value = val;\n    });\n    function getNodeByKey(key) {\n      const reduce = [].reduce;\n      const find = (result, node) => {\n        if (result || !node) {\n          return result;\n        }\n        if (Array.isArray(node) === true) {\n          return reduce.call(Object(node), find, result);\n        }\n        if (node[props4.nodeKey] === key) {\n          return node;\n        }\n        if (node[props4.childrenKey]) {\n          return find(null, node[props4.childrenKey]);\n        }\n      };\n      return find(null, props4.nodes);\n    }\n    function getTickedNodes() {\n      return innerTicked.value.map((key) => getNodeByKey(key));\n    }\n    function getExpandedNodes() {\n      return innerExpanded.value.map((key) => getNodeByKey(key));\n    }\n    function isExpanded(key) {\n      return key && meta.value[key] ? meta.value[key].expanded : false;\n    }\n    function collapseAll() {\n      if (props4.expanded !== void 0) {\n        emit(\"update:expanded\", []);\n      } else {\n        innerExpanded.value = [];\n      }\n    }\n    function expandAll() {\n      const expanded = [];\n      const travel = (node) => {\n        if (node[props4.childrenKey] && node[props4.childrenKey].length !== 0) {\n          if (node.expandable !== false && node.disabled !== true) {\n            expanded.push(node[props4.nodeKey]);\n            node[props4.childrenKey].forEach(travel);\n          }\n        }\n      };\n      props4.nodes.forEach(travel);\n      if (props4.expanded !== void 0) {\n        emit(\"update:expanded\", expanded);\n      } else {\n        innerExpanded.value = expanded;\n      }\n    }\n    function setExpanded(key, state, node = getNodeByKey(key), m = meta.value[key]) {\n      if (m.lazy && m.lazy !== \"loaded\") {\n        if (m.lazy === \"loading\") return;\n        lazy.value[key] = \"loading\";\n        if (Array.isArray(node[props4.childrenKey]) !== true) {\n          node[props4.childrenKey] = [];\n        }\n        emit(\"lazyLoad\", {\n          node,\n          key,\n          done: (children) => {\n            lazy.value[key] = \"loaded\";\n            node[props4.childrenKey] = Array.isArray(children) === true ? children : [];\n            nextTick21(() => {\n              const localMeta = meta.value[key];\n              if (localMeta && localMeta.isParent === true) {\n                localSetExpanded(key, true);\n              }\n            });\n          },\n          fail: () => {\n            delete lazy.value[key];\n            if (node[props4.childrenKey].length === 0) {\n              delete node[props4.childrenKey];\n            }\n          }\n        });\n      } else if (m.isParent === true && m.expandable === true) {\n        localSetExpanded(key, state);\n      }\n    }\n    function localSetExpanded(key, state) {\n      let target2 = innerExpanded.value;\n      const shouldEmit = props4.expanded !== void 0;\n      if (shouldEmit === true) {\n        target2 = target2.slice();\n      }\n      if (state) {\n        if (props4.accordion) {\n          if (meta.value[key]) {\n            const collapse = [];\n            if (meta.value[key].parent) {\n              meta.value[key].parent.children.forEach((m) => {\n                if (m.key !== key && m.expandable === true) {\n                  collapse.push(m.key);\n                }\n              });\n            } else {\n              props4.nodes.forEach((node) => {\n                const k = node[props4.nodeKey];\n                if (k !== key) {\n                  collapse.push(k);\n                }\n              });\n            }\n            if (collapse.length !== 0) {\n              target2 = target2.filter((k) => collapse.includes(k) === false);\n            }\n          }\n        }\n        target2 = target2.concat([key]).filter((key2, index, self2) => self2.indexOf(key2) === index);\n      } else {\n        target2 = target2.filter((k) => k !== key);\n      }\n      if (shouldEmit === true) {\n        emit(\"update:expanded\", target2);\n      } else {\n        innerExpanded.value = target2;\n      }\n    }\n    function isTicked(key) {\n      return key && meta.value[key] ? meta.value[key].ticked : false;\n    }\n    function setTicked(keys, state) {\n      let target2 = innerTicked.value;\n      const shouldEmit = props4.ticked !== void 0;\n      if (shouldEmit === true) {\n        target2 = target2.slice();\n      }\n      if (state) {\n        target2 = target2.concat(keys).filter((key, index, self2) => self2.indexOf(key) === index);\n      } else {\n        target2 = target2.filter((k) => keys.includes(k) === false);\n      }\n      if (shouldEmit === true) {\n        emit(\"update:ticked\", target2);\n      }\n    }\n    function getSlotScope(node, meta2, key) {\n      const scope = { tree: proxy, node, key, color: props4.color, dark: isDark.value };\n      injectProp(\n        scope,\n        \"expanded\",\n        () => {\n          return meta2.expanded;\n        },\n        (val) => {\n          val !== meta2.expanded && setExpanded(key, val);\n        }\n      );\n      injectProp(\n        scope,\n        \"ticked\",\n        () => {\n          return meta2.ticked;\n        },\n        (val) => {\n          val !== meta2.ticked && setTicked([key], val);\n        }\n      );\n      return scope;\n    }\n    function getChildren(nodes) {\n      return (props4.filter ? nodes.filter((n) => meta.value[n[props4.nodeKey]].matchesFilter) : nodes).map((child) => getNode(child));\n    }\n    function getNodeMedia(node) {\n      if (node.icon !== void 0) {\n        return h129(QIcon_default, {\n          class: \"q-tree__icon q-mr-sm\",\n          name: node.icon,\n          color: node.iconColor\n        });\n      }\n      const src = node.img || node.avatar;\n      if (src) {\n        return h129(\"img\", {\n          class: `q-tree__${node.img ? \"img\" : \"avatar\"} q-mr-sm`,\n          src\n        });\n      }\n    }\n    function onShow() {\n      emit(\"afterShow\");\n    }\n    function onHide() {\n      emit(\"afterHide\");\n    }\n    function getNode(node) {\n      const key = node[props4.nodeKey], m = meta.value[key], header = node.header ? slots[`header-${node.header}`] || slots[\"default-header\"] : slots[\"default-header\"];\n      const children = m.isParent === true ? getChildren(node[props4.childrenKey]) : [];\n      const isParent = children.length !== 0 || m.lazy && m.lazy !== \"loaded\";\n      let body = node.body ? slots[`body-${node.body}`] || slots[\"default-body\"] : slots[\"default-body\"];\n      const slotScope = header !== void 0 || body !== void 0 ? getSlotScope(node, m, key) : null;\n      if (body !== void 0) {\n        body = h129(\"div\", { class: \"q-tree__node-body relative-position\" }, [\n          h129(\"div\", { class: textColorClass.value }, [\n            body(slotScope)\n          ])\n        ]);\n      }\n      return h129(\"div\", {\n        key,\n        class: `q-tree__node relative-position q-tree__node--${isParent === true ? \"parent\" : \"child\"}`\n      }, [\n        h129(\"div\", {\n          class: \"q-tree__node-header relative-position row no-wrap items-center\" + (m.link === true ? \" q-tree__node--link q-hoverable q-focusable\" : \"\") + (m.selected === true ? \" q-tree__node--selected\" : \"\") + (m.disabled === true ? \" q-tree__node--disabled\" : \"\"),\n          tabindex: m.link === true ? 0 : -1,\n          ariaExpanded: children.length > 0 ? m.expanded : null,\n          role: \"treeitem\",\n          onClick: (e) => {\n            onClick(node, m, e);\n          },\n          onKeypress(e) {\n            if (shouldIgnoreKey(e) !== true) {\n              if (e.keyCode === 13) {\n                onClick(node, m, e, true);\n              } else if (e.keyCode === 32) {\n                onExpandClick(node, m, e, true);\n              }\n            }\n          }\n        }, [\n          h129(\"div\", {\n            class: \"q-focus-helper\",\n            tabindex: -1,\n            ref: (el) => {\n              blurTargets[m.key] = el;\n            }\n          }),\n          m.lazy === \"loading\" ? h129(QSpinner_default, {\n            class: \"q-tree__spinner\",\n            color: computedControlColor.value\n          }) : isParent === true ? h129(QIcon_default, {\n            class: \"q-tree__arrow\" + (m.expanded === true ? \" q-tree__arrow--rotate\" : \"\"),\n            name: computedIcon.value,\n            onClick(e) {\n              onExpandClick(node, m, e);\n            }\n          }) : null,\n          m.hasTicking === true && m.noTick !== true ? h129(QCheckbox_default, {\n            class: \"q-tree__tickbox\",\n            modelValue: m.indeterminate === true ? null : m.ticked,\n            color: computedControlColor.value,\n            dark: isDark.value,\n            dense: true,\n            keepColor: true,\n            disable: m.tickable !== true,\n            onKeydown: stopAndPrevent,\n            \"onUpdate:modelValue\": (v) => {\n              onTickedClick(m, v);\n            }\n          }) : null,\n          h129(\"div\", {\n            class: \"q-tree__node-header-content col row no-wrap items-center\" + (m.selected === true ? selectedColorClass.value : textColorClass.value)\n          }, [\n            header ? header(slotScope) : [\n              getNodeMedia(node),\n              h129(\"div\", node[props4.labelKey])\n            ]\n          ])\n        ]),\n        isParent === true ? props4.noTransition === true ? m.expanded === true ? h129(\"div\", {\n          class: \"q-tree__node-collapsible\" + textColorClass.value,\n          key: `${key}__q`\n        }, [\n          body,\n          h129(\"div\", {\n            class: \"q-tree__children\" + (m.disabled === true ? \" q-tree__node--disabled\" : \"\"),\n            role: \"group\"\n          }, children)\n        ]) : null : h129(QSlideTransition_default, {\n          duration: props4.duration,\n          onShow,\n          onHide\n        }, () => withDirectives10(\n          h129(\"div\", {\n            class: \"q-tree__node-collapsible\" + textColorClass.value,\n            key: `${key}__q`\n          }, [\n            body,\n            h129(\"div\", {\n              class: \"q-tree__children\" + (m.disabled === true ? \" q-tree__node--disabled\" : \"\"),\n              role: \"group\"\n            }, children)\n          ]),\n          [[vShow2, m.expanded]]\n        )) : body\n      ]);\n    }\n    function blur(key) {\n      const blurTarget = blurTargets[key];\n      blurTarget && blurTarget.focus();\n    }\n    function onClick(node, meta2, e, keyboard) {\n      keyboard !== true && meta2.selectable !== false && blur(meta2.key);\n      if (hasSelection.value && meta2.selectable) {\n        if (props4.noSelectionUnset === false) {\n          emit(\"update:selected\", meta2.key !== props4.selected ? meta2.key : null);\n        } else if (meta2.key !== props4.selected) {\n          emit(\"update:selected\", meta2.key === void 0 ? null : meta2.key);\n        }\n      } else {\n        onExpandClick(node, meta2, e, keyboard);\n      }\n      if (typeof node.handler === \"function\") {\n        node.handler(node);\n      }\n    }\n    function onExpandClick(node, meta2, e, keyboard) {\n      if (e !== void 0) {\n        stopAndPrevent(e);\n      }\n      keyboard !== true && meta2.selectable !== false && blur(meta2.key);\n      setExpanded(meta2.key, !meta2.expanded, node, meta2);\n    }\n    function onTickedClick(meta2, state) {\n      if (meta2.indeterminate === true) {\n        state = meta2.indeterminateNextState;\n      }\n      if (meta2.strictTicking) {\n        setTicked([meta2.key], state);\n      } else if (meta2.leafTicking) {\n        const keys = [];\n        const travel = (meta3) => {\n          if (meta3.isParent) {\n            if (state !== true && meta3.noTick !== true && meta3.tickable === true) {\n              keys.push(meta3.key);\n            }\n            if (meta3.leafTicking === true) {\n              meta3.children.forEach(travel);\n            }\n          } else if (meta3.noTick !== true && meta3.tickable === true && (meta3.leafFilteredTicking !== true || meta3.matchesFilter === true)) {\n            keys.push(meta3.key);\n          }\n        };\n        travel(meta2);\n        setTicked(keys, state);\n      }\n    }\n    props4.defaultExpandAll === true && expandAll();\n    Object.assign(proxy, {\n      getNodeByKey,\n      getTickedNodes,\n      getExpandedNodes,\n      isExpanded,\n      collapseAll,\n      expandAll,\n      setExpanded,\n      isTicked,\n      setTicked\n    });\n    return () => {\n      const children = getChildren(props4.nodes);\n      return h129(\n        \"div\",\n        {\n          class: classes.value,\n          role: \"tree\"\n        },\n        children.length === 0 ? props4.filter ? props4.noResultsLabel || $q.lang.tree.noResults : props4.noNodesLabel || $q.lang.tree.noNodes : children\n      );\n    };\n  }\n});\n\n// src/components/uploader/uploader-core.js\nimport { h as h130, ref as ref65, isRef, computed as computed112, watch as watch48, provide as provide8, onBeforeUnmount as onBeforeUnmount37, getCurrentInstance as getCurrentInstance83 } from \"vue\";\nfunction getProgressLabel(p) {\n  return (p * 100).toFixed(2) + \"%\";\n}\nvar coreProps = {\n  ...useDarkProps,\n  ...useFileProps,\n  label: String,\n  color: String,\n  textColor: String,\n  square: Boolean,\n  flat: Boolean,\n  bordered: Boolean,\n  noThumbnails: Boolean,\n  thumbnailFit: {\n    type: String,\n    default: \"cover\"\n  },\n  autoUpload: Boolean,\n  hideUploadBtn: Boolean,\n  disable: Boolean,\n  readonly: Boolean\n};\nvar coreEmits = [\n  ...useFileEmits,\n  \"start\",\n  \"finish\",\n  \"added\",\n  \"removed\"\n];\nfunction getRenderer(getPlugin, expose) {\n  const vm2 = getCurrentInstance83();\n  const { props: props4, slots, emit, proxy } = vm2;\n  const { $q } = proxy;\n  const isDark = use_dark_default(props4, $q);\n  function updateFileStatus(file, status, uploadedSize) {\n    file.__status = status;\n    if (status === \"idle\") {\n      file.__uploaded = 0;\n      file.__progress = 0;\n      file.__sizeLabel = humanStorageSize(file.size);\n      file.__progressLabel = \"0.00%\";\n      return;\n    }\n    if (status === \"failed\") {\n      proxy.$forceUpdate();\n      return;\n    }\n    file.__uploaded = status === \"uploaded\" ? file.size : uploadedSize;\n    file.__progress = status === \"uploaded\" ? 1 : Math.min(0.9999, file.__uploaded / file.size);\n    file.__progressLabel = getProgressLabel(file.__progress);\n    proxy.$forceUpdate();\n  }\n  const editable = computed112(() => props4.disable !== true && props4.readonly !== true);\n  const dnd = ref65(false);\n  const rootRef = ref65(null);\n  const inputRef = ref65(null);\n  const state = {\n    files: ref65([]),\n    queuedFiles: ref65([]),\n    uploadedFiles: ref65([]),\n    uploadedSize: ref65(0),\n    updateFileStatus,\n    isAlive: () => vmIsDestroyed(vm2) === false\n  };\n  const {\n    pickFiles,\n    addFiles,\n    onDragover,\n    onDragleave,\n    processFiles,\n    getDndNode,\n    maxFilesNumber,\n    maxTotalSizeNumber\n  } = use_file_default({ editable, dnd, getFileInput, addFilesToQueue });\n  Object.assign(state, getPlugin({\n    props: props4,\n    slots,\n    emit,\n    helpers: state,\n    exposeApi: (obj) => {\n      Object.assign(state, obj);\n    }\n  }));\n  if (state.isBusy === void 0) {\n    state.isBusy = ref65(false);\n  }\n  const uploadSize = ref65(0);\n  const uploadProgress = computed112(() => uploadSize.value === 0 ? 0 : state.uploadedSize.value / uploadSize.value);\n  const uploadProgressLabel = computed112(() => getProgressLabel(uploadProgress.value));\n  const uploadSizeLabel = computed112(() => humanStorageSize(uploadSize.value));\n  const canAddFiles = computed112(\n    () => editable.value === true && state.isUploading.value !== true && (props4.multiple === true || state.queuedFiles.value.length === 0) && (props4.maxFiles === void 0 || state.files.value.length < maxFilesNumber.value) && (props4.maxTotalSize === void 0 || uploadSize.value < maxTotalSizeNumber.value)\n  );\n  const canUpload = computed112(\n    () => editable.value === true && state.isBusy.value !== true && state.isUploading.value !== true && state.queuedFiles.value.length !== 0\n  );\n  provide8(uploaderKey, renderInput);\n  const classes = computed112(\n    () => \"q-uploader column no-wrap\" + (isDark.value === true ? \" q-uploader--dark q-dark\" : \"\") + (props4.bordered === true ? \" q-uploader--bordered\" : \"\") + (props4.square === true ? \" q-uploader--square no-border-radius\" : \"\") + (props4.flat === true ? \" q-uploader--flat no-shadow\" : \"\") + (props4.disable === true ? \" disabled q-uploader--disable\" : \"\") + (dnd.value === true ? \" q-uploader--dnd\" : \"\")\n  );\n  const colorClass = computed112(\n    () => \"q-uploader__header\" + (props4.color !== void 0 ? ` bg-${props4.color}` : \"\") + (props4.textColor !== void 0 ? ` text-${props4.textColor}` : \"\")\n  );\n  watch48(state.isUploading, (newVal, oldVal) => {\n    if (oldVal === false && newVal === true) {\n      emit(\"start\");\n    } else if (oldVal === true && newVal === false) {\n      emit(\"finish\");\n    }\n  });\n  function reset() {\n    if (props4.disable === false) {\n      state.abort();\n      state.uploadedSize.value = 0;\n      uploadSize.value = 0;\n      revokeImgURLs();\n      state.files.value = [];\n      state.queuedFiles.value = [];\n      state.uploadedFiles.value = [];\n    }\n  }\n  function removeUploadedFiles() {\n    if (props4.disable === false) {\n      batchRemoveFiles([\"uploaded\"], () => {\n        state.uploadedFiles.value = [];\n      });\n    }\n  }\n  function removeQueuedFiles() {\n    batchRemoveFiles([\"idle\", \"failed\"], ({ size: size2 }) => {\n      uploadSize.value -= size2;\n      state.queuedFiles.value = [];\n    });\n  }\n  function batchRemoveFiles(statusList, cb) {\n    if (props4.disable === true) return;\n    const removed = {\n      files: [],\n      size: 0\n    };\n    const localFiles = state.files.value.filter((f) => {\n      if (statusList.indexOf(f.__status) === -1) {\n        return true;\n      }\n      removed.size += f.size;\n      removed.files.push(f);\n      f.__img !== void 0 && window.URL.revokeObjectURL(f.__img.src);\n      return false;\n    });\n    if (removed.files.length !== 0) {\n      state.files.value = localFiles;\n      cb(removed);\n      emit(\"removed\", removed.files);\n    }\n  }\n  function removeFile(file) {\n    if (props4.disable) return;\n    if (file.__status === \"uploaded\") {\n      state.uploadedFiles.value = state.uploadedFiles.value.filter((f) => f.__key !== file.__key);\n    } else if (file.__status === \"uploading\") {\n      file.__abort();\n    } else {\n      uploadSize.value -= file.size;\n    }\n    state.files.value = state.files.value.filter((f) => {\n      if (f.__key !== file.__key) {\n        return true;\n      }\n      f.__img !== void 0 && window.URL.revokeObjectURL(f.__img.src);\n      return false;\n    });\n    state.queuedFiles.value = state.queuedFiles.value.filter((f) => f.__key !== file.__key);\n    emit(\"removed\", [file]);\n  }\n  function revokeImgURLs() {\n    state.files.value.forEach((f) => {\n      f.__img !== void 0 && window.URL.revokeObjectURL(f.__img.src);\n    });\n  }\n  function getFileInput() {\n    return inputRef.value || rootRef.value.getElementsByClassName(\"q-uploader__input\")[0];\n  }\n  function addFilesToQueue(e, fileList) {\n    const localFiles = processFiles(e, fileList, state.files.value, true);\n    const fileInput = getFileInput();\n    if (fileInput !== void 0 && fileInput !== null) {\n      fileInput.value = \"\";\n    }\n    if (localFiles === void 0) return;\n    localFiles.forEach((file) => {\n      state.updateFileStatus(file, \"idle\");\n      uploadSize.value += file.size;\n      if (props4.noThumbnails !== true && file.type.toUpperCase().startsWith(\"IMAGE\")) {\n        const img = new Image();\n        img.src = window.URL.createObjectURL(file);\n        file.__img = img;\n      }\n    });\n    state.files.value = state.files.value.concat(localFiles);\n    state.queuedFiles.value = state.queuedFiles.value.concat(localFiles);\n    emit(\"added\", localFiles);\n    props4.autoUpload === true && state.upload();\n  }\n  function upload() {\n    canUpload.value === true && state.upload();\n  }\n  function getBtn2(show, icon, fn) {\n    if (show === true) {\n      const data = {\n        type: \"a\",\n        key: icon,\n        icon: $q.iconSet.uploader[icon],\n        flat: true,\n        dense: true\n      };\n      let child = void 0;\n      if (icon === \"add\") {\n        data.onClick = pickFiles;\n        child = renderInput;\n      } else {\n        data.onClick = fn;\n      }\n      return h130(QBtn_default, data, child);\n    }\n  }\n  function renderInput() {\n    return h130(\"input\", {\n      ref: inputRef,\n      class: \"q-uploader__input overflow-hidden absolute-full\",\n      tabindex: -1,\n      type: \"file\",\n      title: \"\",\n      // try to remove default tooltip\n      accept: props4.accept,\n      multiple: props4.multiple === true ? \"multiple\" : void 0,\n      capture: props4.capture,\n      onMousedown: stop,\n      // need to stop refocus from QBtn\n      onClick: pickFiles,\n      onChange: addFilesToQueue\n    });\n  }\n  function getHeader() {\n    if (slots.header !== void 0) {\n      return slots.header(publicApi);\n    }\n    return [\n      h130(\"div\", {\n        class: \"q-uploader__header-content column\"\n      }, [\n        h130(\"div\", {\n          class: \"flex flex-center no-wrap q-gutter-xs\"\n        }, [\n          getBtn2(state.queuedFiles.value.length !== 0, \"removeQueue\", removeQueuedFiles),\n          getBtn2(state.uploadedFiles.value.length !== 0, \"removeUploaded\", removeUploadedFiles),\n          state.isUploading.value === true ? h130(QSpinner_default, { class: \"q-uploader__spinner\" }) : null,\n          h130(\"div\", { class: \"col column justify-center\" }, [\n            props4.label !== void 0 ? h130(\"div\", { class: \"q-uploader__title\" }, [props4.label]) : null,\n            h130(\"div\", { class: \"q-uploader__subtitle\" }, [\n              uploadSizeLabel.value + \" / \" + uploadProgressLabel.value\n            ])\n          ]),\n          getBtn2(canAddFiles.value, \"add\"),\n          getBtn2(props4.hideUploadBtn === false && canUpload.value === true, \"upload\", state.upload),\n          getBtn2(state.isUploading.value, \"clear\", state.abort)\n        ])\n      ])\n    ];\n  }\n  function getList() {\n    if (slots.list !== void 0) {\n      return slots.list(publicApi);\n    }\n    return state.files.value.map((file) => h130(\"div\", {\n      key: file.__key,\n      class: \"q-uploader__file relative-position\" + (props4.noThumbnails !== true && file.__img !== void 0 ? \" q-uploader__file--img\" : \"\") + (file.__status === \"failed\" ? \" q-uploader__file--failed\" : file.__status === \"uploaded\" ? \" q-uploader__file--uploaded\" : \"\"),\n      style: props4.noThumbnails !== true && file.__img !== void 0 ? { backgroundImage: 'url(\"' + file.__img.src + '\")', backgroundSize: props4.thumbnailFit } : null\n    }, [\n      h130(\"div\", {\n        class: \"q-uploader__file-header row flex-center no-wrap\"\n      }, [\n        file.__status === \"failed\" ? h130(QIcon_default, {\n          class: \"q-uploader__file-status\",\n          name: $q.iconSet.type.negative,\n          color: \"negative\"\n        }) : null,\n        h130(\"div\", { class: \"q-uploader__file-header-content col\" }, [\n          h130(\"div\", { class: \"q-uploader__title\" }, [file.name]),\n          h130(\"div\", {\n            class: \"q-uploader__subtitle row items-center no-wrap\"\n          }, [\n            file.__sizeLabel + \" / \" + file.__progressLabel\n          ])\n        ]),\n        file.__status === \"uploading\" ? h130(QCircularProgress_default, {\n          value: file.__progress,\n          min: 0,\n          max: 1,\n          indeterminate: file.__progress === 0\n        }) : h130(QBtn_default, {\n          round: true,\n          dense: true,\n          flat: true,\n          icon: $q.iconSet.uploader[file.__status === \"uploaded\" ? \"done\" : \"clear\"],\n          onClick: () => {\n            removeFile(file);\n          }\n        })\n      ])\n    ]));\n  }\n  onBeforeUnmount37(() => {\n    state.isUploading.value === true && state.abort();\n    state.files.value.length !== 0 && revokeImgURLs();\n  });\n  const publicApi = {};\n  for (const key in state) {\n    if (isRef(state[key]) === true) {\n      injectProp(publicApi, key, () => state[key].value);\n    } else {\n      publicApi[key] = state[key];\n    }\n  }\n  Object.assign(publicApi, {\n    upload,\n    reset,\n    removeUploadedFiles,\n    removeQueuedFiles,\n    removeFile,\n    pickFiles,\n    addFiles\n  });\n  injectMultipleProps(publicApi, {\n    canAddFiles: () => canAddFiles.value,\n    canUpload: () => canUpload.value,\n    uploadSizeLabel: () => uploadSizeLabel.value,\n    uploadProgressLabel: () => uploadProgressLabel.value\n  });\n  expose({\n    ...state,\n    upload,\n    reset,\n    removeUploadedFiles,\n    removeQueuedFiles,\n    removeFile,\n    pickFiles,\n    addFiles,\n    canAddFiles,\n    canUpload,\n    uploadSizeLabel,\n    uploadProgressLabel\n  });\n  return () => {\n    const children = [\n      h130(\"div\", { class: colorClass.value }, getHeader()),\n      h130(\"div\", { class: \"q-uploader__list scroll\" }, getList()),\n      getDndNode(\"uploader\")\n    ];\n    state.isBusy.value === true && children.push(\n      h130(\"div\", {\n        class: \"q-uploader__overlay absolute-full flex flex-center\"\n      }, [h130(QSpinner_default)])\n    );\n    const data = { ref: rootRef, class: classes.value };\n    if (canAddFiles.value === true) {\n      Object.assign(data, { onDragover, onDragleave });\n    }\n    return h130(\"div\", data, children);\n  };\n}\n\n// src/utils/private.get-emits-object/get-emits-object.js\nvar trueFn = () => true;\nfunction get_emits_object_default(emitsArray) {\n  const emitsObject = {};\n  emitsArray.forEach((val) => {\n    emitsObject[val] = trueFn;\n  });\n  return emitsObject;\n}\n\n// src/utils/create-uploader-component/create-uploader-component.js\nvar coreEmitsObject = get_emits_object_default(coreEmits);\nvar create_uploader_component_default = ({ name: name2, props: props4, emits: emits3, injectPlugin: injectPlugin2 }) => createComponent({\n  name: name2,\n  props: {\n    ...coreProps,\n    ...props4\n  },\n  emits: isObject(emits3) === true ? { ...coreEmitsObject, ...emits3 } : [...coreEmits, ...emits3],\n  setup(_, { expose }) {\n    return getRenderer(injectPlugin2, expose);\n  }\n});\n\n// src/components/uploader/xhr-uploader-plugin.js\nimport { ref as ref66, computed as computed113 } from \"vue\";\nfunction getFn(prop) {\n  return typeof prop === \"function\" ? prop : () => prop;\n}\nvar name = \"QUploader\";\nvar props = {\n  url: [Function, String],\n  method: {\n    type: [Function, String],\n    default: \"POST\"\n  },\n  fieldName: {\n    type: [Function, String],\n    default: () => (file) => file.name\n  },\n  headers: [Function, Array],\n  formFields: [Function, Array],\n  withCredentials: [Function, Boolean],\n  sendRaw: [Function, Boolean],\n  batch: [Function, Boolean],\n  factory: Function\n};\nvar emits = [\"factoryFailed\", \"uploaded\", \"failed\", \"uploading\"];\nfunction injectPlugin({ props: props4, emit, helpers }) {\n  const xhrs = ref66([]);\n  const promises = ref66([]);\n  const workingThreads = ref66(0);\n  const xhrProps = computed113(() => ({\n    url: getFn(props4.url),\n    method: getFn(props4.method),\n    headers: getFn(props4.headers),\n    formFields: getFn(props4.formFields),\n    fieldName: getFn(props4.fieldName),\n    withCredentials: getFn(props4.withCredentials),\n    sendRaw: getFn(props4.sendRaw),\n    batch: getFn(props4.batch)\n  }));\n  const isUploading = computed113(() => workingThreads.value > 0);\n  const isBusy = computed113(() => promises.value.length !== 0);\n  let abortPromises;\n  function abort() {\n    xhrs.value.forEach((x) => {\n      x.abort();\n    });\n    if (promises.value.length !== 0) {\n      abortPromises = true;\n    }\n  }\n  function upload() {\n    const queue2 = helpers.queuedFiles.value.slice(0);\n    helpers.queuedFiles.value = [];\n    if (xhrProps.value.batch(queue2)) {\n      runFactory(queue2);\n    } else {\n      queue2.forEach((file) => {\n        runFactory([file]);\n      });\n    }\n  }\n  function runFactory(files) {\n    workingThreads.value++;\n    if (typeof props4.factory !== \"function\") {\n      performUpload(files, {});\n      return;\n    }\n    const res = props4.factory(files);\n    if (!res) {\n      emit(\n        \"factoryFailed\",\n        new Error(\"QUploader: factory() does not return properly\"),\n        files\n      );\n      workingThreads.value--;\n    } else if (typeof res.catch === \"function\" && typeof res.then === \"function\") {\n      promises.value.push(res);\n      const failed = (err) => {\n        if (helpers.isAlive() === true) {\n          promises.value = promises.value.filter((p) => p !== res);\n          if (promises.value.length === 0) {\n            abortPromises = false;\n          }\n          helpers.queuedFiles.value = helpers.queuedFiles.value.concat(files);\n          files.forEach((f) => {\n            helpers.updateFileStatus(f, \"failed\");\n          });\n          emit(\"factoryFailed\", err, files);\n          workingThreads.value--;\n        }\n      };\n      res.then((factory) => {\n        if (abortPromises === true) {\n          failed(new Error(\"Aborted\"));\n        } else if (helpers.isAlive() === true) {\n          promises.value = promises.value.filter((p) => p !== res);\n          performUpload(files, factory);\n        }\n      }).catch(failed);\n    } else {\n      performUpload(files, res || {});\n    }\n  }\n  function performUpload(files, factory) {\n    const form = new FormData(), xhr2 = new XMLHttpRequest();\n    const getProp2 = (name2, arg) => {\n      return factory[name2] !== void 0 ? getFn(factory[name2])(arg) : xhrProps.value[name2](arg);\n    };\n    const url = getProp2(\"url\", files);\n    if (!url) {\n      console.error(\"q-uploader: invalid or no URL specified\");\n      workingThreads.value--;\n      return;\n    }\n    const fields = getProp2(\"formFields\", files);\n    fields !== void 0 && fields.forEach((field) => {\n      form.append(field.name, field.value);\n    });\n    let uploadIndex = 0, uploadIndexSize = 0, localUploadedSize = 0, maxUploadSize = 0, aborted;\n    xhr2.upload.addEventListener(\"progress\", (e) => {\n      if (aborted === true) return;\n      const loaded = Math.min(maxUploadSize, e.loaded);\n      helpers.uploadedSize.value += loaded - localUploadedSize;\n      localUploadedSize = loaded;\n      let size2 = localUploadedSize - uploadIndexSize;\n      for (let i = uploadIndex; size2 > 0 && i < files.length; i++) {\n        const file = files[i], uploaded = size2 > file.size;\n        if (uploaded) {\n          size2 -= file.size;\n          uploadIndex++;\n          uploadIndexSize += file.size;\n          helpers.updateFileStatus(file, \"uploading\", file.size);\n        } else {\n          helpers.updateFileStatus(file, \"uploading\", size2);\n          return;\n        }\n      }\n    }, false);\n    xhr2.onreadystatechange = () => {\n      if (xhr2.readyState < 4) return;\n      if (xhr2.status && xhr2.status < 400) {\n        helpers.uploadedFiles.value = helpers.uploadedFiles.value.concat(files);\n        files.forEach((f) => {\n          helpers.updateFileStatus(f, \"uploaded\");\n        });\n        emit(\"uploaded\", { files, xhr: xhr2 });\n      } else {\n        aborted = true;\n        helpers.uploadedSize.value -= localUploadedSize;\n        helpers.queuedFiles.value = helpers.queuedFiles.value.concat(files);\n        files.forEach((f) => {\n          helpers.updateFileStatus(f, \"failed\");\n        });\n        emit(\"failed\", { files, xhr: xhr2 });\n      }\n      workingThreads.value--;\n      xhrs.value = xhrs.value.filter((x) => x !== xhr2);\n    };\n    xhr2.open(\n      getProp2(\"method\", files),\n      url\n    );\n    if (getProp2(\"withCredentials\", files) === true) {\n      xhr2.withCredentials = true;\n    }\n    const headers = getProp2(\"headers\", files);\n    headers !== void 0 && headers.forEach((head) => {\n      xhr2.setRequestHeader(head.name, head.value);\n    });\n    const sendRaw = getProp2(\"sendRaw\", files);\n    files.forEach((file) => {\n      helpers.updateFileStatus(file, \"uploading\", 0);\n      if (sendRaw !== true) {\n        form.append(getProp2(\"fieldName\", file), file, file.name);\n      }\n      file.xhr = xhr2;\n      file.__abort = () => {\n        xhr2.abort();\n      };\n      maxUploadSize += file.size;\n    });\n    emit(\"uploading\", { files, xhr: xhr2 });\n    xhrs.value.push(xhr2);\n    if (sendRaw === true) {\n      xhr2.send(new Blob(files));\n    } else {\n      xhr2.send(form);\n    }\n  }\n  return {\n    isUploading,\n    isBusy,\n    abort,\n    upload\n  };\n}\nvar xhr_uploader_plugin_default = {\n  name,\n  props,\n  emits,\n  injectPlugin\n};\n\n// src/components/uploader/QUploader.js\nvar QUploader_default = create_uploader_component_default(xhr_uploader_plugin_default);\n\n// src/components/uploader/QUploaderAddTrigger.js\nimport { inject as inject12 } from \"vue\";\nvar QUploaderAddTrigger_default = createComponent({\n  name: \"QUploaderAddTrigger\",\n  setup() {\n    const $trigger = inject12(uploaderKey, emptyRenderFn);\n    if ($trigger === emptyRenderFn) {\n      console.error(\"QUploaderAddTrigger needs to be child of QUploader\");\n    }\n    return $trigger;\n  }\n});\n\n// src/components/video/QVideo.js\nimport { h as h131, computed as computed114 } from \"vue\";\nvar QVideo_default = createComponent({\n  name: \"QVideo\",\n  props: {\n    ...useRatioProps,\n    src: {\n      type: String,\n      required: true\n    },\n    title: String,\n    fetchpriority: {\n      type: String,\n      default: \"auto\"\n    },\n    loading: {\n      type: String,\n      default: \"eager\"\n    },\n    referrerpolicy: {\n      type: String,\n      default: \"strict-origin-when-cross-origin\"\n    }\n  },\n  setup(props4) {\n    const ratioStyle = use_ratio_default(props4);\n    const classes = computed114(\n      () => \"q-video\" + (props4.ratio !== void 0 ? \" q-video--responsive\" : \"\")\n    );\n    return () => h131(\"div\", {\n      class: classes.value,\n      style: ratioStyle.value\n    }, [\n      h131(\"iframe\", {\n        src: props4.src,\n        title: props4.title,\n        fetchpriority: props4.fetchpriority,\n        loading: props4.loading,\n        referrerpolicy: props4.referrerpolicy,\n        frameborder: \"0\",\n        allowfullscreen: true\n      })\n    ]);\n  }\n});\n\n// src/directives/close-popup/ClosePopup.js\nfunction getDepth(value2) {\n  if (value2 === false) {\n    return 0;\n  }\n  if (value2 === true || value2 === void 0) {\n    return 1;\n  }\n  const depth = parseInt(value2, 10);\n  return isNaN(depth) ? 0 : depth;\n}\nvar ClosePopup_default = createDirective(\n  false ? { name: \"close-popup\", getSSRProps: noop_ssr_directive_transform_default } : {\n    name: \"close-popup\",\n    beforeMount(el, { value: value2 }) {\n      const ctx = {\n        depth: getDepth(value2),\n        handler(evt) {\n          ctx.depth !== 0 && setTimeout(() => {\n            const proxy = getPortalProxy(el);\n            if (proxy !== void 0) {\n              closePortals(proxy, evt, ctx.depth);\n            }\n          });\n        },\n        handlerKey(evt) {\n          isKeyCode(evt, 13) === true && ctx.handler(evt);\n        }\n      };\n      el.__qclosepopup = ctx;\n      el.addEventListener(\"click\", ctx.handler);\n      el.addEventListener(\"keyup\", ctx.handlerKey);\n    },\n    updated(el, { value: value2, oldValue }) {\n      if (value2 !== oldValue) {\n        el.__qclosepopup.depth = getDepth(value2);\n      }\n    },\n    beforeUnmount(el) {\n      const ctx = el.__qclosepopup;\n      el.removeEventListener(\"click\", ctx.handler);\n      el.removeEventListener(\"keyup\", ctx.handlerKey);\n      delete el.__qclosepopup;\n    }\n  }\n);\n\n// src/utils/morph/morph.js\nvar id2 = 0;\nvar offsetBase = void 0;\nfunction getAbsolutePosition(el, resize) {\n  if (offsetBase === void 0) {\n    offsetBase = document.createElement(\"div\");\n    offsetBase.style.cssText = \"position: absolute; left: 0; top: 0\";\n    document.body.appendChild(offsetBase);\n  }\n  const boundingRect = el.getBoundingClientRect();\n  const baseRect = offsetBase.getBoundingClientRect();\n  const { marginLeft, marginRight, marginTop, marginBottom } = window.getComputedStyle(el);\n  const marginH = parseInt(marginLeft, 10) + parseInt(marginRight, 10);\n  const marginV = parseInt(marginTop, 10) + parseInt(marginBottom, 10);\n  return {\n    left: boundingRect.left - baseRect.left,\n    top: boundingRect.top - baseRect.top,\n    width: boundingRect.right - boundingRect.left,\n    height: boundingRect.bottom - boundingRect.top,\n    widthM: boundingRect.right - boundingRect.left + (resize === true ? 0 : marginH),\n    heightM: boundingRect.bottom - boundingRect.top + (resize === true ? 0 : marginV),\n    marginH: resize === true ? marginH : 0,\n    marginV: resize === true ? marginV : 0\n  };\n}\nfunction getAbsoluteSize(el) {\n  return {\n    width: el.scrollWidth,\n    height: el.scrollHeight\n  };\n}\nvar styleEdges = [\"Top\", \"Right\", \"Bottom\", \"Left\"];\nvar styleBorderRadiuses = [\"borderTopLeftRadius\", \"borderTopRightRadius\", \"borderBottomRightRadius\", \"borderBottomLeftRadius\"];\nvar reStyleSkipKey = /-block|-inline|block-|inline-/;\nvar reStyleSkipRule = /(-block|-inline|block-|inline-).*:/;\nfunction getComputedStyle2(el, props4) {\n  const style2 = window.getComputedStyle(el);\n  const fixed = {};\n  for (let i = 0; i < props4.length; i++) {\n    const prop = props4[i];\n    if (style2[prop] === \"\") {\n      if (prop === \"cssText\") {\n        const styleLen = style2.length;\n        let val = \"\";\n        for (let i2 = 0; i2 < styleLen; i2++) {\n          if (reStyleSkipKey.test(style2[i2]) !== true) {\n            val += style2[i2] + \": \" + style2[style2[i2]] + \"; \";\n          }\n        }\n        fixed[prop] = val;\n      } else if ([\"borderWidth\", \"borderStyle\", \"borderColor\"].indexOf(prop) !== -1) {\n        const suffix = prop.replace(\"border\", \"\");\n        let val = \"\";\n        for (let j = 0; j < styleEdges.length; j++) {\n          const subProp = \"border\" + styleEdges[j] + suffix;\n          val += style2[subProp] + \" \";\n        }\n        fixed[prop] = val;\n      } else if (prop === \"borderRadius\") {\n        let val1 = \"\";\n        let val2 = \"\";\n        for (let j = 0; j < styleBorderRadiuses.length; j++) {\n          const val = style2[styleBorderRadiuses[j]].split(\" \");\n          val1 += val[0] + \" \";\n          val2 += (val[1] === void 0 ? val[0] : val[1]) + \" \";\n        }\n        fixed[prop] = val1 + \"/ \" + val2;\n      } else {\n        fixed[prop] = style2[prop];\n      }\n    } else {\n      if (prop === \"cssText\") {\n        fixed[prop] = style2[prop].split(\";\").filter((val) => reStyleSkipRule.test(val) !== true).join(\";\");\n      } else {\n        fixed[prop] = style2[prop];\n      }\n    }\n  }\n  return fixed;\n}\nvar zIndexPositions = [\"absolute\", \"fixed\", \"relative\", \"sticky\"];\nfunction getMaxZIndex(elStart) {\n  let el = elStart;\n  let maxIndex = 0;\n  while (el !== null && el !== document) {\n    const { position: position2, zIndex } = window.getComputedStyle(el);\n    const zIndexNum = Number(zIndex);\n    if (zIndexNum > maxIndex && (el === elStart || zIndexPositions.includes(position2) === true)) {\n      maxIndex = zIndexNum;\n    }\n    el = el.parentNode;\n  }\n  return maxIndex;\n}\nfunction normalizeElements(opts) {\n  return {\n    from: opts.from,\n    to: opts.to !== void 0 ? opts.to : opts.from\n  };\n}\nfunction normalizeOptions(options) {\n  if (typeof options === \"number\") {\n    options = {\n      duration: options\n    };\n  } else if (typeof options === \"function\") {\n    options = {\n      onEnd: options\n    };\n  }\n  return {\n    ...options,\n    waitFor: options.waitFor === void 0 ? 0 : options.waitFor,\n    duration: isNaN(options.duration) === true ? 300 : parseInt(options.duration, 10),\n    easing: typeof options.easing === \"string\" && options.easing.length !== 0 ? options.easing : \"ease-in-out\",\n    delay: isNaN(options.delay) === true ? 0 : parseInt(options.delay, 10),\n    fill: typeof options.fill === \"string\" && options.fill.length !== 0 ? options.fill : \"none\",\n    resize: options.resize === true,\n    // account for UMD too where modifiers will be lowercased to work\n    useCSS: options.useCSS === true || options.usecss === true,\n    // account for UMD too where modifiers will be lowercased to work\n    hideFromClone: options.hideFromClone === true || options.hidefromclone === true,\n    // account for UMD too where modifiers will be lowercased to work\n    keepToClone: options.keepToClone === true || options.keeptoclone === true,\n    tween: options.tween === true,\n    tweenFromOpacity: isNaN(options.tweenFromOpacity) === true ? 0.6 : parseFloat(options.tweenFromOpacity),\n    tweenToOpacity: isNaN(options.tweenToOpacity) === true ? 0.5 : parseFloat(options.tweenToOpacity)\n  };\n}\nfunction getElement2(element) {\n  const type = typeof element;\n  return type === \"function\" ? element() : type === \"string\" ? document.querySelector(element) : element;\n}\nfunction isValidElement(element) {\n  return element && element.ownerDocument === document && element.parentNode !== null;\n}\nfunction morph(_options) {\n  let cancel = () => false;\n  let cancelStatus = false;\n  let endElementTo = true;\n  const elements = normalizeElements(_options);\n  const options = normalizeOptions(_options);\n  const elFrom = getElement2(elements.from);\n  if (isValidElement(elFrom) !== true) {\n    return cancel;\n  }\n  typeof elFrom.qMorphCancel === \"function\" && elFrom.qMorphCancel();\n  let animationFromClone = void 0;\n  let animationFromTween = void 0;\n  let animationToClone = void 0;\n  let animationTo = void 0;\n  const elFromParent = elFrom.parentNode;\n  const elFromNext = elFrom.nextElementSibling;\n  const elFromPosition = getAbsolutePosition(elFrom, options.resize);\n  const {\n    width: elFromParentWidthBefore,\n    height: elFromParentHeightBefore\n  } = getAbsoluteSize(elFromParent);\n  const {\n    borderWidth: elFromBorderWidth,\n    borderStyle: elFromBorderStyle,\n    borderColor: elFromBorderColor,\n    borderRadius: elFromBorderRadius,\n    backgroundColor: elFromBackground,\n    transform: elFromTransform,\n    position: elFromPositioningType,\n    cssText: elFromCssText\n  } = getComputedStyle2(elFrom, [\"borderWidth\", \"borderStyle\", \"borderColor\", \"borderRadius\", \"backgroundColor\", \"transform\", \"position\", \"cssText\"]);\n  const elFromClassSaved = elFrom.classList.toString();\n  const elFromStyleSaved = elFrom.style.cssText;\n  const elFromClone = elFrom.cloneNode(true);\n  const elFromTween = options.tween === true ? elFrom.cloneNode(true) : void 0;\n  if (elFromTween !== void 0) {\n    elFromTween.className = elFromTween.classList.toString().split(\" \").filter((c) => /^bg-/.test(c) === false).join(\" \");\n  }\n  options.hideFromClone === true && elFromClone.classList.add(\"q-morph--internal\");\n  elFromClone.setAttribute(\"aria-hidden\", \"true\");\n  elFromClone.style.transition = \"none\";\n  elFromClone.style.animation = \"none\";\n  elFromClone.style.pointerEvents = \"none\";\n  elFromParent.insertBefore(elFromClone, elFromNext);\n  elFrom.qMorphCancel = () => {\n    cancelStatus = true;\n    elFromClone.remove();\n    elFromTween !== void 0 && elFromTween.remove();\n    options.hideFromClone === true && elFromClone.classList.remove(\"q-morph--internal\");\n    elFrom.qMorphCancel = void 0;\n  };\n  const calculateFinalState = () => {\n    const elTo = getElement2(elements.to);\n    if (cancelStatus === true || isValidElement(elTo) !== true) {\n      typeof elFrom.qMorphCancel === \"function\" && elFrom.qMorphCancel();\n      return;\n    }\n    elFrom !== elTo && typeof elTo.qMorphCancel === \"function\" && elTo.qMorphCancel();\n    options.keepToClone !== true && elTo.classList.add(\"q-morph--internal\");\n    elFromClone.classList.add(\"q-morph--internal\");\n    const {\n      width: elFromParentWidthAfter,\n      height: elFromParentHeightAfter\n    } = getAbsoluteSize(elFromParent);\n    const {\n      width: elToParentWidthBefore,\n      height: elToParentHeightBefore\n    } = getAbsoluteSize(elTo.parentNode);\n    options.hideFromClone !== true && elFromClone.classList.remove(\"q-morph--internal\");\n    elTo.qMorphCancel = () => {\n      cancelStatus = true;\n      elFromClone.remove();\n      elFromTween !== void 0 && elFromTween.remove();\n      options.hideFromClone === true && elFromClone.classList.remove(\"q-morph--internal\");\n      options.keepToClone !== true && elTo.classList.remove(\"q-morph--internal\");\n      elFrom.qMorphCancel = void 0;\n      elTo.qMorphCancel = void 0;\n    };\n    const animate = () => {\n      if (cancelStatus === true) {\n        typeof elTo.qMorphCancel === \"function\" && elTo.qMorphCancel();\n        return;\n      }\n      if (options.hideFromClone !== true) {\n        elFromClone.classList.add(\"q-morph--internal\");\n        elFromClone.innerHTML = \"\";\n        elFromClone.style.left = 0;\n        elFromClone.style.right = \"unset\";\n        elFromClone.style.top = 0;\n        elFromClone.style.bottom = \"unset\";\n        elFromClone.style.transform = \"none\";\n      }\n      if (options.keepToClone !== true) {\n        elTo.classList.remove(\"q-morph--internal\");\n      }\n      const elToParent = elTo.parentNode;\n      const {\n        width: elToParentWidthAfter,\n        height: elToParentHeightAfter\n      } = getAbsoluteSize(elToParent);\n      const elToClone = elTo.cloneNode(options.keepToClone);\n      elToClone.setAttribute(\"aria-hidden\", \"true\");\n      if (options.keepToClone !== true) {\n        elToClone.style.left = 0;\n        elToClone.style.right = \"unset\";\n        elToClone.style.top = 0;\n        elToClone.style.bottom = \"unset\";\n        elToClone.style.transform = \"none\";\n        elToClone.style.pointerEvents = \"none\";\n      }\n      elToClone.classList.add(\"q-morph--internal\");\n      const elToNext = elTo === elFrom && elFromParent === elToParent ? elFromClone : elTo.nextElementSibling;\n      elToParent.insertBefore(elToClone, elToNext);\n      const {\n        borderWidth: elToBorderWidth,\n        borderStyle: elToBorderStyle,\n        borderColor: elToBorderColor,\n        borderRadius: elToBorderRadius,\n        backgroundColor: elToBackground,\n        transform: elToTransform,\n        position: elToPositioningType,\n        cssText: elToCssText\n      } = getComputedStyle2(elTo, [\"borderWidth\", \"borderStyle\", \"borderColor\", \"borderRadius\", \"backgroundColor\", \"transform\", \"position\", \"cssText\"]);\n      const elToClassSaved = elTo.classList.toString();\n      const elToStyleSaved = elTo.style.cssText;\n      elTo.style.cssText = elToCssText;\n      elTo.style.transform = \"none\";\n      elTo.style.animation = \"none\";\n      elTo.style.transition = \"none\";\n      elTo.className = elToClassSaved.split(\" \").filter((c) => /^bg-/.test(c) === false).join(\" \");\n      const elToPosition = getAbsolutePosition(elTo, options.resize);\n      const deltaX = elFromPosition.left - elToPosition.left;\n      const deltaY = elFromPosition.top - elToPosition.top;\n      const scaleX = elFromPosition.width / (elToPosition.width > 0 ? elToPosition.width : 10);\n      const scaleY = elFromPosition.height / (elToPosition.height > 0 ? elToPosition.height : 100);\n      const elFromParentWidthDiff = elFromParentWidthBefore - elFromParentWidthAfter;\n      const elFromParentHeightDiff = elFromParentHeightBefore - elFromParentHeightAfter;\n      const elToParentWidthDiff = elToParentWidthAfter - elToParentWidthBefore;\n      const elToParentHeightDiff = elToParentHeightAfter - elToParentHeightBefore;\n      const elFromCloneWidth = Math.max(elFromPosition.widthM, elFromParentWidthDiff);\n      const elFromCloneHeight = Math.max(elFromPosition.heightM, elFromParentHeightDiff);\n      const elToCloneWidth = Math.max(elToPosition.widthM, elToParentWidthDiff);\n      const elToCloneHeight = Math.max(elToPosition.heightM, elToParentHeightDiff);\n      const elSharedSize = elFrom === elTo && [\"absolute\", \"fixed\"].includes(elToPositioningType) === false && [\"absolute\", \"fixed\"].includes(elFromPositioningType) === false;\n      let elToNeedsFixedPosition = elToPositioningType === \"fixed\";\n      let parent = elToParent;\n      while (elToNeedsFixedPosition !== true && parent !== document) {\n        elToNeedsFixedPosition = window.getComputedStyle(parent).position === \"fixed\";\n        parent = parent.parentNode;\n      }\n      if (options.hideFromClone !== true) {\n        elFromClone.style.display = \"block\";\n        elFromClone.style.flex = \"0 0 auto\";\n        elFromClone.style.opacity = 0;\n        elFromClone.style.minWidth = \"unset\";\n        elFromClone.style.maxWidth = \"unset\";\n        elFromClone.style.minHeight = \"unset\";\n        elFromClone.style.maxHeight = \"unset\";\n        elFromClone.classList.remove(\"q-morph--internal\");\n      }\n      if (options.keepToClone !== true) {\n        elToClone.style.display = \"block\";\n        elToClone.style.flex = \"0 0 auto\";\n        elToClone.style.opacity = 0;\n        elToClone.style.minWidth = \"unset\";\n        elToClone.style.maxWidth = \"unset\";\n        elToClone.style.minHeight = \"unset\";\n        elToClone.style.maxHeight = \"unset\";\n      }\n      elToClone.classList.remove(\"q-morph--internal\");\n      if (typeof options.classes === \"string\") {\n        elTo.className += \" \" + options.classes;\n      }\n      if (typeof options.style === \"string\") {\n        elTo.style.cssText += \" \" + options.style;\n      } else if (isObject(options.style) === true) {\n        for (const prop in options.style) {\n          elTo.style[prop] = options.style[prop];\n        }\n      }\n      const elFromZIndex = getMaxZIndex(elFromClone);\n      const elToZIndex = getMaxZIndex(elTo);\n      const documentScroll = elToNeedsFixedPosition === true ? document.documentElement : { scrollLeft: 0, scrollTop: 0 };\n      elTo.style.position = elToNeedsFixedPosition === true ? \"fixed\" : \"absolute\";\n      elTo.style.left = `${elToPosition.left - documentScroll.scrollLeft}px`;\n      elTo.style.right = \"unset\";\n      elTo.style.top = `${elToPosition.top - documentScroll.scrollTop}px`;\n      elTo.style.margin = 0;\n      if (options.resize === true) {\n        elTo.style.minWidth = \"unset\";\n        elTo.style.maxWidth = \"unset\";\n        elTo.style.minHeight = \"unset\";\n        elTo.style.maxHeight = \"unset\";\n        elTo.style.overflow = \"hidden\";\n        elTo.style.overflowX = \"hidden\";\n        elTo.style.overflowY = \"hidden\";\n      }\n      document.body.appendChild(elTo);\n      if (elFromTween !== void 0) {\n        elFromTween.style.cssText = elFromCssText;\n        elFromTween.style.transform = \"none\";\n        elFromTween.style.animation = \"none\";\n        elFromTween.style.transition = \"none\";\n        elFromTween.style.position = elTo.style.position;\n        elFromTween.style.left = `${elFromPosition.left - documentScroll.scrollLeft}px`;\n        elFromTween.style.right = \"unset\";\n        elFromTween.style.top = `${elFromPosition.top - documentScroll.scrollTop}px`;\n        elFromTween.style.margin = 0;\n        elFromTween.style.pointerEvents = \"none\";\n        if (options.resize === true) {\n          elFromTween.style.minWidth = \"unset\";\n          elFromTween.style.maxWidth = \"unset\";\n          elFromTween.style.minHeight = \"unset\";\n          elFromTween.style.maxHeight = \"unset\";\n          elFromTween.style.overflow = \"hidden\";\n          elFromTween.style.overflowX = \"hidden\";\n          elFromTween.style.overflowY = \"hidden\";\n        }\n        document.body.appendChild(elFromTween);\n      }\n      const commonCleanup = (aborted) => {\n        if (elFrom === elTo && endElementTo !== true) {\n          elTo.style.cssText = elFromStyleSaved;\n          elTo.className = elFromClassSaved;\n        } else {\n          elTo.style.cssText = elToStyleSaved;\n          elTo.className = elToClassSaved;\n        }\n        elToClone.parentNode === elToParent && elToParent.insertBefore(elTo, elToClone);\n        elFromClone.remove();\n        elToClone.remove();\n        elFromTween !== void 0 && elFromTween.remove();\n        cancel = () => false;\n        elFrom.qMorphCancel = void 0;\n        elTo.qMorphCancel = void 0;\n        if (typeof options.onEnd === \"function\") {\n          options.onEnd(endElementTo === true ? \"to\" : \"from\", aborted === true);\n        }\n      };\n      if (options.useCSS !== true && typeof elTo.animate === \"function\") {\n        const resizeFrom = options.resize === true ? {\n          transform: `translate(${deltaX}px, ${deltaY}px)`,\n          width: `${elFromCloneWidth}px`,\n          height: `${elFromCloneHeight}px`\n        } : {\n          transform: `translate(${deltaX}px, ${deltaY}px) scale(${scaleX}, ${scaleY})`\n        };\n        const resizeTo = options.resize === true ? {\n          width: `${elToCloneWidth}px`,\n          height: `${elToCloneHeight}px`\n        } : {};\n        const resizeFromTween = options.resize === true ? {\n          width: `${elFromCloneWidth}px`,\n          height: `${elFromCloneHeight}px`\n        } : {};\n        const resizeToTween = options.resize === true ? {\n          transform: `translate(${-1 * deltaX}px, ${-1 * deltaY}px)`,\n          width: `${elToCloneWidth}px`,\n          height: `${elToCloneHeight}px`\n        } : {\n          transform: `translate(${-1 * deltaX}px, ${-1 * deltaY}px) scale(${1 / scaleX}, ${1 / scaleY})`\n        };\n        const tweenFrom = elFromTween !== void 0 ? { opacity: options.tweenToOpacity } : { backgroundColor: elFromBackground };\n        const tweenTo = elFromTween !== void 0 ? { opacity: 1 } : { backgroundColor: elToBackground };\n        animationTo = elTo.animate([\n          {\n            margin: 0,\n            borderWidth: elFromBorderWidth,\n            borderStyle: elFromBorderStyle,\n            borderColor: elFromBorderColor,\n            borderRadius: elFromBorderRadius,\n            zIndex: elFromZIndex,\n            transformOrigin: \"0 0\",\n            ...resizeFrom,\n            ...tweenFrom\n          },\n          {\n            margin: 0,\n            borderWidth: elToBorderWidth,\n            borderStyle: elToBorderStyle,\n            borderColor: elToBorderColor,\n            borderRadius: elToBorderRadius,\n            zIndex: elToZIndex,\n            transformOrigin: \"0 0\",\n            transform: elToTransform,\n            ...resizeTo,\n            ...tweenTo\n          }\n        ], {\n          duration: options.duration,\n          easing: options.easing,\n          fill: options.fill,\n          delay: options.delay\n        });\n        animationFromTween = elFromTween === void 0 ? void 0 : elFromTween.animate([\n          {\n            opacity: options.tweenFromOpacity,\n            margin: 0,\n            borderWidth: elFromBorderWidth,\n            borderStyle: elFromBorderStyle,\n            borderColor: elFromBorderColor,\n            borderRadius: elFromBorderRadius,\n            zIndex: elFromZIndex,\n            transformOrigin: \"0 0\",\n            transform: elFromTransform,\n            ...resizeFromTween\n          },\n          {\n            opacity: 0,\n            margin: 0,\n            borderWidth: elToBorderWidth,\n            borderStyle: elToBorderStyle,\n            borderColor: elToBorderColor,\n            borderRadius: elToBorderRadius,\n            zIndex: elToZIndex,\n            transformOrigin: \"0 0\",\n            ...resizeToTween\n          }\n        ], {\n          duration: options.duration,\n          easing: options.easing,\n          fill: options.fill,\n          delay: options.delay\n        });\n        animationFromClone = options.hideFromClone === true || elSharedSize === true ? void 0 : elFromClone.animate([\n          {\n            margin: `${elFromParentHeightDiff < 0 ? elFromParentHeightDiff / 2 : 0}px ${elFromParentWidthDiff < 0 ? elFromParentWidthDiff / 2 : 0}px`,\n            width: `${elFromCloneWidth + elFromPosition.marginH}px`,\n            height: `${elFromCloneHeight + elFromPosition.marginV}px`\n          },\n          {\n            margin: 0,\n            width: 0,\n            height: 0\n          }\n        ], {\n          duration: options.duration,\n          easing: options.easing,\n          fill: options.fill,\n          delay: options.delay\n        });\n        animationToClone = options.keepToClone === true ? void 0 : elToClone.animate([\n          elSharedSize === true ? {\n            margin: `${elFromParentHeightDiff < 0 ? elFromParentHeightDiff / 2 : 0}px ${elFromParentWidthDiff < 0 ? elFromParentWidthDiff / 2 : 0}px`,\n            width: `${elFromCloneWidth + elFromPosition.marginH}px`,\n            height: `${elFromCloneHeight + elFromPosition.marginV}px`\n          } : {\n            margin: 0,\n            width: 0,\n            height: 0\n          },\n          {\n            margin: `${elToParentHeightDiff < 0 ? elToParentHeightDiff / 2 : 0}px ${elToParentWidthDiff < 0 ? elToParentWidthDiff / 2 : 0}px`,\n            width: `${elToCloneWidth + elToPosition.marginH}px`,\n            height: `${elToCloneHeight + elToPosition.marginV}px`\n          }\n        ], {\n          duration: options.duration,\n          easing: options.easing,\n          fill: options.fill,\n          delay: options.delay\n        });\n        const cleanup = (abort) => {\n          animationFromClone !== void 0 && animationFromClone.cancel();\n          animationFromTween !== void 0 && animationFromTween.cancel();\n          animationToClone !== void 0 && animationToClone.cancel();\n          animationTo.cancel();\n          animationTo.removeEventListener(\"finish\", cleanup);\n          animationTo.removeEventListener(\"cancel\", cleanup);\n          commonCleanup(abort);\n          animationFromClone = void 0;\n          animationFromTween = void 0;\n          animationToClone = void 0;\n          animationTo = void 0;\n        };\n        elFrom.qMorphCancel = () => {\n          elFrom.qMorphCancel = void 0;\n          cancelStatus = true;\n          cleanup();\n        };\n        elTo.qMorphCancel = () => {\n          elTo.qMorphCancel = void 0;\n          cancelStatus = true;\n          cleanup();\n        };\n        animationTo.addEventListener(\"finish\", cleanup);\n        animationTo.addEventListener(\"cancel\", cleanup);\n        cancel = (abort) => {\n          if (cancelStatus === true || animationTo === void 0) {\n            return false;\n          }\n          if (abort === true) {\n            cleanup(true);\n            return true;\n          }\n          endElementTo = endElementTo !== true;\n          animationFromClone !== void 0 && animationFromClone.reverse();\n          animationFromTween !== void 0 && animationFromTween.reverse();\n          animationToClone !== void 0 && animationToClone.reverse();\n          animationTo.reverse();\n          return true;\n        };\n      } else {\n        const qAnimId = `q-morph-anim-${++id2}`;\n        const style2 = document.createElement(\"style\");\n        const resizeFrom = options.resize === true ? `\n            transform: translate(${deltaX}px, ${deltaY}px);\n            width: ${elFromCloneWidth}px;\n            height: ${elFromCloneHeight}px;\n          ` : `transform: translate(${deltaX}px, ${deltaY}px) scale(${scaleX}, ${scaleY});`;\n        const resizeTo = options.resize === true ? `\n            width: ${elToCloneWidth}px;\n            height: ${elToCloneHeight}px;\n          ` : \"\";\n        const resizeFromTween = options.resize === true ? `\n            width: ${elFromCloneWidth}px;\n            height: ${elFromCloneHeight}px;\n          ` : \"\";\n        const resizeToTween = options.resize === true ? `\n            transform: translate(${-1 * deltaX}px, ${-1 * deltaY}px);\n            width: ${elToCloneWidth}px;\n            height: ${elToCloneHeight}px;\n          ` : `transform: translate(${-1 * deltaX}px, ${-1 * deltaY}px) scale(${1 / scaleX}, ${1 / scaleY});`;\n        const tweenFrom = elFromTween !== void 0 ? `opacity: ${options.tweenToOpacity};` : `background-color: ${elFromBackground};`;\n        const tweenTo = elFromTween !== void 0 ? \"opacity: 1;\" : `background-color: ${elToBackground};`;\n        const keyframesFromTween = elFromTween === void 0 ? \"\" : `\n            @keyframes ${qAnimId}-from-tween {\n              0% {\n                opacity: ${options.tweenFromOpacity};\n                margin: 0;\n                border-width: ${elFromBorderWidth};\n                border-style: ${elFromBorderStyle};\n                border-color: ${elFromBorderColor};\n                border-radius: ${elFromBorderRadius};\n                z-index: ${elFromZIndex};\n                transform-origin: 0 0;\n                transform: ${elFromTransform};\n                ${resizeFromTween}\n              }\n\n              100% {\n                opacity: 0;\n                margin: 0;\n                border-width: ${elToBorderWidth};\n                border-style: ${elToBorderStyle};\n                border-color: ${elToBorderColor};\n                border-radius: ${elToBorderRadius};\n                z-index: ${elToZIndex};\n                transform-origin: 0 0;\n                ${resizeToTween}\n              }\n            }\n          `;\n        const keyframesFrom = options.hideFromClone === true || elSharedSize === true ? \"\" : `\n            @keyframes ${qAnimId}-from {\n              0% {\n                margin: ${elFromParentHeightDiff < 0 ? elFromParentHeightDiff / 2 : 0}px ${elFromParentWidthDiff < 0 ? elFromParentWidthDiff / 2 : 0}px;\n                width: ${elFromCloneWidth + elFromPosition.marginH}px;\n                height: ${elFromCloneHeight + elFromPosition.marginV}px;\n              }\n\n              100% {\n                margin: 0;\n                width: 0;\n                height: 0;\n              }\n            }\n          `;\n        const keyframeToStart = elSharedSize === true ? `\n            margin: ${elFromParentHeightDiff < 0 ? elFromParentHeightDiff / 2 : 0}px ${elFromParentWidthDiff < 0 ? elFromParentWidthDiff / 2 : 0}px;\n            width: ${elFromCloneWidth + elFromPosition.marginH}px;\n            height: ${elFromCloneHeight + elFromPosition.marginV}px;\n          ` : `\n            margin: 0;\n            width: 0;\n            height: 0;\n          `;\n        const keyframesTo = options.keepToClone === true ? \"\" : `\n            @keyframes ${qAnimId}-to {\n              0% {\n                ${keyframeToStart}\n              }\n\n              100% {\n                margin: ${elToParentHeightDiff < 0 ? elToParentHeightDiff / 2 : 0}px ${elToParentWidthDiff < 0 ? elToParentWidthDiff / 2 : 0}px;\n                width: ${elToCloneWidth + elToPosition.marginH}px;\n                height: ${elToCloneHeight + elToPosition.marginV}px;\n              }\n            }\n          `;\n        style2.innerHTML = `\n          @keyframes ${qAnimId} {\n            0% {\n              margin: 0;\n              border-width: ${elFromBorderWidth};\n              border-style: ${elFromBorderStyle};\n              border-color: ${elFromBorderColor};\n              border-radius: ${elFromBorderRadius};\n              background-color: ${elFromBackground};\n              z-index: ${elFromZIndex};\n              transform-origin: 0 0;\n              ${resizeFrom}\n              ${tweenFrom}\n            }\n\n            100% {\n              margin: 0;\n              border-width: ${elToBorderWidth};\n              border-style: ${elToBorderStyle};\n              border-color: ${elToBorderColor};\n              border-radius: ${elToBorderRadius};\n              background-color: ${elToBackground};\n              z-index: ${elToZIndex};\n              transform-origin: 0 0;\n              transform: ${elToTransform};\n              ${resizeTo}\n              ${tweenTo}\n            }\n          }\n\n          ${keyframesFrom}\n\n          ${keyframesFromTween}\n\n          ${keyframesTo}\n        `;\n        document.head.appendChild(style2);\n        let animationDirection = \"normal\";\n        elFromClone.style.animation = `${options.duration}ms ${options.easing} ${options.delay}ms ${animationDirection} ${options.fill} ${qAnimId}-from`;\n        if (elFromTween !== void 0) {\n          elFromTween.style.animation = `${options.duration}ms ${options.easing} ${options.delay}ms ${animationDirection} ${options.fill} ${qAnimId}-from-tween`;\n        }\n        elToClone.style.animation = `${options.duration}ms ${options.easing} ${options.delay}ms ${animationDirection} ${options.fill} ${qAnimId}-to`;\n        elTo.style.animation = `${options.duration}ms ${options.easing} ${options.delay}ms ${animationDirection} ${options.fill} ${qAnimId}`;\n        const cleanup = (evt) => {\n          if (evt === Object(evt) && evt.animationName !== qAnimId) return;\n          elTo.removeEventListener(\"animationend\", cleanup);\n          elTo.removeEventListener(\"animationcancel\", cleanup);\n          commonCleanup();\n          style2.remove();\n        };\n        elFrom.qMorphCancel = () => {\n          elFrom.qMorphCancel = void 0;\n          cancelStatus = true;\n          cleanup();\n        };\n        elTo.qMorphCancel = () => {\n          elTo.qMorphCancel = void 0;\n          cancelStatus = true;\n          cleanup();\n        };\n        elTo.addEventListener(\"animationend\", cleanup);\n        elTo.addEventListener(\"animationcancel\", cleanup);\n        cancel = (abort) => {\n          if (cancelStatus === true || !elTo || !elFromClone || !elToClone) {\n            return false;\n          }\n          if (abort === true) {\n            cleanup();\n            return true;\n          }\n          endElementTo = endElementTo !== true;\n          animationDirection = animationDirection === \"normal\" ? \"reverse\" : \"normal\";\n          elFromClone.style.animationDirection = animationDirection;\n          elFromTween.style.animationDirection = animationDirection;\n          elToClone.style.animationDirection = animationDirection;\n          elTo.style.animationDirection = animationDirection;\n          return true;\n        };\n      }\n    };\n    if (options.waitFor > 0 || options.waitFor === \"transitionend\" || options.waitFor === Object(options.waitFor) && typeof options.waitFor.then === \"function\") {\n      const delayPromise = options.waitFor > 0 ? new Promise((resolve) => setTimeout(resolve, options.waitFor)) : options.waitFor === \"transitionend\" ? new Promise((resolve) => {\n        const endFn = () => {\n          if (timer2 !== null) {\n            clearTimeout(timer2);\n            timer2 = null;\n          }\n          if (elTo) {\n            elTo.removeEventListener(\"transitionend\", endFn);\n            elTo.removeEventListener(\"transitioncancel\", endFn);\n          }\n          resolve();\n        };\n        let timer2 = setTimeout(endFn, 400);\n        elTo.addEventListener(\"transitionend\", endFn);\n        elTo.addEventListener(\"transitioncancel\", endFn);\n      }) : options.waitFor;\n      delayPromise.then(animate).catch(() => {\n        typeof elTo.qMorphCancel === \"function\" && elTo.qMorphCancel();\n      });\n    } else {\n      animate();\n    }\n  };\n  typeof _options.onToggle === \"function\" && _options.onToggle();\n  requestAnimationFrame(calculateFinalState);\n  return (abort) => cancel(abort);\n}\n\n// src/directives/morph/Morph.js\nvar morphGroups = {};\nvar props2 = [\n  \"duration\",\n  \"delay\",\n  \"easing\",\n  \"fill\",\n  \"classes\",\n  \"style\",\n  \"duration\",\n  \"resize\",\n  \"useCSS\",\n  \"hideFromClone\",\n  \"keepToClone\",\n  \"tween\",\n  \"tweenFromOpacity\",\n  \"tweenToOpacity\",\n  \"waitFor\",\n  \"onEnd\"\n];\nvar mods = [\n  \"resize\",\n  \"useCSS\",\n  \"hideFromClone\",\n  \"keepToClone\",\n  \"tween\"\n];\nfunction changeClass(ctx, action) {\n  if (ctx.clsAction !== action) {\n    ctx.clsAction = action;\n    ctx.el.classList[action](\"q-morph--invisible\");\n  }\n}\nfunction trigger2(group) {\n  if (group.animating === true || group.queue.length < 2) return;\n  const [from, to] = group.queue;\n  group.animating = true;\n  from.animating = true;\n  to.animating = true;\n  changeClass(from, \"remove\");\n  changeClass(to, \"remove\");\n  const cancelFn = morph({\n    from: from.el,\n    to: to.el,\n    onToggle() {\n      changeClass(from, \"add\");\n      changeClass(to, \"remove\");\n    },\n    ...to.opts,\n    onEnd(dir, aborted) {\n      to.opts.onEnd !== void 0 && to.opts.onEnd(dir, aborted);\n      if (aborted === true) return;\n      from.animating = false;\n      to.animating = false;\n      group.animating = false;\n      group.cancel = void 0;\n      group.queue.shift();\n      trigger2(group);\n    }\n  });\n  group.cancel = () => {\n    cancelFn(true);\n    group.cancel = void 0;\n  };\n}\nfunction updateModifiers2(mod2, ctx) {\n  const opts = ctx.opts;\n  mods.forEach((name2) => {\n    opts[name2] = mod2[name2] === true;\n  });\n}\nfunction insertArgs(arg, ctx) {\n  const opts = typeof arg === \"string\" && arg.length !== 0 ? arg.split(\":\") : [];\n  ctx.name = opts[0];\n  ctx.group = opts[1];\n  Object.assign(ctx.opts, {\n    duration: isNaN(opts[2]) === true ? 300 : parseFloat(opts[2]),\n    waitFor: opts[3]\n  });\n}\nfunction updateArgs(arg, ctx) {\n  if (arg.group !== void 0) {\n    ctx.group = arg.group;\n  }\n  if (arg.name !== void 0) {\n    ctx.name = arg.name;\n  }\n  const opts = ctx.opts;\n  props2.forEach((name2) => {\n    if (arg[name2] !== void 0) {\n      opts[name2] = arg[name2];\n    }\n  });\n}\nfunction updateModel(name2, ctx) {\n  if (ctx.name === name2) {\n    const group = morphGroups[ctx.group];\n    if (group === void 0) {\n      morphGroups[ctx.group] = {\n        name: ctx.group,\n        model: name2,\n        queue: [ctx],\n        animating: false\n      };\n      changeClass(ctx, \"remove\");\n    } else if (group.model !== name2) {\n      group.model = name2;\n      group.queue.push(ctx);\n      if (group.animating === false && group.queue.length === 2) {\n        trigger2(group);\n      }\n    }\n    return;\n  }\n  if (ctx.animating === false) {\n    changeClass(ctx, \"add\");\n  }\n}\nfunction updateValue(ctx, value2) {\n  let model;\n  if (Object(value2) === value2) {\n    model = \"\" + value2.model;\n    updateArgs(value2, ctx);\n    updateModifiers2(value2, ctx);\n  } else {\n    model = \"\" + value2;\n  }\n  if (model !== ctx.model) {\n    ctx.model = model;\n    updateModel(model, ctx);\n  } else if (ctx.animating === false && ctx.clsAction !== void 0) {\n    ctx.el.classList[ctx.clsAction](\"q-morph--invisible\");\n  }\n}\nvar Morph_default = createDirective(\n  false ? {\n    name: \"morph\",\n    getSSRProps: (binding) => {\n      const name2 = binding.arg ? binding.arg.split(\":\")[0] : false;\n      return {\n        class: name2 === binding.value ? \"\" : \"q-morph--invisible\"\n      };\n    }\n  } : {\n    name: \"morph\",\n    mounted(el, binding) {\n      const ctx = {\n        el,\n        animating: false,\n        opts: {}\n      };\n      updateModifiers2(binding.modifiers, ctx);\n      insertArgs(binding.arg, ctx);\n      updateValue(ctx, binding.value);\n      el.__qmorph = ctx;\n    },\n    updated(el, binding) {\n      updateValue(el.__qmorph, binding.value);\n    },\n    beforeUnmount(el) {\n      const ctx = el.__qmorph;\n      const group = morphGroups[ctx.group];\n      if (group !== void 0) {\n        const index = group.queue.indexOf(ctx);\n        if (index !== -1) {\n          group.queue = group.queue.filter((item) => item !== ctx);\n          if (group.queue.length === 0) {\n            group.cancel !== void 0 && group.cancel();\n            delete morphGroups[ctx.group];\n          }\n        }\n      }\n      if (ctx.clsAction === \"add\") {\n        el.classList.remove(\"q-morph--invisible\");\n      }\n      delete el.__qmorph;\n    }\n  }\n);\n\n// src/directives/mutation/Mutation.js\nvar defaultCfg2 = {\n  childList: true,\n  subtree: true,\n  attributes: true,\n  characterData: true,\n  attributeOldValue: true,\n  characterDataOldValue: true\n};\nfunction update3(el, ctx, value2) {\n  ctx.handler = value2;\n  ctx.observer !== void 0 && ctx.observer.disconnect();\n  ctx.observer = new MutationObserver((list) => {\n    if (typeof ctx.handler === \"function\") {\n      const res = ctx.handler(list);\n      if (res === false || ctx.once === true) {\n        destroy2(el);\n      }\n    }\n  });\n  ctx.observer.observe(el, ctx.opts);\n}\nfunction destroy2(el) {\n  const ctx = el.__qmutation;\n  if (ctx !== void 0) {\n    ctx.observer !== void 0 && ctx.observer.disconnect();\n    delete el.__qmutation;\n  }\n}\nvar Mutation_default = createDirective(\n  false ? { name: \"mutation\", getSSRProps: noop_ssr_directive_transform_default } : {\n    name: \"mutation\",\n    mounted(el, { modifiers: { once, ...mod2 }, value: value2 }) {\n      const ctx = {\n        once,\n        opts: Object.keys(mod2).length === 0 ? defaultCfg2 : mod2\n      };\n      update3(el, ctx, value2);\n      el.__qmutation = ctx;\n    },\n    updated(el, { oldValue, value: value2 }) {\n      const ctx = el.__qmutation;\n      if (ctx !== void 0 && oldValue !== value2) {\n        update3(el, ctx, value2);\n      }\n    },\n    beforeUnmount: destroy2\n  }\n);\n\n// src/directives/scroll-fire/ScrollFire.js\nvar { passive: passive5 } = listenOpts;\nfunction update4(ctx, { value: value2, oldValue }) {\n  if (typeof value2 !== \"function\") {\n    ctx.scrollTarget.removeEventListener(\"scroll\", ctx.scroll, passive5);\n    return;\n  }\n  ctx.handler = value2;\n  if (typeof oldValue !== \"function\") {\n    ctx.scrollTarget.addEventListener(\"scroll\", ctx.scroll, passive5);\n    ctx.scroll();\n  }\n}\nvar ScrollFire_default = createDirective(\n  false ? { name: \"scroll-fire\", getSSRProps: noop_ssr_directive_transform_default } : {\n    name: \"scroll-fire\",\n    mounted(el, binding) {\n      const ctx = {\n        scrollTarget: getScrollTarget(el),\n        scroll: debounce_default(() => {\n          let containerBottom, elBottom;\n          if (ctx.scrollTarget === window) {\n            elBottom = el.getBoundingClientRect().bottom;\n            containerBottom = window.innerHeight;\n          } else {\n            elBottom = offset(el).top + height(el);\n            containerBottom = offset(ctx.scrollTarget).top + height(ctx.scrollTarget);\n          }\n          if (elBottom > 0 && elBottom < containerBottom) {\n            ctx.scrollTarget.removeEventListener(\"scroll\", ctx.scroll, passive5);\n            ctx.handler(el);\n          }\n        }, 25)\n      };\n      update4(ctx, binding);\n      el.__qscrollfire = ctx;\n    },\n    updated(el, binding) {\n      if (binding.value !== binding.oldValue) {\n        update4(el.__qscrollfire, binding);\n      }\n    },\n    beforeUnmount(el) {\n      const ctx = el.__qscrollfire;\n      ctx.scrollTarget.removeEventListener(\"scroll\", ctx.scroll, passive5);\n      ctx.scroll.cancel();\n      delete el.__qscrollfire;\n    }\n  }\n);\n\n// src/directives/scroll/Scroll.js\nfunction update5(ctx, { value: value2, oldValue }) {\n  if (typeof value2 !== \"function\") {\n    ctx.scrollTarget.removeEventListener(\"scroll\", ctx.scroll, listenOpts.passive);\n    return;\n  }\n  ctx.handler = value2;\n  if (typeof oldValue !== \"function\") {\n    ctx.scrollTarget.addEventListener(\"scroll\", ctx.scroll, listenOpts.passive);\n  }\n}\nvar Scroll_default = createDirective(\n  false ? { name: \"scroll\", getSSRProps: noop_ssr_directive_transform_default } : {\n    name: \"scroll\",\n    mounted(el, binding) {\n      const ctx = {\n        scrollTarget: getScrollTarget(el),\n        scroll() {\n          ctx.handler(\n            getVerticalScrollPosition(ctx.scrollTarget),\n            getHorizontalScrollPosition(ctx.scrollTarget)\n          );\n        }\n      };\n      update5(ctx, binding);\n      el.__qscroll = ctx;\n    },\n    updated(el, binding) {\n      if (el.__qscroll !== void 0 && binding.oldValue !== binding.value) {\n        update5(el.__qscroll, binding);\n      }\n    },\n    beforeUnmount(el) {\n      const ctx = el.__qscroll;\n      ctx.scrollTarget.removeEventListener(\"scroll\", ctx.scroll, listenOpts.passive);\n      delete el.__qscroll;\n    }\n  }\n);\n\n// src/directives/touch-hold/TouchHold.js\nvar TouchHold_default = createDirective(\n  false ? { name: \"touch-hold\", getSSRProps: noop_ssr_directive_transform_default } : {\n    name: \"touch-hold\",\n    beforeMount(el, binding) {\n      const { modifiers } = binding;\n      if (modifiers.mouse !== true && client.has.touch !== true) return;\n      const ctx = {\n        handler: binding.value,\n        noop,\n        mouseStart(evt) {\n          if (typeof ctx.handler === \"function\" && leftClick(evt) === true) {\n            addEvt(ctx, \"temp\", [\n              [document, \"mousemove\", \"move\", \"passiveCapture\"],\n              [document, \"click\", \"end\", \"notPassiveCapture\"]\n            ]);\n            ctx.start(evt, true);\n          }\n        },\n        touchStart(evt) {\n          if (evt.target !== void 0 && typeof ctx.handler === \"function\") {\n            const target2 = evt.target;\n            addEvt(ctx, \"temp\", [\n              [target2, \"touchmove\", \"move\", \"passiveCapture\"],\n              [target2, \"touchcancel\", \"end\", \"notPassiveCapture\"],\n              [target2, \"touchend\", \"end\", \"notPassiveCapture\"]\n            ]);\n            ctx.start(evt);\n          }\n        },\n        start(evt, mouseEvent) {\n          ctx.origin = position(evt);\n          const startTime = Date.now();\n          if (client.is.mobile === true) {\n            document.body.classList.add(\"non-selectable\");\n            clearSelection();\n            ctx.styleCleanup = (withDelay) => {\n              ctx.styleCleanup = void 0;\n              const remove2 = () => {\n                document.body.classList.remove(\"non-selectable\");\n              };\n              if (withDelay === true) {\n                clearSelection();\n                setTimeout(remove2, 10);\n              } else {\n                remove2();\n              }\n            };\n          }\n          ctx.triggered = false;\n          ctx.sensitivity = mouseEvent === true ? ctx.mouseSensitivity : ctx.touchSensitivity;\n          ctx.timer = setTimeout(() => {\n            ctx.timer = void 0;\n            clearSelection();\n            ctx.triggered = true;\n            ctx.handler({\n              evt,\n              touch: mouseEvent !== true,\n              mouse: mouseEvent === true,\n              position: ctx.origin,\n              duration: Date.now() - startTime\n            });\n          }, ctx.duration);\n        },\n        move(evt) {\n          const { top, left } = position(evt);\n          if (ctx.timer !== void 0 && (Math.abs(left - ctx.origin.left) >= ctx.sensitivity || Math.abs(top - ctx.origin.top) >= ctx.sensitivity)) {\n            clearTimeout(ctx.timer);\n            ctx.timer = void 0;\n          }\n        },\n        end(evt) {\n          cleanEvt(ctx, \"temp\");\n          ctx.styleCleanup !== void 0 && ctx.styleCleanup(ctx.triggered);\n          if (ctx.triggered === true) {\n            evt !== void 0 && stopAndPrevent(evt);\n          } else if (ctx.timer !== void 0) {\n            clearTimeout(ctx.timer);\n            ctx.timer = void 0;\n          }\n        }\n      };\n      const data = [600, 5, 7];\n      if (typeof binding.arg === \"string\" && binding.arg.length !== 0) {\n        binding.arg.split(\":\").forEach((val, index) => {\n          const v = parseInt(val, 10);\n          v && (data[index] = v);\n        });\n      }\n      [ctx.duration, ctx.touchSensitivity, ctx.mouseSensitivity] = data;\n      el.__qtouchhold = ctx;\n      if (modifiers.mouse === true) {\n        const capture = modifiers.mouseCapture === true || modifiers.mousecapture === true ? \"Capture\" : \"\";\n        addEvt(ctx, \"main\", [\n          [el, \"mousedown\", \"mouseStart\", `passive${capture}`]\n        ]);\n      }\n      client.has.touch === true && addEvt(ctx, \"main\", [\n        [el, \"touchstart\", \"touchStart\", `passive${modifiers.capture === true ? \"Capture\" : \"\"}`],\n        [el, \"touchend\", \"noop\", \"notPassiveCapture\"]\n      ]);\n    },\n    updated(el, binding) {\n      const ctx = el.__qtouchhold;\n      if (ctx !== void 0 && binding.oldValue !== binding.value) {\n        typeof binding.value !== \"function\" && ctx.end();\n        ctx.handler = binding.value;\n      }\n    },\n    beforeUnmount(el) {\n      const ctx = el.__qtouchhold;\n      if (ctx !== void 0) {\n        cleanEvt(ctx, \"main\");\n        cleanEvt(ctx, \"temp\");\n        ctx.timer !== void 0 && clearTimeout(ctx.timer);\n        ctx.styleCleanup !== void 0 && ctx.styleCleanup();\n        delete el.__qtouchhold;\n      }\n    }\n  }\n);\n\n// src/directives/touch-repeat/TouchRepeat.js\nvar keyCodes3 = {\n  esc: 27,\n  tab: 9,\n  enter: 13,\n  space: 32,\n  up: 38,\n  left: 37,\n  right: 39,\n  down: 40,\n  delete: [8, 46]\n};\nvar keyRegex = new RegExp(`^([\\\\d+]+|${Object.keys(keyCodes3).join(\"|\")})$`, \"i\");\nfunction shouldEnd(evt, origin) {\n  const { top, left } = position(evt);\n  return Math.abs(left - origin.left) >= 7 || Math.abs(top - origin.top) >= 7;\n}\nvar TouchRepeat_default = createDirective(\n  false ? { name: \"touch-repeat\", getSSRProps: noop_ssr_directive_transform_default } : {\n    name: \"touch-repeat\",\n    beforeMount(el, { modifiers, value: value2, arg }) {\n      const keyboard = Object.keys(modifiers).reduce((acc, key) => {\n        if (keyRegex.test(key) === true) {\n          const keyCode = isNaN(parseInt(key, 10)) ? keyCodes3[key.toLowerCase()] : parseInt(key, 10);\n          keyCode >= 0 && acc.push(keyCode);\n        }\n        return acc;\n      }, []);\n      if (modifiers.mouse !== true && client.has.touch !== true && keyboard.length === 0) return;\n      const durations = typeof arg === \"string\" && arg.length !== 0 ? arg.split(\":\").map((val) => parseInt(val, 10)) : [0, 600, 300];\n      const durationsLast = durations.length - 1;\n      const ctx = {\n        keyboard,\n        handler: value2,\n        noop,\n        mouseStart(evt) {\n          if (ctx.event === void 0 && typeof ctx.handler === \"function\" && leftClick(evt) === true) {\n            addEvt(ctx, \"temp\", [\n              [document, \"mousemove\", \"move\", \"passiveCapture\"],\n              [document, \"click\", \"end\", \"notPassiveCapture\"]\n            ]);\n            ctx.start(evt, true);\n          }\n        },\n        keyboardStart(evt) {\n          if (typeof ctx.handler === \"function\" && isKeyCode(evt, keyboard) === true) {\n            if (durations[0] === 0 || ctx.event !== void 0) {\n              stopAndPrevent(evt);\n              el.focus();\n              if (ctx.event !== void 0) return;\n            }\n            addEvt(ctx, \"temp\", [\n              [document, \"keyup\", \"end\", \"notPassiveCapture\"],\n              [document, \"click\", \"end\", \"notPassiveCapture\"]\n            ]);\n            ctx.start(evt, false, true);\n          }\n        },\n        touchStart(evt) {\n          if (evt.target !== void 0 && typeof ctx.handler === \"function\") {\n            const target2 = evt.target;\n            addEvt(ctx, \"temp\", [\n              [target2, \"touchmove\", \"move\", \"passiveCapture\"],\n              [target2, \"touchcancel\", \"end\", \"notPassiveCapture\"],\n              [target2, \"touchend\", \"end\", \"notPassiveCapture\"]\n            ]);\n            ctx.start(evt);\n          }\n        },\n        start(evt, mouseEvent, keyboardEvent) {\n          if (keyboardEvent !== true) {\n            ctx.origin = position(evt);\n          }\n          function styleCleanup(withDelay) {\n            ctx.styleCleanup = void 0;\n            document.documentElement.style.cursor = \"\";\n            const remove2 = () => {\n              document.body.classList.remove(\"non-selectable\");\n            };\n            if (withDelay === true) {\n              clearSelection();\n              setTimeout(remove2, 10);\n            } else {\n              remove2();\n            }\n          }\n          if (client.is.mobile === true) {\n            document.body.classList.add(\"non-selectable\");\n            clearSelection();\n            ctx.styleCleanup = styleCleanup;\n          }\n          ctx.event = {\n            touch: mouseEvent !== true && keyboardEvent !== true,\n            mouse: mouseEvent === true,\n            keyboard: keyboardEvent === true,\n            startTime: Date.now(),\n            repeatCount: 0\n          };\n          const fn = () => {\n            ctx.timer = void 0;\n            if (ctx.event === void 0) return;\n            if (ctx.event.repeatCount === 0) {\n              ctx.event.evt = evt;\n              if (keyboardEvent === true) {\n                ctx.event.keyCode = evt.keyCode;\n              } else {\n                ctx.event.position = position(evt);\n              }\n              if (client.is.mobile !== true) {\n                document.documentElement.style.cursor = \"pointer\";\n                document.body.classList.add(\"non-selectable\");\n                clearSelection();\n                ctx.styleCleanup = styleCleanup;\n              }\n            }\n            ctx.event.duration = Date.now() - ctx.event.startTime;\n            ctx.event.repeatCount += 1;\n            ctx.handler(ctx.event);\n            const index = durationsLast < ctx.event.repeatCount ? durationsLast : ctx.event.repeatCount;\n            ctx.timer = setTimeout(fn, durations[index]);\n          };\n          if (durations[0] === 0) {\n            fn();\n          } else {\n            ctx.timer = setTimeout(fn, durations[0]);\n          }\n        },\n        move(evt) {\n          if (ctx.event !== void 0 && ctx.timer !== void 0 && shouldEnd(evt, ctx.origin) === true) {\n            clearTimeout(ctx.timer);\n            ctx.timer = void 0;\n          }\n        },\n        end(evt) {\n          if (ctx.event === void 0) return;\n          ctx.styleCleanup !== void 0 && ctx.styleCleanup(true);\n          evt !== void 0 && ctx.event.repeatCount > 0 && stopAndPrevent(evt);\n          cleanEvt(ctx, \"temp\");\n          if (ctx.timer !== void 0) {\n            clearTimeout(ctx.timer);\n            ctx.timer = void 0;\n          }\n          ctx.event = void 0;\n        }\n      };\n      el.__qtouchrepeat = ctx;\n      if (modifiers.mouse === true) {\n        const capture = modifiers.mouseCapture === true || modifiers.mousecapture === true ? \"Capture\" : \"\";\n        addEvt(ctx, \"main\", [\n          [el, \"mousedown\", \"mouseStart\", `passive${capture}`]\n        ]);\n      }\n      client.has.touch === true && addEvt(ctx, \"main\", [\n        [el, \"touchstart\", \"touchStart\", `passive${modifiers.capture === true ? \"Capture\" : \"\"}`],\n        [el, \"touchend\", \"noop\", \"passiveCapture\"]\n      ]);\n      if (keyboard.length !== 0) {\n        const capture = modifiers.keyCapture === true || modifiers.keycapture === true ? \"Capture\" : \"\";\n        addEvt(ctx, \"main\", [\n          [el, \"keydown\", \"keyboardStart\", `notPassive${capture}`]\n        ]);\n      }\n    },\n    updated(el, { oldValue, value: value2 }) {\n      const ctx = el.__qtouchrepeat;\n      if (ctx !== void 0 && oldValue !== value2) {\n        typeof value2 !== \"function\" && ctx.end();\n        ctx.handler = value2;\n      }\n    },\n    beforeUnmount(el) {\n      const ctx = el.__qtouchrepeat;\n      if (ctx !== void 0) {\n        ctx.timer !== void 0 && clearTimeout(ctx.timer);\n        cleanEvt(ctx, \"main\");\n        cleanEvt(ctx, \"temp\");\n        ctx.styleCleanup !== void 0 && ctx.styleCleanup();\n        delete el.__qtouchrepeat;\n      }\n    }\n  }\n);\n\n// src/utils/css-var/get-css-var.js\nfunction getCssVar(propName, element = document.body) {\n  if (typeof propName !== \"string\") {\n    throw new TypeError(\"Expected a string as propName\");\n  }\n  if (!(element instanceof Element)) {\n    throw new TypeError(\"Expected a DOM element\");\n  }\n  return getComputedStyle(element).getPropertyValue(`--q-${propName}`).trim() || null;\n}\n\n// src/plugins/addressbar/AddressbarColor.js\nvar metaValue;\nfunction getProp() {\n  return client.is.winphone ? \"msapplication-navbutton-color\" : client.is.safari ? \"apple-mobile-web-app-status-bar-style\" : \"theme-color\";\n}\nfunction getMetaTag(v) {\n  const els = document.getElementsByTagName(\"META\");\n  for (const i in els) {\n    if (els[i].name === v) {\n      return els[i];\n    }\n  }\n}\nfunction setColor(hexColor) {\n  if (metaValue === void 0) {\n    metaValue = getProp();\n  }\n  let metaTag = getMetaTag(metaValue);\n  const newTag = metaTag === void 0;\n  if (newTag) {\n    metaTag = document.createElement(\"meta\");\n    metaTag.setAttribute(\"name\", metaValue);\n  }\n  metaTag.setAttribute(\"content\", hexColor);\n  if (newTag) {\n    document.head.appendChild(metaTag);\n  }\n}\nvar AddressbarColor_default = {\n  set: client.is.mobile === true && (client.is.nativeMobile === true || client.is.winphone === true || client.is.safari === true || client.is.webkit === true || client.is.vivaldi === true) ? (hexColor) => {\n    const val = hexColor || getCssVar(\"primary\");\n    if (client.is.nativeMobile === true && window.StatusBar) {\n      window.StatusBar.backgroundColorByHexString(val);\n    } else {\n      setColor(val);\n    }\n  } : noop,\n  install({ $q }) {\n    $q.addressbarColor = this;\n    $q.config.addressbarColor && this.set($q.config.addressbarColor);\n  }\n};\n\n// src/plugins/app-fullscreen/AppFullscreen.js\nvar prefixes = {};\nfunction assignFn(fn) {\n  Object.assign(Plugin4, {\n    request: fn,\n    exit: fn,\n    toggle: fn\n  });\n}\nfunction getFullscreenElement() {\n  return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement || null;\n}\nfunction updateEl() {\n  const newEl = Plugin4.activeEl = Plugin4.isActive === false ? null : getFullscreenElement();\n  changeGlobalNodesTarget(\n    newEl === null || newEl === document.documentElement ? document.body : newEl\n  );\n}\nfunction togglePluginState() {\n  Plugin4.isActive = Plugin4.isActive === false;\n  updateEl();\n}\nfunction promisify(target2, fn) {\n  try {\n    const res = target2[fn]();\n    return res === void 0 ? Promise.resolve() : res;\n  } catch (err) {\n    return Promise.reject(err);\n  }\n}\nvar Plugin4 = createReactivePlugin({\n  isActive: false,\n  activeEl: null\n}, {\n  isCapable: false,\n  install({ $q }) {\n    $q.fullscreen = this;\n  }\n});\nif (false) {\n  assignFn(() => Promise.resolve());\n} else {\n  prefixes.request = [\n    \"requestFullscreen\",\n    \"msRequestFullscreen\",\n    \"mozRequestFullScreen\",\n    \"webkitRequestFullscreen\"\n  ].find((request) => document.documentElement[request] !== void 0);\n  Plugin4.isCapable = prefixes.request !== void 0;\n  if (Plugin4.isCapable === false) {\n    assignFn(() => Promise.reject(\"Not capable\"));\n  } else {\n    Object.assign(Plugin4, {\n      request(target2) {\n        const el = target2 || document.documentElement;\n        const { activeEl } = Plugin4;\n        if (el === activeEl) {\n          return Promise.resolve();\n        }\n        const queue2 = activeEl !== null && el.contains(activeEl) === true ? Plugin4.exit() : Promise.resolve();\n        return queue2.finally(() => promisify(el, prefixes.request));\n      },\n      exit() {\n        return Plugin4.isActive === true ? promisify(document, prefixes.exit) : Promise.resolve();\n      },\n      toggle(target2) {\n        return Plugin4.isActive === true ? Plugin4.exit() : Plugin4.request(target2);\n      }\n    });\n    prefixes.exit = [\n      \"exitFullscreen\",\n      \"msExitFullscreen\",\n      \"mozCancelFullScreen\",\n      \"webkitExitFullscreen\"\n    ].find((exit) => document[exit]);\n    Plugin4.isActive = Boolean(getFullscreenElement());\n    Plugin4.isActive === true && updateEl();\n    [\n      \"onfullscreenchange\",\n      \"onmsfullscreenchange\",\n      \"onwebkitfullscreenchange\"\n    ].forEach((evt) => {\n      document[evt] = togglePluginState;\n    });\n  }\n}\nvar AppFullscreen_default = Plugin4;\n\n// src/plugins/app-visibility/AppVisibility.js\nvar Plugin5 = createReactivePlugin({\n  appVisible: true\n}, {\n  install({ $q }) {\n    if (false) {\n      this.appVisible = $q.appVisible = true;\n      return;\n    }\n    injectProp($q, \"appVisible\", () => this.appVisible);\n  }\n});\nif (true) {\n  let prop, evt;\n  if (typeof document.hidden !== \"undefined\") {\n    prop = \"hidden\";\n    evt = \"visibilitychange\";\n  } else if (typeof document.msHidden !== \"undefined\") {\n    prop = \"msHidden\";\n    evt = \"msvisibilitychange\";\n  } else if (typeof document.webkitHidden !== \"undefined\") {\n    prop = \"webkitHidden\";\n    evt = \"webkitvisibilitychange\";\n  }\n  if (evt && typeof document[prop] !== \"undefined\") {\n    const update6 = () => {\n      Plugin5.appVisible = !document[prop];\n    };\n    document.addEventListener(evt, update6, false);\n  }\n}\nvar AppVisibility_default = Plugin5;\n\n// src/plugins/bottom-sheet/component/BottomSheetComponent.js\nimport { h as h132, ref as ref67, getCurrentInstance as getCurrentInstance84 } from \"vue\";\nvar BottomSheetComponent_default = createComponent({\n  name: \"BottomSheetComponent\",\n  props: {\n    ...useDarkProps,\n    title: String,\n    message: String,\n    actions: Array,\n    grid: Boolean,\n    cardClass: [String, Array, Object],\n    cardStyle: [String, Array, Object]\n  },\n  emits: [\"ok\", \"hide\"],\n  setup(props4, { emit }) {\n    const { proxy } = getCurrentInstance84();\n    const isDark = use_dark_default(props4, proxy.$q);\n    const dialogRef = ref67(null);\n    function show() {\n      dialogRef.value.show();\n    }\n    function hide() {\n      dialogRef.value.hide();\n    }\n    function onOk(action) {\n      emit(\"ok\", action);\n      hide();\n    }\n    function onHide() {\n      emit(\"hide\");\n    }\n    function getGrid() {\n      return props4.actions.map((action) => {\n        const img = action.avatar || action.img;\n        return action.label === void 0 ? h132(QSeparator_default, {\n          class: \"col-all\",\n          dark: isDark.value\n        }) : h132(\"div\", {\n          class: [\n            \"q-bottom-sheet__item q-hoverable q-focusable cursor-pointer relative-position\",\n            action.class\n          ],\n          style: action.style,\n          tabindex: 0,\n          role: \"listitem\",\n          onClick() {\n            onOk(action);\n          },\n          onKeyup(e) {\n            e.keyCode === 13 && onOk(action);\n          }\n        }, [\n          h132(\"div\", { class: \"q-focus-helper\" }),\n          action.icon ? h132(QIcon_default, { name: action.icon, color: action.color }) : img ? h132(\"img\", {\n            class: action.avatar ? \"q-bottom-sheet__avatar\" : \"\",\n            src: img\n          }) : h132(\"div\", { class: \"q-bottom-sheet__empty-icon\" }),\n          h132(\"div\", action.label)\n        ]);\n      });\n    }\n    function getList() {\n      return props4.actions.map((action) => {\n        const img = action.avatar || action.img;\n        return action.label === void 0 ? h132(QSeparator_default, { spaced: true, dark: isDark.value }) : h132(QItem_default, {\n          class: [\"q-bottom-sheet__item\", action.classes],\n          style: action.style,\n          tabindex: 0,\n          clickable: true,\n          dark: isDark.value,\n          onClick() {\n            onOk(action);\n          }\n        }, () => [\n          h132(\n            QItemSection_default,\n            { avatar: true },\n            () => action.icon ? h132(QIcon_default, { name: action.icon, color: action.color }) : img ? h132(\"img\", {\n              class: action.avatar ? \"q-bottom-sheet__avatar\" : \"\",\n              src: img\n            }) : null\n          ),\n          h132(QItemSection_default, () => action.label)\n        ]);\n      });\n    }\n    function getCardContent() {\n      const child = [];\n      props4.title && child.push(\n        h132(QCardSection_default, {\n          class: \"q-dialog__title\"\n        }, () => props4.title)\n      );\n      props4.message && child.push(\n        h132(QCardSection_default, {\n          class: \"q-dialog__message\"\n        }, () => props4.message)\n      );\n      child.push(\n        props4.grid === true ? h132(\"div\", {\n          class: \"row items-stretch justify-start\",\n          role: \"list\"\n        }, getGrid()) : h132(\"div\", {\n          role: \"list\"\n        }, getList())\n      );\n      return child;\n    }\n    function getContent() {\n      return [\n        h132(QCard_default, {\n          class: [\n            `q-bottom-sheet q-bottom-sheet--${props4.grid === true ? \"grid\" : \"list\"}` + (isDark.value === true ? \" q-bottom-sheet--dark q-dark\" : \"\"),\n            props4.cardClass\n          ],\n          style: props4.cardStyle\n        }, getCardContent)\n      ];\n    }\n    Object.assign(proxy, { show, hide });\n    return () => h132(QDialog_default, {\n      ref: dialogRef,\n      position: \"bottom\",\n      onHide\n    }, getContent);\n  }\n});\n\n// src/utils/private.dialog/create-dialog.js\nimport { h as h133, ref as ref68, nextTick as nextTick22 } from \"vue\";\nfunction merge(target2, source) {\n  for (const key in source) {\n    if (key !== \"spinner\" && Object(source[key]) === source[key]) {\n      target2[key] = Object(target2[key]) !== target2[key] ? {} : { ...target2[key] };\n      merge(target2[key], source[key]);\n    } else {\n      target2[key] = source[key];\n    }\n  }\n}\nfunction create_dialog_default(DefaultComponent, supportsCustomComponent, parentApp) {\n  return (pluginProps) => {\n    if (false) {\n      return ssrAPI;\n    }\n    let DialogComponent, props4;\n    const isCustom = supportsCustomComponent === true && pluginProps.component !== void 0;\n    if (isCustom === true) {\n      const { component, componentProps } = pluginProps;\n      DialogComponent = typeof component === \"string\" ? parentApp.component(component) : component;\n      props4 = componentProps || {};\n    } else {\n      const { class: klass, style: style2, ...otherProps } = pluginProps;\n      DialogComponent = DefaultComponent;\n      props4 = otherProps;\n      klass !== void 0 && (otherProps.cardClass = klass);\n      style2 !== void 0 && (otherProps.cardStyle = style2);\n    }\n    let vm2, emittedOK = false;\n    const dialogRef = ref68(null);\n    const el = createGlobalNode(false, \"dialog\");\n    const applyState = (cmd) => {\n      if (dialogRef.value !== null && dialogRef.value[cmd] !== void 0) {\n        dialogRef.value[cmd]();\n        return;\n      }\n      const target2 = vm2.$.subTree;\n      if (target2 && target2.component) {\n        if (target2.component.proxy && target2.component.proxy[cmd]) {\n          target2.component.proxy[cmd]();\n          return;\n        }\n        if (target2.component.subTree && target2.component.subTree.component && target2.component.subTree.component.proxy && target2.component.subTree.component.proxy[cmd]) {\n          target2.component.subTree.component.proxy[cmd]();\n          return;\n        }\n      }\n      console.error(\"[Quasar] Incorrectly defined Dialog component\");\n    };\n    const okFns = [], cancelFns = [], API = {\n      onOk(fn) {\n        okFns.push(fn);\n        return API;\n      },\n      onCancel(fn) {\n        cancelFns.push(fn);\n        return API;\n      },\n      onDismiss(fn) {\n        okFns.push(fn);\n        cancelFns.push(fn);\n        return API;\n      },\n      hide() {\n        applyState(\"hide\");\n        return API;\n      },\n      update(componentProps) {\n        if (vm2 !== null) {\n          if (isCustom === true) {\n            Object.assign(props4, componentProps);\n          } else {\n            const { class: klass, style: style2, ...cfg } = componentProps;\n            klass !== void 0 && (cfg.cardClass = klass);\n            style2 !== void 0 && (cfg.cardStyle = style2);\n            merge(props4, cfg);\n          }\n          vm2.$forceUpdate();\n        }\n        return API;\n      }\n    };\n    const onOk = (data) => {\n      emittedOK = true;\n      okFns.forEach((fn) => {\n        fn(data);\n      });\n    };\n    const onHide = () => {\n      app2.unmount(el);\n      removeGlobalNode(el);\n      app2 = null;\n      vm2 = null;\n      if (emittedOK !== true) {\n        cancelFns.forEach((fn) => {\n          fn();\n        });\n      }\n    };\n    let app2 = createChildApp({\n      name: \"QGlobalDialog\",\n      setup: () => () => h133(DialogComponent, {\n        ...props4,\n        ref: dialogRef,\n        onOk,\n        onHide,\n        onVnodeMounted(...args) {\n          if (typeof props4.onVnodeMounted === \"function\") {\n            props4.onVnodeMounted(...args);\n          }\n          nextTick22(() => applyState(\"show\"));\n        }\n      })\n    }, parentApp);\n    vm2 = app2.mount(el);\n    return API;\n  };\n}\n\n// src/plugins/bottom-sheet/BottomSheet.js\nvar BottomSheet_default = {\n  install({ $q, parentApp }) {\n    $q.bottomSheet = this.create = create_dialog_default(BottomSheetComponent_default, false, parentApp);\n  }\n};\n\n// src/plugins/cookies/Cookies.js\nfunction encode(string) {\n  return encodeURIComponent(string);\n}\nfunction decode(string) {\n  return decodeURIComponent(string);\n}\nfunction stringifyCookieValue(value2) {\n  return encode(value2 === Object(value2) ? JSON.stringify(value2) : \"\" + value2);\n}\nfunction read(string) {\n  if (string === \"\") {\n    return string;\n  }\n  if (string.indexOf('\"') === 0) {\n    string = string.slice(1, -1).replace(/\\\\\"/g, '\"').replace(/\\\\\\\\/g, \"\\\\\");\n  }\n  string = decode(string.replace(/\\+/g, \" \"));\n  try {\n    const parsed = JSON.parse(string);\n    if (parsed === Object(parsed) || Array.isArray(parsed) === true) {\n      string = parsed;\n    }\n  } catch (_) {\n  }\n  return string;\n}\nfunction getString(msOffset) {\n  const time = /* @__PURE__ */ new Date();\n  time.setMilliseconds(time.getMilliseconds() + msOffset);\n  return time.toUTCString();\n}\nfunction parseExpireString(str) {\n  let timestamp = 0;\n  const days = str.match(/(\\d+)d/);\n  const hours = str.match(/(\\d+)h/);\n  const minutes = str.match(/(\\d+)m/);\n  const seconds = str.match(/(\\d+)s/);\n  if (days) {\n    timestamp += days[1] * 864e5;\n  }\n  if (hours) {\n    timestamp += hours[1] * 36e5;\n  }\n  if (minutes) {\n    timestamp += minutes[1] * 6e4;\n  }\n  if (seconds) {\n    timestamp += seconds[1] * 1e3;\n  }\n  return timestamp === 0 ? str : getString(timestamp);\n}\nfunction set(key, val, opts = {}, ssr) {\n  let expire, expireValue;\n  if (opts.expires !== void 0) {\n    if (Object.prototype.toString.call(opts.expires) === \"[object Date]\") {\n      expire = opts.expires.toUTCString();\n    } else if (typeof opts.expires === \"string\") {\n      expire = parseExpireString(opts.expires);\n    } else {\n      expireValue = parseFloat(opts.expires);\n      expire = isNaN(expireValue) === false ? getString(expireValue * 864e5) : opts.expires;\n    }\n  }\n  const keyValue = `${encode(key)}=${stringifyCookieValue(val)}`;\n  const cookie = [\n    keyValue,\n    expire !== void 0 ? \"; Expires=\" + expire : \"\",\n    // use expires attribute, max-age is not supported by IE\n    opts.path ? \"; Path=\" + opts.path : \"\",\n    opts.domain ? \"; Domain=\" + opts.domain : \"\",\n    opts.sameSite ? \"; SameSite=\" + opts.sameSite : \"\",\n    opts.httpOnly ? \"; HttpOnly\" : \"\",\n    opts.secure ? \"; Secure\" : \"\",\n    opts.other ? \"; \" + opts.other : \"\"\n  ].join(\"\");\n  if (ssr) {\n    if (ssr.req.qCookies) {\n      ssr.req.qCookies.push(cookie);\n    } else {\n      ssr.req.qCookies = [cookie];\n    }\n    ssr.res.setHeader(\"Set-Cookie\", ssr.req.qCookies);\n    let all = ssr.req.headers.cookie || \"\";\n    if (expire !== void 0 && expireValue < 0) {\n      const val2 = get(key, ssr);\n      if (val2 !== void 0) {\n        all = all.replace(`${key}=${val2}; `, \"\").replace(`; ${key}=${val2}`, \"\").replace(`${key}=${val2}`, \"\");\n      }\n    } else {\n      all = all ? `${keyValue}; ${all}` : cookie;\n    }\n    ssr.req.headers.cookie = all;\n  } else {\n    document.cookie = cookie;\n  }\n}\nfunction get(key, ssr) {\n  const cookieSource = ssr ? ssr.req.headers : document, cookies = cookieSource.cookie ? cookieSource.cookie.split(\"; \") : [], l = cookies.length;\n  let result = key ? null : {}, i = 0, parts, name2, cookie;\n  for (; i < l; i++) {\n    parts = cookies[i].split(\"=\");\n    name2 = decode(parts.shift());\n    cookie = parts.join(\"=\");\n    if (!key) {\n      result[name2] = cookie;\n    } else if (key === name2) {\n      result = read(cookie);\n      break;\n    }\n  }\n  return result;\n}\nfunction remove(key, options, ssr) {\n  set(\n    key,\n    \"\",\n    { expires: -1, ...options },\n    ssr\n  );\n}\nfunction has(key, ssr) {\n  return get(key, ssr) !== null;\n}\nfunction getObject(ssr) {\n  return {\n    get: (key) => get(key, ssr),\n    set: (key, val, opts) => set(key, val, opts, ssr),\n    has: (key) => has(key, ssr),\n    remove: (key, options) => remove(key, options, ssr),\n    getAll: () => get(null, ssr)\n  };\n}\nvar Plugin6 = {\n  install({ $q, ssrContext }) {\n    $q.cookies = false ? getObject(ssrContext) : this;\n  }\n};\nif (__QUASAR_SSR__) {\n  Plugin6.parseSSR = (ssrContext) => {\n    if (ssrContext !== void 0) {\n      return getObject(ssrContext);\n    }\n  };\n}\nif (true) {\n  Object.assign(Plugin6, getObject());\n}\nvar Cookies_default = Plugin6;\n\n// src/plugins/dialog/component/DialogPluginComponent.js\nimport { h as h134, ref as ref69, computed as computed115, watch as watch49, toRaw as toRaw3, getCurrentInstance as getCurrentInstance85 } from \"vue\";\nvar DialogPluginComponent_default = createComponent({\n  name: \"DialogPluginComponent\",\n  props: {\n    ...useDarkProps,\n    title: String,\n    message: String,\n    prompt: Object,\n    options: Object,\n    progress: [Boolean, Object],\n    html: Boolean,\n    ok: {\n      type: [String, Object, Boolean],\n      default: true\n    },\n    cancel: [String, Object, Boolean],\n    focus: {\n      type: String,\n      default: \"ok\",\n      validator: (v) => [\"ok\", \"cancel\", \"none\"].includes(v)\n    },\n    stackButtons: Boolean,\n    color: String,\n    cardClass: [String, Array, Object],\n    cardStyle: [String, Array, Object]\n  },\n  emits: [\"ok\", \"hide\"],\n  setup(props4, { emit }) {\n    const { proxy } = getCurrentInstance85();\n    const { $q } = proxy;\n    const isDark = use_dark_default(props4, $q);\n    const dialogRef = ref69(null);\n    const model = ref69(\n      props4.prompt !== void 0 ? props4.prompt.model : props4.options !== void 0 ? props4.options.model : void 0\n    );\n    const classes = computed115(\n      () => \"q-dialog-plugin\" + (isDark.value === true ? \" q-dialog-plugin--dark q-dark\" : \"\") + (props4.progress !== false ? \" q-dialog-plugin--progress\" : \"\")\n    );\n    const vmColor = computed115(\n      () => props4.color || (isDark.value === true ? \"amber\" : \"primary\")\n    );\n    const spinner = computed115(() => props4.progress === false ? null : isObject(props4.progress) === true ? {\n      component: props4.progress.spinner || QSpinner_default,\n      props: { color: props4.progress.color || vmColor.value }\n    } : {\n      component: QSpinner_default,\n      props: { color: vmColor.value }\n    });\n    const hasForm = computed115(\n      () => props4.prompt !== void 0 || props4.options !== void 0\n    );\n    const formProps = computed115(() => {\n      if (hasForm.value !== true) {\n        return {};\n      }\n      const { model: model2, isValid: isValid2, items, ...formProps2 } = props4.prompt !== void 0 ? props4.prompt : props4.options;\n      return formProps2;\n    });\n    const okLabel = computed115(() => isObject(props4.ok) === true ? $q.lang.label.ok : props4.ok === true ? $q.lang.label.ok : props4.ok);\n    const cancelLabel = computed115(() => isObject(props4.cancel) === true ? $q.lang.label.cancel : props4.cancel === true ? $q.lang.label.cancel : props4.cancel);\n    const okDisabled = computed115(() => {\n      if (props4.prompt !== void 0) {\n        return props4.prompt.isValid !== void 0 && props4.prompt.isValid(model.value) !== true;\n      }\n      if (props4.options !== void 0) {\n        return props4.options.isValid !== void 0 && props4.options.isValid(model.value) !== true;\n      }\n      return false;\n    });\n    const okProps = computed115(() => ({\n      color: vmColor.value,\n      label: okLabel.value,\n      ripple: false,\n      disable: okDisabled.value,\n      ...isObject(props4.ok) === true ? props4.ok : { flat: true },\n      \"data-autofocus\": props4.focus === \"ok\" && hasForm.value !== true || void 0,\n      onClick: onOk\n    }));\n    const cancelProps = computed115(() => ({\n      color: vmColor.value,\n      label: cancelLabel.value,\n      ripple: false,\n      ...isObject(props4.cancel) === true ? props4.cancel : { flat: true },\n      \"data-autofocus\": props4.focus === \"cancel\" && hasForm.value !== true || void 0,\n      onClick: onCancel\n    }));\n    watch49(() => props4.prompt && props4.prompt.model, onUpdateModel);\n    watch49(() => props4.options && props4.options.model, onUpdateModel);\n    function show() {\n      dialogRef.value.show();\n    }\n    function hide() {\n      dialogRef.value.hide();\n    }\n    function onOk() {\n      emit(\"ok\", toRaw3(model.value));\n      hide();\n    }\n    function onCancel() {\n      hide();\n    }\n    function onDialogHide() {\n      emit(\"hide\");\n    }\n    function onUpdateModel(val) {\n      model.value = val;\n    }\n    function onInputKeyup(evt) {\n      if (okDisabled.value !== true && props4.prompt.type !== \"textarea\" && isKeyCode(evt, 13) === true) {\n        onOk();\n      }\n    }\n    function getSection(classes2, text) {\n      return props4.html === true ? h134(QCardSection_default, {\n        class: classes2,\n        innerHTML: text\n      }) : h134(QCardSection_default, { class: classes2 }, () => text);\n    }\n    function getPrompt() {\n      return [\n        h134(QInput_default, {\n          color: vmColor.value,\n          dense: true,\n          autofocus: true,\n          dark: isDark.value,\n          ...formProps.value,\n          modelValue: model.value,\n          \"onUpdate:modelValue\": onUpdateModel,\n          onKeyup: onInputKeyup\n        })\n      ];\n    }\n    function getOptions() {\n      return [\n        h134(QOptionGroup_default, {\n          color: vmColor.value,\n          options: props4.options.items,\n          dark: isDark.value,\n          ...formProps.value,\n          modelValue: model.value,\n          \"onUpdate:modelValue\": onUpdateModel\n        })\n      ];\n    }\n    function getButtons() {\n      const child = [];\n      props4.cancel && child.push(\n        h134(QBtn_default, cancelProps.value)\n      );\n      props4.ok && child.push(\n        h134(QBtn_default, okProps.value)\n      );\n      return h134(QCardActions_default, {\n        class: props4.stackButtons === true ? \"items-end\" : \"\",\n        vertical: props4.stackButtons,\n        align: \"right\"\n      }, () => child);\n    }\n    function getCardContent() {\n      const child = [];\n      props4.title && child.push(\n        getSection(\"q-dialog__title\", props4.title)\n      );\n      props4.progress !== false && child.push(\n        h134(\n          QCardSection_default,\n          { class: \"q-dialog__progress\" },\n          () => h134(spinner.value.component, spinner.value.props)\n        )\n      );\n      props4.message && child.push(\n        getSection(\"q-dialog__message\", props4.message)\n      );\n      if (props4.prompt !== void 0) {\n        child.push(\n          h134(\n            QCardSection_default,\n            { class: \"scroll q-dialog-plugin__form\" },\n            getPrompt\n          )\n        );\n      } else if (props4.options !== void 0) {\n        child.push(\n          h134(QSeparator_default, { dark: isDark.value }),\n          h134(\n            QCardSection_default,\n            { class: \"scroll q-dialog-plugin__form\" },\n            getOptions\n          ),\n          h134(QSeparator_default, { dark: isDark.value })\n        );\n      }\n      if (props4.ok || props4.cancel) {\n        child.push(getButtons());\n      }\n      return child;\n    }\n    function getContent() {\n      return [\n        h134(QCard_default, {\n          class: [\n            classes.value,\n            props4.cardClass\n          ],\n          style: props4.cardStyle,\n          dark: isDark.value\n        }, getCardContent)\n      ];\n    }\n    Object.assign(proxy, { show, hide });\n    return () => h134(QDialog_default, {\n      ref: dialogRef,\n      onHide: onDialogHide\n    }, getContent);\n  }\n});\n\n// src/plugins/dialog/Dialog.js\nvar Dialog_default = {\n  install({ $q, parentApp }) {\n    $q.dialog = this.create = create_dialog_default(DialogPluginComponent_default, true, parentApp);\n  }\n};\n\n// src/plugins/loading/Loading.js\nimport { h as h135, Transition as Transition14, onMounted as onMounted23 } from \"vue\";\nvar app;\nvar vm;\nvar uid2 = 0;\nvar timeout = null;\nvar props3 = {};\nvar activeGroups = {};\nvar originalDefaults = {\n  group: \"__default_quasar_group__\",\n  delay: 0,\n  message: false,\n  html: false,\n  spinnerSize: 80,\n  spinnerColor: \"\",\n  messageColor: \"\",\n  backgroundColor: \"\",\n  boxClass: \"\",\n  spinner: QSpinner_default,\n  customClass: \"\"\n};\nvar defaults = { ...originalDefaults };\nfunction registerProps(opts) {\n  if (opts && opts.group !== void 0 && activeGroups[opts.group] !== void 0) {\n    return Object.assign(activeGroups[opts.group], opts);\n  }\n  const newProps = isObject(opts) === true && opts.ignoreDefaults === true ? { ...originalDefaults, ...opts } : { ...defaults, ...opts };\n  activeGroups[newProps.group] = newProps;\n  return newProps;\n}\nvar Plugin7 = createReactivePlugin({\n  isActive: false\n}, {\n  show(opts) {\n    if (false) return;\n    props3 = registerProps(opts);\n    const { group } = props3;\n    Plugin7.isActive = true;\n    if (app !== void 0) {\n      props3.uid = uid2;\n      vm.$forceUpdate();\n    } else {\n      props3.uid = ++uid2;\n      timeout !== null && clearTimeout(timeout);\n      timeout = setTimeout(() => {\n        timeout = null;\n        const el = createGlobalNode(\"q-loading\");\n        app = createChildApp({\n          name: \"QLoading\",\n          setup() {\n            onMounted23(() => {\n              prevent_scroll_default(true);\n            });\n            function onAfterLeave() {\n              if (Plugin7.isActive !== true && app !== void 0) {\n                prevent_scroll_default(false);\n                app.unmount(el);\n                removeGlobalNode(el);\n                app = void 0;\n                vm = void 0;\n              }\n            }\n            function getContent() {\n              if (Plugin7.isActive !== true) {\n                return null;\n              }\n              const content = [\n                h135(props3.spinner, {\n                  class: \"q-loading__spinner\",\n                  color: props3.spinnerColor,\n                  size: props3.spinnerSize\n                })\n              ];\n              props3.message && content.push(\n                h135(\"div\", {\n                  class: \"q-loading__message\" + (props3.messageColor ? ` text-${props3.messageColor}` : \"\"),\n                  [props3.html === true ? \"innerHTML\" : \"textContent\"]: props3.message\n                })\n              );\n              return h135(\"div\", {\n                class: \"q-loading fullscreen flex flex-center z-max \" + props3.customClass.trim(),\n                key: props3.uid\n              }, [\n                h135(\"div\", {\n                  class: \"q-loading__backdrop\" + (props3.backgroundColor ? ` bg-${props3.backgroundColor}` : \"\")\n                }),\n                h135(\"div\", {\n                  class: \"q-loading__box column items-center \" + props3.boxClass\n                }, content)\n              ]);\n            }\n            return () => h135(Transition14, {\n              name: \"q-transition--fade\",\n              appear: true,\n              onAfterLeave\n            }, getContent);\n          }\n        }, Plugin7.__parentApp);\n        vm = app.mount(el);\n      }, props3.delay);\n    }\n    return (paramProps) => {\n      if (paramProps === void 0 || Object(paramProps) !== paramProps) {\n        Plugin7.hide(group);\n        return;\n      }\n      Plugin7.show({ ...paramProps, group });\n    };\n  },\n  hide(group) {\n    if (Plugin7.isActive === true) {\n      if (group === void 0) {\n        activeGroups = {};\n      } else if (activeGroups[group] === void 0) {\n        return;\n      } else {\n        delete activeGroups[group];\n        const keys = Object.keys(activeGroups);\n        if (keys.length !== 0) {\n          const lastGroup = keys[keys.length - 1];\n          Plugin7.show({ group: lastGroup });\n          return;\n        }\n      }\n      if (timeout !== null) {\n        clearTimeout(timeout);\n        timeout = null;\n      }\n      Plugin7.isActive = false;\n    }\n  },\n  setDefaults(opts) {\n    if (true) {\n      isObject(opts) === true && Object.assign(defaults, opts);\n    }\n  },\n  install({ $q, parentApp }) {\n    $q.loading = this;\n    if (true) {\n      Plugin7.__parentApp = parentApp;\n      if ($q.config.loading !== void 0) {\n        this.setDefaults($q.config.loading);\n      }\n    }\n  }\n});\nvar Loading_default = Plugin7;\n\n// src/plugins/loading-bar/LoadingBar.js\nimport { h as h136, ref as ref70 } from \"vue\";\nvar barRef = ref70(null);\nvar Plugin8 = createReactivePlugin({\n  isActive: false\n}, {\n  start: noop,\n  stop: noop,\n  increment: noop,\n  setDefaults: noop,\n  install({ $q, parentApp }) {\n    $q.loadingBar = this;\n    if (false) return;\n    if (this.__installed === true) {\n      if ($q.config.loadingBar !== void 0) {\n        this.setDefaults($q.config.loadingBar);\n      }\n      return;\n    }\n    const props4 = ref70(\n      $q.config.loadingBar !== void 0 ? { ...$q.config.loadingBar } : {}\n    );\n    function onStart() {\n      Plugin8.isActive = true;\n    }\n    function onStop() {\n      Plugin8.isActive = false;\n    }\n    const el = createGlobalNode(\"q-loading-bar\");\n    createChildApp({\n      name: \"LoadingBar\",\n      // hide App from Vue devtools\n      devtools: { hide: true },\n      setup: () => () => h136(QAjaxBar_default, { ...props4.value, onStart, onStop, ref: barRef })\n    }, parentApp).mount(el);\n    Object.assign(this, {\n      start(speed) {\n        barRef.value.start(speed);\n      },\n      stop() {\n        barRef.value.stop();\n      },\n      increment() {\n        barRef.value.increment.apply(null, arguments);\n      },\n      setDefaults(opts) {\n        if (isObject(opts) === true) {\n          Object.assign(props4.value, opts);\n        }\n      }\n    });\n  }\n});\nvar LoadingBar_default = Plugin8;\n\n// src/plugins/meta/Meta.js\nvar updateId = null;\nvar currentClientMeta;\nvar clientList = [];\nfunction normalize(meta) {\n  if (meta.title) {\n    meta.title = meta.titleTemplate ? meta.titleTemplate(meta.title) : meta.title;\n    delete meta.titleTemplate;\n  }\n  ;\n  [[\"meta\", \"content\"], [\"link\", \"href\"]].forEach((type) => {\n    const metaType = meta[type[0]], metaProp = type[1];\n    for (const name2 in metaType) {\n      const metaLink = metaType[name2];\n      if (metaLink.template) {\n        if (Object.keys(metaLink).length === 1) {\n          delete metaType[name2];\n        } else {\n          metaLink[metaProp] = metaLink.template(metaLink[metaProp] || \"\");\n          delete metaLink.template;\n        }\n      }\n    }\n  });\n}\nfunction changed(old, def) {\n  if (Object.keys(old).length !== Object.keys(def).length) {\n    return true;\n  }\n  for (const key in old) {\n    if (old[key] !== def[key]) {\n      return true;\n    }\n  }\n}\nfunction bodyFilter(name2) {\n  return [\"class\", \"style\"].includes(name2) === false;\n}\nfunction htmlFilter(name2) {\n  return [\"lang\", \"dir\"].includes(name2) === false;\n}\nfunction diff(meta, other) {\n  const add = {}, remove2 = {};\n  if (meta === void 0) {\n    return { add: other, remove: remove2 };\n  }\n  if (meta.title !== other.title) {\n    add.title = other.title;\n  }\n  ;\n  [\"meta\", \"link\", \"script\", \"htmlAttr\", \"bodyAttr\"].forEach((type) => {\n    const old = meta[type], cur = other[type];\n    remove2[type] = [];\n    if (old === void 0 || old === null) {\n      add[type] = cur;\n      return;\n    }\n    add[type] = {};\n    for (const key in old) {\n      if (cur.hasOwnProperty(key) === false) {\n        remove2[type].push(key);\n      }\n    }\n    for (const key in cur) {\n      if (old.hasOwnProperty(key) === false) {\n        add[type][key] = cur[key];\n      } else if (changed(old[key], cur[key]) === true) {\n        remove2[type].push(key);\n        add[type][key] = cur[key];\n      }\n    }\n  });\n  return { add, remove: remove2 };\n}\nfunction apply2({ add, remove: remove2 }) {\n  if (add.title) {\n    document.title = add.title;\n  }\n  if (Object.keys(remove2).length !== 0) {\n    [\"meta\", \"link\", \"script\"].forEach((type) => {\n      remove2[type].forEach((name2) => {\n        document.head.querySelector(`${type}[data-qmeta=\"${name2}\"]`).remove();\n      });\n    });\n    remove2.htmlAttr.filter(htmlFilter).forEach((name2) => {\n      document.documentElement.removeAttribute(name2);\n    });\n    remove2.bodyAttr.filter(bodyFilter).forEach((name2) => {\n      document.body.removeAttribute(name2);\n    });\n  }\n  ;\n  [\"meta\", \"link\", \"script\"].forEach((type) => {\n    const metaType = add[type];\n    for (const name2 in metaType) {\n      const tag = document.createElement(type);\n      for (const att in metaType[name2]) {\n        if (att !== \"innerHTML\") {\n          tag.setAttribute(att, metaType[name2][att]);\n        }\n      }\n      tag.setAttribute(\"data-qmeta\", name2);\n      if (type === \"script\") {\n        tag.innerHTML = metaType[name2].innerHTML || \"\";\n      }\n      document.head.appendChild(tag);\n    }\n  });\n  Object.keys(add.htmlAttr).filter(htmlFilter).forEach((name2) => {\n    document.documentElement.setAttribute(name2, add.htmlAttr[name2] || \"\");\n  });\n  Object.keys(add.bodyAttr).filter(bodyFilter).forEach((name2) => {\n    document.body.setAttribute(name2, add.bodyAttr[name2] || \"\");\n  });\n}\nfunction updateClientMeta() {\n  updateId = null;\n  const data = {\n    title: \"\",\n    titleTemplate: null,\n    meta: {},\n    link: {},\n    script: {},\n    htmlAttr: {},\n    bodyAttr: {}\n  };\n  for (let i = 0; i < clientList.length; i++) {\n    const { active, val } = clientList[i];\n    if (active === true) {\n      extend(true, data, val);\n    }\n  }\n  normalize(data);\n  apply2(diff(currentClientMeta, data));\n  currentClientMeta = data;\n}\nfunction planClientUpdate() {\n  updateId !== null && clearTimeout(updateId);\n  updateId = setTimeout(updateClientMeta, 50);\n}\nvar Meta_default = {\n  install(opts) {\n    if (false) {\n      const { ssrContext } = opts;\n      ssrContext.__qMetaList = [];\n      ssrContext.onRendered(() => {\n        injectServerMeta(ssrContext);\n      });\n    } else if (this.__installed !== true && isRuntimeSsrPreHydration.value === true) {\n      currentClientMeta = window.__Q_META__;\n      document.getElementById(\"qmeta-init\").remove();\n    }\n  }\n};\n\n// src/plugins/notify/Notify.js\nimport { h as h137, ref as ref71, markRaw as markRaw2, TransitionGroup } from \"vue\";\nvar uid3 = 0;\nvar defaults2 = {};\nvar groups = {};\nvar notificationsList = {};\nvar positionClass2 = {};\nvar emptyRE = /^\\s*$/;\nvar notifRefs = [];\nvar invalidTimeoutValues = [void 0, null, true, false, \"\"];\nvar positionList = [\n  \"top-left\",\n  \"top-right\",\n  \"bottom-left\",\n  \"bottom-right\",\n  \"top\",\n  \"bottom\",\n  \"left\",\n  \"right\",\n  \"center\"\n];\nvar badgePositions = [\n  \"top-left\",\n  \"top-right\",\n  \"bottom-left\",\n  \"bottom-right\"\n];\nvar notifTypes = {\n  positive: {\n    icon: ($q) => $q.iconSet.type.positive,\n    color: \"positive\"\n  },\n  negative: {\n    icon: ($q) => $q.iconSet.type.negative,\n    color: \"negative\"\n  },\n  warning: {\n    icon: ($q) => $q.iconSet.type.warning,\n    color: \"warning\",\n    textColor: \"dark\"\n  },\n  info: {\n    icon: ($q) => $q.iconSet.type.info,\n    color: \"info\"\n  },\n  ongoing: {\n    group: false,\n    timeout: 0,\n    spinner: true,\n    color: \"grey-8\"\n  }\n};\nfunction addNotification(config, $q, originalApi) {\n  if (!config) {\n    return logError(\"parameter required\");\n  }\n  let Api;\n  const notif = { textColor: \"white\" };\n  if (config.ignoreDefaults !== true) {\n    Object.assign(notif, defaults2);\n  }\n  if (isObject(config) === false) {\n    if (notif.type) {\n      Object.assign(notif, notifTypes[notif.type]);\n    }\n    config = { message: config };\n  }\n  Object.assign(notif, notifTypes[config.type || notif.type], config);\n  if (typeof notif.icon === \"function\") {\n    notif.icon = notif.icon($q);\n  }\n  if (!notif.spinner) {\n    notif.spinner = false;\n  } else {\n    if (notif.spinner === true) {\n      notif.spinner = QSpinner_default;\n    }\n    notif.spinner = markRaw2(notif.spinner);\n  }\n  notif.meta = {\n    hasMedia: Boolean(notif.spinner !== false || notif.icon || notif.avatar),\n    hasText: hasContent(notif.message) || hasContent(notif.caption)\n  };\n  if (notif.position) {\n    if (positionList.includes(notif.position) === false) {\n      return logError(\"wrong position\", config);\n    }\n  } else {\n    notif.position = \"bottom\";\n  }\n  if (invalidTimeoutValues.includes(notif.timeout) === true) {\n    notif.timeout = 5e3;\n  } else {\n    const t = Number(notif.timeout);\n    if (isNaN(t) || t < 0) {\n      return logError(\"wrong timeout\", config);\n    }\n    notif.timeout = Number.isFinite(t) ? t : 0;\n  }\n  if (notif.timeout === 0) {\n    notif.progress = false;\n  } else if (notif.progress === true) {\n    notif.meta.progressClass = \"q-notification__progress\" + (notif.progressClass ? ` ${notif.progressClass}` : \"\");\n    notif.meta.progressStyle = {\n      animationDuration: `${notif.timeout + 1e3}ms`\n    };\n  }\n  const actions = (Array.isArray(config.actions) === true ? config.actions : []).concat(\n    config.ignoreDefaults !== true && Array.isArray(defaults2.actions) === true ? defaults2.actions : []\n  ).concat(\n    notifTypes[config.type] !== void 0 && Array.isArray(notifTypes[config.type].actions) === true ? notifTypes[config.type].actions : []\n  );\n  const { closeBtn } = notif;\n  closeBtn && actions.push({\n    label: typeof closeBtn === \"string\" ? closeBtn : $q.lang.label.close\n  });\n  notif.actions = actions.map(({ handler, noDismiss, ...item }) => ({\n    flat: true,\n    ...item,\n    onClick: typeof handler === \"function\" ? () => {\n      handler();\n      noDismiss !== true && dismiss();\n    } : () => {\n      dismiss();\n    }\n  }));\n  if (notif.multiLine === void 0) {\n    notif.multiLine = notif.actions.length > 1;\n  }\n  Object.assign(notif.meta, {\n    class: `q-notification row items-stretch q-notification--${notif.multiLine === true ? \"multi-line\" : \"standard\"}` + (notif.color !== void 0 ? ` bg-${notif.color}` : \"\") + (notif.textColor !== void 0 ? ` text-${notif.textColor}` : \"\") + (notif.classes !== void 0 ? ` ${notif.classes}` : \"\"),\n    wrapperClass: \"q-notification__wrapper col relative-position border-radius-inherit \" + (notif.multiLine === true ? \"column no-wrap justify-center\" : \"row items-center\"),\n    contentClass: \"q-notification__content row items-center\" + (notif.multiLine === true ? \"\" : \" col\"),\n    leftClass: notif.meta.hasText === true ? \"additional\" : \"single\",\n    attrs: {\n      role: \"alert\",\n      ...notif.attrs\n    }\n  });\n  if (notif.group === false) {\n    notif.group = void 0;\n    notif.meta.group = void 0;\n  } else {\n    if (notif.group === void 0 || notif.group === true) {\n      notif.group = [\n        notif.message,\n        notif.caption,\n        notif.multiline\n      ].concat(\n        notif.actions.map((props4) => `${props4.label}*${props4.icon}`)\n      ).join(\"|\");\n    }\n    notif.meta.group = notif.group + \"|\" + notif.position;\n  }\n  if (notif.actions.length === 0) {\n    notif.actions = void 0;\n  } else {\n    notif.meta.actionsClass = \"q-notification__actions row items-center \" + (notif.multiLine === true ? \"justify-end\" : \"col-auto\") + (notif.meta.hasMedia === true ? \" q-notification__actions--with-media\" : \"\");\n  }\n  if (originalApi !== void 0) {\n    if (originalApi.notif.meta.timer) {\n      clearTimeout(originalApi.notif.meta.timer);\n      originalApi.notif.meta.timer = void 0;\n    }\n    notif.meta.uid = originalApi.notif.meta.uid;\n    const index = notificationsList[notif.position].value.indexOf(originalApi.notif);\n    notificationsList[notif.position].value[index] = notif;\n  } else {\n    const original = groups[notif.meta.group];\n    if (original === void 0) {\n      notif.meta.uid = uid3++;\n      notif.meta.badge = 1;\n      if ([\"left\", \"right\", \"center\"].indexOf(notif.position) !== -1) {\n        notificationsList[notif.position].value.splice(\n          Math.floor(notificationsList[notif.position].value.length / 2),\n          0,\n          notif\n        );\n      } else {\n        const action = notif.position.indexOf(\"top\") !== -1 ? \"unshift\" : \"push\";\n        notificationsList[notif.position].value[action](notif);\n      }\n      if (notif.group !== void 0) {\n        groups[notif.meta.group] = notif;\n      }\n    } else {\n      if (original.meta.timer) {\n        clearTimeout(original.meta.timer);\n        original.meta.timer = void 0;\n      }\n      if (notif.badgePosition !== void 0) {\n        if (badgePositions.includes(notif.badgePosition) === false) {\n          return logError(\"wrong badgePosition\", config);\n        }\n      } else {\n        notif.badgePosition = `top-${notif.position.indexOf(\"left\") !== -1 ? \"right\" : \"left\"}`;\n      }\n      notif.meta.uid = original.meta.uid;\n      notif.meta.badge = original.meta.badge + 1;\n      notif.meta.badgeClass = `q-notification__badge q-notification__badge--${notif.badgePosition}` + (notif.badgeColor !== void 0 ? ` bg-${notif.badgeColor}` : \"\") + (notif.badgeTextColor !== void 0 ? ` text-${notif.badgeTextColor}` : \"\") + (notif.badgeClass ? ` ${notif.badgeClass}` : \"\");\n      const index = notificationsList[notif.position].value.indexOf(original);\n      notificationsList[notif.position].value[index] = groups[notif.meta.group] = notif;\n    }\n  }\n  const dismiss = () => {\n    removeNotification(notif);\n    Api = void 0;\n  };\n  if (notif.timeout > 0) {\n    notif.meta.timer = setTimeout(() => {\n      notif.meta.timer = void 0;\n      dismiss();\n    }, notif.timeout + /* show duration */\n    1e3);\n  }\n  if (notif.group !== void 0) {\n    return (props4) => {\n      if (props4 !== void 0) {\n        logError(\"trying to update a grouped one which is forbidden\", config);\n      } else {\n        dismiss();\n      }\n    };\n  }\n  Api = {\n    dismiss,\n    config,\n    notif\n  };\n  if (originalApi !== void 0) {\n    Object.assign(originalApi, Api);\n    return;\n  }\n  return (props4) => {\n    if (Api !== void 0) {\n      if (props4 === void 0) {\n        Api.dismiss();\n      } else {\n        const newNotif = Object.assign({}, Api.config, props4, {\n          group: false,\n          position: notif.position\n        });\n        addNotification(newNotif, $q, Api);\n      }\n    }\n  };\n}\nfunction removeNotification(notif) {\n  if (notif.meta.timer) {\n    clearTimeout(notif.meta.timer);\n    notif.meta.timer = void 0;\n  }\n  const index = notificationsList[notif.position].value.indexOf(notif);\n  if (index !== -1) {\n    if (notif.group !== void 0) {\n      delete groups[notif.meta.group];\n    }\n    const el = notifRefs[\"\" + notif.meta.uid];\n    if (el) {\n      const { width: width3, height: height2 } = getComputedStyle(el);\n      el.style.left = `${el.offsetLeft}px`;\n      el.style.width = width3;\n      el.style.height = height2;\n    }\n    notificationsList[notif.position].value.splice(index, 1);\n    if (typeof notif.onDismiss === \"function\") {\n      notif.onDismiss();\n    }\n  }\n}\nfunction hasContent(str) {\n  return str !== void 0 && str !== null && emptyRE.test(str) !== true;\n}\nfunction logError(error, config) {\n  console.error(`Notify: ${error}`, config);\n  return false;\n}\nfunction getComponent() {\n  return createComponent({\n    name: \"QNotifications\",\n    // hide App from Vue devtools\n    devtools: { hide: true },\n    setup() {\n      return () => h137(\"div\", { class: \"q-notifications\" }, positionList.map((pos) => {\n        return h137(TransitionGroup, {\n          key: pos,\n          class: positionClass2[pos],\n          tag: \"div\",\n          name: `q-notification--${pos}`\n        }, () => notificationsList[pos].value.map((notif) => {\n          const meta = notif.meta;\n          const mainChild = [];\n          if (meta.hasMedia === true) {\n            if (notif.spinner !== false) {\n              mainChild.push(\n                h137(notif.spinner, {\n                  class: \"q-notification__spinner q-notification__spinner--\" + meta.leftClass,\n                  color: notif.spinnerColor,\n                  size: notif.spinnerSize\n                })\n              );\n            } else if (notif.icon) {\n              mainChild.push(\n                h137(QIcon_default, {\n                  class: \"q-notification__icon q-notification__icon--\" + meta.leftClass,\n                  name: notif.icon,\n                  color: notif.iconColor,\n                  size: notif.iconSize,\n                  role: \"img\"\n                })\n              );\n            } else if (notif.avatar) {\n              mainChild.push(\n                h137(QAvatar_default, {\n                  class: \"q-notification__avatar q-notification__avatar--\" + meta.leftClass\n                }, () => h137(\"img\", { src: notif.avatar, \"aria-hidden\": \"true\" }))\n              );\n            }\n          }\n          if (meta.hasText === true) {\n            let msgChild;\n            const msgData = { class: \"q-notification__message col\" };\n            if (notif.html === true) {\n              msgData.innerHTML = notif.caption ? `<div>${notif.message}</div><div class=\"q-notification__caption\">${notif.caption}</div>` : notif.message;\n            } else {\n              const msgNode = [notif.message];\n              msgChild = notif.caption ? [\n                h137(\"div\", msgNode),\n                h137(\"div\", { class: \"q-notification__caption\" }, [notif.caption])\n              ] : msgNode;\n            }\n            mainChild.push(\n              h137(\"div\", msgData, msgChild)\n            );\n          }\n          const child = [\n            h137(\"div\", { class: meta.contentClass }, mainChild)\n          ];\n          notif.progress === true && child.push(\n            h137(\"div\", {\n              key: `${meta.uid}|p|${meta.badge}`,\n              class: meta.progressClass,\n              style: meta.progressStyle\n            })\n          );\n          notif.actions !== void 0 && child.push(\n            h137(\"div\", {\n              class: meta.actionsClass\n            }, notif.actions.map((props4) => h137(QBtn_default, props4)))\n          );\n          meta.badge > 1 && child.push(\n            h137(\"div\", {\n              key: `${meta.uid}|${meta.badge}`,\n              class: notif.meta.badgeClass,\n              style: notif.badgeStyle\n            }, [meta.badge])\n          );\n          return h137(\"div\", {\n            ref: (el) => {\n              notifRefs[\"\" + meta.uid] = el;\n            },\n            key: meta.uid,\n            class: meta.class,\n            ...meta.attrs\n          }, [\n            h137(\"div\", { class: meta.wrapperClass }, child)\n          ]);\n        }));\n      }));\n    }\n  });\n}\nvar Notify_default = {\n  setDefaults(opts) {\n    if (true) {\n      isObject(opts) === true && Object.assign(defaults2, opts);\n    }\n  },\n  registerType(typeName, typeOpts) {\n    if (isObject(typeOpts) === true) {\n      notifTypes[typeName] = typeOpts;\n    }\n  },\n  install({ $q, parentApp }) {\n    $q.notify = this.create = false ? noop : (opts) => addNotification(opts, $q);\n    $q.notify.setDefaults = this.setDefaults;\n    $q.notify.registerType = this.registerType;\n    if ($q.config.notify !== void 0) {\n      this.setDefaults($q.config.notify);\n    }\n    if (this.__installed !== true) {\n      positionList.forEach((pos) => {\n        notificationsList[pos] = ref71([]);\n        const vert = [\"left\", \"center\", \"right\"].includes(pos) === true ? \"center\" : pos.indexOf(\"top\") !== -1 ? \"top\" : \"bottom\", align = pos.indexOf(\"left\") !== -1 ? \"start\" : pos.indexOf(\"right\") !== -1 ? \"end\" : \"center\", classes = [\"left\", \"right\"].includes(pos) ? `items-${pos === \"left\" ? \"start\" : \"end\"} justify-center` : pos === \"center\" ? \"flex-center\" : `items-${align}`;\n        positionClass2[pos] = `q-notifications__list q-notifications__list--${vert} fixed column no-wrap ${classes}`;\n      });\n      const el = createGlobalNode(\"q-notify\");\n      createChildApp(getComponent(), parentApp).mount(el);\n    }\n  }\n};\n\n// src/plugins/storage/engine/web-storage.js\nfunction encode2(value2) {\n  if (isDate(value2) === true) {\n    return \"__q_date|\" + value2.getTime();\n  }\n  if (isRegexp(value2) === true) {\n    return \"__q_expr|\" + value2.source;\n  }\n  if (typeof value2 === \"number\") {\n    return \"__q_numb|\" + value2;\n  }\n  if (typeof value2 === \"boolean\") {\n    return \"__q_bool|\" + (value2 ? \"1\" : \"0\");\n  }\n  if (typeof value2 === \"string\") {\n    return \"__q_strn|\" + value2;\n  }\n  if (typeof value2 === \"function\") {\n    return \"__q_strn|\" + value2.toString();\n  }\n  if (value2 === Object(value2)) {\n    return \"__q_objt|\" + JSON.stringify(value2);\n  }\n  return value2;\n}\nfunction decode2(value2) {\n  const length = value2.length;\n  if (length < 9) {\n    return value2;\n  }\n  const type = value2.substring(0, 8);\n  const source = value2.substring(9);\n  switch (type) {\n    case \"__q_date\":\n      const number = Number(source);\n      return new Date(Number.isNaN(number) === true ? source : number);\n    case \"__q_expr\":\n      return new RegExp(source);\n    case \"__q_numb\":\n      return Number(source);\n    case \"__q_bool\":\n      return Boolean(source === \"1\");\n    case \"__q_strn\":\n      return \"\" + source;\n    case \"__q_objt\":\n      return JSON.parse(source);\n    default:\n      return value2;\n  }\n}\nfunction getEmptyStorage() {\n  const getVal2 = () => null;\n  return {\n    has: () => false,\n    // alias for hasItem; TODO: remove in Qv3\n    hasItem: () => false,\n    getLength: () => 0,\n    getItem: getVal2,\n    getIndex: getVal2,\n    getKey: getVal2,\n    getAll: () => {\n    },\n    getAllKeys: () => [],\n    set: noop,\n    // alias for setItem; TODO: remove in Qv3\n    setItem: noop,\n    remove: noop,\n    // alias for removeItem; TODO: remove in Qv3\n    removeItem: noop,\n    clear: noop,\n    isEmpty: () => true\n  };\n}\nfunction getStorage(type) {\n  const webStorage = window[type + \"Storage\"], get2 = (key) => {\n    const item = webStorage.getItem(key);\n    return item ? decode2(item) : null;\n  };\n  const hasItem = (key) => webStorage.getItem(key) !== null;\n  const setItem = (key, value2) => {\n    webStorage.setItem(key, encode2(value2));\n  };\n  const removeItem = (key) => {\n    webStorage.removeItem(key);\n  };\n  return {\n    has: hasItem,\n    // TODO: remove in Qv3\n    hasItem,\n    getLength: () => webStorage.length,\n    getItem: get2,\n    getIndex: (index) => {\n      return index < webStorage.length ? get2(webStorage.key(index)) : null;\n    },\n    getKey: (index) => {\n      return index < webStorage.length ? webStorage.key(index) : null;\n    },\n    getAll: () => {\n      let key;\n      const result = {}, len = webStorage.length;\n      for (let i = 0; i < len; i++) {\n        key = webStorage.key(i);\n        result[key] = get2(key);\n      }\n      return result;\n    },\n    getAllKeys: () => {\n      const result = [], len = webStorage.length;\n      for (let i = 0; i < len; i++) {\n        result.push(webStorage.key(i));\n      }\n      return result;\n    },\n    set: setItem,\n    // TODO: remove in Qv3\n    setItem,\n    remove: removeItem,\n    // TODO: remove in Qv3\n    removeItem,\n    clear: () => {\n      webStorage.clear();\n    },\n    isEmpty: () => webStorage.length === 0\n  };\n}\n\n// src/plugins/storage/LocalStorage.js\nvar storage = client.has.webStorage === false ? getEmptyStorage() : getStorage(\"local\");\nvar Plugin9 = {\n  install({ $q }) {\n    $q.localStorage = storage;\n  }\n};\nObject.assign(Plugin9, storage);\nvar LocalStorage_default = Plugin9;\n\n// src/plugins/storage/SessionStorage.js\nvar storage2 = client.has.webStorage === false ? getEmptyStorage() : getStorage(\"session\");\nvar Plugin10 = {\n  install({ $q }) {\n    $q.sessionStorage = storage2;\n  }\n};\nObject.assign(Plugin10, storage2);\nvar SessionStorage_default = Plugin10;\n\n// src/composables/use-dialog-plugin-component/use-dialog-plugin-component.js\nimport { ref as ref72, getCurrentInstance as getCurrentInstance86 } from \"vue\";\nfunction useDialogPluginComponent() {\n  const { emit, proxy } = getCurrentInstance86();\n  const dialogRef = ref72(null);\n  function show() {\n    dialogRef.value.show();\n  }\n  function hide() {\n    dialogRef.value.hide();\n  }\n  function onDialogOK(payload) {\n    emit(\"ok\", payload);\n    hide();\n  }\n  function onDialogHide() {\n    emit(\"hide\");\n  }\n  Object.assign(proxy, { show, hide });\n  return {\n    dialogRef,\n    onDialogHide,\n    onDialogOK,\n    onDialogCancel: hide\n  };\n}\nvar emits2 = [\"ok\", \"hide\"];\nuseDialogPluginComponent.emits = emits2;\nuseDialogPluginComponent.emitsObject = get_emits_object_default(emits2);\n\n// src/composables/use-meta/use-meta.js\nimport { computed as computed116, watch as watch50, onActivated as onActivated8, onDeactivated as onDeactivated10, onUnmounted as onUnmounted3, useSSRContext } from \"vue\";\nfunction use_meta_default(metaOptions) {\n  if (false) {\n    const ssrContext = useSSRContext();\n    ssrContext.__qMetaList.push(\n      typeof metaOptions === \"function\" ? metaOptions() : metaOptions\n    );\n  } else {\n    const meta = { active: true };\n    if (typeof metaOptions === \"function\") {\n      const content = computed116(metaOptions);\n      meta.val = content.value;\n      watch50(content, (val) => {\n        meta.val = val;\n        meta.active === true && planClientUpdate();\n      });\n    } else {\n      meta.val = metaOptions;\n    }\n    clientList.push(meta);\n    planClientUpdate();\n    onActivated8(() => {\n      meta.active = true;\n      planClientUpdate();\n    });\n    onDeactivated10(() => {\n      meta.active = false;\n      planClientUpdate();\n    });\n    onUnmounted3(() => {\n      clientList.splice(clientList.indexOf(meta), 1);\n      planClientUpdate();\n    });\n  }\n}\n\n// src/composables/use-quasar/use-quasar.js\nimport { inject as inject13 } from \"vue\";\nfunction useQuasar() {\n  return inject13(quasarKey);\n}\n\n// src/composables/use-interval/use-interval.js\nimport { onDeactivated as onDeactivated11, onBeforeUnmount as onBeforeUnmount38, getCurrentInstance as getCurrentInstance87 } from \"vue\";\nfunction use_interval_default() {\n  let timer2 = null;\n  const vm2 = getCurrentInstance87();\n  function removeInterval() {\n    if (timer2 !== null) {\n      clearInterval(timer2);\n      timer2 = null;\n    }\n  }\n  onDeactivated11(removeInterval);\n  onBeforeUnmount38(removeInterval);\n  return {\n    removeInterval,\n    registerInterval(fn, delay) {\n      removeInterval(timer2);\n      if (vmIsDestroyed(vm2) === false) {\n        timer2 = setInterval(fn, delay);\n      }\n    }\n  };\n}\n\n// src/utils/copy-to-clipboard/copy-to-clipboard.js\nfunction fallback(text) {\n  const area = document.createElement(\"textarea\");\n  area.value = text;\n  area.contentEditable = \"true\";\n  area.style.position = \"fixed\";\n  const fn = () => {\n  };\n  addFocusout(fn);\n  document.body.appendChild(area);\n  area.focus();\n  area.select();\n  const res = document.execCommand(\"copy\");\n  area.remove();\n  removeFocusout(fn);\n  return res;\n}\nfunction copy_to_clipboard_default(text) {\n  return navigator.clipboard !== void 0 ? navigator.clipboard.writeText(text) : new Promise((resolve, reject) => {\n    const res = fallback(text);\n    if (res) {\n      resolve(true);\n    } else {\n      reject(res);\n    }\n  });\n}\n\n// src/utils/create-meta-mixin/create-meta-mixin.js\nvar create_meta_mixin_default = (metaOptions) => {\n  if (false) {\n    return {\n      created: typeof metaOptions === \"function\" ? function() {\n        this.ssrContext.__qMetaList.push(\n          metaOptions.call(this) || {}\n        );\n      } : function() {\n        this.ssrContext.__qMetaList.push(metaOptions);\n      }\n    };\n  }\n  const mixin = {\n    activated() {\n      this.__qMeta.active = true;\n      planClientUpdate();\n    },\n    deactivated() {\n      this.__qMeta.active = false;\n      planClientUpdate();\n    },\n    unmounted() {\n      clientList.splice(clientList.indexOf(this.__qMeta), 1);\n      planClientUpdate();\n      this.__qMeta = void 0;\n    }\n  };\n  if (typeof metaOptions === \"function\") {\n    Object.assign(mixin, {\n      computed: {\n        __qMetaOptions() {\n          return metaOptions.call(this) || {};\n        }\n      },\n      watch: {\n        __qMetaOptions(val) {\n          this.__qMeta.val = val;\n          this.__qMeta.active === true && planClientUpdate();\n        }\n      },\n      created() {\n        this.__qMeta = { active: true, val: this.__qMetaOptions };\n        clientList.push(this.__qMeta);\n        planClientUpdate();\n      }\n    });\n  } else {\n    mixin.created = function() {\n      this.__qMeta = { active: true, val: metaOptions };\n      clientList.push(this.__qMeta);\n      planClientUpdate();\n    };\n  }\n  return mixin;\n};\n\n// src/utils/EventBus/EventBus.js\nvar EventBus = class {\n  constructor() {\n    this.__stack = {};\n  }\n  on(name2, callback, ctx) {\n    (this.__stack[name2] || (this.__stack[name2] = [])).push({\n      fn: callback,\n      ctx\n    });\n    return this;\n  }\n  once(name2, callback, ctx) {\n    const listener = (...args) => {\n      this.off(name2, listener);\n      callback.apply(ctx, args);\n    };\n    listener.__callback = callback;\n    return this.on(name2, listener, ctx);\n  }\n  emit(name2) {\n    const list = this.__stack[name2];\n    if (list !== void 0) {\n      const params = [].slice.call(arguments, 1);\n      list.forEach((entry) => {\n        entry.fn.apply(entry.ctx, params);\n      });\n    }\n    return this;\n  }\n  off(name2, callback) {\n    const list = this.__stack[name2];\n    if (list === void 0) {\n      return this;\n    }\n    if (callback === void 0) {\n      delete this.__stack[name2];\n      return this;\n    }\n    const liveEvents = list.filter(\n      (entry) => entry.fn !== callback && entry.fn.__callback !== callback\n    );\n    if (liveEvents.length !== 0) {\n      this.__stack[name2] = liveEvents;\n    } else {\n      delete this.__stack[name2];\n    }\n    return this;\n  }\n};\n\n// src/utils/export-file/export-file.js\nfunction clean(link) {\n  setTimeout(() => {\n    window.URL.revokeObjectURL(link.href);\n  }, 1e4);\n  link.remove();\n}\nfunction export_file_default(fileName, rawData, opts = {}) {\n  const { mimeType, byteOrderMark, encoding } = typeof opts === \"string\" ? { mimeType: opts } : opts;\n  const data = encoding !== void 0 ? new TextEncoder(encoding).encode([rawData]) : rawData;\n  const blobData = byteOrderMark !== void 0 ? [byteOrderMark, data] : [data];\n  const blob = new Blob(blobData, { type: mimeType || \"application/octet-stream\" });\n  const link = document.createElement(\"a\");\n  link.href = window.URL.createObjectURL(blob);\n  link.setAttribute(\"download\", fileName);\n  if (typeof link.download === \"undefined\") {\n    link.setAttribute(\"target\", \"_blank\");\n  }\n  link.classList.add(\"hidden\");\n  link.style.position = \"fixed\";\n  document.body.appendChild(link);\n  try {\n    link.click();\n    clean(link);\n    return true;\n  } catch (err) {\n    clean(link);\n    return err;\n  }\n}\n\n// src/utils/open-url/open-url.js\nfunction parseFeatures(winFeatures) {\n  const cfg = Object.assign({ noopener: true }, winFeatures);\n  const feat = [];\n  for (const key in cfg) {\n    const value2 = cfg[key];\n    if (value2 === true) {\n      feat.push(key);\n    } else if (isNumber(value2) || typeof value2 === \"string\" && value2 !== \"\") {\n      feat.push(key + \"=\" + value2);\n    }\n  }\n  return feat.join(\",\");\n}\nfunction openWindow(url, reject, windowFeatures) {\n  let open2 = window.open;\n  if (Platform_default.is.cordova === true) {\n    if (cordova !== void 0 && cordova.InAppBrowser !== void 0 && cordova.InAppBrowser.open !== void 0) {\n      open2 = cordova.InAppBrowser.open;\n    } else if (navigator !== void 0 && navigator.app !== void 0) {\n      return navigator.app.loadUrl(url, {\n        openExternal: true\n      });\n    }\n  }\n  const win = open2(url, \"_blank\", parseFeatures(windowFeatures));\n  if (win) {\n    Platform_default.is.desktop && win.focus();\n    return win;\n  } else {\n    reject && reject();\n  }\n}\nvar open_url_default = (url, reject, windowFeatures) => {\n  if (Platform_default.is.ios === true && window.SafariViewController !== void 0) {\n    window.SafariViewController.isAvailable((available) => {\n      if (available) {\n        window.SafariViewController.show(\n          { url },\n          noop,\n          reject\n        );\n      } else {\n        openWindow(url, reject, windowFeatures);\n      }\n    });\n    return;\n  }\n  return openWindow(url, reject, windowFeatures);\n};\n\n// src/utils/run-sequential-promises/run-sequential-promises.js\nfunction parsePromises(sequentialPromises) {\n  const isList = Array.isArray(sequentialPromises);\n  if (isList === true) {\n    const totalJobs = sequentialPromises.length;\n    return {\n      isList,\n      totalJobs,\n      resultAggregator: Array(totalJobs).fill(null)\n    };\n  }\n  const resultKeys = Object.keys(sequentialPromises);\n  const resultAggregator = {};\n  resultKeys.forEach((keyName) => {\n    resultAggregator[keyName] = null;\n  });\n  return {\n    isList,\n    totalJobs: resultKeys.length,\n    resultAggregator,\n    resultKeys\n  };\n}\nfunction runSequentialPromises(sequentialPromises, { threadsNumber = 1, abortOnFail = true } = {}) {\n  let jobIndex = -1, hasAborted = false;\n  const { isList, totalJobs, resultAggregator, resultKeys } = parsePromises(sequentialPromises);\n  const getPromiseThread = () => new Promise((resolve, reject) => {\n    function runNextPromise() {\n      const currentJobIndex = ++jobIndex;\n      if (hasAborted === true || currentJobIndex >= totalJobs) {\n        resolve();\n        return;\n      }\n      const key = isList === true ? currentJobIndex : resultKeys[currentJobIndex];\n      sequentialPromises[key](resultAggregator).then((value2) => {\n        if (hasAborted === true) {\n          resolve();\n          return;\n        }\n        resultAggregator[key] = { key, status: \"fulfilled\", value: value2 };\n        setTimeout(runNextPromise);\n      }).catch((reason) => {\n        if (hasAborted === true) {\n          resolve();\n          return;\n        }\n        const result = { key, status: \"rejected\", reason };\n        resultAggregator[key] = result;\n        if (abortOnFail === true) {\n          hasAborted = true;\n          reject({ ...result, resultAggregator });\n          return;\n        }\n        setTimeout(runNextPromise);\n      });\n    }\n    runNextPromise();\n  });\n  const threads = Array(threadsNumber).fill(getPromiseThread());\n  return Promise.all(threads).then(() => resultAggregator);\n}\n\n// src/index.dev.js\nvar Quasar = {\n  version: \"2.17.5\",\n  install: install_quasar_default,\n  // TODO: remove in Qv3 (should only be used through the plugin)\n  // We provide a deprecated fallback here\n  lang: Lang_default,\n  // TODO: remove in Qv3 (should only be used through the plugin)\n  // We provide a deprecated fallback here\n  iconSet: IconSet_default\n};\nexport {\n  AddressbarColor_default as AddressbarColor,\n  AppFullscreen_default as AppFullscreen,\n  AppVisibility_default as AppVisibility,\n  BottomSheet_default as BottomSheet,\n  ClosePopup_default as ClosePopup,\n  Cookies_default as Cookies,\n  Dark_default as Dark,\n  Dialog_default as Dialog,\n  EventBus,\n  IconSet_default as IconSet,\n  Intersection_default as Intersection,\n  Lang_default as Lang,\n  Loading_default as Loading,\n  LoadingBar_default as LoadingBar,\n  LocalStorage_default as LocalStorage,\n  Meta_default as Meta,\n  Morph_default as Morph,\n  Mutation_default as Mutation,\n  Notify_default as Notify,\n  Platform_default as Platform,\n  QAjaxBar_default as QAjaxBar,\n  QAvatar_default as QAvatar,\n  QBadge_default as QBadge,\n  QBanner_default as QBanner,\n  QBar_default as QBar,\n  QBreadcrumbs_default as QBreadcrumbs,\n  QBreadcrumbsEl_default as QBreadcrumbsEl,\n  QBtn_default as QBtn,\n  QBtnDropdown_default as QBtnDropdown,\n  QBtnGroup_default as QBtnGroup,\n  QBtnToggle_default as QBtnToggle,\n  QCard_default as QCard,\n  QCardActions_default as QCardActions,\n  QCardSection_default as QCardSection,\n  QCarousel_default as QCarousel,\n  QCarouselControl_default as QCarouselControl,\n  QCarouselSlide_default as QCarouselSlide,\n  QChatMessage_default as QChatMessage,\n  QCheckbox_default as QCheckbox,\n  QChip_default as QChip,\n  QCircularProgress_default as QCircularProgress,\n  QColor_default as QColor,\n  QDate_default as QDate,\n  QDialog_default as QDialog,\n  QDrawer_default as QDrawer,\n  QEditor_default as QEditor,\n  QExpansionItem_default as QExpansionItem,\n  QFab_default as QFab,\n  QFabAction_default as QFabAction,\n  QField_default as QField,\n  QFile_default as QFile,\n  QFooter_default as QFooter,\n  QForm_default as QForm,\n  QFormChildMixin_default as QFormChildMixin,\n  QHeader_default as QHeader,\n  QIcon_default as QIcon,\n  QImg_default as QImg,\n  QInfiniteScroll_default as QInfiniteScroll,\n  QInnerLoading_default as QInnerLoading,\n  QInput_default as QInput,\n  QIntersection_default as QIntersection,\n  QItem_default as QItem,\n  QItemLabel_default as QItemLabel,\n  QItemSection_default as QItemSection,\n  QKnob_default as QKnob,\n  QLayout_default as QLayout,\n  QLinearProgress_default as QLinearProgress,\n  QList_default as QList,\n  QMarkupTable_default as QMarkupTable,\n  QMenu_default as QMenu,\n  QNoSsr_default as QNoSsr,\n  QOptionGroup_default as QOptionGroup,\n  QPage_default as QPage,\n  QPageContainer_default as QPageContainer,\n  QPageScroller_default as QPageScroller,\n  QPageSticky_default as QPageSticky,\n  QPagination_default as QPagination,\n  QParallax_default as QParallax,\n  QPopupEdit_default as QPopupEdit,\n  QPopupProxy_default as QPopupProxy,\n  QPullToRefresh_default as QPullToRefresh,\n  QRadio_default as QRadio,\n  QRange_default as QRange,\n  QRating_default as QRating,\n  QResizeObserver_default as QResizeObserver,\n  QResponsive_default as QResponsive,\n  QRouteTab_default as QRouteTab,\n  QScrollArea_default as QScrollArea,\n  QScrollObserver_default as QScrollObserver,\n  QSelect_default as QSelect,\n  QSeparator_default as QSeparator,\n  QSkeleton_default as QSkeleton,\n  QSlideItem_default as QSlideItem,\n  QSlideTransition_default as QSlideTransition,\n  QSlider_default as QSlider,\n  QSpace_default as QSpace,\n  QSpinner_default as QSpinner,\n  QSpinnerAudio_default as QSpinnerAudio,\n  QSpinnerBall_default as QSpinnerBall,\n  QSpinnerBars_default as QSpinnerBars,\n  QSpinnerBox_default as QSpinnerBox,\n  QSpinnerClock_default as QSpinnerClock,\n  QSpinnerComment_default as QSpinnerComment,\n  QSpinnerCube_default as QSpinnerCube,\n  QSpinnerDots_default as QSpinnerDots,\n  QSpinnerFacebook_default as QSpinnerFacebook,\n  QSpinnerGears_default as QSpinnerGears,\n  QSpinnerGrid_default as QSpinnerGrid,\n  QSpinnerHearts_default as QSpinnerHearts,\n  QSpinnerHourglass_default as QSpinnerHourglass,\n  QSpinnerInfinity_default as QSpinnerInfinity,\n  QSpinnerIos_default as QSpinnerIos,\n  QSpinnerOrbit_default as QSpinnerOrbit,\n  QSpinnerOval_default as QSpinnerOval,\n  QSpinnerPie_default as QSpinnerPie,\n  QSpinnerPuff_default as QSpinnerPuff,\n  QSpinnerRadio_default as QSpinnerRadio,\n  QSpinnerRings_default as QSpinnerRings,\n  QSpinnerTail_default as QSpinnerTail,\n  QSplitter_default as QSplitter,\n  QStep_default as QStep,\n  QStepper_default as QStepper,\n  QStepperNavigation_default as QStepperNavigation,\n  QTab_default as QTab,\n  QTabPanel_default as QTabPanel,\n  QTabPanels_default as QTabPanels,\n  QTable_default as QTable,\n  QTabs_default as QTabs,\n  QTd_default as QTd,\n  QTh_default as QTh,\n  QTime_default as QTime,\n  QTimeline_default as QTimeline,\n  QTimelineEntry_default as QTimelineEntry,\n  QToggle_default as QToggle,\n  QToolbar_default as QToolbar,\n  QToolbarTitle_default as QToolbarTitle,\n  QTooltip_default as QTooltip,\n  QTr_default as QTr,\n  QTree_default as QTree,\n  QUploader_default as QUploader,\n  QUploaderAddTrigger_default as QUploaderAddTrigger,\n  QVideo_default as QVideo,\n  QVirtualScroll_default as QVirtualScroll,\n  Quasar,\n  Ripple_default as Ripple,\n  Screen_default as Screen,\n  Scroll_default as Scroll,\n  ScrollFire_default as ScrollFire,\n  SessionStorage_default as SessionStorage,\n  TouchHold_default as TouchHold,\n  TouchPan_default as TouchPan,\n  TouchRepeat_default as TouchRepeat,\n  TouchSwipe_default as TouchSwipe,\n  cloneDeep as clone,\n  colors_default as colors,\n  copy_to_clipboard_default as copyToClipboard,\n  create_meta_mixin_default as createMetaMixin,\n  create_uploader_component_default as createUploaderComponent,\n  date_default as date,\n  debounce_default as debounce,\n  dom_default as dom,\n  event_default as event,\n  export_file_default as exportFile,\n  extend,\n  format_default as format,\n  frame_debounce_default as frameDebounce,\n  getCssVar,\n  is_default as is,\n  morph,\n  noop,\n  open_url_default as openURL,\n  patterns_default as patterns,\n  runSequentialPromises,\n  scroll_default as scroll,\n  setCssVar,\n  throttle_default as throttle,\n  uid_default as uid,\n  useDialogPluginComponent,\n  use_form_child_default as useFormChild,\n  use_hydration_default as useHydration,\n  use_id_default as useId,\n  use_interval_default as useInterval,\n  use_meta_default as useMeta,\n  useQuasar,\n  use_render_cache_default as useRenderCache,\n  use_split_attrs_default as useSplitAttrs,\n  use_tick_default as useTick,\n  use_timeout_default as useTimeout\n};\n","import { Timestamp } from 'firebase/firestore'\n\n/**\n * @param {date} payload\n * @param {string} format YYYY/MM/DD hh:mm:ss:SSS\n * @returns {string}\n */\nexport const funDateformat = (payload: Date | Timestamp | undefined | null, format: string) => {\n  if (!payload) return ''\n\n  if (payload instanceof Timestamp) {\n    payload = payload.toDate()\n  }\n\n  format = format.replace(/YYYY/g, payload.getFullYear().toString())\n  format = format.replace(/MM/g, ('0' + (payload.getMonth() + 1)).slice(-2))\n  format = format.replace(/DD/g, ('0' + payload.getDate()).slice(-2))\n  format = format.replace(/hh/g, ('0' + payload.getHours()).slice(-2))\n  format = format.replace(/mm/g, ('0' + payload.getMinutes()).slice(-2))\n  format = format.replace(/ss/g, ('0' + payload.getSeconds()).slice(-2))\n  format = format.replace(/SSS/g, ('00' + payload.getMilliseconds()).slice(-3))\n  return format\n}\n\nimport { ref } from 'vue'\n\n/**\n * スピナー\n */\nexport const isSpinner = ref(false)\n\n/**\n * プログレス\n */\nexport const numProgress = ref(0)\n\n// @ts-nocheck\n\nexport const fileToBlobUrl = (file: File) => {\n  return window.URL.createObjectURL(file)\n}\n\nexport const imageDataURLToFile = (dataUrl, fileName, mimeType) => {\n  return fetch(dataUrl)\n    .then((res) => res.arrayBuffer())\n    .then((buf) => new File([buf], fileName, { type: mimeType }))\n}\n\n/**\n *\n * @param pdfFile\n * @param id\n * @returns\n */\nexport const generateThumbnailFromPDF = async (pdfFile: File, id: string) => {\n  const pdfjs = await import('pdfjs-dist/build/pdf')\n  const pdfjsWorker = await import('pdfjs-dist/build/pdf.worker.entry')\n  pdfjs.GlobalWorkerOptions.workerSrc = pdfjsWorker\n  const pdf = await pdfjs.getDocument(fileToBlobUrl(pdfFile)).promise\n\n  const firstPage = await pdf.getPage(1)\n  const scale = 1.0\n  const viewport = firstPage.getViewport({ scale: scale })\n\n  // Prepare canvas using PDF page dimensions\n  const canvas = document.createElement('canvas')\n  canvas.id = `pdf_thumbnail${id}`\n  const context = canvas.getContext('2d')\n  canvas.height = viewport.height\n  canvas.width = viewport.width\n\n  const renderContext = {\n    canvasContext: context,\n    viewport: viewport,\n  }\n\n  await firstPage.render(renderContext).promise\n  // return canvas.toDataURL()\n\n  const genFile = await imageDataURLToFile(canvas.toDataURL(), 'temp_thumbnail.png', 'image/png')\n\n  return URL.createObjectURL(genFile)\n}\n","/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @fileoverview Firebase constants.  Some of these (@defines) can be overridden at compile-time.\r\n */\r\nconst CONSTANTS = {\r\n    /**\r\n     * @define {boolean} Whether this is the client Node.js SDK.\r\n     */\r\n    NODE_CLIENT: false,\r\n    /**\r\n     * @define {boolean} Whether this is the Admin Node.js SDK.\r\n     */\r\n    NODE_ADMIN: false,\r\n    /**\r\n     * Firebase SDK Version\r\n     */\r\n    SDK_VERSION: '${JSCORE_VERSION}'\r\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Throws an error if the provided assertion is falsy\r\n */\r\nconst assert = function (assertion, message) {\r\n    if (!assertion) {\r\n        throw assertionError(message);\r\n    }\r\n};\r\n/**\r\n * Returns an Error object suitable for throwing.\r\n */\r\nconst assertionError = function (message) {\r\n    return new Error('Firebase Database (' +\r\n        CONSTANTS.SDK_VERSION +\r\n        ') INTERNAL ASSERT FAILED: ' +\r\n        message);\r\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst stringToByteArray$1 = function (str) {\r\n    // TODO(user): Use native implementations if/when available\r\n    const out = [];\r\n    let p = 0;\r\n    for (let i = 0; i < str.length; i++) {\r\n        let c = str.charCodeAt(i);\r\n        if (c < 128) {\r\n            out[p++] = c;\r\n        }\r\n        else if (c < 2048) {\r\n            out[p++] = (c >> 6) | 192;\r\n            out[p++] = (c & 63) | 128;\r\n        }\r\n        else if ((c & 0xfc00) === 0xd800 &&\r\n            i + 1 < str.length &&\r\n            (str.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\r\n            // Surrogate Pair\r\n            c = 0x10000 + ((c & 0x03ff) << 10) + (str.charCodeAt(++i) & 0x03ff);\r\n            out[p++] = (c >> 18) | 240;\r\n            out[p++] = ((c >> 12) & 63) | 128;\r\n            out[p++] = ((c >> 6) & 63) | 128;\r\n            out[p++] = (c & 63) | 128;\r\n        }\r\n        else {\r\n            out[p++] = (c >> 12) | 224;\r\n            out[p++] = ((c >> 6) & 63) | 128;\r\n            out[p++] = (c & 63) | 128;\r\n        }\r\n    }\r\n    return out;\r\n};\r\n/**\r\n * Turns an array of numbers into the string given by the concatenation of the\r\n * characters to which the numbers correspond.\r\n * @param bytes Array of numbers representing characters.\r\n * @return Stringification of the array.\r\n */\r\nconst byteArrayToString = function (bytes) {\r\n    // TODO(user): Use native implementations if/when available\r\n    const out = [];\r\n    let pos = 0, c = 0;\r\n    while (pos < bytes.length) {\r\n        const c1 = bytes[pos++];\r\n        if (c1 < 128) {\r\n            out[c++] = String.fromCharCode(c1);\r\n        }\r\n        else if (c1 > 191 && c1 < 224) {\r\n            const c2 = bytes[pos++];\r\n            out[c++] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));\r\n        }\r\n        else if (c1 > 239 && c1 < 365) {\r\n            // Surrogate Pair\r\n            const c2 = bytes[pos++];\r\n            const c3 = bytes[pos++];\r\n            const c4 = bytes[pos++];\r\n            const u = (((c1 & 7) << 18) | ((c2 & 63) << 12) | ((c3 & 63) << 6) | (c4 & 63)) -\r\n                0x10000;\r\n            out[c++] = String.fromCharCode(0xd800 + (u >> 10));\r\n            out[c++] = String.fromCharCode(0xdc00 + (u & 1023));\r\n        }\r\n        else {\r\n            const c2 = bytes[pos++];\r\n            const c3 = bytes[pos++];\r\n            out[c++] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\r\n        }\r\n    }\r\n    return out.join('');\r\n};\r\n// We define it as an object literal instead of a class because a class compiled down to es5 can't\r\n// be treeshaked. https://github.com/rollup/rollup/issues/1691\r\n// Static lookup maps, lazily populated by init_()\r\nconst base64 = {\r\n    /**\r\n     * Maps bytes to characters.\r\n     */\r\n    byteToCharMap_: null,\r\n    /**\r\n     * Maps characters to bytes.\r\n     */\r\n    charToByteMap_: null,\r\n    /**\r\n     * Maps bytes to websafe characters.\r\n     * @private\r\n     */\r\n    byteToCharMapWebSafe_: null,\r\n    /**\r\n     * Maps websafe characters to bytes.\r\n     * @private\r\n     */\r\n    charToByteMapWebSafe_: null,\r\n    /**\r\n     * Our default alphabet, shared between\r\n     * ENCODED_VALS and ENCODED_VALS_WEBSAFE\r\n     */\r\n    ENCODED_VALS_BASE: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz' + '0123456789',\r\n    /**\r\n     * Our default alphabet. Value 64 (=) is special; it means \"nothing.\"\r\n     */\r\n    get ENCODED_VALS() {\r\n        return this.ENCODED_VALS_BASE + '+/=';\r\n    },\r\n    /**\r\n     * Our websafe alphabet.\r\n     */\r\n    get ENCODED_VALS_WEBSAFE() {\r\n        return this.ENCODED_VALS_BASE + '-_.';\r\n    },\r\n    /**\r\n     * Whether this browser supports the atob and btoa functions. This extension\r\n     * started at Mozilla but is now implemented by many browsers. We use the\r\n     * ASSUME_* variables to avoid pulling in the full useragent detection library\r\n     * but still allowing the standard per-browser compilations.\r\n     *\r\n     */\r\n    HAS_NATIVE_SUPPORT: typeof atob === 'function',\r\n    /**\r\n     * Base64-encode an array of bytes.\r\n     *\r\n     * @param input An array of bytes (numbers with\r\n     *     value in [0, 255]) to encode.\r\n     * @param webSafe Boolean indicating we should use the\r\n     *     alternative alphabet.\r\n     * @return The base64 encoded string.\r\n     */\r\n    encodeByteArray(input, webSafe) {\r\n        if (!Array.isArray(input)) {\r\n            throw Error('encodeByteArray takes an array as a parameter');\r\n        }\r\n        this.init_();\r\n        const byteToCharMap = webSafe\r\n            ? this.byteToCharMapWebSafe_\r\n            : this.byteToCharMap_;\r\n        const output = [];\r\n        for (let i = 0; i < input.length; i += 3) {\r\n            const byte1 = input[i];\r\n            const haveByte2 = i + 1 < input.length;\r\n            const byte2 = haveByte2 ? input[i + 1] : 0;\r\n            const haveByte3 = i + 2 < input.length;\r\n            const byte3 = haveByte3 ? input[i + 2] : 0;\r\n            const outByte1 = byte1 >> 2;\r\n            const outByte2 = ((byte1 & 0x03) << 4) | (byte2 >> 4);\r\n            let outByte3 = ((byte2 & 0x0f) << 2) | (byte3 >> 6);\r\n            let outByte4 = byte3 & 0x3f;\r\n            if (!haveByte3) {\r\n                outByte4 = 64;\r\n                if (!haveByte2) {\r\n                    outByte3 = 64;\r\n                }\r\n            }\r\n            output.push(byteToCharMap[outByte1], byteToCharMap[outByte2], byteToCharMap[outByte3], byteToCharMap[outByte4]);\r\n        }\r\n        return output.join('');\r\n    },\r\n    /**\r\n     * Base64-encode a string.\r\n     *\r\n     * @param input A string to encode.\r\n     * @param webSafe If true, we should use the\r\n     *     alternative alphabet.\r\n     * @return The base64 encoded string.\r\n     */\r\n    encodeString(input, webSafe) {\r\n        // Shortcut for Mozilla browsers that implement\r\n        // a native base64 encoder in the form of \"btoa/atob\"\r\n        if (this.HAS_NATIVE_SUPPORT && !webSafe) {\r\n            return btoa(input);\r\n        }\r\n        return this.encodeByteArray(stringToByteArray$1(input), webSafe);\r\n    },\r\n    /**\r\n     * Base64-decode a string.\r\n     *\r\n     * @param input to decode.\r\n     * @param webSafe True if we should use the\r\n     *     alternative alphabet.\r\n     * @return string representing the decoded value.\r\n     */\r\n    decodeString(input, webSafe) {\r\n        // Shortcut for Mozilla browsers that implement\r\n        // a native base64 encoder in the form of \"btoa/atob\"\r\n        if (this.HAS_NATIVE_SUPPORT && !webSafe) {\r\n            return atob(input);\r\n        }\r\n        return byteArrayToString(this.decodeStringToByteArray(input, webSafe));\r\n    },\r\n    /**\r\n     * Base64-decode a string.\r\n     *\r\n     * In base-64 decoding, groups of four characters are converted into three\r\n     * bytes.  If the encoder did not apply padding, the input length may not\r\n     * be a multiple of 4.\r\n     *\r\n     * In this case, the last group will have fewer than 4 characters, and\r\n     * padding will be inferred.  If the group has one or two characters, it decodes\r\n     * to one byte.  If the group has three characters, it decodes to two bytes.\r\n     *\r\n     * @param input Input to decode.\r\n     * @param webSafe True if we should use the web-safe alphabet.\r\n     * @return bytes representing the decoded value.\r\n     */\r\n    decodeStringToByteArray(input, webSafe) {\r\n        this.init_();\r\n        const charToByteMap = webSafe\r\n            ? this.charToByteMapWebSafe_\r\n            : this.charToByteMap_;\r\n        const output = [];\r\n        for (let i = 0; i < input.length;) {\r\n            const byte1 = charToByteMap[input.charAt(i++)];\r\n            const haveByte2 = i < input.length;\r\n            const byte2 = haveByte2 ? charToByteMap[input.charAt(i)] : 0;\r\n            ++i;\r\n            const haveByte3 = i < input.length;\r\n            const byte3 = haveByte3 ? charToByteMap[input.charAt(i)] : 64;\r\n            ++i;\r\n            const haveByte4 = i < input.length;\r\n            const byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;\r\n            ++i;\r\n            if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {\r\n                throw new DecodeBase64StringError();\r\n            }\r\n            const outByte1 = (byte1 << 2) | (byte2 >> 4);\r\n            output.push(outByte1);\r\n            if (byte3 !== 64) {\r\n                const outByte2 = ((byte2 << 4) & 0xf0) | (byte3 >> 2);\r\n                output.push(outByte2);\r\n                if (byte4 !== 64) {\r\n                    const outByte3 = ((byte3 << 6) & 0xc0) | byte4;\r\n                    output.push(outByte3);\r\n                }\r\n            }\r\n        }\r\n        return output;\r\n    },\r\n    /**\r\n     * Lazy static initialization function. Called before\r\n     * accessing any of the static map variables.\r\n     * @private\r\n     */\r\n    init_() {\r\n        if (!this.byteToCharMap_) {\r\n            this.byteToCharMap_ = {};\r\n            this.charToByteMap_ = {};\r\n            this.byteToCharMapWebSafe_ = {};\r\n            this.charToByteMapWebSafe_ = {};\r\n            // We want quick mappings back and forth, so we precompute two maps.\r\n            for (let i = 0; i < this.ENCODED_VALS.length; i++) {\r\n                this.byteToCharMap_[i] = this.ENCODED_VALS.charAt(i);\r\n                this.charToByteMap_[this.byteToCharMap_[i]] = i;\r\n                this.byteToCharMapWebSafe_[i] = this.ENCODED_VALS_WEBSAFE.charAt(i);\r\n                this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]] = i;\r\n                // Be forgiving when decoding and correctly decode both encodings.\r\n                if (i >= this.ENCODED_VALS_BASE.length) {\r\n                    this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)] = i;\r\n                    this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)] = i;\r\n                }\r\n            }\r\n        }\r\n    }\r\n};\r\n/**\r\n * An error encountered while decoding base64 string.\r\n */\r\nclass DecodeBase64StringError extends Error {\r\n    constructor() {\r\n        super(...arguments);\r\n        this.name = 'DecodeBase64StringError';\r\n    }\r\n}\r\n/**\r\n * URL-safe base64 encoding\r\n */\r\nconst base64Encode = function (str) {\r\n    const utf8Bytes = stringToByteArray$1(str);\r\n    return base64.encodeByteArray(utf8Bytes, true);\r\n};\r\n/**\r\n * URL-safe base64 encoding (without \".\" padding in the end).\r\n * e.g. Used in JSON Web Token (JWT) parts.\r\n */\r\nconst base64urlEncodeWithoutPadding = function (str) {\r\n    // Use base64url encoding and remove padding in the end (dot characters).\r\n    return base64Encode(str).replace(/\\./g, '');\r\n};\r\n/**\r\n * URL-safe base64 decoding\r\n *\r\n * NOTE: DO NOT use the global atob() function - it does NOT support the\r\n * base64Url variant encoding.\r\n *\r\n * @param str To be decoded\r\n * @return Decoded result, if possible\r\n */\r\nconst base64Decode = function (str) {\r\n    try {\r\n        return base64.decodeString(str, true);\r\n    }\r\n    catch (e) {\r\n        console.error('base64Decode failed: ', e);\r\n    }\r\n    return null;\r\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Do a deep-copy of basic JavaScript Objects or Arrays.\r\n */\r\nfunction deepCopy(value) {\r\n    return deepExtend(undefined, value);\r\n}\r\n/**\r\n * Copy properties from source to target (recursively allows extension\r\n * of Objects and Arrays).  Scalar values in the target are over-written.\r\n * If target is undefined, an object of the appropriate type will be created\r\n * (and returned).\r\n *\r\n * We recursively copy all child properties of plain Objects in the source- so\r\n * that namespace- like dictionaries are merged.\r\n *\r\n * Note that the target can be a function, in which case the properties in\r\n * the source Object are copied onto it as static properties of the Function.\r\n *\r\n * Note: we don't merge __proto__ to prevent prototype pollution\r\n */\r\nfunction deepExtend(target, source) {\r\n    if (!(source instanceof Object)) {\r\n        return source;\r\n    }\r\n    switch (source.constructor) {\r\n        case Date:\r\n            // Treat Dates like scalars; if the target date object had any child\r\n            // properties - they will be lost!\r\n            const dateValue = source;\r\n            return new Date(dateValue.getTime());\r\n        case Object:\r\n            if (target === undefined) {\r\n                target = {};\r\n            }\r\n            break;\r\n        case Array:\r\n            // Always copy the array source and overwrite the target.\r\n            target = [];\r\n            break;\r\n        default:\r\n            // Not a plain Object - treat it as a scalar.\r\n            return source;\r\n    }\r\n    for (const prop in source) {\r\n        // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\r\n        if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\r\n            continue;\r\n        }\r\n        target[prop] = deepExtend(target[prop], source[prop]);\r\n    }\r\n    return target;\r\n}\r\nfunction isValidKey(key) {\r\n    return key !== '__proto__';\r\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Polyfill for `globalThis` object.\r\n * @returns the `globalThis` object for the given environment.\r\n * @public\r\n */\r\nfunction getGlobal() {\r\n    if (typeof self !== 'undefined') {\r\n        return self;\r\n    }\r\n    if (typeof window !== 'undefined') {\r\n        return window;\r\n    }\r\n    if (typeof global !== 'undefined') {\r\n        return global;\r\n    }\r\n    throw new Error('Unable to locate global object.');\r\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst getDefaultsFromGlobal = () => getGlobal().__FIREBASE_DEFAULTS__;\r\n/**\r\n * Attempt to read defaults from a JSON string provided to\r\n * process(.)env(.)__FIREBASE_DEFAULTS__ or a JSON file whose path is in\r\n * process(.)env(.)__FIREBASE_DEFAULTS_PATH__\r\n * The dots are in parens because certain compilers (Vite?) cannot\r\n * handle seeing that variable in comments.\r\n * See https://github.com/firebase/firebase-js-sdk/issues/6838\r\n */\r\nconst getDefaultsFromEnvVariable = () => {\r\n    if (typeof process === 'undefined' || typeof process.env === 'undefined') {\r\n        return;\r\n    }\r\n    const defaultsJsonString = process.env.__FIREBASE_DEFAULTS__;\r\n    if (defaultsJsonString) {\r\n        return JSON.parse(defaultsJsonString);\r\n    }\r\n};\r\nconst getDefaultsFromCookie = () => {\r\n    if (typeof document === 'undefined') {\r\n        return;\r\n    }\r\n    let match;\r\n    try {\r\n        match = document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/);\r\n    }\r\n    catch (e) {\r\n        // Some environments such as Angular Universal SSR have a\r\n        // `document` object but error on accessing `document.cookie`.\r\n        return;\r\n    }\r\n    const decoded = match && base64Decode(match[1]);\r\n    return decoded && JSON.parse(decoded);\r\n};\r\n/**\r\n * Get the __FIREBASE_DEFAULTS__ object. It checks in order:\r\n * (1) if such an object exists as a property of `globalThis`\r\n * (2) if such an object was provided on a shell environment variable\r\n * (3) if such an object exists in a cookie\r\n * @public\r\n */\r\nconst getDefaults = () => {\r\n    try {\r\n        return (getDefaultsFromGlobal() ||\r\n            getDefaultsFromEnvVariable() ||\r\n            getDefaultsFromCookie());\r\n    }\r\n    catch (e) {\r\n        /**\r\n         * Catch-all for being unable to get __FIREBASE_DEFAULTS__ due\r\n         * to any environment case we have not accounted for. Log to\r\n         * info instead of swallowing so we can find these unknown cases\r\n         * and add paths for them if needed.\r\n         */\r\n        console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);\r\n        return;\r\n    }\r\n};\r\n/**\r\n * Returns emulator host stored in the __FIREBASE_DEFAULTS__ object\r\n * for the given product.\r\n * @returns a URL host formatted like `127.0.0.1:9999` or `[::1]:4000` if available\r\n * @public\r\n */\r\nconst getDefaultEmulatorHost = (productName) => { var _a, _b; return (_b = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.emulatorHosts) === null || _b === void 0 ? void 0 : _b[productName]; };\r\n/**\r\n * Returns emulator hostname and port stored in the __FIREBASE_DEFAULTS__ object\r\n * for the given product.\r\n * @returns a pair of hostname and port like `[\"::1\", 4000]` if available\r\n * @public\r\n */\r\nconst getDefaultEmulatorHostnameAndPort = (productName) => {\r\n    const host = getDefaultEmulatorHost(productName);\r\n    if (!host) {\r\n        return undefined;\r\n    }\r\n    const separatorIndex = host.lastIndexOf(':'); // Finding the last since IPv6 addr also has colons.\r\n    if (separatorIndex <= 0 || separatorIndex + 1 === host.length) {\r\n        throw new Error(`Invalid host ${host} with no separate hostname and port!`);\r\n    }\r\n    // eslint-disable-next-line no-restricted-globals\r\n    const port = parseInt(host.substring(separatorIndex + 1), 10);\r\n    if (host[0] === '[') {\r\n        // Bracket-quoted `[ipv6addr]:port` => return \"ipv6addr\" (without brackets).\r\n        return [host.substring(1, separatorIndex - 1), port];\r\n    }\r\n    else {\r\n        return [host.substring(0, separatorIndex), port];\r\n    }\r\n};\r\n/**\r\n * Returns Firebase app config stored in the __FIREBASE_DEFAULTS__ object.\r\n * @public\r\n */\r\nconst getDefaultAppConfig = () => { var _a; return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.config; };\r\n/**\r\n * Returns an experimental setting on the __FIREBASE_DEFAULTS__ object (properties\r\n * prefixed by \"_\")\r\n * @public\r\n */\r\nconst getExperimentalSetting = (name) => { var _a; return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a[`_${name}`]; };\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass Deferred {\r\n    constructor() {\r\n        this.reject = () => { };\r\n        this.resolve = () => { };\r\n        this.promise = new Promise((resolve, reject) => {\r\n            this.resolve = resolve;\r\n            this.reject = reject;\r\n        });\r\n    }\r\n    /**\r\n     * Our API internals are not promisified and cannot because our callback APIs have subtle expectations around\r\n     * invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback\r\n     * and returns a node-style callback which will resolve or reject the Deferred's promise.\r\n     */\r\n    wrapCallback(callback) {\r\n        return (error, value) => {\r\n            if (error) {\r\n                this.reject(error);\r\n            }\r\n            else {\r\n                this.resolve(value);\r\n            }\r\n            if (typeof callback === 'function') {\r\n                // Attaching noop handler just in case developer wasn't expecting\r\n                // promises\r\n                this.promise.catch(() => { });\r\n                // Some of our callbacks don't expect a value and our own tests\r\n                // assert that the parameter length is 1\r\n                if (callback.length === 1) {\r\n                    callback(error);\r\n                }\r\n                else {\r\n                    callback(error, value);\r\n                }\r\n            }\r\n        };\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction createMockUserToken(token, projectId) {\r\n    if (token.uid) {\r\n        throw new Error('The \"uid\" field is no longer supported by mockUserToken. Please use \"sub\" instead for Firebase Auth User ID.');\r\n    }\r\n    // Unsecured JWTs use \"none\" as the algorithm.\r\n    const header = {\r\n        alg: 'none',\r\n        type: 'JWT'\r\n    };\r\n    const project = projectId || 'demo-project';\r\n    const iat = token.iat || 0;\r\n    const sub = token.sub || token.user_id;\r\n    if (!sub) {\r\n        throw new Error(\"mockUserToken must contain 'sub' or 'user_id' field!\");\r\n    }\r\n    const payload = Object.assign({ \r\n        // Set all required fields to decent defaults\r\n        iss: `https://securetoken.google.com/${project}`, aud: project, iat, exp: iat + 3600, auth_time: iat, sub, user_id: sub, firebase: {\r\n            sign_in_provider: 'custom',\r\n            identities: {}\r\n        } }, token);\r\n    // Unsecured JWTs use the empty string as a signature.\r\n    const signature = '';\r\n    return [\r\n        base64urlEncodeWithoutPadding(JSON.stringify(header)),\r\n        base64urlEncodeWithoutPadding(JSON.stringify(payload)),\r\n        signature\r\n    ].join('.');\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Returns navigator.userAgent string or '' if it's not defined.\r\n * @return user agent string\r\n */\r\nfunction getUA() {\r\n    if (typeof navigator !== 'undefined' &&\r\n        typeof navigator['userAgent'] === 'string') {\r\n        return navigator['userAgent'];\r\n    }\r\n    else {\r\n        return '';\r\n    }\r\n}\r\n/**\r\n * Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.\r\n *\r\n * Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap\r\n * in the Ripple emulator) nor Cordova `onDeviceReady`, which would normally\r\n * wait for a callback.\r\n */\r\nfunction isMobileCordova() {\r\n    return (typeof window !== 'undefined' &&\r\n        // @ts-ignore Setting up an broadly applicable index signature for Window\r\n        // just to deal with this case would probably be a bad idea.\r\n        !!(window['cordova'] || window['phonegap'] || window['PhoneGap']) &&\r\n        /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA()));\r\n}\r\n/**\r\n * Detect Node.js.\r\n *\r\n * @return true if Node.js environment is detected or specified.\r\n */\r\n// Node detection logic from: https://github.com/iliakan/detect-node/\r\nfunction isNode() {\r\n    var _a;\r\n    const forceEnvironment = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.forceEnvironment;\r\n    if (forceEnvironment === 'node') {\r\n        return true;\r\n    }\r\n    else if (forceEnvironment === 'browser') {\r\n        return false;\r\n    }\r\n    try {\r\n        return (Object.prototype.toString.call(global.process) === '[object process]');\r\n    }\r\n    catch (e) {\r\n        return false;\r\n    }\r\n}\r\n/**\r\n * Detect Browser Environment.\r\n * Note: This will return true for certain test frameworks that are incompletely\r\n * mimicking a browser, and should not lead to assuming all browser APIs are\r\n * available.\r\n */\r\nfunction isBrowser() {\r\n    return typeof window !== 'undefined' || isWebWorker();\r\n}\r\n/**\r\n * Detect Web Worker context.\r\n */\r\nfunction isWebWorker() {\r\n    return (typeof WorkerGlobalScope !== 'undefined' &&\r\n        typeof self !== 'undefined' &&\r\n        self instanceof WorkerGlobalScope);\r\n}\r\n/**\r\n * Detect Cloudflare Worker context.\r\n */\r\nfunction isCloudflareWorker() {\r\n    return (typeof navigator !== 'undefined' &&\r\n        navigator.userAgent === 'Cloudflare-Workers');\r\n}\r\nfunction isBrowserExtension() {\r\n    const runtime = typeof chrome === 'object'\r\n        ? chrome.runtime\r\n        : typeof browser === 'object'\r\n            ? browser.runtime\r\n            : undefined;\r\n    return typeof runtime === 'object' && runtime.id !== undefined;\r\n}\r\n/**\r\n * Detect React Native.\r\n *\r\n * @return true if ReactNative environment is detected.\r\n */\r\nfunction isReactNative() {\r\n    return (typeof navigator === 'object' && navigator['product'] === 'ReactNative');\r\n}\r\n/** Detects Electron apps. */\r\nfunction isElectron() {\r\n    return getUA().indexOf('Electron/') >= 0;\r\n}\r\n/** Detects Internet Explorer. */\r\nfunction isIE() {\r\n    const ua = getUA();\r\n    return ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;\r\n}\r\n/** Detects Universal Windows Platform apps. */\r\nfunction isUWP() {\r\n    return getUA().indexOf('MSAppHost/') >= 0;\r\n}\r\n/**\r\n * Detect whether the current SDK build is the Node version.\r\n *\r\n * @return true if it's the Node SDK build.\r\n */\r\nfunction isNodeSdk() {\r\n    return CONSTANTS.NODE_CLIENT === true || CONSTANTS.NODE_ADMIN === true;\r\n}\r\n/** Returns true if we are running in Safari. */\r\nfunction isSafari() {\r\n    return (!isNode() &&\r\n        !!navigator.userAgent &&\r\n        navigator.userAgent.includes('Safari') &&\r\n        !navigator.userAgent.includes('Chrome'));\r\n}\r\n/**\r\n * This method checks if indexedDB is supported by current browser/service worker context\r\n * @return true if indexedDB is supported by current browser/service worker context\r\n */\r\nfunction isIndexedDBAvailable() {\r\n    try {\r\n        return typeof indexedDB === 'object';\r\n    }\r\n    catch (e) {\r\n        return false;\r\n    }\r\n}\r\n/**\r\n * This method validates browser/sw context for indexedDB by opening a dummy indexedDB database and reject\r\n * if errors occur during the database open operation.\r\n *\r\n * @throws exception if current browser/sw context can't run idb.open (ex: Safari iframe, Firefox\r\n * private browsing)\r\n */\r\nfunction validateIndexedDBOpenable() {\r\n    return new Promise((resolve, reject) => {\r\n        try {\r\n            let preExist = true;\r\n            const DB_CHECK_NAME = 'validate-browser-context-for-indexeddb-analytics-module';\r\n            const request = self.indexedDB.open(DB_CHECK_NAME);\r\n            request.onsuccess = () => {\r\n                request.result.close();\r\n                // delete database only when it doesn't pre-exist\r\n                if (!preExist) {\r\n                    self.indexedDB.deleteDatabase(DB_CHECK_NAME);\r\n                }\r\n                resolve(true);\r\n            };\r\n            request.onupgradeneeded = () => {\r\n                preExist = false;\r\n            };\r\n            request.onerror = () => {\r\n                var _a;\r\n                reject(((_a = request.error) === null || _a === void 0 ? void 0 : _a.message) || '');\r\n            };\r\n        }\r\n        catch (error) {\r\n            reject(error);\r\n        }\r\n    });\r\n}\r\n/**\r\n *\r\n * This method checks whether cookie is enabled within current browser\r\n * @return true if cookie is enabled within current browser\r\n */\r\nfunction areCookiesEnabled() {\r\n    if (typeof navigator === 'undefined' || !navigator.cookieEnabled) {\r\n        return false;\r\n    }\r\n    return true;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @fileoverview Standardized Firebase Error.\r\n *\r\n * Usage:\r\n *\r\n *   // TypeScript string literals for type-safe codes\r\n *   type Err =\r\n *     'unknown' |\r\n *     'object-not-found'\r\n *     ;\r\n *\r\n *   // Closure enum for type-safe error codes\r\n *   // at-enum {string}\r\n *   var Err = {\r\n *     UNKNOWN: 'unknown',\r\n *     OBJECT_NOT_FOUND: 'object-not-found',\r\n *   }\r\n *\r\n *   let errors: Map<Err, string> = {\r\n *     'generic-error': \"Unknown error\",\r\n *     'file-not-found': \"Could not find file: {$file}\",\r\n *   };\r\n *\r\n *   // Type-safe function - must pass a valid error code as param.\r\n *   let error = new ErrorFactory<Err>('service', 'Service', errors);\r\n *\r\n *   ...\r\n *   throw error.create(Err.GENERIC);\r\n *   ...\r\n *   throw error.create(Err.FILE_NOT_FOUND, {'file': fileName});\r\n *   ...\r\n *   // Service: Could not file file: foo.txt (service/file-not-found).\r\n *\r\n *   catch (e) {\r\n *     assert(e.message === \"Could not find file: foo.txt.\");\r\n *     if ((e as FirebaseError)?.code === 'service/file-not-found') {\r\n *       console.log(\"Could not read file: \" + e['file']);\r\n *     }\r\n *   }\r\n */\r\nconst ERROR_NAME = 'FirebaseError';\r\n// Based on code from:\r\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types\r\nclass FirebaseError extends Error {\r\n    constructor(\r\n    /** The error code for this error. */\r\n    code, message, \r\n    /** Custom data for this error. */\r\n    customData) {\r\n        super(message);\r\n        this.code = code;\r\n        this.customData = customData;\r\n        /** The custom name for all FirebaseErrors. */\r\n        this.name = ERROR_NAME;\r\n        // Fix For ES5\r\n        // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\r\n        Object.setPrototypeOf(this, FirebaseError.prototype);\r\n        // Maintains proper stack trace for where our error was thrown.\r\n        // Only available on V8.\r\n        if (Error.captureStackTrace) {\r\n            Error.captureStackTrace(this, ErrorFactory.prototype.create);\r\n        }\r\n    }\r\n}\r\nclass ErrorFactory {\r\n    constructor(service, serviceName, errors) {\r\n        this.service = service;\r\n        this.serviceName = serviceName;\r\n        this.errors = errors;\r\n    }\r\n    create(code, ...data) {\r\n        const customData = data[0] || {};\r\n        const fullCode = `${this.service}/${code}`;\r\n        const template = this.errors[code];\r\n        const message = template ? replaceTemplate(template, customData) : 'Error';\r\n        // Service Name: Error message (service/code).\r\n        const fullMessage = `${this.serviceName}: ${message} (${fullCode}).`;\r\n        const error = new FirebaseError(fullCode, fullMessage, customData);\r\n        return error;\r\n    }\r\n}\r\nfunction replaceTemplate(template, data) {\r\n    return template.replace(PATTERN, (_, key) => {\r\n        const value = data[key];\r\n        return value != null ? String(value) : `<${key}?>`;\r\n    });\r\n}\r\nconst PATTERN = /\\{\\$([^}]+)}/g;\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Evaluates a JSON string into a javascript object.\r\n *\r\n * @param {string} str A string containing JSON.\r\n * @return {*} The javascript object representing the specified JSON.\r\n */\r\nfunction jsonEval(str) {\r\n    return JSON.parse(str);\r\n}\r\n/**\r\n * Returns JSON representing a javascript object.\r\n * @param {*} data JavaScript object to be stringified.\r\n * @return {string} The JSON contents of the object.\r\n */\r\nfunction stringify(data) {\r\n    return JSON.stringify(data);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Decodes a Firebase auth. token into constituent parts.\r\n *\r\n * Notes:\r\n * - May return with invalid / incomplete claims if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst decode = function (token) {\r\n    let header = {}, claims = {}, data = {}, signature = '';\r\n    try {\r\n        const parts = token.split('.');\r\n        header = jsonEval(base64Decode(parts[0]) || '');\r\n        claims = jsonEval(base64Decode(parts[1]) || '');\r\n        signature = parts[2];\r\n        data = claims['d'] || {};\r\n        delete claims['d'];\r\n    }\r\n    catch (e) { }\r\n    return {\r\n        header,\r\n        claims,\r\n        data,\r\n        signature\r\n    };\r\n};\r\n/**\r\n * Decodes a Firebase auth. token and checks the validity of its time-based claims. Will return true if the\r\n * token is within the time window authorized by the 'nbf' (not-before) and 'iat' (issued-at) claims.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst isValidTimestamp = function (token) {\r\n    const claims = decode(token).claims;\r\n    const now = Math.floor(new Date().getTime() / 1000);\r\n    let validSince = 0, validUntil = 0;\r\n    if (typeof claims === 'object') {\r\n        if (claims.hasOwnProperty('nbf')) {\r\n            validSince = claims['nbf'];\r\n        }\r\n        else if (claims.hasOwnProperty('iat')) {\r\n            validSince = claims['iat'];\r\n        }\r\n        if (claims.hasOwnProperty('exp')) {\r\n            validUntil = claims['exp'];\r\n        }\r\n        else {\r\n            // token will expire after 24h by default\r\n            validUntil = validSince + 86400;\r\n        }\r\n    }\r\n    return (!!now &&\r\n        !!validSince &&\r\n        !!validUntil &&\r\n        now >= validSince &&\r\n        now <= validUntil);\r\n};\r\n/**\r\n * Decodes a Firebase auth. token and returns its issued at time if valid, null otherwise.\r\n *\r\n * Notes:\r\n * - May return null if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst issuedAtTime = function (token) {\r\n    const claims = decode(token).claims;\r\n    if (typeof claims === 'object' && claims.hasOwnProperty('iat')) {\r\n        return claims['iat'];\r\n    }\r\n    return null;\r\n};\r\n/**\r\n * Decodes a Firebase auth. token and checks the validity of its format. Expects a valid issued-at time.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst isValidFormat = function (token) {\r\n    const decoded = decode(token), claims = decoded.claims;\r\n    return !!claims && typeof claims === 'object' && claims.hasOwnProperty('iat');\r\n};\r\n/**\r\n * Attempts to peer into an auth token and determine if it's an admin auth token by looking at the claims portion.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst isAdmin = function (token) {\r\n    const claims = decode(token).claims;\r\n    return typeof claims === 'object' && claims['admin'] === true;\r\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction contains(obj, key) {\r\n    return Object.prototype.hasOwnProperty.call(obj, key);\r\n}\r\nfunction safeGet(obj, key) {\r\n    if (Object.prototype.hasOwnProperty.call(obj, key)) {\r\n        return obj[key];\r\n    }\r\n    else {\r\n        return undefined;\r\n    }\r\n}\r\nfunction isEmpty(obj) {\r\n    for (const key in obj) {\r\n        if (Object.prototype.hasOwnProperty.call(obj, key)) {\r\n            return false;\r\n        }\r\n    }\r\n    return true;\r\n}\r\nfunction map(obj, fn, contextObj) {\r\n    const res = {};\r\n    for (const key in obj) {\r\n        if (Object.prototype.hasOwnProperty.call(obj, key)) {\r\n            res[key] = fn.call(contextObj, obj[key], key, obj);\r\n        }\r\n    }\r\n    return res;\r\n}\r\n/**\r\n * Deep equal two objects. Support Arrays and Objects.\r\n */\r\nfunction deepEqual(a, b) {\r\n    if (a === b) {\r\n        return true;\r\n    }\r\n    const aKeys = Object.keys(a);\r\n    const bKeys = Object.keys(b);\r\n    for (const k of aKeys) {\r\n        if (!bKeys.includes(k)) {\r\n            return false;\r\n        }\r\n        const aProp = a[k];\r\n        const bProp = b[k];\r\n        if (isObject(aProp) && isObject(bProp)) {\r\n            if (!deepEqual(aProp, bProp)) {\r\n                return false;\r\n            }\r\n        }\r\n        else if (aProp !== bProp) {\r\n            return false;\r\n        }\r\n    }\r\n    for (const k of bKeys) {\r\n        if (!aKeys.includes(k)) {\r\n            return false;\r\n        }\r\n    }\r\n    return true;\r\n}\r\nfunction isObject(thing) {\r\n    return thing !== null && typeof thing === 'object';\r\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Rejects if the given promise doesn't resolve in timeInMS milliseconds.\r\n * @internal\r\n */\r\nfunction promiseWithTimeout(promise, timeInMS = 2000) {\r\n    const deferredPromise = new Deferred();\r\n    setTimeout(() => deferredPromise.reject('timeout!'), timeInMS);\r\n    promise.then(deferredPromise.resolve, deferredPromise.reject);\r\n    return deferredPromise.promise;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Returns a querystring-formatted string (e.g. &arg=val&arg2=val2) from a\r\n * params object (e.g. {arg: 'val', arg2: 'val2'})\r\n * Note: You must prepend it with ? when adding it to a URL.\r\n */\r\nfunction querystring(querystringParams) {\r\n    const params = [];\r\n    for (const [key, value] of Object.entries(querystringParams)) {\r\n        if (Array.isArray(value)) {\r\n            value.forEach(arrayVal => {\r\n                params.push(encodeURIComponent(key) + '=' + encodeURIComponent(arrayVal));\r\n            });\r\n        }\r\n        else {\r\n            params.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\r\n        }\r\n    }\r\n    return params.length ? '&' + params.join('&') : '';\r\n}\r\n/**\r\n * Decodes a querystring (e.g. ?arg=val&arg2=val2) into a params object\r\n * (e.g. {arg: 'val', arg2: 'val2'})\r\n */\r\nfunction querystringDecode(querystring) {\r\n    const obj = {};\r\n    const tokens = querystring.replace(/^\\?/, '').split('&');\r\n    tokens.forEach(token => {\r\n        if (token) {\r\n            const [key, value] = token.split('=');\r\n            obj[decodeURIComponent(key)] = decodeURIComponent(value);\r\n        }\r\n    });\r\n    return obj;\r\n}\r\n/**\r\n * Extract the query string part of a URL, including the leading question mark (if present).\r\n */\r\nfunction extractQuerystring(url) {\r\n    const queryStart = url.indexOf('?');\r\n    if (!queryStart) {\r\n        return '';\r\n    }\r\n    const fragmentStart = url.indexOf('#', queryStart);\r\n    return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @fileoverview SHA-1 cryptographic hash.\r\n * Variable names follow the notation in FIPS PUB 180-3:\r\n * http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf.\r\n *\r\n * Usage:\r\n *   var sha1 = new sha1();\r\n *   sha1.update(bytes);\r\n *   var hash = sha1.digest();\r\n *\r\n * Performance:\r\n *   Chrome 23:   ~400 Mbit/s\r\n *   Firefox 16:  ~250 Mbit/s\r\n *\r\n */\r\n/**\r\n * SHA-1 cryptographic hash constructor.\r\n *\r\n * The properties declared here are discussed in the above algorithm document.\r\n * @constructor\r\n * @final\r\n * @struct\r\n */\r\nclass Sha1 {\r\n    constructor() {\r\n        /**\r\n         * Holds the previous values of accumulated variables a-e in the compress_\r\n         * function.\r\n         * @private\r\n         */\r\n        this.chain_ = [];\r\n        /**\r\n         * A buffer holding the partially computed hash result.\r\n         * @private\r\n         */\r\n        this.buf_ = [];\r\n        /**\r\n         * An array of 80 bytes, each a part of the message to be hashed.  Referred to\r\n         * as the message schedule in the docs.\r\n         * @private\r\n         */\r\n        this.W_ = [];\r\n        /**\r\n         * Contains data needed to pad messages less than 64 bytes.\r\n         * @private\r\n         */\r\n        this.pad_ = [];\r\n        /**\r\n         * @private {number}\r\n         */\r\n        this.inbuf_ = 0;\r\n        /**\r\n         * @private {number}\r\n         */\r\n        this.total_ = 0;\r\n        this.blockSize = 512 / 8;\r\n        this.pad_[0] = 128;\r\n        for (let i = 1; i < this.blockSize; ++i) {\r\n            this.pad_[i] = 0;\r\n        }\r\n        this.reset();\r\n    }\r\n    reset() {\r\n        this.chain_[0] = 0x67452301;\r\n        this.chain_[1] = 0xefcdab89;\r\n        this.chain_[2] = 0x98badcfe;\r\n        this.chain_[3] = 0x10325476;\r\n        this.chain_[4] = 0xc3d2e1f0;\r\n        this.inbuf_ = 0;\r\n        this.total_ = 0;\r\n    }\r\n    /**\r\n     * Internal compress helper function.\r\n     * @param buf Block to compress.\r\n     * @param offset Offset of the block in the buffer.\r\n     * @private\r\n     */\r\n    compress_(buf, offset) {\r\n        if (!offset) {\r\n            offset = 0;\r\n        }\r\n        const W = this.W_;\r\n        // get 16 big endian words\r\n        if (typeof buf === 'string') {\r\n            for (let i = 0; i < 16; i++) {\r\n                // TODO(user): [bug 8140122] Recent versions of Safari for Mac OS and iOS\r\n                // have a bug that turns the post-increment ++ operator into pre-increment\r\n                // during JIT compilation.  We have code that depends heavily on SHA-1 for\r\n                // correctness and which is affected by this bug, so I've removed all uses\r\n                // of post-increment ++ in which the result value is used.  We can revert\r\n                // this change once the Safari bug\r\n                // (https://bugs.webkit.org/show_bug.cgi?id=109036) has been fixed and\r\n                // most clients have been updated.\r\n                W[i] =\r\n                    (buf.charCodeAt(offset) << 24) |\r\n                        (buf.charCodeAt(offset + 1) << 16) |\r\n                        (buf.charCodeAt(offset + 2) << 8) |\r\n                        buf.charCodeAt(offset + 3);\r\n                offset += 4;\r\n            }\r\n        }\r\n        else {\r\n            for (let i = 0; i < 16; i++) {\r\n                W[i] =\r\n                    (buf[offset] << 24) |\r\n                        (buf[offset + 1] << 16) |\r\n                        (buf[offset + 2] << 8) |\r\n                        buf[offset + 3];\r\n                offset += 4;\r\n            }\r\n        }\r\n        // expand to 80 words\r\n        for (let i = 16; i < 80; i++) {\r\n            const t = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\r\n            W[i] = ((t << 1) | (t >>> 31)) & 0xffffffff;\r\n        }\r\n        let a = this.chain_[0];\r\n        let b = this.chain_[1];\r\n        let c = this.chain_[2];\r\n        let d = this.chain_[3];\r\n        let e = this.chain_[4];\r\n        let f, k;\r\n        // TODO(user): Try to unroll this loop to speed up the computation.\r\n        for (let i = 0; i < 80; i++) {\r\n            if (i < 40) {\r\n                if (i < 20) {\r\n                    f = d ^ (b & (c ^ d));\r\n                    k = 0x5a827999;\r\n                }\r\n                else {\r\n                    f = b ^ c ^ d;\r\n                    k = 0x6ed9eba1;\r\n                }\r\n            }\r\n            else {\r\n                if (i < 60) {\r\n                    f = (b & c) | (d & (b | c));\r\n                    k = 0x8f1bbcdc;\r\n                }\r\n                else {\r\n                    f = b ^ c ^ d;\r\n                    k = 0xca62c1d6;\r\n                }\r\n            }\r\n            const t = (((a << 5) | (a >>> 27)) + f + e + k + W[i]) & 0xffffffff;\r\n            e = d;\r\n            d = c;\r\n            c = ((b << 30) | (b >>> 2)) & 0xffffffff;\r\n            b = a;\r\n            a = t;\r\n        }\r\n        this.chain_[0] = (this.chain_[0] + a) & 0xffffffff;\r\n        this.chain_[1] = (this.chain_[1] + b) & 0xffffffff;\r\n        this.chain_[2] = (this.chain_[2] + c) & 0xffffffff;\r\n        this.chain_[3] = (this.chain_[3] + d) & 0xffffffff;\r\n        this.chain_[4] = (this.chain_[4] + e) & 0xffffffff;\r\n    }\r\n    update(bytes, length) {\r\n        // TODO(johnlenz): tighten the function signature and remove this check\r\n        if (bytes == null) {\r\n            return;\r\n        }\r\n        if (length === undefined) {\r\n            length = bytes.length;\r\n        }\r\n        const lengthMinusBlock = length - this.blockSize;\r\n        let n = 0;\r\n        // Using local instead of member variables gives ~5% speedup on Firefox 16.\r\n        const buf = this.buf_;\r\n        let inbuf = this.inbuf_;\r\n        // The outer while loop should execute at most twice.\r\n        while (n < length) {\r\n            // When we have no data in the block to top up, we can directly process the\r\n            // input buffer (assuming it contains sufficient data). This gives ~25%\r\n            // speedup on Chrome 23 and ~15% speedup on Firefox 16, but requires that\r\n            // the data is provided in large chunks (or in multiples of 64 bytes).\r\n            if (inbuf === 0) {\r\n                while (n <= lengthMinusBlock) {\r\n                    this.compress_(bytes, n);\r\n                    n += this.blockSize;\r\n                }\r\n            }\r\n            if (typeof bytes === 'string') {\r\n                while (n < length) {\r\n                    buf[inbuf] = bytes.charCodeAt(n);\r\n                    ++inbuf;\r\n                    ++n;\r\n                    if (inbuf === this.blockSize) {\r\n                        this.compress_(buf);\r\n                        inbuf = 0;\r\n                        // Jump to the outer loop so we use the full-block optimization.\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n            else {\r\n                while (n < length) {\r\n                    buf[inbuf] = bytes[n];\r\n                    ++inbuf;\r\n                    ++n;\r\n                    if (inbuf === this.blockSize) {\r\n                        this.compress_(buf);\r\n                        inbuf = 0;\r\n                        // Jump to the outer loop so we use the full-block optimization.\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        this.inbuf_ = inbuf;\r\n        this.total_ += length;\r\n    }\r\n    /** @override */\r\n    digest() {\r\n        const digest = [];\r\n        let totalBits = this.total_ * 8;\r\n        // Add pad 0x80 0x00*.\r\n        if (this.inbuf_ < 56) {\r\n            this.update(this.pad_, 56 - this.inbuf_);\r\n        }\r\n        else {\r\n            this.update(this.pad_, this.blockSize - (this.inbuf_ - 56));\r\n        }\r\n        // Add # bits.\r\n        for (let i = this.blockSize - 1; i >= 56; i--) {\r\n            this.buf_[i] = totalBits & 255;\r\n            totalBits /= 256; // Don't use bit-shifting here!\r\n        }\r\n        this.compress_(this.buf_);\r\n        let n = 0;\r\n        for (let i = 0; i < 5; i++) {\r\n            for (let j = 24; j >= 0; j -= 8) {\r\n                digest[n] = (this.chain_[i] >> j) & 255;\r\n                ++n;\r\n            }\r\n        }\r\n        return digest;\r\n    }\r\n}\n\n/**\r\n * Helper to make a Subscribe function (just like Promise helps make a\r\n * Thenable).\r\n *\r\n * @param executor Function which can make calls to a single Observer\r\n *     as a proxy.\r\n * @param onNoObservers Callback when count of Observers goes to zero.\r\n */\r\nfunction createSubscribe(executor, onNoObservers) {\r\n    const proxy = new ObserverProxy(executor, onNoObservers);\r\n    return proxy.subscribe.bind(proxy);\r\n}\r\n/**\r\n * Implement fan-out for any number of Observers attached via a subscribe\r\n * function.\r\n */\r\nclass ObserverProxy {\r\n    /**\r\n     * @param executor Function which can make calls to a single Observer\r\n     *     as a proxy.\r\n     * @param onNoObservers Callback when count of Observers goes to zero.\r\n     */\r\n    constructor(executor, onNoObservers) {\r\n        this.observers = [];\r\n        this.unsubscribes = [];\r\n        this.observerCount = 0;\r\n        // Micro-task scheduling by calling task.then().\r\n        this.task = Promise.resolve();\r\n        this.finalized = false;\r\n        this.onNoObservers = onNoObservers;\r\n        // Call the executor asynchronously so subscribers that are called\r\n        // synchronously after the creation of the subscribe function\r\n        // can still receive the very first value generated in the executor.\r\n        this.task\r\n            .then(() => {\r\n            executor(this);\r\n        })\r\n            .catch(e => {\r\n            this.error(e);\r\n        });\r\n    }\r\n    next(value) {\r\n        this.forEachObserver((observer) => {\r\n            observer.next(value);\r\n        });\r\n    }\r\n    error(error) {\r\n        this.forEachObserver((observer) => {\r\n            observer.error(error);\r\n        });\r\n        this.close(error);\r\n    }\r\n    complete() {\r\n        this.forEachObserver((observer) => {\r\n            observer.complete();\r\n        });\r\n        this.close();\r\n    }\r\n    /**\r\n     * Subscribe function that can be used to add an Observer to the fan-out list.\r\n     *\r\n     * - We require that no event is sent to a subscriber synchronously to their\r\n     *   call to subscribe().\r\n     */\r\n    subscribe(nextOrObserver, error, complete) {\r\n        let observer;\r\n        if (nextOrObserver === undefined &&\r\n            error === undefined &&\r\n            complete === undefined) {\r\n            throw new Error('Missing Observer.');\r\n        }\r\n        // Assemble an Observer object when passed as callback functions.\r\n        if (implementsAnyMethods(nextOrObserver, [\r\n            'next',\r\n            'error',\r\n            'complete'\r\n        ])) {\r\n            observer = nextOrObserver;\r\n        }\r\n        else {\r\n            observer = {\r\n                next: nextOrObserver,\r\n                error,\r\n                complete\r\n            };\r\n        }\r\n        if (observer.next === undefined) {\r\n            observer.next = noop;\r\n        }\r\n        if (observer.error === undefined) {\r\n            observer.error = noop;\r\n        }\r\n        if (observer.complete === undefined) {\r\n            observer.complete = noop;\r\n        }\r\n        const unsub = this.unsubscribeOne.bind(this, this.observers.length);\r\n        // Attempt to subscribe to a terminated Observable - we\r\n        // just respond to the Observer with the final error or complete\r\n        // event.\r\n        if (this.finalized) {\r\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n            this.task.then(() => {\r\n                try {\r\n                    if (this.finalError) {\r\n                        observer.error(this.finalError);\r\n                    }\r\n                    else {\r\n                        observer.complete();\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    // nothing\r\n                }\r\n                return;\r\n            });\r\n        }\r\n        this.observers.push(observer);\r\n        return unsub;\r\n    }\r\n    // Unsubscribe is synchronous - we guarantee that no events are sent to\r\n    // any unsubscribed Observer.\r\n    unsubscribeOne(i) {\r\n        if (this.observers === undefined || this.observers[i] === undefined) {\r\n            return;\r\n        }\r\n        delete this.observers[i];\r\n        this.observerCount -= 1;\r\n        if (this.observerCount === 0 && this.onNoObservers !== undefined) {\r\n            this.onNoObservers(this);\r\n        }\r\n    }\r\n    forEachObserver(fn) {\r\n        if (this.finalized) {\r\n            // Already closed by previous event....just eat the additional values.\r\n            return;\r\n        }\r\n        // Since sendOne calls asynchronously - there is no chance that\r\n        // this.observers will become undefined.\r\n        for (let i = 0; i < this.observers.length; i++) {\r\n            this.sendOne(i, fn);\r\n        }\r\n    }\r\n    // Call the Observer via one of it's callback function. We are careful to\r\n    // confirm that the observe has not been unsubscribed since this asynchronous\r\n    // function had been queued.\r\n    sendOne(i, fn) {\r\n        // Execute the callback asynchronously\r\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n        this.task.then(() => {\r\n            if (this.observers !== undefined && this.observers[i] !== undefined) {\r\n                try {\r\n                    fn(this.observers[i]);\r\n                }\r\n                catch (e) {\r\n                    // Ignore exceptions raised in Observers or missing methods of an\r\n                    // Observer.\r\n                    // Log error to console. b/31404806\r\n                    if (typeof console !== 'undefined' && console.error) {\r\n                        console.error(e);\r\n                    }\r\n                }\r\n            }\r\n        });\r\n    }\r\n    close(err) {\r\n        if (this.finalized) {\r\n            return;\r\n        }\r\n        this.finalized = true;\r\n        if (err !== undefined) {\r\n            this.finalError = err;\r\n        }\r\n        // Proxy is no longer needed - garbage collect references\r\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n        this.task.then(() => {\r\n            this.observers = undefined;\r\n            this.onNoObservers = undefined;\r\n        });\r\n    }\r\n}\r\n/** Turn synchronous function into one called asynchronously. */\r\n// eslint-disable-next-line @typescript-eslint/ban-types\r\nfunction async(fn, onError) {\r\n    return (...args) => {\r\n        Promise.resolve(true)\r\n            .then(() => {\r\n            fn(...args);\r\n        })\r\n            .catch((error) => {\r\n            if (onError) {\r\n                onError(error);\r\n            }\r\n        });\r\n    };\r\n}\r\n/**\r\n * Return true if the object passed in implements any of the named methods.\r\n */\r\nfunction implementsAnyMethods(obj, methods) {\r\n    if (typeof obj !== 'object' || obj === null) {\r\n        return false;\r\n    }\r\n    for (const method of methods) {\r\n        if (method in obj && typeof obj[method] === 'function') {\r\n            return true;\r\n        }\r\n    }\r\n    return false;\r\n}\r\nfunction noop() {\r\n    // do nothing\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Check to make sure the appropriate number of arguments are provided for a public function.\r\n * Throws an error if it fails.\r\n *\r\n * @param fnName The function name\r\n * @param minCount The minimum number of arguments to allow for the function call\r\n * @param maxCount The maximum number of argument to allow for the function call\r\n * @param argCount The actual number of arguments provided.\r\n */\r\nconst validateArgCount = function (fnName, minCount, maxCount, argCount) {\r\n    let argError;\r\n    if (argCount < minCount) {\r\n        argError = 'at least ' + minCount;\r\n    }\r\n    else if (argCount > maxCount) {\r\n        argError = maxCount === 0 ? 'none' : 'no more than ' + maxCount;\r\n    }\r\n    if (argError) {\r\n        const error = fnName +\r\n            ' failed: Was called with ' +\r\n            argCount +\r\n            (argCount === 1 ? ' argument.' : ' arguments.') +\r\n            ' Expects ' +\r\n            argError +\r\n            '.';\r\n        throw new Error(error);\r\n    }\r\n};\r\n/**\r\n * Generates a string to prefix an error message about failed argument validation\r\n *\r\n * @param fnName The function name\r\n * @param argName The name of the argument\r\n * @return The prefix to add to the error thrown for validation.\r\n */\r\nfunction errorPrefix(fnName, argName) {\r\n    return `${fnName} failed: ${argName} argument `;\r\n}\r\n/**\r\n * @param fnName\r\n * @param argumentNumber\r\n * @param namespace\r\n * @param optional\r\n */\r\nfunction validateNamespace(fnName, namespace, optional) {\r\n    if (optional && !namespace) {\r\n        return;\r\n    }\r\n    if (typeof namespace !== 'string') {\r\n        //TODO: I should do more validation here. We only allow certain chars in namespaces.\r\n        throw new Error(errorPrefix(fnName, 'namespace') + 'must be a valid firebase namespace.');\r\n    }\r\n}\r\nfunction validateCallback(fnName, argumentName, \r\n// eslint-disable-next-line @typescript-eslint/ban-types\r\ncallback, optional) {\r\n    if (optional && !callback) {\r\n        return;\r\n    }\r\n    if (typeof callback !== 'function') {\r\n        throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid function.');\r\n    }\r\n}\r\nfunction validateContextObject(fnName, argumentName, context, optional) {\r\n    if (optional && !context) {\r\n        return;\r\n    }\r\n    if (typeof context !== 'object' || context === null) {\r\n        throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid context object.');\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n// Code originally came from goog.crypt.stringToUtf8ByteArray, but for some reason they\r\n// automatically replaced '\\r\\n' with '\\n', and they didn't handle surrogate pairs,\r\n// so it's been modified.\r\n// Note that not all Unicode characters appear as single characters in JavaScript strings.\r\n// fromCharCode returns the UTF-16 encoding of a character - so some Unicode characters\r\n// use 2 characters in JavaScript.  All 4-byte UTF-8 characters begin with a first\r\n// character in the range 0xD800 - 0xDBFF (the first character of a so-called surrogate\r\n// pair).\r\n// See http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3\r\n/**\r\n * @param {string} str\r\n * @return {Array}\r\n */\r\nconst stringToByteArray = function (str) {\r\n    const out = [];\r\n    let p = 0;\r\n    for (let i = 0; i < str.length; i++) {\r\n        let c = str.charCodeAt(i);\r\n        // Is this the lead surrogate in a surrogate pair?\r\n        if (c >= 0xd800 && c <= 0xdbff) {\r\n            const high = c - 0xd800; // the high 10 bits.\r\n            i++;\r\n            assert(i < str.length, 'Surrogate pair missing trail surrogate.');\r\n            const low = str.charCodeAt(i) - 0xdc00; // the low 10 bits.\r\n            c = 0x10000 + (high << 10) + low;\r\n        }\r\n        if (c < 128) {\r\n            out[p++] = c;\r\n        }\r\n        else if (c < 2048) {\r\n            out[p++] = (c >> 6) | 192;\r\n            out[p++] = (c & 63) | 128;\r\n        }\r\n        else if (c < 65536) {\r\n            out[p++] = (c >> 12) | 224;\r\n            out[p++] = ((c >> 6) & 63) | 128;\r\n            out[p++] = (c & 63) | 128;\r\n        }\r\n        else {\r\n            out[p++] = (c >> 18) | 240;\r\n            out[p++] = ((c >> 12) & 63) | 128;\r\n            out[p++] = ((c >> 6) & 63) | 128;\r\n            out[p++] = (c & 63) | 128;\r\n        }\r\n    }\r\n    return out;\r\n};\r\n/**\r\n * Calculate length without actually converting; useful for doing cheaper validation.\r\n * @param {string} str\r\n * @return {number}\r\n */\r\nconst stringLength = function (str) {\r\n    let p = 0;\r\n    for (let i = 0; i < str.length; i++) {\r\n        const c = str.charCodeAt(i);\r\n        if (c < 128) {\r\n            p++;\r\n        }\r\n        else if (c < 2048) {\r\n            p += 2;\r\n        }\r\n        else if (c >= 0xd800 && c <= 0xdbff) {\r\n            // Lead surrogate of a surrogate pair.  The pair together will take 4 bytes to represent.\r\n            p += 4;\r\n            i++; // skip trail surrogate.\r\n        }\r\n        else {\r\n            p += 3;\r\n        }\r\n    }\r\n    return p;\r\n};\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Copied from https://stackoverflow.com/a/2117523\r\n * Generates a new uuid.\r\n * @public\r\n */\r\nconst uuidv4 = function () {\r\n    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {\r\n        const r = (Math.random() * 16) | 0, v = c === 'x' ? r : (r & 0x3) | 0x8;\r\n        return v.toString(16);\r\n    });\r\n};\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * The amount of milliseconds to exponentially increase.\r\n */\r\nconst DEFAULT_INTERVAL_MILLIS = 1000;\r\n/**\r\n * The factor to backoff by.\r\n * Should be a number greater than 1.\r\n */\r\nconst DEFAULT_BACKOFF_FACTOR = 2;\r\n/**\r\n * The maximum milliseconds to increase to.\r\n *\r\n * <p>Visible for testing\r\n */\r\nconst MAX_VALUE_MILLIS = 4 * 60 * 60 * 1000; // Four hours, like iOS and Android.\r\n/**\r\n * The percentage of backoff time to randomize by.\r\n * See\r\n * http://go/safe-client-behavior#step-1-determine-the-appropriate-retry-interval-to-handle-spike-traffic\r\n * for context.\r\n *\r\n * <p>Visible for testing\r\n */\r\nconst RANDOM_FACTOR = 0.5;\r\n/**\r\n * Based on the backoff method from\r\n * https://github.com/google/closure-library/blob/master/closure/goog/math/exponentialbackoff.js.\r\n * Extracted here so we don't need to pass metadata and a stateful ExponentialBackoff object around.\r\n */\r\nfunction calculateBackoffMillis(backoffCount, intervalMillis = DEFAULT_INTERVAL_MILLIS, backoffFactor = DEFAULT_BACKOFF_FACTOR) {\r\n    // Calculates an exponentially increasing value.\r\n    // Deviation: calculates value from count and a constant interval, so we only need to save value\r\n    // and count to restore state.\r\n    const currBaseValue = intervalMillis * Math.pow(backoffFactor, backoffCount);\r\n    // A random \"fuzz\" to avoid waves of retries.\r\n    // Deviation: randomFactor is required.\r\n    const randomWait = Math.round(\r\n    // A fraction of the backoff value to add/subtract.\r\n    // Deviation: changes multiplication order to improve readability.\r\n    RANDOM_FACTOR *\r\n        currBaseValue *\r\n        // A random float (rounded to int by Math.round above) in the range [-1, 1]. Determines\r\n        // if we add or subtract.\r\n        (Math.random() - 0.5) *\r\n        2);\r\n    // Limits backoff to max to avoid effectively permanent backoff.\r\n    return Math.min(MAX_VALUE_MILLIS, currBaseValue + randomWait);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Provide English ordinal letters after a number\r\n */\r\nfunction ordinal(i) {\r\n    if (!Number.isFinite(i)) {\r\n        return `${i}`;\r\n    }\r\n    return i + indicator(i);\r\n}\r\nfunction indicator(i) {\r\n    i = Math.abs(i);\r\n    const cent = i % 100;\r\n    if (cent >= 10 && cent <= 20) {\r\n        return 'th';\r\n    }\r\n    const dec = i % 10;\r\n    if (dec === 1) {\r\n        return 'st';\r\n    }\r\n    if (dec === 2) {\r\n        return 'nd';\r\n    }\r\n    if (dec === 3) {\r\n        return 'rd';\r\n    }\r\n    return 'th';\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction getModularInstance(service) {\r\n    if (service && service._delegate) {\r\n        return service._delegate;\r\n    }\r\n    else {\r\n        return service;\r\n    }\r\n}\n\nexport { CONSTANTS, DecodeBase64StringError, Deferred, ErrorFactory, FirebaseError, MAX_VALUE_MILLIS, RANDOM_FACTOR, Sha1, areCookiesEnabled, assert, assertionError, async, base64, base64Decode, base64Encode, base64urlEncodeWithoutPadding, calculateBackoffMillis, contains, createMockUserToken, createSubscribe, decode, deepCopy, deepEqual, deepExtend, errorPrefix, extractQuerystring, getDefaultAppConfig, getDefaultEmulatorHost, getDefaultEmulatorHostnameAndPort, getDefaults, getExperimentalSetting, getGlobal, getModularInstance, getUA, isAdmin, isBrowser, isBrowserExtension, isCloudflareWorker, isElectron, isEmpty, isIE, isIndexedDBAvailable, isMobileCordova, isNode, isNodeSdk, isReactNative, isSafari, isUWP, isValidFormat, isValidTimestamp, isWebWorker, issuedAtTime, jsonEval, map, ordinal, promiseWithTimeout, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, uuidv4, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };\n//# sourceMappingURL=index.esm2017.js.map\n","import { Deferred } from '@firebase/util';\n\n/**\r\n * Component for service name T, e.g. `auth`, `auth-internal`\r\n */\r\nclass Component {\r\n    /**\r\n     *\r\n     * @param name The public service name, e.g. app, auth, firestore, database\r\n     * @param instanceFactory Service factory responsible for creating the public interface\r\n     * @param type whether the service provided by the component is public or private\r\n     */\r\n    constructor(name, instanceFactory, type) {\r\n        this.name = name;\r\n        this.instanceFactory = instanceFactory;\r\n        this.type = type;\r\n        this.multipleInstances = false;\r\n        /**\r\n         * Properties to be added to the service namespace\r\n         */\r\n        this.serviceProps = {};\r\n        this.instantiationMode = \"LAZY\" /* InstantiationMode.LAZY */;\r\n        this.onInstanceCreated = null;\r\n    }\r\n    setInstantiationMode(mode) {\r\n        this.instantiationMode = mode;\r\n        return this;\r\n    }\r\n    setMultipleInstances(multipleInstances) {\r\n        this.multipleInstances = multipleInstances;\r\n        return this;\r\n    }\r\n    setServiceProps(props) {\r\n        this.serviceProps = props;\r\n        return this;\r\n    }\r\n    setInstanceCreatedCallback(callback) {\r\n        this.onInstanceCreated = callback;\r\n        return this;\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst DEFAULT_ENTRY_NAME = '[DEFAULT]';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Provider for instance for service name T, e.g. 'auth', 'auth-internal'\r\n * NameServiceMapping[T] is an alias for the type of the instance\r\n */\r\nclass Provider {\r\n    constructor(name, container) {\r\n        this.name = name;\r\n        this.container = container;\r\n        this.component = null;\r\n        this.instances = new Map();\r\n        this.instancesDeferred = new Map();\r\n        this.instancesOptions = new Map();\r\n        this.onInitCallbacks = new Map();\r\n    }\r\n    /**\r\n     * @param identifier A provider can provide multiple instances of a service\r\n     * if this.component.multipleInstances is true.\r\n     */\r\n    get(identifier) {\r\n        // if multipleInstances is not supported, use the default name\r\n        const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\r\n        if (!this.instancesDeferred.has(normalizedIdentifier)) {\r\n            const deferred = new Deferred();\r\n            this.instancesDeferred.set(normalizedIdentifier, deferred);\r\n            if (this.isInitialized(normalizedIdentifier) ||\r\n                this.shouldAutoInitialize()) {\r\n                // initialize the service if it can be auto-initialized\r\n                try {\r\n                    const instance = this.getOrInitializeService({\r\n                        instanceIdentifier: normalizedIdentifier\r\n                    });\r\n                    if (instance) {\r\n                        deferred.resolve(instance);\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    // when the instance factory throws an exception during get(), it should not cause\r\n                    // a fatal error. We just return the unresolved promise in this case.\r\n                }\r\n            }\r\n        }\r\n        return this.instancesDeferred.get(normalizedIdentifier).promise;\r\n    }\r\n    getImmediate(options) {\r\n        var _a;\r\n        // if multipleInstances is not supported, use the default name\r\n        const normalizedIdentifier = this.normalizeInstanceIdentifier(options === null || options === void 0 ? void 0 : options.identifier);\r\n        const optional = (_a = options === null || options === void 0 ? void 0 : options.optional) !== null && _a !== void 0 ? _a : false;\r\n        if (this.isInitialized(normalizedIdentifier) ||\r\n            this.shouldAutoInitialize()) {\r\n            try {\r\n                return this.getOrInitializeService({\r\n                    instanceIdentifier: normalizedIdentifier\r\n                });\r\n            }\r\n            catch (e) {\r\n                if (optional) {\r\n                    return null;\r\n                }\r\n                else {\r\n                    throw e;\r\n                }\r\n            }\r\n        }\r\n        else {\r\n            // In case a component is not initialized and should/cannot be auto-initialized at the moment, return null if the optional flag is set, or throw\r\n            if (optional) {\r\n                return null;\r\n            }\r\n            else {\r\n                throw Error(`Service ${this.name} is not available`);\r\n            }\r\n        }\r\n    }\r\n    getComponent() {\r\n        return this.component;\r\n    }\r\n    setComponent(component) {\r\n        if (component.name !== this.name) {\r\n            throw Error(`Mismatching Component ${component.name} for Provider ${this.name}.`);\r\n        }\r\n        if (this.component) {\r\n            throw Error(`Component for ${this.name} has already been provided`);\r\n        }\r\n        this.component = component;\r\n        // return early without attempting to initialize the component if the component requires explicit initialization (calling `Provider.initialize()`)\r\n        if (!this.shouldAutoInitialize()) {\r\n            return;\r\n        }\r\n        // if the service is eager, initialize the default instance\r\n        if (isComponentEager(component)) {\r\n            try {\r\n                this.getOrInitializeService({ instanceIdentifier: DEFAULT_ENTRY_NAME });\r\n            }\r\n            catch (e) {\r\n                // when the instance factory for an eager Component throws an exception during the eager\r\n                // initialization, it should not cause a fatal error.\r\n                // TODO: Investigate if we need to make it configurable, because some component may want to cause\r\n                // a fatal error in this case?\r\n            }\r\n        }\r\n        // Create service instances for the pending promises and resolve them\r\n        // NOTE: if this.multipleInstances is false, only the default instance will be created\r\n        // and all promises with resolve with it regardless of the identifier.\r\n        for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {\r\n            const normalizedIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);\r\n            try {\r\n                // `getOrInitializeService()` should always return a valid instance since a component is guaranteed. use ! to make typescript happy.\r\n                const instance = this.getOrInitializeService({\r\n                    instanceIdentifier: normalizedIdentifier\r\n                });\r\n                instanceDeferred.resolve(instance);\r\n            }\r\n            catch (e) {\r\n                // when the instance factory throws an exception, it should not cause\r\n                // a fatal error. We just leave the promise unresolved.\r\n            }\r\n        }\r\n    }\r\n    clearInstance(identifier = DEFAULT_ENTRY_NAME) {\r\n        this.instancesDeferred.delete(identifier);\r\n        this.instancesOptions.delete(identifier);\r\n        this.instances.delete(identifier);\r\n    }\r\n    // app.delete() will call this method on every provider to delete the services\r\n    // TODO: should we mark the provider as deleted?\r\n    async delete() {\r\n        const services = Array.from(this.instances.values());\r\n        await Promise.all([\r\n            ...services\r\n                .filter(service => 'INTERNAL' in service) // legacy services\r\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n                .map(service => service.INTERNAL.delete()),\r\n            ...services\r\n                .filter(service => '_delete' in service) // modularized services\r\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n                .map(service => service._delete())\r\n        ]);\r\n    }\r\n    isComponentSet() {\r\n        return this.component != null;\r\n    }\r\n    isInitialized(identifier = DEFAULT_ENTRY_NAME) {\r\n        return this.instances.has(identifier);\r\n    }\r\n    getOptions(identifier = DEFAULT_ENTRY_NAME) {\r\n        return this.instancesOptions.get(identifier) || {};\r\n    }\r\n    initialize(opts = {}) {\r\n        const { options = {} } = opts;\r\n        const normalizedIdentifier = this.normalizeInstanceIdentifier(opts.instanceIdentifier);\r\n        if (this.isInitialized(normalizedIdentifier)) {\r\n            throw Error(`${this.name}(${normalizedIdentifier}) has already been initialized`);\r\n        }\r\n        if (!this.isComponentSet()) {\r\n            throw Error(`Component ${this.name} has not been registered yet`);\r\n        }\r\n        const instance = this.getOrInitializeService({\r\n            instanceIdentifier: normalizedIdentifier,\r\n            options\r\n        });\r\n        // resolve any pending promise waiting for the service instance\r\n        for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {\r\n            const normalizedDeferredIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);\r\n            if (normalizedIdentifier === normalizedDeferredIdentifier) {\r\n                instanceDeferred.resolve(instance);\r\n            }\r\n        }\r\n        return instance;\r\n    }\r\n    /**\r\n     *\r\n     * @param callback - a function that will be invoked  after the provider has been initialized by calling provider.initialize().\r\n     * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.\r\n     *\r\n     * @param identifier An optional instance identifier\r\n     * @returns a function to unregister the callback\r\n     */\r\n    onInit(callback, identifier) {\r\n        var _a;\r\n        const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\r\n        const existingCallbacks = (_a = this.onInitCallbacks.get(normalizedIdentifier)) !== null && _a !== void 0 ? _a : new Set();\r\n        existingCallbacks.add(callback);\r\n        this.onInitCallbacks.set(normalizedIdentifier, existingCallbacks);\r\n        const existingInstance = this.instances.get(normalizedIdentifier);\r\n        if (existingInstance) {\r\n            callback(existingInstance, normalizedIdentifier);\r\n        }\r\n        return () => {\r\n            existingCallbacks.delete(callback);\r\n        };\r\n    }\r\n    /**\r\n     * Invoke onInit callbacks synchronously\r\n     * @param instance the service instance`\r\n     */\r\n    invokeOnInitCallbacks(instance, identifier) {\r\n        const callbacks = this.onInitCallbacks.get(identifier);\r\n        if (!callbacks) {\r\n            return;\r\n        }\r\n        for (const callback of callbacks) {\r\n            try {\r\n                callback(instance, identifier);\r\n            }\r\n            catch (_a) {\r\n                // ignore errors in the onInit callback\r\n            }\r\n        }\r\n    }\r\n    getOrInitializeService({ instanceIdentifier, options = {} }) {\r\n        let instance = this.instances.get(instanceIdentifier);\r\n        if (!instance && this.component) {\r\n            instance = this.component.instanceFactory(this.container, {\r\n                instanceIdentifier: normalizeIdentifierForFactory(instanceIdentifier),\r\n                options\r\n            });\r\n            this.instances.set(instanceIdentifier, instance);\r\n            this.instancesOptions.set(instanceIdentifier, options);\r\n            /**\r\n             * Invoke onInit listeners.\r\n             * Note this.component.onInstanceCreated is different, which is used by the component creator,\r\n             * while onInit listeners are registered by consumers of the provider.\r\n             */\r\n            this.invokeOnInitCallbacks(instance, instanceIdentifier);\r\n            /**\r\n             * Order is important\r\n             * onInstanceCreated() should be called after this.instances.set(instanceIdentifier, instance); which\r\n             * makes `isInitialized()` return true.\r\n             */\r\n            if (this.component.onInstanceCreated) {\r\n                try {\r\n                    this.component.onInstanceCreated(this.container, instanceIdentifier, instance);\r\n                }\r\n                catch (_a) {\r\n                    // ignore errors in the onInstanceCreatedCallback\r\n                }\r\n            }\r\n        }\r\n        return instance || null;\r\n    }\r\n    normalizeInstanceIdentifier(identifier = DEFAULT_ENTRY_NAME) {\r\n        if (this.component) {\r\n            return this.component.multipleInstances ? identifier : DEFAULT_ENTRY_NAME;\r\n        }\r\n        else {\r\n            return identifier; // assume multiple instances are supported before the component is provided.\r\n        }\r\n    }\r\n    shouldAutoInitialize() {\r\n        return (!!this.component &&\r\n            this.component.instantiationMode !== \"EXPLICIT\" /* InstantiationMode.EXPLICIT */);\r\n    }\r\n}\r\n// undefined should be passed to the service factory for the default instance\r\nfunction normalizeIdentifierForFactory(identifier) {\r\n    return identifier === DEFAULT_ENTRY_NAME ? undefined : identifier;\r\n}\r\nfunction isComponentEager(component) {\r\n    return component.instantiationMode === \"EAGER\" /* InstantiationMode.EAGER */;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`\r\n */\r\nclass ComponentContainer {\r\n    constructor(name) {\r\n        this.name = name;\r\n        this.providers = new Map();\r\n    }\r\n    /**\r\n     *\r\n     * @param component Component being added\r\n     * @param overwrite When a component with the same name has already been registered,\r\n     * if overwrite is true: overwrite the existing component with the new component and create a new\r\n     * provider with the new component. It can be useful in tests where you want to use different mocks\r\n     * for different tests.\r\n     * if overwrite is false: throw an exception\r\n     */\r\n    addComponent(component) {\r\n        const provider = this.getProvider(component.name);\r\n        if (provider.isComponentSet()) {\r\n            throw new Error(`Component ${component.name} has already been registered with ${this.name}`);\r\n        }\r\n        provider.setComponent(component);\r\n    }\r\n    addOrOverwriteComponent(component) {\r\n        const provider = this.getProvider(component.name);\r\n        if (provider.isComponentSet()) {\r\n            // delete the existing provider from the container, so we can register the new component\r\n            this.providers.delete(component.name);\r\n        }\r\n        this.addComponent(component);\r\n    }\r\n    /**\r\n     * getProvider provides a type safe interface where it can only be called with a field name\r\n     * present in NameServiceMapping interface.\r\n     *\r\n     * Firebase SDKs providing services should extend NameServiceMapping interface to register\r\n     * themselves.\r\n     */\r\n    getProvider(name) {\r\n        if (this.providers.has(name)) {\r\n            return this.providers.get(name);\r\n        }\r\n        // create a Provider for a service that hasn't registered with Firebase\r\n        const provider = new Provider(name, this);\r\n        this.providers.set(name, provider);\r\n        return provider;\r\n    }\r\n    getProviders() {\r\n        return Array.from(this.providers.values());\r\n    }\r\n}\n\nexport { Component, ComponentContainer, Provider };\n//# sourceMappingURL=index.esm2017.js.map\n","/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * A container for all of the Logger instances\r\n */\r\nconst instances = [];\r\n/**\r\n * The JS SDK supports 5 log levels and also allows a user the ability to\r\n * silence the logs altogether.\r\n *\r\n * The order is a follows:\r\n * DEBUG < VERBOSE < INFO < WARN < ERROR\r\n *\r\n * All of the log types above the current log level will be captured (i.e. if\r\n * you set the log level to `INFO`, errors will still be logged, but `DEBUG` and\r\n * `VERBOSE` logs will not)\r\n */\r\nvar LogLevel;\r\n(function (LogLevel) {\r\n    LogLevel[LogLevel[\"DEBUG\"] = 0] = \"DEBUG\";\r\n    LogLevel[LogLevel[\"VERBOSE\"] = 1] = \"VERBOSE\";\r\n    LogLevel[LogLevel[\"INFO\"] = 2] = \"INFO\";\r\n    LogLevel[LogLevel[\"WARN\"] = 3] = \"WARN\";\r\n    LogLevel[LogLevel[\"ERROR\"] = 4] = \"ERROR\";\r\n    LogLevel[LogLevel[\"SILENT\"] = 5] = \"SILENT\";\r\n})(LogLevel || (LogLevel = {}));\r\nconst levelStringToEnum = {\r\n    'debug': LogLevel.DEBUG,\r\n    'verbose': LogLevel.VERBOSE,\r\n    'info': LogLevel.INFO,\r\n    'warn': LogLevel.WARN,\r\n    'error': LogLevel.ERROR,\r\n    'silent': LogLevel.SILENT\r\n};\r\n/**\r\n * The default log level\r\n */\r\nconst defaultLogLevel = LogLevel.INFO;\r\n/**\r\n * By default, `console.debug` is not displayed in the developer console (in\r\n * chrome). To avoid forcing users to have to opt-in to these logs twice\r\n * (i.e. once for firebase, and once in the console), we are sending `DEBUG`\r\n * logs to the `console.log` function.\r\n */\r\nconst ConsoleMethod = {\r\n    [LogLevel.DEBUG]: 'log',\r\n    [LogLevel.VERBOSE]: 'log',\r\n    [LogLevel.INFO]: 'info',\r\n    [LogLevel.WARN]: 'warn',\r\n    [LogLevel.ERROR]: 'error'\r\n};\r\n/**\r\n * The default log handler will forward DEBUG, VERBOSE, INFO, WARN, and ERROR\r\n * messages on to their corresponding console counterparts (if the log method\r\n * is supported by the current log level)\r\n */\r\nconst defaultLogHandler = (instance, logType, ...args) => {\r\n    if (logType < instance.logLevel) {\r\n        return;\r\n    }\r\n    const now = new Date().toISOString();\r\n    const method = ConsoleMethod[logType];\r\n    if (method) {\r\n        console[method](`[${now}]  ${instance.name}:`, ...args);\r\n    }\r\n    else {\r\n        throw new Error(`Attempted to log a message with an invalid logType (value: ${logType})`);\r\n    }\r\n};\r\nclass Logger {\r\n    /**\r\n     * Gives you an instance of a Logger to capture messages according to\r\n     * Firebase's logging scheme.\r\n     *\r\n     * @param name The name that the logs will be associated with\r\n     */\r\n    constructor(name) {\r\n        this.name = name;\r\n        /**\r\n         * The log level of the given Logger instance.\r\n         */\r\n        this._logLevel = defaultLogLevel;\r\n        /**\r\n         * The main (internal) log handler for the Logger instance.\r\n         * Can be set to a new function in internal package code but not by user.\r\n         */\r\n        this._logHandler = defaultLogHandler;\r\n        /**\r\n         * The optional, additional, user-defined log handler for the Logger instance.\r\n         */\r\n        this._userLogHandler = null;\r\n        /**\r\n         * Capture the current instance for later use\r\n         */\r\n        instances.push(this);\r\n    }\r\n    get logLevel() {\r\n        return this._logLevel;\r\n    }\r\n    set logLevel(val) {\r\n        if (!(val in LogLevel)) {\r\n            throw new TypeError(`Invalid value \"${val}\" assigned to \\`logLevel\\``);\r\n        }\r\n        this._logLevel = val;\r\n    }\r\n    // Workaround for setter/getter having to be the same type.\r\n    setLogLevel(val) {\r\n        this._logLevel = typeof val === 'string' ? levelStringToEnum[val] : val;\r\n    }\r\n    get logHandler() {\r\n        return this._logHandler;\r\n    }\r\n    set logHandler(val) {\r\n        if (typeof val !== 'function') {\r\n            throw new TypeError('Value assigned to `logHandler` must be a function');\r\n        }\r\n        this._logHandler = val;\r\n    }\r\n    get userLogHandler() {\r\n        return this._userLogHandler;\r\n    }\r\n    set userLogHandler(val) {\r\n        this._userLogHandler = val;\r\n    }\r\n    /**\r\n     * The functions below are all based on the `console` interface\r\n     */\r\n    debug(...args) {\r\n        this._userLogHandler && this._userLogHandler(this, LogLevel.DEBUG, ...args);\r\n        this._logHandler(this, LogLevel.DEBUG, ...args);\r\n    }\r\n    log(...args) {\r\n        this._userLogHandler &&\r\n            this._userLogHandler(this, LogLevel.VERBOSE, ...args);\r\n        this._logHandler(this, LogLevel.VERBOSE, ...args);\r\n    }\r\n    info(...args) {\r\n        this._userLogHandler && this._userLogHandler(this, LogLevel.INFO, ...args);\r\n        this._logHandler(this, LogLevel.INFO, ...args);\r\n    }\r\n    warn(...args) {\r\n        this._userLogHandler && this._userLogHandler(this, LogLevel.WARN, ...args);\r\n        this._logHandler(this, LogLevel.WARN, ...args);\r\n    }\r\n    error(...args) {\r\n        this._userLogHandler && this._userLogHandler(this, LogLevel.ERROR, ...args);\r\n        this._logHandler(this, LogLevel.ERROR, ...args);\r\n    }\r\n}\r\nfunction setLogLevel(level) {\r\n    instances.forEach(inst => {\r\n        inst.setLogLevel(level);\r\n    });\r\n}\r\nfunction setUserLogHandler(logCallback, options) {\r\n    for (const instance of instances) {\r\n        let customLogLevel = null;\r\n        if (options && options.level) {\r\n            customLogLevel = levelStringToEnum[options.level];\r\n        }\r\n        if (logCallback === null) {\r\n            instance.userLogHandler = null;\r\n        }\r\n        else {\r\n            instance.userLogHandler = (instance, level, ...args) => {\r\n                const message = args\r\n                    .map(arg => {\r\n                    if (arg == null) {\r\n                        return null;\r\n                    }\r\n                    else if (typeof arg === 'string') {\r\n                        return arg;\r\n                    }\r\n                    else if (typeof arg === 'number' || typeof arg === 'boolean') {\r\n                        return arg.toString();\r\n                    }\r\n                    else if (arg instanceof Error) {\r\n                        return arg.message;\r\n                    }\r\n                    else {\r\n                        try {\r\n                            return JSON.stringify(arg);\r\n                        }\r\n                        catch (ignored) {\r\n                            return null;\r\n                        }\r\n                    }\r\n                })\r\n                    .filter(arg => arg)\r\n                    .join(' ');\r\n                if (level >= (customLogLevel !== null && customLogLevel !== void 0 ? customLogLevel : instance.logLevel)) {\r\n                    logCallback({\r\n                        level: LogLevel[level].toLowerCase(),\r\n                        message,\r\n                        args,\r\n                        type: instance.name\r\n                    });\r\n                }\r\n            };\r\n        }\r\n    }\r\n}\n\nexport { LogLevel, Logger, setLogLevel, setUserLogHandler };\n//# sourceMappingURL=index.esm2017.js.map\n","import { Component, ComponentContainer } from '@firebase/component';\nimport { Logger, setUserLogHandler, setLogLevel as setLogLevel$1 } from '@firebase/logger';\nimport { ErrorFactory, getDefaultAppConfig, deepEqual, isBrowser, isWebWorker, FirebaseError, base64urlEncodeWithoutPadding, isIndexedDBAvailable, validateIndexedDBOpenable } from '@firebase/util';\nexport { FirebaseError } from '@firebase/util';\nimport { openDB } from 'idb';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass PlatformLoggerServiceImpl {\r\n    constructor(container) {\r\n        this.container = container;\r\n    }\r\n    // In initial implementation, this will be called by installations on\r\n    // auth token refresh, and installations will send this string.\r\n    getPlatformInfoString() {\r\n        const providers = this.container.getProviders();\r\n        // Loop through providers and get library/version pairs from any that are\r\n        // version components.\r\n        return providers\r\n            .map(provider => {\r\n            if (isVersionServiceProvider(provider)) {\r\n                const service = provider.getImmediate();\r\n                return `${service.library}/${service.version}`;\r\n            }\r\n            else {\r\n                return null;\r\n            }\r\n        })\r\n            .filter(logString => logString)\r\n            .join(' ');\r\n    }\r\n}\r\n/**\r\n *\r\n * @param provider check if this provider provides a VersionService\r\n *\r\n * NOTE: Using Provider<'app-version'> is a hack to indicate that the provider\r\n * provides VersionService. The provider is not necessarily a 'app-version'\r\n * provider.\r\n */\r\nfunction isVersionServiceProvider(provider) {\r\n    const component = provider.getComponent();\r\n    return (component === null || component === void 0 ? void 0 : component.type) === \"VERSION\" /* ComponentType.VERSION */;\r\n}\n\nconst name$q = \"@firebase/app\";\nconst version$1 = \"0.10.13\";\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst logger = new Logger('@firebase/app');\n\nconst name$p = \"@firebase/app-compat\";\n\nconst name$o = \"@firebase/analytics-compat\";\n\nconst name$n = \"@firebase/analytics\";\n\nconst name$m = \"@firebase/app-check-compat\";\n\nconst name$l = \"@firebase/app-check\";\n\nconst name$k = \"@firebase/auth\";\n\nconst name$j = \"@firebase/auth-compat\";\n\nconst name$i = \"@firebase/database\";\n\nconst name$h = \"@firebase/data-connect\";\n\nconst name$g = \"@firebase/database-compat\";\n\nconst name$f = \"@firebase/functions\";\n\nconst name$e = \"@firebase/functions-compat\";\n\nconst name$d = \"@firebase/installations\";\n\nconst name$c = \"@firebase/installations-compat\";\n\nconst name$b = \"@firebase/messaging\";\n\nconst name$a = \"@firebase/messaging-compat\";\n\nconst name$9 = \"@firebase/performance\";\n\nconst name$8 = \"@firebase/performance-compat\";\n\nconst name$7 = \"@firebase/remote-config\";\n\nconst name$6 = \"@firebase/remote-config-compat\";\n\nconst name$5 = \"@firebase/storage\";\n\nconst name$4 = \"@firebase/storage-compat\";\n\nconst name$3 = \"@firebase/firestore\";\n\nconst name$2 = \"@firebase/vertexai-preview\";\n\nconst name$1 = \"@firebase/firestore-compat\";\n\nconst name = \"firebase\";\nconst version = \"10.14.1\";\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * The default app name\r\n *\r\n * @internal\r\n */\r\nconst DEFAULT_ENTRY_NAME = '[DEFAULT]';\r\nconst PLATFORM_LOG_STRING = {\r\n    [name$q]: 'fire-core',\r\n    [name$p]: 'fire-core-compat',\r\n    [name$n]: 'fire-analytics',\r\n    [name$o]: 'fire-analytics-compat',\r\n    [name$l]: 'fire-app-check',\r\n    [name$m]: 'fire-app-check-compat',\r\n    [name$k]: 'fire-auth',\r\n    [name$j]: 'fire-auth-compat',\r\n    [name$i]: 'fire-rtdb',\r\n    [name$h]: 'fire-data-connect',\r\n    [name$g]: 'fire-rtdb-compat',\r\n    [name$f]: 'fire-fn',\r\n    [name$e]: 'fire-fn-compat',\r\n    [name$d]: 'fire-iid',\r\n    [name$c]: 'fire-iid-compat',\r\n    [name$b]: 'fire-fcm',\r\n    [name$a]: 'fire-fcm-compat',\r\n    [name$9]: 'fire-perf',\r\n    [name$8]: 'fire-perf-compat',\r\n    [name$7]: 'fire-rc',\r\n    [name$6]: 'fire-rc-compat',\r\n    [name$5]: 'fire-gcs',\r\n    [name$4]: 'fire-gcs-compat',\r\n    [name$3]: 'fire-fst',\r\n    [name$1]: 'fire-fst-compat',\r\n    [name$2]: 'fire-vertex',\r\n    'fire-js': 'fire-js',\r\n    [name]: 'fire-js-all'\r\n};\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @internal\r\n */\r\nconst _apps = new Map();\r\n/**\r\n * @internal\r\n */\r\nconst _serverApps = new Map();\r\n/**\r\n * Registered components.\r\n *\r\n * @internal\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nconst _components = new Map();\r\n/**\r\n * @param component - the component being added to this app's container\r\n *\r\n * @internal\r\n */\r\nfunction _addComponent(app, component) {\r\n    try {\r\n        app.container.addComponent(component);\r\n    }\r\n    catch (e) {\r\n        logger.debug(`Component ${component.name} failed to register with FirebaseApp ${app.name}`, e);\r\n    }\r\n}\r\n/**\r\n *\r\n * @internal\r\n */\r\nfunction _addOrOverwriteComponent(app, component) {\r\n    app.container.addOrOverwriteComponent(component);\r\n}\r\n/**\r\n *\r\n * @param component - the component to register\r\n * @returns whether or not the component is registered successfully\r\n *\r\n * @internal\r\n */\r\nfunction _registerComponent(component) {\r\n    const componentName = component.name;\r\n    if (_components.has(componentName)) {\r\n        logger.debug(`There were multiple attempts to register component ${componentName}.`);\r\n        return false;\r\n    }\r\n    _components.set(componentName, component);\r\n    // add the component to existing app instances\r\n    for (const app of _apps.values()) {\r\n        _addComponent(app, component);\r\n    }\r\n    for (const serverApp of _serverApps.values()) {\r\n        _addComponent(serverApp, component);\r\n    }\r\n    return true;\r\n}\r\n/**\r\n *\r\n * @param app - FirebaseApp instance\r\n * @param name - service name\r\n *\r\n * @returns the provider for the service with the matching name\r\n *\r\n * @internal\r\n */\r\nfunction _getProvider(app, name) {\r\n    const heartbeatController = app.container\r\n        .getProvider('heartbeat')\r\n        .getImmediate({ optional: true });\r\n    if (heartbeatController) {\r\n        void heartbeatController.triggerHeartbeat();\r\n    }\r\n    return app.container.getProvider(name);\r\n}\r\n/**\r\n *\r\n * @param app - FirebaseApp instance\r\n * @param name - service name\r\n * @param instanceIdentifier - service instance identifier in case the service supports multiple instances\r\n *\r\n * @internal\r\n */\r\nfunction _removeServiceInstance(app, name, instanceIdentifier = DEFAULT_ENTRY_NAME) {\r\n    _getProvider(app, name).clearInstance(instanceIdentifier);\r\n}\r\n/**\r\n *\r\n * @param obj - an object of type FirebaseApp or FirebaseOptions.\r\n *\r\n * @returns true if the provide object is of type FirebaseApp.\r\n *\r\n * @internal\r\n */\r\nfunction _isFirebaseApp(obj) {\r\n    return obj.options !== undefined;\r\n}\r\n/**\r\n *\r\n * @param obj - an object of type FirebaseApp.\r\n *\r\n * @returns true if the provided object is of type FirebaseServerAppImpl.\r\n *\r\n * @internal\r\n */\r\nfunction _isFirebaseServerApp(obj) {\r\n    return obj.settings !== undefined;\r\n}\r\n/**\r\n * Test only\r\n *\r\n * @internal\r\n */\r\nfunction _clearComponents() {\r\n    _components.clear();\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst ERRORS = {\r\n    [\"no-app\" /* AppError.NO_APP */]: \"No Firebase App '{$appName}' has been created - \" +\r\n        'call initializeApp() first',\r\n    [\"bad-app-name\" /* AppError.BAD_APP_NAME */]: \"Illegal App name: '{$appName}'\",\r\n    [\"duplicate-app\" /* AppError.DUPLICATE_APP */]: \"Firebase App named '{$appName}' already exists with different options or config\",\r\n    [\"app-deleted\" /* AppError.APP_DELETED */]: \"Firebase App named '{$appName}' already deleted\",\r\n    [\"server-app-deleted\" /* AppError.SERVER_APP_DELETED */]: 'Firebase Server App has been deleted',\r\n    [\"no-options\" /* AppError.NO_OPTIONS */]: 'Need to provide options, when not being deployed to hosting via source.',\r\n    [\"invalid-app-argument\" /* AppError.INVALID_APP_ARGUMENT */]: 'firebase.{$appName}() takes either no argument or a ' +\r\n        'Firebase App instance.',\r\n    [\"invalid-log-argument\" /* AppError.INVALID_LOG_ARGUMENT */]: 'First argument to `onLog` must be null or a function.',\r\n    [\"idb-open\" /* AppError.IDB_OPEN */]: 'Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.',\r\n    [\"idb-get\" /* AppError.IDB_GET */]: 'Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.',\r\n    [\"idb-set\" /* AppError.IDB_WRITE */]: 'Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.',\r\n    [\"idb-delete\" /* AppError.IDB_DELETE */]: 'Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.',\r\n    [\"finalization-registry-not-supported\" /* AppError.FINALIZATION_REGISTRY_NOT_SUPPORTED */]: 'FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.',\r\n    [\"invalid-server-app-environment\" /* AppError.INVALID_SERVER_APP_ENVIRONMENT */]: 'FirebaseServerApp is not for use in browser environments.'\r\n};\r\nconst ERROR_FACTORY = new ErrorFactory('app', 'Firebase', ERRORS);\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass FirebaseAppImpl {\r\n    constructor(options, config, container) {\r\n        this._isDeleted = false;\r\n        this._options = Object.assign({}, options);\r\n        this._config = Object.assign({}, config);\r\n        this._name = config.name;\r\n        this._automaticDataCollectionEnabled =\r\n            config.automaticDataCollectionEnabled;\r\n        this._container = container;\r\n        this.container.addComponent(new Component('app', () => this, \"PUBLIC\" /* ComponentType.PUBLIC */));\r\n    }\r\n    get automaticDataCollectionEnabled() {\r\n        this.checkDestroyed();\r\n        return this._automaticDataCollectionEnabled;\r\n    }\r\n    set automaticDataCollectionEnabled(val) {\r\n        this.checkDestroyed();\r\n        this._automaticDataCollectionEnabled = val;\r\n    }\r\n    get name() {\r\n        this.checkDestroyed();\r\n        return this._name;\r\n    }\r\n    get options() {\r\n        this.checkDestroyed();\r\n        return this._options;\r\n    }\r\n    get config() {\r\n        this.checkDestroyed();\r\n        return this._config;\r\n    }\r\n    get container() {\r\n        return this._container;\r\n    }\r\n    get isDeleted() {\r\n        return this._isDeleted;\r\n    }\r\n    set isDeleted(val) {\r\n        this._isDeleted = val;\r\n    }\r\n    /**\r\n     * This function will throw an Error if the App has already been deleted -\r\n     * use before performing API actions on the App.\r\n     */\r\n    checkDestroyed() {\r\n        if (this.isDeleted) {\r\n            throw ERROR_FACTORY.create(\"app-deleted\" /* AppError.APP_DELETED */, { appName: this._name });\r\n        }\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2023 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass FirebaseServerAppImpl extends FirebaseAppImpl {\r\n    constructor(options, serverConfig, name, container) {\r\n        // Build configuration parameters for the FirebaseAppImpl base class.\r\n        const automaticDataCollectionEnabled = serverConfig.automaticDataCollectionEnabled !== undefined\r\n            ? serverConfig.automaticDataCollectionEnabled\r\n            : false;\r\n        // Create the FirebaseAppSettings object for the FirebaseAppImp constructor.\r\n        const config = {\r\n            name,\r\n            automaticDataCollectionEnabled\r\n        };\r\n        if (options.apiKey !== undefined) {\r\n            // Construct the parent FirebaseAppImp object.\r\n            super(options, config, container);\r\n        }\r\n        else {\r\n            const appImpl = options;\r\n            super(appImpl.options, config, container);\r\n        }\r\n        // Now construct the data for the FirebaseServerAppImpl.\r\n        this._serverConfig = Object.assign({ automaticDataCollectionEnabled }, serverConfig);\r\n        this._finalizationRegistry = null;\r\n        if (typeof FinalizationRegistry !== 'undefined') {\r\n            this._finalizationRegistry = new FinalizationRegistry(() => {\r\n                this.automaticCleanup();\r\n            });\r\n        }\r\n        this._refCount = 0;\r\n        this.incRefCount(this._serverConfig.releaseOnDeref);\r\n        // Do not retain a hard reference to the dref object, otherwise the FinalizationRegistry\r\n        // will never trigger.\r\n        this._serverConfig.releaseOnDeref = undefined;\r\n        serverConfig.releaseOnDeref = undefined;\r\n        registerVersion(name$q, version$1, 'serverapp');\r\n    }\r\n    toJSON() {\r\n        return undefined;\r\n    }\r\n    get refCount() {\r\n        return this._refCount;\r\n    }\r\n    // Increment the reference count of this server app. If an object is provided, register it\r\n    // with the finalization registry.\r\n    incRefCount(obj) {\r\n        if (this.isDeleted) {\r\n            return;\r\n        }\r\n        this._refCount++;\r\n        if (obj !== undefined && this._finalizationRegistry !== null) {\r\n            this._finalizationRegistry.register(obj, this);\r\n        }\r\n    }\r\n    // Decrement the reference count.\r\n    decRefCount() {\r\n        if (this.isDeleted) {\r\n            return 0;\r\n        }\r\n        return --this._refCount;\r\n    }\r\n    // Invoked by the FinalizationRegistry callback to note that this app should go through its\r\n    // reference counts and delete itself if no reference count remain. The coordinating logic that\r\n    // handles this is in deleteApp(...).\r\n    automaticCleanup() {\r\n        void deleteApp(this);\r\n    }\r\n    get settings() {\r\n        this.checkDestroyed();\r\n        return this._serverConfig;\r\n    }\r\n    /**\r\n     * This function will throw an Error if the App has already been deleted -\r\n     * use before performing API actions on the App.\r\n     */\r\n    checkDestroyed() {\r\n        if (this.isDeleted) {\r\n            throw ERROR_FACTORY.create(\"server-app-deleted\" /* AppError.SERVER_APP_DELETED */);\r\n        }\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * The current SDK version.\r\n *\r\n * @public\r\n */\r\nconst SDK_VERSION = version;\r\nfunction initializeApp(_options, rawConfig = {}) {\r\n    let options = _options;\r\n    if (typeof rawConfig !== 'object') {\r\n        const name = rawConfig;\r\n        rawConfig = { name };\r\n    }\r\n    const config = Object.assign({ name: DEFAULT_ENTRY_NAME, automaticDataCollectionEnabled: false }, rawConfig);\r\n    const name = config.name;\r\n    if (typeof name !== 'string' || !name) {\r\n        throw ERROR_FACTORY.create(\"bad-app-name\" /* AppError.BAD_APP_NAME */, {\r\n            appName: String(name)\r\n        });\r\n    }\r\n    options || (options = getDefaultAppConfig());\r\n    if (!options) {\r\n        throw ERROR_FACTORY.create(\"no-options\" /* AppError.NO_OPTIONS */);\r\n    }\r\n    const existingApp = _apps.get(name);\r\n    if (existingApp) {\r\n        // return the existing app if options and config deep equal the ones in the existing app.\r\n        if (deepEqual(options, existingApp.options) &&\r\n            deepEqual(config, existingApp.config)) {\r\n            return existingApp;\r\n        }\r\n        else {\r\n            throw ERROR_FACTORY.create(\"duplicate-app\" /* AppError.DUPLICATE_APP */, { appName: name });\r\n        }\r\n    }\r\n    const container = new ComponentContainer(name);\r\n    for (const component of _components.values()) {\r\n        container.addComponent(component);\r\n    }\r\n    const newApp = new FirebaseAppImpl(options, config, container);\r\n    _apps.set(name, newApp);\r\n    return newApp;\r\n}\r\nfunction initializeServerApp(_options, _serverAppConfig) {\r\n    if (isBrowser() && !isWebWorker()) {\r\n        // FirebaseServerApp isn't designed to be run in browsers.\r\n        throw ERROR_FACTORY.create(\"invalid-server-app-environment\" /* AppError.INVALID_SERVER_APP_ENVIRONMENT */);\r\n    }\r\n    if (_serverAppConfig.automaticDataCollectionEnabled === undefined) {\r\n        _serverAppConfig.automaticDataCollectionEnabled = false;\r\n    }\r\n    let appOptions;\r\n    if (_isFirebaseApp(_options)) {\r\n        appOptions = _options.options;\r\n    }\r\n    else {\r\n        appOptions = _options;\r\n    }\r\n    // Build an app name based on a hash of the configuration options.\r\n    const nameObj = Object.assign(Object.assign({}, _serverAppConfig), appOptions);\r\n    // However, Do not mangle the name based on releaseOnDeref, since it will vary between the\r\n    // construction of FirebaseServerApp instances. For example, if the object is the request headers.\r\n    if (nameObj.releaseOnDeref !== undefined) {\r\n        delete nameObj.releaseOnDeref;\r\n    }\r\n    const hashCode = (s) => {\r\n        return [...s].reduce((hash, c) => (Math.imul(31, hash) + c.charCodeAt(0)) | 0, 0);\r\n    };\r\n    if (_serverAppConfig.releaseOnDeref !== undefined) {\r\n        if (typeof FinalizationRegistry === 'undefined') {\r\n            throw ERROR_FACTORY.create(\"finalization-registry-not-supported\" /* AppError.FINALIZATION_REGISTRY_NOT_SUPPORTED */, {});\r\n        }\r\n    }\r\n    const nameString = '' + hashCode(JSON.stringify(nameObj));\r\n    const existingApp = _serverApps.get(nameString);\r\n    if (existingApp) {\r\n        existingApp.incRefCount(_serverAppConfig.releaseOnDeref);\r\n        return existingApp;\r\n    }\r\n    const container = new ComponentContainer(nameString);\r\n    for (const component of _components.values()) {\r\n        container.addComponent(component);\r\n    }\r\n    const newApp = new FirebaseServerAppImpl(appOptions, _serverAppConfig, nameString, container);\r\n    _serverApps.set(nameString, newApp);\r\n    return newApp;\r\n}\r\n/**\r\n * Retrieves a {@link @firebase/app#FirebaseApp} instance.\r\n *\r\n * When called with no arguments, the default app is returned. When an app name\r\n * is provided, the app corresponding to that name is returned.\r\n *\r\n * An exception is thrown if the app being retrieved has not yet been\r\n * initialized.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Return the default app\r\n * const app = getApp();\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Return a named app\r\n * const otherApp = getApp(\"otherApp\");\r\n * ```\r\n *\r\n * @param name - Optional name of the app to return. If no name is\r\n *   provided, the default is `\"[DEFAULT]\"`.\r\n *\r\n * @returns The app corresponding to the provided app name.\r\n *   If no app name is provided, the default app is returned.\r\n *\r\n * @public\r\n */\r\nfunction getApp(name = DEFAULT_ENTRY_NAME) {\r\n    const app = _apps.get(name);\r\n    if (!app && name === DEFAULT_ENTRY_NAME && getDefaultAppConfig()) {\r\n        return initializeApp();\r\n    }\r\n    if (!app) {\r\n        throw ERROR_FACTORY.create(\"no-app\" /* AppError.NO_APP */, { appName: name });\r\n    }\r\n    return app;\r\n}\r\n/**\r\n * A (read-only) array of all initialized apps.\r\n * @public\r\n */\r\nfunction getApps() {\r\n    return Array.from(_apps.values());\r\n}\r\n/**\r\n * Renders this app unusable and frees the resources of all associated\r\n * services.\r\n *\r\n * @example\r\n * ```javascript\r\n * deleteApp(app)\r\n *   .then(function() {\r\n *     console.log(\"App deleted successfully\");\r\n *   })\r\n *   .catch(function(error) {\r\n *     console.log(\"Error deleting app:\", error);\r\n *   });\r\n * ```\r\n *\r\n * @public\r\n */\r\nasync function deleteApp(app) {\r\n    let cleanupProviders = false;\r\n    const name = app.name;\r\n    if (_apps.has(name)) {\r\n        cleanupProviders = true;\r\n        _apps.delete(name);\r\n    }\r\n    else if (_serverApps.has(name)) {\r\n        const firebaseServerApp = app;\r\n        if (firebaseServerApp.decRefCount() <= 0) {\r\n            _serverApps.delete(name);\r\n            cleanupProviders = true;\r\n        }\r\n    }\r\n    if (cleanupProviders) {\r\n        await Promise.all(app.container\r\n            .getProviders()\r\n            .map(provider => provider.delete()));\r\n        app.isDeleted = true;\r\n    }\r\n}\r\n/**\r\n * Registers a library's name and version for platform logging purposes.\r\n * @param library - Name of 1p or 3p library (e.g. firestore, angularfire)\r\n * @param version - Current version of that library.\r\n * @param variant - Bundle variant, e.g., node, rn, etc.\r\n *\r\n * @public\r\n */\r\nfunction registerVersion(libraryKeyOrName, version, variant) {\r\n    var _a;\r\n    // TODO: We can use this check to whitelist strings when/if we set up\r\n    // a good whitelist system.\r\n    let library = (_a = PLATFORM_LOG_STRING[libraryKeyOrName]) !== null && _a !== void 0 ? _a : libraryKeyOrName;\r\n    if (variant) {\r\n        library += `-${variant}`;\r\n    }\r\n    const libraryMismatch = library.match(/\\s|\\//);\r\n    const versionMismatch = version.match(/\\s|\\//);\r\n    if (libraryMismatch || versionMismatch) {\r\n        const warning = [\r\n            `Unable to register library \"${library}\" with version \"${version}\":`\r\n        ];\r\n        if (libraryMismatch) {\r\n            warning.push(`library name \"${library}\" contains illegal characters (whitespace or \"/\")`);\r\n        }\r\n        if (libraryMismatch && versionMismatch) {\r\n            warning.push('and');\r\n        }\r\n        if (versionMismatch) {\r\n            warning.push(`version name \"${version}\" contains illegal characters (whitespace or \"/\")`);\r\n        }\r\n        logger.warn(warning.join(' '));\r\n        return;\r\n    }\r\n    _registerComponent(new Component(`${library}-version`, () => ({ library, version }), \"VERSION\" /* ComponentType.VERSION */));\r\n}\r\n/**\r\n * Sets log handler for all Firebase SDKs.\r\n * @param logCallback - An optional custom log handler that executes user code whenever\r\n * the Firebase SDK makes a logging call.\r\n *\r\n * @public\r\n */\r\nfunction onLog(logCallback, options) {\r\n    if (logCallback !== null && typeof logCallback !== 'function') {\r\n        throw ERROR_FACTORY.create(\"invalid-log-argument\" /* AppError.INVALID_LOG_ARGUMENT */);\r\n    }\r\n    setUserLogHandler(logCallback, options);\r\n}\r\n/**\r\n * Sets log level for all Firebase SDKs.\r\n *\r\n * All of the log types above the current log level are captured (i.e. if\r\n * you set the log level to `info`, errors are logged, but `debug` and\r\n * `verbose` logs are not).\r\n *\r\n * @public\r\n */\r\nfunction setLogLevel(logLevel) {\r\n    setLogLevel$1(logLevel);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst DB_NAME = 'firebase-heartbeat-database';\r\nconst DB_VERSION = 1;\r\nconst STORE_NAME = 'firebase-heartbeat-store';\r\nlet dbPromise = null;\r\nfunction getDbPromise() {\r\n    if (!dbPromise) {\r\n        dbPromise = openDB(DB_NAME, DB_VERSION, {\r\n            upgrade: (db, oldVersion) => {\r\n                // We don't use 'break' in this switch statement, the fall-through\r\n                // behavior is what we want, because if there are multiple versions between\r\n                // the old version and the current version, we want ALL the migrations\r\n                // that correspond to those versions to run, not only the last one.\r\n                // eslint-disable-next-line default-case\r\n                switch (oldVersion) {\r\n                    case 0:\r\n                        try {\r\n                            db.createObjectStore(STORE_NAME);\r\n                        }\r\n                        catch (e) {\r\n                            // Safari/iOS browsers throw occasional exceptions on\r\n                            // db.createObjectStore() that may be a bug. Avoid blocking\r\n                            // the rest of the app functionality.\r\n                            console.warn(e);\r\n                        }\r\n                }\r\n            }\r\n        }).catch(e => {\r\n            throw ERROR_FACTORY.create(\"idb-open\" /* AppError.IDB_OPEN */, {\r\n                originalErrorMessage: e.message\r\n            });\r\n        });\r\n    }\r\n    return dbPromise;\r\n}\r\nasync function readHeartbeatsFromIndexedDB(app) {\r\n    try {\r\n        const db = await getDbPromise();\r\n        const tx = db.transaction(STORE_NAME);\r\n        const result = await tx.objectStore(STORE_NAME).get(computeKey(app));\r\n        // We already have the value but tx.done can throw,\r\n        // so we need to await it here to catch errors\r\n        await tx.done;\r\n        return result;\r\n    }\r\n    catch (e) {\r\n        if (e instanceof FirebaseError) {\r\n            logger.warn(e.message);\r\n        }\r\n        else {\r\n            const idbGetError = ERROR_FACTORY.create(\"idb-get\" /* AppError.IDB_GET */, {\r\n                originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\r\n            });\r\n            logger.warn(idbGetError.message);\r\n        }\r\n    }\r\n}\r\nasync function writeHeartbeatsToIndexedDB(app, heartbeatObject) {\r\n    try {\r\n        const db = await getDbPromise();\r\n        const tx = db.transaction(STORE_NAME, 'readwrite');\r\n        const objectStore = tx.objectStore(STORE_NAME);\r\n        await objectStore.put(heartbeatObject, computeKey(app));\r\n        await tx.done;\r\n    }\r\n    catch (e) {\r\n        if (e instanceof FirebaseError) {\r\n            logger.warn(e.message);\r\n        }\r\n        else {\r\n            const idbGetError = ERROR_FACTORY.create(\"idb-set\" /* AppError.IDB_WRITE */, {\r\n                originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\r\n            });\r\n            logger.warn(idbGetError.message);\r\n        }\r\n    }\r\n}\r\nfunction computeKey(app) {\r\n    return `${app.name}!${app.options.appId}`;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst MAX_HEADER_BYTES = 1024;\r\n// 30 days\r\nconst STORED_HEARTBEAT_RETENTION_MAX_MILLIS = 30 * 24 * 60 * 60 * 1000;\r\nclass HeartbeatServiceImpl {\r\n    constructor(container) {\r\n        this.container = container;\r\n        /**\r\n         * In-memory cache for heartbeats, used by getHeartbeatsHeader() to generate\r\n         * the header string.\r\n         * Stores one record per date. This will be consolidated into the standard\r\n         * format of one record per user agent string before being sent as a header.\r\n         * Populated from indexedDB when the controller is instantiated and should\r\n         * be kept in sync with indexedDB.\r\n         * Leave public for easier testing.\r\n         */\r\n        this._heartbeatsCache = null;\r\n        const app = this.container.getProvider('app').getImmediate();\r\n        this._storage = new HeartbeatStorageImpl(app);\r\n        this._heartbeatsCachePromise = this._storage.read().then(result => {\r\n            this._heartbeatsCache = result;\r\n            return result;\r\n        });\r\n    }\r\n    /**\r\n     * Called to report a heartbeat. The function will generate\r\n     * a HeartbeatsByUserAgent object, update heartbeatsCache, and persist it\r\n     * to IndexedDB.\r\n     * Note that we only store one heartbeat per day. So if a heartbeat for today is\r\n     * already logged, subsequent calls to this function in the same day will be ignored.\r\n     */\r\n    async triggerHeartbeat() {\r\n        var _a, _b;\r\n        try {\r\n            const platformLogger = this.container\r\n                .getProvider('platform-logger')\r\n                .getImmediate();\r\n            // This is the \"Firebase user agent\" string from the platform logger\r\n            // service, not the browser user agent.\r\n            const agent = platformLogger.getPlatformInfoString();\r\n            const date = getUTCDateString();\r\n            if (((_a = this._heartbeatsCache) === null || _a === void 0 ? void 0 : _a.heartbeats) == null) {\r\n                this._heartbeatsCache = await this._heartbeatsCachePromise;\r\n                // If we failed to construct a heartbeats cache, then return immediately.\r\n                if (((_b = this._heartbeatsCache) === null || _b === void 0 ? void 0 : _b.heartbeats) == null) {\r\n                    return;\r\n                }\r\n            }\r\n            // Do not store a heartbeat if one is already stored for this day\r\n            // or if a header has already been sent today.\r\n            if (this._heartbeatsCache.lastSentHeartbeatDate === date ||\r\n                this._heartbeatsCache.heartbeats.some(singleDateHeartbeat => singleDateHeartbeat.date === date)) {\r\n                return;\r\n            }\r\n            else {\r\n                // There is no entry for this date. Create one.\r\n                this._heartbeatsCache.heartbeats.push({ date, agent });\r\n            }\r\n            // Remove entries older than 30 days.\r\n            this._heartbeatsCache.heartbeats =\r\n                this._heartbeatsCache.heartbeats.filter(singleDateHeartbeat => {\r\n                    const hbTimestamp = new Date(singleDateHeartbeat.date).valueOf();\r\n                    const now = Date.now();\r\n                    return now - hbTimestamp <= STORED_HEARTBEAT_RETENTION_MAX_MILLIS;\r\n                });\r\n            return this._storage.overwrite(this._heartbeatsCache);\r\n        }\r\n        catch (e) {\r\n            logger.warn(e);\r\n        }\r\n    }\r\n    /**\r\n     * Returns a base64 encoded string which can be attached to the heartbeat-specific header directly.\r\n     * It also clears all heartbeats from memory as well as in IndexedDB.\r\n     *\r\n     * NOTE: Consuming product SDKs should not send the header if this method\r\n     * returns an empty string.\r\n     */\r\n    async getHeartbeatsHeader() {\r\n        var _a;\r\n        try {\r\n            if (this._heartbeatsCache === null) {\r\n                await this._heartbeatsCachePromise;\r\n            }\r\n            // If it's still null or the array is empty, there is no data to send.\r\n            if (((_a = this._heartbeatsCache) === null || _a === void 0 ? void 0 : _a.heartbeats) == null ||\r\n                this._heartbeatsCache.heartbeats.length === 0) {\r\n                return '';\r\n            }\r\n            const date = getUTCDateString();\r\n            // Extract as many heartbeats from the cache as will fit under the size limit.\r\n            const { heartbeatsToSend, unsentEntries } = extractHeartbeatsForHeader(this._heartbeatsCache.heartbeats);\r\n            const headerString = base64urlEncodeWithoutPadding(JSON.stringify({ version: 2, heartbeats: heartbeatsToSend }));\r\n            // Store last sent date to prevent another being logged/sent for the same day.\r\n            this._heartbeatsCache.lastSentHeartbeatDate = date;\r\n            if (unsentEntries.length > 0) {\r\n                // Store any unsent entries if they exist.\r\n                this._heartbeatsCache.heartbeats = unsentEntries;\r\n                // This seems more likely than emptying the array (below) to lead to some odd state\r\n                // since the cache isn't empty and this will be called again on the next request,\r\n                // and is probably safest if we await it.\r\n                await this._storage.overwrite(this._heartbeatsCache);\r\n            }\r\n            else {\r\n                this._heartbeatsCache.heartbeats = [];\r\n                // Do not wait for this, to reduce latency.\r\n                void this._storage.overwrite(this._heartbeatsCache);\r\n            }\r\n            return headerString;\r\n        }\r\n        catch (e) {\r\n            logger.warn(e);\r\n            return '';\r\n        }\r\n    }\r\n}\r\nfunction getUTCDateString() {\r\n    const today = new Date();\r\n    // Returns date format 'YYYY-MM-DD'\r\n    return today.toISOString().substring(0, 10);\r\n}\r\nfunction extractHeartbeatsForHeader(heartbeatsCache, maxSize = MAX_HEADER_BYTES) {\r\n    // Heartbeats grouped by user agent in the standard format to be sent in\r\n    // the header.\r\n    const heartbeatsToSend = [];\r\n    // Single date format heartbeats that are not sent.\r\n    let unsentEntries = heartbeatsCache.slice();\r\n    for (const singleDateHeartbeat of heartbeatsCache) {\r\n        // Look for an existing entry with the same user agent.\r\n        const heartbeatEntry = heartbeatsToSend.find(hb => hb.agent === singleDateHeartbeat.agent);\r\n        if (!heartbeatEntry) {\r\n            // If no entry for this user agent exists, create one.\r\n            heartbeatsToSend.push({\r\n                agent: singleDateHeartbeat.agent,\r\n                dates: [singleDateHeartbeat.date]\r\n            });\r\n            if (countBytes(heartbeatsToSend) > maxSize) {\r\n                // If the header would exceed max size, remove the added heartbeat\r\n                // entry and stop adding to the header.\r\n                heartbeatsToSend.pop();\r\n                break;\r\n            }\r\n        }\r\n        else {\r\n            heartbeatEntry.dates.push(singleDateHeartbeat.date);\r\n            // If the header would exceed max size, remove the added date\r\n            // and stop adding to the header.\r\n            if (countBytes(heartbeatsToSend) > maxSize) {\r\n                heartbeatEntry.dates.pop();\r\n                break;\r\n            }\r\n        }\r\n        // Pop unsent entry from queue. (Skipped if adding the entry exceeded\r\n        // quota and the loop breaks early.)\r\n        unsentEntries = unsentEntries.slice(1);\r\n    }\r\n    return {\r\n        heartbeatsToSend,\r\n        unsentEntries\r\n    };\r\n}\r\nclass HeartbeatStorageImpl {\r\n    constructor(app) {\r\n        this.app = app;\r\n        this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();\r\n    }\r\n    async runIndexedDBEnvironmentCheck() {\r\n        if (!isIndexedDBAvailable()) {\r\n            return false;\r\n        }\r\n        else {\r\n            return validateIndexedDBOpenable()\r\n                .then(() => true)\r\n                .catch(() => false);\r\n        }\r\n    }\r\n    /**\r\n     * Read all heartbeats.\r\n     */\r\n    async read() {\r\n        const canUseIndexedDB = await this._canUseIndexedDBPromise;\r\n        if (!canUseIndexedDB) {\r\n            return { heartbeats: [] };\r\n        }\r\n        else {\r\n            const idbHeartbeatObject = await readHeartbeatsFromIndexedDB(this.app);\r\n            if (idbHeartbeatObject === null || idbHeartbeatObject === void 0 ? void 0 : idbHeartbeatObject.heartbeats) {\r\n                return idbHeartbeatObject;\r\n            }\r\n            else {\r\n                return { heartbeats: [] };\r\n            }\r\n        }\r\n    }\r\n    // overwrite the storage with the provided heartbeats\r\n    async overwrite(heartbeatsObject) {\r\n        var _a;\r\n        const canUseIndexedDB = await this._canUseIndexedDBPromise;\r\n        if (!canUseIndexedDB) {\r\n            return;\r\n        }\r\n        else {\r\n            const existingHeartbeatsObject = await this.read();\r\n            return writeHeartbeatsToIndexedDB(this.app, {\r\n                lastSentHeartbeatDate: (_a = heartbeatsObject.lastSentHeartbeatDate) !== null && _a !== void 0 ? _a : existingHeartbeatsObject.lastSentHeartbeatDate,\r\n                heartbeats: heartbeatsObject.heartbeats\r\n            });\r\n        }\r\n    }\r\n    // add heartbeats\r\n    async add(heartbeatsObject) {\r\n        var _a;\r\n        const canUseIndexedDB = await this._canUseIndexedDBPromise;\r\n        if (!canUseIndexedDB) {\r\n            return;\r\n        }\r\n        else {\r\n            const existingHeartbeatsObject = await this.read();\r\n            return writeHeartbeatsToIndexedDB(this.app, {\r\n                lastSentHeartbeatDate: (_a = heartbeatsObject.lastSentHeartbeatDate) !== null && _a !== void 0 ? _a : existingHeartbeatsObject.lastSentHeartbeatDate,\r\n                heartbeats: [\r\n                    ...existingHeartbeatsObject.heartbeats,\r\n                    ...heartbeatsObject.heartbeats\r\n                ]\r\n            });\r\n        }\r\n    }\r\n}\r\n/**\r\n * Calculate bytes of a HeartbeatsByUserAgent array after being wrapped\r\n * in a platform logging header JSON object, stringified, and converted\r\n * to base 64.\r\n */\r\nfunction countBytes(heartbeatsCache) {\r\n    // base64 has a restricted set of characters, all of which should be 1 byte.\r\n    return base64urlEncodeWithoutPadding(\r\n    // heartbeatsCache wrapper properties\r\n    JSON.stringify({ version: 2, heartbeats: heartbeatsCache })).length;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction registerCoreComponents(variant) {\r\n    _registerComponent(new Component('platform-logger', container => new PlatformLoggerServiceImpl(container), \"PRIVATE\" /* ComponentType.PRIVATE */));\r\n    _registerComponent(new Component('heartbeat', container => new HeartbeatServiceImpl(container), \"PRIVATE\" /* ComponentType.PRIVATE */));\r\n    // Register `app` package.\r\n    registerVersion(name$q, version$1, variant);\r\n    // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\r\n    registerVersion(name$q, version$1, 'esm2017');\r\n    // Register platform SDK identifier (no version).\r\n    registerVersion('fire-js', '');\r\n}\n\n/**\r\n * Firebase App\r\n *\r\n * @remarks This package coordinates the communication between the different Firebase components\r\n * @packageDocumentation\r\n */\r\nregisterCoreComponents('');\n\nexport { SDK_VERSION, DEFAULT_ENTRY_NAME as _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _isFirebaseApp, _isFirebaseServerApp, _registerComponent, _removeServiceInstance, _serverApps, deleteApp, getApp, getApps, initializeApp, initializeServerApp, onLog, registerVersion, setLogLevel };\n//# sourceMappingURL=index.esm2017.js.map\n","import { _getProvider, getApp, _registerComponent, registerVersion, SDK_VERSION } from '@firebase/app';\nimport { FirebaseError, createMockUserToken, getModularInstance, getDefaultEmulatorHostnameAndPort } from '@firebase/util';\nimport { Component } from '@firebase/component';\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @fileoverview Constants used in the Firebase Storage library.\r\n */\r\n/**\r\n * Domain name for firebase storage.\r\n */\r\nconst DEFAULT_HOST = 'firebasestorage.googleapis.com';\r\n/**\r\n * The key in Firebase config json for the storage bucket.\r\n */\r\nconst CONFIG_STORAGE_BUCKET_KEY = 'storageBucket';\r\n/**\r\n * 2 minutes\r\n *\r\n * The timeout for all operations except upload.\r\n */\r\nconst DEFAULT_MAX_OPERATION_RETRY_TIME = 2 * 60 * 1000;\r\n/**\r\n * 10 minutes\r\n *\r\n * The timeout for upload.\r\n */\r\nconst DEFAULT_MAX_UPLOAD_RETRY_TIME = 10 * 60 * 1000;\r\n/**\r\n * 1 second\r\n */\r\nconst DEFAULT_MIN_SLEEP_TIME_MILLIS = 1000;\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * An error returned by the Firebase Storage SDK.\r\n * @public\r\n */\r\nclass StorageError extends FirebaseError {\r\n    /**\r\n     * @param code - A `StorageErrorCode` string to be prefixed with 'storage/' and\r\n     *  added to the end of the message.\r\n     * @param message  - Error message.\r\n     * @param status_ - Corresponding HTTP Status Code\r\n     */\r\n    constructor(code, message, status_ = 0) {\r\n        super(prependCode(code), `Firebase Storage: ${message} (${prependCode(code)})`);\r\n        this.status_ = status_;\r\n        /**\r\n         * Stores custom error data unique to the `StorageError`.\r\n         */\r\n        this.customData = { serverResponse: null };\r\n        this._baseMessage = this.message;\r\n        // Without this, `instanceof StorageError`, in tests for example,\r\n        // returns false.\r\n        Object.setPrototypeOf(this, StorageError.prototype);\r\n    }\r\n    get status() {\r\n        return this.status_;\r\n    }\r\n    set status(status) {\r\n        this.status_ = status;\r\n    }\r\n    /**\r\n     * Compares a `StorageErrorCode` against this error's code, filtering out the prefix.\r\n     */\r\n    _codeEquals(code) {\r\n        return prependCode(code) === this.code;\r\n    }\r\n    /**\r\n     * Optional response message that was added by the server.\r\n     */\r\n    get serverResponse() {\r\n        return this.customData.serverResponse;\r\n    }\r\n    set serverResponse(serverResponse) {\r\n        this.customData.serverResponse = serverResponse;\r\n        if (this.customData.serverResponse) {\r\n            this.message = `${this._baseMessage}\\n${this.customData.serverResponse}`;\r\n        }\r\n        else {\r\n            this.message = this._baseMessage;\r\n        }\r\n    }\r\n}\r\n/**\r\n * @public\r\n * Error codes that can be attached to `StorageError` objects.\r\n */\r\nvar StorageErrorCode;\r\n(function (StorageErrorCode) {\r\n    // Shared between all platforms\r\n    StorageErrorCode[\"UNKNOWN\"] = \"unknown\";\r\n    StorageErrorCode[\"OBJECT_NOT_FOUND\"] = \"object-not-found\";\r\n    StorageErrorCode[\"BUCKET_NOT_FOUND\"] = \"bucket-not-found\";\r\n    StorageErrorCode[\"PROJECT_NOT_FOUND\"] = \"project-not-found\";\r\n    StorageErrorCode[\"QUOTA_EXCEEDED\"] = \"quota-exceeded\";\r\n    StorageErrorCode[\"UNAUTHENTICATED\"] = \"unauthenticated\";\r\n    StorageErrorCode[\"UNAUTHORIZED\"] = \"unauthorized\";\r\n    StorageErrorCode[\"UNAUTHORIZED_APP\"] = \"unauthorized-app\";\r\n    StorageErrorCode[\"RETRY_LIMIT_EXCEEDED\"] = \"retry-limit-exceeded\";\r\n    StorageErrorCode[\"INVALID_CHECKSUM\"] = \"invalid-checksum\";\r\n    StorageErrorCode[\"CANCELED\"] = \"canceled\";\r\n    // JS specific\r\n    StorageErrorCode[\"INVALID_EVENT_NAME\"] = \"invalid-event-name\";\r\n    StorageErrorCode[\"INVALID_URL\"] = \"invalid-url\";\r\n    StorageErrorCode[\"INVALID_DEFAULT_BUCKET\"] = \"invalid-default-bucket\";\r\n    StorageErrorCode[\"NO_DEFAULT_BUCKET\"] = \"no-default-bucket\";\r\n    StorageErrorCode[\"CANNOT_SLICE_BLOB\"] = \"cannot-slice-blob\";\r\n    StorageErrorCode[\"SERVER_FILE_WRONG_SIZE\"] = \"server-file-wrong-size\";\r\n    StorageErrorCode[\"NO_DOWNLOAD_URL\"] = \"no-download-url\";\r\n    StorageErrorCode[\"INVALID_ARGUMENT\"] = \"invalid-argument\";\r\n    StorageErrorCode[\"INVALID_ARGUMENT_COUNT\"] = \"invalid-argument-count\";\r\n    StorageErrorCode[\"APP_DELETED\"] = \"app-deleted\";\r\n    StorageErrorCode[\"INVALID_ROOT_OPERATION\"] = \"invalid-root-operation\";\r\n    StorageErrorCode[\"INVALID_FORMAT\"] = \"invalid-format\";\r\n    StorageErrorCode[\"INTERNAL_ERROR\"] = \"internal-error\";\r\n    StorageErrorCode[\"UNSUPPORTED_ENVIRONMENT\"] = \"unsupported-environment\";\r\n})(StorageErrorCode || (StorageErrorCode = {}));\r\nfunction prependCode(code) {\r\n    return 'storage/' + code;\r\n}\r\nfunction unknown() {\r\n    const message = 'An unknown error occurred, please check the error payload for ' +\r\n        'server response.';\r\n    return new StorageError(StorageErrorCode.UNKNOWN, message);\r\n}\r\nfunction objectNotFound(path) {\r\n    return new StorageError(StorageErrorCode.OBJECT_NOT_FOUND, \"Object '\" + path + \"' does not exist.\");\r\n}\r\nfunction quotaExceeded(bucket) {\r\n    return new StorageError(StorageErrorCode.QUOTA_EXCEEDED, \"Quota for bucket '\" +\r\n        bucket +\r\n        \"' exceeded, please view quota on \" +\r\n        'https://firebase.google.com/pricing/.');\r\n}\r\nfunction unauthenticated() {\r\n    const message = 'User is not authenticated, please authenticate using Firebase ' +\r\n        'Authentication and try again.';\r\n    return new StorageError(StorageErrorCode.UNAUTHENTICATED, message);\r\n}\r\nfunction unauthorizedApp() {\r\n    return new StorageError(StorageErrorCode.UNAUTHORIZED_APP, 'This app does not have permission to access Firebase Storage on this project.');\r\n}\r\nfunction unauthorized(path) {\r\n    return new StorageError(StorageErrorCode.UNAUTHORIZED, \"User does not have permission to access '\" + path + \"'.\");\r\n}\r\nfunction retryLimitExceeded() {\r\n    return new StorageError(StorageErrorCode.RETRY_LIMIT_EXCEEDED, 'Max retry time for operation exceeded, please try again.');\r\n}\r\nfunction canceled() {\r\n    return new StorageError(StorageErrorCode.CANCELED, 'User canceled the upload/download.');\r\n}\r\nfunction invalidUrl(url) {\r\n    return new StorageError(StorageErrorCode.INVALID_URL, \"Invalid URL '\" + url + \"'.\");\r\n}\r\nfunction invalidDefaultBucket(bucket) {\r\n    return new StorageError(StorageErrorCode.INVALID_DEFAULT_BUCKET, \"Invalid default bucket '\" + bucket + \"'.\");\r\n}\r\nfunction noDefaultBucket() {\r\n    return new StorageError(StorageErrorCode.NO_DEFAULT_BUCKET, 'No default bucket ' +\r\n        \"found. Did you set the '\" +\r\n        CONFIG_STORAGE_BUCKET_KEY +\r\n        \"' property when initializing the app?\");\r\n}\r\nfunction cannotSliceBlob() {\r\n    return new StorageError(StorageErrorCode.CANNOT_SLICE_BLOB, 'Cannot slice blob for upload. Please retry the upload.');\r\n}\r\nfunction serverFileWrongSize() {\r\n    return new StorageError(StorageErrorCode.SERVER_FILE_WRONG_SIZE, 'Server recorded incorrect upload file size, please retry the upload.');\r\n}\r\nfunction noDownloadURL() {\r\n    return new StorageError(StorageErrorCode.NO_DOWNLOAD_URL, 'The given file does not have any download URLs.');\r\n}\r\nfunction missingPolyFill(polyFill) {\r\n    return new StorageError(StorageErrorCode.UNSUPPORTED_ENVIRONMENT, `${polyFill} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`);\r\n}\r\n/**\r\n * @internal\r\n */\r\nfunction invalidArgument(message) {\r\n    return new StorageError(StorageErrorCode.INVALID_ARGUMENT, message);\r\n}\r\nfunction appDeleted() {\r\n    return new StorageError(StorageErrorCode.APP_DELETED, 'The Firebase app was deleted.');\r\n}\r\n/**\r\n * @param name - The name of the operation that was invalid.\r\n *\r\n * @internal\r\n */\r\nfunction invalidRootOperation(name) {\r\n    return new StorageError(StorageErrorCode.INVALID_ROOT_OPERATION, \"The operation '\" +\r\n        name +\r\n        \"' cannot be performed on a root reference, create a non-root \" +\r\n        \"reference using child, such as .child('file.png').\");\r\n}\r\n/**\r\n * @param format - The format that was not valid.\r\n * @param message - A message describing the format violation.\r\n */\r\nfunction invalidFormat(format, message) {\r\n    return new StorageError(StorageErrorCode.INVALID_FORMAT, \"String does not match format '\" + format + \"': \" + message);\r\n}\r\n/**\r\n * @param message - A message describing the internal error.\r\n */\r\nfunction internalError(message) {\r\n    throw new StorageError(StorageErrorCode.INTERNAL_ERROR, 'Internal error: ' + message);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Firebase Storage location data.\r\n *\r\n * @internal\r\n */\r\nclass Location {\r\n    constructor(bucket, path) {\r\n        this.bucket = bucket;\r\n        this.path_ = path;\r\n    }\r\n    get path() {\r\n        return this.path_;\r\n    }\r\n    get isRoot() {\r\n        return this.path.length === 0;\r\n    }\r\n    fullServerUrl() {\r\n        const encode = encodeURIComponent;\r\n        return '/b/' + encode(this.bucket) + '/o/' + encode(this.path);\r\n    }\r\n    bucketOnlyServerUrl() {\r\n        const encode = encodeURIComponent;\r\n        return '/b/' + encode(this.bucket) + '/o';\r\n    }\r\n    static makeFromBucketSpec(bucketString, host) {\r\n        let bucketLocation;\r\n        try {\r\n            bucketLocation = Location.makeFromUrl(bucketString, host);\r\n        }\r\n        catch (e) {\r\n            // Not valid URL, use as-is. This lets you put bare bucket names in\r\n            // config.\r\n            return new Location(bucketString, '');\r\n        }\r\n        if (bucketLocation.path === '') {\r\n            return bucketLocation;\r\n        }\r\n        else {\r\n            throw invalidDefaultBucket(bucketString);\r\n        }\r\n    }\r\n    static makeFromUrl(url, host) {\r\n        let location = null;\r\n        const bucketDomain = '([A-Za-z0-9.\\\\-_]+)';\r\n        function gsModify(loc) {\r\n            if (loc.path.charAt(loc.path.length - 1) === '/') {\r\n                loc.path_ = loc.path_.slice(0, -1);\r\n            }\r\n        }\r\n        const gsPath = '(/(.*))?$';\r\n        const gsRegex = new RegExp('^gs://' + bucketDomain + gsPath, 'i');\r\n        const gsIndices = { bucket: 1, path: 3 };\r\n        function httpModify(loc) {\r\n            loc.path_ = decodeURIComponent(loc.path);\r\n        }\r\n        const version = 'v[A-Za-z0-9_]+';\r\n        const firebaseStorageHost = host.replace(/[.]/g, '\\\\.');\r\n        const firebaseStoragePath = '(/([^?#]*).*)?$';\r\n        const firebaseStorageRegExp = new RegExp(`^https?://${firebaseStorageHost}/${version}/b/${bucketDomain}/o${firebaseStoragePath}`, 'i');\r\n        const firebaseStorageIndices = { bucket: 1, path: 3 };\r\n        const cloudStorageHost = host === DEFAULT_HOST\r\n            ? '(?:storage.googleapis.com|storage.cloud.google.com)'\r\n            : host;\r\n        const cloudStoragePath = '([^?#]*)';\r\n        const cloudStorageRegExp = new RegExp(`^https?://${cloudStorageHost}/${bucketDomain}/${cloudStoragePath}`, 'i');\r\n        const cloudStorageIndices = { bucket: 1, path: 2 };\r\n        const groups = [\r\n            { regex: gsRegex, indices: gsIndices, postModify: gsModify },\r\n            {\r\n                regex: firebaseStorageRegExp,\r\n                indices: firebaseStorageIndices,\r\n                postModify: httpModify\r\n            },\r\n            {\r\n                regex: cloudStorageRegExp,\r\n                indices: cloudStorageIndices,\r\n                postModify: httpModify\r\n            }\r\n        ];\r\n        for (let i = 0; i < groups.length; i++) {\r\n            const group = groups[i];\r\n            const captures = group.regex.exec(url);\r\n            if (captures) {\r\n                const bucketValue = captures[group.indices.bucket];\r\n                let pathValue = captures[group.indices.path];\r\n                if (!pathValue) {\r\n                    pathValue = '';\r\n                }\r\n                location = new Location(bucketValue, pathValue);\r\n                group.postModify(location);\r\n                break;\r\n            }\r\n        }\r\n        if (location == null) {\r\n            throw invalidUrl(url);\r\n        }\r\n        return location;\r\n    }\r\n}\n\n/**\r\n * A request whose promise always fails.\r\n */\r\nclass FailRequest {\r\n    constructor(error) {\r\n        this.promise_ = Promise.reject(error);\r\n    }\r\n    /** @inheritDoc */\r\n    getPromise() {\r\n        return this.promise_;\r\n    }\r\n    /** @inheritDoc */\r\n    cancel(_appDelete = false) { }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Accepts a callback for an action to perform (`doRequest`),\r\n * and then a callback for when the backoff has completed (`backoffCompleteCb`).\r\n * The callback sent to start requires an argument to call (`onRequestComplete`).\r\n * When `start` calls `doRequest`, it passes a callback for when the request has\r\n * completed, `onRequestComplete`. Based on this, the backoff continues, with\r\n * another call to `doRequest` and the above loop continues until the timeout\r\n * is hit, or a successful response occurs.\r\n * @description\r\n * @param doRequest Callback to perform request\r\n * @param backoffCompleteCb Callback to call when backoff has been completed\r\n */\r\nfunction start(doRequest, \r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nbackoffCompleteCb, timeout) {\r\n    // TODO(andysoto): make this code cleaner (probably refactor into an actual\r\n    // type instead of a bunch of functions with state shared in the closure)\r\n    let waitSeconds = 1;\r\n    // Would type this as \"number\" but that doesn't work for Node so ¯\\_(ツ)_/¯\r\n    // TODO: find a way to exclude Node type definition for storage because storage only works in browser\r\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n    let retryTimeoutId = null;\r\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n    let globalTimeoutId = null;\r\n    let hitTimeout = false;\r\n    let cancelState = 0;\r\n    function canceled() {\r\n        return cancelState === 2;\r\n    }\r\n    let triggeredCallback = false;\r\n    function triggerCallback(...args) {\r\n        if (!triggeredCallback) {\r\n            triggeredCallback = true;\r\n            backoffCompleteCb.apply(null, args);\r\n        }\r\n    }\r\n    function callWithDelay(millis) {\r\n        retryTimeoutId = setTimeout(() => {\r\n            retryTimeoutId = null;\r\n            doRequest(responseHandler, canceled());\r\n        }, millis);\r\n    }\r\n    function clearGlobalTimeout() {\r\n        if (globalTimeoutId) {\r\n            clearTimeout(globalTimeoutId);\r\n        }\r\n    }\r\n    function responseHandler(success, ...args) {\r\n        if (triggeredCallback) {\r\n            clearGlobalTimeout();\r\n            return;\r\n        }\r\n        if (success) {\r\n            clearGlobalTimeout();\r\n            triggerCallback.call(null, success, ...args);\r\n            return;\r\n        }\r\n        const mustStop = canceled() || hitTimeout;\r\n        if (mustStop) {\r\n            clearGlobalTimeout();\r\n            triggerCallback.call(null, success, ...args);\r\n            return;\r\n        }\r\n        if (waitSeconds < 64) {\r\n            /* TODO(andysoto): don't back off so quickly if we know we're offline. */\r\n            waitSeconds *= 2;\r\n        }\r\n        let waitMillis;\r\n        if (cancelState === 1) {\r\n            cancelState = 2;\r\n            waitMillis = 0;\r\n        }\r\n        else {\r\n            waitMillis = (waitSeconds + Math.random()) * 1000;\r\n        }\r\n        callWithDelay(waitMillis);\r\n    }\r\n    let stopped = false;\r\n    function stop(wasTimeout) {\r\n        if (stopped) {\r\n            return;\r\n        }\r\n        stopped = true;\r\n        clearGlobalTimeout();\r\n        if (triggeredCallback) {\r\n            return;\r\n        }\r\n        if (retryTimeoutId !== null) {\r\n            if (!wasTimeout) {\r\n                cancelState = 2;\r\n            }\r\n            clearTimeout(retryTimeoutId);\r\n            callWithDelay(0);\r\n        }\r\n        else {\r\n            if (!wasTimeout) {\r\n                cancelState = 1;\r\n            }\r\n        }\r\n    }\r\n    callWithDelay(0);\r\n    globalTimeoutId = setTimeout(() => {\r\n        hitTimeout = true;\r\n        stop(true);\r\n    }, timeout);\r\n    return stop;\r\n}\r\n/**\r\n * Stops the retry loop from repeating.\r\n * If the function is currently \"in between\" retries, it is invoked immediately\r\n * with the second parameter as \"true\". Otherwise, it will be invoked once more\r\n * after the current invocation finishes iff the current invocation would have\r\n * triggered another retry.\r\n */\r\nfunction stop(id) {\r\n    id(false);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction isJustDef(p) {\r\n    return p !== void 0;\r\n}\r\n// eslint-disable-next-line @typescript-eslint/ban-types\r\nfunction isFunction(p) {\r\n    return typeof p === 'function';\r\n}\r\nfunction isNonArrayObject(p) {\r\n    return typeof p === 'object' && !Array.isArray(p);\r\n}\r\nfunction isString(p) {\r\n    return typeof p === 'string' || p instanceof String;\r\n}\r\nfunction isNativeBlob(p) {\r\n    return isNativeBlobDefined() && p instanceof Blob;\r\n}\r\nfunction isNativeBlobDefined() {\r\n    return typeof Blob !== 'undefined';\r\n}\r\nfunction validateNumber(argument, minValue, maxValue, value) {\r\n    if (value < minValue) {\r\n        throw invalidArgument(`Invalid value for '${argument}'. Expected ${minValue} or greater.`);\r\n    }\r\n    if (value > maxValue) {\r\n        throw invalidArgument(`Invalid value for '${argument}'. Expected ${maxValue} or less.`);\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction makeUrl(urlPart, host, protocol) {\r\n    let origin = host;\r\n    if (protocol == null) {\r\n        origin = `https://${host}`;\r\n    }\r\n    return `${protocol}://${origin}/v0${urlPart}`;\r\n}\r\nfunction makeQueryString(params) {\r\n    const encode = encodeURIComponent;\r\n    let queryPart = '?';\r\n    for (const key in params) {\r\n        if (params.hasOwnProperty(key)) {\r\n            const nextPart = encode(key) + '=' + encode(params[key]);\r\n            queryPart = queryPart + nextPart + '&';\r\n        }\r\n    }\r\n    // Chop off the extra '&' or '?' on the end\r\n    queryPart = queryPart.slice(0, -1);\r\n    return queryPart;\r\n}\n\n/**\r\n * Error codes for requests made by the XhrIo wrapper.\r\n */\r\nvar ErrorCode;\r\n(function (ErrorCode) {\r\n    ErrorCode[ErrorCode[\"NO_ERROR\"] = 0] = \"NO_ERROR\";\r\n    ErrorCode[ErrorCode[\"NETWORK_ERROR\"] = 1] = \"NETWORK_ERROR\";\r\n    ErrorCode[ErrorCode[\"ABORT\"] = 2] = \"ABORT\";\r\n})(ErrorCode || (ErrorCode = {}));\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Checks the status code to see if the action should be retried.\r\n *\r\n * @param status Current HTTP status code returned by server.\r\n * @param additionalRetryCodes additional retry codes to check against\r\n */\r\nfunction isRetryStatusCode(status, additionalRetryCodes) {\r\n    // The codes for which to retry came from this page:\r\n    // https://cloud.google.com/storage/docs/exponential-backoff\r\n    const isFiveHundredCode = status >= 500 && status < 600;\r\n    const extraRetryCodes = [\r\n        // Request Timeout: web server didn't receive full request in time.\r\n        408,\r\n        // Too Many Requests: you're getting rate-limited, basically.\r\n        429\r\n    ];\r\n    const isExtraRetryCode = extraRetryCodes.indexOf(status) !== -1;\r\n    const isAdditionalRetryCode = additionalRetryCodes.indexOf(status) !== -1;\r\n    return isFiveHundredCode || isExtraRetryCode || isAdditionalRetryCode;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Handles network logic for all Storage Requests, including error reporting and\r\n * retries with backoff.\r\n *\r\n * @param I - the type of the backend's network response.\r\n * @param - O the output type used by the rest of the SDK. The conversion\r\n * happens in the specified `callback_`.\r\n */\r\nclass NetworkRequest {\r\n    constructor(url_, method_, headers_, body_, successCodes_, additionalRetryCodes_, callback_, errorCallback_, timeout_, progressCallback_, connectionFactory_, retry = true) {\r\n        this.url_ = url_;\r\n        this.method_ = method_;\r\n        this.headers_ = headers_;\r\n        this.body_ = body_;\r\n        this.successCodes_ = successCodes_;\r\n        this.additionalRetryCodes_ = additionalRetryCodes_;\r\n        this.callback_ = callback_;\r\n        this.errorCallback_ = errorCallback_;\r\n        this.timeout_ = timeout_;\r\n        this.progressCallback_ = progressCallback_;\r\n        this.connectionFactory_ = connectionFactory_;\r\n        this.retry = retry;\r\n        this.pendingConnection_ = null;\r\n        this.backoffId_ = null;\r\n        this.canceled_ = false;\r\n        this.appDelete_ = false;\r\n        this.promise_ = new Promise((resolve, reject) => {\r\n            this.resolve_ = resolve;\r\n            this.reject_ = reject;\r\n            this.start_();\r\n        });\r\n    }\r\n    /**\r\n     * Actually starts the retry loop.\r\n     */\r\n    start_() {\r\n        const doTheRequest = (backoffCallback, canceled) => {\r\n            if (canceled) {\r\n                backoffCallback(false, new RequestEndStatus(false, null, true));\r\n                return;\r\n            }\r\n            const connection = this.connectionFactory_();\r\n            this.pendingConnection_ = connection;\r\n            const progressListener = progressEvent => {\r\n                const loaded = progressEvent.loaded;\r\n                const total = progressEvent.lengthComputable ? progressEvent.total : -1;\r\n                if (this.progressCallback_ !== null) {\r\n                    this.progressCallback_(loaded, total);\r\n                }\r\n            };\r\n            if (this.progressCallback_ !== null) {\r\n                connection.addUploadProgressListener(progressListener);\r\n            }\r\n            // connection.send() never rejects, so we don't need to have a error handler or use catch on the returned promise.\r\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n            connection\r\n                .send(this.url_, this.method_, this.body_, this.headers_)\r\n                .then(() => {\r\n                if (this.progressCallback_ !== null) {\r\n                    connection.removeUploadProgressListener(progressListener);\r\n                }\r\n                this.pendingConnection_ = null;\r\n                const hitServer = connection.getErrorCode() === ErrorCode.NO_ERROR;\r\n                const status = connection.getStatus();\r\n                if (!hitServer ||\r\n                    (isRetryStatusCode(status, this.additionalRetryCodes_) &&\r\n                        this.retry)) {\r\n                    const wasCanceled = connection.getErrorCode() === ErrorCode.ABORT;\r\n                    backoffCallback(false, new RequestEndStatus(false, null, wasCanceled));\r\n                    return;\r\n                }\r\n                const successCode = this.successCodes_.indexOf(status) !== -1;\r\n                backoffCallback(true, new RequestEndStatus(successCode, connection));\r\n            });\r\n        };\r\n        /**\r\n         * @param requestWentThrough - True if the request eventually went\r\n         *     through, false if it hit the retry limit or was canceled.\r\n         */\r\n        const backoffDone = (requestWentThrough, status) => {\r\n            const resolve = this.resolve_;\r\n            const reject = this.reject_;\r\n            const connection = status.connection;\r\n            if (status.wasSuccessCode) {\r\n                try {\r\n                    const result = this.callback_(connection, connection.getResponse());\r\n                    if (isJustDef(result)) {\r\n                        resolve(result);\r\n                    }\r\n                    else {\r\n                        resolve();\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    reject(e);\r\n                }\r\n            }\r\n            else {\r\n                if (connection !== null) {\r\n                    const err = unknown();\r\n                    err.serverResponse = connection.getErrorText();\r\n                    if (this.errorCallback_) {\r\n                        reject(this.errorCallback_(connection, err));\r\n                    }\r\n                    else {\r\n                        reject(err);\r\n                    }\r\n                }\r\n                else {\r\n                    if (status.canceled) {\r\n                        const err = this.appDelete_ ? appDeleted() : canceled();\r\n                        reject(err);\r\n                    }\r\n                    else {\r\n                        const err = retryLimitExceeded();\r\n                        reject(err);\r\n                    }\r\n                }\r\n            }\r\n        };\r\n        if (this.canceled_) {\r\n            backoffDone(false, new RequestEndStatus(false, null, true));\r\n        }\r\n        else {\r\n            this.backoffId_ = start(doTheRequest, backoffDone, this.timeout_);\r\n        }\r\n    }\r\n    /** @inheritDoc */\r\n    getPromise() {\r\n        return this.promise_;\r\n    }\r\n    /** @inheritDoc */\r\n    cancel(appDelete) {\r\n        this.canceled_ = true;\r\n        this.appDelete_ = appDelete || false;\r\n        if (this.backoffId_ !== null) {\r\n            stop(this.backoffId_);\r\n        }\r\n        if (this.pendingConnection_ !== null) {\r\n            this.pendingConnection_.abort();\r\n        }\r\n    }\r\n}\r\n/**\r\n * A collection of information about the result of a network request.\r\n * @param opt_canceled - Defaults to false.\r\n */\r\nclass RequestEndStatus {\r\n    constructor(wasSuccessCode, connection, canceled) {\r\n        this.wasSuccessCode = wasSuccessCode;\r\n        this.connection = connection;\r\n        this.canceled = !!canceled;\r\n    }\r\n}\r\nfunction addAuthHeader_(headers, authToken) {\r\n    if (authToken !== null && authToken.length > 0) {\r\n        headers['Authorization'] = 'Firebase ' + authToken;\r\n    }\r\n}\r\nfunction addVersionHeader_(headers, firebaseVersion) {\r\n    headers['X-Firebase-Storage-Version'] =\r\n        'webjs/' + (firebaseVersion !== null && firebaseVersion !== void 0 ? firebaseVersion : 'AppManager');\r\n}\r\nfunction addGmpidHeader_(headers, appId) {\r\n    if (appId) {\r\n        headers['X-Firebase-GMPID'] = appId;\r\n    }\r\n}\r\nfunction addAppCheckHeader_(headers, appCheckToken) {\r\n    if (appCheckToken !== null) {\r\n        headers['X-Firebase-AppCheck'] = appCheckToken;\r\n    }\r\n}\r\nfunction makeRequest(requestInfo, appId, authToken, appCheckToken, requestFactory, firebaseVersion, retry = true) {\r\n    const queryPart = makeQueryString(requestInfo.urlParams);\r\n    const url = requestInfo.url + queryPart;\r\n    const headers = Object.assign({}, requestInfo.headers);\r\n    addGmpidHeader_(headers, appId);\r\n    addAuthHeader_(headers, authToken);\r\n    addVersionHeader_(headers, firebaseVersion);\r\n    addAppCheckHeader_(headers, appCheckToken);\r\n    return new NetworkRequest(url, requestInfo.method, headers, requestInfo.body, requestInfo.successCodes, requestInfo.additionalRetryCodes, requestInfo.handler, requestInfo.errorHandler, requestInfo.timeout, requestInfo.progressCallback, requestFactory, retry);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction getBlobBuilder() {\r\n    if (typeof BlobBuilder !== 'undefined') {\r\n        return BlobBuilder;\r\n    }\r\n    else if (typeof WebKitBlobBuilder !== 'undefined') {\r\n        return WebKitBlobBuilder;\r\n    }\r\n    else {\r\n        return undefined;\r\n    }\r\n}\r\n/**\r\n * Concatenates one or more values together and converts them to a Blob.\r\n *\r\n * @param args The values that will make up the resulting blob.\r\n * @return The blob.\r\n */\r\nfunction getBlob$1(...args) {\r\n    const BlobBuilder = getBlobBuilder();\r\n    if (BlobBuilder !== undefined) {\r\n        const bb = new BlobBuilder();\r\n        for (let i = 0; i < args.length; i++) {\r\n            bb.append(args[i]);\r\n        }\r\n        return bb.getBlob();\r\n    }\r\n    else {\r\n        if (isNativeBlobDefined()) {\r\n            return new Blob(args);\r\n        }\r\n        else {\r\n            throw new StorageError(StorageErrorCode.UNSUPPORTED_ENVIRONMENT, \"This browser doesn't seem to support creating Blobs\");\r\n        }\r\n    }\r\n}\r\n/**\r\n * Slices the blob. The returned blob contains data from the start byte\r\n * (inclusive) till the end byte (exclusive). Negative indices cannot be used.\r\n *\r\n * @param blob The blob to be sliced.\r\n * @param start Index of the starting byte.\r\n * @param end Index of the ending byte.\r\n * @return The blob slice or null if not supported.\r\n */\r\nfunction sliceBlob(blob, start, end) {\r\n    if (blob.webkitSlice) {\r\n        return blob.webkitSlice(start, end);\r\n    }\r\n    else if (blob.mozSlice) {\r\n        return blob.mozSlice(start, end);\r\n    }\r\n    else if (blob.slice) {\r\n        return blob.slice(start, end);\r\n    }\r\n    return null;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/** Converts a Base64 encoded string to a binary string. */\r\nfunction decodeBase64(encoded) {\r\n    if (typeof atob === 'undefined') {\r\n        throw missingPolyFill('base-64');\r\n    }\r\n    return atob(encoded);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * An enumeration of the possible string formats for upload.\r\n * @public\r\n */\r\nconst StringFormat = {\r\n    /**\r\n     * Indicates the string should be interpreted \"raw\", that is, as normal text.\r\n     * The string will be interpreted as UTF-16, then uploaded as a UTF-8 byte\r\n     * sequence.\r\n     * Example: The string 'Hello! \\\\ud83d\\\\ude0a' becomes the byte sequence\r\n     * 48 65 6c 6c 6f 21 20 f0 9f 98 8a\r\n     */\r\n    RAW: 'raw',\r\n    /**\r\n     * Indicates the string should be interpreted as base64-encoded data.\r\n     * Padding characters (trailing '='s) are optional.\r\n     * Example: The string 'rWmO++E6t7/rlw==' becomes the byte sequence\r\n     * ad 69 8e fb e1 3a b7 bf eb 97\r\n     */\r\n    BASE64: 'base64',\r\n    /**\r\n     * Indicates the string should be interpreted as base64url-encoded data.\r\n     * Padding characters (trailing '='s) are optional.\r\n     * Example: The string 'rWmO--E6t7_rlw==' becomes the byte sequence\r\n     * ad 69 8e fb e1 3a b7 bf eb 97\r\n     */\r\n    BASE64URL: 'base64url',\r\n    /**\r\n     * Indicates the string is a data URL, such as one obtained from\r\n     * canvas.toDataURL().\r\n     * Example: the string 'data:application/octet-stream;base64,aaaa'\r\n     * becomes the byte sequence\r\n     * 69 a6 9a\r\n     * (the content-type \"application/octet-stream\" is also applied, but can\r\n     * be overridden in the metadata object).\r\n     */\r\n    DATA_URL: 'data_url'\r\n};\r\nclass StringData {\r\n    constructor(data, contentType) {\r\n        this.data = data;\r\n        this.contentType = contentType || null;\r\n    }\r\n}\r\n/**\r\n * @internal\r\n */\r\nfunction dataFromString(format, stringData) {\r\n    switch (format) {\r\n        case StringFormat.RAW:\r\n            return new StringData(utf8Bytes_(stringData));\r\n        case StringFormat.BASE64:\r\n        case StringFormat.BASE64URL:\r\n            return new StringData(base64Bytes_(format, stringData));\r\n        case StringFormat.DATA_URL:\r\n            return new StringData(dataURLBytes_(stringData), dataURLContentType_(stringData));\r\n        // do nothing\r\n    }\r\n    // assert(false);\r\n    throw unknown();\r\n}\r\nfunction utf8Bytes_(value) {\r\n    const b = [];\r\n    for (let i = 0; i < value.length; i++) {\r\n        let c = value.charCodeAt(i);\r\n        if (c <= 127) {\r\n            b.push(c);\r\n        }\r\n        else {\r\n            if (c <= 2047) {\r\n                b.push(192 | (c >> 6), 128 | (c & 63));\r\n            }\r\n            else {\r\n                if ((c & 64512) === 55296) {\r\n                    // The start of a surrogate pair.\r\n                    const valid = i < value.length - 1 && (value.charCodeAt(i + 1) & 64512) === 56320;\r\n                    if (!valid) {\r\n                        // The second surrogate wasn't there.\r\n                        b.push(239, 191, 189);\r\n                    }\r\n                    else {\r\n                        const hi = c;\r\n                        const lo = value.charCodeAt(++i);\r\n                        c = 65536 | ((hi & 1023) << 10) | (lo & 1023);\r\n                        b.push(240 | (c >> 18), 128 | ((c >> 12) & 63), 128 | ((c >> 6) & 63), 128 | (c & 63));\r\n                    }\r\n                }\r\n                else {\r\n                    if ((c & 64512) === 56320) {\r\n                        // Invalid low surrogate.\r\n                        b.push(239, 191, 189);\r\n                    }\r\n                    else {\r\n                        b.push(224 | (c >> 12), 128 | ((c >> 6) & 63), 128 | (c & 63));\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n    return new Uint8Array(b);\r\n}\r\nfunction percentEncodedBytes_(value) {\r\n    let decoded;\r\n    try {\r\n        decoded = decodeURIComponent(value);\r\n    }\r\n    catch (e) {\r\n        throw invalidFormat(StringFormat.DATA_URL, 'Malformed data URL.');\r\n    }\r\n    return utf8Bytes_(decoded);\r\n}\r\nfunction base64Bytes_(format, value) {\r\n    switch (format) {\r\n        case StringFormat.BASE64: {\r\n            const hasMinus = value.indexOf('-') !== -1;\r\n            const hasUnder = value.indexOf('_') !== -1;\r\n            if (hasMinus || hasUnder) {\r\n                const invalidChar = hasMinus ? '-' : '_';\r\n                throw invalidFormat(format, \"Invalid character '\" +\r\n                    invalidChar +\r\n                    \"' found: is it base64url encoded?\");\r\n            }\r\n            break;\r\n        }\r\n        case StringFormat.BASE64URL: {\r\n            const hasPlus = value.indexOf('+') !== -1;\r\n            const hasSlash = value.indexOf('/') !== -1;\r\n            if (hasPlus || hasSlash) {\r\n                const invalidChar = hasPlus ? '+' : '/';\r\n                throw invalidFormat(format, \"Invalid character '\" + invalidChar + \"' found: is it base64 encoded?\");\r\n            }\r\n            value = value.replace(/-/g, '+').replace(/_/g, '/');\r\n            break;\r\n        }\r\n        // do nothing\r\n    }\r\n    let bytes;\r\n    try {\r\n        bytes = decodeBase64(value);\r\n    }\r\n    catch (e) {\r\n        if (e.message.includes('polyfill')) {\r\n            throw e;\r\n        }\r\n        throw invalidFormat(format, 'Invalid character found');\r\n    }\r\n    const array = new Uint8Array(bytes.length);\r\n    for (let i = 0; i < bytes.length; i++) {\r\n        array[i] = bytes.charCodeAt(i);\r\n    }\r\n    return array;\r\n}\r\nclass DataURLParts {\r\n    constructor(dataURL) {\r\n        this.base64 = false;\r\n        this.contentType = null;\r\n        const matches = dataURL.match(/^data:([^,]+)?,/);\r\n        if (matches === null) {\r\n            throw invalidFormat(StringFormat.DATA_URL, \"Must be formatted 'data:[<mediatype>][;base64],<data>\");\r\n        }\r\n        const middle = matches[1] || null;\r\n        if (middle != null) {\r\n            this.base64 = endsWith(middle, ';base64');\r\n            this.contentType = this.base64\r\n                ? middle.substring(0, middle.length - ';base64'.length)\r\n                : middle;\r\n        }\r\n        this.rest = dataURL.substring(dataURL.indexOf(',') + 1);\r\n    }\r\n}\r\nfunction dataURLBytes_(dataUrl) {\r\n    const parts = new DataURLParts(dataUrl);\r\n    if (parts.base64) {\r\n        return base64Bytes_(StringFormat.BASE64, parts.rest);\r\n    }\r\n    else {\r\n        return percentEncodedBytes_(parts.rest);\r\n    }\r\n}\r\nfunction dataURLContentType_(dataUrl) {\r\n    const parts = new DataURLParts(dataUrl);\r\n    return parts.contentType;\r\n}\r\nfunction endsWith(s, end) {\r\n    const longEnough = s.length >= end.length;\r\n    if (!longEnough) {\r\n        return false;\r\n    }\r\n    return s.substring(s.length - end.length) === end;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @param opt_elideCopy - If true, doesn't copy mutable input data\r\n *     (e.g. Uint8Arrays). Pass true only if you know the objects will not be\r\n *     modified after this blob's construction.\r\n *\r\n * @internal\r\n */\r\nclass FbsBlob {\r\n    constructor(data, elideCopy) {\r\n        let size = 0;\r\n        let blobType = '';\r\n        if (isNativeBlob(data)) {\r\n            this.data_ = data;\r\n            size = data.size;\r\n            blobType = data.type;\r\n        }\r\n        else if (data instanceof ArrayBuffer) {\r\n            if (elideCopy) {\r\n                this.data_ = new Uint8Array(data);\r\n            }\r\n            else {\r\n                this.data_ = new Uint8Array(data.byteLength);\r\n                this.data_.set(new Uint8Array(data));\r\n            }\r\n            size = this.data_.length;\r\n        }\r\n        else if (data instanceof Uint8Array) {\r\n            if (elideCopy) {\r\n                this.data_ = data;\r\n            }\r\n            else {\r\n                this.data_ = new Uint8Array(data.length);\r\n                this.data_.set(data);\r\n            }\r\n            size = data.length;\r\n        }\r\n        this.size_ = size;\r\n        this.type_ = blobType;\r\n    }\r\n    size() {\r\n        return this.size_;\r\n    }\r\n    type() {\r\n        return this.type_;\r\n    }\r\n    slice(startByte, endByte) {\r\n        if (isNativeBlob(this.data_)) {\r\n            const realBlob = this.data_;\r\n            const sliced = sliceBlob(realBlob, startByte, endByte);\r\n            if (sliced === null) {\r\n                return null;\r\n            }\r\n            return new FbsBlob(sliced);\r\n        }\r\n        else {\r\n            const slice = new Uint8Array(this.data_.buffer, startByte, endByte - startByte);\r\n            return new FbsBlob(slice, true);\r\n        }\r\n    }\r\n    static getBlob(...args) {\r\n        if (isNativeBlobDefined()) {\r\n            const blobby = args.map((val) => {\r\n                if (val instanceof FbsBlob) {\r\n                    return val.data_;\r\n                }\r\n                else {\r\n                    return val;\r\n                }\r\n            });\r\n            return new FbsBlob(getBlob$1.apply(null, blobby));\r\n        }\r\n        else {\r\n            const uint8Arrays = args.map((val) => {\r\n                if (isString(val)) {\r\n                    return dataFromString(StringFormat.RAW, val).data;\r\n                }\r\n                else {\r\n                    // Blobs don't exist, so this has to be a Uint8Array.\r\n                    return val.data_;\r\n                }\r\n            });\r\n            let finalLength = 0;\r\n            uint8Arrays.forEach((array) => {\r\n                finalLength += array.byteLength;\r\n            });\r\n            const merged = new Uint8Array(finalLength);\r\n            let index = 0;\r\n            uint8Arrays.forEach((array) => {\r\n                for (let i = 0; i < array.length; i++) {\r\n                    merged[index++] = array[i];\r\n                }\r\n            });\r\n            return new FbsBlob(merged, true);\r\n        }\r\n    }\r\n    uploadData() {\r\n        return this.data_;\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Returns the Object resulting from parsing the given JSON, or null if the\r\n * given string does not represent a JSON object.\r\n */\r\nfunction jsonObjectOrNull(s) {\r\n    let obj;\r\n    try {\r\n        obj = JSON.parse(s);\r\n    }\r\n    catch (e) {\r\n        return null;\r\n    }\r\n    if (isNonArrayObject(obj)) {\r\n        return obj;\r\n    }\r\n    else {\r\n        return null;\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @fileoverview Contains helper methods for manipulating paths.\r\n */\r\n/**\r\n * @return Null if the path is already at the root.\r\n */\r\nfunction parent(path) {\r\n    if (path.length === 0) {\r\n        return null;\r\n    }\r\n    const index = path.lastIndexOf('/');\r\n    if (index === -1) {\r\n        return '';\r\n    }\r\n    const newPath = path.slice(0, index);\r\n    return newPath;\r\n}\r\nfunction child(path, childPath) {\r\n    const canonicalChildPath = childPath\r\n        .split('/')\r\n        .filter(component => component.length > 0)\r\n        .join('/');\r\n    if (path.length === 0) {\r\n        return canonicalChildPath;\r\n    }\r\n    else {\r\n        return path + '/' + canonicalChildPath;\r\n    }\r\n}\r\n/**\r\n * Returns the last component of a path.\r\n * '/foo/bar' -> 'bar'\r\n * '/foo/bar/baz/' -> 'baz/'\r\n * '/a' -> 'a'\r\n */\r\nfunction lastComponent(path) {\r\n    const index = path.lastIndexOf('/', path.length - 2);\r\n    if (index === -1) {\r\n        return path;\r\n    }\r\n    else {\r\n        return path.slice(index + 1);\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction noXform_(metadata, value) {\r\n    return value;\r\n}\r\nclass Mapping {\r\n    constructor(server, local, writable, xform) {\r\n        this.server = server;\r\n        this.local = local || server;\r\n        this.writable = !!writable;\r\n        this.xform = xform || noXform_;\r\n    }\r\n}\r\nlet mappings_ = null;\r\nfunction xformPath(fullPath) {\r\n    if (!isString(fullPath) || fullPath.length < 2) {\r\n        return fullPath;\r\n    }\r\n    else {\r\n        return lastComponent(fullPath);\r\n    }\r\n}\r\nfunction getMappings() {\r\n    if (mappings_) {\r\n        return mappings_;\r\n    }\r\n    const mappings = [];\r\n    mappings.push(new Mapping('bucket'));\r\n    mappings.push(new Mapping('generation'));\r\n    mappings.push(new Mapping('metageneration'));\r\n    mappings.push(new Mapping('name', 'fullPath', true));\r\n    function mappingsXformPath(_metadata, fullPath) {\r\n        return xformPath(fullPath);\r\n    }\r\n    const nameMapping = new Mapping('name');\r\n    nameMapping.xform = mappingsXformPath;\r\n    mappings.push(nameMapping);\r\n    /**\r\n     * Coerces the second param to a number, if it is defined.\r\n     */\r\n    function xformSize(_metadata, size) {\r\n        if (size !== undefined) {\r\n            return Number(size);\r\n        }\r\n        else {\r\n            return size;\r\n        }\r\n    }\r\n    const sizeMapping = new Mapping('size');\r\n    sizeMapping.xform = xformSize;\r\n    mappings.push(sizeMapping);\r\n    mappings.push(new Mapping('timeCreated'));\r\n    mappings.push(new Mapping('updated'));\r\n    mappings.push(new Mapping('md5Hash', null, true));\r\n    mappings.push(new Mapping('cacheControl', null, true));\r\n    mappings.push(new Mapping('contentDisposition', null, true));\r\n    mappings.push(new Mapping('contentEncoding', null, true));\r\n    mappings.push(new Mapping('contentLanguage', null, true));\r\n    mappings.push(new Mapping('contentType', null, true));\r\n    mappings.push(new Mapping('metadata', 'customMetadata', true));\r\n    mappings_ = mappings;\r\n    return mappings_;\r\n}\r\nfunction addRef(metadata, service) {\r\n    function generateRef() {\r\n        const bucket = metadata['bucket'];\r\n        const path = metadata['fullPath'];\r\n        const loc = new Location(bucket, path);\r\n        return service._makeStorageReference(loc);\r\n    }\r\n    Object.defineProperty(metadata, 'ref', { get: generateRef });\r\n}\r\nfunction fromResource(service, resource, mappings) {\r\n    const metadata = {};\r\n    metadata['type'] = 'file';\r\n    const len = mappings.length;\r\n    for (let i = 0; i < len; i++) {\r\n        const mapping = mappings[i];\r\n        metadata[mapping.local] = mapping.xform(metadata, resource[mapping.server]);\r\n    }\r\n    addRef(metadata, service);\r\n    return metadata;\r\n}\r\nfunction fromResourceString(service, resourceString, mappings) {\r\n    const obj = jsonObjectOrNull(resourceString);\r\n    if (obj === null) {\r\n        return null;\r\n    }\r\n    const resource = obj;\r\n    return fromResource(service, resource, mappings);\r\n}\r\nfunction downloadUrlFromResourceString(metadata, resourceString, host, protocol) {\r\n    const obj = jsonObjectOrNull(resourceString);\r\n    if (obj === null) {\r\n        return null;\r\n    }\r\n    if (!isString(obj['downloadTokens'])) {\r\n        // This can happen if objects are uploaded through GCS and retrieved\r\n        // through list, so we don't want to throw an Error.\r\n        return null;\r\n    }\r\n    const tokens = obj['downloadTokens'];\r\n    if (tokens.length === 0) {\r\n        return null;\r\n    }\r\n    const encode = encodeURIComponent;\r\n    const tokensList = tokens.split(',');\r\n    const urls = tokensList.map((token) => {\r\n        const bucket = metadata['bucket'];\r\n        const path = metadata['fullPath'];\r\n        const urlPart = '/b/' + encode(bucket) + '/o/' + encode(path);\r\n        const base = makeUrl(urlPart, host, protocol);\r\n        const queryString = makeQueryString({\r\n            alt: 'media',\r\n            token\r\n        });\r\n        return base + queryString;\r\n    });\r\n    return urls[0];\r\n}\r\nfunction toResourceString(metadata, mappings) {\r\n    const resource = {};\r\n    const len = mappings.length;\r\n    for (let i = 0; i < len; i++) {\r\n        const mapping = mappings[i];\r\n        if (mapping.writable) {\r\n            resource[mapping.server] = metadata[mapping.local];\r\n        }\r\n    }\r\n    return JSON.stringify(resource);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst PREFIXES_KEY = 'prefixes';\r\nconst ITEMS_KEY = 'items';\r\nfunction fromBackendResponse(service, bucket, resource) {\r\n    const listResult = {\r\n        prefixes: [],\r\n        items: [],\r\n        nextPageToken: resource['nextPageToken']\r\n    };\r\n    if (resource[PREFIXES_KEY]) {\r\n        for (const path of resource[PREFIXES_KEY]) {\r\n            const pathWithoutTrailingSlash = path.replace(/\\/$/, '');\r\n            const reference = service._makeStorageReference(new Location(bucket, pathWithoutTrailingSlash));\r\n            listResult.prefixes.push(reference);\r\n        }\r\n    }\r\n    if (resource[ITEMS_KEY]) {\r\n        for (const item of resource[ITEMS_KEY]) {\r\n            const reference = service._makeStorageReference(new Location(bucket, item['name']));\r\n            listResult.items.push(reference);\r\n        }\r\n    }\r\n    return listResult;\r\n}\r\nfunction fromResponseString(service, bucket, resourceString) {\r\n    const obj = jsonObjectOrNull(resourceString);\r\n    if (obj === null) {\r\n        return null;\r\n    }\r\n    const resource = obj;\r\n    return fromBackendResponse(service, bucket, resource);\r\n}\n\n/**\r\n * Contains a fully specified request.\r\n *\r\n * @param I - the type of the backend's network response.\r\n * @param O - the output response type used by the rest of the SDK.\r\n */\r\nclass RequestInfo {\r\n    constructor(url, method, \r\n    /**\r\n     * Returns the value with which to resolve the request's promise. Only called\r\n     * if the request is successful. Throw from this function to reject the\r\n     * returned Request's promise with the thrown error.\r\n     * Note: The XhrIo passed to this function may be reused after this callback\r\n     * returns. Do not keep a reference to it in any way.\r\n     */\r\n    handler, timeout) {\r\n        this.url = url;\r\n        this.method = method;\r\n        this.handler = handler;\r\n        this.timeout = timeout;\r\n        this.urlParams = {};\r\n        this.headers = {};\r\n        this.body = null;\r\n        this.errorHandler = null;\r\n        /**\r\n         * Called with the current number of bytes uploaded and total size (-1 if not\r\n         * computable) of the request body (i.e. used to report upload progress).\r\n         */\r\n        this.progressCallback = null;\r\n        this.successCodes = [200];\r\n        this.additionalRetryCodes = [];\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Throws the UNKNOWN StorageError if cndn is false.\r\n */\r\nfunction handlerCheck(cndn) {\r\n    if (!cndn) {\r\n        throw unknown();\r\n    }\r\n}\r\nfunction metadataHandler(service, mappings) {\r\n    function handler(xhr, text) {\r\n        const metadata = fromResourceString(service, text, mappings);\r\n        handlerCheck(metadata !== null);\r\n        return metadata;\r\n    }\r\n    return handler;\r\n}\r\nfunction listHandler(service, bucket) {\r\n    function handler(xhr, text) {\r\n        const listResult = fromResponseString(service, bucket, text);\r\n        handlerCheck(listResult !== null);\r\n        return listResult;\r\n    }\r\n    return handler;\r\n}\r\nfunction downloadUrlHandler(service, mappings) {\r\n    function handler(xhr, text) {\r\n        const metadata = fromResourceString(service, text, mappings);\r\n        handlerCheck(metadata !== null);\r\n        return downloadUrlFromResourceString(metadata, text, service.host, service._protocol);\r\n    }\r\n    return handler;\r\n}\r\nfunction sharedErrorHandler(location) {\r\n    function errorHandler(xhr, err) {\r\n        let newErr;\r\n        if (xhr.getStatus() === 401) {\r\n            if (\r\n            // This exact message string is the only consistent part of the\r\n            // server's error response that identifies it as an App Check error.\r\n            xhr.getErrorText().includes('Firebase App Check token is invalid')) {\r\n                newErr = unauthorizedApp();\r\n            }\r\n            else {\r\n                newErr = unauthenticated();\r\n            }\r\n        }\r\n        else {\r\n            if (xhr.getStatus() === 402) {\r\n                newErr = quotaExceeded(location.bucket);\r\n            }\r\n            else {\r\n                if (xhr.getStatus() === 403) {\r\n                    newErr = unauthorized(location.path);\r\n                }\r\n                else {\r\n                    newErr = err;\r\n                }\r\n            }\r\n        }\r\n        newErr.status = xhr.getStatus();\r\n        newErr.serverResponse = err.serverResponse;\r\n        return newErr;\r\n    }\r\n    return errorHandler;\r\n}\r\nfunction objectErrorHandler(location) {\r\n    const shared = sharedErrorHandler(location);\r\n    function errorHandler(xhr, err) {\r\n        let newErr = shared(xhr, err);\r\n        if (xhr.getStatus() === 404) {\r\n            newErr = objectNotFound(location.path);\r\n        }\r\n        newErr.serverResponse = err.serverResponse;\r\n        return newErr;\r\n    }\r\n    return errorHandler;\r\n}\r\nfunction getMetadata$2(service, location, mappings) {\r\n    const urlPart = location.fullServerUrl();\r\n    const url = makeUrl(urlPart, service.host, service._protocol);\r\n    const method = 'GET';\r\n    const timeout = service.maxOperationRetryTime;\r\n    const requestInfo = new RequestInfo(url, method, metadataHandler(service, mappings), timeout);\r\n    requestInfo.errorHandler = objectErrorHandler(location);\r\n    return requestInfo;\r\n}\r\nfunction list$2(service, location, delimiter, pageToken, maxResults) {\r\n    const urlParams = {};\r\n    if (location.isRoot) {\r\n        urlParams['prefix'] = '';\r\n    }\r\n    else {\r\n        urlParams['prefix'] = location.path + '/';\r\n    }\r\n    if (delimiter && delimiter.length > 0) {\r\n        urlParams['delimiter'] = delimiter;\r\n    }\r\n    if (pageToken) {\r\n        urlParams['pageToken'] = pageToken;\r\n    }\r\n    if (maxResults) {\r\n        urlParams['maxResults'] = maxResults;\r\n    }\r\n    const urlPart = location.bucketOnlyServerUrl();\r\n    const url = makeUrl(urlPart, service.host, service._protocol);\r\n    const method = 'GET';\r\n    const timeout = service.maxOperationRetryTime;\r\n    const requestInfo = new RequestInfo(url, method, listHandler(service, location.bucket), timeout);\r\n    requestInfo.urlParams = urlParams;\r\n    requestInfo.errorHandler = sharedErrorHandler(location);\r\n    return requestInfo;\r\n}\r\nfunction getBytes$1(service, location, maxDownloadSizeBytes) {\r\n    const urlPart = location.fullServerUrl();\r\n    const url = makeUrl(urlPart, service.host, service._protocol) + '?alt=media';\r\n    const method = 'GET';\r\n    const timeout = service.maxOperationRetryTime;\r\n    const requestInfo = new RequestInfo(url, method, (_, data) => data, timeout);\r\n    requestInfo.errorHandler = objectErrorHandler(location);\r\n    if (maxDownloadSizeBytes !== undefined) {\r\n        requestInfo.headers['Range'] = `bytes=0-${maxDownloadSizeBytes}`;\r\n        requestInfo.successCodes = [200 /* OK */, 206 /* Partial Content */];\r\n    }\r\n    return requestInfo;\r\n}\r\nfunction getDownloadUrl(service, location, mappings) {\r\n    const urlPart = location.fullServerUrl();\r\n    const url = makeUrl(urlPart, service.host, service._protocol);\r\n    const method = 'GET';\r\n    const timeout = service.maxOperationRetryTime;\r\n    const requestInfo = new RequestInfo(url, method, downloadUrlHandler(service, mappings), timeout);\r\n    requestInfo.errorHandler = objectErrorHandler(location);\r\n    return requestInfo;\r\n}\r\nfunction updateMetadata$2(service, location, metadata, mappings) {\r\n    const urlPart = location.fullServerUrl();\r\n    const url = makeUrl(urlPart, service.host, service._protocol);\r\n    const method = 'PATCH';\r\n    const body = toResourceString(metadata, mappings);\r\n    const headers = { 'Content-Type': 'application/json; charset=utf-8' };\r\n    const timeout = service.maxOperationRetryTime;\r\n    const requestInfo = new RequestInfo(url, method, metadataHandler(service, mappings), timeout);\r\n    requestInfo.headers = headers;\r\n    requestInfo.body = body;\r\n    requestInfo.errorHandler = objectErrorHandler(location);\r\n    return requestInfo;\r\n}\r\nfunction deleteObject$2(service, location) {\r\n    const urlPart = location.fullServerUrl();\r\n    const url = makeUrl(urlPart, service.host, service._protocol);\r\n    const method = 'DELETE';\r\n    const timeout = service.maxOperationRetryTime;\r\n    function handler(_xhr, _text) { }\r\n    const requestInfo = new RequestInfo(url, method, handler, timeout);\r\n    requestInfo.successCodes = [200, 204];\r\n    requestInfo.errorHandler = objectErrorHandler(location);\r\n    return requestInfo;\r\n}\r\nfunction determineContentType_(metadata, blob) {\r\n    return ((metadata && metadata['contentType']) ||\r\n        (blob && blob.type()) ||\r\n        'application/octet-stream');\r\n}\r\nfunction metadataForUpload_(location, blob, metadata) {\r\n    const metadataClone = Object.assign({}, metadata);\r\n    metadataClone['fullPath'] = location.path;\r\n    metadataClone['size'] = blob.size();\r\n    if (!metadataClone['contentType']) {\r\n        metadataClone['contentType'] = determineContentType_(null, blob);\r\n    }\r\n    return metadataClone;\r\n}\r\n/**\r\n * Prepare RequestInfo for uploads as Content-Type: multipart.\r\n */\r\nfunction multipartUpload(service, location, mappings, blob, metadata) {\r\n    const urlPart = location.bucketOnlyServerUrl();\r\n    const headers = {\r\n        'X-Goog-Upload-Protocol': 'multipart'\r\n    };\r\n    function genBoundary() {\r\n        let str = '';\r\n        for (let i = 0; i < 2; i++) {\r\n            str = str + Math.random().toString().slice(2);\r\n        }\r\n        return str;\r\n    }\r\n    const boundary = genBoundary();\r\n    headers['Content-Type'] = 'multipart/related; boundary=' + boundary;\r\n    const metadata_ = metadataForUpload_(location, blob, metadata);\r\n    const metadataString = toResourceString(metadata_, mappings);\r\n    const preBlobPart = '--' +\r\n        boundary +\r\n        '\\r\\n' +\r\n        'Content-Type: application/json; charset=utf-8\\r\\n\\r\\n' +\r\n        metadataString +\r\n        '\\r\\n--' +\r\n        boundary +\r\n        '\\r\\n' +\r\n        'Content-Type: ' +\r\n        metadata_['contentType'] +\r\n        '\\r\\n\\r\\n';\r\n    const postBlobPart = '\\r\\n--' + boundary + '--';\r\n    const body = FbsBlob.getBlob(preBlobPart, blob, postBlobPart);\r\n    if (body === null) {\r\n        throw cannotSliceBlob();\r\n    }\r\n    const urlParams = { name: metadata_['fullPath'] };\r\n    const url = makeUrl(urlPart, service.host, service._protocol);\r\n    const method = 'POST';\r\n    const timeout = service.maxUploadRetryTime;\r\n    const requestInfo = new RequestInfo(url, method, metadataHandler(service, mappings), timeout);\r\n    requestInfo.urlParams = urlParams;\r\n    requestInfo.headers = headers;\r\n    requestInfo.body = body.uploadData();\r\n    requestInfo.errorHandler = sharedErrorHandler(location);\r\n    return requestInfo;\r\n}\r\n/**\r\n * @param current The number of bytes that have been uploaded so far.\r\n * @param total The total number of bytes in the upload.\r\n * @param opt_finalized True if the server has finished the upload.\r\n * @param opt_metadata The upload metadata, should\r\n *     only be passed if opt_finalized is true.\r\n */\r\nclass ResumableUploadStatus {\r\n    constructor(current, total, finalized, metadata) {\r\n        this.current = current;\r\n        this.total = total;\r\n        this.finalized = !!finalized;\r\n        this.metadata = metadata || null;\r\n    }\r\n}\r\nfunction checkResumeHeader_(xhr, allowed) {\r\n    let status = null;\r\n    try {\r\n        status = xhr.getResponseHeader('X-Goog-Upload-Status');\r\n    }\r\n    catch (e) {\r\n        handlerCheck(false);\r\n    }\r\n    const allowedStatus = allowed || ['active'];\r\n    handlerCheck(!!status && allowedStatus.indexOf(status) !== -1);\r\n    return status;\r\n}\r\nfunction createResumableUpload(service, location, mappings, blob, metadata) {\r\n    const urlPart = location.bucketOnlyServerUrl();\r\n    const metadataForUpload = metadataForUpload_(location, blob, metadata);\r\n    const urlParams = { name: metadataForUpload['fullPath'] };\r\n    const url = makeUrl(urlPart, service.host, service._protocol);\r\n    const method = 'POST';\r\n    const headers = {\r\n        'X-Goog-Upload-Protocol': 'resumable',\r\n        'X-Goog-Upload-Command': 'start',\r\n        'X-Goog-Upload-Header-Content-Length': `${blob.size()}`,\r\n        'X-Goog-Upload-Header-Content-Type': metadataForUpload['contentType'],\r\n        'Content-Type': 'application/json; charset=utf-8'\r\n    };\r\n    const body = toResourceString(metadataForUpload, mappings);\r\n    const timeout = service.maxUploadRetryTime;\r\n    function handler(xhr) {\r\n        checkResumeHeader_(xhr);\r\n        let url;\r\n        try {\r\n            url = xhr.getResponseHeader('X-Goog-Upload-URL');\r\n        }\r\n        catch (e) {\r\n            handlerCheck(false);\r\n        }\r\n        handlerCheck(isString(url));\r\n        return url;\r\n    }\r\n    const requestInfo = new RequestInfo(url, method, handler, timeout);\r\n    requestInfo.urlParams = urlParams;\r\n    requestInfo.headers = headers;\r\n    requestInfo.body = body;\r\n    requestInfo.errorHandler = sharedErrorHandler(location);\r\n    return requestInfo;\r\n}\r\n/**\r\n * @param url From a call to fbs.requests.createResumableUpload.\r\n */\r\nfunction getResumableUploadStatus(service, location, url, blob) {\r\n    const headers = { 'X-Goog-Upload-Command': 'query' };\r\n    function handler(xhr) {\r\n        const status = checkResumeHeader_(xhr, ['active', 'final']);\r\n        let sizeString = null;\r\n        try {\r\n            sizeString = xhr.getResponseHeader('X-Goog-Upload-Size-Received');\r\n        }\r\n        catch (e) {\r\n            handlerCheck(false);\r\n        }\r\n        if (!sizeString) {\r\n            // null or empty string\r\n            handlerCheck(false);\r\n        }\r\n        const size = Number(sizeString);\r\n        handlerCheck(!isNaN(size));\r\n        return new ResumableUploadStatus(size, blob.size(), status === 'final');\r\n    }\r\n    const method = 'POST';\r\n    const timeout = service.maxUploadRetryTime;\r\n    const requestInfo = new RequestInfo(url, method, handler, timeout);\r\n    requestInfo.headers = headers;\r\n    requestInfo.errorHandler = sharedErrorHandler(location);\r\n    return requestInfo;\r\n}\r\n/**\r\n * Any uploads via the resumable upload API must transfer a number of bytes\r\n * that is a multiple of this number.\r\n */\r\nconst RESUMABLE_UPLOAD_CHUNK_SIZE = 256 * 1024;\r\n/**\r\n * @param url From a call to fbs.requests.createResumableUpload.\r\n * @param chunkSize Number of bytes to upload.\r\n * @param status The previous status.\r\n *     If not passed or null, we start from the beginning.\r\n * @throws fbs.Error If the upload is already complete, the passed in status\r\n *     has a final size inconsistent with the blob, or the blob cannot be sliced\r\n *     for upload.\r\n */\r\nfunction continueResumableUpload(location, service, url, blob, chunkSize, mappings, status, progressCallback) {\r\n    // TODO(andysoto): standardize on internal asserts\r\n    // assert(!(opt_status && opt_status.finalized));\r\n    const status_ = new ResumableUploadStatus(0, 0);\r\n    if (status) {\r\n        status_.current = status.current;\r\n        status_.total = status.total;\r\n    }\r\n    else {\r\n        status_.current = 0;\r\n        status_.total = blob.size();\r\n    }\r\n    if (blob.size() !== status_.total) {\r\n        throw serverFileWrongSize();\r\n    }\r\n    const bytesLeft = status_.total - status_.current;\r\n    let bytesToUpload = bytesLeft;\r\n    if (chunkSize > 0) {\r\n        bytesToUpload = Math.min(bytesToUpload, chunkSize);\r\n    }\r\n    const startByte = status_.current;\r\n    const endByte = startByte + bytesToUpload;\r\n    let uploadCommand = '';\r\n    if (bytesToUpload === 0) {\r\n        uploadCommand = 'finalize';\r\n    }\r\n    else if (bytesLeft === bytesToUpload) {\r\n        uploadCommand = 'upload, finalize';\r\n    }\r\n    else {\r\n        uploadCommand = 'upload';\r\n    }\r\n    const headers = {\r\n        'X-Goog-Upload-Command': uploadCommand,\r\n        'X-Goog-Upload-Offset': `${status_.current}`\r\n    };\r\n    const body = blob.slice(startByte, endByte);\r\n    if (body === null) {\r\n        throw cannotSliceBlob();\r\n    }\r\n    function handler(xhr, text) {\r\n        // TODO(andysoto): Verify the MD5 of each uploaded range:\r\n        // the 'x-range-md5' header comes back with status code 308 responses.\r\n        // We'll only be able to bail out though, because you can't re-upload a\r\n        // range that you previously uploaded.\r\n        const uploadStatus = checkResumeHeader_(xhr, ['active', 'final']);\r\n        const newCurrent = status_.current + bytesToUpload;\r\n        const size = blob.size();\r\n        let metadata;\r\n        if (uploadStatus === 'final') {\r\n            metadata = metadataHandler(service, mappings)(xhr, text);\r\n        }\r\n        else {\r\n            metadata = null;\r\n        }\r\n        return new ResumableUploadStatus(newCurrent, size, uploadStatus === 'final', metadata);\r\n    }\r\n    const method = 'POST';\r\n    const timeout = service.maxUploadRetryTime;\r\n    const requestInfo = new RequestInfo(url, method, handler, timeout);\r\n    requestInfo.headers = headers;\r\n    requestInfo.body = body.uploadData();\r\n    requestInfo.progressCallback = progressCallback || null;\r\n    requestInfo.errorHandler = sharedErrorHandler(location);\r\n    return requestInfo;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * An event that is triggered on a task.\r\n * @internal\r\n */\r\nconst TaskEvent = {\r\n    /**\r\n     * For this event,\r\n     * <ul>\r\n     *   <li>The `next` function is triggered on progress updates and when the\r\n     *       task is paused/resumed with an `UploadTaskSnapshot` as the first\r\n     *       argument.</li>\r\n     *   <li>The `error` function is triggered if the upload is canceled or fails\r\n     *       for another reason.</li>\r\n     *   <li>The `complete` function is triggered if the upload completes\r\n     *       successfully.</li>\r\n     * </ul>\r\n     */\r\n    STATE_CHANGED: 'state_changed'\r\n};\r\n// type keys = keyof TaskState\r\n/**\r\n * Represents the current state of a running upload.\r\n * @internal\r\n */\r\nconst TaskState = {\r\n    /** The task is currently transferring data. */\r\n    RUNNING: 'running',\r\n    /** The task was paused by the user. */\r\n    PAUSED: 'paused',\r\n    /** The task completed successfully. */\r\n    SUCCESS: 'success',\r\n    /** The task was canceled. */\r\n    CANCELED: 'canceled',\r\n    /** The task failed with an error. */\r\n    ERROR: 'error'\r\n};\r\nfunction taskStateFromInternalTaskState(state) {\r\n    switch (state) {\r\n        case \"running\" /* InternalTaskState.RUNNING */:\r\n        case \"pausing\" /* InternalTaskState.PAUSING */:\r\n        case \"canceling\" /* InternalTaskState.CANCELING */:\r\n            return TaskState.RUNNING;\r\n        case \"paused\" /* InternalTaskState.PAUSED */:\r\n            return TaskState.PAUSED;\r\n        case \"success\" /* InternalTaskState.SUCCESS */:\r\n            return TaskState.SUCCESS;\r\n        case \"canceled\" /* InternalTaskState.CANCELED */:\r\n            return TaskState.CANCELED;\r\n        case \"error\" /* InternalTaskState.ERROR */:\r\n            return TaskState.ERROR;\r\n        default:\r\n            // TODO(andysoto): assert(false);\r\n            return TaskState.ERROR;\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass Observer {\r\n    constructor(nextOrObserver, error, complete) {\r\n        const asFunctions = isFunction(nextOrObserver) || error != null || complete != null;\r\n        if (asFunctions) {\r\n            this.next = nextOrObserver;\r\n            this.error = error !== null && error !== void 0 ? error : undefined;\r\n            this.complete = complete !== null && complete !== void 0 ? complete : undefined;\r\n        }\r\n        else {\r\n            const observer = nextOrObserver;\r\n            this.next = observer.next;\r\n            this.error = observer.error;\r\n            this.complete = observer.complete;\r\n        }\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Returns a function that invokes f with its arguments asynchronously as a\r\n * microtask, i.e. as soon as possible after the current script returns back\r\n * into browser code.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/ban-types\r\nfunction async(f) {\r\n    return (...argsToForward) => {\r\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n        Promise.resolve().then(() => f(...argsToForward));\r\n    };\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/** An override for the text-based Connection. Used in tests. */\r\nlet textFactoryOverride = null;\r\n/**\r\n * Network layer for browsers. We use this instead of goog.net.XhrIo because\r\n * goog.net.XhrIo is hyuuuuge and doesn't work in React Native on Android.\r\n */\r\nclass XhrConnection {\r\n    constructor() {\r\n        this.sent_ = false;\r\n        this.xhr_ = new XMLHttpRequest();\r\n        this.initXhr();\r\n        this.errorCode_ = ErrorCode.NO_ERROR;\r\n        this.sendPromise_ = new Promise(resolve => {\r\n            this.xhr_.addEventListener('abort', () => {\r\n                this.errorCode_ = ErrorCode.ABORT;\r\n                resolve();\r\n            });\r\n            this.xhr_.addEventListener('error', () => {\r\n                this.errorCode_ = ErrorCode.NETWORK_ERROR;\r\n                resolve();\r\n            });\r\n            this.xhr_.addEventListener('load', () => {\r\n                resolve();\r\n            });\r\n        });\r\n    }\r\n    send(url, method, body, headers) {\r\n        if (this.sent_) {\r\n            throw internalError('cannot .send() more than once');\r\n        }\r\n        this.sent_ = true;\r\n        this.xhr_.open(method, url, true);\r\n        if (headers !== undefined) {\r\n            for (const key in headers) {\r\n                if (headers.hasOwnProperty(key)) {\r\n                    this.xhr_.setRequestHeader(key, headers[key].toString());\r\n                }\r\n            }\r\n        }\r\n        if (body !== undefined) {\r\n            this.xhr_.send(body);\r\n        }\r\n        else {\r\n            this.xhr_.send();\r\n        }\r\n        return this.sendPromise_;\r\n    }\r\n    getErrorCode() {\r\n        if (!this.sent_) {\r\n            throw internalError('cannot .getErrorCode() before sending');\r\n        }\r\n        return this.errorCode_;\r\n    }\r\n    getStatus() {\r\n        if (!this.sent_) {\r\n            throw internalError('cannot .getStatus() before sending');\r\n        }\r\n        try {\r\n            return this.xhr_.status;\r\n        }\r\n        catch (e) {\r\n            return -1;\r\n        }\r\n    }\r\n    getResponse() {\r\n        if (!this.sent_) {\r\n            throw internalError('cannot .getResponse() before sending');\r\n        }\r\n        return this.xhr_.response;\r\n    }\r\n    getErrorText() {\r\n        if (!this.sent_) {\r\n            throw internalError('cannot .getErrorText() before sending');\r\n        }\r\n        return this.xhr_.statusText;\r\n    }\r\n    /** Aborts the request. */\r\n    abort() {\r\n        this.xhr_.abort();\r\n    }\r\n    getResponseHeader(header) {\r\n        return this.xhr_.getResponseHeader(header);\r\n    }\r\n    addUploadProgressListener(listener) {\r\n        if (this.xhr_.upload != null) {\r\n            this.xhr_.upload.addEventListener('progress', listener);\r\n        }\r\n    }\r\n    removeUploadProgressListener(listener) {\r\n        if (this.xhr_.upload != null) {\r\n            this.xhr_.upload.removeEventListener('progress', listener);\r\n        }\r\n    }\r\n}\r\nclass XhrTextConnection extends XhrConnection {\r\n    initXhr() {\r\n        this.xhr_.responseType = 'text';\r\n    }\r\n}\r\nfunction newTextConnection() {\r\n    return textFactoryOverride ? textFactoryOverride() : new XhrTextConnection();\r\n}\r\nclass XhrBytesConnection extends XhrConnection {\r\n    initXhr() {\r\n        this.xhr_.responseType = 'arraybuffer';\r\n    }\r\n}\r\nfunction newBytesConnection() {\r\n    return new XhrBytesConnection();\r\n}\r\nclass XhrBlobConnection extends XhrConnection {\r\n    initXhr() {\r\n        this.xhr_.responseType = 'blob';\r\n    }\r\n}\r\nfunction newBlobConnection() {\r\n    return new XhrBlobConnection();\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Represents a blob being uploaded. Can be used to pause/resume/cancel the\r\n * upload and manage callbacks for various events.\r\n * @internal\r\n */\r\nclass UploadTask {\r\n    /**\r\n     * @param ref - The firebaseStorage.Reference object this task came\r\n     *     from, untyped to avoid cyclic dependencies.\r\n     * @param blob - The blob to upload.\r\n     */\r\n    constructor(ref, blob, metadata = null) {\r\n        /**\r\n         * Number of bytes transferred so far.\r\n         */\r\n        this._transferred = 0;\r\n        this._needToFetchStatus = false;\r\n        this._needToFetchMetadata = false;\r\n        this._observers = [];\r\n        this._error = undefined;\r\n        this._uploadUrl = undefined;\r\n        this._request = undefined;\r\n        this._chunkMultiplier = 1;\r\n        this._resolve = undefined;\r\n        this._reject = undefined;\r\n        this._ref = ref;\r\n        this._blob = blob;\r\n        this._metadata = metadata;\r\n        this._mappings = getMappings();\r\n        this._resumable = this._shouldDoResumable(this._blob);\r\n        this._state = \"running\" /* InternalTaskState.RUNNING */;\r\n        this._errorHandler = error => {\r\n            this._request = undefined;\r\n            this._chunkMultiplier = 1;\r\n            if (error._codeEquals(StorageErrorCode.CANCELED)) {\r\n                this._needToFetchStatus = true;\r\n                this.completeTransitions_();\r\n            }\r\n            else {\r\n                const backoffExpired = this.isExponentialBackoffExpired();\r\n                if (isRetryStatusCode(error.status, [])) {\r\n                    if (backoffExpired) {\r\n                        error = retryLimitExceeded();\r\n                    }\r\n                    else {\r\n                        this.sleepTime = Math.max(this.sleepTime * 2, DEFAULT_MIN_SLEEP_TIME_MILLIS);\r\n                        this._needToFetchStatus = true;\r\n                        this.completeTransitions_();\r\n                        return;\r\n                    }\r\n                }\r\n                this._error = error;\r\n                this._transition(\"error\" /* InternalTaskState.ERROR */);\r\n            }\r\n        };\r\n        this._metadataErrorHandler = error => {\r\n            this._request = undefined;\r\n            if (error._codeEquals(StorageErrorCode.CANCELED)) {\r\n                this.completeTransitions_();\r\n            }\r\n            else {\r\n                this._error = error;\r\n                this._transition(\"error\" /* InternalTaskState.ERROR */);\r\n            }\r\n        };\r\n        this.sleepTime = 0;\r\n        this.maxSleepTime = this._ref.storage.maxUploadRetryTime;\r\n        this._promise = new Promise((resolve, reject) => {\r\n            this._resolve = resolve;\r\n            this._reject = reject;\r\n            this._start();\r\n        });\r\n        // Prevent uncaught rejections on the internal promise from bubbling out\r\n        // to the top level with a dummy handler.\r\n        this._promise.then(null, () => { });\r\n    }\r\n    isExponentialBackoffExpired() {\r\n        return this.sleepTime > this.maxSleepTime;\r\n    }\r\n    _makeProgressCallback() {\r\n        const sizeBefore = this._transferred;\r\n        return loaded => this._updateProgress(sizeBefore + loaded);\r\n    }\r\n    _shouldDoResumable(blob) {\r\n        return blob.size() > 256 * 1024;\r\n    }\r\n    _start() {\r\n        if (this._state !== \"running\" /* InternalTaskState.RUNNING */) {\r\n            // This can happen if someone pauses us in a resume callback, for example.\r\n            return;\r\n        }\r\n        if (this._request !== undefined) {\r\n            return;\r\n        }\r\n        if (this._resumable) {\r\n            if (this._uploadUrl === undefined) {\r\n                this._createResumable();\r\n            }\r\n            else {\r\n                if (this._needToFetchStatus) {\r\n                    this._fetchStatus();\r\n                }\r\n                else {\r\n                    if (this._needToFetchMetadata) {\r\n                        // Happens if we miss the metadata on upload completion.\r\n                        this._fetchMetadata();\r\n                    }\r\n                    else {\r\n                        this.pendingTimeout = setTimeout(() => {\r\n                            this.pendingTimeout = undefined;\r\n                            this._continueUpload();\r\n                        }, this.sleepTime);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        else {\r\n            this._oneShotUpload();\r\n        }\r\n    }\r\n    _resolveToken(callback) {\r\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n        Promise.all([\r\n            this._ref.storage._getAuthToken(),\r\n            this._ref.storage._getAppCheckToken()\r\n        ]).then(([authToken, appCheckToken]) => {\r\n            switch (this._state) {\r\n                case \"running\" /* InternalTaskState.RUNNING */:\r\n                    callback(authToken, appCheckToken);\r\n                    break;\r\n                case \"canceling\" /* InternalTaskState.CANCELING */:\r\n                    this._transition(\"canceled\" /* InternalTaskState.CANCELED */);\r\n                    break;\r\n                case \"pausing\" /* InternalTaskState.PAUSING */:\r\n                    this._transition(\"paused\" /* InternalTaskState.PAUSED */);\r\n                    break;\r\n            }\r\n        });\r\n    }\r\n    // TODO(andysoto): assert false\r\n    _createResumable() {\r\n        this._resolveToken((authToken, appCheckToken) => {\r\n            const requestInfo = createResumableUpload(this._ref.storage, this._ref._location, this._mappings, this._blob, this._metadata);\r\n            const createRequest = this._ref.storage._makeRequest(requestInfo, newTextConnection, authToken, appCheckToken);\r\n            this._request = createRequest;\r\n            createRequest.getPromise().then((url) => {\r\n                this._request = undefined;\r\n                this._uploadUrl = url;\r\n                this._needToFetchStatus = false;\r\n                this.completeTransitions_();\r\n            }, this._errorHandler);\r\n        });\r\n    }\r\n    _fetchStatus() {\r\n        // TODO(andysoto): assert(this.uploadUrl_ !== null);\r\n        const url = this._uploadUrl;\r\n        this._resolveToken((authToken, appCheckToken) => {\r\n            const requestInfo = getResumableUploadStatus(this._ref.storage, this._ref._location, url, this._blob);\r\n            const statusRequest = this._ref.storage._makeRequest(requestInfo, newTextConnection, authToken, appCheckToken);\r\n            this._request = statusRequest;\r\n            statusRequest.getPromise().then(status => {\r\n                status = status;\r\n                this._request = undefined;\r\n                this._updateProgress(status.current);\r\n                this._needToFetchStatus = false;\r\n                if (status.finalized) {\r\n                    this._needToFetchMetadata = true;\r\n                }\r\n                this.completeTransitions_();\r\n            }, this._errorHandler);\r\n        });\r\n    }\r\n    _continueUpload() {\r\n        const chunkSize = RESUMABLE_UPLOAD_CHUNK_SIZE * this._chunkMultiplier;\r\n        const status = new ResumableUploadStatus(this._transferred, this._blob.size());\r\n        // TODO(andysoto): assert(this.uploadUrl_ !== null);\r\n        const url = this._uploadUrl;\r\n        this._resolveToken((authToken, appCheckToken) => {\r\n            let requestInfo;\r\n            try {\r\n                requestInfo = continueResumableUpload(this._ref._location, this._ref.storage, url, this._blob, chunkSize, this._mappings, status, this._makeProgressCallback());\r\n            }\r\n            catch (e) {\r\n                this._error = e;\r\n                this._transition(\"error\" /* InternalTaskState.ERROR */);\r\n                return;\r\n            }\r\n            const uploadRequest = this._ref.storage._makeRequest(requestInfo, newTextConnection, authToken, appCheckToken, \r\n            /*retry=*/ false // Upload requests should not be retried as each retry should be preceded by another query request. Which is handled in this file.\r\n            );\r\n            this._request = uploadRequest;\r\n            uploadRequest.getPromise().then((newStatus) => {\r\n                this._increaseMultiplier();\r\n                this._request = undefined;\r\n                this._updateProgress(newStatus.current);\r\n                if (newStatus.finalized) {\r\n                    this._metadata = newStatus.metadata;\r\n                    this._transition(\"success\" /* InternalTaskState.SUCCESS */);\r\n                }\r\n                else {\r\n                    this.completeTransitions_();\r\n                }\r\n            }, this._errorHandler);\r\n        });\r\n    }\r\n    _increaseMultiplier() {\r\n        const currentSize = RESUMABLE_UPLOAD_CHUNK_SIZE * this._chunkMultiplier;\r\n        // Max chunk size is 32M.\r\n        if (currentSize * 2 < 32 * 1024 * 1024) {\r\n            this._chunkMultiplier *= 2;\r\n        }\r\n    }\r\n    _fetchMetadata() {\r\n        this._resolveToken((authToken, appCheckToken) => {\r\n            const requestInfo = getMetadata$2(this._ref.storage, this._ref._location, this._mappings);\r\n            const metadataRequest = this._ref.storage._makeRequest(requestInfo, newTextConnection, authToken, appCheckToken);\r\n            this._request = metadataRequest;\r\n            metadataRequest.getPromise().then(metadata => {\r\n                this._request = undefined;\r\n                this._metadata = metadata;\r\n                this._transition(\"success\" /* InternalTaskState.SUCCESS */);\r\n            }, this._metadataErrorHandler);\r\n        });\r\n    }\r\n    _oneShotUpload() {\r\n        this._resolveToken((authToken, appCheckToken) => {\r\n            const requestInfo = multipartUpload(this._ref.storage, this._ref._location, this._mappings, this._blob, this._metadata);\r\n            const multipartRequest = this._ref.storage._makeRequest(requestInfo, newTextConnection, authToken, appCheckToken);\r\n            this._request = multipartRequest;\r\n            multipartRequest.getPromise().then(metadata => {\r\n                this._request = undefined;\r\n                this._metadata = metadata;\r\n                this._updateProgress(this._blob.size());\r\n                this._transition(\"success\" /* InternalTaskState.SUCCESS */);\r\n            }, this._errorHandler);\r\n        });\r\n    }\r\n    _updateProgress(transferred) {\r\n        const old = this._transferred;\r\n        this._transferred = transferred;\r\n        // A progress update can make the \"transferred\" value smaller (e.g. a\r\n        // partial upload not completed by server, after which the \"transferred\"\r\n        // value may reset to the value at the beginning of the request).\r\n        if (this._transferred !== old) {\r\n            this._notifyObservers();\r\n        }\r\n    }\r\n    _transition(state) {\r\n        if (this._state === state) {\r\n            return;\r\n        }\r\n        switch (state) {\r\n            case \"canceling\" /* InternalTaskState.CANCELING */:\r\n            case \"pausing\" /* InternalTaskState.PAUSING */:\r\n                // TODO(andysoto):\r\n                // assert(this.state_ === InternalTaskState.RUNNING ||\r\n                //        this.state_ === InternalTaskState.PAUSING);\r\n                this._state = state;\r\n                if (this._request !== undefined) {\r\n                    this._request.cancel();\r\n                }\r\n                else if (this.pendingTimeout) {\r\n                    clearTimeout(this.pendingTimeout);\r\n                    this.pendingTimeout = undefined;\r\n                    this.completeTransitions_();\r\n                }\r\n                break;\r\n            case \"running\" /* InternalTaskState.RUNNING */:\r\n                // TODO(andysoto):\r\n                // assert(this.state_ === InternalTaskState.PAUSED ||\r\n                //        this.state_ === InternalTaskState.PAUSING);\r\n                const wasPaused = this._state === \"paused\" /* InternalTaskState.PAUSED */;\r\n                this._state = state;\r\n                if (wasPaused) {\r\n                    this._notifyObservers();\r\n                    this._start();\r\n                }\r\n                break;\r\n            case \"paused\" /* InternalTaskState.PAUSED */:\r\n                // TODO(andysoto):\r\n                // assert(this.state_ === InternalTaskState.PAUSING);\r\n                this._state = state;\r\n                this._notifyObservers();\r\n                break;\r\n            case \"canceled\" /* InternalTaskState.CANCELED */:\r\n                // TODO(andysoto):\r\n                // assert(this.state_ === InternalTaskState.PAUSED ||\r\n                //        this.state_ === InternalTaskState.CANCELING);\r\n                this._error = canceled();\r\n                this._state = state;\r\n                this._notifyObservers();\r\n                break;\r\n            case \"error\" /* InternalTaskState.ERROR */:\r\n                // TODO(andysoto):\r\n                // assert(this.state_ === InternalTaskState.RUNNING ||\r\n                //        this.state_ === InternalTaskState.PAUSING ||\r\n                //        this.state_ === InternalTaskState.CANCELING);\r\n                this._state = state;\r\n                this._notifyObservers();\r\n                break;\r\n            case \"success\" /* InternalTaskState.SUCCESS */:\r\n                // TODO(andysoto):\r\n                // assert(this.state_ === InternalTaskState.RUNNING ||\r\n                //        this.state_ === InternalTaskState.PAUSING ||\r\n                //        this.state_ === InternalTaskState.CANCELING);\r\n                this._state = state;\r\n                this._notifyObservers();\r\n                break;\r\n        }\r\n    }\r\n    completeTransitions_() {\r\n        switch (this._state) {\r\n            case \"pausing\" /* InternalTaskState.PAUSING */:\r\n                this._transition(\"paused\" /* InternalTaskState.PAUSED */);\r\n                break;\r\n            case \"canceling\" /* InternalTaskState.CANCELING */:\r\n                this._transition(\"canceled\" /* InternalTaskState.CANCELED */);\r\n                break;\r\n            case \"running\" /* InternalTaskState.RUNNING */:\r\n                this._start();\r\n                break;\r\n        }\r\n    }\r\n    /**\r\n     * A snapshot of the current task state.\r\n     */\r\n    get snapshot() {\r\n        const externalState = taskStateFromInternalTaskState(this._state);\r\n        return {\r\n            bytesTransferred: this._transferred,\r\n            totalBytes: this._blob.size(),\r\n            state: externalState,\r\n            metadata: this._metadata,\r\n            task: this,\r\n            ref: this._ref\r\n        };\r\n    }\r\n    /**\r\n     * Adds a callback for an event.\r\n     * @param type - The type of event to listen for.\r\n     * @param nextOrObserver -\r\n     *     The `next` function, which gets called for each item in\r\n     *     the event stream, or an observer object with some or all of these three\r\n     *     properties (`next`, `error`, `complete`).\r\n     * @param error - A function that gets called with a `StorageError`\r\n     *     if the event stream ends due to an error.\r\n     * @param completed - A function that gets called if the\r\n     *     event stream ends normally.\r\n     * @returns\r\n     *     If only the event argument is passed, returns a function you can use to\r\n     *     add callbacks (see the examples above). If more than just the event\r\n     *     argument is passed, returns a function you can call to unregister the\r\n     *     callbacks.\r\n     */\r\n    on(type, nextOrObserver, error, completed) {\r\n        // Note: `type` isn't being used. Its type is also incorrect. TaskEvent should not be a string.\r\n        const observer = new Observer(nextOrObserver || undefined, error || undefined, completed || undefined);\r\n        this._addObserver(observer);\r\n        return () => {\r\n            this._removeObserver(observer);\r\n        };\r\n    }\r\n    /**\r\n     * This object behaves like a Promise, and resolves with its snapshot data\r\n     * when the upload completes.\r\n     * @param onFulfilled - The fulfillment callback. Promise chaining works as normal.\r\n     * @param onRejected - The rejection callback.\r\n     */\r\n    then(onFulfilled, onRejected) {\r\n        // These casts are needed so that TypeScript can infer the types of the\r\n        // resulting Promise.\r\n        return this._promise.then(onFulfilled, onRejected);\r\n    }\r\n    /**\r\n     * Equivalent to calling `then(null, onRejected)`.\r\n     */\r\n    catch(onRejected) {\r\n        return this.then(null, onRejected);\r\n    }\r\n    /**\r\n     * Adds the given observer.\r\n     */\r\n    _addObserver(observer) {\r\n        this._observers.push(observer);\r\n        this._notifyObserver(observer);\r\n    }\r\n    /**\r\n     * Removes the given observer.\r\n     */\r\n    _removeObserver(observer) {\r\n        const i = this._observers.indexOf(observer);\r\n        if (i !== -1) {\r\n            this._observers.splice(i, 1);\r\n        }\r\n    }\r\n    _notifyObservers() {\r\n        this._finishPromise();\r\n        const observers = this._observers.slice();\r\n        observers.forEach(observer => {\r\n            this._notifyObserver(observer);\r\n        });\r\n    }\r\n    _finishPromise() {\r\n        if (this._resolve !== undefined) {\r\n            let triggered = true;\r\n            switch (taskStateFromInternalTaskState(this._state)) {\r\n                case TaskState.SUCCESS:\r\n                    async(this._resolve.bind(null, this.snapshot))();\r\n                    break;\r\n                case TaskState.CANCELED:\r\n                case TaskState.ERROR:\r\n                    const toCall = this._reject;\r\n                    async(toCall.bind(null, this._error))();\r\n                    break;\r\n                default:\r\n                    triggered = false;\r\n                    break;\r\n            }\r\n            if (triggered) {\r\n                this._resolve = undefined;\r\n                this._reject = undefined;\r\n            }\r\n        }\r\n    }\r\n    _notifyObserver(observer) {\r\n        const externalState = taskStateFromInternalTaskState(this._state);\r\n        switch (externalState) {\r\n            case TaskState.RUNNING:\r\n            case TaskState.PAUSED:\r\n                if (observer.next) {\r\n                    async(observer.next.bind(observer, this.snapshot))();\r\n                }\r\n                break;\r\n            case TaskState.SUCCESS:\r\n                if (observer.complete) {\r\n                    async(observer.complete.bind(observer))();\r\n                }\r\n                break;\r\n            case TaskState.CANCELED:\r\n            case TaskState.ERROR:\r\n                if (observer.error) {\r\n                    async(observer.error.bind(observer, this._error))();\r\n                }\r\n                break;\r\n            default:\r\n                // TODO(andysoto): assert(false);\r\n                if (observer.error) {\r\n                    async(observer.error.bind(observer, this._error))();\r\n                }\r\n        }\r\n    }\r\n    /**\r\n     * Resumes a paused task. Has no effect on a currently running or failed task.\r\n     * @returns True if the operation took effect, false if ignored.\r\n     */\r\n    resume() {\r\n        const valid = this._state === \"paused\" /* InternalTaskState.PAUSED */ ||\r\n            this._state === \"pausing\" /* InternalTaskState.PAUSING */;\r\n        if (valid) {\r\n            this._transition(\"running\" /* InternalTaskState.RUNNING */);\r\n        }\r\n        return valid;\r\n    }\r\n    /**\r\n     * Pauses a currently running task. Has no effect on a paused or failed task.\r\n     * @returns True if the operation took effect, false if ignored.\r\n     */\r\n    pause() {\r\n        const valid = this._state === \"running\" /* InternalTaskState.RUNNING */;\r\n        if (valid) {\r\n            this._transition(\"pausing\" /* InternalTaskState.PAUSING */);\r\n        }\r\n        return valid;\r\n    }\r\n    /**\r\n     * Cancels a currently running or paused task. Has no effect on a complete or\r\n     * failed task.\r\n     * @returns True if the operation took effect, false if ignored.\r\n     */\r\n    cancel() {\r\n        const valid = this._state === \"running\" /* InternalTaskState.RUNNING */ ||\r\n            this._state === \"pausing\" /* InternalTaskState.PAUSING */;\r\n        if (valid) {\r\n            this._transition(\"canceling\" /* InternalTaskState.CANCELING */);\r\n        }\r\n        return valid;\r\n    }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Provides methods to interact with a bucket in the Firebase Storage service.\r\n * @internal\r\n * @param _location - An fbs.location, or the URL at\r\n *     which to base this object, in one of the following forms:\r\n *         gs://<bucket>/<object-path>\r\n *         http[s]://firebasestorage.googleapis.com/\r\n *                     <api-version>/b/<bucket>/o/<object-path>\r\n *     Any query or fragment strings will be ignored in the http[s]\r\n *     format. If no value is passed, the storage object will use a URL based on\r\n *     the project ID of the base firebase.App instance.\r\n */\r\nclass Reference {\r\n    constructor(_service, location) {\r\n        this._service = _service;\r\n        if (location instanceof Location) {\r\n            this._location = location;\r\n        }\r\n        else {\r\n            this._location = Location.makeFromUrl(location, _service.host);\r\n        }\r\n    }\r\n    /**\r\n     * Returns the URL for the bucket and path this object references,\r\n     *     in the form gs://<bucket>/<object-path>\r\n     * @override\r\n     */\r\n    toString() {\r\n        return 'gs://' + this._location.bucket + '/' + this._location.path;\r\n    }\r\n    _newRef(service, location) {\r\n        return new Reference(service, location);\r\n    }\r\n    /**\r\n     * A reference to the root of this object's bucket.\r\n     */\r\n    get root() {\r\n        const location = new Location(this._location.bucket, '');\r\n        return this._newRef(this._service, location);\r\n    }\r\n    /**\r\n     * The name of the bucket containing this reference's object.\r\n     */\r\n    get bucket() {\r\n        return this._location.bucket;\r\n    }\r\n    /**\r\n     * The full path of this object.\r\n     */\r\n    get fullPath() {\r\n        return this._location.path;\r\n    }\r\n    /**\r\n     * The short name of this object, which is the last component of the full path.\r\n     * For example, if fullPath is 'full/path/image.png', name is 'image.png'.\r\n     */\r\n    get name() {\r\n        return lastComponent(this._location.path);\r\n    }\r\n    /**\r\n     * The `StorageService` instance this `StorageReference` is associated with.\r\n     */\r\n    get storage() {\r\n        return this._service;\r\n    }\r\n    /**\r\n     * A `StorageReference` pointing to the parent location of this `StorageReference`, or null if\r\n     * this reference is the root.\r\n     */\r\n    get parent() {\r\n        const newPath = parent(this._location.path);\r\n        if (newPath === null) {\r\n            return null;\r\n        }\r\n        const location = new Location(this._location.bucket, newPath);\r\n        return new Reference(this._service, location);\r\n    }\r\n    /**\r\n     * Utility function to throw an error in methods that do not accept a root reference.\r\n     */\r\n    _throwIfRoot(name) {\r\n        if (this._location.path === '') {\r\n            throw invalidRootOperation(name);\r\n        }\r\n    }\r\n}\r\n/**\r\n * Download the bytes at the object's location.\r\n * @returns A Promise containing the downloaded bytes.\r\n */\r\nfunction getBytesInternal(ref, maxDownloadSizeBytes) {\r\n    ref._throwIfRoot('getBytes');\r\n    const requestInfo = getBytes$1(ref.storage, ref._location, maxDownloadSizeBytes);\r\n    return ref.storage\r\n        .makeRequestWithTokens(requestInfo, newBytesConnection)\r\n        .then(bytes => maxDownloadSizeBytes !== undefined\r\n        ? // GCS may not honor the Range header for small files\r\n            bytes.slice(0, maxDownloadSizeBytes)\r\n        : bytes);\r\n}\r\n/**\r\n * Download the bytes at the object's location.\r\n * @returns A Promise containing the downloaded blob.\r\n */\r\nfunction getBlobInternal(ref, maxDownloadSizeBytes) {\r\n    ref._throwIfRoot('getBlob');\r\n    const requestInfo = getBytes$1(ref.storage, ref._location, maxDownloadSizeBytes);\r\n    return ref.storage\r\n        .makeRequestWithTokens(requestInfo, newBlobConnection)\r\n        .then(blob => maxDownloadSizeBytes !== undefined\r\n        ? // GCS may not honor the Range header for small files\r\n            blob.slice(0, maxDownloadSizeBytes)\r\n        : blob);\r\n}\r\n/**\r\n * Uploads data to this object's location.\r\n * The upload is not resumable.\r\n *\r\n * @param ref - StorageReference where data should be uploaded.\r\n * @param data - The data to upload.\r\n * @param metadata - Metadata for the newly uploaded data.\r\n * @returns A Promise containing an UploadResult\r\n */\r\nfunction uploadBytes$1(ref, data, metadata) {\r\n    ref._throwIfRoot('uploadBytes');\r\n    const requestInfo = multipartUpload(ref.storage, ref._location, getMappings(), new FbsBlob(data, true), metadata);\r\n    return ref.storage\r\n        .makeRequestWithTokens(requestInfo, newTextConnection)\r\n        .then(finalMetadata => {\r\n        return {\r\n            metadata: finalMetadata,\r\n            ref\r\n        };\r\n    });\r\n}\r\n/**\r\n * Uploads data to this object's location.\r\n * The upload can be paused and resumed, and exposes progress updates.\r\n * @public\r\n * @param ref - StorageReference where data should be uploaded.\r\n * @param data - The data to upload.\r\n * @param metadata - Metadata for the newly uploaded data.\r\n * @returns An UploadTask\r\n */\r\nfunction uploadBytesResumable$1(ref, data, metadata) {\r\n    ref._throwIfRoot('uploadBytesResumable');\r\n    return new UploadTask(ref, new FbsBlob(data), metadata);\r\n}\r\n/**\r\n * Uploads a string to this object's location.\r\n * The upload is not resumable.\r\n * @public\r\n * @param ref - StorageReference where string should be uploaded.\r\n * @param value - The string to upload.\r\n * @param format - The format of the string to upload.\r\n * @param metadata - Metadata for the newly uploaded string.\r\n * @returns A Promise containing an UploadResult\r\n */\r\nfunction uploadString$1(ref, value, format = StringFormat.RAW, metadata) {\r\n    ref._throwIfRoot('uploadString');\r\n    const data = dataFromString(format, value);\r\n    const metadataClone = Object.assign({}, metadata);\r\n    if (metadataClone['contentType'] == null && data.contentType != null) {\r\n        metadataClone['contentType'] = data.contentType;\r\n    }\r\n    return uploadBytes$1(ref, data.data, metadataClone);\r\n}\r\n/**\r\n * List all items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * This is a helper method for calling list() repeatedly until there are\r\n * no more results. The default pagination size is 1000.\r\n *\r\n * Note: The results may not be consistent if objects are changed while this\r\n * operation is running.\r\n *\r\n * Warning: listAll may potentially consume too many resources if there are\r\n * too many results.\r\n * @public\r\n * @param ref - StorageReference to get list from.\r\n *\r\n * @returns A Promise that resolves with all the items and prefixes under\r\n *      the current storage reference. `prefixes` contains references to\r\n *      sub-directories and `items` contains references to objects in this\r\n *      folder. `nextPageToken` is never returned.\r\n */\r\nfunction listAll$1(ref) {\r\n    const accumulator = {\r\n        prefixes: [],\r\n        items: []\r\n    };\r\n    return listAllHelper(ref, accumulator).then(() => accumulator);\r\n}\r\n/**\r\n * Separated from listAll because async functions can't use \"arguments\".\r\n * @param ref\r\n * @param accumulator\r\n * @param pageToken\r\n */\r\nasync function listAllHelper(ref, accumulator, pageToken) {\r\n    const opt = {\r\n        // maxResults is 1000 by default.\r\n        pageToken\r\n    };\r\n    const nextPage = await list$1(ref, opt);\r\n    accumulator.prefixes.push(...nextPage.prefixes);\r\n    accumulator.items.push(...nextPage.items);\r\n    if (nextPage.nextPageToken != null) {\r\n        await listAllHelper(ref, accumulator, nextPage.nextPageToken);\r\n    }\r\n}\r\n/**\r\n * List items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * List API is only available for Firebase Rules Version 2.\r\n *\r\n * GCS is a key-blob store. Firebase Storage imposes the semantic of '/'\r\n * delimited folder structure.\r\n * Refer to GCS's List API if you want to learn more.\r\n *\r\n * To adhere to Firebase Rules's Semantics, Firebase Storage does not\r\n * support objects whose paths end with \"/\" or contain two consecutive\r\n * \"/\"s. Firebase Storage List API will filter these unsupported objects.\r\n * list() may fail if there are too many unsupported objects in the bucket.\r\n * @public\r\n *\r\n * @param ref - StorageReference to get list from.\r\n * @param options - See ListOptions for details.\r\n * @returns A Promise that resolves with the items and prefixes.\r\n *      `prefixes` contains references to sub-folders and `items`\r\n *      contains references to objects in this folder. `nextPageToken`\r\n *      can be used to get the rest of the results.\r\n */\r\nfunction list$1(ref, options) {\r\n    if (options != null) {\r\n        if (typeof options.maxResults === 'number') {\r\n            validateNumber('options.maxResults', \r\n            /* minValue= */ 1, \r\n            /* maxValue= */ 1000, options.maxResults);\r\n        }\r\n    }\r\n    const op = options || {};\r\n    const requestInfo = list$2(ref.storage, ref._location, \r\n    /*delimiter= */ '/', op.pageToken, op.maxResults);\r\n    return ref.storage.makeRequestWithTokens(requestInfo, newTextConnection);\r\n}\r\n/**\r\n * A `Promise` that resolves with the metadata for this object. If this\r\n * object doesn't exist or metadata cannot be retrieved, the promise is\r\n * rejected.\r\n * @public\r\n * @param ref - StorageReference to get metadata from.\r\n */\r\nfunction getMetadata$1(ref) {\r\n    ref._throwIfRoot('getMetadata');\r\n    const requestInfo = getMetadata$2(ref.storage, ref._location, getMappings());\r\n    return ref.storage.makeRequestWithTokens(requestInfo, newTextConnection);\r\n}\r\n/**\r\n * Updates the metadata for this object.\r\n * @public\r\n * @param ref - StorageReference to update metadata for.\r\n * @param metadata - The new metadata for the object.\r\n *     Only values that have been explicitly set will be changed. Explicitly\r\n *     setting a value to null will remove the metadata.\r\n * @returns A `Promise` that resolves\r\n *     with the new metadata for this object.\r\n *     See `firebaseStorage.Reference.prototype.getMetadata`\r\n */\r\nfunction updateMetadata$1(ref, metadata) {\r\n    ref._throwIfRoot('updateMetadata');\r\n    const requestInfo = updateMetadata$2(ref.storage, ref._location, metadata, getMappings());\r\n    return ref.storage.makeRequestWithTokens(requestInfo, newTextConnection);\r\n}\r\n/**\r\n * Returns the download URL for the given Reference.\r\n * @public\r\n * @returns A `Promise` that resolves with the download\r\n *     URL for this object.\r\n */\r\nfunction getDownloadURL$1(ref) {\r\n    ref._throwIfRoot('getDownloadURL');\r\n    const requestInfo = getDownloadUrl(ref.storage, ref._location, getMappings());\r\n    return ref.storage\r\n        .makeRequestWithTokens(requestInfo, newTextConnection)\r\n        .then(url => {\r\n        if (url === null) {\r\n            throw noDownloadURL();\r\n        }\r\n        return url;\r\n    });\r\n}\r\n/**\r\n * Deletes the object at this location.\r\n * @public\r\n * @param ref - StorageReference for object to delete.\r\n * @returns A `Promise` that resolves if the deletion succeeds.\r\n */\r\nfunction deleteObject$1(ref) {\r\n    ref._throwIfRoot('deleteObject');\r\n    const requestInfo = deleteObject$2(ref.storage, ref._location);\r\n    return ref.storage.makeRequestWithTokens(requestInfo, newTextConnection);\r\n}\r\n/**\r\n * Returns reference for object obtained by appending `childPath` to `ref`.\r\n *\r\n * @param ref - StorageReference to get child of.\r\n * @param childPath - Child path from provided ref.\r\n * @returns A reference to the object obtained by\r\n * appending childPath, removing any duplicate, beginning, or trailing\r\n * slashes.\r\n *\r\n */\r\nfunction _getChild$1(ref, childPath) {\r\n    const newPath = child(ref._location.path, childPath);\r\n    const location = new Location(ref._location.bucket, newPath);\r\n    return new Reference(ref.storage, location);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction isUrl(path) {\r\n    return /^[A-Za-z]+:\\/\\//.test(path);\r\n}\r\n/**\r\n * Returns a firebaseStorage.Reference for the given url.\r\n */\r\nfunction refFromURL(service, url) {\r\n    return new Reference(service, url);\r\n}\r\n/**\r\n * Returns a firebaseStorage.Reference for the given path in the default\r\n * bucket.\r\n */\r\nfunction refFromPath(ref, path) {\r\n    if (ref instanceof FirebaseStorageImpl) {\r\n        const service = ref;\r\n        if (service._bucket == null) {\r\n            throw noDefaultBucket();\r\n        }\r\n        const reference = new Reference(service, service._bucket);\r\n        if (path != null) {\r\n            return refFromPath(reference, path);\r\n        }\r\n        else {\r\n            return reference;\r\n        }\r\n    }\r\n    else {\r\n        // ref is a Reference\r\n        if (path !== undefined) {\r\n            return _getChild$1(ref, path);\r\n        }\r\n        else {\r\n            return ref;\r\n        }\r\n    }\r\n}\r\nfunction ref$1(serviceOrRef, pathOrUrl) {\r\n    if (pathOrUrl && isUrl(pathOrUrl)) {\r\n        if (serviceOrRef instanceof FirebaseStorageImpl) {\r\n            return refFromURL(serviceOrRef, pathOrUrl);\r\n        }\r\n        else {\r\n            throw invalidArgument('To use ref(service, url), the first argument must be a Storage instance.');\r\n        }\r\n    }\r\n    else {\r\n        return refFromPath(serviceOrRef, pathOrUrl);\r\n    }\r\n}\r\nfunction extractBucket(host, config) {\r\n    const bucketString = config === null || config === void 0 ? void 0 : config[CONFIG_STORAGE_BUCKET_KEY];\r\n    if (bucketString == null) {\r\n        return null;\r\n    }\r\n    return Location.makeFromBucketSpec(bucketString, host);\r\n}\r\nfunction connectStorageEmulator$1(storage, host, port, options = {}) {\r\n    storage.host = `${host}:${port}`;\r\n    storage._protocol = 'http';\r\n    const { mockUserToken } = options;\r\n    if (mockUserToken) {\r\n        storage._overrideAuthToken =\r\n            typeof mockUserToken === 'string'\r\n                ? mockUserToken\r\n                : createMockUserToken(mockUserToken, storage.app.options.projectId);\r\n    }\r\n}\r\n/**\r\n * A service that provides Firebase Storage Reference instances.\r\n * @param opt_url - gs:// url to a custom Storage Bucket\r\n *\r\n * @internal\r\n */\r\nclass FirebaseStorageImpl {\r\n    constructor(\r\n    /**\r\n     * FirebaseApp associated with this StorageService instance.\r\n     */\r\n    app, _authProvider, \r\n    /**\r\n     * @internal\r\n     */\r\n    _appCheckProvider, \r\n    /**\r\n     * @internal\r\n     */\r\n    _url, _firebaseVersion) {\r\n        this.app = app;\r\n        this._authProvider = _authProvider;\r\n        this._appCheckProvider = _appCheckProvider;\r\n        this._url = _url;\r\n        this._firebaseVersion = _firebaseVersion;\r\n        this._bucket = null;\r\n        /**\r\n         * This string can be in the formats:\r\n         * - host\r\n         * - host:port\r\n         */\r\n        this._host = DEFAULT_HOST;\r\n        this._protocol = 'https';\r\n        this._appId = null;\r\n        this._deleted = false;\r\n        this._maxOperationRetryTime = DEFAULT_MAX_OPERATION_RETRY_TIME;\r\n        this._maxUploadRetryTime = DEFAULT_MAX_UPLOAD_RETRY_TIME;\r\n        this._requests = new Set();\r\n        if (_url != null) {\r\n            this._bucket = Location.makeFromBucketSpec(_url, this._host);\r\n        }\r\n        else {\r\n            this._bucket = extractBucket(this._host, this.app.options);\r\n        }\r\n    }\r\n    /**\r\n     * The host string for this service, in the form of `host` or\r\n     * `host:port`.\r\n     */\r\n    get host() {\r\n        return this._host;\r\n    }\r\n    set host(host) {\r\n        this._host = host;\r\n        if (this._url != null) {\r\n            this._bucket = Location.makeFromBucketSpec(this._url, host);\r\n        }\r\n        else {\r\n            this._bucket = extractBucket(host, this.app.options);\r\n        }\r\n    }\r\n    /**\r\n     * The maximum time to retry uploads in milliseconds.\r\n     */\r\n    get maxUploadRetryTime() {\r\n        return this._maxUploadRetryTime;\r\n    }\r\n    set maxUploadRetryTime(time) {\r\n        validateNumber('time', \r\n        /* minValue=*/ 0, \r\n        /* maxValue= */ Number.POSITIVE_INFINITY, time);\r\n        this._maxUploadRetryTime = time;\r\n    }\r\n    /**\r\n     * The maximum time to retry operations other than uploads or downloads in\r\n     * milliseconds.\r\n     */\r\n    get maxOperationRetryTime() {\r\n        return this._maxOperationRetryTime;\r\n    }\r\n    set maxOperationRetryTime(time) {\r\n        validateNumber('time', \r\n        /* minValue=*/ 0, \r\n        /* maxValue= */ Number.POSITIVE_INFINITY, time);\r\n        this._maxOperationRetryTime = time;\r\n    }\r\n    async _getAuthToken() {\r\n        if (this._overrideAuthToken) {\r\n            return this._overrideAuthToken;\r\n        }\r\n        const auth = this._authProvider.getImmediate({ optional: true });\r\n        if (auth) {\r\n            const tokenData = await auth.getToken();\r\n            if (tokenData !== null) {\r\n                return tokenData.accessToken;\r\n            }\r\n        }\r\n        return null;\r\n    }\r\n    async _getAppCheckToken() {\r\n        const appCheck = this._appCheckProvider.getImmediate({ optional: true });\r\n        if (appCheck) {\r\n            const result = await appCheck.getToken();\r\n            // TODO: What do we want to do if there is an error getting the token?\r\n            // Context: appCheck.getToken() will never throw even if an error happened. In the error case, a dummy token will be\r\n            // returned along with an error field describing the error. In general, we shouldn't care about the error condition and just use\r\n            // the token (actual or dummy) to send requests.\r\n            return result.token;\r\n        }\r\n        return null;\r\n    }\r\n    /**\r\n     * Stop running requests and prevent more from being created.\r\n     */\r\n    _delete() {\r\n        if (!this._deleted) {\r\n            this._deleted = true;\r\n            this._requests.forEach(request => request.cancel());\r\n            this._requests.clear();\r\n        }\r\n        return Promise.resolve();\r\n    }\r\n    /**\r\n     * Returns a new firebaseStorage.Reference object referencing this StorageService\r\n     * at the given Location.\r\n     */\r\n    _makeStorageReference(loc) {\r\n        return new Reference(this, loc);\r\n    }\r\n    /**\r\n     * @param requestInfo - HTTP RequestInfo object\r\n     * @param authToken - Firebase auth token\r\n     */\r\n    _makeRequest(requestInfo, requestFactory, authToken, appCheckToken, retry = true) {\r\n        if (!this._deleted) {\r\n            const request = makeRequest(requestInfo, this._appId, authToken, appCheckToken, requestFactory, this._firebaseVersion, retry);\r\n            this._requests.add(request);\r\n            // Request removes itself from set when complete.\r\n            request.getPromise().then(() => this._requests.delete(request), () => this._requests.delete(request));\r\n            return request;\r\n        }\r\n        else {\r\n            return new FailRequest(appDeleted());\r\n        }\r\n    }\r\n    async makeRequestWithTokens(requestInfo, requestFactory) {\r\n        const [authToken, appCheckToken] = await Promise.all([\r\n            this._getAuthToken(),\r\n            this._getAppCheckToken()\r\n        ]);\r\n        return this._makeRequest(requestInfo, requestFactory, authToken, appCheckToken).getPromise();\r\n    }\r\n}\n\nconst name = \"@firebase/storage\";\nconst version = \"0.13.2\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Type constant for Firebase Storage.\r\n */\r\nconst STORAGE_TYPE = 'storage';\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Downloads the data at the object's location. Returns an error if the object\r\n * is not found.\r\n *\r\n * To use this functionality, you have to whitelist your app's origin in your\r\n * Cloud Storage bucket. See also\r\n * https://cloud.google.com/storage/docs/configuring-cors\r\n *\r\n * @public\r\n * @param ref - StorageReference where data should be downloaded.\r\n * @param maxDownloadSizeBytes - If set, the maximum allowed size in bytes to\r\n * retrieve.\r\n * @returns A Promise containing the object's bytes\r\n */\r\nfunction getBytes(ref, maxDownloadSizeBytes) {\r\n    ref = getModularInstance(ref);\r\n    return getBytesInternal(ref, maxDownloadSizeBytes);\r\n}\r\n/**\r\n * Uploads data to this object's location.\r\n * The upload is not resumable.\r\n * @public\r\n * @param ref - {@link StorageReference} where data should be uploaded.\r\n * @param data - The data to upload.\r\n * @param metadata - Metadata for the data to upload.\r\n * @returns A Promise containing an UploadResult\r\n */\r\nfunction uploadBytes(ref, data, metadata) {\r\n    ref = getModularInstance(ref);\r\n    return uploadBytes$1(ref, data, metadata);\r\n}\r\n/**\r\n * Uploads a string to this object's location.\r\n * The upload is not resumable.\r\n * @public\r\n * @param ref - {@link StorageReference} where string should be uploaded.\r\n * @param value - The string to upload.\r\n * @param format - The format of the string to upload.\r\n * @param metadata - Metadata for the string to upload.\r\n * @returns A Promise containing an UploadResult\r\n */\r\nfunction uploadString(ref, value, format, metadata) {\r\n    ref = getModularInstance(ref);\r\n    return uploadString$1(ref, value, format, metadata);\r\n}\r\n/**\r\n * Uploads data to this object's location.\r\n * The upload can be paused and resumed, and exposes progress updates.\r\n * @public\r\n * @param ref - {@link StorageReference} where data should be uploaded.\r\n * @param data - The data to upload.\r\n * @param metadata - Metadata for the data to upload.\r\n * @returns An UploadTask\r\n */\r\nfunction uploadBytesResumable(ref, data, metadata) {\r\n    ref = getModularInstance(ref);\r\n    return uploadBytesResumable$1(ref, data, metadata);\r\n}\r\n/**\r\n * A `Promise` that resolves with the metadata for this object. If this\r\n * object doesn't exist or metadata cannot be retrieved, the promise is\r\n * rejected.\r\n * @public\r\n * @param ref - {@link StorageReference} to get metadata from.\r\n */\r\nfunction getMetadata(ref) {\r\n    ref = getModularInstance(ref);\r\n    return getMetadata$1(ref);\r\n}\r\n/**\r\n * Updates the metadata for this object.\r\n * @public\r\n * @param ref - {@link StorageReference} to update metadata for.\r\n * @param metadata - The new metadata for the object.\r\n *     Only values that have been explicitly set will be changed. Explicitly\r\n *     setting a value to null will remove the metadata.\r\n * @returns A `Promise` that resolves with the new metadata for this object.\r\n */\r\nfunction updateMetadata(ref, metadata) {\r\n    ref = getModularInstance(ref);\r\n    return updateMetadata$1(ref, metadata);\r\n}\r\n/**\r\n * List items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * List API is only available for Firebase Rules Version 2.\r\n *\r\n * GCS is a key-blob store. Firebase Storage imposes the semantic of '/'\r\n * delimited folder structure.\r\n * Refer to GCS's List API if you want to learn more.\r\n *\r\n * To adhere to Firebase Rules's Semantics, Firebase Storage does not\r\n * support objects whose paths end with \"/\" or contain two consecutive\r\n * \"/\"s. Firebase Storage List API will filter these unsupported objects.\r\n * list() may fail if there are too many unsupported objects in the bucket.\r\n * @public\r\n *\r\n * @param ref - {@link StorageReference} to get list from.\r\n * @param options - See {@link ListOptions} for details.\r\n * @returns A `Promise` that resolves with the items and prefixes.\r\n *      `prefixes` contains references to sub-folders and `items`\r\n *      contains references to objects in this folder. `nextPageToken`\r\n *      can be used to get the rest of the results.\r\n */\r\nfunction list(ref, options) {\r\n    ref = getModularInstance(ref);\r\n    return list$1(ref, options);\r\n}\r\n/**\r\n * List all items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * This is a helper method for calling list() repeatedly until there are\r\n * no more results. The default pagination size is 1000.\r\n *\r\n * Note: The results may not be consistent if objects are changed while this\r\n * operation is running.\r\n *\r\n * Warning: `listAll` may potentially consume too many resources if there are\r\n * too many results.\r\n * @public\r\n * @param ref - {@link StorageReference} to get list from.\r\n *\r\n * @returns A `Promise` that resolves with all the items and prefixes under\r\n *      the current storage reference. `prefixes` contains references to\r\n *      sub-directories and `items` contains references to objects in this\r\n *      folder. `nextPageToken` is never returned.\r\n */\r\nfunction listAll(ref) {\r\n    ref = getModularInstance(ref);\r\n    return listAll$1(ref);\r\n}\r\n/**\r\n * Returns the download URL for the given {@link StorageReference}.\r\n * @public\r\n * @param ref - {@link StorageReference} to get the download URL for.\r\n * @returns A `Promise` that resolves with the download\r\n *     URL for this object.\r\n */\r\nfunction getDownloadURL(ref) {\r\n    ref = getModularInstance(ref);\r\n    return getDownloadURL$1(ref);\r\n}\r\n/**\r\n * Deletes the object at this location.\r\n * @public\r\n * @param ref - {@link StorageReference} for object to delete.\r\n * @returns A `Promise` that resolves if the deletion succeeds.\r\n */\r\nfunction deleteObject(ref) {\r\n    ref = getModularInstance(ref);\r\n    return deleteObject$1(ref);\r\n}\r\nfunction ref(serviceOrRef, pathOrUrl) {\r\n    serviceOrRef = getModularInstance(serviceOrRef);\r\n    return ref$1(serviceOrRef, pathOrUrl);\r\n}\r\n/**\r\n * @internal\r\n */\r\nfunction _getChild(ref, childPath) {\r\n    return _getChild$1(ref, childPath);\r\n}\r\n/**\r\n * Gets a {@link FirebaseStorage} instance for the given Firebase app.\r\n * @public\r\n * @param app - Firebase app to get {@link FirebaseStorage} instance for.\r\n * @param bucketUrl - The gs:// url to your Firebase Storage Bucket.\r\n * If not passed, uses the app's default Storage Bucket.\r\n * @returns A {@link FirebaseStorage} instance.\r\n */\r\nfunction getStorage(app = getApp(), bucketUrl) {\r\n    app = getModularInstance(app);\r\n    const storageProvider = _getProvider(app, STORAGE_TYPE);\r\n    const storageInstance = storageProvider.getImmediate({\r\n        identifier: bucketUrl\r\n    });\r\n    const emulator = getDefaultEmulatorHostnameAndPort('storage');\r\n    if (emulator) {\r\n        connectStorageEmulator(storageInstance, ...emulator);\r\n    }\r\n    return storageInstance;\r\n}\r\n/**\r\n * Modify this {@link FirebaseStorage} instance to communicate with the Cloud Storage emulator.\r\n *\r\n * @param storage - The {@link FirebaseStorage} instance\r\n * @param host - The emulator host (ex: localhost)\r\n * @param port - The emulator port (ex: 5001)\r\n * @param options - Emulator options. `options.mockUserToken` is the mock auth\r\n * token to use for unit testing Security Rules.\r\n * @public\r\n */\r\nfunction connectStorageEmulator(storage, host, port, options = {}) {\r\n    connectStorageEmulator$1(storage, host, port, options);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *   http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Downloads the data at the object's location. Returns an error if the object\r\n * is not found.\r\n *\r\n * To use this functionality, you have to whitelist your app's origin in your\r\n * Cloud Storage bucket. See also\r\n * https://cloud.google.com/storage/docs/configuring-cors\r\n *\r\n * This API is not available in Node.\r\n *\r\n * @public\r\n * @param ref - StorageReference where data should be downloaded.\r\n * @param maxDownloadSizeBytes - If set, the maximum allowed size in bytes to\r\n * retrieve.\r\n * @returns A Promise that resolves with a Blob containing the object's bytes\r\n */\r\nfunction getBlob(ref, maxDownloadSizeBytes) {\r\n    ref = getModularInstance(ref);\r\n    return getBlobInternal(ref, maxDownloadSizeBytes);\r\n}\r\n/**\r\n * Downloads the data at the object's location. Raises an error event if the\r\n * object is not found.\r\n *\r\n * This API is only available in Node.\r\n *\r\n * @public\r\n * @param ref - StorageReference where data should be downloaded.\r\n * @param maxDownloadSizeBytes - If set, the maximum allowed size in bytes to\r\n * retrieve.\r\n * @returns A stream with the object's data as bytes\r\n */\r\nfunction getStream(ref, maxDownloadSizeBytes) {\r\n    throw new Error('getStream() is only supported by NodeJS builds');\r\n}\n\n/**\r\n * Cloud Storage for Firebase\r\n *\r\n * @packageDocumentation\r\n */\r\nfunction factory(container, { instanceIdentifier: url }) {\r\n    const app = container.getProvider('app').getImmediate();\r\n    const authProvider = container.getProvider('auth-internal');\r\n    const appCheckProvider = container.getProvider('app-check-internal');\r\n    return new FirebaseStorageImpl(app, authProvider, appCheckProvider, url, SDK_VERSION);\r\n}\r\nfunction registerStorage() {\r\n    _registerComponent(new Component(STORAGE_TYPE, factory, \"PUBLIC\" /* ComponentType.PUBLIC */).setMultipleInstances(true));\r\n    //RUNTIME_ENV will be replaced during the compilation to \"node\" for nodejs and an empty string for browser\r\n    registerVersion(name, version, '');\r\n    // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\r\n    registerVersion(name, version, 'esm2017');\r\n}\r\nregisterStorage();\n\nexport { StorageError, StorageErrorCode, StringFormat, FbsBlob as _FbsBlob, Location as _Location, TaskEvent as _TaskEvent, TaskState as _TaskState, UploadTask as _UploadTask, dataFromString as _dataFromString, _getChild, invalidArgument as _invalidArgument, invalidRootOperation as _invalidRootOperation, connectStorageEmulator, deleteObject, getBlob, getBytes, getDownloadURL, getMetadata, getStorage, getStream, list, listAll, ref, updateMetadata, uploadBytes, uploadBytesResumable, uploadString };\n//# sourceMappingURL=index.esm2017.js.map\n","import { __awaiter, __generator } from \"tslib\";\nimport { ref } from 'firebase/storage';\nimport { uploadBytesResumable, getDownloadURL } from 'firebase/storage';\n/**\n * create random name\n */\nexport function randomName(len, file) {\n    if (len === void 0) { len = 20; }\n    var pass = '';\n    var letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n    var numbers = '0123456789';\n    var string = letters + letters.toUpperCase() + numbers;\n    for (var i = 0; i < len; i++) {\n        pass += string.charAt(Math.floor(Math.random() * string.length));\n    }\n    if (file) {\n        var getExtension = file.name;\n        var extensionArr = getExtension.split('.');\n        var extension = extensionArr[extensionArr.length - 1];\n        pass = \"\".concat(pass, \".\").concat(extension);\n    }\n    return pass;\n}\n/**\n * upload file\n */\nexport function easyUpload(storage, path, data, fun) {\n    return __awaiter(this, void 0, void 0, function () {\n        var storageRef, uploadTask;\n        return __generator(this, function (_a) {\n            storageRef = ref(storage, path);\n            uploadTask = Array.isArray(data)\n                ? uploadBytesResumable(storageRef, data[0], data[1])\n                : uploadBytesResumable(storageRef, data);\n            return [2 /*return*/, new Promise(function (resolve, reject) {\n                    uploadTask.on('state_changed', function (snapshot) {\n                        var progress = (snapshot.bytesTransferred / snapshot.totalBytes) * 100;\n                        if (fun) {\n                            fun(progress, snapshot.state);\n                        }\n                    }, function (error) {\n                        reject(error);\n                    }, function () {\n                        getDownloadURL(uploadTask.snapshot.ref).then(function (downloadURL) {\n                            resolve(downloadURL);\n                        });\n                    });\n                })];\n        });\n    });\n}\n//# sourceMappingURL=easyUpload.js.map","import { randomName } from './index';\n/**\n * Download from URL or Path\n */\nexport function easyDownload(url, name, fun) {\n    var xhr = new XMLHttpRequest();\n    xhr.open('GET', url, true);\n    // プログレス\n    xhr.onprogress = function (evt) {\n        var load = (100 * evt.loaded) / evt.total || 0;\n        if (fun) {\n            fun(load);\n        }\n    };\n    xhr.responseType = 'blob'; // Blobオブジェクトとしてダウンロードする\n    // ダウンロード完了\n    return new Promise(function (resolve, reject) {\n        xhr.addEventListener('error', function () {\n            reject('Cannot download from this URL');\n        });\n        xhr.onload = function (oEvent) {\n            var blob = xhr.response;\n            var objectURL = window.URL.createObjectURL(blob);\n            var link = document.createElement('a');\n            document.body.appendChild(link);\n            link.href = objectURL;\n            if (name) {\n                link.setAttribute('download', name);\n            }\n            else {\n                link.setAttribute('download', randomName(10));\n            }\n            link.click();\n            link.remove();\n            resolve('success');\n        };\n        xhr.send();\n    });\n}\n//# sourceMappingURL=easyDownload.js.map","import {useQuasar,copyToClipboard} from 'quasar';<script lang=\"ts\" setup>\nimport { ref, onMounted, computed } from 'vue'\nimport 'quasar/src/css/index.sass'\nimport { funDateformat, numProgress, isSpinner, generateThumbnailFromPDF } from './CCCardDownload'\nimport { easyDownload } from '@firebaseasy/storage'\n\n\n//\nconst $q = useQuasar()\nconsole.log($q)\n\nconst props = defineProps({\n  data: {\n    type: Object,\n  },\n  isPc: {\n    type: Boolean,\n    default: true,\n  },\n})\n\nconst thumbnailData = ref<File | null>(null)\n\nconst refPDFURL = ref('')\n\nonMounted(async () => {\n  if (!props.data) return\n\n  const response = await fetch(props.data.urlDocThumbnail)\n  const blob = await response.blob()\n\n  if (blob.type === 'image/svg+xml') {\n    const d_Thumbnail = new Blob([blob], { type: 'image/svg+xml' })\n    thumbnailData.value = new File([d_Thumbnail], 'fileInfo', {\n      type: blob.type,\n    })\n  } else if (!props.data.urlDocThumbnail && props.data.urlDoc.includes('.pdf')) {\n    const response = await fetch(props.data.urlDoc)\n    const blob = await response.blob()\n    const file = new File([blob], props.data.docName, {\n      type: 'application/pdf',\n    })\n\n    refPDFURL.value = await generateThumbnailFromPDF(file, funFetDosId.value)\n  } else {\n    thumbnailData.value = new File([blob], 'fileInfo')\n  }\n})\n\nconst funDownload = async () => {\n  if (!props.data?.urlDoc) return\n  isSpinner.value = true\n  easyDownload(props.data?.urlDoc, props.data.docName, (progress: number) => {\n    numProgress.value = progress / 100\n    if (progress >= 100) {\n      numProgress.value = 0\n    }\n  })\n  isSpinner.value = false\n}\n\n/**\n * クリップボードにIdを保存\n */\nconst funCopyClip = (s: string) => {\n  s = s.replace('location.origin', `${location.origin}/`)\n  copyToClipboard(s).then(() => {\n    $q.notify({\n      position: 'top',\n      message: `${s}をクリップボードに保存`,\n      badgeStyle: 'display: none;',\n    })\n  })\n}\n\nconst funFetDosId = computed(() => {\n  const _get = props.data as { individualDocId?: string; commonDocId?: string }\n  if (_get?.individualDocId) {\n    return _get.individualDocId\n  }\n  if (_get?.commonDocId) {\n    return _get.commonDocId\n  }\n\n  return ''\n})\n</script>\n\n<template>\n  <q-card class=\"_card\" flat bordered>\n    <!-- このdivがないとborder-radiusが効かない -->\n    <div>\n      <q-card-section class=\"_card_header\">\n        <div class=\"_title\">\n          <div style=\"width: 100%\">\n            <div class=\"_hidden\">\n              {{ props.data?.docName }}\n            </div>\n            <q-tooltip v-if=\"isPc\" anchor=\"center left\" :offset=\"[10, 10]\">\n              {{ props.data?.docName }}\n            </q-tooltip>\n            <div>\n              <span class=\"_update\"\n                >更新:{{ funDateformat(props.data?.docUpdDate, 'YYYY年MM月DD日') }}</span\n              >\n            </div>\n          </div>\n        </div>\n\n        <q-space />\n\n        <q-btn round flat icon=\"more_vert\" class=\"_menu_btn\">\n          <q-menu>\n            <q-list style=\"min-width: 100px\">\n              <q-item clickable v-close-popup @click=\"funDownload()\">\n                <q-item-section>ダウンロード</q-item-section>\n              </q-item>\n\n              <q-separator />\n\n              <q-item clickable v-close-popup @click=\"$emit('onEdit')\">\n                <q-item-section>編集</q-item-section>\n              </q-item>\n\n              <div>\n                <q-separator />\n              </div>\n\n              <q-item clickable v-close-popup @click=\"$emit('onDelete')\">\n                <q-item-section>削除</q-item-section>\n              </q-item>\n\n              <div>\n                <q-separator />\n              </div>\n\n              <q-item clickable v-close-popup @click=\"funCopyClip(props.data?.urlDoc || '')\">\n                <q-item-section>共有用URL</q-item-section>\n              </q-item>\n\n              <div>\n                <q-separator />\n              </div>\n\n              <q-item clickable v-close-popup>\n                <q-item-section>閉じる</q-item-section>\n              </q-item>\n            </q-list>\n          </q-menu>\n        </q-btn>\n      </q-card-section>\n    </div>\n  </q-card>\n</template>\n\n<style lang=\"sass\" scoped>\n// $\n._card\n  height: 300px\n  overflow: hidden\n  min-width: 200px\n  position: relative\n  user-select: none\n\n._img\n  width: 100%\n  height: 300px\n\n._card_header\n  position: absolute\n  top: 0\n  width: 100%\n  display: flex\n  background: var(--c-primary)\n  padding: 10px 10px 10px 10px\n  border-radius: none\n\n._title\n  color: white\n  font-weight: bold\n  cursor: pointer\n  display: flex\n  width: 80%\n\n._hidden\n  overflow: hidden\n  text-overflow: ellipsis\n  white-space: nowrap\n\n._update\n  font-size: 12px\n  height: 12px\n  line-height: 12px\n\n._menu_btn\n  background: white\n</style>\n./CCCardDownload\n","import { computed, ref, watch } from 'vue'\nimport { PankuzuType } from '../CCPankuzu'\nimport { RouteLocationNormalizedLoaded } from 'vue-router'\n\nexport function getPankuzuItemFromRoute(route: RouteLocationNormalizedLoaded): PankuzuType[] {\n  return (route?.meta?.items as PankuzuType[]) ?? []\n}\n"]}