{"version":3,"file":"application-5c9c245e.js","sources":["../../../node_modules/date-fns/esm/addDays/index.js","../../../node_modules/date-fns/esm/addMonths/index.js","../../../node_modules/date-fns/esm/add/index.js","../../../node_modules/date-fns/esm/startOfDay/index.js","../../../node_modules/date-fns/esm/compareAsc/index.js","../../../node_modules/date-fns/esm/isSameDay/index.js","../../../node_modules/date-fns/esm/differenceInCalendarMonths/index.js","../../../node_modules/date-fns/esm/differenceInMilliseconds/index.js","../../../node_modules/date-fns/esm/_lib/roundingMethods/index.js","../../../node_modules/date-fns/esm/endOfDay/index.js","../../../node_modules/date-fns/esm/endOfMonth/index.js","../../../node_modules/date-fns/esm/isLastDayOfMonth/index.js","../../../node_modules/date-fns/esm/differenceInMonths/index.js","../../../node_modules/date-fns/esm/differenceInSeconds/index.js","../../../node_modules/date-fns/esm/eachDayOfInterval/index.js","../../../node_modules/date-fns/esm/_lib/assign/index.js","../../../node_modules/date-fns/esm/_lib/cloneObject/index.js","../../../node_modules/date-fns/esm/formatDistance/index.js","../../../node_modules/date-fns/esm/formatDistanceStrict/index.js","../../../node_modules/date-fns/esm/formatDistanceToNow/index.js","../../../node_modules/date-fns/esm/formatDistanceToNowStrict/index.js","../../../node_modules/date-fns/esm/isPast/index.js","../../../node_modules/date-fns/esm/isToday/index.js","../../../node_modules/date-fns/esm/setDefaultOptions/index.js","../../../node_modules/vue-demi/lib/index.mjs","../../../node_modules/pinia/dist/pinia.mjs","../../../node_modules/vee-validate/dist/vee-validate.esm.js","../../../node_modules/@tanstack/query-core/build/lib/subscribable.mjs","../../../node_modules/@tanstack/query-core/build/lib/utils.mjs","../../../node_modules/@tanstack/query-core/build/lib/focusManager.mjs","../../../node_modules/@tanstack/query-core/build/lib/onlineManager.mjs","../../../node_modules/@tanstack/query-core/build/lib/retryer.mjs","../../../node_modules/@tanstack/query-core/build/lib/logger.mjs","../../../node_modules/@tanstack/query-core/build/lib/notifyManager.mjs","../../../node_modules/@tanstack/query-core/build/lib/removable.mjs","../../../node_modules/@tanstack/query-core/build/lib/query.mjs","../../../node_modules/@tanstack/query-core/build/lib/queryCache.mjs","../../../node_modules/@tanstack/query-core/build/lib/mutation.mjs","../../../node_modules/@tanstack/query-core/build/lib/mutationCache.mjs","../../../node_modules/@tanstack/query-core/build/lib/infiniteQueryBehavior.mjs","../../../node_modules/@tanstack/query-core/build/lib/queryClient.mjs","../../../node_modules/@tanstack/query-core/build/lib/mutationObserver.mjs","../../../node_modules/@tanstack/vue-query/build/lib/utils.mjs","../../../node_modules/@tanstack/vue-query/build/lib/useQueryClient.mjs","../../../node_modules/@tanstack/vue-query/build/lib/queryCache.mjs","../../../node_modules/@tanstack/vue-query/build/lib/mutationCache.mjs","../../../node_modules/@tanstack/vue-query/build/lib/queryClient.mjs","../../../node_modules/@tanstack/vue-query/build/lib/vueQueryPlugin.mjs","../../../node_modules/@tanstack/vue-query/build/lib/useMutation.mjs","../../../node_modules/pinia-plugin-persistedstate/dist/index.mjs","../../../node_modules/vue-google-maps-community-fork/src/utils/lazyValue.js","../../../node_modules/vue-google-maps-community-fork/src/utils/env.js","../../../node_modules/vue-google-maps-community-fork/src/utils/create-map-script.js","../../../node_modules/vue-google-maps-community-fork/src/load-google-maps.js","../../../node_modules/vue-google-maps-community-fork/src/utils/bindEvents.js","../../../node_modules/vue-google-maps-community-fork/src/utils/WatchPrimitiveProperties.js","../../../node_modules/vue-google-maps-community-fork/src/utils/string.js","../../../node_modules/vue-google-maps-community-fork/src/utils/bindProps.js","../../../node_modules/vue-google-maps-community-fork/src/components/mapElementMixin.js","../../../node_modules/vue-google-maps-community-fork/src/components/build-component.js","../../../node_modules/vue-google-maps-community-fork/src/components/polyline.js","../../../node_modules/vue-google-maps-community-fork/src/components/polygon.js","../../../node_modules/vue-google-maps-community-fork/src/components/circle.js","../../../node_modules/vue-google-maps-community-fork/src/components/rectangle.js","../../../node_modules/vue-google-maps-community-fork/src/components/marker.vue","../../../node_modules/fast-deep-equal/index.js","../../../node_modules/kdbush/index.js","../../../node_modules/supercluster/index.js","../../../node_modules/@googlemaps/markerclusterer/dist/index.esm.js","../../../node_modules/vue-google-maps-community-fork/src/components/cluster.vue","../../../node_modules/vue-google-maps-community-fork/src/components/infoWindow.vue","../../../node_modules/vue-google-maps-community-fork/src/utils/mountableMixin.js","../../../node_modules/vue-google-maps-community-fork/src/utils/TwoWayBindingWrapper.js","../../../node_modules/vue-google-maps-community-fork/src/components/map.vue","../../../node_modules/vue-google-maps-community-fork/src/components/heatmap.js","../../../node_modules/vue-google-maps-community-fork/src/utils/simulateArrowDown.js","../../../node_modules/vue-google-maps-community-fork/src/components/autocomplete.vue","../../../node_modules/vue-google-maps-community-fork/src/main.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/constants.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/constructFrom.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/toDate.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/addDays.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/addMonths.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/add.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/addMilliseconds.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/addHours.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/_lib/defaultOptions.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/startOfWeek.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/startOfISOWeek.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getISOWeekYear.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/_lib/normalizeDates.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/startOfDay.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/differenceInCalendarDays.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/startOfISOWeekYear.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/addQuarters.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/addYears.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/compareAsc.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/isDate.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/isValid.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getQuarter.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/differenceInCalendarYears.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/differenceInYears.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/_lib/normalizeInterval.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/eachDayOfInterval.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/startOfQuarter.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/eachQuarterOfInterval.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/startOfMonth.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/endOfYear.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/startOfYear.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/endOfWeek.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/endOfQuarter.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/locale/en-US.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getDayOfYear.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getISOWeek.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getWeekYear.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/startOfWeekYear.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getWeek.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/_lib/format/formatters.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/_lib/format/longFormatters.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/_lib/protectedTokens.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/format.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getDay.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getDaysInMonth.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getDefaultOptions.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getHours.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getISODay.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getMinutes.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getMonth.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getSeconds.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/getYear.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/isAfter.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/isBefore.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/isEqual.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/transpose.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/Setter.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/Parser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/constants.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/utils.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/setWeek.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/setISOWeek.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/setDay.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/setISODay.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse/_lib/parsers.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/parse.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/isSameQuarter.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/subDays.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/setMonth.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/set.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/setHours.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/setMilliseconds.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/setMinutes.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/setSeconds.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/setYear.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/subMonths.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/sub.js","../../../node_modules/@vuepic/vue-datepicker/node_modules/date-fns/subYears.js","../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js","../../../node_modules/vue-inline-svg/src/index.js","../../../node_modules/vueperslides/dist/vueperslides.es.js","../../../node_modules/date-fns/esm/locale/es/_lib/formatDistance/index.js","../../../node_modules/date-fns/esm/locale/es/_lib/formatLong/index.js","../../../node_modules/date-fns/esm/locale/es/_lib/formatRelative/index.js","../../../node_modules/date-fns/esm/locale/es/_lib/localize/index.js","../../../node_modules/date-fns/esm/locale/es/_lib/match/index.js","../../../node_modules/date-fns/esm/locale/es/index.js","../../../app/frontend/assets/icons/chevron-left-alt.svg","../../../app/frontend/api/chat-messages.ts","../../../app/frontend/components/chat-view.vue","../../../app/frontend/utils/format-date.ts","../../../app/frontend/components/chats-view.vue","../../../app/frontend/assets/icons/task-search.svg","../../../app/frontend/utils/currency.ts","../../../app/frontend/components/category-view.vue","../../../app/frontend/assets/images/banner1.webp","../../../app/frontend/assets/images/banner2.webp","../../../app/frontend/assets/images/banner-desktop1.webp","../../../app/frontend/assets/images/banner-desktop2.webp","../../../app/frontend/assets/icons/arrow-right.svg","../../../app/frontend/assets/icons/ticket.svg","../../../app/frontend/assets/icons/home.svg","../../../app/frontend/assets/icons/brightness.svg","../../../app/frontend/assets/icons/chevron-left.svg","../../../app/frontend/assets/icons/chevron-right.svg","../../../app/frontend/assets/images/products.webp","../../../app/frontend/assets/icons/close.svg","../../../app/frontend/store/store.ts","../../../app/frontend/api/products.ts","../../../node_modules/@headlessui/vue/dist/utils/match.js","../../../node_modules/@headlessui/vue/dist/utils/render.js","../../../node_modules/@headlessui/vue/dist/hooks/use-id.js","../../../node_modules/@headlessui/vue/dist/keyboard.js","../../../node_modules/@headlessui/vue/dist/utils/calculate-active-index.js","../../../node_modules/@headlessui/vue/dist/utils/dom.js","../../../node_modules/@headlessui/vue/dist/internal/open-closed.js","../../../node_modules/@headlessui/vue/dist/hooks/use-resolve-button-type.js","../../../node_modules/@headlessui/vue/dist/utils/env.js","../../../node_modules/@headlessui/vue/dist/utils/owner.js","../../../node_modules/@headlessui/vue/dist/utils/focus-management.js","../../../node_modules/@headlessui/vue/dist/hooks/use-document-event.js","../../../node_modules/@headlessui/vue/dist/hooks/use-window-event.js","../../../node_modules/@headlessui/vue/dist/hooks/use-outside-click.js","../../../node_modules/@headlessui/vue/dist/internal/hidden.js","../../../node_modules/@headlessui/vue/dist/utils/form.js","../../../node_modules/@headlessui/vue/dist/hooks/use-controllable.js","../../../node_modules/@headlessui/vue/dist/hooks/use-tracked-pointer.js","../../../node_modules/@headlessui/vue/dist/utils/platform.js","../../../node_modules/@headlessui/vue/dist/utils/disposables.js","../../../node_modules/@headlessui/vue/dist/hooks/use-tab-direction.js","../../../node_modules/@headlessui/vue/dist/hooks/use-event-listener.js","../../../node_modules/@headlessui/vue/dist/utils/micro-task.js","../../../node_modules/@headlessui/vue/dist/utils/document-ready.js","../../../node_modules/@headlessui/vue/dist/components/focus-trap/focus-trap.js","../../../node_modules/@headlessui/vue/dist/hooks/use-inert.js","../../../node_modules/@headlessui/vue/dist/internal/portal-force-root.js","../../../node_modules/@headlessui/vue/dist/components/portal/portal.js","../../../node_modules/@headlessui/vue/dist/internal/stack-context.js","../../../node_modules/@headlessui/vue/dist/components/description/description.js","../../../node_modules/@headlessui/vue/dist/hooks/use-store.js","../../../node_modules/@headlessui/vue/dist/utils/store.js","../../../node_modules/@headlessui/vue/dist/hooks/document-overflow/adjust-scrollbar-padding.js","../../../node_modules/@headlessui/vue/dist/hooks/document-overflow/handle-ios-locking.js","../../../node_modules/@headlessui/vue/dist/hooks/document-overflow/prevent-scroll.js","../../../node_modules/@headlessui/vue/dist/hooks/document-overflow/overflow-store.js","../../../node_modules/@headlessui/vue/dist/hooks/document-overflow/use-document-overflow.js","../../../node_modules/@headlessui/vue/dist/hooks/use-root-containers.js","../../../node_modules/@headlessui/vue/dist/components/dialog/dialog.js","../../../node_modules/@headlessui/vue/dist/components/disclosure/disclosure.js","../../../node_modules/@headlessui/vue/dist/utils/get-text-value.js","../../../node_modules/@headlessui/vue/dist/hooks/use-text-value.js","../../../node_modules/@headlessui/vue/dist/components/listbox/listbox.js","../../../node_modules/@headlessui/vue/dist/components/popover/popover.js","../../../app/frontend/components/home-view.vue","../../../app/frontend/assets/icons/plus.svg","../../../app/frontend/components/partner-start-view.vue","../../../app/frontend/assets/icons/calendar-delete.svg","../../../app/frontend/assets/images/mercadopago.webp","../../../app/frontend/assets/icons/location-red.svg","../../../app/frontend/assets/icons/chat-active.svg","../../../app/frontend/assets/icons/check-circle.svg","../../../app/frontend/assets/icons/warning-alt.svg","../../../node_modules/lodash/_freeGlobal.js","../../../node_modules/lodash/_root.js","../../../node_modules/lodash/_Symbol.js","../../../node_modules/lodash/_arrayMap.js","../../../node_modules/lodash/isArray.js","../../../node_modules/lodash/_getRawTag.js","../../../node_modules/lodash/_objectToString.js","../../../node_modules/lodash/_baseGetTag.js","../../../node_modules/lodash/isObjectLike.js","../../../node_modules/lodash/isSymbol.js","../../../node_modules/lodash/_baseToString.js","../../../node_modules/lodash/toString.js","../../../node_modules/lodash/_baseSlice.js","../../../node_modules/lodash/_castSlice.js","../../../node_modules/lodash/_hasUnicode.js","../../../node_modules/lodash/_asciiToArray.js","../../../node_modules/lodash/_unicodeToArray.js","../../../node_modules/lodash/_stringToArray.js","../../../node_modules/lodash/_createCaseFirst.js","../../../node_modules/lodash/upperFirst.js","../../../node_modules/lodash/capitalize.js","../../../node_modules/lodash/_arrayReduce.js","../../../node_modules/lodash/_basePropertyOf.js","../../../node_modules/lodash/_deburrLetter.js","../../../node_modules/lodash/deburr.js","../../../node_modules/lodash/_asciiWords.js","../../../node_modules/lodash/_hasUnicodeWord.js","../../../node_modules/lodash/_unicodeWords.js","../../../node_modules/lodash/words.js","../../../node_modules/lodash/_createCompounder.js","../../../node_modules/lodash/camelCase.js","../../../app/frontend/utils/date-diff-in-days.ts","../../../app/frontend/utils/geodistance.ts","../../../app/frontend/api/product-bookings.ts","../../../app/frontend/components/product-map.vue","../../../app/frontend/components/product-view-calendar-modal.vue","../../../app/frontend/assets/icons/check.svg","../../../app/frontend/api/addresses.ts","../../../app/frontend/components/product-view-shipping-modal.vue","../../../app/frontend/assets/icons/default-profile.svg","../../../app/frontend/api/user-ratings.ts","../../../app/frontend/components/partner-details-modal.vue","../../../app/frontend/components/product-view.vue","../../../app/frontend/assets/icons/loading.svg","../../../app/frontend/assets/icons/share.svg","../../../app/frontend/assets/icons/chevron-down.svg","../../../app/frontend/assets/icons/help-alt.svg","../../../app/frontend/assets/icons/logout.svg","../../../app/frontend/assets/icons/store.svg","../../../app/frontend/assets/icons/menu-user.svg","../../../app/frontend/assets/icons/bookings.svg","../../../app/frontend/api/partner-accounts.ts","../../../app/frontend/assets/icons/direction-up.svg","../../../app/frontend/components/profile-menu-item.vue","../../../app/frontend/components/profile-menu.vue","../../../app/frontend/components/product-grid.vue","../../../app/frontend/components/search-view.vue","../../../app/frontend/components/faq-view.vue","../../../app/frontend/components/partner-store-view.vue","../../../app/frontend/assets/icons/cross-circle.svg","../../../app/frontend/assets/icons/check-circle-alt.svg","../../../app/frontend/assets/icons/chevron-right-red.svg","../../../app/frontend/components/profile/profile-product-booking-card.vue","../../../app/frontend/assets/icons/warning.svg","../../../app/frontend/assets/icons/information-circle.svg","../../../app/frontend/assets/icons/arrow-small-right.svg","../../../node_modules/property-expr/index.js","../../../node_modules/tiny-case/index.js","../../../node_modules/toposort/index.js","../../../node_modules/yup/index.esm.js","../../../app/frontend/components/profile/profile-product-booking-partner-awaiting-actions.vue","../../../app/frontend/assets/icons/warning-alt-2.svg","../../../app/frontend/components/profile/profile-product-booking-client-awaiting-actions.vue","../../../node_modules/@mercadopago/sdk-js/dist/index.js","../../../app/frontend/components/profile/profile-product-booking-payment-actions.vue","../../../app/frontend/api/product-booking-deliveries.ts","../../../app/frontend/components/begin-delivery-modal.vue","../../../app/frontend/components/profile/profile-product-booking-partner-paid-actions.vue","../../../app/frontend/components/profile/profile-product-booking-client-paid-actions.vue","../../../app/frontend/assets/icons/loading-alt.svg","../../../app/frontend/api/product-booking-returns.ts","../../../app/frontend/components/begin-return-modal.vue","../../../app/frontend/components/profile/profile-product-booking-client-delivered-actions.vue","../../../app/frontend/components/profile/profile-product-booking-partner-delivered-actions.vue","../../../app/frontend/assets/icons/help.svg","../../../app/frontend/api/support-chats.ts","../../../app/frontend/components/support-button.vue","../../../app/frontend/components/profile/profile-product-bookings.vue","../../../app/frontend/assets/icons/card.svg","../../../app/frontend/api/bank-accounts.ts","../../../app/frontend/api/bank-entities.ts","../../../node_modules/rut-helpers/dist/rut-helpers.js","../../../app/frontend/components/profile/profile-new-bank-account-form.vue","../../../app/frontend/components/profile/profile-bank-account.vue","../../../app/frontend/assets/icons/store-alt.svg","../../../app/frontend/assets/icons/share-rectangle.svg","../../../app/frontend/components/profile/profile-products-history.vue","../../../app/frontend/assets/icons/money-bag.svg","../../../app/frontend/components/profile/profile-product-history-details.vue","../../../app/frontend/components/profile/profile-products.vue","../../../app/frontend/assets/icons/location.svg","../../../app/frontend/components/profile/profile-addresses.vue","../../../app/frontend/components/profile/profile-address-detail.vue","../../../app/frontend/components/profile/profile-new-address-form.vue","../../../app/frontend/components/profile/profile-edit-address-form.vue","../../../app/frontend/api/users.ts","../../../app/frontend/utils/generate-url.ts","../../../app/frontend/components/profile/profile-account-ratings-modal.vue","../../../app/frontend/components/profile/profile-account.vue","../../../app/frontend/components/client-details-modal.vue","../../../app/frontend/components/new-delivery-modal.vue","../../../app/frontend/components/new-return-modal.vue","../../../app/frontend/components/profile/profile-product-booking-view.vue","../../../app/frontend/api/product-booking-reports.ts","../../../app/frontend/components/profile/profile-product-booking-report.vue","../../../app/frontend/utils/select-option-tools.ts","../../../app/frontend/components/profile/profile-product-booking-damage-report.vue","../../../app/frontend/components/continue-return-modal.vue","../../../app/frontend/components/location-view.vue","../../../app/frontend/assets/icons/user.svg","../../../app/frontend/assets/icons/star-gold.svg","../../../app/frontend/assets/icons/star-empty.svg","../../../app/frontend/components/new-rating-form.vue","../../../app/frontend/components/product-booking-report-view.vue","../../../app/frontend/assets/icons/pin.svg","../../../app/frontend/utils/scroll-to-top.ts","../../../app/frontend/api/subcategories.ts","../../../app/frontend/components/new-product-step-1.vue","../../../app/frontend/assets/icons/truck.svg","../../../app/frontend/assets/icons/map-pin.svg","../../../app/frontend/components/new-product-address-modal.vue","../../../app/frontend/components/new-product-step-2.vue","../../../app/frontend/components/new-product-step-3.vue","../../../app/frontend/assets/images/picture-modal/image1.png","../../../app/frontend/assets/images/picture-modal/image2.png","../../../app/frontend/assets/images/picture-modal/image3.png","../../../app/frontend/assets/images/picture-modal/image4.png","../../../app/frontend/assets/images/picture-modal/image5.png","../../../app/frontend/assets/images/picture-modal/image6.png","../../../app/frontend/components/new-product-picture-info-modal.vue","../../../app/frontend/components/new-product-step-4.vue","../../../app/frontend/components/new-product-step-5.vue","../../../app/frontend/components/new-product-success-modal.vue","../../../app/frontend/components/new-product-form.vue","../../../app/frontend/assets/icons/trash.svg","../../../app/frontend/components/edit-product-step-4.vue","../../../app/frontend/components/edit-product-form.vue","../../../app/frontend/api/product-requests.ts","../../../app/frontend/components/new-product-request-form.vue","../../../app/frontend/assets/icons/search.svg","../../../app/frontend/components/product-requests-grid.vue","../../../app/frontend/components/product-request-view.vue","../../../app/frontend/components/payment-success.vue","../../../app/frontend/components/payment-failure.vue","../../../app/frontend/components/support-chat-view.vue","../../../app/frontend/assets/icons/chevron-left-turquoise.svg","../../../app/frontend/components/verify-view.vue","../../../app/frontend/components/support-chat-card.vue","../../../app/frontend/components/support-chats-view.vue","../../../app/frontend/components/base/base-button.vue","../../../app/frontend/components/base/base-file-input.vue","../../../app/frontend/assets/icons/eye-off.svg","../../../app/frontend/assets/icons/eye.svg","../../../app/frontend/components/base/base-input.vue","../../../node_modules/vue-currency-input/dist/index.mjs","../../../app/frontend/components/base/base-currency-input.vue","../../../app/frontend/components/base/base-label.vue","../../../app/frontend/components/base/base-select.vue","../../../app/frontend/assets/icons/image-add.svg","../../../app/frontend/components/base/base-drag-and-drop.vue","../../../node_modules/qrcode/lib/can-promise.js","../../../node_modules/qrcode/lib/core/utils.js","../../../node_modules/qrcode/lib/core/error-correction-level.js","../../../node_modules/qrcode/lib/core/bit-buffer.js","../../../node_modules/qrcode/lib/core/bit-matrix.js","../../../node_modules/qrcode/lib/core/alignment-pattern.js","../../../node_modules/qrcode/lib/core/finder-pattern.js","../../../node_modules/qrcode/lib/core/mask-pattern.js","../../../node_modules/qrcode/lib/core/error-correction-code.js","../../../node_modules/qrcode/lib/core/galois-field.js","../../../node_modules/qrcode/lib/core/polynomial.js","../../../node_modules/qrcode/lib/core/reed-solomon-encoder.js","../../../node_modules/qrcode/lib/core/version-check.js","../../../node_modules/qrcode/lib/core/regex.js","../../../node_modules/qrcode/lib/core/mode.js","../../../node_modules/qrcode/lib/core/version.js","../../../node_modules/qrcode/lib/core/format-info.js","../../../node_modules/qrcode/lib/core/numeric-data.js","../../../node_modules/qrcode/lib/core/alphanumeric-data.js","../../../node_modules/encode-utf8/index.js","../../../node_modules/qrcode/lib/core/byte-data.js","../../../node_modules/qrcode/lib/core/kanji-data.js","../../../node_modules/dijkstrajs/dijkstra.js","../../../node_modules/qrcode/lib/core/segments.js","../../../node_modules/qrcode/lib/core/qrcode.js","../../../node_modules/qrcode/lib/renderer/utils.js","../../../node_modules/qrcode/lib/renderer/canvas.js","../../../node_modules/qrcode/lib/renderer/svg-tag.js","../../../node_modules/qrcode/lib/browser.js","../../../app/frontend/components/base/base-qr-code.vue","../../../app/frontend/assets/icons/idea.svg","../../../app/frontend/components/base/base-tip.vue","../../../app/frontend/assets/icons/minus.svg","../../../app/frontend/components/base/base-counter.vue","../../../node_modules/@googlemaps/js-api-loader/dist/index.mjs","../../../app/frontend/components/base/base-google-autocomplete.vue","../../../app/frontend/components/base/base-stars.vue","../../../app/frontend/components/base/base-ribbon-alert.vue","../../../app/frontend/components/base/base-progress-bar.vue","../../../app/frontend/components/session-handler.vue","../../../app/frontend/components/the-booking-alert-overlay.vue","../../../app/frontend/assets/images/zirkular-logo.png","../../../app/frontend/assets/icons/mail.svg","../../../app/frontend/assets/icons/instagram.svg","../../../app/frontend/assets/icons/facebook.svg","../../../app/frontend/components/the-footer.vue","../../../app/frontend/assets/icons/menu-home.svg","../../../app/frontend/assets/icons/menu-home-active.svg","../../../app/frontend/assets/icons/bag-add.svg","../../../app/frontend/assets/icons/bag-add-active.svg","../../../app/frontend/assets/icons/user-active.svg","../../../app/frontend/assets/icons/chat.svg","../../../app/frontend/components/the-menubar.vue","../../../app/frontend/assets/icons/menu.svg","../../../app/frontend/assets/icons/bag.svg","../../../app/frontend/assets/icons/box.svg","../../../app/frontend/api/categories.ts","../../../app/frontend/components/the-navbar-search.vue","../../../app/frontend/components/the-navbar-menu.vue","../../../app/frontend/assets/icons/notification.svg","../../../app/frontend/assets/icons/notification-gray.svg","../../../app/frontend/api/notifications.ts","../../../app/frontend/components/notification-card.vue","../../../app/frontend/components/notification-dropdown.vue","../../../app/frontend/components/the-navbar.vue","../../../app/frontend/components/the-notification-overlay.vue","../../../app/frontend/api/referral-codes.ts","../../../app/frontend/components/referral-code-input.vue","../../../app/frontend/assets/icons/gmail.svg","../../../app/frontend/components/google-register-button.vue","../../../app/frontend/components/google-oauth-redirect.vue","../../../app/frontend/components/register-form.vue","../../../app/frontend/components/referral-code-input-retriever.vue","../../../app/frontend/assets/icons/whatsapp.png","../../../app/frontend/components/the-whatsapp-button.vue","../../../node_modules/@intlify/shared/dist/shared.esm-bundler.js","../../../node_modules/@intlify/message-compiler/dist/message-compiler.esm-bundler.js","../../../node_modules/@intlify/core-base/dist/core-base.esm-bundler.js","../../../node_modules/vue-i18n/dist/vue-i18n.esm-bundler.js","../../../app/frontend/locales/es.ts","../../../app/frontend/locales/locales.ts","../../../app/frontend/utils/i18n.ts","../../../app/frontend/entrypoints/application.ts"],"sourcesContent":["import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n var dayOfMonth = date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport addDays from \"../addDays/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name add\n * @category Common Helpers\n * @summary Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.\n *\n * @description\n * Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n *\n * | Key | Description |\n * |----------------|------------------------------------|\n * | years | Amount of years to be added |\n * | months | Amount of months to be added |\n * | weeks | Amount of weeks to be added |\n * | days | Amount of days to be added |\n * | hours | Amount of hours to be added |\n * | minutes | Amount of minutes to be added |\n * | seconds | Amount of seconds to be added |\n *\n * All values default to 0\n *\n * @returns {Date} the new date with the seconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add the following duration to 1 September 2014, 10:19:50\n * const result = add(new Date(2014, 8, 1, 10, 19, 50), {\n * years: 2,\n * months: 9,\n * weeks: 1,\n * days: 7,\n * hours: 5,\n * minutes: 9,\n * seconds: 30,\n * })\n * //=> Thu Jun 15 2017 15:29:20\n */\nexport default function add(dirtyDate, duration) {\n requiredArgs(2, arguments);\n if (!duration || _typeof(duration) !== 'object') return new Date(NaN);\n var years = duration.years ? toInteger(duration.years) : 0;\n var months = duration.months ? toInteger(duration.months) : 0;\n var weeks = duration.weeks ? toInteger(duration.weeks) : 0;\n var days = duration.days ? toInteger(duration.days) : 0;\n var hours = duration.hours ? toInteger(duration.hours) : 0;\n var minutes = duration.minutes ? toInteger(duration.minutes) : 0;\n var seconds = duration.seconds ? toInteger(duration.seconds) : 0;\n\n // Add years and months\n var date = toDate(dirtyDate);\n var dateWithMonths = months || years ? addMonths(date, months + years * 12) : date;\n\n // Add weeks and days\n var dateWithDays = days || weeks ? addDays(dateWithMonths, days + weeks * 7) : dateWithMonths;\n\n // Add days, hours, minutes and seconds\n var minutesToAdd = minutes + hours * 60;\n var secondsToAdd = seconds + minutesToAdd * 60;\n var msToAdd = secondsToAdd * 1000;\n var finalDate = new Date(dateWithDays.getTime() + msToAdd);\n return finalDate;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport default function startOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport default function compareAsc(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var diff = dateLeft.getTime() - dateRight.getTime();\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1;\n // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}","import startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day (and year and month)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport default function isSameDay(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeftStartOfDay = startOfDay(dirtyDateLeft);\n var dateRightStartOfDay = startOfDay(dirtyDateRight);\n return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport default function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n var monthDiff = dateLeft.getMonth() - dateRight.getMonth();\n return yearDiff * 12 + monthDiff;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\nexport default function differenceInMilliseconds(dateLeft, dateRight) {\n requiredArgs(2, arguments);\n return toDate(dateLeft).getTime() - toDate(dateRight).getTime();\n}","var roundingMap = {\n ceil: Math.ceil,\n round: Math.round,\n floor: Math.floor,\n trunc: function trunc(value) {\n return value < 0 ? Math.ceil(value) : Math.floor(value);\n } // Math.trunc is not supported by IE\n};\n\nvar defaultRoundingMethod = 'trunc';\nexport function getRoundingMethod(method) {\n return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport default function endOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport default function endOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport endOfDay from \"../endOfDay/index.js\";\nimport endOfMonth from \"../endOfMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is the last day of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * const result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\nexport default function isLastDayOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n return endOfDay(date).getTime() === endOfMonth(date).getTime();\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarMonths from \"../differenceInCalendarMonths/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport isLastDayOfMonth from \"../isLastDayOfMonth/index.js\";\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates using trunc as a default rounding method.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nexport default function differenceInMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var sign = compareAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight));\n var result;\n\n // Check for the difference of less than month\n if (difference < 1) {\n result = 0;\n } else {\n if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n dateLeft.setDate(30);\n }\n dateLeft.setMonth(dateLeft.getMonth() - sign * difference);\n\n // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign;\n\n // Check for cases of one full calendar month\n if (isLastDayOfMonth(toDate(dirtyDateLeft)) && difference === 1 && compareAsc(dirtyDateLeft, dateRight) === 1) {\n isLastMonthNotFull = false;\n }\n result = sign * (difference - Number(isLastMonthNotFull));\n }\n\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}","import differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of seconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nexport default function differenceInSeconds(dateLeft, dateRight, options) {\n requiredArgs(2, arguments);\n var diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name eachDayOfInterval\n * @category Interval Helpers\n * @summary Return the array of dates within the specified time interval.\n *\n * @description\n * Return the array of dates within the specified time interval.\n *\n * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @param {Object} [options] - an object with options.\n * @param {Number} [options.step=1] - the step to increment by. The value should be more than 1.\n * @returns {Date[]} the array with starts of days from the day of the interval start to the day of the interval end\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.step` must be a number greater than 1\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * const result = eachDayOfInterval({\n * start: new Date(2014, 9, 6),\n * end: new Date(2014, 9, 10)\n * })\n * //=> [\n * // Mon Oct 06 2014 00:00:00,\n * // Tue Oct 07 2014 00:00:00,\n * // Wed Oct 08 2014 00:00:00,\n * // Thu Oct 09 2014 00:00:00,\n * // Fri Oct 10 2014 00:00:00\n * // ]\n */\nexport default function eachDayOfInterval(dirtyInterval, options) {\n var _options$step;\n requiredArgs(1, arguments);\n var interval = dirtyInterval || {};\n var startDate = toDate(interval.start);\n var endDate = toDate(interval.end);\n var endTime = endDate.getTime();\n\n // Throw an exception if start date is after end date or if any date is `Invalid Date`\n if (!(startDate.getTime() <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n var dates = [];\n var currentDate = startDate;\n currentDate.setHours(0, 0, 0, 0);\n var step = Number((_options$step = options === null || options === void 0 ? void 0 : options.step) !== null && _options$step !== void 0 ? _options$step : 1);\n if (step < 1 || isNaN(step)) throw new RangeError('`options.step` must be a number greater than 1');\n while (currentDate.getTime() <= endTime) {\n dates.push(toDate(currentDate));\n currentDate.setDate(currentDate.getDate() + step);\n currentDate.setHours(0, 0, 0, 0);\n }\n return dates;\n}","export default function assign(target, object) {\n if (target == null) {\n throw new TypeError('assign requires that input parameter not be null or undefined');\n }\n for (var property in object) {\n if (Object.prototype.hasOwnProperty.call(object, property)) {\n ;\n target[property] = object[property];\n }\n }\n return target;\n}","import assign from \"../assign/index.js\";\nexport default function cloneObject(object) {\n return assign({}, object);\n}","import { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport differenceInMonths from \"../differenceInMonths/index.js\";\nimport differenceInSeconds from \"../differenceInSeconds/index.js\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport cloneObject from \"../_lib/cloneObject/index.js\";\nimport assign from \"../_lib/assign/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MINUTES_IN_DAY = 1440;\nvar MINUTES_IN_ALMOST_TWO_DAYS = 2520;\nvar MINUTES_IN_MONTH = 43200;\nvar MINUTES_IN_TWO_MONTHS = 86400;\n\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @param {Date|Number} date - the date\n * @param {Date|Number} baseDate - the date to compare with\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `baseDate` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistance(dirtyDate, dirtyBaseDate, options) {\n var _ref, _options$locale;\n requiredArgs(2, arguments);\n var defaultOptions = getDefaultOptions();\n var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n if (!locale.formatDistance) {\n throw new RangeError('locale must contain formatDistance property');\n }\n var comparison = compareAsc(dirtyDate, dirtyBaseDate);\n if (isNaN(comparison)) {\n throw new RangeError('Invalid time value');\n }\n var localizeOptions = assign(cloneObject(options), {\n addSuffix: Boolean(options === null || options === void 0 ? void 0 : options.addSuffix),\n comparison: comparison\n });\n var dateLeft;\n var dateRight;\n if (comparison > 0) {\n dateLeft = toDate(dirtyBaseDate);\n dateRight = toDate(dirtyDate);\n } else {\n dateLeft = toDate(dirtyDate);\n dateRight = toDate(dirtyBaseDate);\n }\n var seconds = differenceInSeconds(dateRight, dateLeft);\n var offsetInSeconds = (getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft)) / 1000;\n var minutes = Math.round((seconds - offsetInSeconds) / 60);\n var months;\n\n // 0 up to 2 mins\n if (minutes < 2) {\n if (options !== null && options !== void 0 && options.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance('lessThanXSeconds', 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance('lessThanXSeconds', 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance('lessThanXSeconds', 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance('halfAMinute', 0, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', minutes, localizeOptions);\n }\n }\n\n // 2 mins up to 0.75 hrs\n } else if (minutes < 45) {\n return locale.formatDistance('xMinutes', minutes, localizeOptions);\n\n // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance('aboutXHours', 1, localizeOptions);\n\n // 1.5 hrs up to 24 hrs\n } else if (minutes < MINUTES_IN_DAY) {\n var hours = Math.round(minutes / 60);\n return locale.formatDistance('aboutXHours', hours, localizeOptions);\n\n // 1 day up to 1.75 days\n } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {\n return locale.formatDistance('xDays', 1, localizeOptions);\n\n // 1.75 days up to 30 days\n } else if (minutes < MINUTES_IN_MONTH) {\n var days = Math.round(minutes / MINUTES_IN_DAY);\n return locale.formatDistance('xDays', days, localizeOptions);\n\n // 1 month up to 2 months\n } else if (minutes < MINUTES_IN_TWO_MONTHS) {\n months = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('aboutXMonths', months, localizeOptions);\n }\n months = differenceInMonths(dateRight, dateLeft);\n\n // 2 months up to 12 months\n if (months < 12) {\n var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('xMonths', nearestMonth, localizeOptions);\n\n // 1 year up to max Date\n } else {\n var monthsSinceStartOfYear = months % 12;\n var years = Math.floor(months / 12);\n\n // N years up to 1 years 3 months\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance('aboutXYears', years, localizeOptions);\n\n // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance('overXYears', years, localizeOptions);\n\n // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance('almostXYears', years + 1, localizeOptions);\n }\n }\n}","import { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport cloneObject from \"../_lib/cloneObject/index.js\";\nimport assign from \"../_lib/assign/index.js\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_MINUTE = 1000 * 60;\nvar MINUTES_IN_DAY = 60 * 24;\nvar MINUTES_IN_MONTH = MINUTES_IN_DAY * 30;\nvar MINUTES_IN_YEAR = MINUTES_IN_DAY * 365;\n\n/**\n * @name formatDistanceStrict\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words, using strict units.\n * This is like `formatDistance`, but does not use helpers like 'almost', 'over',\n * 'less than' and the like.\n *\n * | Distance between dates | Result |\n * |------------------------|---------------------|\n * | 0 ... 59 secs | [0..59] seconds |\n * | 1 ... 59 mins | [1..59] minutes |\n * | 1 ... 23 hrs | [1..23] hours |\n * | 1 ... 29 days | [1..29] days |\n * | 1 ... 11 months | [1..11] months |\n * | 1 ... N years | [1..N] years |\n *\n * @param {Date|Number} date - the date\n * @param {Date|Number} baseDate - the date to compare with\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {'second'|'minute'|'hour'|'day'|'month'|'year'} [options.unit] - if specified, will force a unit\n * @param {'floor'|'ceil'|'round'} [options.roundingMethod='round'] - which way to round partial units\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `baseDate` must not be Invalid Date\n * @throws {RangeError} `options.roundingMethod` must be 'floor', 'ceil' or 'round'\n * @throws {RangeError} `options.unit` must be 'second', 'minute', 'hour', 'day', 'month' or 'year'\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistanceStrict(new Date(2014, 6, 2), new Date(2015, 0, 2))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00?\n * const result = formatDistanceStrict(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0)\n * )\n * //=> '15 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistanceStrict(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> '1 year ago'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, in minutes?\n * const result = formatDistanceStrict(new Date(2016, 0, 1), new Date(2015, 0, 1), {\n * unit: 'minute'\n * })\n * //=> '525600 minutes'\n *\n * @example\n * // What is the distance from 1 January 2015\n * // to 28 January 2015, in months, rounded up?\n * const result = formatDistanceStrict(new Date(2015, 0, 28), new Date(2015, 0, 1), {\n * unit: 'month',\n * roundingMethod: 'ceil'\n * })\n * //=> '1 month'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistanceStrict(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> '1 jaro'\n */\n\nexport default function formatDistanceStrict(dirtyDate, dirtyBaseDate, options) {\n var _ref, _options$locale, _options$roundingMeth;\n requiredArgs(2, arguments);\n var defaultOptions = getDefaultOptions();\n var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n if (!locale.formatDistance) {\n throw new RangeError('locale must contain localize.formatDistance property');\n }\n var comparison = compareAsc(dirtyDate, dirtyBaseDate);\n if (isNaN(comparison)) {\n throw new RangeError('Invalid time value');\n }\n var localizeOptions = assign(cloneObject(options), {\n addSuffix: Boolean(options === null || options === void 0 ? void 0 : options.addSuffix),\n comparison: comparison\n });\n var dateLeft;\n var dateRight;\n if (comparison > 0) {\n dateLeft = toDate(dirtyBaseDate);\n dateRight = toDate(dirtyDate);\n } else {\n dateLeft = toDate(dirtyDate);\n dateRight = toDate(dirtyBaseDate);\n }\n var roundingMethod = String((_options$roundingMeth = options === null || options === void 0 ? void 0 : options.roundingMethod) !== null && _options$roundingMeth !== void 0 ? _options$roundingMeth : 'round');\n var roundingMethodFn;\n if (roundingMethod === 'floor') {\n roundingMethodFn = Math.floor;\n } else if (roundingMethod === 'ceil') {\n roundingMethodFn = Math.ceil;\n } else if (roundingMethod === 'round') {\n roundingMethodFn = Math.round;\n } else {\n throw new RangeError(\"roundingMethod must be 'floor', 'ceil' or 'round'\");\n }\n var milliseconds = dateRight.getTime() - dateLeft.getTime();\n var minutes = milliseconds / MILLISECONDS_IN_MINUTE;\n var timezoneOffset = getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft);\n\n // Use DST-normalized difference in minutes for years, months and days;\n // use regular difference in minutes for hours, minutes and seconds.\n var dstNormalizedMinutes = (milliseconds - timezoneOffset) / MILLISECONDS_IN_MINUTE;\n var defaultUnit = options === null || options === void 0 ? void 0 : options.unit;\n var unit;\n if (!defaultUnit) {\n if (minutes < 1) {\n unit = 'second';\n } else if (minutes < 60) {\n unit = 'minute';\n } else if (minutes < MINUTES_IN_DAY) {\n unit = 'hour';\n } else if (dstNormalizedMinutes < MINUTES_IN_MONTH) {\n unit = 'day';\n } else if (dstNormalizedMinutes < MINUTES_IN_YEAR) {\n unit = 'month';\n } else {\n unit = 'year';\n }\n } else {\n unit = String(defaultUnit);\n }\n\n // 0 up to 60 seconds\n if (unit === 'second') {\n var seconds = roundingMethodFn(milliseconds / 1000);\n return locale.formatDistance('xSeconds', seconds, localizeOptions);\n\n // 1 up to 60 mins\n } else if (unit === 'minute') {\n var roundedMinutes = roundingMethodFn(minutes);\n return locale.formatDistance('xMinutes', roundedMinutes, localizeOptions);\n\n // 1 up to 24 hours\n } else if (unit === 'hour') {\n var hours = roundingMethodFn(minutes / 60);\n return locale.formatDistance('xHours', hours, localizeOptions);\n\n // 1 up to 30 days\n } else if (unit === 'day') {\n var days = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_DAY);\n return locale.formatDistance('xDays', days, localizeOptions);\n\n // 1 up to 12 months\n } else if (unit === 'month') {\n var months = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_MONTH);\n return months === 12 && defaultUnit !== 'month' ? locale.formatDistance('xYears', 1, localizeOptions) : locale.formatDistance('xMonths', months, localizeOptions);\n\n // 1 year up to max Date\n } else if (unit === 'year') {\n var years = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_YEAR);\n return locale.formatDistance('xYears', years, localizeOptions);\n }\n throw new RangeError(\"unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'\");\n}","import distanceInWords from \"../formatDistance/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name formatDistanceToNow\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance to now | Result |\n * |---------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result specifies if now is earlier or later than the passed date\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * const result = formatDistanceToNow(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * const result = formatDistanceToNow(\n * new Date(2015, 0, 1, 0, 0, 15),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * const result = formatDistanceToNow(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * const eoLocale = require('date-fns/locale/eo')\n * const result = formatDistanceToNow(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\nexport default function formatDistanceToNow(dirtyDate, options) {\n requiredArgs(1, arguments);\n return distanceInWords(dirtyDate, Date.now(), options);\n}","import formatDistanceStrict from \"../formatDistanceStrict/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name formatDistanceToNowStrict\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given dates in words, using strict units.\n * This is like `formatDistance`, but does not use helpers like 'almost', 'over',\n * 'less than' and the like.\n *\n * | Distance between dates | Result |\n * |------------------------|---------------------|\n * | 0 ... 59 secs | [0..59] seconds |\n * | 1 ... 59 mins | [1..59] minutes |\n * | 1 ... 23 hrs | [1..23] hours |\n * | 1 ... 29 days | [1..29] days |\n * | 1 ... 11 months | [1..11] months |\n * | 1 ... N years | [1..N] years |\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {'second'|'minute'|'hour'|'day'|'month'|'year'} [options.unit] - if specified, will force a unit\n * @param {'floor'|'ceil'|'round'} [options.roundingMethod='round'] - which way to round partial units\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * const result = formatDistanceToNowStrict(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * const result = formatDistanceToNowStrict(\n * new Date(2015, 0, 1, 0, 0, 15)\n * )\n * //=> '15 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * const result = formatDistanceToNowStrict(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in 1 year'\n *\n * @example\n * // If today is 28 January 2015,\n * // what is the distance to 1 January 2015, in months, rounded up??\n * const result = formatDistanceToNowStrict(new Date(2015, 0, 1), {\n * unit: 'month',\n * roundingMethod: 'ceil'\n * })\n * //=> '1 month'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016 in Esperanto?\n * const eoLocale = require('date-fns/locale/eo')\n * const result = formatDistanceToNowStrict(\n * new Date(2016, 0, 1),\n * {locale: eoLocale}\n * )\n * //=> '1 jaro'\n */\nexport default function formatDistanceToNowStrict(dirtyDate, options) {\n requiredArgs(1, arguments);\n return formatDistanceStrict(dirtyDate, Date.now(), options);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isPast\n * @category Common Helpers\n * @summary Is the given date in the past?\n * @pure false\n *\n * @description\n * Is the given date in the past?\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is in the past\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // If today is 6 October 2014, is 2 July 2014 in the past?\n * const result = isPast(new Date(2014, 6, 2))\n * //=> true\n */\nexport default function isPast(dirtyDate) {\n requiredArgs(1, arguments);\n return toDate(dirtyDate).getTime() < Date.now();\n}","import isSameDay from \"../isSameDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isToday\n * @category Day Helpers\n * @summary Is the given date today?\n * @pure false\n *\n * @description\n * Is the given date today?\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is today\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // If today is 6 October 2014, is 6 October 14:00:00 today?\n * const result = isToday(new Date(2014, 9, 6, 14, 0))\n * //=> true\n */\nexport default function isToday(dirtyDate) {\n requiredArgs(1, arguments);\n return isSameDay(dirtyDate, Date.now());\n}","import { getDefaultOptions, setDefaultOptions as setInternalDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setDefaultOptions\n * @category Common Helpers\n * @summary Set default options including locale.\n * @pure false\n *\n * @description\n * Sets the defaults for\n * `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`\n * arguments for all functions.\n *\n * @param {Object} newOptions - an object with options.\n * @param {Locale} [newOptions.locale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [newOptions.weekStartsOn] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [newOptions.firstWeekContainsDate] - the day of January, which is always in the first week of the year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Set global locale:\n * import { es } from 'date-fns/locale'\n * setDefaultOptions({ locale: es })\n * const result = format(new Date(2014, 8, 2), 'PPPP')\n * //=> 'martes, 2 de septiembre de 2014'\n *\n * @example\n * // Start of the week for 2 September 2014:\n * const result = startOfWeek(new Date(2014, 8, 2))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // Start of the week for 2 September 2014,\n * // when we set that week starts on Monday by default:\n * setDefaultOptions({ weekStartsOn: 1 })\n * const result = startOfWeek(new Date(2014, 8, 2))\n * //=> Mon Sep 01 2014 00:00:00\n *\n * @example\n * // Manually set options take priority over default options:\n * setDefaultOptions({ weekStartsOn: 1 })\n * const result = startOfWeek(new Date(2014, 8, 2), { weekStartsOn: 0 })\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // Remove the option by setting it to `undefined`:\n * setDefaultOptions({ weekStartsOn: 1 })\n * setDefaultOptions({ weekStartsOn: undefined })\n * const result = startOfWeek(new Date(2014, 8, 2))\n * //=> Sun Aug 31 2014 00:00:00\n */\nexport default function setDefaultOptions(newOptions) {\n requiredArgs(1, arguments);\n var result = {};\n var defaultOptions = getDefaultOptions();\n for (var property in defaultOptions) {\n if (Object.prototype.hasOwnProperty.call(defaultOptions, property)) {\n ;\n result[property] = defaultOptions[property];\n }\n }\n for (var _property in newOptions) {\n if (Object.prototype.hasOwnProperty.call(newOptions, _property)) {\n if (newOptions[_property] === undefined) {\n delete result[_property];\n } else {\n ;\n result[_property] = newOptions[_property];\n }\n }\n }\n setInternalDefaultOptions(result);\n}","import * as Vue from 'vue'\n\nvar isVue2 = false\nvar isVue3 = true\nvar Vue2 = undefined\n\nfunction install() {}\n\nexport function set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key)\n target.splice(key, 1, val)\n return val\n }\n target[key] = val\n return val\n}\n\nexport function del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1)\n return\n }\n delete target[key]\n}\n\nexport * from 'vue'\nexport {\n Vue,\n Vue2,\n isVue2,\n isVue3,\n install,\n}\n","/*!\n * pinia v2.1.7\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nimport { hasInjectionContext, inject, toRaw, watch, unref, markRaw, effectScope, ref, isVue2, isRef, isReactive, set, getCurrentScope, onScopeDispose, getCurrentInstance, reactive, toRef, del, nextTick, computed, toRefs } from 'vue-demi';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\n/**\n * setActivePinia must be called to handle SSR at the top of functions like\n * `fetch`, `setup`, `serverPrefetch` and others\n */\nlet activePinia;\n/**\n * Sets or unsets the active pinia. Used in SSR and internally when calling\n * actions and getters\n *\n * @param pinia - Pinia instance\n */\n// @ts-expect-error: cannot constrain the type of the return\nconst setActivePinia = (pinia) => (activePinia = pinia);\n/**\n * Get the currently active pinia if there is any.\n */\nconst getActivePinia = () => (hasInjectionContext() && inject(piniaSymbol)) || activePinia;\nconst piniaSymbol = ((process.env.NODE_ENV !== 'production') ? Symbol('pinia') : /* istanbul ignore next */ Symbol());\n\nfunction isPlainObject(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\no) {\n return (o &&\n typeof o === 'object' &&\n Object.prototype.toString.call(o) === '[object Object]' &&\n typeof o.toJSON !== 'function');\n}\n// type DeepReadonly = { readonly [P in keyof T]: DeepReadonly }\n// TODO: can we change these to numbers?\n/**\n * Possible types for SubscriptionCallback\n */\nvar MutationType;\n(function (MutationType) {\n /**\n * Direct mutation of the state:\n *\n * - `store.name = 'new name'`\n * - `store.$state.name = 'new name'`\n * - `store.list.push('new item')`\n */\n MutationType[\"direct\"] = \"direct\";\n /**\n * Mutated the state with `$patch` and an object\n *\n * - `store.$patch({ name: 'newName' })`\n */\n MutationType[\"patchObject\"] = \"patch object\";\n /**\n * Mutated the state with `$patch` and a function\n *\n * - `store.$patch(state => state.name = 'newName')`\n */\n MutationType[\"patchFunction\"] = \"patch function\";\n // maybe reset? for $state = {} and $reset\n})(MutationType || (MutationType = {}));\n\nconst IS_CLIENT = typeof window !== 'undefined';\n/**\n * Should we add the devtools plugins.\n * - only if dev mode or forced through the prod devtools flag\n * - not in test\n * - only if window exists (could change in the future)\n */\nconst USE_DEVTOOLS = ((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test') && IS_CLIENT;\n\n/*\n * FileSaver.js A saveAs() FileSaver implementation.\n *\n * Originally by Eli Grey, adapted as an ESM module by Eduardo San Martin\n * Morote.\n *\n * License : MIT\n */\n// The one and only way of getting global scope in all environments\n// https://stackoverflow.com/q/3277182/1008999\nconst _global = /*#__PURE__*/ (() => typeof window === 'object' && window.window === window\n ? window\n : typeof self === 'object' && self.self === self\n ? self\n : typeof global === 'object' && global.global === global\n ? global\n : typeof globalThis === 'object'\n ? globalThis\n : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n // prepend BOM for UTF-8 XML and text/* types (including HTML)\n // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n if (autoBom &&\n /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url);\n xhr.responseType = 'blob';\n xhr.onload = function () {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function () {\n console.error('could not download file');\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n // use sync to avoid popup blocker\n xhr.open('HEAD', url, false);\n try {\n xhr.send();\n }\n catch (e) { }\n return xhr.status >= 200 && xhr.status <= 299;\n}\n// `a.click()` doesn't work for all browsers (#465)\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent('click'));\n }\n catch (e) {\n const evt = document.createEvent('MouseEvents');\n evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = \n typeof navigator === 'object' ? navigator : { userAgent: '' };\n// Detect WebView inside a native macOS app by ruling out all browsers\n// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too\n// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos\nconst isMacOSWebView = /*#__PURE__*/ (() => /Macintosh/.test(_navigator.userAgent) &&\n /AppleWebKit/.test(_navigator.userAgent) &&\n !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT\n ? () => { } // noop\n : // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== 'undefined' &&\n 'download' in HTMLAnchorElement.prototype &&\n !isMacOSWebView\n ? downloadSaveAs\n : // Use msSaveOrOpenBlob as a second approach\n 'msSaveOrOpenBlob' in _navigator\n ? msSaveAs\n : // Fallback to using FileReader and a popup\n fileSaverSaveAs;\nfunction downloadSaveAs(blob, name = 'download', opts) {\n const a = document.createElement('a');\n a.download = name;\n a.rel = 'noopener'; // tabnabbing\n // TODO: detect chrome extensions & packaged apps\n // a.target = '_blank'\n if (typeof blob === 'string') {\n // Support regular links\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n }\n else {\n a.target = '_blank';\n click(a);\n }\n }\n else {\n click(a);\n }\n }\n else {\n // Support blobs\n a.href = URL.createObjectURL(blob);\n setTimeout(function () {\n URL.revokeObjectURL(a.href);\n }, 4e4); // 40s\n setTimeout(function () {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = 'download', opts) {\n if (typeof blob === 'string') {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n }\n else {\n const a = document.createElement('a');\n a.href = blob;\n a.target = '_blank';\n setTimeout(function () {\n click(a);\n });\n }\n }\n else {\n // @ts-ignore: works on windows\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n // Open a popup immediately do go around popup blocker\n // Mostly only available on user interaction and the fileReader is async so...\n popup = popup || open('', '_blank');\n if (popup) {\n popup.document.title = popup.document.body.innerText = 'downloading...';\n }\n if (typeof blob === 'string')\n return download(blob, name, opts);\n const force = blob.type === 'application/octet-stream';\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || 'safari' in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || (force && isSafari) || isMacOSWebView) &&\n typeof FileReader !== 'undefined') {\n // Safari doesn't allow downloading of blob URLs\n const reader = new FileReader();\n reader.onloadend = function () {\n let url = reader.result;\n if (typeof url !== 'string') {\n popup = null;\n throw new Error('Wrong reader.result type');\n }\n url = isChromeIOS\n ? url\n : url.replace(/^data:[^;]*;/, 'data:attachment/file;');\n if (popup) {\n popup.location.href = url;\n }\n else {\n location.assign(url);\n }\n popup = null; // reverse-tabnabbing #460\n };\n reader.readAsDataURL(blob);\n }\n else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null; // reverse-tabnabbing #460\n setTimeout(function () {\n URL.revokeObjectURL(url);\n }, 4e4); // 40s\n }\n}\n\n/**\n * Shows a toast or console.log\n *\n * @param message - message to log\n * @param type - different color of the tooltip\n */\nfunction toastMessage(message, type) {\n const piniaMessage = '🍍 ' + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === 'function') {\n // No longer available :(\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type);\n }\n else if (type === 'error') {\n console.error(piniaMessage);\n }\n else if (type === 'warn') {\n console.warn(piniaMessage);\n }\n else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return '_a' in o && 'install' in o;\n}\n\n/**\n * This file contain devtools actions, they are not Pinia actions.\n */\n// ---\nfunction checkClipboardAccess() {\n if (!('clipboard' in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, 'error');\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error &&\n error.message.toLowerCase().includes('document is not focused')) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', 'warn');\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia.state.value));\n toastMessage('Global state copied to clipboard.');\n }\n catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia) {\n if (checkClipboardAccess())\n return;\n try {\n loadStoresState(pinia, JSON.parse(await navigator.clipboard.readText()));\n toastMessage('Global state pasted from clipboard.');\n }\n catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia) {\n try {\n saveAs(new Blob([JSON.stringify(pinia.state.value)], {\n type: 'text/plain;charset=utf-8',\n }), 'pinia-state.json');\n }\n catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement('input');\n fileInput.type = 'file';\n fileInput.accept = '.json';\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n // @ts-ignore: TODO: changed from 4.3 to 4.4\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia) {\n try {\n const open = getFileOpener();\n const result = await open();\n if (!result)\n return;\n const { text, file } = result;\n loadStoresState(pinia, JSON.parse(text));\n toastMessage(`Global state imported from \"${file.name}\".`);\n }\n catch (error) {\n toastMessage(`Failed to import the state from JSON. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nfunction loadStoresState(pinia, state) {\n for (const key in state) {\n const storeState = pinia.state.value[key];\n // store is already instantiated, patch it\n if (storeState) {\n Object.assign(storeState, state[key]);\n }\n else {\n // store is not instantiated, set the initial state\n pinia.state.value[key] = state[key];\n }\n }\n}\n\nfunction formatDisplay(display) {\n return {\n _custom: {\n display,\n },\n };\n}\nconst PINIA_ROOT_LABEL = '🍍 Pinia (root)';\nconst PINIA_ROOT_ID = '_root';\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store)\n ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL,\n }\n : {\n id: store.$id,\n label: store.$id,\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId],\n })),\n getters: storeNames\n .filter((id) => storeMap.get(id)._getters)\n .map((id) => {\n const store = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store._getters.reduce((getters, key) => {\n getters[key] = store[key];\n return getters;\n }, {}),\n };\n }),\n };\n return state;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key],\n })),\n };\n // avoid adding empty getters\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName],\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key],\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n // TODO: handle add and delete for arrays and objects\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {},\n });\n }\n else {\n return {\n operation: formatDisplay(events.type),\n key: formatDisplay(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue,\n };\n }\n}\nfunction formatMutationType(type) {\n switch (type) {\n case MutationType.direct:\n return 'mutation';\n case MutationType.patchFunction:\n return '$patch';\n case MutationType.patchObject:\n return '$patch';\n default:\n return 'unknown';\n }\n}\n\n// timeline can be paused when directly changing the state\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = 'pinia:mutations';\nconst INSPECTOR_ID = 'pinia';\nconst { assign: assign$1 } = Object;\n/**\n * Gets the displayed name of a store in devtools\n *\n * @param id - id of the store\n * @returns a formatted string\n */\nconst getStoreType = (id) => '🍍 ' + id;\n/**\n * Add the pinia plugin without any store. Allows displaying a Pinia plugin tab\n * as soon as it is added to the application.\n *\n * @param app - Vue application\n * @param pinia - pinia instance\n */\nfunction registerPiniaDevtools(app, pinia) {\n setupDevtoolsPlugin({\n id: 'dev.esm.pinia',\n label: 'Pinia 🍍',\n logo: 'https://pinia.vuejs.org/logo.svg',\n packageName: 'pinia',\n homepage: 'https://pinia.vuejs.org',\n componentStateTypes,\n app,\n }, (api) => {\n if (typeof api.now !== 'function') {\n toastMessage('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 api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 0xe5df88,\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: 'Pinia 🍍',\n icon: 'storage',\n treeFilterPlaceholder: 'Search stores',\n actions: [\n {\n icon: 'content_copy',\n action: () => {\n actionGlobalCopyState(pinia);\n },\n tooltip: 'Serialize and copy the state',\n },\n {\n icon: 'content_paste',\n action: async () => {\n await actionGlobalPasteState(pinia);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: 'Replace the state with the content of your clipboard',\n },\n {\n icon: 'save',\n action: () => {\n actionGlobalSaveState(pinia);\n },\n tooltip: 'Save the state as a JSON file',\n },\n {\n icon: 'folder_open',\n action: async () => {\n await actionGlobalOpenStateFile(pinia);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: 'Import the state from a JSON file',\n },\n ],\n nodeActions: [\n {\n icon: 'restore',\n tooltip: 'Reset the state (with \"$reset\")',\n action: (nodeId) => {\n const store = pinia._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, 'warn');\n }\n else if (typeof store.$reset !== 'function') {\n toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, 'warn');\n }\n else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n },\n },\n ],\n });\n api.on.inspectComponent((payload, ctx) => {\n const proxy = (payload.componentInstance &&\n payload.componentInstance.proxy);\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: 'state',\n editable: true,\n value: store._isOptionsAPI\n ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: 'restore',\n tooltip: 'Reset the state of this store',\n action: () => store.$reset(),\n },\n ],\n },\n }\n : // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {}),\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: 'getters',\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n }\n catch (error) {\n // @ts-expect-error: we just want to show it in devtools\n getters[key] = error;\n }\n return getters;\n }, {}),\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia];\n stores = stores.concat(Array.from(pinia._s.values()));\n payload.rootNodes = (payload.filter\n ? stores.filter((store) => '$id' in store\n ? store.$id\n .toLowerCase()\n .includes(payload.filter.toLowerCase())\n : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase()))\n : stores).map(formatStoreForInspectorTree);\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n ? pinia\n : pinia._s.get(payload.nodeId);\n if (!inspectedStore) {\n // this could be the selected store restored for a different project\n // so it's better not to say anything here\n return;\n }\n if (inspectedStore) {\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload, ctx) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n ? pinia\n : pinia._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, 'error');\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n // access only the state\n if (path.length !== 1 ||\n !inspectedStore._customProperties.has(path[0]) ||\n path[0] in inspectedStore.$state) {\n path.unshift('$state');\n }\n }\n else {\n // Root access, we can omit the `.value` because the devtools API does it for us\n path.unshift('state');\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith('🍍')) {\n const storeId = payload.type.replace(/^🍍\\s*/, '');\n const store = pinia._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, 'error');\n }\n const { path } = payload;\n if (path[0] !== 'state') {\n return toastMessage(`Invalid path for store \"${storeId}\":\\n${path}\\nOnly state can be modified.`);\n }\n // rewrite the first entry to be able to directly set the state as\n // well as any other path\n path[0] = '$state';\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin({\n id: 'dev.esm.pinia',\n label: 'Pinia 🍍',\n logo: 'https://pinia.vuejs.org/logo.svg',\n packageName: 'pinia',\n homepage: 'https://pinia.vuejs.org',\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: 'Notify about new/deleted stores',\n type: 'boolean',\n defaultValue: true,\n },\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n },\n }, (api) => {\n // gracefully handle errors\n const now = typeof api.now === 'function' ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🛫 ' + name,\n subtitle: 'start',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n },\n groupId,\n },\n });\n after((result) => {\n activeAction = undefined;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🛬 ' + name,\n subtitle: 'end',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n result,\n },\n groupId,\n },\n });\n });\n onError((error) => {\n activeAction = undefined;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n logType: 'error',\n title: '💥 ' + name,\n subtitle: 'end',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n error,\n },\n groupId,\n },\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: 'Change',\n subtitle: name,\n data: {\n newValue,\n oldValue,\n },\n groupId: activeAction,\n },\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n // rootStore.state[store.id] = state\n const eventData = {\n time: now(),\n title: formatMutationType(type),\n data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)),\n groupId: activeAction,\n };\n if (type === MutationType.patchFunction) {\n eventData.subtitle = '⤵️';\n }\n else if (type === MutationType.patchObject) {\n eventData.subtitle = '🧩';\n }\n else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data['rawEvent(s)'] = {\n _custom: {\n display: 'DebuggerEvent',\n type: 'object',\n tooltip: 'raw DebuggerEvent[]',\n value: events,\n },\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData,\n });\n }, { detached: true, flush: 'sync' });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🔥 ' + store.$id,\n subtitle: 'HMR update',\n data: {\n store: formatDisplay(store.$id),\n info: formatDisplay(`HMR update`),\n },\n },\n });\n // update the devtools too\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges &&\n toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n // trigger an update so it can display new registered stores\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges &&\n toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\n/**\n * Patches a store to enable action grouping in devtools by wrapping the store with a Proxy that is passed as the\n * context of all actions, allowing us to set `runningAction` on each access and effectively associating any state\n * mutation to the action.\n *\n * @param store - store to patch\n * @param actionNames - list of actionst to patch\n */\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n // original actions of the store as they are given by pinia. We are going to override them\n const actions = actionNames.reduce((storeActions, actionName) => {\n // use toRaw to avoid tracking #541\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function () {\n // the running action id is incremented in a before action hook\n const _actionId = runningActionId;\n const trackedStore = wrapWithProxy\n ? new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n },\n })\n : store;\n // For Setup Stores we need https://github.com/tc39/proposal-async-context\n activeAction = _actionId;\n const retValue = actions[actionName].apply(trackedStore, arguments);\n // this is safer as async actions in Setup Stores would associate mutations done outside of the action\n activeAction = undefined;\n return retValue;\n };\n }\n}\n/**\n * pinia.use(devtoolsPlugin)\n */\nfunction devtoolsPlugin({ app, store, options }) {\n // HMR module\n if (store.$id.startsWith('__hot:')) {\n return;\n }\n // detect option api vs setup api\n store._isOptionsAPI = !!options.state;\n patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n // Upgrade the HMR to also update the new actions\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function (newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n };\n addStoreToDevtools(app, \n // FIXME: is there a way to allow the assignment from Store to StoreGeneric?\n store);\n}\n\n/**\n * Creates a Pinia instance to be used by the application\n */\nfunction createPinia() {\n const scope = effectScope(true);\n // NOTE: here we could check the window object for a state and directly set it\n // if there is anything like it with Vue 3 SSR\n const state = scope.run(() => ref({}));\n let _p = [];\n // plugins added before calling app.use(pinia)\n let toBeInstalled = [];\n const pinia = markRaw({\n install(app) {\n // this allows calling useStore() outside of a component setup after\n // installing pinia's plugin\n setActivePinia(pinia);\n if (!isVue2) {\n pinia._a = app;\n app.provide(piniaSymbol, pinia);\n app.config.globalProperties.$pinia = pinia;\n /* istanbul ignore else */\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(app, pinia);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n }\n },\n use(plugin) {\n if (!this._a && !isVue2) {\n toBeInstalled.push(plugin);\n }\n else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: new Map(),\n state,\n });\n // pinia devtools rely on dev only features so they cannot be forced unless\n // the dev build of Vue is used. Avoid old browsers like IE11.\n if (USE_DEVTOOLS && typeof Proxy !== 'undefined') {\n pinia.use(devtoolsPlugin);\n }\n return pinia;\n}\n\n/**\n * Checks if a function is a `StoreDefinition`.\n *\n * @param fn - object to test\n * @returns true if `fn` is a StoreDefinition\n */\nconst isUseStore = (fn) => {\n return typeof fn === 'function' && typeof fn.$id === 'string';\n};\n/**\n * Mutates in place `newState` with `oldState` to _hot update_ it. It will\n * remove any key not existing in `newState` and recursively merge plain\n * objects.\n *\n * @param newState - new state object to be patched\n * @param oldState - old state that should be used to patch newState\n * @returns - newState\n */\nfunction patchObject(newState, oldState) {\n // no need to go through symbols because they cannot be serialized anyway\n for (const key in oldState) {\n const subPatch = oldState[key];\n // skip the whole sub tree\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) &&\n isPlainObject(subPatch) &&\n !isRef(subPatch) &&\n !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n }\n else {\n // objects are either a bit more complex (e.g. refs) or primitives, so we\n // just set the whole thing\n if (isVue2) {\n set(newState, key, subPatch);\n }\n else {\n newState[key] = subPatch;\n }\n }\n }\n return newState;\n}\n/**\n * Creates an _accept_ function to pass to `import.meta.hot` in Vite applications.\n *\n * @example\n * ```js\n * const useUser = defineStore(...)\n * if (import.meta.hot) {\n * import.meta.hot.accept(acceptHMRUpdate(useUser, import.meta.hot))\n * }\n * ```\n *\n * @param initialUseStore - return of the defineStore to hot update\n * @param hot - `import.meta.hot`\n */\nfunction acceptHMRUpdate(initialUseStore, hot) {\n // strip as much as possible from iife.prod\n if (!(process.env.NODE_ENV !== 'production')) {\n return () => { };\n }\n return (newModule) => {\n const pinia = hot.data.pinia || initialUseStore._pinia;\n if (!pinia) {\n // this store is still not used\n return;\n }\n // preserve the pinia instance across loads\n hot.data.pinia = pinia;\n // console.log('got data', newStore)\n for (const exportName in newModule) {\n const useStore = newModule[exportName];\n // console.log('checking for', exportName)\n if (isUseStore(useStore) && pinia._s.has(useStore.$id)) {\n // console.log('Accepting update for', useStore.$id)\n const id = useStore.$id;\n if (id !== initialUseStore.$id) {\n console.warn(`The id of the store changed from \"${initialUseStore.$id}\" to \"${id}\". Reloading.`);\n // return import.meta.hot.invalidate()\n return hot.invalidate();\n }\n const existingStore = pinia._s.get(id);\n if (!existingStore) {\n console.log(`[Pinia]: skipping hmr because store doesn't exist yet`);\n return;\n }\n useStore(pinia, existingStore);\n }\n }\n };\n}\n\nconst noop = () => { };\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop) {\n subscriptions.push(callback);\n const removeSubscription = () => {\n const idx = subscriptions.indexOf(callback);\n if (idx > -1) {\n subscriptions.splice(idx, 1);\n onCleanup();\n }\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.slice().forEach((callback) => {\n callback(...args);\n });\n}\n\nconst fallbackRunWithContext = (fn) => fn();\nfunction mergeReactiveObjects(target, patchToApply) {\n // Handle Map instances\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n // Handle Set instances\n if (target instanceof Set && patchToApply instanceof Set) {\n patchToApply.forEach(target.add, target);\n }\n // no need to go through symbols because they cannot be serialized anyway\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) &&\n isPlainObject(subPatch) &&\n target.hasOwnProperty(key) &&\n !isRef(subPatch) &&\n !isReactive(subPatch)) {\n // NOTE: here I wanted to warn about inconsistent types but it's not possible because in setup stores one might\n // start the value of a property as a certain type e.g. a Map, and then for some reason, during SSR, change that\n // to `undefined`. When trying to hydrate, we want to override the Map with `undefined`.\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n }\n else {\n // @ts-expect-error: subPatch is a valid value\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = (process.env.NODE_ENV !== 'production')\n ? Symbol('pinia:skipHydration')\n : /* istanbul ignore next */ Symbol();\nconst skipHydrateMap = /*#__PURE__*/ new WeakMap();\n/**\n * Tells Pinia to skip the hydration process of a given object. This is useful in setup stores (only) when you return a\n * stateful object in the store but it isn't really state. e.g. returning a router instance in a setup store.\n *\n * @param obj - target object\n * @returns obj\n */\nfunction skipHydrate(obj) {\n return isVue2\n ? // in @vue/composition-api, the refs are sealed so defineProperty doesn't work...\n /* istanbul ignore next */ skipHydrateMap.set(obj, 1) && obj\n : Object.defineProperty(obj, skipHydrateSymbol, {});\n}\n/**\n * Returns whether a value should be hydrated\n *\n * @param obj - target variable\n * @returns true if `obj` should be hydrated\n */\nfunction shouldHydrate(obj) {\n return isVue2\n ? /* istanbul ignore next */ !skipHydrateMap.has(obj)\n : !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n /* istanbul ignore if */\n if (isVue2) {\n set(pinia.state.value, id, state ? state() : {});\n }\n else {\n pinia.state.value[id] = state ? state() : {};\n }\n }\n // avoid creating a state in pinia.state.value\n const localState = (process.env.NODE_ENV !== 'production') && hot\n ? // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n : toRefs(pinia.state.value[id]);\n return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if ((process.env.NODE_ENV !== 'production') && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia);\n // it was created just before\n const store = pinia._s.get(id);\n // allow cross using stores\n /* istanbul ignore next */\n if (isVue2 && !store._r)\n return;\n // @ts-expect-error\n // return getters![name].call(context, context)\n // TODO: avoid reading the getter while assigning with a global variable\n return getters[name].call(store, store);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign({ actions: {} }, options);\n /* istanbul ignore if */\n if ((process.env.NODE_ENV !== 'production') && !pinia._e.active) {\n throw new Error('Pinia destroyed');\n }\n // watcher options for $subscribe\n const $subscribeOptions = {\n deep: true,\n // flush: 'post',\n };\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production') && !isVue2) {\n $subscribeOptions.onTrigger = (event) => {\n /* istanbul ignore else */\n if (isListening) {\n debuggerEvents = event;\n // avoid triggering this while the store is being built and the state is being set in pinia\n }\n else if (isListening == false && !store._hotUpdating) {\n // let patch send all the events together later\n /* istanbul ignore else */\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n }\n else {\n console.error('🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.');\n }\n }\n };\n }\n // internal state\n let isListening; // set to true at the end\n let isSyncListening; // set to true at the end\n let subscriptions = [];\n let actionSubscriptions = [];\n let debuggerEvents;\n const initialState = pinia.state.value[$id];\n // avoid setting the state for option stores if it is set\n // by the setup\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n /* istanbul ignore if */\n if (isVue2) {\n set(pinia.state.value, $id, {});\n }\n else {\n pinia.state.value[$id] = {};\n }\n }\n const hotState = ref({});\n // avoid triggering too many listeners\n // https://github.com/vuejs/pinia/issues/1129\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n // reset the debugger events since patches are sync\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === 'function') {\n partialStateOrMutator(pinia.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents,\n };\n }\n else {\n mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents,\n };\n }\n const myListenerId = (activeListener = Symbol());\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n // because we paused the watcher, we need to manually call the subscriptions\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);\n }\n const $reset = isOptionsStore\n ? function $reset() {\n const { state } = options;\n const newState = state ? state() : {};\n // we use a patch to group all changes into one single subscription\n this.$patch(($state) => {\n assign($state, newState);\n });\n }\n : /* istanbul ignore next */\n (process.env.NODE_ENV !== 'production')\n ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n }\n : noop;\n function $dispose() {\n scope.stop();\n subscriptions = [];\n actionSubscriptions = [];\n pinia._s.delete($id);\n }\n /**\n * Wraps an action to handle subscriptions.\n *\n * @param name - name of the action\n * @param action - action to wrap\n * @returns a wrapped action to handle subscriptions\n */\n function wrapAction(name, action) {\n return function () {\n setActivePinia(pinia);\n const args = Array.from(arguments);\n const afterCallbackList = [];\n const onErrorCallbackList = [];\n function after(callback) {\n afterCallbackList.push(callback);\n }\n function onError(callback) {\n onErrorCallbackList.push(callback);\n }\n // @ts-expect-error\n triggerSubscriptions(actionSubscriptions, {\n args,\n name,\n store,\n after,\n onError,\n });\n let ret;\n try {\n ret = action.apply(this && this.$id === $id ? this : store, args);\n // handle sync errors\n }\n catch (error) {\n triggerSubscriptions(onErrorCallbackList, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret\n .then((value) => {\n triggerSubscriptions(afterCallbackList, value);\n return value;\n })\n .catch((error) => {\n triggerSubscriptions(onErrorCallbackList, error);\n return Promise.reject(error);\n });\n }\n // trigger after callbacks\n triggerSubscriptions(afterCallbackList, ret);\n return ret;\n };\n }\n const _hmrPayload = /*#__PURE__*/ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState,\n });\n const partialStore = {\n _p: pinia,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {\n if (options.flush === 'sync' ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents,\n }, state);\n }\n }, assign({}, $subscribeOptions, options)));\n return removeSubscription;\n },\n $dispose,\n };\n /* istanbul ignore if */\n if (isVue2) {\n // start as non ready\n partialStore._r = false;\n }\n const store = reactive((process.env.NODE_ENV !== 'production') || USE_DEVTOOLS\n ? assign({\n _hmrPayload,\n _customProperties: markRaw(new Set()), // devtools custom properties\n }, partialStore\n // must be added later\n // setupStore\n )\n : partialStore);\n // store the partial store now so the setup of stores can instantiate each other before they are finished without\n // creating infinite loops.\n pinia._s.set($id, store);\n const runWithContext = (pinia._a && pinia._a.runWithContext) || fallbackRunWithContext;\n // TODO: idea create skipSerialize that marks properties as non serializable and they are skipped\n const setupStore = runWithContext(() => pinia._e.run(() => (scope = effectScope()).run(setup)));\n // overwrite existing actions to support $onAction\n for (const key in setupStore) {\n const prop = setupStore[key];\n if ((isRef(prop) && !isComputed(prop)) || isReactive(prop)) {\n // mark it as a piece of state to be serialized\n if ((process.env.NODE_ENV !== 'production') && hot) {\n set(hotState.value, key, toRef(setupStore, key));\n // createOptionStore directly sets the state in pinia.state.value so we\n // can just skip that\n }\n else if (!isOptionsStore) {\n // in setup stores we must hydrate the state and sync pinia state tree with the refs the user just created\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n }\n else {\n // probably a reactive object, lets recursively assign\n // @ts-expect-error: prop is unknown\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n // transfer the ref to the pinia state to keep everything in sync\n /* istanbul ignore if */\n if (isVue2) {\n set(pinia.state.value[$id], key, prop);\n }\n else {\n pinia.state.value[$id][key] = prop;\n }\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n _hmrPayload.state.push(key);\n }\n // action\n }\n else if (typeof prop === 'function') {\n // @ts-expect-error: we are overriding the function we avoid wrapping if\n const actionValue = (process.env.NODE_ENV !== 'production') && hot ? prop : wrapAction(key, prop);\n // this a hot module replacement store because the hotUpdate method needs\n // to do it with the right context\n /* istanbul ignore if */\n if (isVue2) {\n set(setupStore, key, actionValue);\n }\n else {\n // @ts-expect-error\n setupStore[key] = actionValue;\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n _hmrPayload.actions[key] = prop;\n }\n // list actions so they can be used in plugins\n // @ts-expect-error\n optionsForPlugin.actions[key] = prop;\n }\n else if ((process.env.NODE_ENV !== 'production')) {\n // add getters for devtools\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore\n ? // @ts-expect-error\n options.getters[key]\n : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters ||\n // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n // add the state, getters, and action properties\n /* istanbul ignore if */\n if (isVue2) {\n Object.keys(setupStore).forEach((key) => {\n set(store, key, setupStore[key]);\n });\n }\n else {\n assign(store, setupStore);\n // allows retrieving reactive objects with `storeToRefs()`. Must be called after assigning to the reactive object.\n // Make `storeToRefs()` work with `reactive()` #799\n assign(toRaw(store), setupStore);\n }\n // use this instead of a computed with setter to be able to create it anywhere\n // without linking the computed lifespan to wherever the store is first\n // created.\n Object.defineProperty(store, '$state', {\n get: () => ((process.env.NODE_ENV !== 'production') && hot ? hotState.value : pinia.state.value[$id]),\n set: (state) => {\n /* istanbul ignore if */\n if ((process.env.NODE_ENV !== 'production') && hot) {\n throw new Error('cannot set hotState');\n }\n $patch(($state) => {\n assign($state, state);\n });\n },\n });\n // add the hotUpdate before plugins to allow them to override it\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === 'object' &&\n isPlainObject(newStateTarget) &&\n isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n }\n else {\n // transfer the ref\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n // patch direct access properties to allow store.stateProperty to work as\n // store.$state.stateProperty\n set(store, stateKey, toRef(newStore.$state, stateKey));\n });\n // remove deleted state properties\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n del(store, stateKey);\n }\n });\n // avoid devtools logging this as a mutation\n isListening = false;\n isSyncListening = false;\n pinia.state.value[$id] = toRef(newStore._hmrPayload, 'hotState');\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const action = newStore[actionName];\n set(store, actionName, wrapAction(actionName, action));\n }\n // TODO: does this work in both setup and option store?\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore\n ? // special handling of options api\n computed(() => {\n setActivePinia(pinia);\n return getter.call(store, store);\n })\n : getter;\n set(store, getterName, getterValue);\n }\n // remove deleted getters\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n del(store, key);\n }\n });\n // remove old actions\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n del(store, key);\n }\n });\n // update the values used in devtools and to allow deleting new properties later on\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if (USE_DEVTOOLS) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false,\n };\n ['_p', '_hmrPayload', '_getters', '_customProperties'].forEach((p) => {\n Object.defineProperty(store, p, assign({ value: store[p] }, nonEnumerable));\n });\n }\n /* istanbul ignore if */\n if (isVue2) {\n // mark the store as ready before plugins\n store._r = true;\n }\n // apply all plugins\n pinia._p.forEach((extender) => {\n /* istanbul ignore else */\n if (USE_DEVTOOLS) {\n const extensions = scope.run(() => extender({\n store,\n app: pinia._a,\n pinia,\n options: optionsForPlugin,\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign(store, extensions);\n }\n else {\n assign(store, scope.run(() => extender({\n store,\n app: pinia._a,\n pinia,\n options: optionsForPlugin,\n })));\n }\n });\n if ((process.env.NODE_ENV !== 'production') &&\n store.$state &&\n typeof store.$state === 'object' &&\n typeof store.$state.constructor === 'function' &&\n !store.$state.constructor.toString().includes('[native code]')) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\\n` +\n `\\tstate: () => new MyClass()\\n` +\n `Found in store \"${store.$id}\".`);\n }\n // only apply hydrate to option stores with an initial state in pinia\n if (initialState &&\n isOptionsStore &&\n options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\nfunction defineStore(\n// TODO: add proper types from above\nidOrOptions, setup, setupOptions) {\n let id;\n let options;\n const isSetupStore = typeof setup === 'function';\n if (typeof idOrOptions === 'string') {\n id = idOrOptions;\n // the option store setup will contain the actual options in this case\n options = isSetupStore ? setupOptions : setup;\n }\n else {\n options = idOrOptions;\n id = idOrOptions.id;\n if ((process.env.NODE_ENV !== 'production') && typeof id !== 'string') {\n throw new Error(`[🍍]: \"defineStore()\" must be passed a store id as its first argument.`);\n }\n }\n function useStore(pinia, hot) {\n const hasContext = hasInjectionContext();\n pinia =\n // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n ((process.env.NODE_ENV === 'test') && activePinia && activePinia._testing ? null : pinia) ||\n (hasContext ? inject(piniaSymbol, null) : null);\n if (pinia)\n setActivePinia(pinia);\n if ((process.env.NODE_ENV !== 'production') && !activePinia) {\n throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\\n` +\n `See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\\n` +\n `This will fail in production.`);\n }\n pinia = activePinia;\n if (!pinia._s.has(id)) {\n // creating the store registers it in `pinia._s`\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia);\n }\n else {\n createOptionsStore(id, options, pinia);\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n // @ts-expect-error: not the right inferred type\n useStore._pinia = pinia;\n }\n }\n const store = pinia._s.get(id);\n if ((process.env.NODE_ENV !== 'production') && hot) {\n const hotId = '__hot:' + id;\n const newStore = isSetupStore\n ? createSetupStore(hotId, setup, options, pinia, true)\n : createOptionsStore(hotId, assign({}, options), pinia, true);\n hot._hotUpdate(newStore);\n // cleanup the state properties and the store from the cache\n delete pinia.state.value[hotId];\n pinia._s.delete(hotId);\n }\n if ((process.env.NODE_ENV !== 'production') && IS_CLIENT) {\n const currentInstance = getCurrentInstance();\n // save stores in instances to access them devtools\n if (currentInstance &&\n currentInstance.proxy &&\n // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = '_pStores' in vm ? vm._pStores : (vm._pStores = {});\n cache[id] = store;\n }\n }\n // StoreGeneric cannot be casted towards Store\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\n\nlet mapStoreSuffix = 'Store';\n/**\n * Changes the suffix added by `mapStores()`. Can be set to an empty string.\n * Defaults to `\"Store\"`. Make sure to extend the MapStoresCustomization\n * interface if you are using TypeScript.\n *\n * @param suffix - new suffix\n */\nfunction setMapStoreSuffix(suffix // could be 'Store' but that would be annoying for JS\n) {\n mapStoreSuffix = suffix;\n}\n/**\n * Allows using stores without the composition API (`setup()`) by generating an\n * object to be spread in the `computed` field of a component. It accepts a list\n * of store definitions.\n *\n * @example\n * ```js\n * export default {\n * computed: {\n * // other computed properties\n * ...mapStores(useUserStore, useCartStore)\n * },\n *\n * created() {\n * this.userStore // store with id \"user\"\n * this.cartStore // store with id \"cart\"\n * }\n * }\n * ```\n *\n * @param stores - list of stores to map to an object\n */\nfunction mapStores(...stores) {\n if ((process.env.NODE_ENV !== 'production') && Array.isArray(stores[0])) {\n console.warn(`[🍍]: Directly pass all stores to \"mapStores()\" without putting them in an array:\\n` +\n `Replace\\n` +\n `\\tmapStores([useAuthStore, useCartStore])\\n` +\n `with\\n` +\n `\\tmapStores(useAuthStore, useCartStore)\\n` +\n `This will fail in production if not fixed.`);\n stores = stores[0];\n }\n return stores.reduce((reduced, useStore) => {\n // @ts-expect-error: $id is added by defineStore\n reduced[useStore.$id + mapStoreSuffix] = function () {\n return useStore(this.$pinia);\n };\n return reduced;\n }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapState(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n reduced[key] = function () {\n return useStore(this.$pinia)[key];\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function () {\n const store = useStore(this.$pinia);\n const storeKey = keysOrMapper[key];\n // for some reason TS is unable to infer the type of storeKey to be a\n // function\n return typeof storeKey === 'function'\n ? storeKey.call(this, store)\n : store[storeKey];\n };\n return reduced;\n }, {});\n}\n/**\n * Alias for `mapState()`. You should use `mapState()` instead.\n * @deprecated use `mapState()` instead.\n */\nconst mapGetters = mapState;\n/**\n * Allows directly using actions from your store without using the composition\n * API (`setup()`) by generating an object to be spread in the `methods` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapActions(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function (...args) {\n return useStore(this.$pinia)[key](...args);\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function (...args) {\n return useStore(this.$pinia)[keysOrMapper[key]](...args);\n };\n return reduced;\n }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapWritableState(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n // @ts-ignore\n reduced[key] = {\n get() {\n return useStore(this.$pinia)[key];\n },\n set(value) {\n // it's easier to type it here as any\n return (useStore(this.$pinia)[key] = value);\n },\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-ignore\n reduced[key] = {\n get() {\n return useStore(this.$pinia)[keysOrMapper[key]];\n },\n set(value) {\n // it's easier to type it here as any\n return (useStore(this.$pinia)[keysOrMapper[key]] = value);\n },\n };\n return reduced;\n }, {});\n}\n\n/**\n * Creates an object of references with all the state, getters, and plugin-added\n * state properties of the store. Similar to `toRefs()` but specifically\n * designed for Pinia stores so methods and non reactive properties are\n * completely ignored.\n *\n * @param store - store to extract the refs from\n */\nfunction storeToRefs(store) {\n // See https://github.com/vuejs/pinia/issues/852\n // It's easier to just use toRefs() even if it includes more stuff\n if (isVue2) {\n // @ts-expect-error: toRefs include methods and others\n return toRefs(store);\n }\n else {\n store = toRaw(store);\n const refs = {};\n for (const key in store) {\n const value = store[key];\n if (isRef(value) || isReactive(value)) {\n // @ts-expect-error: the key is state or getter\n refs[key] =\n // ---\n toRef(store, key);\n }\n }\n return refs;\n }\n}\n\n/**\n * Vue 2 Plugin that must be installed for pinia to work. Note **you don't need\n * this plugin if you are using Nuxt.js**. Use the `buildModule` instead:\n * https://pinia.vuejs.org/ssr/nuxt.html.\n *\n * @example\n * ```js\n * import Vue from 'vue'\n * import { PiniaVuePlugin, createPinia } from 'pinia'\n *\n * Vue.use(PiniaVuePlugin)\n * const pinia = createPinia()\n *\n * new Vue({\n * el: '#app',\n * // ...\n * pinia,\n * })\n * ```\n *\n * @param _Vue - `Vue` imported from 'vue'.\n */\nconst PiniaVuePlugin = function (_Vue) {\n // Equivalent of\n // app.config.globalProperties.$pinia = pinia\n _Vue.mixin({\n beforeCreate() {\n const options = this.$options;\n if (options.pinia) {\n const pinia = options.pinia;\n // HACK: taken from provide(): https://github.com/vuejs/composition-api/blob/main/src/apis/inject.ts#L31\n /* istanbul ignore else */\n if (!this._provided) {\n const provideCache = {};\n Object.defineProperty(this, '_provided', {\n get: () => provideCache,\n set: (v) => Object.assign(provideCache, v),\n });\n }\n this._provided[piniaSymbol] = pinia;\n // propagate the pinia instance in an SSR friendly way\n // avoid adding it to nuxt twice\n /* istanbul ignore else */\n if (!this.$pinia) {\n this.$pinia = pinia;\n }\n pinia._a = this;\n if (IS_CLIENT) {\n // this allows calling useStore() outside of a component setup after\n // installing pinia's plugin\n setActivePinia(pinia);\n }\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(pinia._a, pinia);\n }\n }\n else if (!this.$pinia && options.parent && options.parent.$pinia) {\n this.$pinia = options.parent.$pinia;\n }\n },\n destroyed() {\n delete this._pStores;\n },\n });\n};\n\nexport { MutationType, PiniaVuePlugin, acceptHMRUpdate, createPinia, defineStore, getActivePinia, mapActions, mapGetters, mapState, mapStores, mapWritableState, setActivePinia, setMapStoreSuffix, skipHydrate, storeToRefs };\n","/**\n * vee-validate v4.8.6\n * (c) 2023 Abdelrahman Awad\n * @license MIT\n */\nimport { getCurrentInstance, inject, warn as warn$1, computed, ref, watch, unref, isRef, reactive, onUnmounted, nextTick, onMounted, provide, onBeforeUnmount, defineComponent, toRef, resolveDynamicComponent, h, watchEffect, markRaw } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nfunction isCallable(fn) {\n return typeof fn === 'function';\n}\nfunction isNullOrUndefined(value) {\n return value === null || value === undefined;\n}\nconst isObject = (obj) => obj !== null && !!obj && typeof obj === 'object' && !Array.isArray(obj);\nfunction isIndex(value) {\n return Number(value) >= 0;\n}\nfunction toNumber(value) {\n const n = parseFloat(value);\n return isNaN(n) ? value : n;\n}\n\nconst RULES = {};\n/**\n * Adds a custom validator to the list of validation rules.\n */\nfunction defineRule(id, validator) {\n // makes sure new rules are properly formatted.\n guardExtend(id, validator);\n RULES[id] = validator;\n}\n/**\n * Gets an already defined rule\n */\nfunction resolveRule(id) {\n return RULES[id];\n}\n/**\n * Guards from extension violations.\n */\nfunction guardExtend(id, validator) {\n if (isCallable(validator)) {\n return;\n }\n throw new Error(`Extension Error: The validator '${id}' must be a function.`);\n}\n\nconst FormContextKey = Symbol('vee-validate-form');\nconst FieldContextKey = Symbol('vee-validate-field-instance');\nconst IS_ABSENT = Symbol('Default empty value');\n\nconst isClient = typeof window !== 'undefined';\nfunction isLocator(value) {\n return isCallable(value) && !!value.__locatorRef;\n}\nfunction isTypedSchema(value) {\n return !!value && isCallable(value.parse) && value.__type === 'VVTypedSchema';\n}\nfunction isYupValidator(value) {\n return !!value && isCallable(value.validate);\n}\nfunction hasCheckedAttr(type) {\n return type === 'checkbox' || type === 'radio';\n}\nfunction isContainerValue(value) {\n return isObject(value) || Array.isArray(value);\n}\n/**\n * True if the value is an empty object or array\n */\nfunction isEmptyContainer(value) {\n if (Array.isArray(value)) {\n return value.length === 0;\n }\n return isObject(value) && Object.keys(value).length === 0;\n}\n/**\n * Checks if the path opted out of nested fields using `[fieldName]` syntax\n */\nfunction isNotNestedPath(path) {\n return /^\\[.+\\]$/i.test(path);\n}\n/**\n * Checks if an element is a native HTML5 multi-select input element\n */\nfunction isNativeMultiSelect(el) {\n return isNativeSelect(el) && el.multiple;\n}\n/**\n * Checks if an element is a native HTML5 select input element\n */\nfunction isNativeSelect(el) {\n return el.tagName === 'SELECT';\n}\n/**\n * Checks if a tag name with attrs object will render a native multi-select element\n */\nfunction isNativeMultiSelectNode(tag, attrs) {\n // The falsy value array is the values that Vue won't add the `multiple` prop if it has one of these values\n const hasTruthyBindingValue = ![false, null, undefined, 0].includes(attrs.multiple) && !Number.isNaN(attrs.multiple);\n return tag === 'select' && 'multiple' in attrs && hasTruthyBindingValue;\n}\n/**\n * Checks if a node should have a `:value` binding or not\n *\n * These nodes should not have a value binding\n * For files, because they are not reactive\n * For multi-selects because the value binding will reset the value\n */\nfunction shouldHaveValueBinding(tag, attrs) {\n return !isNativeMultiSelectNode(tag, attrs) && attrs.type !== 'file' && !hasCheckedAttr(attrs.type);\n}\nfunction isFormSubmitEvent(evt) {\n return isEvent(evt) && evt.target && 'submit' in evt.target;\n}\nfunction isEvent(evt) {\n if (!evt) {\n return false;\n }\n if (typeof Event !== 'undefined' && isCallable(Event) && evt instanceof Event) {\n return true;\n }\n // this is for IE and Cypress #3161\n /* istanbul ignore next */\n if (evt && evt.srcElement) {\n return true;\n }\n return false;\n}\nfunction isPropPresent(obj, prop) {\n return prop in obj && obj[prop] !== IS_ABSENT;\n}\n/**\n * Compares if two values are the same borrowed from:\n * https://github.com/epoberezkin/fast-deep-equal\n * We added a case for file matching since `Object.keys` doesn't work with Files.\n * */\nfunction isEqual(a, b) {\n if (a === b)\n return true;\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n if (a.constructor !== b.constructor)\n return false;\n // eslint-disable-next-line no-var\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n // eslint-disable-next-line eqeqeq\n if (length != b.length)\n return false;\n for (i = length; i-- !== 0;)\n if (!isEqual(a[i], b[i]))\n return false;\n return true;\n }\n if (a instanceof Map && b instanceof Map) {\n if (a.size !== b.size)\n return false;\n for (i of a.entries())\n if (!b.has(i[0]))\n return false;\n for (i of a.entries())\n if (!isEqual(i[1], b.get(i[0])))\n return false;\n return true;\n }\n // We added this part for file comparison, arguably a little naive but should work for most cases.\n // #3911\n if (isFile(a) && isFile(b)) {\n if (a.size !== b.size)\n return false;\n if (a.name !== b.name)\n return false;\n if (a.lastModified !== b.lastModified)\n return false;\n if (a.type !== b.type)\n return false;\n return true;\n }\n if (a instanceof Set && b instanceof Set) {\n if (a.size !== b.size)\n return false;\n for (i of a.entries())\n if (!b.has(i[0]))\n return false;\n return true;\n }\n if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n // eslint-disable-next-line eqeqeq\n if (length != b.length)\n return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i])\n return false;\n return true;\n }\n if (a.constructor === RegExp)\n return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf)\n return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString)\n return a.toString() === b.toString();\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length)\n return false;\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i]))\n return false;\n for (i = length; i-- !== 0;) {\n // eslint-disable-next-line no-var\n var key = keys[i];\n if (!isEqual(a[key], b[key]))\n return false;\n }\n return true;\n }\n // true if both NaN, false otherwise\n // eslint-disable-next-line no-self-compare\n return a !== a && b !== b;\n}\nfunction isFile(a) {\n if (!isClient) {\n return false;\n }\n return a instanceof File;\n}\n\nfunction set(obj, key, val) {\n\tif (typeof val.value === 'object') val.value = klona(val.value);\n\tif (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === '__proto__') {\n\t\tObject.defineProperty(obj, key, val);\n\t} else obj[key] = val.value;\n}\n\nfunction klona(x) {\n\tif (typeof x !== 'object') return x;\n\n\tvar i=0, k, list, tmp, str=Object.prototype.toString.call(x);\n\n\tif (str === '[object Object]') {\n\t\ttmp = Object.create(x.__proto__ || null);\n\t} else if (str === '[object Array]') {\n\t\ttmp = Array(x.length);\n\t} else if (str === '[object Set]') {\n\t\ttmp = new Set;\n\t\tx.forEach(function (val) {\n\t\t\ttmp.add(klona(val));\n\t\t});\n\t} else if (str === '[object Map]') {\n\t\ttmp = new Map;\n\t\tx.forEach(function (val, key) {\n\t\t\ttmp.set(klona(key), klona(val));\n\t\t});\n\t} else if (str === '[object Date]') {\n\t\ttmp = new Date(+x);\n\t} else if (str === '[object RegExp]') {\n\t\ttmp = new RegExp(x.source, x.flags);\n\t} else if (str === '[object DataView]') {\n\t\ttmp = new x.constructor( klona(x.buffer) );\n\t} else if (str === '[object ArrayBuffer]') {\n\t\ttmp = x.slice(0);\n\t} else if (str.slice(-6) === 'Array]') {\n\t\t// ArrayBuffer.isView(x)\n\t\t// ~> `new` bcuz `Buffer.slice` => ref\n\t\ttmp = new x.constructor(x);\n\t}\n\n\tif (tmp) {\n\t\tfor (list=Object.getOwnPropertySymbols(x); i < list.length; i++) {\n\t\t\tset(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i]));\n\t\t}\n\n\t\tfor (i=0, list=Object.getOwnPropertyNames(x); i < list.length; i++) {\n\t\t\tif (Object.hasOwnProperty.call(tmp, k=list[i]) && tmp[k] === x[k]) continue;\n\t\t\tset(tmp, k, Object.getOwnPropertyDescriptor(x, k));\n\t\t}\n\t}\n\n\treturn tmp || x;\n}\n\nfunction cleanupNonNestedPath(path) {\n if (isNotNestedPath(path)) {\n return path.replace(/\\[|\\]/gi, '');\n }\n return path;\n}\nfunction getFromPath(object, path, fallback) {\n if (!object) {\n return fallback;\n }\n if (isNotNestedPath(path)) {\n return object[cleanupNonNestedPath(path)];\n }\n const resolvedValue = (path || '')\n .split(/\\.|\\[(\\d+)\\]/)\n .filter(Boolean)\n .reduce((acc, propKey) => {\n if (isContainerValue(acc) && propKey in acc) {\n return acc[propKey];\n }\n return fallback;\n }, object);\n return resolvedValue;\n}\n/**\n * Sets a nested property value in a path, creates the path properties if it doesn't exist\n */\nfunction setInPath(object, path, value) {\n if (isNotNestedPath(path)) {\n object[cleanupNonNestedPath(path)] = value;\n return;\n }\n const keys = path.split(/\\.|\\[(\\d+)\\]/).filter(Boolean);\n let acc = object;\n for (let i = 0; i < keys.length; i++) {\n // Last key, set it\n if (i === keys.length - 1) {\n acc[keys[i]] = value;\n return;\n }\n // Key does not exist, create a container for it\n if (!(keys[i] in acc) || isNullOrUndefined(acc[keys[i]])) {\n // container can be either an object or an array depending on the next key if it exists\n acc[keys[i]] = isIndex(keys[i + 1]) ? [] : {};\n }\n acc = acc[keys[i]];\n }\n}\nfunction unset(object, key) {\n if (Array.isArray(object) && isIndex(key)) {\n object.splice(Number(key), 1);\n return;\n }\n if (isObject(object)) {\n delete object[key];\n }\n}\n/**\n * Removes a nested property from object\n */\nfunction unsetPath(object, path) {\n if (isNotNestedPath(path)) {\n delete object[cleanupNonNestedPath(path)];\n return;\n }\n const keys = path.split(/\\.|\\[(\\d+)\\]/).filter(Boolean);\n let acc = object;\n for (let i = 0; i < keys.length; i++) {\n // Last key, unset it\n if (i === keys.length - 1) {\n unset(acc, keys[i]);\n break;\n }\n // Key does not exist, exit\n if (!(keys[i] in acc) || isNullOrUndefined(acc[keys[i]])) {\n break;\n }\n acc = acc[keys[i]];\n }\n const pathValues = keys.map((_, idx) => {\n return getFromPath(object, keys.slice(0, idx).join('.'));\n });\n for (let i = pathValues.length - 1; i >= 0; i--) {\n if (!isEmptyContainer(pathValues[i])) {\n continue;\n }\n if (i === 0) {\n unset(object, keys[0]);\n continue;\n }\n unset(pathValues[i - 1], keys[i - 1]);\n }\n}\n/**\n * A typed version of Object.keys\n */\nfunction keysOf(record) {\n return Object.keys(record);\n}\n// Uses same component provide as its own injections\n// Due to changes in https://github.com/vuejs/vue-next/pull/2424\nfunction injectWithSelf(symbol, def = undefined) {\n const vm = getCurrentInstance();\n return (vm === null || vm === void 0 ? void 0 : vm.provides[symbol]) || inject(symbol, def);\n}\nfunction warn(message) {\n warn$1(`[vee-validate]: ${message}`);\n}\n/**\n * Ensures we deal with a singular field value\n */\nfunction normalizeField(field) {\n if (Array.isArray(field)) {\n return field[0];\n }\n return field;\n}\nfunction resolveNextCheckboxValue(currentValue, checkedValue, uncheckedValue) {\n if (Array.isArray(currentValue)) {\n const newVal = [...currentValue];\n // Use isEqual since checked object values can possibly fail the equality check #3883\n const idx = newVal.findIndex(v => isEqual(v, checkedValue));\n idx >= 0 ? newVal.splice(idx, 1) : newVal.push(checkedValue);\n return newVal;\n }\n return isEqual(currentValue, checkedValue) ? uncheckedValue : checkedValue;\n}\n/**\n * Creates a throttled function that only invokes the provided function (`func`) at most once per within a given number of milliseconds\n * (`limit`)\n */\nfunction throttle(func, limit) {\n let inThrottle;\n let lastResult;\n return function (...args) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const context = this;\n if (!inThrottle) {\n inThrottle = true;\n setTimeout(() => (inThrottle = false), limit);\n lastResult = func.apply(context, args);\n }\n return lastResult;\n };\n}\nfunction debounceAsync(inner, ms = 0) {\n let timer = null;\n let resolves = [];\n return function (...args) {\n // Run the function after a certain amount of time\n if (timer) {\n window.clearTimeout(timer);\n }\n timer = window.setTimeout(() => {\n // Get the result of the inner function, then apply it to the resolve function of\n // each promise that has been created since the last time the inner function was run\n const result = inner(...args);\n resolves.forEach(r => r(result));\n resolves = [];\n }, ms);\n return new Promise(resolve => resolves.push(resolve));\n };\n}\nfunction applyModelModifiers(value, modifiers) {\n if (!isObject(modifiers)) {\n return value;\n }\n if (modifiers.number) {\n return toNumber(value);\n }\n return value;\n}\nfunction withLatest(fn, onDone) {\n let latestRun;\n return async function runLatest(...args) {\n const pending = fn(...args);\n latestRun = pending;\n const result = await pending;\n if (pending !== latestRun) {\n return result;\n }\n latestRun = undefined;\n onDone(result, args);\n return result;\n };\n}\nfunction computedDeep({ get, set }) {\n const baseRef = ref(klona(get()));\n watch(get, newValue => {\n if (isEqual(newValue, baseRef.value)) {\n return;\n }\n baseRef.value = klona(newValue);\n }, {\n deep: true,\n });\n watch(baseRef, newValue => {\n if (isEqual(newValue, get())) {\n return;\n }\n set(klona(newValue));\n }, {\n deep: true,\n });\n return baseRef;\n}\nfunction unravel(value) {\n if (isCallable(value)) {\n return value();\n }\n return unref(value);\n}\nfunction lazyToRef(value) {\n return computed(() => unravel(value));\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst normalizeChildren = (tag, context, slotProps) => {\n if (!context.slots.default) {\n return context.slots.default;\n }\n if (typeof tag === 'string' || !tag) {\n return context.slots.default(slotProps());\n }\n return {\n default: () => { var _a, _b; return (_b = (_a = context.slots).default) === null || _b === void 0 ? void 0 : _b.call(_a, slotProps()); },\n };\n};\n/**\n * Vue adds a `_value` prop at the moment on the input elements to store the REAL value on them, real values are different than the `value` attribute\n * as they do not get casted to strings unlike `el.value` which preserves user-code behavior\n */\nfunction getBoundValue(el) {\n if (hasValueBinding(el)) {\n return el._value;\n }\n return undefined;\n}\n/**\n * Vue adds a `_value` prop at the moment on the input elements to store the REAL value on them, real values are different than the `value` attribute\n * as they do not get casted to strings unlike `el.value` which preserves user-code behavior\n */\nfunction hasValueBinding(el) {\n return '_value' in el;\n}\n\nfunction normalizeEventValue(value) {\n if (!isEvent(value)) {\n return value;\n }\n const input = value.target;\n // Vue sets the current bound value on `_value` prop\n // for checkboxes it it should fetch the value binding type as is (boolean instead of string)\n if (hasCheckedAttr(input.type) && hasValueBinding(input)) {\n return getBoundValue(input);\n }\n if (input.type === 'file' && input.files) {\n const files = Array.from(input.files);\n return input.multiple ? files : files[0];\n }\n if (isNativeMultiSelect(input)) {\n return Array.from(input.options)\n .filter(opt => opt.selected && !opt.disabled)\n .map(getBoundValue);\n }\n // makes sure we get the actual `option` bound value\n // #3440\n if (isNativeSelect(input)) {\n const selectedOption = Array.from(input.options).find(opt => opt.selected);\n return selectedOption ? getBoundValue(selectedOption) : input.value;\n }\n return input.value;\n}\n\n/**\n * Normalizes the given rules expression.\n */\nfunction normalizeRules(rules) {\n const acc = {};\n Object.defineProperty(acc, '_$$isNormalized', {\n value: true,\n writable: false,\n enumerable: false,\n configurable: false,\n });\n if (!rules) {\n return acc;\n }\n // Object is already normalized, skip.\n if (isObject(rules) && rules._$$isNormalized) {\n return rules;\n }\n if (isObject(rules)) {\n return Object.keys(rules).reduce((prev, curr) => {\n const params = normalizeParams(rules[curr]);\n if (rules[curr] !== false) {\n prev[curr] = buildParams(params);\n }\n return prev;\n }, acc);\n }\n /* istanbul ignore if */\n if (typeof rules !== 'string') {\n return acc;\n }\n return rules.split('|').reduce((prev, rule) => {\n const parsedRule = parseRule(rule);\n if (!parsedRule.name) {\n return prev;\n }\n prev[parsedRule.name] = buildParams(parsedRule.params);\n return prev;\n }, acc);\n}\n/**\n * Normalizes a rule param.\n */\nfunction normalizeParams(params) {\n if (params === true) {\n return [];\n }\n if (Array.isArray(params)) {\n return params;\n }\n if (isObject(params)) {\n return params;\n }\n return [params];\n}\nfunction buildParams(provided) {\n const mapValueToLocator = (value) => {\n // A target param using interpolation\n if (typeof value === 'string' && value[0] === '@') {\n return createLocator(value.slice(1));\n }\n return value;\n };\n if (Array.isArray(provided)) {\n return provided.map(mapValueToLocator);\n }\n // #3073\n if (provided instanceof RegExp) {\n return [provided];\n }\n return Object.keys(provided).reduce((prev, key) => {\n prev[key] = mapValueToLocator(provided[key]);\n return prev;\n }, {});\n}\n/**\n * Parses a rule string expression.\n */\nconst parseRule = (rule) => {\n let params = [];\n const name = rule.split(':')[0];\n if (rule.includes(':')) {\n params = rule.split(':').slice(1).join(':').split(',');\n }\n return { name, params };\n};\nfunction createLocator(value) {\n const locator = (crossTable) => {\n const val = getFromPath(crossTable, value) || crossTable[value];\n return val;\n };\n locator.__locatorRef = value;\n return locator;\n}\nfunction extractLocators(params) {\n if (Array.isArray(params)) {\n return params.filter(isLocator);\n }\n return keysOf(params)\n .filter(key => isLocator(params[key]))\n .map(key => params[key]);\n}\n\nconst DEFAULT_CONFIG = {\n generateMessage: ({ field }) => `${field} is not valid.`,\n bails: true,\n validateOnBlur: true,\n validateOnChange: true,\n validateOnInput: false,\n validateOnModelUpdate: true,\n};\nlet currentConfig = Object.assign({}, DEFAULT_CONFIG);\nconst getConfig = () => currentConfig;\nconst setConfig = (newConf) => {\n currentConfig = Object.assign(Object.assign({}, currentConfig), newConf);\n};\nconst configure = setConfig;\n\n/**\n * Validates a value against the rules.\n */\nasync function validate(value, rules, options = {}) {\n const shouldBail = options === null || options === void 0 ? void 0 : options.bails;\n const field = {\n name: (options === null || options === void 0 ? void 0 : options.name) || '{field}',\n rules,\n label: options === null || options === void 0 ? void 0 : options.label,\n bails: shouldBail !== null && shouldBail !== void 0 ? shouldBail : true,\n formData: (options === null || options === void 0 ? void 0 : options.values) || {},\n };\n const result = await _validate(field, value);\n const errors = result.errors;\n return {\n errors,\n valid: !errors.length,\n };\n}\n/**\n * Starts the validation process.\n */\nasync function _validate(field, value) {\n if (isTypedSchema(field.rules) || isYupValidator(field.rules)) {\n return validateFieldWithTypedSchema(value, field.rules);\n }\n // if a generic function or chain of generic functions\n if (isCallable(field.rules) || Array.isArray(field.rules)) {\n const ctx = {\n field: field.label || field.name,\n name: field.name,\n label: field.label,\n form: field.formData,\n value,\n };\n // Normalize the pipeline\n const pipeline = Array.isArray(field.rules) ? field.rules : [field.rules];\n const length = pipeline.length;\n const errors = [];\n for (let i = 0; i < length; i++) {\n const rule = pipeline[i];\n const result = await rule(value, ctx);\n const isValid = typeof result !== 'string' && result;\n if (isValid) {\n continue;\n }\n const message = typeof result === 'string' ? result : _generateFieldError(ctx);\n errors.push(message);\n if (field.bails) {\n return {\n errors,\n };\n }\n }\n return {\n errors,\n };\n }\n const normalizedContext = Object.assign(Object.assign({}, field), { rules: normalizeRules(field.rules) });\n const errors = [];\n const rulesKeys = Object.keys(normalizedContext.rules);\n const length = rulesKeys.length;\n for (let i = 0; i < length; i++) {\n const rule = rulesKeys[i];\n const result = await _test(normalizedContext, value, {\n name: rule,\n params: normalizedContext.rules[rule],\n });\n if (result.error) {\n errors.push(result.error);\n if (field.bails) {\n return {\n errors,\n };\n }\n }\n }\n return {\n errors,\n };\n}\nfunction isYupError(err) {\n return !!err && err.name === 'ValidationError';\n}\nfunction yupToTypedSchema(yupSchema) {\n const schema = {\n __type: 'VVTypedSchema',\n async parse(values) {\n var _a;\n try {\n const output = await yupSchema.validate(values, { abortEarly: false });\n return {\n output,\n errors: [],\n };\n }\n catch (err) {\n // Yup errors have a name prop one them.\n // https://github.com/jquense/yup#validationerrorerrors-string--arraystring-value-any-path-string\n if (!isYupError(err)) {\n throw err;\n }\n if (!((_a = err.inner) === null || _a === void 0 ? void 0 : _a.length) && err.errors.length) {\n return { errors: [{ path: err.path, errors: err.errors }] };\n }\n const errors = err.inner.reduce((acc, curr) => {\n const path = curr.path || '';\n if (!acc[path]) {\n acc[path] = { errors: [], path };\n }\n acc[path].errors.push(...curr.errors);\n return acc;\n }, {});\n return { errors: Object.values(errors) };\n }\n },\n };\n return schema;\n}\n/**\n * Handles yup validation\n */\nasync function validateFieldWithTypedSchema(value, schema) {\n const typedSchema = isTypedSchema(schema) ? schema : yupToTypedSchema(schema);\n const result = await typedSchema.parse(value);\n const messages = [];\n for (const error of result.errors) {\n if (error.errors.length) {\n messages.push(...error.errors);\n }\n }\n return {\n errors: messages,\n };\n}\n/**\n * Tests a single input value against a rule.\n */\nasync function _test(field, value, rule) {\n const validator = resolveRule(rule.name);\n if (!validator) {\n throw new Error(`No such validator '${rule.name}' exists.`);\n }\n const params = fillTargetValues(rule.params, field.formData);\n const ctx = {\n field: field.label || field.name,\n name: field.name,\n label: field.label,\n value,\n form: field.formData,\n rule: Object.assign(Object.assign({}, rule), { params }),\n };\n const result = await validator(value, params, ctx);\n if (typeof result === 'string') {\n return {\n error: result,\n };\n }\n return {\n error: result ? undefined : _generateFieldError(ctx),\n };\n}\n/**\n * Generates error messages.\n */\nfunction _generateFieldError(fieldCtx) {\n const message = getConfig().generateMessage;\n if (!message) {\n return 'Field is invalid';\n }\n return message(fieldCtx);\n}\nfunction fillTargetValues(params, crossTable) {\n const normalize = (value) => {\n if (isLocator(value)) {\n return value(crossTable);\n }\n return value;\n };\n if (Array.isArray(params)) {\n return params.map(normalize);\n }\n return Object.keys(params).reduce((acc, param) => {\n acc[param] = normalize(params[param]);\n return acc;\n }, {});\n}\nasync function validateTypedSchema(schema, values) {\n const typedSchema = isTypedSchema(schema) ? schema : yupToTypedSchema(schema);\n const validationResult = await typedSchema.parse(values);\n const results = {};\n const errors = {};\n for (const error of validationResult.errors) {\n const messages = error.errors;\n // Fixes issue with path mapping with Yup 1.0 including quotes around array indices\n const path = (error.path || '').replace(/\\[\"(\\d+)\"\\]/g, (_, m) => {\n return `[${m}]`;\n });\n results[path] = { valid: !messages.length, errors: messages };\n if (messages.length) {\n errors[path] = messages[0];\n }\n }\n return {\n valid: !validationResult.errors.length,\n results,\n errors,\n values: validationResult.value,\n };\n}\nasync function validateObjectSchema(schema, values, opts) {\n const paths = keysOf(schema);\n const validations = paths.map(async (path) => {\n var _a, _b, _c;\n const strings = (_a = opts === null || opts === void 0 ? void 0 : opts.names) === null || _a === void 0 ? void 0 : _a[path];\n const fieldResult = await validate(getFromPath(values, path), schema[path], {\n name: (strings === null || strings === void 0 ? void 0 : strings.name) || path,\n label: strings === null || strings === void 0 ? void 0 : strings.label,\n values: values,\n bails: (_c = (_b = opts === null || opts === void 0 ? void 0 : opts.bailsMap) === null || _b === void 0 ? void 0 : _b[path]) !== null && _c !== void 0 ? _c : true,\n });\n return Object.assign(Object.assign({}, fieldResult), { path });\n });\n let isAllValid = true;\n const validationResults = await Promise.all(validations);\n const results = {};\n const errors = {};\n for (const result of validationResults) {\n results[result.path] = {\n valid: result.valid,\n errors: result.errors,\n };\n if (!result.valid) {\n isAllValid = false;\n errors[result.path] = result.errors[0];\n }\n }\n return {\n valid: isAllValid,\n results,\n errors,\n };\n}\n\nlet ID_COUNTER = 0;\nfunction useFieldState(path, init) {\n const { value, initialValue, setInitialValue } = _useFieldValue(path, init.modelValue, init.form);\n const { errorMessage, errors, setErrors } = _useFieldErrors(path, init.form);\n const meta = _useFieldMeta(value, initialValue, errors);\n const id = ID_COUNTER >= Number.MAX_SAFE_INTEGER ? 0 : ++ID_COUNTER;\n function setState(state) {\n var _a;\n if ('value' in state) {\n value.value = state.value;\n }\n if ('errors' in state) {\n setErrors(state.errors);\n }\n if ('touched' in state) {\n meta.touched = (_a = state.touched) !== null && _a !== void 0 ? _a : meta.touched;\n }\n if ('initialValue' in state) {\n setInitialValue(state.initialValue);\n }\n }\n return {\n id,\n path,\n value,\n initialValue,\n meta,\n errors,\n errorMessage,\n setState,\n };\n}\n/**\n * Creates the field value and resolves the initial value\n */\nfunction _useFieldValue(path, modelValue, form) {\n const modelRef = ref(unref(modelValue));\n function resolveInitialValue() {\n if (!form) {\n return unref(modelRef);\n }\n return getFromPath(form.meta.value.initialValues, unref(path), unref(modelRef));\n }\n function setInitialValue(value) {\n if (!form) {\n modelRef.value = value;\n return;\n }\n form.stageInitialValue(unref(path), value, true);\n }\n const initialValue = computed(resolveInitialValue);\n // if no form is associated, use a regular ref.\n if (!form) {\n const value = ref(resolveInitialValue());\n return {\n value,\n initialValue,\n setInitialValue,\n };\n }\n // to set the initial value, first check if there is a current value, if there is then use it.\n // otherwise use the configured initial value if it exists.\n // prioritize model value over form values\n // #3429\n const currentValue = resolveModelValue(modelValue, form, initialValue, path);\n form.stageInitialValue(unref(path), currentValue, true);\n // otherwise use a computed setter that triggers the `setFieldValue`\n const value = computed({\n get() {\n return getFromPath(form.values, unref(path));\n },\n set(newVal) {\n form.setFieldValue(unref(path), newVal);\n },\n });\n return {\n value,\n initialValue,\n setInitialValue,\n };\n}\n/*\n to set the initial value, first check if there is a current value, if there is then use it.\n otherwise use the configured initial value if it exists.\n prioritize model value over form values\n #3429\n*/\nfunction resolveModelValue(modelValue, form, initialValue, path) {\n if (isRef(modelValue)) {\n return unref(modelValue);\n }\n if (modelValue !== undefined) {\n return modelValue;\n }\n return getFromPath(form.values, unref(path), unref(initialValue));\n}\n/**\n * Creates meta flags state and some associated effects with them\n */\nfunction _useFieldMeta(currentValue, initialValue, errors) {\n const meta = reactive({\n touched: false,\n pending: false,\n valid: true,\n validated: !!unref(errors).length,\n initialValue: computed(() => unref(initialValue)),\n dirty: computed(() => {\n return !isEqual(unref(currentValue), unref(initialValue));\n }),\n });\n watch(errors, value => {\n meta.valid = !value.length;\n }, {\n immediate: true,\n flush: 'sync',\n });\n return meta;\n}\n/**\n * Creates the error message state for the field state\n */\nfunction _useFieldErrors(path, form) {\n function normalizeErrors(messages) {\n if (!messages) {\n return [];\n }\n return Array.isArray(messages) ? messages : [messages];\n }\n if (!form) {\n const errors = ref([]);\n return {\n errors,\n errorMessage: computed(() => errors.value[0]),\n setErrors: (messages) => {\n errors.value = normalizeErrors(messages);\n },\n };\n }\n const errors = computed(() => form.errorBag.value[unref(path)] || []);\n return {\n errors,\n errorMessage: computed(() => errors.value[0]),\n setErrors: (messages) => {\n form.setFieldErrorBag(unref(path), normalizeErrors(messages));\n },\n };\n}\n\nfunction installDevtoolsPlugin(app) {\n if ((process.env.NODE_ENV !== 'production')) {\n setupDevtoolsPlugin({\n id: 'vee-validate-devtools-plugin',\n label: 'VeeValidate Plugin',\n packageName: 'vee-validate',\n homepage: 'https://vee-validate.logaretm.com/v4',\n app,\n logo: 'https://vee-validate.logaretm.com/v4/logo.png',\n }, setupApiHooks);\n }\n}\nconst DEVTOOLS_FORMS = {};\nconst DEVTOOLS_FIELDS = {};\nlet API;\nconst refreshInspector = throttle(() => {\n setTimeout(async () => {\n await nextTick();\n API === null || API === void 0 ? void 0 : API.sendInspectorState(INSPECTOR_ID);\n API === null || API === void 0 ? void 0 : API.sendInspectorTree(INSPECTOR_ID);\n }, 100);\n}, 100);\nfunction registerFormWithDevTools(form) {\n const vm = getCurrentInstance();\n if (!API) {\n const app = vm === null || vm === void 0 ? void 0 : vm.appContext.app;\n if (!app) {\n return;\n }\n installDevtoolsPlugin(app);\n }\n DEVTOOLS_FORMS[form.formId] = Object.assign({}, form);\n DEVTOOLS_FORMS[form.formId]._vm = vm;\n onUnmounted(() => {\n delete DEVTOOLS_FORMS[form.formId];\n refreshInspector();\n });\n refreshInspector();\n}\nfunction registerSingleFieldWithDevtools(field) {\n const vm = getCurrentInstance();\n if (!API) {\n const app = vm === null || vm === void 0 ? void 0 : vm.appContext.app;\n if (!app) {\n return;\n }\n installDevtoolsPlugin(app);\n }\n DEVTOOLS_FIELDS[field.id] = Object.assign({}, field);\n DEVTOOLS_FIELDS[field.id]._vm = vm;\n onUnmounted(() => {\n delete DEVTOOLS_FIELDS[field.id];\n refreshInspector();\n });\n refreshInspector();\n}\nconst INSPECTOR_ID = 'vee-validate-inspector';\nconst COLORS = {\n error: 0xbd4b4b,\n success: 0x06d77b,\n unknown: 0x54436b,\n white: 0xffffff,\n black: 0x000000,\n blue: 0x035397,\n purple: 0xb980f0,\n orange: 0xf5a962,\n gray: 0xbbbfca,\n};\nlet SELECTED_NODE = null;\nfunction setupApiHooks(api) {\n API = api;\n api.addInspector({\n id: INSPECTOR_ID,\n icon: 'rule',\n label: 'vee-validate',\n noSelectionText: 'Select a vee-validate node to inspect',\n actions: [\n {\n icon: 'done_outline',\n tooltip: 'Validate selected item',\n action: async () => {\n if (!SELECTED_NODE) {\n console.error('There is not a valid selected vee-validate node or component');\n return;\n }\n await SELECTED_NODE.validate();\n },\n },\n {\n icon: 'delete_sweep',\n tooltip: 'Clear validation state of the selected item',\n action: () => {\n if (!SELECTED_NODE) {\n console.error('There is not a valid selected vee-validate node or component');\n return;\n }\n if ('id' in SELECTED_NODE) {\n SELECTED_NODE.resetField();\n return;\n }\n SELECTED_NODE.resetForm();\n },\n },\n ],\n });\n api.on.getInspectorTree(payload => {\n if (payload.inspectorId !== INSPECTOR_ID) {\n return;\n }\n const forms = Object.values(DEVTOOLS_FORMS);\n const fields = Object.values(DEVTOOLS_FIELDS);\n payload.rootNodes = [\n ...forms.map(mapFormForDevtoolsInspector),\n ...fields.map(field => mapFieldForDevtoolsInspector(field)),\n ];\n });\n api.on.getInspectorState((payload, ctx) => {\n if (payload.inspectorId !== INSPECTOR_ID || ctx.currentTab !== `custom-inspector:${INSPECTOR_ID}`) {\n return;\n }\n const { form, field, type } = decodeNodeId(payload.nodeId);\n if (form && type === 'form') {\n payload.state = buildFormState(form);\n SELECTED_NODE = form;\n return;\n }\n if (field && type === 'field') {\n payload.state = buildFieldState(field);\n SELECTED_NODE = field;\n return;\n }\n SELECTED_NODE = null;\n });\n}\nfunction mapFormForDevtoolsInspector(form) {\n const { textColor, bgColor } = getTagTheme(form);\n const formTreeNodes = {};\n Object.values(form.fieldsByPath.value).forEach(field => {\n const fieldInstance = Array.isArray(field) ? field[0] : field;\n if (!fieldInstance) {\n return;\n }\n setInPath(formTreeNodes, unref(fieldInstance.name), mapFieldForDevtoolsInspector(fieldInstance, form));\n });\n function buildFormTree(tree, path = []) {\n const key = [...path].pop();\n if ('id' in tree) {\n return Object.assign(Object.assign({}, tree), { label: key || tree.label });\n }\n if (isObject(tree)) {\n return {\n id: `${path.join('.')}`,\n label: key || '',\n children: Object.keys(tree).map(key => buildFormTree(tree[key], [...path, key])),\n };\n }\n if (Array.isArray(tree)) {\n return {\n id: `${path.join('.')}`,\n label: `${key}[]`,\n children: tree.map((c, idx) => buildFormTree(c, [...path, String(idx)])),\n };\n }\n return { id: '', label: '', children: [] };\n }\n const { children } = buildFormTree(formTreeNodes);\n return {\n id: encodeNodeId(form),\n label: 'Form',\n children,\n tags: [\n {\n label: 'Form',\n textColor,\n backgroundColor: bgColor,\n },\n {\n label: `${Object.keys(form.fieldsByPath.value).length} fields`,\n textColor: COLORS.white,\n backgroundColor: COLORS.unknown,\n },\n ],\n };\n}\nfunction mapFieldForDevtoolsInspector(field, form) {\n const fieldInstance = normalizeField(field);\n const { textColor, bgColor } = getTagTheme(fieldInstance);\n const isGroup = Array.isArray(field) && field.length > 1;\n return {\n id: encodeNodeId(form, fieldInstance, !isGroup),\n label: unref(fieldInstance.name),\n children: Array.isArray(field) ? field.map(fieldItem => mapFieldForDevtoolsInspector(fieldItem, form)) : undefined,\n tags: [\n isGroup\n ? undefined\n : {\n label: 'Field',\n textColor,\n backgroundColor: bgColor,\n },\n !form\n ? {\n label: 'Standalone',\n textColor: COLORS.black,\n backgroundColor: COLORS.gray,\n }\n : undefined,\n !isGroup && fieldInstance.type === 'checkbox'\n ? {\n label: 'Checkbox',\n textColor: COLORS.white,\n backgroundColor: COLORS.blue,\n }\n : undefined,\n !isGroup && fieldInstance.type === 'radio'\n ? {\n label: 'Radio',\n textColor: COLORS.white,\n backgroundColor: COLORS.purple,\n }\n : undefined,\n isGroup\n ? {\n label: 'Group',\n textColor: COLORS.black,\n backgroundColor: COLORS.orange,\n }\n : undefined,\n ].filter(Boolean),\n };\n}\nfunction encodeNodeId(form, field, encodeIndex = true) {\n const fieldPath = form ? unref(field === null || field === void 0 ? void 0 : field.name) : field === null || field === void 0 ? void 0 : field.id;\n const fieldGroup = fieldPath ? form === null || form === void 0 ? void 0 : form.fieldsByPath.value[fieldPath] : undefined;\n let idx;\n if (encodeIndex && field && Array.isArray(fieldGroup)) {\n idx = fieldGroup.indexOf(field);\n }\n const idObject = { f: form === null || form === void 0 ? void 0 : form.formId, ff: fieldPath, idx, type: field ? 'field' : 'form' };\n return btoa(JSON.stringify(idObject));\n}\nfunction decodeNodeId(nodeId) {\n try {\n const idObject = JSON.parse(atob(nodeId));\n const form = DEVTOOLS_FORMS[idObject.f];\n if (!form && idObject.ff) {\n const field = DEVTOOLS_FIELDS[idObject.ff];\n if (!field) {\n return {};\n }\n return {\n type: idObject.type,\n field,\n };\n }\n if (!form) {\n return {};\n }\n const fieldGroup = form.fieldsByPath.value[idObject.ff];\n return {\n type: idObject.type,\n form,\n field: Array.isArray(fieldGroup) ? fieldGroup[idObject.idx || 0] : fieldGroup,\n };\n }\n catch (err) {\n // console.error(`Devtools: [vee-validate] Failed to parse node id ${nodeId}`);\n }\n return {};\n}\nfunction buildFieldState(field) {\n const { errors, meta, value } = field;\n return {\n 'Field state': [\n { key: 'errors', value: errors.value },\n {\n key: 'initialValue',\n value: meta.initialValue,\n },\n {\n key: 'currentValue',\n value: value.value,\n },\n {\n key: 'touched',\n value: meta.touched,\n },\n {\n key: 'dirty',\n value: meta.dirty,\n },\n {\n key: 'valid',\n value: meta.valid,\n },\n ],\n };\n}\nfunction buildFormState(form) {\n const { errorBag, meta, values, isSubmitting, submitCount } = form;\n return {\n 'Form state': [\n {\n key: 'submitCount',\n value: submitCount.value,\n },\n {\n key: 'isSubmitting',\n value: isSubmitting.value,\n },\n {\n key: 'touched',\n value: meta.value.touched,\n },\n {\n key: 'dirty',\n value: meta.value.dirty,\n },\n {\n key: 'valid',\n value: meta.value.valid,\n },\n {\n key: 'initialValues',\n value: meta.value.initialValues,\n },\n {\n key: 'currentValues',\n value: values,\n },\n {\n key: 'errors',\n value: keysOf(errorBag.value).reduce((acc, key) => {\n var _a;\n const message = (_a = errorBag.value[key]) === null || _a === void 0 ? void 0 : _a[0];\n if (message) {\n acc[key] = message;\n }\n return acc;\n }, {}),\n },\n ],\n };\n}\n/**\n * Resolves the tag color based on the form state\n */\nfunction getTagTheme(fieldOrForm) {\n // const fallbackColors = {\n // bgColor: COLORS.unknown,\n // textColor: COLORS.white,\n // };\n const isValid = 'id' in fieldOrForm ? fieldOrForm.meta.valid : fieldOrForm.meta.value.valid;\n return {\n bgColor: isValid ? COLORS.success : COLORS.error,\n textColor: isValid ? COLORS.black : COLORS.white,\n };\n}\n\n/**\n * Creates a field composite.\n */\nfunction useField(path, rules, opts) {\n if (hasCheckedAttr(opts === null || opts === void 0 ? void 0 : opts.type)) {\n return useCheckboxField(path, rules, opts);\n }\n return _useField(path, rules, opts);\n}\nfunction _useField(path, rules, opts) {\n const { initialValue: modelValue, validateOnMount, bails, type, checkedValue, label, validateOnValueUpdate, uncheckedValue, controlled, keepValueOnUnmount, modelPropName, syncVModel, form: controlForm, } = normalizeOptions(opts);\n const injectedForm = controlled ? injectWithSelf(FormContextKey) : undefined;\n const form = controlForm || injectedForm;\n const name = lazyToRef(path);\n // a flag indicating if the field is about to be removed/unmounted.\n let markedForRemoval = false;\n const { id, value, initialValue, meta, setState, errors, errorMessage } = useFieldState(name, {\n modelValue,\n form,\n });\n if (syncVModel) {\n useVModel({ value, prop: modelPropName, handleChange });\n }\n /**\n * Handles common onBlur meta update\n */\n const handleBlur = () => {\n meta.touched = true;\n };\n const normalizedRules = computed(() => {\n let rulesValue = unref(rules);\n const schema = unref(form === null || form === void 0 ? void 0 : form.schema);\n if (schema && !isYupValidator(schema) && !isTypedSchema(schema)) {\n rulesValue = extractRuleFromSchema(schema, unref(name)) || rulesValue;\n }\n if (isYupValidator(rulesValue) ||\n isTypedSchema(rulesValue) ||\n isCallable(rulesValue) ||\n Array.isArray(rulesValue)) {\n return rulesValue;\n }\n return normalizeRules(rulesValue);\n });\n async function validateCurrentValue(mode) {\n var _a, _b;\n if (form === null || form === void 0 ? void 0 : form.validateSchema) {\n return (_a = (await form.validateSchema(mode)).results[unref(name)]) !== null && _a !== void 0 ? _a : { valid: true, errors: [] };\n }\n return validate(value.value, normalizedRules.value, {\n name: unref(name),\n label: unref(label),\n values: (_b = form === null || form === void 0 ? void 0 : form.values) !== null && _b !== void 0 ? _b : {},\n bails,\n });\n }\n const validateWithStateMutation = withLatest(async () => {\n meta.pending = true;\n meta.validated = true;\n return validateCurrentValue('validated-only');\n }, result => {\n if (markedForRemoval) {\n result.valid = true;\n result.errors = [];\n }\n setState({ errors: result.errors });\n meta.pending = false;\n return result;\n });\n const validateValidStateOnly = withLatest(async () => {\n return validateCurrentValue('silent');\n }, result => {\n if (markedForRemoval) {\n result.valid = true;\n }\n meta.valid = result.valid;\n return result;\n });\n function validate$1(opts) {\n if ((opts === null || opts === void 0 ? void 0 : opts.mode) === 'silent') {\n return validateValidStateOnly();\n }\n return validateWithStateMutation();\n }\n // Common input/change event handler\n function handleChange(e, shouldValidate = true) {\n const newValue = normalizeEventValue(e);\n value.value = newValue;\n if (!validateOnValueUpdate && shouldValidate) {\n validateWithStateMutation();\n }\n }\n // Runs the initial validation\n onMounted(() => {\n if (validateOnMount) {\n return validateWithStateMutation();\n }\n // validate self initially if no form was handling this\n // forms should have their own initial silent validation run to make things more efficient\n if (!form || !form.validateSchema) {\n validateValidStateOnly();\n }\n });\n function setTouched(isTouched) {\n meta.touched = isTouched;\n }\n let unwatchValue;\n let lastWatchedValue = klona(value.value);\n function watchValue() {\n unwatchValue = watch(value, (val, oldVal) => {\n if (isEqual(val, oldVal) && isEqual(val, lastWatchedValue)) {\n return;\n }\n const validateFn = validateOnValueUpdate ? validateWithStateMutation : validateValidStateOnly;\n validateFn();\n lastWatchedValue = klona(val);\n }, {\n deep: true,\n });\n }\n watchValue();\n function resetField(state) {\n var _a;\n unwatchValue === null || unwatchValue === void 0 ? void 0 : unwatchValue();\n const newValue = state && 'value' in state ? state.value : initialValue.value;\n setState({\n value: klona(newValue),\n initialValue: klona(newValue),\n touched: (_a = state === null || state === void 0 ? void 0 : state.touched) !== null && _a !== void 0 ? _a : false,\n errors: (state === null || state === void 0 ? void 0 : state.errors) || [],\n });\n meta.pending = false;\n meta.validated = false;\n validateValidStateOnly();\n // need to watch at next tick to avoid triggering the value watcher\n nextTick(() => {\n watchValue();\n });\n }\n function setValue(newValue) {\n value.value = newValue;\n }\n function setErrors(errors) {\n setState({ errors: Array.isArray(errors) ? errors : [errors] });\n }\n const field = {\n id,\n name,\n label,\n value,\n meta,\n errors,\n errorMessage,\n type,\n checkedValue,\n uncheckedValue,\n bails,\n keepValueOnUnmount,\n resetField,\n handleReset: () => resetField(),\n validate: validate$1,\n handleChange,\n handleBlur,\n setState,\n setTouched,\n setErrors,\n setValue,\n };\n provide(FieldContextKey, field);\n if (isRef(rules) && typeof unref(rules) !== 'function') {\n watch(rules, (value, oldValue) => {\n if (isEqual(value, oldValue)) {\n return;\n }\n meta.validated ? validateWithStateMutation() : validateValidStateOnly();\n }, {\n deep: true,\n });\n }\n if ((process.env.NODE_ENV !== 'production')) {\n field._vm = getCurrentInstance();\n watch(() => (Object.assign(Object.assign({ errors: errors.value }, meta), { value: value.value })), refreshInspector, {\n deep: true,\n });\n if (!form) {\n registerSingleFieldWithDevtools(field);\n }\n }\n // if no associated form return the field API immediately\n if (!form) {\n return field;\n }\n // associate the field with the given form\n form.register(field);\n onBeforeUnmount(() => {\n markedForRemoval = true;\n form.unregister(field);\n });\n // extract cross-field dependencies in a computed prop\n const dependencies = computed(() => {\n const rulesVal = normalizedRules.value;\n // is falsy, a function schema or a yup schema\n if (!rulesVal ||\n isCallable(rulesVal) ||\n isYupValidator(rulesVal) ||\n isTypedSchema(rulesVal) ||\n Array.isArray(rulesVal)) {\n return {};\n }\n return Object.keys(rulesVal).reduce((acc, rule) => {\n const deps = extractLocators(rulesVal[rule])\n .map((dep) => dep.__locatorRef)\n .reduce((depAcc, depName) => {\n const depValue = getFromPath(form.values, depName) || form.values[depName];\n if (depValue !== undefined) {\n depAcc[depName] = depValue;\n }\n return depAcc;\n }, {});\n Object.assign(acc, deps);\n return acc;\n }, {});\n });\n // Adds a watcher that runs the validation whenever field dependencies change\n watch(dependencies, (deps, oldDeps) => {\n // Skip if no dependencies or if the field wasn't manipulated\n if (!Object.keys(deps).length) {\n return;\n }\n const shouldValidate = !isEqual(deps, oldDeps);\n if (shouldValidate) {\n meta.validated ? validateWithStateMutation() : validateValidStateOnly();\n }\n });\n return field;\n}\n/**\n * Normalizes partial field options to include the full options\n */\nfunction normalizeOptions(opts) {\n var _a;\n const defaults = () => ({\n initialValue: undefined,\n validateOnMount: false,\n bails: true,\n label: undefined,\n validateOnValueUpdate: true,\n keepValueOnUnmount: undefined,\n modelPropName: 'modelValue',\n syncVModel: true,\n controlled: true,\n });\n const isVModelSynced = (_a = opts === null || opts === void 0 ? void 0 : opts.syncVModel) !== null && _a !== void 0 ? _a : true;\n const initialValue = isVModelSynced && !('initialValue' in (opts || {}))\n ? getCurrentModelValue(getCurrentInstance(), (opts === null || opts === void 0 ? void 0 : opts.modelPropName) || 'modelValue')\n : opts === null || opts === void 0 ? void 0 : opts.initialValue;\n if (!opts) {\n return Object.assign(Object.assign({}, defaults()), { initialValue });\n }\n // TODO: Deprecate this in next major release\n const checkedValue = 'valueProp' in opts ? opts.valueProp : opts.checkedValue;\n const controlled = 'standalone' in opts ? !opts.standalone : opts.controlled;\n return Object.assign(Object.assign(Object.assign({}, defaults()), (opts || {})), { initialValue, controlled: controlled !== null && controlled !== void 0 ? controlled : true, checkedValue });\n}\n/**\n * Extracts the validation rules from a schema\n */\nfunction extractRuleFromSchema(schema, fieldName) {\n // no schema at all\n if (!schema) {\n return undefined;\n }\n // there is a key on the schema object for this field\n return schema[fieldName];\n}\nfunction useCheckboxField(name, rules, opts) {\n const form = !(opts === null || opts === void 0 ? void 0 : opts.standalone) ? injectWithSelf(FormContextKey) : undefined;\n const checkedValue = opts === null || opts === void 0 ? void 0 : opts.checkedValue;\n const uncheckedValue = opts === null || opts === void 0 ? void 0 : opts.uncheckedValue;\n function patchCheckboxApi(field) {\n const handleChange = field.handleChange;\n const checked = computed(() => {\n const currentValue = unref(field.value);\n const checkedVal = unref(checkedValue);\n return Array.isArray(currentValue)\n ? currentValue.findIndex(v => isEqual(v, checkedVal)) >= 0\n : isEqual(checkedVal, currentValue);\n });\n function handleCheckboxChange(e, shouldValidate = true) {\n var _a;\n if (checked.value === ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.checked)) {\n if (shouldValidate) {\n field.validate();\n }\n return;\n }\n let newValue = normalizeEventValue(e);\n // Single checkbox field without a form to toggle it's value\n if (!form) {\n newValue = resolveNextCheckboxValue(unref(field.value), unref(checkedValue), unref(uncheckedValue));\n }\n handleChange(newValue, shouldValidate);\n }\n return Object.assign(Object.assign({}, field), { checked,\n checkedValue,\n uncheckedValue, handleChange: handleCheckboxChange });\n }\n return patchCheckboxApi(_useField(name, rules, opts));\n}\nfunction useVModel({ prop, value, handleChange }) {\n const vm = getCurrentInstance();\n /* istanbul ignore next */\n if (!vm) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn('Failed to setup model events because `useField` was not called in setup.');\n }\n return;\n }\n const propName = prop || 'modelValue';\n const emitName = `update:${propName}`;\n // Component doesn't have a model prop setup (must be defined on the props)\n if (!(propName in vm.props)) {\n return;\n }\n watch(value, newValue => {\n if (isEqual(newValue, getCurrentModelValue(vm, propName))) {\n return;\n }\n vm.emit(emitName, newValue);\n });\n watch(() => getCurrentModelValue(vm, propName), propValue => {\n if (propValue === IS_ABSENT && value.value === undefined) {\n return;\n }\n const newValue = propValue === IS_ABSENT ? undefined : propValue;\n if (isEqual(newValue, applyModelModifiers(value.value, vm.props.modelModifiers))) {\n return;\n }\n handleChange(newValue);\n });\n}\nfunction getCurrentModelValue(vm, propName) {\n if (!vm) {\n return undefined;\n }\n return vm.props[propName];\n}\n\nconst FieldImpl = defineComponent({\n name: 'Field',\n inheritAttrs: false,\n props: {\n as: {\n type: [String, Object],\n default: undefined,\n },\n name: {\n type: String,\n required: true,\n },\n rules: {\n type: [Object, String, Function],\n default: undefined,\n },\n validateOnMount: {\n type: Boolean,\n default: false,\n },\n validateOnBlur: {\n type: Boolean,\n default: undefined,\n },\n validateOnChange: {\n type: Boolean,\n default: undefined,\n },\n validateOnInput: {\n type: Boolean,\n default: undefined,\n },\n validateOnModelUpdate: {\n type: Boolean,\n default: undefined,\n },\n bails: {\n type: Boolean,\n default: () => getConfig().bails,\n },\n label: {\n type: String,\n default: undefined,\n },\n uncheckedValue: {\n type: null,\n default: undefined,\n },\n modelValue: {\n type: null,\n default: IS_ABSENT,\n },\n modelModifiers: {\n type: null,\n default: () => ({}),\n },\n 'onUpdate:modelValue': {\n type: null,\n default: undefined,\n },\n standalone: {\n type: Boolean,\n default: false,\n },\n keepValue: {\n type: Boolean,\n default: undefined,\n },\n },\n setup(props, ctx) {\n const rules = toRef(props, 'rules');\n const name = toRef(props, 'name');\n const label = toRef(props, 'label');\n const uncheckedValue = toRef(props, 'uncheckedValue');\n const keepValue = toRef(props, 'keepValue');\n const { errors, value, errorMessage, validate: validateField, handleChange, handleBlur, setTouched, resetField, handleReset, meta, checked, setErrors, } = useField(name, rules, {\n validateOnMount: props.validateOnMount,\n bails: props.bails,\n standalone: props.standalone,\n type: ctx.attrs.type,\n initialValue: resolveInitialValue(props, ctx),\n // Only for checkboxes and radio buttons\n checkedValue: ctx.attrs.value,\n uncheckedValue,\n label,\n validateOnValueUpdate: false,\n keepValueOnUnmount: keepValue,\n });\n // If there is a v-model applied on the component we need to emit the `update:modelValue` whenever the value binding changes\n const onChangeHandler = function handleChangeWithModel(e, shouldValidate = true) {\n handleChange(e, shouldValidate);\n ctx.emit('update:modelValue', value.value);\n };\n const handleInput = (e) => {\n if (!hasCheckedAttr(ctx.attrs.type)) {\n value.value = normalizeEventValue(e);\n }\n };\n const onInputHandler = function handleInputWithModel(e) {\n handleInput(e);\n ctx.emit('update:modelValue', value.value);\n };\n const fieldProps = computed(() => {\n const { validateOnInput, validateOnChange, validateOnBlur, validateOnModelUpdate } = resolveValidationTriggers(props);\n const baseOnBlur = [handleBlur, ctx.attrs.onBlur, validateOnBlur ? validateField : undefined].filter(Boolean);\n const baseOnInput = [(e) => onChangeHandler(e, validateOnInput), ctx.attrs.onInput].filter(Boolean);\n const baseOnChange = [(e) => onChangeHandler(e, validateOnChange), ctx.attrs.onChange].filter(Boolean);\n const attrs = {\n name: props.name,\n onBlur: baseOnBlur,\n onInput: baseOnInput,\n onChange: baseOnChange,\n };\n attrs['onUpdate:modelValue'] = e => onChangeHandler(e, validateOnModelUpdate);\n if (hasCheckedAttr(ctx.attrs.type) && checked) {\n attrs.checked = checked.value;\n }\n const tag = resolveTag(props, ctx);\n if (shouldHaveValueBinding(tag, ctx.attrs)) {\n attrs.value = value.value;\n }\n return attrs;\n });\n function slotProps() {\n return {\n field: fieldProps.value,\n value: value.value,\n meta,\n errors: errors.value,\n errorMessage: errorMessage.value,\n validate: validateField,\n resetField,\n handleChange: onChangeHandler,\n handleInput: onInputHandler,\n handleReset,\n handleBlur,\n setTouched,\n setErrors,\n };\n }\n ctx.expose({\n setErrors,\n setTouched,\n reset: resetField,\n validate: validateField,\n handleChange,\n });\n return () => {\n const tag = resolveDynamicComponent(resolveTag(props, ctx));\n const children = normalizeChildren(tag, ctx, slotProps);\n if (tag) {\n return h(tag, Object.assign(Object.assign({}, ctx.attrs), fieldProps.value), children);\n }\n return children;\n };\n },\n});\nfunction resolveTag(props, ctx) {\n let tag = props.as || '';\n if (!props.as && !ctx.slots.default) {\n tag = 'input';\n }\n return tag;\n}\nfunction resolveValidationTriggers(props) {\n var _a, _b, _c, _d;\n const { validateOnInput, validateOnChange, validateOnBlur, validateOnModelUpdate } = getConfig();\n return {\n validateOnInput: (_a = props.validateOnInput) !== null && _a !== void 0 ? _a : validateOnInput,\n validateOnChange: (_b = props.validateOnChange) !== null && _b !== void 0 ? _b : validateOnChange,\n validateOnBlur: (_c = props.validateOnBlur) !== null && _c !== void 0 ? _c : validateOnBlur,\n validateOnModelUpdate: (_d = props.validateOnModelUpdate) !== null && _d !== void 0 ? _d : validateOnModelUpdate,\n };\n}\nfunction resolveInitialValue(props, ctx) {\n // Gets the initial value either from `value` prop/attr or `v-model` binding (modelValue)\n // For checkboxes and radio buttons it will always be the model value not the `value` attribute\n if (!hasCheckedAttr(ctx.attrs.type)) {\n return isPropPresent(props, 'modelValue') ? props.modelValue : ctx.attrs.value;\n }\n return isPropPresent(props, 'modelValue') ? props.modelValue : undefined;\n}\nconst Field = FieldImpl;\n\nlet FORM_COUNTER = 0;\nfunction resolveInitialValues(opts) {\n const providedValues = unref(opts === null || opts === void 0 ? void 0 : opts.initialValues) || {};\n const schema = unref(opts === null || opts === void 0 ? void 0 : opts.validationSchema);\n if (schema && isTypedSchema(schema) && isCallable(schema.cast)) {\n return klona(schema.cast(providedValues) || {});\n }\n return klona(providedValues);\n}\nfunction useForm(opts) {\n var _a;\n const formId = FORM_COUNTER++;\n const controlledModelPaths = new Set();\n // Prevents fields from double resetting their values, which causes checkboxes to toggle their initial value\n // TODO: This won't be needed if we centralize all the state inside the `form` for form inputs\n let RESET_LOCK = false;\n // A lookup containing fields or field groups\n const fieldsByPath = ref({});\n // If the form is currently submitting\n const isSubmitting = ref(false);\n // The number of times the user tried to submit the form\n const submitCount = ref(0);\n // field arrays managed by this form\n const fieldArrays = [];\n // a private ref for all form values\n const formValues = reactive(resolveInitialValues(opts));\n // the source of errors for the form fields\n const { errorBag, setErrorBag, setFieldErrorBag } = useErrorBag(opts === null || opts === void 0 ? void 0 : opts.initialErrors);\n // Gets the first error of each field\n const errors = computed(() => {\n return keysOf(errorBag.value).reduce((acc, key) => {\n const bag = errorBag.value[key];\n if (bag && bag.length) {\n acc[key] = bag[0];\n }\n return acc;\n }, {});\n });\n function getFirstFieldAtPath(path) {\n const fieldOrGroup = fieldsByPath.value[path];\n return Array.isArray(fieldOrGroup) ? fieldOrGroup[0] : fieldOrGroup;\n }\n function fieldExists(path) {\n return !!fieldsByPath.value[path];\n }\n /**\n * Holds a computed reference to all fields names and labels\n */\n const fieldNames = computed(() => {\n return keysOf(fieldsByPath.value).reduce((names, path) => {\n const field = getFirstFieldAtPath(path);\n if (field) {\n names[path] = { name: unref(field.name) || '', label: unref(field.label) || '' };\n }\n return names;\n }, {});\n });\n const fieldBailsMap = computed(() => {\n return keysOf(fieldsByPath.value).reduce((map, path) => {\n var _a;\n const field = getFirstFieldAtPath(path);\n if (field) {\n map[path] = (_a = field.bails) !== null && _a !== void 0 ? _a : true;\n }\n return map;\n }, {});\n });\n // mutable non-reactive reference to initial errors\n // we need this to process initial errors then unset them\n const initialErrors = Object.assign({}, ((opts === null || opts === void 0 ? void 0 : opts.initialErrors) || {}));\n const keepValuesOnUnmount = (_a = opts === null || opts === void 0 ? void 0 : opts.keepValuesOnUnmount) !== null && _a !== void 0 ? _a : false;\n // initial form values\n const { initialValues, originalInitialValues, setInitialValues } = useFormInitialValues(fieldsByPath, formValues, opts);\n // form meta aggregations\n const meta = useFormMeta(fieldsByPath, formValues, originalInitialValues, errors);\n const controlledValues = computed(() => {\n return [...controlledModelPaths, ...keysOf(fieldsByPath.value)].reduce((acc, path) => {\n const value = getFromPath(formValues, path);\n setInPath(acc, path, value);\n return acc;\n }, {});\n });\n const schema = opts === null || opts === void 0 ? void 0 : opts.validationSchema;\n /**\n * Batches validation runs in 5ms batches\n * Must have two distinct batch queues to make sure they don't override each other settings #3783\n */\n const debouncedSilentValidation = debounceAsync(_validateSchema, 5);\n const debouncedValidation = debounceAsync(_validateSchema, 5);\n const validateSchema = withLatest(async (mode) => {\n return (await mode) === 'silent' ? debouncedSilentValidation() : debouncedValidation();\n }, (formResult, [mode]) => {\n // fields by id lookup\n const fieldsById = formCtx.fieldsByPath.value || {};\n // errors fields names, we need it to also check if custom errors are updated\n const currentErrorsPaths = keysOf(formCtx.errorBag.value);\n // collect all the keys from the schema and all fields\n // this ensures we have a complete keymap of all the fields\n const paths = [\n ...new Set([...keysOf(formResult.results), ...keysOf(fieldsById), ...currentErrorsPaths]),\n ];\n // aggregates the paths into a single result object while applying the results on the fields\n return paths.reduce((validation, path) => {\n const field = fieldsById[path];\n const messages = (formResult.results[path] || { errors: [] }).errors;\n const fieldResult = {\n errors: messages,\n valid: !messages.length,\n };\n validation.results[path] = fieldResult;\n if (!fieldResult.valid) {\n validation.errors[path] = fieldResult.errors[0];\n }\n // field not rendered\n if (!field) {\n setFieldError(path, messages);\n return validation;\n }\n // always update the valid flag regardless of the mode\n applyFieldMutation(field, f => (f.meta.valid = fieldResult.valid));\n if (mode === 'silent') {\n return validation;\n }\n const wasValidated = Array.isArray(field) ? field.some(f => f.meta.validated) : field.meta.validated;\n if (mode === 'validated-only' && !wasValidated) {\n return validation;\n }\n applyFieldMutation(field, f => f.setState({ errors: fieldResult.errors }));\n return validation;\n }, { valid: formResult.valid, results: {}, errors: {} });\n });\n function makeSubmissionFactory(onlyControlled) {\n return function submitHandlerFactory(fn, onValidationError) {\n return function submissionHandler(e) {\n if (e instanceof Event) {\n e.preventDefault();\n e.stopPropagation();\n }\n // Touch all fields\n setTouched(keysOf(fieldsByPath.value).reduce((acc, field) => {\n acc[field] = true;\n return acc;\n }, {}));\n isSubmitting.value = true;\n submitCount.value++;\n return validate()\n .then(result => {\n const values = klona(formValues);\n if (result.valid && typeof fn === 'function') {\n const controlled = klona(controlledValues.value);\n let submittedValues = onlyControlled ? controlled : values;\n if (result.values) {\n submittedValues = result.values;\n }\n return fn(submittedValues, {\n evt: e,\n controlledValues: controlled,\n setErrors,\n setFieldError,\n setTouched,\n setFieldTouched,\n setValues,\n setFieldValue,\n resetForm,\n resetField,\n });\n }\n if (!result.valid && typeof onValidationError === 'function') {\n onValidationError({\n values,\n evt: e,\n errors: result.errors,\n results: result.results,\n });\n }\n })\n .then(returnVal => {\n isSubmitting.value = false;\n return returnVal;\n }, err => {\n isSubmitting.value = false;\n // re-throw the err so it doesn't go silent\n throw err;\n });\n };\n };\n }\n const handleSubmitImpl = makeSubmissionFactory(false);\n const handleSubmit = handleSubmitImpl;\n handleSubmit.withControlled = makeSubmissionFactory(true);\n const formCtx = {\n formId,\n fieldsByPath,\n values: formValues,\n controlledValues,\n errorBag,\n errors,\n schema,\n submitCount,\n meta,\n isSubmitting,\n fieldArrays,\n keepValuesOnUnmount,\n validateSchema: unref(schema) ? validateSchema : undefined,\n validate,\n register: registerField,\n unregister: unregisterField,\n setFieldErrorBag,\n validateField,\n setFieldValue,\n setValues,\n setErrors,\n setFieldError,\n setFieldTouched,\n setTouched,\n resetForm,\n resetField,\n handleSubmit,\n stageInitialValue,\n unsetInitialValue,\n setFieldInitialValue,\n useFieldModel,\n };\n function isFieldGroup(fieldOrGroup) {\n return Array.isArray(fieldOrGroup);\n }\n function applyFieldMutation(fieldOrGroup, mutation) {\n if (Array.isArray(fieldOrGroup)) {\n return fieldOrGroup.forEach(mutation);\n }\n return mutation(fieldOrGroup);\n }\n function mutateAllFields(mutation) {\n Object.values(fieldsByPath.value).forEach(field => {\n if (!field) {\n return;\n }\n // avoid resetting the field values, because they should've been reset already.\n applyFieldMutation(field, mutation);\n });\n }\n /**\n * Manually sets an error message on a specific field\n */\n function setFieldError(field, message) {\n setFieldErrorBag(field, message);\n }\n /**\n * Sets errors for the fields specified in the object\n */\n function setErrors(fields) {\n setErrorBag(fields);\n }\n /**\n * Sets a single field value\n */\n function setFieldValue(field, value, { force } = { force: false }) {\n var _a;\n const fieldInstance = fieldsByPath.value[field];\n const clonedValue = klona(value);\n // field wasn't found, create a virtual field as a placeholder\n if (!fieldInstance) {\n setInPath(formValues, field, clonedValue);\n return;\n }\n if (isFieldGroup(fieldInstance) && ((_a = fieldInstance[0]) === null || _a === void 0 ? void 0 : _a.type) === 'checkbox' && !Array.isArray(value)) {\n // Multiple checkboxes, and only one of them got updated\n const newValue = klona(resolveNextCheckboxValue(getFromPath(formValues, field) || [], value, undefined));\n setInPath(formValues, field, newValue);\n return;\n }\n let newValue = clonedValue;\n // Single Checkbox: toggles the field value unless the field is being reset then force it\n if (!isFieldGroup(fieldInstance) && fieldInstance.type === 'checkbox' && !force && !RESET_LOCK) {\n newValue = klona(resolveNextCheckboxValue(getFromPath(formValues, field), value, unref(fieldInstance.uncheckedValue)));\n }\n setInPath(formValues, field, newValue);\n }\n /**\n * Sets multiple fields values\n */\n function setValues(fields) {\n // clean up old values\n keysOf(formValues).forEach(key => {\n delete formValues[key];\n });\n // set up new values\n keysOf(fields).forEach(path => {\n setFieldValue(path, fields[path]);\n });\n // regenerate the arrays when the form values change\n fieldArrays.forEach(f => f && f.reset());\n }\n function createModel(path) {\n const { value } = _useFieldValue(path, undefined, formCtx);\n watch(value, () => {\n if (!fieldExists(unref(path))) {\n validate({ mode: 'validated-only' });\n }\n }, {\n deep: true,\n });\n controlledModelPaths.add(unref(path));\n return value;\n }\n function useFieldModel(path) {\n if (!Array.isArray(path)) {\n return createModel(path);\n }\n return path.map(createModel);\n }\n /**\n * Sets the touched meta state on a field\n */\n function setFieldTouched(field, isTouched) {\n const fieldInstance = fieldsByPath.value[field];\n if (fieldInstance) {\n applyFieldMutation(fieldInstance, f => f.setTouched(isTouched));\n }\n }\n /**\n * Sets the touched meta state on multiple fields\n */\n function setTouched(fields) {\n keysOf(fields).forEach(field => {\n setFieldTouched(field, !!fields[field]);\n });\n }\n function resetField(field, state) {\n const fieldInstance = fieldsByPath.value[field];\n if (fieldInstance) {\n applyFieldMutation(fieldInstance, f => f.resetField(state));\n }\n }\n /**\n * Resets all fields\n */\n function resetForm(state) {\n RESET_LOCK = true;\n // Reset all field states first\n mutateAllFields(f => f.resetField());\n // reset values\n const newValues = (state === null || state === void 0 ? void 0 : state.values) ? state.values : originalInitialValues.value;\n setInitialValues(newValues);\n setValues(newValues);\n if (state === null || state === void 0 ? void 0 : state.touched) {\n setTouched(state.touched);\n }\n setErrors((state === null || state === void 0 ? void 0 : state.errors) || {});\n submitCount.value = (state === null || state === void 0 ? void 0 : state.submitCount) || 0;\n nextTick(() => {\n RESET_LOCK = false;\n });\n }\n function insertFieldAtPath(field, path) {\n const rawField = markRaw(field);\n const fieldPath = path;\n // first field at that path\n if (!fieldsByPath.value[fieldPath]) {\n fieldsByPath.value[fieldPath] = rawField;\n return;\n }\n const fieldAtPath = fieldsByPath.value[fieldPath];\n if (fieldAtPath && !Array.isArray(fieldAtPath)) {\n fieldsByPath.value[fieldPath] = [fieldAtPath];\n }\n // add the new array to that path\n fieldsByPath.value[fieldPath] = [...fieldsByPath.value[fieldPath], rawField];\n }\n function removeFieldFromPath(field, path) {\n const fieldPath = path;\n const fieldAtPath = fieldsByPath.value[fieldPath];\n if (!fieldAtPath) {\n return;\n }\n // same field at path\n if (!isFieldGroup(fieldAtPath) && field.id === fieldAtPath.id) {\n delete fieldsByPath.value[fieldPath];\n return;\n }\n if (isFieldGroup(fieldAtPath)) {\n const idx = fieldAtPath.findIndex(f => f.id === field.id);\n if (idx === -1) {\n return;\n }\n fieldAtPath.splice(idx, 1);\n if (!fieldAtPath.length) {\n delete fieldsByPath.value[fieldPath];\n }\n }\n }\n function registerField(field) {\n const fieldPath = unref(field.name);\n insertFieldAtPath(field, fieldPath);\n if (isRef(field.name)) {\n // ensures when a field's name was already taken that it preserves its same value\n // necessary for fields generated by loops\n watch(field.name, async (newPath, oldPath) => {\n // cache the value\n await nextTick();\n removeFieldFromPath(field, oldPath);\n insertFieldAtPath(field, newPath);\n // re-validate if either path had errors before\n if (errors.value[oldPath] || errors.value[newPath]) {\n // clear up both paths errors\n setFieldError(oldPath, undefined);\n validateField(newPath);\n }\n // clean up the old path if no other field is sharing that name\n // #3325\n await nextTick();\n if (!fieldExists(oldPath)) {\n unsetPath(formValues, oldPath);\n }\n });\n }\n // if field already had errors (initial errors) that's not user-set, validate it again to ensure state is correct\n // the difference being that `initialErrors` will contain the error message while other errors (pre-validated schema) won't have them as initial errors\n // #3342\n const initialErrorMessage = unref(field.errorMessage);\n if (initialErrorMessage && (initialErrors === null || initialErrors === void 0 ? void 0 : initialErrors[fieldPath]) !== initialErrorMessage) {\n validateField(fieldPath);\n }\n // marks the initial error as \"consumed\" so it won't be matched later with same non-initial error\n delete initialErrors[fieldPath];\n }\n function unregisterField(field) {\n const fieldName = unref(field.name);\n const fieldInstance = fieldsByPath.value[fieldName];\n const isGroup = !!fieldInstance && isFieldGroup(fieldInstance);\n removeFieldFromPath(field, fieldName);\n // clears a field error on unmounted\n // we wait till next tick to make sure if the field is completely removed and doesn't have any siblings like checkboxes\n nextTick(() => {\n var _a;\n const shouldKeepValue = (_a = unref(field.keepValueOnUnmount)) !== null && _a !== void 0 ? _a : unref(keepValuesOnUnmount);\n const currentGroupValue = getFromPath(formValues, fieldName);\n // The boolean here is we check if the field still belongs to the same control group with that name\n // if another group claimed the name, we should avoid handling it since it is no longer the same group\n // this happens with `v-for` over some checkboxes and field arrays.\n // also if the group no longer exist we can assume this group was the last one that controlled it\n const isSameGroup = isGroup && (fieldInstance === fieldsByPath.value[fieldName] || !fieldsByPath.value[fieldName]);\n // group field that still has a dangling value, the field may exist or not after it was removed.\n // This used to be handled in the useField composable but the form has better context on when it should/not happen.\n // if it does belong to it that means the group still exists\n // #3844\n if (isSameGroup && !shouldKeepValue) {\n if (Array.isArray(currentGroupValue)) {\n const valueIdx = currentGroupValue.findIndex(i => isEqual(i, unref(field.checkedValue)));\n if (valueIdx > -1) {\n const newVal = [...currentGroupValue];\n newVal.splice(valueIdx, 1);\n setFieldValue(fieldName, newVal, { force: true });\n }\n }\n else if (currentGroupValue === unref(field.checkedValue)) {\n // Remove field if it is a group but does not have an array value, like for radio inputs #3963\n unsetPath(formValues, fieldName);\n }\n }\n // Field was removed entirely, we should unset its path\n // #3384\n if (!fieldExists(fieldName)) {\n setFieldError(fieldName, undefined);\n // Checks if the field was configured to be unset during unmount or not\n // Checks both the form-level config and field-level one\n // Field has the priority if it is set, otherwise it goes to the form settings\n if (shouldKeepValue) {\n return;\n }\n // Don't apply emptyContainer check unless the current group value is an array\n if (isGroup && Array.isArray(currentGroupValue) && !isEmptyContainer(currentGroupValue)) {\n return;\n }\n unsetPath(formValues, fieldName);\n }\n });\n }\n async function validate(opts) {\n const mode = (opts === null || opts === void 0 ? void 0 : opts.mode) || 'force';\n if (mode === 'force') {\n mutateAllFields(f => (f.meta.validated = true));\n }\n if (formCtx.validateSchema) {\n return formCtx.validateSchema(mode);\n }\n // No schema, each field is responsible to validate itself\n const validations = await Promise.all(Object.values(fieldsByPath.value).map(field => {\n const fieldInstance = Array.isArray(field) ? field[0] : field;\n if (!fieldInstance) {\n return Promise.resolve({ key: '', valid: true, errors: [] });\n }\n return fieldInstance.validate(opts).then((result) => {\n return {\n key: unref(fieldInstance.name),\n valid: result.valid,\n errors: result.errors,\n };\n });\n }));\n const results = {};\n const errors = {};\n for (const validation of validations) {\n results[validation.key] = {\n valid: validation.valid,\n errors: validation.errors,\n };\n if (validation.errors.length) {\n errors[validation.key] = validation.errors[0];\n }\n }\n return {\n valid: validations.every(r => r.valid),\n results,\n errors,\n };\n }\n async function validateField(field) {\n const fieldInstance = fieldsByPath.value[field];\n if (!fieldInstance) {\n warn$1(`field with name ${field} was not found`);\n return Promise.resolve({ errors: [], valid: true });\n }\n if (Array.isArray(fieldInstance)) {\n return fieldInstance.map(f => f.validate())[0];\n }\n return fieldInstance.validate();\n }\n function unsetInitialValue(path) {\n unsetPath(initialValues.value, path);\n }\n /**\n * Sneaky function to set initial field values\n */\n function stageInitialValue(path, value, updateOriginal = false) {\n setInPath(formValues, path, value);\n setFieldInitialValue(path, value);\n if (updateOriginal && !(opts === null || opts === void 0 ? void 0 : opts.initialValues)) {\n setInPath(originalInitialValues.value, path, klona(value));\n }\n }\n function setFieldInitialValue(path, value) {\n setInPath(initialValues.value, path, klona(value));\n }\n async function _validateSchema() {\n const schemaValue = unref(schema);\n if (!schemaValue) {\n return { valid: true, results: {}, errors: {} };\n }\n const formResult = isYupValidator(schemaValue) || isTypedSchema(schemaValue)\n ? await validateTypedSchema(schemaValue, formValues)\n : await validateObjectSchema(schemaValue, formValues, {\n names: fieldNames.value,\n bailsMap: fieldBailsMap.value,\n });\n return formResult;\n }\n const submitForm = handleSubmit((_, { evt }) => {\n if (isFormSubmitEvent(evt)) {\n evt.target.submit();\n }\n });\n // Trigger initial validation\n onMounted(() => {\n if (opts === null || opts === void 0 ? void 0 : opts.initialErrors) {\n setErrors(opts.initialErrors);\n }\n if (opts === null || opts === void 0 ? void 0 : opts.initialTouched) {\n setTouched(opts.initialTouched);\n }\n // if validate on mount was enabled\n if (opts === null || opts === void 0 ? void 0 : opts.validateOnMount) {\n validate();\n return;\n }\n // otherwise run initial silent validation through schema if available\n // the useField should skip their own silent validation if a yup schema is present\n if (formCtx.validateSchema) {\n formCtx.validateSchema('silent');\n }\n });\n if (isRef(schema)) {\n watch(schema, () => {\n var _a;\n (_a = formCtx.validateSchema) === null || _a === void 0 ? void 0 : _a.call(formCtx, 'validated-only');\n });\n }\n // Provide injections\n provide(FormContextKey, formCtx);\n if ((process.env.NODE_ENV !== 'production')) {\n registerFormWithDevTools(formCtx);\n watch(() => (Object.assign(Object.assign({ errors: errorBag.value }, meta.value), { values: formValues, isSubmitting: isSubmitting.value, submitCount: submitCount.value })), refreshInspector, {\n deep: true,\n });\n }\n return Object.assign(Object.assign({}, formCtx), { handleReset: () => resetForm(), submitForm });\n}\n/**\n * Manages form meta aggregation\n */\nfunction useFormMeta(fieldsByPath, currentValues, initialValues, errors) {\n const MERGE_STRATEGIES = {\n touched: 'some',\n pending: 'some',\n valid: 'every',\n };\n const isDirty = computed(() => {\n return !isEqual(currentValues, unref(initialValues));\n });\n function calculateFlags() {\n const fields = Object.values(fieldsByPath.value).flat(1).filter(Boolean);\n return keysOf(MERGE_STRATEGIES).reduce((acc, flag) => {\n const mergeMethod = MERGE_STRATEGIES[flag];\n acc[flag] = fields[mergeMethod](field => field.meta[flag]);\n return acc;\n }, {});\n }\n const flags = reactive(calculateFlags());\n watchEffect(() => {\n const value = calculateFlags();\n flags.touched = value.touched;\n flags.valid = value.valid;\n flags.pending = value.pending;\n });\n return computed(() => {\n return Object.assign(Object.assign({ initialValues: unref(initialValues) }, flags), { valid: flags.valid && !keysOf(errors.value).length, dirty: isDirty.value });\n });\n}\n/**\n * Manages the initial values prop\n */\nfunction useFormInitialValues(fields, formValues, opts) {\n const values = resolveInitialValues(opts);\n const providedValues = opts === null || opts === void 0 ? void 0 : opts.initialValues;\n // these are the mutable initial values as the fields are mounted/unmounted\n const initialValues = ref(values);\n // these are the original initial value as provided by the user initially, they don't keep track of conditional fields\n // this is important because some conditional fields will overwrite the initial values for other fields who had the same name\n // like array fields, any push/insert operation will overwrite the initial values because they \"create new fields\"\n // so these are the values that the reset function should use\n // these only change when the user explicitly changes the initial values or when the user resets them with new values.\n const originalInitialValues = ref(klona(values));\n function setInitialValues(values, updateFields = false) {\n initialValues.value = klona(values);\n originalInitialValues.value = klona(values);\n if (!updateFields) {\n return;\n }\n // update the pristine non-touched fields\n // those are excluded because it's unlikely you want to change the form values using initial values\n // we mostly watch them for API population or newly inserted fields\n // if the user API is taking too much time before user interaction they should consider disabling or hiding their inputs until the values are ready\n keysOf(fields.value).forEach(fieldPath => {\n const field = fields.value[fieldPath];\n const wasTouched = Array.isArray(field) ? field.some(f => f.meta.touched) : field === null || field === void 0 ? void 0 : field.meta.touched;\n if (!field || wasTouched) {\n return;\n }\n const newValue = getFromPath(initialValues.value, fieldPath);\n setInPath(formValues, fieldPath, klona(newValue));\n });\n }\n if (isRef(providedValues)) {\n watch(providedValues, value => {\n setInitialValues(value, true);\n }, {\n deep: true,\n });\n }\n return {\n initialValues,\n originalInitialValues,\n setInitialValues,\n };\n}\nfunction useErrorBag(initialErrors) {\n const errorBag = ref({});\n function normalizeErrorItem(message) {\n return Array.isArray(message) ? message : message ? [message] : [];\n }\n /**\n * Manually sets an error message on a specific field\n */\n function setFieldErrorBag(field, message) {\n if (!message) {\n delete errorBag.value[field];\n return;\n }\n errorBag.value[field] = normalizeErrorItem(message);\n }\n /**\n * Sets errors for the fields specified in the object\n */\n function setErrorBag(fields) {\n errorBag.value = keysOf(fields).reduce((acc, key) => {\n const message = fields[key];\n if (message) {\n acc[key] = normalizeErrorItem(message);\n }\n return acc;\n }, {});\n }\n if (initialErrors) {\n setErrorBag(initialErrors);\n }\n return {\n errorBag,\n setErrorBag,\n setFieldErrorBag,\n };\n}\n\nconst FormImpl = defineComponent({\n name: 'Form',\n inheritAttrs: false,\n props: {\n as: {\n type: String,\n default: 'form',\n },\n validationSchema: {\n type: Object,\n default: undefined,\n },\n initialValues: {\n type: Object,\n default: undefined,\n },\n initialErrors: {\n type: Object,\n default: undefined,\n },\n initialTouched: {\n type: Object,\n default: undefined,\n },\n validateOnMount: {\n type: Boolean,\n default: false,\n },\n onSubmit: {\n type: Function,\n default: undefined,\n },\n onInvalidSubmit: {\n type: Function,\n default: undefined,\n },\n keepValues: {\n type: Boolean,\n default: false,\n },\n },\n setup(props, ctx) {\n const initialValues = toRef(props, 'initialValues');\n const validationSchema = toRef(props, 'validationSchema');\n const keepValues = toRef(props, 'keepValues');\n const { errors, errorBag, values, meta, isSubmitting, submitCount, controlledValues, validate, validateField, handleReset, resetForm, handleSubmit, setErrors, setFieldError, setFieldValue, setValues, setFieldTouched, setTouched, resetField, } = useForm({\n validationSchema: validationSchema.value ? validationSchema : undefined,\n initialValues,\n initialErrors: props.initialErrors,\n initialTouched: props.initialTouched,\n validateOnMount: props.validateOnMount,\n keepValuesOnUnmount: keepValues,\n });\n const submitForm = handleSubmit((_, { evt }) => {\n if (isFormSubmitEvent(evt)) {\n evt.target.submit();\n }\n }, props.onInvalidSubmit);\n const onSubmit = props.onSubmit ? handleSubmit(props.onSubmit, props.onInvalidSubmit) : submitForm;\n function handleFormReset(e) {\n if (isEvent(e)) {\n // Prevent default form reset behavior\n e.preventDefault();\n }\n handleReset();\n if (typeof ctx.attrs.onReset === 'function') {\n ctx.attrs.onReset();\n }\n }\n function handleScopedSlotSubmit(evt, onSubmit) {\n const onSuccess = typeof evt === 'function' && !onSubmit ? evt : onSubmit;\n return handleSubmit(onSuccess, props.onInvalidSubmit)(evt);\n }\n function getValues() {\n return klona(values);\n }\n function getMeta() {\n return klona(meta.value);\n }\n function getErrors() {\n return klona(errors.value);\n }\n function slotProps() {\n return {\n meta: meta.value,\n errors: errors.value,\n errorBag: errorBag.value,\n values,\n isSubmitting: isSubmitting.value,\n submitCount: submitCount.value,\n controlledValues: controlledValues.value,\n validate,\n validateField,\n handleSubmit: handleScopedSlotSubmit,\n handleReset,\n submitForm,\n setErrors,\n setFieldError,\n setFieldValue,\n setValues,\n setFieldTouched,\n setTouched,\n resetForm,\n resetField,\n getValues,\n getMeta,\n getErrors,\n };\n }\n // expose these functions and methods as part of public API\n ctx.expose({\n setFieldError,\n setErrors,\n setFieldValue,\n setValues,\n setFieldTouched,\n setTouched,\n resetForm,\n validate,\n validateField,\n resetField,\n getValues,\n getMeta,\n getErrors,\n });\n return function renderForm() {\n // avoid resolving the form component as itself\n const tag = props.as === 'form' ? props.as : resolveDynamicComponent(props.as);\n const children = normalizeChildren(tag, ctx, slotProps);\n if (!props.as) {\n return children;\n }\n // Attributes to add on a native `form` tag\n const formAttrs = props.as === 'form'\n ? {\n // Disables native validation as vee-validate will handle it.\n novalidate: true,\n }\n : {};\n return h(tag, Object.assign(Object.assign(Object.assign({}, formAttrs), ctx.attrs), { onSubmit, onReset: handleFormReset }), children);\n };\n },\n});\nconst Form = FormImpl;\n\nfunction useFieldArray(arrayPath) {\n const form = injectWithSelf(FormContextKey, undefined);\n const fields = ref([]);\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n const noOp = () => { };\n const noOpApi = {\n fields,\n remove: noOp,\n push: noOp,\n swap: noOp,\n insert: noOp,\n update: noOp,\n replace: noOp,\n prepend: noOp,\n move: noOp,\n };\n if (!form) {\n warn('FieldArray requires being a child of `
` or `useForm` being called before it. Array fields may not work correctly');\n return noOpApi;\n }\n if (!unref(arrayPath)) {\n warn('FieldArray requires a field path to be provided, did you forget to pass the `name` prop?');\n return noOpApi;\n }\n const alreadyExists = form.fieldArrays.find(a => unref(a.path) === unref(arrayPath));\n if (alreadyExists) {\n return alreadyExists;\n }\n let entryCounter = 0;\n function getCurrentValues() {\n return getFromPath(form === null || form === void 0 ? void 0 : form.values, unref(arrayPath), []) || [];\n }\n function initFields() {\n const currentValues = getCurrentValues();\n fields.value = currentValues.map(createEntry);\n updateEntryFlags();\n }\n initFields();\n function updateEntryFlags() {\n const fieldsLength = fields.value.length;\n for (let i = 0; i < fieldsLength; i++) {\n const entry = fields.value[i];\n entry.isFirst = i === 0;\n entry.isLast = i === fieldsLength - 1;\n }\n }\n function createEntry(value) {\n const key = entryCounter++;\n const entry = {\n key,\n value: computedDeep({\n get() {\n const currentValues = getFromPath(form === null || form === void 0 ? void 0 : form.values, unref(arrayPath), []) || [];\n const idx = fields.value.findIndex(e => e.key === key);\n return idx === -1 ? value : currentValues[idx];\n },\n set(value) {\n const idx = fields.value.findIndex(e => e.key === key);\n if (idx === -1) {\n warn(`Attempting to update a non-existent array item`);\n return;\n }\n update(idx, value);\n },\n }),\n isFirst: false,\n isLast: false,\n };\n return entry;\n }\n function afterMutation() {\n updateEntryFlags();\n // Should trigger a silent validation since a field may not do that #4096\n form === null || form === void 0 ? void 0 : form.validate({ mode: 'silent' });\n }\n function remove(idx) {\n const pathName = unref(arrayPath);\n const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n if (!pathValue || !Array.isArray(pathValue)) {\n return;\n }\n const newValue = [...pathValue];\n newValue.splice(idx, 1);\n form === null || form === void 0 ? void 0 : form.unsetInitialValue(pathName + `[${idx}]`);\n form === null || form === void 0 ? void 0 : form.setFieldValue(pathName, newValue);\n fields.value.splice(idx, 1);\n afterMutation();\n }\n function push(value) {\n const pathName = unref(arrayPath);\n const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n const normalizedPathValue = isNullOrUndefined(pathValue) ? [] : pathValue;\n if (!Array.isArray(normalizedPathValue)) {\n return;\n }\n const newValue = [...normalizedPathValue];\n newValue.push(value);\n form === null || form === void 0 ? void 0 : form.stageInitialValue(pathName + `[${newValue.length - 1}]`, value);\n form === null || form === void 0 ? void 0 : form.setFieldValue(pathName, newValue);\n fields.value.push(createEntry(value));\n afterMutation();\n }\n function swap(indexA, indexB) {\n const pathName = unref(arrayPath);\n const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n if (!Array.isArray(pathValue) || !(indexA in pathValue) || !(indexB in pathValue)) {\n return;\n }\n const newValue = [...pathValue];\n const newFields = [...fields.value];\n // the old switcheroo\n const temp = newValue[indexA];\n newValue[indexA] = newValue[indexB];\n newValue[indexB] = temp;\n const tempEntry = newFields[indexA];\n newFields[indexA] = newFields[indexB];\n newFields[indexB] = tempEntry;\n form === null || form === void 0 ? void 0 : form.setFieldValue(pathName, newValue);\n fields.value = newFields;\n updateEntryFlags();\n }\n function insert(idx, value) {\n const pathName = unref(arrayPath);\n const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n if (!Array.isArray(pathValue) || pathValue.length < idx) {\n return;\n }\n const newValue = [...pathValue];\n const newFields = [...fields.value];\n newValue.splice(idx, 0, value);\n newFields.splice(idx, 0, createEntry(value));\n form === null || form === void 0 ? void 0 : form.setFieldValue(pathName, newValue);\n fields.value = newFields;\n afterMutation();\n }\n function replace(arr) {\n const pathName = unref(arrayPath);\n form === null || form === void 0 ? void 0 : form.setFieldValue(pathName, arr);\n initFields();\n afterMutation();\n }\n function update(idx, value) {\n const pathName = unref(arrayPath);\n const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n if (!Array.isArray(pathValue) || pathValue.length - 1 < idx) {\n return;\n }\n form === null || form === void 0 ? void 0 : form.setFieldValue(`${pathName}[${idx}]`, value);\n form === null || form === void 0 ? void 0 : form.validate({ mode: 'validated-only' });\n }\n function prepend(value) {\n const pathName = unref(arrayPath);\n const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n const normalizedPathValue = isNullOrUndefined(pathValue) ? [] : pathValue;\n if (!Array.isArray(normalizedPathValue)) {\n return;\n }\n const newValue = [value, ...normalizedPathValue];\n form === null || form === void 0 ? void 0 : form.stageInitialValue(pathName + `[${newValue.length - 1}]`, value);\n form === null || form === void 0 ? void 0 : form.setFieldValue(pathName, newValue);\n fields.value.unshift(createEntry(value));\n afterMutation();\n }\n function move(oldIdx, newIdx) {\n const pathName = unref(arrayPath);\n const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n const newValue = isNullOrUndefined(pathValue) ? [] : [...pathValue];\n if (!Array.isArray(pathValue) || !(oldIdx in pathValue) || !(newIdx in pathValue)) {\n return;\n }\n const newFields = [...fields.value];\n const movedItem = newFields[oldIdx];\n newFields.splice(oldIdx, 1);\n newFields.splice(newIdx, 0, movedItem);\n const movedValue = newValue[oldIdx];\n newValue.splice(oldIdx, 1);\n newValue.splice(newIdx, 0, movedValue);\n form === null || form === void 0 ? void 0 : form.setFieldValue(pathName, newValue);\n fields.value = newFields;\n afterMutation();\n }\n const fieldArrayCtx = {\n fields,\n remove,\n push,\n swap,\n insert,\n update,\n replace,\n prepend,\n move,\n };\n form.fieldArrays.push(Object.assign({ path: arrayPath, reset: initFields }, fieldArrayCtx));\n onBeforeUnmount(() => {\n const idx = form.fieldArrays.findIndex(i => unref(i.path) === unref(arrayPath));\n if (idx >= 0) {\n form.fieldArrays.splice(idx, 1);\n }\n });\n // Makes sure to sync the form values with the array value if they go out of sync\n // #4153\n watch(getCurrentValues, formValues => {\n const fieldsValues = fields.value.map(f => f.value);\n // If form values are not the same as the current values then something overrode them.\n if (!isEqual(formValues, fieldsValues)) {\n initFields();\n }\n });\n return fieldArrayCtx;\n}\n\nconst FieldArrayImpl = defineComponent({\n name: 'FieldArray',\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n required: true,\n },\n },\n setup(props, ctx) {\n const { push, remove, swap, insert, replace, update, prepend, move, fields } = useFieldArray(toRef(props, 'name'));\n function slotProps() {\n return {\n fields: fields.value,\n push,\n remove,\n swap,\n insert,\n update,\n replace,\n prepend,\n move,\n };\n }\n ctx.expose({\n push,\n remove,\n swap,\n insert,\n update,\n replace,\n prepend,\n move,\n });\n return () => {\n const children = normalizeChildren(undefined, ctx, slotProps);\n return children;\n };\n },\n});\nconst FieldArray = FieldArrayImpl;\n\nconst ErrorMessageImpl = defineComponent({\n name: 'ErrorMessage',\n props: {\n as: {\n type: String,\n default: undefined,\n },\n name: {\n type: String,\n required: true,\n },\n },\n setup(props, ctx) {\n const form = inject(FormContextKey, undefined);\n const message = computed(() => {\n return form === null || form === void 0 ? void 0 : form.errors.value[props.name];\n });\n function slotProps() {\n return {\n message: message.value,\n };\n }\n return () => {\n // Renders nothing if there are no messages\n if (!message.value) {\n return undefined;\n }\n const tag = (props.as ? resolveDynamicComponent(props.as) : props.as);\n const children = normalizeChildren(tag, ctx, slotProps);\n const attrs = Object.assign({ role: 'alert' }, ctx.attrs);\n // If no tag was specified and there are children\n // render the slot as is without wrapping it\n if (!tag && (Array.isArray(children) || !children) && (children === null || children === void 0 ? void 0 : children.length)) {\n return children;\n }\n // If no children in slot\n // render whatever specified and fallback to a with the message in it's contents\n if ((Array.isArray(children) || !children) && !(children === null || children === void 0 ? void 0 : children.length)) {\n return h(tag || 'span', attrs, message.value);\n }\n return h(tag, attrs, children);\n };\n },\n});\nconst ErrorMessage = ErrorMessageImpl;\n\nfunction useResetForm() {\n const form = injectWithSelf(FormContextKey);\n if (!form) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\n return function resetForm(state) {\n if (!form) {\n return;\n }\n return form.resetForm(state);\n };\n}\n\n/**\n * If a field is dirty or not\n */\nfunction useIsFieldDirty(path) {\n const form = injectWithSelf(FormContextKey);\n let field = path ? undefined : inject(FieldContextKey);\n return computed(() => {\n if (path) {\n field = normalizeField(form === null || form === void 0 ? void 0 : form.fieldsByPath.value[unref(path)]);\n }\n if (!field) {\n warn(`field with name ${unref(path)} was not found`);\n return false;\n }\n return field.meta.dirty;\n });\n}\n\n/**\n * If a field is touched or not\n */\nfunction useIsFieldTouched(path) {\n const form = injectWithSelf(FormContextKey);\n let field = path ? undefined : inject(FieldContextKey);\n return computed(() => {\n if (path) {\n field = normalizeField(form === null || form === void 0 ? void 0 : form.fieldsByPath.value[unref(path)]);\n }\n if (!field) {\n warn(`field with name ${unref(path)} was not found`);\n return false;\n }\n return field.meta.touched;\n });\n}\n\n/**\n * If a field is validated and is valid\n */\nfunction useIsFieldValid(path) {\n const form = injectWithSelf(FormContextKey);\n let field = path ? undefined : inject(FieldContextKey);\n return computed(() => {\n if (path) {\n field = normalizeField(form === null || form === void 0 ? void 0 : form.fieldsByPath.value[unref(path)]);\n }\n if (!field) {\n warn(`field with name ${unref(path)} was not found`);\n return false;\n }\n return field.meta.valid;\n });\n}\n\n/**\n * If the form is submitting or not\n */\nfunction useIsSubmitting() {\n const form = injectWithSelf(FormContextKey);\n if (!form) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\n return computed(() => {\n var _a;\n return (_a = form === null || form === void 0 ? void 0 : form.isSubmitting.value) !== null && _a !== void 0 ? _a : false;\n });\n}\n\n/**\n * Validates a single field\n */\nfunction useValidateField(path) {\n const form = injectWithSelf(FormContextKey);\n let field = path ? undefined : inject(FieldContextKey);\n return function validateField() {\n if (path) {\n field = normalizeField(form === null || form === void 0 ? void 0 : form.fieldsByPath.value[unref(path)]);\n }\n if (!field) {\n warn(`field with name ${unref(path)} was not found`);\n return Promise.resolve({\n errors: [],\n valid: true,\n });\n }\n return field.validate();\n };\n}\n\n/**\n * If the form is dirty or not\n */\nfunction useIsFormDirty() {\n const form = injectWithSelf(FormContextKey);\n if (!form) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\n return computed(() => {\n var _a;\n return (_a = form === null || form === void 0 ? void 0 : form.meta.value.dirty) !== null && _a !== void 0 ? _a : false;\n });\n}\n\n/**\n * If the form is touched or not\n */\nfunction useIsFormTouched() {\n const form = injectWithSelf(FormContextKey);\n if (!form) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\n return computed(() => {\n var _a;\n return (_a = form === null || form === void 0 ? void 0 : form.meta.value.touched) !== null && _a !== void 0 ? _a : false;\n });\n}\n\n/**\n * If the form has been validated and is valid\n */\nfunction useIsFormValid() {\n const form = injectWithSelf(FormContextKey);\n if (!form) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\n return computed(() => {\n var _a;\n return (_a = form === null || form === void 0 ? void 0 : form.meta.value.valid) !== null && _a !== void 0 ? _a : false;\n });\n}\n\n/**\n * Validate multiple fields\n */\nfunction useValidateForm() {\n const form = injectWithSelf(FormContextKey);\n if (!form) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\n return function validateField() {\n if (!form) {\n return Promise.resolve({ results: {}, errors: {}, valid: true });\n }\n return form.validate();\n };\n}\n\n/**\n * The number of form's submission count\n */\nfunction useSubmitCount() {\n const form = injectWithSelf(FormContextKey);\n if (!form) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\n return computed(() => {\n var _a;\n return (_a = form === null || form === void 0 ? void 0 : form.submitCount.value) !== null && _a !== void 0 ? _a : 0;\n });\n}\n\n/**\n * Gives access to a field's current value\n */\nfunction useFieldValue(path) {\n const form = injectWithSelf(FormContextKey);\n // We don't want to use self injected context as it doesn't make sense\n const field = path ? undefined : inject(FieldContextKey);\n return computed(() => {\n if (path) {\n return getFromPath(form === null || form === void 0 ? void 0 : form.values, unref(path));\n }\n return unref(field === null || field === void 0 ? void 0 : field.value);\n });\n}\n\n/**\n * Gives access to a form's values\n */\nfunction useFormValues() {\n const form = injectWithSelf(FormContextKey);\n if (!form) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\n return computed(() => {\n return (form === null || form === void 0 ? void 0 : form.values) || {};\n });\n}\n\n/**\n * Gives access to all form errors\n */\nfunction useFormErrors() {\n const form = injectWithSelf(FormContextKey);\n if (!form) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\n return computed(() => {\n return ((form === null || form === void 0 ? void 0 : form.errors.value) || {});\n });\n}\n\n/**\n * Gives access to a single field error\n */\nfunction useFieldError(path) {\n const form = injectWithSelf(FormContextKey);\n // We don't want to use self injected context as it doesn't make sense\n const field = path ? undefined : inject(FieldContextKey);\n return computed(() => {\n if (path) {\n return form === null || form === void 0 ? void 0 : form.errors.value[unref(path)];\n }\n return field === null || field === void 0 ? void 0 : field.errorMessage.value;\n });\n}\n\nfunction useSubmitForm(cb) {\n const form = injectWithSelf(FormContextKey);\n if (!form) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\n const onSubmit = form ? form.handleSubmit(cb) : undefined;\n return function submitForm(e) {\n if (!onSubmit) {\n return;\n }\n return onSubmit(e);\n };\n}\n\nexport { ErrorMessage, Field, FieldArray, FieldContextKey, Form, FormContextKey, IS_ABSENT, configure, defineRule, useField, useFieldArray, useFieldError, useFieldValue, useForm, useFormErrors, useFormValues, useIsFieldDirty, useIsFieldTouched, useIsFieldValid, useIsFormDirty, useIsFormTouched, useIsFormValid, useIsSubmitting, useResetForm, useSubmitCount, useSubmitForm, useValidateField, useValidateForm, validate, validateObjectSchema as validateObject };\n","class Subscribable {\n constructor() {\n this.listeners = new Set();\n this.subscribe = this.subscribe.bind(this);\n }\n\n subscribe(listener) {\n const identity = {\n listener\n };\n this.listeners.add(identity);\n this.onSubscribe();\n return () => {\n this.listeners.delete(identity);\n this.onUnsubscribe();\n };\n }\n\n hasListeners() {\n return this.listeners.size > 0;\n }\n\n onSubscribe() {// Do nothing\n }\n\n onUnsubscribe() {// Do nothing\n }\n\n}\n\nexport { Subscribable };\n//# sourceMappingURL=subscribable.mjs.map\n","// TYPES\n// UTILS\nconst isServer = typeof window === 'undefined' || 'Deno' in window;\nfunction noop() {\n return undefined;\n}\nfunction functionalUpdate(updater, input) {\n return typeof updater === 'function' ? updater(input) : updater;\n}\nfunction isValidTimeout(value) {\n return typeof value === 'number' && value >= 0 && value !== Infinity;\n}\nfunction difference(array1, array2) {\n return array1.filter(x => !array2.includes(x));\n}\nfunction replaceAt(array, index, value) {\n const copy = array.slice(0);\n copy[index] = value;\n return copy;\n}\nfunction timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nfunction parseQueryArgs(arg1, arg2, arg3) {\n if (!isQueryKey(arg1)) {\n return arg1;\n }\n\n if (typeof arg2 === 'function') {\n return { ...arg3,\n queryKey: arg1,\n queryFn: arg2\n };\n }\n\n return { ...arg2,\n queryKey: arg1\n };\n}\nfunction parseMutationArgs(arg1, arg2, arg3) {\n if (isQueryKey(arg1)) {\n if (typeof arg2 === 'function') {\n return { ...arg3,\n mutationKey: arg1,\n mutationFn: arg2\n };\n }\n\n return { ...arg2,\n mutationKey: arg1\n };\n }\n\n if (typeof arg1 === 'function') {\n return { ...arg2,\n mutationFn: arg1\n };\n }\n\n return { ...arg1\n };\n}\nfunction parseFilterArgs(arg1, arg2, arg3) {\n return isQueryKey(arg1) ? [{ ...arg2,\n queryKey: arg1\n }, arg3] : [arg1 || {}, arg2];\n}\nfunction parseMutationFilterArgs(arg1, arg2, arg3) {\n return isQueryKey(arg1) ? [{ ...arg2,\n mutationKey: arg1\n }, arg3] : [arg1 || {}, arg2];\n}\nfunction matchQuery(filters, query) {\n const {\n type = 'all',\n exact,\n fetchStatus,\n predicate,\n queryKey,\n stale\n } = filters;\n\n if (isQueryKey(queryKey)) {\n if (exact) {\n if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n return false;\n }\n } else if (!partialMatchKey(query.queryKey, queryKey)) {\n return false;\n }\n }\n\n if (type !== 'all') {\n const isActive = query.isActive();\n\n if (type === 'active' && !isActive) {\n return false;\n }\n\n if (type === 'inactive' && isActive) {\n return false;\n }\n }\n\n if (typeof stale === 'boolean' && query.isStale() !== stale) {\n return false;\n }\n\n if (typeof fetchStatus !== 'undefined' && fetchStatus !== query.state.fetchStatus) {\n return false;\n }\n\n if (predicate && !predicate(query)) {\n return false;\n }\n\n return true;\n}\nfunction matchMutation(filters, mutation) {\n const {\n exact,\n fetching,\n predicate,\n mutationKey\n } = filters;\n\n if (isQueryKey(mutationKey)) {\n if (!mutation.options.mutationKey) {\n return false;\n }\n\n if (exact) {\n if (hashQueryKey(mutation.options.mutationKey) !== hashQueryKey(mutationKey)) {\n return false;\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false;\n }\n }\n\n if (typeof fetching === 'boolean' && mutation.state.status === 'loading' !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(mutation)) {\n return false;\n }\n\n return true;\n}\nfunction hashQueryKeyByOptions(queryKey, options) {\n const hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashQueryKey;\n return hashFn(queryKey);\n}\n/**\n * Default query keys hash function.\n * Hashes the value into a stable hash.\n */\n\nfunction hashQueryKey(queryKey) {\n return JSON.stringify(queryKey, (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {\n result[key] = val[key];\n return result;\n }, {}) : val);\n}\n/**\n * Checks if key `b` partially matches with key `a`.\n */\n\nfunction partialMatchKey(a, b) {\n return partialDeepEqual(a, b);\n}\n/**\n * Checks if `b` partially matches with `a`.\n */\n\nfunction partialDeepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (typeof a !== typeof b) {\n return false;\n }\n\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n return !Object.keys(b).some(key => !partialDeepEqual(a[key], b[key]));\n }\n\n return false;\n}\n/**\n * This function returns `a` if `b` is deeply equal.\n * If not, it will replace any deeply equal children of `b` with those of `a`.\n * This can be used for structural sharing between JSON values for example.\n */\n\nfunction replaceEqualDeep(a, b) {\n if (a === b) {\n return a;\n }\n\n const array = isPlainArray(a) && isPlainArray(b);\n\n if (array || isPlainObject(a) && isPlainObject(b)) {\n const aSize = array ? a.length : Object.keys(a).length;\n const bItems = array ? b : Object.keys(b);\n const bSize = bItems.length;\n const copy = array ? [] : {};\n let equalItems = 0;\n\n for (let i = 0; i < bSize; i++) {\n const key = array ? i : bItems[i];\n copy[key] = replaceEqualDeep(a[key], b[key]);\n\n if (copy[key] === a[key]) {\n equalItems++;\n }\n }\n\n return aSize === bSize && equalItems === aSize ? a : copy;\n }\n\n return b;\n}\n/**\n * Shallow compare objects. Only works with objects that always have the same properties.\n */\n\nfunction shallowEqualObjects(a, b) {\n if (a && !b || b && !a) {\n return false;\n }\n\n for (const key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n\n return true;\n}\nfunction isPlainArray(value) {\n return Array.isArray(value) && value.length === Object.keys(value).length;\n} // Copied from: https://github.com/jonschlinkert/is-plain-object\n\nfunction isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n } // If has modified constructor\n\n\n const ctor = o.constructor;\n\n if (typeof ctor === 'undefined') {\n return true;\n } // If has modified prototype\n\n\n const prot = ctor.prototype;\n\n if (!hasObjectPrototype(prot)) {\n return false;\n } // If constructor does not have an Object-specific method\n\n\n if (!prot.hasOwnProperty('isPrototypeOf')) {\n return false;\n } // Most likely a plain Object\n\n\n return true;\n}\n\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isQueryKey(value) {\n return Array.isArray(value);\n}\nfunction isError(value) {\n return value instanceof Error;\n}\nfunction sleep(timeout) {\n return new Promise(resolve => {\n setTimeout(resolve, timeout);\n });\n}\n/**\n * Schedules a microtask.\n * This can be useful to schedule state updates after rendering.\n */\n\nfunction scheduleMicrotask(callback) {\n sleep(0).then(callback);\n}\nfunction getAbortController() {\n if (typeof AbortController === 'function') {\n return new AbortController();\n }\n\n return;\n}\nfunction replaceData(prevData, data, options) {\n // Use prev data if an isDataEqual function is defined and returns `true`\n if (options.isDataEqual != null && options.isDataEqual(prevData, data)) {\n return prevData;\n } else if (typeof options.structuralSharing === 'function') {\n return options.structuralSharing(prevData, data);\n } else if (options.structuralSharing !== false) {\n // Structurally share data between prev and new data if needed\n return replaceEqualDeep(prevData, data);\n }\n\n return data;\n}\n\nexport { difference, functionalUpdate, getAbortController, hashQueryKey, hashQueryKeyByOptions, isError, isPlainArray, isPlainObject, isQueryKey, isServer, isValidTimeout, matchMutation, matchQuery, noop, parseFilterArgs, parseMutationArgs, parseMutationFilterArgs, parseQueryArgs, partialDeepEqual, partialMatchKey, replaceAt, replaceData, replaceEqualDeep, scheduleMicrotask, shallowEqualObjects, sleep, timeUntilStale };\n//# sourceMappingURL=utils.mjs.map\n","import { Subscribable } from './subscribable.mjs';\nimport { isServer } from './utils.mjs';\n\nclass FocusManager extends Subscribable {\n constructor() {\n super();\n\n this.setup = onFocus => {\n // addEventListener does not exist in React Native, but window does\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!isServer && window.addEventListener) {\n const listener = () => onFocus(); // Listen to visibillitychange and focus\n\n\n window.addEventListener('visibilitychange', listener, false);\n window.addEventListener('focus', listener, false);\n return () => {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('visibilitychange', listener);\n window.removeEventListener('focus', listener);\n };\n }\n\n return;\n };\n }\n\n onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n }\n\n onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n }\n\n setEventListener(setup) {\n var _this$cleanup2;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(focused => {\n if (typeof focused === 'boolean') {\n this.setFocused(focused);\n } else {\n this.onFocus();\n }\n });\n }\n\n setFocused(focused) {\n const changed = this.focused !== focused;\n\n if (changed) {\n this.focused = focused;\n this.onFocus();\n }\n }\n\n onFocus() {\n this.listeners.forEach(({\n listener\n }) => {\n listener();\n });\n }\n\n isFocused() {\n if (typeof this.focused === 'boolean') {\n return this.focused;\n } // document global can be unavailable in react native\n\n\n if (typeof document === 'undefined') {\n return true;\n }\n\n return [undefined, 'visible', 'prerender'].includes(document.visibilityState);\n }\n\n}\nconst focusManager = new FocusManager();\n\nexport { FocusManager, focusManager };\n//# sourceMappingURL=focusManager.mjs.map\n","import { Subscribable } from './subscribable.mjs';\nimport { isServer } from './utils.mjs';\n\nconst onlineEvents = ['online', 'offline'];\nclass OnlineManager extends Subscribable {\n constructor() {\n super();\n\n this.setup = onOnline => {\n // addEventListener does not exist in React Native, but window does\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!isServer && window.addEventListener) {\n const listener = () => onOnline(); // Listen to online\n\n\n onlineEvents.forEach(event => {\n window.addEventListener(event, listener, false);\n });\n return () => {\n // Be sure to unsubscribe if a new handler is set\n onlineEvents.forEach(event => {\n window.removeEventListener(event, listener);\n });\n };\n }\n\n return;\n };\n }\n\n onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n }\n\n onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n }\n\n setEventListener(setup) {\n var _this$cleanup2;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(online => {\n if (typeof online === 'boolean') {\n this.setOnline(online);\n } else {\n this.onOnline();\n }\n });\n }\n\n setOnline(online) {\n const changed = this.online !== online;\n\n if (changed) {\n this.online = online;\n this.onOnline();\n }\n }\n\n onOnline() {\n this.listeners.forEach(({\n listener\n }) => {\n listener();\n });\n }\n\n isOnline() {\n if (typeof this.online === 'boolean') {\n return this.online;\n }\n\n if (typeof navigator === 'undefined' || typeof navigator.onLine === 'undefined') {\n return true;\n }\n\n return navigator.onLine;\n }\n\n}\nconst onlineManager = new OnlineManager();\n\nexport { OnlineManager, onlineManager };\n//# sourceMappingURL=onlineManager.mjs.map\n","import { focusManager } from './focusManager.mjs';\nimport { onlineManager } from './onlineManager.mjs';\nimport { sleep } from './utils.mjs';\n\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1000 * 2 ** failureCount, 30000);\n}\n\nfunction canFetch(networkMode) {\n return (networkMode != null ? networkMode : 'online') === 'online' ? onlineManager.isOnline() : true;\n}\nclass CancelledError {\n constructor(options) {\n this.revert = options == null ? void 0 : options.revert;\n this.silent = options == null ? void 0 : options.silent;\n }\n\n}\nfunction isCancelledError(value) {\n return value instanceof CancelledError;\n}\nfunction createRetryer(config) {\n let isRetryCancelled = false;\n let failureCount = 0;\n let isResolved = false;\n let continueFn;\n let promiseResolve;\n let promiseReject;\n const promise = new Promise((outerResolve, outerReject) => {\n promiseResolve = outerResolve;\n promiseReject = outerReject;\n });\n\n const cancel = cancelOptions => {\n if (!isResolved) {\n reject(new CancelledError(cancelOptions));\n config.abort == null ? void 0 : config.abort();\n }\n };\n\n const cancelRetry = () => {\n isRetryCancelled = true;\n };\n\n const continueRetry = () => {\n isRetryCancelled = false;\n };\n\n const shouldPause = () => !focusManager.isFocused() || config.networkMode !== 'always' && !onlineManager.isOnline();\n\n const resolve = value => {\n if (!isResolved) {\n isResolved = true;\n config.onSuccess == null ? void 0 : config.onSuccess(value);\n continueFn == null ? void 0 : continueFn();\n promiseResolve(value);\n }\n };\n\n const reject = value => {\n if (!isResolved) {\n isResolved = true;\n config.onError == null ? void 0 : config.onError(value);\n continueFn == null ? void 0 : continueFn();\n promiseReject(value);\n }\n };\n\n const pause = () => {\n return new Promise(continueResolve => {\n continueFn = value => {\n const canContinue = isResolved || !shouldPause();\n\n if (canContinue) {\n continueResolve(value);\n }\n\n return canContinue;\n };\n\n config.onPause == null ? void 0 : config.onPause();\n }).then(() => {\n continueFn = undefined;\n\n if (!isResolved) {\n config.onContinue == null ? void 0 : config.onContinue();\n }\n });\n }; // Create loop function\n\n\n const run = () => {\n // Do nothing if already resolved\n if (isResolved) {\n return;\n }\n\n let promiseOrValue; // Execute query\n\n try {\n promiseOrValue = config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n }\n\n Promise.resolve(promiseOrValue).then(resolve).catch(error => {\n var _config$retry, _config$retryDelay;\n\n // Stop if the fetch is already resolved\n if (isResolved) {\n return;\n } // Do we need to retry the request?\n\n\n const retry = (_config$retry = config.retry) != null ? _config$retry : 3;\n const retryDelay = (_config$retryDelay = config.retryDelay) != null ? _config$retryDelay : defaultRetryDelay;\n const delay = typeof retryDelay === 'function' ? retryDelay(failureCount, error) : retryDelay;\n const shouldRetry = retry === true || typeof retry === 'number' && failureCount < retry || typeof retry === 'function' && retry(failureCount, error);\n\n if (isRetryCancelled || !shouldRetry) {\n // We are done if the query does not need to be retried\n reject(error);\n return;\n }\n\n failureCount++; // Notify on fail\n\n config.onFail == null ? void 0 : config.onFail(failureCount, error); // Delay\n\n sleep(delay) // Pause if the document is not visible or when the device is offline\n .then(() => {\n if (shouldPause()) {\n return pause();\n }\n\n return;\n }).then(() => {\n if (isRetryCancelled) {\n reject(error);\n } else {\n run();\n }\n });\n });\n }; // Start loop\n\n\n if (canFetch(config.networkMode)) {\n run();\n } else {\n pause().then(run);\n }\n\n return {\n promise,\n cancel,\n continue: () => {\n const didContinue = continueFn == null ? void 0 : continueFn();\n return didContinue ? promise : Promise.resolve();\n },\n cancelRetry,\n continueRetry\n };\n}\n\nexport { CancelledError, canFetch, createRetryer, isCancelledError };\n//# sourceMappingURL=retryer.mjs.map\n","const defaultLogger = console;\n\nexport { defaultLogger };\n//# sourceMappingURL=logger.mjs.map\n","import { scheduleMicrotask } from './utils.mjs';\n\nfunction createNotifyManager() {\n let queue = [];\n let transactions = 0;\n\n let notifyFn = callback => {\n callback();\n };\n\n let batchNotifyFn = callback => {\n callback();\n };\n\n const batch = callback => {\n let result;\n transactions++;\n\n try {\n result = callback();\n } finally {\n transactions--;\n\n if (!transactions) {\n flush();\n }\n }\n\n return result;\n };\n\n const schedule = callback => {\n if (transactions) {\n queue.push(callback);\n } else {\n scheduleMicrotask(() => {\n notifyFn(callback);\n });\n }\n };\n /**\n * All calls to the wrapped function will be batched.\n */\n\n\n const batchCalls = callback => {\n return (...args) => {\n schedule(() => {\n callback(...args);\n });\n };\n };\n\n const flush = () => {\n const originalQueue = queue;\n queue = [];\n\n if (originalQueue.length) {\n scheduleMicrotask(() => {\n batchNotifyFn(() => {\n originalQueue.forEach(callback => {\n notifyFn(callback);\n });\n });\n });\n }\n };\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n\n\n const setNotifyFunction = fn => {\n notifyFn = fn;\n };\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n\n\n const setBatchNotifyFunction = fn => {\n batchNotifyFn = fn;\n };\n\n return {\n batch,\n batchCalls,\n schedule,\n setNotifyFunction,\n setBatchNotifyFunction\n };\n} // SINGLETON\n\nconst notifyManager = createNotifyManager();\n\nexport { createNotifyManager, notifyManager };\n//# sourceMappingURL=notifyManager.mjs.map\n","import { isValidTimeout, isServer } from './utils.mjs';\n\nclass Removable {\n destroy() {\n this.clearGcTimeout();\n }\n\n scheduleGc() {\n this.clearGcTimeout();\n\n if (isValidTimeout(this.cacheTime)) {\n this.gcTimeout = setTimeout(() => {\n this.optionalRemove();\n }, this.cacheTime);\n }\n }\n\n updateCacheTime(newCacheTime) {\n // Default to 5 minutes (Infinity for server-side) if no cache time is set\n this.cacheTime = Math.max(this.cacheTime || 0, newCacheTime != null ? newCacheTime : isServer ? Infinity : 5 * 60 * 1000);\n }\n\n clearGcTimeout() {\n if (this.gcTimeout) {\n clearTimeout(this.gcTimeout);\n this.gcTimeout = undefined;\n }\n }\n\n}\n\nexport { Removable };\n//# sourceMappingURL=removable.mjs.map\n","import { replaceData, noop, timeUntilStale, getAbortController } from './utils.mjs';\nimport { defaultLogger } from './logger.mjs';\nimport { notifyManager } from './notifyManager.mjs';\nimport { createRetryer, isCancelledError, canFetch } from './retryer.mjs';\nimport { Removable } from './removable.mjs';\n\n// CLASS\nclass Query extends Removable {\n constructor(config) {\n super();\n this.abortSignalConsumed = false;\n this.defaultOptions = config.defaultOptions;\n this.setOptions(config.options);\n this.observers = [];\n this.cache = config.cache;\n this.logger = config.logger || defaultLogger;\n this.queryKey = config.queryKey;\n this.queryHash = config.queryHash;\n this.initialState = config.state || getDefaultState(this.options);\n this.state = this.initialState;\n this.scheduleGc();\n }\n\n get meta() {\n return this.options.meta;\n }\n\n setOptions(options) {\n this.options = { ...this.defaultOptions,\n ...options\n };\n this.updateCacheTime(this.options.cacheTime);\n }\n\n optionalRemove() {\n if (!this.observers.length && this.state.fetchStatus === 'idle') {\n this.cache.remove(this);\n }\n }\n\n setData(newData, options) {\n const data = replaceData(this.state.data, newData, this.options); // Set data and mark it as cached\n\n this.dispatch({\n data,\n type: 'success',\n dataUpdatedAt: options == null ? void 0 : options.updatedAt,\n manual: options == null ? void 0 : options.manual\n });\n return data;\n }\n\n setState(state, setStateOptions) {\n this.dispatch({\n type: 'setState',\n state,\n setStateOptions\n });\n }\n\n cancel(options) {\n var _this$retryer;\n\n const promise = this.promise;\n (_this$retryer = this.retryer) == null ? void 0 : _this$retryer.cancel(options);\n return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n }\n\n destroy() {\n super.destroy();\n this.cancel({\n silent: true\n });\n }\n\n reset() {\n this.destroy();\n this.setState(this.initialState);\n }\n\n isActive() {\n return this.observers.some(observer => observer.options.enabled !== false);\n }\n\n isDisabled() {\n return this.getObserversCount() > 0 && !this.isActive();\n }\n\n isStale() {\n return this.state.isInvalidated || !this.state.dataUpdatedAt || this.observers.some(observer => observer.getCurrentResult().isStale);\n }\n\n isStaleByTime(staleTime = 0) {\n return this.state.isInvalidated || !this.state.dataUpdatedAt || !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n }\n\n onFocus() {\n var _this$retryer2;\n\n const observer = this.observers.find(x => x.shouldFetchOnWindowFocus());\n\n if (observer) {\n observer.refetch({\n cancelRefetch: false\n });\n } // Continue fetch if currently paused\n\n\n (_this$retryer2 = this.retryer) == null ? void 0 : _this$retryer2.continue();\n }\n\n onOnline() {\n var _this$retryer3;\n\n const observer = this.observers.find(x => x.shouldFetchOnReconnect());\n\n if (observer) {\n observer.refetch({\n cancelRefetch: false\n });\n } // Continue fetch if currently paused\n\n\n (_this$retryer3 = this.retryer) == null ? void 0 : _this$retryer3.continue();\n }\n\n addObserver(observer) {\n if (!this.observers.includes(observer)) {\n this.observers.push(observer); // Stop the query from being garbage collected\n\n this.clearGcTimeout();\n this.cache.notify({\n type: 'observerAdded',\n query: this,\n observer\n });\n }\n }\n\n removeObserver(observer) {\n if (this.observers.includes(observer)) {\n this.observers = this.observers.filter(x => x !== observer);\n\n if (!this.observers.length) {\n // If the transport layer does not support cancellation\n // we'll let the query continue so the result can be cached\n if (this.retryer) {\n if (this.abortSignalConsumed) {\n this.retryer.cancel({\n revert: true\n });\n } else {\n this.retryer.cancelRetry();\n }\n }\n\n this.scheduleGc();\n }\n\n this.cache.notify({\n type: 'observerRemoved',\n query: this,\n observer\n });\n }\n }\n\n getObserversCount() {\n return this.observers.length;\n }\n\n invalidate() {\n if (!this.state.isInvalidated) {\n this.dispatch({\n type: 'invalidate'\n });\n }\n }\n\n fetch(options, fetchOptions) {\n var _this$options$behavio, _context$fetchOptions;\n\n if (this.state.fetchStatus !== 'idle') {\n if (this.state.dataUpdatedAt && fetchOptions != null && fetchOptions.cancelRefetch) {\n // Silently cancel current fetch if the user wants to cancel refetches\n this.cancel({\n silent: true\n });\n } else if (this.promise) {\n var _this$retryer4;\n\n // make sure that retries that were potentially cancelled due to unmounts can continue\n (_this$retryer4 = this.retryer) == null ? void 0 : _this$retryer4.continueRetry(); // Return current promise if we are already fetching\n\n return this.promise;\n }\n } // Update config if passed, otherwise the config from the last execution is used\n\n\n if (options) {\n this.setOptions(options);\n } // Use the options from the first observer with a query function if no function is found.\n // This can happen when the query is hydrated or created with setQueryData.\n\n\n if (!this.options.queryFn) {\n const observer = this.observers.find(x => x.options.queryFn);\n\n if (observer) {\n this.setOptions(observer.options);\n }\n }\n\n if (!Array.isArray(this.options.queryKey)) {\n if (process.env.NODE_ENV !== 'production') {\n this.logger.error(\"As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']\");\n }\n }\n\n const abortController = getAbortController(); // Create query function context\n\n const queryFnContext = {\n queryKey: this.queryKey,\n pageParam: undefined,\n meta: this.meta\n }; // Adds an enumerable signal property to the object that\n // which sets abortSignalConsumed to true when the signal\n // is read.\n\n const addSignalProperty = object => {\n Object.defineProperty(object, 'signal', {\n enumerable: true,\n get: () => {\n if (abortController) {\n this.abortSignalConsumed = true;\n return abortController.signal;\n }\n\n return undefined;\n }\n });\n };\n\n addSignalProperty(queryFnContext); // Create fetch function\n\n const fetchFn = () => {\n if (!this.options.queryFn) {\n return Promise.reject(\"Missing queryFn for queryKey '\" + this.options.queryHash + \"'\");\n }\n\n this.abortSignalConsumed = false;\n return this.options.queryFn(queryFnContext);\n }; // Trigger behavior hook\n\n\n const context = {\n fetchOptions,\n options: this.options,\n queryKey: this.queryKey,\n state: this.state,\n fetchFn\n };\n addSignalProperty(context);\n (_this$options$behavio = this.options.behavior) == null ? void 0 : _this$options$behavio.onFetch(context); // Store state in case the current fetch needs to be reverted\n\n this.revertState = this.state; // Set to fetching state if not already in it\n\n if (this.state.fetchStatus === 'idle' || this.state.fetchMeta !== ((_context$fetchOptions = context.fetchOptions) == null ? void 0 : _context$fetchOptions.meta)) {\n var _context$fetchOptions2;\n\n this.dispatch({\n type: 'fetch',\n meta: (_context$fetchOptions2 = context.fetchOptions) == null ? void 0 : _context$fetchOptions2.meta\n });\n }\n\n const onError = error => {\n // Optimistically update state if needed\n if (!(isCancelledError(error) && error.silent)) {\n this.dispatch({\n type: 'error',\n error: error\n });\n }\n\n if (!isCancelledError(error)) {\n var _this$cache$config$on, _this$cache$config, _this$cache$config$on2, _this$cache$config2;\n\n // Notify cache callback\n (_this$cache$config$on = (_this$cache$config = this.cache.config).onError) == null ? void 0 : _this$cache$config$on.call(_this$cache$config, error, this);\n (_this$cache$config$on2 = (_this$cache$config2 = this.cache.config).onSettled) == null ? void 0 : _this$cache$config$on2.call(_this$cache$config2, this.state.data, error, this);\n\n if (process.env.NODE_ENV !== 'production') {\n this.logger.error(error);\n }\n }\n\n if (!this.isFetchingOptimistic) {\n // Schedule query gc after fetching\n this.scheduleGc();\n }\n\n this.isFetchingOptimistic = false;\n }; // Try to fetch the data\n\n\n this.retryer = createRetryer({\n fn: context.fetchFn,\n abort: abortController == null ? void 0 : abortController.abort.bind(abortController),\n onSuccess: data => {\n var _this$cache$config$on3, _this$cache$config3, _this$cache$config$on4, _this$cache$config4;\n\n if (typeof data === 'undefined') {\n if (process.env.NODE_ENV !== 'production') {\n this.logger.error(\"Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: \" + this.queryHash);\n }\n\n onError(new Error(this.queryHash + \" data is undefined\"));\n return;\n }\n\n this.setData(data); // Notify cache callback\n\n (_this$cache$config$on3 = (_this$cache$config3 = this.cache.config).onSuccess) == null ? void 0 : _this$cache$config$on3.call(_this$cache$config3, data, this);\n (_this$cache$config$on4 = (_this$cache$config4 = this.cache.config).onSettled) == null ? void 0 : _this$cache$config$on4.call(_this$cache$config4, data, this.state.error, this);\n\n if (!this.isFetchingOptimistic) {\n // Schedule query gc after fetching\n this.scheduleGc();\n }\n\n this.isFetchingOptimistic = false;\n },\n onError,\n onFail: (failureCount, error) => {\n this.dispatch({\n type: 'failed',\n failureCount,\n error\n });\n },\n onPause: () => {\n this.dispatch({\n type: 'pause'\n });\n },\n onContinue: () => {\n this.dispatch({\n type: 'continue'\n });\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay,\n networkMode: context.options.networkMode\n });\n this.promise = this.retryer.promise;\n return this.promise;\n }\n\n dispatch(action) {\n const reducer = state => {\n var _action$meta, _action$dataUpdatedAt;\n\n switch (action.type) {\n case 'failed':\n return { ...state,\n fetchFailureCount: action.failureCount,\n fetchFailureReason: action.error\n };\n\n case 'pause':\n return { ...state,\n fetchStatus: 'paused'\n };\n\n case 'continue':\n return { ...state,\n fetchStatus: 'fetching'\n };\n\n case 'fetch':\n return { ...state,\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchMeta: (_action$meta = action.meta) != null ? _action$meta : null,\n fetchStatus: canFetch(this.options.networkMode) ? 'fetching' : 'paused',\n ...(!state.dataUpdatedAt && {\n error: null,\n status: 'loading'\n })\n };\n\n case 'success':\n return { ...state,\n data: action.data,\n dataUpdateCount: state.dataUpdateCount + 1,\n dataUpdatedAt: (_action$dataUpdatedAt = action.dataUpdatedAt) != null ? _action$dataUpdatedAt : Date.now(),\n error: null,\n isInvalidated: false,\n status: 'success',\n ...(!action.manual && {\n fetchStatus: 'idle',\n fetchFailureCount: 0,\n fetchFailureReason: null\n })\n };\n\n case 'error':\n const error = action.error;\n\n if (isCancelledError(error) && error.revert && this.revertState) {\n return { ...this.revertState\n };\n }\n\n return { ...state,\n error: error,\n errorUpdateCount: state.errorUpdateCount + 1,\n errorUpdatedAt: Date.now(),\n fetchFailureCount: state.fetchFailureCount + 1,\n fetchFailureReason: error,\n fetchStatus: 'idle',\n status: 'error'\n };\n\n case 'invalidate':\n return { ...state,\n isInvalidated: true\n };\n\n case 'setState':\n return { ...state,\n ...action.state\n };\n }\n };\n\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.observers.forEach(observer => {\n observer.onQueryUpdate(action);\n });\n this.cache.notify({\n query: this,\n type: 'updated',\n action\n });\n });\n }\n\n}\n\nfunction getDefaultState(options) {\n const data = typeof options.initialData === 'function' ? options.initialData() : options.initialData;\n const hasData = typeof data !== 'undefined';\n const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === 'function' ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n return {\n data,\n dataUpdateCount: 0,\n dataUpdatedAt: hasData ? initialDataUpdatedAt != null ? initialDataUpdatedAt : Date.now() : 0,\n error: null,\n errorUpdateCount: 0,\n errorUpdatedAt: 0,\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchMeta: null,\n isInvalidated: false,\n status: hasData ? 'success' : 'loading',\n fetchStatus: 'idle'\n };\n}\n\nexport { Query };\n//# sourceMappingURL=query.mjs.map\n","import { hashQueryKeyByOptions, parseFilterArgs, matchQuery } from './utils.mjs';\nimport { Query } from './query.mjs';\nimport { notifyManager } from './notifyManager.mjs';\nimport { Subscribable } from './subscribable.mjs';\n\n// CLASS\nclass QueryCache extends Subscribable {\n constructor(config) {\n super();\n this.config = config || {};\n this.queries = [];\n this.queriesMap = {};\n }\n\n build(client, options, state) {\n var _options$queryHash;\n\n const queryKey = options.queryKey;\n const queryHash = (_options$queryHash = options.queryHash) != null ? _options$queryHash : hashQueryKeyByOptions(queryKey, options);\n let query = this.get(queryHash);\n\n if (!query) {\n query = new Query({\n cache: this,\n logger: client.getLogger(),\n queryKey,\n queryHash,\n options: client.defaultQueryOptions(options),\n state,\n defaultOptions: client.getQueryDefaults(queryKey)\n });\n this.add(query);\n }\n\n return query;\n }\n\n add(query) {\n if (!this.queriesMap[query.queryHash]) {\n this.queriesMap[query.queryHash] = query;\n this.queries.push(query);\n this.notify({\n type: 'added',\n query\n });\n }\n }\n\n remove(query) {\n const queryInMap = this.queriesMap[query.queryHash];\n\n if (queryInMap) {\n query.destroy();\n this.queries = this.queries.filter(x => x !== query);\n\n if (queryInMap === query) {\n delete this.queriesMap[query.queryHash];\n }\n\n this.notify({\n type: 'removed',\n query\n });\n }\n }\n\n clear() {\n notifyManager.batch(() => {\n this.queries.forEach(query => {\n this.remove(query);\n });\n });\n }\n\n get(queryHash) {\n return this.queriesMap[queryHash];\n }\n\n getAll() {\n return this.queries;\n }\n\n find(arg1, arg2) {\n const [filters] = parseFilterArgs(arg1, arg2);\n\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.queries.find(query => matchQuery(filters, query));\n }\n\n findAll(arg1, arg2) {\n const [filters] = parseFilterArgs(arg1, arg2);\n return Object.keys(filters).length > 0 ? this.queries.filter(query => matchQuery(filters, query)) : this.queries;\n }\n\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach(({\n listener\n }) => {\n listener(event);\n });\n });\n }\n\n onFocus() {\n notifyManager.batch(() => {\n this.queries.forEach(query => {\n query.onFocus();\n });\n });\n }\n\n onOnline() {\n notifyManager.batch(() => {\n this.queries.forEach(query => {\n query.onOnline();\n });\n });\n }\n\n}\n\nexport { QueryCache };\n//# sourceMappingURL=queryCache.mjs.map\n","import { defaultLogger } from './logger.mjs';\nimport { notifyManager } from './notifyManager.mjs';\nimport { Removable } from './removable.mjs';\nimport { createRetryer, canFetch } from './retryer.mjs';\n\n// CLASS\nclass Mutation extends Removable {\n constructor(config) {\n super();\n this.defaultOptions = config.defaultOptions;\n this.mutationId = config.mutationId;\n this.mutationCache = config.mutationCache;\n this.logger = config.logger || defaultLogger;\n this.observers = [];\n this.state = config.state || getDefaultState();\n this.setOptions(config.options);\n this.scheduleGc();\n }\n\n setOptions(options) {\n this.options = { ...this.defaultOptions,\n ...options\n };\n this.updateCacheTime(this.options.cacheTime);\n }\n\n get meta() {\n return this.options.meta;\n }\n\n setState(state) {\n this.dispatch({\n type: 'setState',\n state\n });\n }\n\n addObserver(observer) {\n if (!this.observers.includes(observer)) {\n this.observers.push(observer); // Stop the mutation from being garbage collected\n\n this.clearGcTimeout();\n this.mutationCache.notify({\n type: 'observerAdded',\n mutation: this,\n observer\n });\n }\n }\n\n removeObserver(observer) {\n this.observers = this.observers.filter(x => x !== observer);\n this.scheduleGc();\n this.mutationCache.notify({\n type: 'observerRemoved',\n mutation: this,\n observer\n });\n }\n\n optionalRemove() {\n if (!this.observers.length) {\n if (this.state.status === 'loading') {\n this.scheduleGc();\n } else {\n this.mutationCache.remove(this);\n }\n }\n }\n\n continue() {\n var _this$retryer$continu, _this$retryer;\n\n return (_this$retryer$continu = (_this$retryer = this.retryer) == null ? void 0 : _this$retryer.continue()) != null ? _this$retryer$continu : this.execute();\n }\n\n async execute() {\n const executeMutation = () => {\n var _this$options$retry;\n\n this.retryer = createRetryer({\n fn: () => {\n if (!this.options.mutationFn) {\n return Promise.reject('No mutationFn found');\n }\n\n return this.options.mutationFn(this.state.variables);\n },\n onFail: (failureCount, error) => {\n this.dispatch({\n type: 'failed',\n failureCount,\n error\n });\n },\n onPause: () => {\n this.dispatch({\n type: 'pause'\n });\n },\n onContinue: () => {\n this.dispatch({\n type: 'continue'\n });\n },\n retry: (_this$options$retry = this.options.retry) != null ? _this$options$retry : 0,\n retryDelay: this.options.retryDelay,\n networkMode: this.options.networkMode\n });\n return this.retryer.promise;\n };\n\n const restored = this.state.status === 'loading';\n\n try {\n var _this$mutationCache$c3, _this$mutationCache$c4, _this$options$onSucce, _this$options2, _this$mutationCache$c5, _this$mutationCache$c6, _this$options$onSettl, _this$options3;\n\n if (!restored) {\n var _this$mutationCache$c, _this$mutationCache$c2, _this$options$onMutat, _this$options;\n\n this.dispatch({\n type: 'loading',\n variables: this.options.variables\n }); // Notify cache callback\n\n await ((_this$mutationCache$c = (_this$mutationCache$c2 = this.mutationCache.config).onMutate) == null ? void 0 : _this$mutationCache$c.call(_this$mutationCache$c2, this.state.variables, this));\n const context = await ((_this$options$onMutat = (_this$options = this.options).onMutate) == null ? void 0 : _this$options$onMutat.call(_this$options, this.state.variables));\n\n if (context !== this.state.context) {\n this.dispatch({\n type: 'loading',\n context,\n variables: this.state.variables\n });\n }\n }\n\n const data = await executeMutation(); // Notify cache callback\n\n await ((_this$mutationCache$c3 = (_this$mutationCache$c4 = this.mutationCache.config).onSuccess) == null ? void 0 : _this$mutationCache$c3.call(_this$mutationCache$c4, data, this.state.variables, this.state.context, this));\n await ((_this$options$onSucce = (_this$options2 = this.options).onSuccess) == null ? void 0 : _this$options$onSucce.call(_this$options2, data, this.state.variables, this.state.context)); // Notify cache callback\n\n await ((_this$mutationCache$c5 = (_this$mutationCache$c6 = this.mutationCache.config).onSettled) == null ? void 0 : _this$mutationCache$c5.call(_this$mutationCache$c6, data, null, this.state.variables, this.state.context, this));\n await ((_this$options$onSettl = (_this$options3 = this.options).onSettled) == null ? void 0 : _this$options$onSettl.call(_this$options3, data, null, this.state.variables, this.state.context));\n this.dispatch({\n type: 'success',\n data\n });\n return data;\n } catch (error) {\n try {\n var _this$mutationCache$c7, _this$mutationCache$c8, _this$options$onError, _this$options4, _this$mutationCache$c9, _this$mutationCache$c10, _this$options$onSettl2, _this$options5;\n\n // Notify cache callback\n await ((_this$mutationCache$c7 = (_this$mutationCache$c8 = this.mutationCache.config).onError) == null ? void 0 : _this$mutationCache$c7.call(_this$mutationCache$c8, error, this.state.variables, this.state.context, this));\n\n if (process.env.NODE_ENV !== 'production') {\n this.logger.error(error);\n }\n\n await ((_this$options$onError = (_this$options4 = this.options).onError) == null ? void 0 : _this$options$onError.call(_this$options4, error, this.state.variables, this.state.context)); // Notify cache callback\n\n await ((_this$mutationCache$c9 = (_this$mutationCache$c10 = this.mutationCache.config).onSettled) == null ? void 0 : _this$mutationCache$c9.call(_this$mutationCache$c10, undefined, error, this.state.variables, this.state.context, this));\n await ((_this$options$onSettl2 = (_this$options5 = this.options).onSettled) == null ? void 0 : _this$options$onSettl2.call(_this$options5, undefined, error, this.state.variables, this.state.context));\n throw error;\n } finally {\n this.dispatch({\n type: 'error',\n error: error\n });\n }\n }\n }\n\n dispatch(action) {\n const reducer = state => {\n switch (action.type) {\n case 'failed':\n return { ...state,\n failureCount: action.failureCount,\n failureReason: action.error\n };\n\n case 'pause':\n return { ...state,\n isPaused: true\n };\n\n case 'continue':\n return { ...state,\n isPaused: false\n };\n\n case 'loading':\n return { ...state,\n context: action.context,\n data: undefined,\n failureCount: 0,\n failureReason: null,\n error: null,\n isPaused: !canFetch(this.options.networkMode),\n status: 'loading',\n variables: action.variables\n };\n\n case 'success':\n return { ...state,\n data: action.data,\n failureCount: 0,\n failureReason: null,\n error: null,\n status: 'success',\n isPaused: false\n };\n\n case 'error':\n return { ...state,\n data: undefined,\n error: action.error,\n failureCount: state.failureCount + 1,\n failureReason: action.error,\n isPaused: false,\n status: 'error'\n };\n\n case 'setState':\n return { ...state,\n ...action.state\n };\n }\n };\n\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.observers.forEach(observer => {\n observer.onMutationUpdate(action);\n });\n this.mutationCache.notify({\n mutation: this,\n type: 'updated',\n action\n });\n });\n }\n\n}\nfunction getDefaultState() {\n return {\n context: undefined,\n data: undefined,\n error: null,\n failureCount: 0,\n failureReason: null,\n isPaused: false,\n status: 'idle',\n variables: undefined\n };\n}\n\nexport { Mutation, getDefaultState };\n//# sourceMappingURL=mutation.mjs.map\n","import { notifyManager } from './notifyManager.mjs';\nimport { Mutation } from './mutation.mjs';\nimport { matchMutation, noop } from './utils.mjs';\nimport { Subscribable } from './subscribable.mjs';\n\n// CLASS\nclass MutationCache extends Subscribable {\n constructor(config) {\n super();\n this.config = config || {};\n this.mutations = [];\n this.mutationId = 0;\n }\n\n build(client, options, state) {\n const mutation = new Mutation({\n mutationCache: this,\n logger: client.getLogger(),\n mutationId: ++this.mutationId,\n options: client.defaultMutationOptions(options),\n state,\n defaultOptions: options.mutationKey ? client.getMutationDefaults(options.mutationKey) : undefined\n });\n this.add(mutation);\n return mutation;\n }\n\n add(mutation) {\n this.mutations.push(mutation);\n this.notify({\n type: 'added',\n mutation\n });\n }\n\n remove(mutation) {\n this.mutations = this.mutations.filter(x => x !== mutation);\n this.notify({\n type: 'removed',\n mutation\n });\n }\n\n clear() {\n notifyManager.batch(() => {\n this.mutations.forEach(mutation => {\n this.remove(mutation);\n });\n });\n }\n\n getAll() {\n return this.mutations;\n }\n\n find(filters) {\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.mutations.find(mutation => matchMutation(filters, mutation));\n }\n\n findAll(filters) {\n return this.mutations.filter(mutation => matchMutation(filters, mutation));\n }\n\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach(({\n listener\n }) => {\n listener(event);\n });\n });\n }\n\n resumePausedMutations() {\n var _this$resuming;\n\n this.resuming = ((_this$resuming = this.resuming) != null ? _this$resuming : Promise.resolve()).then(() => {\n const pausedMutations = this.mutations.filter(x => x.state.isPaused);\n return notifyManager.batch(() => pausedMutations.reduce((promise, mutation) => promise.then(() => mutation.continue().catch(noop)), Promise.resolve()));\n }).then(() => {\n this.resuming = undefined;\n });\n return this.resuming;\n }\n\n}\n\nexport { MutationCache };\n//# sourceMappingURL=mutationCache.mjs.map\n","function infiniteQueryBehavior() {\n return {\n onFetch: context => {\n context.fetchFn = () => {\n var _context$fetchOptions, _context$fetchOptions2, _context$fetchOptions3, _context$fetchOptions4, _context$state$data, _context$state$data2;\n\n const refetchPage = (_context$fetchOptions = context.fetchOptions) == null ? void 0 : (_context$fetchOptions2 = _context$fetchOptions.meta) == null ? void 0 : _context$fetchOptions2.refetchPage;\n const fetchMore = (_context$fetchOptions3 = context.fetchOptions) == null ? void 0 : (_context$fetchOptions4 = _context$fetchOptions3.meta) == null ? void 0 : _context$fetchOptions4.fetchMore;\n const pageParam = fetchMore == null ? void 0 : fetchMore.pageParam;\n const isFetchingNextPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'forward';\n const isFetchingPreviousPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'backward';\n const oldPages = ((_context$state$data = context.state.data) == null ? void 0 : _context$state$data.pages) || [];\n const oldPageParams = ((_context$state$data2 = context.state.data) == null ? void 0 : _context$state$data2.pageParams) || [];\n let newPageParams = oldPageParams;\n let cancelled = false;\n\n const addSignalProperty = object => {\n Object.defineProperty(object, 'signal', {\n enumerable: true,\n get: () => {\n var _context$signal;\n\n if ((_context$signal = context.signal) != null && _context$signal.aborted) {\n cancelled = true;\n } else {\n var _context$signal2;\n\n (_context$signal2 = context.signal) == null ? void 0 : _context$signal2.addEventListener('abort', () => {\n cancelled = true;\n });\n }\n\n return context.signal;\n }\n });\n }; // Get query function\n\n\n const queryFn = context.options.queryFn || (() => Promise.reject(\"Missing queryFn for queryKey '\" + context.options.queryHash + \"'\"));\n\n const buildNewPages = (pages, param, page, previous) => {\n newPageParams = previous ? [param, ...newPageParams] : [...newPageParams, param];\n return previous ? [page, ...pages] : [...pages, page];\n }; // Create function to fetch a page\n\n\n const fetchPage = (pages, manual, param, previous) => {\n if (cancelled) {\n return Promise.reject('Cancelled');\n }\n\n if (typeof param === 'undefined' && !manual && pages.length) {\n return Promise.resolve(pages);\n }\n\n const queryFnContext = {\n queryKey: context.queryKey,\n pageParam: param,\n meta: context.options.meta\n };\n addSignalProperty(queryFnContext);\n const queryFnResult = queryFn(queryFnContext);\n const promise = Promise.resolve(queryFnResult).then(page => buildNewPages(pages, param, page, previous));\n return promise;\n };\n\n let promise; // Fetch first page?\n\n if (!oldPages.length) {\n promise = fetchPage([]);\n } // Fetch next page?\n else if (isFetchingNextPage) {\n const manual = typeof pageParam !== 'undefined';\n const param = manual ? pageParam : getNextPageParam(context.options, oldPages);\n promise = fetchPage(oldPages, manual, param);\n } // Fetch previous page?\n else if (isFetchingPreviousPage) {\n const manual = typeof pageParam !== 'undefined';\n const param = manual ? pageParam : getPreviousPageParam(context.options, oldPages);\n promise = fetchPage(oldPages, manual, param, true);\n } // Refetch pages\n else {\n newPageParams = [];\n const manual = typeof context.options.getNextPageParam === 'undefined';\n const shouldFetchFirstPage = refetchPage && oldPages[0] ? refetchPage(oldPages[0], 0, oldPages) : true; // Fetch first page\n\n promise = shouldFetchFirstPage ? fetchPage([], manual, oldPageParams[0]) : Promise.resolve(buildNewPages([], oldPageParams[0], oldPages[0])); // Fetch remaining pages\n\n for (let i = 1; i < oldPages.length; i++) {\n promise = promise.then(pages => {\n const shouldFetchNextPage = refetchPage && oldPages[i] ? refetchPage(oldPages[i], i, oldPages) : true;\n\n if (shouldFetchNextPage) {\n const param = manual ? oldPageParams[i] : getNextPageParam(context.options, pages);\n return fetchPage(pages, manual, param);\n }\n\n return Promise.resolve(buildNewPages(pages, oldPageParams[i], oldPages[i]));\n });\n }\n }\n\n const finalPromise = promise.then(pages => ({\n pages,\n pageParams: newPageParams\n }));\n return finalPromise;\n };\n }\n };\n}\nfunction getNextPageParam(options, pages) {\n return options.getNextPageParam == null ? void 0 : options.getNextPageParam(pages[pages.length - 1], pages);\n}\nfunction getPreviousPageParam(options, pages) {\n return options.getPreviousPageParam == null ? void 0 : options.getPreviousPageParam(pages[0], pages);\n}\n/**\n * Checks if there is a next page.\n * Returns `undefined` if it cannot be determined.\n */\n\nfunction hasNextPage(options, pages) {\n if (options.getNextPageParam && Array.isArray(pages)) {\n const nextPageParam = getNextPageParam(options, pages);\n return typeof nextPageParam !== 'undefined' && nextPageParam !== null && nextPageParam !== false;\n }\n\n return;\n}\n/**\n * Checks if there is a previous page.\n * Returns `undefined` if it cannot be determined.\n */\n\nfunction hasPreviousPage(options, pages) {\n if (options.getPreviousPageParam && Array.isArray(pages)) {\n const previousPageParam = getPreviousPageParam(options, pages);\n return typeof previousPageParam !== 'undefined' && previousPageParam !== null && previousPageParam !== false;\n }\n\n return;\n}\n\nexport { getNextPageParam, getPreviousPageParam, hasNextPage, hasPreviousPage, infiniteQueryBehavior };\n//# sourceMappingURL=infiniteQueryBehavior.mjs.map\n","import { parseFilterArgs, parseQueryArgs, functionalUpdate, noop, hashQueryKey, partialMatchKey, hashQueryKeyByOptions } from './utils.mjs';\nimport { QueryCache } from './queryCache.mjs';\nimport { MutationCache } from './mutationCache.mjs';\nimport { focusManager } from './focusManager.mjs';\nimport { onlineManager } from './onlineManager.mjs';\nimport { notifyManager } from './notifyManager.mjs';\nimport { infiniteQueryBehavior } from './infiniteQueryBehavior.mjs';\nimport { defaultLogger } from './logger.mjs';\n\n// CLASS\nclass QueryClient {\n constructor(config = {}) {\n this.queryCache = config.queryCache || new QueryCache();\n this.mutationCache = config.mutationCache || new MutationCache();\n this.logger = config.logger || defaultLogger;\n this.defaultOptions = config.defaultOptions || {};\n this.queryDefaults = [];\n this.mutationDefaults = [];\n this.mountCount = 0;\n\n if (process.env.NODE_ENV !== 'production' && config.logger) {\n this.logger.error(\"Passing a custom logger has been deprecated and will be removed in the next major version.\");\n }\n }\n\n mount() {\n this.mountCount++;\n if (this.mountCount !== 1) return;\n this.unsubscribeFocus = focusManager.subscribe(() => {\n if (focusManager.isFocused()) {\n this.resumePausedMutations();\n this.queryCache.onFocus();\n }\n });\n this.unsubscribeOnline = onlineManager.subscribe(() => {\n if (onlineManager.isOnline()) {\n this.resumePausedMutations();\n this.queryCache.onOnline();\n }\n });\n }\n\n unmount() {\n var _this$unsubscribeFocu, _this$unsubscribeOnli;\n\n this.mountCount--;\n if (this.mountCount !== 0) return;\n (_this$unsubscribeFocu = this.unsubscribeFocus) == null ? void 0 : _this$unsubscribeFocu.call(this);\n this.unsubscribeFocus = undefined;\n (_this$unsubscribeOnli = this.unsubscribeOnline) == null ? void 0 : _this$unsubscribeOnli.call(this);\n this.unsubscribeOnline = undefined;\n }\n\n isFetching(arg1, arg2) {\n const [filters] = parseFilterArgs(arg1, arg2);\n filters.fetchStatus = 'fetching';\n return this.queryCache.findAll(filters).length;\n }\n\n isMutating(filters) {\n return this.mutationCache.findAll({ ...filters,\n fetching: true\n }).length;\n }\n\n getQueryData(queryKey, filters) {\n var _this$queryCache$find;\n\n return (_this$queryCache$find = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find.state.data;\n }\n\n ensureQueryData(arg1, arg2, arg3) {\n const parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n const cachedData = this.getQueryData(parsedOptions.queryKey);\n return cachedData ? Promise.resolve(cachedData) : this.fetchQuery(parsedOptions);\n }\n\n getQueriesData(queryKeyOrFilters) {\n return this.getQueryCache().findAll(queryKeyOrFilters).map(({\n queryKey,\n state\n }) => {\n const data = state.data;\n return [queryKey, data];\n });\n }\n\n setQueryData(queryKey, updater, options) {\n const query = this.queryCache.find(queryKey);\n const prevData = query == null ? void 0 : query.state.data;\n const data = functionalUpdate(updater, prevData);\n\n if (typeof data === 'undefined') {\n return undefined;\n }\n\n const parsedOptions = parseQueryArgs(queryKey);\n const defaultedOptions = this.defaultQueryOptions(parsedOptions);\n return this.queryCache.build(this, defaultedOptions).setData(data, { ...options,\n manual: true\n });\n }\n\n setQueriesData(queryKeyOrFilters, updater, options) {\n return notifyManager.batch(() => this.getQueryCache().findAll(queryKeyOrFilters).map(({\n queryKey\n }) => [queryKey, this.setQueryData(queryKey, updater, options)]));\n }\n\n getQueryState(queryKey, filters) {\n var _this$queryCache$find2;\n\n return (_this$queryCache$find2 = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find2.state;\n }\n\n removeQueries(arg1, arg2) {\n const [filters] = parseFilterArgs(arg1, arg2);\n const queryCache = this.queryCache;\n notifyManager.batch(() => {\n queryCache.findAll(filters).forEach(query => {\n queryCache.remove(query);\n });\n });\n }\n\n resetQueries(arg1, arg2, arg3) {\n const [filters, options] = parseFilterArgs(arg1, arg2, arg3);\n const queryCache = this.queryCache;\n const refetchFilters = {\n type: 'active',\n ...filters\n };\n return notifyManager.batch(() => {\n queryCache.findAll(filters).forEach(query => {\n query.reset();\n });\n return this.refetchQueries(refetchFilters, options);\n });\n }\n\n cancelQueries(arg1, arg2, arg3) {\n const [filters, cancelOptions = {}] = parseFilterArgs(arg1, arg2, arg3);\n\n if (typeof cancelOptions.revert === 'undefined') {\n cancelOptions.revert = true;\n }\n\n const promises = notifyManager.batch(() => this.queryCache.findAll(filters).map(query => query.cancel(cancelOptions)));\n return Promise.all(promises).then(noop).catch(noop);\n }\n\n invalidateQueries(arg1, arg2, arg3) {\n const [filters, options] = parseFilterArgs(arg1, arg2, arg3);\n return notifyManager.batch(() => {\n var _ref, _filters$refetchType;\n\n this.queryCache.findAll(filters).forEach(query => {\n query.invalidate();\n });\n\n if (filters.refetchType === 'none') {\n return Promise.resolve();\n }\n\n const refetchFilters = { ...filters,\n type: (_ref = (_filters$refetchType = filters.refetchType) != null ? _filters$refetchType : filters.type) != null ? _ref : 'active'\n };\n return this.refetchQueries(refetchFilters, options);\n });\n }\n\n refetchQueries(arg1, arg2, arg3) {\n const [filters, options] = parseFilterArgs(arg1, arg2, arg3);\n const promises = notifyManager.batch(() => this.queryCache.findAll(filters).filter(query => !query.isDisabled()).map(query => {\n var _options$cancelRefetc;\n\n return query.fetch(undefined, { ...options,\n cancelRefetch: (_options$cancelRefetc = options == null ? void 0 : options.cancelRefetch) != null ? _options$cancelRefetc : true,\n meta: {\n refetchPage: filters.refetchPage\n }\n });\n }));\n let promise = Promise.all(promises).then(noop);\n\n if (!(options != null && options.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n }\n\n fetchQuery(arg1, arg2, arg3) {\n const parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n const defaultedOptions = this.defaultQueryOptions(parsedOptions); // https://github.com/tannerlinsley/react-query/issues/652\n\n if (typeof defaultedOptions.retry === 'undefined') {\n defaultedOptions.retry = false;\n }\n\n const query = this.queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n }\n\n prefetchQuery(arg1, arg2, arg3) {\n return this.fetchQuery(arg1, arg2, arg3).then(noop).catch(noop);\n }\n\n fetchInfiniteQuery(arg1, arg2, arg3) {\n const parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n parsedOptions.behavior = infiniteQueryBehavior();\n return this.fetchQuery(parsedOptions);\n }\n\n prefetchInfiniteQuery(arg1, arg2, arg3) {\n return this.fetchInfiniteQuery(arg1, arg2, arg3).then(noop).catch(noop);\n }\n\n resumePausedMutations() {\n return this.mutationCache.resumePausedMutations();\n }\n\n getQueryCache() {\n return this.queryCache;\n }\n\n getMutationCache() {\n return this.mutationCache;\n }\n\n getLogger() {\n return this.logger;\n }\n\n getDefaultOptions() {\n return this.defaultOptions;\n }\n\n setDefaultOptions(options) {\n this.defaultOptions = options;\n }\n\n setQueryDefaults(queryKey, options) {\n const result = this.queryDefaults.find(x => hashQueryKey(queryKey) === hashQueryKey(x.queryKey));\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.queryDefaults.push({\n queryKey,\n defaultOptions: options\n });\n }\n }\n\n getQueryDefaults(queryKey) {\n if (!queryKey) {\n return undefined;\n } // Get the first matching defaults\n\n\n const firstMatchingDefaults = this.queryDefaults.find(x => partialMatchKey(queryKey, x.queryKey)); // Additional checks and error in dev mode\n\n if (process.env.NODE_ENV !== 'production') {\n // Retrieve all matching defaults for the given key\n const matchingDefaults = this.queryDefaults.filter(x => partialMatchKey(queryKey, x.queryKey)); // It is ok not having defaults, but it is error prone to have more than 1 default for a given key\n\n if (matchingDefaults.length > 1) {\n this.logger.error(\"[QueryClient] Several query defaults match with key '\" + JSON.stringify(queryKey) + \"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults.\");\n }\n }\n\n return firstMatchingDefaults == null ? void 0 : firstMatchingDefaults.defaultOptions;\n }\n\n setMutationDefaults(mutationKey, options) {\n const result = this.mutationDefaults.find(x => hashQueryKey(mutationKey) === hashQueryKey(x.mutationKey));\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.mutationDefaults.push({\n mutationKey,\n defaultOptions: options\n });\n }\n }\n\n getMutationDefaults(mutationKey) {\n if (!mutationKey) {\n return undefined;\n } // Get the first matching defaults\n\n\n const firstMatchingDefaults = this.mutationDefaults.find(x => partialMatchKey(mutationKey, x.mutationKey)); // Additional checks and error in dev mode\n\n if (process.env.NODE_ENV !== 'production') {\n // Retrieve all matching defaults for the given key\n const matchingDefaults = this.mutationDefaults.filter(x => partialMatchKey(mutationKey, x.mutationKey)); // It is ok not having defaults, but it is error prone to have more than 1 default for a given key\n\n if (matchingDefaults.length > 1) {\n this.logger.error(\"[QueryClient] Several mutation defaults match with key '\" + JSON.stringify(mutationKey) + \"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults.\");\n }\n }\n\n return firstMatchingDefaults == null ? void 0 : firstMatchingDefaults.defaultOptions;\n }\n\n defaultQueryOptions(options) {\n if (options != null && options._defaulted) {\n return options;\n }\n\n const defaultedOptions = { ...this.defaultOptions.queries,\n ...this.getQueryDefaults(options == null ? void 0 : options.queryKey),\n ...options,\n _defaulted: true\n };\n\n if (!defaultedOptions.queryHash && defaultedOptions.queryKey) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(defaultedOptions.queryKey, defaultedOptions);\n } // dependent default values\n\n\n if (typeof defaultedOptions.refetchOnReconnect === 'undefined') {\n defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== 'always';\n }\n\n if (typeof defaultedOptions.useErrorBoundary === 'undefined') {\n defaultedOptions.useErrorBoundary = !!defaultedOptions.suspense;\n }\n\n return defaultedOptions;\n }\n\n defaultMutationOptions(options) {\n if (options != null && options._defaulted) {\n return options;\n }\n\n return { ...this.defaultOptions.mutations,\n ...this.getMutationDefaults(options == null ? void 0 : options.mutationKey),\n ...options,\n _defaulted: true\n };\n }\n\n clear() {\n this.queryCache.clear();\n this.mutationCache.clear();\n }\n\n}\n\nexport { QueryClient };\n//# sourceMappingURL=queryClient.mjs.map\n","import { getDefaultState } from './mutation.mjs';\nimport { notifyManager } from './notifyManager.mjs';\nimport { Subscribable } from './subscribable.mjs';\nimport { shallowEqualObjects } from './utils.mjs';\n\n// CLASS\nclass MutationObserver extends Subscribable {\n constructor(client, options) {\n super();\n this.client = client;\n this.setOptions(options);\n this.bindMethods();\n this.updateResult();\n }\n\n bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n }\n\n setOptions(options) {\n var _this$currentMutation;\n\n const prevOptions = this.options;\n this.options = this.client.defaultMutationOptions(options);\n\n if (!shallowEqualObjects(prevOptions, this.options)) {\n this.client.getMutationCache().notify({\n type: 'observerOptionsUpdated',\n mutation: this.currentMutation,\n observer: this\n });\n }\n\n (_this$currentMutation = this.currentMutation) == null ? void 0 : _this$currentMutation.setOptions(this.options);\n }\n\n onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$currentMutation2;\n\n (_this$currentMutation2 = this.currentMutation) == null ? void 0 : _this$currentMutation2.removeObserver(this);\n }\n }\n\n onMutationUpdate(action) {\n this.updateResult(); // Determine which callbacks to trigger\n\n const notifyOptions = {\n listeners: true\n };\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error') {\n notifyOptions.onError = true;\n }\n\n this.notify(notifyOptions);\n }\n\n getCurrentResult() {\n return this.currentResult;\n }\n\n reset() {\n this.currentMutation = undefined;\n this.updateResult();\n this.notify({\n listeners: true\n });\n }\n\n mutate(variables, options) {\n this.mutateOptions = options;\n\n if (this.currentMutation) {\n this.currentMutation.removeObserver(this);\n }\n\n this.currentMutation = this.client.getMutationCache().build(this.client, { ...this.options,\n variables: typeof variables !== 'undefined' ? variables : this.options.variables\n });\n this.currentMutation.addObserver(this);\n return this.currentMutation.execute();\n }\n\n updateResult() {\n const state = this.currentMutation ? this.currentMutation.state : getDefaultState();\n const result = { ...state,\n isLoading: state.status === 'loading',\n isSuccess: state.status === 'success',\n isError: state.status === 'error',\n isIdle: state.status === 'idle',\n mutate: this.mutate,\n reset: this.reset\n };\n this.currentResult = result;\n }\n\n notify(options) {\n notifyManager.batch(() => {\n // First trigger the mutate callbacks\n if (this.mutateOptions && this.hasListeners()) {\n if (options.onSuccess) {\n var _this$mutateOptions$o, _this$mutateOptions, _this$mutateOptions$o2, _this$mutateOptions2;\n\n (_this$mutateOptions$o = (_this$mutateOptions = this.mutateOptions).onSuccess) == null ? void 0 : _this$mutateOptions$o.call(_this$mutateOptions, this.currentResult.data, this.currentResult.variables, this.currentResult.context);\n (_this$mutateOptions$o2 = (_this$mutateOptions2 = this.mutateOptions).onSettled) == null ? void 0 : _this$mutateOptions$o2.call(_this$mutateOptions2, this.currentResult.data, null, this.currentResult.variables, this.currentResult.context);\n } else if (options.onError) {\n var _this$mutateOptions$o3, _this$mutateOptions3, _this$mutateOptions$o4, _this$mutateOptions4;\n\n (_this$mutateOptions$o3 = (_this$mutateOptions3 = this.mutateOptions).onError) == null ? void 0 : _this$mutateOptions$o3.call(_this$mutateOptions3, this.currentResult.error, this.currentResult.variables, this.currentResult.context);\n (_this$mutateOptions$o4 = (_this$mutateOptions4 = this.mutateOptions).onSettled) == null ? void 0 : _this$mutateOptions$o4.call(_this$mutateOptions4, undefined, this.currentResult.error, this.currentResult.variables, this.currentResult.context);\n }\n } // Then trigger the listeners\n\n\n if (options.listeners) {\n this.listeners.forEach(({\n listener\n }) => {\n listener(this.currentResult);\n });\n }\n });\n }\n\n}\n\nexport { MutationObserver };\n//# sourceMappingURL=mutationObserver.mjs.map\n","import { isRef, unref } from 'vue-demi';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst VUE_QUERY_CLIENT = 'VUE_QUERY_CLIENT';\nfunction getClientKey(key) {\n const suffix = key ? \":\" + key : '';\n return \"\" + VUE_QUERY_CLIENT + suffix;\n}\nfunction isQueryKey(value) {\n return Array.isArray(value);\n}\nfunction isMutationKey(value) {\n return Array.isArray(value);\n}\nfunction updateState(state, update) {\n Object.keys(state).forEach(key => {\n state[key] = update[key];\n });\n}\nfunction cloneDeep(value, customizer) {\n if (customizer) {\n const result = customizer(value);\n\n if (result !== undefined || isRef(value)) {\n return result;\n }\n }\n\n if (Array.isArray(value)) {\n return value.map(val => cloneDeep(val, customizer));\n }\n\n if (typeof value === 'object' && isPlainObject(value)) {\n const entries = Object.entries(value).map(([key, val]) => [key, cloneDeep(val, customizer)]);\n return Object.fromEntries(entries);\n }\n\n return value;\n}\nfunction cloneDeepUnref(obj) {\n return cloneDeep(obj, val => {\n if (isRef(val)) {\n return cloneDeepUnref(unref(val));\n }\n });\n}\n\nfunction isPlainObject(value) {\n if (Object.prototype.toString.call(value) !== '[object Object]') {\n return false;\n }\n\n const prototype = Object.getPrototypeOf(value);\n return prototype === null || prototype === Object.prototype;\n}\n\nfunction shouldThrowError(_useErrorBoundary, params) {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === 'function') {\n return _useErrorBoundary(...params);\n }\n\n return !!_useErrorBoundary;\n}\n\nexport { VUE_QUERY_CLIENT, cloneDeep, cloneDeepUnref, getClientKey, isMutationKey, isQueryKey, shouldThrowError, updateState };\n//# sourceMappingURL=utils.mjs.map\n","import { getCurrentInstance, inject } from 'vue-demi';\nimport { getClientKey } from './utils.mjs';\n\nfunction useQueryClient(id = '') {\n var _getCurrentInstance;\n\n const vm = (_getCurrentInstance = getCurrentInstance()) == null ? void 0 : _getCurrentInstance.proxy;\n\n if (!vm) {\n throw new Error('vue-query hooks can only be used inside setup() function.');\n }\n\n const key = getClientKey(id);\n const queryClient = inject(key);\n\n if (!queryClient) {\n throw new Error(\"No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.\");\n }\n\n return queryClient;\n}\n\nexport { useQueryClient };\n//# sourceMappingURL=useQueryClient.mjs.map\n","import { QueryCache as QueryCache$1 } from '@tanstack/query-core';\nimport { cloneDeepUnref, isQueryKey } from './utils.mjs';\n\nclass QueryCache extends QueryCache$1 {\n find(arg1, arg2) {\n const arg1Unreffed = cloneDeepUnref(arg1);\n const arg2Unreffed = cloneDeepUnref(arg2);\n return super.find(arg1Unreffed, arg2Unreffed);\n }\n\n findAll(arg1, arg2) {\n const arg1Unreffed = cloneDeepUnref(arg1);\n const arg2Unreffed = cloneDeepUnref(arg2);\n\n if (isQueryKey(arg1Unreffed)) {\n return super.findAll(arg1Unreffed, arg2Unreffed);\n }\n\n return super.findAll(arg1Unreffed);\n }\n\n}\n\nexport { QueryCache };\n//# sourceMappingURL=queryCache.mjs.map\n","import { MutationCache as MutationCache$1 } from '@tanstack/query-core';\nimport { cloneDeepUnref } from './utils.mjs';\n\nclass MutationCache extends MutationCache$1 {\n find(filters) {\n return super.find(cloneDeepUnref(filters));\n }\n\n findAll(filters) {\n return super.findAll(cloneDeepUnref(filters));\n }\n\n}\n\nexport { MutationCache };\n//# sourceMappingURL=mutationCache.mjs.map\n","import { ref } from 'vue-demi';\nimport { QueryClient as QueryClient$1 } from '@tanstack/query-core';\nimport { cloneDeepUnref, isQueryKey } from './utils.mjs';\nimport { QueryCache } from './queryCache.mjs';\nimport { MutationCache } from './mutationCache.mjs';\n\nclass QueryClient extends QueryClient$1 {\n constructor(config = {}) {\n const unreffedConfig = cloneDeepUnref(config);\n const vueQueryConfig = {\n logger: cloneDeepUnref(unreffedConfig.logger),\n defaultOptions: cloneDeepUnref(unreffedConfig.defaultOptions),\n queryCache: unreffedConfig.queryCache || new QueryCache(),\n mutationCache: unreffedConfig.mutationCache || new MutationCache()\n };\n super(vueQueryConfig);\n this.isRestoring = ref(false);\n }\n\n isFetching(arg1, arg2) {\n const arg1Unreffed = cloneDeepUnref(arg1);\n const arg2Unreffed = cloneDeepUnref(arg2);\n\n if (isQueryKey(arg1Unreffed)) {\n return super.isFetching(arg1Unreffed, arg2Unreffed);\n }\n\n return super.isFetching(arg1Unreffed);\n }\n\n isMutating(filters) {\n return super.isMutating(cloneDeepUnref(filters));\n }\n\n getQueryData(queryKey, filters) {\n return super.getQueryData(cloneDeepUnref(queryKey), cloneDeepUnref(filters));\n }\n\n getQueriesData(queryKeyOrFilters) {\n const unreffed = cloneDeepUnref(queryKeyOrFilters);\n\n if (isQueryKey(unreffed)) {\n return super.getQueriesData(unreffed);\n }\n\n return super.getQueriesData(unreffed);\n }\n\n setQueryData(queryKey, updater, options) {\n return super.setQueryData(cloneDeepUnref(queryKey), updater, cloneDeepUnref(options));\n }\n\n setQueriesData(queryKeyOrFilters, updater, options) {\n const arg1Unreffed = cloneDeepUnref(queryKeyOrFilters);\n const arg3Unreffed = cloneDeepUnref(options);\n\n if (isQueryKey(arg1Unreffed)) {\n return super.setQueriesData(arg1Unreffed, updater, arg3Unreffed);\n }\n\n return super.setQueriesData(arg1Unreffed, updater, arg3Unreffed);\n }\n\n getQueryState(queryKey, filters) {\n return super.getQueryState(cloneDeepUnref(queryKey), cloneDeepUnref(filters));\n }\n\n removeQueries(arg1, arg2) {\n const arg1Unreffed = cloneDeepUnref(arg1);\n\n if (isQueryKey(arg1Unreffed)) {\n return super.removeQueries(arg1Unreffed, cloneDeepUnref(arg2));\n }\n\n return super.removeQueries(arg1Unreffed);\n }\n\n resetQueries(arg1, arg2, arg3) {\n const arg1Unreffed = cloneDeepUnref(arg1);\n const arg2Unreffed = cloneDeepUnref(arg2);\n\n if (isQueryKey(arg1Unreffed)) {\n return super.resetQueries(arg1Unreffed, arg2Unreffed, cloneDeepUnref(arg3));\n }\n\n return super.resetQueries(arg1Unreffed, arg2Unreffed);\n }\n\n cancelQueries(arg1, arg2, arg3) {\n const arg1Unreffed = cloneDeepUnref(arg1);\n const arg2Unreffed = cloneDeepUnref(arg2);\n\n if (isQueryKey(arg1Unreffed)) {\n return super.cancelQueries(arg1Unreffed, arg2Unreffed, cloneDeepUnref(arg3));\n }\n\n return super.cancelQueries(arg1Unreffed, arg2Unreffed);\n }\n\n invalidateQueries(arg1, arg2, arg3) {\n const arg1Unreffed = cloneDeepUnref(arg1);\n const arg2Unreffed = cloneDeepUnref(arg2);\n\n if (isQueryKey(arg1Unreffed)) {\n return super.invalidateQueries(arg1Unreffed, arg2Unreffed, cloneDeepUnref(arg3));\n }\n\n return super.invalidateQueries(arg1Unreffed, arg2Unreffed);\n }\n\n refetchQueries(arg1, arg2, arg3) {\n const arg1Unreffed = cloneDeepUnref(arg1);\n const arg2Unreffed = cloneDeepUnref(arg2);\n\n if (isQueryKey(arg1Unreffed)) {\n return super.refetchQueries(arg1Unreffed, arg2Unreffed, cloneDeepUnref(arg3));\n }\n\n return super.refetchQueries(arg1Unreffed, arg2Unreffed);\n }\n\n fetchQuery(arg1, arg2, arg3) {\n const arg1Unreffed = cloneDeepUnref(arg1);\n const arg2Unreffed = cloneDeepUnref(arg2);\n\n if (isQueryKey(arg1Unreffed)) {\n return super.fetchQuery(arg1Unreffed, arg2Unreffed, cloneDeepUnref(arg3));\n }\n\n return super.fetchQuery(arg1Unreffed);\n }\n\n prefetchQuery(arg1, arg2, arg3) {\n return super.prefetchQuery(cloneDeepUnref(arg1), cloneDeepUnref(arg2), cloneDeepUnref(arg3));\n }\n\n fetchInfiniteQuery(arg1, arg2, arg3) {\n const arg1Unreffed = cloneDeepUnref(arg1);\n const arg2Unreffed = cloneDeepUnref(arg2);\n\n if (isQueryKey(arg1Unreffed)) {\n return super.fetchInfiniteQuery(arg1Unreffed, arg2Unreffed, cloneDeepUnref(arg3));\n }\n\n return super.fetchInfiniteQuery(arg1Unreffed);\n }\n\n prefetchInfiniteQuery(arg1, arg2, arg3) {\n return super.prefetchInfiniteQuery(cloneDeepUnref(arg1), cloneDeepUnref(arg2), cloneDeepUnref(arg3));\n }\n\n setDefaultOptions(options) {\n super.setDefaultOptions(cloneDeepUnref(options));\n }\n\n setQueryDefaults(queryKey, options) {\n super.setQueryDefaults(cloneDeepUnref(queryKey), cloneDeepUnref(options));\n }\n\n getQueryDefaults(queryKey) {\n return super.getQueryDefaults(cloneDeepUnref(queryKey));\n }\n\n setMutationDefaults(mutationKey, options) {\n super.setMutationDefaults(cloneDeepUnref(mutationKey), cloneDeepUnref(options));\n }\n\n getMutationDefaults(mutationKey) {\n return super.getMutationDefaults(cloneDeepUnref(mutationKey));\n }\n\n}\n\nexport { QueryClient };\n//# sourceMappingURL=queryClient.mjs.map\n","import { isVue2 } from 'vue-demi';\nimport { isServer } from '@tanstack/query-core';\nimport { QueryClient } from './queryClient.mjs';\nimport { getClientKey } from './utils.mjs';\nimport { setupDevtools } from './devtools/devtools.mjs';\n\nconst VueQueryPlugin = {\n install: (app, options = {}) => {\n const clientKey = getClientKey(options.queryClientKey);\n let client;\n\n if ('queryClient' in options && options.queryClient) {\n client = options.queryClient;\n } else {\n if (options.contextSharing && typeof window !== 'undefined') {\n if (!window.__VUE_QUERY_CONTEXT__) {\n const clientConfig = 'queryClientConfig' in options ? options.queryClientConfig : undefined;\n client = new QueryClient(clientConfig);\n window.__VUE_QUERY_CONTEXT__ = client;\n } else {\n client = window.__VUE_QUERY_CONTEXT__;\n }\n } else {\n const clientConfig = 'queryClientConfig' in options ? options.queryClientConfig : undefined;\n client = new QueryClient(clientConfig);\n }\n }\n\n if (!isServer) {\n client.mount();\n }\n\n let persisterUnmount = () => {// noop\n };\n\n if (options.clientPersister) {\n client.isRestoring.value = true;\n const [unmount, promise] = options.clientPersister(client);\n persisterUnmount = unmount;\n promise.then(() => {\n client.isRestoring.value = false;\n });\n }\n\n if (process.env.NODE_ENV !== 'production' && options.contextSharing) {\n client.getLogger().error(\"The contextSharing option has been deprecated and will be removed in the next major version\");\n }\n\n const cleanup = () => {\n client.unmount();\n persisterUnmount();\n };\n\n if (app.onUnmount) {\n app.onUnmount(cleanup);\n } else {\n const originalUnmount = app.unmount;\n\n app.unmount = function vueQueryUnmount() {\n cleanup();\n originalUnmount();\n };\n }\n /* istanbul ignore next */\n\n\n if (isVue2) {\n app.mixin({\n beforeCreate() {\n // HACK: taken from provide(): https://github.com/vuejs/composition-api/blob/master/src/apis/inject.ts#L30\n if (!this._provided) {\n const provideCache = {};\n Object.defineProperty(this, '_provided', {\n get: () => provideCache,\n set: v => Object.assign(provideCache, v)\n });\n }\n\n this._provided[clientKey] = client;\n\n if (process.env.NODE_ENV === 'development') {\n if (this === this.$root) {\n setupDevtools(this, client);\n }\n }\n }\n\n });\n } else {\n app.provide(clientKey, client);\n\n if (process.env.NODE_ENV === 'development') {\n setupDevtools(app, client);\n }\n }\n }\n};\n\nexport { VueQueryPlugin };\n//# sourceMappingURL=vueQueryPlugin.mjs.map\n","import { computed, reactive, watch, onScopeDispose, toRefs, readonly, unref } from 'vue-demi';\nimport { MutationObserver } from '@tanstack/query-core';\nimport { updateState, shouldThrowError, isMutationKey, cloneDeepUnref } from './utils.mjs';\nimport { useQueryClient } from './useQueryClient.mjs';\n\nfunction useMutation(arg1, arg2, arg3) {\n var _options$value$queryC;\n\n const options = computed(() => {\n return parseMutationArgs(arg1, arg2, arg3);\n });\n const queryClient = (_options$value$queryC = options.value.queryClient) != null ? _options$value$queryC : useQueryClient(options.value.queryClientKey);\n const observer = new MutationObserver(queryClient, queryClient.defaultMutationOptions(options.value));\n const state = reactive(observer.getCurrentResult());\n const unsubscribe = observer.subscribe(result => {\n updateState(state, result);\n });\n\n const mutate = (variables, mutateOptions) => {\n observer.mutate(variables, mutateOptions).catch(() => {// This is intentional\n });\n };\n\n watch(options, () => {\n observer.setOptions(queryClient.defaultMutationOptions(options.value));\n });\n onScopeDispose(() => {\n unsubscribe();\n });\n const resultRefs = toRefs(readonly(state));\n watch(() => state.error, error => {\n if (error && shouldThrowError(options.value.useErrorBoundary, [error])) {\n throw error;\n }\n });\n return { ...resultRefs,\n mutate,\n mutateAsync: state.mutate,\n reset: state.reset\n };\n}\nfunction parseMutationArgs(arg1, arg2, arg3) {\n const plainArg1 = unref(arg1);\n const plainArg2 = unref(arg2);\n let options = plainArg1;\n\n if (isMutationKey(plainArg1)) {\n if (typeof plainArg2 === 'function') {\n const plainArg3 = unref(arg3);\n options = { ...plainArg3,\n mutationKey: plainArg1,\n mutationFn: plainArg2\n };\n } else {\n options = { ...plainArg2,\n mutationKey: plainArg1\n };\n }\n }\n\n if (typeof plainArg1 === 'function') {\n options = { ...plainArg2,\n mutationFn: plainArg1\n };\n }\n\n return cloneDeepUnref(options);\n}\n\nexport { parseMutationArgs, useMutation };\n//# sourceMappingURL=useMutation.mjs.map\n","// src/normalize.ts\nfunction isObject(v) {\n return typeof v === \"object\" && v !== null;\n}\nfunction normalizeOptions(options, factoryOptions) {\n options = isObject(options) ? options : /* @__PURE__ */ Object.create(null);\n return new Proxy(options, {\n get(target, key, receiver) {\n if (key === \"key\")\n return Reflect.get(target, key, receiver);\n return Reflect.get(target, key, receiver) || Reflect.get(factoryOptions, key, receiver);\n }\n });\n}\n\n// src/pick.ts\nfunction get(state, path) {\n return path.reduce((obj, p) => {\n return obj == null ? void 0 : obj[p];\n }, state);\n}\nfunction set(state, path, val) {\n return path.slice(0, -1).reduce((obj, p) => {\n if (/^(__proto__)$/.test(p))\n return {};\n else\n return obj[p] = obj[p] || {};\n }, state)[path[path.length - 1]] = val, state;\n}\nfunction pick(baseState, paths) {\n return paths.reduce((substate, path) => {\n const pathArray = path.split(\".\");\n return set(substate, pathArray, get(baseState, pathArray));\n }, {});\n}\n\n// src/plugin.ts\nfunction parsePersistence(factoryOptions, store) {\n return (o) => {\n var _a;\n try {\n const {\n storage = localStorage,\n beforeRestore = void 0,\n afterRestore = void 0,\n serializer = {\n serialize: JSON.stringify,\n deserialize: JSON.parse\n },\n key = store.$id,\n paths = null,\n debug = false\n } = o;\n return {\n storage,\n beforeRestore,\n afterRestore,\n serializer,\n key: ((_a = factoryOptions.key) != null ? _a : (k) => k)(typeof key == \"string\" ? key : key(store.$id)),\n paths,\n debug\n };\n } catch (e) {\n if (o.debug)\n console.error(\"[pinia-plugin-persistedstate]\", e);\n return null;\n }\n };\n}\nfunction hydrateStore(store, { storage, serializer, key, debug }) {\n try {\n const fromStorage = storage == null ? void 0 : storage.getItem(key);\n if (fromStorage)\n store.$patch(serializer == null ? void 0 : serializer.deserialize(fromStorage));\n } catch (e) {\n if (debug)\n console.error(\"[pinia-plugin-persistedstate]\", e);\n }\n}\nfunction persistState(state, { storage, serializer, key, paths, debug }) {\n try {\n const toStore = Array.isArray(paths) ? pick(state, paths) : state;\n storage.setItem(key, serializer.serialize(toStore));\n } catch (e) {\n if (debug)\n console.error(\"[pinia-plugin-persistedstate]\", e);\n }\n}\nfunction createPersistedState(factoryOptions = {}) {\n return (context) => {\n const { auto = false } = factoryOptions;\n const {\n options: { persist = auto },\n store,\n pinia\n } = context;\n if (!persist)\n return;\n if (!(store.$id in pinia.state.value)) {\n const original_store = pinia._s.get(store.$id.replace(\"__hot:\", \"\"));\n if (original_store)\n Promise.resolve().then(() => original_store.$persist());\n return;\n }\n const persistences = (Array.isArray(persist) ? persist.map((p) => normalizeOptions(p, factoryOptions)) : [normalizeOptions(persist, factoryOptions)]).map(parsePersistence(factoryOptions, store)).filter(Boolean);\n store.$persist = () => {\n persistences.forEach((persistence) => {\n persistState(store.$state, persistence);\n });\n };\n store.$hydrate = ({ runHooks = true } = {}) => {\n persistences.forEach((persistence) => {\n const { beforeRestore, afterRestore } = persistence;\n if (runHooks)\n beforeRestore == null ? void 0 : beforeRestore(context);\n hydrateStore(store, persistence);\n if (runHooks)\n afterRestore == null ? void 0 : afterRestore(context);\n });\n };\n persistences.forEach((persistence) => {\n const { beforeRestore, afterRestore } = persistence;\n beforeRestore == null ? void 0 : beforeRestore(context);\n hydrateStore(store, persistence);\n afterRestore == null ? void 0 : afterRestore(context);\n store.$subscribe(\n (_mutation, state) => {\n persistState(state, persistence);\n },\n {\n detached: true\n }\n );\n });\n };\n}\n\n// src/index.ts\nvar src_default = createPersistedState();\nexport {\n createPersistedState,\n src_default as default\n};\n","// lazy-value by sindresorhus\n\nexport default (fn) => {\n let called = false\n let result\n\n return () => {\n if (!called) {\n called = true\n result = fn()\n }\n\n return result\n }\n}\n","export class Env {\n static isServer() {\n return typeof document === 'undefined'\n }\n}\n","export function createMapScript(options) {\n const googleMapScript = document.createElement('SCRIPT')\n if (typeof options !== 'object') {\n throw new Error('options should be an object')\n }\n\n // libraries\n /* eslint-disable no-prototype-builtins */\n if (Array.prototype.isPrototypeOf(options.libraries)) {\n options.libraries = options.libraries.join(',')\n }\n options['callback'] = 'vueGoogleMapsInit'\n let baseUrl = 'https://maps.googleapis.com/maps/api/js?'\n\n let url =\n baseUrl +\n Object.keys(options)\n .map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(options[key]))\n .join('&')\n\n googleMapScript.setAttribute('src', url)\n googleMapScript.setAttribute('async', '')\n googleMapScript.setAttribute('defer', '')\n\n return googleMapScript\n}\n","import { Env } from './utils/env'\nimport { createMapScript } from './utils/create-map-script'\n\nlet isApiSetUp = false\nexport function loadGMapApi(options) {\n if (Env.isServer()) {\n return\n }\n\n if (!isApiSetUp) {\n isApiSetUp = true\n const googleMapScript = createMapScript(options)\n document.head.appendChild(googleMapScript)\n } else {\n throw new Error('You already started the loading of google maps')\n }\n}\n","export default (vueInst, googleMapsInst, events) => {\n for (let eventName of events) {\n const propName = `on${eventName.charAt(0).toUpperCase()}${eventName.slice(1)}`.replace(\n /[-_]+(.)?/g,\n (_, c) => (c ? c.toUpperCase() : '')\n )\n\n if (vueInst.$props[propName] || vueInst.$attrs[propName]) {\n googleMapsInst.addListener(eventName, (ev) => {\n vueInst.$emit(eventName, ev)\n })\n } else if (vueInst.$gmapOptions.autobindAllEvents || vueInst.$attrs[eventName]) {\n googleMapsInst.addListener(eventName, (ev) => {\n vueInst.$emit(eventName, ev)\n })\n }\n }\n}\n","/**\n * Watch the individual properties of a PoD object, instead of the object\n * per se. This is different from a deep watch where both the reference\n * and the individual values are watched.\n *\n * In effect, it throttles the multiple $watch to execute at most once per tick.\n */\nexport default function WatchPrimitiveProperties(\n vueInst,\n propertiesToTrack,\n handler,\n immediate = false\n) {\n let isHandled = false\n\n function requestHandle() {\n if (!isHandled) {\n isHandled = true\n vueInst.$nextTick(() => {\n isHandled = false\n handler()\n })\n }\n }\n\n for (let prop of propertiesToTrack) {\n vueInst.$watch(prop, requestHandle, { immediate })\n }\n}\n","export class Str {\n static capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1)\n }\n}\n","import WatchPrimitiveProperties from '../utils/WatchPrimitiveProperties'\nimport { Str } from './string'\n\nexport function getPropsValues(vueInst, props) {\n return Object.keys(props).reduce((acc, prop) => {\n if (vueInst[prop] !== undefined) {\n acc[prop] = vueInst[prop]\n }\n return acc\n }, {})\n}\n\n/**\n * Binds the properties defined in props to the google maps instance.\n * If the prop is an Object type, and we wish to track the properties\n * of the object (e.g. the lat and lng of a LatLng), then we do a deep\n * watch. For deep watch, we also prevent the _changed event from being\n * $emitted if the data source was external.\n */\nexport function bindProps(vueInst, googleMapsInst, props) {\n for (let attribute in props) {\n let { twoWay, type, trackProperties, noBind } = props[attribute]\n\n if (noBind) continue\n\n const setMethodName = 'set' + Str.capitalizeFirstLetter(attribute)\n const getMethodName = 'get' + Str.capitalizeFirstLetter(attribute)\n const eventName = attribute.toLowerCase() + '_changed'\n const initialValue = vueInst[attribute]\n\n if (typeof googleMapsInst[setMethodName] === 'undefined') {\n throw new Error(\n `${setMethodName} is not a method of (the Maps object corresponding to) ${vueInst.$options._componentTag}`\n )\n }\n\n // We need to avoid an endless\n // propChanged -> event $emitted -> propChanged -> event $emitted loop\n // although this may really be the user's responsibility\n if (type !== Object || !trackProperties) {\n // Track the object deeply\n vueInst.$watch(\n attribute,\n () => {\n const attributeValue = vueInst[attribute]\n\n googleMapsInst[setMethodName](attributeValue)\n },\n {\n immediate: typeof initialValue !== 'undefined',\n deep: type === Object,\n }\n )\n } else {\n WatchPrimitiveProperties(\n vueInst,\n trackProperties.map((prop) => `${attribute}.${prop}`),\n () => {\n googleMapsInst[setMethodName](vueInst[attribute])\n },\n vueInst[attribute] !== undefined\n )\n }\n\n if (twoWay && (vueInst.$gmapOptions.autobindAllEvents || vueInst.$attrs[eventName])) {\n googleMapsInst.addListener(eventName, () => {\n // eslint-disable-line no-unused-vars\n vueInst.$emit(eventName, googleMapsInst[getMethodName]())\n })\n }\n }\n}\n","/**\n * @class MapElementMixin\n *\n * Extends components to include the following fields:\n *\n * @property $map The Google map (valid only after the promise returns)\n *\n *\n * */\nexport default {\n inject: {\n $mapPromise: { default: 'abcdef' },\n },\n\n provide() {\n // Note: although this mixin is not \"providing\" anything,\n // components' expect the `$map` property to be present on the component.\n // In order for that to happen, this mixin must intercept the $mapPromise\n // .then(() =>) first before its component does so.\n //\n // Since a provide() on a mixin is executed before a provide() on the\n // component, putting this code in provide() ensures that the $map is\n // already set by the time the\n // component's provide() is called.\n this.$mapPromise.then((map) => {\n this.$map = map\n })\n\n return {}\n },\n}\n","import bindEvents from '../utils/bindEvents.js'\nimport { bindProps, getPropsValues } from '../utils/bindProps.js'\nimport MapElementMixin from './mapElementMixin'\n\n/**\n *\n * @param {Object} options\n * @param {Object} options.mappedProps - Definitions of props\n * @param {Object} options.mappedProps.PROP.type - Value type\n * @param {Boolean} options.mappedProps.PROP.twoWay\n * - Whether the prop has a corresponding PROP_changed\n * event\n * @param {Boolean} options.mappedProps.PROP.noBind\n * - If true, do not apply the default bindProps / bindEvents.\n * However it will still be added to the list of component props\n * @param {Object} options.props - Regular Vue-style props.\n * Note: must be in the Object form because it will be\n * merged with the `mappedProps`\n *\n * @param {Object} options.events - Google Maps API events\n * that are not bound to a corresponding prop\n * @param {String} options.name - e.g. `polyline`\n * @param {=> String} options.ctr - constructor, e.g.\n * `google.maps.Polyline`. However, since this is not\n * generally available during library load, this becomes\n * a function instead, e.g. () => google.maps.Polyline\n * which will be called only after the API has been loaded\n * @param {(MappedProps, OtherVueProps) => Array} options.ctrArgs -\n * If the constructor in `ctr` needs to be called with\n * arguments other than a single `options` object, e.g. for\n * GroundOverlay, we call `new GroundOverlay(url, bounds, options)`\n * then pass in a function that returns the argument list as an array\n *\n * Otherwise, the constructor will be called with an `options` object,\n * with property and values merged from:\n *\n * 1. the `options` property, if any\n * 2. a `map` property with the Google Maps\n * 3. all the properties passed to the component in `mappedProps`\n * @param {Object => Any} options.beforeCreate -\n * Hook to modify the options passed to the initializer\n * @param {(options.ctr, Object) => Any} options.afterCreate -\n * Hook called when\n *\n */\nexport default function (options) {\n const { mappedProps, name, ctr, ctrArgs, events, beforeCreate, afterCreate, props, ...rest } =\n options\n\n const promiseName = `$${name}Promise`\n const instanceName = `$${name}Object`\n\n assert(!(rest.props instanceof Array), '`props` should be an object, not Array')\n\n return {\n ...(typeof GENERATE_DOC !== 'undefined' ? { $vgmOptions: options } : {}),\n mixins: [MapElementMixin],\n props: {\n ...props,\n ...mappedPropsToVueProps(mappedProps),\n },\n render() {\n return ''\n },\n provide() {\n const promise = this.$mapPromise\n .then((map) => {\n // Infowindow needs this to be immediately available\n this.$map = map\n\n // Initialize the maps with the given options\n const options = {\n ...this.options,\n map,\n ...getPropsValues(this, mappedProps),\n }\n delete options.options // delete the extra options\n\n if (beforeCreate) {\n const result = beforeCreate.bind(this)(options)\n\n if (result instanceof Promise) {\n return result.then(() => ({ options }))\n }\n }\n return { options }\n })\n .then(({ options }) => {\n const ConstructorObject = ctr()\n // https://stackoverflow.com/questions/1606797/use-of-apply-with-new-operator-is-this-possible\n this[instanceName] = ctrArgs\n ? new (Function.prototype.bind.call(\n ConstructorObject,\n null,\n ...ctrArgs(options, getPropsValues(this, props || {}))\n ))()\n : new ConstructorObject(options)\n\n bindProps(this, this[instanceName], mappedProps)\n bindEvents(this, this[instanceName], events)\n\n if (afterCreate) {\n afterCreate.bind(this)(this[instanceName])\n }\n return this[instanceName]\n })\n this[promiseName] = promise\n return { [promiseName]: promise }\n },\n unmounted() {\n // Note: not all Google Maps components support maps\n if (this[instanceName] && this[instanceName].setMap) {\n this[instanceName].setMap(null)\n }\n },\n ...rest,\n }\n}\n\nfunction assert(v, message) {\n if (!v) throw new Error(message)\n}\n\n/**\n * Strips out the extraneous properties we have in our\n * props definitions\n * @param {Object} props\n */\nexport function mappedPropsToVueProps(mappedProps) {\n return Object.entries(mappedProps)\n .map(([key, prop]) => {\n const value = {}\n\n if ('type' in prop) value.type = prop.type\n if ('default' in prop) value.default = prop.default\n if ('required' in prop) value.required = prop.required\n\n return [key, value]\n })\n .reduce((acc, [key, val]) => {\n acc[key] = val\n return acc\n }, {})\n}\n","import buildComponent from './build-component.js'\n\nconst props = {\n draggable: {\n type: Boolean,\n },\n editable: {\n type: Boolean,\n },\n options: {\n twoWay: false,\n type: Object,\n },\n path: {\n type: Array,\n twoWay: true,\n },\n}\n\nconst events = [\n 'click',\n 'dblclick',\n 'drag',\n 'dragend',\n 'dragstart',\n 'mousedown',\n 'mousemove',\n 'mouseout',\n 'mouseover',\n 'mouseup',\n 'rightclick',\n]\n\nexport default buildComponent({\n mappedProps: props,\n props: {\n deepWatch: {\n type: Boolean,\n default: false,\n },\n },\n events,\n\n name: 'polyline',\n ctr: () => google.maps.Polyline,\n emits: events,\n afterCreate(inst) {\n let clearEvents = () => {}\n\n events.forEach((event) => {\n inst.addListener(event, (payload) => {\n this.$emit(event, payload)\n })\n })\n\n this.$watch(\n 'path',\n (path) => {\n if (path) {\n clearEvents()\n\n this.$polylineObject.setPath(path)\n\n const mvcPath = this.$polylineObject.getPath()\n const eventListeners = []\n\n const updatePaths = () => {\n this.$emit('path_changed', this.$polylineObject.getPath())\n }\n\n eventListeners.push([mvcPath, mvcPath.addListener('insert_at', updatePaths)])\n eventListeners.push([mvcPath, mvcPath.addListener('remove_at', updatePaths)])\n eventListeners.push([mvcPath, mvcPath.addListener('set_at', updatePaths)])\n\n clearEvents = () => {\n eventListeners.map(\n (\n [obj, listenerHandle] // eslint-disable-line no-unused-vars\n ) => google.maps.event.removeListener(listenerHandle)\n )\n }\n }\n },\n {\n deep: this.deepWatch,\n immediate: true,\n }\n )\n },\n})\n","import buildComponent from './build-component.js'\n\nconst props = {\n draggable: {\n type: Boolean,\n },\n editable: {\n type: Boolean,\n },\n options: {\n type: Object,\n },\n path: {\n type: Array,\n twoWay: true,\n noBind: true,\n },\n paths: {\n type: Array,\n twoWay: true,\n noBind: true,\n },\n}\n\nconst events = [\n 'click',\n 'dblclick',\n 'drag',\n 'dragend',\n 'dragstart',\n 'mousedown',\n 'mousemove',\n 'mouseout',\n 'mouseover',\n 'mouseup',\n 'rightclick',\n 'paths_changed',\n]\n\nexport default buildComponent({\n props: {\n deepWatch: {\n type: Boolean,\n default: false,\n },\n },\n events,\n mappedProps: props,\n name: 'polygon',\n ctr: () => google.maps.Polygon,\n emits: events,\n beforeCreate(options) {\n if (!options.path) delete options.path\n if (!options.paths) delete options.paths\n },\n\n afterCreate(inst) {\n let clearEvents = () => {}\n events.forEach((event) => {\n inst.addListener(event, (payload) => {\n this.$emit(event, payload)\n })\n })\n\n // Watch paths, on our own, because we do not want to set either when it is\n // empty\n this.$watch(\n 'paths',\n (paths) => {\n if (paths) {\n clearEvents()\n\n inst.setPaths(paths)\n\n const updatePaths = () => {\n this.$emit('paths_changed', inst.getPaths())\n }\n const eventListeners = []\n\n const mvcArray = inst.getPaths()\n for (let i = 0; i < mvcArray.getLength(); i++) {\n let mvcPath = mvcArray.getAt(i)\n eventListeners.push([mvcPath, mvcPath.addListener('insert_at', updatePaths)])\n eventListeners.push([mvcPath, mvcPath.addListener('remove_at', updatePaths)])\n eventListeners.push([mvcPath, mvcPath.addListener('set_at', updatePaths)])\n }\n eventListeners.push([mvcArray, mvcArray.addListener('insert_at', updatePaths)])\n eventListeners.push([mvcArray, mvcArray.addListener('remove_at', updatePaths)])\n eventListeners.push([mvcArray, mvcArray.addListener('set_at', updatePaths)])\n\n clearEvents = () => {\n eventListeners.map(\n (\n [obj, listenerHandle] // eslint-disable-line no-unused-vars\n ) => google.maps.event.removeListener(listenerHandle)\n )\n }\n }\n },\n {\n deep: this.deepWatch,\n immediate: true,\n }\n )\n\n this.$watch(\n 'path',\n (path) => {\n if (path) {\n clearEvents()\n\n inst.setPaths(path)\n\n const mvcPath = inst.getPath()\n const eventListeners = []\n\n const updatePaths = () => {\n this.$emit('path_changed', inst.getPath())\n }\n\n eventListeners.push([mvcPath, mvcPath.addListener('insert_at', updatePaths)])\n eventListeners.push([mvcPath, mvcPath.addListener('remove_at', updatePaths)])\n eventListeners.push([mvcPath, mvcPath.addListener('set_at', updatePaths)])\n\n clearEvents = () => {\n eventListeners.map(\n (\n [obj, listenerHandle] // eslint-disable-line no-unused-vars\n ) => google.maps.event.removeListener(listenerHandle)\n )\n }\n }\n },\n {\n deep: this.deepWatch,\n immediate: true,\n }\n )\n },\n})\n","import buildComponent from './build-component'\n\nconst props = {\n center: {\n type: Object,\n twoWay: true,\n required: true,\n },\n radius: {\n type: Number,\n twoWay: true,\n },\n draggable: {\n type: Boolean,\n default: false,\n },\n editable: {\n type: Boolean,\n default: false,\n },\n options: {\n type: Object,\n twoWay: false,\n },\n}\n\nconst events = [\n 'click',\n 'dblclick',\n 'drag',\n 'dragend',\n 'dragstart',\n 'mousedown',\n 'mousemove',\n 'mouseout',\n 'mouseover',\n 'mouseup',\n 'rightclick',\n]\n\nexport default buildComponent({\n mappedProps: props,\n name: 'circle',\n ctr: () => google.maps.Circle,\n events,\n emits: events,\n afterCreate(inst) {\n events.forEach((event) => {\n inst.addListener(event, (payload) => {\n this.$emit(event, payload)\n })\n })\n },\n})\n","import buildComponent from './build-component.js'\n\nconst props = {\n bounds: {\n type: Object,\n twoWay: true,\n },\n draggable: {\n type: Boolean,\n default: false,\n },\n editable: {\n type: Boolean,\n default: false,\n },\n options: {\n type: Object,\n twoWay: false,\n },\n}\n\nconst events = [\n 'click',\n 'dblclick',\n 'drag',\n 'dragend',\n 'dragstart',\n 'mousedown',\n 'mousemove',\n 'mouseout',\n 'mouseover',\n 'mouseup',\n 'rightclick',\n]\n\nexport default buildComponent({\n mappedProps: props,\n name: 'rectangle',\n ctr: () => google.maps.Rectangle,\n events,\n emits: events,\n afterCreate(inst) {\n events.forEach((event) => {\n inst.addListener(event, (payload) => {\n this.$emit(event, payload)\n })\n })\n },\n})\n","\n\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","\nconst ARRAY_TYPES = [\n Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array,\n Int32Array, Uint32Array, Float32Array, Float64Array\n];\n\n/** @typedef {Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor} TypedArrayConstructor */\n\nconst VERSION = 1; // serialized format version\nconst HEADER_SIZE = 8;\n\nexport default class KDBush {\n\n /**\n * Creates an index from raw `ArrayBuffer` data.\n * @param {ArrayBuffer} data\n */\n static from(data) {\n if (!(data instanceof ArrayBuffer)) {\n throw new Error('Data must be an instance of ArrayBuffer.');\n }\n const [magic, versionAndType] = new Uint8Array(data, 0, 2);\n if (magic !== 0xdb) {\n throw new Error('Data does not appear to be in a KDBush format.');\n }\n const version = versionAndType >> 4;\n if (version !== VERSION) {\n throw new Error(`Got v${version} data when expected v${VERSION}.`);\n }\n const ArrayType = ARRAY_TYPES[versionAndType & 0x0f];\n if (!ArrayType) {\n throw new Error('Unrecognized array type.');\n }\n const [nodeSize] = new Uint16Array(data, 2, 1);\n const [numItems] = new Uint32Array(data, 4, 1);\n\n return new KDBush(numItems, nodeSize, ArrayType, data);\n }\n\n /**\n * Creates an index that will hold a given number of items.\n * @param {number} numItems\n * @param {number} [nodeSize=64] Size of the KD-tree node (64 by default).\n * @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).\n * @param {ArrayBuffer} [data] (For internal use only)\n */\n constructor(numItems, nodeSize = 64, ArrayType = Float64Array, data) {\n if (isNaN(numItems) || numItems < 0) throw new Error(`Unpexpected numItems value: ${numItems}.`);\n\n this.numItems = +numItems;\n this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);\n this.ArrayType = ArrayType;\n this.IndexArrayType = numItems < 65536 ? Uint16Array : Uint32Array;\n\n const arrayTypeIndex = ARRAY_TYPES.indexOf(this.ArrayType);\n const coordsByteSize = numItems * 2 * this.ArrayType.BYTES_PER_ELEMENT;\n const idsByteSize = numItems * this.IndexArrayType.BYTES_PER_ELEMENT;\n const padCoords = (8 - idsByteSize % 8) % 8;\n\n if (arrayTypeIndex < 0) {\n throw new Error(`Unexpected typed array class: ${ArrayType}.`);\n }\n\n if (data && (data instanceof ArrayBuffer)) { // reconstruct an index from a buffer\n this.data = data;\n this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);\n this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);\n this._pos = numItems * 2;\n this._finished = true;\n } else { // initialize a new index\n this.data = new ArrayBuffer(HEADER_SIZE + coordsByteSize + idsByteSize + padCoords);\n this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);\n this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);\n this._pos = 0;\n this._finished = false;\n\n // set header\n new Uint8Array(this.data, 0, 2).set([0xdb, (VERSION << 4) + arrayTypeIndex]);\n new Uint16Array(this.data, 2, 1)[0] = nodeSize;\n new Uint32Array(this.data, 4, 1)[0] = numItems;\n }\n }\n\n /**\n * Add a point to the index.\n * @param {number} x\n * @param {number} y\n * @returns {number} An incremental index associated with the added item (starting from `0`).\n */\n add(x, y) {\n const index = this._pos >> 1;\n this.ids[index] = index;\n this.coords[this._pos++] = x;\n this.coords[this._pos++] = y;\n return index;\n }\n\n /**\n * Perform indexing of the added points.\n */\n finish() {\n const numAdded = this._pos >> 1;\n if (numAdded !== this.numItems) {\n throw new Error(`Added ${numAdded} items when expected ${this.numItems}.`);\n }\n // kd-sort both arrays for efficient search\n sort(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0);\n\n this._finished = true;\n return this;\n }\n\n /**\n * Search the index for items within a given bounding box.\n * @param {number} minX\n * @param {number} minY\n * @param {number} maxX\n * @param {number} maxY\n * @returns {number[]} An array of indices correponding to the found items.\n */\n range(minX, minY, maxX, maxY) {\n if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');\n\n const {ids, coords, nodeSize} = this;\n const stack = [0, ids.length - 1, 0];\n const result = [];\n\n // recursively search for items in range in the kd-sorted arrays\n while (stack.length) {\n const axis = stack.pop() || 0;\n const right = stack.pop() || 0;\n const left = stack.pop() || 0;\n\n // if we reached \"tree node\", search linearly\n if (right - left <= nodeSize) {\n for (let i = left; i <= right; i++) {\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n // otherwise find the middle index\n const m = (left + right) >> 1;\n\n // include the middle item if it's in range\n const x = coords[2 * m];\n const y = coords[2 * m + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n // queue search in halves that intersect the query\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(1 - axis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(1 - axis);\n }\n }\n\n return result;\n }\n\n /**\n * Search the index for items within a given radius.\n * @param {number} qx\n * @param {number} qy\n * @param {number} r Query radius.\n * @returns {number[]} An array of indices correponding to the found items.\n */\n within(qx, qy, r) {\n if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');\n\n const {ids, coords, nodeSize} = this;\n const stack = [0, ids.length - 1, 0];\n const result = [];\n const r2 = r * r;\n\n // recursively search for items within radius in the kd-sorted arrays\n while (stack.length) {\n const axis = stack.pop() || 0;\n const right = stack.pop() || 0;\n const left = stack.pop() || 0;\n\n // if we reached \"tree node\", search linearly\n if (right - left <= nodeSize) {\n for (let i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n // otherwise find the middle index\n const m = (left + right) >> 1;\n\n // include the middle item if it's in range\n const x = coords[2 * m];\n const y = coords[2 * m + 1];\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n // queue search in halves that intersect the query\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(1 - axis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(1 - axis);\n }\n }\n\n return result;\n }\n}\n\n/**\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType} coords\n * @param {number} nodeSize\n * @param {number} left\n * @param {number} right\n * @param {number} axis\n */\nfunction sort(ids, coords, nodeSize, left, right, axis) {\n if (right - left <= nodeSize) return;\n\n const m = (left + right) >> 1; // middle index\n\n // sort ids and coords around the middle index so that the halves lie\n // either left/right or top/bottom correspondingly (taking turns)\n select(ids, coords, m, left, right, axis);\n\n // recursively kd-sort first half and second half on the opposite axis\n sort(ids, coords, nodeSize, left, m - 1, 1 - axis);\n sort(ids, coords, nodeSize, m + 1, right, 1 - axis);\n}\n\n/**\n * Custom Floyd-Rivest selection algorithm: sort ids and coords so that\n * [left..k-1] items are smaller than k-th item (on either x or y axis)\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType} coords\n * @param {number} k\n * @param {number} left\n * @param {number} right\n * @param {number} axis\n */\nfunction select(ids, coords, k, left, right, axis) {\n\n while (right > left) {\n if (right - left > 600) {\n const n = right - left + 1;\n const m = k - left + 1;\n const z = Math.log(n);\n const s = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, axis);\n }\n\n const t = coords[2 * k + axis];\n let i = left;\n let j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + axis] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + axis] < t) i++;\n while (coords[2 * j + axis] > t) j--;\n }\n\n if (coords[2 * left + axis] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\n/**\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType} coords\n * @param {number} i\n * @param {number} j\n */\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\n/**\n * @param {InstanceType} arr\n * @param {number} i\n * @param {number} j\n */\nfunction swap(arr, i, j) {\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n/**\n * @param {number} ax\n * @param {number} ay\n * @param {number} bx\n * @param {number} by\n */\nfunction sqDist(ax, ay, bx, by) {\n const dx = ax - bx;\n const dy = ay - by;\n return dx * dx + dy * dy;\n}\n","\nimport KDBush from 'kdbush';\n\nconst defaultOptions = {\n minZoom: 0, // min zoom to generate clusters on\n maxZoom: 16, // max zoom level to cluster the points on\n minPoints: 2, // minimum points to form a cluster\n radius: 40, // cluster radius in pixels\n extent: 512, // tile extent (radius is calculated relative to it)\n nodeSize: 64, // size of the KD-tree leaf node, affects performance\n log: false, // whether to log timing info\n\n // whether to generate numeric ids for input features (in vector tiles)\n generateId: false,\n\n // a reduce function for calculating custom cluster properties\n reduce: null, // (accumulated, props) => { accumulated.sum += props.sum; }\n\n // properties to use for individual points when running the reducer\n map: props => props // props => ({sum: props.my_value})\n};\n\nconst fround = Math.fround || (tmp => ((x) => { tmp[0] = +x; return tmp[0]; }))(new Float32Array(1));\n\nconst OFFSET_ZOOM = 2;\nconst OFFSET_ID = 3;\nconst OFFSET_PARENT = 4;\nconst OFFSET_NUM = 5;\nconst OFFSET_PROP = 6;\n\nexport default class Supercluster {\n constructor(options) {\n this.options = Object.assign(Object.create(defaultOptions), options);\n this.trees = new Array(this.options.maxZoom + 1);\n this.stride = this.options.reduce ? 7 : 6;\n this.clusterProps = [];\n }\n\n load(points) {\n const {log, minZoom, maxZoom} = this.options;\n\n if (log) console.time('total time');\n\n const timerId = `prepare ${ points.length } points`;\n if (log) console.time(timerId);\n\n this.points = points;\n\n // generate a cluster object for each point and index input points into a KD-tree\n const data = [];\n\n for (let i = 0; i < points.length; i++) {\n const p = points[i];\n if (!p.geometry) continue;\n\n const [lng, lat] = p.geometry.coordinates;\n const x = fround(lngX(lng));\n const y = fround(latY(lat));\n // store internal point/cluster data in flat numeric arrays for performance\n data.push(\n x, y, // projected point coordinates\n Infinity, // the last zoom the point was processed at\n i, // index of the source feature in the original input array\n -1, // parent cluster id\n 1 // number of points in a cluster\n );\n if (this.options.reduce) data.push(0); // noop\n }\n let tree = this.trees[maxZoom + 1] = this._createTree(data);\n\n if (log) console.timeEnd(timerId);\n\n // cluster points on max zoom, then cluster the results on previous zoom, etc.;\n // results in a cluster hierarchy across zoom levels\n for (let z = maxZoom; z >= minZoom; z--) {\n const now = +Date.now();\n\n // create a new set of clusters for the zoom and index them with a KD-tree\n tree = this.trees[z] = this._createTree(this._cluster(tree, z));\n\n if (log) console.log('z%d: %d clusters in %dms', z, tree.numItems, +Date.now() - now);\n }\n\n if (log) console.timeEnd('total time');\n\n return this;\n }\n\n getClusters(bbox, zoom) {\n let minLng = ((bbox[0] + 180) % 360 + 360) % 360 - 180;\n const minLat = Math.max(-90, Math.min(90, bbox[1]));\n let maxLng = bbox[2] === 180 ? 180 : ((bbox[2] + 180) % 360 + 360) % 360 - 180;\n const maxLat = Math.max(-90, Math.min(90, bbox[3]));\n\n if (bbox[2] - bbox[0] >= 360) {\n minLng = -180;\n maxLng = 180;\n } else if (minLng > maxLng) {\n const easternHem = this.getClusters([minLng, minLat, 180, maxLat], zoom);\n const westernHem = this.getClusters([-180, minLat, maxLng, maxLat], zoom);\n return easternHem.concat(westernHem);\n }\n\n const tree = this.trees[this._limitZoom(zoom)];\n const ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat));\n const data = tree.data;\n const clusters = [];\n for (const id of ids) {\n const k = this.stride * id;\n clusters.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);\n }\n return clusters;\n }\n\n getChildren(clusterId) {\n const originId = this._getOriginId(clusterId);\n const originZoom = this._getOriginZoom(clusterId);\n const errorMsg = 'No cluster with the specified id.';\n\n const tree = this.trees[originZoom];\n if (!tree) throw new Error(errorMsg);\n\n const data = tree.data;\n if (originId * this.stride >= data.length) throw new Error(errorMsg);\n\n const r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1));\n const x = data[originId * this.stride];\n const y = data[originId * this.stride + 1];\n const ids = tree.within(x, y, r);\n const children = [];\n for (const id of ids) {\n const k = id * this.stride;\n if (data[k + OFFSET_PARENT] === clusterId) {\n children.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);\n }\n }\n\n if (children.length === 0) throw new Error(errorMsg);\n\n return children;\n }\n\n getLeaves(clusterId, limit, offset) {\n limit = limit || 10;\n offset = offset || 0;\n\n const leaves = [];\n this._appendLeaves(leaves, clusterId, limit, offset, 0);\n\n return leaves;\n }\n\n getTile(z, x, y) {\n const tree = this.trees[this._limitZoom(z)];\n const z2 = Math.pow(2, z);\n const {extent, radius} = this.options;\n const p = radius / extent;\n const top = (y - p) / z2;\n const bottom = (y + 1 + p) / z2;\n\n const tile = {\n features: []\n };\n\n this._addTileFeatures(\n tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom),\n tree.data, x, y, z2, tile);\n\n if (x === 0) {\n this._addTileFeatures(\n tree.range(1 - p / z2, top, 1, bottom),\n tree.data, z2, y, z2, tile);\n }\n if (x === z2 - 1) {\n this._addTileFeatures(\n tree.range(0, top, p / z2, bottom),\n tree.data, -1, y, z2, tile);\n }\n\n return tile.features.length ? tile : null;\n }\n\n getClusterExpansionZoom(clusterId) {\n let expansionZoom = this._getOriginZoom(clusterId) - 1;\n while (expansionZoom <= this.options.maxZoom) {\n const children = this.getChildren(clusterId);\n expansionZoom++;\n if (children.length !== 1) break;\n clusterId = children[0].properties.cluster_id;\n }\n return expansionZoom;\n }\n\n _appendLeaves(result, clusterId, limit, offset, skipped) {\n const children = this.getChildren(clusterId);\n\n for (const child of children) {\n const props = child.properties;\n\n if (props && props.cluster) {\n if (skipped + props.point_count <= offset) {\n // skip the whole cluster\n skipped += props.point_count;\n } else {\n // enter the cluster\n skipped = this._appendLeaves(result, props.cluster_id, limit, offset, skipped);\n // exit the cluster\n }\n } else if (skipped < offset) {\n // skip a single point\n skipped++;\n } else {\n // add a single point\n result.push(child);\n }\n if (result.length === limit) break;\n }\n\n return skipped;\n }\n\n _createTree(data) {\n const tree = new KDBush(data.length / this.stride | 0, this.options.nodeSize, Float32Array);\n for (let i = 0; i < data.length; i += this.stride) tree.add(data[i], data[i + 1]);\n tree.finish();\n tree.data = data;\n return tree;\n }\n\n _addTileFeatures(ids, data, x, y, z2, tile) {\n for (const i of ids) {\n const k = i * this.stride;\n const isCluster = data[k + OFFSET_NUM] > 1;\n\n let tags, px, py;\n if (isCluster) {\n tags = getClusterProperties(data, k, this.clusterProps);\n px = data[k];\n py = data[k + 1];\n } else {\n const p = this.points[data[k + OFFSET_ID]];\n tags = p.properties;\n const [lng, lat] = p.geometry.coordinates;\n px = lngX(lng);\n py = latY(lat);\n }\n\n const f = {\n type: 1,\n geometry: [[\n Math.round(this.options.extent * (px * z2 - x)),\n Math.round(this.options.extent * (py * z2 - y))\n ]],\n tags\n };\n\n // assign id\n let id;\n if (isCluster || this.options.generateId) {\n // optionally generate id for points\n id = data[k + OFFSET_ID];\n } else {\n // keep id if already assigned\n id = this.points[data[k + OFFSET_ID]].id;\n }\n\n if (id !== undefined) f.id = id;\n\n tile.features.push(f);\n }\n }\n\n _limitZoom(z) {\n return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1));\n }\n\n _cluster(tree, zoom) {\n const {radius, extent, reduce, minPoints} = this.options;\n const r = radius / (extent * Math.pow(2, zoom));\n const data = tree.data;\n const nextData = [];\n const stride = this.stride;\n\n // loop through each point\n for (let i = 0; i < data.length; i += stride) {\n // if we've already visited the point at this zoom level, skip it\n if (data[i + OFFSET_ZOOM] <= zoom) continue;\n data[i + OFFSET_ZOOM] = zoom;\n\n // find all nearby points\n const x = data[i];\n const y = data[i + 1];\n const neighborIds = tree.within(data[i], data[i + 1], r);\n\n const numPointsOrigin = data[i + OFFSET_NUM];\n let numPoints = numPointsOrigin;\n\n // count the number of points in a potential cluster\n for (const neighborId of neighborIds) {\n const k = neighborId * stride;\n // filter out neighbors that are already processed\n if (data[k + OFFSET_ZOOM] > zoom) numPoints += data[k + OFFSET_NUM];\n }\n\n // if there were neighbors to merge, and there are enough points to form a cluster\n if (numPoints > numPointsOrigin && numPoints >= minPoints) {\n let wx = x * numPointsOrigin;\n let wy = y * numPointsOrigin;\n\n let clusterProperties;\n let clusterPropIndex = -1;\n\n // encode both zoom and point index on which the cluster originated -- offset by total length of features\n const id = ((i / stride | 0) << 5) + (zoom + 1) + this.points.length;\n\n for (const neighborId of neighborIds) {\n const k = neighborId * stride;\n\n if (data[k + OFFSET_ZOOM] <= zoom) continue;\n data[k + OFFSET_ZOOM] = zoom; // save the zoom (so it doesn't get processed twice)\n\n const numPoints2 = data[k + OFFSET_NUM];\n wx += data[k] * numPoints2; // accumulate coordinates for calculating weighted center\n wy += data[k + 1] * numPoints2;\n\n data[k + OFFSET_PARENT] = id;\n\n if (reduce) {\n if (!clusterProperties) {\n clusterProperties = this._map(data, i, true);\n clusterPropIndex = this.clusterProps.length;\n this.clusterProps.push(clusterProperties);\n }\n reduce(clusterProperties, this._map(data, k));\n }\n }\n\n data[i + OFFSET_PARENT] = id;\n nextData.push(wx / numPoints, wy / numPoints, Infinity, id, -1, numPoints);\n if (reduce) nextData.push(clusterPropIndex);\n\n } else { // left points as unclustered\n for (let j = 0; j < stride; j++) nextData.push(data[i + j]);\n\n if (numPoints > 1) {\n for (const neighborId of neighborIds) {\n const k = neighborId * stride;\n if (data[k + OFFSET_ZOOM] <= zoom) continue;\n data[k + OFFSET_ZOOM] = zoom;\n for (let j = 0; j < stride; j++) nextData.push(data[k + j]);\n }\n }\n }\n }\n\n return nextData;\n }\n\n // get index of the point from which the cluster originated\n _getOriginId(clusterId) {\n return (clusterId - this.points.length) >> 5;\n }\n\n // get zoom of the point from which the cluster originated\n _getOriginZoom(clusterId) {\n return (clusterId - this.points.length) % 32;\n }\n\n _map(data, i, clone) {\n if (data[i + OFFSET_NUM] > 1) {\n const props = this.clusterProps[data[i + OFFSET_PROP]];\n return clone ? Object.assign({}, props) : props;\n }\n const original = this.points[data[i + OFFSET_ID]].properties;\n const result = this.options.map(original);\n return clone && result === original ? Object.assign({}, result) : result;\n }\n}\n\nfunction getClusterJSON(data, i, clusterProps) {\n return {\n type: 'Feature',\n id: data[i + OFFSET_ID],\n properties: getClusterProperties(data, i, clusterProps),\n geometry: {\n type: 'Point',\n coordinates: [xLng(data[i]), yLat(data[i + 1])]\n }\n };\n}\n\nfunction getClusterProperties(data, i, clusterProps) {\n const count = data[i + OFFSET_NUM];\n const abbrev =\n count >= 10000 ? `${Math.round(count / 1000) }k` :\n count >= 1000 ? `${Math.round(count / 100) / 10 }k` : count;\n const propIndex = data[i + OFFSET_PROP];\n const properties = propIndex === -1 ? {} : Object.assign({}, clusterProps[propIndex]);\n return Object.assign(properties, {\n cluster: true,\n cluster_id: data[i + OFFSET_ID],\n point_count: count,\n point_count_abbreviated: abbrev\n });\n}\n\n// longitude/latitude to spherical mercator in [0..1] range\nfunction lngX(lng) {\n return lng / 360 + 0.5;\n}\nfunction latY(lat) {\n const sin = Math.sin(lat * Math.PI / 180);\n const y = (0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI);\n return y < 0 ? 0 : y > 1 ? 1 : y;\n}\n\n// spherical mercator to longitude/latitude\nfunction xLng(x) {\n return (x - 0.5) * 360;\n}\nfunction yLat(y) {\n const y2 = (180 - y * 360) * Math.PI / 180;\n return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90;\n}\n","import equal from 'fast-deep-equal';\nimport SuperCluster from 'supercluster';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\n\n/**\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 * util class that creates a common set of convenience functions to wrap\n * shared behavior of Advanced Markers and Markers.\n */\nclass MarkerUtils {\n static isAdvancedMarkerAvailable(map) {\n return (google.maps.marker &&\n map.getMapCapabilities().isAdvancedMarkersAvailable === true);\n }\n static isAdvancedMarker(marker) {\n return (google.maps.marker &&\n marker instanceof google.maps.marker.AdvancedMarkerElement);\n }\n static setMap(marker, map) {\n if (this.isAdvancedMarker(marker)) {\n marker.map = map;\n }\n else {\n marker.setMap(map);\n }\n }\n static getPosition(marker) {\n // SuperClusterAlgorithm.calculate expects a LatLng instance so we fake it for Adv Markers\n if (this.isAdvancedMarker(marker)) {\n if (marker.position) {\n if (marker.position instanceof google.maps.LatLng) {\n return marker.position;\n }\n // since we can't cast to LatLngLiteral for reasons =(\n if (marker.position.lat && marker.position.lng) {\n return new google.maps.LatLng(marker.position.lat, marker.position.lng);\n }\n }\n return new google.maps.LatLng(null);\n }\n return marker.getPosition();\n }\n static getVisible(marker) {\n if (this.isAdvancedMarker(marker)) {\n /**\n * Always return true for Advanced Markers because the clusterer\n * uses getVisible as a way to count legacy markers not as an actual\n * indicator of visibility for some reason. Even when markers are hidden\n * Marker.getVisible returns `true` and this is used to set the marker count\n * on the cluster. See the behavior of Cluster.count\n */\n return true;\n }\n return marker.getVisible();\n }\n}\n\n/**\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 */\nclass Cluster {\n constructor({ markers, position }) {\n this.markers = markers;\n if (position) {\n if (position instanceof google.maps.LatLng) {\n this._position = position;\n }\n else {\n this._position = new google.maps.LatLng(position);\n }\n }\n }\n get bounds() {\n if (this.markers.length === 0 && !this._position) {\n return;\n }\n const bounds = new google.maps.LatLngBounds(this._position, this._position);\n for (const marker of this.markers) {\n bounds.extend(MarkerUtils.getPosition(marker));\n }\n return bounds;\n }\n get position() {\n return this._position || this.bounds.getCenter();\n }\n /**\n * Get the count of **visible** markers.\n */\n get count() {\n return this.markers.filter((m) => MarkerUtils.getVisible(m)).length;\n }\n /**\n * Add a marker to the cluster.\n */\n push(marker) {\n this.markers.push(marker);\n }\n /**\n * Cleanup references and remove marker from map.\n */\n delete() {\n if (this.marker) {\n MarkerUtils.setMap(this.marker, null);\n this.marker = undefined;\n }\n this.markers.length = 0;\n }\n}\n\n/**\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 * Returns the markers visible in a padded map viewport\n *\n * @param map\n * @param mapCanvasProjection\n * @param markers The list of marker to filter\n * @param viewportPaddingPixels The padding in pixel\n * @returns The list of markers in the padded viewport\n */\nconst filterMarkersToPaddedViewport = (map, mapCanvasProjection, markers, viewportPaddingPixels) => {\n const extendedMapBounds = extendBoundsToPaddedViewport(map.getBounds(), mapCanvasProjection, viewportPaddingPixels);\n return markers.filter((marker) => extendedMapBounds.contains(MarkerUtils.getPosition(marker)));\n};\n/**\n * Extends a bounds by a number of pixels in each direction\n */\nconst extendBoundsToPaddedViewport = (bounds, projection, numPixels) => {\n const { northEast, southWest } = latLngBoundsToPixelBounds(bounds, projection);\n const extendedPixelBounds = extendPixelBounds({ northEast, southWest }, numPixels);\n return pixelBoundsToLatLngBounds(extendedPixelBounds, projection);\n};\n/**\n * Gets the extended bounds as a bbox [westLng, southLat, eastLng, northLat]\n */\nconst getPaddedViewport = (bounds, projection, pixels) => {\n const extended = extendBoundsToPaddedViewport(bounds, projection, pixels);\n const ne = extended.getNorthEast();\n const sw = extended.getSouthWest();\n return [sw.lng(), sw.lat(), ne.lng(), ne.lat()];\n};\n/**\n * Returns the distance between 2 positions.\n *\n * @hidden\n */\nconst distanceBetweenPoints = (p1, p2) => {\n const R = 6371; // Radius of the Earth in km\n const dLat = ((p2.lat - p1.lat) * Math.PI) / 180;\n const dLon = ((p2.lng - p1.lng) * Math.PI) / 180;\n const sinDLat = Math.sin(dLat / 2);\n const sinDLon = Math.sin(dLon / 2);\n const a = sinDLat * sinDLat +\n Math.cos((p1.lat * Math.PI) / 180) *\n Math.cos((p2.lat * Math.PI) / 180) *\n sinDLon *\n sinDLon;\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n return R * c;\n};\n/**\n * Converts a LatLng bound to pixels.\n *\n * @hidden\n */\nconst latLngBoundsToPixelBounds = (bounds, projection) => {\n return {\n northEast: projection.fromLatLngToDivPixel(bounds.getNorthEast()),\n southWest: projection.fromLatLngToDivPixel(bounds.getSouthWest()),\n };\n};\n/**\n * Extends a pixel bounds by numPixels in all directions.\n *\n * @hidden\n */\nconst extendPixelBounds = ({ northEast, southWest }, numPixels) => {\n northEast.x += numPixels;\n northEast.y -= numPixels;\n southWest.x -= numPixels;\n southWest.y += numPixels;\n return { northEast, southWest };\n};\n/**\n * @hidden\n */\nconst pixelBoundsToLatLngBounds = ({ northEast, southWest }, projection) => {\n const sw = projection.fromDivPixelToLatLng(southWest);\n const ne = projection.fromDivPixelToLatLng(northEast);\n return new google.maps.LatLngBounds(sw, ne);\n};\n\n/**\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 * @hidden\n */\nclass AbstractAlgorithm {\n constructor({ maxZoom = 16 }) {\n this.maxZoom = maxZoom;\n }\n /**\n * Helper function to bypass clustering based upon some map state such as\n * zoom, number of markers, etc.\n *\n * ```typescript\n * cluster({markers, map}: AlgorithmInput): Cluster[] {\n * if (shouldBypassClustering(map)) {\n * return this.noop({markers})\n * }\n * }\n * ```\n */\n noop({ markers, }) {\n return noop(markers);\n }\n}\n/**\n * Abstract viewport algorithm proves a class to filter markers by a padded\n * viewport. This is a common optimization.\n *\n * @hidden\n */\nclass AbstractViewportAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var { viewportPadding = 60 } = _a, options = __rest(_a, [\"viewportPadding\"]);\n super(options);\n this.viewportPadding = 60;\n this.viewportPadding = viewportPadding;\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n if (map.getZoom() >= this.maxZoom) {\n return {\n clusters: this.noop({\n markers,\n }),\n changed: false,\n };\n }\n return {\n clusters: this.cluster({\n markers: filterMarkersToPaddedViewport(map, mapCanvasProjection, markers, this.viewportPadding),\n map,\n mapCanvasProjection,\n }),\n };\n }\n}\n/**\n * @hidden\n */\nconst noop = (markers) => {\n const clusters = markers.map((marker) => new Cluster({\n position: MarkerUtils.getPosition(marker),\n markers: [marker],\n }));\n return clusters;\n};\n\n/**\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 default Grid algorithm historically used in Google Maps marker\n * clustering.\n *\n * The Grid algorithm does not implement caching and markers may flash as the\n * viewport changes. Instead use {@link SuperClusterAlgorithm}.\n */\nclass GridAlgorithm extends AbstractViewportAlgorithm {\n constructor(_a) {\n var { maxDistance = 40000, gridSize = 40 } = _a, options = __rest(_a, [\"maxDistance\", \"gridSize\"]);\n super(options);\n this.clusters = [];\n this.state = { zoom: -1 };\n this.maxDistance = maxDistance;\n this.gridSize = gridSize;\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n const state = { zoom: map.getZoom() };\n let changed = false;\n if (this.state.zoom >= this.maxZoom && state.zoom >= this.maxZoom) ;\n else {\n changed = !equal(this.state, state);\n }\n this.state = state;\n if (map.getZoom() >= this.maxZoom) {\n return {\n clusters: this.noop({\n markers,\n }),\n changed,\n };\n }\n return {\n clusters: this.cluster({\n markers: filterMarkersToPaddedViewport(map, mapCanvasProjection, markers, this.viewportPadding),\n map,\n mapCanvasProjection,\n }),\n };\n }\n cluster({ markers, map, mapCanvasProjection, }) {\n this.clusters = [];\n markers.forEach((marker) => {\n this.addToClosestCluster(marker, map, mapCanvasProjection);\n });\n return this.clusters;\n }\n addToClosestCluster(marker, map, projection) {\n let maxDistance = this.maxDistance; // Some large number\n let cluster = null;\n for (let i = 0; i < this.clusters.length; i++) {\n const candidate = this.clusters[i];\n const distance = distanceBetweenPoints(candidate.bounds.getCenter().toJSON(), MarkerUtils.getPosition(marker).toJSON());\n if (distance < maxDistance) {\n maxDistance = distance;\n cluster = candidate;\n }\n }\n if (cluster &&\n extendBoundsToPaddedViewport(cluster.bounds, projection, this.gridSize).contains(MarkerUtils.getPosition(marker))) {\n cluster.push(marker);\n }\n else {\n const cluster = new Cluster({ markers: [marker] });\n this.clusters.push(cluster);\n }\n }\n}\n\n/**\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 * Noop algorithm does not generate any clusters or filter markers by the an extended viewport.\n */\nclass NoopAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var options = __rest(_a, []);\n super(options);\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n return {\n clusters: this.cluster({ markers, map, mapCanvasProjection }),\n changed: false,\n };\n }\n cluster(input) {\n return this.noop(input);\n }\n}\n\n/**\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 * A very fast JavaScript algorithm for geospatial point clustering using KD trees.\n *\n * @see https://www.npmjs.com/package/supercluster for more information on options.\n */\nclass SuperClusterAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var { maxZoom, radius = 60 } = _a, options = __rest(_a, [\"maxZoom\", \"radius\"]);\n super({ maxZoom });\n this.state = { zoom: -1 };\n this.superCluster = new SuperCluster(Object.assign({ maxZoom: this.maxZoom, radius }, options));\n }\n calculate(input) {\n let changed = false;\n const state = { zoom: input.map.getZoom() };\n if (!equal(input.markers, this.markers)) {\n changed = true;\n // TODO use proxy to avoid copy?\n this.markers = [...input.markers];\n const points = this.markers.map((marker) => {\n const position = MarkerUtils.getPosition(marker);\n const coordinates = [position.lng(), position.lat()];\n return {\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates,\n },\n properties: { marker },\n };\n });\n this.superCluster.load(points);\n }\n if (!changed) {\n if (this.state.zoom <= this.maxZoom || state.zoom <= this.maxZoom) {\n changed = !equal(this.state, state);\n }\n }\n this.state = state;\n if (changed) {\n this.clusters = this.cluster(input);\n }\n return { clusters: this.clusters, changed };\n }\n cluster({ map }) {\n return this.superCluster\n .getClusters([-180, -90, 180, 90], Math.round(map.getZoom()))\n .map((feature) => this.transformCluster(feature));\n }\n transformCluster({ geometry: { coordinates: [lng, lat], }, properties, }) {\n if (properties.cluster) {\n return new Cluster({\n markers: this.superCluster\n .getLeaves(properties.cluster_id, Infinity)\n .map((leaf) => leaf.properties.marker),\n position: { lat, lng },\n });\n }\n const marker = properties.marker;\n return new Cluster({\n markers: [marker],\n position: MarkerUtils.getPosition(marker),\n });\n }\n}\n\n/**\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 * A very fast JavaScript algorithm for geospatial point clustering using KD trees.\n *\n * @see https://www.npmjs.com/package/supercluster for more information on options.\n */\nclass SuperClusterViewportAlgorithm extends AbstractViewportAlgorithm {\n constructor(_a) {\n var { maxZoom, radius = 60, viewportPadding = 60 } = _a, options = __rest(_a, [\"maxZoom\", \"radius\", \"viewportPadding\"]);\n super({ maxZoom, viewportPadding });\n this.superCluster = new SuperCluster(Object.assign({ maxZoom: this.maxZoom, radius }, options));\n this.state = { zoom: -1, view: [0, 0, 0, 0] };\n }\n calculate(input) {\n const state = {\n zoom: Math.round(input.map.getZoom()),\n view: getPaddedViewport(input.map.getBounds(), input.mapCanvasProjection, this.viewportPadding),\n };\n let changed = !equal(this.state, state);\n if (!equal(input.markers, this.markers)) {\n changed = true;\n // TODO use proxy to avoid copy?\n this.markers = [...input.markers];\n const points = this.markers.map((marker) => {\n const position = MarkerUtils.getPosition(marker);\n const coordinates = [position.lng(), position.lat()];\n return {\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates,\n },\n properties: { marker },\n };\n });\n this.superCluster.load(points);\n }\n if (changed) {\n this.clusters = this.cluster(input);\n this.state = state;\n }\n return { clusters: this.clusters, changed };\n }\n cluster({ map, mapCanvasProjection }) {\n /* recalculate new state because we can't use the cached version. */\n const state = {\n zoom: Math.round(map.getZoom()),\n view: getPaddedViewport(map.getBounds(), mapCanvasProjection, this.viewportPadding),\n };\n return this.superCluster\n .getClusters(state.view, state.zoom)\n .map((feature) => this.transformCluster(feature));\n }\n transformCluster({ geometry: { coordinates: [lng, lat], }, properties, }) {\n if (properties.cluster) {\n return new Cluster({\n markers: this.superCluster\n .getLeaves(properties.cluster_id, Infinity)\n .map((leaf) => leaf.properties.marker),\n position: { lat, lng },\n });\n }\n const marker = properties.marker;\n return new Cluster({\n markers: [marker],\n position: MarkerUtils.getPosition(marker),\n });\n }\n}\n\n/**\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 * Provides statistics on all clusters in the current render cycle for use in {@link Renderer.render}.\n */\nclass ClusterStats {\n constructor(markers, clusters) {\n this.markers = { sum: markers.length };\n const clusterMarkerCounts = clusters.map((a) => a.count);\n const clusterMarkerSum = clusterMarkerCounts.reduce((a, b) => a + b, 0);\n this.clusters = {\n count: clusters.length,\n markers: {\n mean: clusterMarkerSum / clusters.length,\n sum: clusterMarkerSum,\n min: Math.min(...clusterMarkerCounts),\n max: Math.max(...clusterMarkerCounts),\n },\n };\n }\n}\nclass DefaultRenderer {\n /**\n * The default render function for the library used by {@link MarkerClusterer}.\n *\n * Currently set to use the following:\n *\n * ```typescript\n * // change color if this cluster has more markers than the mean cluster\n * const color =\n * count > Math.max(10, stats.clusters.markers.mean)\n * ? \"#ff0000\"\n * : \"#0000ff\";\n *\n * // create svg url with fill color\n * const svg = window.btoa(`\n * \n * \n * \n * \n * \n * `);\n *\n * // create marker using svg icon\n * return new google.maps.Marker({\n * position,\n * icon: {\n * url: `data:image/svg+xml;base64,${svg}`,\n * scaledSize: new google.maps.Size(45, 45),\n * },\n * label: {\n * text: String(count),\n * color: \"rgba(255,255,255,0.9)\",\n * fontSize: \"12px\",\n * },\n * // adjust zIndex to be above other markers\n * zIndex: 1000 + count,\n * });\n * ```\n */\n render({ count, position }, stats, map) {\n // change color if this cluster has more markers than the mean cluster\n const color = count > Math.max(10, stats.clusters.markers.mean) ? \"#ff0000\" : \"#0000ff\";\n // create svg literal with fill color\n const svg = `\n\n\n\n${count}\n`;\n const title = `Cluster of ${count} markers`, \n // adjust zIndex to be above other markers\n zIndex = Number(google.maps.Marker.MAX_ZINDEX) + count;\n if (MarkerUtils.isAdvancedMarkerAvailable(map)) {\n // create cluster SVG element\n const parser = new DOMParser();\n const svgEl = parser.parseFromString(svg, \"image/svg+xml\").documentElement;\n svgEl.setAttribute(\"transform\", \"translate(0 25)\");\n const clusterOptions = {\n map,\n position,\n zIndex,\n title,\n content: svgEl,\n };\n return new google.maps.marker.AdvancedMarkerElement(clusterOptions);\n }\n const clusterOptions = {\n position,\n zIndex,\n title,\n icon: {\n url: `data:image/svg+xml;base64,${btoa(svg)}`,\n anchor: new google.maps.Point(25, 25),\n },\n };\n return new google.maps.Marker(clusterOptions);\n }\n}\n\n/**\n * Copyright 2019 Google LLC. All Rights Reserved.\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 * Extends an object's prototype by another's.\n *\n * @param type1 The Type to be extended.\n * @param type2 The Type to extend with.\n * @ignore\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction extend(type1, type2) {\n /* istanbul ignore next */\n // eslint-disable-next-line prefer-const\n for (let property in type2.prototype) {\n type1.prototype[property] = type2.prototype[property];\n }\n}\n/**\n * @ignore\n */\nclass OverlayViewSafe {\n constructor() {\n // MarkerClusterer implements google.maps.OverlayView interface. We use the\n // extend function to extend MarkerClusterer with google.maps.OverlayView\n // because it might not always be available when the code is defined so we\n // look for it at the last possible moment. If it doesn't exist now then\n // there is no point going ahead :)\n extend(OverlayViewSafe, google.maps.OverlayView);\n }\n}\n\n/**\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 */\nvar MarkerClustererEvents;\n(function (MarkerClustererEvents) {\n MarkerClustererEvents[\"CLUSTERING_BEGIN\"] = \"clusteringbegin\";\n MarkerClustererEvents[\"CLUSTERING_END\"] = \"clusteringend\";\n MarkerClustererEvents[\"CLUSTER_CLICK\"] = \"click\";\n})(MarkerClustererEvents || (MarkerClustererEvents = {}));\nconst defaultOnClusterClickHandler = (_, cluster, map) => {\n map.fitBounds(cluster.bounds);\n};\n/**\n * MarkerClusterer creates and manages per-zoom-level clusters for large amounts\n * of markers. See {@link MarkerClustererOptions} for more details.\n *\n */\nclass MarkerClusterer extends OverlayViewSafe {\n constructor({ map, markers = [], algorithmOptions = {}, algorithm = new SuperClusterAlgorithm(algorithmOptions), renderer = new DefaultRenderer(), onClusterClick = defaultOnClusterClickHandler, }) {\n super();\n this.markers = [...markers];\n this.clusters = [];\n this.algorithm = algorithm;\n this.renderer = renderer;\n this.onClusterClick = onClusterClick;\n if (map) {\n this.setMap(map);\n }\n }\n addMarker(marker, noDraw) {\n if (this.markers.includes(marker)) {\n return;\n }\n this.markers.push(marker);\n if (!noDraw) {\n this.render();\n }\n }\n addMarkers(markers, noDraw) {\n markers.forEach((marker) => {\n this.addMarker(marker, true);\n });\n if (!noDraw) {\n this.render();\n }\n }\n removeMarker(marker, noDraw) {\n const index = this.markers.indexOf(marker);\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false;\n }\n MarkerUtils.setMap(marker, null);\n this.markers.splice(index, 1); // Remove the marker from the list of managed markers\n if (!noDraw) {\n this.render();\n }\n return true;\n }\n removeMarkers(markers, noDraw) {\n let removed = false;\n markers.forEach((marker) => {\n removed = this.removeMarker(marker, true) || removed;\n });\n if (removed && !noDraw) {\n this.render();\n }\n return removed;\n }\n clearMarkers(noDraw) {\n this.markers.length = 0;\n if (!noDraw) {\n this.render();\n }\n }\n /**\n * Recalculates and draws all the marker clusters.\n */\n render() {\n const map = this.getMap();\n if (map instanceof google.maps.Map && map.getProjection()) {\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_BEGIN, this);\n const { clusters, changed } = this.algorithm.calculate({\n markers: this.markers,\n map,\n mapCanvasProjection: this.getProjection(),\n });\n // Allow algorithms to return flag on whether the clusters/markers have changed.\n if (changed || changed == undefined) {\n // Accumulate the markers of the clusters composed of a single marker.\n // Those clusters directly use the marker.\n // Clusters with more than one markers use a group marker generated by a renderer.\n const singleMarker = new Set();\n for (const cluster of clusters) {\n if (cluster.markers.length == 1) {\n singleMarker.add(cluster.markers[0]);\n }\n }\n const groupMarkers = [];\n // Iterate the clusters that are currently rendered.\n for (const cluster of this.clusters) {\n if (cluster.marker == null) {\n continue;\n }\n if (cluster.markers.length == 1) {\n if (!singleMarker.has(cluster.marker)) {\n // The marker:\n // - was previously rendered because it is from a cluster with 1 marker,\n // - should no more be rendered as it is not in singleMarker.\n MarkerUtils.setMap(cluster.marker, null);\n }\n }\n else {\n // Delay the removal of old group markers to avoid flickering.\n groupMarkers.push(cluster.marker);\n }\n }\n this.clusters = clusters;\n this.renderClusters();\n // Delayed removal of the markers of the former groups.\n requestAnimationFrame(() => groupMarkers.forEach((marker) => MarkerUtils.setMap(marker, null)));\n }\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_END, this);\n }\n }\n onAdd() {\n this.idleListener = this.getMap().addListener(\"idle\", this.render.bind(this));\n this.render();\n }\n onRemove() {\n google.maps.event.removeListener(this.idleListener);\n this.reset();\n }\n reset() {\n this.markers.forEach((marker) => MarkerUtils.setMap(marker, null));\n this.clusters.forEach((cluster) => cluster.delete());\n this.clusters = [];\n }\n renderClusters() {\n // Generate stats to pass to renderers.\n const stats = new ClusterStats(this.markers, this.clusters);\n const map = this.getMap();\n this.clusters.forEach((cluster) => {\n if (cluster.markers.length === 1) {\n cluster.marker = cluster.markers[0];\n }\n else {\n // Generate the marker to represent the group.\n cluster.marker = this.renderer.render(cluster, stats, map);\n // Make sure all individual markers are removed from the map.\n cluster.markers.forEach((marker) => MarkerUtils.setMap(marker, null));\n if (this.onClusterClick) {\n cluster.marker.addListener(\"click\", \n /* istanbul ignore next */\n (event) => {\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTER_CLICK, cluster);\n this.onClusterClick(event, cluster, map);\n });\n }\n }\n MarkerUtils.setMap(cluster.marker, map);\n });\n }\n}\n\nexport { AbstractAlgorithm, AbstractViewportAlgorithm, Cluster, ClusterStats, DefaultRenderer, GridAlgorithm, MarkerClusterer, MarkerClustererEvents, MarkerUtils, NoopAlgorithm, SuperClusterAlgorithm, SuperClusterViewportAlgorithm, defaultOnClusterClickHandler, distanceBetweenPoints, extendBoundsToPaddedViewport, extendPixelBounds, filterMarkersToPaddedViewport, getPaddedViewport, noop, pixelBoundsToLatLngBounds };\n//# sourceMappingURL=index.esm.js.map\n","\n\n","\n\n\n","/*\nMixin for objects that are mounted by Google Maps\nJavascript API.\n\nThese are objects that are sensitive to element resize\noperations so it exposes a property which accepts a bus\n\n*/\n\nexport default {\n props: ['resizeBus'],\n\n data() {\n return {\n _actualResizeBus: null,\n }\n },\n\n created() {\n if (typeof this.resizeBus === 'undefined') {\n this.$data._actualResizeBus = this.$gmapDefaultResizeBus\n } else {\n this.$data._actualResizeBus = this.resizeBus\n }\n },\n\n methods: {\n _resizeCallback() {\n this.resize()\n },\n isFunction(functionToCheck) {\n return functionToCheck && {}.toString.call(functionToCheck) === '[object Function]'\n },\n _delayedResizeCallback() {\n this.$nextTick(() => this._resizeCallback())\n },\n },\n\n watch: {\n resizeBus(newVal) {\n // eslint-disable-line no-unused-vars\n this.$data._actualResizeBus = newVal\n },\n '$data._actualResizeBus'(newVal, oldVal) {\n if (oldVal) {\n oldVal.$off('resize', this._delayedResizeCallback)\n }\n if (newVal) {\n // newVal.$on('resize', this._delayedResizeCallback)\n }\n },\n },\n\n unmounted() {\n if (this.$data._actualResizeBus && this.isFunction(this.$data._actualResizeBus.$off)) {\n this.$data._actualResizeBus.$off('resize', this._delayedResizeCallback)\n }\n },\n}\n","/**\n * When you have two-way bindings, but the actual bound value will not equal\n * the value you initially passed in, then to avoid an infinite loop you\n * need to increment a counter every time you pass in a value, decrement the\n * same counter every time the bound value changed, but only bubble up\n * the event when the counter is zero.\n *\nExample:\n\nLet's say DrawingRecognitionCanvas is a deep-learning backed canvas\nthat, when given the name of an object (e.g. 'dog'), draws a dog.\nBut whenever the drawing on it changes, it also sends back its interpretation\nof the image by way of the @newObjectRecognized event.\n\n\n\n\nnew TwoWayBindingWrapper((increment, decrement, shouldUpdate) => {\n this.$watch('identifiedObject', () => {\n // new object passed in\n increment()\n })\n this.$deepLearningBackend.on('drawingChanged', () => {\n recognizeObject(this.$deepLearningBackend)\n .then((object) => {\n decrement()\n if (shouldUpdate()) {\n this.$emit('newObjectRecognized', object.name)\n }\n })\n })\n})\n */\nexport default function TwoWayBindingWrapper(fn) {\n let counter = 0\n\n fn(\n () => {\n counter += 1\n },\n () => {\n counter = Math.max(0, counter - 1)\n },\n () => counter === 0\n )\n}\n","\n\n\n\n","import buildComponent from './build-component.js'\n\nconst props = {\n options: {\n type: Object,\n twoWay: false,\n default: () => {},\n },\n data: {\n type: Array,\n twoWay: true,\n },\n}\n\nconst events = []\n\nexport default buildComponent({\n mappedProps: props,\n name: 'heatmap',\n ctr: () => google.maps.visualization.HeatmapLayer,\n events,\n})\n","// This piece of code was orignally written by amirnissim and can be seen here\n// http://stackoverflow.com/a/11703018/2694653\n// This has been ported to Vanilla.js by GuillaumeLeclerc\nexport default (input) => {\n const _addEventListener = input.addEventListener ? input.addEventListener : input.attachEvent\n\n function addEventListenerWrapper(type, listener) {\n // Simulate a 'down arrow' keypress on hitting 'return' when no pac suggestion is selected,\n // and then trigger the original listener.\n if (type === 'keydown') {\n const origListener = listener\n listener = function (event) {\n const suggestionSelected = document.getElementsByClassName('pac-item-selected').length > 0\n if (event.which === 13 && !suggestionSelected) {\n const simulatedEvent = document.createEvent('Event')\n simulatedEvent.keyCode = 40\n simulatedEvent.which = 40\n origListener.apply(input, [simulatedEvent])\n }\n origListener.apply(input, [event])\n }\n }\n _addEventListener.apply(input, [type, listener])\n }\n\n input.addEventListener = addEventListenerWrapper\n input.attachEvent = addEventListenerWrapper\n}\n","\n\n\n","import lazy from './utils/lazyValue'\nimport { loadGMapApi } from './load-google-maps'\nimport { createApp } from 'vue'\nimport Polyline from './components/polyline'\nimport Polygon from './components/polygon'\nimport Circle from './components/circle'\nimport Rectangle from './components/rectangle'\nimport Marker from './components/marker.vue'\nimport GMapCluster from './components/cluster.vue'\nimport InfoWindow from './components/infoWindow.vue'\nimport Map from './components/map.vue'\nimport Heatmap from './components/heatmap'\nimport Autocomplete from './components/autocomplete.vue'\n\nimport MapElementMixin from './components/mapElementMixin'\nimport buildComponent from './components/build-component'\nimport MountableMixin from './utils/mountableMixin'\nimport { Env } from './utils/env'\nlet GMapApi = null\n\nexport {\n loadGMapApi,\n Marker,\n Polyline,\n Polygon,\n Circle,\n GMapCluster,\n Rectangle,\n InfoWindow,\n Map,\n MapElementMixin,\n Heatmap,\n buildComponent,\n Autocomplete,\n MountableMixin,\n}\n\nexport default function install(Vue, options) {\n options = {\n installComponents: true,\n autobindAllEvents: false,\n ...options,\n }\n\n GMapApi = createApp({\n data: function () {\n return { gmapApi: null }\n },\n })\n\n const defaultResizeBus = createApp()\n\n // Use a lazy to only load the API when\n // a VGM component is loaded\n let gmapApiPromiseLazy = makeGMapApiPromiseLazy(options)\n\n Vue.mixin({\n created() {\n this.$gmapDefaultResizeBus = defaultResizeBus\n this.$gmapOptions = options\n this.$gmapApiPromiseLazy = gmapApiPromiseLazy\n },\n })\n Vue.$gmapDefaultResizeBus = defaultResizeBus\n Vue.$gmapApiPromiseLazy = gmapApiPromiseLazy\n\n if (options.installComponents) {\n Vue.component('GMapMap', Map)\n Vue.component('GMapMarker', Marker)\n Vue.component('GMapInfoWindow', InfoWindow)\n Vue.component('GMapCluster', GMapCluster)\n Vue.component('GMapPolyline', Polyline)\n Vue.component('GMapPolygon', Polygon)\n Vue.component('GMapCircle', Circle)\n Vue.component('GMapRectangle', Rectangle)\n Vue.component('GMapAutocomplete', Autocomplete)\n Vue.component('GMapHeatmap', Heatmap)\n }\n}\n\nfunction makeGMapApiPromiseLazy(options) {\n // Things to do once the API is loaded\n function onApiLoaded() {\n GMapApi.gmapApi = {}\n return window.google\n }\n\n if (options.load) {\n // If library should load the API\n return lazy(() => {\n // Load the\n // This will only be evaluated once\n if (Env.isServer()) {\n return new Promise(() => {}).then(onApiLoaded)\n } else {\n return new Promise((resolve, reject) => {\n try {\n window['vueGoogleMapsInit'] = resolve\n loadGMapApi(options.load)\n } catch (err) {\n reject(err)\n }\n }).then(onApiLoaded)\n }\n })\n } else {\n // If library should not handle API, provide\n // end-users with the global `vueGoogleMapsInit: () => undefined`\n // when the Google Maps API has been loaded\n const promise = new Promise((resolve) => {\n if (Env.isServer()) {\n return\n }\n window['vueGoogleMapsInit'] = resolve\n }).then(onApiLoaded)\n\n return lazy(() => promise)\n }\n}\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addDays} function options.\n */\n\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be added.\n * @param options - An object with options\n *\n * @returns The new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nexport function addDays(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n if (!amount) return _date;\n\n _date.setDate(_date.getDate() + amount);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default addDays;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n const dayOfMonth = _date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n const daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n _date.setFullYear(\n endOfDesiredMonth.getFullYear(),\n endOfDesiredMonth.getMonth(),\n dayOfMonth,\n );\n return _date;\n }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","import { addDays } from \"./addDays.js\";\nimport { addMonths } from \"./addMonths.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link add} function options.\n */\n\n/**\n * @name add\n * @category Common Helpers\n * @summary Add the specified years, months, weeks, days, hours, minutes, and seconds to the given date.\n *\n * @description\n * Add the specified years, months, weeks, days, hours, minutes, and seconds to the given date.\n *\n * @typeParam DateType - The `Date` type the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param duration - The object with years, months, weeks, days, hours, minutes, and seconds to be added.\n * @param options - An object with options\n *\n * @returns The new date with the seconds added\n *\n * @example\n * // Add the following duration to 1 September 2014, 10:19:50\n * const result = add(new Date(2014, 8, 1, 10, 19, 50), {\n * years: 2,\n * months: 9,\n * weeks: 1,\n * days: 7,\n * hours: 5,\n * minutes: 9,\n * seconds: 30,\n * })\n * //=> Thu Jun 15 2017 15:29:20\n */\nexport function add(date, duration, options) {\n const {\n years = 0,\n months = 0,\n weeks = 0,\n days = 0,\n hours = 0,\n minutes = 0,\n seconds = 0,\n } = duration;\n\n // Add years and months\n const _date = toDate(date, options?.in);\n const dateWithMonths =\n months || years ? addMonths(_date, months + years * 12) : _date;\n\n // Add weeks and days\n const dateWithDays =\n days || weeks ? addDays(dateWithMonths, days + weeks * 7) : dateWithMonths;\n\n // Add days, hours, minutes, and seconds\n const minutesToAdd = minutes + hours * 60;\n const secondsToAdd = seconds + minutesToAdd * 60;\n const msToAdd = secondsToAdd * 1000;\n\n return constructFrom(options?.in || date, +dateWithDays + msToAdd);\n}\n\n// Fallback for modularized imports:\nexport default add;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMilliseconds} function options.\n */\n\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of milliseconds to be added.\n * @param options - The options object\n *\n * @returns The new date with the milliseconds added\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\nexport function addMilliseconds(date, amount, options) {\n return constructFrom(options?.in || date, +toDate(date) + amount);\n}\n\n// Fallback for modularized imports:\nexport default addMilliseconds;\n","import { addMilliseconds } from \"./addMilliseconds.js\";\nimport { millisecondsInHour } from \"./constants.js\";\n\n/**\n * The {@link addHours} function options.\n */\n\n/**\n * @name addHours\n * @category Hour Helpers\n * @summary Add the specified number of hours to the given date.\n *\n * @description\n * Add the specified number of hours to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of hours to be added\n * @param options - An object with options\n *\n * @returns The new date with the hours added\n *\n * @example\n * // Add 2 hours to 10 July 2014 23:00:00:\n * const result = addHours(new Date(2014, 6, 10, 23, 0), 2)\n * //=> Fri Jul 11 2014 01:00:00\n */\nexport function addHours(date, amount, options) {\n return addMilliseconds(date, amount * millisecondsInHour, options);\n}\n\n// Fallback for modularized imports:\nexport default addHours;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n _date.setDate(_date.getDate() - diff);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n","import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n const normalize = constructFrom.bind(\n null,\n context || dates.find((date) => typeof date === \"object\"),\n );\n return dates.map(normalize);\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const laterStartOfDay = startOfDay(laterDate_);\n const earlierStartOfDay = startOfDay(earlierDate_);\n\n const laterTimestamp =\n +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n const earlierTimestamp =\n +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n // Round the number of days to the nearest integer because the number of\n // milliseconds in a day is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n const year = getISOWeekYear(date, options);\n const fourthOfJanuary = constructFrom(options?.in || date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The {@link addQuarters} function options.\n */\n\n/**\n * @name addQuarters\n * @category Quarter Helpers\n * @summary Add the specified number of year quarters to the given date.\n *\n * @description\n * Add the specified number of year quarters to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of quarters to be added.\n * @param options - An object with options\n *\n * @returns The new date with the quarters added\n *\n * @example\n * // Add 1 quarter to 1 September 2014:\n * const result = addQuarters(new Date(2014, 8, 1), 1)\n * //=; Mon Dec 01 2014 00:00:00\n */\nexport function addQuarters(date, amount, options) {\n return addMonths(date, amount * 3, options);\n}\n\n// Fallback for modularized imports:\nexport default addQuarters;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The {@link addYears} function options.\n */\n\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be added.\n * @param options - The options\n *\n * @returns The new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport function addYears(date, amount, options) {\n return addMonths(date, amount * 12, options);\n}\n\n// Fallback for modularized imports:\nexport default addYears;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport function compareAsc(dateLeft, dateRight) {\n const diff = +toDate(dateLeft) - +toDate(dateRight);\n\n if (diff < 0) return -1;\n else if (diff > 0) return 1;\n\n // Return 0 if diff is 0; return NaN if diff is NaN\n return diff;\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getQuarter} function options.\n */\n\n/**\n * @name getQuarter\n * @category Quarter Helpers\n * @summary Get the year quarter of the given date.\n *\n * @description\n * Get the year quarter of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The quarter\n *\n * @example\n * // Which quarter is 2 July 2014?\n * const result = getQuarter(new Date(2014, 6, 2));\n * //=> 3\n */\nexport function getQuarter(date, options) {\n const _date = toDate(date, options?.in);\n const quarter = Math.trunc(_date.getMonth() / 3) + 1;\n return quarter;\n}\n\n// Fallback for modularized imports:\nexport default getQuarter;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarYears} function options.\n */\n\n/**\n * @name differenceInCalendarYears\n * @category Year Helpers\n * @summary Get the number of calendar years between the given dates.\n *\n * @description\n * Get the number of calendar years between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n\n * @returns The number of calendar years\n *\n * @example\n * // How many calendar years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInCalendarYears(\n * new Date(2015, 1, 11),\n * new Date(2013, 11, 31)\n * );\n * //=> 2\n */\nexport function differenceInCalendarYears(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return laterDate_.getFullYear() - earlierDate_.getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarYears;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport { differenceInCalendarYears } from \"./differenceInCalendarYears.js\";\n\n/**\n * The {@link differenceInYears} function options.\n */\n\n/**\n * @name differenceInYears\n * @category Year Helpers\n * @summary Get the number of full years between the given dates.\n *\n * @description\n * Get the number of full years between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full years\n *\n * @example\n * // How many full years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInYears(new Date(2015, 1, 11), new Date(2013, 11, 31))\n * //=> 1\n */\nexport function differenceInYears(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n // -1 if the left date is earlier than the right date\n // 2023-12-31 - 2024-01-01 = -1\n const sign = compareAsc(laterDate_, earlierDate_);\n\n // First calculate the difference in calendar years\n // 2024-01-01 - 2023-12-31 = 1 year\n const diff = Math.abs(differenceInCalendarYears(laterDate_, earlierDate_));\n\n // Now we need to calculate if the difference is full. To do that we set\n // both dates to the same year and check if the both date's month and day\n // form a full year.\n laterDate_.setFullYear(1584);\n earlierDate_.setFullYear(1584);\n\n // For it to be true, when the later date is indeed later than the earlier date\n // (2026-02-01 - 2023-12-10 = 3 years), the difference is full if\n // the normalized later date is also later than the normalized earlier date.\n // In our example, 1584-02-01 is earlier than 1584-12-10, so the difference\n // is partial, hence we need to subtract 1 from the difference 3 - 1 = 2.\n const partial = compareAsc(laterDate_, earlierDate_) === -sign;\n\n const result = sign * (diff - +partial);\n\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInYears;\n","import { normalizeDates } from \"./normalizeDates.js\";\n\nexport function normalizeInterval(context, interval) {\n const [start, end] = normalizeDates(context, interval.start, interval.end);\n return { start, end };\n}\n","import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { constructFrom } from \"./constructFrom.js\";\n\n/**\n * The {@link eachDayOfInterval} function options.\n */\n\n/**\n * The {@link eachDayOfInterval} function result type. It resolves the proper data type.\n * It uses the first argument date object type, starting from the date argument,\n * then the start interval date, and finally the end interval date. If\n * a context function is passed, it uses the context function return type.\n */\n\n/**\n * @name eachDayOfInterval\n * @category Interval Helpers\n * @summary Return the array of dates within the specified time interval.\n *\n * @description\n * Return the array of dates within the specified time interval.\n *\n * @typeParam IntervalType - Interval type.\n * @typeParam Options - Options type.\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of days from the day of the interval start to the day of the interval end\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * const result = eachDayOfInterval({\n * start: new Date(2014, 9, 6),\n * end: new Date(2014, 9, 10)\n * })\n * //=> [\n * // Mon Oct 06 2014 00:00:00,\n * // Tue Oct 07 2014 00:00:00,\n * // Wed Oct 08 2014 00:00:00,\n * // Thu Oct 09 2014 00:00:00,\n * // Fri Oct 10 2014 00:00:00\n * // ]\n */\nexport function eachDayOfInterval(interval, options) {\n const { start, end } = normalizeInterval(options?.in, interval);\n\n let reversed = +start > +end;\n const endTime = reversed ? +start : +end;\n const date = reversed ? end : start;\n date.setHours(0, 0, 0, 0);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+date <= endTime) {\n dates.push(constructFrom(start, date));\n date.setDate(date.getDate() + step);\n date.setHours(0, 0, 0, 0);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachDayOfInterval;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfQuarter} function options.\n */\n\n/**\n * @name startOfQuarter\n * @category Quarter Helpers\n * @summary Return the start of a year quarter for the given date.\n *\n * @description\n * Return the start of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a quarter\n *\n * @example\n * // The start of a quarter for 2 September 2014 11:55:00:\n * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Jul 01 2014 00:00:00\n */\nexport function startOfQuarter(date, options) {\n const _date = toDate(date, options?.in);\n const currentMonth = _date.getMonth();\n const month = currentMonth - (currentMonth % 3);\n _date.setMonth(month, 1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfQuarter;\n","import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { addQuarters } from \"./addQuarters.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfQuarter } from \"./startOfQuarter.js\";\n\n/**\n * The {@link eachQuarterOfInterval} function options.\n */\n\n/**\n * The {@link eachQuarterOfInterval} function result type. It resolves the proper data type.\n * It uses the first argument date object type, starting from the date argument,\n * then the start interval date, and finally the end interval date. If\n * a context function is passed, it uses the context function return type.\n */\n\n/**\n * @name eachQuarterOfInterval\n * @category Interval Helpers\n * @summary Return the array of quarters within the specified time interval.\n *\n * @description\n * Return the array of quarters within the specified time interval.\n *\n * @typeParam IntervalType - Interval type.\n * @typeParam Options - Options type.\n *\n * @param interval - The interval\n * @param options - An object with options\n *\n * @returns The array with starts of quarters from the quarter of the interval start to the quarter of the interval end\n *\n * @example\n * // Each quarter within interval 6 February 2014 - 10 August 2014:\n * const result = eachQuarterOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2014, 7, 10),\n * })\n * //=> [\n * // Wed Jan 01 2014 00:00:00,\n * // Tue Apr 01 2014 00:00:00,\n * // Tue Jul 01 2014 00:00:00,\n * // ]\n */\nexport function eachQuarterOfInterval(interval, options) {\n const { start, end } = normalizeInterval(options?.in, interval);\n\n let reversed = +start > +end;\n const endTime = reversed ? +startOfQuarter(start) : +startOfQuarter(end);\n let date = reversed ? startOfQuarter(end) : startOfQuarter(start);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+date <= endTime) {\n dates.push(constructFrom(start, date));\n date = addQuarters(date, step);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachQuarterOfInterval;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfMonth} function options.\n */\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date. The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.\n * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,\n * or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfYear} function options.\n */\n\n/**\n * @name endOfYear\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The end of a year\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * const result = endOfYear(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\nexport function endOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n _date.setFullYear(year + 1, 0, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfYear;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n const date_ = toDate(date, options?.in);\n date_.setFullYear(date_.getFullYear(), 0, 1);\n date_.setHours(0, 0, 0, 0);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfWeek} function options.\n */\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n\n _date.setDate(_date.getDate() + diff);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfWeek;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfQuarter} function options.\n */\n\n/**\n * @name endOfQuarter\n * @category Quarter Helpers\n * @summary Return the end of a year quarter for the given date.\n *\n * @description\n * Return the end of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a quarter\n *\n * @example\n * // The end of a quarter for 2 September 2014 11:55:00:\n * const result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfQuarter(date, options) {\n const _date = toDate(date, options?.in);\n const currentMonth = _date.getMonth();\n const month = currentMonth - (currentMonth % 3) + 3;\n _date.setMonth(month, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfQuarter;\n","const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n","export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // [TODO] -- I challenge you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // [TODO] -- I challenge you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n","export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // [TODO] I challenge you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","import { formatDistance } from \"./en-US/_lib/formatDistance.js\";\nimport { formatLong } from \"./en-US/_lib/formatLong.js\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.js\";\nimport { localize } from \"./en-US/_lib/localize.js\";\nimport { match } from \"./en-US/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (+_date >= +startOfNextYear) {\n return year + 1;\n } else if (+_date >= +startOfThisYear) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(options?.in || date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n // Year\n y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n },\n\n // Month\n M(date, token) {\n const month = date.getMonth();\n return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n\n // Day of the month\n d(date, token) {\n return addLeadingZeros(date.getDate(), token.length);\n },\n\n // AM or PM\n a(date, token) {\n const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return dayPeriodEnumValue.toUpperCase();\n case \"aaa\":\n return dayPeriodEnumValue;\n case \"aaaaa\":\n return dayPeriodEnumValue[0];\n case \"aaaa\":\n default:\n return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n }\n },\n\n // Hour [1-12]\n h(date, token) {\n return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n },\n\n // Hour [0-23]\n H(date, token) {\n return addLeadingZeros(date.getHours(), token.length);\n },\n\n // Minute\n m(date, token) {\n return addLeadingZeros(date.getMinutes(), token.length);\n },\n\n // Second\n s(date, token) {\n return addLeadingZeros(date.getSeconds(), token.length);\n },\n\n // Fraction of second\n S(date, token) {\n const numberOfDigits = token.length;\n const milliseconds = date.getMilliseconds();\n const fractionalSeconds = Math.trunc(\n milliseconds * Math.pow(10, numberOfDigits - 3),\n );\n return addLeadingZeros(fractionalSeconds, token.length);\n },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return \"Z\";\n }\n\n switch (token) {\n // Hours and optional minutes\n case \"X\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case \"XXXX\":\n case \"XX\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case \"XXXXX\":\n case \"XXX\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case \"x\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case \"xxxx\":\n case \"xx\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case \"xxxxx\":\n case \"xxx\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"O\":\n case \"OO\":\n case \"OOO\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"OOOO\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(+date / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n return addLeadingZeros(+date, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"P\":\n return formatLong.date({ width: \"short\" });\n case \"PP\":\n return formatLong.date({ width: \"medium\" });\n case \"PPP\":\n return formatLong.date({ width: \"long\" });\n case \"PPPP\":\n default:\n return formatLong.date({ width: \"full\" });\n }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"p\":\n return formatLong.time({ width: \"short\" });\n case \"pp\":\n return formatLong.time({ width: \"medium\" });\n case \"ppp\":\n return formatLong.time({ width: \"long\" });\n case \"pppp\":\n default:\n return formatLong.time({ width: \"full\" });\n }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n const matchResult = pattern.match(/(P+)(p+)?/) || [];\n const datePattern = matchResult[1];\n const timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n let dateTimeFormat;\n\n switch (datePattern) {\n case \"P\":\n dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n break;\n case \"PP\":\n dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n break;\n case \"PPP\":\n dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n break;\n case \"PPPP\":\n default:\n dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n break;\n }\n\n return dateTimeFormat\n .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n const _message = message(token, format, input);\n console.warn(_message);\n if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDay} function options.\n */\n\n/**\n * @name getDay\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of week, 0 represents Sunday\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * const result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\nexport function getDay(date, options) {\n return toDate(date, options?.in).getDay();\n}\n\n// Fallback for modularized imports:\nexport default getDay;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDaysInMonth} function options.\n */\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date, considering the context if provided.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const monthIndex = _date.getMonth();\n const lastDayOfMonth = constructFrom(_date, 0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n","import { getDefaultOptions as getInternalDefaultOptions } from \"./_lib/defaultOptions.js\";\n\n/**\n * @name getDefaultOptions\n * @category Common Helpers\n * @summary Get default options.\n * @pure false\n *\n * @description\n * Returns an object that contains defaults for\n * `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`\n * arguments for all functions.\n *\n * You can change these with [setDefaultOptions](https://date-fns.org/docs/setDefaultOptions).\n *\n * @returns The default options\n *\n * @example\n * const result = getDefaultOptions()\n * //=> {}\n *\n * @example\n * setDefaultOptions({ weekStarsOn: 1, firstWeekContainsDate: 4 })\n * const result = getDefaultOptions()\n * //=> { weekStarsOn: 1, firstWeekContainsDate: 4 }\n */\nexport function getDefaultOptions() {\n return Object.assign({}, getInternalDefaultOptions());\n}\n\n// Fallback for modularized imports:\nexport default getDefaultOptions;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getHours} function options.\n */\n\n/**\n * @name getHours\n * @category Hour Helpers\n * @summary Get the hours of the given date.\n *\n * @description\n * Get the hours of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The hours\n *\n * @example\n * // Get the hours of 29 February 2012 11:45:00:\n * const result = getHours(new Date(2012, 1, 29, 11, 45))\n * //=> 11\n */\nexport function getHours(date, options) {\n return toDate(date, options?.in).getHours();\n}\n\n// Fallback for modularized imports:\nexport default getHours;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISODay} function options.\n */\n\n/**\n * @name getISODay\n * @category Weekday Helpers\n * @summary Get the day of the ISO week of the given date.\n *\n * @description\n * Get the day of the ISO week of the given date,\n * which is 7 for Sunday, 1 for Monday etc.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The day of ISO week\n *\n * @example\n * // Which day of the ISO week is 26 February 2012?\n * const result = getISODay(new Date(2012, 1, 26))\n * //=> 7\n */\nexport function getISODay(date, options) {\n const day = toDate(date, options?.in).getDay();\n return day === 0 ? 7 : day;\n}\n\n// Fallback for modularized imports:\nexport default getISODay;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getMinutes} function options.\n */\n\n/**\n * @name getMinutes\n * @category Minute Helpers\n * @summary Get the minutes of the given date.\n *\n * @description\n * Get the minutes of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The minutes\n *\n * @example\n * // Get the minutes of 29 February 2012 11:45:05:\n * const result = getMinutes(new Date(2012, 1, 29, 11, 45, 5))\n * //=> 45\n */\nexport function getMinutes(date, options) {\n return toDate(date, options?.in).getMinutes();\n}\n\n// Fallback for modularized imports:\nexport default getMinutes;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getMonth} function options.\n */\n\n/**\n * @name getMonth\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The month index (0-11)\n *\n * @example\n * // Which month is 29 February 2012?\n * const result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\nexport function getMonth(date, options) {\n return toDate(date, options?.in).getMonth();\n}\n\n// Fallback for modularized imports:\nexport default getMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name getSeconds\n * @category Second Helpers\n * @summary Get the seconds of the given date.\n *\n * @description\n * Get the seconds of the given date.\n *\n * @param date - The given date\n *\n * @returns The seconds\n *\n * @example\n * // Get the seconds of 29 February 2012 11:45:05.123:\n * const result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 5\n */\nexport function getSeconds(date) {\n return toDate(date).getSeconds();\n}\n\n// Fallback for modularized imports:\nexport default getSeconds;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getYear} function options.\n */\n\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The year\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\nexport function getYear(date, options) {\n return toDate(date, options?.in).getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default getYear;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n return +toDate(date) > +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param date - The date that should be before the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport function isBefore(date, dateToCompare) {\n return +toDate(date) < +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isBefore;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The dates are equal\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * const result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nexport function isEqual(leftDate, rightDate) {\n return +toDate(leftDate) === +toDate(rightDate);\n}\n\n// Fallback for modularized imports:\nexport default isEqual;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name transpose\n * @category Generic Helpers\n * @summary Transpose the date to the given constructor.\n *\n * @description\n * The function transposes the date to the given constructor. It helps you\n * to transpose the date in the system time zone to say `UTCDate` or any other\n * date extension.\n *\n * @typeParam InputDate - The input `Date` type derived from the passed argument.\n * @typeParam ResultDate - The result `Date` type derived from the passed constructor.\n *\n * @param date - The date to use values from\n * @param constructor - The date constructor to use\n *\n * @returns Date transposed to the given constructor\n *\n * @example\n * // Create July 10, 2022 00:00 in locale time zone\n * const date = new Date(2022, 6, 10)\n * //=> 'Sun Jul 10 2022 00:00:00 GMT+0800 (Singapore Standard Time)'\n *\n * @example\n * // Transpose the date to July 10, 2022 00:00 in UTC\n * transpose(date, UTCDate)\n * //=> 'Sun Jul 10 2022 00:00:00 GMT+0000 (Coordinated Universal Time)'\n */\nexport function transpose(date, constructor) {\n const date_ = isConstructor(constructor)\n ? new constructor(0)\n : constructFrom(constructor, 0);\n date_.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n date_.setHours(\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds(),\n );\n return date_;\n}\n\nfunction isConstructor(constructor) {\n return (\n typeof constructor === \"function\" &&\n constructor.prototype?.constructor === constructor\n );\n}\n\n// Fallback for modularized imports:\nexport default transpose;\n","import { constructFrom } from \"../../constructFrom.js\";\nimport { transpose } from \"../../transpose.js\";\n\nconst TIMEZONE_UNIT_PRIORITY = 10;\n\nexport class Setter {\n subPriority = 0;\n\n validate(_utcDate, _options) {\n return true;\n }\n}\n\nexport class ValueSetter extends Setter {\n constructor(\n value,\n\n validateValue,\n\n setValue,\n\n priority,\n subPriority,\n ) {\n super();\n this.value = value;\n this.validateValue = validateValue;\n this.setValue = setValue;\n this.priority = priority;\n if (subPriority) {\n this.subPriority = subPriority;\n }\n }\n\n validate(date, options) {\n return this.validateValue(date, this.value, options);\n }\n\n set(date, flags, options) {\n return this.setValue(date, flags, this.value, options);\n }\n}\n\nexport class DateTimezoneSetter extends Setter {\n priority = TIMEZONE_UNIT_PRIORITY;\n subPriority = -1;\n\n constructor(context, reference) {\n super();\n this.context = context || ((date) => constructFrom(reference, date));\n }\n\n set(date, flags) {\n if (flags.timestampIsSet) return date;\n return constructFrom(date, transpose(date, this.context));\n }\n}\n","import { ValueSetter } from \"./Setter.js\";\n\nexport class Parser {\n run(dateString, token, match, options) {\n const result = this.parse(dateString, token, match, options);\n if (!result) {\n return null;\n }\n\n return {\n setter: new ValueSetter(\n result.value,\n this.validate,\n this.set,\n this.priority,\n this.subPriority,\n ),\n rest: result.rest,\n };\n }\n\n validate(_utcDate, _value, _options) {\n return true;\n }\n}\n","import { Parser } from \"../Parser.js\";\n\nexport class EraParser extends Parser {\n priority = 140;\n\n parse(dateString, token, match) {\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return (\n match.era(dateString, { width: \"abbreviated\" }) ||\n match.era(dateString, { width: \"narrow\" })\n );\n\n // A, B\n case \"GGGGG\":\n return match.era(dateString, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return (\n match.era(dateString, { width: \"wide\" }) ||\n match.era(dateString, { width: \"abbreviated\" }) ||\n match.era(dateString, { width: \"narrow\" })\n );\n }\n }\n\n set(date, flags, value) {\n flags.era = value;\n date.setFullYear(value, 0, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"R\", \"u\", \"t\", \"T\"];\n}\n","export const numericPatterns = {\n month: /^(1[0-2]|0?\\d)/, // 0 to 12\n date: /^(3[0-1]|[0-2]?\\d)/, // 0 to 31\n dayOfYear: /^(36[0-6]|3[0-5]\\d|[0-2]?\\d?\\d)/, // 0 to 366\n week: /^(5[0-3]|[0-4]?\\d)/, // 0 to 53\n hour23h: /^(2[0-3]|[0-1]?\\d)/, // 0 to 23\n hour24h: /^(2[0-4]|[0-1]?\\d)/, // 0 to 24\n hour11h: /^(1[0-1]|0?\\d)/, // 0 to 11\n hour12h: /^(1[0-2]|0?\\d)/, // 0 to 12\n minute: /^[0-5]?\\d/, // 0 to 59\n second: /^[0-5]?\\d/, // 0 to 59\n\n singleDigit: /^\\d/, // 0 to 9\n twoDigits: /^\\d{1,2}/, // 0 to 99\n threeDigits: /^\\d{1,3}/, // 0 to 999\n fourDigits: /^\\d{1,4}/, // 0 to 9999\n\n anyDigitsSigned: /^-?\\d+/,\n singleDigitSigned: /^-?\\d/, // 0 to 9, -0 to -9\n twoDigitsSigned: /^-?\\d{1,2}/, // 0 to 99, -0 to -99\n threeDigitsSigned: /^-?\\d{1,3}/, // 0 to 999, -0 to -999\n fourDigitsSigned: /^-?\\d{1,4}/, // 0 to 9999, -0 to -9999\n};\n\nexport const timezonePatterns = {\n basicOptionalMinutes: /^([+-])(\\d{2})(\\d{2})?|Z/,\n basic: /^([+-])(\\d{2})(\\d{2})|Z/,\n basicOptionalSeconds: /^([+-])(\\d{2})(\\d{2})((\\d{2}))?|Z/,\n extended: /^([+-])(\\d{2}):(\\d{2})|Z/,\n extendedOptionalSeconds: /^([+-])(\\d{2}):(\\d{2})(:(\\d{2}))?|Z/,\n};\n","import {\n millisecondsInHour,\n millisecondsInMinute,\n millisecondsInSecond,\n} from \"../../constants.js\";\n\nimport { numericPatterns } from \"./constants.js\";\n\nexport function mapValue(parseFnResult, mapFn) {\n if (!parseFnResult) {\n return parseFnResult;\n }\n\n return {\n value: mapFn(parseFnResult.value),\n rest: parseFnResult.rest,\n };\n}\n\nexport function parseNumericPattern(pattern, dateString) {\n const matchResult = dateString.match(pattern);\n\n if (!matchResult) {\n return null;\n }\n\n return {\n value: parseInt(matchResult[0], 10),\n rest: dateString.slice(matchResult[0].length),\n };\n}\n\nexport function parseTimezonePattern(pattern, dateString) {\n const matchResult = dateString.match(pattern);\n\n if (!matchResult) {\n return null;\n }\n\n // Input is 'Z'\n if (matchResult[0] === \"Z\") {\n return {\n value: 0,\n rest: dateString.slice(1),\n };\n }\n\n const sign = matchResult[1] === \"+\" ? 1 : -1;\n const hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;\n const minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;\n const seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;\n\n return {\n value:\n sign *\n (hours * millisecondsInHour +\n minutes * millisecondsInMinute +\n seconds * millisecondsInSecond),\n rest: dateString.slice(matchResult[0].length),\n };\n}\n\nexport function parseAnyDigitsSigned(dateString) {\n return parseNumericPattern(numericPatterns.anyDigitsSigned, dateString);\n}\n\nexport function parseNDigits(n, dateString) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigit, dateString);\n case 2:\n return parseNumericPattern(numericPatterns.twoDigits, dateString);\n case 3:\n return parseNumericPattern(numericPatterns.threeDigits, dateString);\n case 4:\n return parseNumericPattern(numericPatterns.fourDigits, dateString);\n default:\n return parseNumericPattern(new RegExp(\"^\\\\d{1,\" + n + \"}\"), dateString);\n }\n}\n\nexport function parseNDigitsSigned(n, dateString) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigitSigned, dateString);\n case 2:\n return parseNumericPattern(numericPatterns.twoDigitsSigned, dateString);\n case 3:\n return parseNumericPattern(numericPatterns.threeDigitsSigned, dateString);\n case 4:\n return parseNumericPattern(numericPatterns.fourDigitsSigned, dateString);\n default:\n return parseNumericPattern(new RegExp(\"^-?\\\\d{1,\" + n + \"}\"), dateString);\n }\n}\n\nexport function dayPeriodEnumToHours(dayPeriod) {\n switch (dayPeriod) {\n case \"morning\":\n return 4;\n case \"evening\":\n return 17;\n case \"pm\":\n case \"noon\":\n case \"afternoon\":\n return 12;\n case \"am\":\n case \"midnight\":\n case \"night\":\n default:\n return 0;\n }\n}\n\nexport function normalizeTwoDigitYear(twoDigitYear, currentYear) {\n const isCommonEra = currentYear > 0;\n // Absolute number of the current year:\n // 1 -> 1 AC\n // 0 -> 1 BC\n // -1 -> 2 BC\n const absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;\n\n let result;\n if (absCurrentYear <= 50) {\n result = twoDigitYear || 100;\n } else {\n const rangeEnd = absCurrentYear + 50;\n const rangeEndCentury = Math.trunc(rangeEnd / 100) * 100;\n const isPreviousCentury = twoDigitYear >= rangeEnd % 100;\n result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);\n }\n\n return isCommonEra ? result : 1 - result;\n}\n\nexport function isLeapYearIndex(year) {\n return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);\n}\n","import { Parser } from \"../Parser.js\";\n\nimport { mapValue, normalizeTwoDigitYear, parseNDigits } from \"../utils.js\";\n\n// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns\n// | Year | y | yy | yyy | yyyy | yyyyy |\n// |----------|-------|----|-------|-------|-------|\n// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\nexport class YearParser extends Parser {\n priority = 130;\n incompatibleTokens = [\"Y\", \"R\", \"u\", \"w\", \"I\", \"i\", \"e\", \"c\", \"t\", \"T\"];\n\n parse(dateString, token, match) {\n const valueCallback = (year) => ({\n year,\n isTwoDigitYear: token === \"yy\",\n });\n\n switch (token) {\n case \"y\":\n return mapValue(parseNDigits(4, dateString), valueCallback);\n case \"yo\":\n return mapValue(\n match.ordinalNumber(dateString, {\n unit: \"year\",\n }),\n valueCallback,\n );\n default:\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }\n\n validate(_date, value) {\n return value.isTwoDigitYear || value.year > 0;\n }\n\n set(date, flags, value) {\n const currentYear = date.getFullYear();\n\n if (value.isTwoDigitYear) {\n const normalizedTwoDigitYear = normalizeTwoDigitYear(\n value.year,\n currentYear,\n );\n date.setFullYear(normalizedTwoDigitYear, 0, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n const year =\n !(\"era\" in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setFullYear(year, 0, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n}\n","import { getWeekYear } from \"../../../getWeekYear.js\";\n\nimport { startOfWeek } from \"../../../startOfWeek.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { mapValue, normalizeTwoDigitYear, parseNDigits } from \"../utils.js\";\n\n// Local week-numbering year\nexport class LocalWeekYearParser extends Parser {\n priority = 130;\n\n parse(dateString, token, match) {\n const valueCallback = (year) => ({\n year,\n isTwoDigitYear: token === \"YY\",\n });\n\n switch (token) {\n case \"Y\":\n return mapValue(parseNDigits(4, dateString), valueCallback);\n case \"Yo\":\n return mapValue(\n match.ordinalNumber(dateString, {\n unit: \"year\",\n }),\n valueCallback,\n );\n default:\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }\n\n validate(_date, value) {\n return value.isTwoDigitYear || value.year > 0;\n }\n\n set(date, flags, value, options) {\n const currentYear = getWeekYear(date, options);\n\n if (value.isTwoDigitYear) {\n const normalizedTwoDigitYear = normalizeTwoDigitYear(\n value.year,\n currentYear,\n );\n date.setFullYear(\n normalizedTwoDigitYear,\n 0,\n options.firstWeekContainsDate,\n );\n date.setHours(0, 0, 0, 0);\n return startOfWeek(date, options);\n }\n\n const year =\n !(\"era\" in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setFullYear(year, 0, options.firstWeekContainsDate);\n date.setHours(0, 0, 0, 0);\n return startOfWeek(date, options);\n }\n\n incompatibleTokens = [\n \"y\",\n \"R\",\n \"u\",\n \"Q\",\n \"q\",\n \"M\",\n \"L\",\n \"I\",\n \"d\",\n \"D\",\n \"i\",\n \"t\",\n \"T\",\n ];\n}\n","import { startOfISOWeek } from \"../../../startOfISOWeek.js\";\nimport { constructFrom } from \"../../../constructFrom.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigitsSigned } from \"../utils.js\";\n\n// ISO week-numbering year\nexport class ISOWeekYearParser extends Parser {\n priority = 130;\n\n parse(dateString, token) {\n if (token === \"R\") {\n return parseNDigitsSigned(4, dateString);\n }\n\n return parseNDigitsSigned(token.length, dateString);\n }\n\n set(date, _flags, value) {\n const firstWeekOfYear = constructFrom(date, 0);\n firstWeekOfYear.setFullYear(value, 0, 4);\n firstWeekOfYear.setHours(0, 0, 0, 0);\n return startOfISOWeek(firstWeekOfYear);\n }\n\n incompatibleTokens = [\n \"G\",\n \"y\",\n \"Y\",\n \"u\",\n \"Q\",\n \"q\",\n \"M\",\n \"L\",\n \"w\",\n \"d\",\n \"D\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n","import { Parser } from \"../Parser.js\";\n\nimport { parseNDigitsSigned } from \"../utils.js\";\n\nexport class ExtendedYearParser extends Parser {\n priority = 130;\n\n parse(dateString, token) {\n if (token === \"u\") {\n return parseNDigitsSigned(4, dateString);\n }\n\n return parseNDigitsSigned(token.length, dateString);\n }\n\n set(date, _flags, value) {\n date.setFullYear(value, 0, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"G\", \"y\", \"Y\", \"R\", \"w\", \"I\", \"i\", \"e\", \"c\", \"t\", \"T\"];\n}\n","import { Parser } from \"../Parser.js\";\n\nimport { parseNDigits } from \"../utils.js\";\n\nexport class QuarterParser extends Parser {\n priority = 120;\n\n parse(dateString, token, match) {\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n case \"QQ\": // 01, 02, 03, 04\n return parseNDigits(token.length, dateString);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return match.ordinalNumber(dateString, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return (\n match.quarter(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.quarter(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return match.quarter(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return (\n match.quarter(dateString, {\n width: \"wide\",\n context: \"formatting\",\n }) ||\n match.quarter(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.quarter(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 4;\n }\n\n set(date, _flags, value) {\n date.setMonth((value - 1) * 3, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"Y\",\n \"R\",\n \"q\",\n \"M\",\n \"L\",\n \"w\",\n \"I\",\n \"d\",\n \"D\",\n \"i\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n","import { Parser } from \"../Parser.js\";\n\nimport { parseNDigits } from \"../utils.js\";\n\nexport class StandAloneQuarterParser extends Parser {\n priority = 120;\n\n parse(dateString, token, match) {\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n case \"qq\": // 01, 02, 03, 04\n return parseNDigits(token.length, dateString);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return match.ordinalNumber(dateString, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return (\n match.quarter(dateString, {\n width: \"abbreviated\",\n context: \"standalone\",\n }) ||\n match.quarter(dateString, {\n width: \"narrow\",\n context: \"standalone\",\n })\n );\n\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return match.quarter(dateString, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return (\n match.quarter(dateString, {\n width: \"wide\",\n context: \"standalone\",\n }) ||\n match.quarter(dateString, {\n width: \"abbreviated\",\n context: \"standalone\",\n }) ||\n match.quarter(dateString, {\n width: \"narrow\",\n context: \"standalone\",\n })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 4;\n }\n\n set(date, _flags, value) {\n date.setMonth((value - 1) * 3, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"Y\",\n \"R\",\n \"Q\",\n \"M\",\n \"L\",\n \"w\",\n \"I\",\n \"d\",\n \"D\",\n \"i\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n","import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { mapValue, parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class MonthParser extends Parser {\n incompatibleTokens = [\n \"Y\",\n \"R\",\n \"q\",\n \"Q\",\n \"L\",\n \"w\",\n \"I\",\n \"D\",\n \"i\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n\n priority = 110;\n\n parse(dateString, token, match) {\n const valueCallback = (value) => value - 1;\n\n switch (token) {\n // 1, 2, ..., 12\n case \"M\":\n return mapValue(\n parseNumericPattern(numericPatterns.month, dateString),\n valueCallback,\n );\n // 01, 02, ..., 12\n case \"MM\":\n return mapValue(parseNDigits(2, dateString), valueCallback);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return mapValue(\n match.ordinalNumber(dateString, {\n unit: \"month\",\n }),\n valueCallback,\n );\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return (\n match.month(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.month(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n\n // J, F, ..., D\n case \"MMMMM\":\n return match.month(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return (\n match.month(dateString, { width: \"wide\", context: \"formatting\" }) ||\n match.month(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.month(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n\n set(date, _flags, value) {\n date.setMonth(value, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n}\n","import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { mapValue, parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class StandAloneMonthParser extends Parser {\n priority = 110;\n\n parse(dateString, token, match) {\n const valueCallback = (value) => value - 1;\n\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return mapValue(\n parseNumericPattern(numericPatterns.month, dateString),\n valueCallback,\n );\n // 01, 02, ..., 12\n case \"LL\":\n return mapValue(parseNDigits(2, dateString), valueCallback);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return mapValue(\n match.ordinalNumber(dateString, {\n unit: \"month\",\n }),\n valueCallback,\n );\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return (\n match.month(dateString, {\n width: \"abbreviated\",\n context: \"standalone\",\n }) ||\n match.month(dateString, { width: \"narrow\", context: \"standalone\" })\n );\n\n // J, F, ..., D\n case \"LLLLL\":\n return match.month(dateString, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return (\n match.month(dateString, { width: \"wide\", context: \"standalone\" }) ||\n match.month(dateString, {\n width: \"abbreviated\",\n context: \"standalone\",\n }) ||\n match.month(dateString, { width: \"narrow\", context: \"standalone\" })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n\n set(date, _flags, value) {\n date.setMonth(value, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"Y\",\n \"R\",\n \"q\",\n \"Q\",\n \"M\",\n \"w\",\n \"I\",\n \"D\",\n \"i\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n","import { getWeek } from \"./getWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setWeek} function options.\n */\n\n/**\n * @name setWeek\n * @category Week Helpers\n * @summary Set the local week to the given date.\n *\n * @description\n * Set the local week to the given date, saving the weekday number.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param week - The week of the new date\n * @param options - An object with options\n *\n * @returns The new date with the local week set\n *\n * @example\n * // Set the 1st week to 2 January 2005 with default options:\n * const result = setWeek(new Date(2005, 0, 2), 1)\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // Set the 1st week to 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January:\n * const result = setWeek(new Date(2005, 0, 2), 1, {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Sun Jan 4 2004 00:00:00\n */\nexport function setWeek(date, week, options) {\n const date_ = toDate(date, options?.in);\n const diff = getWeek(date_, options) - week;\n date_.setDate(date_.getDate() - diff * 7);\n return toDate(date_, options?.in);\n}\n\n// Fallback for modularized imports:\nexport default setWeek;\n","import { setWeek } from \"../../../setWeek.js\";\nimport { startOfWeek } from \"../../../startOfWeek.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\n// Local week of year\nexport class LocalWeekParser extends Parser {\n priority = 100;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"w\":\n return parseNumericPattern(numericPatterns.week, dateString);\n case \"wo\":\n return match.ordinalNumber(dateString, { unit: \"week\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 53;\n }\n\n set(date, _flags, value, options) {\n return startOfWeek(setWeek(date, value, options), options);\n }\n\n incompatibleTokens = [\n \"y\",\n \"R\",\n \"u\",\n \"q\",\n \"Q\",\n \"M\",\n \"L\",\n \"I\",\n \"d\",\n \"D\",\n \"i\",\n \"t\",\n \"T\",\n ];\n}\n","import { getISOWeek } from \"./getISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setISOWeek} function options.\n */\n\n/**\n * @name setISOWeek\n * @category ISO Week Helpers\n * @summary Set the ISO week to the given date.\n *\n * @description\n * Set the ISO week to the given date, saving the weekday number.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The `Date` type of the context function.\n *\n * @param date - The date to be changed\n * @param week - The ISO week of the new date\n * @param options - An object with options\n *\n * @returns The new date with the ISO week set\n *\n * @example\n * // Set the 53rd ISO week to 7 August 2004:\n * const result = setISOWeek(new Date(2004, 7, 7), 53)\n * //=> Sat Jan 01 2005 00:00:00\n */\nexport function setISOWeek(date, week, options) {\n const _date = toDate(date, options?.in);\n const diff = getISOWeek(_date, options) - week;\n _date.setDate(_date.getDate() - diff * 7);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setISOWeek;\n","import { setISOWeek } from \"../../../setISOWeek.js\";\nimport { startOfISOWeek } from \"../../../startOfISOWeek.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\n// ISO week of year\nexport class ISOWeekParser extends Parser {\n priority = 100;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"I\":\n return parseNumericPattern(numericPatterns.week, dateString);\n case \"Io\":\n return match.ordinalNumber(dateString, { unit: \"week\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 53;\n }\n\n set(date, _flags, value) {\n return startOfISOWeek(setISOWeek(date, value));\n }\n\n incompatibleTokens = [\n \"y\",\n \"Y\",\n \"u\",\n \"q\",\n \"Q\",\n \"M\",\n \"L\",\n \"w\",\n \"d\",\n \"D\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n","import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport {\n isLeapYearIndex,\n parseNDigits,\n parseNumericPattern,\n} from \"../utils.js\";\n\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst DAYS_IN_MONTH_LEAP_YEAR = [\n 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31,\n];\n\n// Day of the month\nexport class DateParser extends Parser {\n priority = 90;\n subPriority = 1;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"d\":\n return parseNumericPattern(numericPatterns.date, dateString);\n case \"do\":\n return match.ordinalNumber(dateString, { unit: \"date\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(date, value) {\n const year = date.getFullYear();\n const isLeapYear = isLeapYearIndex(year);\n const month = date.getMonth();\n if (isLeapYear) {\n return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month];\n } else {\n return value >= 1 && value <= DAYS_IN_MONTH[month];\n }\n }\n\n set(date, _flags, value) {\n date.setDate(value);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"Y\",\n \"R\",\n \"q\",\n \"Q\",\n \"w\",\n \"I\",\n \"D\",\n \"i\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n","import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport {\n isLeapYearIndex,\n parseNDigits,\n parseNumericPattern,\n} from \"../utils.js\";\n\nexport class DayOfYearParser extends Parser {\n priority = 90;\n\n subpriority = 1;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"D\":\n case \"DD\":\n return parseNumericPattern(numericPatterns.dayOfYear, dateString);\n case \"Do\":\n return match.ordinalNumber(dateString, { unit: \"date\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(date, value) {\n const year = date.getFullYear();\n const isLeapYear = isLeapYearIndex(year);\n if (isLeapYear) {\n return value >= 1 && value <= 366;\n } else {\n return value >= 1 && value <= 365;\n }\n }\n\n set(date, _flags, value) {\n date.setMonth(0, value);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"Y\",\n \"R\",\n \"q\",\n \"Q\",\n \"M\",\n \"L\",\n \"w\",\n \"I\",\n \"d\",\n \"E\",\n \"i\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { addDays } from \"./addDays.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setDay} function options.\n */\n\n/**\n * @name setDay\n * @category Weekday Helpers\n * @summary Set the day of the week to the given date.\n *\n * @description\n * Set the day of the week to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param day - The day of the week of the new date\n * @param options - An object with options.\n *\n * @returns The new date with the day of the week set\n *\n * @example\n * // Set week day to Sunday, with the default weekStartsOn of Sunday:\n * const result = setDay(new Date(2014, 8, 1), 0)\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // Set week day to Sunday, with a weekStartsOn of Monday:\n * const result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 00:00:00\n */\nexport function setDay(date, day, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const date_ = toDate(date, options?.in);\n const currentDay = date_.getDay();\n\n const remainder = day % 7;\n const dayIndex = (remainder + 7) % 7;\n\n const delta = 7 - weekStartsOn;\n const diff =\n day < 0 || day > 6\n ? day - ((currentDay + delta) % 7)\n : ((dayIndex + delta) % 7) - ((currentDay + delta) % 7);\n return addDays(date_, diff, options);\n}\n\n// Fallback for modularized imports:\nexport default setDay;\n","import { setDay } from \"../../../setDay.js\";\nimport { Parser } from \"../Parser.js\";\n\n// Day of week\nexport class DayParser extends Parser {\n priority = 90;\n\n parse(dateString, token, match) {\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return (\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n\n // T\n case \"EEEEE\":\n return match.day(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return (\n match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n\n // Tuesday\n case \"EEEE\":\n default:\n return (\n match.day(dateString, { width: \"wide\", context: \"formatting\" }) ||\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n\n set(date, _flags, value, options) {\n date = setDay(date, value, options);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"D\", \"i\", \"e\", \"c\", \"t\", \"T\"];\n}\n","import { setDay } from \"../../../setDay.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { mapValue, parseNDigits } from \"../utils.js\";\n\n// Local day of week\nexport class LocalDayParser extends Parser {\n priority = 90;\n parse(dateString, token, match, options) {\n const valueCallback = (value) => {\n // We want here floor instead of trunc, so we get -7 for value 0 instead of 0\n const wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays;\n };\n\n switch (token) {\n // 3\n case \"e\":\n case \"ee\": // 03\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n // 3rd\n case \"eo\":\n return mapValue(\n match.ordinalNumber(dateString, {\n unit: \"day\",\n }),\n valueCallback,\n );\n // Tue\n case \"eee\":\n return (\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n\n // T\n case \"eeeee\":\n return match.day(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return (\n match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n\n // Tuesday\n case \"eeee\":\n default:\n return (\n match.day(dateString, { width: \"wide\", context: \"formatting\" }) ||\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n\n set(date, _flags, value, options) {\n date = setDay(date, value, options);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"y\",\n \"R\",\n \"u\",\n \"q\",\n \"Q\",\n \"M\",\n \"L\",\n \"I\",\n \"d\",\n \"D\",\n \"E\",\n \"i\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n","import { setDay } from \"../../../setDay.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { mapValue, parseNDigits } from \"../utils.js\";\n\n// Stand-alone local day of week\nexport class StandAloneLocalDayParser extends Parser {\n priority = 90;\n\n parse(dateString, token, match, options) {\n const valueCallback = (value) => {\n // We want here floor instead of trunc, so we get -7 for value 0 instead of 0\n const wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays;\n };\n\n switch (token) {\n // 3\n case \"c\":\n case \"cc\": // 03\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n // 3rd\n case \"co\":\n return mapValue(\n match.ordinalNumber(dateString, {\n unit: \"day\",\n }),\n valueCallback,\n );\n // Tue\n case \"ccc\":\n return (\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"standalone\",\n }) ||\n match.day(dateString, { width: \"short\", context: \"standalone\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"standalone\" })\n );\n\n // T\n case \"ccccc\":\n return match.day(dateString, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return (\n match.day(dateString, { width: \"short\", context: \"standalone\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"standalone\" })\n );\n\n // Tuesday\n case \"cccc\":\n default:\n return (\n match.day(dateString, { width: \"wide\", context: \"standalone\" }) ||\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"standalone\",\n }) ||\n match.day(dateString, { width: \"short\", context: \"standalone\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"standalone\" })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n\n set(date, _flags, value, options) {\n date = setDay(date, value, options);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"y\",\n \"R\",\n \"u\",\n \"q\",\n \"Q\",\n \"M\",\n \"L\",\n \"I\",\n \"d\",\n \"D\",\n \"E\",\n \"i\",\n \"e\",\n \"t\",\n \"T\",\n ];\n}\n","import { addDays } from \"./addDays.js\";\nimport { getISODay } from \"./getISODay.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setISODay} function options.\n */\n\n/**\n * @name setISODay\n * @category Weekday Helpers\n * @summary Set the day of the ISO week to the given date.\n *\n * @description\n * Set the day of the ISO week to the given date.\n * ISO week starts with Monday.\n * 7 is the index of Sunday, 1 is the index of Monday, etc.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param day - The day of the ISO week of the new date\n * @param options - An object with options\n *\n * @returns The new date with the day of the ISO week set\n *\n * @example\n * // Set Sunday to 1 September 2014:\n * const result = setISODay(new Date(2014, 8, 1), 7)\n * //=> Sun Sep 07 2014 00:00:00\n */\nexport function setISODay(date, day, options) {\n const date_ = toDate(date, options?.in);\n const currentDay = getISODay(date_, options);\n const diff = day - currentDay;\n return addDays(date_, diff, options);\n}\n\n// Fallback for modularized imports:\nexport default setISODay;\n","import { setISODay } from \"../../../setISODay.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { mapValue, parseNDigits } from \"../utils.js\";\n\n// ISO day of week\nexport class ISODayParser extends Parser {\n priority = 90;\n\n parse(dateString, token, match) {\n const valueCallback = (value) => {\n if (value === 0) {\n return 7;\n }\n return value;\n };\n\n switch (token) {\n // 2\n case \"i\":\n case \"ii\": // 02\n return parseNDigits(token.length, dateString);\n // 2nd\n case \"io\":\n return match.ordinalNumber(dateString, { unit: \"day\" });\n // Tue\n case \"iii\":\n return mapValue(\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.day(dateString, {\n width: \"short\",\n context: \"formatting\",\n }) ||\n match.day(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n }),\n valueCallback,\n );\n // T\n case \"iiiii\":\n return mapValue(\n match.day(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n }),\n valueCallback,\n );\n // Tu\n case \"iiiiii\":\n return mapValue(\n match.day(dateString, {\n width: \"short\",\n context: \"formatting\",\n }) ||\n match.day(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n }),\n valueCallback,\n );\n // Tuesday\n case \"iiii\":\n default:\n return mapValue(\n match.day(dateString, {\n width: \"wide\",\n context: \"formatting\",\n }) ||\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.day(dateString, {\n width: \"short\",\n context: \"formatting\",\n }) ||\n match.day(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n }),\n valueCallback,\n );\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 7;\n }\n\n set(date, _flags, value) {\n date = setISODay(date, value);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"y\",\n \"Y\",\n \"u\",\n \"q\",\n \"Q\",\n \"M\",\n \"L\",\n \"w\",\n \"d\",\n \"D\",\n \"E\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n","import { Parser } from \"../Parser.js\";\n\nimport { dayPeriodEnumToHours } from \"../utils.js\";\n\nexport class AMPMParser extends Parser {\n priority = 80;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"a\":\n case \"aa\":\n case \"aaa\":\n return (\n match.dayPeriod(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n\n case \"aaaaa\":\n return match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return (\n match.dayPeriod(dateString, {\n width: \"wide\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n }\n }\n\n set(date, _flags, value) {\n date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"b\", \"B\", \"H\", \"k\", \"t\", \"T\"];\n}\n","import { Parser } from \"../Parser.js\";\n\nimport { dayPeriodEnumToHours } from \"../utils.js\";\n\nexport class AMPMMidnightParser extends Parser {\n priority = 80;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"b\":\n case \"bb\":\n case \"bbb\":\n return (\n match.dayPeriod(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n\n case \"bbbbb\":\n return match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return (\n match.dayPeriod(dateString, {\n width: \"wide\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n }\n }\n\n set(date, _flags, value) {\n date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"a\", \"B\", \"H\", \"k\", \"t\", \"T\"];\n}\n","import { Parser } from \"../Parser.js\";\n\nimport { dayPeriodEnumToHours } from \"../utils.js\";\n\n// in the morning, in the afternoon, in the evening, at night\nexport class DayPeriodParser extends Parser {\n priority = 80;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return (\n match.dayPeriod(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n\n case \"BBBBB\":\n return match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return (\n match.dayPeriod(dateString, {\n width: \"wide\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n }\n }\n\n set(date, _flags, value) {\n date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"a\", \"b\", \"t\", \"T\"];\n}\n","import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class Hour1to12Parser extends Parser {\n priority = 70;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"h\":\n return parseNumericPattern(numericPatterns.hour12h, dateString);\n case \"ho\":\n return match.ordinalNumber(dateString, { unit: \"hour\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 12;\n }\n\n set(date, _flags, value) {\n const isPM = date.getHours() >= 12;\n if (isPM && value < 12) {\n date.setHours(value + 12, 0, 0, 0);\n } else if (!isPM && value === 12) {\n date.setHours(0, 0, 0, 0);\n } else {\n date.setHours(value, 0, 0, 0);\n }\n return date;\n }\n\n incompatibleTokens = [\"H\", \"K\", \"k\", \"t\", \"T\"];\n}\n","import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class Hour0to23Parser extends Parser {\n priority = 70;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"H\":\n return parseNumericPattern(numericPatterns.hour23h, dateString);\n case \"Ho\":\n return match.ordinalNumber(dateString, { unit: \"hour\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 23;\n }\n\n set(date, _flags, value) {\n date.setHours(value, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"a\", \"b\", \"h\", \"K\", \"k\", \"t\", \"T\"];\n}\n","import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class Hour0To11Parser extends Parser {\n priority = 70;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"K\":\n return parseNumericPattern(numericPatterns.hour11h, dateString);\n case \"Ko\":\n return match.ordinalNumber(dateString, { unit: \"hour\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n\n set(date, _flags, value) {\n const isPM = date.getHours() >= 12;\n if (isPM && value < 12) {\n date.setHours(value + 12, 0, 0, 0);\n } else {\n date.setHours(value, 0, 0, 0);\n }\n return date;\n }\n\n incompatibleTokens = [\"h\", \"H\", \"k\", \"t\", \"T\"];\n}\n","import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class Hour1To24Parser extends Parser {\n priority = 70;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"k\":\n return parseNumericPattern(numericPatterns.hour24h, dateString);\n case \"ko\":\n return match.ordinalNumber(dateString, { unit: \"hour\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 24;\n }\n\n set(date, _flags, value) {\n const hours = value <= 24 ? value % 24 : value;\n date.setHours(hours, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"a\", \"b\", \"h\", \"H\", \"K\", \"t\", \"T\"];\n}\n","import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class MinuteParser extends Parser {\n priority = 60;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"m\":\n return parseNumericPattern(numericPatterns.minute, dateString);\n case \"mo\":\n return match.ordinalNumber(dateString, { unit: \"minute\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 59;\n }\n\n set(date, _flags, value) {\n date.setMinutes(value, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"t\", \"T\"];\n}\n","import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class SecondParser extends Parser {\n priority = 50;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"s\":\n return parseNumericPattern(numericPatterns.second, dateString);\n case \"so\":\n return match.ordinalNumber(dateString, { unit: \"second\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 59;\n }\n\n set(date, _flags, value) {\n date.setSeconds(value, 0);\n return date;\n }\n\n incompatibleTokens = [\"t\", \"T\"];\n}\n","import { Parser } from \"../Parser.js\";\n\nimport { mapValue, parseNDigits } from \"../utils.js\";\n\nexport class FractionOfSecondParser extends Parser {\n priority = 30;\n\n parse(dateString, token) {\n const valueCallback = (value) =>\n Math.trunc(value * Math.pow(10, -token.length + 3));\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n\n set(date, _flags, value) {\n date.setMilliseconds(value);\n return date;\n }\n\n incompatibleTokens = [\"t\", \"T\"];\n}\n","import { constructFrom } from \"../../../constructFrom.js\";\nimport { getTimezoneOffsetInMilliseconds } from \"../../../_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseTimezonePattern } from \"../utils.js\";\n\n// Timezone (ISO-8601. +00:00 is `'Z'`)\nexport class ISOTimezoneWithZParser extends Parser {\n priority = 10;\n\n parse(dateString, token) {\n switch (token) {\n case \"X\":\n return parseTimezonePattern(\n timezonePatterns.basicOptionalMinutes,\n dateString,\n );\n case \"XX\":\n return parseTimezonePattern(timezonePatterns.basic, dateString);\n case \"XXXX\":\n return parseTimezonePattern(\n timezonePatterns.basicOptionalSeconds,\n dateString,\n );\n case \"XXXXX\":\n return parseTimezonePattern(\n timezonePatterns.extendedOptionalSeconds,\n dateString,\n );\n case \"XXX\":\n default:\n return parseTimezonePattern(timezonePatterns.extended, dateString);\n }\n }\n\n set(date, flags, value) {\n if (flags.timestampIsSet) return date;\n return constructFrom(\n date,\n date.getTime() - getTimezoneOffsetInMilliseconds(date) - value,\n );\n }\n\n incompatibleTokens = [\"t\", \"T\", \"x\"];\n}\n","import { constructFrom } from \"../../../constructFrom.js\";\nimport { getTimezoneOffsetInMilliseconds } from \"../../../_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseTimezonePattern } from \"../utils.js\";\n\n// Timezone (ISO-8601)\nexport class ISOTimezoneParser extends Parser {\n priority = 10;\n\n parse(dateString, token) {\n switch (token) {\n case \"x\":\n return parseTimezonePattern(\n timezonePatterns.basicOptionalMinutes,\n dateString,\n );\n case \"xx\":\n return parseTimezonePattern(timezonePatterns.basic, dateString);\n case \"xxxx\":\n return parseTimezonePattern(\n timezonePatterns.basicOptionalSeconds,\n dateString,\n );\n case \"xxxxx\":\n return parseTimezonePattern(\n timezonePatterns.extendedOptionalSeconds,\n dateString,\n );\n case \"xxx\":\n default:\n return parseTimezonePattern(timezonePatterns.extended, dateString);\n }\n }\n\n set(date, flags, value) {\n if (flags.timestampIsSet) return date;\n return constructFrom(\n date,\n date.getTime() - getTimezoneOffsetInMilliseconds(date) - value,\n );\n }\n\n incompatibleTokens = [\"t\", \"T\", \"X\"];\n}\n","import { constructFrom } from \"../../../constructFrom.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseAnyDigitsSigned } from \"../utils.js\";\n\nexport class TimestampSecondsParser extends Parser {\n priority = 40;\n\n parse(dateString) {\n return parseAnyDigitsSigned(dateString);\n }\n\n set(date, _flags, value) {\n return [constructFrom(date, value * 1000), { timestampIsSet: true }];\n }\n\n incompatibleTokens = \"*\";\n}\n","import { constructFrom } from \"../../../constructFrom.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseAnyDigitsSigned } from \"../utils.js\";\n\nexport class TimestampMillisecondsParser extends Parser {\n priority = 20;\n\n parse(dateString) {\n return parseAnyDigitsSigned(dateString);\n }\n\n set(date, _flags, value) {\n return [constructFrom(date, value), { timestampIsSet: true }];\n }\n\n incompatibleTokens = \"*\";\n}\n","import { EraParser } from \"./parsers/EraParser.js\";\nimport { YearParser } from \"./parsers/YearParser.js\";\nimport { LocalWeekYearParser } from \"./parsers/LocalWeekYearParser.js\";\nimport { ISOWeekYearParser } from \"./parsers/ISOWeekYearParser.js\";\nimport { ExtendedYearParser } from \"./parsers/ExtendedYearParser.js\";\nimport { QuarterParser } from \"./parsers/QuarterParser.js\";\nimport { StandAloneQuarterParser } from \"./parsers/StandAloneQuarterParser.js\";\nimport { MonthParser } from \"./parsers/MonthParser.js\";\nimport { StandAloneMonthParser } from \"./parsers/StandAloneMonthParser.js\";\nimport { LocalWeekParser } from \"./parsers/LocalWeekParser.js\";\nimport { ISOWeekParser } from \"./parsers/ISOWeekParser.js\";\nimport { DateParser } from \"./parsers/DateParser.js\";\nimport { DayOfYearParser } from \"./parsers/DayOfYearParser.js\";\nimport { DayParser } from \"./parsers/DayParser.js\";\nimport { LocalDayParser } from \"./parsers/LocalDayParser.js\";\nimport { StandAloneLocalDayParser } from \"./parsers/StandAloneLocalDayParser.js\";\nimport { ISODayParser } from \"./parsers/ISODayParser.js\";\nimport { AMPMParser } from \"./parsers/AMPMParser.js\";\nimport { AMPMMidnightParser } from \"./parsers/AMPMMidnightParser.js\";\nimport { DayPeriodParser } from \"./parsers/DayPeriodParser.js\";\nimport { Hour1to12Parser } from \"./parsers/Hour1to12Parser.js\";\nimport { Hour0to23Parser } from \"./parsers/Hour0to23Parser.js\";\nimport { Hour0To11Parser } from \"./parsers/Hour0To11Parser.js\";\nimport { Hour1To24Parser } from \"./parsers/Hour1To24Parser.js\";\nimport { MinuteParser } from \"./parsers/MinuteParser.js\";\nimport { SecondParser } from \"./parsers/SecondParser.js\";\nimport { FractionOfSecondParser } from \"./parsers/FractionOfSecondParser.js\";\nimport { ISOTimezoneWithZParser } from \"./parsers/ISOTimezoneWithZParser.js\";\nimport { ISOTimezoneParser } from \"./parsers/ISOTimezoneParser.js\";\nimport { TimestampSecondsParser } from \"./parsers/TimestampSecondsParser.js\";\nimport { TimestampMillisecondsParser } from \"./parsers/TimestampMillisecondsParser.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O* | Timezone (GMT) |\n * | p | | P | |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z* | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n */\nexport const parsers = {\n G: new EraParser(),\n y: new YearParser(),\n Y: new LocalWeekYearParser(),\n R: new ISOWeekYearParser(),\n u: new ExtendedYearParser(),\n Q: new QuarterParser(),\n q: new StandAloneQuarterParser(),\n M: new MonthParser(),\n L: new StandAloneMonthParser(),\n w: new LocalWeekParser(),\n I: new ISOWeekParser(),\n d: new DateParser(),\n D: new DayOfYearParser(),\n E: new DayParser(),\n e: new LocalDayParser(),\n c: new StandAloneLocalDayParser(),\n i: new ISODayParser(),\n a: new AMPMParser(),\n b: new AMPMMidnightParser(),\n B: new DayPeriodParser(),\n h: new Hour1to12Parser(),\n H: new Hour0to23Parser(),\n K: new Hour0To11Parser(),\n k: new Hour1To24Parser(),\n m: new MinuteParser(),\n s: new SecondParser(),\n S: new FractionOfSecondParser(),\n X: new ISOTimezoneWithZParser(),\n x: new ISOTimezoneParser(),\n t: new TimestampSecondsParser(),\n T: new TimestampMillisecondsParser(),\n};\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getDefaultOptions } from \"./getDefaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\nimport { DateTimezoneSetter } from \"./parse/_lib/Setter.js\";\nimport { parsers } from \"./parse/_lib/parsers.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { longFormatters, parsers };\n\n/**\n * The {@link parse} function options.\n */\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\n\nconst notWhitespaceRegExp = /\\S/;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\n/**\n * @name parse\n * @category Common Helpers\n * @summary Parse the date.\n *\n * @description\n * Return the date parsed from string using the given format string.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Format of the format string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 5 below the table).\n *\n * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited\n * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:\n *\n * ```javascript\n * parse('23 AM', 'HH a', new Date())\n * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time\n * ```\n *\n * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true\n *\n * Accepted format string patterns:\n * | Unit |Prior| Pattern | Result examples | Notes |\n * |---------------------------------|-----|---------|-----------------------------------|-------|\n * | Era | 140 | G..GGG | AD, BC | |\n * | | | GGGG | Anno Domini, Before Christ | 2 |\n * | | | GGGGG | A, B | |\n * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |\n * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | yy | 44, 01, 00, 17 | 4 |\n * | | | yyy | 044, 001, 123, 999 | 4 |\n * | | | yyyy | 0044, 0001, 1900, 2017 | 4 |\n * | | | yyyyy | ... | 2,4 |\n * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |\n * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | YY | 44, 01, 00, 17 | 4,6 |\n * | | | YYY | 044, 001, 123, 999 | 4 |\n * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |\n * | | | YYYYY | ... | 2,4 |\n * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |\n * | | | RR | -43, 01, 00, 17 | 4,5 |\n * | | | RRR | -043, 001, 123, 999, -999 | 4,5 |\n * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |\n * | | | RRRRR | ... | 2,4,5 |\n * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |\n * | | | uu | -43, 01, 99, -99 | 4 |\n * | | | uuu | -043, 001, 123, 999, -999 | 4 |\n * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |\n * | | | uuuuu | ... | 2,4 |\n * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |\n * | | | Qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | QQ | 01, 02, 03, 04 | |\n * | | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | |\n * | | | qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | qq | 01, 02, 03, 04 | |\n * | | | qqq | Q1, Q2, Q3, Q4 | |\n * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | | qqqqq | 1, 2, 3, 4 | 3 |\n * | Month (formatting) | 110 | M | 1, 2, ..., 12 | |\n * | | | Mo | 1st, 2nd, ..., 12th | 5 |\n * | | | MM | 01, 02, ..., 12 | |\n * | | | MMM | Jan, Feb, ..., Dec | |\n * | | | MMMM | January, February, ..., December | 2 |\n * | | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |\n * | | | Lo | 1st, 2nd, ..., 12th | 5 |\n * | | | LL | 01, 02, ..., 12 | |\n * | | | LLL | Jan, Feb, ..., Dec | |\n * | | | LLLL | January, February, ..., December | 2 |\n * | | | LLLLL | J, F, ..., D | |\n * | Local week of year | 100 | w | 1, 2, ..., 53 | |\n * | | | wo | 1st, 2nd, ..., 53th | 5 |\n * | | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |\n * | | | Io | 1st, 2nd, ..., 53th | 5 |\n * | | | II | 01, 02, ..., 53 | 5 |\n * | Day of month | 90 | d | 1, 2, ..., 31 | |\n * | | | do | 1st, 2nd, ..., 31st | 5 |\n * | | | dd | 01, 02, ..., 31 | |\n * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 |\n * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |\n * | | | DD | 01, 02, ..., 365, 366 | 7 |\n * | | | DDD | 001, 002, ..., 365, 366 | |\n * | | | DDDD | ... | 2 |\n * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | | EEEEE | M, T, W, T, F, S, S | |\n * | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |\n * | | | io | 1st, 2nd, ..., 7th | 5 |\n * | | | ii | 01, 02, ..., 07 | 5 |\n * | | | iii | Mon, Tue, Wed, ..., Sun | 5 |\n * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |\n * | | | iiiii | M, T, W, T, F, S, S | 5 |\n * | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |\n * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |\n * | | | eo | 2nd, 3rd, ..., 1st | 5 |\n * | | | ee | 02, 03, ..., 01 | |\n * | | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | | eeeee | M, T, W, T, F, S, S | |\n * | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |\n * | | | co | 2nd, 3rd, ..., 1st | 5 |\n * | | | cc | 02, 03, ..., 01 | |\n * | | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | | ccccc | M, T, W, T, F, S, S | |\n * | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | 80 | a..aaa | AM, PM | |\n * | | | aaaa | a.m., p.m. | 2 |\n * | | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |\n * | | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | | bbbbb | a, p, n, mi | |\n * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |\n * | | | BBBB | at night, in the morning, ... | 2 |\n * | | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |\n * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |\n * | | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |\n * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |\n * | | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |\n * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |\n * | | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |\n * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |\n * | | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | 60 | m | 0, 1, ..., 59 | |\n * | | | mo | 0th, 1st, ..., 59th | 5 |\n * | | | mm | 00, 01, ..., 59 | |\n * | Second | 50 | s | 0, 1, ..., 59 | |\n * | | | so | 0th, 1st, ..., 59th | 5 |\n * | | | ss | 00, 01, ..., 59 | |\n * | Seconds timestamp | 40 | t | 512969520 | |\n * | | | tt | ... | 2 |\n * | Fraction of second | 30 | S | 0, 1, ..., 9 | |\n * | | | SS | 00, 01, ..., 99 | |\n * | | | SSS | 000, 001, ..., 999 | |\n * | | | SSSS | ... | 2 |\n * | Milliseconds timestamp | 20 | T | 512969520900 | |\n * | | | TT | ... | 2 |\n * | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | |\n * | | | XX | -0800, +0530, Z | |\n * | | | XXX | -08:00, +05:30, Z | |\n * | | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | |\n * | | | xx | -0800, +0530, +0000 | |\n * | | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Long localized date | NA | P | 05/29/1453 | 5,8 |\n * | | | PP | May 29, 1453 | |\n * | | | PPP | May 29th, 1453 | |\n * | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 |\n * | Long localized time | NA | p | 12:00 AM | 5,8 |\n * | | | pp | 12:00:00 AM | |\n * | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | |\n * | | | PPpp | May 29, 1453, 12:00:00 AM | |\n * | | | PPPpp | May 29th, 1453 at ... | |\n * | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular.\n * In `format` function, they will produce different result:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * `parse` will try to match both formatting and stand-alone units interchangeably.\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table:\n * - for numerical units (`yyyyyyyy`) `parse` will try to match a number\n * as wide as the sequence\n * - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.\n * These variations are marked with \"2\" in the last column of the table.\n *\n * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 4. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:\n *\n * `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`\n *\n * `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`\n *\n * while `uu` will just assign the year as is:\n *\n * `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`\n *\n * `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [setISOWeekYear](https://date-fns.org/docs/setISOWeekYear)\n * and [setWeekYear](https://date-fns.org/docs/setWeekYear)).\n *\n * 5. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 7. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based\n * on the given locale.\n *\n * using `en-US` locale: `P` => `MM/dd/yyyy`\n * using `en-US` locale: `p` => `hh:mm a`\n * using `pt-BR` locale: `P` => `dd/MM/yyyy`\n * using `pt-BR` locale: `p` => `HH:mm`\n *\n * Values will be assigned to the date in the descending order of its unit's priority.\n * Units of an equal priority overwrite each other in the order of appearance.\n *\n * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),\n * the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.\n *\n * `referenceDate` must be passed for correct work of the function.\n * If you're not sure which `referenceDate` to supply, create a new instance of Date:\n * `parse('02/11/2014', 'MM/dd/yyyy', new Date())`\n * In this case parsing will be done in the context of the current date.\n * If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,\n * then `Invalid Date` will be returned.\n *\n * The result may vary by locale.\n *\n * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.\n *\n * If parsing failed, `Invalid Date` will be returned.\n * Invalid Date is a Date, whose time value is NaN.\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dateStr - The string to parse\n * @param formatStr - The string of tokens\n * @param referenceDate - defines values missing from the parsed dateString\n * @param options - An object with options.\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @returns The parsed date\n *\n * @throws `options.locale` must contain `match` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Parse 11 February 2014 from middle-endian format:\n * var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())\n * //=> Tue Feb 11 2014 00:00:00\n *\n * @example\n * // Parse 28th of February in Esperanto locale in the context of 2010 year:\n * import eo from 'date-fns/locale/eo'\n * var result = parse('28-a de februaro', \"do 'de' MMMM\", new Date(2010, 0, 1), {\n * locale: eo\n * })\n * //=> Sun Feb 28 2010 00:00:00\n */\nexport function parse(dateStr, formatStr, referenceDate, options) {\n const invalidDate = () => constructFrom(options?.in || referenceDate, NaN);\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n if (!formatStr)\n return dateStr ? invalidDate() : toDate(referenceDate, options?.in);\n\n const subFnOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n // If timezone isn't specified, it will try to use the context or\n // the reference date and fallback to the system time zone.\n const setters = [new DateTimezoneSetter(options?.in, referenceDate)];\n\n const tokens = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter in longFormatters) {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp);\n\n const usedTokens = [];\n\n for (let token of tokens) {\n if (\n !options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)\n ) {\n warnOrThrowProtectedError(token, formatStr, dateStr);\n }\n if (\n !options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token)\n ) {\n warnOrThrowProtectedError(token, formatStr, dateStr);\n }\n\n const firstCharacter = token[0];\n const parser = parsers[firstCharacter];\n if (parser) {\n const { incompatibleTokens } = parser;\n if (Array.isArray(incompatibleTokens)) {\n const incompatibleToken = usedTokens.find(\n (usedToken) =>\n incompatibleTokens.includes(usedToken.token) ||\n usedToken.token === firstCharacter,\n );\n if (incompatibleToken) {\n throw new RangeError(\n `The format string mustn't contain \\`${incompatibleToken.fullToken}\\` and \\`${token}\\` at the same time`,\n );\n }\n } else if (parser.incompatibleTokens === \"*\" && usedTokens.length > 0) {\n throw new RangeError(\n `The format string mustn't contain \\`${token}\\` and any other token at the same time`,\n );\n }\n\n usedTokens.push({ token: firstCharacter, fullToken: token });\n\n const parseResult = parser.run(\n dateStr,\n token,\n locale.match,\n subFnOptions,\n );\n\n if (!parseResult) {\n return invalidDate();\n }\n\n setters.push(parseResult.setter);\n\n dateStr = parseResult.rest;\n } else {\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n // Replace two single quote characters with one single quote character\n if (token === \"''\") {\n token = \"'\";\n } else if (firstCharacter === \"'\") {\n token = cleanEscapedString(token);\n }\n\n // Cut token from string, or, if string doesn't match the token, return Invalid Date\n if (dateStr.indexOf(token) === 0) {\n dateStr = dateStr.slice(token.length);\n } else {\n return invalidDate();\n }\n }\n }\n\n // Check if the remaining input contains something other than whitespace\n if (dateStr.length > 0 && notWhitespaceRegExp.test(dateStr)) {\n return invalidDate();\n }\n\n const uniquePrioritySetters = setters\n .map((setter) => setter.priority)\n .sort((a, b) => b - a)\n .filter((priority, index, array) => array.indexOf(priority) === index)\n .map((priority) =>\n setters\n .filter((setter) => setter.priority === priority)\n .sort((a, b) => b.subPriority - a.subPriority),\n )\n .map((setterArray) => setterArray[0]);\n\n let date = toDate(referenceDate, options?.in);\n\n if (isNaN(+date)) return invalidDate();\n\n const flags = {};\n for (const setter of uniquePrioritySetters) {\n if (!setter.validate(date, subFnOptions)) {\n return invalidDate();\n }\n\n const result = setter.set(date, flags, subFnOptions);\n // Result is tuple (date, flags)\n if (Array.isArray(result)) {\n date = result[0];\n Object.assign(flags, result[1]);\n // Result is date\n } else {\n date = result;\n }\n }\n\n return date;\n}\n\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default parse;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfQuarter } from \"./startOfQuarter.js\";\n\n/**\n * The {@link isSameQuarter} function options.\n */\n\n/**\n * @name isSameQuarter\n * @category Quarter Helpers\n * @summary Are the given dates in the same quarter (and year)?\n *\n * @description\n * Are the given dates in the same quarter (and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same quarter (and year)\n *\n * @example\n * // Are 1 January 2014 and 8 March 2014 in the same quarter?\n * const result = isSameQuarter(new Date(2014, 0, 1), new Date(2014, 2, 8))\n * //=> true\n *\n * @example\n * // Are 1 January 2014 and 1 January 2015 in the same quarter?\n * const result = isSameQuarter(new Date(2014, 0, 1), new Date(2015, 0, 1))\n * //=> false\n */\nexport function isSameQuarter(laterDate, earlierDate, options) {\n const [dateLeft_, dateRight_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return +startOfQuarter(dateLeft_) === +startOfQuarter(dateRight_);\n}\n\n// Fallback for modularized imports:\nexport default isSameQuarter;\n","import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link subDays} function options.\n */\n\n/**\n * @name subDays\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the days subtracted\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * const result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\nexport function subDays(date, amount, options) {\n return addDays(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subDays;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getDaysInMonth } from \"./getDaysInMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMonth} function options.\n */\n\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param month - The month index to set (0-11)\n * @param options - The options\n *\n * @returns The new date with the month set\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport function setMonth(date, month, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const day = _date.getDate();\n\n const midMonth = constructFrom(options?.in || date, 0);\n midMonth.setFullYear(year, month, 15);\n midMonth.setHours(0, 0, 0, 0);\n const daysInMonth = getDaysInMonth(midMonth);\n\n // Set the earlier date, allows to wrap Jan 31 to Feb 28\n _date.setMonth(month, Math.min(day, daysInMonth));\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMonth;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { setMonth } from \"./setMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link set} function options.\n */\n\n/**\n * @name set\n * @category Common Helpers\n * @summary Set date values to a given date.\n *\n * @description\n * Set date values to a given date.\n *\n * Sets time values to date from object `values`.\n * A value is not set if it is undefined or null or doesn't exist in `values`.\n *\n * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts\n * to use native `Date#setX` methods. If you use this function, you may not want to include the\n * other `setX` functions that date-fns provides if you are concerned about the bundle size.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param values - The date values to be set\n * @param options - The options\n *\n * @returns The new date with options set\n *\n * @example\n * // Transform 1 September 2014 into 20 October 2015 in a single line:\n * const result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 })\n * //=> Tue Oct 20 2015 00:00:00\n *\n * @example\n * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00:\n * const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 })\n * //=> Mon Sep 01 2014 12:23:45\n */\nexport function set(date, values, options) {\n let _date = toDate(date, options?.in);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(+_date)) return constructFrom(options?.in || date, NaN);\n\n if (values.year != null) _date.setFullYear(values.year);\n if (values.month != null) _date = setMonth(_date, values.month);\n if (values.date != null) _date.setDate(values.date);\n if (values.hours != null) _date.setHours(values.hours);\n if (values.minutes != null) _date.setMinutes(values.minutes);\n if (values.seconds != null) _date.setSeconds(values.seconds);\n if (values.milliseconds != null) _date.setMilliseconds(values.milliseconds);\n\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default set;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setHours} function options.\n */\n\n/**\n * @name setHours\n * @category Hour Helpers\n * @summary Set the hours to the given date.\n *\n * @description\n * Set the hours to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param hours - The hours of the new date\n * @param options - An object with options\n *\n * @returns The new date with the hours set\n *\n * @example\n * // Set 4 hours to 1 September 2014 11:30:00:\n * const result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n * //=> Mon Sep 01 2014 04:30:00\n */\nexport function setHours(date, hours, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(hours);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setHours;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMilliseconds} function options.\n */\n\n/**\n * @name setMilliseconds\n * @category Millisecond Helpers\n * @summary Set the milliseconds to the given date.\n *\n * @description\n * Set the milliseconds to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param milliseconds - The milliseconds of the new date\n * @param options - The options\n *\n * @returns The new date with the milliseconds set\n *\n * @example\n * // Set 300 milliseconds to 1 September 2014 11:30:40.500:\n * const result = setMilliseconds(new Date(2014, 8, 1, 11, 30, 40, 500), 300)\n * //=> Mon Sep 01 2014 11:30:40.300\n */\nexport function setMilliseconds(date, milliseconds, options) {\n const _date = toDate(date, options?.in);\n _date.setMilliseconds(milliseconds);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMilliseconds;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMinutes} function options.\n */\n\n/**\n * @name setMinutes\n * @category Minute Helpers\n * @summary Set the minutes to the given date.\n *\n * @description\n * Set the minutes to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, returned from the context function, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param minutes - The minutes of the new date\n * @param options - An object with options\n *\n * @returns The new date with the minutes set\n *\n * @example\n * // Set 45 minutes to 1 September 2014 11:30:40:\n * const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:45:40\n */\nexport function setMinutes(date, minutes, options) {\n const date_ = toDate(date, options?.in);\n date_.setMinutes(minutes);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default setMinutes;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setSeconds} function options.\n */\n\n/**\n * @name setSeconds\n * @category Second Helpers\n * @summary Set the seconds to the given date, with context support.\n *\n * @description\n * Set the seconds to the given date, with an optional context for time zone specification.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param seconds - The seconds of the new date\n * @param options - An object with options\n *\n * @returns The new date with the seconds set\n *\n * @example\n * // Set 45 seconds to 1 September 2014 11:30:40:\n * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:30:45\n */\nexport function setSeconds(date, seconds, options) {\n const _date = toDate(date, options?.in);\n _date.setSeconds(seconds);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setSeconds;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setYear} function options.\n */\n\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param year - The year of the new date\n * @param options - An object with options.\n *\n * @returns The new date with the year set\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport function setYear(date, year, options) {\n const date_ = toDate(date, options?.in);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(+date_)) return constructFrom(options?.in || date, NaN);\n\n date_.setFullYear(year);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default setYear;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The subMonths function options.\n */\n\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function subMonths(date, amount, options) {\n return addMonths(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subMonths;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { subDays } from \"./subDays.js\";\nimport { subMonths } from \"./subMonths.js\";\n\n/**\n * The {@link sub} function options.\n */\n\n/**\n * @name sub\n * @category Common Helpers\n * @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @description\n * Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be subtracted\n * @param options - An object with options\n *\n * | Key | Description |\n * |---------|------------------------------------|\n * | years | Amount of years to be subtracted |\n * | months | Amount of months to be subtracted |\n * | weeks | Amount of weeks to be subtracted |\n * | days | Amount of days to be subtracted |\n * | hours | Amount of hours to be subtracted |\n * | minutes | Amount of minutes to be subtracted |\n * | seconds | Amount of seconds to be subtracted |\n *\n * All values default to 0\n *\n * @returns The new date with the seconds subtracted\n *\n * @example\n * // Subtract the following duration from 15 June 2017 15:29:20\n * const result = sub(new Date(2017, 5, 15, 15, 29, 20), {\n * years: 2,\n * months: 9,\n * weeks: 1,\n * days: 7,\n * hours: 5,\n * minutes: 9,\n * seconds: 30\n * })\n * //=> Mon Sep 1 2014 10:19:50\n */\nexport function sub(date, duration, options) {\n const {\n years = 0,\n months = 0,\n weeks = 0,\n days = 0,\n hours = 0,\n minutes = 0,\n seconds = 0,\n } = duration;\n\n const withoutMonths = subMonths(date, months + years * 12, options);\n const withoutDays = subDays(withoutMonths, days + weeks * 7, options);\n\n const minutesToSub = minutes + hours * 60;\n const secondsToSub = seconds + minutesToSub * 60;\n const msToSub = secondsToSub * 1000;\n\n return constructFrom(options?.in || date, +withoutDays - msToSub);\n}\n\n// Fallback for modularized imports:\nexport default sub;\n","import { addYears } from \"./addYears.js\";\n\n/**\n * The {@link subYears} function options.\n */\n\n/**\n * @name subYears\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the years subtracted\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * const result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\nexport function subYears(date, amount, options) {\n return addYears(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subYears;\n","import { useAttrs as qn, openBlock as A, createElementBlock as V, createElementVNode as ge, unref as s, reactive as Zt, computed as Q, ref as te, toRef as Gt, watch as ot, defineComponent as Ve, onMounted as je, onUnmounted as xt, renderSlot as de, normalizeProps as ze, mergeProps as He, Fragment as ke, normalizeStyle as rt, createCommentVNode as J, createTextVNode as gt, toDisplayString as Qe, onBeforeUpdate as Xn, nextTick as nt, normalizeClass as De, withModifiers as Qt, renderList as Be, withDirectives as sa, vShow as ua, createBlock as Te, withCtx as we, withKeys as Jn, createVNode as at, Transition as Ut, createSlots as qe, useSlots as Bt, guardReactiveProps as xe, resolveDynamicComponent as fa, toValue as Zn, h as xn, render as an, getCurrentScope as el, onScopeDispose as tl, isRef as nn, Teleport as al } from \"vue\";\nimport { format as vt, isEqual as Et, set as Pe, startOfMonth as nl, isAfter as Ot, getYear as ye, getMonth as $e, setMonth as ll, setYear as ft, addMonths as Pt, subMonths as qt, isValid as ia, isBefore as Ft, eachDayOfInterval as hn, setHours as rl, setMinutes as ol, setSeconds as bn, setMilliseconds as kn, getHours as ht, getMinutes as $t, getSeconds as Lt, startOfWeek as Ua, endOfWeek as wn, parse as Na, isDate as sl, subDays as ul, addDays as kt, addHours as il, addYears as Dn, subYears as Mn, endOfYear as $n, startOfYear as da, differenceInYears as dl, add as An, sub as cl, getWeek as fl, getISOWeek as vl, isSameQuarter as ln, eachQuarterOfInterval as ml, startOfQuarter as pl, endOfQuarter as rn, getQuarter as on, getDay as yl, differenceInCalendarDays as gl } from \"date-fns\";\nfunction Wt() {\n const e = qn();\n return A(), V(\n \"svg\",\n {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 32\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n class: \"dp__icon\",\n role: \"img\",\n ...e\n },\n [\n ge(\"path\", {\n d: \"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z\"\n }),\n ge(\"path\", {\n d: \"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z\"\n }),\n ge(\"path\", {\n d: \"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z\"\n }),\n ge(\"path\", {\n d: \"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z\"\n })\n ]\n );\n}\nWt.compatConfig = {\n MODE: 3\n};\nfunction Tn() {\n return A(), V(\n \"svg\",\n {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 32\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n class: \"dp__icon\",\n role: \"img\"\n },\n [\n ge(\"path\", {\n d: \"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z\"\n }),\n ge(\"path\", {\n d: \"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z\"\n })\n ]\n );\n}\nTn.compatConfig = {\n MODE: 3\n};\nfunction Wa() {\n return A(), V(\n \"svg\",\n {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 32\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n class: \"dp__icon\",\n role: \"img\"\n },\n [\n ge(\"path\", {\n d: \"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z\"\n })\n ]\n );\n}\nWa.compatConfig = {\n MODE: 3\n};\nfunction Va() {\n return A(), V(\n \"svg\",\n {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 32\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n class: \"dp__icon\",\n role: \"img\"\n },\n [\n ge(\"path\", {\n d: \"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z\"\n })\n ]\n );\n}\nVa.compatConfig = {\n MODE: 3\n};\nfunction ja() {\n return A(), V(\n \"svg\",\n {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 32\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n class: \"dp__icon\",\n role: \"img\"\n },\n [\n ge(\"path\", {\n d: \"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z\"\n }),\n ge(\"path\", {\n d: \"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z\"\n })\n ]\n );\n}\nja.compatConfig = {\n MODE: 3\n};\nfunction Ka() {\n return A(), V(\n \"svg\",\n {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 32\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n class: \"dp__icon\",\n role: \"img\"\n },\n [\n ge(\"path\", {\n d: \"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z\"\n })\n ]\n );\n}\nKa.compatConfig = {\n MODE: 3\n};\nfunction Ga() {\n return A(), V(\n \"svg\",\n {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 32\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n class: \"dp__icon\",\n role: \"img\"\n },\n [\n ge(\"path\", {\n d: \"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z\"\n })\n ]\n );\n}\nGa.compatConfig = {\n MODE: 3\n};\nconst et = (e, t) => t ? new Date(e.toLocaleString(\"en-US\", { timeZone: t })) : new Date(e), Qa = (e, t, r) => {\n const a = Fa(e, t, r);\n return a || j();\n}, hl = (e, t, r) => {\n const a = t.dateInTz ? et(new Date(e), t.dateInTz) : j(e);\n return r ? We(a, !0) : a;\n}, Fa = (e, t, r) => {\n if (!e) return null;\n const a = r ? We(j(e), !0) : j(e);\n return t ? t.exactMatch ? hl(e, t, r) : et(a, t.timezone) : a;\n}, bl = (e) => {\n const r = new Date(e.getFullYear(), 0, 1).getTimezoneOffset();\n return e.getTimezoneOffset() < r;\n}, kl = (e, t) => {\n if (!e) return 0;\n const r = /* @__PURE__ */ new Date(), a = new Date(r.toLocaleString(\"en-US\", { timeZone: \"UTC\" })), n = new Date(r.toLocaleString(\"en-US\", { timeZone: e })), d = (bl(t ?? n) ? n : t ?? n).getTimezoneOffset() / 60;\n return (+a - +n) / (1e3 * 60 * 60) - d;\n};\nvar ut = /* @__PURE__ */ ((e) => (e.month = \"month\", e.year = \"year\", e))(ut || {}), it = /* @__PURE__ */ ((e) => (e.top = \"top\", e.bottom = \"bottom\", e))(it || {}), Rt = /* @__PURE__ */ ((e) => (e.header = \"header\", e.calendar = \"calendar\", e.timePicker = \"timePicker\", e))(Rt || {}), Ge = /* @__PURE__ */ ((e) => (e.month = \"month\", e.year = \"year\", e.calendar = \"calendar\", e.time = \"time\", e.minutes = \"minutes\", e.hours = \"hours\", e.seconds = \"seconds\", e))(Ge || {});\nconst wl = [\"timestamp\", \"date\", \"iso\"];\nvar Je = /* @__PURE__ */ ((e) => (e.up = \"up\", e.down = \"down\", e.left = \"left\", e.right = \"right\", e))(Je || {}), Oe = /* @__PURE__ */ ((e) => (e.arrowUp = \"ArrowUp\", e.arrowDown = \"ArrowDown\", e.arrowLeft = \"ArrowLeft\", e.arrowRight = \"ArrowRight\", e.enter = \"Enter\", e.space = \" \", e.esc = \"Escape\", e.tab = \"Tab\", e.home = \"Home\", e.end = \"End\", e.pageUp = \"PageUp\", e.pageDown = \"PageDown\", e))(Oe || {}), Nt = /* @__PURE__ */ ((e) => (e.MONTH_AND_YEAR = \"MM-yyyy\", e.YEAR = \"yyyy\", e.DATE = \"dd-MM-yyyy\", e))(Nt || {});\nfunction sn(e) {\n return (t) => new Intl.DateTimeFormat(e, { weekday: \"short\", timeZone: \"UTC\" }).format(/* @__PURE__ */ new Date(`2017-01-0${t}T00:00:00+00:00`)).slice(0, 2);\n}\nfunction Dl(e) {\n return (t) => vt(et(/* @__PURE__ */ new Date(`2017-01-0${t}T00:00:00+00:00`), \"UTC\"), \"EEEEEE\", { locale: e });\n}\nconst Ml = (e, t, r) => {\n const a = [1, 2, 3, 4, 5, 6, 7];\n let n;\n if (e !== null)\n try {\n n = a.map(Dl(e));\n } catch {\n n = a.map(sn(t));\n }\n else\n n = a.map(sn(t));\n const u = n.slice(0, r), d = n.slice(r + 1, n.length);\n return [n[r]].concat(...d).concat(...u);\n}, qa = (e, t, r) => {\n const a = [];\n for (let n = +e[0]; n <= +e[1]; n++)\n a.push({ value: +n, text: Cn(n, t) });\n return r ? a.reverse() : a;\n}, Sn = (e, t, r) => {\n const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((u) => {\n const d = u < 10 ? `0${u}` : u;\n return /* @__PURE__ */ new Date(`2017-${d}-01T00:00:00+00:00`);\n });\n if (e !== null)\n try {\n const u = r === \"long\" ? \"LLLL\" : \"LLL\";\n return a.map((d, y) => {\n const i = vt(et(d, \"UTC\"), u, { locale: e });\n return {\n text: i.charAt(0).toUpperCase() + i.substring(1),\n value: y\n };\n });\n } catch {\n }\n const n = new Intl.DateTimeFormat(t, { month: r, timeZone: \"UTC\" });\n return a.map((u, d) => {\n const y = n.format(u);\n return {\n text: y.charAt(0).toUpperCase() + y.substring(1),\n value: d\n };\n });\n}, $l = (e) => [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11][e], Le = (e) => {\n const t = s(e);\n return t != null && t.$el ? t == null ? void 0 : t.$el : t;\n}, Al = (e) => ({ type: \"dot\", ...e ?? {} }), Pn = (e) => Array.isArray(e) ? !!e[0] && !!e[1] : !1, Xa = {\n prop: (e) => `\"${e}\" prop must be enabled!`,\n dateArr: (e) => `You need to use array as \"model-value\" binding in order to support \"${e}\"`\n}, Ne = (e) => e, un = (e) => e === 0 ? e : !e || isNaN(+e) ? null : +e, dn = (e) => e === null, Rn = (e) => {\n if (e)\n return [...e.querySelectorAll(\"input, button, select, textarea, a[href]\")][0];\n}, Tl = (e) => {\n const t = [], r = (a) => a.filter((n) => n);\n for (let a = 0; a < e.length; a += 3) {\n const n = [e[a], e[a + 1], e[a + 2]];\n t.push(r(n));\n }\n return t;\n}, Xt = (e, t, r) => {\n const a = r != null, n = t != null;\n if (!a && !n) return !1;\n const u = +r, d = +t;\n return a && n ? +e > u || +e < d : a ? +e > u : n ? +e < d : !1;\n}, zt = (e, t) => Tl(e).map((r) => r.map((a) => {\n const { active: n, disabled: u, isBetween: d, highlighted: y } = t(a);\n return {\n ...a,\n active: n,\n disabled: u,\n className: {\n dp__overlay_cell_active: n,\n dp__overlay_cell: !n,\n dp__overlay_cell_disabled: u,\n dp__overlay_cell_pad: !0,\n dp__overlay_cell_active_disabled: u && n,\n dp__cell_in_between: d,\n \"dp--highlighted\": y\n }\n };\n})), Dt = (e, t, r = !1) => {\n e && t.allowStopPropagation && (r && e.stopImmediatePropagation(), e.stopPropagation());\n}, Sl = () => [\n \"a[href]\",\n \"area[href]\",\n \"input:not([disabled]):not([type='hidden'])\",\n \"select:not([disabled])\",\n \"textarea:not([disabled])\",\n \"button:not([disabled])\",\n \"[tabindex]:not([tabindex='-1'])\",\n \"[data-datepicker-instance]\"\n].join(\", \");\nfunction Pl(e, t) {\n let r = [...document.querySelectorAll(Sl())];\n r = r.filter((n) => !e.contains(n) || n.hasAttribute(\"data-datepicker-instance\"));\n const a = r.indexOf(e);\n if (a >= 0 && (t ? a - 1 >= 0 : a + 1 <= r.length))\n return r[a + (t ? -1 : 1)];\n}\nconst La = (e, t) => e == null ? void 0 : e.querySelector(`[data-dp-element=\"${t}\"]`), Cn = (e, t) => new Intl.NumberFormat(t, { useGrouping: !1, style: \"decimal\" }).format(e), Ja = (e, t) => vt(e, t ?? Nt.DATE), Ta = (e) => Array.isArray(e), ca = (e, t, r) => t.get(Ja(e, r)), Rl = (e, t) => e ? t ? t instanceof Map ? !!ca(e, t) : t(j(e)) : !1 : !0, Ze = (e, t, r = !1, a) => {\n if (e.key === Oe.enter || e.key === Oe.space)\n return r && e.preventDefault(), t();\n if (a) return a(e);\n}, Cl = () => \"ontouchstart\" in window || navigator.maxTouchPoints > 0, Ol = (e, t) => e ? Nt.MONTH_AND_YEAR : t ? Nt.YEAR : Nt.DATE, On = (e) => e < 10 ? `0${e}` : e, cn = (e, t, r, a, n, u) => {\n const d = Na(e, t.slice(0, e.length), /* @__PURE__ */ new Date(), { locale: u });\n return ia(d) && sl(d) ? a || n ? d : Pe(d, {\n hours: +r.hours,\n minutes: +(r == null ? void 0 : r.minutes),\n seconds: +(r == null ? void 0 : r.seconds),\n milliseconds: 0\n }) : null;\n}, Bl = (e, t, r, a, n, u) => {\n const d = Array.isArray(r) ? r[0] : r;\n if (typeof t == \"string\")\n return cn(e, t, d, a, n, u);\n if (Array.isArray(t)) {\n let y = null;\n for (const i of t)\n if (y = cn(e, i, d, a, n, u), y)\n break;\n return y;\n }\n return typeof t == \"function\" ? t(e) : null;\n}, j = (e) => e ? new Date(e) : /* @__PURE__ */ new Date(), _l = (e, t, r) => {\n if (t) {\n const n = (e.getMonth() + 1).toString().padStart(2, \"0\"), u = e.getDate().toString().padStart(2, \"0\"), d = e.getHours().toString().padStart(2, \"0\"), y = e.getMinutes().toString().padStart(2, \"0\"), i = r ? e.getSeconds().toString().padStart(2, \"0\") : \"00\";\n return `${e.getFullYear()}-${n}-${u}T${d}:${y}:${i}.000Z`;\n }\n const a = Date.UTC(\n e.getUTCFullYear(),\n e.getUTCMonth(),\n e.getUTCDate(),\n e.getUTCHours(),\n e.getUTCMinutes(),\n e.getUTCSeconds()\n );\n return new Date(a).toISOString();\n}, We = (e, t) => {\n const r = j(JSON.parse(JSON.stringify(e))), a = Pe(r, { hours: 0, minutes: 0, seconds: 0, milliseconds: 0 });\n return t ? nl(a) : a;\n}, Mt = (e, t, r, a) => {\n let n = e ? j(e) : j();\n return (t || t === 0) && (n = rl(n, +t)), (r || r === 0) && (n = ol(n, +r)), (a || a === 0) && (n = bn(n, +a)), kn(n, 0);\n}, Ye = (e, t) => !e || !t ? !1 : Ft(We(e), We(t)), Ae = (e, t) => !e || !t ? !1 : Et(We(e), We(t)), Ee = (e, t) => !e || !t ? !1 : Ot(We(e), We(t)), Jt = (e, t, r) => e != null && e[0] && (e != null && e[1]) ? Ee(r, e[0]) && Ye(r, e[1]) : e != null && e[0] && t ? Ee(r, e[0]) && Ye(r, t) || Ye(r, e[0]) && Ee(r, t) : !1, dt = (e) => {\n const t = Pe(new Date(e), { date: 1 });\n return We(t);\n}, Sa = (e, t, r) => t && (r || r === 0) ? Object.fromEntries(\n [\"hours\", \"minutes\", \"seconds\"].map((a) => a === t ? [a, r] : [a, isNaN(+e[a]) ? void 0 : +e[a]])\n) : {\n hours: isNaN(+e.hours) ? void 0 : +e.hours,\n minutes: isNaN(+e.minutes) ? void 0 : +e.minutes,\n seconds: isNaN(+e.seconds) ? void 0 : +e.seconds\n}, Ct = (e) => ({\n hours: ht(e),\n minutes: $t(e),\n seconds: Lt(e)\n}), Bn = (e, t) => {\n if (t) {\n const r = ye(j(t));\n if (r > e) return 12;\n if (r === e) return $e(j(t));\n }\n}, _n = (e, t) => {\n if (t) {\n const r = ye(j(t));\n return r < e ? -1 : r === e ? $e(j(t)) : void 0;\n }\n}, Ht = (e) => {\n if (e) return ye(j(e));\n}, Yn = (e, t) => {\n const r = Ee(e, t) ? t : e, a = Ee(t, e) ? t : e;\n return hn({ start: r, end: a });\n}, Yl = (e) => {\n const t = Pt(e, 1);\n return { month: $e(t), year: ye(t) };\n}, pt = (e, t) => {\n const r = Ua(e, { weekStartsOn: +t }), a = wn(e, { weekStartsOn: +t });\n return [r, a];\n}, In = (e, t) => {\n const r = {\n hours: ht(j()),\n minutes: $t(j()),\n seconds: t ? Lt(j()) : 0\n };\n return Object.assign(r, e);\n}, wt = (e, t, r) => [Pe(j(e), { date: 1 }), Pe(j(), { month: t, year: r, date: 1 })], yt = (e, t, r) => {\n let a = e ? j(e) : j();\n return (t || t === 0) && (a = ll(a, t)), r && (a = ft(a, r)), a;\n}, En = (e, t, r, a, n) => {\n if (!a || n && !t || !n && !r) return !1;\n const u = n ? Pt(e, 1) : qt(e, 1), d = [$e(u), ye(u)];\n return n ? !El(...d, t) : !Il(...d, r);\n}, Il = (e, t, r) => Ye(...wt(r, e, t)) || Ae(...wt(r, e, t)), El = (e, t, r) => Ee(...wt(r, e, t)) || Ae(...wt(r, e, t)), Nn = (e, t, r, a, n, u, d) => {\n if (typeof t == \"function\" && !d) return t(e);\n const y = r ? { locale: r } : void 0;\n return Array.isArray(e) ? `${vt(e[0], u, y)}${n && !e[1] ? \"\" : a}${e[1] ? vt(e[1], u, y) : \"\"}` : vt(e, u, y);\n}, Yt = (e) => {\n if (e) return null;\n throw new Error(Xa.prop(\"partial-range\"));\n}, ra = (e, t) => {\n if (t) return e();\n throw new Error(Xa.prop(\"range\"));\n}, za = (e) => Array.isArray(e) ? ia(e[0]) && (e[1] ? ia(e[1]) : !0) : e ? ia(e) : !1, Nl = (e, t) => Pe(t ?? j(), {\n hours: +e.hours || 0,\n minutes: +e.minutes || 0,\n seconds: +e.seconds || 0\n}), Pa = (e, t, r, a) => {\n if (!e) return !0;\n if (a) {\n const n = r === \"max\" ? Ft(e, t) : Ot(e, t), u = { seconds: 0, milliseconds: 0 };\n return n || Et(Pe(e, u), Pe(t, u));\n }\n return r === \"max\" ? e.getTime() <= t.getTime() : e.getTime() >= t.getTime();\n}, Ra = (e, t, r) => e ? Nl(e, t) : j(r ?? t), fn = (e, t, r, a, n) => {\n if (Array.isArray(a)) {\n const d = Ra(e, a[0], t), y = Ra(e, a[1], t);\n return Pa(a[0], d, r, !!t) && Pa(a[1], y, r, !!t) && n;\n }\n const u = Ra(e, a, t);\n return Pa(a, u, r, !!t) && n;\n}, Ca = (e) => Pe(j(), Ct(e)), Fl = (e, t, r) => {\n if (e instanceof Map) {\n const a = `${On(r + 1)}-${t}`;\n return e.size ? e.has(a) : !1;\n }\n return !1;\n}, Ll = (e, t, r) => {\n if (e instanceof Map) {\n const a = `${On(r + 1)}-${t}`;\n return e.size ? e.has(a) : !0;\n }\n return !0;\n}, Fn = (e, t, r) => typeof e == \"function\" ? e({ month: t, year: r }) : !!e.months.find((a) => a.month === t && a.year === r), Za = (e, t) => typeof e == \"function\" ? e(t) : e.years.includes(t), Ha = (e) => `dp-${vt(e, \"yyyy-MM-dd\")}`, vn = (e, t) => {\n const r = ul(We(t), e), a = kt(We(t), e);\n return { before: r, after: a };\n}, jt = Zt({\n menuFocused: !1,\n shiftKeyInMenu: !1\n}), Ln = () => {\n const e = (a) => {\n jt.menuFocused = a;\n }, t = (a) => {\n jt.shiftKeyInMenu !== a && (jt.shiftKeyInMenu = a);\n };\n return {\n control: Q(() => ({ shiftKeyInMenu: jt.shiftKeyInMenu, menuFocused: jt.menuFocused })),\n setMenuFocused: e,\n setShiftKey: t\n };\n}, Ce = Zt({\n monthYear: [],\n calendar: [],\n time: [],\n actionRow: [],\n selectionGrid: [],\n timePicker: {\n 0: [],\n 1: []\n },\n monthPicker: []\n}), Oa = te(null), oa = te(!1), Ba = te(!1), _a = te(!1), Ya = te(!1), Ke = te(0), Ie = te(0), At = () => {\n const e = Q(() => oa.value ? [...Ce.selectionGrid, Ce.actionRow].filter((f) => f.length) : Ba.value ? [\n ...Ce.timePicker[0],\n ...Ce.timePicker[1],\n Ya.value ? [] : [Oa.value],\n Ce.actionRow\n ].filter((f) => f.length) : _a.value ? [...Ce.monthPicker, Ce.actionRow] : [Ce.monthYear, ...Ce.calendar, Ce.time, Ce.actionRow].filter((f) => f.length)), t = (f) => {\n Ke.value = f ? Ke.value + 1 : Ke.value - 1;\n let I = null;\n e.value[Ie.value] && (I = e.value[Ie.value][Ke.value]), !I && e.value[Ie.value + (f ? 1 : -1)] ? (Ie.value = Ie.value + (f ? 1 : -1), Ke.value = f ? 0 : e.value[Ie.value].length - 1) : I || (Ke.value = f ? Ke.value - 1 : Ke.value + 1);\n }, r = (f) => {\n if (Ie.value === 0 && !f || Ie.value === e.value.length && f) return;\n Ie.value = f ? Ie.value + 1 : Ie.value - 1, e.value[Ie.value] ? e.value[Ie.value] && !e.value[Ie.value][Ke.value] && Ke.value !== 0 && (Ke.value = e.value[Ie.value].length - 1) : Ie.value = f ? Ie.value - 1 : Ie.value + 1;\n }, a = (f) => {\n let I = null;\n e.value[Ie.value] && (I = e.value[Ie.value][Ke.value]), I ? I.focus({ preventScroll: !oa.value }) : Ke.value = f ? Ke.value - 1 : Ke.value + 1;\n }, n = () => {\n t(!0), a(!0);\n }, u = () => {\n t(!1), a(!1);\n }, d = () => {\n r(!1), a(!0);\n }, y = () => {\n r(!0), a(!0);\n }, i = (f, I) => {\n Ce[I] = f;\n }, _ = (f, I) => {\n Ce[I] = f;\n }, c = () => {\n Ke.value = 0, Ie.value = 0;\n };\n return {\n buildMatrix: i,\n buildMultiLevelMatrix: _,\n setTimePickerBackRef: (f) => {\n Oa.value = f;\n },\n setSelectionGrid: (f) => {\n oa.value = f, c(), f || (Ce.selectionGrid = []);\n },\n setTimePicker: (f, I = !1) => {\n Ba.value = f, Ya.value = I, c(), f || (Ce.timePicker[0] = [], Ce.timePicker[1] = []);\n },\n setTimePickerElements: (f, I = 0) => {\n Ce.timePicker[I] = f;\n },\n arrowRight: n,\n arrowLeft: u,\n arrowUp: d,\n arrowDown: y,\n clearArrowNav: () => {\n Ce.monthYear = [], Ce.calendar = [], Ce.time = [], Ce.actionRow = [], Ce.selectionGrid = [], Ce.timePicker[0] = [], Ce.timePicker[1] = [], oa.value = !1, Ba.value = !1, Ya.value = !1, _a.value = !1, c(), Oa.value = null;\n },\n setMonthPicker: (f) => {\n _a.value = f, c();\n },\n refSets: Ce\n // exposed for testing\n };\n}, mn = (e) => ({\n menuAppearTop: \"dp-menu-appear-top\",\n menuAppearBottom: \"dp-menu-appear-bottom\",\n open: \"dp-slide-down\",\n close: \"dp-slide-up\",\n next: \"calendar-next\",\n previous: \"calendar-prev\",\n vNext: \"dp-slide-up\",\n vPrevious: \"dp-slide-down\",\n ...e ?? {}\n}), zl = (e) => ({\n toggleOverlay: \"Toggle overlay\",\n menu: \"Datepicker menu\",\n input: \"Datepicker input\",\n openTimePicker: \"Open time picker\",\n closeTimePicker: \"Close time Picker\",\n incrementValue: (t) => `Increment ${t}`,\n decrementValue: (t) => `Decrement ${t}`,\n openTpOverlay: (t) => `Open ${t} overlay`,\n amPmButton: \"Switch AM/PM mode\",\n openYearsOverlay: \"Open years overlay\",\n openMonthsOverlay: \"Open months overlay\",\n nextMonth: \"Next month\",\n prevMonth: \"Previous month\",\n nextYear: \"Next year\",\n prevYear: \"Previous year\",\n day: void 0,\n weekDay: void 0,\n clearInput: \"Clear value\",\n calendarIcon: \"Calendar icon\",\n timePicker: \"Time picker\",\n monthPicker: (t) => `Month picker${t ? \" overlay\" : \"\"}`,\n yearPicker: (t) => `Year picker${t ? \" overlay\" : \"\"}`,\n timeOverlay: (t) => `${t} overlay`,\n ...e ?? {}\n}), pn = (e) => e ? typeof e == \"boolean\" ? e ? 2 : 0 : +e >= 2 ? +e : 2 : 0, Hl = (e) => {\n const t = typeof e == \"object\" && e, r = {\n static: !0,\n solo: !1\n };\n if (!e) return { ...r, count: pn(!1) };\n const a = t ? e : {}, n = t ? a.count ?? !0 : e, u = pn(n);\n return Object.assign(r, a, { count: u });\n}, Ul = (e, t, r) => e || (typeof r == \"string\" ? r : t), Wl = (e) => typeof e == \"boolean\" ? e ? mn({}) : !1 : mn(e), Vl = (e) => {\n const t = {\n enterSubmit: !0,\n tabSubmit: !0,\n openMenu: \"open\",\n selectOnFocus: !1,\n rangeSeparator: \" - \",\n escClose: !0\n };\n return typeof e == \"object\" ? { ...t, ...e ?? {}, enabled: !0 } : { ...t, enabled: e };\n}, jl = (e) => ({\n months: [],\n years: [],\n times: { hours: [], minutes: [], seconds: [] },\n ...e ?? {}\n}), Kl = (e) => ({\n showSelect: !0,\n showCancel: !0,\n showNow: !1,\n showPreview: !0,\n ...e ?? {}\n}), Gl = (e) => {\n const t = { input: !1 };\n return typeof e == \"object\" ? { ...t, ...e ?? {}, enabled: !0 } : {\n enabled: e,\n ...t\n };\n}, Ql = (e) => ({ ...{\n allowStopPropagation: !0,\n closeOnScroll: !1,\n modeHeight: 255,\n allowPreventDefault: !1,\n closeOnClearValue: !0,\n closeOnAutoApply: !0,\n noSwipe: !1,\n keepActionRow: !1,\n onClickOutside: void 0,\n tabOutClosesMenu: !0,\n arrowLeft: void 0,\n keepViewOnOffsetClick: !1,\n timeArrowHoldThreshold: 0,\n shadowDom: !1,\n mobileBreakpoint: 600,\n setDateOnMenuClose: !1\n}, ...e ?? {} }), ql = (e) => {\n const t = {\n dates: Array.isArray(e) ? e.map((r) => j(r)) : [],\n years: [],\n months: [],\n quarters: [],\n weeks: [],\n weekdays: [],\n options: { highlightDisabled: !1 }\n };\n return typeof e == \"function\" ? e : { ...t, ...e ?? {} };\n}, Xl = (e) => typeof e == \"object\" ? {\n type: (e == null ? void 0 : e.type) ?? \"local\",\n hideOnOffsetDates: (e == null ? void 0 : e.hideOnOffsetDates) ?? !1\n} : {\n type: e,\n hideOnOffsetDates: !1\n}, Jl = (e) => {\n const t = {\n noDisabledRange: !1,\n showLastInRange: !0,\n minMaxRawRange: !1,\n partialRange: !0,\n disableTimeRangeValidation: !1,\n maxRange: void 0,\n minRange: void 0,\n autoRange: void 0,\n fixedStart: !1,\n fixedEnd: !1\n };\n return typeof e == \"object\" ? { enabled: !0, ...t, ...e } : {\n enabled: e,\n ...t\n };\n}, Zl = (e) => e ? typeof e == \"string\" ? {\n timezone: e,\n exactMatch: !1,\n dateInTz: void 0,\n emitTimezone: void 0,\n convertModel: !0\n} : {\n timezone: e.timezone,\n exactMatch: e.exactMatch ?? !1,\n dateInTz: e.dateInTz ?? void 0,\n emitTimezone: e.emitTimezone ?? void 0,\n convertModel: e.convertModel ?? !0\n} : { timezone: void 0, exactMatch: !1, emitTimezone: void 0 }, Ia = (e, t, r, a) => new Map(\n e.map((n) => {\n const u = Qa(n, t, a);\n return [Ja(u, r), u];\n })\n), xl = (e, t) => e.length ? new Map(\n e.map((r) => {\n const a = Qa(r.date, t);\n return [Ja(a, Nt.DATE), r];\n })\n) : null, er = (e) => {\n var r;\n const t = Ol(e.isMonthPicker, e.isYearPicker);\n return {\n minDate: Fa(e.minDate, e.timezone, e.isSpecific),\n maxDate: Fa(e.maxDate, e.timezone, e.isSpecific),\n disabledDates: Ta(e.disabledDates) ? Ia(e.disabledDates, e.timezone, t, e.isSpecific) : e.disabledDates,\n allowedDates: Ta(e.allowedDates) ? Ia(e.allowedDates, e.timezone, t, e.isSpecific) : null,\n highlight: typeof e.highlight == \"object\" && Ta((r = e.highlight) == null ? void 0 : r.dates) ? Ia(e.highlight.dates, e.timezone, t) : e.highlight,\n markers: xl(e.markers, e.timezone)\n };\n}, tr = (e) => typeof e == \"boolean\" ? { enabled: e, dragSelect: !0, limit: null } : {\n enabled: !!e,\n limit: e.limit ? +e.limit : null,\n dragSelect: e.dragSelect ?? !0\n}, ar = (e) => ({\n ...Object.fromEntries(\n Object.keys(e).map((r) => {\n const a = r, n = e[a], u = typeof e[a] == \"string\" ? { [n]: !0 } : Object.fromEntries(n.map((d) => [d, !0]));\n return [r, u];\n })\n )\n}), _e = (e) => {\n const t = () => {\n const ee = e.enableSeconds ? \":ss\" : \"\", x = e.enableMinutes ? \":mm\" : \"\";\n return e.is24 ? `HH${x}${ee}` : `hh${x}${ee} aa`;\n }, r = () => {\n var ee;\n return e.format ? e.format : e.monthPicker ? \"MM/yyyy\" : e.timePicker ? t() : e.weekPicker ? `${((ee = H.value) == null ? void 0 : ee.type) === \"iso\" ? \"II\" : \"ww\"}-RR` : e.yearPicker ? \"yyyy\" : e.quarterPicker ? \"QQQ/yyyy\" : e.enableTimePicker ? `MM/dd/yyyy, ${t()}` : \"MM/dd/yyyy\";\n }, a = (ee) => In(ee, e.enableSeconds), n = () => z.value.enabled ? e.startTime && Array.isArray(e.startTime) ? [a(e.startTime[0]), a(e.startTime[1])] : null : e.startTime && !Array.isArray(e.startTime) ? a(e.startTime) : null, u = Q(() => Hl(e.multiCalendars)), d = Q(() => n()), y = Q(() => zl(e.ariaLabels)), i = Q(() => jl(e.filters)), _ = Q(() => Wl(e.transitions)), c = Q(() => Kl(e.actionRow)), C = Q(\n () => Ul(e.previewFormat, e.format, r())\n ), m = Q(() => Vl(e.textInput)), P = Q(() => Gl(e.inline)), U = Q(() => Ql(e.config)), N = Q(() => ql(e.highlight)), H = Q(() => Xl(e.weekNumbers)), f = Q(() => Zl(e.timezone)), I = Q(() => tr(e.multiDates)), k = Q(\n () => er({\n minDate: e.minDate,\n maxDate: e.maxDate,\n disabledDates: e.disabledDates,\n allowedDates: e.allowedDates,\n highlight: N.value,\n markers: e.markers,\n timezone: f.value,\n isSpecific: e.monthPicker || e.yearPicker || e.quarterPicker,\n isMonthPicker: e.monthPicker,\n isYearPicker: e.yearPicker\n })\n ), z = Q(() => Jl(e.range)), q = Q(() => ar(e.ui));\n return {\n defaultedTransitions: _,\n defaultedMultiCalendars: u,\n defaultedStartTime: d,\n defaultedAriaLabels: y,\n defaultedFilters: i,\n defaultedActionRow: c,\n defaultedPreviewFormat: C,\n defaultedTextInput: m,\n defaultedInline: P,\n defaultedConfig: U,\n defaultedHighlight: N,\n defaultedWeekNumbers: H,\n defaultedRange: z,\n propDates: k,\n defaultedTz: f,\n defaultedMultiDates: I,\n defaultedUI: q,\n getDefaultPattern: r,\n getDefaultStartTime: n\n };\n}, nr = (e, t, r) => {\n const a = te(), { defaultedTextInput: n, defaultedRange: u, defaultedTz: d, defaultedMultiDates: y, getDefaultPattern: i } = _e(t), _ = te(\"\"), c = Gt(t, \"format\"), C = Gt(t, \"formatLocale\");\n ot(\n a,\n () => {\n typeof t.onInternalModelChange == \"function\" && e(\"internal-model-change\", a.value, R(!0));\n },\n { deep: !0 }\n ), ot(u, (l, D) => {\n l.enabled !== D.enabled && (a.value = null);\n }), ot(c, () => {\n W();\n });\n const m = (l) => d.value.timezone && d.value.convertModel ? et(l, d.value.timezone) : l, P = (l) => {\n if (d.value.timezone && d.value.convertModel) {\n const D = kl(d.value.timezone, l);\n return il(l, D);\n }\n return l;\n }, U = (l, D, ue = !1) => Nn(\n l,\n t.format,\n t.formatLocale,\n n.value.rangeSeparator,\n t.modelAuto,\n D ?? i(),\n ue\n ), N = (l) => l ? t.modelType ? oe(l) : {\n hours: ht(l),\n minutes: $t(l),\n seconds: t.enableSeconds ? Lt(l) : 0\n } : null, H = (l) => t.modelType ? oe(l) : { month: $e(l), year: ye(l) }, f = (l) => Array.isArray(l) ? y.value.enabled ? l.map((D) => I(D, ft(j(), D))) : ra(\n () => [\n ft(j(), l[0]),\n l[1] ? ft(j(), l[1]) : Yt(u.value.partialRange)\n ],\n u.value.enabled\n ) : ft(j(), +l), I = (l, D) => (typeof l == \"string\" || typeof l == \"number\") && t.modelType ? T(l) : D, k = (l) => Array.isArray(l) ? [\n I(\n l[0],\n Mt(null, +l[0].hours, +l[0].minutes, l[0].seconds)\n ),\n I(\n l[1],\n Mt(null, +l[1].hours, +l[1].minutes, l[1].seconds)\n )\n ] : I(l, Mt(null, l.hours, l.minutes, l.seconds)), z = (l) => {\n const D = Pe(j(), { date: 1 });\n return Array.isArray(l) ? y.value.enabled ? l.map((ue) => I(ue, yt(D, +ue.month, +ue.year))) : ra(\n () => [\n I(l[0], yt(D, +l[0].month, +l[0].year)),\n I(\n l[1],\n l[1] ? yt(D, +l[1].month, +l[1].year) : Yt(u.value.partialRange)\n )\n ],\n u.value.enabled\n ) : I(l, yt(D, +l.month, +l.year));\n }, q = (l) => {\n if (Array.isArray(l))\n return l.map((D) => T(D));\n throw new Error(Xa.dateArr(\"multi-dates\"));\n }, ee = (l) => {\n if (Array.isArray(l) && u.value.enabled) {\n const D = l[0], ue = l[1];\n return [\n j(Array.isArray(D) ? D[0] : null),\n Array.isArray(ue) && ue.length ? j(ue[0]) : null\n ];\n }\n return j(l[0]);\n }, x = (l) => t.modelAuto ? Array.isArray(l) ? [T(l[0]), T(l[1])] : t.autoApply ? [T(l)] : [T(l), null] : Array.isArray(l) ? ra(\n () => l[1] ? [\n T(l[0]),\n l[1] ? T(l[1]) : Yt(u.value.partialRange)\n ] : [T(l[0])],\n u.value.enabled\n ) : T(l), S = () => {\n Array.isArray(a.value) && u.value.enabled && a.value.length === 1 && a.value.push(Yt(u.value.partialRange));\n }, X = () => {\n const l = a.value;\n return [\n oe(l[0]),\n l[1] ? oe(l[1]) : Yt(u.value.partialRange)\n ];\n }, O = () => a.value[1] ? X() : oe(Ne(a.value[0])), K = () => (a.value || []).map((l) => oe(l)), fe = (l = !1) => (l || S(), t.modelAuto ? O() : y.value.enabled ? K() : Array.isArray(a.value) ? ra(() => X(), u.value.enabled) : oe(Ne(a.value))), me = (l) => !l || Array.isArray(l) && !l.length ? null : t.timePicker ? k(Ne(l)) : t.monthPicker ? z(Ne(l)) : t.yearPicker ? f(Ne(l)) : y.value.enabled ? q(Ne(l)) : t.weekPicker ? ee(Ne(l)) : x(Ne(l)), v = (l) => {\n const D = me(l);\n za(Ne(D)) ? (a.value = Ne(D), W()) : (a.value = null, _.value = \"\");\n }, L = () => {\n const l = (D) => vt(D, n.value.format);\n return `${l(a.value[0])} ${n.value.rangeSeparator} ${a.value[1] ? l(a.value[1]) : \"\"}`;\n }, ne = () => r.value && a.value ? Array.isArray(a.value) ? L() : vt(a.value, n.value.format) : U(a.value), p = () => a.value ? y.value.enabled ? a.value.map((l) => U(l)).join(\"; \") : n.value.enabled && typeof n.value.format == \"string\" ? ne() : U(a.value) : \"\", W = () => {\n !t.format || typeof t.format == \"string\" || n.value.enabled && typeof n.value.format == \"string\" ? _.value = p() : _.value = t.format(a.value);\n }, T = (l) => {\n if (t.utc) {\n const D = new Date(l);\n return t.utc === \"preserve\" ? new Date(D.getTime() + D.getTimezoneOffset() * 6e4) : D;\n }\n return t.modelType ? wl.includes(t.modelType) ? m(new Date(l)) : t.modelType === \"format\" && (typeof t.format == \"string\" || !t.format) ? m(\n Na(l, i(), /* @__PURE__ */ new Date(), { locale: C.value })\n ) : m(\n Na(l, t.modelType, /* @__PURE__ */ new Date(), { locale: C.value })\n ) : m(new Date(l));\n }, oe = (l) => l ? t.utc ? _l(l, t.utc === \"preserve\", t.enableSeconds) : t.modelType ? t.modelType === \"timestamp\" ? +P(l) : t.modelType === \"iso\" ? P(l).toISOString() : t.modelType === \"format\" && (typeof t.format == \"string\" || !t.format) ? U(P(l)) : U(P(l), t.modelType, !0) : P(l) : \"\", $ = (l, D = !1, ue = !1) => {\n if (ue) return l;\n if (e(\"update:model-value\", l), d.value.emitTimezone && D) {\n const M = Array.isArray(l) ? l.map((he) => et(Ne(he), d.value.emitTimezone)) : et(Ne(l), d.value.emitTimezone);\n e(\"update:model-timezone-value\", M);\n }\n }, Y = (l) => Array.isArray(a.value) ? y.value.enabled ? a.value.map((D) => l(D)) : [\n l(a.value[0]),\n a.value[1] ? l(a.value[1]) : Yt(u.value.partialRange)\n ] : l(Ne(a.value)), g = () => {\n if (Array.isArray(a.value)) {\n const l = pt(a.value[0], t.weekStart), D = a.value[1] ? pt(a.value[1], t.weekStart) : [];\n return [l.map((ue) => j(ue)), D.map((ue) => j(ue))];\n }\n return pt(a.value, t.weekStart).map((l) => j(l));\n }, Z = (l, D) => $(Ne(Y(l)), !1, D), se = (l) => {\n const D = g();\n return l ? D : e(\"update:model-value\", g());\n }, R = (l = !1) => (l || W(), t.monthPicker ? Z(H, l) : t.timePicker ? Z(N, l) : t.yearPicker ? Z(ye, l) : t.weekPicker ? se(l) : $(fe(l), !0, l));\n return {\n inputValue: _,\n internalModelValue: a,\n checkBeforeEmit: () => a.value ? u.value.enabled ? u.value.partialRange ? a.value.length >= 1 : a.value.length === 2 : !!a.value : !1,\n parseExternalModelValue: v,\n formatInputValue: W,\n emitModelValue: R\n };\n}, lr = (e, t) => {\n const { defaultedFilters: r, propDates: a } = _e(e), { validateMonthYearInRange: n } = Tt(e), u = (c, C) => {\n let m = c;\n return r.value.months.includes($e(m)) ? (m = C ? Pt(c, 1) : qt(c, 1), u(m, C)) : m;\n }, d = (c, C) => {\n let m = c;\n return r.value.years.includes(ye(m)) ? (m = C ? Dn(c, 1) : Mn(c, 1), d(m, C)) : m;\n }, y = (c, C = !1) => {\n const m = Pe(j(), { month: e.month, year: e.year });\n let P = c ? Pt(m, 1) : qt(m, 1);\n e.disableYearSelect && (P = ft(P, e.year));\n let U = $e(P), N = ye(P);\n r.value.months.includes(U) && (P = u(P, c), U = $e(P), N = ye(P)), r.value.years.includes(N) && (P = d(P, c), N = ye(P)), n(U, N, c, e.preventMinMaxNavigation) && i(U, N, C);\n }, i = (c, C, m) => {\n t(\"update-month-year\", { month: c, year: C, fromNav: m });\n }, _ = Q(() => (c) => En(\n Pe(j(), { month: e.month, year: e.year }),\n a.value.maxDate,\n a.value.minDate,\n e.preventMinMaxNavigation,\n c\n ));\n return { handleMonthYearChange: y, isDisabled: _, updateMonthYear: i };\n}, va = {\n multiCalendars: { type: [Boolean, Number, String, Object], default: void 0 },\n modelValue: { type: [String, Date, Array, Object, Number], default: null },\n modelType: { type: String, default: null },\n position: { type: String, default: \"center\" },\n dark: { type: Boolean, default: !1 },\n format: {\n type: [String, Function],\n default: () => null\n },\n autoPosition: { type: [Boolean, String], default: !0 },\n altPosition: { type: Function, default: null },\n transitions: { type: [Boolean, Object], default: !0 },\n formatLocale: { type: Object, default: null },\n utc: { type: [Boolean, String], default: !1 },\n ariaLabels: { type: Object, default: () => ({}) },\n offset: { type: [Number, String], default: 10 },\n hideNavigation: { type: Array, default: () => [] },\n timezone: { type: [String, Object], default: null },\n vertical: { type: Boolean, default: !1 },\n disableMonthYearSelect: { type: Boolean, default: !1 },\n disableYearSelect: { type: Boolean, default: !1 },\n dayClass: {\n type: Function,\n default: null\n },\n yearRange: { type: Array, default: () => [1900, 2100] },\n enableTimePicker: { type: Boolean, default: !0 },\n autoApply: { type: Boolean, default: !1 },\n disabledDates: { type: [Array, Function], default: () => [] },\n monthNameFormat: { type: String, default: \"short\" },\n startDate: { type: [Date, String], default: null },\n startTime: { type: [Object, Array], default: null },\n hideOffsetDates: { type: Boolean, default: !1 },\n noToday: { type: Boolean, default: !1 },\n disabledWeekDays: { type: Array, default: () => [] },\n allowedDates: { type: Array, default: null },\n nowButtonLabel: { type: String, default: \"Now\" },\n markers: { type: Array, default: () => [] },\n escClose: { type: Boolean, default: !0 },\n spaceConfirm: { type: Boolean, default: !0 },\n monthChangeOnArrows: { type: Boolean, default: !0 },\n presetDates: { type: Array, default: () => [] },\n flow: { type: Array, default: () => [] },\n partialFlow: { type: Boolean, default: !1 },\n preventMinMaxNavigation: { type: Boolean, default: !1 },\n reverseYears: { type: Boolean, default: !1 },\n weekPicker: { type: Boolean, default: !1 },\n filters: { type: Object, default: () => ({}) },\n arrowNavigation: { type: Boolean, default: !1 },\n highlight: {\n type: [Function, Object],\n default: null\n },\n teleport: { type: [Boolean, String, Object], default: null },\n teleportCenter: { type: Boolean, default: !1 },\n locale: { type: String, default: \"en-Us\" },\n weekNumName: { type: String, default: \"W\" },\n weekStart: { type: [Number, String], default: 1 },\n weekNumbers: {\n type: [String, Function, Object],\n default: null\n },\n monthChangeOnScroll: { type: [Boolean, String], default: !0 },\n dayNames: {\n type: [Function, Array],\n default: null\n },\n monthPicker: { type: Boolean, default: !1 },\n customProps: { type: Object, default: null },\n yearPicker: { type: Boolean, default: !1 },\n modelAuto: { type: Boolean, default: !1 },\n selectText: { type: String, default: \"Select\" },\n cancelText: { type: String, default: \"Cancel\" },\n previewFormat: {\n type: [String, Function],\n default: () => \"\"\n },\n multiDates: { type: [Object, Boolean], default: !1 },\n ignoreTimeValidation: { type: Boolean, default: !1 },\n minDate: { type: [Date, String], default: null },\n maxDate: { type: [Date, String], default: null },\n minTime: { type: Object, default: null },\n maxTime: { type: Object, default: null },\n name: { type: String, default: null },\n placeholder: { type: String, default: \"\" },\n hideInputIcon: { type: Boolean, default: !1 },\n clearable: { type: Boolean, default: !0 },\n alwaysClearable: { type: Boolean, default: !1 },\n state: { type: Boolean, default: null },\n required: { type: Boolean, default: !1 },\n autocomplete: { type: String, default: \"off\" },\n timePicker: { type: Boolean, default: !1 },\n enableSeconds: { type: Boolean, default: !1 },\n is24: { type: Boolean, default: !0 },\n noHoursOverlay: { type: Boolean, default: !1 },\n noMinutesOverlay: { type: Boolean, default: !1 },\n noSecondsOverlay: { type: Boolean, default: !1 },\n hoursGridIncrement: { type: [String, Number], default: 1 },\n minutesGridIncrement: { type: [String, Number], default: 5 },\n secondsGridIncrement: { type: [String, Number], default: 5 },\n hoursIncrement: { type: [Number, String], default: 1 },\n minutesIncrement: { type: [Number, String], default: 1 },\n secondsIncrement: { type: [Number, String], default: 1 },\n range: { type: [Boolean, Object], default: !1 },\n uid: { type: String, default: null },\n disabled: { type: Boolean, default: !1 },\n readonly: { type: Boolean, default: !1 },\n inline: { type: [Boolean, Object], default: !1 },\n textInput: { type: [Boolean, Object], default: !1 },\n sixWeeks: { type: [Boolean, String], default: !1 },\n actionRow: { type: Object, default: () => ({}) },\n focusStartDate: { type: Boolean, default: !1 },\n disabledTimes: { type: [Function, Array], default: void 0 },\n timePickerInline: { type: Boolean, default: !1 },\n calendar: { type: Function, default: null },\n config: { type: Object, default: void 0 },\n quarterPicker: { type: Boolean, default: !1 },\n yearFirst: { type: Boolean, default: !1 },\n loading: { type: Boolean, default: !1 },\n onInternalModelChange: { type: [Function, Object], default: null },\n enableMinutes: { type: Boolean, default: !0 },\n ui: { type: Object, default: () => ({}) }\n}, ct = {\n ...va,\n shadow: { type: Boolean, default: !1 },\n flowStep: { type: Number, default: 0 },\n internalModelValue: { type: [Date, Array], default: null },\n noOverlayFocus: { type: Boolean, default: !1 },\n collapse: { type: Boolean, default: !1 },\n menuWrapRef: { type: Object, default: null },\n getInputRect: { type: Function, default: () => ({}) },\n isTextInputDate: { type: Boolean, default: !1 },\n isMobile: { type: Boolean, default: void 0 }\n}, rr = [\"title\"], or = [\"disabled\"], sr = /* @__PURE__ */ Ve({\n compatConfig: {\n MODE: 3\n },\n __name: \"ActionRow\",\n props: {\n menuMount: { type: Boolean, default: !1 },\n calendarWidth: { type: Number, default: 0 },\n ...ct\n },\n emits: [\"close-picker\", \"select-date\", \"select-now\", \"invalid-select\"],\n setup(e, { emit: t }) {\n const r = t, a = e, {\n defaultedActionRow: n,\n defaultedPreviewFormat: u,\n defaultedMultiCalendars: d,\n defaultedTextInput: y,\n defaultedInline: i,\n defaultedRange: _,\n defaultedMultiDates: c\n } = _e(a), { isTimeValid: C, isMonthValid: m } = Tt(a), { buildMatrix: P } = At(), U = te(null), N = te(null), H = te(!1), f = te({}), I = te(null), k = te(null);\n je(() => {\n a.arrowNavigation && P([Le(U), Le(N)], \"actionRow\"), z(), window.addEventListener(\"resize\", z);\n }), xt(() => {\n window.removeEventListener(\"resize\", z);\n });\n const z = () => {\n H.value = !1, setTimeout(() => {\n var ne, p;\n const v = (ne = I.value) == null ? void 0 : ne.getBoundingClientRect(), L = (p = k.value) == null ? void 0 : p.getBoundingClientRect();\n v && L && (f.value.maxWidth = `${L.width - v.width - 20}px`), H.value = !0;\n }, 0);\n }, q = Q(() => _.value.enabled && !_.value.partialRange && a.internalModelValue ? a.internalModelValue.length === 2 : !0), ee = Q(\n () => !C.value(a.internalModelValue) || !m.value(a.internalModelValue) || !q.value\n ), x = () => {\n const v = u.value;\n return a.timePicker || a.monthPicker, v(Ne(a.internalModelValue));\n }, S = () => {\n const v = a.internalModelValue;\n return d.value.count > 0 ? `${X(v[0])} - ${X(v[1])}` : [X(v[0]), X(v[1])];\n }, X = (v) => Nn(\n v,\n u.value,\n a.formatLocale,\n y.value.rangeSeparator,\n a.modelAuto,\n u.value\n ), O = Q(() => !a.internalModelValue || !a.menuMount ? \"\" : typeof u.value == \"string\" ? Array.isArray(a.internalModelValue) ? a.internalModelValue.length === 2 && a.internalModelValue[1] ? S() : c.value.enabled ? a.internalModelValue.map((v) => `${X(v)}`) : a.modelAuto ? `${X(a.internalModelValue[0])}` : `${X(a.internalModelValue[0])} -` : X(a.internalModelValue) : x()), K = () => c.value.enabled ? \"; \" : \" - \", fe = Q(\n () => Array.isArray(O.value) ? O.value.join(K()) : O.value\n ), me = () => {\n C.value(a.internalModelValue) && m.value(a.internalModelValue) && q.value ? r(\"select-date\") : r(\"invalid-select\");\n };\n return (v, L) => (A(), V(\"div\", {\n ref_key: \"actionRowRef\",\n ref: k,\n class: \"dp__action_row\"\n }, [\n v.$slots[\"action-row\"] ? de(v.$slots, \"action-row\", ze(He({ key: 0 }, {\n internalModelValue: v.internalModelValue,\n disabled: ee.value,\n selectDate: () => v.$emit(\"select-date\"),\n closePicker: () => v.$emit(\"close-picker\")\n }))) : (A(), V(ke, { key: 1 }, [\n s(n).showPreview ? (A(), V(\"div\", {\n key: 0,\n class: \"dp__selection_preview\",\n title: fe.value,\n style: rt(f.value)\n }, [\n v.$slots[\"action-preview\"] && H.value ? de(v.$slots, \"action-preview\", {\n key: 0,\n value: v.internalModelValue\n }) : J(\"\", !0),\n !v.$slots[\"action-preview\"] && H.value ? (A(), V(ke, { key: 1 }, [\n gt(Qe(fe.value), 1)\n ], 64)) : J(\"\", !0)\n ], 12, rr)) : J(\"\", !0),\n ge(\"div\", {\n ref_key: \"actionBtnContainer\",\n ref: I,\n class: \"dp__action_buttons\",\n \"data-dp-element\": \"action-row\"\n }, [\n v.$slots[\"action-buttons\"] ? de(v.$slots, \"action-buttons\", {\n key: 0,\n value: v.internalModelValue\n }) : J(\"\", !0),\n v.$slots[\"action-buttons\"] ? J(\"\", !0) : (A(), V(ke, { key: 1 }, [\n !s(i).enabled && s(n).showCancel ? (A(), V(\"button\", {\n key: 0,\n ref_key: \"cancelButtonRef\",\n ref: U,\n type: \"button\",\n class: \"dp__action_button dp__action_cancel\",\n onClick: L[0] || (L[0] = (ne) => v.$emit(\"close-picker\")),\n onKeydown: L[1] || (L[1] = (ne) => s(Ze)(ne, () => v.$emit(\"close-picker\")))\n }, Qe(v.cancelText), 545)) : J(\"\", !0),\n s(n).showNow ? (A(), V(\"button\", {\n key: 1,\n type: \"button\",\n class: \"dp__action_button dp__action_cancel\",\n onClick: L[2] || (L[2] = (ne) => v.$emit(\"select-now\")),\n onKeydown: L[3] || (L[3] = (ne) => s(Ze)(ne, () => v.$emit(\"select-now\")))\n }, Qe(v.nowButtonLabel), 33)) : J(\"\", !0),\n s(n).showSelect ? (A(), V(\"button\", {\n key: 2,\n ref_key: \"selectButtonRef\",\n ref: N,\n type: \"button\",\n class: \"dp__action_button dp__action_select\",\n disabled: ee.value,\n \"data-test-id\": \"select-button\",\n onKeydown: L[4] || (L[4] = (ne) => s(Ze)(ne, () => me())),\n onClick: me\n }, Qe(v.selectText), 41, or)) : J(\"\", !0)\n ], 64))\n ], 512)\n ], 64))\n ], 512));\n }\n}), ur = [\"role\", \"aria-label\", \"tabindex\"], ir = { class: \"dp__selection_grid_header\" }, dr = [\"aria-selected\", \"aria-disabled\", \"data-test-id\", \"onClick\", \"onKeydown\", \"onMouseover\"], cr = [\"aria-label\"], ea = /* @__PURE__ */ Ve({\n __name: \"SelectionOverlay\",\n props: {\n items: {},\n type: {},\n isLast: { type: Boolean },\n arrowNavigation: { type: Boolean },\n skipButtonRef: { type: Boolean },\n headerRefs: {},\n hideNavigation: {},\n escClose: { type: Boolean },\n useRelative: { type: Boolean },\n height: {},\n textInput: { type: [Boolean, Object] },\n config: {},\n noOverlayFocus: { type: Boolean },\n focusValue: {},\n menuWrapRef: {},\n ariaLabels: {},\n overlayLabel: {}\n },\n emits: [\"selected\", \"toggle\", \"reset-flow\", \"hover-value\"],\n setup(e, { expose: t, emit: r }) {\n const { setSelectionGrid: a, buildMultiLevelMatrix: n, setMonthPicker: u } = At(), d = r, y = e, { defaultedAriaLabels: i, defaultedTextInput: _, defaultedConfig: c } = _e(\n y\n ), { hideNavigationButtons: C } = ya(), m = te(!1), P = te(null), U = te(null), N = te([]), H = te(), f = te(null), I = te(0), k = te(null);\n Xn(() => {\n P.value = null;\n }), je(() => {\n nt().then(() => K()), y.noOverlayFocus || q(), z(!0);\n }), xt(() => z(!1));\n const z = (Y) => {\n var g;\n y.arrowNavigation && ((g = y.headerRefs) != null && g.length ? u(Y) : a(Y));\n }, q = () => {\n var g;\n const Y = Le(U);\n Y && (_.value.enabled || (P.value ? (g = P.value) == null || g.focus({ preventScroll: !0 }) : Y.focus({ preventScroll: !0 })), m.value = Y.clientHeight < Y.scrollHeight);\n }, ee = Q(\n () => ({\n dp__overlay: !0,\n \"dp--overlay-absolute\": !y.useRelative,\n \"dp--overlay-relative\": y.useRelative\n })\n ), x = Q(\n () => y.useRelative ? { height: `${y.height}px`, width: \"var(--dp-menu-min-width)\" } : void 0\n ), S = Q(() => ({\n dp__overlay_col: !0\n })), X = Q(\n () => ({\n dp__btn: !0,\n dp__button: !0,\n dp__overlay_action: !0,\n dp__over_action_scroll: m.value,\n dp__button_bottom: y.isLast\n })\n ), O = Q(() => {\n var Y, g;\n return {\n dp__overlay_container: !0,\n dp__container_flex: ((Y = y.items) == null ? void 0 : Y.length) <= 6,\n dp__container_block: ((g = y.items) == null ? void 0 : g.length) > 6\n };\n });\n ot(\n () => y.items,\n () => K(!1),\n { deep: !0 }\n );\n const K = (Y = !0) => {\n nt().then(() => {\n const g = Le(P), Z = Le(U), se = Le(f), R = Le(k), ae = se ? se.getBoundingClientRect().height : 0;\n Z && (Z.getBoundingClientRect().height ? I.value = Z.getBoundingClientRect().height - ae : I.value = c.value.modeHeight - ae), g && R && Y && (R.scrollTop = g.offsetTop - R.offsetTop - (I.value / 2 - g.getBoundingClientRect().height) - ae);\n });\n }, fe = (Y) => {\n Y.disabled || d(\"selected\", Y.value);\n }, me = () => {\n d(\"toggle\"), d(\"reset-flow\");\n }, v = () => {\n y.escClose && me();\n }, L = (Y, g, Z, se) => {\n Y && ((g.active || g.value === y.focusValue) && (P.value = Y), y.arrowNavigation && (Array.isArray(N.value[Z]) ? N.value[Z][se] = Y : N.value[Z] = [Y], ne()));\n }, ne = () => {\n var g, Z;\n const Y = (g = y.headerRefs) != null && g.length ? [y.headerRefs].concat(N.value) : N.value.concat([y.skipButtonRef ? [] : [f.value]]);\n n(Ne(Y), (Z = y.headerRefs) != null && Z.length ? \"monthPicker\" : \"selectionGrid\");\n }, p = (Y) => {\n y.arrowNavigation || Dt(Y, c.value, !0);\n }, W = (Y) => {\n H.value = Y, d(\"hover-value\", Y);\n }, T = () => {\n if (me(), !y.isLast) {\n const Y = La(y.menuWrapRef ?? null, \"action-row\");\n if (Y) {\n const g = Rn(Y);\n g == null || g.focus();\n }\n }\n }, oe = (Y) => {\n switch (Y.key) {\n case Oe.esc:\n return v();\n case Oe.arrowLeft:\n return p(Y);\n case Oe.arrowRight:\n return p(Y);\n case Oe.arrowUp:\n return p(Y);\n case Oe.arrowDown:\n return p(Y);\n default:\n return;\n }\n }, $ = (Y) => {\n if (Y.key === Oe.enter) return me();\n if (Y.key === Oe.tab) return T();\n };\n return t({ focusGrid: q }), (Y, g) => {\n var Z;\n return A(), V(\"div\", {\n ref_key: \"gridWrapRef\",\n ref: U,\n class: De(ee.value),\n style: rt(x.value),\n role: Y.useRelative ? void 0 : \"dialog\",\n \"aria-label\": Y.overlayLabel,\n tabindex: Y.useRelative ? void 0 : \"0\",\n onKeydown: oe,\n onClick: g[0] || (g[0] = Qt(() => {\n }, [\"prevent\"]))\n }, [\n ge(\"div\", {\n ref_key: \"containerRef\",\n ref: k,\n class: De(O.value),\n style: rt({ \"--dp-overlay-height\": `${I.value}px` }),\n role: \"grid\"\n }, [\n ge(\"div\", ir, [\n de(Y.$slots, \"header\")\n ]),\n Y.$slots.overlay ? de(Y.$slots, \"overlay\", { key: 0 }) : (A(!0), V(ke, { key: 1 }, Be(Y.items, (se, R) => (A(), V(\"div\", {\n key: R,\n class: De([\"dp__overlay_row\", { dp__flex_row: Y.items.length >= 3 }]),\n role: \"row\"\n }, [\n (A(!0), V(ke, null, Be(se, (ae, l) => (A(), V(\"div\", {\n key: ae.value,\n ref_for: !0,\n ref: (D) => L(D, ae, R, l),\n role: \"gridcell\",\n class: De(S.value),\n \"aria-selected\": ae.active || void 0,\n \"aria-disabled\": ae.disabled || void 0,\n tabindex: \"0\",\n \"data-test-id\": ae.text,\n onClick: Qt((D) => fe(ae), [\"prevent\"]),\n onKeydown: (D) => s(Ze)(D, () => fe(ae), !0),\n onMouseover: (D) => W(ae.value)\n }, [\n ge(\"div\", {\n class: De(ae.className)\n }, [\n Y.$slots.item ? de(Y.$slots, \"item\", {\n key: 0,\n item: ae\n }) : J(\"\", !0),\n Y.$slots.item ? J(\"\", !0) : (A(), V(ke, { key: 1 }, [\n gt(Qe(ae.text), 1)\n ], 64))\n ], 2)\n ], 42, dr))), 128))\n ], 2))), 128))\n ], 6),\n Y.$slots[\"button-icon\"] ? sa((A(), V(\"button\", {\n key: 0,\n ref_key: \"toggleButton\",\n ref: f,\n type: \"button\",\n \"aria-label\": (Z = s(i)) == null ? void 0 : Z.toggleOverlay,\n class: De(X.value),\n tabindex: \"0\",\n onClick: me,\n onKeydown: $\n }, [\n de(Y.$slots, \"button-icon\")\n ], 42, cr)), [\n [ua, !s(C)(Y.hideNavigation, Y.type)]\n ]) : J(\"\", !0)\n ], 46, ur);\n };\n }\n}), fr = [\"data-dp-mobile\"], ma = /* @__PURE__ */ Ve({\n __name: \"InstanceWrap\",\n props: {\n multiCalendars: {},\n stretch: { type: Boolean },\n collapse: { type: Boolean },\n isMobile: { type: Boolean }\n },\n setup(e) {\n const t = e, r = Q(\n () => t.multiCalendars > 0 ? [...Array(t.multiCalendars).keys()] : [0]\n ), a = Q(() => ({\n dp__instance_calendar: t.multiCalendars > 0\n }));\n return (n, u) => (A(), V(\"div\", {\n class: De({\n dp__menu_inner: !n.stretch,\n \"dp--menu--inner-stretched\": n.stretch,\n dp__flex_display: n.multiCalendars > 0,\n \"dp--flex-display-collapsed\": n.collapse\n }),\n \"data-dp-mobile\": n.isMobile\n }, [\n (A(!0), V(ke, null, Be(r.value, (d, y) => (A(), V(\"div\", {\n key: d,\n class: De(a.value)\n }, [\n de(n.$slots, \"default\", {\n instance: d,\n index: y\n })\n ], 2))), 128))\n ], 10, fr));\n }\n}), vr = [\"data-dp-element\", \"aria-label\", \"aria-disabled\"], Kt = /* @__PURE__ */ Ve({\n compatConfig: {\n MODE: 3\n },\n __name: \"ArrowBtn\",\n props: {\n ariaLabel: {},\n elName: {},\n disabled: { type: Boolean }\n },\n emits: [\"activate\", \"set-ref\"],\n setup(e, { emit: t }) {\n const r = t, a = te(null);\n return je(() => r(\"set-ref\", a)), (n, u) => (A(), V(\"button\", {\n ref_key: \"elRef\",\n ref: a,\n type: \"button\",\n \"data-dp-element\": n.elName,\n class: \"dp__btn dp--arrow-btn-nav\",\n tabindex: \"0\",\n \"aria-label\": n.ariaLabel,\n \"aria-disabled\": n.disabled || void 0,\n onClick: u[0] || (u[0] = (d) => n.$emit(\"activate\")),\n onKeydown: u[1] || (u[1] = (d) => s(Ze)(d, () => n.$emit(\"activate\"), !0))\n }, [\n ge(\"span\", {\n class: De([\"dp__inner_nav\", { dp__inner_nav_disabled: n.disabled }])\n }, [\n de(n.$slots, \"default\")\n ], 2)\n ], 40, vr));\n }\n}), mr = [\"aria-label\", \"data-test-id\"], zn = /* @__PURE__ */ Ve({\n __name: \"YearModePicker\",\n props: {\n ...ct,\n showYearPicker: { type: Boolean, default: !1 },\n items: { type: Array, default: () => [] },\n instance: { type: Number, default: 0 },\n year: { type: Number, default: 0 },\n isDisabled: { type: Function, default: () => !1 }\n },\n emits: [\"toggle-year-picker\", \"year-select\", \"handle-year\"],\n setup(e, { emit: t }) {\n const r = t, a = e, { showRightIcon: n, showLeftIcon: u } = ya(), { defaultedConfig: d, defaultedMultiCalendars: y, defaultedAriaLabels: i, defaultedTransitions: _, defaultedUI: c } = _e(a), { showTransition: C, transitionName: m } = ta(_), P = te(!1), U = (f = !1, I) => {\n P.value = !P.value, r(\"toggle-year-picker\", { flow: f, show: I });\n }, N = (f) => {\n P.value = !1, r(\"year-select\", f);\n }, H = (f = !1) => {\n r(\"handle-year\", f);\n };\n return (f, I) => {\n var k, z, q, ee, x;\n return A(), V(ke, null, [\n ge(\"div\", {\n class: De([\"dp--year-mode-picker\", { \"dp--hidden-el\": P.value }])\n }, [\n s(u)(s(y), e.instance) ? (A(), Te(Kt, {\n key: 0,\n ref: \"mpPrevIconRef\",\n \"aria-label\": (k = s(i)) == null ? void 0 : k.prevYear,\n disabled: e.isDisabled(!1),\n class: De((z = s(c)) == null ? void 0 : z.navBtnPrev),\n onActivate: I[0] || (I[0] = (S) => H(!1))\n }, {\n default: we(() => [\n f.$slots[\"arrow-left\"] ? de(f.$slots, \"arrow-left\", { key: 0 }) : J(\"\", !0),\n f.$slots[\"arrow-left\"] ? J(\"\", !0) : (A(), Te(s(Wa), { key: 1 }))\n ]),\n _: 3\n }, 8, [\"aria-label\", \"disabled\", \"class\"])) : J(\"\", !0),\n ge(\"button\", {\n ref: \"mpYearButtonRef\",\n class: \"dp__btn dp--year-select\",\n type: \"button\",\n \"aria-label\": `${e.year}-${(q = s(i)) == null ? void 0 : q.openYearsOverlay}`,\n \"data-test-id\": `year-mode-btn-${e.instance}`,\n onClick: I[1] || (I[1] = () => U(!1)),\n onKeydown: I[2] || (I[2] = Jn(() => U(!1), [\"enter\"]))\n }, [\n f.$slots.year ? de(f.$slots, \"year\", {\n key: 0,\n year: e.year\n }) : J(\"\", !0),\n f.$slots.year ? J(\"\", !0) : (A(), V(ke, { key: 1 }, [\n gt(Qe(e.year), 1)\n ], 64))\n ], 40, mr),\n s(n)(s(y), e.instance) ? (A(), Te(Kt, {\n key: 1,\n ref: \"mpNextIconRef\",\n \"aria-label\": (ee = s(i)) == null ? void 0 : ee.nextYear,\n disabled: e.isDisabled(!0),\n class: De((x = s(c)) == null ? void 0 : x.navBtnNext),\n onActivate: I[3] || (I[3] = (S) => H(!0))\n }, {\n default: we(() => [\n f.$slots[\"arrow-right\"] ? de(f.$slots, \"arrow-right\", { key: 0 }) : J(\"\", !0),\n f.$slots[\"arrow-right\"] ? J(\"\", !0) : (A(), Te(s(Va), { key: 1 }))\n ]),\n _: 3\n }, 8, [\"aria-label\", \"disabled\", \"class\"])) : J(\"\", !0)\n ], 2),\n at(Ut, {\n name: s(m)(e.showYearPicker),\n css: s(C)\n }, {\n default: we(() => {\n var S, X;\n return [\n e.showYearPicker ? (A(), Te(ea, {\n key: 0,\n items: e.items,\n \"text-input\": f.textInput,\n \"esc-close\": f.escClose,\n config: f.config,\n \"is-last\": f.autoApply && !s(d).keepActionRow,\n \"hide-navigation\": f.hideNavigation,\n \"aria-labels\": f.ariaLabels,\n \"overlay-label\": (X = (S = s(i)) == null ? void 0 : S.yearPicker) == null ? void 0 : X.call(S, !0),\n type: \"year\",\n onToggle: U,\n onSelected: I[4] || (I[4] = (O) => N(O))\n }, qe({\n \"button-icon\": we(() => [\n f.$slots[\"calendar-icon\"] ? de(f.$slots, \"calendar-icon\", { key: 0 }) : J(\"\", !0),\n f.$slots[\"calendar-icon\"] ? J(\"\", !0) : (A(), Te(s(Wt), { key: 1 }))\n ]),\n _: 2\n }, [\n f.$slots[\"year-overlay-value\"] ? {\n name: \"item\",\n fn: we(({ item: O }) => [\n de(f.$slots, \"year-overlay-value\", {\n text: O.text,\n value: O.value\n })\n ]),\n key: \"0\"\n } : void 0\n ]), 1032, [\"items\", \"text-input\", \"esc-close\", \"config\", \"is-last\", \"hide-navigation\", \"aria-labels\", \"overlay-label\"])) : J(\"\", !0)\n ];\n }),\n _: 3\n }, 8, [\"name\", \"css\"])\n ], 64);\n };\n }\n}), xa = (e, t, r) => {\n if (t.value && Array.isArray(t.value))\n if (t.value.some((a) => Ae(e, a))) {\n const a = t.value.filter((n) => !Ae(n, e));\n t.value = a.length ? a : null;\n } else (r && +r > t.value.length || !r) && t.value.push(e);\n else\n t.value = [e];\n}, en = (e, t, r) => {\n let a = e.value ? e.value.slice() : [];\n return a.length === 2 && a[1] !== null && (a = []), a.length ? (Ye(t, a[0]) ? a.unshift(t) : a[1] = t, r(\"range-end\", t)) : (a = [t], r(\"range-start\", t)), a;\n}, pa = (e, t, r, a) => {\n e && (e[0] && e[1] && r && t(\"auto-apply\"), e[0] && !e[1] && a && r && t(\"auto-apply\"));\n}, Hn = (e) => {\n Array.isArray(e.value) && e.value.length <= 2 && e.range ? e.modelValue.value = e.value.map((t) => et(j(t), e.timezone)) : Array.isArray(e.value) || (e.modelValue.value = et(j(e.value), e.timezone));\n}, Un = (e, t, r, a) => Array.isArray(t.value) && (t.value.length === 2 || t.value.length === 1 && a.value.partialRange) ? a.value.fixedStart && (Ee(e, t.value[0]) || Ae(e, t.value[0])) ? [t.value[0], e] : a.value.fixedEnd && (Ye(e, t.value[1]) || Ae(e, t.value[1])) ? [e, t.value[1]] : (r(\"invalid-fixed-range\", e), t.value) : [], Wn = ({\n multiCalendars: e,\n range: t,\n highlight: r,\n propDates: a,\n calendars: n,\n modelValue: u,\n props: d,\n filters: y,\n year: i,\n month: _,\n emit: c\n}) => {\n const C = Q(() => qa(d.yearRange, d.locale, d.reverseYears)), m = te([!1]), P = Q(() => (O, K) => {\n const fe = Pe(dt(/* @__PURE__ */ new Date()), {\n month: _.value(O),\n year: i.value(O)\n }), me = K ? $n(fe) : da(fe);\n return En(\n me,\n a.value.maxDate,\n a.value.minDate,\n d.preventMinMaxNavigation,\n K\n );\n }), U = () => Array.isArray(u.value) && e.value.solo && u.value[1], N = () => {\n for (let O = 0; O < e.value.count; O++)\n if (O === 0)\n n.value[O] = n.value[0];\n else if (O === e.value.count - 1 && U())\n n.value[O] = {\n month: $e(u.value[1]),\n year: ye(u.value[1])\n };\n else {\n const K = Pe(j(), n.value[O - 1]);\n n.value[O] = { month: $e(K), year: ye(Dn(K, 1)) };\n }\n }, H = (O) => {\n if (!O) return N();\n const K = Pe(j(), n.value[O]);\n return n.value[0].year = ye(Mn(K, e.value.count - 1)), N();\n }, f = (O, K) => {\n const fe = dl(K, O);\n return t.value.showLastInRange && fe > 1 ? K : O;\n }, I = (O) => d.focusStartDate || e.value.solo ? O[0] : O[1] ? f(O[0], O[1]) : O[0], k = () => {\n if (u.value) {\n const O = Array.isArray(u.value) ? I(u.value) : u.value;\n n.value[0] = { month: $e(O), year: ye(O) };\n }\n }, z = () => {\n k(), e.value.count && N();\n };\n ot(u, (O, K) => {\n d.isTextInputDate && JSON.stringify(O ?? {}) !== JSON.stringify(K ?? {}) && z();\n }), je(() => {\n z();\n });\n const q = (O, K) => {\n n.value[K].year = O, c(\"update-month-year\", { instance: K, year: O, month: n.value[K].month }), e.value.count && !e.value.solo && H(K);\n }, ee = Q(() => (O) => zt(C.value, (K) => {\n var L;\n const fe = i.value(O) === K.value, me = Xt(\n K.value,\n Ht(a.value.minDate),\n Ht(a.value.maxDate)\n ) || ((L = y.value.years) == null ? void 0 : L.includes(i.value(O))), v = Za(r.value, K.value);\n return { active: fe, disabled: me, highlighted: v };\n })), x = (O, K) => {\n q(O, K), X(K);\n }, S = (O, K = !1) => {\n if (!P.value(O, K)) {\n const fe = K ? i.value(O) + 1 : i.value(O) - 1;\n q(fe, O);\n }\n }, X = (O, K = !1, fe) => {\n K || c(\"reset-flow\"), fe !== void 0 ? m.value[O] = fe : m.value[O] = !m.value[O], m.value[O] ? c(\"overlay-toggle\", { open: !0, overlay: Ge.year }) : (c(\"overlay-closed\"), c(\"overlay-toggle\", { open: !1, overlay: Ge.year }));\n };\n return {\n isDisabled: P,\n groupedYears: ee,\n showYearPicker: m,\n selectYear: q,\n toggleYearPicker: X,\n handleYearSelect: x,\n handleYear: S\n };\n}, pr = (e, t) => {\n const {\n defaultedMultiCalendars: r,\n defaultedAriaLabels: a,\n defaultedTransitions: n,\n defaultedConfig: u,\n defaultedRange: d,\n defaultedHighlight: y,\n propDates: i,\n defaultedTz: _,\n defaultedFilters: c,\n defaultedMultiDates: C\n } = _e(e), m = () => {\n e.isTextInputDate && z(ye(j(e.startDate)), 0);\n }, { modelValue: P, year: U, month: N, calendars: H } = aa(e, t, m), f = Q(() => Sn(e.formatLocale, e.locale, e.monthNameFormat)), I = te(null), { checkMinMaxRange: k } = Tt(e), {\n selectYear: z,\n groupedYears: q,\n showYearPicker: ee,\n toggleYearPicker: x,\n handleYearSelect: S,\n handleYear: X,\n isDisabled: O\n } = Wn({\n modelValue: P,\n multiCalendars: r,\n range: d,\n highlight: y,\n calendars: H,\n year: U,\n propDates: i,\n month: N,\n filters: c,\n props: e,\n emit: t\n });\n je(() => {\n e.startDate && (P.value && e.focusStartDate || !P.value) && z(ye(j(e.startDate)), 0);\n });\n const K = (R) => R ? { month: $e(R), year: ye(R) } : { month: null, year: null }, fe = () => P.value ? Array.isArray(P.value) ? P.value.map((R) => K(R)) : K(P.value) : K(), me = (R, ae) => {\n const l = H.value[R], D = fe();\n return Array.isArray(D) ? D.some((ue) => ue.year === (l == null ? void 0 : l.year) && ue.month === ae) : (l == null ? void 0 : l.year) === D.year && ae === D.month;\n }, v = (R, ae, l) => {\n var ue, M;\n const D = fe();\n return Array.isArray(D) ? U.value(ae) === ((ue = D[l]) == null ? void 0 : ue.year) && R === ((M = D[l]) == null ? void 0 : M.month) : !1;\n }, L = (R, ae) => {\n if (d.value.enabled) {\n const l = fe();\n if (Array.isArray(P.value) && Array.isArray(l)) {\n const D = v(R, ae, 0) || v(R, ae, 1), ue = yt(dt(j()), R, U.value(ae));\n return Jt(P.value, I.value, ue) && !D;\n }\n return !1;\n }\n return !1;\n }, ne = Q(() => (R) => zt(f.value, (ae) => {\n var he;\n const l = me(R, ae.value), D = Xt(\n ae.value,\n Bn(U.value(R), i.value.minDate),\n _n(U.value(R), i.value.maxDate)\n ) || Fl(i.value.disabledDates, U.value(R), ae.value) || ((he = c.value.months) == null ? void 0 : he.includes(ae.value)) || !Ll(i.value.allowedDates, U.value(R), ae.value), ue = L(ae.value, R), M = Fn(y.value, ae.value, U.value(R));\n return { active: l, disabled: D, isBetween: ue, highlighted: M };\n })), p = (R, ae) => yt(dt(j()), R, U.value(ae)), W = (R, ae) => {\n const l = P.value ? P.value : dt(/* @__PURE__ */ new Date());\n P.value = yt(l, R, U.value(ae)), t(\"auto-apply\"), t(\"update-flow-step\");\n }, T = (R, ae) => {\n const l = p(R, ae);\n d.value.fixedEnd || d.value.fixedStart ? P.value = Un(l, P, t, d) : P.value ? k(l, P.value) && (P.value = en(P, p(R, ae), t)) : P.value = [p(R, ae)], nt().then(() => {\n pa(P.value, t, e.autoApply, e.modelAuto);\n });\n }, oe = (R, ae) => {\n xa(p(R, ae), P, C.value.limit), t(\"auto-apply\", !0);\n }, $ = (R, ae) => (H.value[ae].month = R, g(ae, H.value[ae].year, R), C.value.enabled ? oe(R, ae) : d.value.enabled ? T(R, ae) : W(R, ae)), Y = (R, ae) => {\n z(R, ae), g(ae, R, null);\n }, g = (R, ae, l) => {\n let D = l;\n if (!D && D !== 0) {\n const ue = fe();\n D = Array.isArray(ue) ? ue[R].month : ue.month;\n }\n t(\"update-month-year\", { instance: R, year: ae, month: D });\n };\n return {\n groupedMonths: ne,\n groupedYears: q,\n year: U,\n isDisabled: O,\n defaultedMultiCalendars: r,\n defaultedAriaLabels: a,\n defaultedTransitions: n,\n defaultedConfig: u,\n showYearPicker: ee,\n modelValue: P,\n presetDate: (R, ae) => {\n Hn({\n value: R,\n modelValue: P,\n range: d.value.enabled,\n timezone: ae ? void 0 : _.value.timezone\n }), t(\"auto-apply\");\n },\n setHoverDate: (R, ae) => {\n I.value = p(R, ae);\n },\n selectMonth: $,\n selectYear: Y,\n toggleYearPicker: x,\n handleYearSelect: S,\n handleYear: X,\n getModelMonthYear: fe\n };\n}, yr = /* @__PURE__ */ Ve({\n compatConfig: {\n MODE: 3\n },\n __name: \"MonthPicker\",\n props: {\n ...ct\n },\n emits: [\n \"update:internal-model-value\",\n \"overlay-closed\",\n \"reset-flow\",\n \"range-start\",\n \"range-end\",\n \"auto-apply\",\n \"update-month-year\",\n \"update-flow-step\",\n \"mount\",\n \"invalid-fixed-range\",\n \"overlay-toggle\"\n ],\n setup(e, { expose: t, emit: r }) {\n const a = r, n = Bt(), u = tt(n, \"yearMode\"), d = e;\n je(() => {\n d.shadow || a(\"mount\", null);\n });\n const {\n groupedMonths: y,\n groupedYears: i,\n year: _,\n isDisabled: c,\n defaultedMultiCalendars: C,\n defaultedConfig: m,\n showYearPicker: P,\n modelValue: U,\n presetDate: N,\n setHoverDate: H,\n selectMonth: f,\n selectYear: I,\n toggleYearPicker: k,\n handleYearSelect: z,\n handleYear: q,\n getModelMonthYear: ee\n } = pr(d, a);\n return t({ getSidebarProps: () => ({\n modelValue: U,\n year: _,\n getModelMonthYear: ee,\n selectMonth: f,\n selectYear: I,\n handleYear: q\n }), presetDate: N, toggleYearPicker: (S) => k(0, S) }), (S, X) => (A(), Te(ma, {\n \"multi-calendars\": s(C).count,\n collapse: S.collapse,\n stretch: \"\",\n \"is-mobile\": S.isMobile\n }, {\n default: we(({ instance: O }) => [\n S.$slots[\"top-extra\"] ? de(S.$slots, \"top-extra\", {\n key: 0,\n value: S.internalModelValue\n }) : J(\"\", !0),\n S.$slots[\"month-year\"] ? de(S.$slots, \"month-year\", ze(He({ key: 1 }, {\n year: s(_),\n months: s(y)(O),\n years: s(i)(O),\n selectMonth: s(f),\n selectYear: s(I),\n instance: O\n }))) : (A(), Te(ea, {\n key: 2,\n items: s(y)(O),\n \"arrow-navigation\": S.arrowNavigation,\n \"is-last\": S.autoApply && !s(m).keepActionRow,\n \"esc-close\": S.escClose,\n height: s(m).modeHeight,\n config: S.config,\n \"no-overlay-focus\": !!(S.noOverlayFocus || S.textInput),\n \"use-relative\": \"\",\n type: \"month\",\n onSelected: (K) => s(f)(K, O),\n onHoverValue: (K) => s(H)(K, O)\n }, qe({\n header: we(() => [\n at(zn, He(S.$props, {\n items: s(i)(O),\n instance: O,\n \"show-year-picker\": s(P)[O],\n year: s(_)(O),\n \"is-disabled\": (K) => s(c)(O, K),\n onHandleYear: (K) => s(q)(O, K),\n onYearSelect: (K) => s(z)(K, O),\n onToggleYearPicker: (K) => s(k)(O, K == null ? void 0 : K.flow, K == null ? void 0 : K.show)\n }), qe({ _: 2 }, [\n Be(s(u), (K, fe) => ({\n name: K,\n fn: we((me) => [\n de(S.$slots, K, ze(xe(me)))\n ])\n }))\n ]), 1040, [\"items\", \"instance\", \"show-year-picker\", \"year\", \"is-disabled\", \"onHandleYear\", \"onYearSelect\", \"onToggleYearPicker\"])\n ]),\n _: 2\n }, [\n S.$slots[\"month-overlay-value\"] ? {\n name: \"item\",\n fn: we(({ item: K }) => [\n de(S.$slots, \"month-overlay-value\", {\n text: K.text,\n value: K.value\n })\n ]),\n key: \"0\"\n } : void 0\n ]), 1032, [\"items\", \"arrow-navigation\", \"is-last\", \"esc-close\", \"height\", \"config\", \"no-overlay-focus\", \"onSelected\", \"onHoverValue\"]))\n ]),\n _: 3\n }, 8, [\"multi-calendars\", \"collapse\", \"is-mobile\"]));\n }\n}), gr = (e, t) => {\n const r = () => {\n e.isTextInputDate && (c.value = ye(j(e.startDate)));\n }, { modelValue: a } = aa(e, t, r), n = te(null), { defaultedHighlight: u, defaultedMultiDates: d, defaultedFilters: y, defaultedRange: i, propDates: _ } = _e(e), c = te();\n je(() => {\n e.startDate && (a.value && e.focusStartDate || !a.value) && (c.value = ye(j(e.startDate)));\n });\n const C = (k) => Array.isArray(a.value) ? a.value.some((z) => ye(z) === k) : a.value ? ye(a.value) === k : !1, m = (k) => i.value.enabled && Array.isArray(a.value) ? Jt(a.value, n.value, H(k)) : !1, P = (k) => _.value.allowedDates instanceof Map ? _.value.allowedDates.size ? _.value.allowedDates.has(`${k}`) : !1 : !0, U = (k) => _.value.disabledDates instanceof Map ? _.value.disabledDates.size ? _.value.disabledDates.has(`${k}`) : !1 : !0, N = Q(() => zt(qa(e.yearRange, e.locale, e.reverseYears), (k) => {\n const z = C(k.value), q = Xt(\n k.value,\n Ht(_.value.minDate),\n Ht(_.value.maxDate)\n ) || y.value.years.includes(k.value) || !P(k.value) || U(k.value), ee = m(k.value) && !z, x = Za(u.value, k.value);\n return { active: z, disabled: q, isBetween: ee, highlighted: x };\n })), H = (k) => ft(dt(da(/* @__PURE__ */ new Date())), k);\n return {\n groupedYears: N,\n modelValue: a,\n focusYear: c,\n setHoverValue: (k) => {\n n.value = ft(dt(/* @__PURE__ */ new Date()), k);\n },\n selectYear: (k) => {\n var z;\n if (t(\"update-month-year\", { instance: 0, year: k }), d.value.enabled)\n return a.value ? Array.isArray(a.value) && (((z = a.value) == null ? void 0 : z.map((ee) => ye(ee))).includes(k) ? a.value = a.value.filter((ee) => ye(ee) !== k) : a.value.push(ft(We(j()), k))) : a.value = [ft(We(da(j())), k)], t(\"auto-apply\", !0);\n i.value.enabled ? (a.value = en(a, H(k), t), nt().then(() => {\n pa(a.value, t, e.autoApply, e.modelAuto);\n })) : (a.value = H(k), t(\"auto-apply\"));\n }\n };\n}, hr = /* @__PURE__ */ Ve({\n compatConfig: {\n MODE: 3\n },\n __name: \"YearPicker\",\n props: {\n ...ct\n },\n emits: [\n \"update:internal-model-value\",\n \"reset-flow\",\n \"range-start\",\n \"range-end\",\n \"auto-apply\",\n \"update-month-year\"\n ],\n setup(e, { expose: t, emit: r }) {\n const a = r, n = e, { groupedYears: u, modelValue: d, focusYear: y, selectYear: i, setHoverValue: _ } = gr(n, a), { defaultedConfig: c } = _e(n);\n return t({ getSidebarProps: () => ({\n modelValue: d,\n selectYear: i\n }) }), (m, P) => (A(), V(\"div\", null, [\n m.$slots[\"top-extra\"] ? de(m.$slots, \"top-extra\", {\n key: 0,\n value: m.internalModelValue\n }) : J(\"\", !0),\n m.$slots[\"month-year\"] ? de(m.$slots, \"month-year\", ze(He({ key: 1 }, {\n years: s(u),\n selectYear: s(i)\n }))) : (A(), Te(ea, {\n key: 2,\n items: s(u),\n \"is-last\": m.autoApply && !s(c).keepActionRow,\n height: s(c).modeHeight,\n config: m.config,\n \"no-overlay-focus\": !!(m.noOverlayFocus || m.textInput),\n \"focus-value\": s(y),\n type: \"year\",\n \"use-relative\": \"\",\n onSelected: s(i),\n onHoverValue: s(_)\n }, qe({ _: 2 }, [\n m.$slots[\"year-overlay-value\"] ? {\n name: \"item\",\n fn: we(({ item: U }) => [\n de(m.$slots, \"year-overlay-value\", {\n text: U.text,\n value: U.value\n })\n ]),\n key: \"0\"\n } : void 0\n ]), 1032, [\"items\", \"is-last\", \"height\", \"config\", \"no-overlay-focus\", \"focus-value\", \"onSelected\", \"onHoverValue\"]))\n ]));\n }\n}), br = {\n key: 0,\n class: \"dp__time_input\"\n}, kr = [\"data-compact\", \"data-collapsed\"], wr = [\"data-test-id\", \"aria-label\", \"onKeydown\", \"onClick\", \"onMousedown\"], Dr = [\"aria-label\", \"disabled\", \"data-test-id\", \"onKeydown\", \"onClick\"], Mr = [\"data-test-id\", \"aria-label\", \"onKeydown\", \"onClick\", \"onMousedown\"], $r = { key: 0 }, Ar = [\"aria-label\", \"data-compact\"], Tr = /* @__PURE__ */ Ve({\n compatConfig: {\n MODE: 3\n },\n __name: \"TimeInput\",\n props: {\n hours: { type: Number, default: 0 },\n minutes: { type: Number, default: 0 },\n seconds: { type: Number, default: 0 },\n closeTimePickerBtn: { type: Object, default: null },\n order: { type: Number, default: 0 },\n disabledTimesConfig: { type: Function, default: null },\n validateTime: { type: Function, default: () => !1 },\n ...ct\n },\n emits: [\n \"set-hours\",\n \"set-minutes\",\n \"update:hours\",\n \"update:minutes\",\n \"update:seconds\",\n \"reset-flow\",\n \"mounted\",\n \"overlay-closed\",\n \"overlay-opened\",\n \"am-pm-change\"\n ],\n setup(e, { expose: t, emit: r }) {\n const a = r, n = e, { setTimePickerElements: u, setTimePickerBackRef: d } = At(), {\n defaultedAriaLabels: y,\n defaultedTransitions: i,\n defaultedFilters: _,\n defaultedConfig: c,\n defaultedRange: C,\n defaultedMultiCalendars: m\n } = _e(n), { transitionName: P, showTransition: U } = ta(i), N = Zt({\n hours: !1,\n minutes: !1,\n seconds: !1\n }), H = te(\"AM\"), f = te(null), I = te([]), k = te(), z = te(!1);\n je(() => {\n a(\"mounted\");\n });\n const q = (o) => Pe(/* @__PURE__ */ new Date(), {\n hours: o.hours,\n minutes: o.minutes,\n seconds: n.enableSeconds ? o.seconds : 0,\n milliseconds: 0\n }), ee = Q(\n () => (o) => T(o, n[o]) || S(o, n[o])\n ), x = Q(() => ({ hours: n.hours, minutes: n.minutes, seconds: n.seconds })), S = (o, E) => C.value.enabled && !C.value.disableTimeRangeValidation ? !n.validateTime(o, E) : !1, X = (o, E) => {\n if (C.value.enabled && !C.value.disableTimeRangeValidation) {\n const ce = E ? +n[`${o}Increment`] : -+n[`${o}Increment`], B = n[o] + ce;\n return !n.validateTime(o, B);\n }\n return !1;\n }, O = Q(() => (o) => !Z(+n[o] + +n[`${o}Increment`], o) || X(o, !0)), K = Q(() => (o) => !Z(+n[o] - +n[`${o}Increment`], o) || X(o, !1)), fe = (o, E) => An(Pe(j(), o), E), me = (o, E) => cl(Pe(j(), o), E), v = Q(\n () => ({\n dp__time_col: !0,\n dp__time_col_block: !n.timePickerInline,\n dp__time_col_reg_block: !n.enableSeconds && n.is24 && !n.timePickerInline,\n dp__time_col_reg_inline: !n.enableSeconds && n.is24 && n.timePickerInline,\n dp__time_col_reg_with_button: !n.enableSeconds && !n.is24,\n dp__time_col_sec: n.enableSeconds && n.is24,\n dp__time_col_sec_with_button: n.enableSeconds && !n.is24\n })\n ), L = Q(\n () => n.timePickerInline && C.value.enabled && !m.value.count\n ), ne = Q(() => {\n const o = [{ type: \"hours\" }];\n return n.enableMinutes && o.push({ type: \"\", separator: !0 }, {\n type: \"minutes\"\n }), n.enableSeconds && o.push({ type: \"\", separator: !0 }, {\n type: \"seconds\"\n }), o;\n }), p = Q(() => ne.value.filter((o) => !o.separator)), W = Q(() => (o) => {\n if (o === \"hours\") {\n const E = ue(+n.hours);\n return { text: E < 10 ? `0${E}` : `${E}`, value: E };\n }\n return { text: n[o] < 10 ? `0${n[o]}` : `${n[o]}`, value: n[o] };\n }), T = (o, E) => {\n var B;\n if (!n.disabledTimesConfig) return !1;\n const ce = n.disabledTimesConfig(n.order, o === \"hours\" ? E : void 0);\n return ce[o] ? !!((B = ce[o]) != null && B.includes(E)) : !0;\n }, oe = (o, E) => E !== \"hours\" || H.value === \"AM\" ? o : o + 12, $ = (o) => {\n const E = n.is24 ? 24 : 12, ce = o === \"hours\" ? E : 60, B = +n[`${o}GridIncrement`], Me = o === \"hours\" && !n.is24 ? B : 0, be = [];\n for (let Se = Me; Se < ce; Se += B)\n be.push({ value: n.is24 ? Se : oe(Se, o), text: Se < 10 ? `0${Se}` : `${Se}` });\n return o === \"hours\" && !n.is24 && be.unshift({ value: H.value === \"PM\" ? 12 : 0, text: \"12\" }), zt(be, (Se) => ({ active: !1, disabled: _.value.times[o].includes(Se.value) || !Z(Se.value, o) || T(o, Se.value) || S(o, Se.value) }));\n }, Y = (o) => o >= 0 ? o : 59, g = (o) => o >= 0 ? o : 23, Z = (o, E) => {\n const ce = n.minTime ? q(Sa(n.minTime)) : null, B = n.maxTime ? q(Sa(n.maxTime)) : null, Me = q(\n Sa(\n x.value,\n E,\n E === \"minutes\" || E === \"seconds\" ? Y(o) : g(o)\n )\n );\n return ce && B ? (Ft(Me, B) || Et(Me, B)) && (Ot(Me, ce) || Et(Me, ce)) : ce ? Ot(Me, ce) || Et(Me, ce) : B ? Ft(Me, B) || Et(Me, B) : !0;\n }, se = (o) => n[`no${o[0].toUpperCase() + o.slice(1)}Overlay`], R = (o) => {\n se(o) || (N[o] = !N[o], N[o] ? (z.value = !0, a(\"overlay-opened\", o)) : (z.value = !1, a(\"overlay-closed\", o)));\n }, ae = (o) => o === \"hours\" ? ht : o === \"minutes\" ? $t : Lt, l = () => {\n k.value && clearTimeout(k.value);\n }, D = (o, E = !0, ce) => {\n const B = E ? fe : me, Me = E ? +n[`${o}Increment`] : -+n[`${o}Increment`];\n Z(+n[o] + Me, o) && a(\n `update:${o}`,\n ae(o)(B({ [o]: +n[o] }, { [o]: +n[`${o}Increment`] }))\n ), !(ce != null && ce.keyboard) && c.value.timeArrowHoldThreshold && (k.value = setTimeout(() => {\n D(o, E);\n }, c.value.timeArrowHoldThreshold));\n }, ue = (o) => n.is24 ? o : (o >= 12 ? H.value = \"PM\" : H.value = \"AM\", $l(o)), M = () => {\n H.value === \"PM\" ? (H.value = \"AM\", a(\"update:hours\", n.hours - 12)) : (H.value = \"PM\", a(\"update:hours\", n.hours + 12)), a(\"am-pm-change\", H.value);\n }, he = (o) => {\n N[o] = !0;\n }, pe = (o, E, ce) => {\n if (o && n.arrowNavigation) {\n Array.isArray(I.value[E]) ? I.value[E][ce] = o : I.value[E] = [o];\n const B = I.value.reduce(\n (Me, be) => be.map((Se, b) => [...Me[b] || [], be[b]]),\n []\n );\n d(n.closeTimePickerBtn), f.value && (B[1] = B[1].concat(f.value)), u(B, n.order);\n }\n }, re = (o, E) => (R(o), a(`update:${o}`, E));\n return t({ openChildCmp: he }), (o, E) => {\n var ce;\n return o.disabled ? J(\"\", !0) : (A(), V(\"div\", br, [\n (A(!0), V(ke, null, Be(ne.value, (B, Me) => {\n var be, Se, b;\n return A(), V(\"div\", {\n key: Me,\n class: De(v.value),\n \"data-compact\": L.value && !o.enableSeconds,\n \"data-collapsed\": L.value && o.enableSeconds\n }, [\n B.separator ? (A(), V(ke, { key: 0 }, [\n z.value ? J(\"\", !0) : (A(), V(ke, { key: 0 }, [\n gt(\":\")\n ], 64))\n ], 64)) : (A(), V(ke, { key: 1 }, [\n ge(\"button\", {\n ref_for: !0,\n ref: (F) => pe(F, Me, 0),\n type: \"button\",\n class: De({\n dp__btn: !0,\n dp__inc_dec_button: !o.timePickerInline,\n dp__inc_dec_button_inline: o.timePickerInline,\n dp__tp_inline_btn_top: o.timePickerInline,\n dp__inc_dec_button_disabled: O.value(B.type),\n \"dp--hidden-el\": z.value\n }),\n \"data-test-id\": `${B.type}-time-inc-btn-${n.order}`,\n \"aria-label\": (be = s(y)) == null ? void 0 : be.incrementValue(B.type),\n tabindex: \"0\",\n onKeydown: (F) => s(Ze)(F, () => D(B.type, !0, { keyboard: !0 }), !0),\n onClick: (F) => s(c).timeArrowHoldThreshold ? void 0 : D(B.type, !0),\n onMousedown: (F) => s(c).timeArrowHoldThreshold ? D(B.type, !0) : void 0,\n onMouseup: l\n }, [\n n.timePickerInline ? (A(), V(ke, { key: 1 }, [\n o.$slots[\"tp-inline-arrow-up\"] ? de(o.$slots, \"tp-inline-arrow-up\", { key: 0 }) : (A(), V(ke, { key: 1 }, [\n E[2] || (E[2] = ge(\"span\", { class: \"dp__tp_inline_btn_bar dp__tp_btn_in_l\" }, null, -1)),\n E[3] || (E[3] = ge(\"span\", { class: \"dp__tp_inline_btn_bar dp__tp_btn_in_r\" }, null, -1))\n ], 64))\n ], 64)) : (A(), V(ke, { key: 0 }, [\n o.$slots[\"arrow-up\"] ? de(o.$slots, \"arrow-up\", { key: 0 }) : J(\"\", !0),\n o.$slots[\"arrow-up\"] ? J(\"\", !0) : (A(), Te(s(Ka), { key: 1 }))\n ], 64))\n ], 42, wr),\n ge(\"button\", {\n ref_for: !0,\n ref: (F) => pe(F, Me, 1),\n type: \"button\",\n \"aria-label\": `${W.value(B.type).text}-${(Se = s(y)) == null ? void 0 : Se.openTpOverlay(B.type)}`,\n class: De({\n dp__time_display: !0,\n dp__time_display_block: !o.timePickerInline,\n dp__time_display_inline: o.timePickerInline,\n \"dp--time-invalid\": ee.value(B.type),\n \"dp--time-overlay-btn\": !ee.value(B.type),\n \"dp--hidden-el\": z.value\n }),\n disabled: se(B.type),\n tabindex: \"0\",\n \"data-test-id\": `${B.type}-toggle-overlay-btn-${n.order}`,\n onKeydown: (F) => s(Ze)(F, () => R(B.type), !0),\n onClick: (F) => R(B.type)\n }, [\n o.$slots[B.type] ? de(o.$slots, B.type, {\n key: 0,\n text: W.value(B.type).text,\n value: W.value(B.type).value\n }) : J(\"\", !0),\n o.$slots[B.type] ? J(\"\", !0) : (A(), V(ke, { key: 1 }, [\n gt(Qe(W.value(B.type).text), 1)\n ], 64))\n ], 42, Dr),\n ge(\"button\", {\n ref_for: !0,\n ref: (F) => pe(F, Me, 2),\n type: \"button\",\n class: De({\n dp__btn: !0,\n dp__inc_dec_button: !o.timePickerInline,\n dp__inc_dec_button_inline: o.timePickerInline,\n dp__tp_inline_btn_bottom: o.timePickerInline,\n dp__inc_dec_button_disabled: K.value(B.type),\n \"dp--hidden-el\": z.value\n }),\n \"data-test-id\": `${B.type}-time-dec-btn-${n.order}`,\n \"aria-label\": (b = s(y)) == null ? void 0 : b.decrementValue(B.type),\n tabindex: \"0\",\n onKeydown: (F) => s(Ze)(F, () => D(B.type, !1, { keyboard: !0 }), !0),\n onClick: (F) => s(c).timeArrowHoldThreshold ? void 0 : D(B.type, !1),\n onMousedown: (F) => s(c).timeArrowHoldThreshold ? D(B.type, !1) : void 0,\n onMouseup: l\n }, [\n n.timePickerInline ? (A(), V(ke, { key: 1 }, [\n o.$slots[\"tp-inline-arrow-down\"] ? de(o.$slots, \"tp-inline-arrow-down\", { key: 0 }) : (A(), V(ke, { key: 1 }, [\n E[4] || (E[4] = ge(\"span\", { class: \"dp__tp_inline_btn_bar dp__tp_btn_in_l\" }, null, -1)),\n E[5] || (E[5] = ge(\"span\", { class: \"dp__tp_inline_btn_bar dp__tp_btn_in_r\" }, null, -1))\n ], 64))\n ], 64)) : (A(), V(ke, { key: 0 }, [\n o.$slots[\"arrow-down\"] ? de(o.$slots, \"arrow-down\", { key: 0 }) : J(\"\", !0),\n o.$slots[\"arrow-down\"] ? J(\"\", !0) : (A(), Te(s(Ga), { key: 1 }))\n ], 64))\n ], 42, Mr)\n ], 64))\n ], 10, kr);\n }), 128)),\n o.is24 ? J(\"\", !0) : (A(), V(\"div\", $r, [\n o.$slots[\"am-pm-button\"] ? de(o.$slots, \"am-pm-button\", {\n key: 0,\n toggle: M,\n value: H.value\n }) : J(\"\", !0),\n o.$slots[\"am-pm-button\"] ? J(\"\", !0) : (A(), V(\"button\", {\n key: 1,\n ref_key: \"amPmButton\",\n ref: f,\n type: \"button\",\n class: \"dp__pm_am_button\",\n role: \"button\",\n \"aria-label\": (ce = s(y)) == null ? void 0 : ce.amPmButton,\n tabindex: \"0\",\n \"data-compact\": L.value,\n onClick: M,\n onKeydown: E[0] || (E[0] = (B) => s(Ze)(B, () => M(), !0))\n }, Qe(H.value), 41, Ar))\n ])),\n (A(!0), V(ke, null, Be(p.value, (B, Me) => (A(), Te(Ut, {\n key: Me,\n name: s(P)(N[B.type]),\n css: s(U)\n }, {\n default: we(() => {\n var be, Se;\n return [\n N[B.type] ? (A(), Te(ea, {\n key: 0,\n items: $(B.type),\n \"is-last\": o.autoApply && !s(c).keepActionRow,\n \"esc-close\": o.escClose,\n type: B.type,\n \"text-input\": o.textInput,\n config: o.config,\n \"arrow-navigation\": o.arrowNavigation,\n \"aria-labels\": o.ariaLabels,\n \"overlay-label\": (Se = (be = s(y)).timeOverlay) == null ? void 0 : Se.call(be, B.type),\n onSelected: (b) => re(B.type, b),\n onToggle: (b) => R(B.type),\n onResetFlow: E[1] || (E[1] = (b) => o.$emit(\"reset-flow\"))\n }, qe({\n \"button-icon\": we(() => [\n o.$slots[\"clock-icon\"] ? de(o.$slots, \"clock-icon\", { key: 0 }) : J(\"\", !0),\n o.$slots[\"clock-icon\"] ? J(\"\", !0) : (A(), Te(fa(o.timePickerInline ? s(Wt) : s(ja)), { key: 1 }))\n ]),\n _: 2\n }, [\n o.$slots[`${B.type}-overlay-value`] ? {\n name: \"item\",\n fn: we(({ item: b }) => [\n de(o.$slots, `${B.type}-overlay-value`, {\n text: b.text,\n value: b.value\n })\n ]),\n key: \"0\"\n } : void 0,\n o.$slots[`${B.type}-overlay-header`] ? {\n name: \"header\",\n fn: we(() => [\n de(o.$slots, `${B.type}-overlay-header`, {\n toggle: () => R(B.type)\n })\n ]),\n key: \"1\"\n } : void 0\n ]), 1032, [\"items\", \"is-last\", \"esc-close\", \"type\", \"text-input\", \"config\", \"arrow-navigation\", \"aria-labels\", \"overlay-label\", \"onSelected\", \"onToggle\"])) : J(\"\", !0)\n ];\n }),\n _: 2\n }, 1032, [\"name\", \"css\"]))), 128))\n ]));\n };\n }\n}), Sr = [\"data-dp-mobile\"], Pr = [\"aria-label\", \"tabindex\"], Rr = [\"role\", \"aria-label\", \"tabindex\"], Cr = [\"aria-label\"], Vn = /* @__PURE__ */ Ve({\n compatConfig: {\n MODE: 3\n },\n __name: \"TimePicker\",\n props: {\n hours: { type: [Number, Array], default: 0 },\n minutes: { type: [Number, Array], default: 0 },\n seconds: { type: [Number, Array], default: 0 },\n disabledTimesConfig: { type: Function, default: null },\n validateTime: {\n type: Function,\n default: () => !1\n },\n ...ct\n },\n emits: [\n \"update:hours\",\n \"update:minutes\",\n \"update:seconds\",\n \"mount\",\n \"reset-flow\",\n \"overlay-opened\",\n \"overlay-closed\",\n \"am-pm-change\"\n ],\n setup(e, { expose: t, emit: r }) {\n const a = r, n = e, { buildMatrix: u, setTimePicker: d } = At(), y = Bt(), { defaultedTransitions: i, defaultedAriaLabels: _, defaultedTextInput: c, defaultedConfig: C, defaultedRange: m } = _e(n), { transitionName: P, showTransition: U } = ta(i), { hideNavigationButtons: N } = ya(), H = te(null), f = te(null), I = te([]), k = te(null), z = te(!1);\n je(() => {\n a(\"mount\"), !n.timePicker && n.arrowNavigation ? u([Le(H.value)], \"time\") : d(!0, n.timePicker);\n });\n const q = Q(() => m.value.enabled && n.modelAuto ? Pn(n.internalModelValue) : !0), ee = te(!1), x = (T) => ({\n hours: Array.isArray(n.hours) ? n.hours[T] : n.hours,\n minutes: Array.isArray(n.minutes) ? n.minutes[T] : n.minutes,\n seconds: Array.isArray(n.seconds) ? n.seconds[T] : n.seconds\n }), S = Q(() => {\n const T = [];\n if (m.value.enabled)\n for (let oe = 0; oe < 2; oe++)\n T.push(x(oe));\n else\n T.push(x(0));\n return T;\n }), X = (T, oe = !1, $ = \"\") => {\n oe || a(\"reset-flow\"), ee.value = T, a(T ? \"overlay-opened\" : \"overlay-closed\", Ge.time), n.arrowNavigation && d(T), nt(() => {\n $ !== \"\" && I.value[0] && I.value[0].openChildCmp($);\n });\n }, O = Q(() => ({\n dp__btn: !0,\n dp__button: !0,\n dp__button_bottom: n.autoApply && !C.value.keepActionRow\n })), K = tt(y, \"timePicker\"), fe = (T, oe, $) => m.value.enabled ? oe === 0 ? [T, S.value[1][$]] : [S.value[0][$], T] : T, me = (T) => {\n a(\"update:hours\", T);\n }, v = (T) => {\n a(\"update:minutes\", T);\n }, L = (T) => {\n a(\"update:seconds\", T);\n }, ne = () => {\n if (k.value && !c.value.enabled && !n.noOverlayFocus) {\n const T = Rn(k.value);\n T && T.focus({ preventScroll: !0 });\n }\n }, p = (T) => {\n z.value = !1, a(\"overlay-closed\", T);\n }, W = (T) => {\n z.value = !0, a(\"overlay-opened\", T);\n };\n return t({ toggleTimePicker: X }), (T, oe) => {\n var $;\n return A(), V(\"div\", {\n class: \"dp--tp-wrap\",\n \"data-dp-mobile\": T.isMobile\n }, [\n !T.timePicker && !T.timePickerInline ? sa((A(), V(\"button\", {\n key: 0,\n ref_key: \"openTimePickerBtn\",\n ref: H,\n type: \"button\",\n class: De({ ...O.value, \"dp--hidden-el\": ee.value }),\n \"aria-label\": ($ = s(_)) == null ? void 0 : $.openTimePicker,\n tabindex: T.noOverlayFocus ? void 0 : 0,\n \"data-test-id\": \"open-time-picker-btn\",\n onKeydown: oe[0] || (oe[0] = (Y) => s(Ze)(Y, () => X(!0))),\n onClick: oe[1] || (oe[1] = (Y) => X(!0))\n }, [\n T.$slots[\"clock-icon\"] ? de(T.$slots, \"clock-icon\", { key: 0 }) : J(\"\", !0),\n T.$slots[\"clock-icon\"] ? J(\"\", !0) : (A(), Te(s(ja), { key: 1 }))\n ], 42, Pr)), [\n [ua, !s(N)(T.hideNavigation, \"time\")]\n ]) : J(\"\", !0),\n at(Ut, {\n name: s(P)(ee.value),\n css: s(U) && !T.timePickerInline\n }, {\n default: we(() => {\n var Y, g;\n return [\n ee.value || T.timePicker || T.timePickerInline ? (A(), V(\"div\", {\n key: 0,\n ref_key: \"overlayRef\",\n ref: k,\n role: T.timePickerInline ? void 0 : \"dialog\",\n class: De({\n dp__overlay: !T.timePickerInline,\n \"dp--overlay-absolute\": !n.timePicker && !T.timePickerInline,\n \"dp--overlay-relative\": n.timePicker\n }),\n style: rt(T.timePicker ? { height: `${s(C).modeHeight}px` } : void 0),\n \"aria-label\": (Y = s(_)) == null ? void 0 : Y.timePicker,\n tabindex: T.timePickerInline ? void 0 : 0\n }, [\n ge(\"div\", {\n class: De(\n T.timePickerInline ? \"dp__time_picker_inline_container\" : \"dp__overlay_container dp__container_flex dp__time_picker_overlay_container\"\n ),\n style: { display: \"flex\" }\n }, [\n T.$slots[\"time-picker-overlay\"] ? de(T.$slots, \"time-picker-overlay\", {\n key: 0,\n hours: e.hours,\n minutes: e.minutes,\n seconds: e.seconds,\n setHours: me,\n setMinutes: v,\n setSeconds: L\n }) : J(\"\", !0),\n T.$slots[\"time-picker-overlay\"] ? J(\"\", !0) : (A(), V(\"div\", {\n key: 1,\n class: De(T.timePickerInline ? \"dp__flex\" : \"dp__overlay_row dp__flex_row\")\n }, [\n (A(!0), V(ke, null, Be(S.value, (Z, se) => sa((A(), Te(Tr, He({\n key: se,\n ref_for: !0\n }, {\n ...T.$props,\n order: se,\n hours: Z.hours,\n minutes: Z.minutes,\n seconds: Z.seconds,\n closeTimePickerBtn: f.value,\n disabledTimesConfig: e.disabledTimesConfig,\n disabled: se === 0 ? s(m).fixedStart : s(m).fixedEnd\n }, {\n ref_for: !0,\n ref_key: \"timeInputRefs\",\n ref: I,\n \"validate-time\": (R, ae) => e.validateTime(R, fe(ae, se, R)),\n \"onUpdate:hours\": (R) => me(fe(R, se, \"hours\")),\n \"onUpdate:minutes\": (R) => v(fe(R, se, \"minutes\")),\n \"onUpdate:seconds\": (R) => L(fe(R, se, \"seconds\")),\n onMounted: ne,\n onOverlayClosed: p,\n onOverlayOpened: W,\n onAmPmChange: oe[2] || (oe[2] = (R) => T.$emit(\"am-pm-change\", R))\n }), qe({ _: 2 }, [\n Be(s(K), (R, ae) => ({\n name: R,\n fn: we((l) => [\n de(T.$slots, R, He({ ref_for: !0 }, l))\n ])\n }))\n ]), 1040, [\"validate-time\", \"onUpdate:hours\", \"onUpdate:minutes\", \"onUpdate:seconds\"])), [\n [ua, se === 0 ? !0 : q.value]\n ])), 128))\n ], 2)),\n !T.timePicker && !T.timePickerInline ? sa((A(), V(\"button\", {\n key: 2,\n ref_key: \"closeTimePickerBtn\",\n ref: f,\n type: \"button\",\n class: De({ ...O.value, \"dp--hidden-el\": z.value }),\n \"aria-label\": (g = s(_)) == null ? void 0 : g.closeTimePicker,\n tabindex: \"0\",\n onKeydown: oe[3] || (oe[3] = (Z) => s(Ze)(Z, () => X(!1))),\n onClick: oe[4] || (oe[4] = (Z) => X(!1))\n }, [\n T.$slots[\"calendar-icon\"] ? de(T.$slots, \"calendar-icon\", { key: 0 }) : J(\"\", !0),\n T.$slots[\"calendar-icon\"] ? J(\"\", !0) : (A(), Te(s(Wt), { key: 1 }))\n ], 42, Cr)), [\n [ua, !s(N)(T.hideNavigation, \"time\")]\n ]) : J(\"\", !0)\n ], 2)\n ], 14, Rr)) : J(\"\", !0)\n ];\n }),\n _: 3\n }, 8, [\"name\", \"css\"])\n ], 8, Sr);\n };\n }\n}), jn = (e, t, r, a) => {\n const { defaultedRange: n } = _e(e), u = (k, z) => Array.isArray(t[k]) ? t[k][z] : t[k], d = (k) => e.enableSeconds ? Array.isArray(t.seconds) ? t.seconds[k] : t.seconds : 0, y = (k, z) => k ? z !== void 0 ? Mt(k, u(\"hours\", z), u(\"minutes\", z), d(z)) : Mt(k, t.hours, t.minutes, d()) : bn(j(), d(z)), i = (k, z) => {\n t[k] = z;\n }, _ = Q(() => e.modelAuto && n.value.enabled ? Array.isArray(r.value) ? r.value.length > 1 : !1 : n.value.enabled), c = (k, z) => {\n const q = Object.fromEntries(\n Object.keys(t).map((ee) => ee === k ? [ee, z] : [ee, t[ee]].slice())\n );\n if (_.value && !n.value.disableTimeRangeValidation) {\n const ee = (S) => r.value ? Mt(\n r.value[S],\n q.hours[S],\n q.minutes[S],\n q.seconds[S]\n ) : null, x = (S) => kn(r.value[S], 0);\n return !(Ae(ee(0), ee(1)) && (Ot(ee(0), x(1)) || Ft(ee(1), x(0))));\n }\n return !0;\n }, C = (k, z) => {\n c(k, z) && (i(k, z), a && a());\n }, m = (k) => {\n C(\"hours\", k);\n }, P = (k) => {\n C(\"minutes\", k);\n }, U = (k) => {\n C(\"seconds\", k);\n }, N = (k, z, q, ee) => {\n z && m(k), !z && !q && P(k), q && U(k), r.value && ee(r.value);\n }, H = (k) => {\n if (k) {\n const z = Array.isArray(k), q = z ? [+k[0].hours, +k[1].hours] : +k.hours, ee = z ? [+k[0].minutes, +k[1].minutes] : +k.minutes, x = z ? [+k[0].seconds, +k[1].seconds] : +k.seconds;\n i(\"hours\", q), i(\"minutes\", ee), e.enableSeconds && i(\"seconds\", x);\n }\n }, f = (k, z) => {\n const q = {\n hours: Array.isArray(t.hours) ? t.hours[k] : t.hours,\n disabledArr: []\n };\n return (z || z === 0) && (q.hours = z), Array.isArray(e.disabledTimes) && (q.disabledArr = n.value.enabled && Array.isArray(e.disabledTimes[k]) ? e.disabledTimes[k] : e.disabledTimes), q;\n }, I = Q(() => (k, z) => {\n var q;\n if (Array.isArray(e.disabledTimes)) {\n const { disabledArr: ee, hours: x } = f(k, z), S = ee.filter((X) => +X.hours === x);\n return ((q = S[0]) == null ? void 0 : q.minutes) === \"*\" ? { hours: [x], minutes: void 0, seconds: void 0 } : {\n hours: [],\n minutes: (S == null ? void 0 : S.map((X) => +X.minutes)) ?? [],\n seconds: (S == null ? void 0 : S.map((X) => X.seconds ? +X.seconds : void 0)) ?? []\n };\n }\n return { hours: [], minutes: [], seconds: [] };\n });\n return {\n setTime: i,\n updateHours: m,\n updateMinutes: P,\n updateSeconds: U,\n getSetDateTime: y,\n updateTimeValues: N,\n getSecondsValue: d,\n assignStartTime: H,\n validateTime: c,\n disabledTimesConfig: I\n };\n}, Or = (e, t) => {\n const r = () => {\n e.isTextInputDate && z();\n }, { modelValue: a, time: n } = aa(e, t, r), { defaultedStartTime: u, defaultedRange: d, defaultedTz: y } = _e(e), { updateTimeValues: i, getSetDateTime: _, setTime: c, assignStartTime: C, disabledTimesConfig: m, validateTime: P } = jn(e, n, a, U);\n function U() {\n t(\"update-flow-step\");\n }\n const N = (x) => {\n const { hours: S, minutes: X, seconds: O } = x;\n return { hours: +S, minutes: +X, seconds: O ? +O : 0 };\n }, H = () => {\n if (e.startTime) {\n if (Array.isArray(e.startTime)) {\n const S = N(e.startTime[0]), X = N(e.startTime[1]);\n return [Pe(j(), S), Pe(j(), X)];\n }\n const x = N(e.startTime);\n return Pe(j(), x);\n }\n return d.value.enabled ? [null, null] : null;\n }, f = () => {\n if (d.value.enabled) {\n const [x, S] = H();\n a.value = [\n et(_(x, 0), y.value.timezone),\n et(_(S, 1), y.value.timezone)\n ];\n } else\n a.value = et(_(H()), y.value.timezone);\n }, I = (x) => Array.isArray(x) ? [Ct(j(x[0])), Ct(j(x[1]))] : [Ct(x ?? j())], k = (x, S, X) => {\n c(\"hours\", x), c(\"minutes\", S), c(\"seconds\", e.enableSeconds ? X : 0);\n }, z = () => {\n const [x, S] = I(a.value);\n return d.value.enabled ? k(\n [x.hours, S.hours],\n [x.minutes, S.minutes],\n [x.seconds, S.seconds]\n ) : k(x.hours, x.minutes, x.seconds);\n };\n je(() => {\n if (!e.shadow)\n return C(u.value), a.value ? z() : f();\n });\n const q = () => {\n Array.isArray(a.value) ? a.value = a.value.map((x, S) => x && _(x, S)) : a.value = _(a.value), t(\"time-update\");\n };\n return {\n modelValue: a,\n time: n,\n disabledTimesConfig: m,\n updateTime: (x, S = !0, X = !1) => {\n i(x, S, X, q);\n },\n validateTime: P\n };\n}, Br = /* @__PURE__ */ Ve({\n compatConfig: {\n MODE: 3\n },\n __name: \"TimePickerSolo\",\n props: {\n ...ct\n },\n emits: [\n \"update:internal-model-value\",\n \"time-update\",\n \"am-pm-change\",\n \"mount\",\n \"reset-flow\",\n \"update-flow-step\",\n \"overlay-toggle\"\n ],\n setup(e, { expose: t, emit: r }) {\n const a = r, n = e, u = Bt(), d = tt(u, \"timePicker\"), y = te(null), { time: i, modelValue: _, disabledTimesConfig: c, updateTime: C, validateTime: m } = Or(n, a);\n return je(() => {\n n.shadow || a(\"mount\", null);\n }), t({ getSidebarProps: () => ({\n modelValue: _,\n time: i,\n updateTime: C\n }), toggleTimePicker: (N, H = !1, f = \"\") => {\n var I;\n (I = y.value) == null || I.toggleTimePicker(N, H, f);\n } }), (N, H) => (A(), Te(ma, {\n \"multi-calendars\": 0,\n stretch: \"\",\n \"is-mobile\": N.isMobile\n }, {\n default: we(() => [\n at(Vn, He({\n ref_key: \"tpRef\",\n ref: y\n }, N.$props, {\n hours: s(i).hours,\n minutes: s(i).minutes,\n seconds: s(i).seconds,\n \"internal-model-value\": N.internalModelValue,\n \"disabled-times-config\": s(c),\n \"validate-time\": s(m),\n \"onUpdate:hours\": H[0] || (H[0] = (f) => s(C)(f)),\n \"onUpdate:minutes\": H[1] || (H[1] = (f) => s(C)(f, !1)),\n \"onUpdate:seconds\": H[2] || (H[2] = (f) => s(C)(f, !1, !0)),\n onAmPmChange: H[3] || (H[3] = (f) => N.$emit(\"am-pm-change\", f)),\n onResetFlow: H[4] || (H[4] = (f) => N.$emit(\"reset-flow\")),\n onOverlayClosed: H[5] || (H[5] = (f) => N.$emit(\"overlay-toggle\", { open: !1, overlay: f })),\n onOverlayOpened: H[6] || (H[6] = (f) => N.$emit(\"overlay-toggle\", { open: !0, overlay: f }))\n }), qe({ _: 2 }, [\n Be(s(d), (f, I) => ({\n name: f,\n fn: we((k) => [\n de(N.$slots, f, ze(xe(k)))\n ])\n }))\n ]), 1040, [\"hours\", \"minutes\", \"seconds\", \"internal-model-value\", \"disabled-times-config\", \"validate-time\"])\n ]),\n _: 3\n }, 8, [\"is-mobile\"]));\n }\n}), _r = { class: \"dp--header-wrap\" }, Yr = {\n key: 0,\n class: \"dp__month_year_wrap\"\n}, Ir = { key: 0 }, Er = { class: \"dp__month_year_wrap\" }, Nr = [\"data-dp-element\", \"aria-label\", \"data-test-id\", \"onClick\", \"onKeydown\"], Fr = /* @__PURE__ */ Ve({\n compatConfig: {\n MODE: 3\n },\n __name: \"DpHeader\",\n props: {\n month: { type: Number, default: 0 },\n year: { type: Number, default: 0 },\n instance: { type: Number, default: 0 },\n years: { type: Array, default: () => [] },\n months: { type: Array, default: () => [] },\n ...ct\n },\n emits: [\"update-month-year\", \"mount\", \"reset-flow\", \"overlay-closed\", \"overlay-opened\"],\n setup(e, { expose: t, emit: r }) {\n const a = r, n = e, {\n defaultedTransitions: u,\n defaultedAriaLabels: d,\n defaultedMultiCalendars: y,\n defaultedFilters: i,\n defaultedConfig: _,\n defaultedHighlight: c,\n propDates: C,\n defaultedUI: m\n } = _e(n), { transitionName: P, showTransition: U } = ta(u), { buildMatrix: N } = At(), { handleMonthYearChange: H, isDisabled: f, updateMonthYear: I } = lr(n, a), { showLeftIcon: k, showRightIcon: z } = ya(), q = te(!1), ee = te(!1), x = te(!1), S = te([null, null, null, null]);\n je(() => {\n a(\"mount\");\n });\n const X = (g) => ({\n get: () => n[g],\n set: (Z) => {\n const se = g === ut.month ? ut.year : ut.month;\n a(\"update-month-year\", { [g]: Z, [se]: n[se] }), g === ut.month ? p(!0) : W(!0);\n }\n }), O = Q(X(ut.month)), K = Q(X(ut.year)), fe = Q(() => (g) => ({\n month: n.month,\n year: n.year,\n items: g === ut.month ? n.months : n.years,\n instance: n.instance,\n updateMonthYear: I,\n toggle: g === ut.month ? p : W\n })), me = Q(() => {\n const g = n.months.find((Z) => Z.value === n.month);\n return g || { text: \"\", value: 0 };\n }), v = Q(() => zt(n.months, (g) => {\n const Z = n.month === g.value, se = Xt(\n g.value,\n Bn(n.year, C.value.minDate),\n _n(n.year, C.value.maxDate)\n ) || i.value.months.includes(g.value), R = Fn(c.value, g.value, n.year);\n return { active: Z, disabled: se, highlighted: R };\n })), L = Q(() => zt(n.years, (g) => {\n const Z = n.year === g.value, se = Xt(\n g.value,\n Ht(C.value.minDate),\n Ht(C.value.maxDate)\n ) || i.value.years.includes(g.value), R = Za(c.value, g.value);\n return { active: Z, disabled: se, highlighted: R };\n })), ne = (g, Z, se) => {\n se !== void 0 ? g.value = se : g.value = !g.value, g.value ? (x.value = !0, a(\"overlay-opened\", Z)) : (x.value = !1, a(\"overlay-closed\", Z));\n }, p = (g = !1, Z) => {\n T(g), ne(q, Ge.month, Z);\n }, W = (g = !1, Z) => {\n T(g), ne(ee, Ge.year, Z);\n }, T = (g) => {\n g || a(\"reset-flow\");\n }, oe = (g, Z) => {\n n.arrowNavigation && (S.value[Z] = Le(g), N(S.value, \"monthYear\"));\n }, $ = Q(() => {\n var g, Z, se, R, ae, l;\n return [\n {\n type: ut.month,\n index: 1,\n toggle: p,\n modelValue: O.value,\n updateModelValue: (D) => O.value = D,\n text: me.value.text,\n showSelectionGrid: q.value,\n items: v.value,\n ariaLabel: (g = d.value) == null ? void 0 : g.openMonthsOverlay,\n overlayLabel: ((se = (Z = d.value).monthPicker) == null ? void 0 : se.call(Z, !0)) ?? void 0\n },\n {\n type: ut.year,\n index: 2,\n toggle: W,\n modelValue: K.value,\n updateModelValue: (D) => K.value = D,\n text: Cn(n.year, n.locale),\n showSelectionGrid: ee.value,\n items: L.value,\n ariaLabel: (R = d.value) == null ? void 0 : R.openYearsOverlay,\n overlayLabel: ((l = (ae = d.value).yearPicker) == null ? void 0 : l.call(ae, !0)) ?? void 0\n }\n ];\n }), Y = Q(() => n.disableYearSelect ? [$.value[0]] : n.yearFirst ? [...$.value].reverse() : $.value);\n return t({\n toggleMonthPicker: p,\n toggleYearPicker: W,\n handleMonthYearChange: H\n }), (g, Z) => {\n var se, R, ae, l, D, ue;\n return A(), V(\"div\", _r, [\n g.$slots[\"month-year\"] ? (A(), V(\"div\", Yr, [\n de(g.$slots, \"month-year\", ze(xe({\n month: e.month,\n year: e.year,\n months: e.months,\n years: e.years,\n updateMonthYear: s(I),\n handleMonthYearChange: s(H),\n instance: e.instance,\n isDisabled: s(f)\n })))\n ])) : (A(), V(ke, { key: 1 }, [\n g.$slots[\"top-extra\"] ? (A(), V(\"div\", Ir, [\n de(g.$slots, \"top-extra\", { value: g.internalModelValue })\n ])) : J(\"\", !0),\n ge(\"div\", Er, [\n s(k)(s(y), e.instance) && !g.vertical ? (A(), Te(Kt, {\n key: 0,\n \"aria-label\": (se = s(d)) == null ? void 0 : se.prevMonth,\n disabled: s(f)(!1),\n class: De((R = s(m)) == null ? void 0 : R.navBtnPrev),\n \"el-name\": \"action-prev\",\n onActivate: Z[0] || (Z[0] = (M) => s(H)(!1, !0)),\n onSetRef: Z[1] || (Z[1] = (M) => oe(M, 0))\n }, {\n default: we(() => [\n g.$slots[\"arrow-left\"] ? de(g.$slots, \"arrow-left\", { key: 0 }) : J(\"\", !0),\n g.$slots[\"arrow-left\"] ? J(\"\", !0) : (A(), Te(s(Wa), { key: 1 }))\n ]),\n _: 3\n }, 8, [\"aria-label\", \"disabled\", \"class\"])) : J(\"\", !0),\n ge(\"div\", {\n class: De([\"dp__month_year_wrap\", {\n dp__year_disable_select: g.disableYearSelect\n }])\n }, [\n (A(!0), V(ke, null, Be(Y.value, (M, he) => (A(), V(ke, {\n key: M.type\n }, [\n ge(\"button\", {\n ref_for: !0,\n ref: (pe) => oe(pe, he + 1),\n type: \"button\",\n \"data-dp-element\": `overlay-${M.type}`,\n class: De([\"dp__btn dp__month_year_select\", { \"dp--hidden-el\": x.value }]),\n \"aria-label\": `${M.text}-${M.ariaLabel}`,\n \"data-test-id\": `${M.type}-toggle-overlay-${e.instance}`,\n onClick: M.toggle,\n onKeydown: (pe) => s(Ze)(pe, () => M.toggle(), !0)\n }, [\n g.$slots[M.type] ? de(g.$slots, M.type, {\n key: 0,\n text: M.text,\n value: n[M.type]\n }) : J(\"\", !0),\n g.$slots[M.type] ? J(\"\", !0) : (A(), V(ke, { key: 1 }, [\n gt(Qe(M.text), 1)\n ], 64))\n ], 42, Nr),\n at(Ut, {\n name: s(P)(M.showSelectionGrid),\n css: s(U)\n }, {\n default: we(() => [\n M.showSelectionGrid ? (A(), Te(ea, {\n key: 0,\n items: M.items,\n \"arrow-navigation\": g.arrowNavigation,\n \"hide-navigation\": g.hideNavigation,\n \"is-last\": g.autoApply && !s(_).keepActionRow,\n \"skip-button-ref\": !1,\n config: g.config,\n type: M.type,\n \"header-refs\": [],\n \"esc-close\": g.escClose,\n \"menu-wrap-ref\": g.menuWrapRef,\n \"text-input\": g.textInput,\n \"aria-labels\": g.ariaLabels,\n \"overlay-label\": M.overlayLabel,\n onSelected: M.updateModelValue,\n onToggle: M.toggle\n }, qe({\n \"button-icon\": we(() => [\n g.$slots[\"calendar-icon\"] ? de(g.$slots, \"calendar-icon\", { key: 0 }) : J(\"\", !0),\n g.$slots[\"calendar-icon\"] ? J(\"\", !0) : (A(), Te(s(Wt), { key: 1 }))\n ]),\n _: 2\n }, [\n g.$slots[`${M.type}-overlay-value`] ? {\n name: \"item\",\n fn: we(({ item: pe }) => [\n de(g.$slots, `${M.type}-overlay-value`, {\n text: pe.text,\n value: pe.value\n })\n ]),\n key: \"0\"\n } : void 0,\n g.$slots[`${M.type}-overlay`] ? {\n name: \"overlay\",\n fn: we(() => [\n de(g.$slots, `${M.type}-overlay`, He({ ref_for: !0 }, fe.value(M.type)))\n ]),\n key: \"1\"\n } : void 0,\n g.$slots[`${M.type}-overlay-header`] ? {\n name: \"header\",\n fn: we(() => [\n de(g.$slots, `${M.type}-overlay-header`, {\n toggle: M.toggle\n })\n ]),\n key: \"2\"\n } : void 0\n ]), 1032, [\"items\", \"arrow-navigation\", \"hide-navigation\", \"is-last\", \"config\", \"type\", \"esc-close\", \"menu-wrap-ref\", \"text-input\", \"aria-labels\", \"overlay-label\", \"onSelected\", \"onToggle\"])) : J(\"\", !0)\n ]),\n _: 2\n }, 1032, [\"name\", \"css\"])\n ], 64))), 128))\n ], 2),\n s(k)(s(y), e.instance) && g.vertical ? (A(), Te(Kt, {\n key: 1,\n \"aria-label\": (ae = s(d)) == null ? void 0 : ae.prevMonth,\n \"el-name\": \"action-prev\",\n disabled: s(f)(!1),\n class: De((l = s(m)) == null ? void 0 : l.navBtnPrev),\n onActivate: Z[2] || (Z[2] = (M) => s(H)(!1, !0))\n }, {\n default: we(() => [\n g.$slots[\"arrow-up\"] ? de(g.$slots, \"arrow-up\", { key: 0 }) : J(\"\", !0),\n g.$slots[\"arrow-up\"] ? J(\"\", !0) : (A(), Te(s(Ka), { key: 1 }))\n ]),\n _: 3\n }, 8, [\"aria-label\", \"disabled\", \"class\"])) : J(\"\", !0),\n s(z)(s(y), e.instance) ? (A(), Te(Kt, {\n key: 2,\n ref: \"rightIcon\",\n \"el-name\": \"action-next\",\n disabled: s(f)(!0),\n \"aria-label\": (D = s(d)) == null ? void 0 : D.nextMonth,\n class: De((ue = s(m)) == null ? void 0 : ue.navBtnNext),\n onActivate: Z[3] || (Z[3] = (M) => s(H)(!0, !0)),\n onSetRef: Z[4] || (Z[4] = (M) => oe(M, g.disableYearSelect ? 2 : 3))\n }, {\n default: we(() => [\n g.$slots[g.vertical ? \"arrow-down\" : \"arrow-right\"] ? de(g.$slots, g.vertical ? \"arrow-down\" : \"arrow-right\", { key: 0 }) : J(\"\", !0),\n g.$slots[g.vertical ? \"arrow-down\" : \"arrow-right\"] ? J(\"\", !0) : (A(), Te(fa(g.vertical ? s(Ga) : s(Va)), { key: 1 }))\n ]),\n _: 3\n }, 8, [\"disabled\", \"aria-label\", \"class\"])) : J(\"\", !0)\n ])\n ], 64))\n ]);\n };\n }\n}), Lr = {\n class: \"dp__calendar_header\",\n role: \"row\"\n}, zr = {\n key: 0,\n class: \"dp__calendar_header_item\",\n role: \"gridcell\"\n}, Hr = [\"aria-label\"], Ur = {\n key: 0,\n class: \"dp__calendar_item dp__week_num\",\n role: \"gridcell\"\n}, Wr = { class: \"dp__cell_inner\" }, Vr = [\"id\", \"aria-pressed\", \"aria-disabled\", \"aria-label\", \"tabindex\", \"data-test-id\", \"onClick\", \"onTouchend\", \"onKeydown\", \"onMouseenter\", \"onMouseleave\", \"onMousedown\"], jr = /* @__PURE__ */ Ve({\n compatConfig: {\n MODE: 3\n },\n __name: \"DpCalendar\",\n props: {\n mappedDates: { type: Array, default: () => [] },\n instance: { type: Number, default: 0 },\n month: { type: Number, default: 0 },\n year: { type: Number, default: 0 },\n ...ct\n },\n emits: [\n \"select-date\",\n \"set-hover-date\",\n \"handle-scroll\",\n \"mount\",\n \"handle-swipe\",\n \"handle-space\",\n \"tooltip-open\",\n \"tooltip-close\"\n ],\n setup(e, { expose: t, emit: r }) {\n const a = r, n = e, { buildMultiLevelMatrix: u } = At(), {\n defaultedTransitions: d,\n defaultedConfig: y,\n defaultedAriaLabels: i,\n defaultedMultiCalendars: _,\n defaultedWeekNumbers: c,\n defaultedMultiDates: C,\n defaultedUI: m\n } = _e(n), P = te(null), U = te({\n bottom: \"\",\n left: \"\",\n transform: \"\"\n }), N = te([]), H = te(null), f = te(!0), I = te(\"\"), k = te({ startX: 0, endX: 0, startY: 0, endY: 0 }), z = te([]), q = te({ left: \"50%\" }), ee = te(!1), x = Q(() => n.calendar ? n.calendar(n.mappedDates) : n.mappedDates), S = Q(() => n.dayNames ? Array.isArray(n.dayNames) ? n.dayNames : n.dayNames(n.locale, +n.weekStart) : Ml(n.formatLocale, n.locale, +n.weekStart));\n je(() => {\n a(\"mount\", { cmp: \"calendar\", refs: N }), y.value.noSwipe || H.value && (H.value.addEventListener(\"touchstart\", oe, { passive: !1 }), H.value.addEventListener(\"touchend\", $, { passive: !1 }), H.value.addEventListener(\"touchmove\", Y, { passive: !1 })), n.monthChangeOnScroll && H.value && H.value.addEventListener(\"wheel\", se, { passive: !1 });\n });\n const X = (M) => M ? n.vertical ? \"vNext\" : \"next\" : n.vertical ? \"vPrevious\" : \"previous\", O = (M, he) => {\n if (n.transitions) {\n const pe = We(yt(j(), n.month, n.year));\n I.value = Ee(We(yt(j(), M, he)), pe) ? d.value[X(!0)] : d.value[X(!1)], f.value = !1, nt(() => {\n f.value = !0;\n });\n }\n }, K = Q(\n () => ({\n ...m.value.calendar ?? {}\n })\n ), fe = Q(() => (M) => {\n const he = Al(M);\n return {\n dp__marker_dot: he.type === \"dot\",\n dp__marker_line: he.type === \"line\"\n };\n }), me = Q(() => (M) => Ae(M, P.value)), v = Q(() => ({\n dp__calendar: !0,\n dp__calendar_next: _.value.count > 0 && n.instance !== 0\n })), L = Q(() => (M) => n.hideOffsetDates ? M.current : !0), ne = async (M, he) => {\n const { width: pe, height: re } = M.getBoundingClientRect();\n P.value = he.value;\n let o = { left: `${pe / 2}px` }, E = -50;\n if (await nt(), z.value[0]) {\n const { left: ce, width: B } = z.value[0].getBoundingClientRect();\n ce < 0 && (o = { left: \"0\" }, E = 0, q.value.left = `${pe / 2}px`), window.innerWidth < ce + B && (o = { right: \"0\" }, E = 0, q.value.left = `${B - pe / 2}px`);\n }\n U.value = {\n bottom: `${re}px`,\n ...o,\n transform: `translateX(${E}%)`\n };\n }, p = async (M, he, pe) => {\n var o, E, ce;\n const re = Le(N.value[he][pe]);\n re && ((o = M.marker) != null && o.customPosition && ((ce = (E = M.marker) == null ? void 0 : E.tooltip) != null && ce.length) ? U.value = M.marker.customPosition(re) : await ne(re, M), a(\"tooltip-open\", M.marker));\n }, W = async (M, he, pe) => {\n var re, o;\n if (ee.value && C.value.enabled && C.value.dragSelect)\n return a(\"select-date\", M);\n if (a(\"set-hover-date\", M), (o = (re = M.marker) == null ? void 0 : re.tooltip) != null && o.length) {\n if (n.hideOffsetDates && !M.current) return;\n await p(M, he, pe);\n }\n }, T = (M) => {\n P.value && (P.value = null, U.value = JSON.parse(JSON.stringify({ bottom: \"\", left: \"\", transform: \"\" })), a(\"tooltip-close\", M.marker));\n }, oe = (M) => {\n k.value.startX = M.changedTouches[0].screenX, k.value.startY = M.changedTouches[0].screenY;\n }, $ = (M) => {\n k.value.endX = M.changedTouches[0].screenX, k.value.endY = M.changedTouches[0].screenY, g();\n }, Y = (M) => {\n n.vertical && !n.inline && M.preventDefault();\n }, g = () => {\n const M = n.vertical ? \"Y\" : \"X\";\n Math.abs(k.value[`start${M}`] - k.value[`end${M}`]) > 10 && a(\"handle-swipe\", k.value[`start${M}`] > k.value[`end${M}`] ? \"right\" : \"left\");\n }, Z = (M, he, pe) => {\n M && (Array.isArray(N.value[he]) ? N.value[he][pe] = M : N.value[he] = [M]), n.arrowNavigation && u(N.value, \"calendar\");\n }, se = (M) => {\n n.monthChangeOnScroll && (M.preventDefault(), a(\"handle-scroll\", M));\n }, R = (M) => c.value.type === \"local\" ? fl(M.value, { weekStartsOn: +n.weekStart }) : c.value.type === \"iso\" ? vl(M.value) : typeof c.value.type == \"function\" ? c.value.type(M.value) : \"\", ae = (M) => {\n const he = M[0];\n return c.value.hideOnOffsetDates ? M.some((pe) => pe.current) ? R(he) : \"\" : R(he);\n }, l = (M, he, pe = !0) => {\n !pe && Cl() || (!C.value.enabled || y.value.allowPreventDefault) && (Dt(M, y.value), a(\"select-date\", he));\n }, D = (M) => {\n Dt(M, y.value);\n }, ue = (M) => {\n C.value.enabled && C.value.dragSelect ? (ee.value = !0, a(\"select-date\", M)) : C.value.enabled && a(\"select-date\", M);\n };\n return t({ triggerTransition: O }), (M, he) => (A(), V(\"div\", {\n class: De(v.value)\n }, [\n ge(\"div\", {\n ref_key: \"calendarWrapRef\",\n ref: H,\n class: De(K.value),\n role: \"grid\"\n }, [\n ge(\"div\", Lr, [\n M.weekNumbers ? (A(), V(\"div\", zr, Qe(M.weekNumName), 1)) : J(\"\", !0),\n (A(!0), V(ke, null, Be(S.value, (pe, re) => {\n var o, E;\n return A(), V(\"div\", {\n key: re,\n class: \"dp__calendar_header_item\",\n role: \"gridcell\",\n \"data-test-id\": \"calendar-header\",\n \"aria-label\": (E = (o = s(i)) == null ? void 0 : o.weekDay) == null ? void 0 : E.call(o, re)\n }, [\n M.$slots[\"calendar-header\"] ? de(M.$slots, \"calendar-header\", {\n key: 0,\n day: pe,\n index: re\n }) : J(\"\", !0),\n M.$slots[\"calendar-header\"] ? J(\"\", !0) : (A(), V(ke, { key: 1 }, [\n gt(Qe(pe), 1)\n ], 64))\n ], 8, Hr);\n }), 128))\n ]),\n he[2] || (he[2] = ge(\"div\", { class: \"dp__calendar_header_separator\" }, null, -1)),\n at(Ut, {\n name: I.value,\n css: !!M.transitions\n }, {\n default: we(() => [\n f.value ? (A(), V(\"div\", {\n key: 0,\n class: \"dp__calendar\",\n role: \"rowgroup\",\n onMouseleave: he[1] || (he[1] = (pe) => ee.value = !1)\n }, [\n (A(!0), V(ke, null, Be(x.value, (pe, re) => (A(), V(\"div\", {\n key: re,\n class: \"dp__calendar_row\",\n role: \"row\"\n }, [\n M.weekNumbers ? (A(), V(\"div\", Ur, [\n ge(\"div\", Wr, Qe(ae(pe.days)), 1)\n ])) : J(\"\", !0),\n (A(!0), V(ke, null, Be(pe.days, (o, E) => {\n var ce, B, Me;\n return A(), V(\"div\", {\n id: s(Ha)(o.value),\n ref_for: !0,\n ref: (be) => Z(be, re, E),\n key: E + re,\n role: \"gridcell\",\n class: \"dp__calendar_item\",\n \"aria-pressed\": (o.classData.dp__active_date || o.classData.dp__range_start || o.classData.dp__range_start) ?? void 0,\n \"aria-disabled\": o.classData.dp__cell_disabled || void 0,\n \"aria-label\": (B = (ce = s(i)) == null ? void 0 : ce.day) == null ? void 0 : B.call(ce, o),\n tabindex: !o.current && M.hideOffsetDates ? void 0 : 0,\n \"data-test-id\": s(Ha)(o.value),\n onClick: Qt((be) => l(be, o), [\"prevent\"]),\n onTouchend: (be) => l(be, o, !1),\n onKeydown: (be) => s(Ze)(be, () => M.$emit(\"select-date\", o)),\n onMouseenter: (be) => W(o, re, E),\n onMouseleave: (be) => T(o),\n onMousedown: (be) => ue(o),\n onMouseup: he[0] || (he[0] = (be) => ee.value = !1)\n }, [\n ge(\"div\", {\n class: De([\"dp__cell_inner\", o.classData])\n }, [\n M.$slots.day && L.value(o) ? de(M.$slots, \"day\", {\n key: 0,\n day: +o.text,\n date: o.value\n }) : J(\"\", !0),\n M.$slots.day ? J(\"\", !0) : (A(), V(ke, { key: 1 }, [\n gt(Qe(o.text), 1)\n ], 64)),\n o.marker && L.value(o) ? (A(), V(ke, { key: 2 }, [\n M.$slots.marker ? de(M.$slots, \"marker\", {\n key: 0,\n marker: o.marker,\n day: +o.text,\n date: o.value\n }) : (A(), V(\"div\", {\n key: 1,\n class: De(fe.value(o.marker)),\n style: rt(o.marker.color ? { backgroundColor: o.marker.color } : {})\n }, null, 6))\n ], 64)) : J(\"\", !0),\n me.value(o.value) ? (A(), V(\"div\", {\n key: 3,\n ref_for: !0,\n ref_key: \"activeTooltip\",\n ref: z,\n class: \"dp__marker_tooltip\",\n style: rt(U.value)\n }, [\n (Me = o.marker) != null && Me.tooltip ? (A(), V(\"div\", {\n key: 0,\n class: \"dp__tooltip_content\",\n onClick: D\n }, [\n (A(!0), V(ke, null, Be(o.marker.tooltip, (be, Se) => (A(), V(\"div\", {\n key: Se,\n class: \"dp__tooltip_text\"\n }, [\n M.$slots[\"marker-tooltip\"] ? de(M.$slots, \"marker-tooltip\", {\n key: 0,\n tooltip: be,\n day: o.value\n }) : J(\"\", !0),\n M.$slots[\"marker-tooltip\"] ? J(\"\", !0) : (A(), V(ke, { key: 1 }, [\n ge(\"div\", {\n class: \"dp__tooltip_mark\",\n style: rt(be.color ? { backgroundColor: be.color } : {})\n }, null, 4),\n ge(\"div\", null, Qe(be.text), 1)\n ], 64))\n ]))), 128)),\n ge(\"div\", {\n class: \"dp__arrow_bottom_tp\",\n style: rt(q.value)\n }, null, 4)\n ])) : J(\"\", !0)\n ], 4)) : J(\"\", !0)\n ], 2)\n ], 40, Vr);\n }), 128))\n ]))), 128))\n ], 32)) : J(\"\", !0)\n ]),\n _: 3\n }, 8, [\"name\", \"css\"])\n ], 2)\n ], 2));\n }\n}), yn = (e) => Array.isArray(e), Kr = (e, t, r, a) => {\n const n = te([]), u = te(/* @__PURE__ */ new Date()), d = te(), y = () => $(e.isTextInputDate), { modelValue: i, calendars: _, time: c, today: C } = aa(e, t, y), {\n defaultedMultiCalendars: m,\n defaultedStartTime: P,\n defaultedRange: U,\n defaultedConfig: N,\n defaultedTz: H,\n propDates: f,\n defaultedMultiDates: I\n } = _e(e), { validateMonthYearInRange: k, isDisabled: z, isDateRangeAllowed: q, checkMinMaxRange: ee } = Tt(e), { updateTimeValues: x, getSetDateTime: S, setTime: X, assignStartTime: O, validateTime: K, disabledTimesConfig: fe } = jn(e, c, i, a), me = Q(\n () => (h) => _.value[h] ? _.value[h].month : 0\n ), v = Q(\n () => (h) => _.value[h] ? _.value[h].year : 0\n ), L = (h) => !N.value.keepViewOnOffsetClick || h ? !0 : !d.value, ne = (h, le, w, G = !1) => {\n var ie, Xe;\n L(G) && (_.value[h] || (_.value[h] = { month: 0, year: 0 }), _.value[h].month = dn(le) ? (ie = _.value[h]) == null ? void 0 : ie.month : le, _.value[h].year = dn(w) ? (Xe = _.value[h]) == null ? void 0 : Xe.year : w);\n }, p = () => {\n e.autoApply && t(\"select-date\");\n }, W = () => {\n P.value && O(P.value);\n };\n je(() => {\n e.shadow || (i.value || (he(), W()), $(!0), e.focusStartDate && e.startDate && he());\n });\n const T = Q(() => {\n var h;\n return (h = e.flow) != null && h.length && !e.partialFlow ? e.flowStep === e.flow.length : !0;\n }), oe = () => {\n e.autoApply && T.value && t(\"auto-apply\", e.partialFlow ? e.flowStep !== e.flow.length : !1);\n }, $ = (h = !1) => {\n if (i.value)\n return Array.isArray(i.value) ? (n.value = i.value, l(h)) : Z(i.value, h);\n if (m.value.count && h && !e.startDate)\n return g(j(), h);\n }, Y = () => Array.isArray(i.value) && U.value.enabled ? $e(i.value[0]) === $e(i.value[1] ?? i.value[0]) : !1, g = (h = /* @__PURE__ */ new Date(), le = !1) => {\n if ((!m.value.count || !m.value.static || le) && ne(0, $e(h), ye(h)), m.value.count && (!i.value || Y() || !m.value.solo) && (!m.value.solo || le))\n for (let w = 1; w < m.value.count; w++) {\n const G = Pe(j(), { month: me.value(w - 1), year: v.value(w - 1) }), ie = An(G, { months: 1 });\n _.value[w] = { month: $e(ie), year: ye(ie) };\n }\n }, Z = (h, le) => {\n g(h), X(\"hours\", ht(h)), X(\"minutes\", $t(h)), X(\"seconds\", Lt(h)), m.value.count && le && M();\n }, se = (h) => {\n if (m.value.count) {\n if (m.value.solo) return 0;\n const le = $e(h[0]), w = $e(h[1]);\n return Math.abs(w - le) < m.value.count ? 0 : 1;\n }\n return 1;\n }, R = (h, le) => {\n h[1] && U.value.showLastInRange ? g(h[se(h)], le) : g(h[0], le);\n const w = (G, ie) => [\n G(h[0]),\n h[1] ? G(h[1]) : c[ie][1]\n ];\n X(\"hours\", w(ht, \"hours\")), X(\"minutes\", w($t, \"minutes\")), X(\"seconds\", w(Lt, \"seconds\"));\n }, ae = (h, le) => {\n if ((U.value.enabled || e.weekPicker) && !I.value.enabled)\n return R(h, le);\n if (I.value.enabled && le) {\n const w = h[h.length - 1];\n return Z(w, le);\n }\n }, l = (h) => {\n const le = i.value;\n ae(le, h), m.value.count && m.value.solo && M();\n }, D = (h, le) => {\n const w = Pe(j(), { month: me.value(le), year: v.value(le) }), G = h < 0 ? Pt(w, 1) : qt(w, 1);\n k($e(G), ye(G), h < 0, e.preventMinMaxNavigation) && (ne(le, $e(G), ye(G)), t(\"update-month-year\", { instance: le, month: $e(G), year: ye(G) }), m.value.count && !m.value.solo && ue(le), r());\n }, ue = (h) => {\n for (let le = h - 1; le >= 0; le--) {\n const w = qt(Pe(j(), { month: me.value(le + 1), year: v.value(le + 1) }), 1);\n ne(le, $e(w), ye(w));\n }\n for (let le = h + 1; le <= m.value.count - 1; le++) {\n const w = Pt(Pe(j(), { month: me.value(le - 1), year: v.value(le - 1) }), 1);\n ne(le, $e(w), ye(w));\n }\n }, M = () => {\n if (Array.isArray(i.value) && i.value.length === 2) {\n const h = j(\n j(i.value[1] ? i.value[1] : Pt(i.value[0], 1))\n ), [le, w] = [$e(i.value[0]), ye(i.value[0])], [G, ie] = [$e(i.value[1]), ye(i.value[1])];\n (le !== G || le === G && w !== ie) && m.value.solo && ne(1, $e(h), ye(h));\n } else i.value && !Array.isArray(i.value) && (ne(0, $e(i.value), ye(i.value)), g(j()));\n }, he = () => {\n e.startDate && (ne(0, $e(j(e.startDate)), ye(j(e.startDate))), m.value.count && ue(0));\n }, pe = (h, le) => {\n if (e.monthChangeOnScroll) {\n const w = (/* @__PURE__ */ new Date()).getTime() - u.value.getTime(), G = Math.abs(h.deltaY);\n let ie = 500;\n G > 1 && (ie = 100), G > 100 && (ie = 0), w > ie && (u.value = /* @__PURE__ */ new Date(), D(e.monthChangeOnScroll !== \"inverse\" ? -h.deltaY : h.deltaY, le));\n }\n }, re = (h, le, w = !1) => {\n e.monthChangeOnArrows && e.vertical === w && o(h, le);\n }, o = (h, le) => {\n D(h === \"right\" ? -1 : 1, le);\n }, E = (h) => {\n if (f.value.markers)\n return ca(h.value, f.value.markers);\n }, ce = (h, le) => {\n switch (e.sixWeeks === !0 ? \"append\" : e.sixWeeks) {\n case \"prepend\":\n return [!0, !1];\n case \"center\":\n return [h == 0, !0];\n case \"fair\":\n return [h == 0 || le > h, !0];\n case \"append\":\n return [!1, !1];\n default:\n return [!1, !1];\n }\n }, B = (h, le, w, G) => {\n if (e.sixWeeks && h.length < 6) {\n const ie = 6 - h.length, Xe = (le.getDay() + 7 - G) % 7, _t = 6 - (w.getDay() + 7 - G) % 7, [Vt, $a] = ce(Xe, _t);\n for (let St = 1; St <= ie; St++)\n if ($a ? !!(St % 2) == Vt : Vt) {\n const la = h[0].days[0], Aa = Me(kt(la.value, -7), $e(le));\n h.unshift({ days: Aa });\n } else {\n const la = h[h.length - 1], Aa = la.days[la.days.length - 1], Qn = Me(kt(Aa.value, 1), $e(le));\n h.push({ days: Qn });\n }\n }\n return h;\n }, Me = (h, le) => {\n const w = j(h), G = [];\n for (let ie = 0; ie < 7; ie++) {\n const Xe = kt(w, ie), st = $e(Xe) !== le;\n G.push({\n text: e.hideOffsetDates && st ? \"\" : Xe.getDate(),\n value: Xe,\n current: !st,\n classData: {}\n });\n }\n return G;\n }, be = (h, le) => {\n const w = [], G = new Date(le, h), ie = new Date(le, h + 1, 0), Xe = e.weekStart, st = Ua(G, { weekStartsOn: Xe }), _t = (Vt) => {\n const $a = Me(Vt, h);\n if (w.push({ days: $a }), !w[w.length - 1].days.some(\n (St) => Ae(We(St.value), We(ie))\n )) {\n const St = kt(Vt, 7);\n _t(St);\n }\n };\n return _t(st), B(w, G, ie, Xe);\n }, Se = (h) => {\n const le = Mt(j(h.value), c.hours, c.minutes, Ue());\n t(\"date-update\", le), I.value.enabled ? xa(le, i, I.value.limit) : i.value = le, a(), nt().then(() => {\n oe();\n });\n }, b = (h) => U.value.noDisabledRange ? Yn(n.value[0], h).some((w) => z(w)) : !1, F = () => {\n n.value = i.value ? i.value.slice() : [], n.value.length === 2 && !(U.value.fixedStart || U.value.fixedEnd) && (n.value = []);\n }, Re = (h, le) => {\n const w = [\n j(h.value),\n kt(j(h.value), +U.value.autoRange)\n ];\n q(w) ? (le && Fe(h.value), n.value = w) : t(\"invalid-date\", h.value);\n }, Fe = (h) => {\n const le = $e(j(h)), w = ye(j(h));\n if (ne(0, le, w), m.value.count > 0)\n for (let G = 1; G < m.value.count; G++) {\n const ie = Yl(\n Pe(j(h), { year: v.value(G - 1), month: me.value(G - 1) })\n );\n ne(G, ie.month, ie.year);\n }\n }, mt = (h) => {\n if (b(h.value) || !ee(h.value, i.value, U.value.fixedStart ? 0 : 1))\n return t(\"invalid-date\", h.value);\n n.value = Un(j(h.value), i, t, U);\n }, ve = (h, le) => {\n if (F(), U.value.autoRange) return Re(h, le);\n if (U.value.fixedStart || U.value.fixedEnd) return mt(h);\n n.value[0] ? ee(j(h.value), i.value) && !b(h.value) ? Ye(j(h.value), j(n.value[0])) ? (n.value.unshift(j(h.value)), t(\"range-end\", n.value[0])) : (n.value[1] = j(h.value), t(\"range-end\", n.value[1])) : (e.autoApply && t(\"auto-apply-invalid\", h.value), t(\"invalid-date\", h.value)) : (n.value[0] = j(h.value), t(\"range-start\", n.value[0]));\n }, Ue = (h = !0) => e.enableSeconds ? Array.isArray(c.seconds) ? h ? c.seconds[0] : c.seconds[1] : c.seconds : 0, lt = (h) => {\n n.value[h] = Mt(\n n.value[h],\n c.hours[h],\n c.minutes[h],\n Ue(h !== 1)\n );\n }, ga = () => {\n var h, le;\n n.value[0] && n.value[1] && +((h = n.value) == null ? void 0 : h[0]) > +((le = n.value) == null ? void 0 : le[1]) && (n.value.reverse(), t(\"range-start\", n.value[0]), t(\"range-end\", n.value[1]));\n }, na = () => {\n n.value.length && (n.value[0] && !n.value[1] ? lt(0) : (lt(0), lt(1), a()), ga(), i.value = n.value.slice(), pa(n.value, t, e.autoApply, e.modelAuto));\n }, ha = (h, le = !1) => {\n if (z(h.value) || !h.current && e.hideOffsetDates) return t(\"invalid-date\", h.value);\n if (d.value = JSON.parse(JSON.stringify(h)), !U.value.enabled) return Se(h);\n yn(c.hours) && yn(c.minutes) && !I.value.enabled && (ve(h, le), na());\n }, ba = (h, le) => {\n var G;\n ne(h, le.month, le.year, !0), m.value.count && !m.value.solo && ue(h), t(\"update-month-year\", { instance: h, month: le.month, year: le.year }), r(m.value.solo ? h : void 0);\n const w = (G = e.flow) != null && G.length ? e.flow[e.flowStep] : void 0;\n !le.fromNav && (w === Ge.month || w === Ge.year) && a();\n }, ka = (h, le) => {\n Hn({\n value: h,\n modelValue: i,\n range: U.value.enabled,\n timezone: le ? void 0 : H.value.timezone\n }), p(), e.multiCalendars && nt().then(() => $(!0));\n }, wa = () => {\n const h = Qa(j(), H.value);\n !U.value.enabled && !I.value.enabled ? i.value = h : i.value && Array.isArray(i.value) && i.value[0] ? I.value.enabled ? i.value = [...i.value, h] : i.value = Ye(h, i.value[0]) ? [h, i.value[0]] : [i.value[0], h] : i.value = [h], p();\n }, Da = () => {\n if (Array.isArray(i.value))\n if (I.value.enabled) {\n const h = Ma();\n i.value[i.value.length - 1] = S(h);\n } else\n i.value = i.value.map((h, le) => h && S(h, le));\n else\n i.value = S(i.value);\n t(\"time-update\");\n }, Ma = () => Array.isArray(i.value) && i.value.length ? i.value[i.value.length - 1] : null;\n return {\n calendars: _,\n modelValue: i,\n month: me,\n year: v,\n time: c,\n disabledTimesConfig: fe,\n today: C,\n validateTime: K,\n getCalendarDays: be,\n getMarker: E,\n handleScroll: pe,\n handleSwipe: o,\n handleArrow: re,\n selectDate: ha,\n updateMonthYear: ba,\n presetDate: ka,\n selectCurrentDate: wa,\n updateTime: (h, le = !0, w = !1) => {\n x(h, le, w, Da);\n },\n assignMonthAndYear: g,\n setStartTime: W\n };\n}, Gr = { key: 0 }, Qr = /* @__PURE__ */ Ve({\n __name: \"DatePicker\",\n props: {\n ...ct\n },\n emits: [\n \"tooltip-open\",\n \"tooltip-close\",\n \"mount\",\n \"update:internal-model-value\",\n \"update-flow-step\",\n \"reset-flow\",\n \"auto-apply\",\n \"focus-menu\",\n \"select-date\",\n \"range-start\",\n \"range-end\",\n \"invalid-fixed-range\",\n \"time-update\",\n \"am-pm-change\",\n \"time-picker-open\",\n \"time-picker-close\",\n \"recalculate-position\",\n \"update-month-year\",\n \"auto-apply-invalid\",\n \"date-update\",\n \"invalid-date\",\n \"overlay-toggle\"\n ],\n setup(e, { expose: t, emit: r }) {\n const a = r, n = e, {\n calendars: u,\n month: d,\n year: y,\n modelValue: i,\n time: _,\n disabledTimesConfig: c,\n today: C,\n validateTime: m,\n getCalendarDays: P,\n getMarker: U,\n handleArrow: N,\n handleScroll: H,\n handleSwipe: f,\n selectDate: I,\n updateMonthYear: k,\n presetDate: z,\n selectCurrentDate: q,\n updateTime: ee,\n assignMonthAndYear: x,\n setStartTime: S\n } = Kr(n, a, Y, g), X = Bt(), { setHoverDate: O, getDayClassData: K, clearHoverDate: fe } = fo(i, n), { defaultedMultiCalendars: me } = _e(n), v = te([]), L = te([]), ne = te(null), p = tt(X, \"calendar\"), W = tt(X, \"monthYear\"), T = tt(X, \"timePicker\"), oe = (re) => {\n n.shadow || a(\"mount\", re);\n };\n ot(\n u,\n () => {\n n.shadow || setTimeout(() => {\n a(\"recalculate-position\");\n }, 0);\n },\n { deep: !0 }\n ), ot(\n me,\n (re, o) => {\n re.count - o.count > 0 && x();\n },\n { deep: !0 }\n );\n const $ = Q(() => (re) => P(d.value(re), y.value(re)).map((o) => ({\n ...o,\n days: o.days.map((E) => (E.marker = U(E), E.classData = K(E), E))\n })));\n function Y(re) {\n var o;\n re || re === 0 ? (o = L.value[re]) == null || o.triggerTransition(d.value(re), y.value(re)) : L.value.forEach((E, ce) => E.triggerTransition(d.value(ce), y.value(ce)));\n }\n function g() {\n a(\"update-flow-step\");\n }\n const Z = (re, o = !1) => {\n I(re, o), n.spaceConfirm && a(\"select-date\");\n }, se = (re, o, E = 0) => {\n var ce;\n (ce = v.value[E]) == null || ce.toggleMonthPicker(re, o);\n }, R = (re, o, E = 0) => {\n var ce;\n (ce = v.value[E]) == null || ce.toggleYearPicker(re, o);\n }, ae = (re, o, E) => {\n var ce;\n (ce = ne.value) == null || ce.toggleTimePicker(re, o, E);\n }, l = (re, o) => {\n var E;\n if (!n.range) {\n const ce = i.value ? i.value : C, B = o ? new Date(o) : ce, Me = re ? Ua(B, { weekStartsOn: 1 }) : wn(B, { weekStartsOn: 1 });\n I({\n value: Me,\n current: $e(B) === d.value(0),\n text: \"\",\n classData: {}\n }), (E = document.getElementById(Ha(Me))) == null || E.focus();\n }\n }, D = (re) => {\n var o;\n (o = v.value[0]) == null || o.handleMonthYearChange(re, !0);\n }, ue = (re) => {\n k(0, { month: d.value(0), year: y.value(0) + (re ? 1 : -1), fromNav: !0 });\n }, M = (re, o) => {\n re === Ge.time && a(`time-picker-${o ? \"open\" : \"close\"}`), a(\"overlay-toggle\", { open: o, overlay: re });\n }, he = (re) => {\n a(\"overlay-toggle\", { open: !1, overlay: re }), a(\"focus-menu\");\n };\n return t({\n clearHoverDate: fe,\n presetDate: z,\n selectCurrentDate: q,\n toggleMonthPicker: se,\n toggleYearPicker: R,\n toggleTimePicker: ae,\n handleArrow: N,\n updateMonthYear: k,\n getSidebarProps: () => ({\n modelValue: i,\n month: d,\n year: y,\n time: _,\n updateTime: ee,\n updateMonthYear: k,\n selectDate: I,\n presetDate: z\n }),\n changeMonth: D,\n changeYear: ue,\n selectWeekDate: l,\n setStartTime: S\n }), (re, o) => (A(), V(ke, null, [\n at(ma, {\n \"multi-calendars\": s(me).count,\n collapse: re.collapse,\n \"is-mobile\": re.isMobile\n }, {\n default: we(({ instance: E, index: ce }) => [\n re.disableMonthYearSelect ? J(\"\", !0) : (A(), Te(Fr, He({\n key: 0,\n ref: (B) => {\n B && (v.value[ce] = B);\n },\n months: s(Sn)(re.formatLocale, re.locale, re.monthNameFormat),\n years: s(qa)(re.yearRange, re.locale, re.reverseYears),\n month: s(d)(E),\n year: s(y)(E),\n instance: E\n }, re.$props, {\n onMount: o[0] || (o[0] = (B) => oe(s(Rt).header)),\n onResetFlow: o[1] || (o[1] = (B) => re.$emit(\"reset-flow\")),\n onUpdateMonthYear: (B) => s(k)(E, B),\n onOverlayClosed: he,\n onOverlayOpened: o[2] || (o[2] = (B) => re.$emit(\"overlay-toggle\", { open: !0, overlay: B }))\n }), qe({ _: 2 }, [\n Be(s(W), (B, Me) => ({\n name: B,\n fn: we((be) => [\n de(re.$slots, B, ze(xe(be)))\n ])\n }))\n ]), 1040, [\"months\", \"years\", \"month\", \"year\", \"instance\", \"onUpdateMonthYear\"])),\n at(jr, He({\n ref: (B) => {\n B && (L.value[ce] = B);\n },\n \"mapped-dates\": $.value(E),\n month: s(d)(E),\n year: s(y)(E),\n instance: E\n }, re.$props, {\n onSelectDate: (B) => s(I)(B, E !== 1),\n onHandleSpace: (B) => Z(B, E !== 1),\n onSetHoverDate: o[3] || (o[3] = (B) => s(O)(B)),\n onHandleScroll: (B) => s(H)(B, E),\n onHandleSwipe: (B) => s(f)(B, E),\n onMount: o[4] || (o[4] = (B) => oe(s(Rt).calendar)),\n onResetFlow: o[5] || (o[5] = (B) => re.$emit(\"reset-flow\")),\n onTooltipOpen: o[6] || (o[6] = (B) => re.$emit(\"tooltip-open\", B)),\n onTooltipClose: o[7] || (o[7] = (B) => re.$emit(\"tooltip-close\", B))\n }), qe({ _: 2 }, [\n Be(s(p), (B, Me) => ({\n name: B,\n fn: we((be) => [\n de(re.$slots, B, ze(xe({ ...be })))\n ])\n }))\n ]), 1040, [\"mapped-dates\", \"month\", \"year\", \"instance\", \"onSelectDate\", \"onHandleSpace\", \"onHandleScroll\", \"onHandleSwipe\"])\n ]),\n _: 3\n }, 8, [\"multi-calendars\", \"collapse\", \"is-mobile\"]),\n re.enableTimePicker ? (A(), V(\"div\", Gr, [\n re.$slots[\"time-picker\"] ? de(re.$slots, \"time-picker\", ze(He({ key: 0 }, { time: s(_), updateTime: s(ee) }))) : (A(), Te(Vn, He({\n key: 1,\n ref_key: \"timePickerRef\",\n ref: ne\n }, re.$props, {\n hours: s(_).hours,\n minutes: s(_).minutes,\n seconds: s(_).seconds,\n \"internal-model-value\": re.internalModelValue,\n \"disabled-times-config\": s(c),\n \"validate-time\": s(m),\n onMount: o[8] || (o[8] = (E) => oe(s(Rt).timePicker)),\n \"onUpdate:hours\": o[9] || (o[9] = (E) => s(ee)(E)),\n \"onUpdate:minutes\": o[10] || (o[10] = (E) => s(ee)(E, !1)),\n \"onUpdate:seconds\": o[11] || (o[11] = (E) => s(ee)(E, !1, !0)),\n onResetFlow: o[12] || (o[12] = (E) => re.$emit(\"reset-flow\")),\n onOverlayClosed: o[13] || (o[13] = (E) => M(E, !1)),\n onOverlayOpened: o[14] || (o[14] = (E) => M(E, !0)),\n onAmPmChange: o[15] || (o[15] = (E) => re.$emit(\"am-pm-change\", E))\n }), qe({ _: 2 }, [\n Be(s(T), (E, ce) => ({\n name: E,\n fn: we((B) => [\n de(re.$slots, E, ze(xe(B)))\n ])\n }))\n ]), 1040, [\"hours\", \"minutes\", \"seconds\", \"internal-model-value\", \"disabled-times-config\", \"validate-time\"]))\n ])) : J(\"\", !0)\n ], 64));\n }\n}), qr = (e, t) => {\n const r = te(), {\n defaultedMultiCalendars: a,\n defaultedConfig: n,\n defaultedHighlight: u,\n defaultedRange: d,\n propDates: y,\n defaultedFilters: i,\n defaultedMultiDates: _\n } = _e(e), { modelValue: c, year: C, month: m, calendars: P } = aa(e, t), { isDisabled: U } = Tt(e), { selectYear: N, groupedYears: H, showYearPicker: f, isDisabled: I, toggleYearPicker: k, handleYearSelect: z, handleYear: q } = Wn({\n modelValue: c,\n multiCalendars: a,\n range: d,\n highlight: u,\n calendars: P,\n propDates: y,\n month: m,\n year: C,\n filters: i,\n props: e,\n emit: t\n }), ee = (p, W) => [p, W].map((T) => vt(T, \"MMMM\", { locale: e.formatLocale })).join(\"-\"), x = Q(() => (p) => c.value ? Array.isArray(c.value) ? c.value.some((W) => ln(p, W)) : ln(c.value, p) : !1), S = (p) => {\n if (d.value.enabled) {\n if (Array.isArray(c.value)) {\n const W = Ae(p, c.value[0]) || Ae(p, c.value[1]);\n return Jt(c.value, r.value, p) && !W;\n }\n return !1;\n }\n return !1;\n }, X = (p, W) => p.quarter === on(W) && p.year === ye(W), O = (p) => typeof u.value == \"function\" ? u.value({ quarter: on(p), year: ye(p) }) : !!u.value.quarters.find((W) => X(W, p)), K = Q(() => (p) => {\n const W = Pe(/* @__PURE__ */ new Date(), { year: C.value(p) });\n return ml({\n start: da(W),\n end: $n(W)\n }).map((T) => {\n const oe = pl(T), $ = rn(T), Y = U(T), g = S(oe), Z = O(oe);\n return {\n text: ee(oe, $),\n value: oe,\n active: x.value(oe),\n highlighted: Z,\n disabled: Y,\n isBetween: g\n };\n });\n }), fe = (p) => {\n xa(p, c, _.value.limit), t(\"auto-apply\", !0);\n }, me = (p) => {\n c.value = en(c, p, t), pa(c.value, t, e.autoApply, e.modelAuto);\n }, v = (p) => {\n c.value = p, t(\"auto-apply\");\n };\n return {\n defaultedConfig: n,\n defaultedMultiCalendars: a,\n groupedYears: H,\n year: C,\n isDisabled: I,\n quarters: K,\n showYearPicker: f,\n modelValue: c,\n setHoverDate: (p) => {\n r.value = p;\n },\n selectYear: N,\n selectQuarter: (p, W, T) => {\n if (!T)\n return P.value[W].month = $e(rn(p)), _.value.enabled ? fe(p) : d.value.enabled ? me(p) : v(p);\n },\n toggleYearPicker: k,\n handleYearSelect: z,\n handleYear: q\n };\n}, Xr = { class: \"dp--quarter-items\" }, Jr = [\"data-test-id\", \"disabled\", \"onClick\", \"onMouseover\"], Zr = /* @__PURE__ */ Ve({\n compatConfig: {\n MODE: 3\n },\n __name: \"QuarterPicker\",\n props: {\n ...ct\n },\n emits: [\n \"update:internal-model-value\",\n \"reset-flow\",\n \"overlay-closed\",\n \"auto-apply\",\n \"range-start\",\n \"range-end\",\n \"overlay-toggle\",\n \"update-month-year\"\n ],\n setup(e, { expose: t, emit: r }) {\n const a = r, n = e, u = Bt(), d = tt(u, \"yearMode\"), {\n defaultedMultiCalendars: y,\n defaultedConfig: i,\n groupedYears: _,\n year: c,\n isDisabled: C,\n quarters: m,\n modelValue: P,\n showYearPicker: U,\n setHoverDate: N,\n selectQuarter: H,\n toggleYearPicker: f,\n handleYearSelect: I,\n handleYear: k\n } = qr(n, a);\n return t({ getSidebarProps: () => ({\n modelValue: P,\n year: c,\n selectQuarter: H,\n handleYearSelect: I,\n handleYear: k\n }) }), (q, ee) => (A(), Te(ma, {\n \"multi-calendars\": s(y).count,\n collapse: q.collapse,\n stretch: \"\",\n \"is-mobile\": q.isMobile\n }, {\n default: we(({ instance: x }) => [\n ge(\"div\", {\n class: \"dp-quarter-picker-wrap\",\n style: rt({ minHeight: `${s(i).modeHeight}px` })\n }, [\n q.$slots[\"top-extra\"] ? de(q.$slots, \"top-extra\", {\n key: 0,\n value: q.internalModelValue\n }) : J(\"\", !0),\n ge(\"div\", null, [\n at(zn, He(q.$props, {\n items: s(_)(x),\n instance: x,\n \"show-year-picker\": s(U)[x],\n year: s(c)(x),\n \"is-disabled\": (S) => s(C)(x, S),\n onHandleYear: (S) => s(k)(x, S),\n onYearSelect: (S) => s(I)(S, x),\n onToggleYearPicker: (S) => s(f)(x, S == null ? void 0 : S.flow, S == null ? void 0 : S.show)\n }), qe({ _: 2 }, [\n Be(s(d), (S, X) => ({\n name: S,\n fn: we((O) => [\n de(q.$slots, S, ze(xe(O)))\n ])\n }))\n ]), 1040, [\"items\", \"instance\", \"show-year-picker\", \"year\", \"is-disabled\", \"onHandleYear\", \"onYearSelect\", \"onToggleYearPicker\"])\n ]),\n ge(\"div\", Xr, [\n (A(!0), V(ke, null, Be(s(m)(x), (S, X) => (A(), V(\"div\", { key: X }, [\n ge(\"button\", {\n type: \"button\",\n class: De([\"dp--qr-btn\", {\n \"dp--qr-btn-active\": S.active,\n \"dp--qr-btn-between\": S.isBetween,\n \"dp--qr-btn-disabled\": S.disabled,\n \"dp--highlighted\": S.highlighted\n }]),\n \"data-test-id\": S.value,\n disabled: S.disabled,\n onClick: (O) => s(H)(S.value, x, S.disabled),\n onMouseover: (O) => s(N)(S.value)\n }, [\n q.$slots.quarter ? de(q.$slots, \"quarter\", {\n key: 0,\n value: S.value,\n text: S.text\n }) : (A(), V(ke, { key: 1 }, [\n gt(Qe(S.text), 1)\n ], 64))\n ], 42, Jr)\n ]))), 128))\n ])\n ], 4)\n ]),\n _: 3\n }, 8, [\"multi-calendars\", \"collapse\", \"is-mobile\"]));\n }\n}), Kn = (e, t) => {\n const r = te(0);\n je(() => {\n a(), window.addEventListener(\"resize\", a, { passive: !0 });\n }), xt(() => {\n window.removeEventListener(\"resize\", a);\n });\n const a = () => {\n r.value = window.document.documentElement.clientWidth;\n };\n return {\n isMobile: Q(\n () => r.value <= e.value.mobileBreakpoint && !t ? !0 : void 0\n )\n };\n}, xr = [\"id\", \"tabindex\", \"role\", \"aria-label\"], eo = {\n key: 0,\n class: \"dp--menu-load-container\"\n}, to = {\n key: 1,\n class: \"dp--menu-header\"\n}, ao = [\"data-dp-mobile\"], no = {\n key: 0,\n class: \"dp__sidebar_left\"\n}, lo = [\"data-dp-mobile\"], ro = [\"data-test-id\", \"data-dp-mobile\", \"onClick\", \"onKeydown\"], oo = {\n key: 2,\n class: \"dp__sidebar_right\"\n}, so = {\n key: 3,\n class: \"dp__action_extra\"\n}, gn = /* @__PURE__ */ Ve({\n compatConfig: {\n MODE: 3\n },\n __name: \"DatepickerMenu\",\n props: {\n ...va,\n shadow: { type: Boolean, default: !1 },\n openOnTop: { type: Boolean, default: !1 },\n internalModelValue: { type: [Date, Array], default: null },\n noOverlayFocus: { type: Boolean, default: !1 },\n collapse: { type: Boolean, default: !1 },\n getInputRect: { type: Function, default: () => ({}) },\n isTextInputDate: { type: Boolean, default: !1 }\n },\n emits: [\n \"close-picker\",\n \"select-date\",\n \"auto-apply\",\n \"time-update\",\n \"flow-step\",\n \"update-month-year\",\n \"invalid-select\",\n \"update:internal-model-value\",\n \"recalculate-position\",\n \"invalid-fixed-range\",\n \"tooltip-open\",\n \"tooltip-close\",\n \"time-picker-open\",\n \"time-picker-close\",\n \"am-pm-change\",\n \"range-start\",\n \"range-end\",\n \"auto-apply-invalid\",\n \"date-update\",\n \"invalid-date\",\n \"overlay-toggle\",\n \"menu-blur\"\n ],\n setup(e, { expose: t, emit: r }) {\n const a = r, n = e, u = te(null), d = Q(() => {\n const { openOnTop: b, ...F } = n;\n return {\n ...F,\n isMobile: N.value,\n flowStep: K.value,\n menuWrapRef: u.value\n };\n }), { setMenuFocused: y, setShiftKey: i, control: _ } = Ln(), c = Bt(), { defaultedTextInput: C, defaultedInline: m, defaultedConfig: P, defaultedUI: U } = _e(n), { isMobile: N } = Kn(P, n.shadow), H = te(null), f = te(0), I = te(null), k = te(!1), z = te(null), q = te(!1);\n je(() => {\n if (!n.shadow) {\n k.value = !0, ee(), window.addEventListener(\"resize\", ee);\n const b = Le(u);\n if (b && !C.value.enabled && !m.value.enabled && (y(!0), W()), b) {\n const F = (Re) => {\n q.value = !0, P.value.allowPreventDefault && Re.preventDefault(), Dt(Re, P.value, !0);\n };\n b.addEventListener(\"pointerdown\", F), b.addEventListener(\"mousedown\", F);\n }\n }\n document.addEventListener(\"mousedown\", be);\n }), xt(() => {\n window.removeEventListener(\"resize\", ee), document.addEventListener(\"mousedown\", be);\n });\n const ee = () => {\n const b = Le(I);\n b && (f.value = b.getBoundingClientRect().width);\n }, { arrowRight: x, arrowLeft: S, arrowDown: X, arrowUp: O } = At(), { flowStep: K, updateFlowStep: fe, childMount: me, resetFlow: v, handleFlow: L } = vo(n, a, z), ne = Q(() => n.monthPicker ? yr : n.yearPicker ? hr : n.timePicker ? Br : n.quarterPicker ? Zr : Qr), p = Q(() => {\n var Re;\n if (P.value.arrowLeft) return P.value.arrowLeft;\n const b = (Re = u.value) == null ? void 0 : Re.getBoundingClientRect(), F = n.getInputRect();\n return (F == null ? void 0 : F.width) < (f == null ? void 0 : f.value) && (F == null ? void 0 : F.left) <= ((b == null ? void 0 : b.left) ?? 0) ? `${(F == null ? void 0 : F.width) / 2}px` : (F == null ? void 0 : F.right) >= ((b == null ? void 0 : b.right) ?? 0) && (F == null ? void 0 : F.width) < (f == null ? void 0 : f.value) ? `${(f == null ? void 0 : f.value) - (F == null ? void 0 : F.width) / 2}px` : \"50%\";\n }), W = () => {\n const b = Le(u);\n b && b.focus({ preventScroll: !0 });\n }, T = Q(() => {\n var b;\n return ((b = z.value) == null ? void 0 : b.getSidebarProps()) || {};\n }), oe = () => {\n n.openOnTop && a(\"recalculate-position\");\n }, $ = tt(c, \"action\"), Y = Q(() => n.monthPicker || n.yearPicker ? tt(c, \"monthYear\") : n.timePicker ? tt(c, \"timePicker\") : tt(c, \"shared\")), g = Q(() => n.openOnTop ? \"dp__arrow_bottom\" : \"dp__arrow_top\"), Z = Q(() => ({\n dp__menu_disabled: n.disabled,\n dp__menu_readonly: n.readonly,\n \"dp-menu-loading\": n.loading\n })), se = Q(\n () => ({\n dp__menu: !0,\n dp__menu_index: !m.value.enabled,\n dp__relative: m.value.enabled,\n ...U.value.menu ?? {}\n })\n ), R = (b) => {\n Dt(b, P.value, !0);\n }, ae = () => {\n n.escClose && a(\"close-picker\");\n }, l = (b) => {\n if (n.arrowNavigation) {\n if (b === Je.up) return O();\n if (b === Je.down) return X();\n if (b === Je.left) return S();\n if (b === Je.right) return x();\n } else b === Je.left || b === Je.up ? pe(\"handleArrow\", Je.left, 0, b === Je.up) : pe(\"handleArrow\", Je.right, 0, b === Je.down);\n }, D = (b) => {\n i(b.shiftKey), !n.disableMonthYearSelect && b.code === Oe.tab && b.target.classList.contains(\"dp__menu\") && _.value.shiftKeyInMenu && (b.preventDefault(), Dt(b, P.value, !0), a(\"close-picker\"));\n }, ue = () => {\n W(), a(\"time-picker-close\");\n }, M = (b) => {\n var F, Re, Fe;\n (F = z.value) == null || F.toggleTimePicker(!1, !1), (Re = z.value) == null || Re.toggleMonthPicker(!1, !1, b), (Fe = z.value) == null || Fe.toggleYearPicker(!1, !1, b);\n }, he = (b, F = 0) => {\n var Re, Fe, mt;\n return b === \"month\" ? (Re = z.value) == null ? void 0 : Re.toggleMonthPicker(!1, !0, F) : b === \"year\" ? (Fe = z.value) == null ? void 0 : Fe.toggleYearPicker(!1, !0, F) : b === \"time\" ? (mt = z.value) == null ? void 0 : mt.toggleTimePicker(!0, !1) : M(F);\n }, pe = (b, ...F) => {\n var Re, Fe;\n (Re = z.value) != null && Re[b] && ((Fe = z.value) == null || Fe[b](...F));\n }, re = () => {\n pe(\"selectCurrentDate\");\n }, o = (b, F) => {\n pe(\"presetDate\", Zn(b), F);\n }, E = () => {\n pe(\"clearHoverDate\");\n }, ce = (b, F) => {\n pe(\"updateMonthYear\", b, F);\n }, B = (b, F) => {\n b.preventDefault(), l(F);\n }, Me = (b) => {\n var F, Re, Fe;\n if (D(b), b.key === Oe.home || b.key === Oe.end)\n return pe(\n \"selectWeekDate\",\n b.key === Oe.home,\n b.target.getAttribute(\"id\")\n );\n switch ((b.key === Oe.pageUp || b.key === Oe.pageDown) && (b.shiftKey ? (pe(\"changeYear\", b.key === Oe.pageUp), (F = La(u.value, \"overlay-year\")) == null || F.focus()) : (pe(\"changeMonth\", b.key === Oe.pageUp), (Re = La(u.value, b.key === Oe.pageUp ? \"action-prev\" : \"action-next\")) == null || Re.focus()), b.target.getAttribute(\"id\") && ((Fe = u.value) == null || Fe.focus({ preventScroll: !0 }))), b.key) {\n case Oe.esc:\n return ae();\n case Oe.arrowLeft:\n return B(b, Je.left);\n case Oe.arrowRight:\n return B(b, Je.right);\n case Oe.arrowUp:\n return B(b, Je.up);\n case Oe.arrowDown:\n return B(b, Je.down);\n default:\n return;\n }\n }, be = (b) => {\n var F;\n m.value.enabled && !m.value.input && !((F = u.value) != null && F.contains(b.target)) && q.value && (q.value = !1, a(\"menu-blur\"));\n };\n return t({\n updateMonthYear: ce,\n switchView: he,\n handleFlow: L,\n onValueCleared: () => {\n var b, F;\n (F = (b = z.value) == null ? void 0 : b.setStartTime) == null || F.call(b);\n }\n }), (b, F) => {\n var Re, Fe, mt;\n return A(), V(\"div\", {\n id: b.uid ? `dp-menu-${b.uid}` : void 0,\n ref_key: \"dpMenuRef\",\n ref: u,\n tabindex: s(m).enabled ? void 0 : \"0\",\n role: s(m).enabled ? void 0 : \"dialog\",\n \"aria-label\": (Re = b.ariaLabels) == null ? void 0 : Re.menu,\n class: De(se.value),\n style: rt({ \"--dp-arrow-left\": p.value }),\n onMouseleave: E,\n onClick: R,\n onKeydown: Me\n }, [\n (b.disabled || b.readonly) && s(m).enabled || b.loading ? (A(), V(\"div\", {\n key: 0,\n class: De(Z.value)\n }, [\n b.loading ? (A(), V(\"div\", eo, F[19] || (F[19] = [\n ge(\"span\", { class: \"dp--menu-loader\" }, null, -1)\n ]))) : J(\"\", !0)\n ], 2)) : J(\"\", !0),\n b.$slots[\"menu-header\"] ? (A(), V(\"div\", to, [\n de(b.$slots, \"menu-header\")\n ])) : J(\"\", !0),\n !s(m).enabled && !b.teleportCenter ? (A(), V(\"div\", {\n key: 2,\n class: De(g.value)\n }, null, 2)) : J(\"\", !0),\n ge(\"div\", {\n ref_key: \"innerMenuRef\",\n ref: I,\n class: De({\n dp__menu_content_wrapper: ((Fe = b.presetDates) == null ? void 0 : Fe.length) || !!b.$slots[\"left-sidebar\"] || !!b.$slots[\"right-sidebar\"],\n \"dp--menu-content-wrapper-collapsed\": e.collapse && (((mt = b.presetDates) == null ? void 0 : mt.length) || !!b.$slots[\"left-sidebar\"] || !!b.$slots[\"right-sidebar\"])\n }),\n \"data-dp-mobile\": s(N),\n style: rt({ \"--dp-menu-width\": `${f.value}px` })\n }, [\n b.$slots[\"left-sidebar\"] ? (A(), V(\"div\", no, [\n de(b.$slots, \"left-sidebar\", ze(xe(T.value)))\n ])) : J(\"\", !0),\n b.presetDates.length ? (A(), V(\"div\", {\n key: 1,\n class: De({ \"dp--preset-dates-collapsed\": e.collapse, \"dp--preset-dates\": !0 }),\n \"data-dp-mobile\": s(N)\n }, [\n (A(!0), V(ke, null, Be(b.presetDates, (ve, Ue) => (A(), V(ke, { key: Ue }, [\n ve.slot ? de(b.$slots, ve.slot, {\n key: 0,\n presetDate: o,\n label: ve.label,\n value: ve.value\n }) : (A(), V(\"button\", {\n key: 1,\n type: \"button\",\n style: rt(ve.style || {}),\n class: De([\"dp__btn dp--preset-range\", { \"dp--preset-range-collapsed\": e.collapse }]),\n \"data-test-id\": ve.testId ?? void 0,\n \"data-dp-mobile\": s(N),\n onClick: Qt((lt) => o(ve.value, ve.noTz), [\"prevent\"]),\n onKeydown: (lt) => s(Ze)(lt, () => o(ve.value, ve.noTz), !0)\n }, Qe(ve.label), 47, ro))\n ], 64))), 128))\n ], 10, lo)) : J(\"\", !0),\n ge(\"div\", {\n ref_key: \"calendarWrapperRef\",\n ref: H,\n class: \"dp__instance_calendar\",\n role: \"document\"\n }, [\n (A(), Te(fa(ne.value), He({\n ref_key: \"dynCmpRef\",\n ref: z\n }, d.value, {\n \"flow-step\": s(K),\n onMount: s(me),\n onUpdateFlowStep: s(fe),\n onResetFlow: s(v),\n onFocusMenu: W,\n onSelectDate: F[0] || (F[0] = (ve) => b.$emit(\"select-date\")),\n onDateUpdate: F[1] || (F[1] = (ve) => b.$emit(\"date-update\", ve)),\n onTooltipOpen: F[2] || (F[2] = (ve) => b.$emit(\"tooltip-open\", ve)),\n onTooltipClose: F[3] || (F[3] = (ve) => b.$emit(\"tooltip-close\", ve)),\n onAutoApply: F[4] || (F[4] = (ve) => b.$emit(\"auto-apply\", ve)),\n onRangeStart: F[5] || (F[5] = (ve) => b.$emit(\"range-start\", ve)),\n onRangeEnd: F[6] || (F[6] = (ve) => b.$emit(\"range-end\", ve)),\n onInvalidFixedRange: F[7] || (F[7] = (ve) => b.$emit(\"invalid-fixed-range\", ve)),\n onTimeUpdate: F[8] || (F[8] = (ve) => b.$emit(\"time-update\")),\n onAmPmChange: F[9] || (F[9] = (ve) => b.$emit(\"am-pm-change\", ve)),\n onTimePickerOpen: F[10] || (F[10] = (ve) => b.$emit(\"time-picker-open\", ve)),\n onTimePickerClose: ue,\n onRecalculatePosition: oe,\n onUpdateMonthYear: F[11] || (F[11] = (ve) => b.$emit(\"update-month-year\", ve)),\n onAutoApplyInvalid: F[12] || (F[12] = (ve) => b.$emit(\"auto-apply-invalid\", ve)),\n onInvalidDate: F[13] || (F[13] = (ve) => b.$emit(\"invalid-date\", ve)),\n onOverlayToggle: F[14] || (F[14] = (ve) => b.$emit(\"overlay-toggle\", ve)),\n \"onUpdate:internalModelValue\": F[15] || (F[15] = (ve) => b.$emit(\"update:internal-model-value\", ve))\n }), qe({ _: 2 }, [\n Be(Y.value, (ve, Ue) => ({\n name: ve,\n fn: we((lt) => [\n de(b.$slots, ve, ze(xe({ ...lt })))\n ])\n }))\n ]), 1040, [\"flow-step\", \"onMount\", \"onUpdateFlowStep\", \"onResetFlow\"]))\n ], 512),\n b.$slots[\"right-sidebar\"] ? (A(), V(\"div\", oo, [\n de(b.$slots, \"right-sidebar\", ze(xe(T.value)))\n ])) : J(\"\", !0),\n b.$slots[\"action-extra\"] ? (A(), V(\"div\", so, [\n b.$slots[\"action-extra\"] ? de(b.$slots, \"action-extra\", {\n key: 0,\n selectCurrentDate: re\n }) : J(\"\", !0)\n ])) : J(\"\", !0)\n ], 14, ao),\n !b.autoApply || s(P).keepActionRow ? (A(), Te(sr, He({\n key: 3,\n \"menu-mount\": k.value\n }, d.value, {\n \"calendar-width\": f.value,\n onClosePicker: F[16] || (F[16] = (ve) => b.$emit(\"close-picker\")),\n onSelectDate: F[17] || (F[17] = (ve) => b.$emit(\"select-date\")),\n onInvalidSelect: F[18] || (F[18] = (ve) => b.$emit(\"invalid-select\")),\n onSelectNow: re\n }), qe({ _: 2 }, [\n Be(s($), (ve, Ue) => ({\n name: ve,\n fn: we((lt) => [\n de(b.$slots, ve, ze(xe({ ...lt })))\n ])\n }))\n ]), 1040, [\"menu-mount\", \"calendar-width\"])) : J(\"\", !0)\n ], 46, xr);\n };\n }\n});\nvar It = /* @__PURE__ */ ((e) => (e.center = \"center\", e.left = \"left\", e.right = \"right\", e))(It || {});\nconst uo = ({\n menuRef: e,\n menuRefInner: t,\n inputRef: r,\n pickerWrapperRef: a,\n inline: n,\n emit: u,\n props: d,\n slots: y\n}) => {\n const { defaultedConfig: i } = _e(d), _ = te({}), c = te(!1), C = te({\n top: \"0\",\n left: \"0\"\n }), m = te(!1), P = Gt(d, \"teleportCenter\");\n ot(P, () => {\n C.value = JSON.parse(JSON.stringify({})), q();\n });\n const U = (p) => {\n if (d.teleport) {\n const W = p.getBoundingClientRect();\n return {\n left: W.left + window.scrollX,\n top: W.top + window.scrollY\n };\n }\n return { top: 0, left: 0 };\n }, N = (p, W) => {\n C.value.left = `${p + W - _.value.width}px`;\n }, H = (p) => {\n C.value.left = `${p}px`;\n }, f = (p, W) => {\n d.position === It.left && H(p), d.position === It.right && N(p, W), d.position === It.center && (C.value.left = `${p + W / 2 - _.value.width / 2}px`);\n }, I = (p) => {\n const { width: W, height: T } = p.getBoundingClientRect(), { top: oe, left: $ } = U(p);\n return { top: +oe, left: +$, width: W, height: T };\n }, k = () => {\n C.value.left = \"50%\", C.value.top = \"50%\", C.value.transform = \"translate(-50%, -50%)\", C.value.position = \"fixed\", delete C.value.opacity;\n }, z = () => {\n const p = Le(r);\n C.value = d.altPosition(p);\n }, q = (p = !0) => {\n var W;\n if (!n.value.enabled) {\n if (P.value) return k();\n if (d.altPosition !== null) return z();\n if (p) {\n const T = d.teleport ? (W = t.value) == null ? void 0 : W.$el : e.value;\n T && (_.value = T.getBoundingClientRect()), u(\"recalculate-position\");\n }\n return fe();\n }\n }, ee = ({ inputEl: p, left: W, width: T }) => {\n window.screen.width > 768 && !c.value && f(W, T), X(p);\n }, x = (p) => {\n const { top: W, left: T, height: oe, width: $ } = I(p);\n C.value.top = `${oe + W + +d.offset}px`, m.value = !1, c.value || (C.value.left = `${T + $ / 2 - _.value.width / 2}px`), ee({ inputEl: p, left: T, width: $ });\n }, S = (p) => {\n const { top: W, left: T, width: oe } = I(p);\n C.value.top = `${W - +d.offset - _.value.height}px`, m.value = !0, ee({ inputEl: p, left: T, width: oe });\n }, X = (p) => {\n if (d.autoPosition) {\n const { left: W, width: T } = I(p), { left: oe, right: $ } = _.value;\n if (!c.value) {\n if (Math.abs(oe) !== Math.abs($)) {\n if (oe <= 0)\n return c.value = !0, H(W);\n if ($ >= document.documentElement.clientWidth)\n return c.value = !0, N(W, T);\n }\n return f(W, T);\n }\n }\n }, O = () => {\n const p = Le(r);\n if (p) {\n if (d.autoPosition === it.top) return it.top;\n if (d.autoPosition === it.bottom) return it.bottom;\n const { height: W } = _.value, { top: T, height: oe } = p.getBoundingClientRect(), Y = window.innerHeight - T - oe, g = T;\n return W <= Y ? it.bottom : W > Y && W <= g ? it.top : Y >= g ? it.bottom : it.top;\n }\n return it.bottom;\n }, K = (p) => O() === it.bottom ? x(p) : S(p), fe = () => {\n const p = Le(r);\n if (p)\n return d.autoPosition ? K(p) : x(p);\n }, me = function(p) {\n if (p) {\n const W = p.scrollHeight > p.clientHeight, oe = window.getComputedStyle(p).overflowY.indexOf(\"hidden\") !== -1;\n return W && !oe;\n }\n return !0;\n }, v = function(p) {\n return !p || p === document.body || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? window : me(p) ? p : v(\n p.assignedSlot && i.value.shadowDom ? p.assignedSlot.parentNode : p.parentNode\n );\n }, L = (p) => {\n if (p)\n switch (d.position) {\n case It.left:\n return { left: 0, transform: \"translateX(0)\" };\n case It.right:\n return { left: `${p.width}px`, transform: \"translateX(-100%)\" };\n default:\n return { left: `${p.width / 2}px`, transform: \"translateX(-50%)\" };\n }\n return {};\n };\n return {\n openOnTop: m,\n menuStyle: C,\n xCorrect: c,\n setMenuPosition: q,\n getScrollableParent: v,\n shadowRender: (p, W) => {\n var se, R, ae;\n const T = document.createElement(\"div\"), oe = (se = Le(r)) == null ? void 0 : se.getBoundingClientRect();\n T.setAttribute(\"id\", \"dp--temp-container\");\n const $ = (R = a.value) != null && R.clientWidth ? a.value : document.body;\n $.append(T);\n const Y = L(oe), g = i.value.shadowDom ? Object.keys(y).filter(\n (l) => [\"right-sidebar\", \"left-sidebar\", \"top-extra\", \"action-extra\"].includes(l)\n ) : Object.keys(y), Z = xn(\n p,\n {\n ...W,\n shadow: !0,\n style: { opacity: 0, position: \"absolute\", ...Y }\n },\n Object.fromEntries(g.map((l) => [l, y[l]]))\n );\n an(Z, T), _.value = (ae = Z.el) == null ? void 0 : ae.getBoundingClientRect(), an(null, T), $.removeChild(T);\n }\n };\n}, bt = [\n { name: \"clock-icon\", use: [\"time\", \"calendar\", \"shared\"] },\n { name: \"arrow-left\", use: [\"month-year\", \"calendar\", \"shared\", \"year-mode\"] },\n { name: \"arrow-right\", use: [\"month-year\", \"calendar\", \"shared\", \"year-mode\"] },\n { name: \"arrow-up\", use: [\"time\", \"calendar\", \"month-year\", \"shared\"] },\n { name: \"arrow-down\", use: [\"time\", \"calendar\", \"month-year\", \"shared\"] },\n { name: \"calendar-icon\", use: [\"month-year\", \"time\", \"calendar\", \"shared\", \"year-mode\"] },\n { name: \"day\", use: [\"calendar\", \"shared\"] },\n { name: \"month-overlay-value\", use: [\"calendar\", \"month-year\", \"shared\"] },\n { name: \"year-overlay-value\", use: [\"calendar\", \"month-year\", \"shared\", \"year-mode\"] },\n { name: \"year-overlay\", use: [\"month-year\", \"shared\"] },\n { name: \"month-overlay\", use: [\"month-year\", \"shared\"] },\n { name: \"month-overlay-header\", use: [\"month-year\", \"shared\"] },\n { name: \"year-overlay-header\", use: [\"month-year\", \"shared\"] },\n { name: \"hours-overlay-value\", use: [\"calendar\", \"time\", \"shared\"] },\n { name: \"hours-overlay-header\", use: [\"calendar\", \"time\", \"shared\"] },\n { name: \"minutes-overlay-value\", use: [\"calendar\", \"time\", \"shared\"] },\n { name: \"minutes-overlay-header\", use: [\"calendar\", \"time\", \"shared\"] },\n { name: \"seconds-overlay-value\", use: [\"calendar\", \"time\", \"shared\"] },\n { name: \"seconds-overlay-header\", use: [\"calendar\", \"time\", \"shared\"] },\n { name: \"hours\", use: [\"calendar\", \"time\", \"shared\"] },\n { name: \"minutes\", use: [\"calendar\", \"time\", \"shared\"] },\n { name: \"month\", use: [\"calendar\", \"month-year\", \"shared\"] },\n { name: \"year\", use: [\"calendar\", \"month-year\", \"shared\", \"year-mode\"] },\n { name: \"action-buttons\", use: [\"action\"] },\n { name: \"action-preview\", use: [\"action\"] },\n { name: \"calendar-header\", use: [\"calendar\", \"shared\"] },\n { name: \"marker-tooltip\", use: [\"calendar\", \"shared\"] },\n { name: \"action-extra\", use: [\"menu\"] },\n { name: \"time-picker-overlay\", use: [\"calendar\", \"time\", \"shared\"] },\n { name: \"am-pm-button\", use: [\"calendar\", \"time\", \"shared\"] },\n { name: \"left-sidebar\", use: [\"menu\"] },\n { name: \"right-sidebar\", use: [\"menu\"] },\n { name: \"month-year\", use: [\"month-year\", \"shared\"] },\n { name: \"time-picker\", use: [\"menu\", \"shared\"] },\n { name: \"action-row\", use: [\"action\"] },\n { name: \"marker\", use: [\"calendar\", \"shared\"] },\n { name: \"quarter\", use: [\"shared\"] },\n { name: \"top-extra\", use: [\"shared\", \"month-year\"] },\n { name: \"tp-inline-arrow-up\", use: [\"shared\", \"time\"] },\n { name: \"tp-inline-arrow-down\", use: [\"shared\", \"time\"] },\n { name: \"menu-header\", use: [\"menu\"] }\n], io = [{ name: \"trigger\" }, { name: \"input-icon\" }, { name: \"clear-icon\" }, { name: \"dp-input\" }], co = {\n all: () => bt,\n monthYear: () => bt.filter((e) => e.use.includes(\"month-year\")),\n input: () => io,\n timePicker: () => bt.filter((e) => e.use.includes(\"time\")),\n action: () => bt.filter((e) => e.use.includes(\"action\")),\n calendar: () => bt.filter((e) => e.use.includes(\"calendar\")),\n menu: () => bt.filter((e) => e.use.includes(\"menu\")),\n shared: () => bt.filter((e) => e.use.includes(\"shared\")),\n yearMode: () => bt.filter((e) => e.use.includes(\"year-mode\"))\n}, tt = (e, t, r) => {\n const a = [];\n return co[t]().forEach((n) => {\n e[n.name] && a.push(n.name);\n }), r != null && r.length && r.forEach((n) => {\n n.slot && a.push(n.slot);\n }), a;\n}, ta = (e) => {\n const t = Q(() => (a) => e.value ? a ? e.value.open : e.value.close : \"\"), r = Q(() => (a) => e.value ? a ? e.value.menuAppearTop : e.value.menuAppearBottom : \"\");\n return { transitionName: t, showTransition: !!e.value, menuTransition: r };\n}, aa = (e, t, r) => {\n const { defaultedRange: a, defaultedTz: n } = _e(e), u = j(et(j(), n.value.timezone)), d = te([{ month: $e(u), year: ye(u) }]), y = (m) => {\n const P = {\n hours: ht(u),\n minutes: $t(u),\n seconds: 0\n };\n return a.value.enabled ? [P[m], P[m]] : P[m];\n }, i = Zt({\n hours: y(\"hours\"),\n minutes: y(\"minutes\"),\n seconds: y(\"seconds\")\n });\n ot(\n a,\n (m, P) => {\n m.enabled !== P.enabled && (i.hours = y(\"hours\"), i.minutes = y(\"minutes\"), i.seconds = y(\"seconds\"));\n },\n { deep: !0 }\n );\n const _ = Q({\n get: () => e.internalModelValue,\n set: (m) => {\n !e.readonly && !e.disabled && t(\"update:internal-model-value\", m);\n }\n }), c = Q(\n () => (m) => d.value[m] ? d.value[m].month : 0\n ), C = Q(\n () => (m) => d.value[m] ? d.value[m].year : 0\n );\n return ot(\n _,\n (m, P) => {\n r && JSON.stringify(m ?? {}) !== JSON.stringify(P ?? {}) && r();\n },\n { deep: !0 }\n ), {\n calendars: d,\n time: i,\n modelValue: _,\n month: c,\n year: C,\n today: u\n };\n}, fo = (e, t) => {\n const {\n defaultedMultiCalendars: r,\n defaultedMultiDates: a,\n defaultedUI: n,\n defaultedHighlight: u,\n defaultedTz: d,\n propDates: y,\n defaultedRange: i\n } = _e(t), { isDisabled: _ } = Tt(t), c = te(null), C = te(et(/* @__PURE__ */ new Date(), d.value.timezone)), m = (l) => {\n !l.current && t.hideOffsetDates || (c.value = l.value);\n }, P = () => {\n c.value = null;\n }, U = (l) => Array.isArray(e.value) && i.value.enabled && e.value[0] && c.value ? l ? Ee(c.value, e.value[0]) : Ye(c.value, e.value[0]) : !0, N = (l, D) => {\n const ue = () => e.value ? D ? e.value[0] || null : e.value[1] : null, M = e.value && Array.isArray(e.value) ? ue() : null;\n return Ae(j(l.value), M);\n }, H = (l) => {\n const D = Array.isArray(e.value) ? e.value[0] : null;\n return l ? !Ye(c.value ?? null, D) : !0;\n }, f = (l, D = !0) => (i.value.enabled || t.weekPicker) && Array.isArray(e.value) && e.value.length === 2 ? t.hideOffsetDates && !l.current ? !1 : Ae(j(l.value), e.value[D ? 0 : 1]) : i.value.enabled ? N(l, D) && H(D) || Ae(l.value, Array.isArray(e.value) ? e.value[0] : null) && U(D) : !1, I = (l, D) => {\n if (Array.isArray(e.value) && e.value[0] && e.value.length === 1) {\n const ue = Ae(l.value, c.value);\n return D ? Ee(e.value[0], l.value) && ue : Ye(e.value[0], l.value) && ue;\n }\n return !1;\n }, k = (l) => !e.value || t.hideOffsetDates && !l.current ? !1 : i.value.enabled ? t.modelAuto && Array.isArray(e.value) ? Ae(l.value, e.value[0] ? e.value[0] : C.value) : !1 : a.value.enabled && Array.isArray(e.value) ? e.value.some((D) => Ae(D, l.value)) : Ae(l.value, e.value ? e.value : C.value), z = (l) => {\n if (i.value.autoRange || t.weekPicker) {\n if (c.value) {\n if (t.hideOffsetDates && !l.current) return !1;\n const D = kt(c.value, +i.value.autoRange), ue = pt(j(c.value), t.weekStart);\n return t.weekPicker ? Ae(ue[1], j(l.value)) : Ae(D, j(l.value));\n }\n return !1;\n }\n return !1;\n }, q = (l) => {\n if (i.value.autoRange || t.weekPicker) {\n if (c.value) {\n const D = kt(c.value, +i.value.autoRange);\n if (t.hideOffsetDates && !l.current) return !1;\n const ue = pt(j(c.value), t.weekStart);\n return t.weekPicker ? Ee(l.value, ue[0]) && Ye(l.value, ue[1]) : Ee(l.value, c.value) && Ye(l.value, D);\n }\n return !1;\n }\n return !1;\n }, ee = (l) => {\n if (i.value.autoRange || t.weekPicker) {\n if (c.value) {\n if (t.hideOffsetDates && !l.current) return !1;\n const D = pt(j(c.value), t.weekStart);\n return t.weekPicker ? Ae(D[0], l.value) : Ae(c.value, l.value);\n }\n return !1;\n }\n return !1;\n }, x = (l) => Jt(e.value, c.value, l.value), S = () => t.modelAuto && Array.isArray(t.internalModelValue) ? !!t.internalModelValue[0] : !1, X = () => t.modelAuto ? Pn(t.internalModelValue) : !0, O = (l) => {\n if (t.weekPicker) return !1;\n const D = i.value.enabled ? !f(l) && !f(l, !1) : !0;\n return !_(l.value) && !k(l) && !(!l.current && t.hideOffsetDates) && D;\n }, K = (l) => i.value.enabled ? t.modelAuto ? S() && k(l) : !1 : k(l), fe = (l) => u.value ? Rl(l.value, y.value.highlight) : !1, me = (l) => {\n const D = _(l.value);\n return D && (typeof u.value == \"function\" ? !u.value(l.value, D) : !u.value.options.highlightDisabled);\n }, v = (l) => {\n var D;\n return typeof u.value == \"function\" ? u.value(l.value) : (D = u.value.weekdays) == null ? void 0 : D.includes(l.value.getDay());\n }, L = (l) => (i.value.enabled || t.weekPicker) && (!(r.value.count > 0) || l.current) && X() && !(!l.current && t.hideOffsetDates) && !k(l) ? x(l) : !1, ne = (l) => {\n if (Array.isArray(e.value) && e.value.length === 1) {\n const { before: D, after: ue } = vn(+i.value.maxRange, e.value[0]);\n return Ft(l.value, D) || Ot(l.value, ue);\n }\n return !1;\n }, p = (l) => {\n if (Array.isArray(e.value) && e.value.length === 1) {\n const { before: D, after: ue } = vn(+i.value.minRange, e.value[0]);\n return Jt([D, ue], e.value[0], l.value);\n }\n return !1;\n }, W = (l) => i.value.enabled && (i.value.maxRange || i.value.minRange) ? i.value.maxRange && i.value.minRange ? ne(l) || p(l) : i.value.maxRange ? ne(l) : p(l) : !1, T = (l) => {\n const { isRangeStart: D, isRangeEnd: ue } = g(l), M = i.value.enabled ? D || ue : !1;\n return {\n dp__cell_offset: !l.current,\n dp__pointer: !t.disabled && !(!l.current && t.hideOffsetDates) && !_(l.value) && !W(l),\n dp__cell_disabled: _(l.value) || W(l),\n dp__cell_highlight: !me(l) && (fe(l) || v(l)) && !K(l) && !M && !ee(l) && !(L(l) && t.weekPicker) && !ue,\n dp__cell_highlight_active: !me(l) && (fe(l) || v(l)) && K(l),\n dp__today: !t.noToday && Ae(l.value, C.value) && l.current,\n \"dp--past\": Ye(l.value, C.value),\n \"dp--future\": Ee(l.value, C.value)\n };\n }, oe = (l) => ({\n dp__active_date: K(l),\n dp__date_hover: O(l)\n }), $ = (l) => {\n if (e.value && !Array.isArray(e.value)) {\n const D = pt(e.value, t.weekStart);\n return {\n ...se(l),\n dp__range_start: Ae(D[0], l.value),\n dp__range_end: Ae(D[1], l.value),\n dp__range_between_week: Ee(l.value, D[0]) && Ye(l.value, D[1])\n };\n }\n return {\n ...se(l)\n };\n }, Y = (l) => {\n if (e.value && Array.isArray(e.value)) {\n const D = pt(e.value[0], t.weekStart), ue = e.value[1] ? pt(e.value[1], t.weekStart) : [];\n return {\n ...se(l),\n dp__range_start: Ae(D[0], l.value) || Ae(ue[0], l.value),\n dp__range_end: Ae(D[1], l.value) || Ae(ue[1], l.value),\n dp__range_between_week: Ee(l.value, D[0]) && Ye(l.value, D[1]) || Ee(l.value, ue[0]) && Ye(l.value, ue[1]),\n dp__range_between: Ee(l.value, D[1]) && Ye(l.value, ue[0])\n };\n }\n return {\n ...se(l)\n };\n }, g = (l) => {\n const D = r.value.count > 0 ? l.current && f(l) && X() : f(l) && X(), ue = r.value.count > 0 ? l.current && f(l, !1) && X() : f(l, !1) && X();\n return { isRangeStart: D, isRangeEnd: ue };\n }, Z = (l) => {\n const { isRangeStart: D, isRangeEnd: ue } = g(l);\n return {\n dp__range_start: D,\n dp__range_end: ue,\n dp__range_between: L(l),\n dp__date_hover: Ae(l.value, c.value) && !D && !ue && !t.weekPicker,\n dp__date_hover_start: I(l, !0),\n dp__date_hover_end: I(l, !1)\n };\n }, se = (l) => ({\n ...Z(l),\n dp__cell_auto_range: q(l),\n dp__cell_auto_range_start: ee(l),\n dp__cell_auto_range_end: z(l)\n }), R = (l) => i.value.enabled ? i.value.autoRange ? se(l) : t.modelAuto ? { ...oe(l), ...Z(l) } : t.weekPicker ? Y(l) : Z(l) : t.weekPicker ? $(l) : oe(l);\n return {\n setHoverDate: m,\n clearHoverDate: P,\n getDayClassData: (l) => t.hideOffsetDates && !l.current ? {} : {\n ...T(l),\n ...R(l),\n [t.dayClass ? t.dayClass(l.value, t.internalModelValue) : \"\"]: !0,\n ...n.value.calendarCell ?? {}\n }\n };\n}, Tt = (e) => {\n const { defaultedFilters: t, defaultedRange: r, propDates: a, defaultedMultiDates: n } = _e(e), u = (v) => a.value.disabledDates ? typeof a.value.disabledDates == \"function\" ? a.value.disabledDates(j(v)) : !!ca(v, a.value.disabledDates) : !1, d = (v) => a.value.maxDate ? e.yearPicker ? ye(v) > ye(a.value.maxDate) : Ee(v, a.value.maxDate) : !1, y = (v) => a.value.minDate ? e.yearPicker ? ye(v) < ye(a.value.minDate) : Ye(v, a.value.minDate) : !1, i = (v) => {\n const L = d(v), ne = y(v), p = u(v), T = t.value.months.map((Z) => +Z).includes($e(v)), oe = e.disabledWeekDays.length ? e.disabledWeekDays.some((Z) => +Z === yl(v)) : !1, $ = P(v), Y = ye(v), g = Y < +e.yearRange[0] || Y > +e.yearRange[1];\n return !(L || ne || p || T || g || oe || $);\n }, _ = (v, L) => Ye(...wt(a.value.minDate, v, L)) || Ae(...wt(a.value.minDate, v, L)), c = (v, L) => Ee(...wt(a.value.maxDate, v, L)) || Ae(...wt(a.value.maxDate, v, L)), C = (v, L, ne) => {\n let p = !1;\n return a.value.maxDate && ne && c(v, L) && (p = !0), a.value.minDate && !ne && _(v, L) && (p = !0), p;\n }, m = (v, L, ne, p) => {\n let W = !1;\n return p && (a.value.minDate || a.value.maxDate) ? a.value.minDate && a.value.maxDate ? W = C(v, L, ne) : (a.value.minDate && _(v, L) || a.value.maxDate && c(v, L)) && (W = !0) : W = !0, W;\n }, P = (v) => Array.isArray(a.value.allowedDates) && !a.value.allowedDates.length ? !0 : a.value.allowedDates ? !ca(v, a.value.allowedDates) : !1, U = (v) => !i(v), N = (v) => r.value.noDisabledRange ? !hn({ start: v[0], end: v[1] }).some((ne) => U(ne)) : !0, H = (v) => {\n if (v) {\n const L = ye(v);\n return L >= +e.yearRange[0] && L <= e.yearRange[1];\n }\n return !0;\n }, f = (v, L) => !!(Array.isArray(v) && v[L] && (r.value.maxRange || r.value.minRange) && H(v[L])), I = (v, L, ne = 0) => {\n if (f(L, ne) && H(v)) {\n const p = gl(v, L[ne]), W = Yn(L[ne], v), T = W.length === 1 ? 0 : W.filter(($) => U($)).length, oe = Math.abs(p) - (r.value.minMaxRawRange ? 0 : T);\n if (r.value.minRange && r.value.maxRange)\n return oe >= +r.value.minRange && oe <= +r.value.maxRange;\n if (r.value.minRange) return oe >= +r.value.minRange;\n if (r.value.maxRange) return oe <= +r.value.maxRange;\n }\n return !0;\n }, k = () => !e.enableTimePicker || e.monthPicker || e.yearPicker || e.ignoreTimeValidation, z = (v) => Array.isArray(v) ? [v[0] ? Ca(v[0]) : null, v[1] ? Ca(v[1]) : null] : Ca(v), q = (v, L, ne) => v.find(\n (p) => +p.hours === ht(L) && p.minutes === \"*\" ? !0 : +p.minutes === $t(L) && +p.hours === ht(L)\n ) && ne, ee = (v, L, ne) => {\n const [p, W] = v, [T, oe] = L;\n return !q(p, T, ne) && !q(W, oe, ne) && ne;\n }, x = (v, L) => {\n const ne = Array.isArray(L) ? L : [L];\n return Array.isArray(e.disabledTimes) ? Array.isArray(e.disabledTimes[0]) ? ee(e.disabledTimes, ne, v) : !ne.some((p) => q(e.disabledTimes, p, v)) : v;\n }, S = (v, L) => {\n const ne = Array.isArray(L) ? [Ct(L[0]), L[1] ? Ct(L[1]) : void 0] : Ct(L), p = !e.disabledTimes(ne);\n return v && p;\n }, X = (v, L) => e.disabledTimes ? Array.isArray(e.disabledTimes) ? x(L, v) : S(L, v) : L, O = (v) => {\n let L = !0;\n if (!v || k()) return !0;\n const ne = !a.value.minDate && !a.value.maxDate ? z(v) : v;\n return (e.maxTime || a.value.maxDate) && (L = fn(\n e.maxTime,\n a.value.maxDate,\n \"max\",\n Ne(ne),\n L\n )), (e.minTime || a.value.minDate) && (L = fn(\n e.minTime,\n a.value.minDate,\n \"min\",\n Ne(ne),\n L\n )), X(v, L);\n }, K = (v) => {\n if (!e.monthPicker) return !0;\n let L = !0;\n const ne = j(dt(v));\n if (a.value.minDate && a.value.maxDate) {\n const p = j(dt(a.value.minDate)), W = j(dt(a.value.maxDate));\n return Ee(ne, p) && Ye(ne, W) || Ae(ne, p) || Ae(ne, W);\n }\n if (a.value.minDate) {\n const p = j(dt(a.value.minDate));\n L = Ee(ne, p) || Ae(ne, p);\n }\n if (a.value.maxDate) {\n const p = j(dt(a.value.maxDate));\n L = Ye(ne, p) || Ae(ne, p);\n }\n return L;\n }, fe = Q(() => (v) => !e.enableTimePicker || e.ignoreTimeValidation ? !0 : O(v)), me = Q(() => (v) => e.monthPicker ? Array.isArray(v) && (r.value.enabled || n.value.enabled) ? !v.filter((ne) => !K(ne)).length : K(v) : !0);\n return {\n isDisabled: U,\n validateDate: i,\n validateMonthYearInRange: m,\n isDateRangeAllowed: N,\n checkMinMaxRange: I,\n isValidTime: O,\n isTimeValid: fe,\n isMonthValid: me\n };\n}, ya = () => {\n const e = Q(() => (a, n) => a == null ? void 0 : a.includes(n)), t = Q(() => (a, n) => a.count ? a.solo ? !0 : n === 0 : !0), r = Q(() => (a, n) => a.count ? a.solo ? !0 : n === a.count - 1 : !0);\n return { hideNavigationButtons: e, showLeftIcon: t, showRightIcon: r };\n}, vo = (e, t, r) => {\n const a = te(0), n = Zt({\n [Rt.timePicker]: !e.enableTimePicker || e.timePicker || e.monthPicker,\n [Rt.calendar]: !1,\n [Rt.header]: !1\n }), u = Q(() => e.monthPicker || e.timePicker), d = (C) => {\n var m;\n if ((m = e.flow) != null && m.length) {\n if (!C && u.value) return c();\n n[C] = !0, Object.keys(n).filter((P) => !n[P]).length || c();\n }\n }, y = () => {\n var C, m;\n (C = e.flow) != null && C.length && a.value !== -1 && (a.value += 1, t(\"flow-step\", a.value), c()), ((m = e.flow) == null ? void 0 : m.length) === a.value && nt().then(() => i());\n }, i = () => {\n a.value = -1;\n }, _ = (C, m, ...P) => {\n var U, N;\n e.flow[a.value] === C && r.value && ((N = (U = r.value)[m]) == null || N.call(U, ...P));\n }, c = (C = 0) => {\n C && (a.value += C), _(Ge.month, \"toggleMonthPicker\", !0), _(Ge.year, \"toggleYearPicker\", !0), _(Ge.calendar, \"toggleTimePicker\", !1, !0), _(Ge.time, \"toggleTimePicker\", !0, !0);\n const m = e.flow[a.value];\n (m === Ge.hours || m === Ge.minutes || m === Ge.seconds) && _(m, \"toggleTimePicker\", !0, !0, m);\n };\n return { childMount: d, updateFlowStep: y, resetFlow: i, handleFlow: c, flowStep: a };\n}, mo = {\n key: 1,\n class: \"dp__input_wrap\"\n}, po = [\"id\", \"name\", \"inputmode\", \"placeholder\", \"disabled\", \"readonly\", \"required\", \"value\", \"autocomplete\", \"aria-label\", \"aria-disabled\", \"aria-invalid\"], yo = {\n key: 2,\n class: \"dp--clear-btn\"\n}, go = [\"aria-label\"], ho = /* @__PURE__ */ Ve({\n compatConfig: {\n MODE: 3\n },\n __name: \"DatepickerInput\",\n props: {\n isMenuOpen: { type: Boolean, default: !1 },\n inputValue: { type: String, default: \"\" },\n ...va\n },\n emits: [\n \"clear\",\n \"open\",\n \"update:input-value\",\n \"set-input-date\",\n \"close\",\n \"select-date\",\n \"set-empty-date\",\n \"toggle\",\n \"focus-prev\",\n \"focus\",\n \"blur\",\n \"real-blur\",\n \"text-input\"\n ],\n setup(e, { expose: t, emit: r }) {\n const a = r, n = e, {\n defaultedTextInput: u,\n defaultedAriaLabels: d,\n defaultedInline: y,\n defaultedConfig: i,\n defaultedRange: _,\n defaultedMultiDates: c,\n defaultedUI: C,\n getDefaultPattern: m,\n getDefaultStartTime: P\n } = _e(n), { checkMinMaxRange: U } = Tt(n), N = te(), H = te(null), f = te(!1), I = te(!1), k = Q(\n () => ({\n dp__pointer: !n.disabled && !n.readonly && !u.value.enabled,\n dp__disabled: n.disabled,\n dp__input_readonly: !u.value.enabled,\n dp__input: !0,\n dp__input_icon_pad: !n.hideInputIcon,\n dp__input_valid: typeof n.state == \"boolean\" ? n.state : !1,\n dp__input_invalid: typeof n.state == \"boolean\" ? !n.state : !1,\n dp__input_focus: f.value || n.isMenuOpen,\n dp__input_reg: !u.value.enabled,\n ...C.value.input ?? {}\n })\n ), z = () => {\n a(\"set-input-date\", null), n.clearable && n.autoApply && (a(\"set-empty-date\"), N.value = null);\n }, q = ($) => {\n const Y = P();\n return Bl(\n $,\n u.value.format ?? m(),\n Y ?? In({}, n.enableSeconds),\n n.inputValue,\n I.value,\n n.formatLocale\n );\n }, ee = ($) => {\n const { rangeSeparator: Y } = u.value, [g, Z] = $.split(`${Y}`);\n if (g) {\n const se = q(g.trim()), R = Z ? q(Z.trim()) : null;\n if (Ot(se, R)) return;\n const ae = se && R ? [se, R] : [se];\n U(R, ae, 0) && (N.value = se ? ae : null);\n }\n }, x = () => {\n I.value = !0;\n }, S = ($) => {\n if (_.value.enabled)\n ee($);\n else if (c.value.enabled) {\n const Y = $.split(\";\");\n N.value = Y.map((g) => q(g.trim())).filter((g) => g);\n } else\n N.value = q($);\n }, X = ($) => {\n var g;\n const Y = typeof $ == \"string\" ? $ : (g = $.target) == null ? void 0 : g.value;\n Y !== \"\" ? (u.value.openMenu && !n.isMenuOpen && a(\"open\"), S(Y), a(\"set-input-date\", N.value)) : z(), I.value = !1, a(\"update:input-value\", Y), a(\"text-input\", $, N.value);\n }, O = ($) => {\n u.value.enabled ? (S($.target.value), u.value.enterSubmit && za(N.value) && n.inputValue !== \"\" ? (a(\"set-input-date\", N.value, !0), N.value = null) : u.value.enterSubmit && n.inputValue === \"\" && (N.value = null, a(\"clear\"))) : me($);\n }, K = ($, Y) => {\n u.value.enabled && u.value.tabSubmit && !Y && S($.target.value), u.value.tabSubmit && za(N.value) && n.inputValue !== \"\" ? (a(\"set-input-date\", N.value, !0, !0), N.value = null) : u.value.tabSubmit && n.inputValue === \"\" && (N.value = null, a(\"clear\", !0));\n }, fe = () => {\n f.value = !0, a(\"focus\"), nt().then(() => {\n var $;\n u.value.enabled && u.value.selectOnFocus && (($ = H.value) == null || $.select());\n });\n }, me = ($) => {\n if (Dt($, i.value, !0), u.value.enabled && u.value.openMenu && !y.value.input) {\n if (u.value.openMenu === \"open\" && !n.isMenuOpen) return a(\"open\");\n if (u.value.openMenu === \"toggle\") return a(\"toggle\");\n } else u.value.enabled || a(\"toggle\");\n }, v = () => {\n a(\"real-blur\"), f.value = !1, (!n.isMenuOpen || y.value.enabled && y.value.input) && a(\"blur\"), n.autoApply && u.value.enabled && N.value && !n.isMenuOpen && (a(\"set-input-date\", N.value), a(\"select-date\"), N.value = null);\n }, L = ($) => {\n Dt($, i.value, !0), a(\"clear\");\n }, ne = () => {\n a(\"close\");\n }, p = ($) => {\n if ($.key === \"Tab\" && K($), $.key === \"Enter\" && O($), $.key === \"Escape\" && u.value.escClose && ne(), !u.value.enabled) {\n if ($.code === \"Tab\") return;\n $.preventDefault();\n }\n }, W = () => {\n var $;\n ($ = H.value) == null || $.focus({ preventScroll: !0 });\n }, T = ($) => {\n N.value = $;\n }, oe = ($) => {\n $.key === Oe.tab && K($, !0);\n };\n return t({\n focusInput: W,\n setParsedDate: T\n }), ($, Y) => {\n var g, Z, se;\n return A(), V(\"div\", { onClick: me }, [\n $.$slots.trigger && !$.$slots[\"dp-input\"] && !s(y).enabled ? de($.$slots, \"trigger\", { key: 0 }) : J(\"\", !0),\n !$.$slots.trigger && (!s(y).enabled || s(y).input) ? (A(), V(\"div\", mo, [\n $.$slots[\"dp-input\"] && !$.$slots.trigger && (!s(y).enabled || s(y).enabled && s(y).input) ? de($.$slots, \"dp-input\", {\n key: 0,\n value: e.inputValue,\n isMenuOpen: e.isMenuOpen,\n onInput: X,\n onEnter: O,\n onTab: K,\n onClear: L,\n onBlur: v,\n onKeypress: p,\n onPaste: x,\n onFocus: fe,\n openMenu: () => $.$emit(\"open\"),\n closeMenu: () => $.$emit(\"close\"),\n toggleMenu: () => $.$emit(\"toggle\")\n }) : J(\"\", !0),\n $.$slots[\"dp-input\"] ? J(\"\", !0) : (A(), V(\"input\", {\n key: 1,\n id: $.uid ? `dp-input-${$.uid}` : void 0,\n ref_key: \"inputRef\",\n ref: H,\n \"data-test-id\": \"dp-input\",\n name: $.name,\n class: De(k.value),\n inputmode: s(u).enabled ? \"text\" : \"none\",\n placeholder: $.placeholder,\n disabled: $.disabled,\n readonly: $.readonly,\n required: $.required,\n value: e.inputValue,\n autocomplete: $.autocomplete,\n \"aria-label\": (g = s(d)) == null ? void 0 : g.input,\n \"aria-disabled\": $.disabled || void 0,\n \"aria-invalid\": $.state === !1 ? !0 : void 0,\n onInput: X,\n onBlur: v,\n onFocus: fe,\n onKeypress: p,\n onKeydown: Y[0] || (Y[0] = (R) => p(R)),\n onPaste: x\n }, null, 42, po)),\n ge(\"div\", {\n onClick: Y[3] || (Y[3] = (R) => a(\"toggle\"))\n }, [\n $.$slots[\"input-icon\"] && !$.hideInputIcon ? (A(), V(\"span\", {\n key: 0,\n class: \"dp__input_icon\",\n onClick: Y[1] || (Y[1] = (R) => a(\"toggle\"))\n }, [\n de($.$slots, \"input-icon\")\n ])) : J(\"\", !0),\n !$.$slots[\"input-icon\"] && !$.hideInputIcon && !$.$slots[\"dp-input\"] ? (A(), Te(s(Wt), {\n key: 1,\n \"aria-label\": (Z = s(d)) == null ? void 0 : Z.calendarIcon,\n class: \"dp__input_icon dp__input_icons\",\n onClick: Y[2] || (Y[2] = (R) => a(\"toggle\"))\n }, null, 8, [\"aria-label\"])) : J(\"\", !0)\n ]),\n $.$slots[\"clear-icon\"] && ($.alwaysClearable || e.inputValue && $.clearable && !$.disabled && !$.readonly) ? (A(), V(\"span\", yo, [\n de($.$slots, \"clear-icon\", { clear: L })\n ])) : J(\"\", !0),\n !$.$slots[\"clear-icon\"] && ($.alwaysClearable || $.clearable && e.inputValue && !$.disabled && !$.readonly) ? (A(), V(\"button\", {\n key: 3,\n \"aria-label\": (se = s(d)) == null ? void 0 : se.clearInput,\n class: \"dp--clear-btn\",\n type: \"button\",\n onKeydown: Y[4] || (Y[4] = (R) => s(Ze)(R, () => L(R), !0, oe)),\n onClick: Y[5] || (Y[5] = Qt((R) => L(R), [\"prevent\"]))\n }, [\n at(s(Tn), {\n class: \"dp__input_icons\",\n \"data-test-id\": \"clear-icon\"\n })\n ], 40, go)) : J(\"\", !0)\n ])) : J(\"\", !0)\n ]);\n };\n }\n}), bo = typeof window < \"u\" ? window : void 0, Ea = () => {\n}, ko = (e) => el() ? (tl(e), !0) : !1, wo = (e, t, r, a) => {\n if (!e) return Ea;\n let n = Ea;\n const u = ot(\n () => s(e),\n (y) => {\n n(), y && (y.addEventListener(t, r, a), n = () => {\n y.removeEventListener(t, r, a), n = Ea;\n });\n },\n { immediate: !0, flush: \"post\" }\n ), d = () => {\n u(), n();\n };\n return ko(d), d;\n}, Do = (e, t, r, a = {}) => {\n const { window: n = bo, event: u = \"pointerdown\" } = a;\n return n ? wo(n, u, (y) => {\n const i = Le(e), _ = Le(t);\n !i || !_ || i === y.target || y.composedPath().includes(i) || y.composedPath().includes(_) || r(y);\n }, { passive: !0 }) : void 0;\n}, Mo = [\"data-dp-mobile\"], $o = /* @__PURE__ */ Ve({\n compatConfig: {\n MODE: 3\n },\n __name: \"VueDatePicker\",\n props: {\n ...va\n },\n emits: [\n \"update:model-value\",\n \"update:model-timezone-value\",\n \"text-submit\",\n \"closed\",\n \"cleared\",\n \"open\",\n \"focus\",\n \"blur\",\n \"internal-model-change\",\n \"recalculate-position\",\n \"flow-step\",\n \"update-month-year\",\n \"invalid-select\",\n \"invalid-fixed-range\",\n \"tooltip-open\",\n \"tooltip-close\",\n \"time-picker-open\",\n \"time-picker-close\",\n \"am-pm-change\",\n \"range-start\",\n \"range-end\",\n \"date-update\",\n \"invalid-date\",\n \"overlay-toggle\",\n \"text-input\"\n ],\n setup(e, { expose: t, emit: r }) {\n const a = r, n = e, u = Bt(), d = te(!1), y = Gt(n, \"modelValue\"), i = Gt(n, \"timezone\"), _ = te(null), c = te(null), C = te(null), m = te(!1), P = te(null), U = te(!1), N = te(!1), H = te(!1), f = te(!1), { setMenuFocused: I, setShiftKey: k } = Ln(), { clearArrowNav: z } = At(), { validateDate: q, isValidTime: ee } = Tt(n), {\n defaultedTransitions: x,\n defaultedTextInput: S,\n defaultedInline: X,\n defaultedConfig: O,\n defaultedRange: K,\n defaultedMultiDates: fe\n } = _e(n), { menuTransition: me, showTransition: v } = ta(x), { isMobile: L } = Kn(O);\n je(() => {\n R(n.modelValue), nt().then(() => {\n if (!X.value.enabled) {\n const w = Y(P.value);\n w == null || w.addEventListener(\"scroll\", E), window == null || window.addEventListener(\"resize\", ce);\n }\n }), X.value.enabled && (d.value = !0), window == null || window.addEventListener(\"keyup\", B), window == null || window.addEventListener(\"keydown\", Me);\n }), xt(() => {\n if (!X.value.enabled) {\n const w = Y(P.value);\n w == null || w.removeEventListener(\"scroll\", E), window == null || window.removeEventListener(\"resize\", ce);\n }\n window == null || window.removeEventListener(\"keyup\", B), window == null || window.removeEventListener(\"keydown\", Me);\n });\n const ne = tt(u, \"all\", n.presetDates), p = tt(u, \"input\");\n ot(\n [y, i],\n () => {\n R(y.value);\n },\n { deep: !0 }\n );\n const { openOnTop: W, menuStyle: T, xCorrect: oe, setMenuPosition: $, getScrollableParent: Y, shadowRender: g } = uo({\n menuRef: _,\n menuRefInner: c,\n inputRef: C,\n pickerWrapperRef: P,\n inline: X,\n emit: a,\n props: n,\n slots: u\n }), {\n inputValue: Z,\n internalModelValue: se,\n parseExternalModelValue: R,\n emitModelValue: ae,\n formatInputValue: l,\n checkBeforeEmit: D\n } = nr(a, n, m), ue = Q(\n () => ({\n dp__main: !0,\n dp__theme_dark: n.dark,\n dp__theme_light: !n.dark,\n dp__flex_display: X.value.enabled,\n \"dp--flex-display-collapsed\": H.value,\n dp__flex_display_with_input: X.value.input\n })\n ), M = Q(() => n.dark ? \"dp__theme_dark\" : \"dp__theme_light\"), he = Q(() => n.teleport ? {\n to: typeof n.teleport == \"boolean\" ? \"body\" : n.teleport,\n disabled: !n.teleport || X.value.enabled\n } : {}), pe = Q(() => ({ class: \"dp__outer_menu_wrap\" })), re = Q(() => X.value.enabled && (n.timePicker || n.monthPicker || n.yearPicker || n.quarterPicker)), o = () => {\n var w, G;\n return ((G = (w = C.value) == null ? void 0 : w.$el) == null ? void 0 : G.getBoundingClientRect()) ?? { width: 0, left: 0, right: 0 };\n }, E = () => {\n d.value && (O.value.closeOnScroll ? Ue() : $());\n }, ce = () => {\n var G;\n d.value && $();\n const w = ((G = c.value) == null ? void 0 : G.$el.getBoundingClientRect().width) ?? 0;\n H.value = document.body.offsetWidth <= w;\n }, B = (w) => {\n w.key === \"Tab\" && !X.value.enabled && !n.teleport && O.value.tabOutClosesMenu && (P.value.contains(document.activeElement) || Ue()), N.value = w.shiftKey;\n }, Me = (w) => {\n N.value = w.shiftKey;\n }, be = () => {\n !n.disabled && !n.readonly && (g(gn, n), $(!1), d.value = !0, d.value && a(\"open\"), d.value || ve(), R(n.modelValue));\n }, Se = () => {\n var w, G;\n Z.value = \"\", ve(), (w = c.value) == null || w.onValueCleared(), (G = C.value) == null || G.setParsedDate(null), a(\"update:model-value\", null), a(\"update:model-timezone-value\", null), a(\"cleared\"), O.value.closeOnClearValue && Ue();\n }, b = () => {\n const w = se.value;\n return !w || !Array.isArray(w) && q(w) ? !0 : Array.isArray(w) ? fe.value.enabled || w.length === 2 && q(w[0]) && q(w[1]) ? !0 : K.value.partialRange && !n.timePicker ? q(w[0]) : !1 : !1;\n }, F = () => {\n D() && b() ? (ae(), Ue()) : a(\"invalid-select\", se.value);\n }, Re = (w) => {\n Fe(), ae(), O.value.closeOnAutoApply && !w && Ue();\n }, Fe = () => {\n C.value && S.value.enabled && C.value.setParsedDate(se.value);\n }, mt = (w = !1) => {\n n.autoApply && ee(se.value) && b() && (K.value.enabled && Array.isArray(se.value) ? (K.value.partialRange || se.value.length === 2) && Re(w) : Re(w));\n }, ve = () => {\n S.value.enabled || (se.value = null);\n }, Ue = (w = !1) => {\n w && se.value && O.value.setDateOnMenuClose && F(), X.value.enabled || (d.value && (d.value = !1, oe.value = !1, I(!1), k(!1), z(), a(\"closed\"), Z.value && R(y.value)), ve(), a(\"blur\"));\n }, lt = (w, G, ie = !1) => {\n if (!w) {\n se.value = null;\n return;\n }\n const Xe = Array.isArray(w) ? !w.some((_t) => !q(_t)) : q(w), st = ee(w);\n Xe && st ? (f.value = !0, se.value = w, G && (U.value = ie, F(), a(\"text-submit\")), nt().then(() => {\n f.value = !1;\n })) : a(\"invalid-date\", w);\n }, ga = () => {\n n.autoApply && ee(se.value) && ae(), Fe();\n }, na = () => d.value ? Ue() : be(), ha = (w) => {\n se.value = w;\n }, ba = () => {\n S.value.enabled && (m.value = !0, l()), a(\"focus\");\n }, ka = () => {\n if (S.value.enabled && (m.value = !1, R(n.modelValue), U.value)) {\n const w = Pl(P.value, N.value);\n w == null || w.focus();\n }\n a(\"blur\");\n }, wa = (w) => {\n c.value && c.value.updateMonthYear(0, {\n month: un(w.month),\n year: un(w.year)\n });\n }, Da = (w) => {\n R(w ?? n.modelValue);\n }, Ma = (w, G) => {\n var ie;\n (ie = c.value) == null || ie.switchView(w, G);\n }, tn = (w, G) => O.value.onClickOutside ? O.value.onClickOutside(w, G) : Ue(!0), h = (w = 0) => {\n var G;\n (G = c.value) == null || G.handleFlow(w);\n }, le = () => _;\n return Do(\n _,\n C,\n (w) => tn(b, w)\n ), t({\n closeMenu: Ue,\n selectDate: F,\n clearValue: Se,\n openMenu: be,\n onScroll: E,\n formatInputValue: l,\n // exposed for testing purposes\n updateInternalModelValue: ha,\n // modify internal modelValue\n setMonthYear: wa,\n parseModel: Da,\n switchView: Ma,\n toggleMenu: na,\n handleFlow: h,\n getDpWrapMenuRef: le\n }), (w, G) => (A(), V(\"div\", {\n ref_key: \"pickerWrapperRef\",\n ref: P,\n class: De(ue.value),\n \"data-datepicker-instance\": \"\",\n \"data-dp-mobile\": s(L)\n }, [\n at(ho, He({\n ref_key: \"inputRef\",\n ref: C,\n \"input-value\": s(Z),\n \"onUpdate:inputValue\": G[0] || (G[0] = (ie) => nn(Z) ? Z.value = ie : null),\n \"is-menu-open\": d.value\n }, w.$props, {\n onClear: Se,\n onOpen: be,\n onSetInputDate: lt,\n onSetEmptyDate: s(ae),\n onSelectDate: F,\n onToggle: na,\n onClose: Ue,\n onFocus: ba,\n onBlur: ka,\n onRealBlur: G[1] || (G[1] = (ie) => m.value = !1),\n onTextInput: G[2] || (G[2] = (ie) => w.$emit(\"text-input\", ie))\n }), qe({ _: 2 }, [\n Be(s(p), (ie, Xe) => ({\n name: ie,\n fn: we((st) => [\n de(w.$slots, ie, ze(xe(st)))\n ])\n }))\n ]), 1040, [\"input-value\", \"is-menu-open\", \"onSetEmptyDate\"]),\n (A(), Te(fa(w.teleport ? al : \"div\"), ze(xe(he.value)), {\n default: we(() => [\n at(Ut, {\n name: s(me)(s(W)),\n css: s(v) && !s(X).enabled\n }, {\n default: we(() => [\n d.value ? (A(), V(\"div\", He({\n key: 0,\n ref_key: \"dpWrapMenuRef\",\n ref: _\n }, pe.value, {\n class: { \"dp--menu-wrapper\": !s(X).enabled },\n style: s(X).enabled ? void 0 : s(T)\n }), [\n at(gn, He({\n ref_key: \"dpMenuRef\",\n ref: c\n }, w.$props, {\n \"internal-model-value\": s(se),\n \"onUpdate:internalModelValue\": G[3] || (G[3] = (ie) => nn(se) ? se.value = ie : null),\n class: { [M.value]: !0, \"dp--menu-wrapper\": w.teleport },\n \"open-on-top\": s(W),\n \"no-overlay-focus\": re.value,\n collapse: H.value,\n \"get-input-rect\": o,\n \"is-text-input-date\": f.value,\n onClosePicker: Ue,\n onSelectDate: F,\n onAutoApply: mt,\n onTimeUpdate: ga,\n onFlowStep: G[4] || (G[4] = (ie) => w.$emit(\"flow-step\", ie)),\n onUpdateMonthYear: G[5] || (G[5] = (ie) => w.$emit(\"update-month-year\", ie)),\n onInvalidSelect: G[6] || (G[6] = (ie) => w.$emit(\"invalid-select\", s(se))),\n onAutoApplyInvalid: G[7] || (G[7] = (ie) => w.$emit(\"invalid-select\", ie)),\n onInvalidFixedRange: G[8] || (G[8] = (ie) => w.$emit(\"invalid-fixed-range\", ie)),\n onRecalculatePosition: s($),\n onTooltipOpen: G[9] || (G[9] = (ie) => w.$emit(\"tooltip-open\", ie)),\n onTooltipClose: G[10] || (G[10] = (ie) => w.$emit(\"tooltip-close\", ie)),\n onTimePickerOpen: G[11] || (G[11] = (ie) => w.$emit(\"time-picker-open\", ie)),\n onTimePickerClose: G[12] || (G[12] = (ie) => w.$emit(\"time-picker-close\", ie)),\n onAmPmChange: G[13] || (G[13] = (ie) => w.$emit(\"am-pm-change\", ie)),\n onRangeStart: G[14] || (G[14] = (ie) => w.$emit(\"range-start\", ie)),\n onRangeEnd: G[15] || (G[15] = (ie) => w.$emit(\"range-end\", ie)),\n onDateUpdate: G[16] || (G[16] = (ie) => w.$emit(\"date-update\", ie)),\n onInvalidDate: G[17] || (G[17] = (ie) => w.$emit(\"invalid-date\", ie)),\n onOverlayToggle: G[18] || (G[18] = (ie) => w.$emit(\"overlay-toggle\", ie)),\n onMenuBlur: G[19] || (G[19] = (ie) => w.$emit(\"blur\"))\n }), qe({ _: 2 }, [\n Be(s(ne), (ie, Xe) => ({\n name: ie,\n fn: we((st) => [\n de(w.$slots, ie, ze(xe({ ...st })))\n ])\n }))\n ]), 1040, [\"internal-model-value\", \"class\", \"open-on-top\", \"no-overlay-focus\", \"collapse\", \"is-text-input-date\", \"onRecalculatePosition\"])\n ], 16)) : J(\"\", !0)\n ]),\n _: 3\n }, 8, [\"name\", \"css\"])\n ]),\n _: 3\n }, 16))\n ], 10, Mo));\n }\n}), Gn = /* @__PURE__ */ (() => {\n const e = $o;\n return e.install = (t) => {\n t.component(\"Vue3DatePicker\", e);\n }, e;\n})(), Ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n default: Gn\n}, Symbol.toStringTag, { value: \"Module\" }));\nObject.entries(Ao).forEach(([e, t]) => {\n e !== \"default\" && (Gn[e] = t);\n});\nexport {\n Gn as default\n};\n","// peer dep is not installed during test\n// eslint-disable-next-line import/no-unresolved\nimport { h as createElement } from 'vue';\n\n/** @type Record> */\nconst cache = {};\n\n/**\n * Remove false attrs\n * @param {Object} attrs\n */\nfunction filterAttrs(attrs) {\n return Object.keys(attrs).reduce((result, key) => {\n if (attrs[key] !== false && attrs[key] !== null && attrs[key] !== undefined) {\n result[key] = attrs[key];\n }\n return result;\n }, {});\n}\n\nconst InlineSvg = {\n name: 'InlineSvg',\n inheritAttrs: false,\n render() {\n if (!this.svgElSource) {\n return null;\n }\n return createElement(\n 'svg',\n Object.assign(\n {},\n // source attrs\n this.getSvgAttrs(this.svgElSource),\n // component attrs and listeners\n filterAttrs(this.$attrs),\n // content\n { innerHTML: this.getSvgContent(this.svgElSource) },\n ),\n );\n },\n props: {\n src: {\n type: String,\n required: true,\n },\n title: {\n type: String,\n },\n transformSource: {\n type: Function,\n default: (svg) => svg,\n },\n keepDuringLoading: {\n type: Boolean,\n default: true,\n },\n },\n emits: ['loaded', 'unloaded', 'error'],\n data() {\n return {\n /** @type SVGElement */\n svgElSource: null,\n };\n },\n watch: {\n src(newValue) {\n // re-generate cached svg (`svgElSource`)\n this.getSource(newValue);\n },\n },\n mounted() {\n // generate `svgElSource`\n this.getSource(this.src);\n },\n methods: {\n getSvgAttrs(svgEl) {\n // copy attrs\n let svgAttrs = {};\n const attrs = svgEl.attributes;\n if (!attrs) {\n return svgAttrs;\n }\n for (let i = attrs.length - 1; i >= 0; i--) {\n svgAttrs[attrs[i].name] = attrs[i].value;\n }\n return svgAttrs;\n },\n getSvgContent(svgEl) {\n svgEl = svgEl.cloneNode(true);\n svgEl = this.transformSource(svgEl);\n if (this.title) {\n setTitle(svgEl, this.title);\n }\n\n // copy inner html\n return svgEl.innerHTML;\n },\n /**\n * Get svgElSource\n * @param {string} src\n */\n getSource(src) {\n // fill cache by src with promise\n if (!cache[src]) {\n // download\n cache[src] = this.download(src);\n }\n // notify svg is unloaded\n if (this.svgElSource && cache[src].getIsPending() && !this.keepDuringLoading) {\n this.svgElSource = null;\n this.$emit('unloaded');\n }\n\n // inline svg when cached promise resolves\n cache[src]\n .then((svg) => {\n this.svgElSource = svg;\n // wait to render\n this.$nextTick(() => {\n // notify\n this.$emit('loaded', this.$el);\n });\n })\n .catch((err) => {\n // notify svg is unloaded\n if (this.svgElSource) {\n this.svgElSource = null;\n this.$emit('unloaded');\n }\n // remove cached rejected promise so next image can try load again\n delete cache[src];\n this.$emit('error', err);\n });\n },\n\n /**\n * Get the contents of the SVG\n * @param {string} url\n * @returns {PromiseWithState}\n */\n download(url) {\n return makePromiseState(new Promise((resolve, reject) => {\n const request = new XMLHttpRequest();\n request.open('GET', url, true);\n\n request.onload = () => {\n if (request.status >= 200 && request.status < 400) {\n try {\n // Setup a parser to convert the response to text/xml in order for it to be manipulated and changed\n const parser = new DOMParser();\n const result = parser.parseFromString(request.responseText, 'text/xml');\n let svgEl = result.getElementsByTagName('svg')[0];\n if (svgEl) {\n // svgEl = this.transformSource(svgEl);\n resolve(svgEl);\n } else {\n reject(new Error('Loaded file is not valid SVG\"'));\n }\n } catch (e) {\n reject(e);\n }\n } else {\n reject(new Error('Error loading SVG'));\n }\n };\n\n request.onerror = reject;\n request.send();\n }));\n },\n },\n};\n\n/**\n * Create or edit the element of a SVG\n * @param {SVGElement} svg\n * @param {string} title\n */\nfunction setTitle(svg, title) {\n const titleTags = svg.getElementsByTagName('title');\n if (titleTags.length) { // overwrite existing title\n titleTags[0].textContent = title;\n } else { // create a title element if one doesn't already exist\n const titleEl = document.createElementNS('http://www.w3.org/2000/svg', 'title');\n titleEl.textContent = title;\n // svg.prepend(titleEl);\n svg.insertBefore(titleEl, svg.firstChild);\n }\n}\n\n/**\n * @typedef {Promise & object} PromiseWithState\n * @property {function: boolean} getIsPending\n * @template T\n */\n\n/**\n * This function allow you to modify a JS Promise by adding some status properties.\n * @template {any} T\n * @param {Promise<T>|PromiseWithState<T>} promise\n * @return {PromiseWithState<T>}\n */\nfunction makePromiseState(promise) {\n // Don't modify any promise that has been already modified.\n if (promise.getIsPending) return promise;\n\n // Set initial state\n let isPending = true;\n\n // Observe the promise, saving the fulfillment in a closure scope.\n let result = promise.then(\n (v) => {\n isPending = false;\n return v;\n },\n (e) => {\n isPending = false;\n throw e;\n },\n );\n\n result.getIsPending = function getIsPending() { return isPending; };\n return result;\n}\n\nexport default InlineSvg;\n","import { openBlock as n, createBlock as k, resolveDynamicComponent as H, normalizeClass as b, normalizeStyle as m, withCtx as T, createElementBlock as r, Fragment as w, mergeProps as D, createCommentVNode as d, createTextVNode as B, toDisplayString as O, withDirectives as M, renderSlot as g, createElementVNode as f, vShow as I, resolveComponent as P, createSlots as E, createVNode as C, withKeys as y, renderList as L } from \"vue\";\nconst N = [\"src\"], V = [\"src\"], z = [\"src\"], A = [\"src\"], R = [\"src\"], X = { key: 2 }, W = { class: \"vueperslide__content-wrapper\" }, F = [\"innerHTML\"], Y = [\"innerHTML\"], q = { class: \"vueperslide__content-wrapper\" }, K = [\"innerHTML\"], U = [\"innerHTML\"], G = {\n key: 4,\n class: \"vueperslide__loader\"\n};\nfunction J(e, s, i, l, o, t) {\n return n(), k(H(i.link ? \"a\" : \"div\"), {\n class: b([\"vueperslide\", t.slideClasses]),\n href: i.link && !t.justDragged ? i.link : !1,\n target: i.link && i.openInNew ? typeof i.openInNew == \"boolean\" ? \"_blank\" : i.openInNew : \"_self\",\n face: t.slideFace3d,\n style: m(t.slideStyles),\n \"aria-hidden\": t.slides.activeId === e._.uid || t.isSlideVisible ? \"false\" : \"true\",\n onMouseenter: s[0] || (s[0] = (u) => e.$emit(\"mouse-enter\", { slideIndex: t.slideIndex, title: i.title, content: i.content, image: i.image, link: i.link }, e.$el)),\n onMouseleave: s[1] || (s[1] = (u) => e.$emit(\"mouse-leave\"))\n }, {\n default: T(() => [\n t.videoObj ? (n(), r(w, { key: 0 }, [\n t.videoObj.webm || t.videoObj.mp4 ? (n(), r(\"video\", D({\n key: 0,\n class: \"vueperslide__video\",\n width: \"100%\",\n height: \"100%\"\n }, t.videoObj.props || {}), [\n t.videoObj.webm ? (n(), r(\"source\", {\n key: 0,\n src: t.videoObj.webm,\n type: \"video/webm\"\n }, null, 8, N)) : d(\"\", !0),\n t.videoObj.mp4 ? (n(), r(\"source\", {\n key: 1,\n src: t.videoObj.mp4,\n type: \"video/mp4\"\n }, null, 8, V)) : d(\"\", !0),\n t.videoObj.ogv ? (n(), r(\"source\", {\n key: 2,\n src: t.videoObj.ogv,\n type: \"video/ogg\"\n }, null, 8, z)) : d(\"\", !0),\n t.videoObj.avi ? (n(), r(\"source\", {\n key: 3,\n src: t.videoObj.avi,\n type: \"video/avi\"\n }, null, 8, A)) : d(\"\", !0),\n B(O(t.videoObj.alt || \"Sorry, your browser doesn't support embedded videos.\"), 1)\n ], 16)) : t.videoObj.url ? (n(), r(\"iframe\", D({\n key: 1,\n class: \"vueperslide__video\",\n src: t.videoObj.url,\n type: \"text/html\",\n frameborder: \"0\",\n width: \"100%\",\n height: \"100%\"\n }, t.videoObj.props || {}), null, 16, R)) : d(\"\", !0)\n ], 64)) : d(\"\", !0),\n e.imageSrc && t.conf.slideImageInside ? (n(), r(\"div\", {\n key: 1,\n class: \"vueperslide__image\",\n style: m(t.imageStyles)\n }, null, 4)) : d(\"\", !0),\n t.conf.slideContentOutside ? M((n(), r(\"div\", X, [\n g(e.$slots, \"content\", {}, () => [\n f(\"div\", W, [\n i.title ? (n(), r(\"div\", {\n key: 0,\n class: \"vueperslide__title\",\n innerHTML: i.title\n }, null, 8, F)) : d(\"\", !0),\n i.content ? (n(), r(\"div\", {\n key: 1,\n class: \"vueperslide__content\",\n innerHTML: i.content\n }, null, 8, Y)) : d(\"\", !0)\n ])\n ])\n ], 512)), [\n [I, !1]\n ]) : g(e.$slots, \"content\", { key: 3 }, () => [\n f(\"div\", q, [\n i.title ? (n(), r(\"div\", {\n key: 0,\n class: \"vueperslide__title\",\n innerHTML: i.title\n }, null, 8, K)) : d(\"\", !0),\n i.content ? (n(), r(\"div\", {\n key: 1,\n class: \"vueperslide__content\",\n innerHTML: i.content\n }, null, 8, U)) : d(\"\", !0)\n ])\n ]),\n t.conf.lazy && !e.loaded ? (n(), r(\"div\", G, [\n g(e.$slots, \"loader\")\n ])) : d(\"\", !0)\n ]),\n _: 3\n }, 40, [\"href\", \"target\", \"class\", \"face\", \"style\", \"aria-hidden\"]);\n}\nconst j = (e, s) => {\n const i = e.__vccOpts || e;\n for (const [l, o] of s)\n i[l] = o;\n return i;\n}, Q = {\n inject: [\"slides\", \"touch\", \"updateSlide\", \"addClone\", \"addSlide\", \"removeSlide\"],\n props: {\n clone: { type: Boolean },\n image: { type: String, default: \"\" },\n video: { type: [String, Object], default: \"\" },\n title: { type: String, default: \"\" },\n content: { type: String, default: \"\" },\n link: { type: String, default: \"\" },\n duration: { type: Number, default: 0 },\n lazyloaded: { type: Boolean },\n openInNew: { type: [Boolean, String] }\n },\n emits: [\"mouse-enter\", \"mouse-leave\"],\n data: () => ({\n imageSrc: \"\",\n loading: !1,\n loaded: !1\n }),\n computed: {\n conf() {\n return this.$parent.conf;\n },\n slideClasses() {\n return {\n \"vueperslide--active\": this.slides.activeId === this._.uid,\n \"vueperslide--previous-slide\": this.isPreviousSlide,\n \"vueperslide--next-slide\": this.isNextSlide,\n \"vueperslide--visible\": this.isSlideVisible,\n \"vueperslide--loading\": this.conf.lazy && !this.loaded,\n \"vueperslide--has-video\": this.videoObj,\n \"vueperslide--has-image-inside\": this.conf.slideImageInside,\n \"vueperslide--no-pointer-events\": this.videoObj && this.videoObj.pointerEvents === !1\n };\n },\n slideStyles() {\n const { visibleSlides: e, fade: s, slideImageInside: i, gap: l, gapPx: o } = this.conf;\n return {\n ...!i && this.imageSrc && { backgroundImage: `url(\"${this.imageSrc}\")` },\n ...e > 1 && { width: (100 - (l ? l * (e - 1) : 0)) / e + \"%\" },\n ...e > 1 && s && { [this.conf.rtl ? \"right\" : \"left\"]: this.slideIndex % e / e * 100 + \"%\" },\n ...l && { [this.conf.rtl ? \"marginLeft\" : \"marginRight\"]: l + (o ? \"px\" : \"%\") }\n };\n },\n videoObj() {\n if (!this.video)\n return null;\n let e = { url: \"\", alt: \"\", props: { controls: !0 } };\n return typeof this.video == \"object\" ? e = Object.assign(e, this.video) : typeof this.video == \"string\" && (e.url = this.video), e;\n },\n youtubeVideo() {\n return /youtube\\.|youtu\\.be/.test(this.videoObj.url);\n },\n imageStyles() {\n return { ...this.conf.slideImageInside && this.imageSrc && { backgroundImage: `url(\"${this.imageSrc}\")` } };\n },\n slideFace3d() {\n if (!this.conf[\"3d\"])\n return !1;\n const e = [\"front\", \"right\", \"back\", \"left\"], s = (this.slides.current - 1 + this.slidesCount) % this.slidesCount, i = (this.slides.current + 1) % this.slidesCount;\n let l = \"front\";\n return this.slideIndex === s ? l = e[(4 + this.slides.current - 1) % 4] : this.slideIndex === i && (l = e[(this.slides.current + 1) % 4]), l = e[this.slideIndex % 4], this.conf.rtl && l === \"left\" ? l = \"right\" : this.conf.rtl && l === \"right\" && (l = \"left\"), l;\n },\n isPreviousSlide() {\n if (!this.conf[\"3d\"])\n return !1;\n const e = (this.slides.current - 1 + this.slidesCount) % this.slidesCount;\n return this._.uid === this.slides.list[e].id;\n },\n isNextSlide() {\n if (!this.conf[\"3d\"])\n return !1;\n const e = (this.slides.current + 1) % this.slidesCount;\n return this._.uid === this.slides.list[e].id;\n },\n isSlideVisible() {\n return this.slideIndex >= this.slides.firstVisible && this.slideIndex < this.slides.firstVisible + this.conf.visibleSlides;\n },\n slidesList() {\n return this.slides.list.map((e) => e.id);\n },\n slidesCount() {\n return this.slidesList.length;\n },\n slideIndex() {\n return this.slidesList.indexOf(this._.uid);\n },\n justDragged() {\n return this.touch.justDragged;\n }\n },\n methods: {\n updateThisSlide(e) {\n this.updateSlide(this._.uid, e);\n },\n loadImage() {\n if (!(this.loading || this.loaded))\n return this.loading = !0, new Promise((e, s) => {\n const i = document.createElement(\"img\");\n i.onload = () => {\n this.imageSrc = this.image, this.loading = !1, this.loaded = !0, this.$nextTick(() => {\n e({ image: this.imageSrc, style: ((this.$el.attributes || {}).style || {}).value });\n });\n }, i.onerror = (this.loading = !1) || s, i.src = this.image;\n });\n },\n playVideo() {\n !this.videoObj || (this.videoObj.url ? this.$el.querySelector(\"iframe\").contentWindow.postMessage('{\"event\":\"command\",\"func\":\"playVideo\",\"args\":\"\"}', \"*\") : this.$el.querySelector(\"video\").play());\n },\n pauseVideo() {\n !this.videoObj || (this.videoObj.url ? this.$el.querySelector(\"iframe\").contentWindow.postMessage('{\"event\":\"command\",\"func\":\"pauseVideo\",\"args\":\"\"}', \"*\") : this.$el.querySelector(\"video\").pause());\n }\n },\n created() {\n if (this.imageSrc = this.conf.lazy ? \"\" : this.image, this.clone)\n return this.addClone();\n this.addSlide({\n id: this._.uid,\n image: this.imageSrc,\n video: this.videoObj && { ...this.videoObj, play: this.playVideo, pause: this.pauseVideo },\n title: this.title,\n content: this.content,\n contentSlot: this.$slots.content,\n loaderSlot: this.$slots.loader,\n link: this.link,\n style: \"\",\n loadImage: this.loadImage,\n duration: this.duration\n });\n },\n mounted() {\n this.clone || this.updateThisSlide({\n contentSlot: this.$slots.content,\n loaderSlot: this.$slots.loader,\n style: ((this.$el.attributes || {}).style || {}).value\n });\n },\n beforeUnmount() {\n this.clone || this.removeSlide(this._.uid);\n },\n watch: {\n image() {\n this.imageSrc = this.conf.lazy && !this.isSlideVisible ? \"\" : this.image, this.clone || this.updateThisSlide({\n image: this.imageSrc,\n ...!this.conf.slideImageInside && { style: this.slideStyles }\n });\n },\n title() {\n this.clone || this.updateThisSlide({ title: this.title });\n },\n content() {\n this.clone || this.updateThisSlide({ content: this.content });\n },\n link() {\n this.clone || this.updateThisSlide({ link: this.link });\n },\n lazyloaded() {\n this.clone && (this.loaded = this.lazyloaded);\n }\n }\n}, Z = /* @__PURE__ */ j(Q, [[\"render\", J]]);\nconst $ = [\"innerHTML\"], ee = [\"innerHTML\"], te = { class: \"vueperslides__inner\" }, se = {\n key: 0,\n class: \"vueperslides__paused\"\n}, ie = {\n key: 1,\n class: \"vueperslides__progress\"\n}, le = {\n key: 2,\n class: \"vueperslides__fractions\"\n}, ne = { viewBox: \"0 0 9 18\" }, re = [\"d\"], ae = { viewBox: \"0 0 9 18\" }, de = [\"d\"], oe = {\n key: 4,\n class: \"vueperslides__bullets\",\n ref: \"bullets\",\n role: \"tablist\",\n \"aria-label\": \"Slideshow navigation\"\n}, ue = [\"aria-label\", \"onClick\"], he = { class: \"default\" }, ce = {\n key: 1,\n class: \"vueperslides__bullets vueperslides__bullets--outside\",\n ref: \"bullets\",\n role: \"tablist\",\n \"aria-label\": \"Slideshow navigation\"\n}, fe = [\"aria-label\", \"onClick\"], ve = { class: \"default\" }, ge = [\"innerHTML\"], pe = [\"innerHTML\"];\nfunction me(e, s, i, l, o, t) {\n const u = P(\"vnodes\"), v = P(\"vueper-slide\");\n return n(), r(\"div\", {\n class: b([\"vueperslides\", t.vueperslidesClasses]),\n ref: \"vueperslides\",\n \"aria-label\": \"Slideshow\",\n style: m(t.vueperslidesStyles)\n }, [\n t.slidesCount && t.conf.slideContentOutside === \"top\" ? (n(), r(\"div\", {\n key: 0,\n class: b([\"vueperslide__content-wrapper vueperslide__content-wrapper--outside-top\", t.conf.slideContentOutsideClass])\n }, [\n t.currentSlide.contentSlot ? (n(), k(u, {\n key: 0,\n vnodes: t.currentSlide.contentSlot()\n }, null, 8, [\"vnodes\"])) : (n(), r(w, { key: 1 }, [\n t.currentSlide.title ? (n(), r(\"div\", {\n key: 0,\n class: \"vueperslide__title\",\n innerHTML: t.currentSlide.title\n }, null, 8, $)) : d(\"\", !0),\n t.currentSlide.content ? (n(), r(\"div\", {\n key: 1,\n class: \"vueperslide__content\",\n innerHTML: t.currentSlide.content\n }, null, 8, ee)) : d(\"\", !0)\n ], 64))\n ], 2)) : d(\"\", !0),\n f(\"div\", te, [\n f(\"div\", {\n class: \"vueperslides__parallax-wrapper\",\n style: m(`padding-bottom: ${t.conf.slideRatio * 100}%`),\n \"aria-live\": \"polite\"\n }, [\n f(\"div\", {\n class: b([\"vueperslides__track\", { \"vueperslides__track--dragging\": e.touch.dragging, \"vueperslides__track--mousedown\": e.mouseDown }]),\n ref: \"track\",\n style: m(t.trackStyles)\n }, [\n f(\"div\", {\n class: \"vueperslides__track-inner\",\n style: m(t.trackInnerStyles)\n }, [\n g(e.$slots, \"default\"),\n e.isReady && t.conf.infinite && t.canSlide && t.lastSlide ? (n(), k(v, {\n key: 0,\n class: \"vueperslide--clone vueperslide--clone-1\",\n clone: \"\",\n title: t.lastSlide.title,\n content: t.lastSlide.content,\n image: t.lastSlide.image,\n link: t.lastSlide.link,\n style: m(t.lastSlide.style),\n lazyloaded: t.lastSlide.loaded,\n \"aria-hidden\": \"true\"\n }, E({ _: 2 }, [\n t.lastSlide.contentSlot ? {\n name: \"content\",\n fn: T(() => [\n C(u, {\n vnodes: t.lastSlide.contentSlot()\n }, null, 8, [\"vnodes\"])\n ]),\n key: \"0\"\n } : void 0,\n t.conf.lazy && !t.lastSlide.loaded && t.lastSlide.loaderSlot ? {\n name: \"loader\",\n fn: T(() => [\n C(u, {\n vnodes: t.lastSlide.loaderSlot()\n }, null, 8, [\"vnodes\"])\n ]),\n key: \"1\"\n } : void 0\n ]), 1032, [\"title\", \"content\", \"image\", \"link\", \"style\", \"lazyloaded\"])) : d(\"\", !0),\n e.isReady && t.conf.infinite && t.canSlide && t.firstSlide ? (n(), k(v, {\n key: 1,\n class: \"vueperslide--clone vueperslide--clone-2\",\n clone: \"\",\n title: t.firstSlide.title,\n content: t.firstSlide.content,\n image: t.firstSlide.image,\n link: t.firstSlide.link,\n style: m(t.firstSlide.style),\n lazyloaded: t.firstSlide.loaded,\n \"aria-hidden\": \"true\"\n }, E({ _: 2 }, [\n t.firstSlide.contentSlot ? {\n name: \"content\",\n fn: T(() => [\n C(u, {\n vnodes: t.firstSlide.contentSlot()\n }, null, 8, [\"vnodes\"])\n ]),\n key: \"0\"\n } : void 0,\n t.conf.lazy && !t.firstSlide.loaded && t.firstSlide.loaderSlot ? {\n name: \"loader\",\n fn: T(() => [\n C(u, {\n vnodes: t.firstSlide.loaderSlot()\n }, null, 8, [\"vnodes\"])\n ]),\n key: \"1\"\n } : void 0\n ]), 1032, [\"title\", \"content\", \"image\", \"link\", \"style\", \"lazyloaded\"])) : d(\"\", !0)\n ], 4)\n ], 6)\n ], 4),\n (t.conf.pauseOnHover || t.conf.pauseOnTouch) && e.$slots.pause ? (n(), r(\"div\", se, [\n g(e.$slots, \"pause\")\n ])) : d(\"\", !0),\n t.conf.progress ? (n(), r(\"div\", ie, [\n g(e.$slots, \"progress\", {\n current: e.slides.current + 1,\n total: t.slidesCount\n }, () => [\n f(\"div\", {\n style: m(`width: ${(e.slides.current + 1) * 100 / t.slidesCount}%`)\n }, null, 4)\n ])\n ])) : d(\"\", !0),\n t.conf.fractions ? (n(), r(\"div\", le, [\n g(e.$slots, \"fraction\", {\n current: e.slides.current + 1,\n total: t.slidesCount\n }, () => [\n B(O(`${e.slides.current + 1} / ${t.slidesCount}`), 1)\n ])\n ])) : d(\"\", !0),\n t.conf.arrows && t.canSlide && !i.disable ? (n(), r(\"div\", {\n key: 3,\n class: b([\"vueperslides__arrows\", { \"vueperslides__arrows--outside\": t.conf.arrowsOutside }])\n }, [\n M(f(\"button\", {\n class: \"vueperslides__arrow vueperslides__arrow--prev\",\n type: \"button\",\n onClick: s[0] || (s[0] = (c) => t.previous()),\n \"aria-label\": \"Previous\",\n onKeyup: [\n s[1] || (s[1] = y((c) => t.conf.rtl ? t.next() : t.previous(), [\"left\"])),\n s[2] || (s[2] = y((c) => t.conf.rtl ? t.previous() : t.next(), [\"right\"]))\n ]\n }, [\n g(e.$slots, `arrow-${t.conf.rtl ? \"right\" : \"left\"}`, {}, () => [\n (n(), r(\"svg\", ne, [\n f(\"path\", {\n \"stroke-linecap\": \"round\",\n d: t.conf.rtl ? \"m1 1 l7 8 -7 8\" : \"m8 1 l-7 8 7 8\"\n }, null, 8, re)\n ]))\n ])\n ], 544), [\n [I, !t.arrowPrevDisabled]\n ]),\n M(f(\"button\", {\n class: \"vueperslides__arrow vueperslides__arrow--next\",\n type: \"button\",\n onClick: s[3] || (s[3] = (c) => t.next()),\n \"aria-label\": \"Next\",\n onKeyup: [\n s[4] || (s[4] = y((c) => t.conf.rtl ? t.next() : t.previous(), [\"left\"])),\n s[5] || (s[5] = y((c) => t.conf.rtl ? t.previous() : t.next(), [\"right\"]))\n ]\n }, [\n g(e.$slots, `arrow-${t.conf.rtl ? \"left\" : \"right\"}`, {}, () => [\n (n(), r(\"svg\", ae, [\n f(\"path\", {\n \"stroke-linecap\": \"round\",\n d: t.conf.rtl ? \"m8 1 l-7 8 7 8\" : \"m1 1 l7 8 -7 8\"\n }, null, 8, de)\n ]))\n ])\n ], 544), [\n [I, !t.arrowNextDisabled]\n ])\n ], 2)) : d(\"\", !0),\n t.conf.bullets && t.canSlide && !i.disable && !t.conf.bulletsOutside ? (n(), r(\"div\", oe, [\n g(e.$slots, \"bullets\", {\n currentSlide: e.slides.current,\n bulletIndexes: t.bulletIndexes,\n goToSlide: t.goToSlide,\n previous: t.previous,\n next: t.next\n }, () => [\n (n(!0), r(w, null, L(t.bulletIndexes, (c, a) => (n(), r(\"button\", {\n class: b([\"vueperslides__bullet\", { \"vueperslides__bullet--active\": e.slides.current === c }]),\n type: \"button\",\n key: a,\n role: \"tab\",\n \"aria-label\": `Slide ${a + 1}`,\n onClick: (h) => t.goToSlide(c),\n onKeyup: [\n s[6] || (s[6] = y((h) => t.conf.rtl ? t.next() : t.previous(), [\"left\"])),\n s[7] || (s[7] = y((h) => t.conf.rtl ? t.previous() : t.next(), [\"right\"]))\n ]\n }, [\n g(e.$slots, \"bullet\", {\n active: e.slides.current === c,\n slideIndex: c,\n index: a + 1\n }, () => [\n f(\"div\", he, [\n f(\"span\", null, O(a + 1), 1)\n ])\n ])\n ], 42, ue))), 128))\n ])\n ], 512)) : d(\"\", !0)\n ]),\n t.conf.bullets && t.canSlide && !i.disable && t.conf.bulletsOutside ? (n(), r(\"div\", ce, [\n g(e.$slots, \"bullets\", {\n currentSlide: e.slides.current,\n bulletIndexes: t.bulletIndexes,\n goToSlide: t.goToSlide,\n previous: t.previous,\n next: t.next\n }, () => [\n (n(!0), r(w, null, L(t.bulletIndexes, (c, a) => (n(), r(\"button\", {\n class: b([\"vueperslides__bullet\", { \"vueperslides__bullet--active\": e.slides.current === c }]),\n type: \"button\",\n key: a,\n role: \"tab\",\n \"aria-label\": `Slide ${a + 1}`,\n onClick: (h) => t.goToSlide(c),\n onKeyup: [\n s[8] || (s[8] = y((h) => t.conf.rtl ? t.next() : t.previous(), [\"left\"])),\n s[9] || (s[9] = y((h) => t.conf.rtl ? t.previous() : t.next(), [\"right\"]))\n ]\n }, [\n g(e.$slots, \"bullet\", {\n active: e.slides.current === c,\n slideIndex: c,\n index: a + 1\n }, () => [\n f(\"div\", ve, [\n f(\"span\", null, O(a + 1), 1)\n ])\n ])\n ], 42, fe))), 128))\n ])\n ], 512)) : d(\"\", !0),\n t.slidesCount && t.conf.slideContentOutside === \"bottom\" ? (n(), r(\"div\", {\n key: 2,\n class: b([\"vueperslide__content-wrapper vueperslide__content-wrapper--outside-bottom\", t.conf.slideContentOutsideClass])\n }, [\n t.currentSlide.contentSlot ? (n(), k(u, {\n key: 0,\n vnodes: t.currentSlide.contentSlot()\n }, null, 8, [\"vnodes\"])) : (n(), r(w, { key: 1 }, [\n t.currentSlide.title ? (n(), r(\"div\", {\n key: 0,\n class: \"vueperslide__title\",\n innerHTML: t.currentSlide.title\n }, null, 8, ge)) : d(\"\", !0),\n t.currentSlide.content ? (n(), r(\"div\", {\n key: 1,\n class: \"vueperslide__content\",\n innerHTML: t.currentSlide.content\n }, null, 8, pe)) : d(\"\", !0)\n ], 64))\n ], 2)) : d(\"\", !0)\n ], 6);\n}\nconst Se = {\n name: \"vueper-slides\",\n components: {\n VueperSlide: Z,\n vnodes: {\n render() {\n return this.$attrs.vnodes;\n }\n }\n },\n provide() {\n return {\n conf: this.conf,\n slides: this.slides,\n touch: this.touch,\n updateSlide: this.updateSlide,\n addClone: this.addClone,\n addSlide: this.addSlide,\n removeSlide: this.removeSlide\n };\n },\n props: {\n alwaysRefreshClones: { type: Boolean, default: !1 },\n arrows: { type: Boolean, default: !0 },\n arrowsOutside: { type: Boolean, default: null },\n autoplay: { type: Boolean, default: !1 },\n breakpoints: { type: Object, default: () => ({}) },\n bullets: { type: Boolean, default: !0 },\n bulletsOutside: { type: Boolean, default: null },\n disable: { type: Boolean, default: !1 },\n disableArrowsOnEdges: { type: [Boolean, String], default: !1 },\n draggingDistance: { type: Number, default: null },\n duration: { type: [Number, String], default: 4e3 },\n infinite: { type: Boolean, default: !0 },\n fade: { type: Boolean, default: !1 },\n fixedHeight: { type: [Boolean, String], default: !1 },\n fractions: { type: Boolean, default: !1 },\n gap: { type: Number, default: 0 },\n initSlide: { type: Number, default: 1 },\n lazy: { type: Boolean, default: !1 },\n lazyLoadOnDrag: { type: Boolean, default: !1 },\n pauseOnHover: { type: Boolean, default: !0 },\n pauseOnTouch: { type: Boolean, default: !0 },\n parallax: { type: [Boolean, Number], default: !1 },\n pageScrollingElement: { type: String, default: \"\" },\n parallaxFixedContent: { type: Boolean, default: !1 },\n preventYScroll: { type: Boolean, default: !1 },\n progress: { type: Boolean, default: !1 },\n rtl: { type: Boolean, default: !1 },\n slideContentOutside: { type: [Boolean, String], default: !1 },\n slideContentOutsideClass: { type: String, default: \"\" },\n slideImageInside: { type: Boolean, default: !1 },\n slideMultiple: { type: [Boolean, Number], default: !1 },\n slideRatio: { type: Number, default: 1 / 3 },\n touchable: { type: Boolean, default: !0 },\n transitionSpeed: { type: [Number, String], default: 600 },\n visibleSlides: { type: Number, default: 1 },\n \"3d\": { type: Boolean, default: !1 }\n },\n emits: [\n \"ready\",\n \"next\",\n \"previous\",\n \"autoplay-pause\",\n \"autoplay-resume\",\n \"before-slide\",\n \"slide\",\n \"image-loaded\",\n \"image-failed\"\n ],\n data: () => ({\n isReady: !1,\n isPaused: !1,\n container: null,\n slides: {\n list: [],\n activeId: null,\n current: 0,\n focus: 0,\n firstVisible: 0\n },\n mouseDown: !1,\n mouseOver: !1,\n touch: {\n enabled: !0,\n dragging: !1,\n lazyloadTriggered: !1,\n justDragged: !1,\n dragStartX: 0,\n dragNowX: 0,\n dragAmount: 0\n },\n transition: { currentTranslation: 0, speed: 0, animated: !1 },\n autoplayTimer: null,\n nextSlideIsClone: !1,\n breakpointsData: { list: [], current: null },\n parallaxData: { translation: 0, slideshowOffsetTop: null, isVisible: !1 }\n }),\n computed: {\n conf() {\n const e = {\n ...this.$props,\n ...this.$props.breakpoints && this.$props.breakpoints[this.breakpointsData.current] || {}\n };\n return e.slideMultiple = e.slideMultiple ? e.visibleSlides : 1, e.gap = this.gap && parseInt(this.gap) || 0, e.visibleSlides > 1 && (e[\"3d\"] = !1), (e.fade || e.disableArrowsOnEdges || e.visibleSlides > 1 || e[\"3d\"]) && (e.infinite = !1), e.visibleSlides > 1 && e.arrowsOutside === null && (e.arrowsOutside = !0), e.visibleSlides > 1 && e.bulletsOutside === null && (e.bulletsOutside = !0), this.touch.enabled !== e.touchable && this.toggleTouchableOption(e.touchable), e.parallax && e.parallaxFixedContent && (e.slideContentOutside = \"top\", e.slideContentOutsideClass = \"parallax-fixed-content\"), e;\n },\n slidesCount() {\n return this.slides.list.length;\n },\n gapsCount() {\n const { fade: e, \"3d\": s, slideMultiple: i, gap: l } = this.conf;\n if (!l || e || s || this.multipleSlides1by1 && this.slides.current < this.preferredPosition)\n return 0;\n if (!this.slides.current && this.nextSlideIsClone)\n return this.slidesCount;\n if (this.nextSlideIsClone === 0)\n return -1;\n let o = this.slides.current / i - this.preferredPosition;\n return this.multipleSlides1by1 && this.slidePosAfterPreferred > 0 && (o -= this.slidePosAfterPreferred), o;\n },\n slidesAfterCurrent() {\n return this.slidesCount - (this.slides.current + 1);\n },\n preferredPosition() {\n return this.multipleSlides1by1 ? Math.ceil(this.conf.visibleSlides / 2) - 1 : 0;\n },\n slidePosAfterPreferred() {\n return this.conf.visibleSlides - this.preferredPosition - this.slidesAfterCurrent - 1;\n },\n multipleSlides1by1() {\n return this.conf.visibleSlides > 1 && this.conf.slideMultiple === 1;\n },\n touchEnabled: {\n get() {\n return this.slidesCount > 1 && this.touch.enabled;\n },\n set(e) {\n this.touch.enabled = e;\n }\n },\n canSlide() {\n return this.slidesCount / this.conf.visibleSlides > 1;\n },\n firstSlide() {\n const e = this.slidesCount ? this.slides.list[0] : {};\n return e.style && typeof e.style == \"string\" && (e.style = e.style.replace(/width: ?\\d+.*?;?/, \"\")), e;\n },\n lastSlide() {\n const e = this.slidesCount ? this.slides.list[this.slidesCount - 1] : {};\n return e.style && typeof e.style == \"string\" && (e.style = e.style.replace(/width: ?\\d+.*?;?/, \"\")), e;\n },\n currentSlide() {\n const e = this.slidesCount && this.slides.list[this.slides.current] || {};\n return this.slides.current < this.slidesCount && e.id !== this.slides.activeId && this.goToSlide(this.slides.current, { animation: !1, autoPlaying: !0 }), e;\n },\n vueperslidesClasses() {\n return {\n \"vueperslides--ready\": this.isReady,\n \"vueperslides--rtl\": this.conf.rtl,\n \"vueperslides--fade\": this.conf.fade,\n \"vueperslides--parallax\": this.conf.parallax,\n \"vueperslides--slide-image-inside\": this.conf.slideImageInside,\n \"vueperslides--touchable\": this.touchEnabled && !this.disable,\n \"vueperslides--fixed-height\": this.conf.fixedHeight,\n \"vueperslides--3d\": this.conf[\"3d\"],\n \"vueperslides--slide-multiple\": this.conf.slideMultiple > 1,\n \"vueperslides--bullets-outside\": this.conf.bulletsOutside,\n \"vueperslides--animated\": this.transition.animated,\n \"vueperslides--no-animation\": !this.isReady\n };\n },\n vueperslidesStyles() {\n return /^-?\\d/.test(this.conf.fixedHeight) ? `height: ${this.conf.fixedHeight}` : null;\n },\n trackStyles() {\n const e = {};\n return this.conf.parallax && (e.transform = `translate3d(0, ${this.parallaxData.translation}%, 0)`, e.willChange = this.parallaxData.isVisible ? \"transform\" : \"auto\"), e;\n },\n trackInnerStyles() {\n const e = {}, { fade: s, \"3d\": i } = this.conf;\n if (e.transitionDuration = `${this.transition.speed}ms`, i) {\n const l = this.transition.currentTranslation * 90 / 100;\n e.transform = `rotateY(-90deg) translateX(-50%) rotateY(90deg) rotateY(${l}deg)`;\n } else\n s || (e.transform = `translate3d(${this.transition.currentTranslation}%, 0, 0)`, e.willChange = this.touch.dragging || this.transition.animated ? \"transform\" : \"auto\");\n return e;\n },\n bulletIndexes() {\n return Array(Math.ceil(this.slidesCount / this.conf.slideMultiple)).fill().map((e, s) => s * this.conf.slideMultiple);\n },\n arrowPrevDisabled() {\n return !this.slides.current && this.conf.disableArrowsOnEdges;\n },\n arrowNextDisabled() {\n const { disableArrowsOnEdges: e, visibleSlides: s, slideMultiple: i } = this.conf;\n return this.slides.current + (i > 1 && s > 1 ? s - 1 : 0) === this.slidesCount - 1 && e;\n }\n },\n methods: {\n init() {\n this.container = this.$refs.vueperslides, this.touchEnabled = this.conf.touchable, this.transition.speed = this.conf.transitionSpeed, Object.keys(this.breakpoints).length && (this.setBreakpointsList(), this.setBreakpointConfig(this.getCurrentBreakpoint()));\n const e = { animation: !1, autoPlaying: this.conf.autoplay };\n this.goToSlide(this.conf.initSlide - 1, e), this.bindEvents(), this.$nextTick(() => {\n this.isReady = !0, this.emit(\"ready\");\n });\n },\n emit(e, s = !0, i = !1) {\n let l = null;\n if ((s || typeof i == \"number\") && (l = {}, s && this.slides.activeId && this.slidesCount && (l.currentSlide = this.getSlideData(this.slides.current)), typeof i == \"number\" && this.slidesCount)) {\n const { nextSlide: o } = this.getSlideInRange(i);\n l.nextSlide = this.getSlideData(o);\n }\n this.$emit(...l ? [e, l] : [e]);\n },\n getSlideData(e) {\n const s = this.slides.list[e];\n let i = {};\n return s && (i = {\n index: e,\n title: s.title,\n content: s.content,\n contentSlot: s.contentSlot,\n image: s.image,\n link: s.link\n }), i;\n },\n setBreakpointsList() {\n this.breakpointsData.list = [99999, ...Object.keys(this.breakpoints)].map((e) => parseInt(e)).sort((e, s) => parseInt(s) - parseInt(e));\n },\n getCurrentBreakpoint() {\n const e = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, s = [e, ...this.breakpointsData.list].sort((i, l) => parseInt(l) - parseInt(i));\n return this.breakpointsData.list[s.indexOf(e) - 1];\n },\n hasBreakpointChanged(e) {\n return this.breakpointsData.current !== parseInt(e);\n },\n setBreakpointConfig(e) {\n const s = this.breakpoints && this.breakpoints[e] || {}, i = s.slideMultiple && s.slideMultiple !== this.conf.slideMultiple, l = s.visibleSlides && s.visibleSlides !== this.conf.visibleSlides;\n this.breakpointsData.current = e, this.slides.current = this.getFirstVisibleSlide(this.slides.focus), i || l ? this.goToSlide(this.slides.current, { breakpointChange: !0 }) : this.updateTrackTranslation();\n },\n bindEvents() {\n const e = \"ontouchstart\" in window;\n this.touchEnabled && this.toggleTouchableOption(!0), this.conf.autoplay && (this.conf.pauseOnHover && !e ? (this.container.addEventListener(\"mouseenter\", this.onMouseEnter), this.container.addEventListener(\"mouseleave\", this.onMouseLeave)) : this.conf.pauseOnTouch && e && document.addEventListener(\"touchstart\", (s) => {\n this[this.$el.contains(s.target) ? \"onSlideshowTouch\" : \"onOustideTouch\"]();\n })), (this.breakpointsData.list.length || this.conf.parallax) && window.addEventListener(\"resize\", this.onResize), this.conf.parallax && this.enableParallax();\n },\n getSlideshowOffsetTop(e = !1) {\n if (this.parallaxData.slideshowOffsetTop === null || e) {\n let s = this.container, i = s.offsetTop;\n for (; s = s.offsetParent; )\n i += s.offsetTop;\n this.parallaxData.slideshowOffsetTop = i;\n }\n return this.parallaxData.slideshowOffsetTop;\n },\n enableParallax() {\n this.refreshParallax(), this.pageScrollingElement ? (this.parallaxData.scrollingEl = document.querySelector(this.pageScrollingElement), this.parallaxData.scrollingEl.addEventListener(\"scroll\", this.onScroll)) : document.addEventListener(\"scroll\", this.onScroll);\n },\n disableParallax() {\n (this.pageScrollingElement ? document.querySelector(this.pageScrollingElement) : document).removeEventListener(\"scroll\", this.onScroll), this.parallaxData.scrollingEl = null, this.parallaxData.isVisible = !1, this.parallaxData.translation = 0, this.parallaxData.slideshowOffsetTop = null;\n },\n onScroll() {\n const { scrollingEl: e } = this.parallaxData, s = document.documentElement;\n let i = 0;\n e ? i = e.scrollTop : i = (window.pageYOffset || s.scrollTop) - (s.clientTop || 0);\n const l = window.innerHeight || s.clientHeight || document.body.clientHeight, o = this.container.clientHeight, t = this.getSlideshowOffsetTop(), u = t + o - i, v = l + i - t;\n if (this.parallaxData.isVisible = u > 0 && v > 0, this.parallaxData.isVisible) {\n const c = l + o, a = u * 100 / c, h = this.conf.parallax === -1 ? 100 - a : a;\n this.parallaxData.translation = -h / 2;\n }\n },\n onResize() {\n if (this.breakpointsData.list.length) {\n const e = this.getCurrentBreakpoint();\n this.hasBreakpointChanged(e) && this.setBreakpointConfig(e);\n }\n this.conf.parallax && this.getSlideshowOffsetTop(!0);\n },\n onMouseEnter() {\n this.mouseOver = !0, this.conf.pauseOnHover && this.conf.autoplay && (this.isPaused = !0);\n },\n onMouseLeave() {\n this.mouseOver = !1, this.conf.pauseOnHover && this.conf.autoplay && (this.isPaused = !1);\n },\n onMouseDown(e) {\n !this.touchEnabled || this.disable || (!e.touches && this.preventYScroll && e.preventDefault(), this.mouseDown = !0, this.touch.dragStartX = this.getCurrentMouseX(e), this.conf.draggingDistance || this.updateTrackTranslation(this.touch.dragStartX));\n },\n onMouseMove(e) {\n if (this.mouseDown || this.touch.dragging)\n if (this.conf.autoplay && (this.isPaused = !0), this.preventYScroll && e.preventDefault(), this.mouseDown = !1, this.touch.dragging = !0, this.touch.dragNowX = this.getCurrentMouseX(e), this.conf.draggingDistance) {\n this.touch.dragAmount = this.touch.dragNowX - this.touch.dragStartX;\n const s = this.touch.dragAmount / this.container.clientWidth;\n this.updateTrackTranslation(), this.transition.currentTranslation += 100 * s;\n } else\n this.updateTrackTranslation(this.touch.dragNowX);\n },\n onMouseUp(e) {\n if (this.mouseDown = !1, this.touch.dragging)\n this.conf.autoplay && (!(\"ontouchstart\" in window) && !this.mouseOver ? this.isPaused = !1 : this.conf.pauseOnTouch || (this.isPaused = !1));\n else\n return this.cancelSlideChange();\n this.touch.dragging = !1;\n const s = this.conf.draggingDistance ? -this.touch.dragAmount : 0, i = (this.touch.dragStartX - this.container.offsetLeft) / this.container.clientWidth, l = (this.touch.dragNowX - this.container.offsetLeft) / this.container.clientWidth, o = ((i < 0.5 ? 0 : 1) - l) * 100;\n let t = (s || o) > 0;\n if (this.conf.rtl && (t = !t), [\n Math.abs(s) < this.conf.draggingDistance,\n !this.conf.draggingDistance && Math.abs(o) < 50,\n this.arrowPrevDisabled && !this.slides.current && !t,\n this.arrowNextDisabled && this.slides.current === this.slidesCount - 1 && t\n ].includes(!0))\n this.cancelSlideChange();\n else {\n const v = this.slides.current + this.conf.slideMultiple * (t ? 1 : -1);\n this.emit(t ? \"next\" : \"previous\"), this.goToSlide(v);\n }\n this.touch.dragStartX = null, this.touch.dragNowX = null, this.touch.dragAmount = null, this.touch.justDragged = !0, setTimeout(() => this.touch.justDragged = !1, 50), this.touch.lazyloadTriggered = !1;\n },\n onSlideshowTouch() {\n this.isPaused = !0;\n },\n onOustideTouch() {\n this.isPaused = !1;\n },\n justDragged() {\n return this.touch.justDragged;\n },\n cancelSlideChange() {\n this.conf.fade || this.updateTrackTranslation();\n },\n getCurrentMouseX(e) {\n return \"ontouchstart\" in window ? e.touches[0].clientX : e.clientX;\n },\n getBasicTranslation() {\n return this.slides.current / this.conf.visibleSlides;\n },\n updateTrackTranslation(e = null) {\n let s = this.getBasicTranslation();\n const { infinite: i, visibleSlides: l, slideMultiple: o, gap: t, \"3d\": u, lazy: v, lazyLoadOnDrag: c } = this.conf;\n if (i && this.nextSlideIsClone !== !1 && (s = (this.nextSlideIsClone ? this.slidesCount : -1) / l), t && (s += this.gapsCount / (l / o) * t / 100), this.touch.dragStartX && e && !(i && this.nextSlideIsClone !== !1)) {\n let a = 0;\n const h = (this.touch.dragStartX - this.container.offsetLeft) / this.container.clientWidth;\n let S = (e - this.container.offsetLeft) / this.container.clientWidth;\n if (u) {\n const p = Math.round(h) ? [0, 2] : [-1, 1];\n S = Math.min(Math.max(S, p[0]), p[1]);\n }\n if (a = (h < 0.5 ? 0 : 1) - S, s += a * (this.conf.rtl ? -1 : 1), v && c && !this.touch.lazyloadTriggered) {\n this.touch.lazyloadTriggered = !0;\n let p = this.slides.current + (a > 0 ? 1 : -1) * l;\n i && p === -1 ? p = this.slidesCount - 1 : i && p === this.slidesCount && (p = 0);\n for (let _ = 0; _ < l; _++) {\n const x = this.slides.list[p + _];\n x && !x.loaded && this.loadSlide(x, p + _);\n }\n }\n }\n if (this.multipleSlides1by1 && !i) {\n const a = this.slidePosAfterPreferred > 0;\n let h = Math.min(this.preferredPosition, this.slides.current);\n a && (h += this.slidePosAfterPreferred), s -= h / l;\n }\n this.transition.currentTranslation = -s * 100 * (this.conf.rtl ? -1 : 1);\n },\n pauseAutoplay() {\n this.isPaused = !0, clearTimeout(this.autoplayTimer), this.autoplayTimer = 0, this.emit(\"autoplay-pause\");\n },\n resumeAutoplay() {\n this.isPaused = !1, this.doAutoplay(), this.emit(\"autoplay-resume\");\n },\n doAutoplay() {\n clearTimeout(this.autoplayTimer), this.autoplayTimer = setTimeout(() => {\n this.goToSlide(this.slides.current + this.conf.slideMultiple, { autoPlaying: !0 });\n }, this.currentSlide.duration || this.conf.duration);\n },\n previous(e = !0) {\n e && this.emit(\"previous\"), this.goToSlide(this.slides.current - this.conf.slideMultiple);\n },\n next(e = !0) {\n e && this.emit(\"next\"), this.goToSlide(this.slides.current + this.conf.slideMultiple);\n },\n refreshParallax() {\n setTimeout(() => {\n this.onResize(), this.onScroll();\n }, 100);\n },\n getFirstVisibleSlide(e) {\n const { slideMultiple: s, visibleSlides: i } = this.conf;\n let l = this.slides.current;\n return i > 1 && s === i ? l = Math.floor(e / i) * i : this.multipleSlides1by1 && (l = e - Math.min(e, this.preferredPosition) - Math.max(this.slidePosAfterPreferred, 0)), l;\n },\n getSlideInRange(e, s) {\n let i = !1;\n this.conf.infinite && e === -1 ? i = 0 : this.conf.infinite && e === this.slidesCount && (i = 1);\n let l = (e + this.slidesCount) % this.slidesCount;\n if (this.conf.slideMultiple > 1) {\n const o = this.slidesCount % this.conf.slideMultiple || this.conf.slideMultiple, t = this.conf.slideMultiple - o;\n l += e < 0 ? t : 0, l = this.getFirstVisibleSlide(l);\n }\n return this.conf.disableArrowsOnEdges && (e < 0 || e > this.slidesCount - 1) && !s && (l = this.slides.current), { nextSlide: l, clone: i };\n },\n goToSlide(e, { animation: s = !0, autoPlaying: i = !1, jumping: l = !1, breakpointChange: o = !1, emit: t = !0 } = {}) {\n if (!this.slidesCount || this.disable)\n return;\n this.conf.autoplay && !i && !this.isPaused && (this.isPaused = !0, this.$nextTick(() => this.isPaused = !1)), this.transition.animated = s, setTimeout(() => this.transition.animated = !1, this.transitionSpeed);\n const { nextSlide: u, clone: v } = this.getSlideInRange(e, i);\n if (this.nextSlideIsClone = v, !this.slides.list[u])\n return;\n if (this.conf.lazy)\n for (let a = 0; a < this.conf.visibleSlides; a++) {\n const h = this.slides.list[u + a];\n h && !h.loaded && this.loadSlide(h, u + a);\n }\n this.isReady && !l && t && this.emit(\"before-slide\", !0, u);\n const c = this.slides.list[u];\n if (this.isReady && c.video) {\n const a = this.slides.list[this.slides.current];\n a.video && a.video.pause(), c.video.play();\n }\n if (v !== !1 && setTimeout(() => {\n const a = e === -1 && this.slides.current !== this.slidesCount - 1, h = e === this.slidesCount && this.slides.current !== 0;\n a || h || (this.transition.speed = 0, this.goToSlide(v ? 0 : this.slidesCount - 1, { animation: !1, jumping: !0 }), setTimeout(() => this.transition.speed = this.conf.transitionSpeed, 50));\n }, this.transition.speed - 50), this.slides.current = u, this.slides.firstVisible = this.getFirstVisibleSlide(u), o || (this.slides.focus = u), this.conf.fade || this.updateTrackTranslation(), this.slides.activeId = this.slides.list[this.slides.current].id, this.conf.autoplay && i && !this.isPaused && this.doAutoplay(), this.slidesCount && (this.isReady && !l && t && this.emit(\"slide\"), this.isReady && this.conf.bullets && !i && !l && this.$refs.bullets)) {\n const a = this.$refs.bullets.children, h = a && a[this.slides.current / this.conf.slideMultiple];\n if (h && h.nodeName.toLowerCase() === \"button\") {\n let S = document.documentElement;\n this.pageScrollingElement && (S = document.querySelector(this.pageScrollingElement));\n const p = S.scrollTop;\n h.focus({ preventScroll: !0 }), S.scrollTop = p;\n }\n }\n },\n addSlide(e) {\n return this.slides.list.push(e), this.isReady && this.slidesCount === 1 && this.conf.autoplay && this.isPaused && (this.isPaused = !1), this.slidesCount;\n },\n addClone() {\n return this.updateTrackTranslation(), this.slidesCount;\n },\n updateSlide(e, s) {\n let i = this.slides.list.find((l) => l.id === e);\n i && (i = Object.assign(i, s));\n },\n removeSlide(e) {\n const s = this.slides.list.findIndex((i) => i.id === e);\n s > -1 && (this.slides.list.splice(s, 1), this.slidesCount && e === this.slides.activeId && this.goToSlide(s - 1, { autoPlaying: !0 })), this.slides.current >= this.slidesCount && this.goToSlide(0, { autoPlaying: !0 });\n },\n loadSlide(e, s) {\n e.loadImage().then((i) => {\n const { image: l, style: o } = i;\n e.loaded = !0, e.image = l, e.style = o, this.$emit(\"image-loaded\", this.getSlideData(s));\n }, () => {\n e.loaded = !1, this.$emit(\"image-failed\", this.getSlideData(s));\n });\n },\n toggleTouchableOption(e) {\n const { track: s } = this.$refs;\n if (!s)\n return;\n this.touchEnabled = e;\n const i = \"ontouchstart\" in window;\n e ? (this.$refs.track.addEventListener(i ? \"touchstart\" : \"mousedown\", this.onMouseDown, { passive: !this.preventYScroll }), document.addEventListener(i ? \"touchmove\" : \"mousemove\", this.onMouseMove, { passive: !this.preventYScroll }), document.addEventListener(i ? \"touchend\" : \"mouseup\", this.onMouseUp, { passive: !0 })) : this.removeEventListeners();\n },\n removeEventListeners() {\n const e = \"ontouchstart\" in window;\n this.$refs.track.removeEventListener(e ? \"touchstart\" : \"mousedown\", this.onMouseDown, { passive: !this.preventYScroll }), document.removeEventListener(e ? \"touchmove\" : \"mousemove\", this.onMouseMove, { passive: !this.preventYScroll }), document.removeEventListener(e ? \"touchend\" : \"mouseup\", this.onMouseUp, { passive: !0 });\n }\n },\n watch: {\n isPaused(e) {\n this[e ? \"pauseAutoplay\" : \"resumeAutoplay\"]();\n },\n parallax(e) {\n this[e ? \"enableParallax\" : \"disableParallax\"]();\n }\n },\n mounted() {\n this.init();\n },\n beforeUnmount() {\n this.removeEventListeners(), this.conf.parallax && this.disableParallax(), window.removeEventListener(\"resize\", this.onResize), document.removeEventListener(\"touchstart\", (e) => {\n this[this.$el.contains(e.target) ? \"onSlideshowTouch\" : \"onOustideTouch\"]();\n }), this.container.removeEventListener(\"mouseenter\", this.onMouseEnter), this.container.removeEventListener(\"mouseleave\", this.onMouseLeave);\n }\n}, be = /* @__PURE__ */ j(Se, [[\"render\", me]]);\nexport {\n Z as VueperSlide,\n be as VueperSlides\n};\n","var formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'menos de un segundo',\n other: 'menos de {{count}} segundos'\n },\n xSeconds: {\n one: '1 segundo',\n other: '{{count}} segundos'\n },\n halfAMinute: 'medio minuto',\n lessThanXMinutes: {\n one: 'menos de un minuto',\n other: 'menos de {{count}} minutos'\n },\n xMinutes: {\n one: '1 minuto',\n other: '{{count}} minutos'\n },\n aboutXHours: {\n one: 'alrededor de 1 hora',\n other: 'alrededor de {{count}} horas'\n },\n xHours: {\n one: '1 hora',\n other: '{{count}} horas'\n },\n xDays: {\n one: '1 día',\n other: '{{count}} días'\n },\n aboutXWeeks: {\n one: 'alrededor de 1 semana',\n other: 'alrededor de {{count}} semanas'\n },\n xWeeks: {\n one: '1 semana',\n other: '{{count}} semanas'\n },\n aboutXMonths: {\n one: 'alrededor de 1 mes',\n other: 'alrededor de {{count}} meses'\n },\n xMonths: {\n one: '1 mes',\n other: '{{count}} meses'\n },\n aboutXYears: {\n one: 'alrededor de 1 año',\n other: 'alrededor de {{count}} años'\n },\n xYears: {\n one: '1 año',\n other: '{{count}} años'\n },\n overXYears: {\n one: 'más de 1 año',\n other: 'más de {{count}} años'\n },\n almostXYears: {\n one: 'casi 1 año',\n other: 'casi {{count}} años'\n }\n};\nvar formatDistance = function formatDistance(token, count, options) {\n var result;\n var tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === 'string') {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace('{{count}}', count.toString());\n }\n if (options !== null && options !== void 0 && options.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return 'en ' + result;\n } else {\n return 'hace ' + result;\n }\n }\n return result;\n};\nexport default formatDistance;","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n full: \"EEEE, d 'de' MMMM 'de' y\",\n long: \"d 'de' MMMM 'de' y\",\n medium: 'd MMM y',\n short: 'dd/MM/y'\n};\nvar timeFormats = {\n full: 'HH:mm:ss zzzz',\n long: 'HH:mm:ss z',\n medium: 'HH:mm:ss',\n short: 'HH:mm'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'a las' {{time}}\",\n long: \"{{date}} 'a las' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\nexport default formatLong;","var formatRelativeLocale = {\n lastWeek: \"'el' eeee 'pasado a la' p\",\n yesterday: \"'ayer a la' p\",\n today: \"'hoy a la' p\",\n tomorrow: \"'mañana a la' p\",\n nextWeek: \"eeee 'a la' p\",\n other: 'P'\n};\nvar formatRelativeLocalePlural = {\n lastWeek: \"'el' eeee 'pasado a las' p\",\n yesterday: \"'ayer a las' p\",\n today: \"'hoy a las' p\",\n tomorrow: \"'mañana a las' p\",\n nextWeek: \"eeee 'a las' p\",\n other: 'P'\n};\nvar formatRelative = function formatRelative(token, date, _baseDate, _options) {\n if (date.getUTCHours() !== 1) {\n return formatRelativeLocalePlural[token];\n } else {\n return formatRelativeLocale[token];\n }\n};\nexport default formatRelative;","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n narrow: ['AC', 'DC'],\n abbreviated: ['AC', 'DC'],\n wide: ['antes de cristo', 'después de cristo']\n};\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['T1', 'T2', 'T3', 'T4'],\n wide: ['1º trimestre', '2º trimestre', '3º trimestre', '4º trimestre']\n};\nvar monthValues = {\n narrow: ['e', 'f', 'm', 'a', 'm', 'j', 'j', 'a', 's', 'o', 'n', 'd'],\n abbreviated: ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'],\n wide: ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre']\n};\nvar dayValues = {\n narrow: ['d', 'l', 'm', 'm', 'j', 'v', 's'],\n short: ['do', 'lu', 'ma', 'mi', 'ju', 'vi', 'sá'],\n abbreviated: ['dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb'],\n wide: ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado']\n};\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mn',\n noon: 'md',\n morning: 'mañana',\n afternoon: 'tarde',\n evening: 'tarde',\n night: 'noche'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'medianoche',\n noon: 'mediodia',\n morning: 'mañana',\n afternoon: 'tarde',\n evening: 'tarde',\n night: 'noche'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'medianoche',\n noon: 'mediodia',\n morning: 'mañana',\n afternoon: 'tarde',\n evening: 'tarde',\n night: 'noche'\n }\n};\nvar formattingDayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mn',\n noon: 'md',\n morning: 'de la mañana',\n afternoon: 'de la tarde',\n evening: 'de la tarde',\n night: 'de la noche'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'medianoche',\n noon: 'mediodia',\n morning: 'de la mañana',\n afternoon: 'de la tarde',\n evening: 'de la tarde',\n night: 'de la noche'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'medianoche',\n noon: 'mediodia',\n morning: 'de la mañana',\n afternoon: 'de la tarde',\n evening: 'de la tarde',\n night: 'de la noche'\n }\n};\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n var number = Number(dirtyNumber);\n return number + 'º';\n};\nvar localize = {\n ordinalNumber: ordinalNumber,\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function argumentCallback(quarter) {\n return Number(quarter) - 1;\n }\n }),\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: 'wide',\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: 'wide'\n })\n};\nexport default localize;","import buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nimport buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(º)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n narrow: /^(ac|dc|a|d)/i,\n abbreviated: /^(a\\.?\\s?c\\.?|a\\.?\\s?e\\.?\\s?c\\.?|d\\.?\\s?c\\.?|e\\.?\\s?c\\.?)/i,\n wide: /^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i\n};\nvar parseEraPatterns = {\n any: [/^ac/i, /^dc/i],\n wide: [/^(antes de cristo|antes de la era com[uú]n)/i, /^(despu[eé]s de cristo|era com[uú]n)/i]\n};\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^T[1234]/i,\n wide: /^[1234](º)? trimestre/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n narrow: /^[efmajsond]/i,\n abbreviated: /^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,\n wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i\n};\nvar parseMonthPatterns = {\n narrow: [/^e/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n any: [/^en/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]\n};\nvar matchDayPatterns = {\n narrow: /^[dlmjvs]/i,\n short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,\n abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,\n wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i\n};\nvar parseDayPatterns = {\n narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],\n any: [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n narrow: /^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,\n any: /^([ap]\\.?\\s?m\\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mn/i,\n noon: /^md/i,\n morning: /mañana/i,\n afternoon: /tarde/i,\n evening: /tarde/i,\n night: /noche/i\n }\n};\nvar match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function valueCallback(value) {\n return parseInt(value, 10);\n }\n }),\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function valueCallback(index) {\n return index + 1;\n }\n }),\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\nexport default match;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary Spanish locale.\n * @language Spanish\n * @iso-639-2 spa\n * @author Juan Angosto [@juanangosto]{@link https://github.com/juanangosto}\n * @author Guillermo Grau [@guigrpa]{@link https://github.com/guigrpa}\n * @author Fernando Agüero [@fjaguero]{@link https://github.com/fjaguero}\n * @author Gastón Haro [@harogaston]{@link https://github.com/harogaston}\n * @author Yago Carballo [@YagoCarballo]{@link https://github.com/YagoCarballo}\n */\nvar locale = {\n code: 'es',\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 1 /* Monday */,\n firstWeekContainsDate: 1\n }\n};\nexport default locale;","export default \"__VITE_ASSET__6b9154f5__\"","import { api } from './index';\n\nexport const chatMessagesApi = {\n create(data: Partial<ChatMessage>) {\n const path = '/api/internal/chat_messages';\n\n return api({\n method: 'post',\n url: path,\n data,\n });\n },\n};\n","<script setup lang=\"ts\">\nimport { chatMessagesApi } from '@/api/chat-messages';\nimport { useActionCable } from '@/hooks/actioncable';\nimport { convertKeys } from '@/utils/case-converter';\nimport { format } from 'date-fns';\nimport { groupBy, sortBy } from 'lodash';\nimport { computed, inject, nextTick, ref } from 'vue';\n\ninterface Props {\n productBooking: ProductBooking,\n chatMessages: ChatMessage[],\n}\n\nconst props = defineProps<Props>();\n\nconst user = inject<User>('user');\n\nconst userType = ref(user?.clientAccountId === props.productBooking.clientAccount.id ? 'client' : 'partner');\nconst recipient = ref(userType.value === 'client' ?\n props.productBooking.partnerAccount : props.productBooking.clientAccount);\n\nconst message = ref();\n\nfunction sendMessage() {\n if (!!message.value) {\n chatMessagesApi.create({\n chatId: props.productBooking.chatId,\n userId: user?.id,\n content: message.value,\n });\n message.value = '';\n }\n}\n\nconst newMessages = ref<ChatMessage[]>([]);\nconst messagesDiv = ref<HTMLDivElement>();\nuseActionCable(\n { channel: 'ChatChannel', id: props.productBooking.chatId },\n {\n received(eventNewResource:Record<string, unknown>) {\n const newMessage = convertKeys(eventNewResource, 'camelize');\n newMessages.value.push(newMessage as unknown as ChatMessage);\n nextTick(() => {\n if (messagesDiv.value) {\n messagesDiv.value.scrollTop = messagesDiv.value.scrollHeight;\n }\n });\n },\n },\n);\n\nconst sortedMessages = computed(() => {\n let allMessages = newMessages.value;\n if (props.chatMessages) {\n allMessages = allMessages.concat(props.chatMessages);\n }\n\n return groupBy(sortBy(allMessages, 'createdAt'), (msg) => format(new Date(msg.createdAt), 'yyyy-MM-dd'));\n});\n\nfunction handleBack() {\n window.history.back();\n}\n</script>\n<template>\n <the-layout\n hide-navbar\n :active-menu=\"2\"\n >\n <div class=\"relative flex h-[calc(100dvh-64px)] flex-col justify-between bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:rounded\">\n <div\n class=\"sticky top-0 z-10 flex w-full shrink-0 flex-col border-b border-z-gray-100 bg-white px-6 py-5\"\n >\n <div class=\"flex items-center justify-between\">\n <div class=\"flex shrink-0 space-x-2\">\n <button @click=\"handleBack\">\n <img src=\"@/assets/icons/chevron-left-alt.svg\">\n </button>\n <img\n :src=\"recipient.pictureUrl\"\n class=\"h-6 rounded-full\"\n >\n <p class=\"line-clamp-1 font-medium text-z-gray-900\">\n {{ recipient.firstName }}\n </p>\n </div>\n <p class=\"line-clamp-1 text-sm font-light text-z-gray-500\">\n {{ productBooking.product.name }}\n </p>\n </div>\n <p class=\"mt-1 text-end text-sm font-light text-z-gray-500\">\n {{ format(new Date(productBooking.startDate), \"d 'de' MMM\") }}\n -\n {{ format(new Date(productBooking.endDate), \"d 'de' MMM\") }}\n </p>\n </div>\n <div\n ref=\"messagesDiv\"\n class=\"h-max grow flex-col overflow-y-scroll bg-white px-6 pb-6\"\n >\n <div\n v-for=\"group, key in sortedMessages\"\n :key=\"key\"\n class=\"mt-4 flex flex-col\"\n >\n <p class=\"mb-4 w-full text-center text-xs\">\n {{ format(new Date(key), \"d 'de' MMM\") }}\n </p>\n <div class=\"flex w-full flex-col space-y-1\">\n <div\n v-for=\"msg in group\"\n :key=\"msg.id\"\n class=\"w-64 break-words rounded-lg p-3 text-sm\"\n :class=\"msg.userId === recipient.userId ?\n 'bg-z-gray-100 text-z-gray-900 self-start' :\n 'bg-z-gray-900 text-z-gray-100 self-end'\"\n >\n {{ msg.content }}\n </div>\n </div>\n </div>\n </div>\n <div class=\"h-[70px] w-full shrink-0 border-t border-z-gray-100 bg-white px-6 py-3 md:max-w-md\">\n <div class=\"flex h-full justify-between rounded-lg border border-z-gray-100 px-3 py-2\">\n <input\n v-model=\"message\"\n class=\"mr-2 h-full w-full text-sm text-z-gray-800 outline-none placeholder:text-sm placeholder:text-z-gray-500\"\n placeholder=\"Escribe un mensaje\"\n @keydown.enter.stop.prevent=\"sendMessage\"\n >\n <button\n class=\"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-z-turquoise-600\"\n @click=\"sendMessage\"\n >\n <img\n src=\"@/assets/icons/send.svg\"\n class=\"h-4 w-4\"\n >\n </button>\n </div>\n </div>\n </div>\n </the-layout>\n</template>\n","import { format } from 'date-fns';\n\nfunction formatDate(dateString: string) {\n return format(new Date(dateString), \"dd 'de' MMM 'de' yyyy\");\n}\n\nexport { formatDate };\n","<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport chatCard from './chat-card.vue';\n\ninterface Props {\n chatsWithClients: Chat[] | null\n chatsWithPartners: Chat[] | null\n}\n\ndefineProps<Props>();\n\nconst activeTab = ref(0);\n\nfunction setActiveTab(index: number) {\n activeTab.value = index;\n}\n</script>\n<template>\n <the-layout\n :active-menu=\"2\"\n hide-navbar\n >\n <div class=\"relative bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"Mis chats\"\n hide-back\n />\n <div\n class=\"grid grid-cols-2\"\n >\n <button\n class=\"h-12 border-b text-sm\"\n :class=\"activeTab === 0 ? ' border-z-turquoise-600' : 'border-z-gray-200'\"\n @click=\"setActiveTab(0)\"\n >\n con Clientes\n </button>\n <button\n class=\"h-12 border-b text-sm\"\n :class=\"activeTab === 1 ? ' border-z-turquoise-600' : 'border-z-gray-200'\"\n @click=\"setActiveTab(1)\"\n >\n con Socios\n </button>\n </div>\n <div\n v-if=\"activeTab === 0\"\n class=\"flex w-full flex-col divide-y divide-z-gray-100\"\n >\n <chat-card\n v-for=\"chat in chatsWithClients\"\n :key=\"chat.id\"\n :chat=\"chat\"\n type=\"partner\"\n />\n </div>\n <div\n v-if=\"activeTab === 1\"\n class=\"flex w-full flex-col divide-y divide-z-gray-100\"\n >\n <chat-card\n v-for=\"chat in chatsWithPartners\"\n :key=\"chat.id\"\n :chat=\"chat\"\n type=\"client\"\n />\n </div>\n </div>\n </the-layout>\n</template>\n","export default \"__VITE_ASSET__7deb6790__\"","function currency(value: number) {\n return new Intl.NumberFormat('es-CL', {\n style: 'currency',\n currency: 'CLP',\n currencyDisplay: 'symbol',\n useGrouping: true,\n }).format(value);\n}\n\nexport { currency };\n","<script setup lang=\"ts\">\nimport productCard from './product-card.vue';\n\ninterface Props {\n category: Category\n products?: Product[] | null\n}\ndefineProps<Props>();\n\nfunction handleBack() {\n window.history.back();\n}\n</script>\n<template>\n <the-layout hide-navbar>\n <div class=\"bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n :title=\"category.name\"\n @back=\"handleBack\"\n />\n <div class=\"p-6\">\n <div v-if=\"products\">\n <p class=\"text-center text-sm\">\n Encontramos {{ products.length }} producto{{ products.length === 1 ? '' : 's' }} en esta categoría:\n </p>\n <div\n class=\"mt-4 grid grid-cols-2 gap-4\"\n >\n <product-card\n v-for=\"product in products\"\n :key=\"product.id\"\n :product=\"product\"\n />\n </div>\n </div>\n <div\n v-else\n class=\"flex flex-col items-center\"\n >\n <img\n src=\"@/assets/icons/task-search.svg\"\n class=\"h-16 w-16\"\n >\n <p class=\"mt-6\">\n No hay productos en esta categoría\n </p>\n <p class=\"mt-6 text-center\">\n ¡Aprovecha esta oportunidad y\n </p>\n <a\n href=\"/como_subir\"\n class=\"text-center font-medium text-z-turquoise-700 underline\"\n >publica ahora!</a>\n </div>\n </div>\n </div>\n </the-layout>\n</template>\n","export default \"__VITE_ASSET__cf1edbc4__\"","export default \"__VITE_ASSET__de238c76__\"","export default \"__VITE_ASSET__275b58b8__\"","export default \"__VITE_ASSET__5f17521e__\"","export default \"__VITE_ASSET__ecbc5356__\"","export default \"__VITE_ASSET__eb735557__\"","export default \"__VITE_ASSET__2b4d7694__\"","export default \"__VITE_ASSET__1230c449__\"","export default \"__VITE_ASSET__38edb73e__\"","export default \"__VITE_ASSET__ea646552__\"","export default \"__VITE_ASSET__3331f266__\"","export default \"__VITE_ASSET__aaabd9ba__\"","import type { ProductFormData } from '@/api/products';\nimport { defineStore } from 'pinia';\nimport { ref } from 'vue';\n\nconst useStore = defineStore('store',\n // eslint-disable-next-line max-statements\n () => {\n const newProductBookingRange = ref<Date[]>();\n const productFormData = ref<Partial<ProductFormData>>();\n const backUrl = ref();\n const userLocation = ref<GeolocationCoordinates>();\n const hasNewMessages = ref();\n const referralCode = ref();\n\n function setNewProductBookingRange(data: Date[]) {\n newProductBookingRange.value = data;\n }\n\n function setProductFormData(data:Partial<ProductFormData>) {\n productFormData.value = data;\n }\n\n function setBackUrl(newFromHref:string, newToHref:string, newBackName:string) {\n backUrl.value = { fromHref: newFromHref, toHref: newToHref, name: newBackName };\n }\n\n function setUserLocation(location:GeolocationCoordinates) {\n userLocation.value = location;\n }\n\n function setHasNewMessages(value:boolean) {\n hasNewMessages.value = value;\n }\n\n function setReferralCode(value:string) {\n referralCode.value = value;\n }\n\n function resetNewProductBookingRange() {\n newProductBookingRange.value = undefined;\n }\n\n function resetProductFormData() {\n productFormData.value = undefined;\n }\n\n function resetBackUrl() {\n backUrl.value = undefined;\n }\n\n function resetUserLocation() {\n userLocation.value = undefined;\n }\n\n function resetHasNewMessages() {\n hasNewMessages.value = false;\n }\n\n return {\n newProductBookingRange,\n setNewProductBookingRange,\n resetNewProductBookingRange,\n productFormData,\n setProductFormData,\n resetProductFormData,\n backUrl,\n setBackUrl,\n resetBackUrl,\n userLocation,\n setUserLocation,\n resetUserLocation,\n hasNewMessages,\n setHasNewMessages,\n resetHasNewMessages,\n referralCode,\n setReferralCode,\n };\n },\n {\n persist: true,\n });\n\nexport { useStore };\n","import { api } from './index';\n\nexport interface ProductFormData extends Product {\n addressId: number\n productRequestId?: number\n categoryId: number\n subcategoryId: number\n pictures: File[]\n shippingMethodIds: string[]\n}\n\nexport const productsApi = {\n index(latitude:number, longitude:number) {\n const path = `/api/internal/products?latitude=${latitude}&longitude=${longitude}`;\n\n return api({\n method: 'get',\n url: path,\n }).then(response => response.data.products as Product[]);\n },\n\n highlighted(latitude?: number, longitude?: number) {\n const coordParams = latitude && longitude ? `?latitude=${latitude}&longitude=${longitude}` : '';\n const path = `/api/internal/products/highlighted${coordParams}`;\n\n return api({\n method: 'get',\n url: path,\n }).then(response => response.data.products as Product[]);\n },\n\n search(searchTerms:string, latitude?:number, longitude?:number) {\n const coordParams = latitude && longitude ? `&latitude=${latitude}&longitude=${longitude}` : '';\n const path = `/api/internal/products/search?q=${searchTerms}${coordParams}`;\n\n return api({\n method: 'get',\n url: path,\n }).then(response => response.data.products as Product[]);\n },\n\n show(id:number) {\n const path = `/api/internal/products/${id}`;\n\n return api({\n method: 'get',\n url: path,\n });\n },\n create(productData:Partial<ProductFormData>, pictures:File[]) {\n const path = '/api/internal/products';\n\n return api({\n method: 'post',\n headers: {\n 'Content-Type': 'multipart/form-data',\n },\n url: path,\n data: { ...productData, pictures },\n });\n },\n update(\n productId:number,\n productData:Partial<ProductFormData>,\n picturesToDelete?:number[],\n newPictures?:File[],\n ) {\n const path = `/api/internal/products/${productId}`;\n\n return api({\n method: 'patch',\n headers: {\n 'Content-Type': 'multipart/form-data',\n },\n url: path,\n data: { ...productData, picturesToDelete, newPictures },\n });\n },\n delete(id: number) {\n const path = `/api/internal/products/${id}`;\n\n return api({\n method: 'delete',\n url: path,\n });\n },\n};\n","function u(r,n,...a){if(r in n){let e=n[r];return typeof e==\"function\"?e(...a):e}let t=new Error(`Tried to handle \"${r}\" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(e=>`\"${e}\"`).join(\", \")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,u),t}export{u as match};\n","import{h as O,cloneVNode as x,Fragment as k}from\"vue\";import{match as w}from'./match.js';var N=(o=>(o[o.None=0]=\"None\",o[o.RenderStrategy=1]=\"RenderStrategy\",o[o.Static=2]=\"Static\",o))(N||{}),S=(e=>(e[e.Unmount=0]=\"Unmount\",e[e.Hidden=1]=\"Hidden\",e))(S||{});function H({visible:r=!0,features:t=0,ourProps:e,theirProps:o,...i}){var a;let n=j(o,e),l=Object.assign(i,{props:n});if(r||t&2&&n.static)return y(l);if(t&1){let d=(a=n.unmount)==null||a?0:1;return w(d,{[0](){return null},[1](){return y({...i,props:{...n,hidden:!0,style:{display:\"none\"}}})}})}return y(l)}function y({props:r,attrs:t,slots:e,slot:o,name:i}){var m,h;let{as:n,...l}=T(r,[\"unmount\",\"static\"]),a=(m=e.default)==null?void 0:m.call(e,o),d={};if(o){let u=!1,c=[];for(let[p,f]of Object.entries(o))typeof f==\"boolean\"&&(u=!0),f===!0&&c.push(p);u&&(d[\"data-headlessui-state\"]=c.join(\" \"))}if(n===\"template\"){if(a=b(a!=null?a:[]),Object.keys(l).length>0||Object.keys(t).length>0){let[u,...c]=a!=null?a:[];if(!v(u)||c.length>0)throw new Error(['Passing props on \"template\"!',\"\",`The current component <${i} /> is rendering a \"template\".`,\"However we need to passthrough the following props:\",Object.keys(l).concat(Object.keys(t)).map(s=>s.trim()).filter((s,g,R)=>R.indexOf(s)===g).sort((s,g)=>s.localeCompare(g)).map(s=>` - ${s}`).join(`\n`),\"\",\"You can apply a few solutions:\",['Add an `as=\"...\"` prop, to ensure that we render an actual element instead of a \"template\".',\"Render a single element as the child so that we can forward the props onto that element.\"].map(s=>` - ${s}`).join(`\n`)].join(`\n`));let p=j((h=u.props)!=null?h:{},l),f=x(u,p);for(let s in p)s.startsWith(\"on\")&&(f.props||(f.props={}),f.props[s]=p[s]);return f}return Array.isArray(a)&&a.length===1?a[0]:a}return O(n,Object.assign({},l,d),{default:()=>a})}function b(r){return r.flatMap(t=>t.type===k?b(t.children):[t])}function j(...r){var o;if(r.length===0)return{};if(r.length===1)return r[0];let t={},e={};for(let i of r)for(let n in i)n.startsWith(\"on\")&&typeof i[n]==\"function\"?((o=e[n])!=null||(e[n]=[]),e[n].push(i[n])):t[n]=i[n];if(t.disabled||t[\"aria-disabled\"])return Object.assign(t,Object.fromEntries(Object.keys(e).map(i=>[i,void 0])));for(let i in e)Object.assign(t,{[i](n,...l){let a=e[i];for(let d of a){if(n instanceof Event&&n.defaultPrevented)return;d(n,...l)}}});return t}function K(r){let t=Object.assign({},r);for(let e in t)t[e]===void 0&&delete t[e];return t}function T(r,t=[]){let e=Object.assign({},r);for(let o of t)o in e&&delete e[o];return e}function v(r){return r==null?!1:typeof r.type==\"string\"||typeof r.type==\"object\"||typeof r.type==\"function\"}export{N as Features,S as RenderStrategy,K as compact,T as omit,H as render};\n","let e=0;function n(){return++e}function t(){return n()}export{t as useId};\n","var o=(r=>(r.Space=\" \",r.Enter=\"Enter\",r.Escape=\"Escape\",r.Backspace=\"Backspace\",r.Delete=\"Delete\",r.ArrowLeft=\"ArrowLeft\",r.ArrowUp=\"ArrowUp\",r.ArrowRight=\"ArrowRight\",r.ArrowDown=\"ArrowDown\",r.Home=\"Home\",r.End=\"End\",r.PageUp=\"PageUp\",r.PageDown=\"PageDown\",r.Tab=\"Tab\",r))(o||{});export{o as Keys};\n","function f(r){throw new Error(\"Unexpected object: \"+r)}var a=(e=>(e[e.First=0]=\"First\",e[e.Previous=1]=\"Previous\",e[e.Next=2]=\"Next\",e[e.Last=3]=\"Last\",e[e.Specific=4]=\"Specific\",e[e.Nothing=5]=\"Nothing\",e))(a||{});function x(r,n){let t=n.resolveItems();if(t.length<=0)return null;let l=n.resolveActiveIndex(),s=l!=null?l:-1,d=(()=>{switch(r.focus){case 0:return t.findIndex(e=>!n.resolveDisabled(e));case 1:{let e=t.slice().reverse().findIndex((i,c,u)=>s!==-1&&u.length-c-1>=s?!1:!n.resolveDisabled(i));return e===-1?e:t.length-1-e}case 2:return t.findIndex((e,i)=>i<=s?!1:!n.resolveDisabled(e));case 3:{let e=t.slice().reverse().findIndex(i=>!n.resolveDisabled(i));return e===-1?e:t.length-1-e}case 4:return t.findIndex(e=>n.resolveId(e)===r.id);case 5:return null;default:f(r)}})();return d===-1?l:d}export{a as Focus,x as calculateActiveIndex};\n","function o(n){var l;return n==null||n.value==null?null:(l=n.value.$el)!=null?l:n.value}export{o as dom};\n","import{inject as r,provide as i}from\"vue\";let n=Symbol(\"Context\");var l=(e=>(e[e.Open=1]=\"Open\",e[e.Closed=2]=\"Closed\",e[e.Closing=4]=\"Closing\",e[e.Opening=8]=\"Opening\",e))(l||{});function C(){return p()!==null}function p(){return r(n,null)}function c(o){i(n,o)}export{l as State,C as hasOpenClosed,p as useOpenClosed,c as useOpenClosedProvider};\n","import{ref as f,onMounted as i,watchEffect as l}from\"vue\";import{dom as u}from'../utils/dom.js';function r(t,e){if(t)return t;let n=e!=null?e:\"button\";if(typeof n==\"string\"&&n.toLowerCase()===\"button\")return\"button\"}function b(t,e){let n=f(r(t.value.type,t.value.as));return i(()=>{n.value=r(t.value.type,t.value.as)}),l(()=>{var o;n.value||u(e)&&u(e)instanceof HTMLButtonElement&&!((o=u(e))!=null&&o.hasAttribute(\"type\"))&&(n.value=\"button\")}),n}export{b as useResolveButtonType};\n","var i=Object.defineProperty;var d=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var n=(t,e,r)=>(d(t,typeof e!=\"symbol\"?e+\"\":e,r),r);class s{constructor(){n(this,\"current\",this.detect());n(this,\"currentId\",0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current===\"server\"}get isClient(){return this.current===\"client\"}detect(){return typeof window==\"undefined\"||typeof document==\"undefined\"?\"server\":\"client\"}}let c=new s;export{c as env};\n","import{dom as o}from'./dom.js';import{env as t}from'./env.js';function m(r){if(t.isServer)return null;if(r instanceof Node)return r.ownerDocument;if(r!=null&&r.hasOwnProperty(\"value\")){let n=o(r);if(n)return n.ownerDocument}return document}export{m as getOwnerDocument};\n","import{nextTick as b}from\"vue\";import{match as M}from'./match.js';import{getOwnerDocument as f}from'./owner.js';let c=[\"[contentEditable=true]\",\"[tabindex]\",\"a[href]\",\"area[href]\",\"button:not([disabled])\",\"iframe\",\"input:not([disabled])\",\"select:not([disabled])\",\"textarea:not([disabled])\"].map(e=>`${e}:not([tabindex='-1'])`).join(\",\");var N=(n=>(n[n.First=1]=\"First\",n[n.Previous=2]=\"Previous\",n[n.Next=4]=\"Next\",n[n.Last=8]=\"Last\",n[n.WrapAround=16]=\"WrapAround\",n[n.NoScroll=32]=\"NoScroll\",n))(N||{}),T=(o=>(o[o.Error=0]=\"Error\",o[o.Overflow=1]=\"Overflow\",o[o.Success=2]=\"Success\",o[o.Underflow=3]=\"Underflow\",o))(T||{}),F=(t=>(t[t.Previous=-1]=\"Previous\",t[t.Next=1]=\"Next\",t))(F||{});function E(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(c)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var h=(t=>(t[t.Strict=0]=\"Strict\",t[t.Loose=1]=\"Loose\",t))(h||{});function w(e,r=0){var t;return e===((t=f(e))==null?void 0:t.body)?!1:M(r,{[0](){return e.matches(c)},[1](){let l=e;for(;l!==null;){if(l.matches(c))return!0;l=l.parentElement}return!1}})}function _(e){let r=f(e);b(()=>{r&&!w(r.activeElement,0)&&S(e)})}var y=(t=>(t[t.Keyboard=0]=\"Keyboard\",t[t.Mouse=1]=\"Mouse\",t))(y||{});typeof window!=\"undefined\"&&typeof document!=\"undefined\"&&(document.addEventListener(\"keydown\",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible=\"\")},!0),document.addEventListener(\"click\",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible=\"\")},!0));function S(e){e==null||e.focus({preventScroll:!0})}let H=[\"textarea\",\"input\"].join(\",\");function I(e){var r,t;return(t=(r=e==null?void 0:e.matches)==null?void 0:r.call(e,H))!=null?t:!1}function O(e,r=t=>t){return e.slice().sort((t,l)=>{let o=r(t),i=r(l);if(o===null||i===null)return 0;let n=o.compareDocumentPosition(i);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function v(e,r){return P(E(),r,{relativeTo:e})}function P(e,r,{sorted:t=!0,relativeTo:l=null,skipElements:o=[]}={}){var m;let i=(m=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?m:document,n=Array.isArray(e)?t?O(e):e:E(e);o.length>0&&n.length>1&&(n=n.filter(s=>!o.includes(s))),l=l!=null?l:i.activeElement;let x=(()=>{if(r&5)return 1;if(r&10)return-1;throw new Error(\"Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last\")})(),p=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,n.indexOf(l))-1;if(r&4)return Math.max(0,n.indexOf(l))+1;if(r&8)return n.length-1;throw new Error(\"Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last\")})(),L=r&32?{preventScroll:!0}:{},a=0,d=n.length,u;do{if(a>=d||a+d<=0)return 0;let s=p+a;if(r&16)s=(s+d)%d;else{if(s<0)return 3;if(s>=d)return 1}u=n[s],u==null||u.focus(L),a+=x}while(u!==i.activeElement);return r&6&&I(u)&&u.select(),2}export{N as Focus,T as FocusResult,h as FocusableMode,S as focusElement,v as focusFrom,P as focusIn,E as getFocusableElements,w as isFocusableElement,_ as restoreFocusIfNecessary,O as sortByDomNode};\n","import{watchEffect as r}from\"vue\";import{env as m}from'../utils/env.js';function u(e,t,n){m.isServer||r(o=>{document.addEventListener(e,t,n),o(()=>document.removeEventListener(e,t,n))})}export{u as useDocumentEvent};\n","import{watchEffect as i}from\"vue\";import{env as r}from'../utils/env.js';function w(e,n,t){r.isServer||i(o=>{window.addEventListener(e,n,t),o(()=>window.removeEventListener(e,n,t))})}export{w as useWindowEvent};\n","import{computed as E,ref as s}from\"vue\";import{FocusableMode as d,isFocusableElement as p}from'../utils/focus-management.js';import{dom as C}from'../utils/dom.js';import{useDocumentEvent as l}from'./use-document-event.js';import{useWindowEvent as T}from'./use-window-event.js';function y(f,c,i=E(()=>!0)){function a(e,r){if(!i.value||e.defaultPrevented)return;let t=r(e);if(t===null||!t.getRootNode().contains(t))return;let m=function o(n){return typeof n==\"function\"?o(n()):Array.isArray(n)||n instanceof Set?n:[n]}(f);for(let o of m){if(o===null)continue;let n=o instanceof HTMLElement?o:C(o);if(n!=null&&n.contains(t)||e.composed&&e.composedPath().includes(n))return}return!p(t,d.Loose)&&t.tabIndex!==-1&&e.preventDefault(),c(e,t)}let u=s(null);l(\"pointerdown\",e=>{var r,t;i.value&&(u.value=((t=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:t[0])||e.target)},!0),l(\"mousedown\",e=>{var r,t;i.value&&(u.value=((t=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:t[0])||e.target)},!0),l(\"click\",e=>{u.value&&(a(e,()=>u.value),u.value=null)},!0),l(\"touchend\",e=>a(e,()=>e.target instanceof HTMLElement?e.target:null),!0),T(\"blur\",e=>a(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}export{y as useOutsideClick};\n","import{defineComponent as i}from\"vue\";import{render as p}from'../utils/render.js';var a=(e=>(e[e.None=1]=\"None\",e[e.Focusable=2]=\"Focusable\",e[e.Hidden=4]=\"Hidden\",e))(a||{});let f=i({name:\"Hidden\",props:{as:{type:[Object,String],default:\"div\"},features:{type:Number,default:1}},setup(r,{slots:t,attrs:d}){return()=>{let{features:e,...o}=r,n={\"aria-hidden\":(e&2)===2?!0:void 0,style:{position:\"fixed\",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:\"hidden\",clip:\"rect(0, 0, 0, 0)\",whiteSpace:\"nowrap\",borderWidth:\"0\",...(e&4)===4&&(e&2)!==2&&{display:\"none\"}}};return p({ourProps:n,theirProps:o,slot:{},attrs:d,slots:t,name:\"Hidden\"})}}});export{a as Features,f as Hidden};\n","function e(n={},r=null,t=[]){for(let[i,o]of Object.entries(n))f(t,s(r,i),o);return t}function s(n,r){return n?n+\"[\"+r+\"]\":r}function f(n,r,t){if(Array.isArray(t))for(let[i,o]of t.entries())f(n,s(r,i.toString()),o);else t instanceof Date?n.push([r,t.toISOString()]):typeof t==\"boolean\"?n.push([r,t?\"1\":\"0\"]):typeof t==\"string\"?n.push([r,t]):typeof t==\"number\"?n.push([r,`${t}`]):t==null?n.push([r,\"\"]):e(t,r,n)}function p(n){var t;let r=(t=n==null?void 0:n.form)!=null?t:n.closest(\"form\");if(r){for(let i of r.elements)if(i.tagName===\"INPUT\"&&i.type===\"submit\"||i.tagName===\"BUTTON\"&&i.type===\"submit\"||i.nodeName===\"INPUT\"&&i.type===\"image\"){i.click();return}r.requestSubmit()}}export{p as attemptSubmit,e as objectToFormEntries};\n","import{computed as p,ref as s}from\"vue\";function d(u,e,r){let i=s(r==null?void 0:r.value),f=p(()=>u.value!==void 0);return[p(()=>f.value?u.value:i.value),function(t){return f.value||(i.value=t),e==null?void 0:e(t)}]}export{d as useControllable};\n","import{ref as o}from\"vue\";function r(e){return[e.screenX,e.screenY]}function u(){let e=o([-1,-1]);return{wasMoved(n){let t=r(n);return e.value[0]===t[0]&&e.value[1]===t[1]?!1:(e.value=t,!0)},update(n){e.value=r(n)}}}export{u as useTrackedPointer};\n","function t(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function i(){return/Android/gi.test(window.navigator.userAgent)}function n(){return t()||i()}export{i as isAndroid,t as isIOS,n as isMobile};\n","function r(){let n=[],s={addEventListener(e,t,i,a){return e.addEventListener(t,i,a),s.add(()=>e.removeEventListener(t,i,a))},requestAnimationFrame(...e){let t=requestAnimationFrame(...e);s.add(()=>cancelAnimationFrame(t))},nextFrame(...e){s.requestAnimationFrame(()=>{s.requestAnimationFrame(...e)})},setTimeout(...e){let t=setTimeout(...e);s.add(()=>clearTimeout(t))},style(e,t,i){let a=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:i}),this.add(()=>{Object.assign(e.style,{[t]:a})})},group(e){let t=r();return e(t),this.add(()=>t.dispose())},add(e){return n.push(e),()=>{let t=n.indexOf(e);if(t>=0)for(let i of n.splice(t,1))i()}},dispose(){for(let e of n.splice(0))e()}};return s}export{r as disposables};\n","import{ref as a}from\"vue\";import{useWindowEvent as t}from'./use-window-event.js';var d=(r=>(r[r.Forwards=0]=\"Forwards\",r[r.Backwards=1]=\"Backwards\",r))(d||{});function n(){let o=a(0);return t(\"keydown\",e=>{e.key===\"Tab\"&&(o.value=e.shiftKey?1:0)}),o}export{d as Direction,n as useTabDirection};\n","import{watchEffect as i}from\"vue\";import{env as a}from'../utils/env.js';function E(n,e,o,r){a.isServer||i(t=>{n=n!=null?n:window,n.addEventListener(e,o,r),t(()=>n.removeEventListener(e,o,r))})}export{E as useEventListener};\n","function t(e){typeof queueMicrotask==\"function\"?queueMicrotask(e):Promise.resolve().then(e).catch(o=>setTimeout(()=>{throw o}))}export{t as microTask};\n","function t(n){function e(){document.readyState!==\"loading\"&&(n(),document.removeEventListener(\"DOMContentLoaded\",e))}typeof window!=\"undefined\"&&typeof document!=\"undefined\"&&(document.addEventListener(\"DOMContentLoaded\",e),e())}export{t as onDocumentReady};\n","import{computed as F,defineComponent as I,h,onMounted as y,onUnmounted as R,ref as T,watch as k,Fragment as j,watchEffect as K}from\"vue\";import{render as U}from'../../utils/render.js';import{Hidden as D,Features as C}from'../../internal/hidden.js';import{dom as f}from'../../utils/dom.js';import{focusIn as w,Focus as v,focusElement as p,FocusResult as _}from'../../utils/focus-management.js';import{match as P}from'../../utils/match.js';import{useTabDirection as q,Direction as b}from'../../hooks/use-tab-direction.js';import{getOwnerDocument as G}from'../../utils/owner.js';import{useEventListener as W}from'../../hooks/use-event-listener.js';import{microTask as S}from'../../utils/micro-task.js';import{onDocumentReady as $}from'../../utils/document-ready.js';function B(e){if(!e)return new Set;if(typeof e==\"function\")return new Set(e());let t=new Set;for(let l of e.value){let o=f(l);o instanceof HTMLElement&&t.add(o)}return t}var A=(n=>(n[n.None=1]=\"None\",n[n.InitialFocus=2]=\"InitialFocus\",n[n.TabLock=4]=\"TabLock\",n[n.FocusLock=8]=\"FocusLock\",n[n.RestoreFocus=16]=\"RestoreFocus\",n[n.All=30]=\"All\",n))(A||{});let ce=Object.assign(I({name:\"FocusTrap\",props:{as:{type:[Object,String],default:\"div\"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:T(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:l,expose:o}){let r=T(null);o({el:r,$el:r});let i=F(()=>G(r)),n=T(!1);y(()=>n.value=!0),R(()=>n.value=!1),z({ownerDocument:i},F(()=>n.value&&Boolean(e.features&16)));let m=J({ownerDocument:i,container:r,initialFocus:F(()=>e.initialFocus)},F(()=>n.value&&Boolean(e.features&2)));Q({ownerDocument:i,container:r,containers:e.containers,previousActiveElement:m},F(()=>n.value&&Boolean(e.features&8)));let c=q();function u(a){let d=f(r);if(!d)return;(g=>g())(()=>{P(c.value,{[b.Forwards]:()=>{w(d,v.First,{skipElements:[a.relatedTarget]})},[b.Backwards]:()=>{w(d,v.Last,{skipElements:[a.relatedTarget]})}})})}let s=T(!1);function H(a){a.key===\"Tab\"&&(s.value=!0,requestAnimationFrame(()=>{s.value=!1}))}function M(a){if(!n.value)return;let d=B(e.containers);f(r)instanceof HTMLElement&&d.add(f(r));let E=a.relatedTarget;E instanceof HTMLElement&&E.dataset.headlessuiFocusGuard!==\"true\"&&(N(d,E)||(s.value?w(f(r),P(c.value,{[b.Forwards]:()=>v.Next,[b.Backwards]:()=>v.Previous})|v.WrapAround,{relativeTo:a.target}):a.target instanceof HTMLElement&&p(a.target)))}return()=>{let a={},d={ref:r,onKeydown:H,onFocusout:M},{features:E,initialFocus:g,containers:X,...O}=e;return h(j,[Boolean(E&4)&&h(D,{as:\"button\",type:\"button\",\"data-headlessui-focus-guard\":!0,onFocus:u,features:C.Focusable}),U({ourProps:d,theirProps:{...t,...O},slot:a,attrs:t,slots:l,name:\"FocusTrap\"}),Boolean(E&4)&&h(D,{as:\"button\",type:\"button\",\"data-headlessui-focus-guard\":!0,onFocus:u,features:C.Focusable})])}}}),{features:A}),L=[];$(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&L[0]!==t.target&&(L.unshift(t.target),L=L.filter(l=>l!=null&&l.isConnected),L.splice(10))}window.addEventListener(\"click\",e,{capture:!0}),window.addEventListener(\"mousedown\",e,{capture:!0}),window.addEventListener(\"focus\",e,{capture:!0}),document.body.addEventListener(\"click\",e,{capture:!0}),document.body.addEventListener(\"mousedown\",e,{capture:!0}),document.body.addEventListener(\"focus\",e,{capture:!0})});function x(e){let t=T(L.slice());return k([e],([l],[o])=>{o===!0&&l===!1?S(()=>{t.value.splice(0)}):o===!1&&l===!0&&(t.value=L.slice())},{flush:\"post\"}),()=>{var l;return(l=t.value.find(o=>o!=null&&o.isConnected))!=null?l:null}}function z({ownerDocument:e},t){let l=x(t);y(()=>{K(()=>{var o,r;t.value||((o=e.value)==null?void 0:o.activeElement)===((r=e.value)==null?void 0:r.body)&&p(l())},{flush:\"post\"})}),R(()=>{t.value&&p(l())})}function J({ownerDocument:e,container:t,initialFocus:l},o){let r=T(null),i=T(!1);return y(()=>i.value=!0),R(()=>i.value=!1),y(()=>{k([t,l,o],(n,m)=>{if(n.every((u,s)=>(m==null?void 0:m[s])===u)||!o.value)return;let c=f(t);c&&S(()=>{var H,M;if(!i.value)return;let u=f(l),s=(H=e.value)==null?void 0:H.activeElement;if(u){if(u===s){r.value=s;return}}else if(c.contains(s)){r.value=s;return}u?p(u):w(c,v.First|v.NoScroll)===_.Error&&console.warn(\"There are no focusable elements inside the <FocusTrap />\"),r.value=(M=e.value)==null?void 0:M.activeElement})},{immediate:!0,flush:\"post\"})}),r}function Q({ownerDocument:e,container:t,containers:l,previousActiveElement:o},r){var i;W((i=e.value)==null?void 0:i.defaultView,\"focus\",n=>{if(!r.value)return;let m=B(l);f(t)instanceof HTMLElement&&m.add(f(t));let c=o.value;if(!c)return;let u=n.target;u&&u instanceof HTMLElement?N(m,u)?(o.value=u,p(u)):(n.preventDefault(),n.stopPropagation(),p(c)):p(o.value)},!0)}function N(e,t){for(let l of e)if(l.contains(t))return!0;return!1}export{ce as FocusTrap};\n","import{ref as m,watchEffect as s}from\"vue\";import{dom as h}from'../utils/dom.js';let i=new Map,t=new Map;function E(d,f=m(!0)){s(o=>{var a;if(!f.value)return;let e=h(d);if(!e)return;o(function(){var u;if(!e)return;let r=(u=t.get(e))!=null?u:1;if(r===1?t.delete(e):t.set(e,r-1),r!==1)return;let n=i.get(e);n&&(n[\"aria-hidden\"]===null?e.removeAttribute(\"aria-hidden\"):e.setAttribute(\"aria-hidden\",n[\"aria-hidden\"]),e.inert=n.inert,i.delete(e))});let l=(a=t.get(e))!=null?a:0;t.set(e,l+1),l===0&&(i.set(e,{\"aria-hidden\":e.getAttribute(\"aria-hidden\"),inert:e.inert}),e.setAttribute(\"aria-hidden\",\"true\"),e.inert=!0)})}export{E as useInert};\n","import{defineComponent as l,inject as a,provide as c}from\"vue\";import{render as p}from'../utils/render.js';let e=Symbol(\"ForcePortalRootContext\");function u(){return a(e,!1)}let P=l({name:\"ForcePortalRoot\",props:{as:{type:[Object,String],default:\"template\"},force:{type:Boolean,default:!1}},setup(o,{slots:t,attrs:r}){return c(e,o.force),()=>{let{force:f,...n}=o;return p({theirProps:n,ourProps:{},slot:{},slots:t,attrs:r,name:\"ForcePortalRoot\"})}}});export{P as ForcePortalRoot,u as usePortalRoot};\n","import{Teleport as x,computed as C,defineComponent as p,h as H,inject as m,onMounted as M,onUnmounted as c,provide as g,reactive as L,ref as s,watchEffect as j}from\"vue\";import{render as T}from'../../utils/render.js';import{usePortalRoot as b}from'../../internal/portal-force-root.js';import{getOwnerDocument as y}from'../../utils/owner.js';import{dom as w}from'../../utils/dom.js';function E(t){let e=y(t);if(!e){if(t===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${t}`)}let u=e.getElementById(\"headlessui-portal-root\");if(u)return u;let r=e.createElement(\"div\");return r.setAttribute(\"id\",\"headlessui-portal-root\"),e.body.appendChild(r)}let U=p({name:\"Portal\",props:{as:{type:[Object,String],default:\"div\"}},setup(t,{slots:e,attrs:u}){let r=s(null),i=C(()=>y(r)),l=b(),n=m(h,null),o=s(l===!0||n==null?E(r.value):n.resolveTarget());j(()=>{l||n!=null&&(o.value=n.resolveTarget())});let d=m(f,null);return M(()=>{let a=w(r);a&&d&&c(d.register(a))}),c(()=>{var v,P;let a=(v=i.value)==null?void 0:v.getElementById(\"headlessui-portal-root\");a&&o.value===a&&o.value.children.length<=0&&((P=o.value.parentElement)==null||P.removeChild(o.value))}),()=>{if(o.value===null)return null;let a={ref:r,\"data-headlessui-portal\":\"\"};return H(x,{to:o.value},T({ourProps:a,theirProps:t,slot:{},attrs:u,slots:e,name:\"Portal\"}))}}}),f=Symbol(\"PortalParentContext\");function V(){let t=m(f,null),e=s([]);function u(l){return e.value.push(l),t&&t.register(l),()=>r(l)}function r(l){let n=e.value.indexOf(l);n!==-1&&e.value.splice(n,1),t&&t.unregister(l)}let i={register:u,unregister:r,portals:e};return[e,p({name:\"PortalWrapper\",setup(l,{slots:n}){return g(f,i),()=>{var o;return(o=n.default)==null?void 0:o.call(n)}}})]}let h=Symbol(\"PortalGroupContext\"),_=p({name:\"PortalGroup\",props:{as:{type:[Object,String],default:\"template\"},target:{type:Object,default:null}},setup(t,{attrs:e,slots:u}){let r=L({resolveTarget(){return t.target}});return g(h,r),()=>{let{target:i,...l}=t;return T({theirProps:l,ourProps:{},slot:{},attrs:e,slots:u,name:\"PortalGroup\"})}}});export{U as Portal,_ as PortalGroup,V as useNestedPortals};\n","import{inject as f,provide as m,onMounted as l,onUnmounted as c,watch as s}from\"vue\";let u=Symbol(\"StackContext\");var p=(e=>(e[e.Add=0]=\"Add\",e[e.Remove=1]=\"Remove\",e))(p||{});function v(){return f(u,()=>{})}function S({type:o,enabled:r,element:e,onUpdate:i}){let a=v();function t(...n){i==null||i(...n),a(...n)}l(()=>{s(r,(n,d)=>{n?t(0,o,e):d===!0&&t(1,o,e)},{immediate:!0,flush:\"sync\"})}),c(()=>{r.value&&t(1,o,e)}),m(u,t)}export{p as StackMessage,v as useStackContext,S as useStackProvider};\n","import{computed as m,defineComponent as x,inject as R,onMounted as v,onUnmounted as D,provide as j,ref as u,unref as y}from\"vue\";import{useId as C}from'../../hooks/use-id.js';import{render as h}from'../../utils/render.js';let p=Symbol(\"DescriptionContext\");function b(){let t=R(p,null);if(t===null)throw new Error(\"Missing parent\");return t}function M({slot:t=u({}),name:i=\"Description\",props:o={}}={}){let e=u([]);function s(n){return e.value.push(n),()=>{let r=e.value.indexOf(n);r!==-1&&e.value.splice(r,1)}}return j(p,{register:s,slot:t,name:i,props:o}),m(()=>e.value.length>0?e.value.join(\" \"):void 0)}let E=x({name:\"Description\",props:{as:{type:[Object,String],default:\"p\"},id:{type:String,default:()=>`headlessui-description-${C()}`}},setup(t,{attrs:i,slots:o}){let e=b();return v(()=>D(e.register(t.id))),()=>{let{name:s=\"Description\",slot:n=u({}),props:r={}}=e,{id:d,...l}=t,c={...Object.entries(r).reduce((f,[a,g])=>Object.assign(f,{[a]:y(g)}),{}),id:d};return h({ourProps:c,theirProps:l,slot:n.value,attrs:i,slots:o,name:s})}}});export{E as Description,M as useDescriptions};\n","import{onUnmounted as o,shallowRef as n}from\"vue\";function m(t){let e=n(t.getSnapshot());return o(t.subscribe(()=>{e.value=t.getSnapshot()})),e}export{m as useStore};\n","function a(o,r){let t=o(),n=new Set;return{getSnapshot(){return t},subscribe(e){return n.add(e),()=>n.delete(e)},dispatch(e,...s){let i=r[e].call(t,...s);i&&(t=i,n.forEach(c=>c()))}}}export{a as createStore};\n","function c(){let o;return{before({doc:e}){var l;let n=e.documentElement;o=((l=e.defaultView)!=null?l:window).innerWidth-n.clientWidth},after({doc:e,d:n}){let t=e.documentElement,l=t.clientWidth-t.offsetWidth,r=o-l;n.style(t,\"paddingRight\",`${r}px`)}}}export{c as adjustScrollbarPadding};\n","import{isIOS as f}from'../../utils/platform.js';function p(){if(!f())return{};let o;return{before(){o=window.pageYOffset},after({doc:r,d:l,meta:s}){function i(e){return s.containers.flatMap(t=>t()).some(t=>t.contains(e))}l.style(r.body,\"marginTop\",`-${o}px`),window.scrollTo(0,0);let n=null;l.addEventListener(r,\"click\",e=>{if(e.target instanceof HTMLElement)try{let t=e.target.closest(\"a\");if(!t)return;let{hash:c}=new URL(t.href),a=r.querySelector(c);a&&!i(a)&&(n=a)}catch{}},!0),l.addEventListener(r,\"touchmove\",e=>{e.target instanceof HTMLElement&&!i(e.target)&&e.preventDefault()},{passive:!1}),l.add(()=>{window.scrollTo(0,window.pageYOffset+o),n&&n.isConnected&&(n.scrollIntoView({block:\"nearest\"}),n=null)})}}}export{p as handleIOSLocking};\n","function l(){return{before({doc:e,d:o}){o.style(e.documentElement,\"overflow\",\"hidden\")}}}export{l as preventScroll};\n","import{disposables as s}from'../../utils/disposables.js';import{createStore as i}from'../../utils/store.js';import{adjustScrollbarPadding as l}from'./adjust-scrollbar-padding.js';import{handleIOSLocking as d}from'./handle-ios-locking.js';import{preventScroll as p}from'./prevent-scroll.js';function m(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let a=i(()=>new Map,{PUSH(e,n){var o;let t=(o=this.get(e))!=null?o:{doc:e,count:0,d:s(),meta:new Set};return t.count++,t.meta.add(n),this.set(e,t),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let o={doc:e,d:n,meta:m(t)},c=[d(),l(),p()];c.forEach(({before:r})=>r==null?void 0:r(o)),c.forEach(({after:r})=>r==null?void 0:r(o))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});a.subscribe(()=>{let e=a.getSnapshot(),n=new Map;for(let[t]of e)n.set(t,t.documentElement.style.overflow);for(let t of e.values()){let o=n.get(t.doc)===\"hidden\",c=t.count!==0;(c&&!o||!c&&o)&&a.dispatch(t.count>0?\"SCROLL_PREVENT\":\"SCROLL_ALLOW\",t),t.count===0&&a.dispatch(\"TEARDOWN\",t)}});export{a as overflows};\n","import{useStore as p}from'../../hooks/use-store.js';import{overflows as u}from'./overflow-store.js';import{computed as s,watch as v}from\"vue\";function d(t,a,n){let i=p(u),l=s(()=>{let e=t.value?i.value.get(t.value):void 0;return e?e.count>0:!1});return v([t,a],([e,m],[r],o)=>{if(!e||!m)return;u.dispatch(\"PUSH\",e,n);let f=!1;o(()=>{f||(u.dispatch(\"POP\",r!=null?r:e,n),f=!0)})},{immediate:!0}),l}export{d as useDocumentOverflowLockedEffect};\n","import{ref as a,h as m}from\"vue\";import{Hidden as c,Features as s}from'../internal/hidden.js';import{getOwnerDocument as d}from'../utils/owner.js';import{dom as H}from'../utils/dom.js';function p({defaultContainers:r=[],portals:t}={}){let o=a(null),l=d(o);function u(){var i;let n=[];for(let e of r)e!==null&&(e instanceof HTMLElement?n.push(e):\"value\"in e&&e.value instanceof HTMLElement&&n.push(e.value));if(t!=null&&t.value)for(let e of t.value)n.push(e);for(let e of(i=l==null?void 0:l.querySelectorAll(\"html > *, body > *\"))!=null?i:[])e!==document.body&&e!==document.head&&e instanceof HTMLElement&&e.id!==\"headlessui-portal-root\"&&(e.contains(H(o))||n.some(f=>e.contains(f))||n.push(e));return n}return{resolveContainers:u,contains(n){return u().some(i=>i.contains(n))},mainTreeNodeRef:o,MainTreeNode(){return m(c,{features:s.Hidden,ref:o})}}}export{p as useRootContainers};\n","import{computed as a,defineComponent as h,h as g,inject as K,nextTick as ae,onMounted as B,onUnmounted as ne,provide as ie,ref as S,watchEffect as ue}from\"vue\";import{render as O,Features as _}from'../../utils/render.js';import{Keys as se}from'../../keyboard.js';import{useId as P}from'../../hooks/use-id.js';import{FocusTrap as b}from'../../components/focus-trap/focus-trap.js';import{useInert as q}from'../../hooks/use-inert.js';import{Portal as U,PortalGroup as pe,useNestedPortals as fe}from'../portal/portal.js';import{StackMessage as Y,useStackProvider as de}from'../../internal/stack-context.js';import{match as z}from'../../utils/match.js';import{ForcePortalRoot as I}from'../../internal/portal-force-root.js';import{Description as ce,useDescriptions as ge}from'../description/description.js';import{dom as L}from'../../utils/dom.js';import{useOpenClosed as me,State as w}from'../../internal/open-closed.js';import{useOutsideClick as ve}from'../../hooks/use-outside-click.js';import{getOwnerDocument as De}from'../../utils/owner.js';import{useEventListener as Se}from'../../hooks/use-event-listener.js';import{useDocumentOverflowLockedEffect as ye}from'../../hooks/document-overflow/use-document-overflow.js';import{useRootContainers as he}from'../../hooks/use-root-containers.js';var Oe=(t=>(t[t.Open=0]=\"Open\",t[t.Closed=1]=\"Closed\",t))(Oe||{});let F=Symbol(\"DialogContext\");function C(o){let n=K(F,null);if(n===null){let t=new Error(`<${o} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,C),t}return n}let M=\"DC8F892D-2EBD-447C-A4C8-A03058436FF4\",Ue=h({name:\"Dialog\",inheritAttrs:!1,props:{as:{type:[Object,String],default:\"div\"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:M},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`headlessui-dialog-${P()}`}},emits:{close:o=>!0},setup(o,{emit:n,attrs:t,slots:u,expose:i}){var N;let r=S(!1);B(()=>{r.value=!0});let s=S(0),p=me(),m=a(()=>o.open===M&&p!==null?(p.value&w.Open)===w.Open:o.open),v=S(null),T=a(()=>De(v));if(i({el:v,$el:v}),!(o.open!==M||p!==null))throw new Error(\"You forgot to provide an `open` prop to the `Dialog`.\");if(typeof m.value!=\"boolean\")throw new Error(`You provided an \\`open\\` prop to the \\`Dialog\\`, but the value is not a boolean. Received: ${m.value===M?void 0:o.open}`);let c=a(()=>r.value&&m.value?0:1),R=a(()=>c.value===0),E=a(()=>s.value>1),$=K(F,null)!==null,[G,V]=fe(),{resolveContainers:x,mainTreeNodeRef:j,MainTreeNode:W}=he({portals:G,defaultContainers:[a(()=>{var e;return(e=y.panelRef.value)!=null?e:v.value})]}),J=a(()=>E.value?\"parent\":\"leaf\"),H=a(()=>p!==null?(p.value&w.Closing)===w.Closing:!1),Q=a(()=>$||H.value?!1:R.value),X=a(()=>{var e,l,f;return(f=Array.from((l=(e=T.value)==null?void 0:e.querySelectorAll(\"body > *\"))!=null?l:[]).find(d=>d.id===\"headlessui-portal-root\"?!1:d.contains(L(j))&&d instanceof HTMLElement))!=null?f:null});q(X,Q);let Z=a(()=>E.value?!0:R.value),ee=a(()=>{var e,l,f;return(f=Array.from((l=(e=T.value)==null?void 0:e.querySelectorAll(\"[data-headlessui-portal]\"))!=null?l:[]).find(d=>d.contains(L(j))&&d instanceof HTMLElement))!=null?f:null});q(ee,Z),de({type:\"Dialog\",enabled:a(()=>c.value===0),element:v,onUpdate:(e,l)=>{if(l===\"Dialog\")return z(e,{[Y.Add]:()=>s.value+=1,[Y.Remove]:()=>s.value-=1})}});let te=ge({name:\"DialogDescription\",slot:a(()=>({open:m.value}))}),k=S(null),y={titleId:k,panelRef:S(null),dialogState:c,setTitleId(e){k.value!==e&&(k.value=e)},close(){n(\"close\",!1)}};ie(F,y);let le=a(()=>!(!R.value||E.value));ve(x,(e,l)=>{y.close(),ae(()=>l==null?void 0:l.focus())},le);let oe=a(()=>!(E.value||c.value!==0));Se((N=T.value)==null?void 0:N.defaultView,\"keydown\",e=>{oe.value&&(e.defaultPrevented||e.key===se.Escape&&(e.preventDefault(),e.stopPropagation(),y.close()))});let re=a(()=>!(H.value||c.value!==0||$));return ye(T,re,e=>{var l;return{containers:[...(l=e.containers)!=null?l:[],x]}}),ue(e=>{if(c.value!==0)return;let l=L(v);if(!l)return;let f=new ResizeObserver(d=>{for(let A of d){let D=A.target.getBoundingClientRect();D.x===0&&D.y===0&&D.width===0&&D.height===0&&y.close()}});f.observe(l),e(()=>f.disconnect())}),()=>{let{id:e,open:l,initialFocus:f,...d}=o,A={...t,ref:v,id:e,role:\"dialog\",\"aria-modal\":c.value===0?!0:void 0,\"aria-labelledby\":k.value,\"aria-describedby\":te.value},D={open:c.value===0};return g(I,{force:!0},()=>[g(U,()=>g(pe,{target:v.value},()=>g(I,{force:!1},()=>g(b,{initialFocus:f,containers:x,features:R.value?z(J.value,{parent:b.features.RestoreFocus,leaf:b.features.All&~b.features.FocusLock}):b.features.None},()=>g(V,{},()=>O({ourProps:A,theirProps:{...d,...t},slot:D,attrs:t,slots:u,visible:c.value===0,features:_.RenderStrategy|_.Static,name:\"Dialog\"})))))),g(W)])}}}),Ye=h({name:\"DialogOverlay\",props:{as:{type:[Object,String],default:\"div\"},id:{type:String,default:()=>`headlessui-dialog-overlay-${P()}`}},setup(o,{attrs:n,slots:t}){let u=C(\"DialogOverlay\");function i(r){r.target===r.currentTarget&&(r.preventDefault(),r.stopPropagation(),u.close())}return()=>{let{id:r,...s}=o;return O({ourProps:{id:r,\"aria-hidden\":!0,onClick:i},theirProps:s,slot:{open:u.dialogState.value===0},attrs:n,slots:t,name:\"DialogOverlay\"})}}}),ze=h({name:\"DialogBackdrop\",props:{as:{type:[Object,String],default:\"div\"},id:{type:String,default:()=>`headlessui-dialog-backdrop-${P()}`}},inheritAttrs:!1,setup(o,{attrs:n,slots:t,expose:u}){let i=C(\"DialogBackdrop\"),r=S(null);return u({el:r,$el:r}),B(()=>{if(i.panelRef.value===null)throw new Error(\"A <DialogBackdrop /> component is being used, but a <DialogPanel /> component is missing.\")}),()=>{let{id:s,...p}=o,m={id:s,ref:r,\"aria-hidden\":!0};return g(I,{force:!0},()=>g(U,()=>O({ourProps:m,theirProps:{...n,...p},slot:{open:i.dialogState.value===0},attrs:n,slots:t,name:\"DialogBackdrop\"})))}}}),Ge=h({name:\"DialogPanel\",props:{as:{type:[Object,String],default:\"div\"},id:{type:String,default:()=>`headlessui-dialog-panel-${P()}`}},setup(o,{attrs:n,slots:t,expose:u}){let i=C(\"DialogPanel\");u({el:i.panelRef,$el:i.panelRef});function r(s){s.stopPropagation()}return()=>{let{id:s,...p}=o,m={id:s,ref:i.panelRef,onClick:r};return O({ourProps:m,theirProps:p,slot:{open:i.dialogState.value===0},attrs:n,slots:t,name:\"DialogPanel\"})}}}),Ve=h({name:\"DialogTitle\",props:{as:{type:[Object,String],default:\"h2\"},id:{type:String,default:()=>`headlessui-dialog-title-${P()}`}},setup(o,{attrs:n,slots:t}){let u=C(\"DialogTitle\");return B(()=>{u.setTitleId(o.id),ne(()=>u.setTitleId(null))}),()=>{let{id:i,...r}=o;return O({ourProps:{id:i},theirProps:r,slot:{open:u.dialogState.value===0},attrs:n,slots:t,name:\"DialogTitle\"})}}}),We=ce;export{Ue as Dialog,ze as DialogBackdrop,We as DialogDescription,Ye as DialogOverlay,Ge as DialogPanel,Ve as DialogTitle};\n","import{defineComponent as y,ref as p,provide as C,inject as O,computed as m,watchEffect as M,onMounted as P,onUnmounted as h}from\"vue\";import{Keys as f}from'../../keyboard.js';import{match as I}from'../../utils/match.js';import{render as b,Features as R}from'../../utils/render.js';import{useId as E}from'../../hooks/use-id.js';import{dom as d}from'../../utils/dom.js';import{useOpenClosedProvider as w,State as v,useOpenClosed as H}from'../../internal/open-closed.js';import{useResolveButtonType as L}from'../../hooks/use-resolve-button-type.js';var j=(o=>(o[o.Open=0]=\"Open\",o[o.Closed=1]=\"Closed\",o))(j||{});let x=Symbol(\"DisclosureContext\");function g(l){let r=O(x,null);if(r===null){let o=new Error(`<${l} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,g),o}return r}let B=Symbol(\"DisclosurePanelContext\");function $(){return O(B,null)}let Q=y({name:\"Disclosure\",props:{as:{type:[Object,String],default:\"template\"},defaultOpen:{type:[Boolean],default:!1}},setup(l,{slots:r,attrs:o}){let u=p(l.defaultOpen?0:1),e=p(null),i=p(null),s={buttonId:p(null),panelId:p(null),disclosureState:u,panel:e,button:i,toggleDisclosure(){u.value=I(u.value,{[0]:1,[1]:0})},closeDisclosure(){u.value!==1&&(u.value=1)},close(t){s.closeDisclosure();let a=(()=>t?t instanceof HTMLElement?t:t.value instanceof HTMLElement?d(t):d(s.button):d(s.button))();a==null||a.focus()}};return C(x,s),w(m(()=>I(u.value,{[0]:v.Open,[1]:v.Closed}))),()=>{let{defaultOpen:t,...a}=l,c={open:u.value===0,close:s.close};return b({theirProps:a,ourProps:{},slot:c,slots:r,attrs:o,name:\"Disclosure\"})}}}),V=y({name:\"DisclosureButton\",props:{as:{type:[Object,String],default:\"button\"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`headlessui-disclosure-button-${E()}`}},setup(l,{attrs:r,slots:o,expose:u}){let e=g(\"DisclosureButton\");P(()=>{e.buttonId.value=l.id}),h(()=>{e.buttonId.value=null});let i=$(),s=m(()=>i===null?!1:i.value===e.panelId.value),t=p(null);u({el:t,$el:t}),s.value||M(()=>{e.button.value=t.value});let a=L(m(()=>({as:l.as,type:r.type})),t);function c(){var n;l.disabled||(s.value?(e.toggleDisclosure(),(n=d(e.button))==null||n.focus()):e.toggleDisclosure())}function D(n){var S;if(!l.disabled)if(s.value)switch(n.key){case f.Space:case f.Enter:n.preventDefault(),n.stopPropagation(),e.toggleDisclosure(),(S=d(e.button))==null||S.focus();break}else switch(n.key){case f.Space:case f.Enter:n.preventDefault(),n.stopPropagation(),e.toggleDisclosure();break}}function T(n){switch(n.key){case f.Space:n.preventDefault();break}}return()=>{let n={open:e.disclosureState.value===0},{id:S,...k}=l,K=s.value?{ref:t,type:a.value,onClick:c,onKeydown:D}:{id:S,ref:t,type:a.value,\"aria-expanded\":e.disclosureState.value===0,\"aria-controls\":d(e.panel)?e.panelId.value:void 0,disabled:l.disabled?!0:void 0,onClick:c,onKeydown:D,onKeyup:T};return b({ourProps:K,theirProps:k,slot:n,attrs:r,slots:o,name:\"DisclosureButton\"})}}}),X=y({name:\"DisclosurePanel\",props:{as:{type:[Object,String],default:\"div\"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`headlessui-disclosure-panel-${E()}`}},setup(l,{attrs:r,slots:o,expose:u}){let e=g(\"DisclosurePanel\");P(()=>{e.panelId.value=l.id}),h(()=>{e.panelId.value=null}),u({el:e.panel,$el:e.panel}),C(B,e.panelId);let i=H(),s=m(()=>i!==null?(i.value&v.Open)===v.Open:e.disclosureState.value===0);return()=>{let t={open:e.disclosureState.value===0,close:e.close},{id:a,...c}=l,D={id:a,ref:e.panel};return b({ourProps:D,theirProps:c,slot:t,attrs:r,slots:o,features:R.RenderStrategy|R.Static,visible:s.value,name:\"DisclosurePanel\"})}}});export{Q as Disclosure,V as DisclosureButton,X as DisclosurePanel};\n","let a=/([\\u2700-\\u27BF]|[\\uE000-\\uF8FF]|\\uD83C[\\uDC00-\\uDFFF]|\\uD83D[\\uDC00-\\uDFFF]|[\\u2011-\\u26FF]|\\uD83E[\\uDD10-\\uDDFF])/g;function o(e){var r,i;let n=(r=e.innerText)!=null?r:\"\",t=e.cloneNode(!0);if(!(t instanceof HTMLElement))return n;let u=!1;for(let f of t.querySelectorAll('[hidden],[aria-hidden],[role=\"img\"]'))f.remove(),u=!0;let l=u?(i=t.innerText)!=null?i:\"\":n;return a.test(l)&&(l=l.replace(a,\"\")),l}function g(e){let n=e.getAttribute(\"aria-label\");if(typeof n==\"string\")return n.trim();let t=e.getAttribute(\"aria-labelledby\");if(t){let u=t.split(\" \").map(l=>{let r=document.getElementById(l);if(r){let i=r.getAttribute(\"aria-label\");return typeof i==\"string\"?i.trim():o(r).trim()}return null}).filter(Boolean);if(u.length>0)return u.join(\", \")}return o(e).trim()}export{g as getTextValue};\n","import{ref as n}from\"vue\";import{getTextValue as o}from'../utils/get-text-value.js';import{dom as i}from'../utils/dom.js';function p(a){let t=n(\"\"),r=n(\"\");return()=>{let e=i(a);if(!e)return\"\";let l=e.innerText;if(t.value===l)return r.value;let u=o(e).trim().toLowerCase();return t.value=l,r.value=u,u}}export{p as useTextValue};\n","import{Fragment as Q,computed as S,defineComponent as I,h as K,inject as z,nextTick as C,onMounted as B,onUnmounted as _,provide as q,ref as D,toRaw as T,watch as N,watchEffect as W}from\"vue\";import{Features as H,render as E,omit as G,compact as J}from'../../utils/render.js';import{useId as A}from'../../hooks/use-id.js';import{Keys as p}from'../../keyboard.js';import{calculateActiveIndex as X,Focus as O}from'../../utils/calculate-active-index.js';import{dom as c}from'../../utils/dom.js';import{useOpenClosed as Y,State as F,useOpenClosedProvider as Z}from'../../internal/open-closed.js';import{match as P}from'../../utils/match.js';import{useResolveButtonType as ee}from'../../hooks/use-resolve-button-type.js';import{FocusableMode as te,isFocusableElement as oe,sortByDomNode as ie}from'../../utils/focus-management.js';import{useOutsideClick as ae}from'../../hooks/use-outside-click.js';import{Hidden as ne,Features as le}from'../../internal/hidden.js';import{objectToFormEntries as ue}from'../../utils/form.js';import{useControllable as re}from'../../hooks/use-controllable.js';import{useTrackedPointer as se}from'../../hooks/use-tracked-pointer.js';import{useTextValue as de}from'../../hooks/use-text-value.js';function fe(t,v){return t===v}var pe=(u=>(u[u.Open=0]=\"Open\",u[u.Closed=1]=\"Closed\",u))(pe||{}),ce=(u=>(u[u.Single=0]=\"Single\",u[u.Multi=1]=\"Multi\",u))(ce||{}),ve=(u=>(u[u.Pointer=0]=\"Pointer\",u[u.Other=1]=\"Other\",u))(ve||{});function be(t){requestAnimationFrame(()=>requestAnimationFrame(t))}let U=Symbol(\"ListboxContext\");function j(t){let v=z(U,null);if(v===null){let u=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(u,j),u}return v}let Fe=I({name:\"Listbox\",emits:{\"update:modelValue\":t=>!0},props:{as:{type:[Object,String],default:\"template\"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>fe},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(t,{slots:v,attrs:u,emit:L}){let e=D(1),s=D(null),b=D(null),m=D(null),f=D([]),o=D(\"\"),a=D(null),w=D(1);function k(i=n=>n){let n=a.value!==null?f.value[a.value]:null,l=ie(i(f.value.slice()),x=>c(x.dataRef.domRef)),d=n?l.indexOf(n):null;return d===-1&&(d=null),{options:l,activeOptionIndex:d}}let g=S(()=>t.multiple?1:0),[y,M]=re(S(()=>t.modelValue===void 0?P(g.value,{[1]:[],[0]:void 0}):t.modelValue),i=>L(\"update:modelValue\",i),S(()=>t.defaultValue)),h={listboxState:e,value:y,mode:g,compare(i,n){if(typeof t.by==\"string\"){let l=t.by;return(i==null?void 0:i[l])===(n==null?void 0:n[l])}return t.by(i,n)},orientation:S(()=>t.horizontal?\"horizontal\":\"vertical\"),labelRef:s,buttonRef:b,optionsRef:m,disabled:S(()=>t.disabled),options:f,searchQuery:o,activeOptionIndex:a,activationTrigger:w,closeListbox(){t.disabled||e.value!==1&&(e.value=1,a.value=null)},openListbox(){t.disabled||e.value!==0&&(e.value=0)},goToOption(i,n,l){if(t.disabled||e.value===1)return;let d=k(),x=X(i===O.Specific?{focus:O.Specific,id:n}:{focus:i},{resolveItems:()=>d.options,resolveActiveIndex:()=>d.activeOptionIndex,resolveId:R=>R.id,resolveDisabled:R=>R.dataRef.disabled});o.value=\"\",a.value=x,w.value=l!=null?l:1,f.value=d.options},search(i){if(t.disabled||e.value===1)return;let l=o.value!==\"\"?0:1;o.value+=i.toLowerCase();let x=(a.value!==null?f.value.slice(a.value+l).concat(f.value.slice(0,a.value+l)):f.value).find(V=>V.dataRef.textValue.startsWith(o.value)&&!V.dataRef.disabled),R=x?f.value.indexOf(x):-1;R===-1||R===a.value||(a.value=R,w.value=1)},clearSearch(){t.disabled||e.value!==1&&o.value!==\"\"&&(o.value=\"\")},registerOption(i,n){let l=k(d=>[...d,{id:i,dataRef:n}]);f.value=l.options,a.value=l.activeOptionIndex},unregisterOption(i){let n=k(l=>{let d=l.findIndex(x=>x.id===i);return d!==-1&&l.splice(d,1),l});f.value=n.options,a.value=n.activeOptionIndex,w.value=1},select(i){t.disabled||M(P(g.value,{[0]:()=>i,[1]:()=>{let n=T(h.value.value).slice(),l=T(i),d=n.findIndex(x=>h.compare(l,T(x)));return d===-1?n.push(l):n.splice(d,1),n}}))}};ae([b,m],(i,n)=>{var l;h.closeListbox(),oe(n,te.Loose)||(i.preventDefault(),(l=c(b))==null||l.focus())},S(()=>e.value===0)),q(U,h),Z(S(()=>P(e.value,{[0]:F.Open,[1]:F.Closed})));let r=S(()=>{var i;return(i=c(b))==null?void 0:i.closest(\"form\")});return B(()=>{N([r],()=>{if(!r.value||t.defaultValue===void 0)return;function i(){h.select(t.defaultValue)}return r.value.addEventListener(\"reset\",i),()=>{var n;(n=r.value)==null||n.removeEventListener(\"reset\",i)}},{immediate:!0})}),()=>{let{name:i,modelValue:n,disabled:l,form:d,...x}=t,R={open:e.value===0,disabled:l,value:y.value};return K(Q,[...i!=null&&y.value!=null?ue({[i]:y.value}).map(([V,$])=>K(ne,J({features:le.Hidden,key:V,as:\"input\",type:\"hidden\",hidden:!0,readOnly:!0,form:d,name:V,value:$}))):[],E({ourProps:{},theirProps:{...u,...G(x,[\"defaultValue\",\"onUpdate:modelValue\",\"horizontal\",\"multiple\",\"by\"])},slot:R,slots:v,attrs:u,name:\"Listbox\"})])}}}),Be=I({name:\"ListboxLabel\",props:{as:{type:[Object,String],default:\"label\"},id:{type:String,default:()=>`headlessui-listbox-label-${A()}`}},setup(t,{attrs:v,slots:u}){let L=j(\"ListboxLabel\");function e(){var s;(s=c(L.buttonRef))==null||s.focus({preventScroll:!0})}return()=>{let s={open:L.listboxState.value===0,disabled:L.disabled.value},{id:b,...m}=t,f={id:b,ref:L.labelRef,onClick:e};return E({ourProps:f,theirProps:m,slot:s,attrs:v,slots:u,name:\"ListboxLabel\"})}}}),Ke=I({name:\"ListboxButton\",props:{as:{type:[Object,String],default:\"button\"},id:{type:String,default:()=>`headlessui-listbox-button-${A()}`}},setup(t,{attrs:v,slots:u,expose:L}){let e=j(\"ListboxButton\");L({el:e.buttonRef,$el:e.buttonRef});function s(o){switch(o.key){case p.Space:case p.Enter:case p.ArrowDown:o.preventDefault(),e.openListbox(),C(()=>{var a;(a=c(e.optionsRef))==null||a.focus({preventScroll:!0}),e.value.value||e.goToOption(O.First)});break;case p.ArrowUp:o.preventDefault(),e.openListbox(),C(()=>{var a;(a=c(e.optionsRef))==null||a.focus({preventScroll:!0}),e.value.value||e.goToOption(O.Last)});break}}function b(o){switch(o.key){case p.Space:o.preventDefault();break}}function m(o){e.disabled.value||(e.listboxState.value===0?(e.closeListbox(),C(()=>{var a;return(a=c(e.buttonRef))==null?void 0:a.focus({preventScroll:!0})})):(o.preventDefault(),e.openListbox(),be(()=>{var a;return(a=c(e.optionsRef))==null?void 0:a.focus({preventScroll:!0})})))}let f=ee(S(()=>({as:t.as,type:v.type})),e.buttonRef);return()=>{var g,y;let o={open:e.listboxState.value===0,disabled:e.disabled.value,value:e.value.value},{id:a,...w}=t,k={ref:e.buttonRef,id:a,type:f.value,\"aria-haspopup\":\"listbox\",\"aria-controls\":(g=c(e.optionsRef))==null?void 0:g.id,\"aria-expanded\":e.listboxState.value===0,\"aria-labelledby\":e.labelRef.value?[(y=c(e.labelRef))==null?void 0:y.id,a].join(\" \"):void 0,disabled:e.disabled.value===!0?!0:void 0,onKeydown:s,onKeyup:b,onClick:m};return E({ourProps:k,theirProps:w,slot:o,attrs:v,slots:u,name:\"ListboxButton\"})}}}),Ne=I({name:\"ListboxOptions\",props:{as:{type:[Object,String],default:\"ul\"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`headlessui-listbox-options-${A()}`}},setup(t,{attrs:v,slots:u,expose:L}){let e=j(\"ListboxOptions\"),s=D(null);L({el:e.optionsRef,$el:e.optionsRef});function b(o){switch(s.value&&clearTimeout(s.value),o.key){case p.Space:if(e.searchQuery.value!==\"\")return o.preventDefault(),o.stopPropagation(),e.search(o.key);case p.Enter:if(o.preventDefault(),o.stopPropagation(),e.activeOptionIndex.value!==null){let a=e.options.value[e.activeOptionIndex.value];e.select(a.dataRef.value)}e.mode.value===0&&(e.closeListbox(),C(()=>{var a;return(a=c(e.buttonRef))==null?void 0:a.focus({preventScroll:!0})}));break;case P(e.orientation.value,{vertical:p.ArrowDown,horizontal:p.ArrowRight}):return o.preventDefault(),o.stopPropagation(),e.goToOption(O.Next);case P(e.orientation.value,{vertical:p.ArrowUp,horizontal:p.ArrowLeft}):return o.preventDefault(),o.stopPropagation(),e.goToOption(O.Previous);case p.Home:case p.PageUp:return o.preventDefault(),o.stopPropagation(),e.goToOption(O.First);case p.End:case p.PageDown:return o.preventDefault(),o.stopPropagation(),e.goToOption(O.Last);case p.Escape:o.preventDefault(),o.stopPropagation(),e.closeListbox(),C(()=>{var a;return(a=c(e.buttonRef))==null?void 0:a.focus({preventScroll:!0})});break;case p.Tab:o.preventDefault(),o.stopPropagation();break;default:o.key.length===1&&(e.search(o.key),s.value=setTimeout(()=>e.clearSearch(),350));break}}let m=Y(),f=S(()=>m!==null?(m.value&F.Open)===F.Open:e.listboxState.value===0);return()=>{var g,y,M,h;let o={open:e.listboxState.value===0},{id:a,...w}=t,k={\"aria-activedescendant\":e.activeOptionIndex.value===null||(g=e.options.value[e.activeOptionIndex.value])==null?void 0:g.id,\"aria-multiselectable\":e.mode.value===1?!0:void 0,\"aria-labelledby\":(h=(y=c(e.labelRef))==null?void 0:y.id)!=null?h:(M=c(e.buttonRef))==null?void 0:M.id,\"aria-orientation\":e.orientation.value,id:a,onKeydown:b,role:\"listbox\",tabIndex:0,ref:e.optionsRef};return E({ourProps:k,theirProps:w,slot:o,attrs:v,slots:u,features:H.RenderStrategy|H.Static,visible:f.value,name:\"ListboxOptions\"})}}}),He=I({name:\"ListboxOption\",props:{as:{type:[Object,String],default:\"li\"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:()=>`headlessui-listbox.option-${A()}`}},setup(t,{slots:v,attrs:u,expose:L}){let e=j(\"ListboxOption\"),s=D(null);L({el:s,$el:s});let b=S(()=>e.activeOptionIndex.value!==null?e.options.value[e.activeOptionIndex.value].id===t.id:!1),m=S(()=>P(e.mode.value,{[0]:()=>e.compare(T(e.value.value),T(t.value)),[1]:()=>T(e.value.value).some(r=>e.compare(T(r),T(t.value)))})),f=S(()=>P(e.mode.value,{[1]:()=>{var i;let r=T(e.value.value);return((i=e.options.value.find(n=>r.some(l=>e.compare(T(l),T(n.dataRef.value)))))==null?void 0:i.id)===t.id},[0]:()=>m.value})),o=de(s),a=S(()=>({disabled:t.disabled,value:t.value,get textValue(){return o()},domRef:s}));B(()=>e.registerOption(t.id,a)),_(()=>e.unregisterOption(t.id)),B(()=>{N([e.listboxState,m],()=>{e.listboxState.value===0&&m.value&&P(e.mode.value,{[1]:()=>{f.value&&e.goToOption(O.Specific,t.id)},[0]:()=>{e.goToOption(O.Specific,t.id)}})},{immediate:!0})}),W(()=>{e.listboxState.value===0&&b.value&&e.activationTrigger.value!==0&&C(()=>{var r,i;return(i=(r=c(s))==null?void 0:r.scrollIntoView)==null?void 0:i.call(r,{block:\"nearest\"})})});function w(r){if(t.disabled)return r.preventDefault();e.select(t.value),e.mode.value===0&&(e.closeListbox(),C(()=>{var i;return(i=c(e.buttonRef))==null?void 0:i.focus({preventScroll:!0})}))}function k(){if(t.disabled)return e.goToOption(O.Nothing);e.goToOption(O.Specific,t.id)}let g=se();function y(r){g.update(r)}function M(r){g.wasMoved(r)&&(t.disabled||b.value||e.goToOption(O.Specific,t.id,0))}function h(r){g.wasMoved(r)&&(t.disabled||b.value&&e.goToOption(O.Nothing))}return()=>{let{disabled:r}=t,i={active:b.value,selected:m.value,disabled:r},{id:n,value:l,disabled:d,...x}=t,R={id:n,ref:s,role:\"option\",tabIndex:r===!0?void 0:-1,\"aria-disabled\":r===!0?!0:void 0,\"aria-selected\":m.value,disabled:void 0,onClick:w,onFocus:k,onPointerenter:y,onMouseenter:y,onPointermove:M,onMousemove:M,onPointerleave:h,onMouseleave:h};return E({ourProps:R,theirProps:x,slot:i,attrs:u,slots:v,name:\"ListboxOption\"})}}});export{Fe as Listbox,Ke as ListboxButton,Be as ListboxLabel,He as ListboxOption,Ne as ListboxOptions};\n","import{Fragment as Z,computed as I,defineComponent as G,h as x,inject as V,provide as _,ref as C,shallowRef as ie,watchEffect as U,onMounted as ee,onUnmounted as te}from\"vue\";import{match as B}from'../../utils/match.js';import{render as $,Features as N}from'../../utils/render.js';import{useId as L}from'../../hooks/use-id.js';import{Keys as R}from'../../keyboard.js';import{getFocusableElements as q,Focus as D,focusIn as M,isFocusableElement as se,FocusableMode as pe,FocusResult as z}from'../../utils/focus-management.js';import{dom as r}from'../../utils/dom.js';import{useOpenClosedProvider as fe,State as H,useOpenClosed as oe}from'../../internal/open-closed.js';import{useResolveButtonType as ve}from'../../hooks/use-resolve-button-type.js';import{useOutsideClick as ce}from'../../hooks/use-outside-click.js';import{getOwnerDocument as W}from'../../utils/owner.js';import{useEventListener as de}from'../../hooks/use-event-listener.js';import{Hidden as J,Features as Q}from'../../internal/hidden.js';import{useTabDirection as ne,Direction as T}from'../../hooks/use-tab-direction.js';import'../../utils/micro-task.js';import{useRootContainers as Pe}from'../../hooks/use-root-containers.js';import{useNestedPortals as me}from'../../components/portal/portal.js';var be=(p=>(p[p.Open=0]=\"Open\",p[p.Closed=1]=\"Closed\",p))(be||{});let re=Symbol(\"PopoverContext\");function A(m){let S=V(re,null);if(S===null){let p=new Error(`<${m} /> is missing a parent <${ge.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(p,A),p}return S}let le=Symbol(\"PopoverGroupContext\");function ae(){return V(le,null)}let ue=Symbol(\"PopoverPanelContext\");function Se(){return V(ue,null)}let ge=G({name:\"Popover\",props:{as:{type:[Object,String],default:\"div\"}},setup(m,{slots:S,attrs:p,expose:h}){var v;let t=C(null);h({el:t,$el:t});let e=C(1),c=C(null),d=C(null),F=C(null),f=C(null),g=I(()=>W(t)),P=I(()=>{var X,Y;if(!r(c)||!r(f))return!1;for(let k of document.querySelectorAll(\"body > *\"))if(Number(k==null?void 0:k.contains(r(c)))^Number(k==null?void 0:k.contains(r(f))))return!0;let o=q(),l=o.indexOf(r(c)),b=(l+o.length-1)%o.length,E=(l+1)%o.length,K=o[b],j=o[E];return!((X=r(f))!=null&&X.contains(K))&&!((Y=r(f))!=null&&Y.contains(j))}),a={popoverState:e,buttonId:C(null),panelId:C(null),panel:f,button:c,isPortalled:P,beforePanelSentinel:d,afterPanelSentinel:F,togglePopover(){e.value=B(e.value,{[0]:1,[1]:0})},closePopover(){e.value!==1&&(e.value=1)},close(o){a.closePopover();let l=(()=>o?o instanceof HTMLElement?o:o.value instanceof HTMLElement?r(o):r(a.button):r(a.button))();l==null||l.focus()}};_(re,a),fe(I(()=>B(e.value,{[0]:H.Open,[1]:H.Closed})));let w={buttonId:a.buttonId,panelId:a.panelId,close(){a.closePopover()}},y=ae(),O=y==null?void 0:y.registerPopover,[u,i]=me(),s=Pe({portals:u,defaultContainers:[c,f]});function n(){var o,l,b,E;return(E=y==null?void 0:y.isFocusWithinPopoverGroup())!=null?E:((o=g.value)==null?void 0:o.activeElement)&&(((l=r(c))==null?void 0:l.contains(g.value.activeElement))||((b=r(f))==null?void 0:b.contains(g.value.activeElement)))}return U(()=>O==null?void 0:O(w)),de((v=g.value)==null?void 0:v.defaultView,\"focus\",o=>{var l,b;o.target!==window&&o.target instanceof HTMLElement&&e.value===0&&(n()||c&&f&&(s.contains(o.target)||(l=r(a.beforePanelSentinel))!=null&&l.contains(o.target)||(b=r(a.afterPanelSentinel))!=null&&b.contains(o.target)||a.closePopover()))},!0),ce(s.resolveContainers,(o,l)=>{var b;a.closePopover(),se(l,pe.Loose)||(o.preventDefault(),(b=r(c))==null||b.focus())},I(()=>e.value===0)),()=>{let o={open:e.value===0,close:a.close};return x(i,{},()=>$({theirProps:{...m,...p},ourProps:{ref:t},slot:o,slots:S,attrs:p,name:\"Popover\"}))}}}),je=G({name:\"PopoverButton\",props:{as:{type:[Object,String],default:\"button\"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`headlessui-popover-button-${L()}`}},inheritAttrs:!1,setup(m,{attrs:S,slots:p,expose:h}){let t=A(\"PopoverButton\"),e=I(()=>W(t.button));h({el:t.button,$el:t.button}),ee(()=>{t.buttonId.value=m.id}),te(()=>{t.buttonId.value=null});let c=ae(),d=c==null?void 0:c.closeOthers,F=Se(),f=I(()=>F===null?!1:F.value===t.panelId.value),g=C(null),P=`headlessui-focus-sentinel-${L()}`;f.value||U(()=>{t.button.value=g.value});let a=ve(I(()=>({as:m.as,type:S.type})),g);function w(n){var v,o,l,b,E;if(f.value){if(t.popoverState.value===1)return;switch(n.key){case R.Space:case R.Enter:n.preventDefault(),(o=(v=n.target).click)==null||o.call(v),t.closePopover(),(l=r(t.button))==null||l.focus();break}}else switch(n.key){case R.Space:case R.Enter:n.preventDefault(),n.stopPropagation(),t.popoverState.value===1&&(d==null||d(t.buttonId.value)),t.togglePopover();break;case R.Escape:if(t.popoverState.value!==0)return d==null?void 0:d(t.buttonId.value);if(!r(t.button)||(b=e.value)!=null&&b.activeElement&&!((E=r(t.button))!=null&&E.contains(e.value.activeElement)))return;n.preventDefault(),n.stopPropagation(),t.closePopover();break}}function y(n){f.value||n.key===R.Space&&n.preventDefault()}function O(n){var v,o;m.disabled||(f.value?(t.closePopover(),(v=r(t.button))==null||v.focus()):(n.preventDefault(),n.stopPropagation(),t.popoverState.value===1&&(d==null||d(t.buttonId.value)),t.togglePopover(),(o=r(t.button))==null||o.focus()))}function u(n){n.preventDefault(),n.stopPropagation()}let i=ne();function s(){let n=r(t.panel);if(!n)return;function v(){B(i.value,{[T.Forwards]:()=>M(n,D.First),[T.Backwards]:()=>M(n,D.Last)})===z.Error&&M(q().filter(l=>l.dataset.headlessuiFocusGuard!==\"true\"),B(i.value,{[T.Forwards]:D.Next,[T.Backwards]:D.Previous}),{relativeTo:r(t.button)})}v()}return()=>{let n=t.popoverState.value===0,v={open:n},{id:o,...l}=m,b=f.value?{ref:g,type:a.value,onKeydown:w,onClick:O}:{ref:g,id:o,type:a.value,\"aria-expanded\":t.popoverState.value===0,\"aria-controls\":r(t.panel)?t.panelId.value:void 0,disabled:m.disabled?!0:void 0,onKeydown:w,onKeyup:y,onClick:O,onMousedown:u};return x(Z,[$({ourProps:b,theirProps:{...S,...l},slot:v,attrs:S,slots:p,name:\"PopoverButton\"}),n&&!f.value&&t.isPortalled.value&&x(J,{id:P,features:Q.Focusable,\"data-headlessui-focus-guard\":!0,as:\"button\",type:\"button\",onFocus:s})])}}}),Ne=G({name:\"PopoverOverlay\",props:{as:{type:[Object,String],default:\"div\"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},setup(m,{attrs:S,slots:p}){let h=A(\"PopoverOverlay\"),t=`headlessui-popover-overlay-${L()}`,e=oe(),c=I(()=>e!==null?(e.value&H.Open)===H.Open:h.popoverState.value===0);function d(){h.closePopover()}return()=>{let F={open:h.popoverState.value===0};return $({ourProps:{id:t,\"aria-hidden\":!0,onClick:d},theirProps:m,slot:F,attrs:S,slots:p,features:N.RenderStrategy|N.Static,visible:c.value,name:\"PopoverOverlay\"})}}}),We=G({name:\"PopoverPanel\",props:{as:{type:[Object,String],default:\"div\"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},id:{type:String,default:()=>`headlessui-popover-panel-${L()}`}},inheritAttrs:!1,setup(m,{attrs:S,slots:p,expose:h}){let{focus:t}=m,e=A(\"PopoverPanel\"),c=I(()=>W(e.panel)),d=`headlessui-focus-sentinel-before-${L()}`,F=`headlessui-focus-sentinel-after-${L()}`;h({el:e.panel,$el:e.panel}),ee(()=>{e.panelId.value=m.id}),te(()=>{e.panelId.value=null}),_(ue,e.panelId),U(()=>{var i,s;if(!t||e.popoverState.value!==0||!e.panel)return;let u=(i=c.value)==null?void 0:i.activeElement;(s=r(e.panel))!=null&&s.contains(u)||M(r(e.panel),D.First)});let f=oe(),g=I(()=>f!==null?(f.value&H.Open)===H.Open:e.popoverState.value===0);function P(u){var i,s;switch(u.key){case R.Escape:if(e.popoverState.value!==0||!r(e.panel)||c.value&&!((i=r(e.panel))!=null&&i.contains(c.value.activeElement)))return;u.preventDefault(),u.stopPropagation(),e.closePopover(),(s=r(e.button))==null||s.focus();break}}function a(u){var s,n,v,o,l;let i=u.relatedTarget;i&&r(e.panel)&&((s=r(e.panel))!=null&&s.contains(i)||(e.closePopover(),((v=(n=r(e.beforePanelSentinel))==null?void 0:n.contains)!=null&&v.call(n,i)||(l=(o=r(e.afterPanelSentinel))==null?void 0:o.contains)!=null&&l.call(o,i))&&i.focus({preventScroll:!0})))}let w=ne();function y(){let u=r(e.panel);if(!u)return;function i(){B(w.value,{[T.Forwards]:()=>{var n;M(u,D.First)===z.Error&&((n=r(e.afterPanelSentinel))==null||n.focus())},[T.Backwards]:()=>{var s;(s=r(e.button))==null||s.focus({preventScroll:!0})}})}i()}function O(){let u=r(e.panel);if(!u)return;function i(){B(w.value,{[T.Forwards]:()=>{let s=r(e.button),n=r(e.panel);if(!s)return;let v=q(),o=v.indexOf(s),l=v.slice(0,o+1),E=[...v.slice(o+1),...l];for(let K of E.slice())if(K.dataset.headlessuiFocusGuard===\"true\"||n!=null&&n.contains(K)){let j=E.indexOf(K);j!==-1&&E.splice(j,1)}M(E,D.First,{sorted:!1})},[T.Backwards]:()=>{var n;M(u,D.Previous)===z.Error&&((n=r(e.button))==null||n.focus())}})}i()}return()=>{let u={open:e.popoverState.value===0,close:e.close},{id:i,focus:s,...n}=m,v={ref:e.panel,id:i,onKeydown:P,onFocusout:t&&e.popoverState.value===0?a:void 0,tabIndex:-1};return $({ourProps:v,theirProps:{...S,...n},attrs:S,slot:u,slots:{...p,default:(...o)=>{var l;return[x(Z,[g.value&&e.isPortalled.value&&x(J,{id:d,ref:e.beforePanelSentinel,features:Q.Focusable,\"data-headlessui-focus-guard\":!0,as:\"button\",type:\"button\",onFocus:y}),(l=p.default)==null?void 0:l.call(p,...o),g.value&&e.isPortalled.value&&x(J,{id:F,ref:e.afterPanelSentinel,features:Q.Focusable,\"data-headlessui-focus-guard\":!0,as:\"button\",type:\"button\",onFocus:O})])]}},features:N.RenderStrategy|N.Static,visible:g.value,name:\"PopoverPanel\"})}}}),Ae=G({name:\"PopoverGroup\",props:{as:{type:[Object,String],default:\"div\"}},setup(m,{attrs:S,slots:p,expose:h}){let t=C(null),e=ie([]),c=I(()=>W(t));h({el:t,$el:t});function d(P){let a=e.value.indexOf(P);a!==-1&&e.value.splice(a,1)}function F(P){return e.value.push(P),()=>{d(P)}}function f(){var w;let P=c.value;if(!P)return!1;let a=P.activeElement;return(w=r(t))!=null&&w.contains(a)?!0:e.value.some(y=>{var O,u;return((O=P.getElementById(y.buttonId.value))==null?void 0:O.contains(a))||((u=P.getElementById(y.panelId.value))==null?void 0:u.contains(a))})}function g(P){for(let a of e.value)a.buttonId.value!==P&&a.close()}return _(le,{registerPopover:F,unregisterPopover:d,isFocusWithinPopoverGroup:f,closeOthers:g}),()=>$({ourProps:{ref:t},theirProps:m,slot:{},attrs:S,slots:p,name:\"PopoverGroup\"})}});export{ge as Popover,je as PopoverButton,Ae as PopoverGroup,Ne as PopoverOverlay,We as PopoverPanel};\n","<script setup lang=\"ts\">\nimport { computed, onMounted, ref, watch } from 'vue';\nimport { orderBy } from 'lodash';\nimport { storeToRefs } from 'pinia';\nimport { useStore } from '@/store/store';\nimport { productsApi } from '@/api/products';\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue';\nimport productCard from './product-card.vue';\nimport homeViewInfoCard from './home-view-info-card.vue';\n\ninterface Props {\n categories: Category[]\n questions: FrequentlyAskedQuestion[]\n showInfoCard: boolean\n infoCard?: InfoCard\n}\n\nconst props = defineProps<Props>();\n\nconst showPopover = ref(true);\n\nfunction closePopover() {\n showPopover.value = false;\n}\n\nconst sortedCategories = computed(() => orderBy(props.categories, 'position'));\n\nconst store = useStore();\n\nconst { userLocation } = storeToRefs(store);\n\nconst highlightedProducts = ref<Product[]>([]);\n\nfunction getHighlightedProducts() {\n if (userLocation.value?.latitude && userLocation.value?.longitude) {\n productsApi.highlighted(userLocation.value?.latitude, userLocation.value?.longitude)\n .then((response) => {\n highlightedProducts.value = response;\n });\n } else {\n productsApi.highlighted()\n .then((response) => {\n highlightedProducts.value = response;\n });\n }\n}\n\nwatch(userLocation, () => {\n getHighlightedProducts();\n});\n\nonMounted(() => {\n getHighlightedProducts();\n});\n\n</script>\n<template>\n <the-layout\n :active-menu=\"0\"\n >\n <div class=\"w-full md:bg-white\">\n <vueper-slides\n autoplay\n :arrows=\"false\"\n :bullets=\"false\"\n :slide-ratio=\"1001/1501\"\n :touchable=\"false\"\n class=\"md:hidden\"\n >\n <vueper-slide>\n <template #content>\n <img\n src=\"@/assets/images/banner1.webp\"\n alt=\"Banner con dos personas dándose la mano. Se lee 'La primera plataforma digital para el arriendo de personas'.\"\n fetchpriority=\"high\"\n >\n </template>\n </vueper-slide>\n <vueper-slide>\n <template #content>\n <img\n src=\"@/assets/images/banner2.webp\"\n loading=\"lazy\"\n alt=\"Banner con una persona usando su celular feliz. Se lee 'Sube tus productos antes del lanzamiento.'\"\n >\n </template>\n </vueper-slide>\n </vueper-slides>\n <vueper-slides\n autoplay\n :arrows=\"false\"\n :bullets=\"false\"\n :slide-ratio=\"5/16\"\n :touchable=\"false\"\n class=\"hidden md:block\"\n >\n <vueper-slide>\n <template #content>\n <img\n src=\"@/assets/images/banner-desktop1.webp\"\n alt=\"Banner con dos personas dándose la mano. Se lee 'La primera plataforma digital para el arriendo de personas'.\"\n fetchpriority=\"high\"\n >\n </template>\n </vueper-slide>\n <vueper-slide>\n <template #content>\n <img\n src=\"@/assets/images/banner-desktop2.webp\"\n loading=\"lazy\"\n alt=\"Banner con una persona usando su celular feliz. Se lee 'Sube tus productos antes del lanzamiento.'\"\n >\n </template>\n </vueper-slide>\n </vueper-slides>\n <home-view-info-card\n v-if=\"showInfoCard && infoCard\"\n :info-card=\"infoCard\"\n />\n <div class=\"flex h-44 space-x-8 overflow-x-scroll px-6 pt-6 scrollbar-hide\">\n <a\n v-for=\"category in sortedCategories\"\n :key=\"category.id\"\n :href=\"`/categorias/${category.id}`\"\n class=\"flex w-32 flex-col items-center space-y-2\"\n >\n <div class=\"flex h-20 w-20 items-center justify-center rounded-full bg-z-gray-100\">\n <img\n :src=\"category.picture.webpXs?.url\"\n class=\"h-full w-full rounded-full object-cover\"\n :alt=\"`Imagen que representa la categoría ${category.name}`\"\n >\n </div>\n <p class=\"text-center text-xs\">\n {{ category.name }}\n </p>\n </a>\n </div>\n <div class=\"px-6 py-8 md:px-[12%]\">\n <div class=\"flex items-center justify-between\">\n <p class=\"text-xl font-medium text-z-gray-800\">\n Los más populares\n </p>\n <base-button\n variant=\"secondary\"\n href=\"/productos\"\n class=\"hidden md:flex md:px-10\"\n >\n <p>Ver más</p>\n <img\n src=\"@/assets/icons/arrow-right.svg\"\n class=\"ml-1 h-6 w-6\"\n alt=\"Ícono de flecha apuntando a la derecha\"\n >\n </base-button>\n </div>\n <div\n v-if=\"highlightedProducts\"\n class=\"mt-4 grid grid-cols-2 gap-4 md:grid-cols-6\"\n >\n <product-card\n v-for=\"product in highlightedProducts\"\n :key=\"product.id\"\n :product=\"product\"\n lazy\n />\n </div>\n </div>\n <base-button\n variant=\"secondary\"\n href=\"/productos\"\n class=\"mx-6 my-4 md:hidden\"\n >\n <p>Ver más</p>\n <img\n src=\"@/assets/icons/arrow-right.svg\"\n class=\"ml-1 h-6 w-6\"\n alt=\"Ícono de flecha apuntando a la derecha\"\n >\n </base-button>\n <div class=\"flex flex-col space-y-4 bg-z-turquoise-50 px-6 py-8 text-gray-800 md:grid md:grid-cols-3 md:space-y-0 md:px-[12%]\">\n <div class=\"flex flex-col items-center space-y-2 px-3 pb-2 pt-3\">\n <img\n src=\"@/assets/icons/ticket.svg\"\n class=\"h-8 w-8\"\n alt=\"Ícono de ticket o dinero\"\n >\n <p class=\"text-center font-medium\">\n ¡Convierte tus cosas en dinero!\n </p>\n <p class=\"text-center text-sm\">\n Obtén dinero de manera rápida, cómoda y segura publicando tus artículos contribuyendo\n con una economía circular.\n </p>\n </div>\n <div class=\"flex flex-col items-center space-y-2 px-3 pb-2 pt-3\">\n <img\n src=\"@/assets/icons/home.svg\"\n class=\"h-8 w-8\"\n alt=\"Ícono de hogar\"\n >\n <p class=\"font-medium\">\n ¡Formemos comunidad!\n </p>\n <p class=\"text-center text-sm\">\n Entre más somos, más productos disponibles, todos ganamos y ahorramos. Generemos un entorno colaborativo y amigable junto a <span class=\"font-medium\">Zirkular.</span>\n </p>\n </div>\n <div class=\"flex flex-col items-center space-y-2 px-3 pb-2 pt-3\">\n <img\n src=\"@/assets/icons/brightness.svg\"\n class=\"h-9 w-9\"\n alt=\"Ícono de sol\"\n >\n <p class=\"font-medium\">\n ¡Contribuimos con el medio ambiente!\n </p>\n <p class=\"text-center text-sm\">\n Cada arriendo disminuye la huella de carbono que genera la compra de artículos nuevos y que muchas veces,\n sólo utilizamos una vez.\n <br>Démosle una nueva vida a nuestras pertenencias y aportemos la preservación del medio ambiente\n </p>\n </div>\n </div>\n <div class=\"flex flex-col md:grid md:grid-cols-2 md:px-[12%]\">\n <div class=\"flex flex-col px-6 pb-4 pt-10 md:order-last md:pt-8\">\n <p class=\"text-xl font-medium text-z-gray-900\">\n ¿Qué nos preguntan?\n </p>\n <div\n v-if=\"questions\"\n class=\"flex flex-col pb-2\"\n >\n <Disclosure\n v-for=\"question in questions\"\n :key=\"question.id\"\n v-slot=\"{ open }\"\n >\n <DisclosureButton class=\"flex items-start justify-between py-5 font-medium text-z-gray-900\">\n <p class=\"text-left\">\n {{ question.question }}\n </p>\n <img\n src=\"@/assets/icons/chevron-left.svg\"\n :class=\"open ? 'rotate-90' : '-rotate-90'\"\n :alt=\"`Ícono de un chevron hacia ${open ? 'arriba' : 'abajo'}`\"\n >\n </DisclosureButton>\n <DisclosurePanel class=\"mb-6 text-sm text-z-gray-800\">\n <p>{{ question.answer }}</p>\n </DisclosurePanel>\n </Disclosure>\n </div>\n <base-button\n variant=\"secondary\"\n class=\"space-x-1\"\n href=\"/preguntas_frecuentes\"\n >\n <p>Ver más</p>\n <img\n src=\"@/assets/icons/chevron-right.svg\"\n alt=\"Ícono de chevron hacia la derecha\"\n >\n </base-button>\n </div>\n <div class=\"flex flex-col pb-14 pt-8 md:items-center\">\n <p class=\"px-6 text-center text-xl font-medium text-z-gray-800\">\n <span class=\"underline underline-offset-4\">Zirkulando</span> tus cosas, <br class=\"md:hidden\">¡todos ganamos!\n </p>\n <img\n src=\"@/assets/images/products.webp\"\n class=\"md:w-96\"\n loading=\"lazy\"\n alt=\"Fondo circular de color turquesa con una escalera, una parrilla, una tabla de surf y otros objetos caseros\"\n >\n <base-button\n href=\"/productos/crear\"\n class=\"mx-6 mt-4 md:w-fit md:px-6\"\n >\n ¡Sube tus productos!\n </base-button>\n </div>\n </div>\n <the-footer />\n </div>\n <div\n\n class=\"fixed bottom-16 z-10 flex w-full flex-col items-end space-y-4 p-6 md:bottom-2 md:right-2 md:max-w-md\"\n >\n <the-whatsapp-button class=\"\" />\n <div\n v-if=\"showPopover\"\n class=\"flex rounded bg-white p-4 shadow\"\n >\n <div class=\"flex flex-col space-y-2\">\n <p class=\"text-z-gray-800\">\n Convierte tus cosas en dinero. Publica y ofrece a la comunidad\n </p>\n <a\n href=\"/productos/crear\"\n class=\"inline-flex h-8 w-fit items-center rounded bg-z-turquoise-600 px-6 text-sm text-white\"\n >\n Sube tus productos\n </a>\n </div>\n <button\n class=\"h-6 w-6 shrink-0\"\n aria-label=\"Cerrar\"\n @click=\"closePopover\"\n >\n <img\n src=\"@/assets/icons/close.svg\"\n alt=\"Ícono de cerrar\"\n >\n </button>\n </div>\n </div>\n </the-layout>\n</template>\n","export default \"__VITE_ASSET__ce36306f__\"","<script setup lang=\"ts\">\n// import partnerFeaturesUrl1 from '@/assets/images/partner-features-1.png';\n// import partnerFeaturesUrl2 from '@/assets/images/partner-features-2.png';\n// import partnerFeaturesUrl3 from '@/assets/images/partner-features-3.png';\nimport { inject } from 'vue';\n\nconst user = inject<User>('user');\n\n// const FEATURES = [\n// { title: 'Sube tus productos',\n// description: 'Sube todos los productos que ya no usas a través de un formulario bastante simple.',\n// imageUrl: partnerFeaturesUrl1,\n// },\n// { title: 'Monitorea la entrega',\n// description: 'Entrégalos o espera a que lo recoja el cliente, ' +\n// ' de cualquier forma podrás estar seguro de la entrega.',\n// imageUrl: partnerFeaturesUrl2,\n// },\n// { title: 'Recibe tus pagos',\n// description: 'Podrás ver tus pagos y ganancias por cada alquiler de forma rápida y fácil.',\n// imageUrl: partnerFeaturesUrl3,\n// },\n// ];\nconst STEPS = [\n { title: '¿Qué harás zirkular?',\n description: 'Escribe el nombre de tu producto. Recuerda ser claro para que todos puedan identificarte.',\n },\n { title: '¿Dónde te encontramos?',\n description: 'Tú nos cuentas dónde estás y nosotros publicamos tu dirección, además si al Zirkular tu producto, tú lo llevas o deben retirarlo donde nos indiques.',\n },\n { title: '¿Qué tipo de producto publicarás?',\n description: 'Hogar, outdoor, deportes, herramientas… en fin todo cabe en Zirkular, sólo debes buscar la categoría que más refleje tu producto y seleccionarla.',\n },\n { title: 'Ahora que ya te conocemos...',\n description: 'Cuéntanos un poco más sobre tu producto con una breve descripción y añade al menos 3 fotografías.',\n },\n { title: 'Y lo más importante, ¡cuéntanos el valor de tu producto!',\n description: 'Así como también el valor de la garantía por daño o perjuicio y finalmente los días que lo harás Zirkular.',\n },\n { title: '¡Estás a un paso de finalizar!',\n description: 'Revisa que todos los datos estén correctos, esta es la oportunidad para corregirlos y ¡listo, ahora has Zirkular tu producto, gana dinero y sé miembro de la primera comunidad de arriendo entre personas en Chile!',\n },\n];\n</script>\n<template>\n <the-layout\n :active-menu=\"1\"\n >\n <div\n class=\"w-full md:flex md:flex-col md:justify-between\"\n :class=\"user?.partnerAccountId ? 'md:min-h-[calc(100vh-72px)]' : 'md:min-h-[calc(100vh-112px)]'\"\n >\n <!-- <div class=\"flex w-full flex-col space-y-5 bg-z-turquoise-600 px-6 py-10\">\n <p class=\"text-xl font-semibold text-white\">\n Gana dinero alquilando las cosas que ya no usas\n </p>\n <img src=\"@/assets/images/banner1.png\">\n <base-button\n variant=\"secondary\"\n class=\"bg-z-turquoise-50\"\n href=\"/productos/crear\"\n >\n Empieza ahora\n </base-button>\n </div>\n <div class=\"flex flex-col bg-white px-6 pb-5 pt-4\">\n <div class=\"my-4 flex flex-col space-y-3 text-z-gray-900\">\n <p class=\"text-xl font-medium\">\n Empezar a ganar dinero es muy fácil\n </p>\n <p class=\"text-sm\">\n Sube las cosas que ya no usas y empieza a generar una nueva entrada desde tu hogar.\n </p>\n </div>\n <div\n v-for=\"feature, index in FEATURES\"\n :key=\"index\"\n class=\"my-4\"\n >\n <img\n :src=\"feature.imageUrl\"\n class=\"h-[100px] w-full rounded-lg object-cover object-center\"\n >\n <p class=\"mt-3 font-medium\">\n {{ feature.title }}\n </p>\n <p class=\"mt-1 text-sm text-z-gray-900\">\n {{ feature.description }}\n </p>\n </div>\n </div> -->\n <div class=\"flex flex-col bg-white px-6 py-5 md:px-[12%] md:py-10\">\n <div class=\"mb-4 flex flex-col space-y-3 text-z-gray-900\">\n <p class=\"text-xl font-medium\">\n ¿Cómo publicar mi producto?\n </p>\n <p class=\"text-sm\">\n Te demorarás 5 minutos.\n </p>\n </div>\n <div class=\"md:grid md:grid-cols-3 md:gap-4\">\n <div\n v-for=\"step, index in STEPS\"\n :key=\"index\"\n class=\"flex space-x-3.5 py-4 md:flex-col md:items-center md:space-x-0 md:rounded md:border md:border-z-gray-200 md:p-6\"\n >\n <div class=\"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-z-turquoise-50 text-sm text-z-turquoise-600 md:bg-z-turquoise-600 md:text-lg md:font-medium md:text-white\">\n {{ index + 1 }}\n </div>\n <div class=\"flex flex-col space-y-1 md:mt-4 md:space-y-2 md:text-center\">\n <p class=\"font-medium text-z-gray-900\">\n {{ step.title }}\n </p>\n <p class=\"text-sm text-z-gray-800\">\n {{ step.description }}\n </p>\n </div>\n </div>\n </div>\n <base-button\n href=\"/productos/crear\"\n class=\"mt-20 hidden w-fit self-center px-24 md:flex\"\n >\n <img src=\"@/assets/icons/plus.svg\">\n <p class=\"ml-1\">\n Subir producto\n </p>\n </base-button>\n </div>\n <the-footer class=\"mb-32 md:bottom-0 md:mb-0\" />\n <div class=\"fixed bottom-16 flex w-full flex-col bg-white px-6 py-2 md:hidden\">\n <base-button href=\"/productos/crear\">\n <img src=\"@/assets/icons/plus.svg\">\n <p class=\"ml-1\">\n Subir producto\n </p>\n </base-button>\n </div>\n </div>\n </the-layout>\n</template>\n","export default \"__VITE_ASSET__e2e7b6e5__\"","export default \"data:image/webp;base64,UklGRm4MAABXRUJQVlA4WAoAAAAQAAAASwAARgAAQUxQSHQGAAAB8IZt2zE3+/8dxzUzYSe2VdtuU9u2ddu2bdu2Vds2o/tp0GSYDK5jv17M9Gmv8+HLiJgAMpVje6x48aedlQ6/7q7e/+crVw7NtNC/pq3FvK/LvQBghAWAYO1fd3a3qRc55jOXwLiMEPeGhXGslGXAFh3GZYecXhStDic/7RHDVPF/35YV4amnYZgO91XNlIi+wSGGgpBXo1S4RgxF9S808xbBUBYPR5rVrspQWKazOfyWoTIO2M1p71DK0OewGXwP1MKv5uxVzHCkmBFTZyguPdiETI9qGGpGrle54WRihlu5IWxCdI1q0sUMbT8Ua0g0g59WDFuZzBzoV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Gz93D2izUiqjH/fH7rwQQg+nOjDibFQ51qYSRaSk1Adv+w3BEU00U8MDSkjoc1Nw2LpTN420sLjxWEUOP7CAy1y74PoT7gSbYU0Qql2FQR1S8cyWdqLAVRSz4YNtAwP3Fw6EBQFe0SOrkVGFVV1CmayszmwTcFf9AW8//xTzgpYWhDFlghW7HmCicWGxT8FGkVIgoYiMKB/8MR8BUdlFYyR/Xq3mbdjHeZllmP3i5clMvR665p/QiterU5uXTGsSABaiLE15czTUQwHWg/SHMBIxrX/6pUBVqjTBEuIMojiRyGn7jXMixgfX5QJaITUk3ROfqUozjJV4PSKdrgmIYKJsqrmc4HnlYAlD1xo/7bWVyD1VZvF3cBGtt05IMlf7BKmaonvPuGrjK3wgcko0nG0Sm+rryvGY9R05N5d1QlgSJX8xEhJl8YyRdzwnX+h2odQ+/qlnPysEfFulELdmNc4W7F/7cKQktCKqhxMQqQ36DyBGXv6gkcgLbKOgGa631pfBbs7A5qPLWX8fkZjNvR7UYrZB71vFn/z/+DDEE7zl5pxeqZsOO5qXP3CivGsoJao3Wo1/1GQC5jYBeUk9fwBVTdrTA4+UR+M0mBZReeVB5M5HHHMAAAAAA==\"","export default \"__VITE_ASSET__45438c1d__\"","export default \"__VITE_ASSET__48767ba9__\"","export default \"__VITE_ASSET__efbc4172__\"","export default \"__VITE_ASSET__a44d0895__\"","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n","var baseSlice = require('./_baseSlice');\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nmodule.exports = castSlice;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nmodule.exports = hasUnicode;\n","/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nmodule.exports = asciiToArray;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nmodule.exports = unicodeToArray;\n","var asciiToArray = require('./_asciiToArray'),\n hasUnicode = require('./_hasUnicode'),\n unicodeToArray = require('./_unicodeToArray');\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nmodule.exports = stringToArray;\n","var castSlice = require('./_castSlice'),\n hasUnicode = require('./_hasUnicode'),\n stringToArray = require('./_stringToArray'),\n toString = require('./toString');\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n}\n\nmodule.exports = createCaseFirst;\n","var createCaseFirst = require('./_createCaseFirst');\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nmodule.exports = upperFirst;\n","var toString = require('./toString'),\n upperFirst = require('./upperFirst');\n\n/**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\nfunction capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n}\n\nmodule.exports = capitalize;\n","/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayReduce;\n","/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = basePropertyOf;\n","var basePropertyOf = require('./_basePropertyOf');\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n};\n\n/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\nmodule.exports = deburrLetter;\n","var deburrLetter = require('./_deburrLetter'),\n toString = require('./toString');\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;\n\n/** Used to compose unicode capture groups. */\nvar rsCombo = '[' + rsComboRange + ']';\n\n/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\nvar reComboMark = RegExp(rsCombo, 'g');\n\n/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\nfunction deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\nmodule.exports = deburr;\n","/** Used to match words composed of alphanumeric characters. */\nvar reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n/**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction asciiWords(string) {\n return string.match(reAsciiWord) || [];\n}\n\nmodule.exports = asciiWords;\n","/** Used to detect strings that need a more robust regexp to match words. */\nvar reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n/**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\nfunction hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n}\n\nmodule.exports = hasUnicodeWord;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\",\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;\n\n/** Used to match complex or compound words. */\nvar reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n].join('|'), 'g');\n\n/**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n}\n\nmodule.exports = unicodeWords;\n","var asciiWords = require('./_asciiWords'),\n hasUnicodeWord = require('./_hasUnicodeWord'),\n toString = require('./toString'),\n unicodeWords = require('./_unicodeWords');\n\n/**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\nfunction words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n}\n\nmodule.exports = words;\n","var arrayReduce = require('./_arrayReduce'),\n deburr = require('./deburr'),\n words = require('./words');\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\";\n\n/** Used to match apostrophes. */\nvar reApos = RegExp(rsApos, 'g');\n\n/**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\nfunction createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n}\n\nmodule.exports = createCompounder;\n","var capitalize = require('./capitalize'),\n createCompounder = require('./_createCompounder');\n\n/**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\nvar camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n});\n\nmodule.exports = camelCase;\n","function dateDiffInDays(a:Date, b:Date) {\n // eslint-disable-next-line no-magic-numbers\n const MS_PER_DAY = 1000 * 60 * 60 * 24;\n // Discard the time and time-zone information.\n const utc1 = Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());\n const utc2 = Date.UTC(b.getFullYear(), b.getMonth(), b.getDate());\n\n return Math.floor((utc2 - utc1) / MS_PER_DAY);\n}\n\nexport { dateDiffInDays };\n","/* eslint-disable no-magic-numbers */\nfunction geodistance(lat1:number, lng1:number, lat2:number, lng2:number) {\n if (lat1 === lat2 && lng1 === lng2) {\n return 0;\n }\n\n const radlat1 = (Math.PI * lat1) / 180;\n const radlat2 = (Math.PI * lat2) / 180;\n\n const radtheta = (Math.PI * (lng1 - lng2)) / 180;\n\n let dist = Math.min(\n Math.sin(radlat1) * Math.sin(radlat2) +\n Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta), 1);\n\n dist = Math.acos(dist) * 180 / Math.PI;\n dist *= 60 * 1.1515 * 1.609344;\n\n return dist;\n}\n\nexport { geodistance };\n","import { api } from './index';\n\nexport interface RejectMessageFormData {\n reason: string,\n message?: string,\n}\n\nexport interface ProductBookingFormData {\n productId: number;\n startDate: string;\n endDate: string;\n amount: number;\n depositAmount: number;\n serviceCost: number;\n currentStatus: string;\n addressId: number;\n shippingMethod: string;\n rejectMessage?: RejectMessageFormData;\n clientLocation: google.maps.LatLngLiteral;\n partnerLocation: google.maps.LatLngLiteral;\n canceled: boolean;\n canceledBy: 'partner' | 'client';\n}\n\nexport const productBookingsApi = {\n index(status: string, accountType: 'partner'|'client') {\n const path = `/api/internal/product_bookings?status=${status}&account_type=${accountType}`;\n\n return api({\n method: 'get',\n url: path,\n }).then(response => response.data.productBookings as ProductBooking[]);\n },\n create(data: Partial<ProductBookingFormData>) {\n const path = '/api/internal/product_bookings';\n\n return api({\n method: 'post',\n url: path,\n data,\n }).then(response => response.data.productBooking as ProductBooking);\n },\n update(id:number, data: Partial<ProductBookingFormData>) {\n const path = `/api/internal/product_bookings/${id}`;\n\n return api({\n method: 'patch',\n url: path,\n data,\n });\n },\n location(id: number, accountType: 'partner'|'client') {\n const path = `/api/internal/product_bookings/${id}/location?account_type=${accountType}`;\n\n return api({\n method: 'get',\n url: path,\n }).then(response => response.data);\n },\n};\n","<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\nimport { Dialog, DialogPanel } from '@headlessui/vue';\n\ninterface Props {\n lat: number,\n lng: number,\n zoom: number,\n}\nconst props = defineProps<Props>();\n\nconst mapAdjustLat = 0.002;\n\nconst randomizedCircleCenter = computed(() => {\n const min = -0.0008;\n const max = 0.0008;\n const randomLat = props.lat + Math.random() * (max - min) + min;\n const randomLng = props.lng + Math.random() * (max - min) + min;\n\n return { lat: randomLat, lng: randomLng };\n});\n\nconst randomizedMapCenter = computed(() => (\n { lat: randomizedCircleCenter.value.lat - mapAdjustLat, lng: randomizedCircleCenter.value.lng }\n));\n\nconst mapOptions = {\n styles: [\n {\n 'featureType': 'administrative.land_parcel',\n 'elementType': 'labels',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi',\n 'elementType': 'labels.text',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.attraction',\n 'elementType': 'labels.icon',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.business',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.medical',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.park',\n 'elementType': 'labels.icon',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.place_of_worship',\n 'elementType': 'labels.icon',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.school',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.sports_complex',\n 'elementType': 'labels.icon',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'road',\n 'elementType': 'labels.icon',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'road.local',\n 'elementType': 'labels',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'transit',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n ],\n zoomControl: false,\n mapTypeControl: false,\n scaleControl: false,\n streetViewControl: false,\n rotateControl: false,\n fullscreenControl: false,\n\n};\n\nconst circleOptions = {\n strokeColor: '#4479FF',\n strokeOpacity: 0.4,\n strokeWeight: 1,\n fillColor: '#4479FF',\n fillOpacity: 0.2,\n};\n\nconst showMapDialog = ref(false);\n\nfunction toggleMapDialog() {\n showMapDialog.value = !showMapDialog.value;\n}\n</script>\n\n<template>\n <button\n class=\"block h-28 w-full overflow-y-hidden rounded-lg\"\n @click=\"toggleMapDialog\"\n >\n <GMapMap\n :center=\"randomizedMapCenter\"\n :zoom=\"zoom\"\n :options=\"mapOptions\"\n map-type-id=\"terrain\"\n class=\"pointer-events-none h-[140px] w-full\"\n >\n <GMapCircle\n :radius=\"300\"\n :center=\"randomizedCircleCenter\"\n :options=\"circleOptions\"\n />\n </GMapMap>\n </button>\n <Dialog\n v-if=\"showMapDialog\"\n :open=\"showMapDialog\"\n class=\"fixed inset-0 z-50 flex h-full w-full items-center justify-center md:mx-auto md:max-w-md\"\n @close=\"toggleMapDialog\"\n >\n <div\n class=\"fixed inset-0 bg-black opacity-80\"\n />\n <DialogPanel class=\"absolute left-0 top-0 m-4 flex h-[calc(100%-32px)] w-[calc(100%-32px)] overflow-y-hidden rounded-md bg-white\">\n <GMapMap\n :center=\"randomizedMapCenter\"\n :zoom=\"zoom\"\n :options=\"mapOptions\"\n map-type-id=\"terrain\"\n class=\"h-[calc(100%+28px)] w-full\"\n >\n <GMapCircle\n :radius=\"300\"\n :center=\"randomizedCircleCenter\"\n :options=\"circleOptions\"\n />\n </GMapMap>\n <button\n class=\"absolute right-3 top-3 rounded-full border border-z-gray-200 bg-white p-2 shadow-sm\"\n @click=\"toggleMapDialog\"\n >\n <img src=\"@/assets/icons/close.svg\">\n </button>\n </DialogPanel>\n </Dialog>\n</template>\n","<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { add } from 'date-fns';\nimport type { DatePickerInstance } from '@vuepic/vue-datepicker';\n\ninterface Props {\n open: boolean\n minRange: number\n maxRange: number | null\n disabledDates: Date[]\n}\n\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n (e: 'updateRange', value: Date[]): void,\n (e: 'close'): void\n}>();\n\nconst allowSameDay = import.meta.env.VITE_ALLOW_SAME_DAY === 'true';\n// eslint-disable-next-line no-magic-numbers\nconst minimumDate = add(new Date(), { days: allowSameDay ? 0 : 2 });\n\nfunction handleRange(val:Date[]) {\n if (val[1]) {\n emit ('updateRange', val);\n } else {\n emit('updateRange', [val[0], val[0]]);\n }\n}\n\nconst rangeOptions = {\n minRange: props.minRange - 1,\n maxRange: props.maxRange || undefined,\n noDisabledRange: true,\n\n};\n\nconst startTime = [{ hours: 12, minutes: 0, seconds: 0 }, { hours: 12, minutes: 0, seconds: 0 }];\n\nconst datePicker = ref<DatePickerInstance>(null);\n\nfunction selectDate() {\n if (datePicker.value) datePicker.value.selectDate();\n}\n</script>\n<template>\n <base-modal\n :open=\"open\"\n @close=\"$emit('close')\"\n >\n <div class=\"relative flex w-full flex-col\">\n <p class=\"text-lg font-bold text-z-gray-800\">\n ¿Cuántos días deseas arrendar?\n </p>\n <div class=\"mt-2 flex w-full justify-between text-sm text-z-gray-600\">\n <p>Mínimo: <span class=\"font-medium text-z-gray-700\">{{ minRange }}</span></p>\n <p>Máximo: <span class=\"font-medium text-z-gray-700\">{{ maxRange === 0 || !maxRange ? 'sin límite' : maxRange }}</span></p>\n </div>\n <div class=\"relative flex h-[348px] w-full flex-col items-center\">\n <VueDatePicker\n ref=\"datePicker\"\n inline\n :range=\"rangeOptions\"\n :no-today=\"!allowSameDay\"\n locale=\"es\"\n :enable-time-picker=\"false\"\n :min-date=\"minimumDate\"\n :disabled-dates=\"disabledDates\"\n :day-names=\"['L', 'M', 'M', 'J', 'V', 'S', 'D']\"\n :start-time=\"startTime\"\n prevent-min-max-navigation\n class=\"mt-4\"\n vertical\n @update:model-value=\"(val:Date[]) => handleRange(val)\"\n >\n <template #action-row />\n </VueDatePicker>\n </div>\n <div class=\"flex w-full\">\n <base-button\n class=\"w-full\"\n @click=\"selectDate\"\n >\n Seleccionar fecha\n </base-button>\n </div>\n </div>\n </base-modal>\n</template>\n<style>\n.dp__menu {\n border: 0 !important;\n}\n.dp__theme_light {\n --dp-primary-color: #00a48f;\n --dp-range-between-dates-background-color: var(--dp-primary-color);\n --dp-range-between-dates-text-color: var(--dp-primary-text-color);\n --dp-text-color: #202020;\n --dp-disabled-color-text: #9f9f9f;\n --dp-border-color: #f2f2f2;\n --dp-future-offset-color: #6F6F6F;\n}\n:root {\n --dp-cell-border-radius: 100px;\n --dp-font-family: 'Poppins', sans-serif;\n --dp-row-margin: 8px 0;\n --dp-cell-size: 100%;\n --dp-menu-padding: 0;\n --dp-action-row-padding: 0;\n}\n.dp__calendar_row {\n height: 32px;\n}\n.dp__calendar_item {\n height: 32px;\n width: 100%;\n}\n.dp__cell_inner {\n border: 0px;\n}\n.dp__range_start {\n border-end-start-radius: 100px;\n border-start-start-radius: 100px;\n}\n.dp__range_end {\n border-end-end-radius: 100px;\n border-start-end-radius: 100px;\n}\n.dp__calendar_header {\n font-weight: normal;\n height: 32px;\n}\n.dp__main {\n justify-content: center;\n position: relative;\n}\n.dp__action_row {\n max-width: 10px;\n}\n.dp__cell_offset.dp--future {\n color: var(--dp-future-offset-color);\n}\n.dp__range_start.dp__cell_offset.dp--future,\n.dp__range_between.dp__cell_offset.dp--future,\n.dp__range_end.dp__cell_offset.dp--future {\n color: white;\n}\n.dp__cell_disabled {\n text-decoration: line-through;\n}\n</style>\n","export default \"__VITE_ASSET__317232e2__\"","import { api } from './index';\n\nexport const addressesApi = {\n get(id: number) {\n const path = `/api/internal/addresses/${id}`;\n\n return api({\n method: 'get',\n url: path,\n });\n },\n index(userId: number) {\n const path = `/api/internal/users/${userId}/addresses`;\n\n return api({\n method: 'get',\n url: path,\n });\n },\n create(data: Partial<AddressFormData>) {\n const path = '/api/internal/addresses';\n\n return api({\n method: 'post',\n url: path,\n data,\n });\n },\n update(id: number, data: Partial<AddressFormData>) {\n const path = `/api/internal/addresses/${id}`;\n\n return api({\n method: 'patch',\n url: path,\n data,\n });\n },\n delete(id: number) {\n const path = `/api/internal/addresses/${id}`;\n\n return api({\n method: 'delete',\n url: path,\n });\n },\n};\n","<script setup lang=\"ts\">\nimport { computed, inject, onMounted, ref } from 'vue';\nimport { camelCase } from 'lodash';\nimport { addressesApi } from '@/api/addresses';\n\ninterface Props {\n open: boolean\n shippingMethods: string[]\n}\ndefineProps<Props>();\n\nconst user = inject<User>('user');\n\nconst selectedMethod = ref();\n\nconst addressId = ref();\n\nconst emit = defineEmits<{\n (e: 'update:shippingMethod', value: string): void,\n (e: 'update:addressId', value: number): void,\n}>();\n\nconst addresses = ref<AddressData[]>();\nconst addressOptions = computed(() => addresses.value?.map((address) => (\n { id: address.id, name: address.displayName, alias: address.alias }\n)));\n\nconst showNewAddressForm = ref(false);\nfunction toggleNewAddressForm() {\n showNewAddressForm.value = !showNewAddressForm.value;\n}\n\nfunction getAddresses() {\n addressesApi.index(user?.id ?? 0).then((response) => {\n addresses.value = response.data.addresses;\n });\n}\n\nonMounted(() => {\n getAddresses();\n});\n\nfunction handleNewAddress() {\n getAddresses();\n toggleNewAddressForm();\n}\n\nfunction handleConfirm() {\n emit('update:shippingMethod', selectedMethod.value);\n if (addressId.value) {\n emit('update:addressId', addressId.value);\n }\n}\n\nconst place = ref<google.maps.places.PlaceResult>();\nconst errorEmpty = ref(false);\nconst error = ref(false);\nconst alias = ref('');\n\nfunction createAddress() {\n if (place.value) {\n try {\n const addressData = {\n street: '',\n streetNumber: '',\n commune: '',\n region: '',\n latitude: 0.0,\n longitude: 0.0,\n alias: alias.value,\n };\n\n addressData.latitude = place.value.geometry?.location?.lat() ?? 0.0;\n addressData.longitude = place.value.geometry?.location?.lng() ?? 0.0;\n\n place.value.address_components?.forEach((addressComponent) => {\n switch (addressComponent.types[0]) {\n case 'street_number':\n addressData.streetNumber = addressComponent.long_name;\n break;\n case 'route':\n addressData.street = addressComponent.long_name;\n break;\n case 'locality':\n addressData.commune = addressComponent.long_name;\n break;\n case 'administrative_area_level_1':\n addressData.region = addressComponent.long_name;\n break;\n default:\n // Do nothing\n }\n });\n\n addressesApi.create({ ...addressData, userId: user?.id }).then(() => handleNewAddress());\n } catch (e) {\n error.value = true;\n }\n } else {\n errorEmpty.value = true;\n }\n}\n</script>\n<template>\n <base-modal\n :open=\"open\"\n >\n <div class=\"flex w-full flex-col space-y-4\">\n <p class=\"font-bold text-z-gray-900\">\n Tipo de entrega\n </p>\n <div class=\"space-y-2\">\n <div\n v-for=\"shippingMethod in shippingMethods\"\n :key=\"shippingMethod\"\n class=\"relative flex space-x-3 text-z-gray-800\"\n >\n <v-field\n v-model=\"selectedMethod\"\n name=\"shippingMethod\"\n type=\"radio\"\n :value=\"shippingMethod\"\n class=\"peer mt-0.5 h-5 w-5 shrink-0 appearance-none rounded-full border-2 border-z-turquoise-600 checked:bg-z-turquoise-600\"\n />\n <img\n src=\"@/assets/icons/check.svg\"\n class=\"pointer-events-none absolute -left-2.5 top-[5px] w-[15px] opacity-0 peer-checked:opacity-100\"\n >\n <img\n src=\"@/assets/icons/check.svg\"\n class=\"pointer-events-none absolute left-[-9px] top-[5px] w-[15px] opacity-0 peer-checked:opacity-100\"\n >\n <p>{{ $t(`product.shippingMethod.clientAccount.${camelCase(shippingMethod)}`) }}</p>\n </div>\n </div>\n <base-tip\n v-if=\"selectedMethod === 'client_pickup'\"\n title=\"Retiro por cliente\"\n variant=\"bold\"\n >\n Te entregaremos la dirección del socio una vez que haya aceptado tu solicitud.\n </base-tip>\n <div\n v-if=\"selectedMethod === 'partner_delivery' && !showNewAddressForm\"\n class=\"space-y-4 rounded bg-z-turquoise-50 px-4 py-3\"\n >\n <p class=\"font-medium text-z-gray-900\">\n Dirección\n </p>\n <div class=\"flex max-h-48 flex-col space-y-4 overflow-y-scroll\">\n <div\n v-for=\"addressOption in addressOptions\"\n :key=\"addressOption.id\"\n class=\"relative flex space-x-3 text-z-gray-800\"\n >\n <v-field\n v-model=\"addressId\"\n name=\"addressId\"\n type=\"radio\"\n :value=\"addressOption.id\"\n class=\"peer mt-0.5 h-5 w-5 shrink-0 appearance-none rounded-full border-2 border-z-turquoise-600 checked:bg-z-turquoise-600\"\n />\n <img\n src=\"@/assets/icons/check.svg\"\n class=\"pointer-events-none absolute -left-2.5 top-[5px] w-[15px] opacity-0 peer-checked:opacity-100\"\n >\n <img\n src=\"@/assets/icons/check.svg\"\n class=\"pointer-events-none absolute left-[-9px] top-[5px] w-[15px] opacity-0 peer-checked:opacity-100\"\n >\n <div class=\"space-y-1\">\n <p\n v-if=\"addressOption.alias\"\n class=\"w-fit rounded bg-z-turquoise-100 p-2 text-xs text-z-turquoise-900\"\n >\n {{ addressOption.alias }}\n </p>\n <p class=\"line-clamp-1\">\n {{ addressOption.name }}\n </p>\n </div>\n </div>\n </div>\n <button\n type=\"button\"\n class=\"h-8 w-full rounded border border-z-turquoise-600 text-center text-sm text-z-turquoise-600\"\n @click=\"toggleNewAddressForm\"\n >\n Ingresar otra dirección\n </button>\n </div>\n <div\n v-if=\"showNewAddressForm\"\n class=\"flex flex-col space-y-4\"\n >\n <base-input\n v-model=\"alias\"\n name=\"alias\"\n placeholder=\"Casa, oficina, etc. (opcional)\"\n label=\"Casa, oficina, etc. (opcional)\"\n />\n <base-google-autocomplete\n v-model=\"place\"\n name=\"place\"\n placeholder=\"Ingresa una dirección\"\n :error=\"errorEmpty\"\n />\n <base-button\n class=\"w-full\"\n variant=\"secondary\"\n @click=\"createAddress\"\n >\n Guardar dirección\n </base-button>\n </div>\n <base-button\n v-if=\"!showNewAddressForm\"\n class=\"shrink-0\"\n :disabled=\"!selectedMethod || (selectedMethod === 'partner_delivery' ? !addressId : false)\"\n @click=\"handleConfirm\"\n >\n Confirmar\n </base-button>\n </div>\n </base-modal>\n</template>\n","export default \"__VITE_ASSET__14be5102__\"","import { api } from './index';\n\nexport const userRatingsApi = {\n create(data: Partial<UserRating>) {\n const path = '/api/internal/user_ratings';\n\n return api({\n method: 'post',\n url: path,\n data,\n }).then(response => response.data.userRating as UserRating);\n },\n index(receiverId: number) {\n const path = `/api/internal/users/${receiverId}/user_ratings`;\n\n return api({\n method: 'get',\n url: path,\n }).then(response => response.data.userRatings as UserRating[]);\n },\n};\n","<script setup lang=\"ts\">\nimport { computed, onMounted, ref } from 'vue';\nimport formatDistanceToNow from 'date-fns/formatDistanceToNow';\nimport { userRatingsApi } from '@/api/user-ratings';\n\ninterface Props {\n partnerAccount: PartnerAccount\n open: boolean\n}\n\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n (e: 'close'): void\n}>();\n\nfunction closeModal() {\n emit('close');\n}\n\nconst ratings = ref<UserRating[]>();\n\nconst ratingsWithDescription = computed(() => ratings.value?.filter((rating) => !!rating.description));\n\nonMounted(() => {\n userRatingsApi.index(props.partnerAccount.userId)\n .then(response => {\n ratings.value = response;\n });\n});\n</script>\n<template>\n <base-modal\n :open=\"open\"\n @close=\"closeModal\"\n >\n <div class=\"flex w-full flex-col items-center space-y-4\">\n <button\n type=\"button\"\n class=\"absolute self-end\"\n @click=\"closeModal\"\n >\n <img\n src=\"@/assets/icons/close.svg\"\n class=\"h-5 w-5\"\n >\n </button>\n <img\n v-if=\"partnerAccount.pictureUrl\"\n :src=\"partnerAccount.pictureUrl\"\n class=\"h-24 w-24 self-center rounded-full object-cover\"\n >\n <img\n v-else\n src=\"@/assets/icons/default-profile.svg\"\n class=\"h-24 w-24 rounded-full object-cover\"\n >\n <p class=\"text-lg font-bold text-z-gray-900\">\n {{ partnerAccount.firstName }} {{ partnerAccount.lastName }}\n </p>\n <div class=\"space-y-2\">\n <p class=\"text-center text-z-gray-900\">\n Calificaciones ({{ ratings?.length ?? 0 }})\n </p>\n <base-stars :value=\"partnerAccount.ratingAverage\" />\n </div>\n <p class=\"text-center\">\n Opiniones ({{ ratingsWithDescription?.length ?? 0 }})\n </p>\n <div class=\"w-full space-y-4 overflow-y-scroll scrollbar-hide\">\n <div\n v-for=\"rating in ratingsWithDescription\"\n :key=\"rating.id\"\n class=\"flex space-x-6 rounded-lg border border-z-gray-100 px-4 py-3\"\n >\n <img\n v-if=\"rating.senderPicture\"\n :src=\"rating.senderPicture\"\n class=\"h-10 w-10 self-center rounded-full object-cover\"\n >\n <img\n v-else\n src=\"@/assets/icons/default-profile.svg\"\n class=\"h-10 w-10 rounded-full object-cover\"\n >\n <div class=\"flex flex-col space-y-1\">\n <p class=\"text-sm font-medium italic text-z-gray-800\">\n \"{{ rating.description }}\"\n </p>\n <p class=\"text-sm font-medium text-z-gray-500\">\n {{ rating.senderName }}\n </p>\n <p class=\"text-sm font-light text-z-gray-500\">\n hace {{ formatDistanceToNow(new Date(rating.createdAt)) }}\n </p>\n </div>\n </div>\n </div>\n </div>\n </base-modal>\n</template>\n","<script setup lang=\"ts\">\nimport { eachDayOfInterval, addDays } from 'date-fns';\nimport { computed, inject, onMounted, ref } from 'vue';\nimport { useMutation } from '@tanstack/vue-query';\nimport camelCase from 'lodash/camelCase';\nimport { currency } from '@/utils/currency';\nimport { dateDiffInDays } from '@/utils/date-diff-in-days';\nimport { formatDate } from '@/utils/format-date';\nimport { useStore } from '@/store/store';\nimport { geodistance } from '@/utils/geodistance';\nimport { productBookingsApi } from '../api/product-bookings';\nimport { productsApi } from '../api/products';\nimport ProductMap from './product-map.vue';\nimport ProductViewCalendarModal from './product-view-calendar-modal.vue';\nimport ProductViewShippingModal from './product-view-shipping-modal.vue';\nimport ProductViewSummaryCard from './product-view-summary-card.vue';\nimport PartnerDetailsModal from './partner-details-modal.vue';\n\n/* eslint-disable no-magic-numbers */\nconst CLIENT_COST = inject<number>('clientServiceCost', 20) / 100;\n\ninterface Props {\n product: Product;\n partnerAccount: PartnerAccount;\n}\n\nconst props = defineProps<Props>();\n\nconst user = inject<User>('user');\n\nconst store = useStore();\n\nconst shippingMethods = computed(() => (props.product.shippingMethod === 'both' ?\n ['client_pickup', 'partner_delivery'] :\n [props.product.shippingMethod]));\n\nconst selectedShippingMethod = ref(shippingMethods.value.length > 1 ? null : shippingMethods.value[0]);\n\nconst showSummary = ref(false);\nconst fromSummary = ref(false);\n\nfunction toggleSummary() {\n showSummary.value = !showSummary.value;\n if (showSummary.value) {\n fromSummary.value = true;\n }\n}\n\nconst showCalendarModal = ref(false);\nfunction toggleCalendarModal() {\n showCalendarModal.value = !showCalendarModal.value;\n}\n\nconst showShippingModal = ref(false);\nfunction toggleShippingModal() {\n showShippingModal.value = !showShippingModal.value;\n}\n\nconst selectedAddressId = ref();\n\nfunction handleShippingMethod(shippingMethod:string) {\n selectedShippingMethod.value = shippingMethod;\n toggleShippingModal();\n if (fromSummary.value === false) {\n toggleSummary();\n }\n}\n\nfunction handleAddressId(addressId:number) {\n selectedAddressId.value = addressId;\n}\n\nconst showPartnerDetailsModal = ref(false);\nfunction togglePartnerDetailsModal() {\n showPartnerDetailsModal.value = !showPartnerDetailsModal.value;\n}\n\nconst showDeleteModal = ref(false);\nfunction toggleDeleteModal() {\n showDeleteModal.value = !showDeleteModal.value;\n}\n\nconst bookingRange = ref(\n store.newProductBookingRange ?\n store.newProductBookingRange.map((dateString) => new Date(dateString)) :\n undefined,\n);\nconst blocksNumber = computed(() => (\n bookingRange.value ? dateDiffInDays(bookingRange.value[0], bookingRange.value[1]) + 1 : 0\n));\nconst bookingPrice = computed(() => props.product.dailyPrice * blocksNumber.value);\nconst serviceCost = computed(() => bookingPrice.value * CLIENT_COST);\n\nconst disabledDates = computed(() => props.product.disabledDates\n .flatMap((disabledInterval) => eachDayOfInterval({\n start: new Date(disabledInterval.start),\n end: new Date(disabledInterval.end),\n })));\n\nconst { isSuccess: isProductBookingCreated, mutate: createProductBooking } = useMutation({\n mutationFn: () => productBookingsApi.create({\n productId: props.product.id,\n startDate: bookingRange.value ? bookingRange.value[0].toISOString() : '',\n endDate: bookingRange.value ? bookingRange.value[1].toISOString() : '',\n amount: bookingPrice.value,\n depositAmount: props.product.deposit,\n serviceCost: serviceCost.value,\n addressId: selectedShippingMethod.value === 'client_pickup' ? props.product.address.id : selectedAddressId.value,\n shippingMethod: selectedShippingMethod.value ?? '',\n }) as Promise<ProductBooking>,\n});\n\nfunction handleBack() {\n window.history.back();\n}\n\nconst selectedPictureUrl = ref(props.product.productPictures[0].picture.webpMd.url);\n\nfunction setSelectedPictureUrl(pictureUrl: string) {\n selectedPictureUrl.value = pictureUrl;\n}\n\nfunction handleRange(range:Date[]) {\n bookingRange.value = range;\n toggleCalendarModal();\n\n if (!user) {\n store.setNewProductBookingRange(range);\n window.location.href = '/usuarios/iniciar_sesion';\n } else if (shippingMethods.value.length > 1) {\n toggleShippingModal();\n } else {\n if (!fromSummary.value) toggleSummary();\n }\n}\n\nfunction handleSummaryBack() {\n window.location.reload();\n}\n\nonMounted(() => {\n if (bookingRange.value) {\n if (shippingMethods.value.length > 1) {\n toggleShippingModal();\n } else {\n toggleSummary();\n }\n }\n store.resetNewProductBookingRange();\n});\n\nconst accountType = computed(() => (props.partnerAccount.userId === user?.id ? 'partnerAccount' : 'clientAccount'));\n\nasync function deleteProduct() {\n await productsApi.delete(props.product.id)\n .then(() => {\n window.location.href = '/perfil/productos';\n });\n}\nconst distance = computed(() => {\n if (store.userLocation?.latitude && store.userLocation.longitude) {\n return geodistance(\n store.userLocation?.latitude, store.userLocation?.longitude,\n props.product.address.latitude, props.product.address.longitude,\n );\n }\n\n return null;\n});\n</script>\n<template>\n <the-layout hide-navbar>\n <div\n v-if=\"showSummary && !!bookingRange\"\n class=\"relative bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\"\n >\n <the-titlebar\n title=\"Realizar la solicitud de reserva\"\n @back=\"handleSummaryBack\"\n />\n <div class=\"divide-y-2 divide-z-gray-100\">\n <div class=\"px-6 py-4\">\n <product-view-summary-card\n :product=\"product\"\n :booking-range=\"bookingRange\"\n :shipping-method=\"shippingMethods[0]\"\n :partner-account=\"partnerAccount\"\n />\n </div>\n <div class=\"flex items-start justify-between space-x-6 px-6 py-4\">\n <div class=\"flex flex-col\">\n <p class=\"font-bold text-z-gray-900\">\n Condiciones de reserva\n </p>\n <p class=\"mt-4\">\n La reserva se concreta posterior a que el socio acepte tu solicitud y hayas pagado el arriendo.\n <br><br>\n Puedes cancelar tu reserva hasta 4 horas después que hayas pagado el arriendo, sin costos asociados.\n <br><br>\n Posterior a esto, sólo se reembolsará el 70% del valor del arriendo.\n <br><br>\n La garantía se te devolverá en su totalidad.\n </p>\n </div>\n <img src=\"@/assets/icons/calendar-delete.svg\">\n </div>\n <div class=\"flex flex-col px-6 py-4\">\n <p class=\"font-bold text-z-gray-900\">\n Resumen\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Fecha de entrega:\n </p>\n <p class=\"text-z-gray-800\">\n {{ formatDate(bookingRange[0].toDateString()) }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Fecha de devolución:\n </p>\n <p class=\"text-z-gray-800\">\n {{\n bookingRange[1] ?\n formatDate(addDays(bookingRange[1], 1).toDateString()) :\n formatDate(addDays(bookingRange[0], 1).toDateString())\n }}, hasta el mediodía\n </p>\n <button\n class=\"mt-1 w-fit text-sm text-z-gray-800 underline underline-offset-2\"\n @click=\"toggleCalendarModal\"\n >\n Editar\n </button>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Tipo de entrega\n </p>\n <p\n v-if=\"selectedShippingMethod\"\n class=\"text-z-gray-800\"\n >\n {{ $t(`product.shippingMethod.${accountType}.${camelCase(selectedShippingMethod)}`) }}\n </p>\n <button\n v-if=\"shippingMethods.length > 1\"\n class=\"mt-1 w-fit text-sm text-z-gray-800 underline underline-offset-2\"\n @click=\"toggleShippingModal\"\n >\n Editar\n </button>\n </div>\n <div class=\"px-6 py-4 text-z-gray-900\">\n <p class=\"font-bold\">\n Información del precio\n </p>\n <div class=\"mt-4 flex justify-between\">\n <p class=\"font-medium\">\n {{ currency(product.dailyPrice) }} x {{ blocksNumber }} {{ blocksNumber > 1 ? 'días' : 'día' }}\n </p>\n <p>\n {{ currency(bookingPrice) }}\n </p>\n </div>\n <div class=\"mt-1 flex items-baseline justify-between\">\n <p>\n Costo por servicio\n </p>\n <p>\n {{ currency(serviceCost) }}\n </p>\n </div>\n </div>\n <div class=\"px-6 py-4\">\n <p class=\"font-bold text-z-gray-900\">\n Pago\n </p>\n <div class=\"mt-4 flex flex-col items-center space-y-4 rounded-lg bg-z-blue p-4\">\n <img src=\"@/assets/images/mercadopago.webp\">\n <p class=\"text-center text-sm text-z-gray-800\">\n Una vez aceptada la solicitud, te avisaremos para que realices el pago con Mercado Pago.\n </p>\n </div>\n </div>\n <div class=\"px-6 py-4\">\n <base-button\n class=\"w-full\"\n @click=\"createProductBooking\"\n >\n Solicitar producto\n </base-button>\n </div>\n </div>\n </div>\n <div\n v-else\n class=\"relative bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\"\n >\n <the-titlebar\n :title=\"product.name\"\n class=\"md:rounded\"\n @back=\"handleBack()\"\n />\n <div\n class=\"divide-y-2 divide-z-gray-100\"\n >\n <div class=\"flex w-full flex-col px-6 py-4\">\n <p class=\"w-fit self-end rounded bg-z-turquoise-50 px-2 py-0.5 text-sm text-z-turquoise-600\">\n {{ $t(`product.condition.${camelCase(product.condition)}`) }}\n </p>\n <img\n :src=\"selectedPictureUrl\"\n class=\"mt-3 aspect-square w-full rounded-lg object-cover\"\n >\n <div class=\"mt-4 flex gap-4 overflow-x-scroll scrollbar-hide\">\n <button\n v-for=\"picture in product.productPictures\"\n :key=\"picture.id\"\n type=\"button\"\n class=\"aspect-square w-full shrink-0 basis-[30%]\"\n @click=\"setSelectedPictureUrl(picture.picture.webpMd.url)\"\n >\n <img\n :src=\"picture.picture.webpSm.url\"\n class=\"aspect-square w-full rounded-lg object-cover\"\n >\n </button>\n </div>\n <p class=\"mt-4 text-xl font-medium\">\n {{ product.name }}\n </p>\n <div class=\"mt-2 flex justify-between text-z-gray-900\">\n <p>Precio:</p>\n <p class=\"text-xl font-semibold\">\n {{ currency(product.dailyPrice) }}/<span class=\"text-sm font-normal\">por día</span>\n </p>\n </div>\n <div class=\"mt-2 flex justify-between text-z-gray-900\">\n <p>Garantía:</p>\n <p class=\"font-medium\">\n {{ currency(product.deposit) }}\n </p>\n </div>\n </div>\n <div class=\"px-6 py-4\">\n <product-map\n :lat=\"product.address.latitude\"\n :lng=\"product.address.longitude\"\n :zoom=\"13\"\n />\n <div class=\"mt-3 flex-col items-center justify-center space-y-0.5\">\n <div class=\"flex items-center justify-center space-x-2\">\n <img src=\"@/assets/icons/location-red.svg\">\n <p class=\"text-center text-z-gray-900\">\n <span class=\"font-medium\">{{ product.address.commune }}</span>, {{ product.address.region }}\n </p>\n </div>\n <p\n v-if=\"distance\"\n class=\"text-center text-sm text-z-gray-700\"\n >\n a <span class=\"font-medium\">{{ distance.toFixed(1) }} km</span> de ti\n </p>\n </div>\n </div>\n <div class=\"px-6 py-4\">\n <div class=\"flex items-start gap-2 rounded-lg bg-z-turquoise-50 p-3\">\n <img src=\"@/assets/icons/chat-active.svg\">\n <div class=\"flex flex-col\">\n <p class=\"font-medium text-z-gray-900\">\n Chat\n </p>\n <p class=\"text-z-gray-800\">\n Estará disponible cuando realices la solicitud de arriendo.\n </p>\n </div>\n </div>\n </div>\n <div class=\"flex justify-between px-6 py-4\">\n <div class=\"flex flex-col\">\n <p class=\"font-bold text-z-gray-900\">\n Dueño: {{ partnerAccount.firstName }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-800\">\n Acerca del dueño\n </p>\n <button\n class=\"w-fit font-medium text-z-gray-900 underline underline-offset-2\"\n @click=\"togglePartnerDetailsModal\"\n >\n Ver más\n </button>\n </div>\n <img\n :src=\"partnerAccount.pictureUrl\"\n class=\"h-10 w-10 rounded-full object-cover\"\n >\n </div>\n <div class=\"flex flex-col px-6 py-4 text-z-gray-900\">\n <p class=\"font-bold text-z-gray-900\">\n Arriendo\n </p>\n\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Mínimo de días\n </p>\n <p\n class=\"flex text-z-gray-800\"\n >\n {{ product.minRange }} {{ product.minRange === 1 ? 'día' : 'días' }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Máximo de días\n </p>\n <p\n v-if=\"product.maxRange > 0\"\n class=\"flex text-z-gray-800\"\n >\n {{ product.maxRange }}\n {{ product.maxRange === 1 ? 'día' : 'días' }}\n </p>\n <p\n v-else\n class=\"flex text-z-gray-800\"\n >\n Sin máximo\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n {{ accountType === 'clientAccount' ?\n 'Opciones de retiro y devolución' :\n 'Opciones de entrega y devolución' }}\n </p>\n <ul\n class=\"mt-2\"\n >\n <li\n v-for=\"shippingMethod in shippingMethods\"\n :key=\"shippingMethod\"\n class=\"ml-5 list-disc text-z-gray-800\"\n >\n {{ $t(`product.shippingMethod.${accountType}.${camelCase(shippingMethod)}`) }}.\n </li>\n </ul>\n </div>\n <div\n class=\"px-6 pb-6 pt-4 text-z-gray-900\"\n :class=\"product.isDeletable ? 'mb-48 md:mb-28' : 'mb-36 md:mb-16'\"\n >\n <p class=\"font-bold text-z-gray-900\">\n Descripción\n </p>\n <p class=\"mt-4 italic text-z-gray-900\">\n {{ product.description }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Categoría\n </p>\n <p\n class=\"flex text-z-gray-800\"\n >\n {{ product.category.name }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Subcategoría\n </p>\n <p\n class=\"flex text-z-gray-800\"\n >\n {{ product.subcategory.name }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Marca\n </p>\n <p\n class=\"flex text-z-gray-800\"\n >\n {{ product.brand }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Modelo\n </p>\n <p\n class=\"flex text-z-gray-800\"\n >\n {{ product.model }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Peso\n </p>\n <p\n class=\"flex text-z-gray-800\"\n >\n {{ $t(`product.weight.${camelCase(product.weight)}`) }}\n </p>\n </div>\n <div\n class=\"fixed bottom-16 left-0 w-full bg-white px-6 py-3 md:bottom-0 md:left-auto md:mx-auto md:max-w-md\"\n >\n <base-button\n v-if=\"partnerAccount.userId !== user?.id\"\n class=\"w-full\"\n @click=\"toggleCalendarModal\"\n >\n Ver disponibilidad\n </base-button>\n <base-button\n v-if=\"partnerAccount.userId === user?.id\"\n class=\"w-full md:mx-auto md:max-w-md\"\n :href=\"`/productos/${product.id}/editar`\"\n >\n Editar\n </base-button>\n <base-button\n v-if=\"product.isDeletable && partnerAccount.userId === user?.id\"\n class=\"mt-4 w-full md:mx-auto md:max-w-md\"\n variant=\"danger\"\n @click=\"toggleDeleteModal\"\n >\n Eliminar producto\n </base-button>\n </div>\n </div>\n </div>\n <product-view-calendar-modal\n :open=\"showCalendarModal\"\n :min-range=\"product.minRange\"\n :max-range=\"product.maxRange === 0 ? null : product.maxRange - 1\"\n :disabled-dates=\"disabledDates\"\n @close=\"toggleCalendarModal\"\n @update-range=\"(range:Date[]) => handleRange(range)\"\n />\n <product-view-shipping-modal\n v-if=\"shippingMethods.includes('partner_delivery')\"\n :open=\"showShippingModal\"\n :shipping-methods=\"shippingMethods\"\n @update:shipping-method=\"(selectedMethod:string) => handleShippingMethod(selectedMethod)\"\n @update:address-id=\"(addressId:number) => handleAddressId(addressId)\"\n />\n <base-modal\n v-if=\"isProductBookingCreated\"\n :open=\"isProductBookingCreated\"\n >\n <div class=\"flex w-full flex-col items-center\">\n <img\n src=\"@/assets/icons/check-circle.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-4 font-medium text-z-gray-900\">\n ¡Excelente!\n </p>\n <p class=\"mt-6 text-center text-z-gray-800\">\n El socio ha recibido tu solicitud. Te notificaremos cuando la responda.\n </p>\n <base-button\n class=\"mt-4 w-full\"\n href=\"/\"\n >\n Aceptar\n </base-button>\n </div>\n </base-modal>\n <partner-details-modal\n v-if=\"showPartnerDetailsModal\"\n :open=\"showPartnerDetailsModal\"\n :partner-account=\"partnerAccount\"\n @close=\"togglePartnerDetailsModal\"\n />\n <base-modal\n v-if=\"showDeleteModal\"\n :open=\"showDeleteModal\"\n >\n <div class=\"flex w-full flex-col items-center\">\n <img\n src=\"@/assets/icons/warning-alt.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-4 font-medium text-z-gray-900\">\n ¿Estás seguro?\n </p>\n <p class=\"mt-6 text-center text-z-gray-800\">\n Al eliminar tu producto <span class=\"font-medium\">{{ product.name }}</span>, dejará de estar disponible para la comunidad Zirkular.\n </p>\n <base-button\n class=\"mt-4 w-full\"\n variant=\"danger\"\n @click=\"deleteProduct\"\n >\n Sí, eliminar mi producto\n </base-button>\n <base-button\n class=\"mt-4 w-full\"\n variant=\"secondary\"\n @click=\"toggleDeleteModal\"\n >\n Cambié de opinión\n </base-button>\n </div>\n </base-modal>\n </the-layout>\n</template>\n","export default \"__VITE_ASSET__cb5c2311__\"","export default \"__VITE_ASSET__5cc493df__\"","export default \"__VITE_ASSET__b5a1b99e__\"","export default \"__VITE_ASSET__6b1a8563__\"","export default \"__VITE_ASSET__e276ea39__\"","export default \"__VITE_ASSET__63c6bab1__\"","export default \"__VITE_ASSET__4ae293ad__\"","export default \"__VITE_ASSET__bd27ea02__\"","import { api } from './index';\n\nexport const partnerAccountsApi = {\n create(userId:number) {\n const path = '/api/internal/partner_accounts';\n\n return api({\n method: 'post',\n url: path,\n data: { userId },\n });\n },\n\n products(id:number) {\n const path = `/api/internal/partner_accounts/${id}/products`;\n\n return api({\n method: 'get',\n url: path,\n }).then(response => response.data.products as Product[]);\n },\n\n earnings(id:number) {\n const path = `/api/internal/partner_accounts/${id}/earnings`;\n\n return api({\n method: 'get',\n url: path,\n }).then(response => response.data as PartnerEarnings);\n },\n};\n","export default \"__VITE_ASSET__c2222141__\"","<script setup lang=\"ts\">\nimport { computed, inject, ref } from 'vue';\n\ninterface ProfileMenuItem {\n name:string,\n icon:string,\n subitems: { name: string, path: string, partnerOnly?: boolean }[]\n}\n\ninterface Props {\n menuItem: ProfileMenuItem\n}\n\nconst props = defineProps<Props>();\n\nconst user = inject<User>('user');\n\nconst open = ref(false);\n\nfunction toggleOpen() {\n open.value = !open.value;\n}\n\nconst filteredSubitems = computed(() => {\n let finalSubitems = props.menuItem.subitems;\n\n if (!user?.partnerAccountId) {\n finalSubitems = finalSubitems.filter((subitem) => !subitem.partnerOnly);\n }\n\n return finalSubitems;\n});\n</script>\n<template>\n <div\n class=\"flex flex-col\"\n >\n <button\n class=\"flex justify-between px-6 py-5\"\n type=\"button\"\n @click=\"toggleOpen\"\n >\n <div class=\"flex space-x-2\">\n <img\n :src=\"menuItem.icon\"\n class=\"w-6\"\n >\n <p class=\"text-z-gray-900\">\n {{ menuItem.name }}\n </p>\n </div>\n <img\n src=\"@/assets/icons/direction-up.svg\"\n class=\"w-6\"\n :class=\"{ 'rotate-180': !open }\"\n >\n </button>\n <div\n v-if=\"open\"\n class=\"flex flex-col\"\n >\n <a\n v-for=\"subitem in filteredSubitems\"\n :key=\"subitem.name\"\n class=\"bg-z-turquoise-50 px-14 py-3 text-z-turquoise-600\"\n :href=\"subitem.path\"\n >\n {{ subitem.name }}\n </a>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, inject, onMounted, ref } from 'vue';\nimport { currency } from '@/utils/currency';\nimport storeIconUrl from '@/assets/icons/store.svg';\nimport menuUserIconUrl from '@/assets/icons/menu-user.svg';\nimport bookingsIconUrl from '@/assets/icons/bookings.svg';\nimport { partnerAccountsApi } from '@/api/partner-accounts';\nimport profileMenuItem from './profile-menu-item.vue';\n\nconst user = inject<User>('user');\n\nconst activeReferralCampaign = inject<boolean>('activeReferralCampaign');\n\nconst partnerEarnings = ref<PartnerEarnings>();\nconst loading = ref(false);\n\nconst MENUS = [\n {\n name: 'Perfil de socio',\n icon: storeIconUrl,\n subitems: [\n { name: 'Solicitudes y reservas', path: '/perfil/solicitudes_reservas/socio' },\n { name: 'Mis productos', path: '/perfil/productos' },\n { name: 'Ver mi tienda', path: `/socio/${user?.partnerAccountId}` },\n ],\n partnerOnly: true,\n },\n {\n name: 'Perfil de cliente',\n icon: bookingsIconUrl,\n subitems: [\n { name: 'Solicitudes y reservas', path: '/perfil/solicitudes_reservas/cliente' },\n // { name: 'Mi historial', path: '' },\n ],\n },\n {\n name: 'Mis datos',\n icon: menuUserIconUrl,\n subitems: [\n { name: 'Mi cuenta', path: '/perfil/cuenta' },\n { name: 'Mis direcciones', path: '/perfil/direcciones' },\n { name: 'Mis datos bancarios', path: '/perfil/datos_bancarios', partnerOnly: true },\n ],\n },\n];\n\nconst filteredMenus = computed(() => {\n let finalMenus = MENUS;\n if (!user?.partnerAccountId) {\n finalMenus = finalMenus.filter((menu) => !menu.partnerOnly);\n }\n\n return finalMenus;\n});\n\nfunction shareReferralLink() {\n const url = `https://${window.location.hostname}/usuarios/registro?refcode=${user?.referralCode?.code}`;\n if (navigator.share) {\n navigator.share({\n title: 'Únete a Zirkular! Conoce la nueva forma de arrendar',\n url,\n });\n } else {\n navigator.clipboard.writeText(url);\n }\n}\nfunction copyReferralCode() {\n if (user?.referralCode) {\n navigator.clipboard.writeText(user?.referralCode.code);\n }\n}\n\nconst showReferralDetails = ref(false);\n\nfunction toggleReferralDetails() {\n showReferralDetails.value = !showReferralDetails.value;\n}\n\nonMounted(() => {\n if (user?.partnerAccountId) {\n loading.value = true;\n partnerAccountsApi.earnings(user?.partnerAccountId)\n .then(response => {\n partnerEarnings.value = response;\n loading.value = false;\n });\n }\n});\n</script>\n\n<template>\n <div class=\"flex flex-col divide-y divide-z-gray-100\">\n <div\n v-if=\"user?.partnerAccountId\"\n class=\"grid grid-cols-2 gap-2 px-6 py-4\"\n >\n <div class=\"rounded-lg border border-z-gray-100 bg-gray-50 px-4 py-3 text-z-gray-800\">\n <p class=\"text-xs\">\n Total ganado\n </p>\n <img\n v-if=\"loading\"\n src=\"@/assets/icons/loading.svg\"\n class=\"w-5 animate-spin-slow\"\n >\n <p\n v-else\n class=\"mt-1 text-lg font-semibold\"\n >\n {{ currency(partnerEarnings?.totalEarnings ?? 0) }}\n </p>\n </div>\n <div class=\"rounded-lg border border-z-gray-100 bg-gray-50 px-4 py-3 text-z-gray-800\">\n <p class=\"text-xs\">\n Ganancia del mes\n </p>\n <img\n v-if=\"loading\"\n src=\"@/assets/icons/loading.svg\"\n class=\"w-5 animate-spin-slow\"\n >\n <p\n v-else\n class=\"mt-1 text-lg font-semibold\"\n >\n {{ currency(partnerEarnings?.monthlyEarnings ?? 0) }}\n </p>\n </div>\n </div>\n <div\n v-if=\"activeReferralCampaign\"\n class=\"flex flex-col px-6 py-4\"\n >\n <template v-if=\"user?.referralCode\">\n <div class=\"flex w-full items-center justify-between\">\n <div class=\"flex flex-col\">\n <p class=\"text-sm text-z-gray-800\">\n Tu código de referido es:\n </p>\n <button\n class=\"mt-1 w-fit font-mono font-semibold tracking-wide text-z-gray-900\"\n @click=\"copyReferralCode\"\n >\n {{ user?.referralCode.code }}\n </button>\n </div>\n <div class=\"flex\">\n <button\n class=\"flex items-center space-x-2 rounded border bg-z-gray-50 px-2 py-1\"\n @click=\"shareReferralLink\"\n >\n <img\n class=\"\"\n src=\"@/assets/icons/share.svg\"\n >\n <p\n class=\"text-sm text-z-gray-900\"\n >\n Compartir\n </p>\n </button>\n <button\n class=\"pl-2\"\n @click=\"toggleReferralDetails\"\n >\n <img\n src=\"@/assets/icons/chevron-down.svg\"\n :class=\"{ 'rotate-180': showReferralDetails}\"\n >\n </button>\n </div>\n </div>\n <div\n v-if=\"showReferralDetails\"\n class=\"mt-2 flex flex-col space-y-2 rounded-lg border border-z-gray-100 bg-z-gray-50 px-3 py-2 text-sm text-z-gray-900\"\n >\n <p>Por cada persona que se registre con tu código y suba 3 productos, ambos obtendrán <span class=\"font-medium\">$3.000</span> de regalo.</p>\n <a\n class=\"text-z-turquoise-700 underline underline-offset-2\"\n href=\"/legal/referidos\"\n >\n Ver términos y condiciones\n </a>\n </div>\n </template>\n <template v-else>\n <div class=\"flex w-full flex-col\">\n <button\n class=\"flex items-center justify-between\"\n @click=\"toggleReferralDetails\"\n >\n <p class=\"text-left font-medium leading-5 text-z-gray-800\">\n ¡Obtén tu código de referido y gana!\n </p>\n <img\n src=\"@/assets/icons/chevron-down.svg\"\n :class=\"{ 'rotate-180': showReferralDetails}\"\n >\n </button>\n <div\n v-if=\"showReferralDetails\"\n class=\"my-2 flex flex-col space-y-2 rounded-lg border border-z-gray-100 bg-z-gray-50 px-3 py-2 text-sm text-z-gray-900\"\n >\n <p>Por cada persona que se registre con tu código y suba 3 productos, ambos obtendrán <span class=\"font-medium\">$3.000</span> de regalo.</p>\n <a\n class=\"text-z-turquoise-700 underline underline-offset-2\"\n href=\"/legal/referidos\"\n >\n Ver términos y condiciones\n </a>\n </div>\n <p class=\"text-xs text-z-gray-800\">\n Completa las siguientes tareas para obtener tu código\n <span v-if=\"user?.hasCodeRedeem\">y ganar tus $3.000 iniciales</span>\n </p>\n <p class=\"mt-2 text-z-gray-900\">\n Productos subidos:\n </p>\n <base-progress-bar\n :total=\"3\"\n :value=\"user?.productsCount\"\n class=\"mt-1\"\n />\n <div class=\"mt-2 flex justify-between\">\n <div class=\"flex size-6 items-center justify-center rounded-full bg-z-gray-200 font-medium\">\n 0\n </div>\n <div class=\"flex size-6 items-center justify-center rounded-full bg-z-gray-200 font-medium\">\n 3\n </div>\n </div>\n </div>\n </template>\n </div>\n <profile-menu-item\n v-for=\"menuItem, index in filteredMenus\"\n :key=\"index\"\n :menu-item=\"menuItem\"\n />\n <div\n class=\"flex flex-col\"\n >\n <a\n class=\"flex justify-between px-6 py-5\"\n href=\"/soporte\"\n >\n <div class=\"flex space-x-2\">\n <img\n src=\"@/assets/icons/help-alt.svg\"\n class=\"w-6\"\n >\n <p class=\"text-z-gray-900\">\n Chats de soporte\n </p>\n </div>\n </a>\n </div>\n <div\n class=\"flex flex-col\"\n >\n <a\n class=\"flex justify-between px-6 py-5\"\n href=\"/usuarios/cerrar_sesion\"\n >\n <div class=\"flex space-x-2\">\n <img\n src=\"@/assets/icons/logout.svg\"\n class=\"w-6\"\n >\n <p class=\"text-z-gray-900\">\n Cerrar sesión\n </p>\n </div>\n </a>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport productCard from './product-card.vue';\n\ninterface Props {\n products?: Product[] | null\n}\ndefineProps<Props>();\n\nfunction handleBack() {\n window.history.back();\n}\n</script>\n<template>\n <the-layout hide-navbar>\n <div class=\"bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"Productos publicados\"\n @back=\"handleBack\"\n />\n <div class=\"p-6\">\n <div\n class=\"mt-4 grid grid-cols-2 gap-4\"\n >\n <product-card\n v-for=\"product in products\"\n :key=\"product.id\"\n :product=\"product\"\n />\n </div>\n </div>\n </div>\n </the-layout>\n</template>\n","<script setup lang=\"ts\">\nimport productGrid from './product-grid.vue';\n\ninterface Props {\n products: Product[]\n}\ndefineProps<Props>();\n\nconst searchTerms = new URLSearchParams(window.location.search).get('q');\n</script>\n<template>\n <the-layout :active-menu=\"0\">\n <div class=\"m-10 flex max-h-fit\">\n <div class=\"mt-2\">\n <p class=\"ml-12 text-3xl\">\n Mostrando resultados de búsqueda \"{{ searchTerms }}\"\n </p>\n <hr class=\"ml-10 mt-5 border-gray-400\">\n <product-grid\n :products=\"products\"\n />\n </div>\n </div>\n </the-layout>\n</template>\n","<script setup lang=\"ts\">\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue';\nimport { forEach, groupBy, sortBy } from 'lodash';\nimport { computed } from 'vue';\n\ninterface Props {\n questions: FrequentlyAskedQuestion[]\n}\nconst props = defineProps<Props>();\n\nconst groupedQuestions = computed(() => {\n const groups = groupBy(props.questions, 'section');\n\n forEach(groups, (group, key) => {\n groups[key] = sortBy(group, 'position');\n });\n\n return groups;\n});\n</script>\n<template>\n <the-layout :active-menu=\"0\">\n <div class=\"flex flex-col px-6 pb-4 pt-6 md:order-last md:mx-[16%] md:mt-12 md:rounded md:bg-white md:pt-8\">\n <p class=\"text-xl font-medium text-z-gray-900\">\n Preguntas Frecuentes\n </p>\n <div\n v-for=\"group, key in groupedQuestions\"\n :key=\"key\"\n class=\"mt-8 flex flex-col pb-2\"\n >\n <p class=\"text-lg font-medium text-z-gray-900\">\n {{ $t(`frequentlyAskedQuestion.section.${key}`) }} Zirkular\n </p>\n <Disclosure\n v-for=\"question, index in group\"\n :key=\"question.id\"\n v-slot=\"{ open }\"\n >\n <DisclosureButton class=\"my-2 flex items-start justify-between rounded-lg bg-z-turquoise-50 p-3 font-medium text-z-turquoise-600\">\n <p class=\"text-left\">\n {{ index + 1 }}. {{ question.question }}\n </p>\n <img\n src=\"@/assets/icons/chevron-right.svg\"\n class=\"w-6\"\n :class=\"open ? '-rotate-90' : 'rotate-90'\"\n >\n </DisclosureButton>\n <DisclosurePanel class=\"mb-6 text-sm text-z-gray-800 md:px-3 md:text-base\">\n <p>{{ question.answer }}</p>\n </DisclosurePanel>\n </Disclosure>\n </div>\n </div>\n </the-layout>\n</template>\n","<script setup lang=\"ts\">\nimport { partnerAccountsApi } from '@/api/partner-accounts';\nimport { userRatingsApi } from '@/api/user-ratings';\nimport { onMounted, ref } from 'vue';\nimport { currency } from '@/utils/currency';\nimport { formatDate } from '@/utils/format-date';\n\ninterface Props {\n partnerAccount: PartnerAccount\n}\n\nconst props = defineProps<Props>();\n\nconst ratings = ref<UserRating[]>();\n\nconst products = ref<Product[]>();\n\nonMounted(() => {\n userRatingsApi.index(props.partnerAccount.userId)\n .then(response => {\n ratings.value = response;\n });\n partnerAccountsApi.products(props.partnerAccount.id)\n .then(response => {\n products.value = response;\n });\n});\n\nfunction handleBack() {\n window.history.back();\n}\n</script>\n<template>\n <the-layout hide-navbar>\n <div class=\"absolute top-0 flex h-full w-full flex-col bg-white md:relative md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-64px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar :title=\"`Tienda de ${partnerAccount.firstName}`\" @back=\"handleBack\" />\n <div class=\"mt-4 flex w-full flex-col items-center space-y-4 border-b border-z-gray-200 pb-6\">\n <img\n v-if=\"partnerAccount.pictureUrl\"\n :src=\"partnerAccount.pictureUrl\"\n class=\"h-24 w-24 self-center rounded-full object-cover\"\n >\n <img\n v-else\n src=\"@/assets/icons/default-profile.svg\"\n class=\"h-24 w-24 rounded-full object-cover\"\n >\n <div class=\"flex flex-col items-center\">\n <p class=\"text-lg font-bold text-z-gray-900\">\n {{ partnerAccount.firstName }} {{ partnerAccount.lastName }}\n </p>\n <p class=\"text-sm text-z-gray-600\">\n Socio desde {{ formatDate(partnerAccount.createdAt) }}\n </p>\n </div>\n <div class=\"space-y-2\">\n <p class=\"text-center text-z-gray-900\">\n Calificaciones ({{ ratings?.length ?? 0 }})\n </p>\n <base-stars :value=\"partnerAccount.ratingAverage\" />\n </div>\n </div>\n <div class=\"mt-4 flex w-full flex-col items-center space-y-4 px-6 pb-20\">\n <p class=\"w-full text-left text-lg font-medium text-z-gray-900\">\n Productos de {{ partnerAccount.firstName }}\n </p>\n <a\n v-for=\"product in products\"\n :key=\"product.id\"\n class=\"flex w-full rounded border border-z-gray-200 px-6 py-4\"\n :href=\"`/productos/${product.id}`\"\n >\n <img\n :src=\"product.productPictures[0].picture.webpSm.url\"\n class=\"size-24 rounded-sm object-cover\"\n :alt=\"`Imagen del producto ${product.name}`\"\n >\n <div class=\"ml-3 flex flex-col\">\n <p class=\"line-clamp-1 font-medium\">\n {{ product.name }}\n </p>\n <p class=\"mt-1 text-sm\">\n desde <span\n class=\"font-bold\"\n :class=\"`text-z-turquoise-600`\"\n >{{ currency(product.dailyPrice) }}/</span>día\n </p>\n </div>\n </a>\n </div>\n </div>\n </the-layout>\n</template>\n","export default \"__VITE_ASSET__b19d1ec9__\"","export default \"__VITE_ASSET__446443e3__\"","export default \"__VITE_ASSET__89f3141f__\"","<script setup lang=\"ts\">\nimport { camelCase } from 'lodash';\nimport { formatDate } from '@/utils/format-date';\nimport { currency } from '@/utils/currency';\nimport { computed, inject, ref } from 'vue';\nimport partnerDetailsModal from '../partner-details-modal.vue';\n\ninterface Props {\n productBooking: ProductBooking;\n accountType: 'partner' | 'client'\n hideTags?: boolean\n}\n\nconst props = defineProps<Props>();\n\nconst showPartnerDetailsModal = ref(false);\nfunction togglePartnerDetailsModal() {\n showPartnerDetailsModal.value = !showPartnerDetailsModal.value;\n}\nconst partnerServiceCost = inject<number>('partnerServiceCost');\n\n// eslint-disable-next-line no-magic-numbers\nconst partnerEarnings = computed(() => props.productBooking.amount * (100 - (partnerServiceCost ?? 0)) / 100);\n</script>\n<template>\n <div class=\"flex flex-col py-4\">\n <div\n v-if=\"!hideTags\"\n class=\"flex\"\n :class=\"productBooking.currentStatus === 'paid' ? 'justify-between' : 'justify-end'\"\n >\n <template v-if=\"productBooking.currentStatus === 'paid'\">\n <div\n v-if=\"productBooking.productBookingReports.length > 0\"\n class=\"flex items-center space-x-1 self-start rounded bg-z-cerise-200 px-2 py-0.5 text-center text-xs text-z-cerise-600\"\n >\n <img src=\"@/assets/icons/warning-alt.svg\">\n <p>\n Reportado\n </p>\n </div>\n <div\n v-else-if=\"productBooking.canceled\"\n class=\"flex space-x-1 self-start rounded bg-z-cerise-200 px-2 py-0.5 text-center text-xs text-z-cerise-600\"\n >\n <img\n src=\"@/assets/icons/cross-circle.svg\"\n class=\"w-4\"\n >\n <p>\n Cancelado\n </p>\n </div>\n <div\n v-else\n class=\"flex space-x-1 self-start rounded bg-z-turquoise-50 px-2 py-0.5 text-center text-xs text-z-turquoise-600\"\n >\n <img src=\"@/assets/icons/check-circle-alt.svg\">\n <p>\n Aceptado\n </p>\n </div>\n </template>\n <template v-if=\"['delivered', 'complete'].includes(productBooking.currentStatus)\">\n <a\n v-if=\"productBooking.productBookingReports.length > 0\"\n class=\"flex items-center space-x-1 self-start rounded bg-z-cerise-200 px-2 py-0.5 text-center text-xs text-z-cerise-600\"\n :href=\"`/reportes/${productBooking.productBookingReports[0].id}`\"\n >\n <img src=\"@/assets/icons/warning-alt.svg\">\n <p>\n Reportado\n </p>\n <img src=\"@/assets/icons/chevron-right-red.svg\">\n </a>\n </template>\n <template v-else>\n <p class=\"w-fit self-end rounded bg-z-turquoise-50 px-2 py-0.5 text-center text-xs text-z-turquoise-600\">\n {{ $t(`product.condition.${camelCase(productBooking.product.condition)}`) }}\n </p>\n </template>\n </div>\n <div class=\"flex space-x-4 pt-3\">\n <img\n :src=\"productBooking.productPictures[0].picture.webpSm.url\"\n class=\"h-[72px] w-[72px] rounded-lg border border-z-gray-50 object-cover\"\n >\n <div class=\"flex w-full flex-col\">\n <p class=\"line-clamp-1 font-medium\">\n {{ productBooking.product.name }}\n </p>\n <p class=\"mt-1 text-xs text-z-gray-800\">\n {{ formatDate(productBooking.startDate) }} - {{ formatDate(productBooking.endDate) }}\n </p>\n <p\n v-if=\"accountType === 'partner'\"\n class=\"mt-0.5 text-sm font-medium text-z-gray-900\"\n >\n ganarás {{ currency(partnerEarnings) }}\n </p>\n <a\n class=\"mt-1 flex text-xs text-z-gray-800 underline underline-offset-2\"\n :href=\"`/perfil/solicitudes_reservas/${productBooking.id}`\"\n >\n <p>Ver más</p>\n <img\n src=\"@/assets/icons/chevron-right.svg\"\n class=\"mt-0.5 w-3 brightness-50 grayscale\"\n >\n </a>\n <div class=\"mt-3 flex w-full items-center\">\n <div\n v-if=\"accountType === 'partner'\"\n class=\"flex items-center\"\n >\n <img\n :src=\"productBooking.clientAccount.pictureUrl\"\n class=\"h-6 w-6 rounded-full object-cover\"\n >\n <p class=\"ml-2 text-xs\">\n {{ productBooking.currentStatus === 'awaiting_approval' ? 'Solicitado' : 'Reservado' }}\n por\n {{ productBooking.clientAccount.firstName }}\n </p>\n </div>\n <button\n v-else\n class=\"flex items-center\"\n @click=\"togglePartnerDetailsModal\"\n >\n <img\n :src=\"productBooking.partnerAccount.pictureUrl\"\n class=\"h-6 w-6 rounded-full object-cover\"\n >\n <p class=\"ml-2 text-xs\">\n Dueño:\n {{ productBooking.partnerAccount.firstName }}\n </p>\n </button>\n <a\n class=\"ml-1\"\n :href=\"`/chats/${productBooking.chatId}`\"\n >\n <img\n src=\"@/assets/icons/chat-active.svg\"\n class=\"h-5\"\n >\n </a>\n </div>\n </div>\n </div>\n </div>\n <partner-details-modal\n v-if=\"showPartnerDetailsModal\"\n :open=\"showPartnerDetailsModal\"\n :partner-account=\"productBooking.partnerAccount\"\n @close=\"togglePartnerDetailsModal\"\n />\n</template>\n","export default \"__VITE_ASSET__79ae74dc__\"","export default \"__VITE_ASSET__7b577e0b__\"","export default \"__VITE_ASSET__bf2aab50__\"","/**\n * Based on Kendo UI Core expression code <https://github.com/telerik/kendo-ui-core#license-information>\n */\n'use strict'\n\nfunction Cache(maxSize) {\n this._maxSize = maxSize\n this.clear()\n}\nCache.prototype.clear = function () {\n this._size = 0\n this._values = Object.create(null)\n}\nCache.prototype.get = function (key) {\n return this._values[key]\n}\nCache.prototype.set = function (key, value) {\n this._size >= this._maxSize && this.clear()\n if (!(key in this._values)) this._size++\n\n return (this._values[key] = value)\n}\n\nvar SPLIT_REGEX = /[^.^\\]^[]+|(?=\\[\\]|\\.\\.)/g,\n DIGIT_REGEX = /^\\d+$/,\n LEAD_DIGIT_REGEX = /^\\d/,\n SPEC_CHAR_REGEX = /[~`!#$%\\^&*+=\\-\\[\\]\\\\';,/{}|\\\\\":<>\\?]/g,\n CLEAN_QUOTES_REGEX = /^\\s*(['\"]?)(.*?)(\\1)\\s*$/,\n MAX_CACHE_SIZE = 512\n\nvar pathCache = new Cache(MAX_CACHE_SIZE),\n setCache = new Cache(MAX_CACHE_SIZE),\n getCache = new Cache(MAX_CACHE_SIZE)\n\nvar config\n\nmodule.exports = {\n Cache: Cache,\n\n split: split,\n\n normalizePath: normalizePath,\n\n setter: function (path) {\n var parts = normalizePath(path)\n\n return (\n setCache.get(path) ||\n setCache.set(path, function setter(obj, value) {\n var index = 0\n var len = parts.length\n var data = obj\n\n while (index < len - 1) {\n var part = parts[index]\n if (\n part === '__proto__' ||\n part === 'constructor' ||\n part === 'prototype'\n ) {\n return obj\n }\n\n data = data[parts[index++]]\n }\n data[parts[index]] = value\n })\n )\n },\n\n getter: function (path, safe) {\n var parts = normalizePath(path)\n return (\n getCache.get(path) ||\n getCache.set(path, function getter(data) {\n var index = 0,\n len = parts.length\n while (index < len) {\n if (data != null || !safe) data = data[parts[index++]]\n else return\n }\n return data\n })\n )\n },\n\n join: function (segments) {\n return segments.reduce(function (path, part) {\n return (\n path +\n (isQuoted(part) || DIGIT_REGEX.test(part)\n ? '[' + part + ']'\n : (path ? '.' : '') + part)\n )\n }, '')\n },\n\n forEach: function (path, cb, thisArg) {\n forEach(Array.isArray(path) ? path : split(path), cb, thisArg)\n },\n}\n\nfunction normalizePath(path) {\n return (\n pathCache.get(path) ||\n pathCache.set(\n path,\n split(path).map(function (part) {\n return part.replace(CLEAN_QUOTES_REGEX, '$2')\n })\n )\n )\n}\n\nfunction split(path) {\n return path.match(SPLIT_REGEX) || ['']\n}\n\nfunction forEach(parts, iter, thisArg) {\n var len = parts.length,\n part,\n idx,\n isArray,\n isBracket\n\n for (idx = 0; idx < len; idx++) {\n part = parts[idx]\n\n if (part) {\n if (shouldBeQuoted(part)) {\n part = '\"' + part + '\"'\n }\n\n isBracket = isQuoted(part)\n isArray = !isBracket && /^\\d+$/.test(part)\n\n iter.call(thisArg, part, isBracket, isArray, idx, parts)\n }\n }\n}\n\nfunction isQuoted(str) {\n return (\n typeof str === 'string' && str && [\"'\", '\"'].indexOf(str.charAt(0)) !== -1\n )\n}\n\nfunction hasLeadingNumber(part) {\n return part.match(LEAD_DIGIT_REGEX) && !part.match(DIGIT_REGEX)\n}\n\nfunction hasSpecialChars(part) {\n return SPEC_CHAR_REGEX.test(part)\n}\n\nfunction shouldBeQuoted(part) {\n return !isQuoted(part) && (hasLeadingNumber(part) || hasSpecialChars(part))\n}\n","const reWords = /[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+|(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*/g\n\nconst words = (str) => str.match(reWords) || []\n\nconst upperFirst = (str) => str[0].toUpperCase() + str.slice(1)\n\nconst join = (str, d) => words(str).join(d).toLowerCase()\n\nconst camelCase = (str) =>\n words(str).reduce(\n (acc, next) =>\n `${acc}${\n !acc\n ? next.toLowerCase()\n : next[0].toUpperCase() + next.slice(1).toLowerCase()\n }`,\n '',\n )\n\nconst pascalCase = (str) => upperFirst(camelCase(str))\n\nconst snakeCase = (str) => join(str, '_')\n\nconst kebabCase = (str) => join(str, '-')\n\nconst sentenceCase = (str) => upperFirst(join(str, ' '))\n\nconst titleCase = (str) => words(str).map(upperFirst).join(' ')\n\nmodule.exports = {\n words,\n upperFirst,\n camelCase,\n pascalCase,\n snakeCase,\n kebabCase,\n sentenceCase,\n titleCase,\n}\n","\n/**\n * Topological sorting function\n *\n * @param {Array} edges\n * @returns {Array}\n */\n\nmodule.exports = function(edges) {\n return toposort(uniqueNodes(edges), edges)\n}\n\nmodule.exports.array = toposort\n\nfunction toposort(nodes, edges) {\n var cursor = nodes.length\n , sorted = new Array(cursor)\n , visited = {}\n , i = cursor\n // Better data structures make algorithm much faster.\n , outgoingEdges = makeOutgoingEdges(edges)\n , nodesHash = makeNodesHash(nodes)\n\n // check for unknown nodes\n edges.forEach(function(edge) {\n if (!nodesHash.has(edge[0]) || !nodesHash.has(edge[1])) {\n throw new Error('Unknown node. There is an unknown node in the supplied edges.')\n }\n })\n\n while (i--) {\n if (!visited[i]) visit(nodes[i], i, new Set())\n }\n\n return sorted\n\n function visit(node, i, predecessors) {\n if(predecessors.has(node)) {\n var nodeRep\n try {\n nodeRep = \", node was:\" + JSON.stringify(node)\n } catch(e) {\n nodeRep = \"\"\n }\n throw new Error('Cyclic dependency' + nodeRep)\n }\n\n if (!nodesHash.has(node)) {\n throw new Error('Found unknown node. Make sure to provided all involved nodes. Unknown node: '+JSON.stringify(node))\n }\n\n if (visited[i]) return;\n visited[i] = true\n\n var outgoing = outgoingEdges.get(node) || new Set()\n outgoing = Array.from(outgoing)\n\n if (i = outgoing.length) {\n predecessors.add(node)\n do {\n var child = outgoing[--i]\n visit(child, nodesHash.get(child), predecessors)\n } while (i)\n predecessors.delete(node)\n }\n\n sorted[--cursor] = node\n }\n}\n\nfunction uniqueNodes(arr){\n var res = new Set()\n for (var i = 0, len = arr.length; i < len; i++) {\n var edge = arr[i]\n res.add(edge[0])\n res.add(edge[1])\n }\n return Array.from(res)\n}\n\nfunction makeOutgoingEdges(arr){\n var edges = new Map()\n for (var i = 0, len = arr.length; i < len; i++) {\n var edge = arr[i]\n if (!edges.has(edge[0])) edges.set(edge[0], new Set())\n if (!edges.has(edge[1])) edges.set(edge[1], new Set())\n edges.get(edge[0]).add(edge[1])\n }\n return edges\n}\n\nfunction makeNodesHash(arr){\n var res = new Map()\n for (var i = 0, len = arr.length; i < len; i++) {\n res.set(arr[i], i)\n }\n return res\n}\n","import { getter, forEach, split, normalizePath, join } from 'property-expr';\nimport { camelCase, snakeCase } from 'tiny-case';\nimport toposort from 'toposort';\n\nconst toString = Object.prototype.toString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString : () => '';\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nfunction printNumber(val) {\n if (val != +val) return 'NaN';\n const isNegativeZero = val === 0 && 1 / val < 0;\n return isNegativeZero ? '-0' : '' + val;\n}\nfunction printSimpleValue(val, quoteStrings = false) {\n if (val == null || val === true || val === false) return '' + val;\n const typeOf = typeof val;\n if (typeOf === 'number') return printNumber(val);\n if (typeOf === 'string') return quoteStrings ? `\"${val}\"` : val;\n if (typeOf === 'function') return '[Function ' + (val.name || 'anonymous') + ']';\n if (typeOf === 'symbol') return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n const tag = toString.call(val).slice(8, -1);\n if (tag === 'Date') return isNaN(val.getTime()) ? '' + val : val.toISOString(val);\n if (tag === 'Error' || val instanceof Error) return '[' + errorToString.call(val) + ']';\n if (tag === 'RegExp') return regExpToString.call(val);\n return null;\n}\nfunction printValue(value, quoteStrings) {\n let result = printSimpleValue(value, quoteStrings);\n if (result !== null) return result;\n return JSON.stringify(value, function (key, value) {\n let result = printSimpleValue(this[key], quoteStrings);\n if (result !== null) return result;\n return value;\n }, 2);\n}\n\nfunction toArray(value) {\n return value == null ? [] : [].concat(value);\n}\n\nlet strReg = /\\$\\{\\s*(\\w+)\\s*\\}/g;\nclass ValidationError extends Error {\n static formatError(message, params) {\n const path = params.label || params.path || 'this';\n if (path !== params.path) params = Object.assign({}, params, {\n path\n });\n if (typeof message === 'string') return message.replace(strReg, (_, key) => printValue(params[key]));\n if (typeof message === 'function') return message(params);\n return message;\n }\n static isError(err) {\n return err && err.name === 'ValidationError';\n }\n constructor(errorOrErrors, value, field, type) {\n super();\n this.value = void 0;\n this.path = void 0;\n this.type = void 0;\n this.errors = void 0;\n this.params = void 0;\n this.inner = void 0;\n this.name = 'ValidationError';\n this.value = value;\n this.path = field;\n this.type = type;\n this.errors = [];\n this.inner = [];\n toArray(errorOrErrors).forEach(err => {\n if (ValidationError.isError(err)) {\n this.errors.push(...err.errors);\n this.inner = this.inner.concat(err.inner.length ? err.inner : err);\n } else {\n this.errors.push(err);\n }\n });\n this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0];\n if (Error.captureStackTrace) Error.captureStackTrace(this, ValidationError);\n }\n}\n\nlet mixed = {\n default: '${path} is invalid',\n required: '${path} is a required field',\n defined: '${path} must be defined',\n notNull: '${path} cannot be null',\n oneOf: '${path} must be one of the following values: ${values}',\n notOneOf: '${path} must not be one of the following values: ${values}',\n notType: ({\n path,\n type,\n value,\n originalValue\n }) => {\n const castMsg = originalValue != null && originalValue !== value ? ` (cast from the value \\`${printValue(originalValue, true)}\\`).` : '.';\n return type !== 'mixed' ? `${path} must be a \\`${type}\\` type, ` + `but the final value was: \\`${printValue(value, true)}\\`` + castMsg : `${path} must match the configured type. ` + `The validated value was: \\`${printValue(value, true)}\\`` + castMsg;\n }\n};\nlet string = {\n length: '${path} must be exactly ${length} characters',\n min: '${path} must be at least ${min} characters',\n max: '${path} must be at most ${max} characters',\n matches: '${path} must match the following: \"${regex}\"',\n email: '${path} must be a valid email',\n url: '${path} must be a valid URL',\n uuid: '${path} must be a valid UUID',\n trim: '${path} must be a trimmed string',\n lowercase: '${path} must be a lowercase string',\n uppercase: '${path} must be a upper case string'\n};\nlet number = {\n min: '${path} must be greater than or equal to ${min}',\n max: '${path} must be less than or equal to ${max}',\n lessThan: '${path} must be less than ${less}',\n moreThan: '${path} must be greater than ${more}',\n positive: '${path} must be a positive number',\n negative: '${path} must be a negative number',\n integer: '${path} must be an integer'\n};\nlet date = {\n min: '${path} field must be later than ${min}',\n max: '${path} field must be at earlier than ${max}'\n};\nlet boolean = {\n isValue: '${path} field must be ${value}'\n};\nlet object = {\n noUnknown: '${path} field has unspecified keys: ${unknown}'\n};\nlet array = {\n min: '${path} field must have at least ${min} items',\n max: '${path} field must have less than or equal to ${max} items',\n length: '${path} must have ${length} items'\n};\nlet tuple = {\n notType: params => {\n const {\n path,\n value,\n spec\n } = params;\n const typeLen = spec.types.length;\n if (Array.isArray(value)) {\n if (value.length < typeLen) return `${path} tuple value has too few items, expected a length of ${typeLen} but got ${value.length} for value: \\`${printValue(value, true)}\\``;\n if (value.length > typeLen) return `${path} tuple value has too many items, expected a length of ${typeLen} but got ${value.length} for value: \\`${printValue(value, true)}\\``;\n }\n return ValidationError.formatError(mixed.notType, params);\n }\n};\nvar locale = Object.assign(Object.create(null), {\n mixed,\n string,\n number,\n date,\n object,\n array,\n boolean\n});\n\nconst isSchema = obj => obj && obj.__isYupSchema__;\n\nclass Condition {\n static fromOptions(refs, config) {\n if (!config.then && !config.otherwise) throw new TypeError('either `then:` or `otherwise:` is required for `when()` conditions');\n let {\n is,\n then,\n otherwise\n } = config;\n let check = typeof is === 'function' ? is : (...values) => values.every(value => value === is);\n return new Condition(refs, (values, schema) => {\n var _branch;\n let branch = check(...values) ? then : otherwise;\n return (_branch = branch == null ? void 0 : branch(schema)) != null ? _branch : schema;\n });\n }\n constructor(refs, builder) {\n this.fn = void 0;\n this.refs = refs;\n this.refs = refs;\n this.fn = builder;\n }\n resolve(base, options) {\n let values = this.refs.map(ref =>\n // TODO: ? operator here?\n ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context));\n let schema = this.fn(values, base, options);\n if (schema === undefined ||\n // @ts-ignore this can be base\n schema === base) {\n return base;\n }\n if (!isSchema(schema)) throw new TypeError('conditions must return a schema object');\n return schema.resolve(options);\n }\n}\n\nconst prefixes = {\n context: '$',\n value: '.'\n};\nfunction create$9(key, options) {\n return new Reference(key, options);\n}\nclass Reference {\n constructor(key, options = {}) {\n this.key = void 0;\n this.isContext = void 0;\n this.isValue = void 0;\n this.isSibling = void 0;\n this.path = void 0;\n this.getter = void 0;\n this.map = void 0;\n if (typeof key !== 'string') throw new TypeError('ref must be a string, got: ' + key);\n this.key = key.trim();\n if (key === '') throw new TypeError('ref must be a non-empty string');\n this.isContext = this.key[0] === prefixes.context;\n this.isValue = this.key[0] === prefixes.value;\n this.isSibling = !this.isContext && !this.isValue;\n let prefix = this.isContext ? prefixes.context : this.isValue ? prefixes.value : '';\n this.path = this.key.slice(prefix.length);\n this.getter = this.path && getter(this.path, true);\n this.map = options.map;\n }\n getValue(value, parent, context) {\n let result = this.isContext ? context : this.isValue ? value : parent;\n if (this.getter) result = this.getter(result || {});\n if (this.map) result = this.map(result);\n return result;\n }\n\n /**\n *\n * @param {*} value\n * @param {Object} options\n * @param {Object=} options.context\n * @param {Object=} options.parent\n */\n cast(value, options) {\n return this.getValue(value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context);\n }\n resolve() {\n return this;\n }\n describe() {\n return {\n type: 'ref',\n key: this.key\n };\n }\n toString() {\n return `Ref(${this.key})`;\n }\n static isRef(value) {\n return value && value.__isYupRef;\n }\n}\n\n// @ts-ignore\nReference.prototype.__isYupRef = true;\n\nconst isAbsent = value => value == null;\n\nfunction createValidation(config) {\n function validate({\n value,\n path = '',\n options,\n originalValue,\n schema\n }, panic, next) {\n const {\n name,\n test,\n params,\n message,\n skipAbsent\n } = config;\n let {\n parent,\n context,\n abortEarly = schema.spec.abortEarly\n } = options;\n function resolve(item) {\n return Reference.isRef(item) ? item.getValue(value, parent, context) : item;\n }\n function createError(overrides = {}) {\n const nextParams = Object.assign({\n value,\n originalValue,\n label: schema.spec.label,\n path: overrides.path || path,\n spec: schema.spec\n }, params, overrides.params);\n for (const key of Object.keys(nextParams)) nextParams[key] = resolve(nextParams[key]);\n const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name);\n error.params = nextParams;\n return error;\n }\n const invalid = abortEarly ? panic : next;\n let ctx = {\n path,\n parent,\n type: name,\n from: options.from,\n createError,\n resolve,\n options,\n originalValue,\n schema\n };\n const handleResult = validOrError => {\n if (ValidationError.isError(validOrError)) invalid(validOrError);else if (!validOrError) invalid(createError());else next(null);\n };\n const handleError = err => {\n if (ValidationError.isError(err)) invalid(err);else panic(err);\n };\n const shouldSkip = skipAbsent && isAbsent(value);\n if (!options.sync) {\n try {\n Promise.resolve(!shouldSkip ? test.call(ctx, value, ctx) : true).then(handleResult, handleError);\n } catch (err) {\n handleError(err);\n }\n return;\n }\n let result;\n try {\n var _result;\n result = !shouldSkip ? test.call(ctx, value, ctx) : true;\n if (typeof ((_result = result) == null ? void 0 : _result.then) === 'function') {\n throw new Error(`Validation test of type: \"${ctx.type}\" returned a Promise during a synchronous validate. ` + `This test will finish after the validate call has returned`);\n }\n } catch (err) {\n handleError(err);\n return;\n }\n handleResult(result);\n }\n validate.OPTIONS = config;\n return validate;\n}\n\nfunction getIn(schema, path, value, context = value) {\n let parent, lastPart, lastPartDebug;\n\n // root path: ''\n if (!path) return {\n parent,\n parentPath: path,\n schema\n };\n forEach(path, (_part, isBracket, isArray) => {\n let part = isBracket ? _part.slice(1, _part.length - 1) : _part;\n schema = schema.resolve({\n context,\n parent,\n value\n });\n let isTuple = schema.type === 'tuple';\n let idx = isArray ? parseInt(part, 10) : 0;\n if (schema.innerType || isTuple) {\n if (isTuple && !isArray) throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part \"${lastPartDebug}\" must contain an index to the tuple element, e.g. \"${lastPartDebug}[0]\"`);\n if (value && idx >= value.length) {\n throw new Error(`Yup.reach cannot resolve an array item at index: ${_part}, in the path: ${path}. ` + `because there is no value at that index. `);\n }\n parent = value;\n value = value && value[idx];\n schema = isTuple ? schema.spec.types[idx] : schema.innerType;\n }\n\n // sometimes the array index part of a path doesn't exist: \"nested.arr.child\"\n // in these cases the current part is the next schema and should be processed\n // in this iteration. For cases where the index signature is included this\n // check will fail and we'll handle the `child` part on the next iteration like normal\n if (!isArray) {\n if (!schema.fields || !schema.fields[part]) throw new Error(`The schema does not contain the path: ${path}. ` + `(failed at: ${lastPartDebug} which is a type: \"${schema.type}\")`);\n parent = value;\n value = value && value[part];\n schema = schema.fields[part];\n }\n lastPart = part;\n lastPartDebug = isBracket ? '[' + _part + ']' : '.' + _part;\n });\n return {\n schema,\n parent,\n parentPath: lastPart\n };\n}\nfunction reach(obj, path, value, context) {\n return getIn(obj, path, value, context).schema;\n}\n\nclass ReferenceSet extends Set {\n describe() {\n const description = [];\n for (const item of this.values()) {\n description.push(Reference.isRef(item) ? item.describe() : item);\n }\n return description;\n }\n resolveAll(resolve) {\n let result = [];\n for (const item of this.values()) {\n result.push(resolve(item));\n }\n return result;\n }\n clone() {\n return new ReferenceSet(this.values());\n }\n merge(newItems, removeItems) {\n const next = this.clone();\n newItems.forEach(value => next.add(value));\n removeItems.forEach(value => next.delete(value));\n return next;\n }\n}\n\n// tweaked from https://github.com/Kelin2025/nanoclone/blob/0abeb7635bda9b68ef2277093f76dbe3bf3948e1/src/index.js\nfunction clone(src, seen = new Map()) {\n if (isSchema(src) || !src || typeof src !== 'object') return src;\n if (seen.has(src)) return seen.get(src);\n let copy;\n if (src instanceof Date) {\n // Date\n copy = new Date(src.getTime());\n seen.set(src, copy);\n } else if (src instanceof RegExp) {\n // RegExp\n copy = new RegExp(src);\n seen.set(src, copy);\n } else if (Array.isArray(src)) {\n // Array\n copy = new Array(src.length);\n seen.set(src, copy);\n for (let i = 0; i < src.length; i++) copy[i] = clone(src[i], seen);\n } else if (src instanceof Map) {\n // Map\n copy = new Map();\n seen.set(src, copy);\n for (const [k, v] of src.entries()) copy.set(k, clone(v, seen));\n } else if (src instanceof Set) {\n // Set\n copy = new Set();\n seen.set(src, copy);\n for (const v of src) copy.add(clone(v, seen));\n } else if (src instanceof Object) {\n // Object\n copy = {};\n seen.set(src, copy);\n for (const [k, v] of Object.entries(src)) copy[k] = clone(v, seen);\n } else {\n throw Error(`Unable to clone ${src}`);\n }\n return copy;\n}\n\nclass Schema {\n constructor(options) {\n this.type = void 0;\n this.deps = [];\n this.tests = void 0;\n this.transforms = void 0;\n this.conditions = [];\n this._mutate = void 0;\n this.internalTests = {};\n this._whitelist = new ReferenceSet();\n this._blacklist = new ReferenceSet();\n this.exclusiveTests = Object.create(null);\n this._typeCheck = void 0;\n this.spec = void 0;\n this.tests = [];\n this.transforms = [];\n this.withMutation(() => {\n this.typeError(mixed.notType);\n });\n this.type = options.type;\n this._typeCheck = options.check;\n this.spec = Object.assign({\n strip: false,\n strict: false,\n abortEarly: true,\n recursive: true,\n nullable: false,\n optional: true,\n coerce: true\n }, options == null ? void 0 : options.spec);\n this.withMutation(s => {\n s.nonNullable();\n });\n }\n\n // TODO: remove\n get _type() {\n return this.type;\n }\n clone(spec) {\n if (this._mutate) {\n if (spec) Object.assign(this.spec, spec);\n return this;\n }\n\n // if the nested value is a schema we can skip cloning, since\n // they are already immutable\n const next = Object.create(Object.getPrototypeOf(this));\n\n // @ts-expect-error this is readonly\n next.type = this.type;\n next._typeCheck = this._typeCheck;\n next._whitelist = this._whitelist.clone();\n next._blacklist = this._blacklist.clone();\n next.internalTests = Object.assign({}, this.internalTests);\n next.exclusiveTests = Object.assign({}, this.exclusiveTests);\n\n // @ts-expect-error this is readonly\n next.deps = [...this.deps];\n next.conditions = [...this.conditions];\n next.tests = [...this.tests];\n next.transforms = [...this.transforms];\n next.spec = clone(Object.assign({}, this.spec, spec));\n return next;\n }\n label(label) {\n let next = this.clone();\n next.spec.label = label;\n return next;\n }\n meta(...args) {\n if (args.length === 0) return this.spec.meta;\n let next = this.clone();\n next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);\n return next;\n }\n withMutation(fn) {\n let before = this._mutate;\n this._mutate = true;\n let result = fn(this);\n this._mutate = before;\n return result;\n }\n concat(schema) {\n if (!schema || schema === this) return this;\n if (schema.type !== this.type && this.type !== 'mixed') throw new TypeError(`You cannot \\`concat()\\` schema's of different types: ${this.type} and ${schema.type}`);\n let base = this;\n let combined = schema.clone();\n const mergedSpec = Object.assign({}, base.spec, combined.spec);\n combined.spec = mergedSpec;\n combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);\n\n // manually merge the blacklist/whitelist (the other `schema` takes\n // precedence in case of conflicts)\n combined._whitelist = base._whitelist.merge(schema._whitelist, schema._blacklist);\n combined._blacklist = base._blacklist.merge(schema._blacklist, schema._whitelist);\n\n // start with the current tests\n combined.tests = base.tests;\n combined.exclusiveTests = base.exclusiveTests;\n\n // manually add the new tests to ensure\n // the deduping logic is consistent\n combined.withMutation(next => {\n schema.tests.forEach(fn => {\n next.test(fn.OPTIONS);\n });\n });\n combined.transforms = [...base.transforms, ...combined.transforms];\n return combined;\n }\n isType(v) {\n if (v == null) {\n if (this.spec.nullable && v === null) return true;\n if (this.spec.optional && v === undefined) return true;\n return false;\n }\n return this._typeCheck(v);\n }\n resolve(options) {\n let schema = this;\n if (schema.conditions.length) {\n let conditions = schema.conditions;\n schema = schema.clone();\n schema.conditions = [];\n schema = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema);\n schema = schema.resolve(options);\n }\n return schema;\n }\n resolveOptions(options) {\n var _options$strict, _options$abortEarly, _options$recursive;\n return Object.assign({}, options, {\n from: options.from || [],\n strict: (_options$strict = options.strict) != null ? _options$strict : this.spec.strict,\n abortEarly: (_options$abortEarly = options.abortEarly) != null ? _options$abortEarly : this.spec.abortEarly,\n recursive: (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive\n });\n }\n\n /**\n * Run the configured transform pipeline over an input value.\n */\n\n cast(value, options = {}) {\n let resolvedSchema = this.resolve(Object.assign({\n value\n }, options));\n let allowOptionality = options.assert === 'ignore-optionality';\n let result = resolvedSchema._cast(value, options);\n if (options.assert !== false && !resolvedSchema.isType(result)) {\n if (allowOptionality && isAbsent(result)) {\n return result;\n }\n let formattedValue = printValue(value);\n let formattedResult = printValue(result);\n throw new TypeError(`The value of ${options.path || 'field'} could not be cast to a value ` + `that satisfies the schema type: \"${resolvedSchema.type}\". \\n\\n` + `attempted value: ${formattedValue} \\n` + (formattedResult !== formattedValue ? `result of cast: ${formattedResult}` : ''));\n }\n return result;\n }\n _cast(rawValue, options) {\n let value = rawValue === undefined ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this), rawValue);\n if (value === undefined) {\n value = this.getDefault(options);\n }\n return value;\n }\n _validate(_value, options = {}, panic, next) {\n let {\n path,\n originalValue = _value,\n strict = this.spec.strict\n } = options;\n let value = _value;\n if (!strict) {\n value = this._cast(value, Object.assign({\n assert: false\n }, options));\n }\n let initialTests = [];\n for (let test of Object.values(this.internalTests)) {\n if (test) initialTests.push(test);\n }\n this.runTests({\n path,\n value,\n originalValue,\n options,\n tests: initialTests\n }, panic, initialErrors => {\n // even if we aren't ending early we can't proceed further if the types aren't correct\n if (initialErrors.length) {\n return next(initialErrors, value);\n }\n this.runTests({\n path,\n value,\n originalValue,\n options,\n tests: this.tests\n }, panic, next);\n });\n }\n\n /**\n * Executes a set of validations, either schema, produced Tests or a nested\n * schema validate result.\n */\n runTests(runOptions, panic, next) {\n let fired = false;\n let {\n tests,\n value,\n originalValue,\n path,\n options\n } = runOptions;\n let panicOnce = arg => {\n if (fired) return;\n fired = true;\n panic(arg, value);\n };\n let nextOnce = arg => {\n if (fired) return;\n fired = true;\n next(arg, value);\n };\n let count = tests.length;\n let nestedErrors = [];\n if (!count) return nextOnce([]);\n let args = {\n value,\n originalValue,\n path,\n options,\n schema: this\n };\n for (let i = 0; i < tests.length; i++) {\n const test = tests[i];\n test(args, panicOnce, function finishTestRun(err) {\n if (err) {\n nestedErrors = nestedErrors.concat(err);\n }\n if (--count <= 0) {\n nextOnce(nestedErrors);\n }\n });\n }\n }\n asNestedTest({\n key,\n index,\n parent,\n parentPath,\n originalParent,\n options\n }) {\n const k = key != null ? key : index;\n if (k == null) {\n throw TypeError('Must include `key` or `index` for nested validations');\n }\n const isIndex = typeof k === 'number';\n let value = parent[k];\n const testOptions = Object.assign({}, options, {\n // Nested validations fields are always strict:\n // 1. parent isn't strict so the casting will also have cast inner values\n // 2. parent is strict in which case the nested values weren't cast either\n strict: true,\n parent,\n value,\n originalValue: originalParent[k],\n // FIXME: tests depend on `index` being passed around deeply,\n // we should not let the options.key/index bleed through\n key: undefined,\n // index: undefined,\n [isIndex ? 'index' : 'key']: k,\n path: isIndex || k.includes('.') ? `${parentPath || ''}[${value ? k : `\"${k}\"`}]` : (parentPath ? `${parentPath}.` : '') + key\n });\n return (_, panic, next) => this.resolve(testOptions)._validate(value, testOptions, panic, next);\n }\n validate(value, options) {\n let schema = this.resolve(Object.assign({}, options, {\n value\n }));\n return new Promise((resolve, reject) => schema._validate(value, options, (error, parsed) => {\n if (ValidationError.isError(error)) error.value = parsed;\n reject(error);\n }, (errors, validated) => {\n if (errors.length) reject(new ValidationError(errors, validated));else resolve(validated);\n }));\n }\n validateSync(value, options) {\n let schema = this.resolve(Object.assign({}, options, {\n value\n }));\n let result;\n schema._validate(value, Object.assign({}, options, {\n sync: true\n }), (error, parsed) => {\n if (ValidationError.isError(error)) error.value = parsed;\n throw error;\n }, (errors, validated) => {\n if (errors.length) throw new ValidationError(errors, value);\n result = validated;\n });\n return result;\n }\n isValid(value, options) {\n return this.validate(value, options).then(() => true, err => {\n if (ValidationError.isError(err)) return false;\n throw err;\n });\n }\n isValidSync(value, options) {\n try {\n this.validateSync(value, options);\n return true;\n } catch (err) {\n if (ValidationError.isError(err)) return false;\n throw err;\n }\n }\n _getDefault(_options) {\n let defaultValue = this.spec.default;\n if (defaultValue == null) {\n return defaultValue;\n }\n return typeof defaultValue === 'function' ? defaultValue.call(this) : clone(defaultValue);\n }\n getDefault(options\n // If schema is defaulted we know it's at least not undefined\n ) {\n let schema = this.resolve(options || {});\n return schema._getDefault(options);\n }\n default(def) {\n if (arguments.length === 0) {\n return this._getDefault();\n }\n let next = this.clone({\n default: def\n });\n return next;\n }\n strict(isStrict = true) {\n return this.clone({\n strict: isStrict\n });\n }\n nullability(nullable, message) {\n const next = this.clone({\n nullable\n });\n next.internalTests.nullable = createValidation({\n message,\n name: 'nullable',\n test(value) {\n return value === null ? this.schema.spec.nullable : true;\n }\n });\n return next;\n }\n optionality(optional, message) {\n const next = this.clone({\n optional\n });\n next.internalTests.optionality = createValidation({\n message,\n name: 'optionality',\n test(value) {\n return value === undefined ? this.schema.spec.optional : true;\n }\n });\n return next;\n }\n optional() {\n return this.optionality(true);\n }\n defined(message = mixed.defined) {\n return this.optionality(false, message);\n }\n nullable() {\n return this.nullability(true);\n }\n nonNullable(message = mixed.notNull) {\n return this.nullability(false, message);\n }\n required(message = mixed.required) {\n return this.clone().withMutation(next => next.nonNullable(message).defined(message));\n }\n notRequired() {\n return this.clone().withMutation(next => next.nullable().optional());\n }\n transform(fn) {\n let next = this.clone();\n next.transforms.push(fn);\n return next;\n }\n\n /**\n * Adds a test function to the schema's queue of tests.\n * tests can be exclusive or non-exclusive.\n *\n * - exclusive tests, will replace any existing tests of the same name.\n * - non-exclusive: can be stacked\n *\n * If a non-exclusive test is added to a schema with an exclusive test of the same name\n * the exclusive test is removed and further tests of the same name will be stacked.\n *\n * If an exclusive test is added to a schema with non-exclusive tests of the same name\n * the previous tests are removed and further tests of the same name will replace each other.\n */\n\n test(...args) {\n let opts;\n if (args.length === 1) {\n if (typeof args[0] === 'function') {\n opts = {\n test: args[0]\n };\n } else {\n opts = args[0];\n }\n } else if (args.length === 2) {\n opts = {\n name: args[0],\n test: args[1]\n };\n } else {\n opts = {\n name: args[0],\n message: args[1],\n test: args[2]\n };\n }\n if (opts.message === undefined) opts.message = mixed.default;\n if (typeof opts.test !== 'function') throw new TypeError('`test` is a required parameters');\n let next = this.clone();\n let validate = createValidation(opts);\n let isExclusive = opts.exclusive || opts.name && next.exclusiveTests[opts.name] === true;\n if (opts.exclusive) {\n if (!opts.name) throw new TypeError('Exclusive tests must provide a unique `name` identifying the test');\n }\n if (opts.name) next.exclusiveTests[opts.name] = !!opts.exclusive;\n next.tests = next.tests.filter(fn => {\n if (fn.OPTIONS.name === opts.name) {\n if (isExclusive) return false;\n if (fn.OPTIONS.test === validate.OPTIONS.test) return false;\n }\n return true;\n });\n next.tests.push(validate);\n return next;\n }\n when(keys, options) {\n if (!Array.isArray(keys) && typeof keys !== 'string') {\n options = keys;\n keys = '.';\n }\n let next = this.clone();\n let deps = toArray(keys).map(key => new Reference(key));\n deps.forEach(dep => {\n // @ts-ignore readonly array\n if (dep.isSibling) next.deps.push(dep.key);\n });\n next.conditions.push(typeof options === 'function' ? new Condition(deps, options) : Condition.fromOptions(deps, options));\n return next;\n }\n typeError(message) {\n let next = this.clone();\n next.internalTests.typeError = createValidation({\n message,\n name: 'typeError',\n skipAbsent: true,\n test(value) {\n if (!this.schema._typeCheck(value)) return this.createError({\n params: {\n type: this.schema.type\n }\n });\n return true;\n }\n });\n return next;\n }\n oneOf(enums, message = mixed.oneOf) {\n let next = this.clone();\n enums.forEach(val => {\n next._whitelist.add(val);\n next._blacklist.delete(val);\n });\n next.internalTests.whiteList = createValidation({\n message,\n name: 'oneOf',\n skipAbsent: true,\n test(value) {\n let valids = this.schema._whitelist;\n let resolved = valids.resolveAll(this.resolve);\n return resolved.includes(value) ? true : this.createError({\n params: {\n values: Array.from(valids).join(', '),\n resolved\n }\n });\n }\n });\n return next;\n }\n notOneOf(enums, message = mixed.notOneOf) {\n let next = this.clone();\n enums.forEach(val => {\n next._blacklist.add(val);\n next._whitelist.delete(val);\n });\n next.internalTests.blacklist = createValidation({\n message,\n name: 'notOneOf',\n test(value) {\n let invalids = this.schema._blacklist;\n let resolved = invalids.resolveAll(this.resolve);\n if (resolved.includes(value)) return this.createError({\n params: {\n values: Array.from(invalids).join(', '),\n resolved\n }\n });\n return true;\n }\n });\n return next;\n }\n strip(strip = true) {\n let next = this.clone();\n next.spec.strip = strip;\n return next;\n }\n\n /**\n * Return a serialized description of the schema including validations, flags, types etc.\n *\n * @param options Provide any needed context for resolving runtime schema alterations (lazy, when conditions, etc).\n */\n describe(options) {\n const next = (options ? this.resolve(options) : this).clone();\n const {\n label,\n meta,\n optional,\n nullable\n } = next.spec;\n const description = {\n meta,\n label,\n optional,\n nullable,\n default: next.getDefault(options),\n type: next.type,\n oneOf: next._whitelist.describe(),\n notOneOf: next._blacklist.describe(),\n tests: next.tests.map(fn => ({\n name: fn.OPTIONS.name,\n params: fn.OPTIONS.params\n })).filter((n, idx, list) => list.findIndex(c => c.name === n.name) === idx)\n };\n return description;\n }\n}\n// @ts-expect-error\nSchema.prototype.__isYupSchema__ = true;\nfor (const method of ['validate', 'validateSync']) Schema.prototype[`${method}At`] = function (path, value, options = {}) {\n const {\n parent,\n parentPath,\n schema\n } = getIn(this, path, value, options.context);\n return schema[method](parent && parent[parentPath], Object.assign({}, options, {\n parent,\n path\n }));\n};\nfor (const alias of ['equals', 'is']) Schema.prototype[alias] = Schema.prototype.oneOf;\nfor (const alias of ['not', 'nope']) Schema.prototype[alias] = Schema.prototype.notOneOf;\n\nconst returnsTrue = () => true;\nfunction create$8(spec) {\n return new MixedSchema(spec);\n}\nclass MixedSchema extends Schema {\n constructor(spec) {\n super(typeof spec === 'function' ? {\n type: 'mixed',\n check: spec\n } : Object.assign({\n type: 'mixed',\n check: returnsTrue\n }, spec));\n }\n}\ncreate$8.prototype = MixedSchema.prototype;\n\nfunction create$7() {\n return new BooleanSchema();\n}\nclass BooleanSchema extends Schema {\n constructor() {\n super({\n type: 'boolean',\n check(v) {\n if (v instanceof Boolean) v = v.valueOf();\n return typeof v === 'boolean';\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw, ctx) => {\n if (ctx.spec.coerce && !ctx.isType(value)) {\n if (/^(true|1)$/i.test(String(value))) return true;\n if (/^(false|0)$/i.test(String(value))) return false;\n }\n return value;\n });\n });\n }\n isTrue(message = boolean.isValue) {\n return this.test({\n message,\n name: 'is-value',\n exclusive: true,\n params: {\n value: 'true'\n },\n test(value) {\n return isAbsent(value) || value === true;\n }\n });\n }\n isFalse(message = boolean.isValue) {\n return this.test({\n message,\n name: 'is-value',\n exclusive: true,\n params: {\n value: 'false'\n },\n test(value) {\n return isAbsent(value) || value === false;\n }\n });\n }\n default(def) {\n return super.default(def);\n }\n defined(msg) {\n return super.defined(msg);\n }\n optional() {\n return super.optional();\n }\n required(msg) {\n return super.required(msg);\n }\n notRequired() {\n return super.notRequired();\n }\n nullable() {\n return super.nullable();\n }\n nonNullable(msg) {\n return super.nonNullable(msg);\n }\n strip(v) {\n return super.strip(v);\n }\n}\ncreate$7.prototype = BooleanSchema.prototype;\n\n// Taken from HTML spec: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address\nlet rEmail =\n// eslint-disable-next-line\n/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-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FFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i;\n\n// eslint-disable-next-line\nlet rUUID = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nlet isTrimmed = value => isAbsent(value) || value === value.trim();\nlet objStringTag = {}.toString();\nfunction create$6() {\n return new StringSchema();\n}\nclass StringSchema extends Schema {\n constructor() {\n super({\n type: 'string',\n check(value) {\n if (value instanceof String) value = value.valueOf();\n return typeof value === 'string';\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw, ctx) => {\n if (!ctx.spec.coerce || ctx.isType(value)) return value;\n\n // don't ever convert arrays\n if (Array.isArray(value)) return value;\n const strValue = value != null && value.toString ? value.toString() : value;\n\n // no one wants plain objects converted to [Object object]\n if (strValue === objStringTag) return value;\n return strValue;\n });\n });\n }\n required(message) {\n return super.required(message).withMutation(schema => schema.test({\n message: message || mixed.required,\n name: 'required',\n skipAbsent: true,\n test: value => !!value.length\n }));\n }\n notRequired() {\n return super.notRequired().withMutation(schema => {\n schema.tests = schema.tests.filter(t => t.OPTIONS.name !== 'required');\n return schema;\n });\n }\n length(length, message = string.length) {\n return this.test({\n message,\n name: 'length',\n exclusive: true,\n params: {\n length\n },\n skipAbsent: true,\n test(value) {\n return value.length === this.resolve(length);\n }\n });\n }\n min(min, message = string.min) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n test(value) {\n return value.length >= this.resolve(min);\n }\n });\n }\n max(max, message = string.max) {\n return this.test({\n name: 'max',\n exclusive: true,\n message,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value.length <= this.resolve(max);\n }\n });\n }\n matches(regex, options) {\n let excludeEmptyString = false;\n let message;\n let name;\n if (options) {\n if (typeof options === 'object') {\n ({\n excludeEmptyString = false,\n message,\n name\n } = options);\n } else {\n message = options;\n }\n }\n return this.test({\n name: name || 'matches',\n message: message || string.matches,\n params: {\n regex\n },\n skipAbsent: true,\n test: value => value === '' && excludeEmptyString || value.search(regex) !== -1\n });\n }\n email(message = string.email) {\n return this.matches(rEmail, {\n name: 'email',\n message,\n excludeEmptyString: true\n });\n }\n url(message = string.url) {\n return this.matches(rUrl, {\n name: 'url',\n message,\n excludeEmptyString: true\n });\n }\n uuid(message = string.uuid) {\n return this.matches(rUUID, {\n name: 'uuid',\n message,\n excludeEmptyString: false\n });\n }\n\n //-- transforms --\n ensure() {\n return this.default('').transform(val => val === null ? '' : val);\n }\n trim(message = string.trim) {\n return this.transform(val => val != null ? val.trim() : val).test({\n message,\n name: 'trim',\n test: isTrimmed\n });\n }\n lowercase(message = string.lowercase) {\n return this.transform(value => !isAbsent(value) ? value.toLowerCase() : value).test({\n message,\n name: 'string_case',\n exclusive: true,\n skipAbsent: true,\n test: value => isAbsent(value) || value === value.toLowerCase()\n });\n }\n uppercase(message = string.uppercase) {\n return this.transform(value => !isAbsent(value) ? value.toUpperCase() : value).test({\n message,\n name: 'string_case',\n exclusive: true,\n skipAbsent: true,\n test: value => isAbsent(value) || value === value.toUpperCase()\n });\n }\n}\ncreate$6.prototype = StringSchema.prototype;\n\n//\n// String Interfaces\n//\n\nlet isNaN$1 = value => value != +value;\nfunction create$5() {\n return new NumberSchema();\n}\nclass NumberSchema extends Schema {\n constructor() {\n super({\n type: 'number',\n check(value) {\n if (value instanceof Number) value = value.valueOf();\n return typeof value === 'number' && !isNaN$1(value);\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw, ctx) => {\n if (!ctx.spec.coerce) return value;\n let parsed = value;\n if (typeof parsed === 'string') {\n parsed = parsed.replace(/\\s/g, '');\n if (parsed === '') return NaN;\n // don't use parseFloat to avoid positives on alpha-numeric strings\n parsed = +parsed;\n }\n\n // null -> NaN isn't useful; treat all nulls as null and let it fail on\n // nullability check vs TypeErrors\n if (ctx.isType(parsed) || parsed === null) return parsed;\n return parseFloat(parsed);\n });\n });\n }\n min(min, message = number.min) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n test(value) {\n return value >= this.resolve(min);\n }\n });\n }\n max(max, message = number.max) {\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value <= this.resolve(max);\n }\n });\n }\n lessThan(less, message = number.lessThan) {\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n less\n },\n skipAbsent: true,\n test(value) {\n return value < this.resolve(less);\n }\n });\n }\n moreThan(more, message = number.moreThan) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n more\n },\n skipAbsent: true,\n test(value) {\n return value > this.resolve(more);\n }\n });\n }\n positive(msg = number.positive) {\n return this.moreThan(0, msg);\n }\n negative(msg = number.negative) {\n return this.lessThan(0, msg);\n }\n integer(message = number.integer) {\n return this.test({\n name: 'integer',\n message,\n skipAbsent: true,\n test: val => Number.isInteger(val)\n });\n }\n truncate() {\n return this.transform(value => !isAbsent(value) ? value | 0 : value);\n }\n round(method) {\n var _method;\n let avail = ['ceil', 'floor', 'round', 'trunc'];\n method = ((_method = method) == null ? void 0 : _method.toLowerCase()) || 'round';\n\n // this exists for symemtry with the new Math.trunc\n if (method === 'trunc') return this.truncate();\n if (avail.indexOf(method.toLowerCase()) === -1) throw new TypeError('Only valid options for round() are: ' + avail.join(', '));\n return this.transform(value => !isAbsent(value) ? Math[method](value) : value);\n }\n}\ncreate$5.prototype = NumberSchema.prototype;\n\n//\n// Number Interfaces\n//\n\n/* eslint-disable */\n/**\n *\n * Date.parse with progressive enhancement for ISO 8601 <https://github.com/csnover/js-iso8601>\n * NON-CONFORMANT EDITION.\n * © 2011 Colin Snover <http://zetafleet.com>\n * Released under MIT license.\n */\n\n// 1 YYYY 2 MM 3 DD 4 HH 5 mm 6 ss 7 msec 8 Z 9 ± 10 tzHH 11 tzmm\nvar isoReg = /^(\\d{4}|[+\\-]\\d{6})(?:-?(\\d{2})(?:-?(\\d{2}))?)?(?:[ T]?(\\d{2}):?(\\d{2})(?::?(\\d{2})(?:[,\\.](\\d{1,}))?)?(?:(Z)|([+\\-])(\\d{2})(?::?(\\d{2}))?)?)?$/;\nfunction parseIsoDate(date) {\n var numericKeys = [1, 4, 5, 6, 7, 10, 11],\n minutesOffset = 0,\n timestamp,\n struct;\n if (struct = isoReg.exec(date)) {\n // avoid NaN timestamps caused by “undefined” values being passed to Date.UTC\n for (var i = 0, k; k = numericKeys[i]; ++i) struct[k] = +struct[k] || 0;\n\n // allow undefined days and months\n struct[2] = (+struct[2] || 1) - 1;\n struct[3] = +struct[3] || 1;\n\n // allow arbitrary sub-second precision beyond milliseconds\n struct[7] = struct[7] ? String(struct[7]).substr(0, 3) : 0;\n\n // timestamps without timezone identifiers should be considered local time\n if ((struct[8] === undefined || struct[8] === '') && (struct[9] === undefined || struct[9] === '')) timestamp = +new Date(struct[1], struct[2], struct[3], struct[4], struct[5], struct[6], struct[7]);else {\n if (struct[8] !== 'Z' && struct[9] !== undefined) {\n minutesOffset = struct[10] * 60 + struct[11];\n if (struct[9] === '+') minutesOffset = 0 - minutesOffset;\n }\n timestamp = Date.UTC(struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7]);\n }\n } else timestamp = Date.parse ? Date.parse(date) : NaN;\n return timestamp;\n}\n\n// @ts-ignore\nlet invalidDate = new Date('');\nlet isDate = obj => Object.prototype.toString.call(obj) === '[object Date]';\nfunction create$4() {\n return new DateSchema();\n}\nclass DateSchema extends Schema {\n constructor() {\n super({\n type: 'date',\n check(v) {\n return isDate(v) && !isNaN(v.getTime());\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw, ctx) => {\n // null -> InvalidDate isn't useful; treat all nulls as null and let it fail on\n // nullability check vs TypeErrors\n if (!ctx.spec.coerce || ctx.isType(value) || value === null) return value;\n value = parseIsoDate(value);\n\n // 0 is a valid timestamp equivalent to 1970-01-01T00:00:00Z(unix epoch) or before.\n return !isNaN(value) ? new Date(value) : DateSchema.INVALID_DATE;\n });\n });\n }\n prepareParam(ref, name) {\n let param;\n if (!Reference.isRef(ref)) {\n let cast = this.cast(ref);\n if (!this._typeCheck(cast)) throw new TypeError(`\\`${name}\\` must be a Date or a value that can be \\`cast()\\` to a Date`);\n param = cast;\n } else {\n param = ref;\n }\n return param;\n }\n min(min, message = date.min) {\n let limit = this.prepareParam(min, 'min');\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n test(value) {\n return value >= this.resolve(limit);\n }\n });\n }\n max(max, message = date.max) {\n let limit = this.prepareParam(max, 'max');\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value <= this.resolve(limit);\n }\n });\n }\n}\nDateSchema.INVALID_DATE = invalidDate;\ncreate$4.prototype = DateSchema.prototype;\ncreate$4.INVALID_DATE = invalidDate;\n\n// @ts-expect-error\nfunction sortFields(fields, excludedEdges = []) {\n let edges = [];\n let nodes = new Set();\n let excludes = new Set(excludedEdges.map(([a, b]) => `${a}-${b}`));\n function addNode(depPath, key) {\n let node = split(depPath)[0];\n nodes.add(node);\n if (!excludes.has(`${key}-${node}`)) edges.push([key, node]);\n }\n for (const key of Object.keys(fields)) {\n let value = fields[key];\n nodes.add(key);\n if (Reference.isRef(value) && value.isSibling) addNode(value.path, key);else if (isSchema(value) && 'deps' in value) value.deps.forEach(path => addNode(path, key));\n }\n return toposort.array(Array.from(nodes), edges).reverse();\n}\n\nfunction findIndex(arr, err) {\n let idx = Infinity;\n arr.some((key, ii) => {\n var _err$path;\n if ((_err$path = err.path) != null && _err$path.includes(key)) {\n idx = ii;\n return true;\n }\n });\n return idx;\n}\nfunction sortByKeyOrder(keys) {\n return (a, b) => {\n return findIndex(keys, a) - findIndex(keys, b);\n };\n}\n\nconst parseJson = (value, _, ctx) => {\n if (typeof value !== 'string') {\n return value;\n }\n let parsed = value;\n try {\n parsed = JSON.parse(value);\n } catch (err) {\n /* */\n }\n return ctx.isType(parsed) ? parsed : value;\n};\n\n// @ts-ignore\nfunction deepPartial(schema) {\n if ('fields' in schema) {\n const partial = {};\n for (const [key, fieldSchema] of Object.entries(schema.fields)) {\n partial[key] = deepPartial(fieldSchema);\n }\n return schema.setFields(partial);\n }\n if (schema.type === 'array') {\n const nextArray = schema.optional();\n if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);\n return nextArray;\n }\n if (schema.type === 'tuple') {\n return schema.optional().clone({\n types: schema.spec.types.map(deepPartial)\n });\n }\n if ('optional' in schema) {\n return schema.optional();\n }\n return schema;\n}\nconst deepHas = (obj, p) => {\n const path = [...normalizePath(p)];\n if (path.length === 1) return path[0] in obj;\n let last = path.pop();\n let parent = getter(join(path), true)(obj);\n return !!(parent && last in parent);\n};\nlet isObject = obj => Object.prototype.toString.call(obj) === '[object Object]';\nfunction unknown(ctx, value) {\n let known = Object.keys(ctx.fields);\n return Object.keys(value).filter(key => known.indexOf(key) === -1);\n}\nconst defaultSort = sortByKeyOrder([]);\nfunction create$3(spec) {\n return new ObjectSchema(spec);\n}\nclass ObjectSchema extends Schema {\n constructor(spec) {\n super({\n type: 'object',\n check(value) {\n return isObject(value) || typeof value === 'function';\n }\n });\n this.fields = Object.create(null);\n this._sortErrors = defaultSort;\n this._nodes = [];\n this._excludedEdges = [];\n this.withMutation(() => {\n if (spec) {\n this.shape(spec);\n }\n });\n }\n _cast(_value, options = {}) {\n var _options$stripUnknown;\n let value = super._cast(_value, options);\n\n //should ignore nulls here\n if (value === undefined) return this.getDefault(options);\n if (!this._typeCheck(value)) return value;\n let fields = this.fields;\n let strip = (_options$stripUnknown = options.stripUnknown) != null ? _options$stripUnknown : this.spec.noUnknown;\n let props = [].concat(this._nodes, Object.keys(value).filter(v => !this._nodes.includes(v)));\n let intermediateValue = {}; // is filled during the transform below\n let innerOptions = Object.assign({}, options, {\n parent: intermediateValue,\n __validating: options.__validating || false\n });\n let isChanged = false;\n for (const prop of props) {\n let field = fields[prop];\n let exists = (prop in value);\n if (field) {\n let fieldValue;\n let inputValue = value[prop];\n\n // safe to mutate since this is fired in sequence\n innerOptions.path = (options.path ? `${options.path}.` : '') + prop;\n field = field.resolve({\n value: inputValue,\n context: options.context,\n parent: intermediateValue\n });\n let fieldSpec = field instanceof Schema ? field.spec : undefined;\n let strict = fieldSpec == null ? void 0 : fieldSpec.strict;\n if (fieldSpec != null && fieldSpec.strip) {\n isChanged = isChanged || prop in value;\n continue;\n }\n fieldValue = !options.__validating || !strict ?\n // TODO: use _cast, this is double resolving\n field.cast(value[prop], innerOptions) : value[prop];\n if (fieldValue !== undefined) {\n intermediateValue[prop] = fieldValue;\n }\n } else if (exists && !strip) {\n intermediateValue[prop] = value[prop];\n }\n if (exists !== prop in intermediateValue || intermediateValue[prop] !== value[prop]) {\n isChanged = true;\n }\n }\n return isChanged ? intermediateValue : value;\n }\n _validate(_value, options = {}, panic, next) {\n let {\n from = [],\n originalValue = _value,\n recursive = this.spec.recursive\n } = options;\n options.from = [{\n schema: this,\n value: originalValue\n }, ...from];\n // this flag is needed for handling `strict` correctly in the context of\n // validation vs just casting. e.g strict() on a field is only used when validating\n options.__validating = true;\n options.originalValue = originalValue;\n super._validate(_value, options, panic, (objectErrors, value) => {\n if (!recursive || !isObject(value)) {\n next(objectErrors, value);\n return;\n }\n originalValue = originalValue || value;\n let tests = [];\n for (let key of this._nodes) {\n let field = this.fields[key];\n if (!field || Reference.isRef(field)) {\n continue;\n }\n tests.push(field.asNestedTest({\n options,\n key,\n parent: value,\n parentPath: options.path,\n originalParent: originalValue\n }));\n }\n this.runTests({\n tests,\n value,\n originalValue,\n options\n }, panic, fieldErrors => {\n next(fieldErrors.sort(this._sortErrors).concat(objectErrors), value);\n });\n });\n }\n clone(spec) {\n const next = super.clone(spec);\n next.fields = Object.assign({}, this.fields);\n next._nodes = this._nodes;\n next._excludedEdges = this._excludedEdges;\n next._sortErrors = this._sortErrors;\n return next;\n }\n concat(schema) {\n let next = super.concat(schema);\n let nextFields = next.fields;\n for (let [field, schemaOrRef] of Object.entries(this.fields)) {\n const target = nextFields[field];\n nextFields[field] = target === undefined ? schemaOrRef : target;\n }\n return next.withMutation(s =>\n // XXX: excludes here is wrong\n s.setFields(nextFields, [...this._excludedEdges, ...schema._excludedEdges]));\n }\n _getDefault(options) {\n if ('default' in this.spec) {\n return super._getDefault(options);\n }\n\n // if there is no default set invent one\n if (!this._nodes.length) {\n return undefined;\n }\n let dft = {};\n this._nodes.forEach(key => {\n var _innerOptions;\n const field = this.fields[key];\n let innerOptions = options;\n if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[key]\n });\n }\n dft[key] = field && 'getDefault' in field ? field.getDefault(innerOptions) : undefined;\n });\n return dft;\n }\n setFields(shape, excludedEdges) {\n let next = this.clone();\n next.fields = shape;\n next._nodes = sortFields(shape, excludedEdges);\n next._sortErrors = sortByKeyOrder(Object.keys(shape));\n // XXX: this carries over edges which may not be what you want\n if (excludedEdges) next._excludedEdges = excludedEdges;\n return next;\n }\n shape(additions, excludes = []) {\n return this.clone().withMutation(next => {\n let edges = next._excludedEdges;\n if (excludes.length) {\n if (!Array.isArray(excludes[0])) excludes = [excludes];\n edges = [...next._excludedEdges, ...excludes];\n }\n\n // XXX: excludes here is wrong\n return next.setFields(Object.assign(next.fields, additions), edges);\n });\n }\n partial() {\n const partial = {};\n for (const [key, schema] of Object.entries(this.fields)) {\n partial[key] = 'optional' in schema && schema.optional instanceof Function ? schema.optional() : schema;\n }\n return this.setFields(partial);\n }\n deepPartial() {\n const next = deepPartial(this);\n return next;\n }\n pick(keys) {\n const picked = {};\n for (const key of keys) {\n if (this.fields[key]) picked[key] = this.fields[key];\n }\n return this.setFields(picked);\n }\n omit(keys) {\n const fields = Object.assign({}, this.fields);\n for (const key of keys) {\n delete fields[key];\n }\n return this.setFields(fields);\n }\n from(from, to, alias) {\n let fromGetter = getter(from, true);\n return this.transform(obj => {\n if (!obj) return obj;\n let newObj = obj;\n if (deepHas(obj, from)) {\n newObj = Object.assign({}, obj);\n if (!alias) delete newObj[from];\n newObj[to] = fromGetter(obj);\n }\n return newObj;\n });\n }\n\n /** Parse an input JSON string to an object */\n json() {\n return this.transform(parseJson);\n }\n noUnknown(noAllow = true, message = object.noUnknown) {\n if (typeof noAllow !== 'boolean') {\n message = noAllow;\n noAllow = true;\n }\n let next = this.test({\n name: 'noUnknown',\n exclusive: true,\n message: message,\n test(value) {\n if (value == null) return true;\n const unknownKeys = unknown(this.schema, value);\n return !noAllow || unknownKeys.length === 0 || this.createError({\n params: {\n unknown: unknownKeys.join(', ')\n }\n });\n }\n });\n next.spec.noUnknown = noAllow;\n return next;\n }\n unknown(allow = true, message = object.noUnknown) {\n return this.noUnknown(!allow, message);\n }\n transformKeys(fn) {\n return this.transform(obj => {\n if (!obj) return obj;\n const result = {};\n for (const key of Object.keys(obj)) result[fn(key)] = obj[key];\n return result;\n });\n }\n camelCase() {\n return this.transformKeys(camelCase);\n }\n snakeCase() {\n return this.transformKeys(snakeCase);\n }\n constantCase() {\n return this.transformKeys(key => snakeCase(key).toUpperCase());\n }\n describe(options) {\n let base = super.describe(options);\n base.fields = {};\n for (const [key, value] of Object.entries(this.fields)) {\n var _innerOptions2;\n let innerOptions = options;\n if ((_innerOptions2 = innerOptions) != null && _innerOptions2.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[key]\n });\n }\n base.fields[key] = value.describe(innerOptions);\n }\n return base;\n }\n}\ncreate$3.prototype = ObjectSchema.prototype;\n\nfunction create$2(type) {\n return new ArraySchema(type);\n}\nclass ArraySchema extends Schema {\n constructor(type) {\n super({\n type: 'array',\n spec: {\n types: type\n },\n check(v) {\n return Array.isArray(v);\n }\n });\n\n // `undefined` specifically means uninitialized, as opposed to \"no subtype\"\n this.innerType = void 0;\n this.innerType = type;\n }\n _cast(_value, _opts) {\n const value = super._cast(_value, _opts);\n\n // should ignore nulls here\n if (!this._typeCheck(value) || !this.innerType) {\n return value;\n }\n let isChanged = false;\n const castArray = value.map((v, idx) => {\n const castElement = this.innerType.cast(v, Object.assign({}, _opts, {\n path: `${_opts.path || ''}[${idx}]`\n }));\n if (castElement !== v) {\n isChanged = true;\n }\n return castElement;\n });\n return isChanged ? castArray : value;\n }\n _validate(_value, options = {}, panic, next) {\n var _options$recursive;\n // let sync = options.sync;\n // let path = options.path;\n let innerType = this.innerType;\n // let endEarly = options.abortEarly ?? this.spec.abortEarly;\n let recursive = (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive;\n options.originalValue != null ? options.originalValue : _value;\n super._validate(_value, options, panic, (arrayErrors, value) => {\n var _options$originalValu2;\n if (!recursive || !innerType || !this._typeCheck(value)) {\n next(arrayErrors, value);\n return;\n }\n\n // #950 Ensure that sparse array empty slots are validated\n let tests = new Array(value.length);\n for (let index = 0; index < value.length; index++) {\n var _options$originalValu;\n tests[index] = innerType.asNestedTest({\n options,\n index,\n parent: value,\n parentPath: options.path,\n originalParent: (_options$originalValu = options.originalValue) != null ? _options$originalValu : _value\n });\n }\n this.runTests({\n value,\n tests,\n originalValue: (_options$originalValu2 = options.originalValue) != null ? _options$originalValu2 : _value,\n options\n }, panic, innerTypeErrors => next(innerTypeErrors.concat(arrayErrors), value));\n });\n }\n clone(spec) {\n const next = super.clone(spec);\n // @ts-expect-error readonly\n next.innerType = this.innerType;\n return next;\n }\n\n /** Parse an input JSON string to an object */\n json() {\n return this.transform(parseJson);\n }\n concat(schema) {\n let next = super.concat(schema);\n\n // @ts-expect-error readonly\n next.innerType = this.innerType;\n if (schema.innerType)\n // @ts-expect-error readonly\n next.innerType = next.innerType ?\n // @ts-expect-error Lazy doesn't have concat and will break\n next.innerType.concat(schema.innerType) : schema.innerType;\n return next;\n }\n of(schema) {\n // FIXME: this should return a new instance of array without the default to be\n let next = this.clone();\n if (!isSchema(schema)) throw new TypeError('`array.of()` sub-schema must be a valid yup schema not: ' + printValue(schema));\n\n // @ts-expect-error readonly\n next.innerType = schema;\n next.spec = Object.assign({}, next.spec, {\n types: schema\n });\n return next;\n }\n length(length, message = array.length) {\n return this.test({\n message,\n name: 'length',\n exclusive: true,\n params: {\n length\n },\n skipAbsent: true,\n test(value) {\n return value.length === this.resolve(length);\n }\n });\n }\n min(min, message) {\n message = message || array.min;\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n // FIXME(ts): Array<typeof T>\n test(value) {\n return value.length >= this.resolve(min);\n }\n });\n }\n max(max, message) {\n message = message || array.max;\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value.length <= this.resolve(max);\n }\n });\n }\n ensure() {\n return this.default(() => []).transform((val, original) => {\n // We don't want to return `null` for nullable schema\n if (this._typeCheck(val)) return val;\n return original == null ? [] : [].concat(original);\n });\n }\n compact(rejector) {\n let reject = !rejector ? v => !!v : (v, i, a) => !rejector(v, i, a);\n return this.transform(values => values != null ? values.filter(reject) : values);\n }\n describe(options) {\n let base = super.describe(options);\n if (this.innerType) {\n var _innerOptions;\n let innerOptions = options;\n if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[0]\n });\n }\n base.innerType = this.innerType.describe(innerOptions);\n }\n return base;\n }\n}\ncreate$2.prototype = ArraySchema.prototype;\n\n// @ts-ignore\nfunction create$1(schemas) {\n return new TupleSchema(schemas);\n}\nclass TupleSchema extends Schema {\n constructor(schemas) {\n super({\n type: 'tuple',\n spec: {\n types: schemas\n },\n check(v) {\n const types = this.spec.types;\n return Array.isArray(v) && v.length === types.length;\n }\n });\n this.withMutation(() => {\n this.typeError(tuple.notType);\n });\n }\n _cast(inputValue, options) {\n const {\n types\n } = this.spec;\n const value = super._cast(inputValue, options);\n if (!this._typeCheck(value)) {\n return value;\n }\n let isChanged = false;\n const castArray = types.map((type, idx) => {\n const castElement = type.cast(value[idx], Object.assign({}, options, {\n path: `${options.path || ''}[${idx}]`\n }));\n if (castElement !== value[idx]) isChanged = true;\n return castElement;\n });\n return isChanged ? castArray : value;\n }\n _validate(_value, options = {}, panic, next) {\n let itemTypes = this.spec.types;\n super._validate(_value, options, panic, (tupleErrors, value) => {\n var _options$originalValu2;\n // intentionally not respecting recursive\n if (!this._typeCheck(value)) {\n next(tupleErrors, value);\n return;\n }\n let tests = [];\n for (let [index, itemSchema] of itemTypes.entries()) {\n var _options$originalValu;\n tests[index] = itemSchema.asNestedTest({\n options,\n index,\n parent: value,\n parentPath: options.path,\n originalParent: (_options$originalValu = options.originalValue) != null ? _options$originalValu : _value\n });\n }\n this.runTests({\n value,\n tests,\n originalValue: (_options$originalValu2 = options.originalValue) != null ? _options$originalValu2 : _value,\n options\n }, panic, innerTypeErrors => next(innerTypeErrors.concat(tupleErrors), value));\n });\n }\n describe(options) {\n let base = super.describe(options);\n base.innerType = this.spec.types.map((schema, index) => {\n var _innerOptions;\n let innerOptions = options;\n if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[index]\n });\n }\n return schema.describe(innerOptions);\n });\n return base;\n }\n}\ncreate$1.prototype = TupleSchema.prototype;\n\nfunction create(builder) {\n return new Lazy(builder);\n}\nclass Lazy {\n constructor(builder) {\n this.type = 'lazy';\n this.__isYupSchema__ = true;\n this.spec = void 0;\n this._resolve = (value, options = {}) => {\n let schema = this.builder(value, options);\n if (!isSchema(schema)) throw new TypeError('lazy() functions must return a valid schema');\n if (this.spec.optional) schema = schema.optional();\n return schema.resolve(options);\n };\n this.builder = builder;\n this.spec = {\n meta: undefined,\n optional: false\n };\n }\n clone(spec) {\n const next = new Lazy(this.builder);\n next.spec = Object.assign({}, this.spec, spec);\n return next;\n }\n optionality(optional) {\n const next = this.clone({\n optional\n });\n return next;\n }\n optional() {\n return this.optionality(true);\n }\n resolve(options) {\n return this._resolve(options.value, options);\n }\n cast(value, options) {\n return this._resolve(value, options).cast(value, options);\n }\n asNestedTest(config) {\n let {\n key,\n index,\n parent,\n options\n } = config;\n let value = parent[index != null ? index : key];\n return this._resolve(value, Object.assign({}, options, {\n value,\n parent\n })).asNestedTest(config);\n }\n validate(value, options) {\n return this._resolve(value, options).validate(value, options);\n }\n validateSync(value, options) {\n return this._resolve(value, options).validateSync(value, options);\n }\n validateAt(path, value, options) {\n return this._resolve(value, options).validateAt(path, value, options);\n }\n validateSyncAt(path, value, options) {\n return this._resolve(value, options).validateSyncAt(path, value, options);\n }\n isValid(value, options) {\n return this._resolve(value, options).isValid(value, options);\n }\n isValidSync(value, options) {\n return this._resolve(value, options).isValidSync(value, options);\n }\n describe(options) {\n return options ? this.resolve(options).describe(options) : {\n type: 'lazy',\n meta: this.spec.meta,\n label: undefined\n };\n }\n meta(...args) {\n if (args.length === 0) return this.spec.meta;\n let next = this.clone();\n next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);\n return next;\n }\n}\n\nfunction setLocale(custom) {\n Object.keys(custom).forEach(type => {\n // @ts-ignore\n Object.keys(custom[type]).forEach(method => {\n // @ts-ignore\n locale[type][method] = custom[type][method];\n });\n });\n}\n\nfunction addMethod(schemaType, name, fn) {\n if (!schemaType || !isSchema(schemaType.prototype)) throw new TypeError('You must provide a yup schema constructor function');\n if (typeof name !== 'string') throw new TypeError('A Method name must be provided');\n if (typeof fn !== 'function') throw new TypeError('Method function must be provided');\n schemaType.prototype[name] = fn;\n}\n\nexport { ArraySchema, BooleanSchema, DateSchema, MixedSchema, NumberSchema, ObjectSchema, Schema, StringSchema, TupleSchema, ValidationError, addMethod, create$2 as array, create$7 as bool, create$7 as boolean, create$4 as date, locale as defaultLocale, getIn, isSchema, create as lazy, create$8 as mixed, create$5 as number, create$3 as object, reach, create$9 as ref, setLocale, create$6 as string, create$1 as tuple };\n","<script setup lang=\"ts\">\nimport { productBookingsApi, type ProductBookingFormData } from '@/api/product-bookings';\nimport { add, formatDistanceToNowStrict } from 'date-fns';\nimport { computed, inject, ref } from 'vue';\nimport { object, string } from 'yup';\nimport { formatDate } from '@/utils/format-date';\nimport { Dialog, DialogPanel } from '@headlessui/vue';\n\nconst REJECT_OPTIONS = [\n { id: 'product_unavailable', name: 'El artículo no está disponible en esa fecha' },\n { id: 'partner_unavailable', name: 'Yo no estoy disponible para la entrega' },\n { id: 'product_does_not_exist', name: 'El producto ya no existe' },\n { id: 'other', name: 'Otro' },\n];\n\ninterface Props {\n productBooking: ProductBooking\n}\n\nconst user = inject<User>('user');\n\nconst props = defineProps<Props>();\n\nconst approvalTimeLimit = inject<number>('approvalTimeLimit');\n\nconst loading = ref(false);\nconst error = ref(false);\n\nconst showApprovedModal = ref(false);\nconst showRejectedModal = ref(false);\nconst showBankAccountModal = ref(false);\nconst showRejectForm = ref(false);\n\nfunction toggleApprovedModal() {\n showApprovedModal.value = !showApprovedModal.value;\n}\nfunction toggleRejectedModal() {\n showRejectedModal.value = !showRejectedModal.value;\n}\nfunction toggleBankAccountModal() {\n showBankAccountModal.value = !showBankAccountModal.value;\n}\nfunction toggleRejectForm() {\n showRejectForm.value = !showRejectForm.value;\n}\n\nasync function updateBooking(data:Partial<ProductBookingFormData>) {\n try {\n loading.value = true;\n await productBookingsApi.update(props.productBooking.id, data);\n } catch (e) {\n error.value = true;\n } finally {\n loading.value = false;\n }\n}\nfunction approveBooking() {\n if (user?.hasBankAccount && user?.verified) {\n try {\n updateBooking({ currentStatus: 'partner_approved' })\n .then(() => toggleApprovedModal());\n } catch (e) {\n error.value = true;\n }\n } else {\n toggleBankAccountModal();\n }\n}\n\nfunction handleApproved() {\n window.location.replace('#esperando-pago');\n window.location.reload();\n}\n\nfunction handleRejected() {\n toggleRejectedModal();\n toggleRejectForm();\n}\n\nconst remainingTime = computed(() => formatDistanceToNowStrict(\n add(new Date(props.productBooking.updatedAt), { hours: approvalTimeLimit }),\n));\n\nconst rejectReason = ref('0');\nconst rejectMessage = ref('');\n\nconst formRules = object().shape({\n rejectReason: string().required('Debes seleccionar un rango')\n .oneOf(REJECT_OPTIONS.map((el) => el.id), 'Debes seleccionar un rango'),\n rejectMessage: string().notRequired(),\n});\n\nconst showRejectSuccessModal = ref(false);\nfunction toggleRejectSuccessModal() {\n showRejectSuccessModal.value = !showRejectSuccessModal.value;\n}\n\nfunction handleRejectSuccess() {\n window.location.reload();\n}\nfunction rejectBooking() {\n try {\n updateBooking({\n currentStatus: 'partner_rejected',\n rejectMessage: {\n reason: rejectReason.value,\n message: rejectMessage.value,\n },\n })\n .then(() => toggleRejectSuccessModal());\n } catch (e) {\n error.value = true;\n }\n}\n</script>\n<template>\n <div class=\"flex flex-col\">\n <base-tip\n title=\"Tiempo restante\"\n variant=\"bold\"\n >\n <template #icon>\n <img\n src=\"@/assets/icons/warning.svg\"\n class=\"h-6 w-6\"\n >\n </template>\n Tienes <span class=\"font-semibold\">{{ remainingTime }}</span> restantes para aceptar o rechazar la solicitud.\n </base-tip>\n <base-button\n size=\"sm\"\n class=\"mt-3\"\n @click=\"approveBooking\"\n >\n Aceptar\n </base-button>\n <base-button\n variant=\"danger\"\n size=\"sm\"\n class=\"mt-3\"\n @click=\"toggleRejectedModal\"\n >\n Rechazar\n </base-button>\n <base-modal\n v-if=\"showBankAccountModal\"\n :open=\"showBankAccountModal\"\n >\n <div class=\"flex w-full flex-col items-center\">\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-2 text-lg font-bold text-z-gray-900\">\n Antes de ello...\n </p>\n <template v-if=\"user?.verified\">\n <p class=\"mt-2 text-center text-z-gray-800\">\n Es importante que configures una cuenta para realizar los depósitos.\n </p>\n <base-button\n href=\"/perfil/datos_bancarios?redirect=true\"\n class=\"mt-4 w-full\"\n >\n <p>\n Ir a configurar mis pagos\n </p>\n <img\n src=\"@/assets/icons/arrow-small-right.svg\"\n class=\"ml-2\"\n >\n </base-button>\n </template>\n <template v-else>\n <p class=\"mt-2 text-center text-z-gray-800\">\n Por motivos de seguridad, debes verificar tu identidad.\n </p>\n <base-button\n href=\"/perfil/verificar?from=awaiting_approval&redirect_to=/perfil/solicitudes_reservas/socio\"\n class=\"mt-4 w-full\"\n >\n <p>\n Verificar\n </p>\n <img\n src=\"@/assets/icons/arrow-small-right.svg\"\n class=\"ml-2\"\n >\n </base-button>\n </template>\n </div>\n </base-modal>\n <base-modal\n v-if=\"showApprovedModal\"\n :open=\"showApprovedModal\"\n >\n <div class=\"flex w-full flex-col items-center\">\n <img\n src=\"@/assets/icons/check-circle.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-2 text-lg font-bold text-z-gray-900\">\n ¡Excelente!\n </p>\n <p class=\"mt-2 text-z-gray-800\">\n Has aceptado la solicitud.\n </p>\n <base-button\n class=\"mt-4 w-full\"\n @click=\"handleApproved\"\n >\n Aceptar\n </base-button>\n </div>\n </base-modal>\n <base-modal\n v-if=\"showRejectSuccessModal\"\n :open=\"showRejectSuccessModal\"\n >\n <div class=\"flex w-full flex-col items-center\">\n <img\n src=\"@/assets/icons/check-circle.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-2 text-lg font-bold text-z-gray-900\">\n ¡Excelente!\n </p>\n <p class=\"mt-2 text-z-gray-800\">\n Has rechazado la solicitud.\n </p>\n <base-button\n class=\"mt-4 w-full\"\n @click=\"handleRejectSuccess\"\n >\n Aceptar\n </base-button>\n </div>\n </base-modal>\n <base-modal\n v-if=\"showRejectedModal\"\n :open=\"showRejectedModal\"\n >\n <div class=\"relative flex w-full flex-col items-center\">\n <button\n class=\"absolute right-0 top-0\"\n @click=\"toggleRejectedModal\"\n >\n <img src=\"@/assets/icons/close.svg\">\n </button>\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-2 text-center text-lg font-bold text-z-gray-900\">\n ¿Estás seguro que deseas rechazar la solicitud?\n </p>\n <base-button\n class=\"mt-4 w-full\"\n variant=\"danger\"\n @click=\"handleRejected\"\n >\n Rechazar\n </base-button>\n </div>\n </base-modal>\n <Dialog\n v-if=\"showRejectForm\"\n :open=\"showRejectForm\"\n class=\"fixed inset-0 z-40 h-[calc(100%-64px)] w-full bg-white\"\n >\n <DialogPanel>\n <the-titlebar\n title=\"Rechazar solicitud\"\n @back=\"toggleRejectForm\"\n />\n <div class=\"flex space-x-4 border-b-2 border-z-gray-100 px-6 pb-6 pt-3\">\n <img\n :src=\"productBooking.productPictures[0].picture.webpSm.url\"\n class=\"h-[72px] w-[72px] rounded-lg border border-z-gray-50 object-cover\"\n >\n <div class=\"flex flex-col\">\n <p class=\"font-medium\">\n {{ productBooking.product.name }}\n </p>\n <p class=\"mt-1 text-xs text-z-gray-800\">\n {{ formatDate(productBooking.startDate) }} - {{ formatDate(productBooking.endDate) }}\n </p>\n <div class=\"mt-3 flex items-center space-x-2\">\n <img\n :src=\"productBooking.clientAccount.pictureUrl\"\n class=\"h-6 w-6 rounded-full object-cover\"\n >\n <p class=\"text-xs\">\n Solicitud por {{ productBooking.clientAccount.firstName }}\n </p>\n </div>\n </div>\n </div>\n <v-form\n v-slot=\"{ meta, handleSubmit, errors }\"\n class=\"mt-4 px-6\"\n :validation-schema=\"formRules\"\n >\n <p class=\"text-lg font-medium text-z-gray-900\">\n Cuéntanos un poco más\n </p>\n <base-select\n v-model=\"rejectReason\"\n placeholder=\"¿Por qué deseo rechazar?\"\n label=\"¿Por qué deseo rechazar?\"\n hide-label\n name=\"rejectReason\"\n :options=\"REJECT_OPTIONS\"\n class=\"mt-8\"\n :error=\"meta.touches && !!errors.rejectReason\"\n />\n <base-input\n v-model=\"rejectMessage\"\n name=\"rejectMessage\"\n type=\"textarea\"\n label=\"Comentario adicional\"\n placeholder=\"Comentario adicional\"\n class=\"mt-3\"\n :error=\"meta.touches && !!errors.rejectMessage\"\n />\n <div class=\"fixed bottom-16 left-0 w-full px-6 py-3\">\n <base-button\n class=\"w-full\"\n @click=\"handleSubmit($event, rejectBooking)\"\n >\n Rechazar solicitud\n </base-button>\n </div>\n </v-form>\n </DialogPanel>\n </Dialog>\n </div>\n</template>\n","export default \"__VITE_ASSET__9f341e0c__\"","<script setup lang=\"ts\">\nimport { productBookingsApi } from '@/api/product-bookings';\nimport { add, formatDistanceToNowStrict } from 'date-fns';\nimport { computed, inject, ref } from 'vue';\n\ninterface Props {\n productBooking: ProductBooking\n}\n\nconst props = defineProps<Props>();\n\nconst approvalTimeLimit = inject<number>('approvalTimeLimit');\n\nconst remainingTime = computed(() => formatDistanceToNowStrict(add(\n new Date(props.productBooking.updatedAt),\n { hours: approvalTimeLimit },\n)));\n\nconst loading = ref(false);\nconst error = ref(false);\n\nconst showCancelModal = ref(false);\n\nfunction toggleCancelModal() {\n showCancelModal.value = !showCancelModal.value;\n}\n\nasync function cancelBooking() {\n try {\n loading.value = true;\n await productBookingsApi.update(props.productBooking.id, { canceled: true, canceledBy: 'client' })\n .then(() => {\n window.location.reload();\n });\n } catch (e) {\n error.value = true;\n } finally {\n loading.value = false;\n }\n}\n</script>\n<template>\n <div class=\"flex flex-col\">\n <base-tip\n title=\"En espera\"\n variant=\"bold\"\n >\n El socio tiene <span class=\"font-semibold\">{{ remainingTime }}</span> restantes para responder tu solicitud.\n Si no lo hace, será cancelada automáticamente.\n </base-tip>\n <base-button\n variant=\"danger\"\n size=\"sm\"\n class=\"mt-3\"\n @click=\"toggleCancelModal\"\n >\n Cancelar solicitud\n </base-button>\n <base-modal :open=\"showCancelModal\">\n <div class=\"relative flex w-full flex-col items-center\">\n <button\n class=\"absolute right-0 top-0\"\n @click=\"toggleCancelModal\"\n >\n <img src=\"@/assets/icons/close.svg\">\n </button>\n <img\n src=\"@/assets/icons/warning-alt-2.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-2 text-center text-lg font-bold text-z-gray-900\">\n ¿Estás seguro que deseas cancelar tu solicitud?\n </p>\n <base-button\n class=\"mt-4 w-full\"\n variant=\"danger\"\n @click=\"cancelBooking\"\n >\n Cancelar solicitud\n </base-button>\n </div>\n </base-modal>\n </div>\n</template>\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.loadMercadoPago = void 0;\nconst SDK_MERCADOPAGO_URL = 'https://sdk.mercadopago.com/js/v2';\nconst SDK_MERCADOPAGO_URL_REGEX = /^https:\\/\\/sdk\\.mercadopago\\.com\\/js\\/v2\\/?(\\?.*)?$/;\nconst EXISTING_SCRIPT_MESSAGE_INITIALIZED = 'MercadoPago has already been initialized in your window, please remove the duplicate import';\nconst EXISTING_SCRIPT_MESSAGE_NOT_AVAILABLE = 'MercadoPago.js not available';\nconst EXISTING_SCRIPT_MESSAGE_FAILED_TO_LOAD = 'Failed to load MercadoPago.js';\nconst findScript = () => {\n var scripts = document.querySelectorAll(`script[src^=\"${SDK_MERCADOPAGO_URL}\"`);\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n if (!SDK_MERCADOPAGO_URL_REGEX.test(script.src)) {\n continue;\n }\n return script;\n }\n return null;\n};\nconst injectScript = () => {\n const script = document.createElement('script');\n script.src = SDK_MERCADOPAGO_URL;\n const headOrBody = document.head || document.body;\n if (!headOrBody) {\n throw new Error('Expected document.body or document.head not to be null. MercadoPago requires a <body> or a <head> element, please add on your project.');\n }\n headOrBody.appendChild(script);\n return script;\n};\nlet LoadPromise = null;\nconst loadMercadoPago = () => {\n if (LoadPromise !== null) {\n return LoadPromise;\n }\n LoadPromise = new Promise((resolve, reject) => {\n if (typeof window === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n if (window.MercadoPago) {\n console.warn(EXISTING_SCRIPT_MESSAGE_INITIALIZED);\n resolve(window.MercadoPago);\n return;\n }\n try {\n let script = findScript();\n if (script) {\n console.warn(EXISTING_SCRIPT_MESSAGE_INITIALIZED);\n }\n else if (!script) {\n script = injectScript();\n }\n script.addEventListener('load', () => {\n if (window.MercadoPago) {\n resolve(window.MercadoPago);\n }\n else {\n reject(new Error(EXISTING_SCRIPT_MESSAGE_NOT_AVAILABLE));\n }\n });\n script.addEventListener('error', () => {\n reject(new Error(EXISTING_SCRIPT_MESSAGE_FAILED_TO_LOAD));\n });\n }\n catch (error) {\n reject(error);\n return;\n }\n });\n return LoadPromise;\n};\nexports.loadMercadoPago = loadMercadoPago;\n","<script setup lang=\"ts\">\nimport { productBookingsApi } from '@/api/product-bookings';\nimport { loadMercadoPago } from '@mercadopago/sdk-js';\nimport { computed, inject, onBeforeMount, ref } from 'vue';\nimport { add, formatDistanceToNowStrict } from 'date-fns';\n\ninterface Props {\n productBooking: ProductBooking\n}\n\nconst user = inject<User>('user');\nconst props = defineProps<Props>();\n\nconst skipPayment = import.meta.env.VITE_SKIP_PAYMENT === 'true';\n\nonBeforeMount(async () => {\n await loadMercadoPago();\n const mp = new window.MercadoPago(import.meta.env.VITE_MERCADOPAGO_PUBLIC_KEY);\n const bricksBuilder = mp.bricks();\n bricksBuilder.create('wallet', `wallet_container_${props.productBooking.id}`, {\n initialization: {\n preferenceId: props.productBooking.mercadopagoPreferenceId,\n },\n customization: {\n hideValueProp: true,\n },\n });\n});\n\nconst loading = ref(false);\nconst error = ref(false);\n\nconst paymentTimeLimit = inject<number>('paymentTimeLimit');\n\n// eslint-disable-next-line vue/return-in-computed-property\nconst remainingTime = computed(() => formatDistanceToNowStrict(add(\n new Date(props.productBooking.updatedAt),\n { hours: paymentTimeLimit },\n)));\n\nconst showCancelModal = ref(false);\n\nfunction toggleCancelModal() {\n showCancelModal.value = !showCancelModal.value;\n}\n\nasync function cancelBooking() {\n try {\n loading.value = true;\n await productBookingsApi.update(props.productBooking.id, { canceled: true, canceledBy: 'client' })\n .then(() => {\n window.location.reload();\n });\n } catch (e) {\n error.value = true;\n } finally {\n loading.value = false;\n }\n}\n\nconst showVerifyModal = ref(false);\nfunction toggleVerifyModal() {\n showVerifyModal.value = !showVerifyModal.value;\n}\n\nfunction handleSkip() {\n if (user?.verified) {\n productBookingsApi.update(props.productBooking.id, { currentStatus: 'paid' })\n .then(() => {\n window.location.replace('#reservados');\n window.location.reload();\n });\n } else {\n toggleVerifyModal();\n }\n}\n</script>\n<template>\n <div class=\"flex flex-col\">\n <base-tip\n title=\"Tiempo restante\"\n variant=\"bold\"\n >\n Te quedan <span class=\"font-semibold\">{{ remainingTime }}</span> para pagar esta reserva. Cumplido el tiempo, se cancelará automáticamente.\n </base-tip>\n <div\n :id=\"`wallet_container_${productBooking.id}`\"\n />\n <base-button\n v-if=\"skipPayment\"\n size=\"sm\"\n class=\"mt-3\"\n @click=\"handleSkip\"\n >\n Omitir pago (ambiente de prueba)\n </base-button>\n <base-button\n variant=\"danger\"\n size=\"sm\"\n class=\"mt-3\"\n @click=\"toggleCancelModal\"\n >\n Cancelar reserva\n </base-button>\n <base-modal :open=\"showCancelModal\">\n <div class=\"relative flex w-full flex-col items-center\">\n <button\n class=\"absolute right-0 top-0\"\n @click=\"toggleCancelModal\"\n >\n <img src=\"@/assets/icons/close.svg\">\n </button>\n <img\n src=\"@/assets/icons/warning-alt-2.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-2 text-center text-lg font-bold text-z-gray-900\">\n ¿Estás seguro que deseas cancelar tu solicitud?\n </p>\n <base-button\n class=\"mt-4 w-full\"\n variant=\"danger\"\n @click=\"cancelBooking\"\n >\n Cancelar solicitud\n </base-button>\n </div>\n </base-modal>\n </div>\n <base-modal :open=\"showVerifyModal\">\n <div class=\"flex w-full flex-col items-center\">\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-2 text-lg font-bold text-z-gray-900\">\n Antes de ello...\n </p>\n <p class=\"mt-2 text-center text-z-gray-800\">\n Por motivos de seguridad, debes verificar tu identidad.\n </p>\n <base-button\n href=\"/perfil/verificar?from=payment&redirect_to=/perfil/solicitudes_reservas/cliente\"\n class=\"mt-4 w-full\"\n >\n <p>\n Verificar\n </p>\n <img\n src=\"@/assets/icons/arrow-small-right.svg\"\n class=\"ml-2\"\n >\n </base-button>\n </div>\n </base-modal>\n</template>\n","import { api } from './index';\n\nexport const productBookingDeliveriesApi = {\n create(productBookingId: number) {\n const path = '/api/internal/product_booking_deliveries';\n\n return api({\n method: 'post',\n url: path,\n data: { productBookingId },\n }).then(response => response.data.productBookingDelivery as ProductBookingDelivery);\n },\n update(productBookingDeliveryId:number, data:Partial<ProductBookingDelivery>, picture?: File) {\n const path = `/api/internal/product_booking_deliveries/${productBookingDeliveryId}`;\n\n return api({\n method: 'patch',\n headers: {\n 'Content-Type': 'multipart/form-data',\n },\n url: path,\n data: { ...data, picture },\n });\n },\n};\n","<script setup lang=\"ts\">\nimport { productBookingDeliveriesApi } from '@/api/product-booking-deliveries';\nimport { ref } from 'vue';\n\ninterface Props {\n open: boolean;\n productBookingId:number;\n chatId:number;\n}\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n (e: 'close'): void\n}>();\n\nfunction closeModal() {\n emit('close');\n window.location.reload();\n}\nconst showAwaitingMessage = ref(false);\n\nfunction beginDelivery() {\n productBookingDeliveriesApi.create(props.productBookingId).then(() => {\n showAwaitingMessage.value = true;\n });\n}\n</script>\n<template>\n <base-modal\n :open=\"open\"\n >\n <div\n v-if=\"showAwaitingMessage\"\n class=\"flex w-full flex-col items-center\"\n >\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"w-24 \"\n >\n <p class=\"mt-2 font-bold text-z-gray-900\">\n A la espera del cliente\n </p>\n <p class=\"mt-2 text-center text-z-gray-800\">\n Para que se complete la entrega, el cliente debe aceptar la <span class=\"font-medium\">solicitud de entrega</span>.\n </p>\n <base-button\n class=\"mt-8 w-full\"\n :href=\"`/chats/${chatId}`\"\n >\n Ir al chat\n </base-button>\n </div>\n <div\n v-else\n class=\"flex w-full flex-col items-center\"\n >\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"w-24 \"\n >\n <p class=\"mt-2 font-bold text-z-gray-900\">\n Importante\n </p>\n <p class=\"mt-2 text-center text-z-gray-800\">\n Debes estar en el punto de entrega con el cliente\n </p>\n <base-button\n class=\"mt-8 w-full\"\n @click=\"beginDelivery\"\n >\n Hacer la entrega\n </base-button>\n <base-button\n variant=\"danger\"\n class=\"mt-3 w-full\"\n @click=\"closeModal\"\n >\n Cancelar\n </base-button>\n </div>\n </base-modal>\n</template>\n","<script setup lang=\"ts\">\nimport { productBookingsApi, type ProductBookingFormData } from '@/api/product-bookings';\nimport { add, formatDistanceToNowStrict, isPast, isToday } from 'date-fns';\nimport { computed, inject, ref } from 'vue';\nimport { object, string } from 'yup';\nimport { formatDate } from '@/utils/format-date';\nimport { Dialog, DialogPanel } from '@headlessui/vue';\nimport beginDeliveryModal from '../begin-delivery-modal.vue';\n\nconst CANCEL_OPTIONS = [\n { id: 'product_unavailable', name: 'El artículo no está disponible en esa fecha' },\n { id: 'partner_unavailable', name: 'Yo no estoy disponible para la entrega' },\n { id: 'product_does_not_exist', name: 'El producto ya no existe' },\n { id: 'other', name: 'Otro' },\n];\n\ninterface Props {\n productBooking: ProductBooking\n}\n\nconst props = defineProps<Props>();\n\nconst paidTimeLimit = inject<number>('paidTimeLimit');\nconst paidTime = computed(() => add(new Date(props.productBooking.updatedAt), { hours: paidTimeLimit }));\n\nconst remainingTime = computed(() => formatDistanceToNowStrict(paidTime.value));\nconst pastPaidTime = computed(() => isPast(paidTime.value));\n\nconst loading = ref(false);\nconst error = ref(false);\n\nconst showCancelModal = ref(false);\nconst showCancelForm = ref(false);\nconst showSuccessModal = ref(false);\n\nfunction toggleCancelModal() {\n showCancelModal.value = !showCancelModal.value;\n}\nfunction toggleCancelForm() {\n showCancelForm.value = !showCancelForm.value;\n}\nfunction toggleSuccessModal() {\n showSuccessModal.value = !showSuccessModal.value;\n}\n\nfunction handleCancel() {\n toggleCancelModal();\n toggleCancelForm();\n}\nfunction handleSuccess() {\n window.location.reload();\n}\n\nasync function updateBooking(data:Partial<ProductBookingFormData>) {\n try {\n loading.value = true;\n await productBookingsApi.update(props.productBooking.id, data);\n } catch (e) {\n error.value = true;\n } finally {\n loading.value = false;\n }\n}\n\nconst cancelReason = ref('0');\nconst cancelMessage = ref('');\n\nconst formRules = object().shape({\n cancelReason: string().required()\n .oneOf(CANCEL_OPTIONS.map((el) => el.id)),\n cancelMessage: string().notRequired(),\n});\n\nfunction cancelBooking() {\n try {\n updateBooking({\n canceled: true,\n canceledBy: 'partner',\n rejectMessage: {\n reason: cancelReason.value,\n message: cancelMessage.value,\n },\n })\n .then(() => toggleSuccessModal());\n } catch (e) {\n error.value = true;\n }\n}\n\nconst deliveryToday = computed(() => isToday(new Date(props.productBooking.startDate)));\n\nconst showBeginDeliveryModal = ref(false);\nfunction toggleBeginDeliveryModal() {\n showBeginDeliveryModal.value = !showBeginDeliveryModal.value;\n}\n</script>\n<template>\n <div class=\"flex flex-col\">\n <div\n class=\"flex flex-col space-y-3\"\n >\n <base-button\n variant=\"danger\"\n size=\"sm\"\n @click=\"toggleCancelModal\"\n >\n Cancelar\n </base-button>\n <base-tip\n v-if=\"pastPaidTime\"\n title=\"Cancelar reserva\"\n color=\"red\"\n variant=\"bold\"\n >\n Si cancelas ahora, tendrás una calificación mínima por esta reserva.\n <template #icon>\n <img\n src=\"@/assets/icons/warning-alt-2.svg\"\n class=\"h-6 w-6\"\n >\n </template>\n </base-tip>\n <base-tip\n v-else\n title=\"Cancelar reserva\"\n color=\"red\"\n variant=\"bold\"\n >\n Sólo tienes <span class=\"font-semibold\">{{ remainingTime }}</span> para cancelar la reserva sin penalización.\n <template #icon>\n <img\n src=\"@/assets/icons/warning-alt-2.svg\"\n class=\"h-6 w-6\"\n >\n </template>\n </base-tip>\n <base-tip\n v-if=\"deliveryToday\"\n title=\"Hoy es la entrega\"\n variant=\"bold\"\n >\n Coordina la entrega del producto con el cliente a través del\n <a\n :href=\"`/chats/${productBooking.chatId}`\"\n class=\"font-medium underline underline-offset-2\"\n >\n chat\n </a>.\n <template #icon>\n <img\n src=\"@/assets/icons/warning.svg\"\n class=\"h-6 w-6\"\n >\n </template>\n </base-tip>\n <base-button\n v-if=\"deliveryToday && productBooking.productBookingDelivery?.status !== 'ongoing'\"\n size=\"sm\"\n @click=\"toggleBeginDeliveryModal\"\n >\n Realizar la entrega\n </base-button>\n <base-button\n v-else-if=\"productBooking.productBookingDelivery?.status === 'ongoing'\"\n disabled\n size=\"sm\"\n >\n Esperando al cliente\n </base-button>\n </div>\n <base-modal\n :open=\"showCancelModal\"\n @close=\"toggleCancelModal\"\n >\n <div class=\"flex w-full flex-col items-center\">\n <img\n src=\"@/assets/icons/warning-alt-2.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-2 text-center text-lg font-bold text-z-gray-900\">\n ¿Estás seguro que deseas cancelar la reserva?\n </p>\n <p\n v-if=\"pastPaidTime\"\n class=\"mt-2 text-center text-z-gray-800\"\n >\n Al cancelar, tendrás una calificación mínima.\n </p>\n <base-button\n class=\"mt-4 w-full\"\n @click=\"handleCancel\"\n >\n <p>\n Aceptar\n </p>\n </base-button>\n </div>\n </base-modal>\n <base-modal :open=\"showSuccessModal\">\n <div class=\"flex w-full flex-col items-center\">\n <img\n src=\"@/assets/icons/check-circle.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-2 text-lg font-bold text-z-gray-900\">\n Excelente!\n </p>\n <p class=\"mt-2 text-z-gray-800\">\n Se realizó de manera correcta\n </p>\n <base-button\n class=\"mt-4 w-full\"\n @click=\"handleSuccess\"\n >\n Aceptar\n </base-button>\n </div>\n </base-modal>\n <Dialog\n v-if=\"showCancelForm\"\n :open=\"showCancelForm\"\n class=\"fixed inset-0 z-40 h-[calc(100%-64px)] w-full bg-white\"\n >\n <DialogPanel>\n <the-titlebar\n title=\"Cancelar reserva\"\n @back=\"toggleCancelForm\"\n />\n <div class=\"flex space-x-4 border-b-2 border-z-gray-100 px-6 pb-6 pt-3\">\n <img\n :src=\"productBooking.productPictures[0].picture.webpSm.url\"\n class=\"h-[72px] w-[72px] rounded-lg border border-z-gray-50 object-cover\"\n >\n <div class=\"flex flex-col\">\n <p class=\"font-medium\">\n {{ productBooking.product.name }}\n </p>\n <p class=\"mt-1 text-xs text-z-gray-800\">\n {{ formatDate(productBooking.startDate) }} - {{ formatDate(productBooking.endDate) }}\n </p>\n <div class=\"mt-3 flex items-center space-x-2\">\n <img\n :src=\"productBooking.clientAccount.pictureUrl\"\n class=\"h-6 w-6 rounded-full object-cover\"\n >\n <p class=\"text-xs\">\n Reservado por {{ productBooking.clientAccount.firstName }}\n </p>\n </div>\n </div>\n </div>\n <v-form\n v-slot=\"{ meta, handleSubmit, errors }\"\n class=\"mt-4 px-6\"\n :validation-schema=\"formRules\"\n >\n <p class=\"text-lg font-medium text-z-gray-900\">\n Cuéntanos un poco más\n </p>\n <base-select\n v-model=\"cancelReason\"\n placeholder=\"¿Por qué deseo rechazar?\"\n label=\"¿Por qué deseo rechazar?\"\n hide-label\n name=\"cancelReason\"\n :options=\"CANCEL_OPTIONS\"\n class=\"mt-8\"\n :error=\"meta.touches && !!errors.cancelReason\"\n />\n <base-input\n v-model=\"cancelMessage\"\n name=\"cancelMessage\"\n type=\"textarea\"\n label=\"Comentario adicional\"\n placeholder=\"Comentario adicional\"\n class=\"mt-3\"\n :error=\"meta.touches && !!errors.cancelMessage\"\n />\n <base-tip\n title=\"Cancelar reserva\"\n variant=\"bold\"\n class=\"mt-4\"\n >\n Devolveremos el dinero de forma íntegra al cliente.\n <template #icon>\n <img\n src=\"@/assets/icons/warning.svg\"\n class=\"h-6 w-6\"\n >\n </template>\n </base-tip>\n <div class=\"fixed bottom-16 left-0 w-full px-6 py-3\">\n <base-button\n class=\"w-full\"\n @click=\"handleSubmit($event, cancelBooking)\"\n >\n Cancelar reserva\n </base-button>\n </div>\n </v-form>\n </DialogPanel>\n </Dialog>\n </div>\n <begin-delivery-modal\n v-if=\"showBeginDeliveryModal\"\n :open=\"showBeginDeliveryModal\"\n :product-booking-id=\"productBooking.id\"\n :chat-id=\"productBooking.chatId\"\n @close=\"toggleBeginDeliveryModal\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { productBookingsApi, type ProductBookingFormData } from '@/api/product-bookings';\nimport { add, formatDistanceToNowStrict, isPast, isToday } from 'date-fns';\nimport { computed, inject, ref } from 'vue';\nimport { object, string } from 'yup';\nimport { formatDate } from '@/utils/format-date';\nimport { Dialog, DialogPanel } from '@headlessui/vue';\n\nconst CANCEL_OPTIONS = [\n { id: 'made_another_booking', name: 'Hice otro arriendo' },\n { id: 'not_needed_anymore', name: 'Ya no necesito el artículo' },\n { id: 'cannot_reach_partner', name: 'Socio no responde' },\n { id: 'other', name: 'Otro' },\n];\n\ninterface Props {\n productBooking: ProductBooking\n}\n\nconst props = defineProps<Props>();\n\nconst paidTimeLimit = inject<number>('paidTimeLimit');\nconst paidTime = computed(() => add(new Date(props.productBooking.updatedAt), { hours: paidTimeLimit }));\n\nconst remainingTime = computed(() => formatDistanceToNowStrict(paidTime.value));\nconst pastPaidTime = computed(() => isPast(paidTime.value));\n\nconst loading = ref(false);\nconst error = ref(false);\n\nconst showCancelModal = ref(false);\nconst showCancelForm = ref(false);\nconst showSuccessModal = ref(false);\n\nfunction toggleCancelModal() {\n showCancelModal.value = !showCancelModal.value;\n}\nfunction toggleCancelForm() {\n showCancelForm.value = !showCancelForm.value;\n}\nfunction toggleSuccessModal() {\n showSuccessModal.value = !showSuccessModal.value;\n}\n\nfunction handleCancel() {\n toggleCancelModal();\n toggleCancelForm();\n}\nfunction handleSuccess() {\n window.location.reload();\n}\n\nasync function updateBooking(data:Partial<ProductBookingFormData>) {\n try {\n loading.value = true;\n await productBookingsApi.update(props.productBooking.id, data);\n } catch (e) {\n error.value = true;\n } finally {\n loading.value = false;\n }\n}\n\nconst cancelReason = ref('0');\nconst cancelMessage = ref('');\n\nconst formRules = object().shape({\n cancelReason: string().required()\n .oneOf(CANCEL_OPTIONS.map((el) => el.id)),\n cancelMessage: string().notRequired(),\n});\n\nfunction cancelBooking() {\n try {\n updateBooking({\n canceled: true,\n canceledBy: 'client',\n rejectMessage: {\n reason: cancelReason.value,\n message: cancelMessage.value,\n },\n })\n .then(() => toggleSuccessModal());\n } catch (e) {\n error.value = true;\n }\n}\n\nconst deliveryToday = computed(() => isToday(new Date(props.productBooking.startDate)));\n</script>\n<template>\n <div class=\"flex flex-col\">\n <div\n class=\"flex flex-col space-y-3\"\n >\n <base-button\n variant=\"danger\"\n size=\"sm\"\n @click=\"toggleCancelModal\"\n >\n Cancelar reserva\n </base-button>\n <base-tip\n v-if=\"pastPaidTime\"\n title=\"Cancelar reserva\"\n color=\"red\"\n variant=\"bold\"\n >\n <p>Si cancelas tu reserva, sólo se te reembolsará el <span class=\"font-medium\">70%</span> del arriendo.</p>\n <a\n class=\"text-z-gray-600 underline underline-offset-2\"\n href=\"/legal/terminos_y_condiciones/\"\n >\n Ver políticas\n </a>\n <template #icon>\n <img\n src=\"@/assets/icons/warning-alt-2.svg\"\n class=\"h-6 w-6\"\n >\n </template>\n </base-tip>\n <base-tip\n v-else\n title=\"Cancelar reserva\"\n color=\"red\"\n variant=\"bold\"\n >\n Sólo tienes <span class=\"font-semibold\">{{ remainingTime }}</span> para cancelar la reserva sin costos asociados.\n <template #icon>\n <img\n src=\"@/assets/icons/warning-alt-2.svg\"\n class=\"h-6 w-6\"\n >\n </template>\n </base-tip>\n <base-tip\n v-if=\"deliveryToday && productBooking.productBookingDelivery?.status !== 'complete'\"\n title=\"Hoy es la entrega\"\n variant=\"bold\"\n >\n Coordina el retiro del producto con el socio a través del\n <a\n :href=\"`/chats/${productBooking.chatId}`\"\n class=\"font-medium underline underline-offset-2\"\n >\n chat\n </a>.\n <template #icon>\n <img\n src=\"@/assets/icons/warning.svg\"\n class=\"h-6 w-6\"\n >\n </template>\n </base-tip>\n </div>\n <base-modal\n :open=\"showCancelModal\"\n @close=\"toggleCancelModal\"\n >\n <div class=\"flex w-full flex-col items-center\">\n <img\n src=\"@/assets/icons/warning-alt-2.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-2 text-center text-lg font-bold text-z-gray-900\">\n ¿Estás seguro que deseas cancelar la reserva?\n </p>\n <p\n v-if=\"pastPaidTime\"\n class=\"mt-2 text-center text-z-gray-800\"\n >\n Si cancelas tu reserva, se te reembolsará sólo el 70% del arriendo y el 100% de la garantía.\n </p>\n <p\n v-else\n class=\"mt-2 text-center text-z-gray-800\"\n >\n Tu dinero se devolverá de forma íntegra.\n </p>\n <base-button\n class=\"mt-4 w-full\"\n @click=\"handleCancel\"\n >\n <p>\n Cancelar reserva\n </p>\n </base-button>\n </div>\n </base-modal>\n <base-modal :open=\"showSuccessModal\">\n <div class=\"flex w-full flex-col items-center\">\n <img\n src=\"@/assets/icons/check-circle.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-2 text-lg font-bold text-z-gray-900\">\n Excelente!\n </p>\n <p class=\"mt-2 text-z-gray-800\">\n Se realizó de manera correcta\n </p>\n <base-button\n class=\"mt-4 w-full\"\n @click=\"handleSuccess\"\n >\n Aceptar\n </base-button>\n </div>\n </base-modal>\n <Dialog\n v-if=\"showCancelForm\"\n :open=\"showCancelForm\"\n class=\"fixed inset-0 z-40 h-[calc(100%-64px)] w-full bg-white\"\n >\n <DialogPanel>\n <the-titlebar\n title=\"Cancelar reserva\"\n @back=\"toggleCancelForm\"\n />\n <div class=\"flex space-x-4 border-b-2 border-z-gray-100 px-6 pb-6 pt-3\">\n <img\n :src=\"productBooking.productPictures[0].picture.webpSm.url\"\n class=\"h-[72px] w-[72px] rounded-lg border border-z-gray-50 object-cover\"\n >\n <div class=\"flex flex-col\">\n <p class=\"font-medium\">\n {{ productBooking.product.name }}\n </p>\n <p class=\"mt-1 text-xs text-z-gray-800\">\n {{ formatDate(productBooking.startDate) }} - {{ formatDate(productBooking.endDate) }}\n </p>\n <div class=\"mt-3 flex items-center space-x-2\">\n <img\n :src=\"productBooking.partnerAccount.pictureUrl\"\n class=\"h-6 w-6 rounded-full object-cover\"\n >\n <p class=\"text-xs\">\n Dueño: {{ productBooking.partnerAccount.firstName }}\n </p>\n </div>\n </div>\n </div>\n <v-form\n v-slot=\"{ meta, handleSubmit, errors }\"\n class=\"mt-4 px-6\"\n :validation-schema=\"formRules\"\n >\n <p class=\"text-lg font-medium text-z-gray-900\">\n Cuéntanos un poco más\n </p>\n <base-select\n v-model=\"cancelReason\"\n placeholder=\"¿Por qué deseo rechazar?\"\n label=\"¿Por qué deseo rechazar?\"\n hide-label\n name=\"cancelReason\"\n :options=\"CANCEL_OPTIONS\"\n class=\"mt-8\"\n :error=\"meta.touches && !!errors.cancelReason\"\n />\n <base-input\n v-model=\"cancelMessage\"\n name=\"cancelMessage\"\n type=\"textarea\"\n label=\"Comentario adicional\"\n placeholder=\"Comentario adicional\"\n class=\"mt-3\"\n :error=\"meta.touches && !!errors.cancelMessage\"\n />\n <base-tip\n title=\"Cancelar reserva\"\n variant=\"bold\"\n class=\"mt-4\"\n >\n Devolveremos el dinero de forma íntegra al cliente.\n <template #icon>\n <img\n src=\"@/assets/icons/warning.svg\"\n class=\"h-6 w-6\"\n >\n </template>\n </base-tip>\n <div class=\"fixed bottom-16 left-0 w-full px-6 py-3\">\n <base-button\n class=\"w-full\"\n @click=\"handleSubmit($event, cancelBooking)\"\n >\n Cancelar reserva\n </base-button>\n </div>\n </v-form>\n </DialogPanel>\n </Dialog>\n </div>\n</template>\n","export default \"__VITE_ASSET__065215f2__\"","import { api } from './index';\n\nexport const productBookingReturnsApi = {\n create(productBookingId: number, picture?: File) {\n const path = '/api/internal/product_booking_returns';\n\n return api({\n method: 'post',\n headers: {\n 'Content-Type': 'multipart/form-data',\n },\n url: path,\n data: { productBookingId, picture },\n }).then(response => response.data.productBookingReturn as ProductBookingReturn);\n },\n update(productBookingReturnId:number, data:Partial<ProductBookingReturn>, picture?: File) {\n const path = `/api/internal/product_booking_returns/${productBookingReturnId}`;\n\n return api({\n method: 'patch',\n headers: {\n 'Content-Type': 'multipart/form-data',\n },\n url: path,\n data: { ...data, picture },\n });\n },\n};\n","<script setup lang=\"ts\">\nimport { productBookingReturnsApi } from '@/api/product-booking-returns';\nimport { ref } from 'vue';\n\ninterface Props {\n open: boolean;\n productBookingId:number;\n address:AddressData;\n chatId:number;\n}\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n (e: 'close'): void\n}>();\n\nfunction closeModal() {\n emit('close');\n}\n\nconst loading = ref(false);\n\nfunction createReturn() {\n loading.value = true;\n productBookingReturnsApi.create(props.productBookingId)\n .then(() => {\n loading.value = false;\n window.location.href = `/perfil/solicitudes_reservas/${props.productBookingId}/ubicacion`;\n });\n}\n</script>\n<template>\n <base-modal\n :open=\"open\"\n >\n <div\n\n class=\"flex w-full flex-col items-center\"\n >\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"w-24 \"\n >\n <p class=\"mt-2 font-bold text-z-gray-900\">\n Importante\n </p>\n <p class=\"mt-2 text-center text-z-gray-800\">\n Antes de continuar, debes estar con el socio en el punto de devolución.\n </p>\n <base-button\n class=\"mt-8 w-full\"\n :disabled=\"loading\"\n @click=\"createReturn\"\n >\n <img\n v-if=\"loading\"\n src=\"@/assets/icons/loading-alt.svg\"\n class=\"w-10 animate-spin-slow\"\n >\n <p v-else>\n Realizar la devolución\n </p>\n </base-button>\n <base-button\n variant=\"danger\"\n class=\"mt-3 w-full\"\n @click=\"closeModal\"\n >\n Cancelar\n </base-button>\n </div>\n </base-modal>\n</template>\n","<script setup lang=\"ts\">\nimport { addDays, isToday } from 'date-fns';\nimport { computed, ref } from 'vue';\nimport { formatDate } from '@/utils/format-date';\nimport beginReturnModal from '../begin-return-modal.vue';\n\ninterface Props {\n productBooking: ProductBooking\n}\n\nconst props = defineProps<Props>();\n\nconst returnDate = computed(() => addDays(new Date(props.productBooking.endDate), 1));\nconst returnToday = computed(() => isToday(returnDate.value));\n\nconst showBeginReturnModal = ref(false);\nfunction toggleBeginReturnModal() {\n showBeginReturnModal.value = !showBeginReturnModal.value;\n}\n</script>\n<template>\n <div class=\"flex flex-col\">\n <base-tip\n v-if=\"returnToday\"\n title=\"Hoy es la devolución\"\n variant=\"bold\"\n >\n Coordina la devolución del producto con el socio a través del\n <a\n :href=\"`/chats/${productBooking.chatId}`\"\n class=\"font-medium underline underline-offset-2\"\n >\n chat\n </a>.\n </base-tip>\n <base-tip\n v-else\n title=\"Devolución\"\n variant=\"bold\"\n >\n Recuerda que la devolución será el {{ formatDate(returnDate.toDateString()) }} antes del mediodía.\n </base-tip>\n <base-button\n v-if=\"!productBooking.productBookingReturn\"\n size=\"sm\"\n class=\"mt-3\"\n @click=\"toggleBeginReturnModal\"\n >\n Realizar la devolución\n </base-button>\n <base-button\n v-else-if=\"productBooking.productBookingReturn?.status === 'awaiting_geolocation'\"\n size=\"sm\"\n class=\"mt-3\"\n :href=\"`/perfil/solicitudes_reservas/${productBooking.id}/ubicacion`\"\n >\n Reanudar la devolución\n </base-button>\n <base-button\n v-else-if=\"productBooking.productBookingReturn?.status === 'ongoing'\"\n class=\"mt-3\"\n disabled\n size=\"sm\"\n >\n Esperando al socio\n </base-button>\n </div>\n <begin-return-modal\n v-if=\"showBeginReturnModal\"\n :open=\"showBeginReturnModal\"\n :product-booking-id=\"productBooking.id\"\n :chat-id=\"productBooking.chatId\"\n :address=\"productBooking.address as AddressData\"\n @close=\"toggleBeginReturnModal\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { addDays, isToday } from 'date-fns';\nimport { computed } from 'vue';\nimport { formatDate } from '@/utils/format-date';\n\ninterface Props {\n productBooking: ProductBooking\n}\n\nconst props = defineProps<Props>();\n\nconst returnDate = computed(() => addDays(new Date(props.productBooking.endDate), 1));\nconst returnToday = computed(() => isToday(returnDate.value));\n\n</script>\n<template>\n <div class=\"flex flex-col\">\n <base-tip\n v-if=\"returnToday\"\n title=\"Hoy es la devolución\"\n variant=\"bold\"\n >\n Coordina la devolución del producto con el cliente a través del\n <a\n :href=\"`/chats/${productBooking.chatId}`\"\n class=\"font-medium underline underline-offset-2\"\n >\n chat\n </a>.\n </base-tip>\n <base-tip\n v-else\n title=\"Devolución\"\n variant=\"bold\"\n >\n Recuerda que la devolución será el {{ formatDate(returnDate.toDateString()) }} antes del mediodía.\n </base-tip>\n </div>\n</template>\n","export default \"__VITE_ASSET__c219f887__\"","import { api } from './index';\n\nexport const supportChatsApi = {\n create(data: { productBookingId:number, userId: number}) {\n const path = '/api/internal/support_chats';\n\n return api({\n method: 'post',\n url: path,\n data,\n });\n },\n};\n","<script setup lang=\"ts\">\nimport { format } from 'date-fns';\nimport { computed, inject, ref } from 'vue';\nimport { supportChatsApi } from '@/api/support-chats';\n\ninterface Props {\n productBookings:ProductBooking[];\n}\n\nconst props = defineProps<Props>();\n\nconst user = inject<User>('user');\n\nconst showSupportModal = ref(false);\nfunction toggleSupportModal() {\n showSupportModal.value = !showSupportModal.value;\n}\n\nconst bookingOptions = computed(() => props.productBookings.map((pb) => ({\n id: pb.id,\n name: `${pb.product.name} (${format(new Date(pb.startDate), 'd LLL')} - ${format(new Date(pb.endDate), 'd LLL')})`,\n})));\n\nconst selectedBookingId = ref(0);\n\nfunction createSupportChat() {\n const formValues = {\n productBookingId: selectedBookingId.value,\n userId: user?.id ?? 0,\n };\n\n supportChatsApi.create(formValues)\n .then((res) => {\n window.location.href = `/soporte/${res.data.supportChat.id}`;\n });\n}\n</script>\n<template>\n <button\n class=\"w-16\"\n @click=\"toggleSupportModal\"\n >\n <img\n src=\"@/assets/icons/help.svg\"\n class=\"w-16\"\n >\n </button>\n <base-modal\n :open=\"showSupportModal\"\n @close=\"toggleSupportModal\"\n >\n <div class=\"flex w-full flex-col\">\n <div class=\"flex justify-between\">\n <p class=\"font-medium text-z-gray-900\">\n Contactar a soporte\n </p>\n <button\n type=\"button\"\n @click=\"toggleSupportModal\"\n >\n <img\n src=\"@/assets/icons/close.svg\"\n class=\"h-5 w-5\"\n >\n </button>\n </div>\n <p class=\"mt-4\">\n ¿Con qué arriendo tuviste problemas?\n </p>\n <base-select\n v-model=\"selectedBookingId\"\n :options=\"bookingOptions\"\n label=\"Arriendo\"\n placeholder=\"Selecciona el arriendo\"\n name=\"booking\"\n hide-label\n class=\"mt-1\"\n />\n <base-button\n class=\"mt-4\"\n :disabled=\"!selectedBookingId\"\n @click=\"createSupportChat\"\n >\n Iniciar chat con soporte\n </base-button>\n </div>\n </base-modal>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, onBeforeMount, onMounted, provide, ref } from 'vue';\nimport { partition, reverse } from 'lodash';\nimport { productBookingsApi } from '@/api/product-bookings';\nimport ProfileProductBookingCard from './profile-product-booking-card.vue';\nimport ProfileProductBookingPartnerAwaitingActions from './profile-product-booking-partner-awaiting-actions.vue';\nimport ProfileProductBookingClientAwaitingActions from './profile-product-booking-client-awaiting-actions.vue';\nimport ProfileProductBookingPaymentActions from './profile-product-booking-payment-actions.vue';\nimport ProfileProductBookingPartnerPaidActions from './profile-product-booking-partner-paid-actions.vue';\nimport ProfileProductBookingClientPaidActions from './profile-product-booking-client-paid-actions.vue';\nimport ProfileProductBookingClientDeliveredActions from './profile-product-booking-client-delivered-actions.vue';\nimport ProfileProductBookingPartnerDeliveredActions from './profile-product-booking-partner-delivered-actions.vue';\nimport SupportButton from '../support-button.vue';\n\ninterface Props {\n approvalTimeLimit: number,\n paymentTimeLimit: number,\n paidTimeLimit: number,\n}\n\nconst props = defineProps<Props>();\n\nconst productBookings = ref<ProductBooking[]>([]);\nconst loading = ref(false);\n\nfunction handleBack() {\n window.history.back();\n}\n\nconst statusTabs = [\n {\n status: 'awaiting_approval',\n displayName: { partner: 'Solicitados', client: 'Solicitados' },\n showTabs: false,\n hash: '#solicitados',\n showSupport: false,\n },\n {\n status: 'partner_approved',\n displayName: { partner: 'Esperando pago', client: 'Por pagar' },\n showTabs: false,\n hash: '#esperando-pago',\n showSupport: false,\n },\n {\n status: 'paid',\n displayName: { partner: 'Reservados', client: 'Reservados' },\n showTabs: true,\n hash: '#reservados',\n showSupport: true,\n },\n {\n status: 'delivered',\n displayName: { partner: 'Entregados', client: 'Entregados' },\n showTabs: false,\n hash: '#entregados',\n showSupport: true,\n },\n {\n status: 'complete',\n displayName: { partner: 'Completados', client: 'Completados' },\n showTabs: false,\n hash: '#completados',\n showSupport: true,\n },\n];\n\nconst activeTab = ref(0);\nconst bookedTab = ref(0);\n\nconst accountType = window.location.pathname === '/perfil/solicitudes_reservas/cliente' ? 'client' : 'partner';\n\nfunction getBookings() {\n loading.value = true;\n productBookingsApi.index(statusTabs[activeTab.value].status, accountType)\n .then((response) => {\n productBookings.value = response;\n loading.value = false;\n });\n}\n\nfunction setActiveTab(index:number) {\n activeTab.value = index;\n history.replaceState('', '', statusTabs[activeTab.value].hash);\n getBookings();\n}\n\nfunction setBookedTab(index:number) {\n bookedTab.value = index;\n getBookings();\n}\n\nconst bookedBookings = computed(() => reverse(partition(productBookings.value, 'canceled')));\n\nonBeforeMount(() => {\n provide('approvalTimeLimit', props.approvalTimeLimit);\n provide('paymentTimeLimit', props.paymentTimeLimit);\n provide('paidTimeLimit', props.paidTimeLimit);\n});\n\nonMounted(() => {\n const hash = window.location.hash;\n if (hash) {\n const tabIndex = statusTabs.findIndex(tab => tab.hash === hash);\n\n if (tabIndex >= 0) {\n setActiveTab(tabIndex);\n } else {\n getBookings();\n }\n } else {\n getBookings();\n }\n});\n\n</script>\n<template>\n <the-layout\n :active-menu=\"3\"\n hide-navbar\n >\n <div class=\"flex\">\n <div class=\"relative w-full bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n :title=\"`${statusTabs[activeTab].displayName[accountType]} (${bookedBookings[0].length ?? 0})`\"\n no-border\n @back=\"handleBack\"\n />\n <div class=\"sticky top-0 flex space-x-1 overflow-x-scroll border-b border-z-gray-200 px-6 py-3 scrollbar-hide\">\n <button\n v-for=\"tab, index in statusTabs\"\n :key=\"index\"\n class=\"h-8 shrink-0 rounded px-3\"\n :class=\"activeTab === index ? 'bg-z-turquoise-50 text-z-turquoise-600' : 'bg-z-gray-25 text-z-gray-600'\"\n @click=\"setActiveTab(index)\"\n >\n {{ tab.displayName[accountType] }}\n </button>\n </div>\n <div\n v-if=\"loading\"\n class=\"flex h-64 w-full items-center justify-center\"\n >\n <img\n src=\"@/assets/icons/loading.svg\"\n class=\"w-16 animate-spin-slow\"\n >\n </div>\n <div\n v-else-if=\"productBookings.length === 0\"\n class=\"flex w-full flex-col items-center gap-6 px-6 py-4\"\n >\n <img\n src=\"@/assets/icons/task-search.svg\"\n class=\"h-16 w-16\"\n >\n <p>No hay elementos aquí</p>\n </div>\n <template v-else>\n <div\n v-if=\"statusTabs[activeTab].showTabs\"\n class=\"grid grid-cols-2\"\n >\n <button\n class=\"h-12 border-b text-sm\"\n :class=\"bookedTab === 0 ? ' border-z-turquoise-600' : 'border-z-gray-200'\"\n @click=\"setBookedTab(0)\"\n >\n Aceptados\n </button>\n <button\n class=\"h-12 border-b text-sm\"\n :class=\"bookedTab === 1 ? ' border-z-turquoise-600' : 'border-z-gray-200'\"\n @click=\"setBookedTab(1)\"\n >\n Cancelados\n </button>\n </div>\n <div\n v-if=\"bookedBookings[bookedTab].length === 0\"\n class=\"flex w-full flex-col items-center gap-6 px-6 py-4\"\n >\n <img\n src=\"@/assets/icons/task-search.svg\"\n class=\"h-16 w-16\"\n >\n <p>No hay elementos aquí</p>\n </div>\n <div\n v-else\n class=\"flex flex-col divide-y divide-z-gray-100\"\n >\n <div\n v-for=\"productBooking in bookedBookings[bookedTab]\"\n :key=\"productBooking.id\"\n class=\"px-6\"\n >\n <profile-product-booking-card\n :product-booking=\"productBooking\"\n :account-type=\"accountType\"\n />\n <template\n v-if=\"bookedTab === 0\"\n >\n <profile-product-booking-partner-awaiting-actions\n v-if=\"activeTab === 0 && accountType === 'partner'\"\n :product-booking=\"productBooking\"\n />\n <profile-product-booking-client-awaiting-actions\n v-else-if=\"activeTab === 0 && accountType === 'client'\"\n :product-booking=\"productBooking\"\n />\n <profile-product-booking-payment-actions\n v-else-if=\"activeTab === 1 && accountType === 'client'\"\n :product-booking=\"productBooking\"\n />\n <profile-product-booking-partner-paid-actions\n v-else-if=\"activeTab === 2 && accountType === 'partner'\"\n :product-booking=\"productBooking\"\n />\n <profile-product-booking-client-paid-actions\n v-else-if=\"activeTab === 2 && accountType === 'client'\"\n :product-booking=\"productBooking\"\n />\n <profile-product-booking-client-delivered-actions\n v-else-if=\"activeTab === 3 && accountType === 'client'\"\n :product-booking=\"productBooking\"\n />\n <profile-product-booking-partner-delivered-actions\n v-else-if=\"activeTab === 3 && accountType === 'partner'\"\n :product-booking=\"productBooking\"\n />\n </template>\n </div>\n </div>\n </template>\n <div class=\"fixed bottom-20 right-6 md:bottom-6\">\n <support-button\n v-if=\"statusTabs[activeTab].showSupport\"\n :product-bookings=\"bookedBookings[bookedTab]\"\n />\n </div>\n </div>\n </div>\n </the-layout>\n</template>\n","export default \"__VITE_ASSET__ba958c2f__\"","import { api } from './index';\n\nexport const bankAccountsApi = {\n create(data: BankAccountFormData) {\n const path = '/api/internal/bank_accounts';\n\n return api({\n method: 'post',\n url: path,\n data,\n });\n },\n update(id:number, data: Partial<BankAccountFormData>) {\n const path = `/api/internal/bank_accounts/${id}`;\n\n return api({\n method: 'patch',\n url: path,\n data,\n });\n },\n};\n","import { api } from './index';\n\nexport const bankEntitiesApi = {\n index() {\n const path = '/api/internal/bank_entities';\n\n return api({\n method: 'get',\n url: path,\n });\n },\n};\n","\"use strict\";\nfunction rutClean(value) {\n return typeof value === 'string' ? value.replace(/[^0-9kK]+/g, '').toUpperCase() : '';\n}\nexports.rutClean = rutClean;\nfunction rutValidate(value) {\n if (typeof value !== 'string') {\n return false;\n }\n var rut = rutClean(value);\n var rutDigits = parseInt(rut.slice(0, -1), 10);\n var m = 0;\n var s = 1;\n while (rutDigits > 0) {\n s = (s + rutDigits % 10 * (9 - m++ % 6)) % 11;\n rutDigits = Math.floor(rutDigits / 10);\n }\n var checkDigit = (s > 0) ? String((s - 1)) : 'K';\n return (checkDigit === rut.slice(-1));\n}\nexports.rutValidate = rutValidate;\nfunction rutFormat(value) {\n var rut = rutClean(value);\n if (rut.length <= 1) {\n return rut;\n }\n var result = rut.slice(-4, -1) + \"-\" + rut.substr(rut.length - 1);\n for (var i = 4; i < rut.length; i += 3) {\n result = rut.slice(-3 - i, -i) + \".\" + result;\n }\n return result;\n}\nexports.rutFormat = rutFormat;\n","<script setup lang=\"ts\">\nimport { bankAccountsApi } from '@/api/bank-accounts';\nimport { bankEntitiesApi } from '@/api/bank-entities';\nimport { inject, onBeforeMount, ref } from 'vue';\nimport { number, object, string } from 'yup';\nimport { rutFormat, rutValidate } from 'rut-helpers';\n\ninterface Props {\n bankAccount?: BankAccount\n buttonLabel?: string\n rut?: string\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n buttonLabel: 'Guardar',\n bankAccount: undefined,\n rut: '',\n});\n\nconst bankEntityOptions = ref<BankEntity[]>([{ id: 0, name: 'No hay bancos disponibles' }]);\nconst kindOptions = [\n { name: 'Cuenta de ahorro', id: 'savings_account' },\n { name: 'Cuenta corriente', id: 'checking_account' },\n { name: 'Cuenta vista', id: 'sight_account' },\n];\n\nconst user = inject<User>('user');\n\nconst name = ref(props.bankAccount?.name ?? '');\nconst rut = ref((props.rut || props.bankAccount?.rut || user?.rut) ?? '');\nconst bankEntityId = ref(props.bankAccount?.bankEntity.id ?? 0);\nconst kind = ref(props.bankAccount?.kind ?? '0');\nconst accountNumber = ref(props.bankAccount?.number ?? '');\n\nonBeforeMount(() => {\n bankEntitiesApi.index().then((response) => {\n bankEntityOptions.value = response.data.bankEntities;\n });\n});\n\nconst formRules = object().shape({\n name: string().required(),\n bankEntityId: number().required('test').min(1),\n kind: string().required('Debes seleccionar un rango')\n .oneOf(kindOptions.map((el) => el.id), 'Debes seleccionar un rango'),\n accountNumber: string().required(),\n rut: string().required('Debes ingresar un rut válido')\n .test((value) => {\n if (value) {\n return rutValidate(value);\n }\n\n return false;\n }),\n});\n\nconst loading = ref(false);\nconst error = ref(false);\n\nconst emit = defineEmits<{(e: 'success'): void}>();\n\nfunction handleBankAccount() {\n const formValues = {\n name: name.value,\n bankEntityId: bankEntityId.value,\n kind: kind.value,\n number: accountNumber.value,\n rut: rut.value,\n };\n try {\n loading.value = true;\n if (props.bankAccount) {\n bankAccountsApi.update(props.bankAccount.id, formValues)\n .then(() => emit('success'));\n } else {\n bankAccountsApi.create(formValues)\n .then(() => emit('success'));\n }\n } catch (e) {\n error.value = true;\n } finally {\n loading.value = false;\n }\n}\n\nfunction handleRutInput() {\n error.value = false;\n rut.value = rutFormat(rut.value);\n}\n</script>\n<template>\n <v-form\n v-slot=\"{ meta, handleSubmit, errors }\"\n class=\"md:max-w-md\"\n :validation-schema=\"formRules\"\n >\n <div class=\"flex flex-col space-y-4 p-6\">\n <base-input\n v-model=\"name\"\n name=\"name\"\n label=\"Nombre del titular\"\n placeholder=\"Nombre del titular\"\n :error=\"meta.touched && !!errors.name\"\n />\n <base-input\n v-model=\"rut\"\n name=\"rut\"\n label=\"RUT\"\n placeholder=\"RUT\"\n :error=\"meta.touched && !!errors.name\"\n disabled\n @update:model-value=\"handleRutInput\"\n />\n <base-select\n v-model=\"bankEntityId\"\n :options=\"bankEntityOptions\"\n name=\"bankEntityId\"\n label=\"Selecciona un banco\"\n placeholder=\"Selecciona un banco\"\n hide-label\n :error=\"meta.touched && !!errors.bankEntity\"\n />\n <base-select\n v-model=\"kind\"\n :options=\"kindOptions\"\n name=\"kind\"\n label=\"Tipo de cuenta\"\n placeholder=\"Tipo de cuenta\"\n hide-label\n :error=\"meta.touched && !!errors.kind\"\n />\n <base-input\n v-model=\"accountNumber\"\n name=\"accountNumber\"\n label=\"Número de cuenta\"\n placeholder=\"Número de cuenta\"\n :error=\"meta.touched && !!errors.accountNumber\"\n />\n </div>\n <div class=\"fixed bottom-16 w-full px-6 py-4 md:bottom-4 md:max-w-md\">\n <base-button\n class=\"w-full\"\n @click=\"handleSubmit($event, handleBankAccount)\"\n >\n {{ buttonLabel }}\n </base-button>\n </div>\n </v-form>\n</template>\n","<script setup lang=\"ts\">\nimport { camelCase } from 'lodash';\nimport { ref } from 'vue';\nimport ProfileNewBankAccountForm from './profile-new-bank-account-form.vue';\n\ninterface Props {\n bankAccount?: BankAccount;\n}\nwithDefaults(defineProps<Props>(), {\n bankAccount: undefined,\n});\n\nfunction handleBack() {\n window.history.back();\n}\n\nconst showBankAccountForm = ref(false);\nfunction toggleBankAccountForm() {\n showBankAccountForm.value = !showBankAccountForm.value;\n}\n\nconst showSuccessModal = ref(false);\nfunction toggleSuccessModal() {\n showSuccessModal.value = !showSuccessModal.value;\n}\n\nconst redirect = new URLSearchParams(window.location.search).get('redirect');\n\nfunction handleSuccess() {\n if (redirect === 'true') {\n window.location.href = '/perfil/solicitudes_reservas/socio';\n } else {\n window.location.reload();\n }\n}\n\nfunction maskNumber(string:string) {\n const length = string.length;\n\n // eslint-disable-next-line no-magic-numbers\n return `${'*'.repeat(length - 3)}${string.substring(string.length - 3)}`;\n}\n</script>\n<template>\n <the-layout\n :active-menu=\"3\"\n hide-navbar\n >\n <div class=\"relative bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"Mis datos bancarios\"\n @back=\"handleBack\"\n />\n <div\n v-if=\"!!bankAccount && !showBankAccountForm\"\n class=\"m-6 flex flex-col\"\n >\n <div class=\"flex flex-col space-y-6 rounded-lg bg-z-gray-25 p-4\">\n <div class=\"flex items-center justify-between\">\n <p class=\"rounded bg-z-gray-100 p-2 text-xs\">\n {{ bankAccount.bankEntity.name }}\n </p>\n <p class=\"text-xs\">\n {{ maskNumber(bankAccount.number) }}\n </p>\n </div>\n <p class=\"text-xs\">\n {{ bankAccount.name || $t(`bankAccount.kind.${camelCase(bankAccount.kind)}`) }}\n </p>\n </div>\n <button\n class=\"mt-2 w-fit rounded bg-z-turquoise-600 px-6 py-1.5 text-sm text-white\"\n @click=\"toggleBankAccountForm\"\n >\n Cambiar cuenta\n </button>\n <base-tip\n class=\"mt-2\"\n title=\"¿Deseas eliminar cuenta?\"\n variant=\"bold\"\n >\n <template #icon>\n <img src=\"@/assets/icons/warning.svg\">\n </template>\n <p>\n No puedes eliminar una cuenta pero si la puedes cambiar,\n en caso tengas una nueva u otra en donde quieras que tus depósitos lleguen.\n </p>\n </base-tip>\n </div>\n <div\n v-else-if=\"!showBankAccountForm\"\n class=\"m-6 flex flex-col items-center rounded-lg bg-z-gray-25 p-4\"\n >\n <img src=\"@/assets/icons/card.svg\">\n <p class=\"mt-2 text-z-gray-900\">\n No hay una cuenta vinculada\n </p>\n <base-button\n class=\"mt-6 w-full space-x-2\"\n @click=\"toggleBankAccountForm\"\n >\n <p>Vincular banco</p>\n <img src=\"@/assets/icons/arrow-small-right.svg\">\n </base-button>\n </div>\n <profile-new-bank-account-form\n v-if=\"showBankAccountForm\"\n :bank-account=\"bankAccount\"\n class=\"w-full\"\n @success=\"toggleSuccessModal\"\n />\n <base-modal\n :open=\"showSuccessModal\"\n >\n <div class=\"flex flex-col\">\n <img\n src=\"@/assets/icons/check-circle.svg\"\n class=\"w-20 self-center\"\n >\n <p class=\"mt-4 text-center font-medium text-z-gray-900\">\n Excelente!\n </p>\n <p class=\"mt-6 text-center text-z-gray-800\">\n Hemos registrado tu cuenta de forma exitosa\n </p>\n <base-button\n class=\"mt-4\"\n @click=\"handleSuccess\"\n >\n Aceptar\n </base-button>\n </div>\n </base-modal>\n </div>\n </the-layout>\n</template>\n","export default \"__VITE_ASSET__4e7d4eb4__\"","export default \"__VITE_ASSET__dde9d1e0__\"","<script setup lang=\"ts\">\nimport { currency } from '@/utils/currency';\nimport { camelCase } from 'lodash';\nimport { format } from 'date-fns';\n\ninterface Props {\n products: Product[]\n}\ndefineProps<Props>();\n\nfunction handleBack() {\n window.history.back();\n}\n</script>\n<template>\n <the-layout\n :active-menu=\"3\"\n hide-navbar\n >\n <div class=\"bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"Mi historial de tienda\"\n @back=\"handleBack\"\n />\n <div class=\"flex flex-col\">\n <div class=\"flex flex-col items-center space-y-6 px-6 py-4\">\n <img\n src=\"@/assets/icons/store-alt.svg\"\n class=\"h-16 w-16\"\n >\n <p class=\"text-center\">\n Comparte tu tienda y aumenta tus ingresos\n </p>\n <base-button\n variant=\"secondary\"\n class=\"w-full space-x-2\"\n >\n <img src=\"@/assets/icons/share-rectangle.svg\">\n <p>Compartir mi tienda</p>\n </base-button>\n </div>\n <p class=\"px-6 py-2 text-xl font-medium text-z-gray-800\">\n Productos que han sido arrendados\n </p>\n <div class=\"divide-y-2 divide-z-gray-100 border-b-2 border-z-gray-100\">\n <a\n v-for=\"product in products\"\n :key=\"product.id\"\n class=\"flex w-full space-x-4 px-6 py-4\"\n :href=\"`/perfil/productos/${product.id}/historial`\"\n >\n <img\n :src=\"product.productPictures[0].picture.webpSm.url\"\n class=\"h-24 w-24 rounded-lg border border-gray-100 object-cover\"\n >\n <div class=\"flex w-full flex-col space-y-3 text-start\">\n <div class=\"flex w-full items-center justify-between\">\n <p class=\"w-fit rounded bg-z-turquoise-50 px-2 py-0.5 text-xs text-z-turquoise-600\">\n {{ $t(`product.condition.${ camelCase(product.condition) }`) }}\n </p>\n <p class=\"text-xs text-z-gray-900\">\n {{ format(new Date(product.createdAt), \"d 'de' MMM\") }}\n </p>\n </div>\n <p class=\"line-clamp-1 font-medium\">\n {{ product.name }}\n </p>\n <p class=\"line-clamp-2 text-sm text-z-gray-800\">\n {{ product.description }}\n </p>\n <div class=\"text-xs leading-[18px]\">\n <p class=\"font-bold text-z-turquoise-600\">\n {{ currency(product.dailyPrice) }}\n </p>\n <p class=\"text-z-gray-900\">\n Alquilado: {{ product.productBookingsCount }} {{ product.productBookingsCount > 1 ? 'veces' : 'vez' }}\n </p>\n </div>\n </div>\n </a>\n </div>\n </div>\n </div>\n </the-layout>\n</template>\n","export default \"__VITE_ASSET__639366a3__\"","<script setup lang=\"ts\">\nimport { camelCase, sortBy, reverse } from 'lodash';\nimport { currency } from '@/utils/currency';\nimport { computed } from 'vue';\nimport { formatDate } from '@/utils/format-date';\n\ninterface Props {\n product: Product,\n productBookings: ProductBooking[]\n}\n\nconst props = defineProps<Props>();\n\nconst sortedBookings = computed(() => reverse(sortBy(props.productBookings, 'startDate')));\n\nconst totalEarnings = computed(() => props.productBookings.reduce((acum, booking) => acum + booking.amount, 0));\n\nfunction handleBack() {\n window.history.back();\n}\n</script>\n<template>\n <the-layout\n :active-menu=\"3\"\n hide-layout\n >\n <div class=\"relative bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <div class=\"flex h-full w-full flex-col bg-white\">\n <the-titlebar\n :title=\"product.name\"\n @back=\"handleBack\"\n />\n\n <p class=\"mx-6 mb-3 mt-4 self-end rounded bg-z-turquoise-50 px-2 py-0.5 text-xs text-z-turquoise-600\">\n {{ $t(`product.condition.${ camelCase(product.condition)}`) }}\n </p>\n <div class=\"flex flex-col space-y-4 px-6\">\n <img\n :src=\"product.productPictures[0].picture.webpMd.url\"\n class=\"aspect-square w-full rounded-lg border border-z-gray-100 object-cover\"\n >\n <div class=\"grid grid-cols-3 gap-4\">\n <img\n v-for=\"picture in product.productPictures.slice(1)\"\n :key=\"picture.id\"\n :src=\"picture.picture.webpSm.url\"\n class=\"aspect-square w-full rounded-lg border border-z-gray-100 object-cover\"\n >\n </div>\n <p class=\"font-medium\">\n {{ product.name }}\n </p>\n <div class=\"flex space-x-2 rounded-lg bg-z-turquoise-50 p-3\">\n <img\n src=\"@/assets/icons/money-bag.svg\"\n class=\"h-6 w-6\"\n >\n <div class=\"flex flex-col\">\n <p class=\"text-xs\">\n Este producto hizo un total de\n </p>\n <p class=\"text-[28px] font-semibold text-z-turquoise-600\">\n {{ currency(totalEarnings) }}\n </p>\n </div>\n </div>\n </div>\n <div class=\"mt-4 divide-y-2 divide-z-gray-100 border-t-2 border-z-gray-100\">\n <div\n v-for=\"productBooking in sortedBookings\"\n :key=\"productBooking.id\"\n class=\"flex space-x-2 px-6 py-4\"\n >\n <img\n :src=\"productBooking.clientAccount.pictureUrl\"\n class=\"h-6 w-6 rounded-full object-cover\"\n >\n <div class=\"flex flex-col space-y-0.5\">\n <p class=\"text-xs\">\n Reservado por {{ productBooking.clientAccount.firstName }}\n </p>\n <p class=\"text-xs text-z-gray-600\">\n {{ formatDate(productBooking.startDate) }}\n - {{ formatDate(productBooking.endDate) }}\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </the-layout>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\nimport { groupBy } from 'lodash';\nimport ProfileProductCard from './profile-product-card.vue';\n\ninterface Props {\n products: Product[]\n}\nconst props = defineProps<Props>();\n\nfunction handleBack() {\n window.history.back();\n}\n\nconst productsGroupedByStatus = computed(() => groupBy(props.products, 'status'));\n\nconst activeTab = ref('active');\n\nfunction setActiveTab(string: 'active' | 'pending') {\n activeTab.value = string;\n}\n</script>\n<template>\n <the-navbar class=\"hidden md:block\" />\n <div class=\"bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"Mis productos\"\n @back=\"handleBack\"\n />\n <div\n class=\"grid grid-cols-2\"\n >\n <button\n class=\"h-12 border-b text-sm\"\n :class=\"activeTab === 'active' ? ' border-z-turquoise-600' : 'border-z-gray-200'\"\n @click=\"setActiveTab('active')\"\n >\n Activos\n </button>\n <button\n class=\"h-12 border-b text-sm\"\n :class=\"activeTab === 'pending' ? ' border-z-turquoise-600' : 'border-z-gray-200'\"\n @click=\"setActiveTab('pending')\"\n >\n En revisión\n </button>\n </div>\n <div\n class=\"flex flex-col\"\n >\n <div\n v-if=\"productsGroupedByStatus[activeTab]\"\n class=\"flex min-h-full flex-col divide-y divide-z-gray-100 pb-32\"\n >\n <profile-product-card\n v-for=\"product in productsGroupedByStatus[activeTab]\"\n :key=\"product.id\"\n :product=\"product\"\n />\n </div>\n <div\n v-else\n class=\"mt-4 flex w-full flex-col items-center gap-4 px-6 py-4\"\n >\n <img\n src=\"@/assets/icons/task-search.svg\"\n class=\"h-16 w-16\"\n >\n <p>No hay productos aquí</p>\n </div>\n </div>\n <div class=\"fixed bottom-0 flex w-full flex-col space-y-2 bg-white px-6 py-3 md:bottom-4 md:max-w-md\">\n <base-button\n class=\"space-x-2\"\n href=\"/productos/crear\"\n >\n <img\n src=\"@/assets/icons/plus.svg\"\n class=\"h-6 w-6\"\n >\n <p>Subir producto</p>\n </base-button>\n </div>\n <!-- <base-button\n variant=\"secondary\"\n class=\"space-x-2\"\n >\n <img src=\"@/assets/icons/share-rectangle.svg\">\n <p>Compartir mi tienda</p>\n </base-button> -->\n </div>\n</template>\n","export default \"__VITE_ASSET__0ebcb08a__\"","<script setup lang=\"ts\">\ninterface Props {\n addresses?: AddressData[]\n}\n\ndefineProps<Props>();\n\nfunction handleBack() {\n window.history.back();\n}\n</script>\n<template>\n <the-layout\n hide-navbar\n :active-menu=\"3\"\n >\n <div\n class=\"flex w-full flex-col bg-white md:mx-auto md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\"\n >\n <the-titlebar\n title=\"Mis direcciones\"\n @back=\"handleBack\"\n />\n <div\n v-if=\"!addresses\"\n class=\"flex w-full flex-col p-6\"\n >\n <div class=\"flex flex-col items-center rounded-lg bg-z-gray-25 p-4\">\n <img\n src=\"@/assets/icons/location.svg\"\n class=\"h-6 w-6\"\n >\n <p class=\"mt-2 text-z-gray-900\">\n No hay una dirección vinculada\n </p>\n <base-button\n class=\"mt-6 w-full space-x-2\"\n href=\"/perfil/direcciones/crear\"\n >\n <p>Vincular dirección</p>\n <img\n src=\"@/assets/icons/arrow-small-right.svg\"\n class=\"h-6 w-6\"\n >\n </base-button>\n </div>\n </div>\n <div\n v-else\n class=\"flex flex-col\"\n >\n <div class=\"mb-20 divide-y divide-z-gray-100\">\n <div\n v-for=\"address in addresses\"\n :key=\"address.id\"\n class=\"flex w-full flex-col space-y-4 p-6\"\n >\n <div class=\"space-y-1\">\n <p\n v-if=\"address.alias\"\n class=\"w-fit rounded bg-z-gray-100 p-2 text-xs\"\n >\n {{ address.alias }}\n </p>\n <p class=\"line-clamp-1 text-z-gray-800\">\n {{ address.displayName }}\n </p>\n </div>\n <div class=\"rounded-xl bg-z-gray-100 p-4 text-sm text-z-gray-800\">\n <p v-if=\"address.productsCount > 0\">\n Hay\n <span class=\"font-medium\">{{ address.productsCount }} {{ address.productsCount === 1 ? 'producto' : 'productos' }}</span>\n asociados a esta dirección.\n </p>\n <p v-else>\n Esta dirección no tiene productos asociados.\n </p>\n <a\n v-if=\"address.productsCount > 0\"\n class=\"mt-2 font-medium underline\"\n :href=\"`/perfil/direcciones/${address.id}`\"\n >\n ver más\n </a>\n </div>\n <base-button\n class=\"h-8 w-fit px-6 text-sm\"\n :href=\"`/perfil/direcciones/${address.id}/editar`\"\n >\n Editar dirección\n </base-button>\n </div>\n </div>\n <div class=\"fixed bottom-16 w-full flex-col bg-white px-6 py-2 md:bottom-0 md:max-w-md\">\n <base-button\n class=\"w-full\"\n href=\"/perfil/direcciones/crear\"\n >\n Agregar nueva dirección\n </base-button>\n </div>\n </div>\n </div>\n </the-layout>\n</template>\n","<script setup lang=ts>\nimport { camelCase } from 'lodash';\nimport format from 'date-fns/format';\n\ninterface Props {\n address: AddressData\n products?: Product[]\n}\n\ndefineProps<Props>();\n\nfunction handleBack() {\n window.location.href = '/perfil/direcciones';\n}\n</script>\n<template>\n <the-layout\n :active-menu=\"3\"\n hide-navbar\n >\n <div class=\"relative bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n :title=\"address.displayName\"\n @back=\"handleBack\"\n />\n <div class=\"space-y-1 px-6 py-3\">\n <p\n v-if=\"address.alias\"\n class=\"w-fit rounded bg-z-gray-100 p-2 text-xs\"\n >\n {{ address.alias }}\n </p>\n <p class=\"line-clamp-1 text-z-gray-800\">\n {{ address.displayName }}\n </p>\n </div>\n <div class=\"border-t-2 border-z-gray-100 px-6 py-3\">\n <p class=\"font-medium text-z-gray-900\">\n {{ products?.length ?? 0 }} {{ products?.length == 1 ? 'producto' : 'productos' }}\n </p>\n </div>\n <div\n v-for=\"product in products\"\n :key=\"product.id\"\n class=\"flex w-full space-x-4 border-y border-z-gray-100 p-6\"\n >\n <img\n :src=\"product.productPictures[0].picture.webpSm.url\"\n class=\"h-24 w-24 rounded-lg border border-gray-100 object-cover\"\n >\n <div class=\"flex w-full flex-col space-y-3 text-start\">\n <div class=\"flex w-full items-center justify-between\">\n <p class=\"w-fit rounded bg-z-turquoise-50 px-2 py-0.5 text-xs text-z-turquoise-600\">\n {{ $t(`product.condition.${ camelCase(product.condition) }`) }}\n </p>\n <p class=\"text-xs text-z-gray-900\">\n {{ format(new Date(product.createdAt), \"d 'de' MMM\") }}\n </p>\n </div>\n <p class=\"line-clamp-1 font-medium\">\n {{ product.name }}\n </p>\n <p class=\"line-clamp-2 text-sm text-z-gray-800\">\n {{ product.description }}\n </p>\n <a\n class=\"text-sm font-medium text-z-gray-800 underline underline-offset-2\"\n :href=\"`/productos/${product.id}`\"\n >\n ver más\n </a>\n </div>\n </div>\n <div class=\"fixed bottom-16 w-full flex-col bg-white px-6 py-2 md:bottom-0 md:max-w-md\">\n <base-button\n class=\"w-full\"\n :href=\"`/perfil/direcciones/${address.id}/editar`\"\n >\n Editar dirección\n </base-button>\n </div>\n </div>\n </the-layout>\n</template>\n\n","<script setup lang=\"ts\">\nimport { addressesApi } from '@/api/addresses';\nimport { inject, ref } from 'vue';\n\nconst emit = defineEmits<{\n (e: 'success'): void,\n (e: 'back'): void,\n}>();\n\nconst user = inject<User>('user');\n\nconst place = ref<google.maps.places.PlaceResult>();\nconst errorEmpty = ref(false);\nconst error = ref(false);\nconst alias = ref('');\n\nconst showSuccessModal = ref(false);\nfunction toggleSuccessModal() {\n showSuccessModal.value = !showSuccessModal.value;\n}\n\nfunction createAddress() {\n if (place.value) {\n try {\n const addressData = {\n street: '',\n streetNumber: '',\n commune: '',\n region: '',\n latitude: 0.0,\n longitude: 0.0,\n alias: alias.value,\n };\n\n addressData.latitude = place.value.geometry?.location?.lat() ?? 0.0;\n addressData.longitude = place.value.geometry?.location?.lng() ?? 0.0;\n\n place.value.address_components?.forEach((addressComponent) => {\n switch (addressComponent.types[0]) {\n case 'street_number':\n addressData.streetNumber = addressComponent.long_name;\n break;\n case 'route':\n addressData.street = addressComponent.long_name;\n break;\n case 'locality':\n addressData.commune = addressComponent.long_name;\n break;\n case 'administrative_area_level_1':\n addressData.region = addressComponent.long_name;\n break;\n default:\n // Do nothing\n }\n });\n\n addressesApi.create({ ...addressData, userId: user?.id }).then(() => toggleSuccessModal());\n } catch (e) {\n error.value = true;\n }\n } else {\n errorEmpty.value = true;\n }\n}\n\nfunction handleBack() {\n window.location.href = '/perfil/direcciones';\n}\n\nfunction handleSuccess() {\n window.location.assign('/perfil/direcciones');\n}\n\n</script>\n<template>\n <the-layout\n :active-menu=\"3\"\n hide-navbar\n >\n <the-titlebar\n title=\"Mis direcciones\"\n @back=\"handleBack\"\n />\n <div class=\"flex flex-col space-y-4 p-6\">\n <base-input\n v-model=\"alias\"\n name=\"alias\"\n placeholder=\"Casa, oficina, etc. (opcional)\"\n label=\"Casa, oficina, etc. (opcional)\"\n />\n <base-google-autocomplete\n v-model=\"place\"\n name=\"place\"\n placeholder=\"Ingresa una dirección\"\n :error=\"errorEmpty\"\n />\n </div>\n <div class=\"fixed bottom-16 w-full px-6 py-2 md:bottom-0\">\n <base-button\n class=\"w-full\"\n @click=\"createAddress\"\n >\n Guardar\n </base-button>\n </div>\n <base-modal :open=\"showSuccessModal\">\n <div class=\"flex w-full flex-col items-center\">\n <img\n src=\"@/assets/icons/check-circle.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Excelente!\n </p>\n <p class=\"mt-6 text-center text-z-gray-800\">\n Hemos registrado tu cuenta de forma exitosa.\n </p>\n <base-button\n class=\"mt-4 w-full\"\n @click=\"handleSuccess\"\n >\n Aceptar\n </base-button>\n </div>\n </base-modal>\n </the-layout>\n</template>\n","<script setup lang=\"ts\">\nimport { addressesApi } from '@/api/addresses';\nimport { inject, ref } from 'vue';\n\ninterface Props {\n address: AddressData\n}\n\nconst props = defineProps<Props>();\n\nconst user = inject<User>('user');\n\nconst place = ref<google.maps.places.PlaceResult>();\nconst errorEmpty = ref(false);\nconst error = ref(false);\nconst alias = ref(props.address.alias);\n\nconst showSuccessModal = ref(false);\nfunction toggleSuccessModal() {\n showSuccessModal.value = !showSuccessModal.value;\n}\n\nfunction updateAddress() {\n if (place.value) {\n try {\n const addressData = {\n street: '',\n streetNumber: '',\n commune: '',\n region: '',\n latitude: 0.0,\n longitude: 0.0,\n alias: alias.value,\n };\n\n addressData.latitude = place.value.geometry?.location?.lat() ?? 0.0;\n addressData.longitude = place.value.geometry?.location?.lng() ?? 0.0;\n\n place.value.address_components?.forEach((addressComponent) => {\n switch (addressComponent.types[0]) {\n case 'street_number':\n addressData.streetNumber = addressComponent.long_name;\n break;\n case 'route':\n addressData.street = addressComponent.long_name;\n break;\n case 'locality':\n addressData.commune = addressComponent.long_name;\n break;\n case 'administrative_area_level_1':\n addressData.region = addressComponent.long_name;\n break;\n default:\n // Do nothing\n }\n });\n\n addressesApi.update(props.address.id, { ...addressData, userId: user?.id }).then(() => toggleSuccessModal());\n } catch (e) {\n error.value = true;\n }\n } else {\n errorEmpty.value = true;\n }\n}\n\nfunction handleBack() {\n window.history.back();\n}\n\n</script>\n<template>\n <the-layout\n :active-menu=\"3\"\n hide-navbar\n >\n <div class=\"relative bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"Mis direcciones\"\n @back=\"handleBack\"\n />\n <div class=\"flex flex-col space-y-4 p-6\">\n <base-input\n v-model=\"alias\"\n name=\"alias\"\n placeholder=\"Casa, oficina, etc. (opcional)\"\n label=\"Casa, oficina, etc. (opcional)\"\n />\n <base-google-autocomplete\n v-model=\"place\"\n name=\"place\"\n placeholder=\"Ingresa una dirección\"\n :initial-value=\"address.displayName\"\n :error=\"errorEmpty\"\n />\n </div>\n <div class=\"fixed bottom-16 w-full px-6 py-2 md:bottom-8 md:max-w-md\">\n <base-button\n class=\"w-full\"\n @click=\"updateAddress\"\n >\n Guardar\n </base-button>\n </div>\n <base-modal :open=\"showSuccessModal\">\n <div class=\"flex w-full flex-col items-center\">\n <img\n src=\"@/assets/icons/check-circle.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Excelente!\n </p>\n <p class=\"mt-6 text-center text-z-gray-800\">\n Hemos registrado tu cuenta de forma exitosa.\n </p>\n <base-button\n class=\"mt-4 w-full\"\n :disabled=\"!place\"\n @click=\"handleBack()\"\n >\n Aceptar\n </base-button>\n </div>\n </base-modal>\n </div>\n </the-layout>\n</template>\n","import { api } from './index';\n\nfunction update(userId:number, data: Partial<UserFormData>, picture?: File) {\n const path = `/api/internal/users/${userId}`;\n\n return api({\n method: 'patch',\n headers: {\n 'Content-Type': 'multipart/form-data',\n },\n url: path,\n data: { ...data, picture },\n });\n}\nexport { update };\n","function generateURL(file:File) {\n const fileSrc = URL.createObjectURL(file);\n setTimeout(() => {\n URL.revokeObjectURL(fileSrc);\n });\n\n return fileSrc;\n}\n\nexport { generateURL };\n","<script setup lang=\"ts\">\nimport { computed, inject } from 'vue';\nimport formatDistanceToNow from 'date-fns/formatDistanceToNow';\n\ninterface Props {\n ratings?: UserRating[]\n isOpen: boolean\n}\n\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n (e: 'close'): void\n}>();\n\nfunction closeModal() {\n emit('close');\n}\n\nconst user = inject<User>('user');\n\nconst ratingsWithDescription = computed(() => props.ratings?.filter((rating) => !!rating.description));\n</script>\n<template>\n <base-modal\n :open=\"isOpen\"\n >\n <div class=\"flex w-full flex-col space-y-4\">\n <button\n type=\"button\"\n class=\"absolute self-end\"\n @click=\"closeModal\"\n >\n <img\n src=\"@/assets/icons/close.svg\"\n class=\"h-5 w-5\"\n >\n </button>\n <img\n v-if=\"user?.picture.webpSm.url\"\n :src=\"user?.picture.webpSm.url\"\n class=\"h-24 w-24 self-center rounded-full object-cover\"\n >\n <img\n v-else\n src=\"@/assets/icons/default-profile.svg\"\n class=\"h-24 w-24 rounded-full object-cover\"\n >\n <p class=\"text-lg font-bold text-z-gray-900\">\n {{ user?.firstName }} {{ user?.lastName }}\n </p>\n <div class=\"space-y-2\">\n <p class=\"text-z-gray-900\">\n Calificaciones ({{ ratings?.length ?? 0 }})\n </p>\n <base-stars :value=\"user?.ratingAverage\" />\n </div>\n <p>Opiniones ({{ ratingsWithDescription?.length ?? 0 }})</p>\n <div class=\"space-y-4 overflow-y-scroll scrollbar-hide\">\n <div\n v-for=\"rating in ratingsWithDescription\"\n :key=\"rating.id\"\n class=\"flex space-x-6 rounded-lg border border-z-gray-100 px-4 py-3\"\n >\n <img\n v-if=\"rating.senderPicture\"\n :src=\"rating.senderPicture\"\n class=\"h-10 w-10 self-center rounded-full object-cover\"\n >\n <img\n v-else\n src=\"@/assets/icons/default-profile.svg\"\n class=\"h-10 w-10 rounded-full object-cover\"\n >\n <div class=\"flex flex-col space-y-1\">\n <p class=\"text-sm font-medium italic text-z-gray-800\">\n \"{{ rating.description }}\"\n </p>\n <p class=\"text-sm font-medium text-z-gray-500\">\n {{ rating.senderName }}\n </p>\n <p class=\"font-light text-z-gray-500\">\n hace {{ formatDistanceToNow(new Date(rating.createdAt)) }}\n </p>\n </div>\n </div>\n </div>\n </div>\n </base-modal>\n</template>\n","<script setup lang=\"ts\">\nimport { inject, ref } from 'vue';\nimport { object, string } from 'yup';\nimport * as usersApi from '@/api/users';\nimport { generateURL } from '@/utils/generate-url';\nimport ProfileAccountRatingsModal from './profile-account-ratings-modal.vue';\n\ninterface Props {\n ratings?: UserRating[]\n}\n\ndefineProps<Props>();\n\nfunction handleBack() {\n window.history.back();\n}\n\nfunction handleReload() {\n window.location.reload();\n}\n\nconst user = inject<User>('user');\n\nconst firstName = ref(user?.firstName);\nconst lastName = ref(user?.lastName);\nconst email = ref(user?.email);\nconst newPassword = ref();\nconst passwordConfirmation = ref();\nconst fakePassword = ref('**********');\nconst newPicture = ref<File>();\n\nconst showSuccessModal = ref(false);\nconst showRatingsModal = ref(false);\n\nfunction toggleSuccessModal() {\n showSuccessModal.value = !showSuccessModal.value;\n}\n\nfunction toggleRatingsModal() {\n showRatingsModal.value = !showRatingsModal.value;\n}\n\nconst editable = ref(false);\n\nfunction toggleEditable() {\n editable.value = !editable.value;\n}\n\nconst loading = ref(false);\nconst error = ref(false);\n\nconst formRules = object().shape({\n firstName: string().required(),\n lastName: string().required(),\n newPassword: string().notRequired(),\n passwordConfirmation: string().notRequired().test((value) => {\n if (newPassword.value) {\n return value === newPassword.value;\n }\n\n return true;\n }),\n});\n\nasync function handleClick() {\n let formValues;\n\n if (newPassword.value) {\n formValues = {\n firstName: firstName.value,\n lastName: lastName.value,\n password: newPassword.value,\n passwordConfirmation: passwordConfirmation.value,\n };\n } else {\n formValues = {\n firstName: firstName.value,\n lastName: lastName.value,\n };\n }\n\n try {\n loading.value = true;\n await usersApi.update(user?.id as number, formValues, newPicture.value);\n toggleSuccessModal();\n } catch (e) {\n error.value = true;\n } finally {\n loading.value = false;\n }\n}\n</script>\n<template>\n <the-layout\n hide-navbar\n :active-menu=\"3\"\n >\n <div class=\"bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"Mi cuenta\"\n @back=\"handleBack\"\n />\n <v-form\n v-slot=\"{ handleSubmit, errors, meta }\"\n :validation-schema=\"formRules\"\n >\n <div class=\"flex w-full flex-col p-6\">\n <div>\n <p class=\"font-medium text-z-gray-700\">\n Ingresa tus datos\n </p>\n <div class=\"mt-4 flex space-x-2\">\n <div class=\"mr-1 mt-1 h-12 w-12\">\n <base-file-input\n v-if=\"editable\"\n v-model=\"newPicture\"\n name=\"newPicture\"\n class=\"h-12 w-12 cursor-pointer rounded-full transition hover:opacity-75\"\n accept=\"image/*\"\n capture=\"user\"\n >\n <img\n v-if=\"newPicture\"\n :src=\"generateURL(newPicture as File)\"\n class=\"h-12 w-12 rounded-full object-cover\"\n >\n <img\n v-else-if=\"user?.picture.webpSm.url\"\n :src=\"user?.picture.webpSm.url\"\n class=\"h-12 w-12 rounded-full object-cover\"\n >\n <img\n v-else\n src=\"@/assets/icons/default-profile.svg\"\n class=\"h-12 w-12 rounded-full object-cover\"\n >\n </base-file-input>\n <div\n v-else\n >\n <img\n v-if=\"user?.picture.webpSm.url\"\n :src=\"user?.picture.webpSm.url\"\n class=\"h-12 w-12 rounded-full object-cover\"\n >\n <img\n v-else\n src=\"@/assets/icons/default-profile.svg\"\n class=\"h-12 w-12 rounded-full object-cover\"\n >\n </div>\n </div>\n <div class=\"flex flex-col space-y-2\">\n <p class=\"text-z-gray-900\">\n Calificaciones ({{ ratings?.length ?? 0 }})\n </p>\n <base-stars :value=\"user?.ratingAverage\" />\n <button\n class=\"self-start text-sm text-z-gray-800 underline underline-offset-2\"\n type=\"button\"\n @click=\"toggleRatingsModal\"\n >\n Ver más\n </button>\n </div>\n </div>\n </div>\n <div class=\"mt-4 space-y-4\">\n <base-input\n v-model=\"firstName\"\n name=\"firstName\"\n label=\"Nombre\"\n placeholder=\"Nombre\"\n :disabled=\"!editable\"\n :error=\"meta.touched && !!errors.firstName\"\n />\n <base-input\n v-model=\"lastName\"\n name=\"lastName\"\n label=\"Apellido\"\n placeholder=\"Apellido\"\n :disabled=\"!editable\"\n :error=\"meta.touched && !!errors.lastName\"\n />\n <base-input\n v-model=\"email\"\n name=\"email\"\n label=\"Correo electrónico\"\n placeholder=\"Correo electrónico\"\n disabled\n type=\"email\"\n />\n <div v-if=\"editable\">\n <base-input\n v-model=\"newPassword\"\n name=\"newPassword\"\n label=\"Nueva contraseña\"\n placeholder=\"Nueva contraseña\"\n :disabled=\"!editable\"\n type=\"password\"\n :error=\"meta.touched && !!errors.newPassword\"\n />\n <p class=\"mb-4 mt-1.5 text-xs text-z-gray-600\">\n Deja el campo en blanco para mantener tu contraseña actual\n </p>\n <base-input\n v-if=\"newPassword\"\n v-model=\"passwordConfirmation\"\n name=\"passwordConfirmation\"\n label=\"Confirma tu nueva contraseña\"\n placeholder=\"Confirma tu contraseña\"\n :disabled=\"!editable\"\n type=\"password\"\n :error=\"meta.touched && !!errors.passwordConfirmation\"\n />\n </div>\n <template v-else>\n <base-input\n v-if=\"!editable\"\n v-model=\"fakePassword\"\n name=\"fakePassword\"\n label=\"Contraseña\"\n placeholder=\"Contraseña\"\n :disabled=\"!editable\"\n />\n </template>\n </div>\n </div>\n <div class=\"fixed bottom-16 w-full flex-col bg-white px-6 py-2 md:relative md:bottom-0\">\n <base-button\n v-if=\"!editable\"\n class=\"w-full\"\n type=\"button\"\n @click=\"toggleEditable\"\n >\n Editar\n </base-button>\n <base-button\n v-else\n class=\"w-full\"\n :disabled=\"!meta.valid\"\n @click=\"handleSubmit($event, handleClick())\"\n >\n Guardar\n </base-button>\n </div>\n </v-form>\n <base-modal :open=\"showSuccessModal\">\n <div class=\"flex w-full flex-col items-center\">\n <img\n src=\"@/assets/icons/check-circle.svg\"\n class=\"h-20 w-20\"\n >\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Excelente!\n </p>\n <p class=\"mt-6 text-center text-z-gray-800\">\n Se actualizó de forma exitosa.\n </p>\n <base-button\n class=\"mt-4 w-full\"\n @click=\"handleReload()\"\n >\n Aceptar\n </base-button>\n </div>\n </base-modal>\n <profile-account-ratings-modal\n :is-open=\"showRatingsModal\"\n :ratings=\"ratings\"\n @close=\"toggleRatingsModal\"\n />\n </div>\n </the-layout>\n</template>\n","<script setup lang=\"ts\">\n\ninterface Props {\n clientAccount: ClientAccount\n open: boolean\n}\n\ndefineProps<Props>();\n\nconst emit = defineEmits<{\n (e: 'close'): void\n}>();\n\nfunction closeModal() {\n emit('close');\n}\n</script>\n<template>\n <base-modal\n :open=\"open\"\n @close=\"closeModal\"\n >\n <div class=\"flex w-full flex-col items-center space-y-4\">\n <button\n type=\"button\"\n class=\"absolute self-end\"\n @click=\"closeModal\"\n >\n <img\n src=\"@/assets/icons/close.svg\"\n class=\"h-5 w-5\"\n >\n </button>\n <img\n v-if=\"clientAccount.pictureUrl\"\n :src=\"clientAccount.pictureUrl\"\n class=\"h-24 w-24 self-center rounded-full object-cover\"\n >\n <img\n v-else\n src=\"@/assets/icons/default-profile.svg\"\n class=\"h-24 w-24 rounded-full object-cover\"\n >\n <p class=\"text-lg font-bold text-z-gray-900\">\n {{ clientAccount.firstName }} {{ clientAccount.lastName }}\n </p>\n </div>\n </base-modal>\n</template>\n","<script setup lang=\"ts\">\nimport { inject, ref } from 'vue';\nimport { productBookingDeliveriesApi } from '@/api/product-booking-deliveries';\nimport { supportChatsApi } from '@/api/support-chats';\nimport profileProductBookingCard from './profile/profile-product-booking-card.vue';\n\ninterface Props {\n productBooking: ProductBooking\n open?: boolean\n skipAccept?: boolean\n}\n\nconst props = defineProps<Props>();\n\ndefineEmits<{\n (e: 'success'): void\n}>();\n\nconst user = inject<User>('user');\n\nconst picture = ref();\nconst loading = ref(false);\n\nconst showPictureUpload = ref(props.skipAccept);\nfunction togglePictureUpload() {\n showPictureUpload.value = !showPictureUpload.value;\n}\n\nconst showSuccess = ref(false);\nfunction toggleSuccess() {\n showSuccess.value = !showSuccess.value;\n}\nconst showNoPictureConfirmation = ref(false);\nfunction toggleNoPictureConfirmation() {\n showNoPictureConfirmation.value = !showNoPictureConfirmation.value;\n}\n\nfunction handleDeliver() {\n loading.value = true;\n productBookingDeliveriesApi.update(\n props.productBooking.productBookingDelivery?.id ?? 0, { status: 'complete' }, picture.value)\n .then(() => {\n toggleSuccess();\n loading.value = false;\n });\n}\n\nfunction handleContinue() {\n if (picture.value) {\n handleDeliver();\n } else {\n toggleNoPictureConfirmation();\n }\n}\n\nfunction handleSupportChat() {\n if (props.productBooking.supportChatId) {\n window.location.href = `/soporte/${props.productBooking.supportChatId}`;\n } else {\n const formValues = {\n productBookingId: props.productBooking.id,\n userId: user?.id ?? 0,\n };\n\n supportChatsApi.create(formValues)\n .then((res) => {\n window.location.href = `/soporte/${res.data.supportChat.id}`;\n });\n }\n}\n</script>\n<template>\n <base-modal\n :open=\"open\"\n >\n <div\n v-if=\"showSuccess\"\n class=\"flex w-full flex-col items-center\"\n >\n <img\n src=\"@/assets/icons/check-circle.svg\"\n class=\"w-20 self-center\"\n >\n <p class=\"mt-4 text-center font-medium text-z-gray-900\">\n Excelente!\n </p>\n <p class=\"mt-6 text-center text-z-gray-800\">\n Se ha completado la entrega del producto {{ productBooking.product.name }}\n </p>\n <base-button\n class=\"mt-4 w-full\"\n @click=\"$emit('success')\"\n >\n Aceptar\n </base-button>\n </div>\n <div\n v-else-if=\"showNoPictureConfirmation\"\n class=\"flex w-full flex-col items-center\"\n >\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"w-20 self-center\"\n >\n <p class=\"mt-4 text-center text-z-gray-900\">\n Zirkular te recomienda tomar una foto para respaldar el estado en que recibes el producto.\n </p>\n <base-button\n class=\"mt-3 w-full\"\n @click=\"toggleNoPictureConfirmation\"\n >\n Volver atrás\n </base-button>\n <base-button\n variant=\"secondary\"\n class=\"mt-3 w-full\"\n @click=\"handleDeliver\"\n >\n Continuar sin foto\n </base-button>\n </div>\n <div\n v-else-if=\"showPictureUpload\"\n class=\"flex w-full flex-col items-center\"\n >\n <p class=\"w-full font-bold text-z-gray-900\">\n Foto del producto\n </p>\n <p class=\"mt-2 text-sm text-z-gray-800\">\n Toma una foto del producto para que tengas respaldo de su estado.\n </p>\n <base-drag-and-drop\n v-model=\"picture\"\n name=\"picture\"\n class=\"mt-4 w-full\"\n wide\n />\n <base-button\n class=\"mt-4 w-full\"\n :disabled=\"loading\"\n @click=\"handleContinue\"\n >\n <img\n v-if=\"loading\"\n src=\"@/assets/icons/loading-alt.svg\"\n class=\"w-10 animate-spin-slow\"\n >\n <p v-else>\n Continuar\n </p>\n </base-button>\n </div>\n <div\n v-else\n class=\"flex w-full flex-col items-center\"\n >\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"w-24 \"\n >\n <p class=\"mt-2 font-bold text-z-gray-900\">\n Alerta de entrega\n </p>\n <p class=\"mt-2 text-center text-z-gray-800\">\n El socio ha comenzado el proceso de entrega.\n </p>\n <profile-product-booking-card\n :product-booking=\"productBooking\"\n account-type=\"client\"\n hide-tags\n />\n <p class=\"text-center text-z-gray-800\">\n Te recomendamos que revises el producto antes de aceptarlo.\n </p>\n <base-button\n class=\"mt-8 w-full\"\n size=\"sm\"\n @click=\"togglePictureUpload\"\n >\n Aceptar la entrega\n </base-button>\n <base-button\n class=\"mt-3 w-full\"\n variant=\"danger\"\n size=\"sm\"\n :href=\"`/perfil/solicitudes_reservas/${productBooking.id}/reportar`\"\n >\n Reportar\n </base-button>\n <base-button\n class=\"mt-3 w-full\"\n variant=\"danger\"\n size=\"sm\"\n @click=\"handleSupportChat\"\n >\n Contactar a soporte\n </base-button>\n </div>\n </base-modal>\n</template>\n","<script setup lang=\"ts\">\nimport { inject, ref } from 'vue';\nimport { supportChatsApi } from '@/api/support-chats';\nimport { productBookingReturnsApi } from '@/api/product-booking-returns';\nimport { convertKeys } from '@/utils/case-converter';\nimport { useActionCable } from '@/hooks/actioncable';\nimport profileProductBookingCard from './profile/profile-product-booking-card.vue';\n\ninterface Props {\n productBooking: ProductBooking\n open?: boolean\n skipAccept?: boolean\n}\n\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n (e: 'success'): void\n}>();\n\nconst user = inject<User>('user');\n\nconst automaticReturnMinutes = inject<number>('automaticReturnMinutes');\n\nconst CONDITION_OPTIONS = [\n { id: 'perfect', name: 'Buen estado' },\n { id: 'repair_needed', name: 'Daño reparable' },\n { id: 'damaged', name: 'Daño irreparable' },\n];\n\nconst condition = ref<'perfect'|'repair_needed'|'damaged'>();\n\nconst showSuccess = ref(false);\nfunction toggleSuccess() {\n showSuccess.value = !showSuccess.value;\n}\n\nfunction handleReturn() {\n if (condition.value === 'perfect') {\n productBookingReturnsApi.update(\n props.productBooking.productBookingReturn?.id ?? 0, { status: 'complete', condition: condition.value })\n .then(() => {\n toggleSuccess();\n });\n } else {\n productBookingReturnsApi.update(\n props.productBooking.productBookingReturn?.id ?? 0, { condition: condition.value })\n .then(() => {\n window.location.href = `/perfil/solicitudes_reservas/${props.productBooking.id}/reportar_daños`;\n });\n }\n}\n\nconst showConditionForm = ref(props.skipAccept);\nfunction toggleConditionForm() {\n showConditionForm.value = !showConditionForm.value;\n}\n\nfunction handleLocation() {\n emit('success');\n window.location.href = `/perfil/solicitudes_reservas/${props.productBooking.id}/ubicacion`;\n}\n\nconst omitGeolocation = ref(props.productBooking.productBookingReturn?.omitGeolocation);\n\nfunction handleOmit() {\n productBookingReturnsApi.update(props.productBooking.productBookingReturn?.id ?? 0, { omitGeolocation: true })\n .then(() => {\n omitGeolocation.value = true;\n })\n ;\n}\n\nfunction handleSupportChat() {\n if (props.productBooking.supportChatId) {\n window.location.href = `/soporte/${props.productBooking.supportChatId}`;\n } else {\n const formValues = {\n productBookingId: props.productBooking.id,\n userId: user?.id ?? 0,\n };\n\n supportChatsApi.create(formValues)\n .then((res) => {\n window.location.href = `/soporte/${res.data.supportChat.id}`;\n });\n }\n}\n\nconst automaticReturnComplete = ref(false);\nuseActionCable(\n { channel: 'AutomaticReturnChannel', id: props.productBooking.productBookingReturn?.id },\n {\n received(eventNewResource:Record<string, unknown>) {\n const automaticReturn = convertKeys(eventNewResource, 'camelize') as unknown as ProductBookingReturn;\n if (automaticReturn.status === 'complete') {\n automaticReturnComplete.value = true;\n toggleSuccess();\n }\n },\n },\n);\n</script>\n<template>\n <base-modal\n :open=\"open\"\n >\n <div\n v-if=\"showSuccess\"\n class=\"flex w-full flex-col items-center\"\n >\n <img\n src=\"@/assets/icons/check-circle.svg\"\n class=\"w-20 self-center\"\n >\n <p class=\"mt-4 text-center font-medium text-z-gray-900\">\n Excelente!\n </p>\n <p class=\"mt-6 text-center text-z-gray-800\">\n Se ha completado la devolución <span class=\"font-bold\">automática</span> del producto {{ productBooking.product.name }}\n </p>\n <base-button\n class=\"mt-4 w-full\"\n :href=\"`/perfil/solicitudes_reservas/${props.productBooking.id}/opiniones/crear`\"\n >\n Califica a {{ productBooking.clientAccount.firstName }}\n </base-button>\n </div>\n <div\n v-else-if=\"showConditionForm\"\n class=\"flex w-full flex-col items-center\"\n >\n <p class=\"w-full font-bold text-z-gray-900\">\n Estado del producto\n </p>\n <div class=\"mt-4 flex w-full flex-col space-y-4 rounded bg-z-turquoise-50 px-4 py-3\">\n <div\n v-for=\"conditionOption in CONDITION_OPTIONS\"\n :key=\"conditionOption.id\"\n class=\"relative flex space-x-3 text-z-gray-800\"\n >\n <v-field\n v-model=\"condition\"\n name=\"addressId\"\n type=\"radio\"\n :value=\"conditionOption.id\"\n class=\"peer mt-0.5 h-5 w-5 shrink-0 appearance-none rounded-full border-2 border-z-turquoise-600 checked:bg-z-turquoise-600\"\n />\n <img\n src=\"@/assets/icons/check.svg\"\n class=\"pointer-events-none absolute -left-2.5 top-[5px] w-[15px] opacity-0 peer-checked:opacity-100\"\n >\n <img\n src=\"@/assets/icons/check.svg\"\n class=\"pointer-events-none absolute left-[-9px] top-[5px] w-[15px] opacity-0 peer-checked:opacity-100\"\n >\n <div class=\"space-y-1\">\n <p class=\"line-clamp-1\">\n {{ conditionOption.name }}\n </p>\n </div>\n </div>\n </div>\n <base-button\n class=\"mt-4 w-full\"\n :disabled=\"!condition\"\n @click=\"handleReturn\"\n >\n Aceptar\n </base-button>\n </div>\n <div\n v-else-if=\"productBooking.productBookingReturn?.status === 'ongoing'\"\n class=\"flex w-full flex-col items-center\"\n >\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"w-24 \"\n >\n <p class=\"mt-2 font-bold text-z-gray-900\">\n Confirmar devolución\n </p>\n <profile-product-booking-card\n :product-booking=\"productBooking\"\n account-type=\"partner\"\n hide-tags\n />\n <p class=\"text-center text-sm text-z-gray-800\">\n Debes confirmar la devolución teniendo el producto en tu poder.\n Si no confirmas en {{ automaticReturnMinutes }} minutos, la devolución se considera conforme.\n </p>\n <base-button\n class=\"mt-8 w-full\"\n @click=\"toggleConditionForm\"\n >\n Confirmar devolución\n </base-button>\n <base-button\n class=\"mt-3 w-full\"\n variant=\"danger\"\n @click=\"handleSupportChat\"\n >\n Contactar a soporte\n </base-button>\n </div>\n <div\n v-else-if=\"productBooking.productBookingReturn?.status === 'awaiting_geolocation'\"\n class=\"flex w-full flex-col items-center\"\n >\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"w-24 \"\n >\n <p class=\"mt-2 font-bold text-z-gray-900\">\n Alerta de devolución\n </p>\n <p class=\"mt-2 text-center text-z-gray-800\">\n El cliente ha indicado que está en el punto de devolución.<br>\n Para continuar, confirma tu georreferencia en el mapa.<br>\n Si tienes problemas, contacta a soporte.\n </p>\n <base-button\n v-if=\"omitGeolocation\"\n class=\"mt-3 w-full\"\n disabled\n >\n Esperando al cliente...\n </base-button>\n <template v-else>\n <base-button\n class=\"mt-8 w-full\"\n size=\"sm\"\n @click=\"handleLocation\"\n >\n Ir al mapa y compartir ubicación\n </base-button>\n <base-button\n class=\"mt-3 w-full\"\n variant=\"secondary\"\n size=\"sm\"\n @click=\"handleOmit\"\n >\n Continuar sin georreferencia\n </base-button>\n <base-button\n class=\"mt-3 w-full\"\n variant=\"secondary\"\n size=\"sm\"\n @click=\"handleSupportChat\"\n >\n Contactar a soporte\n </base-button>\n </template>\n </div>\n </base-modal>\n</template>\n","<script setup lang=\"ts\">\nimport { camelCase } from 'lodash';\nimport { computed, inject, ref } from 'vue';\nimport { format } from 'date-fns';\nimport { currency } from '@/utils/currency';\nimport { dateDiffInDays } from '@/utils/date-diff-in-days';\nimport partnerDetailsModal from '../partner-details-modal.vue';\nimport clientDetailsModal from '../client-details-modal.vue';\nimport beginDeliveryModal from '../begin-delivery-modal.vue';\nimport beginReturnModal from '../begin-return-modal.vue';\nimport newDeliveryModal from '../new-delivery-modal.vue';\nimport newReturnModal from '../new-return-modal.vue';\n\ninterface Props {\n productBooking: ProductBooking;\n approvalTimeLimit: number,\n paymentTimeLimit: number,\n paidTimeLimit: number,\n deliveryToday: boolean,\n returnToday: boolean,\n}\n\nconst props = defineProps<Props>();\n\nconst user = inject<User>('user');\n\nconst userType = computed(() =>\n (props.productBooking.partnerAccount.id === user?.partnerAccountId ? 'partner' : 'client'),\n);\n\nconst otherUserType = computed(() => (userType.value === 'partner' ? 'client' : 'partner'));\n\nconst selectedPictureUrl = ref(props.productBooking.productPictures[0].picture.webpMd.url);\n\nconst showAddress = computed(() => ['paid', 'delivered', 'complete'].includes(props.productBooking.currentStatus));\n\nfunction setSelectedPictureUrl(pictureUrl: string) {\n selectedPictureUrl.value = pictureUrl;\n}\n\nfunction handleBack() {\n window.history.back();\n}\n\nconst blocksNumber = computed(() =>\n dateDiffInDays(new Date(props.productBooking.startDate), new Date(props.productBooking.endDate)) + 1,\n);\n\nconst showPartnerDetailsModal = ref(false);\nfunction togglePartnerDetailsModal() {\n showPartnerDetailsModal.value = !showPartnerDetailsModal.value;\n}\n\nconst showClientDetailsModal = ref(false);\nfunction toggleClientDetailsModal() {\n showClientDetailsModal.value = !showClientDetailsModal.value;\n}\n\nconst showBeginDeliveryModal = ref(false);\nfunction toggleBeginDeliveryModal() {\n showBeginDeliveryModal.value = !showBeginDeliveryModal.value;\n}\n\nconst showBeginReturnModal = ref(false);\nfunction toggleBeginReturnModal() {\n showBeginReturnModal.value = !showBeginReturnModal.value;\n}\n\nfunction handleViewMore() {\n if (otherUserType.value === 'partner') {\n togglePartnerDetailsModal();\n } else {\n toggleClientDetailsModal();\n }\n}\n\nconst showClientDeliveryModal = ref(false);\nfunction toggleClientDeliveryModal() {\n showClientDeliveryModal.value = !showClientDeliveryModal.value;\n}\n\nfunction handleClientDeliverySuccess() {\n window.location.href = '/perfil/solicitudes_reservas/cliente#entregados';\n}\n\nconst showPartnerReturnModal = ref(false);\nfunction togglePartnerReturnModal() {\n showPartnerReturnModal.value = !showPartnerReturnModal.value;\n}\n</script>\n<template>\n <the-layout\n :active-menu=\"3\"\n hide-navbar\n >\n <div class=\"relative bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n :title=\"`Reserva de ${productBooking.product.name}`\"\n class=\"md:rounded\"\n @back=\"handleBack\"\n />\n <div\n class=\"mb-32 divide-y-2 divide-z-gray-100\"\n >\n <div class=\"flex w-full flex-col px-6 py-4\">\n <p class=\"w-fit self-end rounded bg-z-turquoise-50 px-2 py-0.5 text-sm text-z-turquoise-600\">\n {{ $t(`productBooking.status.${camelCase(productBooking.currentStatus)}`) }}\n </p>\n <base-tip\n v-if=\"deliveryToday && productBooking.productBookingDelivery?.status !== 'complete'\"\n title=\"Hoy es la entrega\"\n variant=\"bold\"\n class=\"mt-3\"\n >\n {{ userType === 'partner' ?\n 'Hoy debes realizar la entrega de este producto.' :\n 'Hoy será la entrega de este producto.' }}\n </base-tip>\n <base-tip\n v-if=\"returnToday && !['complete', 'reported'].includes(productBooking.productBookingReturn?.status ?? '')\"\n title=\"Hoy es la devolución\"\n variant=\"bold\"\n class=\"mt-3\"\n >\n {{ userType === 'partner' ?\n 'Hoy es la devolución de este producto.' :\n 'No olvides que hoy debes devolver el producto.' }}\n </base-tip>\n <div class=\"mt-3 flex justify-between rounded-lg bg-z-yellow-50 px-4 py-3 text-xs font-medium text-z-gray-900\">\n <p>Desde: <span class=\"font-normal text-z-gray-800\">{{ format(new Date(productBooking.startDate), 'dd/MM/yy') }}</span></p>\n <p>Hasta: <span class=\"font-normal text-z-gray-800\">{{ format(new Date(productBooking.endDate), 'dd/MM/yy') }}</span></p>\n </div>\n <img\n :src=\"selectedPictureUrl\"\n class=\"mt-3 aspect-square w-full rounded-lg object-cover\"\n >\n <div class=\"mt-4 flex gap-4 overflow-x-scroll scrollbar-hide\">\n <button\n v-for=\"picture in productBooking.productPictures\"\n :key=\"picture.id\"\n type=\"button\"\n class=\"aspect-square w-full shrink-0 basis-[30%]\"\n @click=\"setSelectedPictureUrl(picture.picture.webpMd.url)\"\n >\n <img\n :src=\"picture.picture.webpSm.url\"\n class=\"aspect-square w-full rounded-lg object-cover\"\n >\n </button>\n </div>\n <p class=\"mt-4 font-medium\">\n {{ productBooking.product.name }}\n </p>\n </div>\n <div class=\"px-6 py-4 text-z-gray-900\">\n <p class=\"font-bold\">\n Información del precio\n </p>\n <div class=\"mt-4 flex justify-between\">\n <p class=\"font-medium\">\n {{ currency(productBooking.product.dailyPrice) }} x\n {{ blocksNumber }} {{ blocksNumber > 1 ? 'días' : 'día' }}\n </p>\n <p>\n {{ currency(productBooking.amount) }}\n </p>\n </div>\n <div class=\"mt-1 flex justify-between\">\n <p>\n Garantía\n </p>\n <p>\n {{ currency(productBooking.depositAmount) }}\n </p>\n </div>\n <div\n v-if=\"userType === 'client'\"\n class=\"mt-1 flex justify-between\"\n >\n <p>\n Costo por servicio\n </p>\n <p>\n {{ currency(productBooking.serviceCost) }}\n </p>\n </div>\n </div>\n\n <div class=\"px-6 py-4\">\n <div class=\"flex items-start gap-2 rounded-lg bg-z-turquoise-50 p-3\">\n <img src=\"@/assets/icons/chat-active.svg\">\n <a\n class=\"flex flex-col\"\n :href=\"`/chats/${productBooking.chatId}`\"\n >\n <p class=\"font-medium text-z-gray-900\">\n Envía un mensaje al {{ $t(`accounts.${otherUserType}`).toLowerCase() }}\n </p>\n <p class=\"text-z-gray-800\">\n {{ productBooking[`${otherUserType}Account`].firstName }}\n </p>\n </a>\n </div>\n </div>\n <div class=\"flex w-full justify-between px-6 py-4\">\n <div class=\"flex flex-col\">\n <p class=\"font-bold text-z-gray-900\">\n {{ $t(`accounts.${otherUserType}`) }}: {{ productBooking[`${otherUserType}Account`].firstName }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-800\">\n Acerca del {{ $t(`accounts.${otherUserType}`).toLowerCase() }}\n </p>\n <button\n class=\"w-fit text-z-gray-900 underline\"\n @click=\"handleViewMore\"\n >\n Ver más\n </button>\n </div>\n <img\n :src=\"productBooking[`${otherUserType}Account`].pictureUrl\"\n class=\"aspect-square size-10 rounded-full\"\n >\n </div>\n <div class=\"flex w-full flex-col px-6 py-4\">\n <p class=\"font-bold text-z-gray-900\">\n Entrega\n </p>\n <p class=\"mt-4 font-medium text-z-gray-800\">\n Tipo de entrega\n </p>\n <p class=\"text-z-gray-900\">\n {{ $t(`product.shippingMethod.${userType}Account.${camelCase(productBooking.shippingMethod)}`) }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-800\">\n Dirección\n </p>\n <p\n v-if=\"showAddress || userType === 'partner'\"\n class=\"text-z-gray-900\"\n >\n {{ productBooking.address?.displayName }}\n </p>\n <p\n v-else\n class=\"text-z-gray-900\"\n >\n Podrás ver la dirección exacta una vez esté confirmada la reserva.\n </p>\n </div>\n <div\n class=\"px-6 pb-6 pt-4 text-z-gray-900\"\n >\n <p class=\"font-bold text-z-gray-900\">\n Descripción\n </p>\n <p class=\"mt-4 italic text-z-gray-900\">\n {{ productBooking.product.description }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Categoría\n </p>\n <p\n class=\"flex text-z-gray-800\"\n >\n {{ productBooking.product.category.name }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Subcategoría\n </p>\n <p\n class=\"flex text-z-gray-800\"\n >\n {{ productBooking.product.subcategory.name }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Marca\n </p>\n <p\n class=\"flex text-z-gray-800\"\n >\n {{ productBooking.product.brand }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Modelo\n </p>\n <p\n class=\"flex text-z-gray-800\"\n >\n {{ productBooking.product.model }}\n </p>\n <p class=\"mt-4 font-medium text-z-gray-900\">\n Peso\n </p>\n <p\n class=\"flex text-z-gray-800\"\n >\n {{ $t(`product.weight.${camelCase(productBooking.product.weight)}`) }}\n </p>\n </div>\n </div>\n <template v-if=\"productBooking.productBookingReports.length === 0 && !productBooking.canceled\">\n <div\n v-if=\"userType === 'partner' && productBooking.currentStatus === 'paid'\"\n class=\"fixed bottom-16 flex w-full flex-col space-y-3 border-t border-z-gray-200 bg-white px-6 py-4 md:bottom-0\"\n >\n <base-button\n v-if=\"!productBooking.productBookingDelivery\"\n @click=\"toggleBeginDeliveryModal\"\n >\n Realizar la entrega\n </base-button>\n <base-button\n v-else\n disabled\n >\n Esperando al cliente\n </base-button>\n <base-button\n variant=\"danger\"\n :href=\"`/perfil/solicitudes_reservas/${productBooking.id}/reportar`\"\n >\n Reportar\n </base-button>\n </div>\n <div\n v-if=\"userType === 'client' && productBooking.productBookingDelivery?.status === 'ongoing'\"\n class=\"fixed bottom-16 flex w-full flex-col space-y-3 border-t border-z-gray-200 bg-white px-6 py-4 md:bottom-0\"\n >\n <base-button\n @click=\"toggleClientDeliveryModal\"\n >\n Aceptar la entrega\n </base-button>\n <base-button\n variant=\"danger\"\n :href=\"`/perfil/solicitudes_reservas/${productBooking.id}/reportar`\"\n >\n Reportar\n </base-button>\n </div>\n <div\n v-if=\"userType === 'client' && productBooking.currentStatus === 'delivered'\"\n class=\"fixed bottom-16 flex w-full flex-col space-y-3 border-t border-z-gray-200 bg-white px-6 py-4 md:bottom-0\"\n >\n <base-button\n v-if=\"!productBooking.productBookingReturn\"\n @click=\"toggleBeginReturnModal\"\n >\n Realizar la devolución\n </base-button>\n <base-button\n v-else\n disabled\n >\n Esperando al socio\n </base-button>\n </div>\n <div\n v-if=\"userType === 'partner' && productBooking.productBookingReturn?.status === 'ongoing'\"\n class=\"fixed bottom-16 flex w-full flex-col space-y-3 border-t border-z-gray-200 bg-white px-6 py-4 md:bottom-0\"\n >\n <base-button\n @click=\"togglePartnerReturnModal\"\n >\n Realizar la devolución\n </base-button>\n </div>\n </template>\n </div>\n <partner-details-modal\n v-if=\"showPartnerDetailsModal\"\n :open=\"showPartnerDetailsModal\"\n :partner-account=\"productBooking.partnerAccount\"\n @close=\"togglePartnerDetailsModal\"\n />\n <client-details-modal\n v-if=\"showClientDetailsModal\"\n :open=\"showClientDetailsModal\"\n :client-account=\"productBooking.clientAccount\"\n @close=\"toggleClientDetailsModal\"\n />\n <begin-delivery-modal\n v-if=\"showBeginDeliveryModal\"\n :open=\"showBeginDeliveryModal\"\n :product-booking-id=\"productBooking.id\"\n :chat-id=\"productBooking.chatId\"\n @close=\"toggleBeginDeliveryModal\"\n />\n <begin-return-modal\n v-if=\"showBeginReturnModal\"\n :open=\"showBeginReturnModal\"\n :product-booking-id=\"productBooking.id\"\n :chat-id=\"productBooking.chatId\"\n :address=\"productBooking.address as AddressData\"\n @close=\"toggleBeginReturnModal\"\n />\n <new-delivery-modal\n v-if=\"showClientDeliveryModal\"\n :product-booking=\"productBooking\"\n :open=\"showClientDeliveryModal\"\n skip-accept\n @success=\"handleClientDeliverySuccess\"\n />\n <new-return-modal\n v-if=\"showPartnerReturnModal\"\n :product-booking=\"productBooking\"\n :open=\"showPartnerReturnModal\"\n skip-accept\n />\n </the-layout>\n</template>\n","import { api } from './index';\n\nexport const productBookingReportsApi = {\n create(data: Partial<ProductBookingReport>, pictures?: File[]) {\n const path = '/api/internal/product_booking_reports';\n\n return api({\n method: 'post',\n headers: {\n 'Content-Type': 'multipart/form-data',\n },\n url: path,\n data: { ...data, pictures },\n }).then(response => response.data.productBookingReport as ProductBookingReport);\n },\n};\n","<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport { productBookingReportsApi } from '@/api/product-booking-reports';\nimport successModal from '../success-modal.vue';\n\ninterface Props {\n productBooking: ProductBooking\n reportedBy: 'client' | 'partner'\n reportStatus: 'paid' | 'delivered'\n}\n\nconst props = defineProps<Props>();\n\nfunction handleBack() {\n window.history.back();\n}\n\nconst ALL_REASON_OPTIONS = {\n client: {\n paid: [\n { name: 'Mal estado del producto', pictureForm: true },\n { name: 'No es el producto que solicité', pictureForm: true },\n ],\n delivered: [],\n },\n partner: {\n paid: [\n { name: 'Cliente no llegó', pictureForm: false },\n ],\n delivered: [\n { name: 'Cliente no está en el lugar', pictureForm: false },\n { name: 'Cliente llegó pero no devolvió el artículo', pictureForm: false },\n ],\n },\n};\n\nconst reasonOptions = computed(() =>\n ALL_REASON_OPTIONS[props.reportedBy][props.reportStatus].map((reason) => ({ id: reason.name, ...reason })),\n);\n\nconst selectedReason = ref();\nconst comment = ref();\n\nconst showPictureForm = computed(() => reasonOptions.value.find(\n (reason) => reason.id === selectedReason.value)?.pictureForm,\n);\n\nconst showSuccessModal = ref(false);\nfunction toggleSuccessModal() {\n showSuccessModal.value = !showSuccessModal.value;\n}\n\nconst pictures = ref<File[]>([]);\n\nconst nonNullPictures = computed(() => pictures.value.filter(el => el !== null && el !== undefined));\n\nconst loading = ref(false);\n\nfunction createReport() {\n const formValues = {\n productBookingId: props.productBooking.id,\n reportedBy: props.reportedBy,\n reason: selectedReason.value,\n comment: comment.value,\n reportType: 'normal',\n } as Partial<ProductBookingReport>;\n\n loading.value = true;\n productBookingReportsApi.create(formValues, nonNullPictures.value)\n .then(() => {\n loading.value = false;\n toggleSuccessModal();\n });\n}\n\nfunction handleSuccess() {\n const account = props.reportedBy === 'client' ? 'cliente' : 'socio';\n const bookingTab = { paid: 'reservados', delivered: 'entregados', complete: 'completados' };\n window.location.href = `/perfil/solicitudes_reservas/${account}#${bookingTab[props.reportStatus]}`;\n}\n\nwatch(showPictureForm, (newVal) => {\n if (!newVal) {\n pictures.value = [];\n }\n});\n</script>\n<template>\n <div\n class=\"md:mx-auto md:my-6 md:max-w-md md:rounded md:bg-white\"\n >\n <the-titlebar\n title=\"Reportar\"\n class=\"md:rounded\"\n @back=\"handleBack\"\n />\n <div class=\"space-y-4 px-6 py-4\">\n <p class=\"font-semibold text-z-gray-900\">\n {{ productBooking.product.name }}\n </p>\n <base-select\n v-model=\"selectedReason\"\n name=\"reason\"\n label=\"Motivo del reporte\"\n hide-label\n :options=\"reasonOptions\"\n placeholder=\"Motivo del reporte\"\n required\n overflow=\"wrap\"\n />\n <base-input\n v-model=\"comment\"\n name=\"comment\"\n type=\"textarea\"\n label=\"Comentario adicional\"\n placeholder=\"Comentario adicional\"\n />\n </div>\n <div\n v-if=\"showPictureForm\"\n class=\"mb-24 px-6\"\n >\n <p class=\"font-medium text-z-gray-900\">\n Fotos del producto\n </p>\n <p class=\"text-sm text-z-gray-800\">\n Toma como mínimo 3 fotos para poder analizar de forma correcta el daño\n </p>\n <base-drag-and-drop\n v-for=\"i in [0,1,2]\"\n :key=\"i\"\n v-model=\"pictures[i]\"\n label=\"Foto de referencia\"\n hide-label\n name=\"picture\"\n max=\"1\"\n wide\n class=\"mt-4\"\n />\n </div>\n <div class=\"fixed bottom-0 w-full border-t bg-white px-6 py-4\">\n <base-button\n class=\"w-full\"\n :disabled=\"!selectedReason || (showPictureForm && nonNullPictures.length !== 3) || loading\"\n @click=\"createReport\"\n >\n <img\n v-if=\"loading\"\n src=\"@/assets/icons/loading-alt.svg\"\n class=\"w-10 animate-spin-slow\"\n >\n <p v-else>\n Enviar\n </p>\n </base-button>\n </div>\n </div>\n <success-modal\n :open=\"showSuccessModal\"\n title=\"Excelente!\"\n description=\"Se ha reportado esta situación al equipo Zirkular y se ha notificado al usuario.\"\n @confirm=\"handleSuccess\"\n />\n</template>\n","function elementToSelectOption(element:string|number) {\n return { id: element, name: element.toString() };\n}\n\nfunction arrayToSelectOption(array: string[]|number[]) {\n return array.map((elem) => elementToSelectOption(elem));\n}\n\nexport { elementToSelectOption, arrayToSelectOption };\n","<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\nimport { productBookingReportsApi } from '@/api/product-booking-reports';\nimport { arrayToSelectOption } from '@/utils/select-option-tools';\nimport successModal from '../success-modal.vue';\n\ninterface Props {\n productBooking: ProductBooking\n}\n\nconst props = defineProps<Props>();\n\nfunction handleBack() {\n window.history.back();\n}\n\nconst damageOptions = arrayToSelectOption([\n 'Faltan partes o piezas',\n 'Está roto',\n 'Falla de funcionamiento',\n 'Otros',\n]);\n\nconst selectedDamage = ref();\nconst comment = ref();\n\nconst showSuccessModal = ref(false);\nfunction toggleSuccessModal() {\n showSuccessModal.value = !showSuccessModal.value;\n}\n\nconst pictures = ref<File[]>([]);\n\nconst nonNullPictures = computed(() => pictures.value.filter(el => el !== null && el !== undefined));\n\nfunction handleSuccess() {\n window.location.href = `/perfil/solicitudes_reservas/${props.productBooking.id}/opiniones/crear`;\n}\n\nfunction createReport() {\n const formValues = {\n productBookingId: props.productBooking.id,\n reportedBy: 'partner',\n reason: selectedDamage.value,\n comment: comment.value,\n reportType: 'damage',\n } as Partial<ProductBookingReport>;\n\n productBookingReportsApi.create(formValues, nonNullPictures.value)\n .then(() => {\n toggleSuccessModal();\n });\n}\n\n</script>\n<template>\n <div\n class=\"md:mx-auto md:my-6 md:max-w-md md:rounded md:bg-white\"\n >\n <the-titlebar\n title=\"Reportar devolución con daños\"\n class=\"md:rounded\"\n @back=\"handleBack\"\n />\n <div class=\"space-y-4 px-6 py-4\">\n <p class=\"font-semibold text-z-gray-900\">\n {{ productBooking.product.name }}\n </p>\n <base-select\n v-model=\"selectedDamage\"\n name=\"reason\"\n label=\"Estado del producto\"\n hide-label\n :options=\"damageOptions\"\n placeholder=\"Estado del producto\"\n required\n overflow=\"wrap\"\n />\n <base-input\n v-model=\"comment\"\n name=\"comment\"\n type=\"textarea\"\n label=\"Comentario adicional\"\n placeholder=\"Comentario adicional\"\n />\n </div>\n <div\n class=\"mb-24 px-6\"\n >\n <p class=\"font-medium text-z-gray-900\">\n Fotos del producto\n </p>\n <p class=\"text-sm text-z-gray-800\">\n Toma como mínimo 3 fotos para poder analizar de forma correcta el daño\n </p>\n <base-drag-and-drop\n v-for=\"i in [0,1,2]\"\n :key=\"i\"\n v-model=\"pictures[i]\"\n label=\"Foto de referencia\"\n hide-label\n name=\"picture\"\n max=\"1\"\n wide\n class=\"mt-4\"\n />\n </div>\n <div class=\"fixed bottom-0 w-full border-t bg-white px-6 py-4\">\n <base-button\n class=\"w-full\"\n :disabled=\"!selectedDamage || nonNullPictures.length !== 3\"\n @click=\"createReport\"\n >\n Finalizar devolución\n </base-button>\n </div>\n </div>\n <success-modal\n :open=\"showSuccessModal\"\n title=\"Devolución finalizada\"\n description=\"Enviaremos el reporte de daños al cliente y resolveremos tu garantía a la brevedad.\"\n :button-label=\"`Califica a ${productBooking.clientAccount.firstName}`\"\n @confirm=\"handleSuccess\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { productBookingReturnsApi } from '@/api/product-booking-returns';\nimport { ref } from 'vue';\n\ninterface Props {\n open: boolean;\n productBookingReturnId:number;\n chatId:number;\n}\nconst props = defineProps<Props>();\n\nconst picture = ref();\n\nconst loading = ref(false);\n\nconst showAwaitingMessage = ref(false);\n\nconst showNoPictureConfirmation = ref(false);\nfunction toggleNoPictureConfirmation() {\n showNoPictureConfirmation.value = !showNoPictureConfirmation.value;\n}\n\nfunction handleReturn() {\n loading.value = true;\n productBookingReturnsApi.update(\n props.productBookingReturnId, { status: 'ongoing' }, picture.value)\n .then(() => {\n showAwaitingMessage.value = true;\n loading.value = false;\n });\n}\n\nfunction handleContinue() {\n if (picture.value) {\n handleReturn();\n } else {\n toggleNoPictureConfirmation();\n }\n}\n</script>\n<template>\n <base-modal\n :open=\"open\"\n >\n <div\n v-if=\"showAwaitingMessage\"\n class=\"flex w-full flex-col items-center\"\n >\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"w-24 \"\n >\n <p class=\"mt-2 font-bold text-z-gray-900\">\n A la espera del socio\n </p>\n <p class=\"mt-2 text-center text-z-gray-800\">\n Para que se complete la devolución, el socio debe confirmar el estado y conformidad del producto.\n </p>\n <base-button\n class=\"mt-8 w-full\"\n :href=\"`/chats/${chatId}`\"\n >\n Ir al chat\n </base-button>\n </div>\n <div\n v-else-if=\"showNoPictureConfirmation\"\n class=\"flex w-full flex-col items-center\"\n >\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"w-20 self-center\"\n >\n <p class=\"mt-4 text-center text-z-gray-900\">\n Zirkular te recomienda tomar una foto para respaldar tu devolución y el estado en que devuelves el producto.\n </p>\n <base-button\n class=\"mt-3 w-full\"\n @click=\"toggleNoPictureConfirmation\"\n >\n Volver atrás\n </base-button>\n <base-button\n variant=\"secondary\"\n class=\"mt-3 w-full\"\n @click=\"handleReturn\"\n >\n Continuar sin foto\n </base-button>\n </div>\n <div\n v-else\n class=\"flex w-full flex-col items-center\"\n >\n <p class=\"w-full font-bold text-z-gray-900\">\n Foto del producto\n </p>\n <p class=\"mt-2 text-sm text-z-gray-800\">\n Toma una foto del producto para confirmar el estado del producto devuelto.\n </p>\n <base-drag-and-drop\n v-model=\"picture\"\n name=\"picture\"\n class=\"mt-4 w-full\"\n wide\n />\n <base-button\n class=\"mt-4 w-full\"\n :disabled=\"loading\"\n @click=\"handleContinue\"\n >\n <img\n v-if=\"loading\"\n src=\"@/assets/icons/loading-alt.svg\"\n class=\"w-10 animate-spin-slow\"\n >\n <p v-else>\n Continuar\n </p>\n </base-button>\n </div>\n </base-modal>\n</template>\n","<script setup lang=\"ts\">\nimport { productBookingsApi } from '@/api/product-bookings';\nimport { productBookingReturnsApi } from '@/api/product-booking-returns';\nimport locationRedIcon from '@/assets/icons/location-red.svg';\nimport defaultProfileIcon from '@/assets/icons/default-profile.svg';\nimport { useActionCable } from '@/hooks/actioncable';\nimport { convertKeys } from '@/utils/case-converter';\nimport { geodistance } from '@/utils/geodistance';\n\nimport { computed, inject, onMounted, ref, watch } from 'vue';\nimport continueReturnModal from './continue-return-modal.vue';\n\ninterface UserLocationUpdate {\n location: google.maps.LatLngLiteral\n userType: 'client' | 'partner'\n}\n\ninterface UserLocationChannelValue {\n type: 'location_update' | 'omit_geolocation'\n data: UserLocationUpdate | boolean\n}\n\ninterface Props {\n productBooking: ProductBooking\n}\n\nconst props = defineProps<Props>();\nconst user = inject<User>('user');\n\ndefineEmits<{\n (e: 'close'): void\n}>();\n\nconst map = ref(null);\nconst mapOptions = {\n styles: [\n {\n 'featureType': 'administrative.land_parcel',\n 'elementType': 'labels',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi',\n 'elementType': 'labels.text',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.attraction',\n 'elementType': 'labels.icon',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.business',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.medical',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.park',\n 'elementType': 'labels.icon',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.place_of_worship',\n 'elementType': 'labels.icon',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.school',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'poi.sports_complex',\n 'elementType': 'labels.icon',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n {\n 'featureType': 'road',\n 'elementType': 'labels.icon',\n 'stylers': [\n {\n 'visibility': 'on',\n },\n ],\n },\n {\n 'featureType': 'road.local',\n 'elementType': 'labels',\n 'stylers': [\n {\n 'visibility': 'on',\n },\n ],\n },\n {\n 'featureType': 'transit',\n 'stylers': [\n {\n 'visibility': 'off',\n },\n ],\n },\n ],\n disableDefaultUI: true,\n clickableIcons: false,\n\n};\n\nconst userType = computed(() =>\n (props.productBooking.partnerAccount.id === user?.partnerAccountId ? 'partner' : 'client'),\n);\n\nconst userPicture = computed(() => user?.picture.webpSm.url ?? defaultProfileIcon);\n\nconst otherUserType = computed(() => (userType.value === 'partner' ? 'client' : 'partner'));\n\nconst otherUserPicture = computed(() => {\n if (otherUserType.value === 'partner') {\n return props.productBooking.partnerAccount.pictureUrl ?? defaultProfileIcon;\n }\n\n return props.productBooking.clientAccount.pictureUrl ?? defaultProfileIcon;\n});\n\nconst userLocation = ref<google.maps.LatLngLiteral>();\nconst otherUserLocation = ref<google.maps.LatLngLiteral>();\nconst addressLocation = ref({\n lat: props.productBooking.address?.latitude,\n lng: props.productBooking.address?.longitude,\n});\n\nconst omitGeolocation = ref(props.productBooking.productBookingReturn?.omitGeolocation || false);\n\nconst distance = computed(() => {\n if (userLocation.value && otherUserLocation.value) {\n return geodistance(\n userLocation.value?.lat,\n userLocation.value?.lng,\n otherUserLocation.value?.lat,\n otherUserLocation.value?.lng,\n );\n }\n\n return null;\n});\n\nfunction updateBounds() {\n const bounds = new google.maps.LatLngBounds();\n if (otherUserLocation.value) bounds.extend(otherUserLocation.value);\n if (userLocation.value) bounds.extend(userLocation.value);\n if (addressLocation.value && (!otherUserLocation.value || !userLocation.value)) {\n bounds.extend(addressLocation.value as google.maps.LatLngLiteral);\n }\n map.value?.fitBounds(bounds);\n}\n\nconst loading = ref(false);\nconst locationError = ref(0);\n\nfunction updateLocation(position:GeolocationPosition) {\n loading.value = false;\n locationError.value = 0;\n userLocation.value = { lat: position.coords.latitude, lng: position.coords.longitude };\n let data = {};\n\n if (userType.value === 'client') {\n data = { clientLocation: userLocation.value };\n } else {\n data = { partnerLocation: userLocation.value };\n }\n if (!omitGeolocation.value) {\n productBookingsApi.update(props.productBooking.id, data);\n }\n}\n\nfunction handleLocationError(error:GeolocationPositionError) {\n locationError.value = error.code;\n loading.value = false;\n}\n\nfunction getUserLocation() {\n loading.value = true;\n navigator.geolocation.watchPosition(updateLocation, handleLocationError);\n}\n\nfunction getOtherUserLocation() {\n productBookingsApi.location(props.productBooking.id, otherUserType.value)\n .then((response) => {\n otherUserLocation.value = response;\n });\n}\n\nuseActionCable(\n { channel: 'UserLocationChannel', id: props.productBooking.id },\n {\n received(eventNewResource:Record<string, unknown>) {\n const newUserLocationChannelValue =\n convertKeys(eventNewResource, 'camelize') as unknown as UserLocationChannelValue;\n if (newUserLocationChannelValue.type === 'location_update') {\n const newLocationUpdate = newUserLocationChannelValue.data as UserLocationUpdate;\n\n if (newLocationUpdate.userType === otherUserType.value) {\n otherUserLocation.value = newLocationUpdate.location;\n }\n } else {\n omitGeolocation.value = newUserLocationChannelValue.data as boolean;\n }\n },\n },\n);\n\nonMounted(() => {\n getUserLocation();\n getOtherUserLocation();\n});\n\nwatch(userLocation, () => updateBounds());\nwatch(otherUserLocation, () => updateBounds());\n\nfunction handleBack() {\n window.history.back();\n}\n\nconst showContinueReturnModal = ref(false);\nfunction toggleContinueReturnModal() {\n showContinueReturnModal.value = !showContinueReturnModal.value;\n}\n\nfunction handleOmit() {\n productBookingReturnsApi.update(props.productBooking.productBookingReturn?.id ?? 0, { omitGeolocation: true })\n .then(() => {\n omitGeolocation.value = true;\n })\n ;\n}\n\n// eslint-disable-next-line no-magic-numbers\nconst distanceIsValid = computed(() => distance.value && distance.value <= 0.1);\nconst canContinueReturn = computed(() => distanceIsValid.value || omitGeolocation.value);\n</script>\n<template>\n <the-titlebar\n title=\"Mapa\"\n @back=\"handleBack\"\n />\n <div class=\"relative h-[calc(100vh-64px)] w-full overflow-y-hidden\">\n <GMapMap\n ref=\"map\"\n :center=\"addressLocation\"\n :zoom=\"14\"\n :options=\"mapOptions\"\n map-type-id=\"roadmap\"\n class=\"h-[calc(100%+24px)] w-full\"\n >\n <GMapMarker\n v-if=\"userLocation\"\n :position=\"userLocation\"\n :clickable=\"true\"\n :icon=\"{ url: userPicture, scaledSize: { width: 32, height: 32 } }\"\n />\n <GMapMarker\n v-if=\"otherUserLocation\"\n :position=\"otherUserLocation\"\n :clickable=\"true\"\n :icon=\"{ url: otherUserPicture, scaledSize: { width: 32, height: 32 } }\"\n />\n <GMapMarker\n :position=\"addressLocation\"\n :clickable=\"true\"\n :icon=\"{ url: locationRedIcon, scaledSize: { width: 32, height: 32 } }\"\n />\n </GMapMap>\n <div\n class=\"absolute bottom-0 w-full flex-col space-y-3 bg-white px-6 py-4\"\n >\n <p\n v-if=\"userType === 'client' && omitGeolocation\"\n class=\"text-center text-sm text-z-turquoise-700\"\n >\n El socio omitió la georreferencia\n </p>\n <p\n v-else-if=\"userType === 'client' && !distanceIsValid && !loading\"\n class=\"text-center text-xs text-z-cerise-600\"\n >\n Estás muy lejos para continuar la devolución\n </p>\n <base-button\n v-if=\"userType === 'client'\"\n class=\"w-full\"\n size=\"sm\"\n :disabled=\"!canContinueReturn\"\n @click=\"toggleContinueReturnModal\"\n >\n Continuar con la devolución\n </base-button>\n <div v-else>\n <p\n class=\"text-center text-sm text-z-gray-800\"\n >\n Esperando a que el cliente continúe la devolución...\n </p>\n <base-button\n v-if=\"!omitGeolocation\"\n variant=\"secondary\"\n size=\"sm\"\n class=\"mt-3 w-full\"\n @click=\"handleOmit\"\n >\n Omitir georreferenciación\n </base-button>\n </div>\n <base-button\n class=\"w-full\"\n size=\"sm\"\n variant=\"secondary\"\n :href=\"`/chats/${productBooking.chatId}`\"\n >\n Ir al chat\n </base-button>\n </div>\n <div class=\"absolute top-0 flex w-full flex-col px-6 py-4\">\n <div\n class=\"flex w-full items-center space-x-2 rounded bg-white p-2 shadow\"\n >\n <template v-if=\"loading\">\n <img\n src=\"@/assets/icons/loading.svg\"\n class=\"w-5 animate-spin-slow\"\n >\n <p class=\"text-xs text-z-gray-800\">\n Obteniendo ubicación...\n </p>\n </template>\n <template v-else-if=\"locationError\">\n <img\n src=\"@/assets/icons/warning.svg\"\n class=\"w-5\"\n >\n <p class=\"text-xs text-z-gray-800\">\n Tenemos problemas para acceder a tu ubicación\n </p>\n <button\n class=\"text-xs font-medium text-z-gray-800 underline underline-offset-2\"\n @click=\"getUserLocation\"\n >\n Reintentar\n </button>\n </template>\n <template v-else>\n <img\n src=\"@/assets/icons/location.svg\"\n class=\"w-5\"\n >\n <p class=\"text-xs text-z-gray-800\">\n Ubicación compartida con el {{ $t(`accounts.${otherUserType}`) }}\n </p>\n </template>\n </div>\n </div>\n </div>\n <continue-return-modal\n v-if=\"showContinueReturnModal && productBooking.productBookingReturn\"\n :open=\"showContinueReturnModal\"\n :product-booking-return-id=\"productBooking.productBookingReturn?.id\"\n :chat-id=\"productBooking.chatId\"\n />\n</template>\n","export default \"__VITE_ASSET__5fb1701c__\"","export default \"__VITE_ASSET__e696a03b__\"","export default \"__VITE_ASSET__8d66243c__\"","<script setup lang=\"ts\">\nimport { computed, inject, ref } from 'vue';\nimport starGoldImageUrl from '@/assets/icons/star-gold.svg';\nimport starEmptyImageUrl from '@/assets/icons/star-empty.svg';\nimport { userRatingsApi } from '@/api/user-ratings';\nimport successModal from './success-modal.vue';\n\ninterface Props {\n productBooking: ProductBooking\n}\n\nconst props = defineProps<Props>();\n\nconst user = inject<User>('user');\n\nconst receiver = computed(() => (\n props.productBooking.clientAccount.id === user?.clientAccountId ?\n { account: props.productBooking.partnerAccount, accountType: 'partner' } :\n { account: props.productBooking.clientAccount, accountType: 'client' }));\n\nconst stars = ref(0);\nconst description = ref();\nfunction setStars(value:number) {\n stars.value = value;\n}\n\nconst showSuccessModal = ref(false);\nfunction toggleSuccessModal() {\n showSuccessModal.value = !showSuccessModal.value;\n}\n\nfunction createRating() {\n const data = {\n stars: stars.value,\n description: description.value,\n senderId: user?.id,\n receiverId: receiver.value.account.userId,\n productBookingId: props.productBooking.id,\n };\n userRatingsApi.create(data).then(() => {\n toggleSuccessModal();\n });\n}\n\nfunction handleSuccess() {\n window.location.href = '/';\n}\n\n</script>\n<template>\n <the-titlebar :title=\"`Calificar al ${$t(`accounts.${receiver.accountType}`)}`\" />\n <div class=\"flex flex-col items-center space-y-4 px-6 py-4\">\n <img\n v-if=\"receiver.account.pictureUrl\"\n :src=\"receiver.account.pictureUrl\"\n class=\"h-24 w-24 self-center rounded-full object-cover\"\n >\n <img\n v-else\n src=\"@/assets/icons/user.svg\"\n class=\"h-24 w-24 self-center rounded-full border border-z-gray-200 bg-z-gray-100\"\n >\n <div class=\"flex justify-center space-x-2\">\n <button\n v-for=\"i in 5\"\n :key=\"i\"\n @click=\"setStars(i)\"\n >\n <img :src=\"i <= stars ? starGoldImageUrl : starEmptyImageUrl\">\n </button>\n </div>\n <p>\n Bríndale una opinión a {{ receiver.account.firstName }}\n </p>\n <base-input\n v-model=\"description\"\n placeholder=\"Comentario adicional\"\n label=\"Comentario adicional\"\n name=\"description\"\n type=\"textarea\"\n />\n <base-button\n class=\"w-full\"\n :disabled=\"stars === 0\"\n @click=\"createRating\"\n >\n Enviar opinión\n </base-button>\n <base-button\n class=\"w-full\"\n variant=\"secondary\"\n href=\"/\"\n >\n Omitir\n </base-button>\n <success-modal\n :open=\"showSuccessModal\"\n description=\"Se realizó de forma correcta\"\n @confirm=\"handleSuccess\"\n />\n </div>\n</template>\n","<script setup lang=\"ts\">\ninterface Props {\n productBookingReport: ProductBookingReport\n productName: string\n}\n\ndefineProps<Props>();\n\nfunction handleBack() {\n window.history.back();\n}\n</script>\n<template>\n <the-layout\n :active-menu=\"3\"\n hide-navbar\n >\n <the-titlebar\n title=\"Reporte de daños\"\n @back=\"handleBack\"\n />\n <div class=\"mb-16 flex w-full flex-col py-4\">\n <p class=\"px-6 font-semibold text-z-gray-900\">\n {{ productName }}\n </p>\n <div class=\"border-b px-6 py-4\">\n <p class=\"font-medium\">\n {{ productBookingReport.reportType === 'normal' ? 'Motivo del reporte' : 'Estado del producto' }}\n </p>\n <p class=\"mt-1 text-z-gray-800\">\n {{ productBookingReport.reason }}\n </p>\n <p class=\"mt-6 font-medium\">\n Comentario adicional\n </p>\n <p class=\"mt-1 text-z-gray-800\">\n {{ productBookingReport.comment ??\n `El ${$t(`accounts.${productBookingReport.reportedBy}`)} no dejó ningún comentario` }}\n </p>\n </div>\n <div class=\"px-6 py-4\">\n <p class=\"font-medium\">\n Fotos y videos\n </p>\n <div class=\"divide-y divide-z-gray-200\">\n <div\n v-for=\"picture in productBookingReport.reportPictures\"\n :key=\"picture.id\"\n class=\"py-4\"\n >\n <img\n\n :src=\"picture.picture.webpMd.url\"\n class=\"w-full rounded object-cover\"\n >\n </div>\n </div>\n </div>\n </div>\n <div class=\"fixed bottom-16 w-full border-t bg-white px-6 py-4\">\n <base-button\n class=\"w-full\"\n href=\"/\"\n >\n Aceptar\n </base-button>\n </div>\n </the-layout>\n</template>\n","export default \"__VITE_ASSET__b7b71533__\"","function scrollToTop() {\n window.scrollTo({ top: 0, behavior: 'instant' });\n}\n\nexport { scrollToTop };\n","import { api } from './index';\n\nfunction index(categoryId:number) {\n const path = `/api/internal/categories/${categoryId}/subcategories`;\n\n return api({\n method: 'get',\n url: path,\n });\n}\nexport { index };\n","<script setup lang=\"ts\">\nimport { useStore } from '@/store/store';\nimport { isEmpty } from 'lodash';\nimport { ref } from 'vue';\nimport { string, object } from 'yup';\n\ninterface Props {\n summaryMode?: boolean\n}\n\ndefineProps<Props>();\n\nconst emit = defineEmits<{\n (e: 'continue', value: string): void\n}>();\n\nconst store = useStore();\n\nconst name = ref(store.productFormData?.name ?? '');\n\nconst formRules = object().shape({\n name: string().required('Debes ingresar el nombre'),\n});\n\nfunction handleContinue() {\n emit('continue', name.value);\n}\n</script>\n<template>\n <p class=\"text-center text-lg font-medium leading-6 text-z-gray-800\">\n {{ $t('newProductForm.step1.description') }}\n </p>\n <v-form\n v-slot=\"{ meta, handleSubmit, errors }\"\n :validation-schema=\"formRules\"\n >\n <div class=\"flex flex-col space-y-6\">\n <div\n v-if=\"!isEmpty(errors) && meta.touched\"\n class=\"flex h-12 items-center justify-center rounded-lg bg-z-cerise-50 px-4 py-2 text-center text-sm text-z-red\"\n >\n Ingresa los datos para continuar\n </div>\n <base-input\n v-model=\"name\"\n name=\"name\"\n placeholder=\"Nombre del producto\"\n label=\"Nombre del producto\"\n :error=\"meta.touched && !!errors.name\"\n />\n <base-tip>\n {{ $t('newProductForm.step1.tip') }}\n </base-tip>\n <base-button\n class=\"fixed bottom-0 gap-2\"\n type=\"button\"\n @click=\"handleSubmit($event, handleContinue)\"\n >\n {{ summaryMode ? 'Ver resumen' : 'Continuar' }}\n <img src=\"@/assets/icons/arrow-small-right.svg\">\n </base-button>\n </div>\n </v-form>\n</template>\n","export default \"__VITE_ASSET__b3bad898__\"","export default \"__VITE_ASSET__b0f9c8cd__\"","<script setup lang=\"ts\">\nimport { addressesApi } from '@/api/addresses';\nimport { inject, ref } from 'vue';\n\ninterface Props {\n isOpen: boolean\n}\n\ndefineProps<Props>();\n\nconst emit = defineEmits<{\n (e: 'close'): void,\n (e: 'success'): void,\n}>();\n\nfunction closeModal() {\n emit('close');\n}\n\nconst user = inject<User>('user');\n\nconst alias = ref();\nconst place = ref<google.maps.places.PlaceResult>();\nconst errorEmpty = ref(false);\nconst error = ref(false);\nfunction createAddress() {\n if (place.value) {\n try {\n const addressData = {\n street: '',\n streetNumber: '',\n commune: '',\n city: '',\n region: '',\n latitude: 0.0,\n longitude: 0.0,\n alias: alias.value,\n };\n\n addressData.latitude = place.value.geometry?.location?.lat() ?? 0.0;\n addressData.longitude = place.value.geometry?.location?.lng() ?? 0.0;\n\n place.value.address_components?.forEach((addressComponent) => {\n switch (addressComponent.types[0]) {\n case 'street_number':\n addressData.streetNumber = addressComponent.long_name;\n break;\n case 'route':\n addressData.street = addressComponent.long_name;\n break;\n case 'locality':\n addressData.commune = addressComponent.long_name;\n break;\n case 'administrative_area_level_1':\n addressData.region = addressComponent.long_name;\n break;\n default:\n // Do nothing\n }\n });\n\n addressesApi.create({ ...addressData, userId: user?.id }).then(() => emit('success'));\n } catch (e) {\n error.value = true;\n }\n } else {\n errorEmpty.value = true;\n }\n}\n</script>\n<template>\n <base-modal\n :open=\"isOpen\"\n >\n <div class=\"flex w-full flex-col\">\n <div class=\"flex justify-between\">\n <p class=\"font-medium text-z-gray-900\">\n Agregar nueva dirección\n </p>\n <button\n type=\"button\"\n @click=\"closeModal\"\n >\n <img\n src=\"@/assets/icons/close.svg\"\n class=\"h-5 w-5\"\n >\n </button>\n </div>\n <div class=\"mt-6 space-y-4\">\n <base-input\n v-model=\"alias\"\n name=\"alias\"\n placeholder=\"Casa, oficina, etc. (opcional)\"\n label=\"Casa, oficina, etc. (opcional)\"\n />\n <base-google-autocomplete\n v-model=\"place\"\n name=\"place\"\n placeholder=\"Nueva dirección\"\n :error=\"errorEmpty\"\n />\n </div>\n <base-button\n class=\"mt-6\"\n type=\"button\"\n @click=\"createAddress\"\n >\n Agregar dirección\n </base-button>\n </div>\n </base-modal>\n</template>\n","<script setup lang=\"ts\">\nimport { isEmpty } from 'lodash';\nimport { computed, inject, onMounted, ref, watch } from 'vue';\nimport { array, string, object, number } from 'yup';\nimport { useStore } from '@/store/store';\nimport { addressesApi } from '@/api/addresses';\n// import truckIconUrl from '@/assets/icons/truck.svg';\nimport mapPinIconUrl from '@/assets/icons/map-pin.svg';\nimport NewProductAddressModal from './new-product-address-modal.vue';\n\ninterface Props {\n summaryMode?: boolean\n}\n\ndefineProps<Props>();\n\nconst emit = defineEmits<{\n (e: 'continue', value: { shippingMethodIds: string[], addressId: number }): void\n}>();\n\nconst shippingMethods = [\n // { id: 'partner_delivery', name: 'Tú entregas en la ubicación del cliente', icon: truckIconUrl },\n { id: 'client_pickup', name: 'El cliente debe retirar en tu dirección', icon: mapPinIconUrl },\n];\n\nconst store = useStore();\n\nconst user = inject<User>('user');\n\nconst addresses = ref<AddressData[]>();\n\nconst addressOptions = computed(() => addresses.value?.map((address) => (\n { id: address.id, name: address.displayName, alias: address.alias }\n)));\n\nconst shippingMethodIds = ref<string[]>(store.productFormData?.shippingMethodIds || []);\nconst addressId = ref(store.productFormData?.addressId || undefined);\n\nconst showAddressModal = ref(false);\nfunction toggleAddressModal() {\n showAddressModal.value = !showAddressModal.value;\n}\n\nconst formRules = object().shape({\n shippingMethodIds: array().min(1).of(string().required())\n .required(),\n addressId: number().required().moreThan(0),\n});\n\nfunction handleContinue() {\n const values = {\n shippingMethodIds: shippingMethodIds.value ?? 0,\n addressId: addressId.value ?? 0,\n };\n emit('continue', values);\n}\n\nfunction getAddresses() {\n addressesApi.index(user?.id ?? 0).then((response) => {\n addresses.value = response.data.addresses;\n });\n}\n\nonMounted(() => {\n getAddresses();\n});\n\nwatch(addresses, () => {\n if (addressId.value === undefined && addresses.value !== undefined) {\n addressId.value = addressOptions.value?.at(0)?.id;\n }\n});\n\nfunction handleNewAddress() {\n getAddresses();\n toggleAddressModal();\n}\n\nconst showErrors = ref(false);\nfunction handleInvalidSubmit() {\n showErrors.value = true;\n}\n\nfunction selectShippingMethod(shippingMethodId:string) {\n const idx = shippingMethodIds.value.findIndex((sm) => sm === shippingMethodId);\n\n if (idx === -1) {\n shippingMethodIds.value.push(shippingMethodId);\n } else {\n shippingMethodIds.value.splice(idx, 1);\n }\n}\n</script>\n<template>\n <p class=\"text-center text-lg font-medium leading-6 text-z-gray-800\">\n {{ $t('newProductForm.step2.description') }}\n </p>\n <v-form\n v-slot=\"{ handleSubmit, errors, meta }\"\n :validation-schema=\"formRules\"\n @invalid-submit=\"handleInvalidSubmit\"\n >\n <div class=\"mb-16 flex flex-col space-y-6 pb-3 md:mb-0\">\n <div\n v-if=\"!isEmpty(errors) && meta.touched && showErrors\"\n class=\"flex h-12 items-center justify-center rounded-lg bg-z-cerise-50 px-4 py-2 text-center text-sm text-z-red\"\n >\n Ingresa los datos para continuar\n </div>\n <div class=\"flex flex-col space-y-3.5\">\n <div\n v-for=\"shippingMethod in shippingMethods\"\n :key=\"shippingMethod.id\"\n class=\"flex flex-col space-y-2 rounded-lg bg-z-turquoise-50 p-4\"\n :class=\"{ 'border border-z-red': errors.shippingMethodIds && meta.touched && showErrors }\"\n >\n <div class=\"flex items-center space-x-2\">\n <div class=\"relative flex\">\n <v-field\n v-model=\"shippingMethodIds\"\n name=\"shippingMethodIds\"\n type=\"checkbox\"\n :value=\"shippingMethod.id\"\n class=\"peer h-5 w-5 shrink-0 appearance-none rounded-[3px] border-2 border-z-turquoise-600 bg-none checked:bg-z-turquoise-600\"\n />\n <img\n src=\"@/assets/icons/check.svg\"\n class=\"pointer-events-none absolute left-0 top-0 opacity-0 peer-checked:opacity-100\"\n >\n </div>\n <img :src=\"shippingMethod.icon\">\n <button\n type=\"button\"\n @click=\"selectShippingMethod(shippingMethod.id)\"\n >\n {{ shippingMethod.name }}\n </button>\n </div>\n </div>\n <div\n class=\"flex flex-col space-y-2 rounded-lg bg-z-gray-50 p-4\"\n >\n <div class=\"relative flex items-center space-x-2\">\n <div class=\"h-5 w-5 shrink-0 rounded-[3px] border-2 border-z-gray-600\" />\n <img src=\"@/assets/icons/truck.svg\">\n <p>Tú entregas en la ubicación del cliente <span class=\"text-sm italic text-z-gray-700\">(Próximamente)</span></p>\n </div>\n </div>\n </div>\n <!-- <base-tip>\n {{ $t('newProductForm.step2.tip') }}\n </base-tip> -->\n <div\n class=\"space-y-4 rounded bg-z-turquoise-50 px-4 py-3\"\n :class=\"{ 'border border-z-red': !!errors.addressId && meta.touched && showErrors }\"\n >\n <p class=\"font-medium text-z-gray-900\">\n {{ $t('newProductForm.step2.addressTitle') }}\n </p>\n <div class=\"flex flex-col space-y-4\">\n <div\n v-for=\"addressOption in addressOptions\"\n :key=\"addressOption.id\"\n class=\"relative flex space-x-3 text-z-gray-800\"\n >\n <v-field\n v-model=\"addressId\"\n name=\"addressId\"\n type=\"radio\"\n :value=\"addressOption.id\"\n class=\"peer mt-0.5 h-5 w-5 shrink-0 appearance-none rounded-full border-2 border-z-turquoise-600 checked:bg-z-turquoise-600\"\n />\n <img\n src=\"@/assets/icons/check.svg\"\n class=\"pointer-events-none absolute -left-2.5 top-[5px] w-[15px] opacity-0 peer-checked:opacity-100\"\n >\n <img\n src=\"@/assets/icons/check.svg\"\n class=\"pointer-events-none absolute left-[-9px] top-[5px] w-[15px] opacity-0 peer-checked:opacity-100\"\n >\n <div class=\"space-y-1\">\n <p\n v-if=\"addressOption.alias\"\n class=\"w-fit rounded bg-z-turquoise-100 p-2 text-xs text-z-turquoise-900\"\n >\n {{ addressOption.alias }}\n </p>\n <p class=\"line-clamp-1\">\n {{ addressOption.name }}\n </p>\n </div>\n </div>\n </div>\n <button\n type=\"button\"\n class=\"h-8 w-full rounded border border-z-turquoise-600 text-center text-sm text-z-turquoise-600\"\n @click=\"toggleAddressModal\"\n >\n Ingresar nueva dirección\n </button>\n </div>\n <base-tip :title=\"$t('newProductForm.step2.addressTipTitle')\">\n <template #icon>\n <img src=\"@/assets/icons/pin.svg\">\n </template>\n {{ $t('newProductForm.step2.addressTip') }}\n </base-tip>\n <base-button\n class=\"gap-2\"\n type=\"button\"\n @click=\"handleSubmit($event, handleContinue)\"\n >\n {{ summaryMode ? 'Ver resumen' : 'Continuar' }}\n <img src=\"@/assets/icons/arrow-small-right.svg\">\n </base-button>\n </div>\n </v-form>\n <new-product-address-modal\n :is-open=\"showAddressModal\"\n @close=\"toggleAddressModal\"\n @success=\"handleNewAddress\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { isEmpty } from 'lodash';\nimport { ref, watch, onMounted } from 'vue';\nimport { string, object, number } from 'yup';\nimport { useStore } from '@/store/store';\nimport * as subcategoriesApi from '../api/subcategories';\nimport type { ProductFormData } from '../api/products';\n\ninterface Props {\n categories: Category[];\n summaryMode?: boolean;\n}\n\ndefineProps<Props>();\n\nconst emit = defineEmits<{\n (e: 'continue', value: Partial<ProductFormData>): void\n}>();\n\nconst store = useStore();\n\nconst subcategories = ref([]);\nconst categoryId = ref(store.productFormData?.categoryId ?? 0);\nconst subcategoryId = ref(store.productFormData?.subcategoryId ?? 0);\nconst brand = ref(store.productFormData?.brand ?? '');\nconst model = ref(store.productFormData?.model ?? '');\nconst condition = ref(store.productFormData?.condition ?? '0');\nconst weight = ref(store.productFormData?.weight ?? '0');\n\nconst conditionOptions = [\n { id: 'is_new', name: 'Nuevo' },\n { id: 'like_new', name: 'Semi nuevo' },\n { id: 'used', name: 'Usado' },\n { id: 'very_used', name: 'Muy usado' },\n];\n\nconst weightOptions = [\n { id: 'lt5', name: 'Menos de 5 kg' },\n { id: 'gt5_lt10', name: 'Entre 5 y 10 kg' },\n { id: 'gt10_lt20', name: 'Entre 10 y 20 kg' },\n { id: 'gt20', name: 'Más de 20 kg' },\n];\n\nconst formRules = object().shape({\n brand: string().required(),\n model: string().optional(),\n condition: string().required('Debes seleccionar un estado')\n .oneOf(conditionOptions.map((el) => el.id), 'Debes seleccionar un estado'),\n subcategory: number().required('Debes seleccionar una subcategoría')\n .moreThan(0, 'Debes seleccionar una subcategoría'),\n category: number().required('Debes seleccionar una categoría')\n .moreThan(0, 'Debes seleccionar una categoría'),\n weight: string().required('Debes seleccionar un rango')\n .oneOf(weightOptions.map((el) => el.id), 'Debes seleccionar un rango'),\n});\n\nfunction handleContinue() {\n const formValues = {\n brand: brand.value,\n model: model.value,\n condition: condition.value,\n weight: weight.value,\n subcategoryId: subcategoryId.value,\n categoryId: categoryId.value,\n };\n\n emit('continue', formValues);\n}\n\nwatch(categoryId, (newVal) => {\n subcategoriesApi.index(newVal).then((response) => {\n subcategories.value = response.data.subcategories;\n subcategoryId.value = 0;\n });\n});\n\nonMounted(() => {\n if (categoryId.value !== 0) {\n subcategoriesApi.index(categoryId.value).then((response) => {\n subcategories.value = response.data.subcategories;\n });\n }\n});\n\n</script>\n<template>\n <p class=\"text-center text-lg font-medium leading-6 text-z-gray-800\">\n {{ $t('newProductForm.step3.description') }}\n </p>\n <v-form\n v-slot=\"{ meta, handleSubmit, errors }\"\n :validation-schema=\"formRules\"\n >\n <div class=\"mb-16 flex flex-col space-y-6 pb-4 md:mb-0\">\n <div\n v-if=\"!isEmpty(errors) && meta.touched\"\n class=\"flex h-12 items-center justify-center rounded-lg bg-z-cerise-50 px-4 py-2 text-center text-sm text-z-red\"\n >\n Ingresa los datos para continuar\n </div>\n <div class=\"flex flex-col space-y-4\">\n <base-select\n v-model=\"categoryId\"\n name=\"category\"\n label=\"Categoría\"\n hide-label\n :options=\"categories\"\n placeholder=\"Categoría\"\n required\n :error=\"!!errors.category && meta.touched\"\n />\n <base-select\n v-model=\"subcategoryId\"\n name=\"subcategory\"\n label=\"Subcategoría\"\n hide-label\n :options=\"subcategories\"\n placeholder=\"Subcategoría\"\n required\n :disabled=\"!categoryId\"\n :error=\"!!errors.subcategory && meta.touched\"\n />\n <base-input\n v-model=\"brand\"\n name=\"brand\"\n placeholder=\"Marca\"\n label=\"Marca\"\n :error=\"!!errors.brand && meta.touched\"\n />\n <base-input\n v-model=\"model\"\n name=\"model\"\n placeholder=\"Modelo\"\n label=\"Modelo\"\n :error=\"!!errors.model && meta.touched\"\n />\n <base-select\n v-model=\"condition\"\n name=\"condition\"\n label=\"Estado del producto\"\n hide-label\n :options=\"conditionOptions\"\n placeholder=\"Estado del producto\"\n required\n :error=\"!!errors.condition && meta.touched\"\n />\n <base-select\n v-model=\"weight\"\n name=\"weight\"\n label=\"Peso (kg)\"\n hide-label\n :options=\"weightOptions\"\n placeholder=\"Peso (kg)\"\n required\n :error=\"!!errors.weight && meta.touched\"\n />\n </div>\n <base-button\n class=\"justify-end gap-2\"\n type=\"button\"\n @click=\"handleSubmit($event, handleContinue)\"\n >\n {{ summaryMode ? 'Ver resumen' : 'Continuar' }}\n <img src=\"@/assets/icons/arrow-small-right.svg\">\n </base-button>\n </div>\n </v-form>\n</template>\n","export default \"__VITE_ASSET__94a7c73f__\"","export default \"__VITE_ASSET__6c762ffc__\"","export default \"__VITE_ASSET__3b5aec98__\"","export default \"__VITE_ASSET__7b3cfe66__\"","export default \"__VITE_ASSET__7de5dbba__\"","export default \"__VITE_ASSET__0b30581c__\"","<script setup lang=\"ts\">\ninterface Props {\n isOpen: boolean\n}\n\nconst emit = defineEmits<{\n (e: 'close'): void\n}>();\n\nfunction closeModal() {\n emit('close');\n}\n\ndefineProps<Props>();\n</script>\n<template>\n <base-modal\n :open=\"isOpen\"\n >\n <div class=\"flex flex-col\">\n <div class=\"flex justify-between\">\n <p class=\"font-bold text-z-gray-900\">\n ¿Cómo subir mis fotos?\n </p>\n <button\n type=\"button\"\n @click=\"closeModal\"\n >\n <img\n src=\"@/assets/icons/close.svg\"\n class=\"h-5 w-5\"\n >\n </button>\n </div>\n <div class=\"mt-8 max-h-[90%] flex-col space-y-6 overflow-y-scroll\">\n <div>\n <div class=\"grid grid-cols-2 gap-2\">\n <img src=\"@/assets/images/picture-modal/image1.png\">\n <img src=\"@/assets/images/picture-modal/image2.png\">\n </div>\n <p class=\"mt-2 font-medium text-z-gray-900\">\n La foto principal\n </p>\n <p class=\"mt-2 text-sm text-z-gray-800\">\n La foto debe ser lo más clara posible y sin ningún tipo de objeto que distraiga la vista.\n <br>\n Si vas a utilizar un fondo no olvides que el producto sigue siendo lo más importante.\n </p>\n </div>\n <div>\n <div class=\"grid grid-cols-2 gap-2\">\n <img src=\"@/assets/images/picture-modal/image3.png\">\n <img src=\"@/assets/images/picture-modal/image4.png\">\n </div>\n <p class=\"mt-2 font-medium text-z-gray-900\">\n La marca es importante\n </p>\n <p class=\"mt-2 text-sm text-z-gray-800\">\n Te pedimos que en las fotografías puedas mostrar la marca o la etiqueta del producto,\n para así reafirmar la confianza que tendrán los usuarios a la hora de revisar el producto.\n </p>\n </div>\n <div>\n <div class=\"grid grid-cols-2 gap-2\">\n <img src=\"@/assets/images/picture-modal/image5.png\">\n <img src=\"@/assets/images/picture-modal/image6.png\">\n </div>\n <p class=\"mt-2 font-medium text-z-gray-900\">\n Más fotos, mejor. ¡Todo suma!\n </p>\n <p class=\"mt-2 text-sm text-z-gray-800\">\n Mientras más fotos ocupes, mejor. Idealmente te pedimos que muestres tu producto, su forma de\n utilización y cómo se verá. Todo esto aumentará las posibilidades de que sea arrendado en nuestra plataforma\n </p>\n </div>\n </div>\n </div>\n </base-modal>\n</template>\n","<script setup lang=\"ts\">\nimport { useStore } from '@/store/store';\nimport { ref, computed } from 'vue';\nimport { string, object, array } from 'yup';\nimport NewProductPictureInfoModal from './new-product-picture-info-modal.vue';\n\ninterface Props {\n summaryMode?: boolean\n}\n\ndefineProps<Props>();\n\nconst emit = defineEmits<{\n (e: 'continue', value: { newDescription:string, newPictures:File[]}): void\n}>();\n\nconst store = useStore();\n\nconst description = ref(store.productFormData?.description ?? '');\nconst pictures = ref(store.productFormData?.pictures ?? [null, null, null]);\nconst showPictureModal = ref(false);\n\nconst showPictureErrors = ref(false);\nfunction togglePictureErrors() {\n showPictureErrors.value = !showPictureErrors.value;\n}\n\nconst formRules = object().shape({\n description: string().required('Debes ingresar una descripción'),\n pictures: array().required().compact()\n // eslint-disable-next-line no-magic-numbers\n .min(3),\n});\n\nfunction handleContinue() {\n emit('continue', { newDescription: description.value, newPictures: pictures.value as File[] });\n}\n\nconst nonNullPictures = computed(() => pictures.value.filter(el => el !== null && el !== undefined));\n\nfunction togglePictureModal() {\n showPictureModal.value = !showPictureModal.value;\n}\n\n</script>\n<template>\n <p class=\"text-center text-lg font-medium leading-6 text-z-gray-800\">\n {{ $t('newProductForm.step4.description') }}\n </p>\n <v-form\n v-slot=\"{ meta, handleSubmit, errors }\"\n :validation-schema=\"formRules\"\n >\n <div class=\"mb-16 flex flex-col space-y-6 pb-4 md:mb-0\">\n <div\n v-if=\"meta.touched && (!!errors.description || (showPictureErrors && !!errors.pictures))\"\n class=\"flex h-12 items-center justify-center rounded-lg bg-z-cerise-50 px-4 py-2 text-center text-sm text-z-red\"\n >\n Ingresa los datos para continuar\n </div>\n <div class=\"flex flex-col space-y-2\">\n <base-input\n v-model=\"description\"\n name=\"description\"\n placeholder=\"Describe tu producto\"\n label=\"Describe tu producto\"\n type=\"textarea\"\n :error=\"meta.touched && !!errors.description\"\n />\n </div>\n <div>\n <p class=\"font-medium text-z-gray-900\">\n Fotografías del producto\n </p>\n <p class=\"mt-2 text-sm text-z-gray-800\">\n Como mínimo sube 3 imágenes en formato .jpg o .png\n </p>\n <base-tip\n title=\"¿Cómo subir mis fotos?\"\n class=\"mt-4\"\n >\n <p>Te dejamos ciertos tips que te van a ayudar a subir fotos de forma correcta.</p>\n <button\n class=\"mt-2 text-z-yellow-500 underline underline-offset-2\"\n type=\"button\"\n @click=\"togglePictureModal\"\n >\n Saber más\n </button>\n </base-tip>\n </div>\n <div class=\"mt-1 grid grid-cols-2 gap-4\">\n <base-drag-and-drop\n v-for=\"i in Math.max(3, nonNullPictures.length + 1)\"\n :key=\"i\"\n v-model=\"pictures[i-1]\"\n :name=\"`pictures[${i-1}]`\"\n :error=\"i <= 3 && showPictureErrors && !!errors.pictures\"\n />\n </div>\n <base-button\n class=\"fixed bottom-0 gap-2\"\n type=\"button\"\n @click=\"togglePictureErrors(); handleSubmit($event, handleContinue)\"\n >\n {{ summaryMode ? 'Ver resumen' : 'Continuar' }}\n <img src=\"@/assets/icons/arrow-small-right.svg\">\n </base-button>\n </div>\n </v-form>\n <new-product-picture-info-modal\n :is-open=\"showPictureModal\"\n @close=\"togglePictureModal\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { useStore } from '@/store/store';\nimport { isEmpty } from 'lodash';\nimport { ref, watch } from 'vue';\nimport { object, number } from 'yup';\n\nconst emit = defineEmits<{\n (e: 'continue', value: { dailyPrice:number, minRange:number, maxRange:number, deposit:number }): void\n}>();\n\nconst store = useStore();\n\nconst dailyPrice = ref(store.productFormData?.dailyPrice || undefined);\nconst minRange = ref(store.productFormData?.minRange ?? 1);\nconst maxRange = ref(store.productFormData?.maxRange ?? 1);\nconst noMax = ref(store.productFormData?.maxRange ? store.productFormData?.maxRange === 0 : true);\nconst deposit = ref(store.productFormData?.deposit || undefined);\n\nconst formRules = object().shape({\n minRange: number().min(1).required(),\n maxRange: number().required().min(noMax.value ? 0 : minRange.value),\n dailyPrice: number().required().min(1),\n deposit: number().required().min(0),\n});\n\nfunction handleContinue() {\n const values = {\n dailyPrice: dailyPrice.value ?? 0,\n minRange: minRange.value,\n maxRange: noMax.value ? 0 : maxRange.value,\n deposit: deposit.value ?? 0,\n };\n\n emit('continue', values);\n}\n\nconst formValues = {\n minRange: 1,\n maxRange: 1,\n noMax: false,\n};\n\nwatch(minRange, (newVal) => {\n if (newVal > maxRange.value) {\n maxRange.value = newVal;\n }\n});\n\nwatch(maxRange, (newVal) => {\n if (newVal < minRange.value) {\n minRange.value = newVal + 1;\n }\n});\n\n</script>\n<template>\n <p class=\"text-center text-lg font-medium leading-6 text-z-gray-800\">\n {{ $t('newProductForm.step5.description') }}\n </p>\n <v-form\n v-slot=\"{ meta, handleSubmit, errors }\"\n :validation-schema=\"formRules\"\n :initial-values=\"formValues\"\n class=\"bg-white\"\n >\n <div class=\"mb-16 flex flex-col space-y-6 pb-3 md:mb-0\">\n <div\n v-if=\"!isEmpty(errors) && meta.touched\"\n class=\"flex h-12 items-center justify-center rounded-lg bg-z-cerise-50 px-4 py-2 text-center text-sm text-z-red\"\n >\n Ingresa los datos para continuar\n </div>\n <div class=\"flex flex-col space-y-4\">\n <base-currency-input\n v-model=\"dailyPrice\"\n name=\"dailyPrice\"\n placeholder=\"Precio de arriendo por día\"\n label=\"Precio de arriendo por día\"\n :error=\"meta.touched && !!errors.dailyPrice\"\n />\n <base-currency-input\n v-model=\"deposit\"\n name=\"deposit\"\n placeholder=\"Garantía de arriendo\"\n label=\"Garantía de arriendo\"\n :error=\"meta.touched && !!errors.deposit\"\n />\n <base-counter\n v-model=\"minRange\"\n label=\"Mínima cantidad de días de arriendo\"\n :min=\"1\"\n unit=\"días\"\n name=\"minRange\"\n />\n <base-counter\n v-model=\"maxRange\"\n label=\"Máxima cantidad de días de arriendo\"\n :min=\"1\"\n unit=\"días\"\n :disabled=\"noMax\"\n name=\"maxRange\"\n />\n <div class=\"relative flex items-center space-x-2\">\n <v-field\n v-model=\"noMax\"\n name=\"noMax\"\n type=\"checkbox\"\n :value=\"true\"\n\n class=\"peer h-5 w-5 appearance-none rounded-[3px] border-2 border-z-turquoise-600 bg-none checked:bg-z-turquoise-600\"\n />\n <img\n src=\"@/assets/icons/check.svg\"\n class=\"pointer-events-none absolute -left-2 top-0.5 opacity-0 peer-checked:opacity-100\"\n >\n <label\n for=\"noMax\"\n class=\"text-z-gray-900\"\n >\n Sin máximo de días de arriendo.\n </label>\n </div>\n </div>\n <base-button\n class=\"fixed bottom-0 mb-2 mt-10 w-full gap-2\"\n type=\"button\"\n @click=\"handleSubmit($event, handleContinue)\"\n >\n Ver resumen\n <img src=\"@/assets/icons/arrow-small-right.svg\">\n </base-button>\n </div>\n </v-form>\n</template>\n","<script setup lang=\"ts\">\nimport { inject } from 'vue';\n\ninterface Props {\n isOpen: boolean\n}\n\ndefineProps<Props>();\n\nconst user = inject<User>('user');\n</script>\n<template>\n <base-modal\n :open=\"isOpen\"\n >\n <div class=\"flex flex-col\">\n <img\n src=\"@/assets/icons/check-circle.svg\"\n class=\"w-20 self-center\"\n >\n <p class=\"mt-4 text-center font-medium text-z-gray-900\">\n {{ $t('newProductForm.successModal.title') }}\n </p>\n <p class=\"mt-6 text-center text-z-gray-800\">\n {{ $t('newProductForm.successModal.description') }}\n </p>\n <base-tip\n title=\"\"\n class=\"mt-6\"\n >\n <template #icon>\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"h-6 w-6\"\n >\n </template>\n {{ $t('newProductForm.successModal.tip') }}\n </base-tip>\n <template v-if=\"!user?.hasBankAccount || !user?.verified\">\n <base-tip\n title=\"\"\n class=\"mt-6\"\n >\n Te recomendamos <span class=\"font-semibold\">verificar tu cuenta</span> para recibir tus futuros ingresos por arriendos o campañas de referido.\n </base-tip>\n <base-button\n href=\"/perfil/verificar?from=new_product_form&redirect_to=/\"\n class=\"mt-4\"\n >\n Verificar cuenta\n <img\n src=\"@/assets/icons/arrow-small-right.svg\"\n class=\"ml-2\"\n >\n </base-button>\n </template>\n <base-button\n v-else\n href=\"/\"\n class=\"mt-4\"\n >\n Aceptar\n </base-button>\n </div>\n </base-modal>\n</template>\n","<script setup lang=\"ts\">\nimport { inject, onMounted, ref, watch } from 'vue';\nimport { camelCase } from 'lodash';\nimport { generateURL } from '@/utils/generate-url';\nimport { addressesApi } from '@/api/addresses';\nimport { partnerAccountsApi } from '@/api/partner-accounts';\nimport { scrollToTop } from '@/utils/scroll-to-top';\nimport { currency } from '@/utils/currency';\nimport { useStore } from '../store/store';\nimport * as subcategoriesApi from '../api/subcategories';\nimport { productsApi, type ProductFormData } from '../api/products';\nimport NewProductStep1 from './new-product-step-1.vue';\nimport NewProductStep2 from './new-product-step-2.vue';\nimport NewProductStep3 from './new-product-step-3.vue';\nimport NewProductStep4 from './new-product-step-4.vue';\nimport NewProductStep5 from './new-product-step-5.vue';\nimport newProductSuccessModal from './new-product-success-modal.vue';\n\ninterface Props {\n categories: Category[]\n productRequestId?: number\n}\nconst props = defineProps<Props>();\n\nconst store = useStore();\n\nconst STEPS = [\n { title: 'newProductForm.step1.title', progressBarClass: 'col-span-1' },\n { title: 'newProductForm.step2.title', progressBarClass: 'col-span-2' },\n { title: 'newProductForm.step3.title', progressBarClass: 'col-span-3' },\n { title: 'newProductForm.step4.title', progressBarClass: 'col-span-4' },\n { title: 'newProductForm.step5.title', progressBarClass: 'col-span-5' },\n];\nconst currentStep = ref(0);\n\nconst shippingMethods = [\n { id: 'partner_delivery', name: 'Tú entregas en la ubicación del cliente' },\n { id: 'client_pickup', name: 'El cliente debe retirar en tu dirección' },\n];\n\nconst user = inject<User>('user');\n\nconst subcategories = ref<Subcategory[]>([]);\nconst categoryId = ref();\nconst subcategoryId = ref();\nconst name = ref();\nconst brand = ref();\nconst model = ref();\nconst condition = ref();\nconst weight = ref();\nconst description = ref();\nconst dailyPrice = ref();\nconst deposit = ref();\nconst shippingMethodIds = ref<string[]>([]);\nconst pictures = ref<File[]>([]);\nconst addressId = ref();\nconst address = ref();\nconst minRange = ref();\nconst maxRange = ref();\n\nconst loading = ref(false);\nconst error = ref(false);\n\nconst showSuccessMessage = ref(false);\nconst summaryMode = ref(false);\n\nconst showProductRequestModal = ref(false);\nconst alreadyShownModal = ref(false);\nfunction toggleProductRequestModal() {\n if (!alreadyShownModal.value) {\n showProductRequestModal.value = !showProductRequestModal.value;\n }\n}\n\nwatch(categoryId, (newVal) => {\n subcategoriesApi.index(newVal).then((response) => {\n subcategories.value = response.data.subcategories;\n });\n});\n\nonMounted(() => {\n if (categoryId.value) {\n subcategoriesApi.index(categoryId.value).then((response) => {\n subcategories.value = response.data.subcategories;\n });\n }\n});\n\nonMounted(() => {\n store.resetProductFormData();\n});\n\nwatch(currentStep, (newVal) => {\n // eslint-disable-next-line no-magic-numbers\n if (newVal === 5) {\n addressesApi.get(addressId.value).then((response) => {\n address.value = response.data.address;\n });\n }\n});\n\nasync function handleClick() {\n const formValues = {\n partnerAccountId: user?.partnerAccountId,\n subcategoryId: subcategoryId.value,\n name: name.value,\n brand: brand.value,\n model: model.value,\n condition: condition.value as string,\n weight: weight.value as string,\n description: description.value,\n dailyPrice: dailyPrice.value,\n deposit: deposit.value,\n shippingMethod: shippingMethodIds.value.length === 1 ? shippingMethodIds.value[0] : 'both',\n addressId: addressId.value,\n productRequestId: props.productRequestId,\n minRange: minRange.value,\n maxRange: maxRange.value,\n };\n try {\n if (!formValues.partnerAccountId) {\n formValues.partnerAccountId = await partnerAccountsApi.create(user?.id || 0).then(\n (response) => response.data.partnerAccount.id,\n );\n }\n loading.value = true;\n await productsApi.create(formValues, pictures.value);\n showSuccessMessage.value = true;\n } catch (e) {\n error.value = true;\n } finally {\n loading.value = false;\n store.resetProductFormData();\n }\n}\n\nfunction handleStepBack() {\n currentStep.value -= 1;\n scrollToTop();\n}\n\nfunction handleBack() {\n if (currentStep.value > 0) {\n handleStepBack();\n } else {\n window.location.href = '/como_subir';\n }\n}\n\nfunction nextStep() {\n const formValues = {\n subcategoryId: subcategoryId.value,\n name: name.value,\n brand: brand.value,\n model: model.value,\n condition: condition.value as string,\n weight: weight.value as string,\n description: description.value,\n dailyPrice: dailyPrice.value,\n deposit: deposit.value,\n shippingMethodIds: shippingMethodIds.value,\n addressId: addressId.value,\n productRequestId: props.productRequestId,\n minRange: minRange.value,\n maxRange: maxRange.value,\n categoryId: categoryId.value,\n pictures: pictures.value,\n };\n\n store.setProductFormData(formValues);\n if (summaryMode.value) {\n currentStep.value = 5;\n } else {\n currentStep.value += 1;\n }\n\n scrollToTop();\n}\n\nfunction goToStep(step:number) {\n currentStep.value = step;\n}\n\nfunction handleStep1(newName:string) {\n name.value = newName;\n nextStep();\n}\n\nfunction handleStep2(formValues: { shippingMethodIds: string[], addressId: number }) {\n shippingMethodIds.value = formValues.shippingMethodIds;\n addressId.value = formValues.addressId;\n nextStep();\n}\n\n// eslint-disable-next-line complexity\nfunction handleStep3(formValues:Partial<ProductFormData>) {\n categoryId.value = formValues.categoryId ?? 0;\n subcategoryId.value = formValues.subcategoryId ?? 0;\n weight.value = formValues.weight ?? '';\n condition.value = formValues.condition ?? '';\n brand.value = formValues.brand ?? '';\n model.value = formValues.model ?? '';\n nextStep();\n}\n\nfunction handleStep4(formValues: { newDescription: string, newPictures: File[] }) {\n description.value = formValues.newDescription;\n pictures.value = formValues.newPictures;\n nextStep();\n}\n\n// eslint-disable-next-line complexity\nfunction handleStep5(formValues:Partial<ProductFormData>) {\n dailyPrice.value = formValues.dailyPrice ?? 0;\n deposit.value = formValues.deposit ?? 0;\n minRange.value = formValues.minRange ?? 0;\n maxRange.value = formValues.maxRange ?? 0;\n\n if (props.productRequestId && !alreadyShownModal.value) {\n toggleProductRequestModal();\n } else {\n summaryMode.value = true;\n nextStep();\n }\n}\n\nfunction handleConfirm() {\n toggleProductRequestModal();\n alreadyShownModal.value = true;\n summaryMode.value = true;\n nextStep();\n}\n\n</script>\n<template>\n <the-layout hide-navbar>\n <div class=\"absolute top-0 flex h-full w-full flex-col bg-white md:relative md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-64px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"Sube tus productos\"\n class=\"md:rounded\"\n @back=\"handleBack\"\n />\n <template\n v-if=\"currentStep === 5\"\n >\n <div class=\"border-b-2 border-t border-z-gray-100 px-6 py-4\">\n <p class=\"text-xl font-bold text-z-gray-800\">\n Resumen\n </p>\n <p class=\"pt-6 text-z-gray-800\">\n {{ $t('newProductForm.summary.description') }}\n </p>\n </div>\n <div\n class=\"border-y-2 border-z-gray-100 px-6 py-4 text-z-gray-900\"\n >\n <div class=\"flex justify-between\">\n <p class=\"font-bold\">\n Paso 1\n </p>\n <button\n type=\"button\"\n class=\"font-medium text-z-turquoise-600 underline underline-offset-2\"\n @click=\"goToStep(0)\"\n >\n Editar\n </button>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Nombre del producto\n </p>\n <p class=\"mt-1\">\n {{ name }}\n </p>\n </div>\n </div>\n <div\n class=\"border-y-2 border-z-gray-100 px-6 py-4 text-z-gray-900\"\n >\n <div class=\"flex justify-between\">\n <p class=\"font-bold\">\n Paso 2\n </p>\n <button\n type=\"button\"\n class=\"font-medium text-z-turquoise-600 underline underline-offset-2\"\n @click=\"goToStep(1)\"\n >\n Editar\n </button>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Modo de entrega y devolución\n </p>\n <div\n class=\"mt-1\"\n >\n <p\n v-for=\"shippingMethodId in shippingMethodIds\"\n :key=\"shippingMethodId\"\n >\n {{ shippingMethods.find(so => so.id === shippingMethodId)?.name }}\n </p>\n </div>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Dirección\n </p>\n <p class=\"mt-1\">\n {{ address.displayName }}\n </p>\n </div>\n <base-tip\n :title=\"$t('newProductForm.step2.addressTipTitle')\"\n class=\"mt-3\"\n >\n <template #icon>\n <img src=\"@/assets/icons/pin.svg\">\n </template>\n {{ $t('newProductForm.step2.addressTip') }}\n </base-tip>\n </div>\n <div\n class=\"border-y-2 border-z-gray-100 px-6 py-4 text-z-gray-900\"\n >\n <div class=\"flex justify-between\">\n <p class=\"font-bold\">\n Paso 3\n </p>\n <button\n type=\"button\"\n class=\"font-medium text-z-turquoise-600 underline underline-offset-2\"\n @click=\"goToStep(2)\"\n >\n Editar\n </button>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Categoría\n </p>\n <p class=\"mt-1\">\n {{ categories.find(cat => cat.id == categoryId)?.name }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Subcategoría\n </p>\n <p class=\"mt-1\">\n {{ subcategories.find(subcat => subcat.id == subcategoryId)?.name }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Marca\n </p>\n <p class=\"mt-1\">\n {{ brand }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Modelo\n </p>\n <p class=\"mt-1\">\n {{ model }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Estado\n </p>\n <p class=\"mt-1\">\n {{ $t(`product.condition.${camelCase(condition as string)}`) }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Peso\n </p>\n <p class=\"mt-1\">\n {{ $t(`product.weight.${camelCase(weight as string)}`) }}\n </p>\n </div>\n </div>\n <div\n class=\"border-y-2 border-z-gray-100 px-6 py-4 text-z-gray-900\"\n >\n <div class=\"flex justify-between\">\n <p class=\"font-bold\">\n Paso 4\n </p>\n <button\n type=\"button\"\n class=\"font-medium text-z-turquoise-600 underline underline-offset-2\"\n @click=\"goToStep(3)\"\n >\n Editar\n </button>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Descripción del producto\n </p>\n <p class=\"mt-1\">\n {{ description }}\n </p>\n </div>\n <div class=\"mt-6 w-full\">\n <p class=\"font-medium\">\n Fotos\n </p>\n <div class=\"mt-2 grid grid-cols-2 gap-4\">\n <img\n v-for=\"picture, index in pictures\"\n :key=\"index\"\n :src=\"generateURL(picture)\"\n class=\"aspect-square w-full rounded-lg object-cover\"\n >\n </div>\n </div>\n </div>\n <div\n class=\"border-t-2 border-z-gray-100 px-6 py-4 text-z-gray-900\"\n >\n <div class=\"flex justify-between\">\n <p class=\"font-bold\">\n Paso 5\n </p>\n <button\n type=\"button\"\n class=\"font-medium text-z-turquoise-600 underline underline-offset-2\"\n @click=\"goToStep(4)\"\n >\n Editar\n </button>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Precio de arriendo por día\n </p>\n <p class=\"mt-1\">\n {{ currency(dailyPrice) }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Garantía\n </p>\n <p class=\"mt-1\">\n {{ currency(deposit) }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Mínima cantidad de días por arriendo\n </p>\n <p class=\"mt-1\">\n {{ minRange }} {{ minRange > 1 ? 'días' : 'día' }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Máxima cantidad de días por arriendo\n </p>\n <p class=\"mt-1\">\n {{ maxRange > 0 ? maxRange : 'Sin máximo' }} {{ maxRange > 1 ? 'días' : 'día' }}\n </p>\n </div>\n <base-button\n class=\"mb-16 mt-8 w-full gap-2 md:mb-0\"\n type=\"button\"\n :disabled=\"loading\"\n @click=\"handleClick()\"\n >\n <img\n v-if=\"loading\"\n src=\"@/assets/icons/loading-alt.svg\"\n class=\"w-10 animate-spin-slow\"\n >\n <template v-else>\n Subir producto\n <img src=\"@/assets/icons/arrow-small-right.svg\">\n </template>\n </base-button>\n </div>\n </template>\n <template v-else>\n <div class=\"sticky top-16 z-10\">\n <div\n class=\"grid h-0.5 w-full shrink-0 bg-z-turquoise-100\"\n :class=\"`grid-cols-5`\"\n >\n <div\n class=\"h-full w-full bg-z-turquoise-600\"\n :class=\"STEPS[currentStep].progressBarClass\"\n />\n </div>\n <div class=\"relative flex h-[84px] shrink-0 flex-col items-center justify-center bg-z-turquoise-50 text-z-turquoise-600 shadow-sm\">\n <!-- <button\n v-if=\"currentStep != 0\"\n class=\"absolute left-24\"\n @click=\"handleStepBack\"\n >\n <img\n src=\"@/assets/icons/chevron-left-turquoise.svg\"\n class=\"h-8\"\n >\n </button> -->\n <p class=\"font-semibold\">\n {{ currentStep + 1 }} de {{ STEPS.length }}\n </p>\n <p>{{ $t(STEPS[currentStep].title) }}</p>\n </div>\n </div>\n <div class=\"mx-6 mt-4 flex flex-col space-y-6\">\n <new-product-step-1\n v-if=\"currentStep === 0\"\n :summary-mode=\"summaryMode\"\n @continue=\"handleStep1\"\n />\n <new-product-step-2\n v-else-if=\"currentStep === 1\"\n :summary-mode=\"summaryMode\"\n @continue=\"handleStep2\"\n />\n <new-product-step-3\n v-else-if=\"currentStep === 2\"\n :summary-mode=\"summaryMode\"\n :categories=\"categories\"\n @continue=\"handleStep3\"\n />\n <new-product-step-4\n v-else-if=\"currentStep === 3\"\n :summary-mode=\"summaryMode\"\n @continue=\"handleStep4\"\n />\n <new-product-step-5\n v-if=\"currentStep === 4\"\n @continue=\"handleStep5\"\n />\n </div>\n </template>\n <new-product-success-modal :is-open=\"showSuccessMessage\" />\n <base-modal\n :open=\"showProductRequestModal\"\n @close=\"toggleProductRequestModal\"\n >\n <div class=\"flex flex-col\">\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"w-20 self-center\"\n >\n <p class=\"mt-4 text-center font-medium text-z-gray-900\">\n Notificación al cliente\n </p>\n <p class=\"mt-6 text-center text-z-gray-800\">\n Revisa bien la información de tu producto,\n luego de publicarlo le enviaremos una notificación al usuario para que pueda adquirirlo de forma rápida.\n </p>\n <base-button\n class=\"mt-4\"\n @click=\"handleConfirm\"\n >\n Aceptar\n </base-button>\n </div>\n </base-modal>\n </div>\n </the-layout>\n</template>\n","export default \"__VITE_ASSET__d53f63a1__\"","<script setup lang=\"ts\">\nimport { useStore } from '@/store/store';\nimport { ref, computed } from 'vue';\nimport { string, object, array } from 'yup';\nimport NewProductPictureInfoModal from './new-product-picture-info-modal.vue';\n\ninterface Props {\n summaryMode?: boolean\n productPictures: ProductPicture[]\n}\n\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n (e: 'continue', value: { newDescription:string, pictureIdsToDelete:number[], newPictures:File[]}): void\n}>();\n\nconst store = useStore();\n\nconst description = ref(store.productFormData?.description ?? '');\nconst pictures = ref(store.productFormData?.pictures ?? [null, null, null]);\nconst pictureIdsToDelete = ref<number[]>([]);\n\nconst showPictureModal = ref(false);\n\nconst showPictureErrors = ref(false);\nfunction togglePictureErrors() {\n showPictureErrors.value = !showPictureErrors.value;\n}\n\nconst formRules = object().shape({\n description: string().required('Debes ingresar una descripción'),\n pictures: array().required().compact()\n // eslint-disable-next-line no-magic-numbers\n .min(Math.max(0, 3 - props.productPictures.length + pictureIdsToDelete.value.length)),\n});\n\nfunction handleContinue() {\n emit('continue', {\n newDescription: description.value,\n pictureIdsToDelete: pictureIdsToDelete.value,\n newPictures: pictures.value as File[],\n });\n}\n\nconst nonNullPictures = computed(() => pictures.value.filter(el => el !== null && el !== undefined));\n\nfunction togglePictureModal() {\n showPictureModal.value = !showPictureModal.value;\n}\n\nconst picturesToShow = computed(() => props.productPictures.filter(\n (picture) => !pictureIdsToDelete.value.includes(picture.id)),\n);\n\nfunction removePicture(id:number) {\n pictureIdsToDelete.value.push(id);\n}\n\n</script>\n<template>\n <p class=\"text-center text-lg font-medium leading-6 text-z-gray-800\">\n Cuéntanos por qué deberíamos publicar tu producto\n </p>\n <v-form\n v-slot=\"{ meta, handleSubmit, errors }\"\n :validation-schema=\"formRules\"\n >\n <div class=\"flex flex-col space-y-6\">\n <div\n v-if=\"meta.touched && (!!errors.description || (showPictureErrors && !!errors.pictures))\"\n class=\"flex h-12 items-center justify-center rounded-lg bg-z-cerise-50 px-4 py-2 text-center text-sm text-z-red\"\n >\n Ingresa los datos para continuar\n </div>\n <div class=\"flex flex-col space-y-2\">\n <base-input\n v-model=\"description\"\n name=\"description\"\n placeholder=\"Describe tu producto\"\n label=\"Describe tu producto\"\n type=\"textarea\"\n :error=\"meta.touched && !!errors.description\"\n />\n </div>\n <div>\n <p class=\"font-medium text-z-gray-900\">\n Fotografías del producto\n </p>\n <p class=\"mt-2 text-sm text-z-gray-800\">\n Como mínimo sube 3 imágenes en formato .jpg o .png\n </p>\n <base-tip\n title=\"¿Cómo subir mis fotos?\"\n >\n <p>Te dejamos ciertos tips que te van a ayudar a subir fotos de forma correcta.</p>\n <button\n class=\"mt-2 text-z-yellow-500 underline underline-offset-2\"\n type=\"button\"\n @click=\"togglePictureModal\"\n >\n Saber más\n </button>\n </base-tip>\n </div>\n <div class=\"mt-1 grid grid-cols-2 gap-4\">\n <div\n v-for=\"picture in picturesToShow\"\n :key=\"picture.id\"\n class=\"relative aspect-square w-full\"\n >\n <img\n :src=\"picture.picture.webpSm.url\"\n class=\"aspect-square w-full rounded-lg\"\n >\n <button\n class=\"absolute right-2 top-2 flex h-8 items-center justify-center rounded bg-z-turquoise-50 px-2 text-z-turquoise-600\"\n @click=\"removePicture(picture.id)\"\n >\n <img src=\"@/assets/icons/trash.svg\">\n </button>\n </div>\n <base-drag-and-drop\n v-for=\"i in Math.max(1, pictureIdsToDelete.length, nonNullPictures.length + 1)\"\n :key=\"i\"\n v-model=\"pictures[i-1]\"\n :name=\"`pictures[${i-1}]`\"\n :error=\"i <= 3 && showPictureErrors && !!errors.pictures\"\n />\n </div>\n <base-button\n class=\"fixed bottom-0 gap-2\"\n type=\"button\"\n @click=\"togglePictureErrors(); handleSubmit($event, handleContinue)\"\n >\n {{ summaryMode ? 'Ver resumen' : 'Continuar' }}\n <img src=\"@/assets/icons/arrow-small-right.svg\">\n </base-button>\n </div>\n </v-form>\n <new-product-picture-info-modal\n :is-open=\"showPictureModal\"\n @close=\"togglePictureModal\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, inject, onMounted, ref, watch } from 'vue';\nimport { camelCase } from 'lodash';\nimport { generateURL } from '@/utils/generate-url';\nimport { addressesApi } from '@/api/addresses';\nimport { scrollToTop } from '@/utils/scroll-to-top';\nimport { currency } from '@/utils/currency';\nimport { useStore } from '../store/store';\nimport * as subcategoriesApi from '../api/subcategories';\nimport { productsApi, type ProductFormData } from '../api/products';\nimport NewProductStep1 from './new-product-step-1.vue';\nimport NewProductStep2 from './new-product-step-2.vue';\nimport NewProductStep3 from './new-product-step-3.vue';\nimport EditProductStep4 from './edit-product-step-4.vue';\nimport NewProductStep5 from './new-product-step-5.vue';\nimport successModal from './success-modal.vue';\n\ninterface Props {\n categories: Category[]\n product: Product\n}\nconst props = defineProps<Props>();\n\nconst store = useStore();\n\nconst STEPS = [\n { title: 'Nombre del producto', progressBarClass: 'col-span-1' },\n { title: 'Tipo de envío', progressBarClass: 'col-span-2' },\n { title: 'Categorización', progressBarClass: 'col-span-3' },\n { title: 'Descripción', progressBarClass: 'col-span-4' },\n { title: 'Precio y ubicación', progressBarClass: 'col-span-5' },\n];\n// eslint-disable-next-line no-magic-numbers\nconst currentStep = ref(5);\n\nconst shippingMethods = [\n { id: 'partner_delivery', name: 'El socio lo entrega' },\n { id: 'client_pickup', name: 'El cliente lo recoge' },\n];\n\nconst user = inject<User>('user');\n\nconst subcategories = ref<Subcategory[]>([]);\nconst categoryId = ref(props.product.category.id);\nconst subcategoryId = ref(props.product.subcategory.id);\nconst name = ref(props.product.name);\nconst brand = ref(props.product.brand);\nconst model = ref(props.product.model);\nconst condition = ref(props.product.condition);\nconst weight = ref(props.product.weight);\nconst description = ref(props.product.description);\nconst dailyPrice = ref(props.product.dailyPrice);\nconst deposit = ref(props.product.deposit);\nconst shippingMethodIds = ref<string[]>(\n props.product.shippingMethod === 'both' ?\n shippingMethods.map((sm) => sm.id) :\n [props.product.shippingMethod],\n);\nconst pictures = ref<File[]>([]);\nconst pictureIdsToDelete = ref<number[]>([]);\nconst addressId = ref(props.product.address.id);\nconst address = ref(props.product.address);\nconst minRange = ref(props.product.minRange);\nconst maxRange = ref(props.product.maxRange);\n\nconst loading = ref(false);\nconst error = ref(false);\n\nconst showSuccessMessage = ref(false);\nconst summaryMode = ref(true);\n\nconst picturesToShow = computed(() => props.product.productPictures.filter(\n (picture) => !pictureIdsToDelete.value.includes(picture.id)),\n);\n\nwatch(categoryId, (newVal) => {\n subcategoriesApi.index(newVal).then((response) => {\n subcategories.value = response.data.subcategories;\n });\n});\n\nonMounted(() => {\n if (categoryId.value) {\n subcategoriesApi.index(categoryId.value).then((response) => {\n subcategories.value = response.data.subcategories;\n });\n }\n});\n\nonMounted(() => {\n store.setProductFormData({\n subcategoryId: subcategoryId.value,\n name: name.value,\n brand: brand.value,\n model: model.value,\n condition: condition.value as string,\n weight: weight.value as string,\n description: description.value,\n dailyPrice: dailyPrice.value,\n deposit: deposit.value,\n shippingMethodIds: shippingMethodIds.value,\n addressId: addressId.value,\n minRange: minRange.value,\n maxRange: maxRange.value,\n categoryId: categoryId.value,\n pictures: pictures.value,\n });\n});\n\nwatch(currentStep, (newVal) => {\n // eslint-disable-next-line no-magic-numbers\n if (newVal === 5) {\n addressesApi.get(addressId.value).then((response) => {\n address.value = response.data.address;\n });\n }\n});\n\nasync function handleClick() {\n const formValues = {\n partnerAccountId: user?.partnerAccountId,\n subcategoryId: subcategoryId.value,\n name: name.value,\n brand: brand.value,\n model: model.value,\n condition: condition.value as string,\n weight: weight.value as string,\n description: description.value,\n dailyPrice: dailyPrice.value,\n deposit: deposit.value,\n shippingMethod: shippingMethodIds.value.length === 1 ? shippingMethodIds.value[0] : 'both',\n addressId: addressId.value,\n minRange: minRange.value,\n maxRange: maxRange.value,\n };\n try {\n loading.value = true;\n await productsApi.update(props.product.id, formValues, pictureIdsToDelete.value, pictures.value);\n showSuccessMessage.value = true;\n } catch (e) {\n error.value = true;\n } finally {\n loading.value = false;\n store.resetProductFormData();\n }\n}\n\nfunction handleBack() {\n // eslint-disable-next-line no-magic-numbers\n if (currentStep.value === 5) {\n window.history.back();\n } else {\n currentStep.value = 5;\n }\n}\n\nfunction nextStep() {\n const formValues = {\n subcategoryId: subcategoryId.value,\n name: name.value,\n brand: brand.value,\n model: model.value,\n condition: condition.value as string,\n weight: weight.value as string,\n description: description.value,\n dailyPrice: dailyPrice.value,\n deposit: deposit.value,\n shippingMethodIds: shippingMethodIds.value,\n addressId: addressId.value,\n minRange: minRange.value,\n maxRange: maxRange.value,\n categoryId: categoryId.value,\n pictures: pictures.value,\n };\n\n store.setProductFormData(formValues);\n if (summaryMode.value) {\n currentStep.value = 5;\n } else {\n currentStep.value += 1;\n }\n\n scrollToTop();\n}\n\nfunction goToStep(step:number) {\n currentStep.value = step;\n}\n\nfunction handleStep1(newName:string) {\n name.value = newName;\n nextStep();\n}\n\nfunction handleStep2(formValues: { shippingMethodIds: string[], addressId: number }) {\n shippingMethodIds.value = formValues.shippingMethodIds;\n addressId.value = formValues.addressId;\n nextStep();\n}\n\n// eslint-disable-next-line complexity\nfunction handleStep3(formValues:Partial<ProductFormData>) {\n categoryId.value = formValues.categoryId ?? 0;\n subcategoryId.value = formValues.subcategoryId ?? 0;\n weight.value = formValues.weight ?? '';\n condition.value = formValues.condition ?? '';\n brand.value = formValues.brand ?? '';\n model.value = formValues.model ?? '';\n nextStep();\n}\n\nfunction handleStep4(formValues: { newDescription: string, pictureIdsToDelete: number[], newPictures: File[] }) {\n description.value = formValues.newDescription;\n pictures.value = formValues.newPictures;\n pictureIdsToDelete.value = formValues.pictureIdsToDelete;\n nextStep();\n}\n\n// eslint-disable-next-line complexity\nfunction handleStep5(formValues:Partial<ProductFormData>) {\n dailyPrice.value = formValues.dailyPrice ?? 0;\n deposit.value = formValues.deposit ?? 0;\n minRange.value = formValues.minRange ?? 0;\n maxRange.value = formValues.maxRange ?? 0;\n\n summaryMode.value = true;\n nextStep();\n}\n\nfunction handleSuccess() {\n window.history.back();\n}\n</script>\n<template>\n <the-layout hide-navbar>\n <div class=\"flex h-full w-full flex-col bg-white md:relative md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"Editar producto\"\n @back=\"handleBack\"\n />\n <template\n v-if=\"currentStep === 5\"\n >\n <div class=\"border-b-2 border-t border-z-gray-100 px-6 py-4\">\n <p class=\"text-xl font-bold text-z-gray-800\">\n Resumen\n </p>\n <p class=\"pt-6 text-z-gray-800\">\n Revisa con cuidado, si todo está bien guarda el producto.\n </p>\n </div>\n <div\n class=\"border-y-2 border-z-gray-100 px-6 py-4 text-z-gray-900\"\n >\n <div class=\"flex justify-between\">\n <p class=\"font-bold\">\n Nombre\n </p>\n <button\n type=\"button\"\n class=\"font-medium text-z-turquoise-600 underline underline-offset-2\"\n @click=\"goToStep(0)\"\n >\n Editar\n </button>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Nombre del producto\n </p>\n <p class=\"mt-1\">\n {{ name }}\n </p>\n </div>\n </div>\n <div\n class=\"border-y-2 border-z-gray-100 px-6 py-4 text-z-gray-900\"\n >\n <div class=\"flex justify-between\">\n <p class=\"font-bold\">\n Envío\n </p>\n <button\n type=\"button\"\n class=\"font-medium text-z-turquoise-600 underline underline-offset-2\"\n @click=\"goToStep(1)\"\n >\n Editar\n </button>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Tipo de envío\n </p>\n <div\n class=\"mt-1\"\n >\n <p\n v-for=\"shippingMethodId in shippingMethodIds\"\n :key=\"shippingMethodId\"\n >\n {{ shippingMethods.find(so => so.id === shippingMethodId)?.name }}\n </p>\n </div>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Dirección\n </p>\n <p class=\"mt-1\">\n {{ address.displayName }}\n </p>\n </div>\n <base-tip\n title=\"Mi dirección\"\n class=\"mt-3\"\n >\n <template #icon>\n <img src=\"@/assets/icons/pin.svg\">\n </template>\n La dirección no será compartida hasta que el usuario arriende el producto.\n </base-tip>\n </div>\n <div\n class=\"border-y-2 border-z-gray-100 px-6 py-4 text-z-gray-900\"\n >\n <div class=\"flex justify-between\">\n <p class=\"font-bold\">\n Categorización\n </p>\n <button\n type=\"button\"\n class=\"font-medium text-z-turquoise-600 underline underline-offset-2\"\n @click=\"goToStep(2)\"\n >\n Editar\n </button>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Categoría\n </p>\n <p class=\"mt-1\">\n {{ categories.find(cat => cat.id == categoryId)?.name }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Subcategoría\n </p>\n <p class=\"mt-1\">\n {{ subcategories.find(subcat => subcat.id == subcategoryId)?.name }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Marca\n </p>\n <p class=\"mt-1\">\n {{ brand }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Modelo\n </p>\n <p class=\"mt-1\">\n {{ model }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Estado\n </p>\n <p class=\"mt-1\">\n {{ $t(`product.condition.${camelCase(condition as string)}`) }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Peso\n </p>\n <p class=\"mt-1\">\n {{ $t(`product.weight.${camelCase(weight as string)}`) }}\n </p>\n </div>\n </div>\n <div\n class=\"border-y-2 border-z-gray-100 px-6 py-4 text-z-gray-900\"\n >\n <div class=\"flex justify-between\">\n <p class=\"font-bold\">\n Descripción\n </p>\n <button\n type=\"button\"\n class=\"font-medium text-z-turquoise-600 underline underline-offset-2\"\n @click=\"goToStep(3)\"\n >\n Editar\n </button>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Descripción del producto\n </p>\n <p class=\"mt-1\">\n {{ description }}\n </p>\n </div>\n <div class=\"mt-6 w-full\">\n <p class=\"font-medium\">\n Fotos\n </p>\n <div class=\"mt-2 grid grid-cols-2 gap-4\">\n <img\n v-for=\"picture in picturesToShow\"\n :key=\"picture.id\"\n :src=\"picture.picture.webpSm.url\"\n class=\"aspect-square w-full rounded-lg object-cover\"\n >\n <img\n v-for=\"picture, index in pictures\"\n :key=\"index\"\n :src=\"generateURL(picture)\"\n class=\"aspect-square w-full rounded-lg object-cover\"\n >\n </div>\n </div>\n </div>\n <div\n class=\"border-t-2 border-z-gray-100 px-6 py-4 text-z-gray-900\"\n >\n <div class=\"flex justify-between\">\n <p class=\"font-bold\">\n Precio y ubicación\n </p>\n <button\n type=\"button\"\n class=\"font-medium text-z-turquoise-600 underline underline-offset-2\"\n @click=\"goToStep(4)\"\n >\n Editar\n </button>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Precio de arriendo por día\n </p>\n <p class=\"mt-1\">\n {{ currency(dailyPrice) }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Garantía\n </p>\n <p class=\"mt-1\">\n {{ currency(deposit) }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Mínima cantidad de días por arriendo\n </p>\n <p class=\"mt-1\">\n {{ minRange }} {{ minRange > 1 ? 'días' : 'día' }}\n </p>\n </div>\n <div class=\"mt-6\">\n <p class=\"font-medium\">\n Máxima cantidad de días por arriendo\n </p>\n <p class=\"mt-1\">\n {{ maxRange > 0 ? maxRange : 'Sin máximo' }} {{ maxRange > 1 ? 'días' : 'día' }}\n </p>\n </div>\n <base-button\n class=\"mt-8 w-full gap-2\"\n type=\"button\"\n :disabled=\"loading\"\n @click=\"handleClick()\"\n >\n <img\n v-if=\"loading\"\n src=\"@/assets/icons/loading-alt.svg\"\n class=\"w-10 animate-spin-slow\"\n >\n <template v-else>\n Guardar cambios\n <img src=\"@/assets/icons/arrow-small-right.svg\">\n </template>\n </base-button>\n </div>\n </template>\n <template v-else>\n <div class=\"sticky top-16 z-10\">\n <div\n class=\"grid h-0.5 w-full shrink-0 bg-z-turquoise-100\"\n :class=\"`grid-cols-5`\"\n >\n <div\n class=\"h-full w-full bg-z-turquoise-600\"\n :class=\"STEPS[currentStep].progressBarClass\"\n />\n </div>\n <div class=\"flex h-[84px] shrink-0 flex-col items-center justify-center bg-z-turquoise-50 text-z-turquoise-600\">\n <p class=\"font-semibold\">\n {{ currentStep + 1 }} de {{ STEPS.length }}\n </p>\n <p>{{ STEPS[currentStep].title }}</p>\n </div>\n </div>\n <div class=\"mx-6 mt-4 flex flex-col space-y-6\">\n <new-product-step-1\n v-if=\"currentStep === 0\"\n :summary-mode=\"summaryMode\"\n @continue=\"handleStep1\"\n />\n <new-product-step-2\n v-else-if=\"currentStep === 1\"\n :summary-mode=\"summaryMode\"\n @continue=\"handleStep2\"\n />\n <new-product-step-3\n v-else-if=\"currentStep === 2\"\n :summary-mode=\"summaryMode\"\n :categories=\"categories\"\n @continue=\"handleStep3\"\n />\n <edit-product-step-4\n v-else-if=\"currentStep === 3\"\n :summary-mode=\"summaryMode\"\n :product-pictures=\"product.productPictures\"\n @continue=\"handleStep4\"\n />\n <new-product-step-5\n v-if=\"currentStep === 4\"\n @continue=\"handleStep5\"\n />\n </div>\n </template>\n <success-modal\n :open=\"showSuccessMessage\"\n description=\"Su producto se ha actualizado de forma exitosa.\"\n @confirm=\"handleSuccess\"\n />\n </div>\n </the-layout>\n</template>\n","import { api } from './index';\n\nexport interface ProductRequestFormData extends ProductRequest {\n clientAccountId: number\n}\n\nexport const productRequestsApi = {\n create(data: Partial<ProductRequestFormData>, picture?: File) {\n const path = '/api/internal/product_requests';\n\n return api({\n method: 'post',\n headers: {\n 'Content-Type': 'multipart/form-data',\n },\n url: path,\n data: { ...data, picture },\n }).then(response => response.data.productRequest as ProductRequest);\n },\n};\n","<script setup lang=\"ts\">\nimport { computed, inject, ref } from 'vue';\nimport { object, string } from 'yup';\nimport { productRequestsApi } from '../api/product-requests';\n\nconst user = inject<User>('user');\n\nconst name = ref('');\nconst description = ref('');\nconst picture = ref<File>();\nconst loading = ref(false);\nconst error = ref(false);\n\nconst showSuccessModal = ref(false);\nfunction toggleSuccessModal() {\n showSuccessModal.value = !showSuccessModal.value;\n}\n\nconst formRules = object().shape({\n name: string().required('Debes ingresar un nombre'),\n description: string().required('Debes ingresar una descripción'),\n});\n\nfunction handleClick() {\n const formValues = {\n clientAccountId: user?.clientAccountId,\n name: name.value,\n description: description.value,\n };\n try {\n loading.value = true;\n productRequestsApi.create(formValues, picture.value);\n } catch (e) {\n error.value = true;\n } finally {\n loading.value = false;\n toggleSuccessModal();\n }\n}\n\nfunction handleBack() {\n window.history.back();\n}\n\nconst canSubmit = computed(() => (!!name.value && !!description.value && !!picture.value && !loading.value));\n</script>\n<template>\n <the-layout hide-navbar>\n <div class=\"relative bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"¿No encuentras lo que buscas?\"\n @back=\"handleBack\"\n />\n <p class=\"px-6 py-4 text-center text-z-gray-900\">\n Completando el formulario, ¡tu solicitud de producto será vistible para toda la comunidad Zirkular!\n </p>\n <v-form\n v-slot=\"{ meta, errors, handleSubmit }\"\n class=\"pb-16 md:mb-0\"\n :validation-schema=\"formRules\"\n >\n <div class=\"flex w-full flex-col space-y-4 px-6\">\n <base-input\n v-model=\"name\"\n placeholder=\"Nombre del producto que buscas\"\n label=\"Nombre del producto que buscas\"\n name=\"name\"\n :errors=\"errors.name && meta.touched\"\n />\n <base-input\n v-model=\"description\"\n type=\"textarea\"\n placeholder=\"Información adicional\"\n label=\"Información adicional\"\n name=\"description\"\n :errors=\"errors.description && meta.touched\"\n />\n <div class=\"space-y-3\">\n <p class=\"font-medium text-z-gray-900\">\n Foto referencial\n </p>\n <base-drag-and-drop\n v-model=\"picture\"\n label=\"Foto de referencia (opcional)\"\n hide-label\n name=\"picture\"\n max=\"1\"\n portrait\n required\n />\n </div>\n <base-tip\n title=\"Notificación\"\n >\n Si alguien tiene el producto que buscas, te notificaremos para que puedas arrendarlo rápidamente.\n </base-tip>\n </div>\n <div class=\"fixed bottom-16 flex w-full flex-col bg-white px-6 py-3 md:bottom-0 md:max-w-md\">\n <base-button\n :disabled=\"!canSubmit\"\n @click=\"handleSubmit($event, handleClick())\"\n >\n <img\n v-if=\"loading\"\n src=\"@/assets/icons/loading-alt.svg\"\n class=\"w-10 animate-spin-slow\"\n >\n <p v-else>\n Agregar solicitud\n </p>\n </base-button>\n </div>\n </v-form>\n <base-modal\n v-if=\"showSuccessModal\"\n :open=\"showSuccessModal\"\n >\n <div class=\"flex flex-col\">\n <img\n src=\"@/assets/icons/check-circle.svg\"\n class=\"w-20 self-center\"\n >\n <p class=\"mt-4 text-center font-medium text-z-gray-900\">\n Excelente!\n </p>\n <p class=\"mt-6 text-center text-z-gray-800\">\n Su solicitud ha sido agregada de forma exitosa.\n </p>\n <base-button\n href=\"/necesidades_clientes\"\n class=\"mt-4\"\n :variant=\"user?.hasBankAccount ? 'primary' : 'secondary'\"\n >\n Aceptar\n </base-button>\n </div>\n </base-modal>\n </div>\n </the-layout>\n</template>\n","export default \"__VITE_ASSET__c9293802__\"","<script setup lang=\"ts\">\nimport { formatDistanceToNow } from 'date-fns';\n\ninterface Props {\n productRequests?: ProductRequest[]\n}\n\ndefineProps<Props>();\n\nfunction handleBack() {\n window.location.href = '/menu';\n}\n</script>\n<template>\n <the-layout hide-navbar>\n <div class=\"relative bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"Necesidades de nuestros clientes\"\n no-border\n @back=\"handleBack\"\n />\n <div class=\"flex w-full flex-col px-6 py-3\">\n <div class=\"flex w-full space-x-2 rounded-lg bg-z-gray-100 px-3 py-2\">\n <img\n src=\"@/assets/icons/search.svg\"\n class=\"h-6\"\n >\n <input\n placeholder=\"Buscar\"\n class=\"w-full bg-z-gray-100 outline-none placeholder:text-z-gray-600\"\n >\n </div>\n </div>\n <div\n v-if=\"productRequests && productRequests.length > 0\"\n class=\"grid grid-cols-2 gap-2 p-6\"\n >\n <a\n v-for=\"productRequest in productRequests\"\n :key=\"productRequest.id\"\n class=\"flex flex-col rounded-lg border border-z-gray-100 p-2\"\n :href=\"`/necesidades_clientes/${productRequest.id}`\"\n >\n <img\n :src=\"productRequest.picture.webpMd.url\"\n class=\"aspect-square size-full rounded object-cover\"\n >\n <p class=\"mt-3 line-clamp-1 shrink-0 text-sm\">\n {{ productRequest.name }}\n </p>\n <p class=\"mt-1 line-clamp-1 shrink-0 text-xs text-z-gray-700\">\n Hace {{ formatDistanceToNow(new Date(productRequest.createdAt as unknown as string)) }}\n </p>\n </a>\n </div>\n <div\n v-else\n class=\"flex flex-col items-center space-y-6 px-6 py-4\"\n >\n <img src=\"@/assets/icons/task-search.svg\">\n <p>Aún no hay solicitudes.</p>\n </div>\n <div class=\"fixed bottom-16 w-full flex-col bg-white px-6 py-2 md:bottom-0 md:max-w-md\">\n <base-button\n class=\"w-full\"\n type=\"button\"\n href=\"/necesidades_clientes/crear\"\n >\n Agregar solicitud\n </base-button>\n </div>\n </div>\n </the-layout>\n</template>\n","<script setup lang=\"ts\">\nimport { ref } from 'vue';\n\ninterface Props {\n productRequest: ProductRequest\n}\ndefineProps<Props>();\n\nfunction handleBack() {\n window.location.href = '/necesidades_clientes';\n}\n\nconst showConfirmModal = ref(false);\nfunction toggleConfirmModal() {\n showConfirmModal.value = !showConfirmModal.value;\n}\n\n</script>\n<template>\n <the-layout hide-navbar>\n <div class=\"relative bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"Necesidades de nuestros clientes\"\n @back=\"handleBack\"\n />\n <div class=\"px-6 py-4\">\n <img\n :src=\"productRequest.picture.webpMd.url\"\n class=\"rounded-lg\"\n >\n <p class=\"mt-3 font-medium\">\n {{ productRequest.name }}\n </p>\n <p class=\"text-sm text-z-gray-800\">\n {{ productRequest.description }}\n </p>\n </div>\n <div class=\"fixed bottom-16 flex w-full flex-col px-6 py-3 md:bottom-6 md:max-w-md\">\n <base-button @click=\"toggleConfirmModal\">\n Lo tengo\n </base-button>\n </div>\n <base-modal\n :open=\"showConfirmModal\"\n @close=\"toggleConfirmModal\"\n >\n <div class=\"flex flex-col\">\n <img\n src=\"@/assets/icons/information-circle.svg\"\n class=\"w-20 self-center\"\n >\n <p class=\"mt-4 text-center font-medium text-z-gray-900\">\n Importante\n </p>\n <p class=\"mt-6 text-center text-z-gray-800\">\n Antes de notificar al cliente,\n necesitamos que subas primero tu producto y lo hagas visible en nuestra plataforma.\n </p>\n <base-button\n :href=\"`/productos/crear?request_id=${productRequest.id}`\"\n class=\"mt-4\"\n >\n Subir producto\n </base-button>\n </div>\n </base-modal>\n </div>\n </the-layout>\n</template>\n","<script setup lang=\"ts\">\n</script>\n<template>\n <the-layout hide-navbar>\n <div class=\"flex flex-col items-center p-6 md:mx-auto md:my-6 md:max-w-md md:rounded md:bg-white\">\n <img src=\"@/assets/icons/check-circle.svg\">\n <p class=\"mt-2 text-center font-medium text-z-gray-900\">\n ¡Tu pago ha sido acreditado exitosamente!\n </p>\n <p />\n <base-button\n href=\"/perfil/solicitudes_reservas/cliente\"\n class=\"mt-6 w-full\"\n >\n Ir a mis arriendos\n </base-button>\n <base-button\n href=\"/\"\n variant=\"secondary\"\n class=\"mt-4 w-full\"\n >\n Volver al inicio\n </base-button>\n </div>\n </the-layout>\n</template>\n","<script setup lang=\"ts\">\n</script>\n<template>\n <the-layout hide-navbar>\n <div class=\"flex flex-col items-center p-6 md:mx-auto md:my-6 md:max-w-md md:rounded md:bg-white\">\n <img\n src=\"@/assets/icons/warning-alt-2.svg\"\n class=\"w-20\"\n >\n <p class=\"mt-2 text-center font-medium text-z-gray-900\">\n La confirmación de tu pago ha fallado, inténtalo nuevamente.\n </p>\n <p />\n <base-button\n href=\"/perfil/solicitudes_reservas/cliente\"\n class=\"mt-6 w-full\"\n >\n Ir a mis arriendos\n </base-button>\n <base-button\n href=\"/\"\n variant=\"secondary\"\n class=\"mt-4 w-full\"\n >\n Volver al inicio\n </base-button>\n </div>\n </the-layout>\n</template>\n","<script setup lang=\"ts\">\nimport { supportChatMessagesApi } from '@/api/support-chat-messages';\nimport { useActionCable } from '@/hooks/actioncable';\nimport { convertKeys } from '@/utils/case-converter';\nimport { format } from 'date-fns';\nimport { groupBy, sortBy } from 'lodash';\nimport { computed, inject, ref } from 'vue';\n\ninterface Props {\n supportChat: SupportChat\n productBooking: ProductBooking\n}\n\nconst props = defineProps<Props>();\n\nconst user = inject<User>('user');\n\nconst message = ref();\n\nfunction sendMessage() {\n if (!!message.value) {\n supportChatMessagesApi.create({\n supportChatId: props.supportChat.id,\n userId: user?.id,\n content: message.value,\n });\n message.value = '';\n }\n}\n\nconst newMessages = ref<SupportChatMessage[]>([]);\n\nuseActionCable(\n { channel: 'SupportChatChannel', id: props.supportChat.id },\n {\n received(eventNewResource:Record<string, unknown>) {\n const newMessage = convertKeys(eventNewResource, 'camelize');\n newMessages.value.push(newMessage as unknown as SupportChatMessage);\n },\n },\n);\n\nconst sortedMessages = computed(() => {\n let allMessages = newMessages.value;\n if (props.supportChat.supportChatMessages) {\n allMessages = allMessages.concat(props.supportChat.supportChatMessages);\n }\n\n return groupBy(sortBy(allMessages, 'createdAt'), (msg) => format(new Date(msg.createdAt), 'yyyy-MM-dd'));\n});\n\nfunction handleBack() {\n window.history.back();\n}\n</script>\n<template>\n <the-layout\n hide-navbar\n :active-menu=\"3\"\n >\n <div class=\"relative bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <div\n class=\"sticky top-0 z-10 flex w-full shrink-0 flex-col border-b border-z-gray-100 bg-white px-6 py-5\"\n >\n <div class=\"flex items-center justify-between\">\n <div class=\"flex shrink-0 space-x-2\">\n <button @click=\"handleBack\">\n <img src=\"@/assets/icons/chevron-left-alt.svg\">\n </button>\n <p class=\"line-clamp-1 font-medium text-z-gray-900\">\n [Soporte] Arriendo de {{ productBooking.product.name }}\n </p>\n </div>\n </div>\n <p\n class=\"mt-1 text-end text-sm font-light text-z-gray-500\"\n >\n {{ format(new Date(productBooking.startDate), \"d 'de' MMM\") }}\n -\n {{ format(new Date(productBooking.endDate), \"d 'de' MMM\") }}\n </p>\n </div>\n <div class=\"min-h-[calc(100vh-88px-70px-64px)] flex-col overflow-y-scroll bg-white px-6\">\n <div\n v-for=\"group, key in sortedMessages\"\n :key=\"key\"\n class=\"mt-4 flex flex-col\"\n >\n <p class=\"mb-4 w-full text-center text-xs\">\n {{ format(new Date(key), \"d 'de' MMM\") }}\n </p>\n <div class=\"flex w-full flex-col space-y-1\">\n <div\n v-for=\"msg in group\"\n :key=\"msg.id\"\n class=\"w-64 rounded-lg p-3 text-sm\"\n :class=\"msg.userId === user?.id ?\n 'bg-z-gray-900 text-z-gray-100 self-end' :\n 'bg-z-gray-100 text-z-gray-900 self-start'\"\n >\n {{ msg.content }}\n </div>\n </div>\n </div>\n </div>\n <div class=\"fixed bottom-16 h-[70px] w-full border-t border-z-gray-100 bg-white px-6 py-3 md:bottom-0 md:max-w-md\">\n <div class=\"flex h-full justify-between rounded-lg border border-z-gray-100 px-3 py-2\">\n <input\n v-model=\"message\"\n class=\"h-full w-full text-sm text-z-gray-800 outline-none placeholder:text-sm placeholder:text-z-gray-500\"\n placeholder=\"Escribe un mensaje\"\n @keydown.enter.stop.prevent=\"sendMessage\"\n >\n <button\n class=\"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-z-turquoise-600\"\n @click=\"sendMessage\"\n >\n <img\n src=\"@/assets/icons/send.svg\"\n class=\"h-4 w-4\"\n >\n </button>\n </div>\n </div>\n </div>\n </the-layout>\n</template>\n","export default \"__VITE_ASSET__acaf8155__\"","<script setup lang=\"ts\">\nimport { rutFormat } from 'rut-helpers';\nimport { computed, inject, ref } from 'vue';\nimport * as usersApi from '@/api/users';\nimport successModal from './success-modal.vue';\nimport ProfileNewBankAccountForm from './profile/profile-new-bank-account-form.vue';\n\nconst user = inject<User>('user');\n\nconst currentStep = ref(0);\n\nconst rut = ref<string>('');\nconst phoneNumber = ref<string>('');\nconst birthDate = ref<string>('');\n\nconst error = ref(false);\nconst loading = ref(false);\n\nconst STEPS = [\n { title: 'Verificación de identidad', progressBarClass: 'col-span-1' },\n { title: 'Cuenta bancaria', progressBarClass: 'col-span-2' },\n];\n\nfunction handleStepBack() {\n currentStep.value--;\n}\n\nfunction handleNextStep() {\n currentStep.value++;\n}\n\nfunction handleRutInput() {\n error.value = false;\n rut.value = rutFormat(rut.value);\n}\n\nconst showSuccessModal = ref(false);\nfunction toggleSuccessModal() {\n showSuccessModal.value = !showSuccessModal.value;\n}\n\nconst queryParams = new URLSearchParams(window.location.search);\nconst from = queryParams.get('from');\nconst redirectTo = queryParams.get('redirect_to');\n\nconst showBankAccountStep = computed(() => !user?.hasBankAccount && user?.partnerAccountId);\n\nfunction handleVerify() {\n const formValues = {\n rut: rut.value,\n phoneNumber: phoneNumber.value,\n birthDate: birthDate.value,\n };\n loading.value = true;\n usersApi.update(user?.id ?? 0, formValues).then(() => {\n setTimeout(() => {\n loading.value = false;\n if (showBankAccountStep.value) {\n handleNextStep();\n } else {\n toggleSuccessModal();\n }\n // eslint-disable-next-line no-magic-numbers\n }, 2000);\n });\n}\n\nfunction goBack() {\n if (from === 'new_product_form') {\n window.location.href = '/perfil';\n } else {\n window.history.back();\n }\n}\n\nfunction handleSuccess() {\n window.location.href = redirectTo ?? '/';\n}\n</script>\n<template>\n <the-layout hide-navbar>\n <div class=\"absolute top-0 flex h-full w-full flex-col bg-white md:relative md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-64px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"Verifica tu cuenta\"\n class=\"md:rounded\"\n @back=\"goBack\"\n />\n <div\n v-if=\"showBankAccountStep\"\n class=\"sticky top-16 z-10\"\n >\n <div\n class=\"grid h-0.5 w-full shrink-0 grid-cols-2 bg-z-turquoise-100\"\n >\n <div\n class=\"h-full w-full bg-z-turquoise-600\"\n :class=\"STEPS[currentStep].progressBarClass\"\n />\n </div>\n <div class=\"relative flex h-[84px] shrink-0 flex-col items-center justify-center bg-z-turquoise-50 text-z-turquoise-600 shadow-sm\">\n <button\n v-if=\"currentStep != 0\"\n class=\"absolute left-24\"\n @click=\"handleStepBack\"\n >\n <img\n src=\"@/assets/icons/chevron-left-turquoise.svg\"\n class=\"h-8\"\n >\n </button>\n <p class=\"font-semibold\">\n {{ currentStep + 1 }} de {{ STEPS.length }}\n </p>\n <p>{{ STEPS[currentStep].title }}</p>\n </div>\n </div>\n <div class=\"mt-4\">\n <div\n v-if=\"currentStep === 0\"\n class=\"mx-6 flex flex-col space-y-6\"\n >\n <base-input\n v-model=\"rut\"\n name=\"rut\"\n label=\"RUT\"\n placeholder=\"RUT\"\n :error=\"error\"\n @update:model-value=\"handleRutInput\"\n />\n <base-input\n v-model=\"phoneNumber\"\n name=\"phoneNumber\"\n label=\"Número de teléfono\"\n placeholder=\"Número de teléfono\"\n type=\"tel\"\n minlength=\"9\"\n maxlength=\"9\"\n :error=\"error\"\n >\n <template #before>\n <div class=\"flex h-14 w-14 items-center justify-center rounded border-y border-l border-z-gray-200 bg-z-gray-100 px-3 py-4\">\n +56\n </div>\n </template>\n </base-input>\n <base-input\n v-model=\"birthDate\"\n type=\"date\"\n name=\"birthDate\"\n label=\"Fecha de nacimiento\"\n placeholder=\"Fecha de nacimiento\"\n label-outside\n />\n </div>\n <template v-else-if=\"currentStep === 1\">\n <profile-new-bank-account-form\n button-label=\"Verificar\"\n :rut=\"rut\"\n @success=\"toggleSuccessModal\"\n />\n </template>\n </div>\n <div\n v-if=\"currentStep === 0\"\n class=\"flex flex-col px-6 py-4\"\n >\n <base-button\n class=\"fixed bottom-0\"\n :disabled=\"!rut || !birthDate || !phoneNumber || loading\"\n @click=\"handleVerify\"\n >\n <img\n v-if=\"loading\"\n src=\"@/assets/icons/loading-alt.svg\"\n class=\"w-10 animate-spin-slow\"\n >\n <p v-else>\n {{ showBankAccountStep && currentStep === 0 ? 'Continuar' : 'Verificar' }}\n </p>\n </base-button>\n </div>\n <success-modal\n :open=\"showSuccessModal\"\n description=\"Su cuenta ha sido verificada exitosamente.\"\n @confirm=\"handleSuccess\"\n />\n </div>\n </the-layout>\n</template>\n","<script setup lang=\"ts\">\nimport { formatDate } from '@/utils/format-date';\nimport { formatDistanceToNowStrict,\n\n} from 'date-fns';\nimport { computed } from 'vue';\n\ninterface Props {\n supportChat: SupportChat\n}\n\nconst props = defineProps<Props>();\n\nconst lastMessage = computed(() => props.supportChat.supportChatMessages.at(-1));\n</script>\n<template>\n <a\n class=\"flex w-full space-x-6 bg-white px-6 py-4\"\n :href=\"`/soporte/${supportChat.id}`\"\n >\n <img\n :src=\"supportChat.productBooking.productPictures[0].picture.webpSm.url\"\n class=\"h-12 w-12 shrink-0 object-cover\"\n >\n <div class=\"flex w-full flex-col\">\n <div class=\"flex justify-between\">\n <p class=\"font-medium text-z-gray-800\">\n {{ supportChat.productBooking.product.name }}\n ({{ formatDate(supportChat.productBooking.startDate) }}\n - {{ formatDate(supportChat.productBooking.endDate) }})\n </p>\n <p\n v-if=\"lastMessage\"\n class=\"shrink-0 font-light text-z-gray-500\"\n >\n {{ formatDistanceToNowStrict(new Date(lastMessage?.createdAt)) }}\n </p>\n </div>\n <p\n v-if=\"lastMessage\"\n class=\"text-sm font-light text-z-gray-500\"\n >\n {{ lastMessage?.content }}\n </p>\n </div>\n </a>\n</template>\n","<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport supportChatCard from './support-chat-card.vue';\n\ninterface Props {\n activeSupportChats: SupportChat[] | null\n resolvedSupportChats: SupportChat[] | null\n}\n\ndefineProps<Props>();\n\nconst activeTab = ref(0);\n\nfunction setActiveTab(index: number) {\n activeTab.value = index;\n}\n\nfunction handleBack() {\n window.history.back();\n}\n</script>\n<template>\n <the-layout\n :active-menu=\"3\"\n hide-navbar\n >\n <div class=\"relative bg-white md:mx-auto md:my-6 md:h-[calc(100vh-72px-24px-24px)] md:max-w-md md:overflow-y-scroll md:rounded\">\n <the-titlebar\n title=\"Chats de soporte\"\n @back=\"handleBack\"\n />\n <div\n class=\"grid grid-cols-2\"\n >\n <button\n class=\"h-12 border-b text-sm\"\n :class=\"activeTab === 0 ? ' border-z-turquoise-600' : 'border-z-gray-200'\"\n @click=\"setActiveTab(0)\"\n >\n Activos\n </button>\n <button\n class=\"h-12 border-b text-sm\"\n :class=\"activeTab === 1 ? ' border-z-turquoise-600' : 'border-z-gray-200'\"\n @click=\"setActiveTab(1)\"\n >\n Cerrados\n </button>\n </div>\n <div class=\"flex w-full flex-col divide-y divide-z-gray-100\">\n <template v-if=\"activeTab === 0\">\n <support-chat-card\n v-for=\"supportChat in activeSupportChats\"\n :key=\"supportChat.id\"\n :support-chat=\"supportChat\"\n />\n </template>\n <template v-else>\n <support-chat-card\n v-for=\"supportChat in resolvedSupportChats\"\n :key=\"supportChat.id\"\n :support-chat=\"supportChat\"\n />\n </template>\n </div>\n </div>\n </the-layout>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\n\ninterface Props {\n disabled?: boolean;\n variant?: 'primary' | 'secondary' | 'danger';\n size?: 'sm' | 'md'\n notification?: boolean;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n disabled: false,\n variant: 'primary',\n size: 'md',\n notification: false,\n});\n\nconst attrs = useAttrs();\nconst currentTag = computed(() => (attrs.href ? 'a' : 'button'));\n\nconst variants = {\n primary: 'bg-z-turquoise-600 text-white',\n secondary: 'border border-z-turquoise-600 text-z-turquoise-600 hover:text-white hover:bg-z-turquoise-600',\n danger: 'border border-z-red bg-white text-z-red hover:bg-z-red hover:text-white',\n};\n\nconst sizes = {\n sm: 'h-10',\n md: 'h-12',\n};\n\nconst dynamicClasses = computed(() => [variants[props.variant], sizes[props.size]].join(' '));\n</script>\n<template>\n <component\n :is=\"currentTag\"\n class=\"relative flex items-center justify-center rounded text-center transition disabled:bg-z-gray-500\"\n :class=\"dynamicClasses\"\n :disabled=\"disabled\"\n >\n <div\n v-if=\"notification\"\n class=\"absolute -right-1 -top-1 h-4 w-4 rounded-full bg-amber-400 shadow-sm \"\n />\n <slot />\n </component>\n</template>\n","<script setup lang=\"ts\">\nimport { useField } from 'vee-validate';\nimport { ref } from 'vue';\n\ninterface Props {\n modelValue?: File;\n label?: string;\n name: string;\n required?: boolean;\n error?: boolean;\n accept?: string;\n multiple?: boolean;\n capture?: 'user' | 'environment';\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n label: '',\n modelValue: undefined,\n hideLabel: false,\n disabled: false,\n accept: '*',\n capture: undefined,\n});\n\nconst {\n value: inputValue,\n handleBlur,\n handleChange,\n} = useField(props.name, undefined, {\n initialValue: props.modelValue,\n});\n\nconst uploadedFile = ref<File|undefined>(props.modelValue ?? undefined);\nconst fileInput = ref();\n\nfunction onChange() {\n uploadedFile.value = fileInput.value.files[0];\n handleChange(uploadedFile.value);\n}\n</script>\n<template>\n <label\n for=\"fileInput\"\n :class=\"$attrs.class\"\n >\n <slot />\n </label>\n <input\n id=\"fileInput\"\n ref=\"fileInput\"\n type=\"file\"\n :multiple=\"multiple\"\n :name=\"name\"\n class=\"absolute overflow-hidden opacity-0\"\n :accept=\"accept\"\n :capture=\"capture\"\n @change=\"onChange\"\n @blur=\"handleBlur\"\n >\n</template>\n","export default \"__VITE_ASSET__2e0b90f5__\"","export default \"__VITE_ASSET__6586b394__\"","<script setup lang=\"ts\">\nimport { useField } from 'vee-validate';\nimport { useAttrs, watch, computed, ref } from 'vue';\n\ninterface Props {\n id?: string\n type?: string\n modelValue?: string | number\n label: string\n placeholder?: string\n name: string\n required?: boolean\n attention?: boolean\n error?: boolean\n labelOutside?: boolean\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n id: undefined,\n type: 'text',\n modelValue: undefined,\n placeholder: undefined,\n errorMessage: undefined,\n attention: false,\n error: false,\n labelOutside: false,\n});\n\nconst emit = defineEmits<{(e: 'update:modelValue', value: number | string): void}>();\n\nconst showLabelInside = computed(() => !!inputValue.value);\n\nconst showPassword = ref(false);\n\nfunction togglePassword() {\n showPassword.value = !showPassword.value;\n}\n\nconst passwordType = computed(() => (showPassword.value ? 'text' : 'password'));\n\nconst {\n meta,\n value: inputValue,\n errorMessage,\n handleBlur,\n handleChange,\n} = useField(props.name, undefined, {\n initialValue: props.modelValue,\n});\n\nwatch(inputValue, (newVal) => {\n if (newVal === props.modelValue) {\n return;\n }\n emit('update:modelValue', newVal);\n});\nwatch(\n () => props.modelValue,\n (newModel) => {\n if (newModel) {\n if (newModel === inputValue.value) {\n return;\n }\n inputValue.value = newModel;\n }\n },\n);\n\nconst attrs = useAttrs();\n\n</script>\n<script lang=\"ts\">\nconst options = { inheritAttrs: false };\nexport { options };\n</script>\n\n<template>\n <div\n class=\"flex w-full flex-col\"\n :class=\"attrs['class']\"\n >\n <base-label\n v-if=\"labelOutside\"\n :label=\"label\"\n :name=\"name\"\n :required=\"required\"\n class=\"mb-4 text-black\"\n />\n <div class=\"relative flex\">\n <slot name=\"before\" />\n <div\n v-if=\"showLabelInside\"\n class=\"absolute top-1.5 flex h-14 items-center px-3\"\n >\n <slot name=\"prefix\" />\n </div>\n <base-label\n v-if=\"!labelOutside && showLabelInside\"\n :label=\"label\"\n :name=\"name\"\n :required=\"required\"\n class=\"absolute ml-3 mt-1 text-xs text-z-gray-500\"\n >\n <slot name=\"label\" />\n </base-label>\n <component\n :is=\"type === 'textarea' ? 'textarea' : 'input'\"\n v-bind=\"attrs\"\n :id=\"id\"\n :value=\"inputValue\"\n :placeholder=\"placeholder\"\n :name=\"name\"\n :type=\"type === 'password' ? passwordType : type\"\n :required=\"required\"\n :aria-label=\"label\"\n class=\"h-14 w-full rounded border border-z-gray-200 text-gray-900 outline-none\n read-only:bg-z-gray-100 read-only:text-z-gray-600 focus:border-z-gray-600 disabled:border-z-gray-600\n disabled:bg-z-gray-100 disabled:text-z-gray-600\"\n :class=\"{\n 'border-z-red': error || (!!errorMessage && meta.touched),\n 'border-z-turquoise-600': attention,\n 'p-3': labelOutside || !showLabelInside,\n 'px-3 pb-0 pt-3': !labelOutside && showLabelInside,\n 'placeholder:text-z-gray-900': !labelOutside,\n 'placeholder:text-z-gray-600': labelOutside,\n 'pr-11': type === 'password',\n 'h-32': type === 'textarea',\n 'pt-5': type === 'textarea' && showLabelInside,\n 'appearance-none': type === 'number',\n 'pl-6' : $slots.prefix && showLabelInside,\n 'rounded-l-none': $slots.before,\n }\"\n @input=\"handleChange\"\n @blur=\"handleBlur\"\n />\n <button\n v-if=\"type === 'password'\"\n class=\"absolute right-0 flex h-14 items-center justify-center px-3\"\n type=\"button\"\n @click.prevent=\"togglePassword\"\n >\n <img\n v-if=\"showPassword\"\n src=\"@/assets/icons/eye-off.svg\"\n >\n <img\n v-else\n src=\"@/assets/icons/eye.svg\"\n >\n </button>\n <slot\n name=\"after\"\n />\n </div>\n </div>\n</template>\n","/**\n * Vue Currency Input 3.1.0\n * (c) 2018-2024 Matthias Stiller\n * @license MIT\n */\nimport { ref, getCurrentInstance, version, computed, watch } from 'vue';\n\nvar CurrencyDisplay;\n(function (CurrencyDisplay) {\n CurrencyDisplay[\"symbol\"] = \"symbol\";\n CurrencyDisplay[\"narrowSymbol\"] = \"narrowSymbol\";\n CurrencyDisplay[\"code\"] = \"code\";\n CurrencyDisplay[\"name\"] = \"name\";\n CurrencyDisplay[\"hidden\"] = \"hidden\";\n})(CurrencyDisplay || (CurrencyDisplay = {}));\nvar ValueScaling;\n(function (ValueScaling) {\n ValueScaling[\"precision\"] = \"precision\";\n ValueScaling[\"thousands\"] = \"thousands\";\n ValueScaling[\"millions\"] = \"millions\";\n ValueScaling[\"billions\"] = \"billions\";\n})(ValueScaling || (ValueScaling = {}));\n\nconst escapeRegExp = (str) => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n};\nconst removeLeadingZeros = (str) => {\n return str.replace(/^0+(0$|[^0])/, '$1');\n};\nconst count = (str, search) => {\n return (str.match(new RegExp(escapeRegExp(search), 'g')) || []).length;\n};\nconst substringBefore = (str, search) => {\n return str.substring(0, str.indexOf(search));\n};\n\nconst DECIMAL_SEPARATORS = [\n ',',\n '.',\n '٫',\n '。'\n];\nconst INTEGER_PATTERN = '(0|[1-9]\\\\d*)';\nclass CurrencyFormat {\n constructor(options) {\n var _a, _b, _c, _d, _e, _f;\n const { currency, currencyDisplay, locale, precision, accountingSign, useGrouping } = options;\n this.locale = locale;\n this.options = {\n currency,\n useGrouping,\n style: 'currency',\n currencySign: accountingSign ? 'accounting' : undefined,\n currencyDisplay: currencyDisplay !== CurrencyDisplay.hidden ? currencyDisplay : undefined\n };\n const numberFormat = new Intl.NumberFormat(locale, this.options);\n const formatParts = numberFormat.formatToParts(123456);\n this.currency = (_a = formatParts.find(({ type }) => type === 'currency')) === null || _a === void 0 ? void 0 : _a.value;\n this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((i) => i.toLocaleString(locale));\n this.decimalSymbol = (_b = formatParts.find(({ type }) => type === 'decimal')) === null || _b === void 0 ? void 0 : _b.value;\n this.groupingSymbol = (_c = formatParts.find(({ type }) => type === 'group')) === null || _c === void 0 ? void 0 : _c.value;\n this.minusSign = (_d = numberFormat.formatToParts(-1).find(({ type }) => type === 'minusSign')) === null || _d === void 0 ? void 0 : _d.value;\n if (this.decimalSymbol === undefined) {\n this.minimumFractionDigits = this.maximumFractionDigits = 0;\n }\n else if (typeof precision === 'number') {\n this.minimumFractionDigits = this.maximumFractionDigits = precision;\n }\n else {\n this.minimumFractionDigits = (_e = precision === null || precision === void 0 ? void 0 : precision.min) !== null && _e !== void 0 ? _e : numberFormat.resolvedOptions().minimumFractionDigits;\n this.maximumFractionDigits = (_f = precision === null || precision === void 0 ? void 0 : precision.max) !== null && _f !== void 0 ? _f : numberFormat.resolvedOptions().maximumFractionDigits;\n }\n const getPrefix = (str) => {\n return substringBefore(str, this.digits[1]);\n };\n const getSuffix = (str) => {\n return str.substring(str.lastIndexOf(this.decimalSymbol ? this.digits[0] : this.digits[1]) + 1);\n };\n this.prefix = getPrefix(numberFormat.format(1));\n this.suffix = getSuffix(numberFormat.format(1));\n this.negativePrefix = getPrefix(numberFormat.format(-1));\n this.negativeSuffix = getSuffix(numberFormat.format(-1));\n }\n parse(str) {\n if (str) {\n const negative = this.isNegative(str);\n str = this.normalizeDigits(str);\n str = this.stripCurrency(str, negative);\n str = this.stripSignLiterals(str);\n const fraction = this.decimalSymbol ? `(?:${escapeRegExp(this.decimalSymbol)}(\\\\d*))?` : '';\n const match = this.stripGroupingSeparator(str).match(new RegExp(`^${INTEGER_PATTERN}${fraction}$`));\n if (match && this.isValidIntegerFormat(this.decimalSymbol ? str.split(this.decimalSymbol)[0] : str, Number(match[1]))) {\n return Number(`${negative ? '-' : ''}${this.onlyDigits(match[1])}.${this.onlyDigits(match[2] || '')}`);\n }\n }\n return null;\n }\n isValidIntegerFormat(formattedNumber, integerNumber) {\n const options = { ...this.options, minimumFractionDigits: 0 };\n return [\n this.stripCurrency(this.normalizeDigits(integerNumber.toLocaleString(this.locale, { ...options, useGrouping: true })), false),\n this.stripCurrency(this.normalizeDigits(integerNumber.toLocaleString(this.locale, { ...options, useGrouping: false })), false)\n ].includes(formattedNumber);\n }\n format(value, options = {\n minimumFractionDigits: this.minimumFractionDigits,\n maximumFractionDigits: this.maximumFractionDigits\n }) {\n return value != null ? value.toLocaleString(this.locale, { ...this.options, ...options }) : '';\n }\n toFraction(str) {\n return `${this.digits[0]}${this.decimalSymbol}${this.onlyLocaleDigits(str.substring(1)).substring(0, this.maximumFractionDigits)}`;\n }\n isFractionIncomplete(str) {\n return !!this.normalizeDigits(this.stripGroupingSeparator(str)).match(new RegExp(`^${INTEGER_PATTERN}${escapeRegExp(this.decimalSymbol)}$`));\n }\n isNegative(str) {\n return (str.startsWith(this.negativePrefix) ||\n (this.minusSign === undefined && (str.startsWith('(') || str.startsWith('-'))) ||\n (this.minusSign !== undefined && str.replace('-', this.minusSign).startsWith(this.minusSign)));\n }\n insertCurrency(str, negative) {\n return `${negative ? this.negativePrefix : this.prefix}${str}${negative ? this.negativeSuffix : this.suffix}`;\n }\n stripGroupingSeparator(str) {\n return this.groupingSymbol !== undefined ? str.replace(new RegExp(escapeRegExp(this.groupingSymbol), 'g'), '') : str;\n }\n stripSignLiterals(str) {\n if (this.minusSign !== undefined) {\n return str.replace('-', this.minusSign).replace(this.minusSign, '');\n }\n else {\n return str.replace(/[-()]/g, '');\n }\n }\n stripCurrency(str, negative) {\n return str.replace(negative ? this.negativePrefix : this.prefix, '').replace(negative ? this.negativeSuffix : this.suffix, '');\n }\n normalizeDecimalSeparator(str, from) {\n DECIMAL_SEPARATORS.forEach((s) => {\n str = str.substring(0, from) + str.substring(from).replace(s, this.decimalSymbol);\n });\n return str;\n }\n normalizeDigits(str) {\n if (this.digits[0] !== '0') {\n this.digits.forEach((digit, index) => {\n str = str.replace(new RegExp(digit, 'g'), String(index));\n });\n }\n return str;\n }\n onlyDigits(str) {\n return this.normalizeDigits(str).replace(/\\D+/g, '');\n }\n onlyLocaleDigits(str) {\n return str.replace(new RegExp(`[^${this.digits.join('')}]*`, 'g'), '');\n }\n}\n\nclass AbstractInputMask {\n constructor(currencyFormat) {\n this.currencyFormat = currencyFormat;\n }\n}\nclass DefaultInputMask extends AbstractInputMask {\n conformToMask(str, previousConformedValue = '') {\n const negative = this.currencyFormat.isNegative(str);\n const isEmptyNegativeValue = (str) => str === '' &&\n negative &&\n !(this.currencyFormat.minusSign === undefined\n ? previousConformedValue === this.currencyFormat.negativePrefix + this.currencyFormat.negativeSuffix\n : previousConformedValue === this.currencyFormat.negativePrefix);\n const checkIncompleteValue = (str) => {\n if (isEmptyNegativeValue(str)) {\n return '';\n }\n else if (this.currencyFormat.maximumFractionDigits > 0) {\n if (this.currencyFormat.isFractionIncomplete(str)) {\n return str;\n }\n else if (str.startsWith(this.currencyFormat.decimalSymbol)) {\n return this.currencyFormat.toFraction(str);\n }\n }\n return null;\n };\n let value = str;\n value = this.currencyFormat.stripCurrency(value, negative);\n value = this.currencyFormat.stripSignLiterals(value);\n const incompleteValue = checkIncompleteValue(value);\n if (incompleteValue != null) {\n return this.currencyFormat.insertCurrency(incompleteValue, negative);\n }\n const [integer, ...fraction] = value.split(this.currencyFormat.decimalSymbol);\n const integerDigits = removeLeadingZeros(this.currencyFormat.onlyDigits(integer));\n const fractionDigits = this.currencyFormat.onlyDigits(fraction.join('')).substring(0, this.currencyFormat.maximumFractionDigits);\n const invalidFraction = fraction.length > 0 && fractionDigits.length === 0;\n const invalidNegativeValue = integerDigits === '' &&\n negative &&\n (this.currencyFormat.minusSign === undefined\n ? previousConformedValue === str.slice(0, -2) + this.currencyFormat.negativeSuffix\n : previousConformedValue === str.slice(0, -1));\n if (invalidFraction || invalidNegativeValue || isEmptyNegativeValue(integerDigits)) {\n return previousConformedValue;\n }\n else if (integerDigits.match(/\\d+/)) {\n return {\n numberValue: Number(`${negative ? '-' : ''}${integerDigits}.${fractionDigits}`),\n fractionDigits\n };\n }\n else {\n return '';\n }\n }\n}\nclass AutoDecimalDigitsInputMask extends AbstractInputMask {\n conformToMask(str, previousConformedValue = '') {\n if (str === '' ||\n (this.currencyFormat.parse(previousConformedValue) === 0 &&\n this.currencyFormat.stripCurrency(previousConformedValue, true).slice(0, -1) === this.currencyFormat.stripCurrency(str, true))) {\n return '';\n }\n const negative = this.currencyFormat.isNegative(str);\n const numberValue = this.currencyFormat.stripSignLiterals(str) === ''\n ? -0\n : Number(`${negative ? '-' : ''}${removeLeadingZeros(this.currencyFormat.onlyDigits(str))}`) / Math.pow(10, this.currencyFormat.maximumFractionDigits);\n return {\n numberValue,\n fractionDigits: numberValue.toFixed(this.currencyFormat.maximumFractionDigits).slice(-this.currencyFormat.maximumFractionDigits)\n };\n }\n}\n\nconst DEFAULT_OPTIONS = {\n locale: undefined,\n currency: undefined,\n currencyDisplay: undefined,\n hideGroupingSeparatorOnFocus: true,\n hideCurrencySymbolOnFocus: true,\n hideNegligibleDecimalDigitsOnFocus: true,\n precision: undefined,\n autoDecimalDigits: false,\n valueRange: undefined,\n useGrouping: undefined,\n valueScaling: undefined\n};\nclass CurrencyInput {\n constructor(args) {\n this.el = args.el;\n this.onInput = args.onInput;\n this.onChange = args.onChange;\n this.addEventListener();\n this.init(args.options);\n }\n setOptions(options) {\n this.init(options);\n this.format(this.currencyFormat.format(this.validateValueRange(this.numberValue)));\n this.onChange(this.getValue());\n }\n getValue() {\n const numberValue = this.valueScaling && this.numberValue != null ? this.toInteger(this.numberValue, this.valueScaling) : this.numberValue;\n return { number: numberValue, formatted: this.formattedValue };\n }\n setValue(value) {\n const newValue = this.valueScaling !== undefined && value != null ? this.toFloat(value, this.valueScaling) : value;\n if (newValue !== this.numberValue) {\n this.format(this.currencyFormat.format(this.validateValueRange(newValue)));\n this.onChange(this.getValue());\n }\n }\n init(options) {\n this.options = {\n ...DEFAULT_OPTIONS,\n ...options\n };\n if (this.options.autoDecimalDigits) {\n this.options.hideNegligibleDecimalDigitsOnFocus = false;\n }\n if (!this.el.getAttribute('inputmode')) {\n this.el.setAttribute('inputmode', this.options.autoDecimalDigits ? 'numeric' : 'decimal');\n }\n this.currencyFormat = new CurrencyFormat(this.options);\n this.numberMask = this.options.autoDecimalDigits ? new AutoDecimalDigitsInputMask(this.currencyFormat) : new DefaultInputMask(this.currencyFormat);\n const valueScalingOptions = {\n [ValueScaling.precision]: this.currencyFormat.maximumFractionDigits,\n [ValueScaling.thousands]: 3,\n [ValueScaling.millions]: 6,\n [ValueScaling.billions]: 9\n };\n this.valueScaling = this.options.valueScaling ? valueScalingOptions[this.options.valueScaling] : undefined;\n this.valueScalingFractionDigits =\n this.valueScaling !== undefined && this.options.valueScaling !== ValueScaling.precision\n ? this.valueScaling + this.currencyFormat.maximumFractionDigits\n : this.currencyFormat.maximumFractionDigits;\n this.minValue = this.getMinValue();\n this.maxValue = this.getMaxValue();\n }\n getMinValue() {\n var _a, _b;\n let min = this.toFloat(-Number.MAX_SAFE_INTEGER);\n if (((_a = this.options.valueRange) === null || _a === void 0 ? void 0 : _a.min) !== undefined) {\n min = Math.max((_b = this.options.valueRange) === null || _b === void 0 ? void 0 : _b.min, this.toFloat(-Number.MAX_SAFE_INTEGER));\n }\n return min;\n }\n getMaxValue() {\n var _a, _b;\n let max = this.toFloat(Number.MAX_SAFE_INTEGER);\n if (((_a = this.options.valueRange) === null || _a === void 0 ? void 0 : _a.max) !== undefined) {\n max = Math.min((_b = this.options.valueRange) === null || _b === void 0 ? void 0 : _b.max, this.toFloat(Number.MAX_SAFE_INTEGER));\n }\n return max;\n }\n toFloat(value, maxFractionDigits) {\n return value / Math.pow(10, maxFractionDigits !== null && maxFractionDigits !== void 0 ? maxFractionDigits : this.valueScalingFractionDigits);\n }\n toInteger(value, maxFractionDigits) {\n return Number(value\n .toFixed(maxFractionDigits !== null && maxFractionDigits !== void 0 ? maxFractionDigits : this.valueScalingFractionDigits)\n .split('.')\n .join(''));\n }\n validateValueRange(value) {\n return value != null ? Math.min(Math.max(value, this.minValue), this.maxValue) : value;\n }\n format(value, hideNegligibleDecimalDigits = false) {\n if (value != null) {\n if (this.decimalSymbolInsertedAt !== undefined) {\n value = this.currencyFormat.normalizeDecimalSeparator(value, this.decimalSymbolInsertedAt);\n this.decimalSymbolInsertedAt = undefined;\n }\n const conformedValue = this.numberMask.conformToMask(value, this.formattedValue);\n let formattedValue;\n if (typeof conformedValue === 'object') {\n const { numberValue, fractionDigits } = conformedValue;\n let { maximumFractionDigits, minimumFractionDigits } = this.currencyFormat;\n if (this.focus) {\n minimumFractionDigits = hideNegligibleDecimalDigits\n ? fractionDigits.replace(/0+$/, '').length\n : Math.min(maximumFractionDigits, fractionDigits.length);\n }\n else if (Number.isInteger(numberValue) && !this.options.autoDecimalDigits && (this.options.precision === undefined || minimumFractionDigits === 0)) {\n minimumFractionDigits = maximumFractionDigits = 0;\n }\n formattedValue =\n this.toInteger(Math.abs(numberValue)) > Number.MAX_SAFE_INTEGER\n ? this.formattedValue\n : this.currencyFormat.format(numberValue, {\n useGrouping: this.options.useGrouping !== false && !(this.focus && this.options.hideGroupingSeparatorOnFocus),\n minimumFractionDigits,\n maximumFractionDigits\n });\n }\n else {\n formattedValue = conformedValue;\n }\n if (this.maxValue <= 0 && !this.currencyFormat.isNegative(formattedValue) && this.currencyFormat.parse(formattedValue) !== 0) {\n formattedValue = formattedValue.replace(this.currencyFormat.prefix, this.currencyFormat.negativePrefix);\n }\n if (this.minValue >= 0) {\n formattedValue = formattedValue.replace(this.currencyFormat.negativePrefix, this.currencyFormat.prefix);\n }\n if (this.options.currencyDisplay === CurrencyDisplay.hidden || (this.focus && this.options.hideCurrencySymbolOnFocus)) {\n formattedValue = formattedValue\n .replace(this.currencyFormat.negativePrefix, this.currencyFormat.minusSign !== undefined ? this.currencyFormat.minusSign : '(')\n .replace(this.currencyFormat.negativeSuffix, this.currencyFormat.minusSign !== undefined ? '' : ')')\n .replace(this.currencyFormat.prefix, '')\n .replace(this.currencyFormat.suffix, '');\n }\n this.el.value = formattedValue;\n this.numberValue = this.currencyFormat.parse(formattedValue);\n }\n else {\n this.el.value = '';\n this.numberValue = null;\n }\n this.formattedValue = this.el.value;\n this.onInput(this.getValue());\n }\n addEventListener() {\n this.el.addEventListener('input', (e) => {\n const { value, selectionStart } = this.el;\n const inputEvent = e;\n if (selectionStart && inputEvent.data && DECIMAL_SEPARATORS.includes(inputEvent.data)) {\n this.decimalSymbolInsertedAt = selectionStart - 1;\n }\n this.format(value);\n if (this.focus && selectionStart != null) {\n const getCaretPositionAfterFormat = () => {\n const { prefix, suffix, decimalSymbol, maximumFractionDigits, groupingSymbol } = this.currencyFormat;\n let caretPositionFromLeft = value.length - selectionStart;\n const newValueLength = this.formattedValue.length;\n if (this.currencyFormat.minusSign === undefined && (value.startsWith('(') || value.startsWith('-')) && !value.endsWith(')')) {\n return newValueLength - this.currencyFormat.negativeSuffix.length > 1 ? this.formattedValue.substring(selectionStart).length : 1;\n }\n if (this.formattedValue.substring(selectionStart, 1) === groupingSymbol &&\n count(this.formattedValue, groupingSymbol) === count(value, groupingSymbol) + 1) {\n return newValueLength - caretPositionFromLeft - 1;\n }\n if (newValueLength < caretPositionFromLeft) {\n return selectionStart;\n }\n if (decimalSymbol !== undefined && value.indexOf(decimalSymbol) !== -1) {\n const decimalSymbolPosition = value.indexOf(decimalSymbol) + 1;\n if (Math.abs(newValueLength - value.length) > 1 && selectionStart <= decimalSymbolPosition) {\n return this.formattedValue.indexOf(decimalSymbol) + 1;\n }\n else {\n if (!this.options.autoDecimalDigits && selectionStart > decimalSymbolPosition) {\n if (this.currencyFormat.onlyDigits(value.substring(decimalSymbolPosition)).length - 1 === maximumFractionDigits) {\n caretPositionFromLeft -= 1;\n }\n }\n }\n }\n return this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === CurrencyDisplay.hidden\n ? newValueLength - caretPositionFromLeft\n : Math.max(newValueLength - Math.max(caretPositionFromLeft, suffix.length), prefix.length);\n };\n this.setCaretPosition(getCaretPositionAfterFormat());\n }\n });\n this.el.addEventListener('focus', () => {\n this.focus = true;\n this.numberValueOnFocus = this.numberValue;\n setTimeout(() => {\n const { value, selectionStart, selectionEnd } = this.el;\n this.format(value, this.options.hideNegligibleDecimalDigitsOnFocus);\n if (selectionStart != null && selectionEnd != null && Math.abs(selectionStart - selectionEnd) > 0) {\n this.setCaretPosition(0, this.el.value.length);\n }\n else if (selectionStart != null) {\n const caretPositionOnFocus = this.getCaretPositionOnFocus(value, selectionStart);\n this.setCaretPosition(caretPositionOnFocus);\n }\n });\n });\n this.el.addEventListener('blur', () => {\n this.focus = false;\n this.format(this.currencyFormat.format(this.validateValueRange(this.numberValue)));\n if (this.numberValueOnFocus !== this.numberValue) {\n this.onChange(this.getValue());\n }\n });\n }\n getCaretPositionOnFocus(value, selectionStart) {\n if (this.numberValue == null) {\n return selectionStart;\n }\n const { prefix, negativePrefix, suffix, negativeSuffix, groupingSymbol, currency } = this.currencyFormat;\n const isNegative = this.numberValue < 0;\n const currentPrefix = isNegative ? negativePrefix : prefix;\n const prefixLength = currentPrefix.length;\n if (this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === CurrencyDisplay.hidden) {\n if (isNegative) {\n if (selectionStart <= 1) {\n return 1;\n }\n else if (value.endsWith(')') && selectionStart > value.indexOf(')')) {\n return this.formattedValue.length - 1;\n }\n }\n }\n else {\n const suffixLength = isNegative ? negativeSuffix.length : suffix.length;\n if (selectionStart >= value.length - suffixLength) {\n return this.formattedValue.length - suffixLength;\n }\n else if (selectionStart < prefixLength) {\n return prefixLength;\n }\n }\n let result = selectionStart;\n if (this.options.hideCurrencySymbolOnFocus &&\n this.options.currencyDisplay !== CurrencyDisplay.hidden &&\n selectionStart >= prefixLength &&\n currency !== undefined &&\n currentPrefix.includes(currency)) {\n result -= prefixLength;\n if (isNegative) {\n result += 1;\n }\n }\n if (this.options.hideGroupingSeparatorOnFocus && groupingSymbol !== undefined) {\n result -= count(value.substring(0, selectionStart), groupingSymbol);\n }\n return result;\n }\n setCaretPosition(start, end = start) {\n this.el.setSelectionRange(start, end);\n }\n}\n\nconst findInput = (el) => ((el === null || el === void 0 ? void 0 : el.matches('input')) ? el : el === null || el === void 0 ? void 0 : el.querySelector('input'));\nfunction useCurrencyInput(options, autoEmit) {\n var _a, _b, _c, _d;\n let currencyInput;\n const inputRef = ref(null);\n const formattedValue = ref(null);\n const numberValue = ref(null);\n const vm = getCurrentInstance();\n const emit = (vm === null || vm === void 0 ? void 0 : vm.emit) || ((_b = (_a = vm === null || vm === void 0 ? void 0 : vm.proxy) === null || _a === void 0 ? void 0 : _a.$emit) === null || _b === void 0 ? void 0 : _b.bind(vm === null || vm === void 0 ? void 0 : vm.proxy));\n const props = ((vm === null || vm === void 0 ? void 0 : vm.props) || ((_c = vm === null || vm === void 0 ? void 0 : vm.proxy) === null || _c === void 0 ? void 0 : _c.$props));\n const isVue3 = version.startsWith('3');\n const lazyModel = isVue3 && ((_d = vm === null || vm === void 0 ? void 0 : vm.attrs.modelModifiers) === null || _d === void 0 ? void 0 : _d.lazy);\n const modelValue = computed(() => props === null || props === void 0 ? void 0 : props[isVue3 ? 'modelValue' : 'value']);\n const inputEvent = isVue3 ? 'update:modelValue' : 'input';\n const changeEvent = lazyModel ? 'update:modelValue' : 'change';\n watch(inputRef, (value) => {\n var _a;\n if (value) {\n const el = findInput((_a = value === null || value === void 0 ? void 0 : value.$el) !== null && _a !== void 0 ? _a : value);\n if (el) {\n currencyInput = new CurrencyInput({\n el,\n options,\n onInput: (value) => {\n if (!lazyModel && autoEmit !== false && modelValue.value !== value.number) {\n emit === null || emit === void 0 ? void 0 : emit(inputEvent, value.number);\n }\n numberValue.value = value.number;\n formattedValue.value = value.formatted;\n },\n onChange: (value) => {\n if (autoEmit !== false) {\n emit === null || emit === void 0 ? void 0 : emit(changeEvent, value.number);\n }\n }\n });\n currencyInput.setValue(modelValue.value);\n }\n else {\n console.error('No input element found. Please make sure that the \"inputRef\" template ref is properly assigned.');\n }\n }\n else {\n currencyInput = null;\n }\n });\n return {\n inputRef,\n numberValue,\n formattedValue,\n setValue: (value) => currencyInput === null || currencyInput === void 0 ? void 0 : currencyInput.setValue(value),\n setOptions: (options) => currencyInput === null || currencyInput === void 0 ? void 0 : currencyInput.setOptions(options)\n };\n}\n\nexport { CurrencyDisplay, ValueScaling, useCurrencyInput };\n","<script setup lang=\"ts\">\nimport { useField } from 'vee-validate';\nimport { computed, watch } from 'vue';\nimport { useCurrencyInput, type CurrencyDisplay } from 'vue-currency-input';\n\ninterface Props {\n id?: string,\n modelValue?: string | number,\n placeholder?: string,\n label: string,\n name: string,\n required?: boolean\n error?: boolean\n}\nconst props = withDefaults(defineProps<Props>(), {\n id: undefined,\n placeholder: undefined,\n modelValue: undefined,\n});\n\nconst emit = defineEmits<{(e: 'update:modelValue', value: number | string): void}>();\n\nconst showLabelInside = computed(() => !!props.modelValue);\n\nconst { inputRef } = useCurrencyInput({\n currency: 'CLP',\n locale: 'es-CL',\n currencyDisplay: 'narrowSymbol' as CurrencyDisplay,\n useGrouping: true,\n hideCurrencySymbolOnFocus: false,\n hideGroupingSeparatorOnFocus: false,\n hideNegligibleDecimalDigitsOnFocus: false,\n}, true);\n\nconst {\n meta,\n value: inputValue,\n errorMessage,\n handleBlur,\n handleChange,\n} = useField(props.name, undefined, {\n initialValue: props.modelValue,\n});\n\nwatch(inputValue, (newVal) => {\n if (newVal === props.modelValue) {\n return;\n }\n emit('update:modelValue', newVal);\n});\nwatch(\n () => props.modelValue,\n (newModel) => {\n if (newModel) {\n if (newModel === inputValue.value) {\n return;\n }\n inputValue.value = newModel;\n }\n },\n);\n</script>\n<template>\n <div class=\"relative flex\">\n <base-label\n v-if=\"showLabelInside\"\n :label=\"label\"\n :name=\"name\"\n :required=\"required\"\n class=\"absolute ml-3 mt-1 text-xs text-z-gray-500\"\n >\n <slot name=\"label\" />\n </base-label>\n <input\n ref=\"inputRef\"\n type=\"text\"\n :placeholder=\"placeholder\"\n class=\"h-14 w-full rounded border border-z-gray-200 text-gray-900 outline-none\n placeholder:text-z-gray-900 read-only:bg-z-gray-100 read-only:text-z-gray-600 focus:border-z-gray-600\n disabled:border-z-gray-600 disabled:bg-z-gray-100 disabled:text-z-gray-600\"\n :class=\"{\n 'p-3': !showLabelInside,\n 'px-3 pb-0 pt-3': showLabelInside,\n 'border-z-red': error || (!!errorMessage && meta.touched),\n }\"\n @input=\"handleChange\"\n @blur=\"handleBlur\"\n >\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue';\n\ninterface Props {\n label: string\n name: string\n required?: boolean\n}\n\nconst attrs = useAttrs();\n\ndefineProps<Props>();\n</script>\n\n<template>\n <label\n :for=\"name\"\n v-bind=\"attrs\"\n >\n {{ label }}\n <slot />\n <span\n v-if=\"required\"\n class=\"text-z-red\"\n >\n *\n </span>\n </label>\n</template>\n","<script setup lang=\"ts\">\nimport { Listbox,\n ListboxButton,\n ListboxOptions,\n ListboxOption } from '@headlessui/vue';\nimport { useField } from 'vee-validate';\nimport { watch } from 'vue';\n\ninterface Props {\n modelValue?: string | number;\n options: SelectOption[];\n label: string;\n name: string;\n required?: boolean;\n hideLabel?: boolean\n placeholder?: string;\n error?: boolean\n displayKey?: string;\n disabled?:boolean;\n overflow?: 'clamp' | 'wrap'\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n modelValue: undefined,\n placeholder: undefined,\n displayKey: 'name',\n overflow: 'clamp',\n});\n\ndefineEmits<{(e: 'update:modelValue', value: string | number): void}>();\n\nconst {\n meta,\n value: inputValue,\n handleBlur,\n handleChange,\n} = useField(props.name, undefined, {\n initialValue: props.modelValue,\n valueProp: props.modelValue,\n});\n\nfunction handleInputChange(e: string | number | SelectOption) {\n handleChange(e);\n}\n\nwatch(\n () => props.modelValue,\n (newModel) => {\n if (newModel) {\n if (newModel === inputValue.value) {\n return;\n }\n inputValue.value = newModel;\n }\n },\n);\n</script>\n<template>\n <div class=\"flex w-full flex-col\">\n <base-label\n v-if=\"!hideLabel\"\n :label=\"label\"\n :name=\"name\"\n :required=\"required\"\n />\n <Listbox\n v-slot=\"{open}\"\n v-model=\"inputValue\"\n as=\"div\"\n class=\"relative\"\n :name=\"name\"\n @update:model-value=\"handleInputChange\"\n @blur=\"handleBlur\"\n >\n <base-modal\n v-if=\"open\"\n :open=\"open\"\n >\n <div class=\"flex w-full flex-col\">\n <div class=\"flex w-full items-center justify-between\">\n <p class=\"font-medium\">\n {{ placeholder }}\n </p>\n <ListboxButton\n as=\"button\"\n >\n <img\n src=\"@/assets/icons/close.svg\"\n class=\"h-5 w-5\"\n >\n </ListboxButton>\n </div>\n <ListboxOptions\n as=\"div\"\n class=\"mt-5 flex flex-col overflow-y-scroll pt-2\"\n >\n <slot name=\"before-options\" />\n <ListboxOption\n v-for=\"option in options\"\n :key=\"option.id\"\n :value=\"option.id\"\n as=\"button\"\n class=\"flex h-16 w-full shrink-0 items-center text-z-gray-900\"\n >\n <p\n class=\"text-start\"\n :class=\"{ 'line-clamp-1': overflow === 'clamp' }\"\n >\n {{ option[displayKey] }}\n </p>\n </ListboxOption>\n <slot name=\"after-options\" />\n </ListboxOptions>\n </div>\n </base-modal>\n <ListboxButton\n as=\"button\"\n class=\"flex h-14 w-full items-center justify-between rounded border bg-white px-3 text-gray-900 outline-none\"\n :class=\"error && meta.touched ? 'border-z-red': 'border-z-gray-200'\"\n :disabled=\"disabled\"\n >\n <p>{{ options?.find((option) => option.id === inputValue)?.name || placeholder }}</p>\n <img src=\"@/assets/icons/chevron-down.svg\">\n </ListboxButton>\n </Listbox>\n </div>\n</template>\n","export default \"__VITE_ASSET__649321ba__\"","<script setup lang=\"ts\">\nimport { useField } from 'vee-validate';\nimport { ref } from 'vue';\nimport { generateURL } from '@/utils/generate-url';\n\ninterface Props {\n modelValue?: File;\n label?: string;\n name: string;\n required?: boolean;\n hideLabel?: boolean;\n placeholder?: string;\n error?: boolean;\n wide?: boolean;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n label: '',\n modelValue: undefined,\n hideLabel: false,\n disabled: false,\n placeholder: 'Sube una foto',\n});\n\nconst {\n value: inputValue,\n handleBlur,\n handleChange,\n} = useField(props.name, undefined, {\n initialValue: props.modelValue,\n});\n\nconst isDragging = ref(false);\nconst uploadedFile = ref<File|undefined>(props.modelValue ?? undefined);\nconst fileInput = ref();\n\nfunction handleDragover() {\n isDragging.value = true;\n}\nfunction handleDragleave() {\n isDragging.value = false;\n}\nfunction onChange() {\n uploadedFile.value = fileInput.value.files[0];\n handleChange(uploadedFile.value);\n}\nfunction handleDrop(e:DragEvent) {\n fileInput.value.files = e.dataTransfer?.files;\n onChange();\n isDragging.value = false;\n}\nfunction removeFile() {\n uploadedFile.value = undefined;\n handleChange(null);\n}\n</script>\n<template>\n <div>\n <base-label\n v-if=\"!hideLabel\"\n :label=\"label\"\n :name=\"name\"\n :required=\"required\"\n />\n <div\n v-if=\"!uploadedFile\"\n class=\"relative flex aspect-square w-full flex-col items-center justify-center space-y-2\"\n :class=\"{\n 'rounded-lg border border-z-red': error,\n 'bg-dashed-border': !error,\n 'aspect-square': !wide,\n 'h-[104px]': wide,\n }\"\n @drop.prevent=\"handleDrop\"\n @dragover.prevent=\"handleDragover()\"\n @dragleave.prevent=\"handleDragleave()\"\n >\n <img src=\"@/assets/icons/image-add.svg\">\n <p>{{ placeholder }}</p>\n <input\n id=\"fileInput\"\n ref=\"fileInput\"\n type=\"file\"\n name=\"file\"\n class=\"absolute h-full w-full cursor-pointer overflow-hidden opacity-0\"\n accept=\"image/*\"\n @change=\"onChange\"\n @blur=\"handleBlur\"\n >\n </div>\n <div\n v-else\n class=\"relative flex aspect-square w-full flex-col items-center justify-center rounded-lg\"\n :class=\"wide ? 'h-[104px]' : 'aspect-square'\"\n >\n <img\n :src=\"generateURL(inputValue)\"\n class=\"aspect-square w-full rounded-lg object-cover\"\n :class=\"wide ? 'h-[104px]' : 'aspect-square'\"\n >\n <button\n class=\"absolute right-2 top-2 flex h-8 items-center justify-center rounded bg-z-turquoise-50 px-2 text-z-turquoise-600\"\n @click=\"removeFile\"\n >\n <img src=\"@/assets/icons/trash.svg\">\n </button>\n </div>\n </div>\n</template>\n","// can-promise has a crash in some versions of react native that dont have\n// standard global objects\n// https://github.com/soldair/node-qrcode/issues/157\n\nmodule.exports = function () {\n return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then\n}\n","let toSJISFunction\nconst CODEWORDS_COUNT = [\n 0, // Not used\n 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,\n 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,\n 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,\n 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706\n]\n\n/**\n * Returns the QR Code size for the specified version\n *\n * @param {Number} version QR Code version\n * @return {Number} size of QR code\n */\nexports.getSymbolSize = function getSymbolSize (version) {\n if (!version) throw new Error('\"version\" cannot be null or undefined')\n if (version < 1 || version > 40) throw new Error('\"version\" should be in range from 1 to 40')\n return version * 4 + 17\n}\n\n/**\n * Returns the total number of codewords used to store data and EC information.\n *\n * @param {Number} version QR Code version\n * @return {Number} Data length in bits\n */\nexports.getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {\n return CODEWORDS_COUNT[version]\n}\n\n/**\n * Encode data with Bose-Chaudhuri-Hocquenghem\n *\n * @param {Number} data Value to encode\n * @return {Number} Encoded value\n */\nexports.getBCHDigit = function (data) {\n let digit = 0\n\n while (data !== 0) {\n digit++\n data >>>= 1\n }\n\n return digit\n}\n\nexports.setToSJISFunction = function setToSJISFunction (f) {\n if (typeof f !== 'function') {\n throw new Error('\"toSJISFunc\" is not a valid function.')\n }\n\n toSJISFunction = f\n}\n\nexports.isKanjiModeEnabled = function () {\n return typeof toSJISFunction !== 'undefined'\n}\n\nexports.toSJIS = function toSJIS (kanji) {\n return toSJISFunction(kanji)\n}\n","exports.L = { bit: 1 }\nexports.M = { bit: 0 }\nexports.Q = { bit: 3 }\nexports.H = { bit: 2 }\n\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'l':\n case 'low':\n return exports.L\n\n case 'm':\n case 'medium':\n return exports.M\n\n case 'q':\n case 'quartile':\n return exports.Q\n\n case 'h':\n case 'high':\n return exports.H\n\n default:\n throw new Error('Unknown EC Level: ' + string)\n }\n}\n\nexports.isValid = function isValid (level) {\n return level && typeof level.bit !== 'undefined' &&\n level.bit >= 0 && level.bit < 4\n}\n\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","function BitBuffer () {\n this.buffer = []\n this.length = 0\n}\n\nBitBuffer.prototype = {\n\n get: function (index) {\n const bufIndex = Math.floor(index / 8)\n return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1\n },\n\n put: function (num, length) {\n for (let i = 0; i < length; i++) {\n this.putBit(((num >>> (length - i - 1)) & 1) === 1)\n }\n },\n\n getLengthInBits: function () {\n return this.length\n },\n\n putBit: function (bit) {\n const bufIndex = Math.floor(this.length / 8)\n if (this.buffer.length <= bufIndex) {\n this.buffer.push(0)\n }\n\n if (bit) {\n this.buffer[bufIndex] |= (0x80 >>> (this.length % 8))\n }\n\n this.length++\n }\n}\n\nmodule.exports = BitBuffer\n","/**\n * Helper class to handle QR Code symbol modules\n *\n * @param {Number} size Symbol size\n */\nfunction BitMatrix (size) {\n if (!size || size < 1) {\n throw new Error('BitMatrix size must be defined and greater than 0')\n }\n\n this.size = size\n this.data = new Uint8Array(size * size)\n this.reservedBit = new Uint8Array(size * size)\n}\n\n/**\n * Set bit value at specified location\n * If reserved flag is set, this bit will be ignored during masking process\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n * @param {Boolean} reserved\n */\nBitMatrix.prototype.set = function (row, col, value, reserved) {\n const index = row * this.size + col\n this.data[index] = value\n if (reserved) this.reservedBit[index] = true\n}\n\n/**\n * Returns bit value at specified location\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.get = function (row, col) {\n return this.data[row * this.size + col]\n}\n\n/**\n * Applies xor operator at specified location\n * (used during masking process)\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n */\nBitMatrix.prototype.xor = function (row, col, value) {\n this.data[row * this.size + col] ^= value\n}\n\n/**\n * Check if bit at specified location is reserved\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.isReserved = function (row, col) {\n return this.reservedBit[row * this.size + col]\n}\n\nmodule.exports = BitMatrix\n","/**\n * Alignment pattern are fixed reference pattern in defined positions\n * in a matrix symbology, which enables the decode software to re-synchronise\n * the coordinate mapping of the image modules in the event of moderate amounts\n * of distortion of the image.\n *\n * Alignment patterns are present only in QR Code symbols of version 2 or larger\n * and their number depends on the symbol version.\n */\n\nconst getSymbolSize = require('./utils').getSymbolSize\n\n/**\n * Calculate the row/column coordinates of the center module of each alignment pattern\n * for the specified QR Code version.\n *\n * The alignment patterns are positioned symmetrically on either side of the diagonal\n * running from the top left corner of the symbol to the bottom right corner.\n *\n * Since positions are simmetrical only half of the coordinates are returned.\n * Each item of the array will represent in turn the x and y coordinate.\n * @see {@link getPositions}\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinate\n */\nexports.getRowColCoords = function getRowColCoords (version) {\n if (version === 1) return []\n\n const posCount = Math.floor(version / 7) + 2\n const size = getSymbolSize(version)\n const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2\n const positions = [size - 7] // Last coord is always (size - 7)\n\n for (let i = 1; i < posCount - 1; i++) {\n positions[i] = positions[i - 1] - intervals\n }\n\n positions.push(6) // First coord is always 6\n\n return positions.reverse()\n}\n\n/**\n * Returns an array containing the positions of each alignment pattern.\n * Each array's element represent the center point of the pattern as (x, y) coordinates\n *\n * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}\n * and filtering out the items that overlaps with finder pattern\n *\n * @example\n * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.\n * The alignment patterns, therefore, are to be centered on (row, column)\n * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).\n * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns\n * and are not therefore used for alignment patterns.\n *\n * let pos = getPositions(7)\n * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const coords = []\n const pos = exports.getRowColCoords(version)\n const posLength = pos.length\n\n for (let i = 0; i < posLength; i++) {\n for (let j = 0; j < posLength; j++) {\n // Skip if position is occupied by finder patterns\n if ((i === 0 && j === 0) || // top-left\n (i === 0 && j === posLength - 1) || // bottom-left\n (i === posLength - 1 && j === 0)) { // top-right\n continue\n }\n\n coords.push([pos[i], pos[j]])\n }\n }\n\n return coords\n}\n","const getSymbolSize = require('./utils').getSymbolSize\nconst FINDER_PATTERN_SIZE = 7\n\n/**\n * Returns an array containing the positions of each finder pattern.\n * Each array's element represent the top-left point of the pattern as (x, y) coordinates\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const size = getSymbolSize(version)\n\n return [\n // top-left\n [0, 0],\n // top-right\n [size - FINDER_PATTERN_SIZE, 0],\n // bottom-left\n [0, size - FINDER_PATTERN_SIZE]\n ]\n}\n","/**\n * Data mask pattern reference\n * @type {Object}\n */\nexports.Patterns = {\n PATTERN000: 0,\n PATTERN001: 1,\n PATTERN010: 2,\n PATTERN011: 3,\n PATTERN100: 4,\n PATTERN101: 5,\n PATTERN110: 6,\n PATTERN111: 7\n}\n\n/**\n * Weighted penalty scores for the undesirable features\n * @type {Object}\n */\nconst PenaltyScores = {\n N1: 3,\n N2: 3,\n N3: 40,\n N4: 10\n}\n\n/**\n * Check if mask pattern value is valid\n *\n * @param {Number} mask Mask pattern\n * @return {Boolean} true if valid, false otherwise\n */\nexports.isValid = function isValid (mask) {\n return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7\n}\n\n/**\n * Returns mask pattern from a value.\n * If value is not valid, returns undefined\n *\n * @param {Number|String} value Mask pattern value\n * @return {Number} Valid mask pattern or undefined\n */\nexports.from = function from (value) {\n return exports.isValid(value) ? parseInt(value, 10) : undefined\n}\n\n/**\n* Find adjacent modules in row/column with the same color\n* and assign a penalty value.\n*\n* Points: N1 + i\n* i is the amount by which the number of adjacent modules of the same color exceeds 5\n*/\nexports.getPenaltyN1 = function getPenaltyN1 (data) {\n const size = data.size\n let points = 0\n let sameCountCol = 0\n let sameCountRow = 0\n let lastCol = null\n let lastRow = null\n\n for (let row = 0; row < size; row++) {\n sameCountCol = sameCountRow = 0\n lastCol = lastRow = null\n\n for (let col = 0; col < size; col++) {\n let module = data.get(row, col)\n if (module === lastCol) {\n sameCountCol++\n } else {\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n lastCol = module\n sameCountCol = 1\n }\n\n module = data.get(col, row)\n if (module === lastRow) {\n sameCountRow++\n } else {\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n lastRow = module\n sameCountRow = 1\n }\n }\n\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n }\n\n return points\n}\n\n/**\n * Find 2x2 blocks with the same color and assign a penalty value\n *\n * Points: N2 * (m - 1) * (n - 1)\n */\nexports.getPenaltyN2 = function getPenaltyN2 (data) {\n const size = data.size\n let points = 0\n\n for (let row = 0; row < size - 1; row++) {\n for (let col = 0; col < size - 1; col++) {\n const last = data.get(row, col) +\n data.get(row, col + 1) +\n data.get(row + 1, col) +\n data.get(row + 1, col + 1)\n\n if (last === 4 || last === 0) points++\n }\n }\n\n return points * PenaltyScores.N2\n}\n\n/**\n * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,\n * preceded or followed by light area 4 modules wide\n *\n * Points: N3 * number of pattern found\n */\nexports.getPenaltyN3 = function getPenaltyN3 (data) {\n const size = data.size\n let points = 0\n let bitsCol = 0\n let bitsRow = 0\n\n for (let row = 0; row < size; row++) {\n bitsCol = bitsRow = 0\n for (let col = 0; col < size; col++) {\n bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col)\n if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++\n\n bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row)\n if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++\n }\n }\n\n return points * PenaltyScores.N3\n}\n\n/**\n * Calculate proportion of dark modules in entire symbol\n *\n * Points: N4 * k\n *\n * k is the rating of the deviation of the proportion of dark modules\n * in the symbol from 50% in steps of 5%\n */\nexports.getPenaltyN4 = function getPenaltyN4 (data) {\n let darkCount = 0\n const modulesCount = data.data.length\n\n for (let i = 0; i < modulesCount; i++) darkCount += data.data[i]\n\n const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10)\n\n return k * PenaltyScores.N4\n}\n\n/**\n * Return mask value at given position\n *\n * @param {Number} maskPattern Pattern reference value\n * @param {Number} i Row\n * @param {Number} j Column\n * @return {Boolean} Mask value\n */\nfunction getMaskAt (maskPattern, i, j) {\n switch (maskPattern) {\n case exports.Patterns.PATTERN000: return (i + j) % 2 === 0\n case exports.Patterns.PATTERN001: return i % 2 === 0\n case exports.Patterns.PATTERN010: return j % 3 === 0\n case exports.Patterns.PATTERN011: return (i + j) % 3 === 0\n case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0\n case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0\n case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0\n case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0\n\n default: throw new Error('bad maskPattern:' + maskPattern)\n }\n}\n\n/**\n * Apply a mask pattern to a BitMatrix\n *\n * @param {Number} pattern Pattern reference number\n * @param {BitMatrix} data BitMatrix data\n */\nexports.applyMask = function applyMask (pattern, data) {\n const size = data.size\n\n for (let col = 0; col < size; col++) {\n for (let row = 0; row < size; row++) {\n if (data.isReserved(row, col)) continue\n data.xor(row, col, getMaskAt(pattern, row, col))\n }\n }\n}\n\n/**\n * Returns the best mask pattern for data\n *\n * @param {BitMatrix} data\n * @return {Number} Mask pattern reference number\n */\nexports.getBestMask = function getBestMask (data, setupFormatFunc) {\n const numPatterns = Object.keys(exports.Patterns).length\n let bestPattern = 0\n let lowerPenalty = Infinity\n\n for (let p = 0; p < numPatterns; p++) {\n setupFormatFunc(p)\n exports.applyMask(p, data)\n\n // Calculate penalty\n const penalty =\n exports.getPenaltyN1(data) +\n exports.getPenaltyN2(data) +\n exports.getPenaltyN3(data) +\n exports.getPenaltyN4(data)\n\n // Undo previously applied mask\n exports.applyMask(p, data)\n\n if (penalty < lowerPenalty) {\n lowerPenalty = penalty\n bestPattern = p\n }\n }\n\n return bestPattern\n}\n","const ECLevel = require('./error-correction-level')\r\n\r\nconst EC_BLOCKS_TABLE = [\r\n// L M Q H\r\n 1, 1, 1, 1,\r\n 1, 1, 1, 1,\r\n 1, 1, 2, 2,\r\n 1, 2, 2, 4,\r\n 1, 2, 4, 4,\r\n 2, 4, 4, 4,\r\n 2, 4, 6, 5,\r\n 2, 4, 6, 6,\r\n 2, 5, 8, 8,\r\n 4, 5, 8, 8,\r\n 4, 5, 8, 11,\r\n 4, 8, 10, 11,\r\n 4, 9, 12, 16,\r\n 4, 9, 16, 16,\r\n 6, 10, 12, 18,\r\n 6, 10, 17, 16,\r\n 6, 11, 16, 19,\r\n 6, 13, 18, 21,\r\n 7, 14, 21, 25,\r\n 8, 16, 20, 25,\r\n 8, 17, 23, 25,\r\n 9, 17, 23, 34,\r\n 9, 18, 25, 30,\r\n 10, 20, 27, 32,\r\n 12, 21, 29, 35,\r\n 12, 23, 34, 37,\r\n 12, 25, 34, 40,\r\n 13, 26, 35, 42,\r\n 14, 28, 38, 45,\r\n 15, 29, 40, 48,\r\n 16, 31, 43, 51,\r\n 17, 33, 45, 54,\r\n 18, 35, 48, 57,\r\n 19, 37, 51, 60,\r\n 19, 38, 53, 63,\r\n 20, 40, 56, 66,\r\n 21, 43, 59, 70,\r\n 22, 45, 62, 74,\r\n 24, 47, 65, 77,\r\n 25, 49, 68, 81\r\n]\r\n\r\nconst EC_CODEWORDS_TABLE = [\r\n// L M Q H\r\n 7, 10, 13, 17,\r\n 10, 16, 22, 28,\r\n 15, 26, 36, 44,\r\n 20, 36, 52, 64,\r\n 26, 48, 72, 88,\r\n 36, 64, 96, 112,\r\n 40, 72, 108, 130,\r\n 48, 88, 132, 156,\r\n 60, 110, 160, 192,\r\n 72, 130, 192, 224,\r\n 80, 150, 224, 264,\r\n 96, 176, 260, 308,\r\n 104, 198, 288, 352,\r\n 120, 216, 320, 384,\r\n 132, 240, 360, 432,\r\n 144, 280, 408, 480,\r\n 168, 308, 448, 532,\r\n 180, 338, 504, 588,\r\n 196, 364, 546, 650,\r\n 224, 416, 600, 700,\r\n 224, 442, 644, 750,\r\n 252, 476, 690, 816,\r\n 270, 504, 750, 900,\r\n 300, 560, 810, 960,\r\n 312, 588, 870, 1050,\r\n 336, 644, 952, 1110,\r\n 360, 700, 1020, 1200,\r\n 390, 728, 1050, 1260,\r\n 420, 784, 1140, 1350,\r\n 450, 812, 1200, 1440,\r\n 480, 868, 1290, 1530,\r\n 510, 924, 1350, 1620,\r\n 540, 980, 1440, 1710,\r\n 570, 1036, 1530, 1800,\r\n 570, 1064, 1590, 1890,\r\n 600, 1120, 1680, 1980,\r\n 630, 1204, 1770, 2100,\r\n 660, 1260, 1860, 2220,\r\n 720, 1316, 1950, 2310,\r\n 750, 1372, 2040, 2430\r\n]\r\n\r\n/**\r\n * Returns the number of error correction block that the QR Code should contain\r\n * for the specified version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction blocks\r\n */\r\nexports.getBlocksCount = function getBlocksCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n\r\n/**\r\n * Returns the number of error correction codewords to use for the specified\r\n * version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction codewords\r\n */\r\nexports.getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n","const EXP_TABLE = new Uint8Array(512)\nconst LOG_TABLE = new Uint8Array(256)\n/**\n * Precompute the log and anti-log tables for faster computation later\n *\n * For each possible value in the galois field 2^8, we will pre-compute\n * the logarithm and anti-logarithm (exponential) of this value\n *\n * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}\n */\n;(function initTables () {\n let x = 1\n for (let i = 0; i < 255; i++) {\n EXP_TABLE[i] = x\n LOG_TABLE[x] = i\n\n x <<= 1 // multiply by 2\n\n // The QR code specification says to use byte-wise modulo 100011101 arithmetic.\n // This means that when a number is 256 or larger, it should be XORed with 0x11D.\n if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)\n x ^= 0x11D\n }\n }\n\n // Optimization: double the size of the anti-log table so that we don't need to mod 255 to\n // stay inside the bounds (because we will mainly use this table for the multiplication of\n // two GF numbers, no more).\n // @see {@link mul}\n for (let i = 255; i < 512; i++) {\n EXP_TABLE[i] = EXP_TABLE[i - 255]\n }\n}())\n\n/**\n * Returns log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.log = function log (n) {\n if (n < 1) throw new Error('log(' + n + ')')\n return LOG_TABLE[n]\n}\n\n/**\n * Returns anti-log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.exp = function exp (n) {\n return EXP_TABLE[n]\n}\n\n/**\n * Multiplies two number inside Galois Field\n *\n * @param {Number} x\n * @param {Number} y\n * @return {Number}\n */\nexports.mul = function mul (x, y) {\n if (x === 0 || y === 0) return 0\n\n // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized\n // @see {@link initTables}\n return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]\n}\n","const GF = require('./galois-field')\n\n/**\n * Multiplies two polynomials inside Galois Field\n *\n * @param {Uint8Array} p1 Polynomial\n * @param {Uint8Array} p2 Polynomial\n * @return {Uint8Array} Product of p1 and p2\n */\nexports.mul = function mul (p1, p2) {\n const coeff = new Uint8Array(p1.length + p2.length - 1)\n\n for (let i = 0; i < p1.length; i++) {\n for (let j = 0; j < p2.length; j++) {\n coeff[i + j] ^= GF.mul(p1[i], p2[j])\n }\n }\n\n return coeff\n}\n\n/**\n * Calculate the remainder of polynomials division\n *\n * @param {Uint8Array} divident Polynomial\n * @param {Uint8Array} divisor Polynomial\n * @return {Uint8Array} Remainder\n */\nexports.mod = function mod (divident, divisor) {\n let result = new Uint8Array(divident)\n\n while ((result.length - divisor.length) >= 0) {\n const coeff = result[0]\n\n for (let i = 0; i < divisor.length; i++) {\n result[i] ^= GF.mul(divisor[i], coeff)\n }\n\n // remove all zeros from buffer head\n let offset = 0\n while (offset < result.length && result[offset] === 0) offset++\n result = result.slice(offset)\n }\n\n return result\n}\n\n/**\n * Generate an irreducible generator polynomial of specified degree\n * (used by Reed-Solomon encoder)\n *\n * @param {Number} degree Degree of the generator polynomial\n * @return {Uint8Array} Buffer containing polynomial coefficients\n */\nexports.generateECPolynomial = function generateECPolynomial (degree) {\n let poly = new Uint8Array([1])\n for (let i = 0; i < degree; i++) {\n poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)]))\n }\n\n return poly\n}\n","const Polynomial = require('./polynomial')\n\nfunction ReedSolomonEncoder (degree) {\n this.genPoly = undefined\n this.degree = degree\n\n if (this.degree) this.initialize(this.degree)\n}\n\n/**\n * Initialize the encoder.\n * The input param should correspond to the number of error correction codewords.\n *\n * @param {Number} degree\n */\nReedSolomonEncoder.prototype.initialize = function initialize (degree) {\n // create an irreducible generator polynomial\n this.degree = degree\n this.genPoly = Polynomial.generateECPolynomial(this.degree)\n}\n\n/**\n * Encodes a chunk of data\n *\n * @param {Uint8Array} data Buffer containing input data\n * @return {Uint8Array} Buffer containing encoded data\n */\nReedSolomonEncoder.prototype.encode = function encode (data) {\n if (!this.genPoly) {\n throw new Error('Encoder not initialized')\n }\n\n // Calculate EC for this data block\n // extends data size to data+genPoly size\n const paddedData = new Uint8Array(data.length + this.degree)\n paddedData.set(data)\n\n // The error correction codewords are the remainder after dividing the data codewords\n // by a generator polynomial\n const remainder = Polynomial.mod(paddedData, this.genPoly)\n\n // return EC data blocks (last n byte, where n is the degree of genPoly)\n // If coefficients number in remainder are less than genPoly degree,\n // pad with 0s to the left to reach the needed number of coefficients\n const start = this.degree - remainder.length\n if (start > 0) {\n const buff = new Uint8Array(this.degree)\n buff.set(remainder, start)\n\n return buff\n }\n\n return remainder\n}\n\nmodule.exports = ReedSolomonEncoder\n","/**\n * Check if QR Code version is valid\n *\n * @param {Number} version QR Code version\n * @return {Boolean} true if valid version, false otherwise\n */\nexports.isValid = function isValid (version) {\n return !isNaN(version) && version >= 1 && version <= 40\n}\n","const numeric = '[0-9]+'\nconst alphanumeric = '[A-Z $%*+\\\\-./:]+'\nlet kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +\n '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +\n '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +\n '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+'\nkanji = kanji.replace(/u/g, '\\\\u')\n\nconst byte = '(?:(?![A-Z0-9 $%*+\\\\-./:]|' + kanji + ')(?:.|[\\r\\n]))+'\n\nexports.KANJI = new RegExp(kanji, 'g')\nexports.BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\\\-./:]+', 'g')\nexports.BYTE = new RegExp(byte, 'g')\nexports.NUMERIC = new RegExp(numeric, 'g')\nexports.ALPHANUMERIC = new RegExp(alphanumeric, 'g')\n\nconst TEST_KANJI = new RegExp('^' + kanji + '$')\nconst TEST_NUMERIC = new RegExp('^' + numeric + '$')\nconst TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\\\-./:]+$')\n\nexports.testKanji = function testKanji (str) {\n return TEST_KANJI.test(str)\n}\n\nexports.testNumeric = function testNumeric (str) {\n return TEST_NUMERIC.test(str)\n}\n\nexports.testAlphanumeric = function testAlphanumeric (str) {\n return TEST_ALPHANUMERIC.test(str)\n}\n","const VersionCheck = require('./version-check')\nconst Regex = require('./regex')\n\n/**\n * Numeric mode encodes data from the decimal digit set (0 - 9)\n * (byte values 30HEX to 39HEX).\n * Normally, 3 data characters are represented by 10 bits.\n *\n * @type {Object}\n */\nexports.NUMERIC = {\n id: 'Numeric',\n bit: 1 << 0,\n ccBits: [10, 12, 14]\n}\n\n/**\n * Alphanumeric mode encodes data from a set of 45 characters,\n * i.e. 10 numeric digits (0 - 9),\n * 26 alphabetic characters (A - Z),\n * and 9 symbols (SP, $, %, *, +, -, ., /, :).\n * Normally, two input characters are represented by 11 bits.\n *\n * @type {Object}\n */\nexports.ALPHANUMERIC = {\n id: 'Alphanumeric',\n bit: 1 << 1,\n ccBits: [9, 11, 13]\n}\n\n/**\n * In byte mode, data is encoded at 8 bits per character.\n *\n * @type {Object}\n */\nexports.BYTE = {\n id: 'Byte',\n bit: 1 << 2,\n ccBits: [8, 16, 16]\n}\n\n/**\n * The Kanji mode efficiently encodes Kanji characters in accordance with\n * the Shift JIS system based on JIS X 0208.\n * The Shift JIS values are shifted from the JIS X 0208 values.\n * JIS X 0208 gives details of the shift coded representation.\n * Each two-byte character value is compacted to a 13-bit binary codeword.\n *\n * @type {Object}\n */\nexports.KANJI = {\n id: 'Kanji',\n bit: 1 << 3,\n ccBits: [8, 10, 12]\n}\n\n/**\n * Mixed mode will contain a sequences of data in a combination of any of\n * the modes described above\n *\n * @type {Object}\n */\nexports.MIXED = {\n bit: -1\n}\n\n/**\n * Returns the number of bits needed to store the data length\n * according to QR Code specifications.\n *\n * @param {Mode} mode Data mode\n * @param {Number} version QR Code version\n * @return {Number} Number of bits\n */\nexports.getCharCountIndicator = function getCharCountIndicator (mode, version) {\n if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)\n\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid version: ' + version)\n }\n\n if (version >= 1 && version < 10) return mode.ccBits[0]\n else if (version < 27) return mode.ccBits[1]\n return mode.ccBits[2]\n}\n\n/**\n * Returns the most efficient mode to store the specified data\n *\n * @param {String} dataStr Input data string\n * @return {Mode} Best mode\n */\nexports.getBestModeForData = function getBestModeForData (dataStr) {\n if (Regex.testNumeric(dataStr)) return exports.NUMERIC\n else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC\n else if (Regex.testKanji(dataStr)) return exports.KANJI\n else return exports.BYTE\n}\n\n/**\n * Return mode name as string\n *\n * @param {Mode} mode Mode object\n * @returns {String} Mode name\n */\nexports.toString = function toString (mode) {\n if (mode && mode.id) return mode.id\n throw new Error('Invalid mode')\n}\n\n/**\n * Check if input param is a valid mode object\n *\n * @param {Mode} mode Mode object\n * @returns {Boolean} True if valid mode, false otherwise\n */\nexports.isValid = function isValid (mode) {\n return mode && mode.bit && mode.ccBits\n}\n\n/**\n * Get mode object from its name\n *\n * @param {String} string Mode name\n * @returns {Mode} Mode object\n */\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'numeric':\n return exports.NUMERIC\n case 'alphanumeric':\n return exports.ALPHANUMERIC\n case 'kanji':\n return exports.KANJI\n case 'byte':\n return exports.BYTE\n default:\n throw new Error('Unknown mode: ' + string)\n }\n}\n\n/**\n * Returns mode from a value.\n * If value is not a valid mode, returns defaultValue\n *\n * @param {Mode|String} value Encoding mode\n * @param {Mode} defaultValue Fallback value\n * @return {Mode} Encoding mode\n */\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","const Utils = require('./utils')\nconst ECCode = require('./error-correction-code')\nconst ECLevel = require('./error-correction-level')\nconst Mode = require('./mode')\nconst VersionCheck = require('./version-check')\n\n// Generator polynomial used to encode version information\nconst G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0)\nconst G18_BCH = Utils.getBCHDigit(G18)\n\nfunction getBestVersionForDataLength (mode, length, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\nfunction getReservedBitsCount (mode, version) {\n // Character count indicator + mode indicator bits\n return Mode.getCharCountIndicator(mode, version) + 4\n}\n\nfunction getTotalBitsFromDataArray (segments, version) {\n let totalBits = 0\n\n segments.forEach(function (data) {\n const reservedBits = getReservedBitsCount(data.mode, version)\n totalBits += reservedBits + data.getBitsLength()\n })\n\n return totalBits\n}\n\nfunction getBestVersionForMixedData (segments, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n const length = getTotalBitsFromDataArray(segments, currentVersion)\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\n/**\n * Returns version number from a value.\n * If value is not a valid version, returns defaultValue\n *\n * @param {Number|String} value QR Code version\n * @param {Number} defaultValue Fallback value\n * @return {Number} QR Code version number\n */\nexports.from = function from (value, defaultValue) {\n if (VersionCheck.isValid(value)) {\n return parseInt(value, 10)\n }\n\n return defaultValue\n}\n\n/**\n * Returns how much data can be stored with the specified QR code version\n * and error correction level\n *\n * @param {Number} version QR Code version (1-40)\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} Quantity of storable data\n */\nexports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode) {\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid QR Code version')\n }\n\n // Use Byte mode as default\n if (typeof mode === 'undefined') mode = Mode.BYTE\n\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n if (mode === Mode.MIXED) return dataTotalCodewordsBits\n\n const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version)\n\n // Return max number of storable codewords\n switch (mode) {\n case Mode.NUMERIC:\n return Math.floor((usableBits / 10) * 3)\n\n case Mode.ALPHANUMERIC:\n return Math.floor((usableBits / 11) * 2)\n\n case Mode.KANJI:\n return Math.floor(usableBits / 13)\n\n case Mode.BYTE:\n default:\n return Math.floor(usableBits / 8)\n }\n}\n\n/**\n * Returns the minimum version needed to contain the amount of data\n *\n * @param {Segment} data Segment of data\n * @param {Number} [errorCorrectionLevel=H] Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} QR Code version\n */\nexports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel) {\n let seg\n\n const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M)\n\n if (Array.isArray(data)) {\n if (data.length > 1) {\n return getBestVersionForMixedData(data, ecl)\n }\n\n if (data.length === 0) {\n return 1\n }\n\n seg = data[0]\n } else {\n seg = data\n }\n\n return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)\n}\n\n/**\n * Returns version information with relative error correction bits\n *\n * The version information is included in QR Code symbols of version 7 or larger.\n * It consists of an 18-bit sequence containing 6 data bits,\n * with 12 error correction bits calculated using the (18, 6) Golay code.\n *\n * @param {Number} version QR Code version\n * @return {Number} Encoded version info bits\n */\nexports.getEncodedBits = function getEncodedBits (version) {\n if (!VersionCheck.isValid(version) || version < 7) {\n throw new Error('Invalid QR Code version')\n }\n\n let d = version << 12\n\n while (Utils.getBCHDigit(d) - G18_BCH >= 0) {\n d ^= (G18 << (Utils.getBCHDigit(d) - G18_BCH))\n }\n\n return (version << 12) | d\n}\n","const Utils = require('./utils')\n\nconst G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0)\nconst G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1)\nconst G15_BCH = Utils.getBCHDigit(G15)\n\n/**\n * Returns format information with relative error correction bits\n *\n * The format information is a 15-bit sequence containing 5 data bits,\n * with 10 error correction bits calculated using the (15, 5) BCH code.\n *\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Number} mask Mask pattern\n * @return {Number} Encoded format information bits\n */\nexports.getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {\n const data = ((errorCorrectionLevel.bit << 3) | mask)\n let d = data << 10\n\n while (Utils.getBCHDigit(d) - G15_BCH >= 0) {\n d ^= (G15 << (Utils.getBCHDigit(d) - G15_BCH))\n }\n\n // xor final data with mask pattern in order to ensure that\n // no combination of Error Correction Level and data mask pattern\n // will result in an all-zero data string\n return ((data << 10) | d) ^ G15_MASK\n}\n","const Mode = require('./mode')\n\nfunction NumericData (data) {\n this.mode = Mode.NUMERIC\n this.data = data.toString()\n}\n\nNumericData.getBitsLength = function getBitsLength (length) {\n return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)\n}\n\nNumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nNumericData.prototype.getBitsLength = function getBitsLength () {\n return NumericData.getBitsLength(this.data.length)\n}\n\nNumericData.prototype.write = function write (bitBuffer) {\n let i, group, value\n\n // The input data string is divided into groups of three digits,\n // and each group is converted to its 10-bit binary equivalent.\n for (i = 0; i + 3 <= this.data.length; i += 3) {\n group = this.data.substr(i, 3)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, 10)\n }\n\n // If the number of input digits is not an exact multiple of three,\n // the final one or two digits are converted to 4 or 7 bits respectively.\n const remainingNum = this.data.length - i\n if (remainingNum > 0) {\n group = this.data.substr(i)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, remainingNum * 3 + 1)\n }\n}\n\nmodule.exports = NumericData\n","const Mode = require('./mode')\n\n/**\n * Array of characters available in alphanumeric mode\n *\n * As per QR Code specification, to each character\n * is assigned a value from 0 to 44 which in this case coincides\n * with the array index\n *\n * @type {Array}\n */\nconst ALPHA_NUM_CHARS = [\n '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n ' ', '$', '%', '*', '+', '-', '.', '/', ':'\n]\n\nfunction AlphanumericData (data) {\n this.mode = Mode.ALPHANUMERIC\n this.data = data\n}\n\nAlphanumericData.getBitsLength = function getBitsLength (length) {\n return 11 * Math.floor(length / 2) + 6 * (length % 2)\n}\n\nAlphanumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nAlphanumericData.prototype.getBitsLength = function getBitsLength () {\n return AlphanumericData.getBitsLength(this.data.length)\n}\n\nAlphanumericData.prototype.write = function write (bitBuffer) {\n let i\n\n // Input data characters are divided into groups of two characters\n // and encoded as 11-bit binary codes.\n for (i = 0; i + 2 <= this.data.length; i += 2) {\n // The character value of the first character is multiplied by 45\n let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45\n\n // The character value of the second digit is added to the product\n value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1])\n\n // The sum is then stored as 11-bit binary number\n bitBuffer.put(value, 11)\n }\n\n // If the number of input data characters is not a multiple of two,\n // the character value of the final character is encoded as a 6-bit binary number.\n if (this.data.length % 2) {\n bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6)\n }\n}\n\nmodule.exports = AlphanumericData\n","'use strict'\n\nmodule.exports = function encodeUtf8 (input) {\n var result = []\n var size = input.length\n\n for (var index = 0; index < size; index++) {\n var point = input.charCodeAt(index)\n\n if (point >= 0xD800 && point <= 0xDBFF && size > index + 1) {\n var second = input.charCodeAt(index + 1)\n\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n point = (point - 0xD800) * 0x400 + second - 0xDC00 + 0x10000\n index += 1\n }\n }\n\n // US-ASCII\n if (point < 0x80) {\n result.push(point)\n continue\n }\n\n // 2-byte UTF-8\n if (point < 0x800) {\n result.push((point >> 6) | 192)\n result.push((point & 63) | 128)\n continue\n }\n\n // 3-byte UTF-8\n if (point < 0xD800 || (point >= 0xE000 && point < 0x10000)) {\n result.push((point >> 12) | 224)\n result.push(((point >> 6) & 63) | 128)\n result.push((point & 63) | 128)\n continue\n }\n\n // 4-byte UTF-8\n if (point >= 0x10000 && point <= 0x10FFFF) {\n result.push((point >> 18) | 240)\n result.push(((point >> 12) & 63) | 128)\n result.push(((point >> 6) & 63) | 128)\n result.push((point & 63) | 128)\n continue\n }\n\n // Invalid character\n result.push(0xEF, 0xBF, 0xBD)\n }\n\n return new Uint8Array(result).buffer\n}\n","const encodeUtf8 = require('encode-utf8')\nconst Mode = require('./mode')\n\nfunction ByteData (data) {\n this.mode = Mode.BYTE\n if (typeof (data) === 'string') {\n data = encodeUtf8(data)\n }\n this.data = new Uint8Array(data)\n}\n\nByteData.getBitsLength = function getBitsLength (length) {\n return length * 8\n}\n\nByteData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nByteData.prototype.getBitsLength = function getBitsLength () {\n return ByteData.getBitsLength(this.data.length)\n}\n\nByteData.prototype.write = function (bitBuffer) {\n for (let i = 0, l = this.data.length; i < l; i++) {\n bitBuffer.put(this.data[i], 8)\n }\n}\n\nmodule.exports = ByteData\n","const Mode = require('./mode')\nconst Utils = require('./utils')\n\nfunction KanjiData (data) {\n this.mode = Mode.KANJI\n this.data = data\n}\n\nKanjiData.getBitsLength = function getBitsLength (length) {\n return length * 13\n}\n\nKanjiData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nKanjiData.prototype.getBitsLength = function getBitsLength () {\n return KanjiData.getBitsLength(this.data.length)\n}\n\nKanjiData.prototype.write = function (bitBuffer) {\n let i\n\n // In the Shift JIS system, Kanji characters are represented by a two byte combination.\n // These byte values are shifted from the JIS X 0208 values.\n // JIS X 0208 gives details of the shift coded representation.\n for (i = 0; i < this.data.length; i++) {\n let value = Utils.toSJIS(this.data[i])\n\n // For characters with Shift JIS values from 0x8140 to 0x9FFC:\n if (value >= 0x8140 && value <= 0x9FFC) {\n // Subtract 0x8140 from Shift JIS value\n value -= 0x8140\n\n // For characters with Shift JIS values from 0xE040 to 0xEBBF\n } else if (value >= 0xE040 && value <= 0xEBBF) {\n // Subtract 0xC140 from Shift JIS value\n value -= 0xC140\n } else {\n throw new Error(\n 'Invalid SJIS character: ' + this.data[i] + '\\n' +\n 'Make sure your charset is UTF-8')\n }\n\n // Multiply most significant byte of result by 0xC0\n // and add least significant byte to product\n value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff)\n\n // Convert result to a 13-bit binary string\n bitBuffer.put(value, 13)\n }\n}\n\nmodule.exports = KanjiData\n","'use strict';\n\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin <self@wyattbaldwin.com>\n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\nvar dijkstra = {\n single_source_shortest_paths: function(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = dijkstra.PriorityQueue.make();\n open.push(s, 0);\n\n var closest,\n u, v,\n cost_of_s_to_u,\n adjacent_nodes,\n cost_of_e,\n cost_of_s_to_u_plus_cost_of_e,\n cost_of_s_to_v,\n first_visit;\n while (!open.empty()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph[u] || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (v in adjacent_nodes) {\n if (adjacent_nodes.hasOwnProperty(v)) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = (typeof costs[v] === 'undefined');\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push(v, cost_of_s_to_u_plus_cost_of_e);\n predecessors[v] = u;\n }\n }\n }\n }\n\n if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(\n predecessors, d);\n },\n\n /**\n * A very naive priority queue implementation.\n */\n PriorityQueue: {\n make: function (opts) {\n var T = dijkstra.PriorityQueue,\n t = {},\n key;\n opts = opts || {};\n for (key in T) {\n if (T.hasOwnProperty(key)) {\n t[key] = T[key];\n }\n }\n t.queue = [];\n t.sorter = opts.sorter || T.default_sorter;\n return t;\n },\n\n default_sorter: function (a, b) {\n return a.cost - b.cost;\n },\n\n /**\n * Add a new item to the queue and ensure the highest priority element\n * is at the front of the queue.\n */\n push: function (value, cost) {\n var item = {value: value, cost: cost};\n this.queue.push(item);\n this.queue.sort(this.sorter);\n },\n\n /**\n * Return the highest priority element in the queue.\n */\n pop: function () {\n return this.queue.shift();\n },\n\n empty: function () {\n return this.queue.length === 0;\n }\n }\n};\n\n\n// node.js module exports\nif (typeof module !== 'undefined') {\n module.exports = dijkstra;\n}\n","const Mode = require('./mode')\nconst NumericData = require('./numeric-data')\nconst AlphanumericData = require('./alphanumeric-data')\nconst ByteData = require('./byte-data')\nconst KanjiData = require('./kanji-data')\nconst Regex = require('./regex')\nconst Utils = require('./utils')\nconst dijkstra = require('dijkstrajs')\n\n/**\n * Returns UTF8 byte length\n *\n * @param {String} str Input string\n * @return {Number} Number of byte\n */\nfunction getStringByteLength (str) {\n return unescape(encodeURIComponent(str)).length\n}\n\n/**\n * Get a list of segments of the specified mode\n * from a string\n *\n * @param {Mode} mode Segment mode\n * @param {String} str String to process\n * @return {Array} Array of object with segments data\n */\nfunction getSegments (regex, mode, str) {\n const segments = []\n let result\n\n while ((result = regex.exec(str)) !== null) {\n segments.push({\n data: result[0],\n index: result.index,\n mode: mode,\n length: result[0].length\n })\n }\n\n return segments\n}\n\n/**\n * Extracts a series of segments with the appropriate\n * modes from a string\n *\n * @param {String} dataStr Input string\n * @return {Array} Array of object with segments data\n */\nfunction getSegmentsFromString (dataStr) {\n const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr)\n const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr)\n let byteSegs\n let kanjiSegs\n\n if (Utils.isKanjiModeEnabled()) {\n byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr)\n kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr)\n } else {\n byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr)\n kanjiSegs = []\n }\n\n const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs)\n\n return segs\n .sort(function (s1, s2) {\n return s1.index - s2.index\n })\n .map(function (obj) {\n return {\n data: obj.data,\n mode: obj.mode,\n length: obj.length\n }\n })\n}\n\n/**\n * Returns how many bits are needed to encode a string of\n * specified length with the specified mode\n *\n * @param {Number} length String length\n * @param {Mode} mode Segment mode\n * @return {Number} Bit length\n */\nfunction getSegmentBitsLength (length, mode) {\n switch (mode) {\n case Mode.NUMERIC:\n return NumericData.getBitsLength(length)\n case Mode.ALPHANUMERIC:\n return AlphanumericData.getBitsLength(length)\n case Mode.KANJI:\n return KanjiData.getBitsLength(length)\n case Mode.BYTE:\n return ByteData.getBitsLength(length)\n }\n}\n\n/**\n * Merges adjacent segments which have the same mode\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction mergeSegments (segs) {\n return segs.reduce(function (acc, curr) {\n const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null\n if (prevSeg && prevSeg.mode === curr.mode) {\n acc[acc.length - 1].data += curr.data\n return acc\n }\n\n acc.push(curr)\n return acc\n }, [])\n}\n\n/**\n * Generates a list of all possible nodes combination which\n * will be used to build a segments graph.\n *\n * Nodes are divided by groups. Each group will contain a list of all the modes\n * in which is possible to encode the given text.\n *\n * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.\n * The group for '12345' will contain then 3 objects, one for each\n * possible encoding mode.\n *\n * Each node represents a possible segment.\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction buildNodes (segs) {\n const nodes = []\n for (let i = 0; i < segs.length; i++) {\n const seg = segs[i]\n\n switch (seg.mode) {\n case Mode.NUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length },\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.ALPHANUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.KANJI:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n break\n case Mode.BYTE:\n nodes.push([\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n }\n }\n\n return nodes\n}\n\n/**\n * Builds a graph from a list of nodes.\n * All segments in each node group will be connected with all the segments of\n * the next group and so on.\n *\n * At each connection will be assigned a weight depending on the\n * segment's byte length.\n *\n * @param {Array} nodes Array of object with segments data\n * @param {Number} version QR Code version\n * @return {Object} Graph of all possible segments\n */\nfunction buildGraph (nodes, version) {\n const table = {}\n const graph = { start: {} }\n let prevNodeIds = ['start']\n\n for (let i = 0; i < nodes.length; i++) {\n const nodeGroup = nodes[i]\n const currentNodeIds = []\n\n for (let j = 0; j < nodeGroup.length; j++) {\n const node = nodeGroup[j]\n const key = '' + i + j\n\n currentNodeIds.push(key)\n table[key] = { node: node, lastCount: 0 }\n graph[key] = {}\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n const prevNodeId = prevNodeIds[n]\n\n if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {\n graph[prevNodeId][key] =\n getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -\n getSegmentBitsLength(table[prevNodeId].lastCount, node.mode)\n\n table[prevNodeId].lastCount += node.length\n } else {\n if (table[prevNodeId]) table[prevNodeId].lastCount = node.length\n\n graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +\n 4 + Mode.getCharCountIndicator(node.mode, version) // switch cost\n }\n }\n }\n\n prevNodeIds = currentNodeIds\n }\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n graph[prevNodeIds[n]].end = 0\n }\n\n return { map: graph, table: table }\n}\n\n/**\n * Builds a segment from a specified data and mode.\n * If a mode is not specified, the more suitable will be used.\n *\n * @param {String} data Input data\n * @param {Mode | String} modesHint Data mode\n * @return {Segment} Segment\n */\nfunction buildSingleSegment (data, modesHint) {\n let mode\n const bestMode = Mode.getBestModeForData(data)\n\n mode = Mode.from(modesHint, bestMode)\n\n // Make sure data can be encoded\n if (mode !== Mode.BYTE && mode.bit < bestMode.bit) {\n throw new Error('\"' + data + '\"' +\n ' cannot be encoded with mode ' + Mode.toString(mode) +\n '.\\n Suggested mode is: ' + Mode.toString(bestMode))\n }\n\n // Use Mode.BYTE if Kanji support is disabled\n if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) {\n mode = Mode.BYTE\n }\n\n switch (mode) {\n case Mode.NUMERIC:\n return new NumericData(data)\n\n case Mode.ALPHANUMERIC:\n return new AlphanumericData(data)\n\n case Mode.KANJI:\n return new KanjiData(data)\n\n case Mode.BYTE:\n return new ByteData(data)\n }\n}\n\n/**\n * Builds a list of segments from an array.\n * Array can contain Strings or Objects with segment's info.\n *\n * For each item which is a string, will be generated a segment with the given\n * string and the more appropriate encoding mode.\n *\n * For each item which is an object, will be generated a segment with the given\n * data and mode.\n * Objects must contain at least the property \"data\".\n * If property \"mode\" is not present, the more suitable mode will be used.\n *\n * @param {Array} array Array of objects with segments data\n * @return {Array} Array of Segments\n */\nexports.fromArray = function fromArray (array) {\n return array.reduce(function (acc, seg) {\n if (typeof seg === 'string') {\n acc.push(buildSingleSegment(seg, null))\n } else if (seg.data) {\n acc.push(buildSingleSegment(seg.data, seg.mode))\n }\n\n return acc\n }, [])\n}\n\n/**\n * Builds an optimized sequence of segments from a string,\n * which will produce the shortest possible bitstream.\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @return {Array} Array of segments\n */\nexports.fromString = function fromString (data, version) {\n const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n\n const nodes = buildNodes(segs)\n const graph = buildGraph(nodes, version)\n const path = dijkstra.find_path(graph.map, 'start', 'end')\n\n const optimizedSegs = []\n for (let i = 1; i < path.length - 1; i++) {\n optimizedSegs.push(graph.table[path[i]].node)\n }\n\n return exports.fromArray(mergeSegments(optimizedSegs))\n}\n\n/**\n * Splits a string in various segments with the modes which\n * best represent their content.\n * The produced segments are far from being optimized.\n * The output of this function is only used to estimate a QR Code version\n * which may contain the data.\n *\n * @param {string} data Input string\n * @return {Array} Array of segments\n */\nexports.rawSplit = function rawSplit (data) {\n return exports.fromArray(\n getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n )\n}\n","const Utils = require('./utils')\nconst ECLevel = require('./error-correction-level')\nconst BitBuffer = require('./bit-buffer')\nconst BitMatrix = require('./bit-matrix')\nconst AlignmentPattern = require('./alignment-pattern')\nconst FinderPattern = require('./finder-pattern')\nconst MaskPattern = require('./mask-pattern')\nconst ECCode = require('./error-correction-code')\nconst ReedSolomonEncoder = require('./reed-solomon-encoder')\nconst Version = require('./version')\nconst FormatInfo = require('./format-info')\nconst Mode = require('./mode')\nconst Segments = require('./segments')\n\n/**\n * QRCode for JavaScript\n *\n * modified by Ryan Day for nodejs support\n * Copyright (c) 2011 Ryan Day\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/mit-license.php\n *\n//---------------------------------------------------------------------\n// QRCode for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n// http://www.opensource.org/licenses/mit-license.php\n//\n// The word \"QR Code\" is registered trademark of\n// DENSO WAVE INCORPORATED\n// http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\n*/\n\n/**\n * Add finder patterns bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupFinderPattern (matrix, version) {\n const size = matrix.size\n const pos = FinderPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -1; r <= 7; r++) {\n if (row + r <= -1 || size <= row + r) continue\n\n for (let c = -1; c <= 7; c++) {\n if (col + c <= -1 || size <= col + c) continue\n\n if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||\n (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||\n (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add timing pattern bits to matrix\n *\n * Note: this function must be called before {@link setupAlignmentPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n */\nfunction setupTimingPattern (matrix) {\n const size = matrix.size\n\n for (let r = 8; r < size - 8; r++) {\n const value = r % 2 === 0\n matrix.set(r, 6, value, true)\n matrix.set(6, r, value, true)\n }\n}\n\n/**\n * Add alignment patterns bits to matrix\n *\n * Note: this function must be called after {@link setupTimingPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupAlignmentPattern (matrix, version) {\n const pos = AlignmentPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -2; r <= 2; r++) {\n for (let c = -2; c <= 2; c++) {\n if (r === -2 || r === 2 || c === -2 || c === 2 ||\n (r === 0 && c === 0)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add version info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupVersionInfo (matrix, version) {\n const size = matrix.size\n const bits = Version.getEncodedBits(version)\n let row, col, mod\n\n for (let i = 0; i < 18; i++) {\n row = Math.floor(i / 3)\n col = i % 3 + size - 8 - 3\n mod = ((bits >> i) & 1) === 1\n\n matrix.set(row, col, mod, true)\n matrix.set(col, row, mod, true)\n }\n}\n\n/**\n * Add format info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {Number} maskPattern Mask pattern reference value\n */\nfunction setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {\n const size = matrix.size\n const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern)\n let i, mod\n\n for (i = 0; i < 15; i++) {\n mod = ((bits >> i) & 1) === 1\n\n // vertical\n if (i < 6) {\n matrix.set(i, 8, mod, true)\n } else if (i < 8) {\n matrix.set(i + 1, 8, mod, true)\n } else {\n matrix.set(size - 15 + i, 8, mod, true)\n }\n\n // horizontal\n if (i < 8) {\n matrix.set(8, size - i - 1, mod, true)\n } else if (i < 9) {\n matrix.set(8, 15 - i - 1 + 1, mod, true)\n } else {\n matrix.set(8, 15 - i - 1, mod, true)\n }\n }\n\n // fixed module\n matrix.set(size - 8, 8, 1, true)\n}\n\n/**\n * Add encoded data bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Uint8Array} data Data codewords\n */\nfunction setupData (matrix, data) {\n const size = matrix.size\n let inc = -1\n let row = size - 1\n let bitIndex = 7\n let byteIndex = 0\n\n for (let col = size - 1; col > 0; col -= 2) {\n if (col === 6) col--\n\n while (true) {\n for (let c = 0; c < 2; c++) {\n if (!matrix.isReserved(row, col - c)) {\n let dark = false\n\n if (byteIndex < data.length) {\n dark = (((data[byteIndex] >>> bitIndex) & 1) === 1)\n }\n\n matrix.set(row, col - c, dark)\n bitIndex--\n\n if (bitIndex === -1) {\n byteIndex++\n bitIndex = 7\n }\n }\n }\n\n row += inc\n\n if (row < 0 || size <= row) {\n row -= inc\n inc = -inc\n break\n }\n }\n }\n}\n\n/**\n * Create encoded codewords from data input\n *\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {ByteData} data Data input\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createData (version, errorCorrectionLevel, segments) {\n // Prepare data buffer\n const buffer = new BitBuffer()\n\n segments.forEach(function (data) {\n // prefix data with mode indicator (4 bits)\n buffer.put(data.mode.bit, 4)\n\n // Prefix data with character count indicator.\n // The character count indicator is a string of bits that represents the\n // number of characters that are being encoded.\n // The character count indicator must be placed after the mode indicator\n // and must be a certain number of bits long, depending on the QR version\n // and data mode\n // @see {@link Mode.getCharCountIndicator}.\n buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version))\n\n // add binary data sequence to buffer\n data.write(buffer)\n })\n\n // Calculate required number of bits\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n // Add a terminator.\n // If the bit string is shorter than the total number of required bits,\n // a terminator of up to four 0s must be added to the right side of the string.\n // If the bit string is more than four bits shorter than the required number of bits,\n // add four 0s to the end.\n if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {\n buffer.put(0, 4)\n }\n\n // If the bit string is fewer than four bits shorter, add only the number of 0s that\n // are needed to reach the required number of bits.\n\n // After adding the terminator, if the number of bits in the string is not a multiple of 8,\n // pad the string on the right with 0s to make the string's length a multiple of 8.\n while (buffer.getLengthInBits() % 8 !== 0) {\n buffer.putBit(0)\n }\n\n // Add pad bytes if the string is still shorter than the total number of required bits.\n // Extend the buffer to fill the data capacity of the symbol corresponding to\n // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)\n // and 00010001 (0x11) alternately.\n const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8\n for (let i = 0; i < remainingByte; i++) {\n buffer.put(i % 2 ? 0x11 : 0xEC, 8)\n }\n\n return createCodewords(buffer, version, errorCorrectionLevel)\n}\n\n/**\n * Encode input data with Reed-Solomon and return codewords with\n * relative error correction bits\n *\n * @param {BitBuffer} bitBuffer Data to encode\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createCodewords (bitBuffer, version, errorCorrectionLevel) {\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewords = totalCodewords - ecTotalCodewords\n\n // Total number of blocks\n const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel)\n\n // Calculate how many blocks each group should contain\n const blocksInGroup2 = totalCodewords % ecTotalBlocks\n const blocksInGroup1 = ecTotalBlocks - blocksInGroup2\n\n const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks)\n\n const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks)\n const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1\n\n // Number of EC codewords is the same for both groups\n const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1\n\n // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount\n const rs = new ReedSolomonEncoder(ecCount)\n\n let offset = 0\n const dcData = new Array(ecTotalBlocks)\n const ecData = new Array(ecTotalBlocks)\n let maxDataSize = 0\n const buffer = new Uint8Array(bitBuffer.buffer)\n\n // Divide the buffer into the required number of blocks\n for (let b = 0; b < ecTotalBlocks; b++) {\n const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2\n\n // extract a block of data from buffer\n dcData[b] = buffer.slice(offset, offset + dataSize)\n\n // Calculate EC codewords for this data block\n ecData[b] = rs.encode(dcData[b])\n\n offset += dataSize\n maxDataSize = Math.max(maxDataSize, dataSize)\n }\n\n // Create final data\n // Interleave the data and error correction codewords from each block\n const data = new Uint8Array(totalCodewords)\n let index = 0\n let i, r\n\n // Add data codewords\n for (i = 0; i < maxDataSize; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n if (i < dcData[r].length) {\n data[index++] = dcData[r][i]\n }\n }\n }\n\n // Apped EC codewords\n for (i = 0; i < ecCount; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n data[index++] = ecData[r][i]\n }\n }\n\n return data\n}\n\n/**\n * Build QR Code symbol\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @param {ErrorCorretionLevel} errorCorrectionLevel Error level\n * @param {MaskPattern} maskPattern Mask pattern\n * @return {Object} Object containing symbol data\n */\nfunction createSymbol (data, version, errorCorrectionLevel, maskPattern) {\n let segments\n\n if (Array.isArray(data)) {\n segments = Segments.fromArray(data)\n } else if (typeof data === 'string') {\n let estimatedVersion = version\n\n if (!estimatedVersion) {\n const rawSegments = Segments.rawSplit(data)\n\n // Estimate best version that can contain raw splitted segments\n estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel)\n }\n\n // Build optimized segments\n // If estimated version is undefined, try with the highest version\n segments = Segments.fromString(data, estimatedVersion || 40)\n } else {\n throw new Error('Invalid data')\n }\n\n // Get the min version that can contain data\n const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel)\n\n // If no version is found, data cannot be stored\n if (!bestVersion) {\n throw new Error('The amount of data is too big to be stored in a QR Code')\n }\n\n // If not specified, use min version as default\n if (!version) {\n version = bestVersion\n\n // Check if the specified version can contain the data\n } else if (version < bestVersion) {\n throw new Error('\\n' +\n 'The chosen QR Code version cannot contain this amount of data.\\n' +\n 'Minimum version required to store current data is: ' + bestVersion + '.\\n'\n )\n }\n\n const dataBits = createData(version, errorCorrectionLevel, segments)\n\n // Allocate matrix buffer\n const moduleCount = Utils.getSymbolSize(version)\n const modules = new BitMatrix(moduleCount)\n\n // Add function modules\n setupFinderPattern(modules, version)\n setupTimingPattern(modules)\n setupAlignmentPattern(modules, version)\n\n // Add temporary dummy bits for format info just to set them as reserved.\n // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}\n // since the masking operation must be performed only on the encoding region.\n // These blocks will be replaced with correct values later in code.\n setupFormatInfo(modules, errorCorrectionLevel, 0)\n\n if (version >= 7) {\n setupVersionInfo(modules, version)\n }\n\n // Add data codewords\n setupData(modules, dataBits)\n\n if (isNaN(maskPattern)) {\n // Find best mask pattern\n maskPattern = MaskPattern.getBestMask(modules,\n setupFormatInfo.bind(null, modules, errorCorrectionLevel))\n }\n\n // Apply mask pattern\n MaskPattern.applyMask(maskPattern, modules)\n\n // Replace format info bits with correct values\n setupFormatInfo(modules, errorCorrectionLevel, maskPattern)\n\n return {\n modules: modules,\n version: version,\n errorCorrectionLevel: errorCorrectionLevel,\n maskPattern: maskPattern,\n segments: segments\n }\n}\n\n/**\n * QR Code\n *\n * @param {String | Array} data Input data\n * @param {Object} options Optional configurations\n * @param {Number} options.version QR Code version\n * @param {String} options.errorCorrectionLevel Error correction level\n * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis\n */\nexports.create = function create (data, options) {\n if (typeof data === 'undefined' || data === '') {\n throw new Error('No input text')\n }\n\n let errorCorrectionLevel = ECLevel.M\n let version\n let mask\n\n if (typeof options !== 'undefined') {\n // Use higher error correction level as default\n errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M)\n version = Version.from(options.version)\n mask = MaskPattern.from(options.maskPattern)\n\n if (options.toSJISFunc) {\n Utils.setToSJISFunction(options.toSJISFunc)\n }\n }\n\n return createSymbol(data, version, errorCorrectionLevel, mask)\n}\n","function hex2rgba (hex) {\n if (typeof hex === 'number') {\n hex = hex.toString()\n }\n\n if (typeof hex !== 'string') {\n throw new Error('Color should be defined as hex string')\n }\n\n let hexCode = hex.slice().replace('#', '').split('')\n if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {\n throw new Error('Invalid hex color: ' + hex)\n }\n\n // Convert from short to long form (fff -> ffffff)\n if (hexCode.length === 3 || hexCode.length === 4) {\n hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {\n return [c, c]\n }))\n }\n\n // Add default alpha value\n if (hexCode.length === 6) hexCode.push('F', 'F')\n\n const hexValue = parseInt(hexCode.join(''), 16)\n\n return {\n r: (hexValue >> 24) & 255,\n g: (hexValue >> 16) & 255,\n b: (hexValue >> 8) & 255,\n a: hexValue & 255,\n hex: '#' + hexCode.slice(0, 6).join('')\n }\n}\n\nexports.getOptions = function getOptions (options) {\n if (!options) options = {}\n if (!options.color) options.color = {}\n\n const margin = typeof options.margin === 'undefined' ||\n options.margin === null ||\n options.margin < 0\n ? 4\n : options.margin\n\n const width = options.width && options.width >= 21 ? options.width : undefined\n const scale = options.scale || 4\n\n return {\n width: width,\n scale: width ? 4 : scale,\n margin: margin,\n color: {\n dark: hex2rgba(options.color.dark || '#000000ff'),\n light: hex2rgba(options.color.light || '#ffffffff')\n },\n type: options.type,\n rendererOpts: options.rendererOpts || {}\n }\n}\n\nexports.getScale = function getScale (qrSize, opts) {\n return opts.width && opts.width >= qrSize + opts.margin * 2\n ? opts.width / (qrSize + opts.margin * 2)\n : opts.scale\n}\n\nexports.getImageWidth = function getImageWidth (qrSize, opts) {\n const scale = exports.getScale(qrSize, opts)\n return Math.floor((qrSize + opts.margin * 2) * scale)\n}\n\nexports.qrToImageData = function qrToImageData (imgData, qr, opts) {\n const size = qr.modules.size\n const data = qr.modules.data\n const scale = exports.getScale(size, opts)\n const symbolSize = Math.floor((size + opts.margin * 2) * scale)\n const scaledMargin = opts.margin * scale\n const palette = [opts.color.light, opts.color.dark]\n\n for (let i = 0; i < symbolSize; i++) {\n for (let j = 0; j < symbolSize; j++) {\n let posDst = (i * symbolSize + j) * 4\n let pxColor = opts.color.light\n\n if (i >= scaledMargin && j >= scaledMargin &&\n i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {\n const iSrc = Math.floor((i - scaledMargin) / scale)\n const jSrc = Math.floor((j - scaledMargin) / scale)\n pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0]\n }\n\n imgData[posDst++] = pxColor.r\n imgData[posDst++] = pxColor.g\n imgData[posDst++] = pxColor.b\n imgData[posDst] = pxColor.a\n }\n }\n}\n","const Utils = require('./utils')\n\nfunction clearCanvas (ctx, canvas, size) {\n ctx.clearRect(0, 0, canvas.width, canvas.height)\n\n if (!canvas.style) canvas.style = {}\n canvas.height = size\n canvas.width = size\n canvas.style.height = size + 'px'\n canvas.style.width = size + 'px'\n}\n\nfunction getCanvasElement () {\n try {\n return document.createElement('canvas')\n } catch (e) {\n throw new Error('You need to specify a canvas element')\n }\n}\n\nexports.render = function render (qrData, canvas, options) {\n let opts = options\n let canvasEl = canvas\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!canvas) {\n canvasEl = getCanvasElement()\n }\n\n opts = Utils.getOptions(opts)\n const size = Utils.getImageWidth(qrData.modules.size, opts)\n\n const ctx = canvasEl.getContext('2d')\n const image = ctx.createImageData(size, size)\n Utils.qrToImageData(image.data, qrData, opts)\n\n clearCanvas(ctx, canvasEl, size)\n ctx.putImageData(image, 0, 0)\n\n return canvasEl\n}\n\nexports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {\n let opts = options\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!opts) opts = {}\n\n const canvasEl = exports.render(qrData, canvas, opts)\n\n const type = opts.type || 'image/png'\n const rendererOpts = opts.rendererOpts || {}\n\n return canvasEl.toDataURL(type, rendererOpts.quality)\n}\n","const Utils = require('./utils')\n\nfunction getColorAttrib (color, attrib) {\n const alpha = color.a / 255\n const str = attrib + '=\"' + color.hex + '\"'\n\n return alpha < 1\n ? str + ' ' + attrib + '-opacity=\"' + alpha.toFixed(2).slice(1) + '\"'\n : str\n}\n\nfunction svgCmd (cmd, x, y) {\n let str = cmd + x\n if (typeof y !== 'undefined') str += ' ' + y\n\n return str\n}\n\nfunction qrToPath (data, size, margin) {\n let path = ''\n let moveBy = 0\n let newRow = false\n let lineLength = 0\n\n for (let i = 0; i < data.length; i++) {\n const col = Math.floor(i % size)\n const row = Math.floor(i / size)\n\n if (!col && !newRow) newRow = true\n\n if (data[i]) {\n lineLength++\n\n if (!(i > 0 && col > 0 && data[i - 1])) {\n path += newRow\n ? svgCmd('M', col + margin, 0.5 + row + margin)\n : svgCmd('m', moveBy, 0)\n\n moveBy = 0\n newRow = false\n }\n\n if (!(col + 1 < size && data[i + 1])) {\n path += svgCmd('h', lineLength)\n lineLength = 0\n }\n } else {\n moveBy++\n }\n }\n\n return path\n}\n\nexports.render = function render (qrData, options, cb) {\n const opts = Utils.getOptions(options)\n const size = qrData.modules.size\n const data = qrData.modules.data\n const qrcodesize = size + opts.margin * 2\n\n const bg = !opts.color.light.a\n ? ''\n : '<path ' + getColorAttrib(opts.color.light, 'fill') +\n ' d=\"M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z\"/>'\n\n const path =\n '<path ' + getColorAttrib(opts.color.dark, 'stroke') +\n ' d=\"' + qrToPath(data, size, opts.margin) + '\"/>'\n\n const viewBox = 'viewBox=\"' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '\"'\n\n const width = !opts.width ? '' : 'width=\"' + opts.width + '\" height=\"' + opts.width + '\" '\n\n const svgTag = '<svg xmlns=\"http://www.w3.org/2000/svg\" ' + width + viewBox + ' shape-rendering=\"crispEdges\">' + bg + path + '</svg>\\n'\n\n if (typeof cb === 'function') {\n cb(null, svgTag)\n }\n\n return svgTag\n}\n","\nconst canPromise = require('./can-promise')\n\nconst QRCode = require('./core/qrcode')\nconst CanvasRenderer = require('./renderer/canvas')\nconst SvgRenderer = require('./renderer/svg-tag.js')\n\nfunction renderCanvas (renderFunc, canvas, text, opts, cb) {\n const args = [].slice.call(arguments, 1)\n const argsNum = args.length\n const isLastArgCb = typeof args[argsNum - 1] === 'function'\n\n if (!isLastArgCb && !canPromise()) {\n throw new Error('Callback required as last argument')\n }\n\n if (isLastArgCb) {\n if (argsNum < 2) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 2) {\n cb = text\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 3) {\n if (canvas.getContext && typeof cb === 'undefined') {\n cb = opts\n opts = undefined\n } else {\n cb = opts\n opts = text\n text = canvas\n canvas = undefined\n }\n }\n } else {\n if (argsNum < 1) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 1) {\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 2 && !canvas.getContext) {\n opts = text\n text = canvas\n canvas = undefined\n }\n\n return new Promise(function (resolve, reject) {\n try {\n const data = QRCode.create(text, opts)\n resolve(renderFunc(data, canvas, opts))\n } catch (e) {\n reject(e)\n }\n })\n }\n\n try {\n const data = QRCode.create(text, opts)\n cb(null, renderFunc(data, canvas, opts))\n } catch (e) {\n cb(e)\n }\n}\n\nexports.create = QRCode.create\nexports.toCanvas = renderCanvas.bind(null, CanvasRenderer.render)\nexports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL)\n\n// only svg for now.\nexports.toString = renderCanvas.bind(null, function (data, _, opts) {\n return SvgRenderer.render(data, opts)\n})\n","<script setup lang=\"ts\">\nimport { onMounted, ref } from 'vue';\nimport QRCode from 'qrcode';\n\ninterface Props {\n url: string,\n size: number,\n}\n\nconst props = defineProps<Props>();\n\nconst qrCanvas = ref();\n\nonMounted(() => {\n QRCode.toCanvas(qrCanvas.value, props.url, {\n errorCorrectionLevel: 'L',\n width: props.size,\n margin: 0,\n });\n});\n</script>\n<template>\n <canvas\n ref=\"qrCanvas\"\n class=\"h-min max-w-sm object-contain\"\n />\n</template>\n","export default \"__VITE_ASSET__5b8cda0d__\"","<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\ninterface Props {\n title?: string;\n variant?: 'normal' | 'bold'\n color?: 'yellow' | 'red'\n}\nconst props = withDefaults(defineProps<Props>(), {\n title: 'Tip',\n variant: 'normal',\n color: 'yellow',\n});\n\nconst titleClasses = computed(() => {\n const colors = {\n normal: 'text-z-gray-900',\n bold: props.color === 'yellow' ? 'text-z-yellow-600 font-medium' : 'text-z-red font-medium',\n };\n\n return colors[props.variant];\n});\nconst bgClasses = computed(() => {\n const colors = {\n yellow: 'bg-z-yellow-50',\n red: 'bg-z-cerise-50',\n };\n\n return colors[props.color];\n});\n</script>\n<template>\n <div\n class=\"flex items-start space-x-2 rounded-xl p-4\"\n :class=\"bgClasses\"\n >\n <slot name=\"icon\">\n <img\n src=\"@/assets/icons/idea.svg\"\n class=\"h-6 w-6\"\n >\n </slot>\n <div class=\"flex flex-col space-y-2\">\n <p\n v-if=\"title\"\n :class=\"titleClasses\"\n >\n {{ title }}\n </p>\n\n <p class=\"text-sm leading-5 text-z-gray-800\">\n <slot />\n </p>\n </div>\n </div>\n</template>\n","export default \"__VITE_ASSET__bdb1f41d__\"","<script setup lang=\"ts\">\nimport { useField } from 'vee-validate';\nimport { computed } from 'vue';\n\ninterface Props {\n min?: number;\n max?: number;\n label: string;\n hideLabel?: boolean;\n modelValue?: number\n unit?: string;\n disabled?: boolean;\n name: string;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n min: undefined,\n max: undefined,\n modelValue: undefined,\n unit: '',\n});\nconst emit = defineEmits<{(e: 'update:modelValue', value: number): void}>();\n\nconst {\n value: inputValue,\n handleBlur,\n handleChange,\n} = useField(props.name, undefined, {\n initialValue: props.modelValue,\n});\n\nfunction subtract() {\n if ((props.min && inputValue.value > props.min) || props.min === undefined) {\n handleChange(inputValue.value - 1);\n emit('update:modelValue', inputValue.value - 1);\n }\n}\nfunction add() {\n if ((props.max && inputValue.value < props.max) || props.max === undefined) {\n handleChange(inputValue.value + 1);\n emit('update:modelValue', inputValue.value);\n }\n}\n\nconst isMinDisabled = computed(() => props.disabled || inputValue.value === props.min);\nconst isMaxDisabled = computed(() => props.disabled || inputValue.value === props.max);\n</script>\n<template>\n <div>\n <p\n v-if=\"!hideLabel\"\n class=\"text-z-gray-900\"\n >\n {{ label }}\n </p>\n <div\n class=\"mt-1 flex h-12 items-center justify-between rounded border border-z-gray-100 px-2\"\n :class=\"{ 'bg-z-gray-100': disabled }\"\n >\n <div class=\"flex w-1/3\">\n <button\n class=\"h-8 w-8 rounded text-white\"\n type=\"button\"\n :disabled=\"isMinDisabled\"\n :class=\" isMinDisabled ? 'bg-z-gray-500': 'bg-z-turquoise-600'\"\n @click=\"subtract\"\n @blur=\"handleBlur\"\n >\n <img\n src=\"@/assets/icons/minus.svg\"\n class=\"mx-auto h-6 w-6\"\n >\n </button>\n </div>\n <p :class=\"{ 'text-z-gray-500': disabled }\">\n {{ inputValue }}\n </p>\n <div class=\"flex w-1/3 items-center justify-end gap-2\">\n <p\n v-if=\"unit\"\n class=\"text-z-gray-500\"\n >\n {{ unit }}\n </p>\n <button\n class=\"h-8 w-8 rounded text-white\"\n type=\"button\"\n :disabled=\"isMaxDisabled\"\n :class=\" isMaxDisabled ? 'bg-z-gray-500': 'bg-z-turquoise-600'\"\n @click=\"add\"\n @blur=\"handleBlur\"\n >\n <img\n src=\"@/assets/icons/plus.svg\"\n class=\"mx-auto\"\n >\n </button>\n </div>\n </div>\n </div>\n</template>\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nvar fastDeepEqual = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n\nvar isEqual = /*@__PURE__*/getDefaultExportFromCjs(fastDeepEqual);\n\n/**\n * Copyright 2019 Google LLC. All Rights Reserved.\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 DEFAULT_ID = \"__googleMapsScriptId\";\n/**\n * The status of the [[Loader]].\n */\nvar LoaderStatus;\n(function (LoaderStatus) {\n LoaderStatus[LoaderStatus[\"INITIALIZED\"] = 0] = \"INITIALIZED\";\n LoaderStatus[LoaderStatus[\"LOADING\"] = 1] = \"LOADING\";\n LoaderStatus[LoaderStatus[\"SUCCESS\"] = 2] = \"SUCCESS\";\n LoaderStatus[LoaderStatus[\"FAILURE\"] = 3] = \"FAILURE\";\n})(LoaderStatus || (LoaderStatus = {}));\n/**\n * [[Loader]] makes it easier to add Google Maps JavaScript API to your application\n * dynamically using\n * [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n * It works by dynamically creating and appending a script node to the the\n * document head and wrapping the callback function so as to return a promise.\n *\n * ```\n * const loader = new Loader({\n * apiKey: \"\",\n * version: \"weekly\",\n * libraries: [\"places\"]\n * });\n *\n * loader.load().then((google) => {\n * const map = new google.maps.Map(...)\n * })\n * ```\n */\nclass Loader {\n /**\n * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set\n * using this library, instead the defaults are set by the Google Maps\n * JavaScript API server.\n *\n * ```\n * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});\n * ```\n */\n constructor({ apiKey, authReferrerPolicy, channel, client, id = DEFAULT_ID, language, libraries = [], mapIds, nonce, region, retries = 3, url = \"https://maps.googleapis.com/maps/api/js\", version, }) {\n this.callbacks = [];\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.apiKey = apiKey;\n this.authReferrerPolicy = authReferrerPolicy;\n this.channel = channel;\n this.client = client;\n this.id = id || DEFAULT_ID; // Do not allow empty string\n this.language = language;\n this.libraries = libraries;\n this.mapIds = mapIds;\n this.nonce = nonce;\n this.region = region;\n this.retries = retries;\n this.url = url;\n this.version = version;\n if (Loader.instance) {\n if (!isEqual(this.options, Loader.instance.options)) {\n throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Loader.instance.options)}`);\n }\n return Loader.instance;\n }\n Loader.instance = this;\n }\n get options() {\n return {\n version: this.version,\n apiKey: this.apiKey,\n channel: this.channel,\n client: this.client,\n id: this.id,\n libraries: this.libraries,\n language: this.language,\n region: this.region,\n mapIds: this.mapIds,\n nonce: this.nonce,\n url: this.url,\n authReferrerPolicy: this.authReferrerPolicy,\n };\n }\n get status() {\n if (this.errors.length) {\n return LoaderStatus.FAILURE;\n }\n if (this.done) {\n return LoaderStatus.SUCCESS;\n }\n if (this.loading) {\n return LoaderStatus.LOADING;\n }\n return LoaderStatus.INITIALIZED;\n }\n get failed() {\n return this.done && !this.loading && this.errors.length >= this.retries + 1;\n }\n /**\n * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].\n *\n * @ignore\n * @deprecated\n */\n createUrl() {\n let url = this.url;\n url += `?callback=__googleMapsCallback&loading=async`;\n if (this.apiKey) {\n url += `&key=${this.apiKey}`;\n }\n if (this.channel) {\n url += `&channel=${this.channel}`;\n }\n if (this.client) {\n url += `&client=${this.client}`;\n }\n if (this.libraries.length > 0) {\n url += `&libraries=${this.libraries.join(\",\")}`;\n }\n if (this.language) {\n url += `&language=${this.language}`;\n }\n if (this.region) {\n url += `®ion=${this.region}`;\n }\n if (this.version) {\n url += `&v=${this.version}`;\n }\n if (this.mapIds) {\n url += `&map_ids=${this.mapIds.join(\",\")}`;\n }\n if (this.authReferrerPolicy) {\n url += `&auth_referrer_policy=${this.authReferrerPolicy}`;\n }\n return url;\n }\n deleteScript() {\n const script = document.getElementById(this.id);\n if (script) {\n script.remove();\n }\n }\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n * @deprecated, use importLibrary() instead.\n */\n load() {\n return this.loadPromise();\n }\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n *\n * @ignore\n * @deprecated, use importLibrary() instead.\n */\n loadPromise() {\n return new Promise((resolve, reject) => {\n this.loadCallback((err) => {\n if (!err) {\n resolve(window.google);\n }\n else {\n reject(err.error);\n }\n });\n });\n }\n importLibrary(name) {\n this.execute();\n return google.maps.importLibrary(name);\n }\n /**\n * Load the Google Maps JavaScript API script with a callback.\n * @deprecated, use importLibrary() instead.\n */\n loadCallback(fn) {\n this.callbacks.push(fn);\n this.execute();\n }\n /**\n * Set the script on document.\n */\n setScript() {\n var _a, _b;\n if (document.getElementById(this.id)) {\n // TODO wrap onerror callback for cases where the script was loaded elsewhere\n this.callback();\n return;\n }\n const params = {\n key: this.apiKey,\n channel: this.channel,\n client: this.client,\n libraries: this.libraries.length && this.libraries,\n v: this.version,\n mapIds: this.mapIds,\n language: this.language,\n region: this.region,\n authReferrerPolicy: this.authReferrerPolicy,\n };\n // keep the URL minimal:\n Object.keys(params).forEach(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (key) => !params[key] && delete params[key]);\n if (!((_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.importLibrary)) {\n // tweaked copy of https://developers.google.com/maps/documentation/javascript/load-maps-js-api#dynamic-library-import\n // which also sets the base url, the id, and the nonce\n /* eslint-disable */\n ((g) => {\n // @ts-ignore\n let h, a, k, p = \"The Google Maps JavaScript API\", c = \"google\", l = \"importLibrary\", q = \"__ib__\", m = document, b = window;\n // @ts-ignore\n b = b[c] || (b[c] = {});\n // @ts-ignore\n const d = b.maps || (b.maps = {}), r = new Set(), e = new URLSearchParams(), u = () => \n // @ts-ignore\n h || (h = new Promise((f, n) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n yield (a = m.createElement(\"script\"));\n a.id = this.id;\n e.set(\"libraries\", [...r] + \"\");\n // @ts-ignore\n for (k in g)\n e.set(k.replace(/[A-Z]/g, (t) => \"_\" + t[0].toLowerCase()), g[k]);\n e.set(\"callback\", c + \".maps.\" + q);\n a.src = this.url + `?` + e;\n d[q] = f;\n a.onerror = () => (h = n(Error(p + \" could not load.\")));\n // @ts-ignore\n a.nonce = this.nonce || ((_a = m.querySelector(\"script[nonce]\")) === null || _a === void 0 ? void 0 : _a.nonce) || \"\";\n m.head.append(a);\n })));\n // @ts-ignore\n d[l] ? console.warn(p + \" only loads once. Ignoring:\", g) : (d[l] = (f, ...n) => r.add(f) && u().then(() => d[l](f, ...n)));\n })(params);\n /* eslint-enable */\n }\n // While most libraries populate the global namespace when loaded via bootstrap params,\n // this is not the case for \"marker\" when used with the inline bootstrap loader\n // (and maybe others in the future). So ensure there is an importLibrary for each:\n const libraryPromises = this.libraries.map((library) => this.importLibrary(library));\n // ensure at least one library, to kick off loading...\n if (!libraryPromises.length) {\n libraryPromises.push(this.importLibrary(\"core\"));\n }\n Promise.all(libraryPromises).then(() => this.callback(), (error) => {\n const event = new ErrorEvent(\"error\", { error }); // for backwards compat\n this.loadErrorCallback(event);\n });\n }\n /**\n * Reset the loader state.\n */\n reset() {\n this.deleteScript();\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.onerrorEvent = null;\n }\n resetIfRetryingFailed() {\n if (this.failed) {\n this.reset();\n }\n }\n loadErrorCallback(e) {\n this.errors.push(e);\n if (this.errors.length <= this.retries) {\n const delay = this.errors.length * Math.pow(2, this.errors.length);\n console.error(`Failed to load Google Maps script, retrying in ${delay} ms.`);\n setTimeout(() => {\n this.deleteScript();\n this.setScript();\n }, delay);\n }\n else {\n this.onerrorEvent = e;\n this.callback();\n }\n }\n callback() {\n this.done = true;\n this.loading = false;\n this.callbacks.forEach((cb) => {\n cb(this.onerrorEvent);\n });\n this.callbacks = [];\n }\n execute() {\n this.resetIfRetryingFailed();\n if (this.loading) {\n // do nothing but wait\n return;\n }\n if (this.done) {\n this.callback();\n }\n else {\n // short circuit and warn if google.maps is already loaded\n if (window.google && window.google.maps && window.google.maps.version) {\n console.warn(\"Google Maps already loaded outside @googlemaps/js-api-loader. \" +\n \"This may result in undesirable behavior as options and script parameters may not match.\");\n this.callback();\n return;\n }\n this.loading = true;\n this.setScript();\n }\n }\n}\n\nexport { DEFAULT_ID, Loader, LoaderStatus };\n//# sourceMappingURL=index.mjs.map\n","<script setup lang=\"ts\">\nimport { Loader } from '@googlemaps/js-api-loader';\nimport { onMounted, ref } from 'vue';\n\ninterface Props {\n name: string\n placeholder?: string\n error?: boolean\n initialValue?: string\n}\nconst props = withDefaults(defineProps<Props>(), {\n placeholder: '',\n initialValue: undefined,\n});\n\nconst model = defineModel<google.maps.places.PlaceResult>();\nconst searchQuery = ref(props.initialValue);\n\nonMounted(async () => {\n const loader = new Loader({\n apiKey: import.meta.env.VITE_GOOGLE_PLACES_API_KEY,\n version: 'beta',\n });\n const Places = await loader.importLibrary('places');\n const placeInput = document.getElementById(props.name);\n const autocomplete = new Places.Autocomplete(placeInput as HTMLInputElement, {\n componentRestrictions: { country: 'cl' },\n types: ['address'],\n fields: [\n 'address_components',\n 'geometry',\n ],\n });\n autocomplete.addListener('place_changed', () => {\n model.value = autocomplete.getPlace();\n });\n});\n</script>\n<template>\n <base-input\n :id=\"name\"\n v-model=\"searchQuery\"\n :name=\"name\"\n :placeholder=\"placeholder\"\n :label=\"placeholder\"\n :error=\"error\"\n />\n</template>\n<style>\n .pac-container {\n margin-top: 0.5rem;\n }\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst TOTAL_STARS = 5;\n\ninterface Props {\n value: number\n}\nconst props = defineProps<Props>();\n\nconst fullStars = computed(() => Math.min(Math.round(props.value), TOTAL_STARS));\nconst emptyStars = computed(() => TOTAL_STARS - fullStars.value);\n</script>\n<template>\n <div class=\"flex space-x-2\">\n <img\n v-for=\"number in fullStars\"\n :key=\"number\"\n src=\"@/assets/icons/star-gold.svg\"\n >\n <img\n v-for=\"number in emptyStars\"\n :key=\"number\"\n src=\"@/assets/icons/star-empty.svg\"\n >\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, onMounted, ref } from 'vue';\n\ninterface Props {\n type: 'alert' | 'notice' | 'error',\n message: string,\n}\n\nconst props = defineProps<Props>();\n\nconst show = ref(false);\nconst duration = 3000;\n\nonMounted(() => {\n show.value = true;\n setTimeout(() => {\n show.value = false;\n }, duration);\n});\n\nconst typeClasses = computed(() => {\n const classes = {\n alert: 'bg-z-yellow-400 text-black',\n notice: 'bg-z-turquoise-600 text-white',\n error: 'bg-z-red text-white',\n };\n\n return classes[props.type];\n});\n</script>\n<template>\n <Transition>\n <div\n v-if=\"show\"\n class=\"mx-auto flex h-8 w-full flex-col items-center justify-center text-center text-xs shadow-sm\"\n :class=\"typeClasses\"\n >\n <p>{{ message }}</p>\n </div>\n </Transition>\n</template>\n<style scoped>\n.v-enter-active,\n.v-leave-active {\n transition: 0.5s ease;\n}\n\n.v-enter-from,\n.v-leave-to {\n opacity: 0;\n transform: translateY(-32px)\n}\n</style>\n","\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\ninterface Props {\n total: number,\n value: number,\n}\nconst props = defineProps<Props>();\n\nconst width = computed(() => {\n // eslint-disable-next-line no-magic-numbers\n const value = Math.min(props.value * 100 / props.total, 100);\n\n return `${value}%`;\n});\n</script>\n<template>\n <!-- eslint-disable tailwindcss/no-custom-classname -->\n <div class=\"h-2 w-full rounded-full bg-z-gray-200\">\n <div\n class=\"progress h-2 rounded-full bg-z-turquoise-600\"\n />\n </div>\n</template>\n<style lang=\"css\" scoped>\n.progress {\n width: v-bind('width');\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useStore } from '@/store/store';\nimport { onBeforeMount, onMounted, provide } from 'vue';\n\ninterface Props {\n autoRejectHours: number,\n clientServiceCost: number,\n partnerServiceCost: number,\n automaticReturnMinutes: number,\n activeReferralCampaign: boolean,\n user: User\n}\n\nconst props = defineProps<Props>();\n\nconst store = useStore();\n\nif (store.backUrl &&\n !document.referrer.endsWith(store.backUrl.fromHref) &&\n !document.referrer.endsWith(store.backUrl.toHref)) {\n store.resetBackUrl();\n}\n\nonBeforeMount(() => {\n provide('autoRejectHours', props.autoRejectHours);\n provide('clientServiceCost', props.clientServiceCost);\n provide('partnerServiceCost', props.partnerServiceCost);\n provide('automaticReturnMinutes', props.automaticReturnMinutes);\n provide('activeReferralCampaign', props.activeReferralCampaign);\n provide('user', props.user);\n});\n\nfunction handlePosition(position:GeolocationPosition) {\n store.setUserLocation(position.coords);\n}\n\nfunction handlePositionError() {\n store.resetUserLocation();\n}\n\nonMounted(() => {\n navigator.geolocation.getCurrentPosition(handlePosition, handlePositionError);\n store.resetHasNewMessages();\n});\n\n</script>\n<template>\n <slot />\n</template>\n","<script setup lang=\"ts\">\nimport { useActionCable } from '@/hooks/actioncable';\nimport { convertKeys } from '@/utils/case-converter';\nimport { computed, inject, ref } from 'vue';\nimport newDeliveryModal from './new-delivery-modal.vue';\nimport newReturnModal from './new-return-modal.vue';\nimport successModal from './success-modal.vue';\nimport reportAlertModal from './report-alert-modal.vue';\n\nconst PATHS_WITHOUT_ALERTS = [/\\/chats.*/, /\\/perfil\\/solicitudes_reservas\\/[0-9]+.*/, /\\/soporte.*/];\n\ninterface Props {\n bookingsForDelivery: ProductBooking[]\n bookingsForReturn: ProductBooking[]\n}\nconst props = defineProps<Props>();\n\nconst user = inject<User>('user');\n\nconst allBookingsForDelivery = ref<ProductBooking[]>(props.bookingsForDelivery);\nconst allBookingsForReturn = ref<ProductBooking[]>(props.bookingsForReturn);\n\nconst showModalForNewBooking = ref(false);\n\nconst showDeliverySuccessMessage = ref(false);\nfunction toggleDeliverySuccessMessage() {\n showDeliverySuccessMessage.value = !showDeliverySuccessMessage.value;\n}\n\nconst showReturnSuccessMessage = ref(false);\nfunction toggleReturnSuccessMessage() {\n showReturnSuccessMessage.value = !showReturnSuccessMessage.value;\n}\n\nconst productBookingId = ref();\n\nconst showReportAlertModal = ref(false);\nfunction toggleReportAlertModal() {\n showReportAlertModal.value = !showReportAlertModal.value;\n}\n\nconst productBookingReport = ref<ProductBookingReport>();\n\n// Client ActionCable\nuseActionCable(\n { channel: 'DeliveryClientChannel', id: user?.clientAccountId },\n {\n received(eventNewResource:Record<string, unknown>) {\n const newBookingForDelivery = convertKeys(eventNewResource, 'camelize');\n allBookingsForDelivery.value.push(newBookingForDelivery as unknown as ProductBooking);\n showModalForNewBooking.value = true;\n },\n },\n);\n\nuseActionCable(\n { channel: 'ReturnClientChannel', id: user?.clientAccountId },\n {\n received(eventNewResource:Record<string, unknown>) {\n const completeBooking = convertKeys(eventNewResource, 'camelize') as unknown as ProductBooking;\n productBookingId.value = completeBooking.id;\n toggleReturnSuccessMessage();\n },\n },\n);\n\n// Partner ActionCable\nif (user?.partnerAccountId) {\n useActionCable(\n { channel: 'ReturnPartnerChannel', id: user?.partnerAccountId },\n {\n received(eventNewResource:Record<string, unknown>) {\n const newBookingForReturn = convertKeys(eventNewResource, 'camelize');\n allBookingsForReturn.value.push(newBookingForReturn as unknown as ProductBooking);\n showModalForNewBooking.value = true;\n },\n },\n );\n useActionCable(\n { channel: 'DeliveryPartnerChannel', id: user?.partnerAccountId },\n {\n received(eventNewResource:Record<string, unknown>) {\n const deliveredBooking = convertKeys(eventNewResource, 'camelize') as unknown as ProductBooking;\n productBookingId.value = deliveredBooking.id;\n toggleDeliverySuccessMessage();\n },\n },\n );\n}\n\n// UserActionCable\nuseActionCable(\n { channel: 'AlertChannel', id: user?.id },\n {\n received(eventNewResource:Record<string, unknown>) {\n productBookingReport.value = convertKeys(eventNewResource, 'camelize') as unknown as ProductBookingReport;\n toggleReportAlertModal();\n },\n },\n);\nconst showModal = computed(() => !PATHS_WITHOUT_ALERTS.some(\n path => path.test(window.location.pathname)) || showModalForNewBooking.value);\n\nfunction goToRating() {\n window.location.href = `/perfil/solicitudes_reservas/${productBookingId.value}/opiniones/crear`;\n}\n\nfunction goToDelivered(userType: 'partner'|'client') {\n const userRoute = userType === 'partner' ? 'socio' : 'cliente';\n\n if (window.location.pathname === `/perfil/solicitudes_reservas/${userRoute}`) {\n window.location.replace(`/perfil/solicitudes_reservas/${userRoute}#entregados`);\n window.location.reload();\n } else {\n window.location.assign(`/perfil/solicitudes_reservas/${userRoute}#entregados`);\n }\n}\n\nfunction handleDeliverySuccess() {\n allBookingsForDelivery.value.shift();\n goToDelivered('client');\n}\nfunction handleReturnSuccess() {\n allBookingsForReturn.value.shift();\n}\n\nfunction reload() {\n window.location.reload();\n}\n</script>\n<template>\n <report-alert-modal\n v-if=\"showReportAlertModal && productBookingReport\"\n :open=\"showReportAlertModal\"\n :product-booking-report=\"productBookingReport\"\n @confirm=\"reload\"\n />\n <template\n v-else\n >\n <new-delivery-modal\n v-if=\"allBookingsForDelivery.length > 0\"\n :product-booking=\"allBookingsForDelivery[0]\"\n :open=\"showModal\"\n @success=\"handleDeliverySuccess\"\n />\n <new-return-modal\n v-if=\"allBookingsForReturn.length > 0\"\n :product-booking=\"allBookingsForReturn[allBookingsForReturn.length - 1]\"\n :open=\"showModal\"\n @success=\"handleReturnSuccess\"\n />\n <success-modal\n v-if=\"showReturnSuccessMessage\"\n :open=\"showReturnSuccessMessage\"\n description=\"El socio ha aceptado la devolución\"\n @confirm=\"goToRating\"\n />\n <success-modal\n v-if=\"showDeliverySuccessMessage\"\n :open=\"showDeliverySuccessMessage\"\n description=\"El cliente ha aceptado la entrega\"\n @confirm=\"goToDelivered('partner')\"\n />\n </template>\n</template>\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJoAAAAsCAYAAACdbKF/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAnFSURBVHgB7Z3rVdvYGoa/vSUZZ82POL/PnCAqCKcC7HMKACqIqQCoAKcCoIKYCkIKyLKpIKQCRFJAPGslxGBdzvvtLWNJvkm2pdgzetZixpa3LpZefdctR1CUu06dTHpDrv+Kfjem/E4u3dBO45ZKNh6h/nvXscmg9xRQndYNQdfk0SkE51DJxiIgshpJ+ozXNq0vDvn0H4itRyUbiYSrPKb1FhljE/knVLKxSFiKA9oEpNynko1F4m+XNoMalWwskkpKCqAIoTn4Wz6ID9R2SjYUk5bDQd7Kda4eef49dOuQFpVeFs0Sv3Y6S5VPAv8jlWwsaYXGguqSkLco5kJQE4SU5K5zQN8626r4a8jt5Wt0skslG8t0oQUQliGvIZSPixVLfSQZ5ndikXrK7d1gGQrD8g22nTXTvS07BJtNUmg98v0rWI/20hd2538tVQzWWa2tFyrX+pKyYsgLKgjTNOtSmm+DwOsOBoMr2iAsy0JNVD7XG33fPfE8by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rtOrpul69nVlEnkiy7pO5ron9WUIPbHeo7a6uEEY/1/hCYVbLUgplgfl3uLPPuDX+saVjDPsnZpQZ6eHo+EmN34Z+sGMV7S4jiUjMl9utIWzZD7lP6OcVTMFb/wvZUXW1n8XM/zswsMsRlOlttNP149NDO2Hu7w2+gYXITIZwbWGUzc1qxxXOC1rBenQeDvR/bDWXCTX8PFNsPqvJqAORwTuje4P7OLYzxf8Bh7/AyEZVWxryCZjatOiWnKo8GAn2ATb6Lbjb72/eg+RPy6sw7uOtAHQjFDvEQ49YWTPm0r7zv8WFx6iyTUXeVEHhoe4iz17MFdZxeueV9lr5OOZ7uxEtu+KbClCwKjxolCHklMDfz40d/l7Ver1Vwnepph8JbN7Q3nmPF0Ej/6hFL66SWK4TRvyXeQ+rUgntdWEqLbOgPKOLEkNaGwurx9CJnyBK7TP1j4JzhMo0X/aoyExnGaFg/D/6/RMIHQc9P0ez0jxB5tqPytmb87Zvjk+GK43rWaoq2ZbhVLK/WPx1xwFmyUfLLNkr8V7LNKoZTkDgvNoc0gW6JRslZI/aMuG4Cffo5Uyfohwya4Q+uNQ8v0SUt+O1JVckfzy9YP/p22nKd5l+RPvNKuKvNyDxXCNfgneszv5PpfcvmVo5LC+T8qhkctfW19GQAAAABJRU5ErkJggg==\"","export default \"__VITE_ASSET__8b3f8749__\"","export default \"__VITE_ASSET__0edd576f__\"","export default \"__VITE_ASSET__7f6578c9__\"","<script setup lang=\"ts\">\n</script>\n<template>\n <div class=\"flex flex-col space-y-10 bg-z-turquoise-50 p-6 md:space-y-6 md:px-[12%]\">\n <img\n src=\"@/assets/images/zirkular-logo.png\"\n class=\"w-28\"\n alt=\"Logo de Zirkular\"\n >\n <div class=\"grid-cols-4 space-y-4 md:grid md:space-y-0\">\n <div class=\"flex flex-col space-y-2 text-sm\">\n <a href=\"/productos\">Productos</a>\n <a href=\"/productos/crear\">Sube tus productos</a>\n <!-- <a href=\"/necesidades_clientes/crear\">¿No encuentras lo que buscas?</a>\n <a href=\"/necesidades_clientes\">Necesidades del cliente</a> -->\n </div>\n <hr class=\"w-12 border-z-gray-500/40 md:hidden\">\n <div class=\"flex flex-col space-y-2 text-sm\">\n <a href=\"/preguntas_frecuentes\">Preguntas frecuentes</a>\n <a href=\"/legal/terminos_y_condiciones\">Términos y condiciones</a>\n <a href=\"/legal/privacidad\">Política de privacidad</a>\n </div>\n </div>\n <div class=\"flex justify-center space-x-4 py-3 md:justify-start\">\n <a\n href=\"mailto:contacto@zirkular.cl\"\n rel=\"noopener\"\n target=\"_blank\"\n aria-label=\"Enviar un correo a contacto@zirkular.cl\"\n >\n <img\n src=\"@/assets/icons/mail.svg\"\n alt=\"Ícono de correo\"\n >\n </a>\n <a\n href=\"https://instagram.com/zirkular.chile\"\n rel=\"noopener\"\n target=\"_blank\"\n aria-label=\"Ir al perfil de Instagram de Zirkular\"\n >\n <img\n src=\"@/assets/icons/instagram.svg\"\n alt=\"Ícono de Instagram\"\n >\n </a>\n <a\n href=\"https://facebook.com/zirkular.chile\"\n rel=\"noopener\"\n target=\"_blank\"\n aria-label=\"Ir al perfil de Facebook de Zirkular\"\n >\n <img\n src=\"@/assets/icons/facebook.svg\"\n alt=\"Ícono de Facebook\"\n >\n </a>\n <!-- <a href=\"\">\n <img src=\"@/assets/icons/linkedin.svg\">\n </a>\n <a href=\"\">\n <img src=\"@/assets/icons/tiktok.svg\">\n </a> -->\n </div>\n </div>\n</template>\n","export default \"__VITE_ASSET__bd4b550f__\"","export default \"__VITE_ASSET__1f5adb71__\"","export default \"__VITE_ASSET__e76b4bd7__\"","export default \"__VITE_ASSET__705e7629__\"","export default \"__VITE_ASSET__6370ce38__\"","export default \"__VITE_ASSET__54c434cd__\"","<script setup lang=\"ts\">\nimport { computed, inject, ref } from 'vue';\nimport menuHomeUrl from '@/assets/icons/menu-home.svg';\nimport menuHomeActiveUrl from '@/assets/icons/menu-home-active.svg';\nimport bagAddUrl from '@/assets/icons/bag-add.svg';\nimport bagAddActiveUrl from '@/assets/icons/bag-add-active.svg';\nimport userUrl from '@/assets/icons/user.svg';\nimport userActiveUrl from '@/assets/icons/user-active.svg';\nimport chatUrl from '@/assets/icons/chat.svg';\nimport chatActiveUrl from '@/assets/icons/chat-active.svg';\nimport defaultProfileUrl from '@/assets/icons/default-profile.svg';\nimport { useStore } from '@/store/store';\nimport { storeToRefs } from 'pinia';\n\ninterface Props {\n activeItem?: number;\n}\nconst props = withDefaults(defineProps<Props>(), {\n activeItem: -1,\n});\n\nconst user = inject<User>('user');\n\nconst store = useStore();\n\nconst activeIndex = ref(props.activeItem);\n\nfunction goToHome() {\n if (window.location.pathname !== '/') {\n window.location.href = '/';\n }\n}\n\nfunction goToPartnerStart() {\n const pathnames = ['/productos/crear', '/como_subir'];\n if (!pathnames.includes(window.location.pathname)) {\n window.location.href = '/como_subir';\n }\n}\n\nfunction goToProfile() {\n const path = user ? '/perfil' : '/usuarios/iniciar_sesion';\n\n if (window.location.pathname !== '/perfil') {\n window.location.href = path;\n }\n}\n\nfunction goToChats() {\n if (window.location.pathname !== '/chats') {\n window.location.href = '/chats';\n }\n}\n\nconst { hasNewMessages } = storeToRefs(store);\n\n// eslint-disable-next-line complexity\nconst menuItems = computed(() => [\n {\n iconNormal: menuHomeUrl,\n iconActive: menuHomeActiveUrl,\n action: goToHome,\n alt: 'Ícono de hogar',\n ariaLabel: 'Ir a la página principal',\n label: 'Inicio',\n },\n {\n iconNormal: bagAddUrl,\n iconActive: bagAddActiveUrl,\n action: goToPartnerStart,\n alt: 'Ícono de bolsa con signo más',\n ariaLabel: 'Subir producto',\n label: 'Subir',\n },\n {\n iconNormal: chatUrl,\n iconActive: chatActiveUrl,\n action: goToChats,\n alt: 'Ícono de mensaje',\n ariaLabel: 'Ir a chats',\n label: 'Chats',\n showBadge: user?.hasUnreadChats || hasNewMessages.value,\n },\n {\n iconNormal: user ? user.picture.webpSm.url || defaultProfileUrl : userUrl,\n iconActive: user ? user.picture.webpSm.url || defaultProfileUrl : userActiveUrl,\n action: goToProfile,\n alt: 'Ícono de perfil o persona',\n ariaLabel: 'Ir al perfil',\n label: user ? 'Mi perfil' : 'Iniciar sesión',\n },\n]);\n\n</script>\n<template>\n <div class=\"fixed bottom-0 flex h-16 w-full border-t border-z-gray-100 bg-white md:hidden\">\n <button\n v-for=\"(item, index) in menuItems\"\n :key=\"index\"\n class=\"flex w-full flex-col items-center justify-center\"\n :class=\"{ 'border-b-2 border-z-turquoise-600': activeIndex === index }\"\n :aria-label=\"item.ariaLabel\"\n @click=\"activeIndex = index; item.action()\"\n >\n <div class=\"relative h-6 w-6\">\n <img\n class=\"h-6 w-6 rounded-full\"\n :class=\"{ 'box-content border-2 border-z-turquoise-600': index === 4 && activeIndex === index }\"\n :src=\"activeIndex === index ? item.iconActive : item.iconNormal\"\n :alt=\"item.alt\"\n >\n <template v-if=\"item.showBadge\">\n <div\n class=\"absolute -right-0.5 -top-0.5 h-3 w-3 shrink-0 rounded-full border border-white bg-z-yellow-500\"\n />\n <div\n class=\"absolute -right-0.5 -top-0.5 h-3 w-3 shrink-0 animate-ping rounded-full bg-z-yellow-500/40\"\n />\n </template>\n </div>\n <p\n class=\"mt-1 text-xs\"\n :class=\"activeIndex === index ? 'text-z-turquoise-600' : 'text-z-gray-700'\"\n >\n {{ item.label }}\n </p>\n </button>\n </div>\n</template>\n","export default \"__VITE_ASSET__8a9d0cc8__\"","export default \"__VITE_ASSET__ed50ae27__\"","export default \"__VITE_ASSET__1b3cda97__\"","import { api } from './index';\n\nfunction index() {\n const path = '/api/internal/categories';\n\n return api({\n method: 'get',\n url: path,\n }).then(response => response.data.categories as Category[]);\n}\nexport { index };\n","<script setup lang=\"ts\">\nimport { computed, inject, onMounted, ref } from 'vue';\nimport { debounce, orderBy } from 'lodash';\nimport { useMutation } from '@tanstack/vue-query';\nimport { productsApi } from '@/api/products';\nimport { Popover, PopoverPanel } from '@headlessui/vue';\nimport * as categoriesApi from '@/api/categories';\nimport { useStore } from '@/store/store';\nimport productCard from './product-card.vue';\n\ndefineEmits<{\n (e: 'focusin'): void,\n (e: 'focusout'): void\n}>();\n\nconst searchTerms = ref('');\n\nconst searchResults = ref<Product[]>();\nconst showSearchResults = computed(() => !!searchTerms.value);\nconst loading = ref(false);\n\nconst user = inject<User>('user');\n\nconst store = useStore();\n\nconst categories = ref<Category[]>();\n\nconst { mutate: searchProducts } = useMutation({\n mutationFn: () => productsApi.search(\n searchTerms.value,\n store.userLocation?.latitude,\n store.userLocation?.longitude,\n ) as Promise<Product[]>,\n onSuccess: (data) => {\n searchResults.value = data;\n loading.value = false;\n },\n});\n\n// eslint-disable-next-line no-magic-numbers\nconst debouncedSearch = debounce(searchProducts, 500);\n\nfunction handleSearch() {\n loading.value = true;\n debouncedSearch();\n}\n\nfunction clearSearch() {\n searchTerms.value = '';\n}\n\nonMounted(() => {\n categoriesApi.index().then((response) => {\n categories.value = orderBy(response, 'position');\n });\n});\n</script>\n<template>\n <div class=\"flex h-8 w-full items-center space-x-2 rounded-full border border-z-gray-100 px-3 py-2 transition-all md:h-10 md:max-w-md md:bg-z-gray-25\">\n <img\n src=\"@/assets/icons/search.svg\"\n class=\"h-4 w-4\"\n alt=\"Ícono de lupa\"\n >\n <input\n v-model=\"searchTerms\"\n name=\"search\"\n class=\"h-6 w-full text-xs outline-none transition-all placeholder:text-z-gray-500 md:bg-z-gray-25\"\n placeholder=\"Estoy buscando...\"\n @input=\"handleSearch()\"\n @focusin=\"$emit('focusin')\"\n @focusout=\"$emit('focusout')\"\n >\n <button\n aria-label=\"Limpiar búsqueda\"\n @click=\"clearSearch\"\n >\n <img\n v-if=\"searchTerms\"\n src=\"@/assets/icons/close.svg\"\n alt=\"Ícono de cruz\"\n >\n </button>\n </div>\n <Popover v-if=\"showSearchResults\">\n <PopoverPanel\n static\n class=\"absolute left-0 w-[100vw] overflow-y-scroll bg-white md:left-[calc(12%+93px+32px)] md:h-96 md:max-w-md md:rounded md:border md:border-z-gray-100 md:shadow-md\"\n :class=\"user?.partnerAccountId ?\n 'top-[64px] h-[calc(100vh-64px-64px)]' : 'top-[104px] h-[calc(100vh-104px-64px)]'\"\n >\n <div\n v-if=\"loading\"\n class=\"flex h-32 items-center justify-center px-6\"\n >\n <img\n src=\"@/assets/icons/loading.svg\"\n class=\"w-10 animate-spin-slow\"\n >\n </div>\n <div\n v-else-if=\"searchResults?.length == 0\"\n class=\"flex flex-col px-6\"\n >\n <!-- <div class=\"py-3\">\n <div class=\"flex flex-col gap-4 rounded-lg bg-z-yellow-50 p-4\">\n <p class=\"text-center text-xs\">\n Si no encontraste lo que buscabas puedes agregar una solicitud aquí:\n </p>\n <a\n class=\"w-full rounded bg-z-turquoise-600 py-1.5 text-center text-sm text-white\"\n href=\"/necesidades_clientes/crear\"\n >Agregar solicitud</a>\n </div>\n </div> -->\n <p class=\"py-3 text-center text-sm\">\n Tu búsqueda no arrojó ningún resultado, pero puedes revisar nuestras categorías:\n </p>\n <div class=\"mb-12 mt-4 grid grid-cols-3 gap-x-4 gap-y-6\">\n <div\n v-for=\"category in categories\"\n :key=\"category.id\"\n class=\"flex flex-col items-center space-y-2\"\n >\n <img\n :src=\"category.picture.webpSm.url\"\n class=\"h-20 w-20 rounded-full object-cover\"\n >\n <p class=\"text-center text-xs\">\n {{ category.name }}\n </p>\n </div>\n </div>\n </div>\n <div\n v-else\n >\n <div class=\"border-b border-z-gray-100 px-6 pb-4 pt-3\">\n <p class=\"text-lg font-medium italic text-z-turquoise-600\">\n {{ searchTerms }}\n </p>\n <p class=\"text-z-gray-800\">\n Se encontraron <span class=\"font-semibold\">{{ searchResults?.length ?? 0 }} resultados:</span>\n </p>\n </div>\n <div class=\"grid grid-cols-2 gap-4 px-6 py-4\">\n <product-card\n v-for=\"product in searchResults\"\n :key=\"product.id\"\n :product=\"product\"\n />\n </div>\n </div>\n </PopoverPanel>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport { inject, ref } from 'vue';\nimport { Popover, PopoverButton, PopoverPanel } from '@headlessui/vue';\nimport userUrl from '@/assets/icons/user.svg';\nimport defaultProfileUrl from '@/assets/icons/default-profile.svg';\nimport profileMenu from './profile-menu.vue';\n\ninterface Props {\n activeItem?: number;\n}\nconst props = withDefaults(defineProps<Props>(), {\n activeItem: -1,\n});\n\nconst user = inject<User>('user');\n\nconst activeIndex = ref(props.activeItem);\n\nfunction goToHome() {\n if (window.location.pathname !== '/') {\n window.location.href = '/';\n }\n}\n\nfunction goToPartnerStart() {\n const pathnames = ['/productos/crear', '/como_subir'];\n if (!pathnames.includes(window.location.pathname)) {\n window.location.href = '/como_subir';\n }\n}\n\nfunction goToChats() {\n if (window.location.pathname !== '/chats') {\n window.location.href = '/chats';\n }\n}\n\nfunction goToNewProductRequest() {\n if (window.location.pathname !== '/necesidades_clientes') {\n window.location.href = '/necesidades_clientes/crear';\n }\n}\n\nfunction goToProductRequests() {\n if (window.location.pathname !== '/necesidades_clientes') {\n window.location.href = '/necesidades_clientes';\n }\n}\n\nconst MENU_ITEMS = [\n {\n name: 'Inicio',\n action: goToHome,\n },\n {\n name: 'Sube tus productos',\n action: goToPartnerStart,\n },\n {\n name: '¿No encuentras lo que buscas?',\n action: goToNewProductRequest,\n },\n {\n name: 'Necesidades de nuestros clientes',\n action: goToProductRequests,\n },\n {\n name: 'Chats',\n action: goToChats,\n },\n];\n\n</script>\n<template>\n <div class=\"hidden shrink-0 items-center space-x-6 text-xs text-z-gray-900 md:flex\">\n <button\n v-for=\"(item, index) in MENU_ITEMS\"\n :key=\"index\"\n class=\"flex items-center\"\n @click=\"activeIndex = index; item.action()\"\n >\n <p class=\"transition hover:text-z-turquoise-700\">\n {{ item.name }}\n </p>\n </button>\n <Popover\n v-if=\"user\"\n v-slot=\"{ open }\"\n class=\"relative\"\n >\n <PopoverButton\n\n class=\"flex items-center space-x-2 rounded-full border py-1 pl-3 pr-1 focus:outline-none\"\n :class=\"{\n 'border-white': !open,\n 'border-z-gray-200 bg-z-gray-50': open\n }\"\n >\n <p class=\"transition hover:text-z-turquoise-700\">\n Mi perfil\n </p>\n <img\n :src=\"user.picture.webpSm.url || defaultProfileUrl\"\n class=\"aspect-square w-6 rounded-full border border-z-gray-200 object-cover p-0.5\"\n >\n </PopoverButton>\n <PopoverPanel class=\"absolute right-0 top-10 w-96 rounded border border-z-gray-100 bg-white text-sm shadow-md\">\n <profile-menu />\n </PopoverPanel>\n </Popover>\n <a\n v-else\n href=\"/usuarios/iniciar_sesion\"\n class=\"flex items-center space-x-2 rounded-full border border-z-gray-200 bg-z-gray-25 py-1 pl-3 pr-1\"\n >\n <p>Iniciar sesión</p>\n <img\n :src=\"userUrl\"\n class=\"w-6 rounded-full border border-z-gray-200 bg-white\"\n alt=\"Ícono de usuario genérico\"\n >\n </a>\n </div>\n</template>\n","export default \"__VITE_ASSET__b1dac06e__\"","export default \"__VITE_ASSET__daebda9b__\"","import { api } from './index';\n\nexport const notificationsApi = {\n index() {\n const path = '/api/internal/notifications';\n\n return api({\n method: 'get',\n url: path,\n });\n },\n delete(id: number) {\n const path = `/api/internal/notifications/${id}`;\n\n return api({\n method: 'delete',\n url: path,\n });\n },\n update(id: number, data:Partial<UserNotification>) {\n const path = `/api/internal/notifications/${id}`;\n\n return api({\n method: 'patch',\n url: path,\n data,\n });\n },\n};\n","<script setup lang=\"ts\">\nimport { useMutation } from '@tanstack/vue-query';\nimport formatDistanceToNow from 'date-fns/formatDistanceToNow';\nimport { notificationsApi } from '@/api/notifications';\nimport defaultNotificationImagePath from '@/assets/icons/notification-gray.svg';\nimport { onMounted } from 'vue';\n\ninterface Props {\n notification: UserNotification\n mode?: 'menu' | 'floating'\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n mode: 'menu',\n});\n\nconst emit = defineEmits<{\n (e: 'delete'): void,\n (e: 'read'): void,\n (e: 'hide'): void,\n}>();\n\nconst { mutate: deleteNotification } = useMutation(() => notificationsApi.delete(props.notification.id), {\n onSuccess: () => {\n emit('delete');\n },\n});\n\nconst { mutate: markAsRead } = useMutation(() => notificationsApi.update(props.notification.id, { read: true }), {\n onSuccess: () => {\n emit('read');\n },\n});\n\nfunction redirect() {\n if ((window.location.pathname.includes('solicitudes_reservas/socio') &&\n props.notification.onClickPath.includes('solicitudes_reservas/socio')) ||\n (window.location.pathname.includes('solicitudes_reservas/cliente') &&\n props.notification.onClickPath.includes('solicitudes_reservas/cliente'))) {\n window.location.replace(props.notification.onClickPath);\n window.location.reload();\n } else { window.location.assign(props.notification.onClickPath); }\n}\n\nfunction handleClick() {\n if (!props.notification.read) {\n markAsRead();\n }\n if (props.notification.onClickPath) {\n redirect();\n }\n}\n\nfunction handleClose() {\n if (props.mode === 'menu') {\n deleteNotification();\n } else {\n emit('hide');\n }\n}\n\nonMounted(() => {\n if (!props.notification.read && props.mode === 'menu') {\n markAsRead();\n }\n});\n</script>\n<template>\n <div\n class=\"relative flex border-b border-z-gray-100 px-6 py-4\"\n :class=\"{ 'bg-z-turquoise-50': !notification.read }\"\n >\n <button\n class=\"flex h-full w-full items-start space-x-4\"\n @click=\"handleClick()\"\n >\n <img\n :src=\"notification.imagePath ?? defaultNotificationImagePath\"\n class=\"h-12 w-12 shrink-0 rounded-sm object-cover\"\n >\n <div class=\"flex flex-col items-start pr-4\">\n <div class=\"flex items-center space-x-1\">\n <div\n v-if=\"!notification.read\"\n class=\"h-2 w-2 rounded-full bg-z-turquoise-600/40\"\n />\n <p\n class=\"text-left text-xs font-medium text-z-gray-900\"\n >\n {{ notification.title }}\n </p>\n </div>\n <p class=\"text-left text-xs text-z-gray-800\">\n {{ notification.message }}\n </p>\n <p class=\"mt-4 text-xs text-z-gray-600\">\n hace {{ formatDistanceToNow(new Date(notification.createdAt)) }}\n </p>\n </div>\n </button>\n <button\n class=\"absolute right-4 top-1.5 p-2\"\n aria-label=\"Eliminar notificación\"\n @click=\"handleClose()\"\n >\n <img\n src=\"@/assets/icons/close.svg\"\n class=\"h-4 w-4 opacity-70\"\n >\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, inject, onMounted } from 'vue';\nimport { Popover, PopoverButton, PopoverPanel } from '@headlessui/vue';\nimport { reverse, sortBy } from 'lodash';\nimport { notificationsApi } from '@/api/notifications';\nimport NotificationCard from './notification-card.vue';\nimport { useActionCable } from '../hooks/actioncable';\nimport { convertKeys } from '../utils/case-converter';\n\nconst user = inject<User>('user');\n\nconst notifications = ref<UserNotification[]>([]);\n\nif (user) {\n useActionCable(\n { channel: 'NotificationsChannel', id: user.id },\n {\n received(eventNewResource:Record<string, unknown>) {\n const newNotification = convertKeys(eventNewResource, 'camelize');\n\n notifications.value.push(newNotification as unknown as UserNotification);\n },\n },\n );\n}\n\nconst sortedNotifications = computed(() => reverse(sortBy(notifications.value, 'createdAt')));\n\nconst unread = computed(() => notifications.value.some((notification) => !notification.read));\n\nfunction handleDelete(id:number) {\n notifications.value = notifications.value.filter(\n (notification:UserNotification) => notification.id !== id,\n );\n}\n\nfunction handleRead(id:number) {\n const notificationIndex = notifications.value.findIndex((notification) => notification.id === id);\n if (notificationIndex !== -1) {\n notifications.value[notificationIndex].read = true;\n }\n}\n\nonMounted(() => {\n notificationsApi.index().then((response) => {\n notifications.value = response.data.notifications;\n });\n});\n</script>\n<template>\n <Popover\n v-slot=\"{ open }\"\n >\n <PopoverButton\n class=\"relative flex h-8 w-8 shrink-0 items-center justify-center rounded-full outline-none transition\"\n :class=\"{ 'bg-z-gray-100': open }\"\n >\n <img\n src=\"@/assets/icons/notification.svg\"\n class=\"h-6 w-6 shrink-0\"\n >\n <template v-if=\"unread\">\n <div\n class=\"absolute right-0.5 top-1 h-3 w-3 shrink-0 rounded-full border border-white bg-z-yellow-500\"\n />\n <div\n class=\"absolute right-0.5 top-1 h-3 w-3 shrink-0 animate-ping rounded-full bg-z-yellow-500/40\"\n />\n </template>\n </PopoverButton>\n <PopoverPanel\n class=\"absolute left-0 mt-4 flex w-full flex-col divide-y divide-z-gray-100 overflow-y-scroll bg-white md:left-auto md:mt-2 md:max-h-80 md:max-w-md md:rounded md:border md:border-z-gray-200 md:shadow-md\"\n :class=\"user?.partnerAccountId ? 'h-[calc(100vh-64px-64px)]' : 'h-[calc(100vh-64px-64px-40px)]'\"\n as=\"div\"\n >\n <notification-card\n v-for=\"notification in sortedNotifications\"\n :key=\"notification.id\"\n :notification=\"notification\"\n @delete=\"handleDelete(notification.id)\"\n @read=\"handleRead(notification.id)\"\n />\n <div\n v-if=\"notifications.length === 0\"\n class=\"flex h-48 flex-col items-center justify-center space-y-4\"\n >\n <img\n src=\"@/assets/icons/notification-gray.svg\"\n class=\"w-16\"\n >\n <p class=\"text-z-gray-800\">\n No tienes nuevas notificaciones\n </p>\n </div>\n </PopoverPanel>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport { inject, onMounted, ref } from 'vue';\nimport { Dialog, DialogPanel, DialogTitle } from '@headlessui/vue';\nimport * as categoriesApi from '@/api/categories';\nimport theNavbarSearch from './the-navbar-search.vue';\nimport theNavbarMenu from './the-navbar-menu.vue';\nimport notificationDropdown from './notification-dropdown.vue';\nimport TheTitlebar from './the-titlebar.vue';\n\ninterface Props {\n hideRibbon?: boolean\n}\n\ndefineProps<Props>();\nconst user = inject<User>('user');\n\nconst searchFocus = ref(false);\n\nconst showMenu = ref(false);\nfunction toggleMenu() {\n showMenu.value = !showMenu.value;\n}\n\nconst showCategories = ref(false);\nfunction toggleCategories() {\n showCategories.value = !showCategories.value;\n}\n\nconst categories = ref<Category[]>();\n\nonMounted(() => {\n categoriesApi.index()\n .then((response) => {\n categories.value = response;\n });\n});\n</script>\n<template>\n <div\n class=\"sticky top-0 z-20 flex w-full flex-col\"\n :class=\"$attrs.class\"\n >\n <div\n v-if=\"!user?.partnerAccountId && !hideRibbon\"\n class=\"flex h-10 items-center justify-center space-x-2 bg-z-turquoise-600 text-xs text-white\"\n >\n <p>Únete a la nueva forma de arrendar</p>\n <a\n href=\"/productos/crear\"\n class=\"flex rounded bg-white px-2 py-0.5 text-z-turquoise-600\"\n >\n ¡Hazte socio!\n <img\n src=\"@/assets/icons/chevron-right.svg\"\n alt=\"Ícono de un chevron hacia la derecha\"\n >\n </a>\n </div>\n <div class=\"flex h-16 w-full items-center justify-between space-x-2 border-b border-z-gray-100 bg-white p-4 md:h-[72px] md:space-x-8 md:px-[12%]\">\n <div class=\"flex w-full items-center space-x-2 md:space-x-8\">\n <TransitionGroup>\n <button\n v-if=\"!searchFocus\"\n class=\"shrink-0 md:hidden\"\n @click=\"toggleMenu\"\n >\n <img\n src=\"@/assets/icons/menu.svg\"\n class=\"w-6\"\n >\n </button>\n <a\n v-if=\"!searchFocus\"\n href=\"/\"\n class=\"min-w-fit\"\n aria-label=\"Ir a la página principal de Zirkular\"\n >\n <img\n src=\"@/assets/images/zirkular-logo.png\"\n class=\"w-[72px] md:w-[93px]\"\n alt=\"Logo de Zirkular\"\n >\n </a>\n </TransitionGroup>\n <the-navbar-search\n @focusin=\"searchFocus = true\"\n @focusout=\"searchFocus = false\"\n />\n </div>\n <div class=\"flex shrink-0 items-center space-x-2 md:space-x-8\">\n <notification-dropdown\n v-if=\"user\"\n />\n <the-navbar-menu />\n </div>\n </div>\n </div>\n <Dialog\n :open=\"showMenu\"\n @close=\"toggleMenu\"\n >\n <DialogPanel class=\"fixed left-0 top-0 z-20 h-[calc(100vh-64px)] w-full overflow-y-scroll bg-white\">\n <DialogTitle\n :as=\"TheTitlebar\"\n title=\"Menu\"\n @back=\"toggleMenu\"\n >\n Menu\n </DialogTitle>\n <div\n class=\"flex w-full flex-col\"\n >\n <button\n class=\"flex w-full items-center justify-between px-6 py-5\"\n @click=\"toggleCategories\"\n >\n <div class=\"flex space-x-2\">\n <img\n src=\"@/assets/icons/bag.svg\"\n class=\"h-6\"\n >\n <p class=\"text-z-gray-900\">\n Categorías\n </p>\n </div>\n <img\n src=\"@/assets/icons/chevron-right.svg\"\n class=\"h-5\"\n :class=\"{ 'rotate-90': showCategories }\"\n >\n </button>\n <div\n v-if=\"showCategories\"\n class=\"flex w-full flex-col\"\n >\n <a\n v-for=\"category in categories\"\n :key=\"category.id\"\n class=\"flex items-center bg-z-turquoise-50 py-3 pl-6 text-z-turquoise-600\"\n :href=\"`/categorias/${category.id}`\"\n >\n <img\n :src=\"category.picture.webpXs?.url\"\n class=\"h-6 w-6 rounded-full\"\n >\n <p class=\"ml-3 line-clamp-1\">{{ category.name }}</p>\n </a>\n </div>\n <a\n class=\"flex w-full items-center space-x-2 px-6 py-5\"\n href=\"/necesidades_clientes/crear\"\n >\n <img\n src=\"@/assets/icons/task-search.svg\"\n class=\"h-6\"\n >\n <p class=\"text-z-gray-900\">\n ¿No encuentras lo que buscas?\n </p>\n </a>\n <a\n class=\"flex w-full items-center space-x-2 px-6 py-5\"\n href=\"/necesidades_clientes\"\n >\n <img\n src=\"@/assets/icons/box.svg\"\n class=\"h-6\"\n >\n <p class=\"text-z-gray-900\">\n Necesidades de nuestros clientes\n </p>\n </a>\n </div>\n </DialogPanel>\n </Dialog>\n</template>\n<style scoped>\n.v-enter-active,\n.v-leave-active {\n transition: opacity 0.1s ease;\n}\n\n.v-enter-from,\n.v-leave-to {\n opacity: 0;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useActionCable } from '@/hooks/actioncable';\nimport { convertKeys } from '@/utils/case-converter';\nimport { useStore } from '@/store/store';\nimport { inject, ref } from 'vue';\nimport defaultProfileIcon from '@/assets/icons/default-profile.svg';\nimport notificationCard from './notification-card.vue';\n\ninterface ChatNotification {\n message: string,\n chatId: number,\n user: {\n name: string,\n pictureUrl?: string,\n }\n}\n\nconst newNotifications = ref<UserNotification[]>([]);\nconst newChatNotifications = ref<ChatNotification[]>([]);\nconst user = inject<User>('user');\n\nconst store = useStore();\n\nif (user) {\n useActionCable(\n { channel: 'NotificationsChannel', id: user.id },\n {\n received(eventNewResource:Record<string, unknown>) {\n const newNotification = convertKeys(eventNewResource, 'camelize');\n\n newNotifications.value.push(newNotification as unknown as UserNotification);\n setTimeout(() => {\n newNotifications.value.pop();\n // eslint-disable-next-line no-magic-numbers\n }, 7000);\n },\n },\n );\n\n useActionCable(\n { channel: 'ChatNotificationsChannel', id: user.id },\n {\n received(eventNewResource:Record<string, unknown>) {\n const newChatNotification = convertKeys(eventNewResource, 'camelize') as unknown as ChatNotification;\n\n if (window.location.pathname !== `/chats/${newChatNotification.chatId}`) {\n newChatNotifications.value.push(newChatNotification as unknown as ChatNotification);\n store.setHasNewMessages(true);\n setTimeout(() => {\n newChatNotifications.value.pop();\n // eslint-disable-next-line no-magic-numbers\n }, 5000);\n }\n },\n },\n );\n}\n\nfunction removeNotification(index:number) {\n newNotifications.value.splice(index, 1);\n}\n</script>\n<template>\n <div\n v-if=\"newNotifications.length > 0\"\n class=\"fixed z-50 w-full space-y-2 p-4 md:right-0 md:max-w-sm md:p-6\"\n :class=\"user?.partnerAccountId ? 'top-0 md:top-[72px]' : 'top-10 md:top-[112px]'\"\n >\n <TransitionGroup name=\"notification-list\">\n <notification-card\n v-for=\"notification, index in newNotifications\"\n :key=\"notification.id\"\n :notification=\"notification\"\n class=\"border border-z-gray-500\"\n mode=\"floating\"\n @hide=\"removeNotification(index)\"\n />\n </TransitionGroup>\n </div>\n <TransitionGroup name=\"chat-notification-list\">\n <a\n v-for=\"chatNotification, index in newChatNotifications\"\n :key=\"index\"\n class=\"fixed left-0 top-0 z-50 flex h-16 w-full bg-white p-3 shadow-md\"\n :href=\"`/chats/${chatNotification.chatId}`\"\n >\n <img\n :src=\"chatNotification.user.pictureUrl ?? defaultProfileIcon\"\n class=\"h-10 w-10 rounded-full bg-z-gray-700\"\n >\n <div class=\"ml-3 flex-col\">\n <p class=\"text-sm font-medium text-z-gray-800\">\n {{ chatNotification.user.name }}\n </p>\n <p class=\"text-sm text-z-gray-900\">\n {{ chatNotification.message }}\n </p>\n </div>\n </a>\n </TransitionGroup>\n</template>\n<style scoped>\n.notification-list-move,\n.notification-list-enter-active,\n.notification-list-leave-active {\n transition: all 0.5s ease;\n}\n.notification-list-enter-from,\n.notification-list-leave-to\n{\n opacity: 0;\n transform: translateX(30px);\n}\n.notification-list-leave-active {\n position: absolute;\n}\n\n.chat-notification-list-enter-active,\n.chat-notification-list-leave-active {\n transition: 0.5s ease;\n}\n\n.chat-notification-list-enter-from,\n.chat-notification-list-leave-to {\n transform: translateY(-64px)\n}\n</style>\n","import { api } from './index';\n\nexport const referralCodesApi = {\n search(code: string) {\n const path = `/api/internal/referral_codes/search?code=${code}`;\n\n return api({\n method: 'get',\n url: path,\n });\n },\n};\n","<script setup lang=\"ts\">\nimport { referralCodesApi } from '@/api/referral-codes';\nimport { useStore } from '@/store/store';\nimport { debounce } from 'lodash';\nimport { onMounted, ref, watch } from 'vue';\n\nconst referralCode = ref(new URLSearchParams(window.location.search).get('refcode') ?? '');\n\nconst foundCode = ref<ReferralCode|null>();\n\nconst loading = ref(false);\nconst error = ref(false);\nconst showReferralInfo = ref(false);\n\nconst store = useStore();\n\nfunction findReferralCode() {\n showReferralInfo.value = true;\n loading.value = true;\n error.value = false;\n referralCodesApi.search(referralCode.value)\n .then((response) => {\n if (response.data?.referralCode) {\n foundCode.value = response.data.referralCode;\n store.setReferralCode(referralCode.value);\n } else {\n error.value = true;\n foundCode.value = null;\n store.setReferralCode('');\n }\n loading.value = false;\n });\n}\n\nwatch(referralCode, () => {\n loading.value = true;\n // eslint-disable-next-line no-magic-numbers\n debounce(findReferralCode, 500)();\n});\n\nonMounted(() => {\n if (referralCode.value) {\n findReferralCode();\n }\n});\n</script>\n<template>\n <base-input\n id=\"refcode\"\n v-model=\"referralCode\"\n name=\"refcode\"\n label=\"Código de referido (opcional)\"\n placeholder=\"Código de referido (opcional)\"\n :error=\"error\"\n />\n <div\n v-if=\"showReferralInfo && referralCode\"\n class=\"flex w-full flex-col items-center rounded-lg bg-z-gray-50 p-4 text-center text-sm\"\n >\n <img\n v-if=\"loading\"\n src=\"@/assets/icons/loading.svg\"\n class=\"w-10 animate-spin-slow\"\n >\n <template v-else-if=\"error\">\n El código ingresado no es válido\n </template>\n <template\n v-else-if=\"foundCode && foundCode?.redeemsCount >= foundCode?.maxRedeems\"\n >\n El código ya ha sido canjeado.\n </template>\n <template\n v-else-if=\"foundCode\"\n >\n <img\n v-if=\"foundCode.user?.picture.webpXs?.url\"\n :src=\"foundCode.user?.picture.webpXs?.url\"\n class=\"h-10 w-10\"\n >\n <img\n v-else\n src=\"@/assets/icons/default-profile.svg\"\n class=\"h-10 w-10\"\n >\n <p class=\"mt-2 text-base\">\n ¡{{ foundCode.user?.firstName }} te ha invitado!\n </p>\n <p class=\"text-xs text-z-gray-800\">\n Ganarás $3.000 al subir tus 3 primeros productos.\n </p>\n </template>\n </div>\n</template>\n","export default \"__VITE_ASSET__ab302b25__\"","<script setup lang=\"ts\">\nimport { useStore } from '@/store/store';\n\nconst store = useStore();\n\nfunction handleClick() {\n const refcode = store.referralCode;\n\n const queryParam = refcode ? `?refcode=${refcode}` : '';\n window.location.href = `/usuarios/registro/google_interstitial${queryParam}`;\n}\n\n</script>\n<template>\n <button\n class=\"flex h-12 w-full items-center justify-center space-x-2 rounded border border-z-gray-400 text-black\"\n type=\"button\"\n @click=\"handleClick\"\n >\n <img src=\"@/assets/icons/gmail.svg\">\n <p>Continuar con Google</p>\n </button>\n</template>\n","<script setup lang=\"ts\">\nimport { onMounted, ref } from 'vue';\n\ninterface Props {\n authenticityToken: string,\n}\ndefineProps<Props>();\n\nconst googleForm = ref<HTMLFormElement>();\n\nonMounted(() => {\n if (googleForm.value) {\n googleForm.value.requestSubmit();\n }\n});\n</script>\n<template>\n <form\n ref=\"googleForm\"\n action=\"/users/auth/google_oauth2\"\n method=\"post\"\n >\n <input\n name=\"authenticity_token\"\n type=\"hidden\"\n :value=\"authenticityToken\"\n >\n </form>\n</template>\n","<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport googleRegisterButton from './google-register-button.vue';\n\ninterface Props {\n showForm: boolean,\n}\n\nconst props = defineProps<Props>();\nconst showMailForm = ref(props.showForm);\n\nfunction toggleMailForm() {\n showMailForm.value = !showMailForm.value;\n}\n</script>\n<template>\n <slot v-if=\"showMailForm\" />\n <div\n v-else\n class=\"space-y-4\"\n >\n <google-register-button />\n <button\n class=\"flex h-12 w-full items-center justify-center space-x-2 rounded border border-z-gray-400 text-black\"\n @click=\"toggleMailForm\"\n >\n <img src=\"@/assets/icons/mail.svg\">\n <p>Registro manual</p>\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { useStore } from '@/store/store';\nimport { storeToRefs } from 'pinia';\n\nconst store = useStore();\n\nconst { referralCode } = storeToRefs(store);\n</script>\n<template>\n <input\n id=\"refcode\"\n v-model=\"referralCode\"\n hidden\n name=\"refcode\"\n >\n</template>\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAADxAAAA8QE5DAzkAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAADQ5JREFUeJzVW3tUVHUe/3zvnQcDwzAiAkooCgzogIpramXYbqmnl/ZyW92tXBW00rJObrnb6XjaU53VrNRKhTKpPdbaw2qrPT2sTfKVmaEzCQwiTwFDQJhhHjD3t38A49yZYebeYfC0n7/u7/H9/r6/3/3d3+/7uoRhRnrZqkRSsHwIzEhANgADgBEE6BmgBQACrAzoANAOxioYUE4czIKbLz0zZcf54ZSPhoOpwVRwJQRazAhzARiHMA4DYGbEvuAZ93ZF7s4fIidlHyK2ABmWNTpyOAoBWgZgYqT4+uBngL3BKd07K7J3dUWC4ZAXwGheHt/DFA+DsTUMGBEJoUKBgHYAWx2M31I3eXv7EHmFCQYymFfewxh7HsCooQgxBLQB7GlLTso20AYhHAZhLUC6eXkGL/AlDLg6HPpIg4EdBOi+qtyiM3JpObkEhlMFt3MCf+zXMnkAINA1BJwwmAr+IJ9WKtgGLvPUuc0grJU7yOUEI/ZClTFlndRPQtICGM2LVC63fjeIFg9NvMsEwh6dA0uPTy/qCd01BIzmRSqXoN8H0E2Rke6y4VOdE7eHWoTgZwADOQV98XBNXsOpEctrhoM1ANzcqWIlYBuCzlERrDHzVOELINw7VE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OhA+RvDs9Dx0Thqq8Rh22kctpajKkBU2BccCHnR6Zgek4mJUVfAEJUCPR+DOD4aCuLR6bajw23FWWcLKhwNOGqrjNz1yrDRMrno8cGag99TDJRpXrkLjC1VEA9j1FiYHLWDxgN+dSDssRjH3BMsczz4B01gOgcrBNhnvcyNMvvZ/5/Jgz7RObA0VNp8yOP8+PSinpTWlIUAdkVMtmEGAf/UOdkdEUmX94CBMk0rNwLssSFJN7xgYNhkyS16ItCJHwiydVXDycLbQNh1uf4Qk4FOBlZQlVssK8FbtkZTObnoQzB+OohK5dIOIw5wgjBV7uSByPw2twlAYth8hoY2YrS+MndnsdQt74shm2tpJ5bqFbzyISJ6GED8UPlJxAUwbHG7sLV6etHFoTCK2K+zRvMD2h63u5CBLQPBGJoiLJgYwy41ryg2G1+NSFLisPw8nWFeldeXh8fmAshFGGdNPwQAJwF8CY7tGXBjRRLDsgDeMFQUJjAX5fel4rGJjMFAfZ+KHpdyE6wAOhjQRqAKEMqJCWaoqLQyq0hy7DIc/A+zU9MCAl4sHAAAAABJRU5ErkJggg==\"","<script setup lang=\"ts\">\n</script>\n<template>\n <a\n href=\"https://api.whatsapp.com/send?phone=56952031798\"\n rel=\"noopener\"\n target=\"_blank\"\n class=\"\"\n >\n <img\n src=\"@/assets/icons/whatsapp.png\"\n class=\"w-12 rounded-full shadow\"\n >\n </a>\n</template>\n","/*!\n * shared v9.2.2\n * (c) 2022 kazuya kawaguchi\n * Released under the MIT License.\n */\n/**\r\n * Original Utilities\r\n * written by kazuya kawaguchi\r\n */\r\nconst inBrowser = typeof window !== 'undefined';\r\nlet mark;\r\nlet measure;\r\nif ((process.env.NODE_ENV !== 'production')) {\r\n const perf = inBrowser && window.performance;\r\n if (perf &&\r\n perf.mark &&\r\n perf.measure &&\r\n perf.clearMarks &&\r\n perf.clearMeasures) {\r\n mark = (tag) => perf.mark(tag);\r\n measure = (name, startTag, endTag) => {\r\n perf.measure(name, startTag, endTag);\r\n perf.clearMarks(startTag);\r\n perf.clearMarks(endTag);\r\n };\r\n }\r\n}\r\nconst RE_ARGS = /\\{([0-9a-zA-Z]+)\\}/g;\r\n/* eslint-disable */\r\nfunction format(message, ...args) {\r\n if (args.length === 1 && isObject(args[0])) {\r\n args = args[0];\r\n }\r\n if (!args || !args.hasOwnProperty) {\r\n args = {};\r\n }\r\n return message.replace(RE_ARGS, (match, identifier) => {\r\n return args.hasOwnProperty(identifier) ? args[identifier] : '';\r\n });\r\n}\r\nconst hasSymbol = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\r\nconst makeSymbol = (name) => hasSymbol ? Symbol(name) : name;\r\nconst generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });\r\nconst friendlyJSONstringify = (json) => JSON.stringify(json)\r\n .replace(/\\u2028/g, '\\\\u2028')\r\n .replace(/\\u2029/g, '\\\\u2029')\r\n .replace(/\\u0027/g, '\\\\u0027');\r\nconst isNumber = (val) => typeof val === 'number' && isFinite(val);\r\nconst isDate = (val) => toTypeString(val) === '[object Date]';\r\nconst isRegExp = (val) => toTypeString(val) === '[object RegExp]';\r\nconst isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;\r\nfunction warn(msg, err) {\r\n if (typeof console !== 'undefined') {\r\n console.warn(`[intlify] ` + msg);\r\n /* istanbul ignore if */\r\n if (err) {\r\n console.warn(err.stack);\r\n }\r\n }\r\n}\r\nconst assign = Object.assign;\r\nlet _globalThis;\r\nconst getGlobalThis = () => {\r\n // prettier-ignore\r\n return (_globalThis ||\r\n (_globalThis =\r\n typeof globalThis !== 'undefined'\r\n ? globalThis\r\n : typeof self !== 'undefined'\r\n ? self\r\n : typeof window !== 'undefined'\r\n ? window\r\n : typeof global !== 'undefined'\r\n ? global\r\n : {}));\r\n};\r\nfunction escapeHtml(rawText) {\r\n return rawText\r\n .replace(/</g, '<')\r\n .replace(/>/g, '>')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''');\r\n}\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nfunction hasOwn(obj, key) {\r\n return hasOwnProperty.call(obj, key);\r\n}\r\n/* eslint-enable */\r\n/**\r\n * Useful Utilities By Evan you\r\n * Modified by kazuya kawaguchi\r\n * MIT License\r\n * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts\r\n * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts\r\n */\r\nconst isArray = Array.isArray;\r\nconst isFunction = (val) => typeof val === 'function';\r\nconst isString = (val) => typeof val === 'string';\r\nconst isBoolean = (val) => typeof val === 'boolean';\r\nconst isSymbol = (val) => typeof val === 'symbol';\r\nconst isObject = (val) => // eslint-disable-line\r\n val !== null && typeof val === 'object';\r\nconst isPromise = (val) => {\r\n return isObject(val) && isFunction(val.then) && isFunction(val.catch);\r\n};\r\nconst objectToString = Object.prototype.toString;\r\nconst toTypeString = (value) => objectToString.call(value);\r\nconst isPlainObject = (val) => toTypeString(val) === '[object Object]';\r\n// for converting list and named values to displayed strings.\r\nconst toDisplayString = (val) => {\r\n return val == null\r\n ? ''\r\n : isArray(val) || (isPlainObject(val) && val.toString === objectToString)\r\n ? JSON.stringify(val, null, 2)\r\n : String(val);\r\n};\r\nconst RANGE = 2;\r\nfunction generateCodeFrame(source, start = 0, end = source.length) {\r\n const lines = source.split(/\\r?\\n/);\r\n let count = 0;\r\n const res = [];\r\n for (let i = 0; i < lines.length; i++) {\r\n count += lines[i].length + 1;\r\n if (count >= start) {\r\n for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {\r\n if (j < 0 || j >= lines.length)\r\n continue;\r\n const line = j + 1;\r\n res.push(`${line}${' '.repeat(3 - String(line).length)}| ${lines[j]}`);\r\n const lineLength = lines[j].length;\r\n if (j === i) {\r\n // push underline\r\n const pad = start - (count - lineLength) + 1;\r\n const length = Math.max(1, end > count ? lineLength - pad : end - start);\r\n res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));\r\n }\r\n else if (j > i) {\r\n if (end > count) {\r\n const length = Math.max(Math.min(end - count, lineLength), 1);\r\n res.push(` | ` + '^'.repeat(length));\r\n }\r\n count += lineLength + 1;\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n return res.join('\\n');\r\n}\n\n/**\r\n * Event emitter, forked from the below:\r\n * - original repository url: https://github.com/developit/mitt\r\n * - code url: https://github.com/developit/mitt/blob/master/src/index.ts\r\n * - author: Jason Miller (https://github.com/developit)\r\n * - license: MIT\r\n */\r\n/**\r\n * Create a event emitter\r\n *\r\n * @returns An event emitter\r\n */\r\nfunction createEmitter() {\r\n const events = new Map();\r\n const emitter = {\r\n events,\r\n on(event, handler) {\r\n const handlers = events.get(event);\r\n const added = handlers && handlers.push(handler);\r\n if (!added) {\r\n events.set(event, [handler]);\r\n }\r\n },\r\n off(event, handler) {\r\n const handlers = events.get(event);\r\n if (handlers) {\r\n handlers.splice(handlers.indexOf(handler) >>> 0, 1);\r\n }\r\n },\r\n emit(event, payload) {\r\n (events.get(event) || [])\r\n .slice()\r\n .map(handler => handler(payload));\r\n (events.get('*') || [])\r\n .slice()\r\n .map(handler => handler(event, payload));\r\n }\r\n };\r\n return emitter;\r\n}\n\nexport { assign, createEmitter, escapeHtml, format, friendlyJSONstringify, generateCodeFrame, generateFormatCacheKey, getGlobalThis, hasOwn, inBrowser, isArray, isBoolean, isDate, isEmptyObject, isFunction, isNumber, isObject, isPlainObject, isPromise, isRegExp, isString, isSymbol, makeSymbol, mark, measure, objectToString, toDisplayString, toTypeString, warn };\n","/*!\n * message-compiler v9.2.2\n * (c) 2022 kazuya kawaguchi\n * Released under the MIT License.\n */\nimport { format, assign, isString } from '@intlify/shared';\n\nconst CompileErrorCodes = {\r\n // tokenizer error codes\r\n EXPECTED_TOKEN: 1,\r\n INVALID_TOKEN_IN_PLACEHOLDER: 2,\r\n UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,\r\n UNKNOWN_ESCAPE_SEQUENCE: 4,\r\n INVALID_UNICODE_ESCAPE_SEQUENCE: 5,\r\n UNBALANCED_CLOSING_BRACE: 6,\r\n UNTERMINATED_CLOSING_BRACE: 7,\r\n EMPTY_PLACEHOLDER: 8,\r\n NOT_ALLOW_NEST_PLACEHOLDER: 9,\r\n INVALID_LINKED_FORMAT: 10,\r\n // parser error codes\r\n MUST_HAVE_MESSAGES_IN_PLURAL: 11,\r\n UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,\r\n UNEXPECTED_EMPTY_LINKED_KEY: 13,\r\n UNEXPECTED_LEXICAL_ANALYSIS: 14,\r\n // Special value for higher-order compilers to pick up the last code\r\n // to avoid collision of error codes. This should always be kept as the last\r\n // item.\r\n __EXTEND_POINT__: 15\r\n};\r\n/** @internal */\r\nconst errorMessages = {\r\n // tokenizer error messages\r\n [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,\r\n [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,\r\n [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,\r\n [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\\\{0}`,\r\n [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,\r\n [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,\r\n [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,\r\n [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,\r\n [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,\r\n [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,\r\n // parser error messages\r\n [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,\r\n [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,\r\n [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,\r\n [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`\r\n};\r\nfunction createCompileError(code, loc, options = {}) {\r\n const { domain, messages, args } = options;\r\n const msg = (process.env.NODE_ENV !== 'production')\r\n ? format((messages || errorMessages)[code] || '', ...(args || []))\r\n : code;\r\n const error = new SyntaxError(String(msg));\r\n error.code = code;\r\n if (loc) {\r\n error.location = loc;\r\n }\r\n error.domain = domain;\r\n return error;\r\n}\r\n/** @internal */\r\nfunction defaultOnError(error) {\r\n throw error;\r\n}\n\nconst LocationStub = {\r\n start: { line: 1, column: 1, offset: 0 },\r\n end: { line: 1, column: 1, offset: 0 }\r\n};\r\nfunction createPosition(line, column, offset) {\r\n return { line, column, offset };\r\n}\r\nfunction createLocation(start, end, source) {\r\n const loc = { start, end };\r\n if (source != null) {\r\n loc.source = source;\r\n }\r\n return loc;\r\n}\n\nconst CHAR_SP = ' ';\r\nconst CHAR_CR = '\\r';\r\nconst CHAR_LF = '\\n';\r\nconst CHAR_LS = String.fromCharCode(0x2028);\r\nconst CHAR_PS = String.fromCharCode(0x2029);\r\nfunction createScanner(str) {\r\n const _buf = str;\r\n let _index = 0;\r\n let _line = 1;\r\n let _column = 1;\r\n let _peekOffset = 0;\r\n const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;\r\n const isLF = (index) => _buf[index] === CHAR_LF;\r\n const isPS = (index) => _buf[index] === CHAR_PS;\r\n const isLS = (index) => _buf[index] === CHAR_LS;\r\n const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);\r\n const index = () => _index;\r\n const line = () => _line;\r\n const column = () => _column;\r\n const peekOffset = () => _peekOffset;\r\n const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];\r\n const currentChar = () => charAt(_index);\r\n const currentPeek = () => charAt(_index + _peekOffset);\r\n function next() {\r\n _peekOffset = 0;\r\n if (isLineEnd(_index)) {\r\n _line++;\r\n _column = 0;\r\n }\r\n if (isCRLF(_index)) {\r\n _index++;\r\n }\r\n _index++;\r\n _column++;\r\n return _buf[_index];\r\n }\r\n function peek() {\r\n if (isCRLF(_index + _peekOffset)) {\r\n _peekOffset++;\r\n }\r\n _peekOffset++;\r\n return _buf[_index + _peekOffset];\r\n }\r\n function reset() {\r\n _index = 0;\r\n _line = 1;\r\n _column = 1;\r\n _peekOffset = 0;\r\n }\r\n function resetPeek(offset = 0) {\r\n _peekOffset = offset;\r\n }\r\n function skipToPeek() {\r\n const target = _index + _peekOffset;\r\n // eslint-disable-next-line no-unmodified-loop-condition\r\n while (target !== _index) {\r\n next();\r\n }\r\n _peekOffset = 0;\r\n }\r\n return {\r\n index,\r\n line,\r\n column,\r\n peekOffset,\r\n charAt,\r\n currentChar,\r\n currentPeek,\r\n next,\r\n peek,\r\n reset,\r\n resetPeek,\r\n skipToPeek\r\n };\r\n}\n\nconst EOF = undefined;\r\nconst LITERAL_DELIMITER = \"'\";\r\nconst ERROR_DOMAIN$1 = 'tokenizer';\r\nfunction createTokenizer(source, options = {}) {\r\n const location = options.location !== false;\r\n const _scnr = createScanner(source);\r\n const currentOffset = () => _scnr.index();\r\n const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());\r\n const _initLoc = currentPosition();\r\n const _initOffset = currentOffset();\r\n const _context = {\r\n currentType: 14 /* EOF */,\r\n offset: _initOffset,\r\n startLoc: _initLoc,\r\n endLoc: _initLoc,\r\n lastType: 14 /* EOF */,\r\n lastOffset: _initOffset,\r\n lastStartLoc: _initLoc,\r\n lastEndLoc: _initLoc,\r\n braceNest: 0,\r\n inLinked: false,\r\n text: ''\r\n };\r\n const context = () => _context;\r\n const { onError } = options;\r\n function emitError(code, pos, offset, ...args) {\r\n const ctx = context();\r\n pos.column += offset;\r\n pos.offset += offset;\r\n if (onError) {\r\n const loc = createLocation(ctx.startLoc, pos);\r\n const err = createCompileError(code, loc, {\r\n domain: ERROR_DOMAIN$1,\r\n args\r\n });\r\n onError(err);\r\n }\r\n }\r\n function getToken(context, type, value) {\r\n context.endLoc = currentPosition();\r\n context.currentType = type;\r\n const token = { type };\r\n if (location) {\r\n token.loc = createLocation(context.startLoc, context.endLoc);\r\n }\r\n if (value != null) {\r\n token.value = value;\r\n }\r\n return token;\r\n }\r\n const getEndToken = (context) => getToken(context, 14 /* EOF */);\r\n function eat(scnr, ch) {\r\n if (scnr.currentChar() === ch) {\r\n scnr.next();\r\n return ch;\r\n }\r\n else {\r\n emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);\r\n return '';\r\n }\r\n }\r\n function peekSpaces(scnr) {\r\n let buf = '';\r\n while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {\r\n buf += scnr.currentPeek();\r\n scnr.peek();\r\n }\r\n return buf;\r\n }\r\n function skipSpaces(scnr) {\r\n const buf = peekSpaces(scnr);\r\n scnr.skipToPeek();\r\n return buf;\r\n }\r\n function isIdentifierStart(ch) {\r\n if (ch === EOF) {\r\n return false;\r\n }\r\n const cc = ch.charCodeAt(0);\r\n return ((cc >= 97 && cc <= 122) || // a-z\r\n (cc >= 65 && cc <= 90) || // A-Z\r\n cc === 95 // _\r\n );\r\n }\r\n function isNumberStart(ch) {\r\n if (ch === EOF) {\r\n return false;\r\n }\r\n const cc = ch.charCodeAt(0);\r\n return cc >= 48 && cc <= 57; // 0-9\r\n }\r\n function isNamedIdentifierStart(scnr, context) {\r\n const { currentType } = context;\r\n if (currentType !== 2 /* BraceLeft */) {\r\n return false;\r\n }\r\n peekSpaces(scnr);\r\n const ret = isIdentifierStart(scnr.currentPeek());\r\n scnr.resetPeek();\r\n return ret;\r\n }\r\n function isListIdentifierStart(scnr, context) {\r\n const { currentType } = context;\r\n if (currentType !== 2 /* BraceLeft */) {\r\n return false;\r\n }\r\n peekSpaces(scnr);\r\n const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();\r\n const ret = isNumberStart(ch);\r\n scnr.resetPeek();\r\n return ret;\r\n }\r\n function isLiteralStart(scnr, context) {\r\n const { currentType } = context;\r\n if (currentType !== 2 /* BraceLeft */) {\r\n return false;\r\n }\r\n peekSpaces(scnr);\r\n const ret = scnr.currentPeek() === LITERAL_DELIMITER;\r\n scnr.resetPeek();\r\n return ret;\r\n }\r\n function isLinkedDotStart(scnr, context) {\r\n const { currentType } = context;\r\n if (currentType !== 8 /* LinkedAlias */) {\r\n return false;\r\n }\r\n peekSpaces(scnr);\r\n const ret = scnr.currentPeek() === \".\" /* LinkedDot */;\r\n scnr.resetPeek();\r\n return ret;\r\n }\r\n function isLinkedModifierStart(scnr, context) {\r\n const { currentType } = context;\r\n if (currentType !== 9 /* LinkedDot */) {\r\n return false;\r\n }\r\n peekSpaces(scnr);\r\n const ret = isIdentifierStart(scnr.currentPeek());\r\n scnr.resetPeek();\r\n return ret;\r\n }\r\n function isLinkedDelimiterStart(scnr, context) {\r\n const { currentType } = context;\r\n if (!(currentType === 8 /* LinkedAlias */ ||\r\n currentType === 12 /* LinkedModifier */)) {\r\n return false;\r\n }\r\n peekSpaces(scnr);\r\n const ret = scnr.currentPeek() === \":\" /* LinkedDelimiter */;\r\n scnr.resetPeek();\r\n return ret;\r\n }\r\n function isLinkedReferStart(scnr, context) {\r\n const { currentType } = context;\r\n if (currentType !== 10 /* LinkedDelimiter */) {\r\n return false;\r\n }\r\n const fn = () => {\r\n const ch = scnr.currentPeek();\r\n if (ch === \"{\" /* BraceLeft */) {\r\n return isIdentifierStart(scnr.peek());\r\n }\r\n else if (ch === \"@\" /* LinkedAlias */ ||\r\n ch === \"%\" /* Modulo */ ||\r\n ch === \"|\" /* Pipe */ ||\r\n ch === \":\" /* LinkedDelimiter */ ||\r\n ch === \".\" /* LinkedDot */ ||\r\n ch === CHAR_SP ||\r\n !ch) {\r\n return false;\r\n }\r\n else if (ch === CHAR_LF) {\r\n scnr.peek();\r\n return fn();\r\n }\r\n else {\r\n // other characters\r\n return isIdentifierStart(ch);\r\n }\r\n };\r\n const ret = fn();\r\n scnr.resetPeek();\r\n return ret;\r\n }\r\n function isPluralStart(scnr) {\r\n peekSpaces(scnr);\r\n const ret = scnr.currentPeek() === \"|\" /* Pipe */;\r\n scnr.resetPeek();\r\n return ret;\r\n }\r\n function detectModuloStart(scnr) {\r\n const spaces = peekSpaces(scnr);\r\n const ret = scnr.currentPeek() === \"%\" /* Modulo */ &&\r\n scnr.peek() === \"{\" /* BraceLeft */;\r\n scnr.resetPeek();\r\n return {\r\n isModulo: ret,\r\n hasSpace: spaces.length > 0\r\n };\r\n }\r\n function isTextStart(scnr, reset = true) {\r\n const fn = (hasSpace = false, prev = '', detectModulo = false) => {\r\n const ch = scnr.currentPeek();\r\n if (ch === \"{\" /* BraceLeft */) {\r\n return prev === \"%\" /* Modulo */ ? false : hasSpace;\r\n }\r\n else if (ch === \"@\" /* LinkedAlias */ || !ch) {\r\n return prev === \"%\" /* Modulo */ ? true : hasSpace;\r\n }\r\n else if (ch === \"%\" /* Modulo */) {\r\n scnr.peek();\r\n return fn(hasSpace, \"%\" /* Modulo */, true);\r\n }\r\n else if (ch === \"|\" /* Pipe */) {\r\n return prev === \"%\" /* Modulo */ || detectModulo\r\n ? true\r\n : !(prev === CHAR_SP || prev === CHAR_LF);\r\n }\r\n else if (ch === CHAR_SP) {\r\n scnr.peek();\r\n return fn(true, CHAR_SP, detectModulo);\r\n }\r\n else if (ch === CHAR_LF) {\r\n scnr.peek();\r\n return fn(true, CHAR_LF, detectModulo);\r\n }\r\n else {\r\n return true;\r\n }\r\n };\r\n const ret = fn();\r\n reset && scnr.resetPeek();\r\n return ret;\r\n }\r\n function takeChar(scnr, fn) {\r\n const ch = scnr.currentChar();\r\n if (ch === EOF) {\r\n return EOF;\r\n }\r\n if (fn(ch)) {\r\n scnr.next();\r\n return ch;\r\n }\r\n return null;\r\n }\r\n function takeIdentifierChar(scnr) {\r\n const closure = (ch) => {\r\n const cc = ch.charCodeAt(0);\r\n return ((cc >= 97 && cc <= 122) || // a-z\r\n (cc >= 65 && cc <= 90) || // A-Z\r\n (cc >= 48 && cc <= 57) || // 0-9\r\n cc === 95 || // _\r\n cc === 36 // $\r\n );\r\n };\r\n return takeChar(scnr, closure);\r\n }\r\n function takeDigit(scnr) {\r\n const closure = (ch) => {\r\n const cc = ch.charCodeAt(0);\r\n return cc >= 48 && cc <= 57; // 0-9\r\n };\r\n return takeChar(scnr, closure);\r\n }\r\n function takeHexDigit(scnr) {\r\n const closure = (ch) => {\r\n const cc = ch.charCodeAt(0);\r\n return ((cc >= 48 && cc <= 57) || // 0-9\r\n (cc >= 65 && cc <= 70) || // A-F\r\n (cc >= 97 && cc <= 102)); // a-f\r\n };\r\n return takeChar(scnr, closure);\r\n }\r\n function getDigits(scnr) {\r\n let ch = '';\r\n let num = '';\r\n while ((ch = takeDigit(scnr))) {\r\n num += ch;\r\n }\r\n return num;\r\n }\r\n function readModulo(scnr) {\r\n skipSpaces(scnr);\r\n const ch = scnr.currentChar();\r\n if (ch !== \"%\" /* Modulo */) {\r\n emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);\r\n }\r\n scnr.next();\r\n return \"%\" /* Modulo */;\r\n }\r\n function readText(scnr) {\r\n let buf = '';\r\n while (true) {\r\n const ch = scnr.currentChar();\r\n if (ch === \"{\" /* BraceLeft */ ||\r\n ch === \"}\" /* BraceRight */ ||\r\n ch === \"@\" /* LinkedAlias */ ||\r\n ch === \"|\" /* Pipe */ ||\r\n !ch) {\r\n break;\r\n }\r\n else if (ch === \"%\" /* Modulo */) {\r\n if (isTextStart(scnr)) {\r\n buf += ch;\r\n scnr.next();\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n else if (ch === CHAR_SP || ch === CHAR_LF) {\r\n if (isTextStart(scnr)) {\r\n buf += ch;\r\n scnr.next();\r\n }\r\n else if (isPluralStart(scnr)) {\r\n break;\r\n }\r\n else {\r\n buf += ch;\r\n scnr.next();\r\n }\r\n }\r\n else {\r\n buf += ch;\r\n scnr.next();\r\n }\r\n }\r\n return buf;\r\n }\r\n function readNamedIdentifier(scnr) {\r\n skipSpaces(scnr);\r\n let ch = '';\r\n let name = '';\r\n while ((ch = takeIdentifierChar(scnr))) {\r\n name += ch;\r\n }\r\n if (scnr.currentChar() === EOF) {\r\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\r\n }\r\n return name;\r\n }\r\n function readListIdentifier(scnr) {\r\n skipSpaces(scnr);\r\n let value = '';\r\n if (scnr.currentChar() === '-') {\r\n scnr.next();\r\n value += `-${getDigits(scnr)}`;\r\n }\r\n else {\r\n value += getDigits(scnr);\r\n }\r\n if (scnr.currentChar() === EOF) {\r\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\r\n }\r\n return value;\r\n }\r\n function readLiteral(scnr) {\r\n skipSpaces(scnr);\r\n eat(scnr, `\\'`);\r\n let ch = '';\r\n let literal = '';\r\n const fn = (x) => x !== LITERAL_DELIMITER && x !== CHAR_LF;\r\n while ((ch = takeChar(scnr, fn))) {\r\n if (ch === '\\\\') {\r\n literal += readEscapeSequence(scnr);\r\n }\r\n else {\r\n literal += ch;\r\n }\r\n }\r\n const current = scnr.currentChar();\r\n if (current === CHAR_LF || current === EOF) {\r\n emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);\r\n // TODO: Is it correct really?\r\n if (current === CHAR_LF) {\r\n scnr.next();\r\n eat(scnr, `\\'`);\r\n }\r\n return literal;\r\n }\r\n eat(scnr, `\\'`);\r\n return literal;\r\n }\r\n function readEscapeSequence(scnr) {\r\n const ch = scnr.currentChar();\r\n switch (ch) {\r\n case '\\\\':\r\n case `\\'`:\r\n scnr.next();\r\n return `\\\\${ch}`;\r\n case 'u':\r\n return readUnicodeEscapeSequence(scnr, ch, 4);\r\n case 'U':\r\n return readUnicodeEscapeSequence(scnr, ch, 6);\r\n default:\r\n emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);\r\n return '';\r\n }\r\n }\r\n function readUnicodeEscapeSequence(scnr, unicode, digits) {\r\n eat(scnr, unicode);\r\n let sequence = '';\r\n for (let i = 0; i < digits; i++) {\r\n const ch = takeHexDigit(scnr);\r\n if (!ch) {\r\n emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\\\${unicode}${sequence}${scnr.currentChar()}`);\r\n break;\r\n }\r\n sequence += ch;\r\n }\r\n return `\\\\${unicode}${sequence}`;\r\n }\r\n function readInvalidIdentifier(scnr) {\r\n skipSpaces(scnr);\r\n let ch = '';\r\n let identifiers = '';\r\n const closure = (ch) => ch !== \"{\" /* BraceLeft */ &&\r\n ch !== \"}\" /* BraceRight */ &&\r\n ch !== CHAR_SP &&\r\n ch !== CHAR_LF;\r\n while ((ch = takeChar(scnr, closure))) {\r\n identifiers += ch;\r\n }\r\n return identifiers;\r\n }\r\n function readLinkedModifier(scnr) {\r\n let ch = '';\r\n let name = '';\r\n while ((ch = takeIdentifierChar(scnr))) {\r\n name += ch;\r\n }\r\n return name;\r\n }\r\n function readLinkedRefer(scnr) {\r\n const fn = (detect = false, buf) => {\r\n const ch = scnr.currentChar();\r\n if (ch === \"{\" /* BraceLeft */ ||\r\n ch === \"%\" /* Modulo */ ||\r\n ch === \"@\" /* LinkedAlias */ ||\r\n ch === \"|\" /* Pipe */ ||\r\n !ch) {\r\n return buf;\r\n }\r\n else if (ch === CHAR_SP) {\r\n return buf;\r\n }\r\n else if (ch === CHAR_LF) {\r\n buf += ch;\r\n scnr.next();\r\n return fn(detect, buf);\r\n }\r\n else {\r\n buf += ch;\r\n scnr.next();\r\n return fn(true, buf);\r\n }\r\n };\r\n return fn(false, '');\r\n }\r\n function readPlural(scnr) {\r\n skipSpaces(scnr);\r\n const plural = eat(scnr, \"|\" /* Pipe */);\r\n skipSpaces(scnr);\r\n return plural;\r\n }\r\n // TODO: We need refactoring of token parsing ...\r\n function readTokenInPlaceholder(scnr, context) {\r\n let token = null;\r\n const ch = scnr.currentChar();\r\n switch (ch) {\r\n case \"{\" /* BraceLeft */:\r\n if (context.braceNest >= 1) {\r\n emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);\r\n }\r\n scnr.next();\r\n token = getToken(context, 2 /* BraceLeft */, \"{\" /* BraceLeft */);\r\n skipSpaces(scnr);\r\n context.braceNest++;\r\n return token;\r\n case \"}\" /* BraceRight */:\r\n if (context.braceNest > 0 &&\r\n context.currentType === 2 /* BraceLeft */) {\r\n emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);\r\n }\r\n scnr.next();\r\n token = getToken(context, 3 /* BraceRight */, \"}\" /* BraceRight */);\r\n context.braceNest--;\r\n context.braceNest > 0 && skipSpaces(scnr);\r\n if (context.inLinked && context.braceNest === 0) {\r\n context.inLinked = false;\r\n }\r\n return token;\r\n case \"@\" /* LinkedAlias */:\r\n if (context.braceNest > 0) {\r\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\r\n }\r\n token = readTokenInLinked(scnr, context) || getEndToken(context);\r\n context.braceNest = 0;\r\n return token;\r\n default:\r\n let validNamedIdentifier = true;\r\n let validListIdentifier = true;\r\n let validLiteral = true;\r\n if (isPluralStart(scnr)) {\r\n if (context.braceNest > 0) {\r\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\r\n }\r\n token = getToken(context, 1 /* Pipe */, readPlural(scnr));\r\n // reset\r\n context.braceNest = 0;\r\n context.inLinked = false;\r\n return token;\r\n }\r\n if (context.braceNest > 0 &&\r\n (context.currentType === 5 /* Named */ ||\r\n context.currentType === 6 /* List */ ||\r\n context.currentType === 7 /* Literal */)) {\r\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\r\n context.braceNest = 0;\r\n return readToken(scnr, context);\r\n }\r\n if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {\r\n token = getToken(context, 5 /* Named */, readNamedIdentifier(scnr));\r\n skipSpaces(scnr);\r\n return token;\r\n }\r\n if ((validListIdentifier = isListIdentifierStart(scnr, context))) {\r\n token = getToken(context, 6 /* List */, readListIdentifier(scnr));\r\n skipSpaces(scnr);\r\n return token;\r\n }\r\n if ((validLiteral = isLiteralStart(scnr, context))) {\r\n token = getToken(context, 7 /* Literal */, readLiteral(scnr));\r\n skipSpaces(scnr);\r\n return token;\r\n }\r\n if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {\r\n // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...\r\n token = getToken(context, 13 /* InvalidPlace */, readInvalidIdentifier(scnr));\r\n emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);\r\n skipSpaces(scnr);\r\n return token;\r\n }\r\n break;\r\n }\r\n return token;\r\n }\r\n // TODO: We need refactoring of token parsing ...\r\n function readTokenInLinked(scnr, context) {\r\n const { currentType } = context;\r\n let token = null;\r\n const ch = scnr.currentChar();\r\n if ((currentType === 8 /* LinkedAlias */ ||\r\n currentType === 9 /* LinkedDot */ ||\r\n currentType === 12 /* LinkedModifier */ ||\r\n currentType === 10 /* LinkedDelimiter */) &&\r\n (ch === CHAR_LF || ch === CHAR_SP)) {\r\n emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\r\n }\r\n switch (ch) {\r\n case \"@\" /* LinkedAlias */:\r\n scnr.next();\r\n token = getToken(context, 8 /* LinkedAlias */, \"@\" /* LinkedAlias */);\r\n context.inLinked = true;\r\n return token;\r\n case \".\" /* LinkedDot */:\r\n skipSpaces(scnr);\r\n scnr.next();\r\n return getToken(context, 9 /* LinkedDot */, \".\" /* LinkedDot */);\r\n case \":\" /* LinkedDelimiter */:\r\n skipSpaces(scnr);\r\n scnr.next();\r\n return getToken(context, 10 /* LinkedDelimiter */, \":\" /* LinkedDelimiter */);\r\n default:\r\n if (isPluralStart(scnr)) {\r\n token = getToken(context, 1 /* Pipe */, readPlural(scnr));\r\n // reset\r\n context.braceNest = 0;\r\n context.inLinked = false;\r\n return token;\r\n }\r\n if (isLinkedDotStart(scnr, context) ||\r\n isLinkedDelimiterStart(scnr, context)) {\r\n skipSpaces(scnr);\r\n return readTokenInLinked(scnr, context);\r\n }\r\n if (isLinkedModifierStart(scnr, context)) {\r\n skipSpaces(scnr);\r\n return getToken(context, 12 /* LinkedModifier */, readLinkedModifier(scnr));\r\n }\r\n if (isLinkedReferStart(scnr, context)) {\r\n skipSpaces(scnr);\r\n if (ch === \"{\" /* BraceLeft */) {\r\n // scan the placeholder\r\n return readTokenInPlaceholder(scnr, context) || token;\r\n }\r\n else {\r\n return getToken(context, 11 /* LinkedKey */, readLinkedRefer(scnr));\r\n }\r\n }\r\n if (currentType === 8 /* LinkedAlias */) {\r\n emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\r\n }\r\n context.braceNest = 0;\r\n context.inLinked = false;\r\n return readToken(scnr, context);\r\n }\r\n }\r\n // TODO: We need refactoring of token parsing ...\r\n function readToken(scnr, context) {\r\n let token = { type: 14 /* EOF */ };\r\n if (context.braceNest > 0) {\r\n return readTokenInPlaceholder(scnr, context) || getEndToken(context);\r\n }\r\n if (context.inLinked) {\r\n return readTokenInLinked(scnr, context) || getEndToken(context);\r\n }\r\n const ch = scnr.currentChar();\r\n switch (ch) {\r\n case \"{\" /* BraceLeft */:\r\n return readTokenInPlaceholder(scnr, context) || getEndToken(context);\r\n case \"}\" /* BraceRight */:\r\n emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);\r\n scnr.next();\r\n return getToken(context, 3 /* BraceRight */, \"}\" /* BraceRight */);\r\n case \"@\" /* LinkedAlias */:\r\n return readTokenInLinked(scnr, context) || getEndToken(context);\r\n default:\r\n if (isPluralStart(scnr)) {\r\n token = getToken(context, 1 /* Pipe */, readPlural(scnr));\r\n // reset\r\n context.braceNest = 0;\r\n context.inLinked = false;\r\n return token;\r\n }\r\n const { isModulo, hasSpace } = detectModuloStart(scnr);\r\n if (isModulo) {\r\n return hasSpace\r\n ? getToken(context, 0 /* Text */, readText(scnr))\r\n : getToken(context, 4 /* Modulo */, readModulo(scnr));\r\n }\r\n if (isTextStart(scnr)) {\r\n return getToken(context, 0 /* Text */, readText(scnr));\r\n }\r\n break;\r\n }\r\n return token;\r\n }\r\n function nextToken() {\r\n const { currentType, offset, startLoc, endLoc } = _context;\r\n _context.lastType = currentType;\r\n _context.lastOffset = offset;\r\n _context.lastStartLoc = startLoc;\r\n _context.lastEndLoc = endLoc;\r\n _context.offset = currentOffset();\r\n _context.startLoc = currentPosition();\r\n if (_scnr.currentChar() === EOF) {\r\n return getToken(_context, 14 /* EOF */);\r\n }\r\n return readToken(_scnr, _context);\r\n }\r\n return {\r\n nextToken,\r\n currentOffset,\r\n currentPosition,\r\n context\r\n };\r\n}\n\nconst ERROR_DOMAIN = 'parser';\r\n// Backslash backslash, backslash quote, uHHHH, UHHHHHH.\r\nconst KNOWN_ESCAPES = /(?:\\\\\\\\|\\\\'|\\\\u([0-9a-fA-F]{4})|\\\\U([0-9a-fA-F]{6}))/g;\r\nfunction fromEscapeSequence(match, codePoint4, codePoint6) {\r\n switch (match) {\r\n case `\\\\\\\\`:\r\n return `\\\\`;\r\n case `\\\\\\'`:\r\n return `\\'`;\r\n default: {\r\n const codePoint = parseInt(codePoint4 || codePoint6, 16);\r\n if (codePoint <= 0xd7ff || codePoint >= 0xe000) {\r\n return String.fromCodePoint(codePoint);\r\n }\r\n // invalid ...\r\n // Replace them with U+FFFD REPLACEMENT CHARACTER.\r\n return '�';\r\n }\r\n }\r\n}\r\nfunction createParser(options = {}) {\r\n const location = options.location !== false;\r\n const { onError } = options;\r\n function emitError(tokenzer, code, start, offset, ...args) {\r\n const end = tokenzer.currentPosition();\r\n end.offset += offset;\r\n end.column += offset;\r\n if (onError) {\r\n const loc = createLocation(start, end);\r\n const err = createCompileError(code, loc, {\r\n domain: ERROR_DOMAIN,\r\n args\r\n });\r\n onError(err);\r\n }\r\n }\r\n function startNode(type, offset, loc) {\r\n const node = {\r\n type,\r\n start: offset,\r\n end: offset\r\n };\r\n if (location) {\r\n node.loc = { start: loc, end: loc };\r\n }\r\n return node;\r\n }\r\n function endNode(node, offset, pos, type) {\r\n node.end = offset;\r\n if (type) {\r\n node.type = type;\r\n }\r\n if (location && node.loc) {\r\n node.loc.end = pos;\r\n }\r\n }\r\n function parseText(tokenizer, value) {\r\n const context = tokenizer.context();\r\n const node = startNode(3 /* Text */, context.offset, context.startLoc);\r\n node.value = value;\r\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\r\n return node;\r\n }\r\n function parseList(tokenizer, index) {\r\n const context = tokenizer.context();\r\n const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\r\n const node = startNode(5 /* List */, offset, loc);\r\n node.index = parseInt(index, 10);\r\n tokenizer.nextToken(); // skip brach right\r\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\r\n return node;\r\n }\r\n function parseNamed(tokenizer, key) {\r\n const context = tokenizer.context();\r\n const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\r\n const node = startNode(4 /* Named */, offset, loc);\r\n node.key = key;\r\n tokenizer.nextToken(); // skip brach right\r\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\r\n return node;\r\n }\r\n function parseLiteral(tokenizer, value) {\r\n const context = tokenizer.context();\r\n const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\r\n const node = startNode(9 /* Literal */, offset, loc);\r\n node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);\r\n tokenizer.nextToken(); // skip brach right\r\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\r\n return node;\r\n }\r\n function parseLinkedModifier(tokenizer) {\r\n const token = tokenizer.nextToken();\r\n const context = tokenizer.context();\r\n const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc\r\n const node = startNode(8 /* LinkedModifier */, offset, loc);\r\n if (token.type !== 12 /* LinkedModifier */) {\r\n // empty modifier\r\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);\r\n node.value = '';\r\n endNode(node, offset, loc);\r\n return {\r\n nextConsumeToken: token,\r\n node\r\n };\r\n }\r\n // check token\r\n if (token.value == null) {\r\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\r\n }\r\n node.value = token.value || '';\r\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\r\n return {\r\n node\r\n };\r\n }\r\n function parseLinkedKey(tokenizer, value) {\r\n const context = tokenizer.context();\r\n const node = startNode(7 /* LinkedKey */, context.offset, context.startLoc);\r\n node.value = value;\r\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\r\n return node;\r\n }\r\n function parseLinked(tokenizer) {\r\n const context = tokenizer.context();\r\n const linkedNode = startNode(6 /* Linked */, context.offset, context.startLoc);\r\n let token = tokenizer.nextToken();\r\n if (token.type === 9 /* LinkedDot */) {\r\n const parsed = parseLinkedModifier(tokenizer);\r\n linkedNode.modifier = parsed.node;\r\n token = parsed.nextConsumeToken || tokenizer.nextToken();\r\n }\r\n // asset check token\r\n if (token.type !== 10 /* LinkedDelimiter */) {\r\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\r\n }\r\n token = tokenizer.nextToken();\r\n // skip brace left\r\n if (token.type === 2 /* BraceLeft */) {\r\n token = tokenizer.nextToken();\r\n }\r\n switch (token.type) {\r\n case 11 /* LinkedKey */:\r\n if (token.value == null) {\r\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\r\n }\r\n linkedNode.key = parseLinkedKey(tokenizer, token.value || '');\r\n break;\r\n case 5 /* Named */:\r\n if (token.value == null) {\r\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\r\n }\r\n linkedNode.key = parseNamed(tokenizer, token.value || '');\r\n break;\r\n case 6 /* List */:\r\n if (token.value == null) {\r\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\r\n }\r\n linkedNode.key = parseList(tokenizer, token.value || '');\r\n break;\r\n case 7 /* Literal */:\r\n if (token.value == null) {\r\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\r\n }\r\n linkedNode.key = parseLiteral(tokenizer, token.value || '');\r\n break;\r\n default:\r\n // empty key\r\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);\r\n const nextContext = tokenizer.context();\r\n const emptyLinkedKeyNode = startNode(7 /* LinkedKey */, nextContext.offset, nextContext.startLoc);\r\n emptyLinkedKeyNode.value = '';\r\n endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);\r\n linkedNode.key = emptyLinkedKeyNode;\r\n endNode(linkedNode, nextContext.offset, nextContext.startLoc);\r\n return {\r\n nextConsumeToken: token,\r\n node: linkedNode\r\n };\r\n }\r\n endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());\r\n return {\r\n node: linkedNode\r\n };\r\n }\r\n function parseMessage(tokenizer) {\r\n const context = tokenizer.context();\r\n const startOffset = context.currentType === 1 /* Pipe */\r\n ? tokenizer.currentOffset()\r\n : context.offset;\r\n const startLoc = context.currentType === 1 /* Pipe */\r\n ? context.endLoc\r\n : context.startLoc;\r\n const node = startNode(2 /* Message */, startOffset, startLoc);\r\n node.items = [];\r\n let nextToken = null;\r\n do {\r\n const token = nextToken || tokenizer.nextToken();\r\n nextToken = null;\r\n switch (token.type) {\r\n case 0 /* Text */:\r\n if (token.value == null) {\r\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\r\n }\r\n node.items.push(parseText(tokenizer, token.value || ''));\r\n break;\r\n case 6 /* List */:\r\n if (token.value == null) {\r\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\r\n }\r\n node.items.push(parseList(tokenizer, token.value || ''));\r\n break;\r\n case 5 /* Named */:\r\n if (token.value == null) {\r\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\r\n }\r\n node.items.push(parseNamed(tokenizer, token.value || ''));\r\n break;\r\n case 7 /* Literal */:\r\n if (token.value == null) {\r\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\r\n }\r\n node.items.push(parseLiteral(tokenizer, token.value || ''));\r\n break;\r\n case 8 /* LinkedAlias */:\r\n const parsed = parseLinked(tokenizer);\r\n node.items.push(parsed.node);\r\n nextToken = parsed.nextConsumeToken || null;\r\n break;\r\n }\r\n } while (context.currentType !== 14 /* EOF */ &&\r\n context.currentType !== 1 /* Pipe */);\r\n // adjust message node loc\r\n const endOffset = context.currentType === 1 /* Pipe */\r\n ? context.lastOffset\r\n : tokenizer.currentOffset();\r\n const endLoc = context.currentType === 1 /* Pipe */\r\n ? context.lastEndLoc\r\n : tokenizer.currentPosition();\r\n endNode(node, endOffset, endLoc);\r\n return node;\r\n }\r\n function parsePlural(tokenizer, offset, loc, msgNode) {\r\n const context = tokenizer.context();\r\n let hasEmptyMessage = msgNode.items.length === 0;\r\n const node = startNode(1 /* Plural */, offset, loc);\r\n node.cases = [];\r\n node.cases.push(msgNode);\r\n do {\r\n const msg = parseMessage(tokenizer);\r\n if (!hasEmptyMessage) {\r\n hasEmptyMessage = msg.items.length === 0;\r\n }\r\n node.cases.push(msg);\r\n } while (context.currentType !== 14 /* EOF */);\r\n if (hasEmptyMessage) {\r\n emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);\r\n }\r\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\r\n return node;\r\n }\r\n function parseResource(tokenizer) {\r\n const context = tokenizer.context();\r\n const { offset, startLoc } = context;\r\n const msgNode = parseMessage(tokenizer);\r\n if (context.currentType === 14 /* EOF */) {\r\n return msgNode;\r\n }\r\n else {\r\n return parsePlural(tokenizer, offset, startLoc, msgNode);\r\n }\r\n }\r\n function parse(source) {\r\n const tokenizer = createTokenizer(source, assign({}, options));\r\n const context = tokenizer.context();\r\n const node = startNode(0 /* Resource */, context.offset, context.startLoc);\r\n if (location && node.loc) {\r\n node.loc.source = source;\r\n }\r\n node.body = parseResource(tokenizer);\r\n // assert whether achieved to EOF\r\n if (context.currentType !== 14 /* EOF */) {\r\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');\r\n }\r\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\r\n return node;\r\n }\r\n return { parse };\r\n}\r\nfunction getTokenCaption(token) {\r\n if (token.type === 14 /* EOF */) {\r\n return 'EOF';\r\n }\r\n const name = (token.value || '').replace(/\\r?\\n/gu, '\\\\n');\r\n return name.length > 10 ? name.slice(0, 9) + '…' : name;\r\n}\n\nfunction createTransformer(ast, options = {} // eslint-disable-line\r\n) {\r\n const _context = {\r\n ast,\r\n helpers: new Set()\r\n };\r\n const context = () => _context;\r\n const helper = (name) => {\r\n _context.helpers.add(name);\r\n return name;\r\n };\r\n return { context, helper };\r\n}\r\nfunction traverseNodes(nodes, transformer) {\r\n for (let i = 0; i < nodes.length; i++) {\r\n traverseNode(nodes[i], transformer);\r\n }\r\n}\r\nfunction traverseNode(node, transformer) {\r\n // TODO: if we need pre-hook of transform, should be implemented to here\r\n switch (node.type) {\r\n case 1 /* Plural */:\r\n traverseNodes(node.cases, transformer);\r\n transformer.helper(\"plural\" /* PLURAL */);\r\n break;\r\n case 2 /* Message */:\r\n traverseNodes(node.items, transformer);\r\n break;\r\n case 6 /* Linked */:\r\n const linked = node;\r\n traverseNode(linked.key, transformer);\r\n transformer.helper(\"linked\" /* LINKED */);\r\n transformer.helper(\"type\" /* TYPE */);\r\n break;\r\n case 5 /* List */:\r\n transformer.helper(\"interpolate\" /* INTERPOLATE */);\r\n transformer.helper(\"list\" /* LIST */);\r\n break;\r\n case 4 /* Named */:\r\n transformer.helper(\"interpolate\" /* INTERPOLATE */);\r\n transformer.helper(\"named\" /* NAMED */);\r\n break;\r\n }\r\n // TODO: if we need post-hook of transform, should be implemented to here\r\n}\r\n// transform AST\r\nfunction transform(ast, options = {} // eslint-disable-line\r\n) {\r\n const transformer = createTransformer(ast);\r\n transformer.helper(\"normalize\" /* NORMALIZE */);\r\n // traverse\r\n ast.body && traverseNode(ast.body, transformer);\r\n // set meta information\r\n const context = transformer.context();\r\n ast.helpers = Array.from(context.helpers);\r\n}\n\nfunction createCodeGenerator(ast, options) {\r\n const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;\r\n const _context = {\r\n source: ast.loc.source,\r\n filename,\r\n code: '',\r\n column: 1,\r\n line: 1,\r\n offset: 0,\r\n map: undefined,\r\n breakLineCode,\r\n needIndent: _needIndent,\r\n indentLevel: 0\r\n };\r\n const context = () => _context;\r\n function push(code, node) {\r\n _context.code += code;\r\n }\r\n function _newline(n, withBreakLine = true) {\r\n const _breakLineCode = withBreakLine ? breakLineCode : '';\r\n push(_needIndent ? _breakLineCode + ` `.repeat(n) : _breakLineCode);\r\n }\r\n function indent(withNewLine = true) {\r\n const level = ++_context.indentLevel;\r\n withNewLine && _newline(level);\r\n }\r\n function deindent(withNewLine = true) {\r\n const level = --_context.indentLevel;\r\n withNewLine && _newline(level);\r\n }\r\n function newline() {\r\n _newline(_context.indentLevel);\r\n }\r\n const helper = (key) => `_${key}`;\r\n const needIndent = () => _context.needIndent;\r\n return {\r\n context,\r\n push,\r\n indent,\r\n deindent,\r\n newline,\r\n helper,\r\n needIndent\r\n };\r\n}\r\nfunction generateLinkedNode(generator, node) {\r\n const { helper } = generator;\r\n generator.push(`${helper(\"linked\" /* LINKED */)}(`);\r\n generateNode(generator, node.key);\r\n if (node.modifier) {\r\n generator.push(`, `);\r\n generateNode(generator, node.modifier);\r\n generator.push(`, _type`);\r\n }\r\n else {\r\n generator.push(`, undefined, _type`);\r\n }\r\n generator.push(`)`);\r\n}\r\nfunction generateMessageNode(generator, node) {\r\n const { helper, needIndent } = generator;\r\n generator.push(`${helper(\"normalize\" /* NORMALIZE */)}([`);\r\n generator.indent(needIndent());\r\n const length = node.items.length;\r\n for (let i = 0; i < length; i++) {\r\n generateNode(generator, node.items[i]);\r\n if (i === length - 1) {\r\n break;\r\n }\r\n generator.push(', ');\r\n }\r\n generator.deindent(needIndent());\r\n generator.push('])');\r\n}\r\nfunction generatePluralNode(generator, node) {\r\n const { helper, needIndent } = generator;\r\n if (node.cases.length > 1) {\r\n generator.push(`${helper(\"plural\" /* PLURAL */)}([`);\r\n generator.indent(needIndent());\r\n const length = node.cases.length;\r\n for (let i = 0; i < length; i++) {\r\n generateNode(generator, node.cases[i]);\r\n if (i === length - 1) {\r\n break;\r\n }\r\n generator.push(', ');\r\n }\r\n generator.deindent(needIndent());\r\n generator.push(`])`);\r\n }\r\n}\r\nfunction generateResource(generator, node) {\r\n if (node.body) {\r\n generateNode(generator, node.body);\r\n }\r\n else {\r\n generator.push('null');\r\n }\r\n}\r\nfunction generateNode(generator, node) {\r\n const { helper } = generator;\r\n switch (node.type) {\r\n case 0 /* Resource */:\r\n generateResource(generator, node);\r\n break;\r\n case 1 /* Plural */:\r\n generatePluralNode(generator, node);\r\n break;\r\n case 2 /* Message */:\r\n generateMessageNode(generator, node);\r\n break;\r\n case 6 /* Linked */:\r\n generateLinkedNode(generator, node);\r\n break;\r\n case 8 /* LinkedModifier */:\r\n generator.push(JSON.stringify(node.value), node);\r\n break;\r\n case 7 /* LinkedKey */:\r\n generator.push(JSON.stringify(node.value), node);\r\n break;\r\n case 5 /* List */:\r\n generator.push(`${helper(\"interpolate\" /* INTERPOLATE */)}(${helper(\"list\" /* LIST */)}(${node.index}))`, node);\r\n break;\r\n case 4 /* Named */:\r\n generator.push(`${helper(\"interpolate\" /* INTERPOLATE */)}(${helper(\"named\" /* NAMED */)}(${JSON.stringify(node.key)}))`, node);\r\n break;\r\n case 9 /* Literal */:\r\n generator.push(JSON.stringify(node.value), node);\r\n break;\r\n case 3 /* Text */:\r\n generator.push(JSON.stringify(node.value), node);\r\n break;\r\n default:\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n throw new Error(`unhandled codegen node type: ${node.type}`);\r\n }\r\n }\r\n}\r\n// generate code from AST\r\nconst generate = (ast, options = {} // eslint-disable-line\r\n) => {\r\n const mode = isString(options.mode) ? options.mode : 'normal';\r\n const filename = isString(options.filename)\r\n ? options.filename\r\n : 'message.intl';\r\n const sourceMap = !!options.sourceMap;\r\n // prettier-ignore\r\n const breakLineCode = options.breakLineCode != null\r\n ? options.breakLineCode\r\n : mode === 'arrow'\r\n ? ';'\r\n : '\\n';\r\n const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';\r\n const helpers = ast.helpers || [];\r\n const generator = createCodeGenerator(ast, {\r\n mode,\r\n filename,\r\n sourceMap,\r\n breakLineCode,\r\n needIndent\r\n });\r\n generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);\r\n generator.indent(needIndent);\r\n if (helpers.length > 0) {\r\n generator.push(`const { ${helpers.map(s => `${s}: _${s}`).join(', ')} } = ctx`);\r\n generator.newline();\r\n }\r\n generator.push(`return `);\r\n generateNode(generator, ast);\r\n generator.deindent(needIndent);\r\n generator.push(`}`);\r\n const { code, map } = generator.context();\r\n return {\r\n ast,\r\n code,\r\n map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any\r\n };\r\n};\n\nfunction baseCompile(source, options = {}) {\r\n const assignedOptions = assign({}, options);\r\n // parse source codes\r\n const parser = createParser(assignedOptions);\r\n const ast = parser.parse(source);\r\n // transform ASTs\r\n transform(ast, assignedOptions);\r\n // generate javascript codes\r\n return generate(ast, assignedOptions);\r\n}\n\nexport { CompileErrorCodes, ERROR_DOMAIN, LocationStub, baseCompile, createCompileError, createLocation, createParser, createPosition, defaultOnError, errorMessages };\n","/*!\n * core-base v9.2.2\n * (c) 2022 kazuya kawaguchi\n * Released under the MIT License.\n */\nimport { isObject, isString, isFunction, isNumber, isPlainObject, toDisplayString, isArray, format, isBoolean, assign, isRegExp, warn, escapeHtml, inBrowser, mark, measure, isEmptyObject, generateCodeFrame, generateFormatCacheKey, isDate, getGlobalThis } from '@intlify/shared';\nimport { defaultOnError, baseCompile, CompileErrorCodes, createCompileError } from '@intlify/message-compiler';\nexport { CompileErrorCodes, createCompileError } from '@intlify/message-compiler';\nimport { IntlifyDevToolsHooks } from '@intlify/devtools-if';\n\nconst pathStateMachine = [];\r\npathStateMachine[0 /* BEFORE_PATH */] = {\r\n [\"w\" /* WORKSPACE */]: [0 /* BEFORE_PATH */],\r\n [\"i\" /* IDENT */]: [3 /* IN_IDENT */, 0 /* APPEND */],\r\n [\"[\" /* LEFT_BRACKET */]: [4 /* IN_SUB_PATH */],\r\n [\"o\" /* END_OF_FAIL */]: [7 /* AFTER_PATH */]\r\n};\r\npathStateMachine[1 /* IN_PATH */] = {\r\n [\"w\" /* WORKSPACE */]: [1 /* IN_PATH */],\r\n [\".\" /* DOT */]: [2 /* BEFORE_IDENT */],\r\n [\"[\" /* LEFT_BRACKET */]: [4 /* IN_SUB_PATH */],\r\n [\"o\" /* END_OF_FAIL */]: [7 /* AFTER_PATH */]\r\n};\r\npathStateMachine[2 /* BEFORE_IDENT */] = {\r\n [\"w\" /* WORKSPACE */]: [2 /* BEFORE_IDENT */],\r\n [\"i\" /* IDENT */]: [3 /* IN_IDENT */, 0 /* APPEND */],\r\n [\"0\" /* ZERO */]: [3 /* IN_IDENT */, 0 /* APPEND */]\r\n};\r\npathStateMachine[3 /* IN_IDENT */] = {\r\n [\"i\" /* IDENT */]: [3 /* IN_IDENT */, 0 /* APPEND */],\r\n [\"0\" /* ZERO */]: [3 /* IN_IDENT */, 0 /* APPEND */],\r\n [\"w\" /* WORKSPACE */]: [1 /* IN_PATH */, 1 /* PUSH */],\r\n [\".\" /* DOT */]: [2 /* BEFORE_IDENT */, 1 /* PUSH */],\r\n [\"[\" /* LEFT_BRACKET */]: [4 /* IN_SUB_PATH */, 1 /* PUSH */],\r\n [\"o\" /* END_OF_FAIL */]: [7 /* AFTER_PATH */, 1 /* PUSH */]\r\n};\r\npathStateMachine[4 /* IN_SUB_PATH */] = {\r\n [\"'\" /* SINGLE_QUOTE */]: [5 /* IN_SINGLE_QUOTE */, 0 /* APPEND */],\r\n [\"\\\"\" /* DOUBLE_QUOTE */]: [6 /* IN_DOUBLE_QUOTE */, 0 /* APPEND */],\r\n [\"[\" /* LEFT_BRACKET */]: [\r\n 4 /* IN_SUB_PATH */,\r\n 2 /* INC_SUB_PATH_DEPTH */\r\n ],\r\n [\"]\" /* RIGHT_BRACKET */]: [1 /* IN_PATH */, 3 /* PUSH_SUB_PATH */],\r\n [\"o\" /* END_OF_FAIL */]: 8 /* ERROR */,\r\n [\"l\" /* ELSE */]: [4 /* IN_SUB_PATH */, 0 /* APPEND */]\r\n};\r\npathStateMachine[5 /* IN_SINGLE_QUOTE */] = {\r\n [\"'\" /* SINGLE_QUOTE */]: [4 /* IN_SUB_PATH */, 0 /* APPEND */],\r\n [\"o\" /* END_OF_FAIL */]: 8 /* ERROR */,\r\n [\"l\" /* ELSE */]: [5 /* IN_SINGLE_QUOTE */, 0 /* APPEND */]\r\n};\r\npathStateMachine[6 /* IN_DOUBLE_QUOTE */] = {\r\n [\"\\\"\" /* DOUBLE_QUOTE */]: [4 /* IN_SUB_PATH */, 0 /* APPEND */],\r\n [\"o\" /* END_OF_FAIL */]: 8 /* ERROR */,\r\n [\"l\" /* ELSE */]: [6 /* IN_DOUBLE_QUOTE */, 0 /* APPEND */]\r\n};\r\n/**\r\n * Check if an expression is a literal value.\r\n */\r\nconst literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\r\nfunction isLiteral(exp) {\r\n return literalValueRE.test(exp);\r\n}\r\n/**\r\n * Strip quotes from a string\r\n */\r\nfunction stripQuotes(str) {\r\n const a = str.charCodeAt(0);\r\n const b = str.charCodeAt(str.length - 1);\r\n return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;\r\n}\r\n/**\r\n * Determine the type of a character in a keypath.\r\n */\r\nfunction getPathCharType(ch) {\r\n if (ch === undefined || ch === null) {\r\n return \"o\" /* END_OF_FAIL */;\r\n }\r\n const code = ch.charCodeAt(0);\r\n switch (code) {\r\n case 0x5b: // [\r\n case 0x5d: // ]\r\n case 0x2e: // .\r\n case 0x22: // \"\r\n case 0x27: // '\r\n return ch;\r\n case 0x5f: // _\r\n case 0x24: // $\r\n case 0x2d: // -\r\n return \"i\" /* IDENT */;\r\n case 0x09: // Tab (HT)\r\n case 0x0a: // Newline (LF)\r\n case 0x0d: // Return (CR)\r\n case 0xa0: // No-break space (NBSP)\r\n case 0xfeff: // Byte Order Mark (BOM)\r\n case 0x2028: // Line Separator (LS)\r\n case 0x2029: // Paragraph Separator (PS)\r\n return \"w\" /* WORKSPACE */;\r\n }\r\n return \"i\" /* IDENT */;\r\n}\r\n/**\r\n * Format a subPath, return its plain form if it is\r\n * a literal string or number. Otherwise prepend the\r\n * dynamic indicator (*).\r\n */\r\nfunction formatSubPath(path) {\r\n const trimmed = path.trim();\r\n // invalid leading 0\r\n if (path.charAt(0) === '0' && isNaN(parseInt(path))) {\r\n return false;\r\n }\r\n return isLiteral(trimmed)\r\n ? stripQuotes(trimmed)\r\n : \"*\" /* ASTARISK */ + trimmed;\r\n}\r\n/**\r\n * Parse a string path into an array of segments\r\n */\r\nfunction parse(path) {\r\n const keys = [];\r\n let index = -1;\r\n let mode = 0 /* BEFORE_PATH */;\r\n let subPathDepth = 0;\r\n let c;\r\n let key; // eslint-disable-line\r\n let newChar;\r\n let type;\r\n let transition;\r\n let action;\r\n let typeMap;\r\n const actions = [];\r\n actions[0 /* APPEND */] = () => {\r\n if (key === undefined) {\r\n key = newChar;\r\n }\r\n else {\r\n key += newChar;\r\n }\r\n };\r\n actions[1 /* PUSH */] = () => {\r\n if (key !== undefined) {\r\n keys.push(key);\r\n key = undefined;\r\n }\r\n };\r\n actions[2 /* INC_SUB_PATH_DEPTH */] = () => {\r\n actions[0 /* APPEND */]();\r\n subPathDepth++;\r\n };\r\n actions[3 /* PUSH_SUB_PATH */] = () => {\r\n if (subPathDepth > 0) {\r\n subPathDepth--;\r\n mode = 4 /* IN_SUB_PATH */;\r\n actions[0 /* APPEND */]();\r\n }\r\n else {\r\n subPathDepth = 0;\r\n if (key === undefined) {\r\n return false;\r\n }\r\n key = formatSubPath(key);\r\n if (key === false) {\r\n return false;\r\n }\r\n else {\r\n actions[1 /* PUSH */]();\r\n }\r\n }\r\n };\r\n function maybeUnescapeQuote() {\r\n const nextChar = path[index + 1];\r\n if ((mode === 5 /* IN_SINGLE_QUOTE */ &&\r\n nextChar === \"'\" /* SINGLE_QUOTE */) ||\r\n (mode === 6 /* IN_DOUBLE_QUOTE */ &&\r\n nextChar === \"\\\"\" /* DOUBLE_QUOTE */)) {\r\n index++;\r\n newChar = '\\\\' + nextChar;\r\n actions[0 /* APPEND */]();\r\n return true;\r\n }\r\n }\r\n while (mode !== null) {\r\n index++;\r\n c = path[index];\r\n if (c === '\\\\' && maybeUnescapeQuote()) {\r\n continue;\r\n }\r\n type = getPathCharType(c);\r\n typeMap = pathStateMachine[mode];\r\n transition = typeMap[type] || typeMap[\"l\" /* ELSE */] || 8 /* ERROR */;\r\n // check parse error\r\n if (transition === 8 /* ERROR */) {\r\n return;\r\n }\r\n mode = transition[0];\r\n if (transition[1] !== undefined) {\r\n action = actions[transition[1]];\r\n if (action) {\r\n newChar = c;\r\n if (action() === false) {\r\n return;\r\n }\r\n }\r\n }\r\n // check parse finish\r\n if (mode === 7 /* AFTER_PATH */) {\r\n return keys;\r\n }\r\n }\r\n}\r\n// path token cache\r\nconst cache = new Map();\r\n/**\r\n * key-value message resolver\r\n *\r\n * @remarks\r\n * Resolves messages with the key-value structure. Note that messages with a hierarchical structure such as objects cannot be resolved\r\n *\r\n * @param obj - A target object to be resolved with path\r\n * @param path - A {@link Path | path} to resolve the value of message\r\n *\r\n * @returns A resolved {@link PathValue | path value}\r\n *\r\n * @VueI18nGeneral\r\n */\r\nfunction resolveWithKeyValue(obj, path) {\r\n return isObject(obj) ? obj[path] : null;\r\n}\r\n/**\r\n * message resolver\r\n *\r\n * @remarks\r\n * Resolves messages. messages with a hierarchical structure such as objects can be resolved. This resolver is used in VueI18n as default.\r\n *\r\n * @param obj - A target object to be resolved with path\r\n * @param path - A {@link Path | path} to resolve the value of message\r\n *\r\n * @returns A resolved {@link PathValue | path value}\r\n *\r\n * @VueI18nGeneral\r\n */\r\nfunction resolveValue(obj, path) {\r\n // check object\r\n if (!isObject(obj)) {\r\n return null;\r\n }\r\n // parse path\r\n let hit = cache.get(path);\r\n if (!hit) {\r\n hit = parse(path);\r\n if (hit) {\r\n cache.set(path, hit);\r\n }\r\n }\r\n // check hit\r\n if (!hit) {\r\n return null;\r\n }\r\n // resolve path value\r\n const len = hit.length;\r\n let last = obj;\r\n let i = 0;\r\n while (i < len) {\r\n const val = last[hit[i]];\r\n if (val === undefined) {\r\n return null;\r\n }\r\n last = val;\r\n i++;\r\n }\r\n return last;\r\n}\n\nconst DEFAULT_MODIFIER = (str) => str;\r\nconst DEFAULT_MESSAGE = (ctx) => ''; // eslint-disable-line\r\nconst DEFAULT_MESSAGE_DATA_TYPE = 'text';\r\nconst DEFAULT_NORMALIZE = (values) => values.length === 0 ? '' : values.join('');\r\nconst DEFAULT_INTERPOLATE = toDisplayString;\r\nfunction pluralDefault(choice, choicesLength) {\r\n choice = Math.abs(choice);\r\n if (choicesLength === 2) {\r\n // prettier-ignore\r\n return choice\r\n ? choice > 1\r\n ? 1\r\n : 0\r\n : 1;\r\n }\r\n return choice ? Math.min(choice, 2) : 0;\r\n}\r\nfunction getPluralIndex(options) {\r\n // prettier-ignore\r\n const index = isNumber(options.pluralIndex)\r\n ? options.pluralIndex\r\n : -1;\r\n // prettier-ignore\r\n return options.named && (isNumber(options.named.count) || isNumber(options.named.n))\r\n ? isNumber(options.named.count)\r\n ? options.named.count\r\n : isNumber(options.named.n)\r\n ? options.named.n\r\n : index\r\n : index;\r\n}\r\nfunction normalizeNamed(pluralIndex, props) {\r\n if (!props.count) {\r\n props.count = pluralIndex;\r\n }\r\n if (!props.n) {\r\n props.n = pluralIndex;\r\n }\r\n}\r\nfunction createMessageContext(options = {}) {\r\n const locale = options.locale;\r\n const pluralIndex = getPluralIndex(options);\r\n const pluralRule = isObject(options.pluralRules) &&\r\n isString(locale) &&\r\n isFunction(options.pluralRules[locale])\r\n ? options.pluralRules[locale]\r\n : pluralDefault;\r\n const orgPluralRule = isObject(options.pluralRules) &&\r\n isString(locale) &&\r\n isFunction(options.pluralRules[locale])\r\n ? pluralDefault\r\n : undefined;\r\n const plural = (messages) => {\r\n return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];\r\n };\r\n const _list = options.list || [];\r\n const list = (index) => _list[index];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const _named = options.named || {};\r\n isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);\r\n const named = (key) => _named[key];\r\n function message(key) {\r\n // prettier-ignore\r\n const msg = isFunction(options.messages)\r\n ? options.messages(key)\r\n : isObject(options.messages)\r\n ? options.messages[key]\r\n : false;\r\n return !msg\r\n ? options.parent\r\n ? options.parent.message(key) // resolve from parent messages\r\n : DEFAULT_MESSAGE\r\n : msg;\r\n }\r\n const _modifier = (name) => options.modifiers\r\n ? options.modifiers[name]\r\n : DEFAULT_MODIFIER;\r\n const normalize = isPlainObject(options.processor) && isFunction(options.processor.normalize)\r\n ? options.processor.normalize\r\n : DEFAULT_NORMALIZE;\r\n const interpolate = isPlainObject(options.processor) &&\r\n isFunction(options.processor.interpolate)\r\n ? options.processor.interpolate\r\n : DEFAULT_INTERPOLATE;\r\n const type = isPlainObject(options.processor) && isString(options.processor.type)\r\n ? options.processor.type\r\n : DEFAULT_MESSAGE_DATA_TYPE;\r\n const linked = (key, ...args) => {\r\n const [arg1, arg2] = args;\r\n let type = 'text';\r\n let modifier = '';\r\n if (args.length === 1) {\r\n if (isObject(arg1)) {\r\n modifier = arg1.modifier || modifier;\r\n type = arg1.type || type;\r\n }\r\n else if (isString(arg1)) {\r\n modifier = arg1 || modifier;\r\n }\r\n }\r\n else if (args.length === 2) {\r\n if (isString(arg1)) {\r\n modifier = arg1 || modifier;\r\n }\r\n if (isString(arg2)) {\r\n type = arg2 || type;\r\n }\r\n }\r\n let msg = message(key)(ctx);\r\n // The message in vnode resolved with linked are returned as an array by processor.nomalize\r\n if (type === 'vnode' && isArray(msg) && modifier) {\r\n msg = msg[0];\r\n }\r\n return modifier ? _modifier(modifier)(msg, type) : msg;\r\n };\r\n const ctx = {\r\n [\"list\" /* LIST */]: list,\r\n [\"named\" /* NAMED */]: named,\r\n [\"plural\" /* PLURAL */]: plural,\r\n [\"linked\" /* LINKED */]: linked,\r\n [\"message\" /* MESSAGE */]: message,\r\n [\"type\" /* TYPE */]: type,\r\n [\"interpolate\" /* INTERPOLATE */]: interpolate,\r\n [\"normalize\" /* NORMALIZE */]: normalize\r\n };\r\n return ctx;\r\n}\n\nlet devtools = null;\r\nfunction setDevToolsHook(hook) {\r\n devtools = hook;\r\n}\r\nfunction getDevToolsHook() {\r\n return devtools;\r\n}\r\nfunction initI18nDevTools(i18n, version, meta) {\r\n // TODO: queue if devtools is undefined\r\n devtools &&\r\n devtools.emit(IntlifyDevToolsHooks.I18nInit, {\r\n timestamp: Date.now(),\r\n i18n,\r\n version,\r\n meta\r\n });\r\n}\r\nconst translateDevTools = /* #__PURE__*/ createDevToolsHook(IntlifyDevToolsHooks.FunctionTranslate);\r\nfunction createDevToolsHook(hook) {\r\n return (payloads) => devtools && devtools.emit(hook, payloads);\r\n}\n\nconst CoreWarnCodes = {\r\n NOT_FOUND_KEY: 1,\r\n FALLBACK_TO_TRANSLATE: 2,\r\n CANNOT_FORMAT_NUMBER: 3,\r\n FALLBACK_TO_NUMBER_FORMAT: 4,\r\n CANNOT_FORMAT_DATE: 5,\r\n FALLBACK_TO_DATE_FORMAT: 6,\r\n __EXTEND_POINT__: 7\r\n};\r\n/** @internal */\r\nconst warnMessages = {\r\n [CoreWarnCodes.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale messages.`,\r\n [CoreWarnCodes.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,\r\n [CoreWarnCodes.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,\r\n [CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,\r\n [CoreWarnCodes.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,\r\n [CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`\r\n};\r\nfunction getWarnMessage(code, ...args) {\r\n return format(warnMessages[code], ...args);\r\n}\n\n/**\r\n * Fallback with simple implemenation\r\n *\r\n * @remarks\r\n * A fallback locale function implemented with a simple fallback algorithm.\r\n *\r\n * Basically, it returns the value as specified in the `fallbackLocale` props, and is processed with the fallback inside intlify.\r\n *\r\n * @param ctx - A {@link CoreContext | context}\r\n * @param fallback - A {@link FallbackLocale | fallback locale}\r\n * @param start - A starting {@link Locale | locale}\r\n *\r\n * @returns Fallback locales\r\n *\r\n * @VueI18nGeneral\r\n */\r\nfunction fallbackWithSimple(ctx, fallback, start // eslint-disable-line @typescript-eslint/no-unused-vars\r\n) {\r\n // prettier-ignore\r\n return [...new Set([\r\n start,\r\n ...(isArray(fallback)\r\n ? fallback\r\n : isObject(fallback)\r\n ? Object.keys(fallback)\r\n : isString(fallback)\r\n ? [fallback]\r\n : [start])\r\n ])];\r\n}\r\n/**\r\n * Fallback with locale chain\r\n *\r\n * @remarks\r\n * A fallback locale function implemented with a fallback chain algorithm. It's used in VueI18n as default.\r\n *\r\n * @param ctx - A {@link CoreContext | context}\r\n * @param fallback - A {@link FallbackLocale | fallback locale}\r\n * @param start - A starting {@link Locale | locale}\r\n *\r\n * @returns Fallback locales\r\n *\r\n * @VueI18nSee [Fallbacking](../guide/essentials/fallback)\r\n *\r\n * @VueI18nGeneral\r\n */\r\nfunction fallbackWithLocaleChain(ctx, fallback, start) {\r\n const startLocale = isString(start) ? start : DEFAULT_LOCALE;\r\n const context = ctx;\r\n if (!context.__localeChainCache) {\r\n context.__localeChainCache = new Map();\r\n }\r\n let chain = context.__localeChainCache.get(startLocale);\r\n if (!chain) {\r\n chain = [];\r\n // first block defined by start\r\n let block = [start];\r\n // while any intervening block found\r\n while (isArray(block)) {\r\n block = appendBlockToChain(chain, block, fallback);\r\n }\r\n // prettier-ignore\r\n // last block defined by default\r\n const defaults = isArray(fallback) || !isPlainObject(fallback)\r\n ? fallback\r\n : fallback['default']\r\n ? fallback['default']\r\n : null;\r\n // convert defaults to array\r\n block = isString(defaults) ? [defaults] : defaults;\r\n if (isArray(block)) {\r\n appendBlockToChain(chain, block, false);\r\n }\r\n context.__localeChainCache.set(startLocale, chain);\r\n }\r\n return chain;\r\n}\r\nfunction appendBlockToChain(chain, block, blocks) {\r\n let follow = true;\r\n for (let i = 0; i < block.length && isBoolean(follow); i++) {\r\n const locale = block[i];\r\n if (isString(locale)) {\r\n follow = appendLocaleToChain(chain, block[i], blocks);\r\n }\r\n }\r\n return follow;\r\n}\r\nfunction appendLocaleToChain(chain, locale, blocks) {\r\n let follow;\r\n const tokens = locale.split('-');\r\n do {\r\n const target = tokens.join('-');\r\n follow = appendItemToChain(chain, target, blocks);\r\n tokens.splice(-1, 1);\r\n } while (tokens.length && follow === true);\r\n return follow;\r\n}\r\nfunction appendItemToChain(chain, target, blocks) {\r\n let follow = false;\r\n if (!chain.includes(target)) {\r\n follow = true;\r\n if (target) {\r\n follow = target[target.length - 1] !== '!';\r\n const locale = target.replace(/!/g, '');\r\n chain.push(locale);\r\n if ((isArray(blocks) || isPlainObject(blocks)) &&\r\n blocks[locale] // eslint-disable-line @typescript-eslint/no-explicit-any\r\n ) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n follow = blocks[locale];\r\n }\r\n }\r\n }\r\n return follow;\r\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\r\n/**\r\n * Intlify core-base version\r\n * @internal\r\n */\r\nconst VERSION = '9.2.2';\r\nconst NOT_REOSLVED = -1;\r\nconst DEFAULT_LOCALE = 'en-US';\r\nconst MISSING_RESOLVE_VALUE = '';\r\nconst capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`;\r\nfunction getDefaultLinkedModifiers() {\r\n return {\r\n upper: (val, type) => {\r\n // prettier-ignore\r\n return type === 'text' && isString(val)\r\n ? val.toUpperCase()\r\n : type === 'vnode' && isObject(val) && '__v_isVNode' in val\r\n ? val.children.toUpperCase()\r\n : val;\r\n },\r\n lower: (val, type) => {\r\n // prettier-ignore\r\n return type === 'text' && isString(val)\r\n ? val.toLowerCase()\r\n : type === 'vnode' && isObject(val) && '__v_isVNode' in val\r\n ? val.children.toLowerCase()\r\n : val;\r\n },\r\n capitalize: (val, type) => {\r\n // prettier-ignore\r\n return (type === 'text' && isString(val)\r\n ? capitalize(val)\r\n : type === 'vnode' && isObject(val) && '__v_isVNode' in val\r\n ? capitalize(val.children)\r\n : val);\r\n }\r\n };\r\n}\r\nlet _compiler;\r\nfunction registerMessageCompiler(compiler) {\r\n _compiler = compiler;\r\n}\r\nlet _resolver;\r\n/**\r\n * Register the message resolver\r\n *\r\n * @param resolver - A {@link MessageResolver} function\r\n *\r\n * @VueI18nGeneral\r\n */\r\nfunction registerMessageResolver(resolver) {\r\n _resolver = resolver;\r\n}\r\nlet _fallbacker;\r\n/**\r\n * Register the locale fallbacker\r\n *\r\n * @param fallbacker - A {@link LocaleFallbacker} function\r\n *\r\n * @VueI18nGeneral\r\n */\r\nfunction registerLocaleFallbacker(fallbacker) {\r\n _fallbacker = fallbacker;\r\n}\r\n// Additional Meta for Intlify DevTools\r\nlet _additionalMeta = null;\r\nconst setAdditionalMeta = (meta) => {\r\n _additionalMeta = meta;\r\n};\r\nconst getAdditionalMeta = () => _additionalMeta;\r\nlet _fallbackContext = null;\r\nconst setFallbackContext = (context) => {\r\n _fallbackContext = context;\r\n};\r\nconst getFallbackContext = () => _fallbackContext;\r\n// ID for CoreContext\r\nlet _cid = 0;\r\nfunction createCoreContext(options = {}) {\r\n // setup options\r\n const version = isString(options.version) ? options.version : VERSION;\r\n const locale = isString(options.locale) ? options.locale : DEFAULT_LOCALE;\r\n const fallbackLocale = isArray(options.fallbackLocale) ||\r\n isPlainObject(options.fallbackLocale) ||\r\n isString(options.fallbackLocale) ||\r\n options.fallbackLocale === false\r\n ? options.fallbackLocale\r\n : locale;\r\n const messages = isPlainObject(options.messages)\r\n ? options.messages\r\n : { [locale]: {} };\r\n const datetimeFormats = isPlainObject(options.datetimeFormats)\r\n ? options.datetimeFormats\r\n : { [locale]: {} }\r\n ;\r\n const numberFormats = isPlainObject(options.numberFormats)\r\n ? options.numberFormats\r\n : { [locale]: {} }\r\n ;\r\n const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers());\r\n const pluralRules = options.pluralRules || {};\r\n const missing = isFunction(options.missing) ? options.missing : null;\r\n const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn)\r\n ? options.missingWarn\r\n : true;\r\n const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)\r\n ? options.fallbackWarn\r\n : true;\r\n const fallbackFormat = !!options.fallbackFormat;\r\n const unresolving = !!options.unresolving;\r\n const postTranslation = isFunction(options.postTranslation)\r\n ? options.postTranslation\r\n : null;\r\n const processor = isPlainObject(options.processor) ? options.processor : null;\r\n const warnHtmlMessage = isBoolean(options.warnHtmlMessage)\r\n ? options.warnHtmlMessage\r\n : true;\r\n const escapeParameter = !!options.escapeParameter;\r\n const messageCompiler = isFunction(options.messageCompiler)\r\n ? options.messageCompiler\r\n : _compiler;\r\n const messageResolver = isFunction(options.messageResolver)\r\n ? options.messageResolver\r\n : _resolver || resolveWithKeyValue;\r\n const localeFallbacker = isFunction(options.localeFallbacker)\r\n ? options.localeFallbacker\r\n : _fallbacker || fallbackWithSimple;\r\n const fallbackContext = isObject(options.fallbackContext)\r\n ? options.fallbackContext\r\n : undefined;\r\n const onWarn = isFunction(options.onWarn) ? options.onWarn : warn;\r\n // setup internal options\r\n const internalOptions = options;\r\n const __datetimeFormatters = isObject(internalOptions.__datetimeFormatters)\r\n ? internalOptions.__datetimeFormatters\r\n : new Map()\r\n ;\r\n const __numberFormatters = isObject(internalOptions.__numberFormatters)\r\n ? internalOptions.__numberFormatters\r\n : new Map()\r\n ;\r\n const __meta = isObject(internalOptions.__meta) ? internalOptions.__meta : {};\r\n _cid++;\r\n const context = {\r\n version,\r\n cid: _cid,\r\n locale,\r\n fallbackLocale,\r\n messages,\r\n modifiers,\r\n pluralRules,\r\n missing,\r\n missingWarn,\r\n fallbackWarn,\r\n fallbackFormat,\r\n unresolving,\r\n postTranslation,\r\n processor,\r\n warnHtmlMessage,\r\n escapeParameter,\r\n messageCompiler,\r\n messageResolver,\r\n localeFallbacker,\r\n fallbackContext,\r\n onWarn,\r\n __meta\r\n };\r\n {\r\n context.datetimeFormats = datetimeFormats;\r\n context.numberFormats = numberFormats;\r\n context.__datetimeFormatters = __datetimeFormatters;\r\n context.__numberFormatters = __numberFormatters;\r\n }\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n context.__v_emitter =\r\n internalOptions.__v_emitter != null\r\n ? internalOptions.__v_emitter\r\n : undefined;\r\n }\r\n // NOTE: experimental !!\r\n if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\r\n initI18nDevTools(context, version, __meta);\r\n }\r\n return context;\r\n}\r\n/** @internal */\r\nfunction isTranslateFallbackWarn(fallback, key) {\r\n return fallback instanceof RegExp ? fallback.test(key) : fallback;\r\n}\r\n/** @internal */\r\nfunction isTranslateMissingWarn(missing, key) {\r\n return missing instanceof RegExp ? missing.test(key) : missing;\r\n}\r\n/** @internal */\r\nfunction handleMissing(context, key, locale, missingWarn, type) {\r\n const { missing, onWarn } = context;\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const emitter = context.__v_emitter;\r\n if (emitter) {\r\n emitter.emit(\"missing\" /* MISSING */, {\r\n locale,\r\n key,\r\n type,\r\n groupId: `${type}:${key}`\r\n });\r\n }\r\n }\r\n if (missing !== null) {\r\n const ret = missing(context, locale, key, type);\r\n return isString(ret) ? ret : key;\r\n }\r\n else {\r\n if ((process.env.NODE_ENV !== 'production') && isTranslateMissingWarn(missingWarn, key)) {\r\n onWarn(getWarnMessage(CoreWarnCodes.NOT_FOUND_KEY, { key, locale }));\r\n }\r\n return key;\r\n }\r\n}\r\n/** @internal */\r\nfunction updateFallbackLocale(ctx, locale, fallback) {\r\n const context = ctx;\r\n context.__localeChainCache = new Map();\r\n ctx.localeFallbacker(ctx, fallback, locale);\r\n}\r\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nconst RE_HTML_TAG = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\r\nconst WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;\r\nfunction checkHtmlMessage(source, options) {\r\n const warnHtmlMessage = isBoolean(options.warnHtmlMessage)\r\n ? options.warnHtmlMessage\r\n : true;\r\n if (warnHtmlMessage && RE_HTML_TAG.test(source)) {\r\n warn(format(WARN_MESSAGE, { source }));\r\n }\r\n}\r\nconst defaultOnCacheKey = (source) => source;\r\nlet compileCache = Object.create(null);\r\nfunction clearCompileCache() {\r\n compileCache = Object.create(null);\r\n}\r\nfunction compileToFunction(source, options = {}) {\r\n {\r\n // check HTML message\r\n (process.env.NODE_ENV !== 'production') && checkHtmlMessage(source, options);\r\n // check caches\r\n const onCacheKey = options.onCacheKey || defaultOnCacheKey;\r\n const key = onCacheKey(source);\r\n const cached = compileCache[key];\r\n if (cached) {\r\n return cached;\r\n }\r\n // compile error detecting\r\n let occurred = false;\r\n const onError = options.onError || defaultOnError;\r\n options.onError = (err) => {\r\n occurred = true;\r\n onError(err);\r\n };\r\n // compile\r\n const { code } = baseCompile(source, options);\r\n // evaluate function\r\n const msg = new Function(`return ${code}`)();\r\n // if occurred compile error, don't cache\r\n return !occurred ? (compileCache[key] = msg) : msg;\r\n }\r\n}\n\nlet code = CompileErrorCodes.__EXTEND_POINT__;\r\nconst inc = () => ++code;\r\nconst CoreErrorCodes = {\r\n INVALID_ARGUMENT: code,\r\n INVALID_DATE_ARGUMENT: inc(),\r\n INVALID_ISO_DATE_ARGUMENT: inc(),\r\n __EXTEND_POINT__: inc() // 18\r\n};\r\nfunction createCoreError(code) {\r\n return createCompileError(code, null, (process.env.NODE_ENV !== 'production') ? { messages: errorMessages } : undefined);\r\n}\r\n/** @internal */\r\nconst errorMessages = {\r\n [CoreErrorCodes.INVALID_ARGUMENT]: 'Invalid arguments',\r\n [CoreErrorCodes.INVALID_DATE_ARGUMENT]: 'The date provided is an invalid Date object.' +\r\n 'Make sure your Date represents a valid date.',\r\n [CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: 'The argument provided is not a valid ISO date string'\r\n};\n\nconst NOOP_MESSAGE_FUNCTION = () => '';\r\nconst isMessageFunction = (val) => isFunction(val);\r\n// implementation of `translate` function\r\nfunction translate(context, ...args) {\r\n const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;\r\n const [key, options] = parseTranslateArgs(...args);\r\n const missingWarn = isBoolean(options.missingWarn)\r\n ? options.missingWarn\r\n : context.missingWarn;\r\n const fallbackWarn = isBoolean(options.fallbackWarn)\r\n ? options.fallbackWarn\r\n : context.fallbackWarn;\r\n const escapeParameter = isBoolean(options.escapeParameter)\r\n ? options.escapeParameter\r\n : context.escapeParameter;\r\n const resolvedMessage = !!options.resolvedMessage;\r\n // prettier-ignore\r\n const defaultMsgOrKey = isString(options.default) || isBoolean(options.default) // default by function option\r\n ? !isBoolean(options.default)\r\n ? options.default\r\n : (!messageCompiler ? () => key : key)\r\n : fallbackFormat // default by `fallbackFormat` option\r\n ? (!messageCompiler ? () => key : key)\r\n : '';\r\n const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== '';\r\n const locale = isString(options.locale) ? options.locale : context.locale;\r\n // escape params\r\n escapeParameter && escapeParams(options);\r\n // resolve message format\r\n // eslint-disable-next-line prefer-const\r\n let [formatScope, targetLocale, message] = !resolvedMessage\r\n ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn)\r\n : [\r\n key,\r\n locale,\r\n messages[locale] || {}\r\n ];\r\n // NOTE:\r\n // Fix to work around `ssrTransfrom` bug in Vite.\r\n // https://github.com/vitejs/vite/issues/4306\r\n // To get around this, use temporary variables.\r\n // https://github.com/nuxt/framework/issues/1461#issuecomment-954606243\r\n let format = formatScope;\r\n // if you use default message, set it as message format!\r\n let cacheBaseKey = key;\r\n if (!resolvedMessage &&\r\n !(isString(format) || isMessageFunction(format))) {\r\n if (enableDefaultMsg) {\r\n format = defaultMsgOrKey;\r\n cacheBaseKey = format;\r\n }\r\n }\r\n // checking message format and target locale\r\n if (!resolvedMessage &&\r\n (!(isString(format) || isMessageFunction(format)) ||\r\n !isString(targetLocale))) {\r\n return unresolving ? NOT_REOSLVED : key;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && isString(format) && context.messageCompiler == null) {\r\n warn(`The message format compilation is not supported in this build. ` +\r\n `Because message compiler isn't included. ` +\r\n `You need to pre-compilation all message format. ` +\r\n `So translate function return '${key}'.`);\r\n return key;\r\n }\r\n // setup compile error detecting\r\n let occurred = false;\r\n const errorDetector = () => {\r\n occurred = true;\r\n };\r\n // compile message format\r\n const msg = !isMessageFunction(format)\r\n ? compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, errorDetector)\r\n : format;\r\n // if occurred compile error, return the message format\r\n if (occurred) {\r\n return format;\r\n }\r\n // evaluate message with context\r\n const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);\r\n const msgContext = createMessageContext(ctxOptions);\r\n const messaged = evaluateMessage(context, msg, msgContext);\r\n // if use post translation option, proceed it with handler\r\n const ret = postTranslation\r\n ? postTranslation(messaged, key)\r\n : messaged;\r\n // NOTE: experimental !!\r\n if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\r\n // prettier-ignore\r\n const payloads = {\r\n timestamp: Date.now(),\r\n key: isString(key)\r\n ? key\r\n : isMessageFunction(format)\r\n ? format.key\r\n : '',\r\n locale: targetLocale || (isMessageFunction(format)\r\n ? format.locale\r\n : ''),\r\n format: isString(format)\r\n ? format\r\n : isMessageFunction(format)\r\n ? format.source\r\n : '',\r\n message: ret\r\n };\r\n payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {});\r\n translateDevTools(payloads);\r\n }\r\n return ret;\r\n}\r\nfunction escapeParams(options) {\r\n if (isArray(options.list)) {\r\n options.list = options.list.map(item => isString(item) ? escapeHtml(item) : item);\r\n }\r\n else if (isObject(options.named)) {\r\n Object.keys(options.named).forEach(key => {\r\n if (isString(options.named[key])) {\r\n options.named[key] = escapeHtml(options.named[key]);\r\n }\r\n });\r\n }\r\n}\r\nfunction resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {\r\n const { messages, onWarn, messageResolver: resolveValue, localeFallbacker } = context;\r\n const locales = localeFallbacker(context, fallbackLocale, locale); // eslint-disable-line @typescript-eslint/no-explicit-any\r\n let message = {};\r\n let targetLocale;\r\n let format = null;\r\n let from = locale;\r\n let to = null;\r\n const type = 'translate';\r\n for (let i = 0; i < locales.length; i++) {\r\n targetLocale = to = locales[i];\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n locale !== targetLocale &&\r\n isTranslateFallbackWarn(fallbackWarn, key)) {\r\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_TRANSLATE, {\r\n key,\r\n target: targetLocale\r\n }));\r\n }\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {\r\n const emitter = context.__v_emitter;\r\n if (emitter) {\r\n emitter.emit(\"fallback\" /* FALBACK */, {\r\n type,\r\n key,\r\n from,\r\n to,\r\n groupId: `${type}:${key}`\r\n });\r\n }\r\n }\r\n message =\r\n messages[targetLocale] || {};\r\n // for vue-devtools timeline event\r\n let start = null;\r\n let startTag;\r\n let endTag;\r\n if ((process.env.NODE_ENV !== 'production') && inBrowser) {\r\n start = window.performance.now();\r\n startTag = 'intlify-message-resolve-start';\r\n endTag = 'intlify-message-resolve-end';\r\n mark && mark(startTag);\r\n }\r\n if ((format = resolveValue(message, key)) === null) {\r\n // if null, resolve with object key path\r\n format = message[key]; // eslint-disable-line @typescript-eslint/no-explicit-any\r\n }\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production') && inBrowser) {\r\n const end = window.performance.now();\r\n const emitter = context.__v_emitter;\r\n if (emitter && start && format) {\r\n emitter.emit(\"message-resolve\" /* MESSAGE_RESOLVE */, {\r\n type: \"message-resolve\" /* MESSAGE_RESOLVE */,\r\n key,\r\n message: format,\r\n time: end - start,\r\n groupId: `${type}:${key}`\r\n });\r\n }\r\n if (startTag && endTag && mark && measure) {\r\n mark(endTag);\r\n measure('intlify message resolve', startTag, endTag);\r\n }\r\n }\r\n if (isString(format) || isFunction(format))\r\n break;\r\n const missingRet = handleMissing(context, // eslint-disable-line @typescript-eslint/no-explicit-any\r\n key, targetLocale, missingWarn, type);\r\n if (missingRet !== key) {\r\n format = missingRet;\r\n }\r\n from = to;\r\n }\r\n return [format, targetLocale, message];\r\n}\r\nfunction compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, errorDetector) {\r\n const { messageCompiler, warnHtmlMessage } = context;\r\n if (isMessageFunction(format)) {\r\n const msg = format;\r\n msg.locale = msg.locale || targetLocale;\r\n msg.key = msg.key || key;\r\n return msg;\r\n }\r\n if (messageCompiler == null) {\r\n const msg = (() => format);\r\n msg.locale = targetLocale;\r\n msg.key = key;\r\n return msg;\r\n }\r\n // for vue-devtools timeline event\r\n let start = null;\r\n let startTag;\r\n let endTag;\r\n if ((process.env.NODE_ENV !== 'production') && inBrowser) {\r\n start = window.performance.now();\r\n startTag = 'intlify-message-compilation-start';\r\n endTag = 'intlify-message-compilation-end';\r\n mark && mark(startTag);\r\n }\r\n const msg = messageCompiler(format, getCompileOptions(context, targetLocale, cacheBaseKey, format, warnHtmlMessage, errorDetector));\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production') && inBrowser) {\r\n const end = window.performance.now();\r\n const emitter = context.__v_emitter;\r\n if (emitter && start) {\r\n emitter.emit(\"message-compilation\" /* MESSAGE_COMPILATION */, {\r\n type: \"message-compilation\" /* MESSAGE_COMPILATION */,\r\n message: format,\r\n time: end - start,\r\n groupId: `${'translate'}:${key}`\r\n });\r\n }\r\n if (startTag && endTag && mark && measure) {\r\n mark(endTag);\r\n measure('intlify message compilation', startTag, endTag);\r\n }\r\n }\r\n msg.locale = targetLocale;\r\n msg.key = key;\r\n msg.source = format;\r\n return msg;\r\n}\r\nfunction evaluateMessage(context, msg, msgCtx) {\r\n // for vue-devtools timeline event\r\n let start = null;\r\n let startTag;\r\n let endTag;\r\n if ((process.env.NODE_ENV !== 'production') && inBrowser) {\r\n start = window.performance.now();\r\n startTag = 'intlify-message-evaluation-start';\r\n endTag = 'intlify-message-evaluation-end';\r\n mark && mark(startTag);\r\n }\r\n const messaged = msg(msgCtx);\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production') && inBrowser) {\r\n const end = window.performance.now();\r\n const emitter = context.__v_emitter;\r\n if (emitter && start) {\r\n emitter.emit(\"message-evaluation\" /* MESSAGE_EVALUATION */, {\r\n type: \"message-evaluation\" /* MESSAGE_EVALUATION */,\r\n value: messaged,\r\n time: end - start,\r\n groupId: `${'translate'}:${msg.key}`\r\n });\r\n }\r\n if (startTag && endTag && mark && measure) {\r\n mark(endTag);\r\n measure('intlify message evaluation', startTag, endTag);\r\n }\r\n }\r\n return messaged;\r\n}\r\n/** @internal */\r\nfunction parseTranslateArgs(...args) {\r\n const [arg1, arg2, arg3] = args;\r\n const options = {};\r\n if (!isString(arg1) && !isNumber(arg1) && !isMessageFunction(arg1)) {\r\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\r\n }\r\n // prettier-ignore\r\n const key = isNumber(arg1)\r\n ? String(arg1)\r\n : isMessageFunction(arg1)\r\n ? arg1\r\n : arg1;\r\n if (isNumber(arg2)) {\r\n options.plural = arg2;\r\n }\r\n else if (isString(arg2)) {\r\n options.default = arg2;\r\n }\r\n else if (isPlainObject(arg2) && !isEmptyObject(arg2)) {\r\n options.named = arg2;\r\n }\r\n else if (isArray(arg2)) {\r\n options.list = arg2;\r\n }\r\n if (isNumber(arg3)) {\r\n options.plural = arg3;\r\n }\r\n else if (isString(arg3)) {\r\n options.default = arg3;\r\n }\r\n else if (isPlainObject(arg3)) {\r\n assign(options, arg3);\r\n }\r\n return [key, options];\r\n}\r\nfunction getCompileOptions(context, locale, key, source, warnHtmlMessage, errorDetector) {\r\n return {\r\n warnHtmlMessage,\r\n onError: (err) => {\r\n errorDetector && errorDetector(err);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const message = `Message compilation error: ${err.message}`;\r\n const codeFrame = err.location &&\r\n generateCodeFrame(source, err.location.start.offset, err.location.end.offset);\r\n const emitter = context.__v_emitter;\r\n if (emitter) {\r\n emitter.emit(\"compile-error\" /* COMPILE_ERROR */, {\r\n message: source,\r\n error: err.message,\r\n start: err.location && err.location.start.offset,\r\n end: err.location && err.location.end.offset,\r\n groupId: `${'translate'}:${key}`\r\n });\r\n }\r\n console.error(codeFrame ? `${message}\\n${codeFrame}` : message);\r\n }\r\n else {\r\n throw err;\r\n }\r\n },\r\n onCacheKey: (source) => generateFormatCacheKey(locale, key, source)\r\n };\r\n}\r\nfunction getMessageContextOptions(context, locale, message, options) {\r\n const { modifiers, pluralRules, messageResolver: resolveValue, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context;\r\n const resolveMessage = (key) => {\r\n let val = resolveValue(message, key);\r\n // fallback to root context\r\n if (val == null && fallbackContext) {\r\n const [, , message] = resolveMessageFormat(fallbackContext, key, locale, fallbackLocale, fallbackWarn, missingWarn);\r\n val = resolveValue(message, key);\r\n }\r\n if (isString(val)) {\r\n let occurred = false;\r\n const errorDetector = () => {\r\n occurred = true;\r\n };\r\n const msg = compileMessageFormat(context, key, locale, val, key, errorDetector);\r\n return !occurred\r\n ? msg\r\n : NOOP_MESSAGE_FUNCTION;\r\n }\r\n else if (isMessageFunction(val)) {\r\n return val;\r\n }\r\n else {\r\n // TODO: should be implemented warning message\r\n return NOOP_MESSAGE_FUNCTION;\r\n }\r\n };\r\n const ctxOptions = {\r\n locale,\r\n modifiers,\r\n pluralRules,\r\n messages: resolveMessage\r\n };\r\n if (context.processor) {\r\n ctxOptions.processor = context.processor;\r\n }\r\n if (options.list) {\r\n ctxOptions.list = options.list;\r\n }\r\n if (options.named) {\r\n ctxOptions.named = options.named;\r\n }\r\n if (isNumber(options.plural)) {\r\n ctxOptions.pluralIndex = options.plural;\r\n }\r\n return ctxOptions;\r\n}\n\nconst intlDefined = typeof Intl !== 'undefined';\r\nconst Availabilities = {\r\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\r\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\r\n};\n\n// implementation of `datetime` function\r\nfunction datetime(context, ...args) {\r\n const { datetimeFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;\r\n const { __datetimeFormatters } = context;\r\n if ((process.env.NODE_ENV !== 'production') && !Availabilities.dateTimeFormat) {\r\n onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_DATE));\r\n return MISSING_RESOLVE_VALUE;\r\n }\r\n const [key, value, options, overrides] = parseDateTimeArgs(...args);\r\n const missingWarn = isBoolean(options.missingWarn)\r\n ? options.missingWarn\r\n : context.missingWarn;\r\n const fallbackWarn = isBoolean(options.fallbackWarn)\r\n ? options.fallbackWarn\r\n : context.fallbackWarn;\r\n const part = !!options.part;\r\n const locale = isString(options.locale) ? options.locale : context.locale;\r\n const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any\r\n fallbackLocale, locale);\r\n if (!isString(key) || key === '') {\r\n return new Intl.DateTimeFormat(locale, overrides).format(value);\r\n }\r\n // resolve format\r\n let datetimeFormat = {};\r\n let targetLocale;\r\n let format = null;\r\n let from = locale;\r\n let to = null;\r\n const type = 'datetime format';\r\n for (let i = 0; i < locales.length; i++) {\r\n targetLocale = to = locales[i];\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n locale !== targetLocale &&\r\n isTranslateFallbackWarn(fallbackWarn, key)) {\r\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_DATE_FORMAT, {\r\n key,\r\n target: targetLocale\r\n }));\r\n }\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {\r\n const emitter = context.__v_emitter;\r\n if (emitter) {\r\n emitter.emit(\"fallback\" /* FALBACK */, {\r\n type,\r\n key,\r\n from,\r\n to,\r\n groupId: `${type}:${key}`\r\n });\r\n }\r\n }\r\n datetimeFormat =\r\n datetimeFormats[targetLocale] || {};\r\n format = datetimeFormat[key];\r\n if (isPlainObject(format))\r\n break;\r\n handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\r\n from = to;\r\n }\r\n // checking format and target locale\r\n if (!isPlainObject(format) || !isString(targetLocale)) {\r\n return unresolving ? NOT_REOSLVED : key;\r\n }\r\n let id = `${targetLocale}__${key}`;\r\n if (!isEmptyObject(overrides)) {\r\n id = `${id}__${JSON.stringify(overrides)}`;\r\n }\r\n let formatter = __datetimeFormatters.get(id);\r\n if (!formatter) {\r\n formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format, overrides));\r\n __datetimeFormatters.set(id, formatter);\r\n }\r\n return !part ? formatter.format(value) : formatter.formatToParts(value);\r\n}\r\n/** @internal */\r\nconst DATETIME_FORMAT_OPTIONS_KEYS = [\r\n 'localeMatcher',\r\n 'weekday',\r\n 'era',\r\n 'year',\r\n 'month',\r\n 'day',\r\n 'hour',\r\n 'minute',\r\n 'second',\r\n 'timeZoneName',\r\n 'formatMatcher',\r\n 'hour12',\r\n 'timeZone',\r\n 'dateStyle',\r\n 'timeStyle',\r\n 'calendar',\r\n 'dayPeriod',\r\n 'numberingSystem',\r\n 'hourCycle',\r\n 'fractionalSecondDigits'\r\n];\r\n/** @internal */\r\nfunction parseDateTimeArgs(...args) {\r\n const [arg1, arg2, arg3, arg4] = args;\r\n const options = {};\r\n let overrides = {};\r\n let value;\r\n if (isString(arg1)) {\r\n // Only allow ISO strings - other date formats are often supported,\r\n // but may cause different results in different browsers.\r\n const matches = arg1.match(/(\\d{4}-\\d{2}-\\d{2})(T|\\s)?(.*)/);\r\n if (!matches) {\r\n throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\r\n }\r\n // Some browsers can not parse the iso datetime separated by space,\r\n // this is a compromise solution by replace the 'T'/' ' with 'T'\r\n const dateTime = matches[3]\r\n ? matches[3].trim().startsWith('T')\r\n ? `${matches[1].trim()}${matches[3].trim()}`\r\n : `${matches[1].trim()}T${matches[3].trim()}`\r\n : matches[1].trim();\r\n value = new Date(dateTime);\r\n try {\r\n // This will fail if the date is not valid\r\n value.toISOString();\r\n }\r\n catch (e) {\r\n throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\r\n }\r\n }\r\n else if (isDate(arg1)) {\r\n if (isNaN(arg1.getTime())) {\r\n throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);\r\n }\r\n value = arg1;\r\n }\r\n else if (isNumber(arg1)) {\r\n value = arg1;\r\n }\r\n else {\r\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\r\n }\r\n if (isString(arg2)) {\r\n options.key = arg2;\r\n }\r\n else if (isPlainObject(arg2)) {\r\n Object.keys(arg2).forEach(key => {\r\n if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {\r\n overrides[key] = arg2[key];\r\n }\r\n else {\r\n options[key] = arg2[key];\r\n }\r\n });\r\n }\r\n if (isString(arg3)) {\r\n options.locale = arg3;\r\n }\r\n else if (isPlainObject(arg3)) {\r\n overrides = arg3;\r\n }\r\n if (isPlainObject(arg4)) {\r\n overrides = arg4;\r\n }\r\n return [options.key || '', value, options, overrides];\r\n}\r\n/** @internal */\r\nfunction clearDateTimeFormat(ctx, locale, format) {\r\n const context = ctx;\r\n for (const key in format) {\r\n const id = `${locale}__${key}`;\r\n if (!context.__datetimeFormatters.has(id)) {\r\n continue;\r\n }\r\n context.__datetimeFormatters.delete(id);\r\n }\r\n}\n\n// implementation of `number` function\r\nfunction number(context, ...args) {\r\n const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;\r\n const { __numberFormatters } = context;\r\n if ((process.env.NODE_ENV !== 'production') && !Availabilities.numberFormat) {\r\n onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_NUMBER));\r\n return MISSING_RESOLVE_VALUE;\r\n }\r\n const [key, value, options, overrides] = parseNumberArgs(...args);\r\n const missingWarn = isBoolean(options.missingWarn)\r\n ? options.missingWarn\r\n : context.missingWarn;\r\n const fallbackWarn = isBoolean(options.fallbackWarn)\r\n ? options.fallbackWarn\r\n : context.fallbackWarn;\r\n const part = !!options.part;\r\n const locale = isString(options.locale) ? options.locale : context.locale;\r\n const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any\r\n fallbackLocale, locale);\r\n if (!isString(key) || key === '') {\r\n return new Intl.NumberFormat(locale, overrides).format(value);\r\n }\r\n // resolve format\r\n let numberFormat = {};\r\n let targetLocale;\r\n let format = null;\r\n let from = locale;\r\n let to = null;\r\n const type = 'number format';\r\n for (let i = 0; i < locales.length; i++) {\r\n targetLocale = to = locales[i];\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n locale !== targetLocale &&\r\n isTranslateFallbackWarn(fallbackWarn, key)) {\r\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT, {\r\n key,\r\n target: targetLocale\r\n }));\r\n }\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {\r\n const emitter = context.__v_emitter;\r\n if (emitter) {\r\n emitter.emit(\"fallback\" /* FALBACK */, {\r\n type,\r\n key,\r\n from,\r\n to,\r\n groupId: `${type}:${key}`\r\n });\r\n }\r\n }\r\n numberFormat =\r\n numberFormats[targetLocale] || {};\r\n format = numberFormat[key];\r\n if (isPlainObject(format))\r\n break;\r\n handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\r\n from = to;\r\n }\r\n // checking format and target locale\r\n if (!isPlainObject(format) || !isString(targetLocale)) {\r\n return unresolving ? NOT_REOSLVED : key;\r\n }\r\n let id = `${targetLocale}__${key}`;\r\n if (!isEmptyObject(overrides)) {\r\n id = `${id}__${JSON.stringify(overrides)}`;\r\n }\r\n let formatter = __numberFormatters.get(id);\r\n if (!formatter) {\r\n formatter = new Intl.NumberFormat(targetLocale, assign({}, format, overrides));\r\n __numberFormatters.set(id, formatter);\r\n }\r\n return !part ? formatter.format(value) : formatter.formatToParts(value);\r\n}\r\n/** @internal */\r\nconst NUMBER_FORMAT_OPTIONS_KEYS = [\r\n 'localeMatcher',\r\n 'style',\r\n 'currency',\r\n 'currencyDisplay',\r\n 'currencySign',\r\n 'useGrouping',\r\n 'minimumIntegerDigits',\r\n 'minimumFractionDigits',\r\n 'maximumFractionDigits',\r\n 'minimumSignificantDigits',\r\n 'maximumSignificantDigits',\r\n 'compactDisplay',\r\n 'notation',\r\n 'signDisplay',\r\n 'unit',\r\n 'unitDisplay',\r\n 'roundingMode',\r\n 'roundingPriority',\r\n 'roundingIncrement',\r\n 'trailingZeroDisplay'\r\n];\r\n/** @internal */\r\nfunction parseNumberArgs(...args) {\r\n const [arg1, arg2, arg3, arg4] = args;\r\n const options = {};\r\n let overrides = {};\r\n if (!isNumber(arg1)) {\r\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\r\n }\r\n const value = arg1;\r\n if (isString(arg2)) {\r\n options.key = arg2;\r\n }\r\n else if (isPlainObject(arg2)) {\r\n Object.keys(arg2).forEach(key => {\r\n if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {\r\n overrides[key] = arg2[key];\r\n }\r\n else {\r\n options[key] = arg2[key];\r\n }\r\n });\r\n }\r\n if (isString(arg3)) {\r\n options.locale = arg3;\r\n }\r\n else if (isPlainObject(arg3)) {\r\n overrides = arg3;\r\n }\r\n if (isPlainObject(arg4)) {\r\n overrides = arg4;\r\n }\r\n return [options.key || '', value, options, overrides];\r\n}\r\n/** @internal */\r\nfunction clearNumberFormat(ctx, locale, format) {\r\n const context = ctx;\r\n for (const key in format) {\r\n const id = `${locale}__${key}`;\r\n if (!context.__numberFormatters.has(id)) {\r\n continue;\r\n }\r\n context.__numberFormatters.delete(id);\r\n }\r\n}\n\n// TODO: we could not exports for Node native ES Moudles yet...\r\n{\r\n if (typeof __INTLIFY_PROD_DEVTOOLS__ !== 'boolean') {\r\n getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;\r\n }\r\n}\n\nexport { CoreErrorCodes, CoreWarnCodes, DATETIME_FORMAT_OPTIONS_KEYS, DEFAULT_LOCALE, DEFAULT_MESSAGE_DATA_TYPE, MISSING_RESOLVE_VALUE, NOT_REOSLVED, NUMBER_FORMAT_OPTIONS_KEYS, VERSION, clearCompileCache, clearDateTimeFormat, clearNumberFormat, compileToFunction, createCoreContext, createCoreError, createMessageContext, datetime, fallbackWithLocaleChain, fallbackWithSimple, getAdditionalMeta, getDevToolsHook, getFallbackContext, getWarnMessage, handleMissing, initI18nDevTools, isMessageFunction, isTranslateFallbackWarn, isTranslateMissingWarn, number, parse, parseDateTimeArgs, parseNumberArgs, parseTranslateArgs, registerLocaleFallbacker, registerMessageCompiler, registerMessageResolver, resolveValue, resolveWithKeyValue, setAdditionalMeta, setDevToolsHook, setFallbackContext, translate, translateDevTools, updateFallbackLocale };\n","/*!\n * vue-i18n v9.2.2\n * (c) 2022 kazuya kawaguchi\n * Released under the MIT License.\n */\nimport { getGlobalThis, format, makeSymbol, isPlainObject, isArray, isString, hasOwn, isObject, isBoolean, isRegExp, isFunction, inBrowser, assign, isNumber, warn, createEmitter, isEmptyObject } from '@intlify/shared';\nimport { CoreWarnCodes, CompileErrorCodes, createCompileError, DEFAULT_LOCALE, updateFallbackLocale, setFallbackContext, createCoreContext, clearDateTimeFormat, clearNumberFormat, setAdditionalMeta, getFallbackContext, NOT_REOSLVED, isTranslateFallbackWarn, isTranslateMissingWarn, parseTranslateArgs, translate, MISSING_RESOLVE_VALUE, parseDateTimeArgs, datetime, parseNumberArgs, number, fallbackWithLocaleChain, NUMBER_FORMAT_OPTIONS_KEYS, DATETIME_FORMAT_OPTIONS_KEYS, registerMessageCompiler, compileToFunction, registerMessageResolver, resolveValue, registerLocaleFallbacker, setDevToolsHook } from '@intlify/core-base';\nimport { createVNode, Text, ref, computed, watch, getCurrentInstance, Fragment, h, effectScope, inject, onMounted, onUnmounted, shallowRef, onBeforeMount, isRef } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\nimport { VueDevToolsLabels, VueDevToolsPlaceholders, VueDevToolsTimelineColors } from '@intlify/vue-devtools';\n\n/**\r\n * Vue I18n Version\r\n *\r\n * @remarks\r\n * Semver format. Same format as the package.json `version` field.\r\n *\r\n * @VueI18nGeneral\r\n */\r\nconst VERSION = '9.2.2';\r\n/**\r\n * This is only called in esm-bundler builds.\r\n * istanbul-ignore-next\r\n */\r\nfunction initFeatureFlags() {\r\n let needWarn = false;\r\n if (typeof __VUE_I18N_FULL_INSTALL__ !== 'boolean') {\r\n needWarn = true;\r\n getGlobalThis().__VUE_I18N_FULL_INSTALL__ = true;\r\n }\r\n if (typeof __VUE_I18N_LEGACY_API__ !== 'boolean') {\r\n needWarn = true;\r\n getGlobalThis().__VUE_I18N_LEGACY_API__ = true;\r\n }\r\n if (typeof __INTLIFY_PROD_DEVTOOLS__ !== 'boolean') {\r\n getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && needWarn) {\r\n console.warn(`You are running the esm-bundler build of vue-i18n. It is recommended to ` +\r\n `configure your bundler to explicitly replace feature flag globals ` +\r\n `with boolean literals to get proper tree-shaking in the final bundle.`);\r\n }\r\n}\n\nlet code$1 = CoreWarnCodes.__EXTEND_POINT__;\r\nconst inc$1 = () => ++code$1;\r\nconst I18nWarnCodes = {\r\n FALLBACK_TO_ROOT: code$1,\r\n NOT_SUPPORTED_PRESERVE: inc$1(),\r\n NOT_SUPPORTED_FORMATTER: inc$1(),\r\n NOT_SUPPORTED_PRESERVE_DIRECTIVE: inc$1(),\r\n NOT_SUPPORTED_GET_CHOICE_INDEX: inc$1(),\r\n COMPONENT_NAME_LEGACY_COMPATIBLE: inc$1(),\r\n NOT_FOUND_PARENT_SCOPE: inc$1() // 13\r\n};\r\nconst warnMessages = {\r\n [I18nWarnCodes.FALLBACK_TO_ROOT]: `Fall back to {type} '{key}' with root locale.`,\r\n [I18nWarnCodes.NOT_SUPPORTED_PRESERVE]: `Not supported 'preserve'.`,\r\n [I18nWarnCodes.NOT_SUPPORTED_FORMATTER]: `Not supported 'formatter'.`,\r\n [I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE]: `Not supported 'preserveDirectiveContent'.`,\r\n [I18nWarnCodes.NOT_SUPPORTED_GET_CHOICE_INDEX]: `Not supported 'getChoiceIndex'.`,\r\n [I18nWarnCodes.COMPONENT_NAME_LEGACY_COMPATIBLE]: `Component name legacy compatible: '{name}' -> 'i18n'`,\r\n [I18nWarnCodes.NOT_FOUND_PARENT_SCOPE]: `Not found parent scope. use the global scope.`\r\n};\r\nfunction getWarnMessage(code, ...args) {\r\n return format(warnMessages[code], ...args);\r\n}\n\nlet code = CompileErrorCodes.__EXTEND_POINT__;\r\nconst inc = () => ++code;\r\nconst I18nErrorCodes = {\r\n // composer module errors\r\n UNEXPECTED_RETURN_TYPE: code,\r\n // legacy module errors\r\n INVALID_ARGUMENT: inc(),\r\n // i18n module errors\r\n MUST_BE_CALL_SETUP_TOP: inc(),\r\n NOT_INSLALLED: inc(),\r\n NOT_AVAILABLE_IN_LEGACY_MODE: inc(),\r\n // directive module errors\r\n REQUIRED_VALUE: inc(),\r\n INVALID_VALUE: inc(),\r\n // vue-devtools errors\r\n CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: inc(),\r\n NOT_INSLALLED_WITH_PROVIDE: inc(),\r\n // unexpected error\r\n UNEXPECTED_ERROR: inc(),\r\n // not compatible legacy vue-i18n constructor\r\n NOT_COMPATIBLE_LEGACY_VUE_I18N: inc(),\r\n // bridge support vue 2.x only\r\n BRIDGE_SUPPORT_VUE_2_ONLY: inc(),\r\n // need to define `i18n` option in `allowComposition: true` and `useScope: 'local' at `useI18n``\r\n MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION: inc(),\r\n // Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly\r\n NOT_AVAILABLE_COMPOSITION_IN_LEGACY: inc(),\r\n // for enhancement\r\n __EXTEND_POINT__: inc() // 29\r\n};\r\nfunction createI18nError(code, ...args) {\r\n return createCompileError(code, null, (process.env.NODE_ENV !== 'production') ? { messages: errorMessages, args } : undefined);\r\n}\r\nconst errorMessages = {\r\n [I18nErrorCodes.UNEXPECTED_RETURN_TYPE]: 'Unexpected return type in composer',\r\n [I18nErrorCodes.INVALID_ARGUMENT]: 'Invalid argument',\r\n [I18nErrorCodes.MUST_BE_CALL_SETUP_TOP]: 'Must be called at the top of a `setup` function',\r\n [I18nErrorCodes.NOT_INSLALLED]: 'Need to install with `app.use` function',\r\n [I18nErrorCodes.UNEXPECTED_ERROR]: 'Unexpected error',\r\n [I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE]: 'Not available in legacy mode',\r\n [I18nErrorCodes.REQUIRED_VALUE]: `Required in value: {0}`,\r\n [I18nErrorCodes.INVALID_VALUE]: `Invalid value`,\r\n [I18nErrorCodes.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]: `Cannot setup vue-devtools plugin`,\r\n [I18nErrorCodes.NOT_INSLALLED_WITH_PROVIDE]: 'Need to install with `provide` function',\r\n [I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N]: 'Not compatible legacy VueI18n.',\r\n [I18nErrorCodes.BRIDGE_SUPPORT_VUE_2_ONLY]: 'vue-i18n-bridge support Vue 2.x only',\r\n [I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]: 'Must define ‘i18n’ option or custom block in Composition API with using local scope in Legacy API mode',\r\n [I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: 'Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly'\r\n};\n\nconst TransrateVNodeSymbol = \r\n/* #__PURE__*/ makeSymbol('__transrateVNode');\r\nconst DatetimePartsSymbol = /* #__PURE__*/ makeSymbol('__datetimeParts');\r\nconst NumberPartsSymbol = /* #__PURE__*/ makeSymbol('__numberParts');\r\nconst EnableEmitter = /* #__PURE__*/ makeSymbol('__enableEmitter');\r\nconst DisableEmitter = /* #__PURE__*/ makeSymbol('__disableEmitter');\r\nconst SetPluralRulesSymbol = makeSymbol('__setPluralRules');\r\nmakeSymbol('__intlifyMeta');\r\nconst InejctWithOption = /* #__PURE__*/ makeSymbol('__injectWithOption');\r\nconst __VUE_I18N_BRIDGE__ = '__VUE_I18N_BRIDGE__';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\r\n/**\r\n * Transform flat json in obj to normal json in obj\r\n */\r\nfunction handleFlatJson(obj) {\r\n // check obj\r\n if (!isObject(obj)) {\r\n return obj;\r\n }\r\n for (const key in obj) {\r\n // check key\r\n if (!hasOwn(obj, key)) {\r\n continue;\r\n }\r\n // handle for normal json\r\n if (!key.includes('.')) {\r\n // recursive process value if value is also a object\r\n if (isObject(obj[key])) {\r\n handleFlatJson(obj[key]);\r\n }\r\n }\r\n // handle for flat json, transform to normal json\r\n else {\r\n // go to the last object\r\n const subKeys = key.split('.');\r\n const lastIndex = subKeys.length - 1;\r\n let currentObj = obj;\r\n for (let i = 0; i < lastIndex; i++) {\r\n if (!(subKeys[i] in currentObj)) {\r\n currentObj[subKeys[i]] = {};\r\n }\r\n currentObj = currentObj[subKeys[i]];\r\n }\r\n // update last object value, delete old property\r\n currentObj[subKeys[lastIndex]] = obj[key];\r\n delete obj[key];\r\n // recursive process value if value is also a object\r\n if (isObject(currentObj[subKeys[lastIndex]])) {\r\n handleFlatJson(currentObj[subKeys[lastIndex]]);\r\n }\r\n }\r\n }\r\n return obj;\r\n}\r\nfunction getLocaleMessages(locale, options) {\r\n const { messages, __i18n, messageResolver, flatJson } = options;\r\n // prettier-ignore\r\n const ret = isPlainObject(messages)\r\n ? messages\r\n : isArray(__i18n)\r\n ? {}\r\n : { [locale]: {} };\r\n // merge locale messages of i18n custom block\r\n if (isArray(__i18n)) {\r\n __i18n.forEach(custom => {\r\n if ('locale' in custom && 'resource' in custom) {\r\n const { locale, resource } = custom;\r\n if (locale) {\r\n ret[locale] = ret[locale] || {};\r\n deepCopy(resource, ret[locale]);\r\n }\r\n else {\r\n deepCopy(resource, ret);\r\n }\r\n }\r\n else {\r\n isString(custom) && deepCopy(JSON.parse(custom), ret);\r\n }\r\n });\r\n }\r\n // handle messages for flat json\r\n if (messageResolver == null && flatJson) {\r\n for (const key in ret) {\r\n if (hasOwn(ret, key)) {\r\n handleFlatJson(ret[key]);\r\n }\r\n }\r\n }\r\n return ret;\r\n}\r\nconst isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\r\nfunction deepCopy(src, des) {\r\n // src and des should both be objects, and non of then can be a array\r\n if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {\r\n throw createI18nError(I18nErrorCodes.INVALID_VALUE);\r\n }\r\n for (const key in src) {\r\n if (hasOwn(src, key)) {\r\n if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {\r\n // replace with src[key] when:\r\n // src[key] or des[key] is not a object, or\r\n // src[key] or des[key] is a array\r\n des[key] = src[key];\r\n }\r\n else {\r\n // src[key] and des[key] are both object, merge them\r\n deepCopy(src[key], des[key]);\r\n }\r\n }\r\n }\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nfunction getComponentOptions(instance) {\r\n return instance.type ;\r\n}\r\nfunction adjustI18nResources(global, options, componentOptions // eslint-disable-line @typescript-eslint/no-explicit-any\r\n) {\r\n let messages = isObject(options.messages) ? options.messages : {};\r\n if ('__i18nGlobal' in componentOptions) {\r\n messages = getLocaleMessages(global.locale.value, {\r\n messages,\r\n __i18n: componentOptions.__i18nGlobal\r\n });\r\n }\r\n // merge locale messages\r\n const locales = Object.keys(messages);\r\n if (locales.length) {\r\n locales.forEach(locale => {\r\n global.mergeLocaleMessage(locale, messages[locale]);\r\n });\r\n }\r\n {\r\n // merge datetime formats\r\n if (isObject(options.datetimeFormats)) {\r\n const locales = Object.keys(options.datetimeFormats);\r\n if (locales.length) {\r\n locales.forEach(locale => {\r\n global.mergeDateTimeFormat(locale, options.datetimeFormats[locale]);\r\n });\r\n }\r\n }\r\n // merge number formats\r\n if (isObject(options.numberFormats)) {\r\n const locales = Object.keys(options.numberFormats);\r\n if (locales.length) {\r\n locales.forEach(locale => {\r\n global.mergeNumberFormat(locale, options.numberFormats[locale]);\r\n });\r\n }\r\n }\r\n }\r\n}\r\nfunction createTextNode(key) {\r\n return createVNode(Text, null, key, 0)\r\n ;\r\n}\r\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\r\n// extend VNode interface\r\nconst DEVTOOLS_META = '__INTLIFY_META__';\r\nlet composerID = 0;\r\nfunction defineCoreMissingHandler(missing) {\r\n return ((ctx, locale, key, type) => {\r\n return missing(locale, key, getCurrentInstance() || undefined, type);\r\n });\r\n}\r\n// for Intlify DevTools\r\nconst getMetaInfo = () => {\r\n const instance = getCurrentInstance();\r\n let meta = null; // eslint-disable-line @typescript-eslint/no-explicit-any\r\n return instance && (meta = getComponentOptions(instance)[DEVTOOLS_META])\r\n ? { [DEVTOOLS_META]: meta } // eslint-disable-line @typescript-eslint/no-explicit-any\r\n : null;\r\n};\r\n/**\r\n * Create composer interface factory\r\n *\r\n * @internal\r\n */\r\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\r\nfunction createComposer(options = {}, VueI18nLegacy) {\r\n const { __root } = options;\r\n const _isGlobal = __root === undefined;\r\n let _inheritLocale = isBoolean(options.inheritLocale)\r\n ? options.inheritLocale\r\n : true;\r\n const _locale = ref(\r\n // prettier-ignore\r\n __root && _inheritLocale\r\n ? __root.locale.value\r\n : isString(options.locale)\r\n ? options.locale\r\n : DEFAULT_LOCALE);\r\n const _fallbackLocale = ref(\r\n // prettier-ignore\r\n __root && _inheritLocale\r\n ? __root.fallbackLocale.value\r\n : isString(options.fallbackLocale) ||\r\n isArray(options.fallbackLocale) ||\r\n isPlainObject(options.fallbackLocale) ||\r\n options.fallbackLocale === false\r\n ? options.fallbackLocale\r\n : _locale.value);\r\n const _messages = ref(getLocaleMessages(_locale.value, options));\r\n // prettier-ignore\r\n const _datetimeFormats = ref(isPlainObject(options.datetimeFormats)\r\n ? options.datetimeFormats\r\n : { [_locale.value]: {} })\r\n ;\r\n // prettier-ignore\r\n const _numberFormats = ref(isPlainObject(options.numberFormats)\r\n ? options.numberFormats\r\n : { [_locale.value]: {} })\r\n ;\r\n // warning suppress options\r\n // prettier-ignore\r\n let _missingWarn = __root\r\n ? __root.missingWarn\r\n : isBoolean(options.missingWarn) || isRegExp(options.missingWarn)\r\n ? options.missingWarn\r\n : true;\r\n // prettier-ignore\r\n let _fallbackWarn = __root\r\n ? __root.fallbackWarn\r\n : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)\r\n ? options.fallbackWarn\r\n : true;\r\n // prettier-ignore\r\n let _fallbackRoot = __root\r\n ? __root.fallbackRoot\r\n : isBoolean(options.fallbackRoot)\r\n ? options.fallbackRoot\r\n : true;\r\n // configure fall back to root\r\n let _fallbackFormat = !!options.fallbackFormat;\r\n // runtime missing\r\n let _missing = isFunction(options.missing) ? options.missing : null;\r\n let _runtimeMissing = isFunction(options.missing)\r\n ? defineCoreMissingHandler(options.missing)\r\n : null;\r\n // postTranslation handler\r\n let _postTranslation = isFunction(options.postTranslation)\r\n ? options.postTranslation\r\n : null;\r\n // prettier-ignore\r\n let _warnHtmlMessage = __root\r\n ? __root.warnHtmlMessage\r\n : isBoolean(options.warnHtmlMessage)\r\n ? options.warnHtmlMessage\r\n : true;\r\n let _escapeParameter = !!options.escapeParameter;\r\n // custom linked modifiers\r\n // prettier-ignore\r\n const _modifiers = __root\r\n ? __root.modifiers\r\n : isPlainObject(options.modifiers)\r\n ? options.modifiers\r\n : {};\r\n // pluralRules\r\n let _pluralRules = options.pluralRules || (__root && __root.pluralRules);\r\n // runtime context\r\n // eslint-disable-next-line prefer-const\r\n let _context;\r\n const getCoreContext = () => {\r\n _isGlobal && setFallbackContext(null);\r\n const ctxOptions = {\r\n version: VERSION,\r\n locale: _locale.value,\r\n fallbackLocale: _fallbackLocale.value,\r\n messages: _messages.value,\r\n modifiers: _modifiers,\r\n pluralRules: _pluralRules,\r\n missing: _runtimeMissing === null ? undefined : _runtimeMissing,\r\n missingWarn: _missingWarn,\r\n fallbackWarn: _fallbackWarn,\r\n fallbackFormat: _fallbackFormat,\r\n unresolving: true,\r\n postTranslation: _postTranslation === null ? undefined : _postTranslation,\r\n warnHtmlMessage: _warnHtmlMessage,\r\n escapeParameter: _escapeParameter,\r\n messageResolver: options.messageResolver,\r\n __meta: { framework: 'vue' }\r\n };\r\n {\r\n ctxOptions.datetimeFormats = _datetimeFormats.value;\r\n ctxOptions.numberFormats = _numberFormats.value;\r\n ctxOptions.__datetimeFormatters = isPlainObject(_context)\r\n ? _context.__datetimeFormatters\r\n : undefined;\r\n ctxOptions.__numberFormatters = isPlainObject(_context)\r\n ? _context.__numberFormatters\r\n : undefined;\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n ctxOptions.__v_emitter = isPlainObject(_context)\r\n ? _context.__v_emitter\r\n : undefined;\r\n }\r\n const ctx = createCoreContext(ctxOptions);\r\n _isGlobal && setFallbackContext(ctx);\r\n return ctx;\r\n };\r\n _context = getCoreContext();\r\n updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\r\n // track reactivity\r\n function trackReactivityValues() {\r\n return [\r\n _locale.value,\r\n _fallbackLocale.value,\r\n _messages.value,\r\n _datetimeFormats.value,\r\n _numberFormats.value\r\n ]\r\n ;\r\n }\r\n // locale\r\n const locale = computed({\r\n get: () => _locale.value,\r\n set: val => {\r\n _locale.value = val;\r\n _context.locale = _locale.value;\r\n }\r\n });\r\n // fallbackLocale\r\n const fallbackLocale = computed({\r\n get: () => _fallbackLocale.value,\r\n set: val => {\r\n _fallbackLocale.value = val;\r\n _context.fallbackLocale = _fallbackLocale.value;\r\n updateFallbackLocale(_context, _locale.value, val);\r\n }\r\n });\r\n // messages\r\n const messages = computed(() => _messages.value);\r\n // datetimeFormats\r\n const datetimeFormats = /* #__PURE__*/ computed(() => _datetimeFormats.value);\r\n // numberFormats\r\n const numberFormats = /* #__PURE__*/ computed(() => _numberFormats.value);\r\n // getPostTranslationHandler\r\n function getPostTranslationHandler() {\r\n return isFunction(_postTranslation) ? _postTranslation : null;\r\n }\r\n // setPostTranslationHandler\r\n function setPostTranslationHandler(handler) {\r\n _postTranslation = handler;\r\n _context.postTranslation = handler;\r\n }\r\n // getMissingHandler\r\n function getMissingHandler() {\r\n return _missing;\r\n }\r\n // setMissingHandler\r\n function setMissingHandler(handler) {\r\n if (handler !== null) {\r\n _runtimeMissing = defineCoreMissingHandler(handler);\r\n }\r\n _missing = handler;\r\n _context.missing = _runtimeMissing;\r\n }\r\n function isResolvedTranslateMessage(type, arg // eslint-disable-line @typescript-eslint/no-explicit-any\r\n ) {\r\n return type !== 'translate' || !arg.resolvedMessage;\r\n }\r\n const wrapWithDeps = (fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) => {\r\n trackReactivityValues(); // track reactive dependency\r\n // NOTE: experimental !!\r\n let ret;\r\n if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\r\n try {\r\n setAdditionalMeta(getMetaInfo());\r\n if (!_isGlobal) {\r\n _context.fallbackContext = __root\r\n ? getFallbackContext()\r\n : undefined;\r\n }\r\n ret = fn(_context);\r\n }\r\n finally {\r\n setAdditionalMeta(null);\r\n if (!_isGlobal) {\r\n _context.fallbackContext = undefined;\r\n }\r\n }\r\n }\r\n else {\r\n ret = fn(_context);\r\n }\r\n if (isNumber(ret) && ret === NOT_REOSLVED) {\r\n const [key, arg2] = argumentParser();\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n __root &&\r\n isString(key) &&\r\n isResolvedTranslateMessage(warnType, arg2)) {\r\n if (_fallbackRoot &&\r\n (isTranslateFallbackWarn(_fallbackWarn, key) ||\r\n isTranslateMissingWarn(_missingWarn, key))) {\r\n warn(getWarnMessage(I18nWarnCodes.FALLBACK_TO_ROOT, {\r\n key,\r\n type: warnType\r\n }));\r\n }\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const { __v_emitter: emitter } = _context;\r\n if (emitter && _fallbackRoot) {\r\n emitter.emit(\"fallback\" /* FALBACK */, {\r\n type: warnType,\r\n key,\r\n to: 'global',\r\n groupId: `${warnType}:${key}`\r\n });\r\n }\r\n }\r\n }\r\n return __root && _fallbackRoot\r\n ? fallbackSuccess(__root)\r\n : fallbackFail(key);\r\n }\r\n else if (successCondition(ret)) {\r\n return ret;\r\n }\r\n else {\r\n /* istanbul ignore next */\r\n throw createI18nError(I18nErrorCodes.UNEXPECTED_RETURN_TYPE);\r\n }\r\n };\r\n // t\r\n function t(...args) {\r\n return wrapWithDeps(context => Reflect.apply(translate, null, [context, ...args]), () => parseTranslateArgs(...args), 'translate', root => Reflect.apply(root.t, root, [...args]), key => key, val => isString(val));\r\n }\r\n // rt\r\n function rt(...args) {\r\n const [arg1, arg2, arg3] = args;\r\n if (arg3 && !isObject(arg3)) {\r\n throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\r\n }\r\n return t(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]);\r\n }\r\n // d\r\n function d(...args) {\r\n return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', root => Reflect.apply(root.d, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString(val));\r\n }\r\n // n\r\n function n(...args) {\r\n return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => Reflect.apply(root.n, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString(val));\r\n }\r\n // for custom processor\r\n function normalize(values) {\r\n return values.map(val => isString(val) || isNumber(val) || isBoolean(val)\r\n ? createTextNode(String(val))\r\n : val);\r\n }\r\n const interpolate = (val) => val;\r\n const processor = {\r\n normalize,\r\n interpolate,\r\n type: 'vnode'\r\n };\r\n // transrateVNode, using for `i18n-t` component\r\n function transrateVNode(...args) {\r\n return wrapWithDeps(context => {\r\n let ret;\r\n const _context = context;\r\n try {\r\n _context.processor = processor;\r\n ret = Reflect.apply(translate, null, [_context, ...args]);\r\n }\r\n finally {\r\n _context.processor = null;\r\n }\r\n return ret;\r\n }, () => parseTranslateArgs(...args), 'translate', \r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n root => root[TransrateVNodeSymbol](...args), key => [createTextNode(key)], val => isArray(val));\r\n }\r\n // numberParts, using for `i18n-n` component\r\n function numberParts(...args) {\r\n return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', \r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n root => root[NumberPartsSymbol](...args), () => [], val => isString(val) || isArray(val));\r\n }\r\n // datetimeParts, using for `i18n-d` component\r\n function datetimeParts(...args) {\r\n return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', \r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n root => root[DatetimePartsSymbol](...args), () => [], val => isString(val) || isArray(val));\r\n }\r\n function setPluralRules(rules) {\r\n _pluralRules = rules;\r\n _context.pluralRules = _pluralRules;\r\n }\r\n // te\r\n function te(key, locale) {\r\n const targetLocale = isString(locale) ? locale : _locale.value;\r\n const message = getLocaleMessage(targetLocale);\r\n return _context.messageResolver(message, key) !== null;\r\n }\r\n function resolveMessages(key) {\r\n let messages = null;\r\n const locales = fallbackWithLocaleChain(_context, _fallbackLocale.value, _locale.value);\r\n for (let i = 0; i < locales.length; i++) {\r\n const targetLocaleMessages = _messages.value[locales[i]] || {};\r\n const messageValue = _context.messageResolver(targetLocaleMessages, key);\r\n if (messageValue != null) {\r\n messages = messageValue;\r\n break;\r\n }\r\n }\r\n return messages;\r\n }\r\n // tm\r\n function tm(key) {\r\n const messages = resolveMessages(key);\r\n // prettier-ignore\r\n return messages != null\r\n ? messages\r\n : __root\r\n ? __root.tm(key) || {}\r\n : {};\r\n }\r\n // getLocaleMessage\r\n function getLocaleMessage(locale) {\r\n return (_messages.value[locale] || {});\r\n }\r\n // setLocaleMessage\r\n function setLocaleMessage(locale, message) {\r\n _messages.value[locale] = message;\r\n _context.messages = _messages.value;\r\n }\r\n // mergeLocaleMessage\r\n function mergeLocaleMessage(locale, message) {\r\n _messages.value[locale] = _messages.value[locale] || {};\r\n deepCopy(message, _messages.value[locale]);\r\n _context.messages = _messages.value;\r\n }\r\n // getDateTimeFormat\r\n function getDateTimeFormat(locale) {\r\n return _datetimeFormats.value[locale] || {};\r\n }\r\n // setDateTimeFormat\r\n function setDateTimeFormat(locale, format) {\r\n _datetimeFormats.value[locale] = format;\r\n _context.datetimeFormats = _datetimeFormats.value;\r\n clearDateTimeFormat(_context, locale, format);\r\n }\r\n // mergeDateTimeFormat\r\n function mergeDateTimeFormat(locale, format) {\r\n _datetimeFormats.value[locale] = assign(_datetimeFormats.value[locale] || {}, format);\r\n _context.datetimeFormats = _datetimeFormats.value;\r\n clearDateTimeFormat(_context, locale, format);\r\n }\r\n // getNumberFormat\r\n function getNumberFormat(locale) {\r\n return _numberFormats.value[locale] || {};\r\n }\r\n // setNumberFormat\r\n function setNumberFormat(locale, format) {\r\n _numberFormats.value[locale] = format;\r\n _context.numberFormats = _numberFormats.value;\r\n clearNumberFormat(_context, locale, format);\r\n }\r\n // mergeNumberFormat\r\n function mergeNumberFormat(locale, format) {\r\n _numberFormats.value[locale] = assign(_numberFormats.value[locale] || {}, format);\r\n _context.numberFormats = _numberFormats.value;\r\n clearNumberFormat(_context, locale, format);\r\n }\r\n // for debug\r\n composerID++;\r\n // watch root locale & fallbackLocale\r\n if (__root && inBrowser) {\r\n watch(__root.locale, (val) => {\r\n if (_inheritLocale) {\r\n _locale.value = val;\r\n _context.locale = val;\r\n updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\r\n }\r\n });\r\n watch(__root.fallbackLocale, (val) => {\r\n if (_inheritLocale) {\r\n _fallbackLocale.value = val;\r\n _context.fallbackLocale = val;\r\n updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\r\n }\r\n });\r\n }\r\n // define basic composition API!\r\n const composer = {\r\n id: composerID,\r\n locale,\r\n fallbackLocale,\r\n get inheritLocale() {\r\n return _inheritLocale;\r\n },\r\n set inheritLocale(val) {\r\n _inheritLocale = val;\r\n if (val && __root) {\r\n _locale.value = __root.locale.value;\r\n _fallbackLocale.value = __root.fallbackLocale.value;\r\n updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\r\n }\r\n },\r\n get availableLocales() {\r\n return Object.keys(_messages.value).sort();\r\n },\r\n messages,\r\n get modifiers() {\r\n return _modifiers;\r\n },\r\n get pluralRules() {\r\n return _pluralRules || {};\r\n },\r\n get isGlobal() {\r\n return _isGlobal;\r\n },\r\n get missingWarn() {\r\n return _missingWarn;\r\n },\r\n set missingWarn(val) {\r\n _missingWarn = val;\r\n _context.missingWarn = _missingWarn;\r\n },\r\n get fallbackWarn() {\r\n return _fallbackWarn;\r\n },\r\n set fallbackWarn(val) {\r\n _fallbackWarn = val;\r\n _context.fallbackWarn = _fallbackWarn;\r\n },\r\n get fallbackRoot() {\r\n return _fallbackRoot;\r\n },\r\n set fallbackRoot(val) {\r\n _fallbackRoot = val;\r\n },\r\n get fallbackFormat() {\r\n return _fallbackFormat;\r\n },\r\n set fallbackFormat(val) {\r\n _fallbackFormat = val;\r\n _context.fallbackFormat = _fallbackFormat;\r\n },\r\n get warnHtmlMessage() {\r\n return _warnHtmlMessage;\r\n },\r\n set warnHtmlMessage(val) {\r\n _warnHtmlMessage = val;\r\n _context.warnHtmlMessage = val;\r\n },\r\n get escapeParameter() {\r\n return _escapeParameter;\r\n },\r\n set escapeParameter(val) {\r\n _escapeParameter = val;\r\n _context.escapeParameter = val;\r\n },\r\n t,\r\n getLocaleMessage,\r\n setLocaleMessage,\r\n mergeLocaleMessage,\r\n getPostTranslationHandler,\r\n setPostTranslationHandler,\r\n getMissingHandler,\r\n setMissingHandler,\r\n [SetPluralRulesSymbol]: setPluralRules\r\n };\r\n {\r\n composer.datetimeFormats = datetimeFormats;\r\n composer.numberFormats = numberFormats;\r\n composer.rt = rt;\r\n composer.te = te;\r\n composer.tm = tm;\r\n composer.d = d;\r\n composer.n = n;\r\n composer.getDateTimeFormat = getDateTimeFormat;\r\n composer.setDateTimeFormat = setDateTimeFormat;\r\n composer.mergeDateTimeFormat = mergeDateTimeFormat;\r\n composer.getNumberFormat = getNumberFormat;\r\n composer.setNumberFormat = setNumberFormat;\r\n composer.mergeNumberFormat = mergeNumberFormat;\r\n composer[InejctWithOption] = options.__injectWithOption;\r\n composer[TransrateVNodeSymbol] = transrateVNode;\r\n composer[DatetimePartsSymbol] = datetimeParts;\r\n composer[NumberPartsSymbol] = numberParts;\r\n }\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n composer[EnableEmitter] = (emitter) => {\r\n _context.__v_emitter = emitter;\r\n };\r\n composer[DisableEmitter] = () => {\r\n _context.__v_emitter = undefined;\r\n };\r\n }\r\n return composer;\r\n}\r\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\r\n/**\r\n * Convert to I18n Composer Options from VueI18n Options\r\n *\r\n * @internal\r\n */\r\nfunction convertComposerOptions(options) {\r\n const locale = isString(options.locale) ? options.locale : DEFAULT_LOCALE;\r\n const fallbackLocale = isString(options.fallbackLocale) ||\r\n isArray(options.fallbackLocale) ||\r\n isPlainObject(options.fallbackLocale) ||\r\n options.fallbackLocale === false\r\n ? options.fallbackLocale\r\n : locale;\r\n const missing = isFunction(options.missing) ? options.missing : undefined;\r\n const missingWarn = isBoolean(options.silentTranslationWarn) ||\r\n isRegExp(options.silentTranslationWarn)\r\n ? !options.silentTranslationWarn\r\n : true;\r\n const fallbackWarn = isBoolean(options.silentFallbackWarn) ||\r\n isRegExp(options.silentFallbackWarn)\r\n ? !options.silentFallbackWarn\r\n : true;\r\n const fallbackRoot = isBoolean(options.fallbackRoot)\r\n ? options.fallbackRoot\r\n : true;\r\n const fallbackFormat = !!options.formatFallbackMessages;\r\n const modifiers = isPlainObject(options.modifiers) ? options.modifiers : {};\r\n const pluralizationRules = options.pluralizationRules;\r\n const postTranslation = isFunction(options.postTranslation)\r\n ? options.postTranslation\r\n : undefined;\r\n const warnHtmlMessage = isString(options.warnHtmlInMessage)\r\n ? options.warnHtmlInMessage !== 'off'\r\n : true;\r\n const escapeParameter = !!options.escapeParameterHtml;\r\n const inheritLocale = isBoolean(options.sync) ? options.sync : true;\r\n if ((process.env.NODE_ENV !== 'production') && options.formatter) {\r\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && options.preserveDirectiveContent) {\r\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));\r\n }\r\n let messages = options.messages;\r\n if (isPlainObject(options.sharedMessages)) {\r\n const sharedMessages = options.sharedMessages;\r\n const locales = Object.keys(sharedMessages);\r\n messages = locales.reduce((messages, locale) => {\r\n const message = messages[locale] || (messages[locale] = {});\r\n assign(message, sharedMessages[locale]);\r\n return messages;\r\n }, (messages || {}));\r\n }\r\n const { __i18n, __root, __injectWithOption } = options;\r\n const datetimeFormats = options.datetimeFormats;\r\n const numberFormats = options.numberFormats;\r\n const flatJson = options.flatJson;\r\n return {\r\n locale,\r\n fallbackLocale,\r\n messages,\r\n flatJson,\r\n datetimeFormats,\r\n numberFormats,\r\n missing,\r\n missingWarn,\r\n fallbackWarn,\r\n fallbackRoot,\r\n fallbackFormat,\r\n modifiers,\r\n pluralRules: pluralizationRules,\r\n postTranslation,\r\n warnHtmlMessage,\r\n escapeParameter,\r\n messageResolver: options.messageResolver,\r\n inheritLocale,\r\n __i18n,\r\n __root,\r\n __injectWithOption\r\n };\r\n}\r\n/**\r\n * create VueI18n interface factory\r\n *\r\n * @internal\r\n */\r\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\r\nfunction createVueI18n(options = {}, VueI18nLegacy) {\r\n {\r\n const composer = createComposer(convertComposerOptions(options));\r\n // defines VueI18n\r\n const vueI18n = {\r\n // id\r\n id: composer.id,\r\n // locale\r\n get locale() {\r\n return composer.locale.value;\r\n },\r\n set locale(val) {\r\n composer.locale.value = val;\r\n },\r\n // fallbackLocale\r\n get fallbackLocale() {\r\n return composer.fallbackLocale.value;\r\n },\r\n set fallbackLocale(val) {\r\n composer.fallbackLocale.value = val;\r\n },\r\n // messages\r\n get messages() {\r\n return composer.messages.value;\r\n },\r\n // datetimeFormats\r\n get datetimeFormats() {\r\n return composer.datetimeFormats.value;\r\n },\r\n // numberFormats\r\n get numberFormats() {\r\n return composer.numberFormats.value;\r\n },\r\n // availableLocales\r\n get availableLocales() {\r\n return composer.availableLocales;\r\n },\r\n // formatter\r\n get formatter() {\r\n (process.env.NODE_ENV !== 'production') && warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));\r\n // dummy\r\n return {\r\n interpolate() {\r\n return [];\r\n }\r\n };\r\n },\r\n set formatter(val) {\r\n (process.env.NODE_ENV !== 'production') && warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));\r\n },\r\n // missing\r\n get missing() {\r\n return composer.getMissingHandler();\r\n },\r\n set missing(handler) {\r\n composer.setMissingHandler(handler);\r\n },\r\n // silentTranslationWarn\r\n get silentTranslationWarn() {\r\n return isBoolean(composer.missingWarn)\r\n ? !composer.missingWarn\r\n : composer.missingWarn;\r\n },\r\n set silentTranslationWarn(val) {\r\n composer.missingWarn = isBoolean(val) ? !val : val;\r\n },\r\n // silentFallbackWarn\r\n get silentFallbackWarn() {\r\n return isBoolean(composer.fallbackWarn)\r\n ? !composer.fallbackWarn\r\n : composer.fallbackWarn;\r\n },\r\n set silentFallbackWarn(val) {\r\n composer.fallbackWarn = isBoolean(val) ? !val : val;\r\n },\r\n // modifiers\r\n get modifiers() {\r\n return composer.modifiers;\r\n },\r\n // formatFallbackMessages\r\n get formatFallbackMessages() {\r\n return composer.fallbackFormat;\r\n },\r\n set formatFallbackMessages(val) {\r\n composer.fallbackFormat = val;\r\n },\r\n // postTranslation\r\n get postTranslation() {\r\n return composer.getPostTranslationHandler();\r\n },\r\n set postTranslation(handler) {\r\n composer.setPostTranslationHandler(handler);\r\n },\r\n // sync\r\n get sync() {\r\n return composer.inheritLocale;\r\n },\r\n set sync(val) {\r\n composer.inheritLocale = val;\r\n },\r\n // warnInHtmlMessage\r\n get warnHtmlInMessage() {\r\n return composer.warnHtmlMessage ? 'warn' : 'off';\r\n },\r\n set warnHtmlInMessage(val) {\r\n composer.warnHtmlMessage = val !== 'off';\r\n },\r\n // escapeParameterHtml\r\n get escapeParameterHtml() {\r\n return composer.escapeParameter;\r\n },\r\n set escapeParameterHtml(val) {\r\n composer.escapeParameter = val;\r\n },\r\n // preserveDirectiveContent\r\n get preserveDirectiveContent() {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));\r\n return true;\r\n },\r\n set preserveDirectiveContent(val) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));\r\n },\r\n // pluralizationRules\r\n get pluralizationRules() {\r\n return composer.pluralRules || {};\r\n },\r\n // for internal\r\n __composer: composer,\r\n // t\r\n t(...args) {\r\n const [arg1, arg2, arg3] = args;\r\n const options = {};\r\n let list = null;\r\n let named = null;\r\n if (!isString(arg1)) {\r\n throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\r\n }\r\n const key = arg1;\r\n if (isString(arg2)) {\r\n options.locale = arg2;\r\n }\r\n else if (isArray(arg2)) {\r\n list = arg2;\r\n }\r\n else if (isPlainObject(arg2)) {\r\n named = arg2;\r\n }\r\n if (isArray(arg3)) {\r\n list = arg3;\r\n }\r\n else if (isPlainObject(arg3)) {\r\n named = arg3;\r\n }\r\n // return composer.t(key, (list || named || {}) as any, options)\r\n return Reflect.apply(composer.t, composer, [\r\n key,\r\n (list || named || {}),\r\n options\r\n ]);\r\n },\r\n rt(...args) {\r\n return Reflect.apply(composer.rt, composer, [...args]);\r\n },\r\n // tc\r\n tc(...args) {\r\n const [arg1, arg2, arg3] = args;\r\n const options = { plural: 1 };\r\n let list = null;\r\n let named = null;\r\n if (!isString(arg1)) {\r\n throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\r\n }\r\n const key = arg1;\r\n if (isString(arg2)) {\r\n options.locale = arg2;\r\n }\r\n else if (isNumber(arg2)) {\r\n options.plural = arg2;\r\n }\r\n else if (isArray(arg2)) {\r\n list = arg2;\r\n }\r\n else if (isPlainObject(arg2)) {\r\n named = arg2;\r\n }\r\n if (isString(arg3)) {\r\n options.locale = arg3;\r\n }\r\n else if (isArray(arg3)) {\r\n list = arg3;\r\n }\r\n else if (isPlainObject(arg3)) {\r\n named = arg3;\r\n }\r\n // return composer.t(key, (list || named || {}) as any, options)\r\n return Reflect.apply(composer.t, composer, [\r\n key,\r\n (list || named || {}),\r\n options\r\n ]);\r\n },\r\n // te\r\n te(key, locale) {\r\n return composer.te(key, locale);\r\n },\r\n // tm\r\n tm(key) {\r\n return composer.tm(key);\r\n },\r\n // getLocaleMessage\r\n getLocaleMessage(locale) {\r\n return composer.getLocaleMessage(locale);\r\n },\r\n // setLocaleMessage\r\n setLocaleMessage(locale, message) {\r\n composer.setLocaleMessage(locale, message);\r\n },\r\n // mergeLocaleMessage\r\n mergeLocaleMessage(locale, message) {\r\n composer.mergeLocaleMessage(locale, message);\r\n },\r\n // d\r\n d(...args) {\r\n return Reflect.apply(composer.d, composer, [...args]);\r\n },\r\n // getDateTimeFormat\r\n getDateTimeFormat(locale) {\r\n return composer.getDateTimeFormat(locale);\r\n },\r\n // setDateTimeFormat\r\n setDateTimeFormat(locale, format) {\r\n composer.setDateTimeFormat(locale, format);\r\n },\r\n // mergeDateTimeFormat\r\n mergeDateTimeFormat(locale, format) {\r\n composer.mergeDateTimeFormat(locale, format);\r\n },\r\n // n\r\n n(...args) {\r\n return Reflect.apply(composer.n, composer, [...args]);\r\n },\r\n // getNumberFormat\r\n getNumberFormat(locale) {\r\n return composer.getNumberFormat(locale);\r\n },\r\n // setNumberFormat\r\n setNumberFormat(locale, format) {\r\n composer.setNumberFormat(locale, format);\r\n },\r\n // mergeNumberFormat\r\n mergeNumberFormat(locale, format) {\r\n composer.mergeNumberFormat(locale, format);\r\n },\r\n // getChoiceIndex\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n getChoiceIndex(choice, choicesLength) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_GET_CHOICE_INDEX));\r\n return -1;\r\n },\r\n // for internal\r\n __onComponentInstanceCreated(target) {\r\n const { componentInstanceCreatedListener } = options;\r\n if (componentInstanceCreatedListener) {\r\n componentInstanceCreatedListener(target, vueI18n);\r\n }\r\n }\r\n };\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n vueI18n.__enableEmitter = (emitter) => {\r\n const __composer = composer;\r\n __composer[EnableEmitter] && __composer[EnableEmitter](emitter);\r\n };\r\n vueI18n.__disableEmitter = () => {\r\n const __composer = composer;\r\n __composer[DisableEmitter] && __composer[DisableEmitter]();\r\n };\r\n }\r\n return vueI18n;\r\n }\r\n}\r\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nconst baseFormatProps = {\r\n tag: {\r\n type: [String, Object]\r\n },\r\n locale: {\r\n type: String\r\n },\r\n scope: {\r\n type: String,\r\n // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\r\n validator: (val /* ComponetI18nScope */) => val === 'parent' || val === 'global',\r\n default: 'parent' /* ComponetI18nScope */\r\n },\r\n i18n: {\r\n type: Object\r\n }\r\n};\n\nfunction getInterpolateArg(\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n{ slots }, // SetupContext,\r\nkeys) {\r\n if (keys.length === 1 && keys[0] === 'default') {\r\n // default slot with list\r\n const ret = slots.default ? slots.default() : [];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return ret.reduce((slot, current) => {\r\n return (slot = [\r\n ...slot,\r\n ...(isArray(current.children) ? current.children : [current])\r\n ]);\r\n }, []);\r\n }\r\n else {\r\n // named slots\r\n return keys.reduce((arg, key) => {\r\n const slot = slots[key];\r\n if (slot) {\r\n arg[key] = slot();\r\n }\r\n return arg;\r\n }, {});\r\n }\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nfunction getFragmentableTag(tag) {\r\n return Fragment ;\r\n}\n\n/**\r\n * Translation Component\r\n *\r\n * @remarks\r\n * See the following items for property about details\r\n *\r\n * @VueI18nSee [TranslationProps](component#translationprops)\r\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\r\n * @VueI18nSee [Component Interpolation](../guide/advanced/component)\r\n *\r\n * @example\r\n * ```html\r\n * <div id=\"app\">\r\n * <!-- ... -->\r\n * <i18n path=\"term\" tag=\"label\" for=\"tos\">\r\n * <a :href=\"url\" target=\"_blank\">{{ $t('tos') }}</a>\r\n * </i18n>\r\n * <!-- ... -->\r\n * </div>\r\n * ```\r\n * ```js\r\n * import { createApp } from 'vue'\r\n * import { createI18n } from 'vue-i18n'\r\n *\r\n * const messages = {\r\n * en: {\r\n * tos: 'Term of Service',\r\n * term: 'I accept xxx {0}.'\r\n * },\r\n * ja: {\r\n * tos: '利用規約',\r\n * term: '私は xxx の{0}に同意します。'\r\n * }\r\n * }\r\n *\r\n * const i18n = createI18n({\r\n * locale: 'en',\r\n * messages\r\n * })\r\n *\r\n * const app = createApp({\r\n * data: {\r\n * url: '/term'\r\n * }\r\n * }).use(i18n).mount('#app')\r\n * ```\r\n *\r\n * @VueI18nComponent\r\n */\r\nconst Translation = /* defineComponent */ {\r\n /* eslint-disable */\r\n name: 'i18n-t',\r\n props: assign({\r\n keypath: {\r\n type: String,\r\n required: true\r\n },\r\n plural: {\r\n type: [Number, String],\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n validator: (val) => isNumber(val) || !isNaN(val)\r\n }\r\n }, baseFormatProps),\r\n /* eslint-enable */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setup(props, context) {\r\n const { slots, attrs } = context;\r\n // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\r\n const i18n = props.i18n ||\r\n useI18n({\r\n useScope: props.scope,\r\n __useComponent: true\r\n });\r\n return () => {\r\n const keys = Object.keys(slots).filter(key => key !== '_');\r\n const options = {};\r\n if (props.locale) {\r\n options.locale = props.locale;\r\n }\r\n if (props.plural !== undefined) {\r\n options.plural = isString(props.plural) ? +props.plural : props.plural;\r\n }\r\n const arg = getInterpolateArg(context, keys);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const children = i18n[TransrateVNodeSymbol](props.keypath, arg, options);\r\n const assignedAttrs = assign({}, attrs);\r\n const tag = isString(props.tag) || isObject(props.tag)\r\n ? props.tag\r\n : getFragmentableTag();\r\n return h(tag, assignedAttrs, children);\r\n };\r\n }\r\n};\n\nfunction isVNode(target) {\r\n return isArray(target) && !isString(target[0]);\r\n}\r\nfunction renderFormatter(props, context, slotKeys, partFormatter) {\r\n const { slots, attrs } = context;\r\n return () => {\r\n const options = { part: true };\r\n let overrides = {};\r\n if (props.locale) {\r\n options.locale = props.locale;\r\n }\r\n if (isString(props.format)) {\r\n options.key = props.format;\r\n }\r\n else if (isObject(props.format)) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n if (isString(props.format.key)) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n options.key = props.format.key;\r\n }\r\n // Filter out number format options only\r\n overrides = Object.keys(props.format).reduce((options, prop) => {\r\n return slotKeys.includes(prop)\r\n ? assign({}, options, { [prop]: props.format[prop] }) // eslint-disable-line @typescript-eslint/no-explicit-any\r\n : options;\r\n }, {});\r\n }\r\n const parts = partFormatter(...[props.value, options, overrides]);\r\n let children = [options.key];\r\n if (isArray(parts)) {\r\n children = parts.map((part, index) => {\r\n const slot = slots[part.type];\r\n const node = slot\r\n ? slot({ [part.type]: part.value, index, parts })\r\n : [part.value];\r\n if (isVNode(node)) {\r\n node[0].key = `${part.type}-${index}`;\r\n }\r\n return node;\r\n });\r\n }\r\n else if (isString(parts)) {\r\n children = [parts];\r\n }\r\n const assignedAttrs = assign({}, attrs);\r\n const tag = isString(props.tag) || isObject(props.tag)\r\n ? props.tag\r\n : getFragmentableTag();\r\n return h(tag, assignedAttrs, children);\r\n };\r\n}\n\n/**\r\n * Number Format Component\r\n *\r\n * @remarks\r\n * See the following items for property about details\r\n *\r\n * @VueI18nSee [FormattableProps](component#formattableprops)\r\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\r\n * @VueI18nSee [Custom Formatting](../guide/essentials/number#custom-formatting)\r\n *\r\n * @VueI18nDanger\r\n * Not supported IE, due to no support `Intl.NumberFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatToParts)\r\n *\r\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-numberformat)\r\n *\r\n * @VueI18nComponent\r\n */\r\nconst NumberFormat = /* defineComponent */ {\r\n /* eslint-disable */\r\n name: 'i18n-n',\r\n props: assign({\r\n value: {\r\n type: Number,\r\n required: true\r\n },\r\n format: {\r\n type: [String, Object]\r\n }\r\n }, baseFormatProps),\r\n /* eslint-enable */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setup(props, context) {\r\n const i18n = props.i18n ||\r\n useI18n({ useScope: 'parent', __useComponent: true });\r\n return renderFormatter(props, context, NUMBER_FORMAT_OPTIONS_KEYS, (...args) => \r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n i18n[NumberPartsSymbol](...args));\r\n }\r\n};\n\n/**\r\n * Datetime Format Component\r\n *\r\n * @remarks\r\n * See the following items for property about details\r\n *\r\n * @VueI18nSee [FormattableProps](component#formattableprops)\r\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\r\n * @VueI18nSee [Custom Formatting](../guide/essentials/datetime#custom-formatting)\r\n *\r\n * @VueI18nDanger\r\n * Not supported IE, due to no support `Intl.DateTimeFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts)\r\n *\r\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-datetimeformat)\r\n *\r\n * @VueI18nComponent\r\n */\r\nconst DatetimeFormat = /*defineComponent */ {\r\n /* eslint-disable */\r\n name: 'i18n-d',\r\n props: assign({\r\n value: {\r\n type: [Number, Date],\r\n required: true\r\n },\r\n format: {\r\n type: [String, Object]\r\n }\r\n }, baseFormatProps),\r\n /* eslint-enable */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setup(props, context) {\r\n const i18n = props.i18n ||\r\n useI18n({ useScope: 'parent', __useComponent: true });\r\n return renderFormatter(props, context, DATETIME_FORMAT_OPTIONS_KEYS, (...args) => \r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n i18n[DatetimePartsSymbol](...args));\r\n }\r\n};\n\nfunction getComposer$2(i18n, instance) {\r\n const i18nInternal = i18n;\r\n if (i18n.mode === 'composition') {\r\n return (i18nInternal.__getInstance(instance) || i18n.global);\r\n }\r\n else {\r\n const vueI18n = i18nInternal.__getInstance(instance);\r\n return vueI18n != null\r\n ? vueI18n.__composer\r\n : i18n.global.__composer;\r\n }\r\n}\r\nfunction vTDirective(i18n) {\r\n const _process = (binding) => {\r\n const { instance, modifiers, value } = binding;\r\n /* istanbul ignore if */\r\n if (!instance || !instance.$) {\r\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\r\n }\r\n const composer = getComposer$2(i18n, instance.$);\r\n if ((process.env.NODE_ENV !== 'production') && modifiers.preserve) {\r\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE));\r\n }\r\n const parsedValue = parseValue(value);\r\n return [\r\n Reflect.apply(composer.t, composer, [...makeParams(parsedValue)]),\r\n composer\r\n ];\r\n };\r\n const register = (el, binding) => {\r\n const [textContent, composer] = _process(binding);\r\n if (inBrowser && i18n.global === composer) {\r\n // global scope only\r\n el.__i18nWatcher = watch(composer.locale, () => {\r\n binding.instance && binding.instance.$forceUpdate();\r\n });\r\n }\r\n el.__composer = composer;\r\n el.textContent = textContent;\r\n };\r\n const unregister = (el) => {\r\n if (inBrowser && el.__i18nWatcher) {\r\n el.__i18nWatcher();\r\n el.__i18nWatcher = undefined;\r\n delete el.__i18nWatcher;\r\n }\r\n if (el.__composer) {\r\n el.__composer = undefined;\r\n delete el.__composer;\r\n }\r\n };\r\n const update = (el, { value }) => {\r\n if (el.__composer) {\r\n const composer = el.__composer;\r\n const parsedValue = parseValue(value);\r\n el.textContent = Reflect.apply(composer.t, composer, [\r\n ...makeParams(parsedValue)\r\n ]);\r\n }\r\n };\r\n const getSSRProps = (binding) => {\r\n const [textContent] = _process(binding);\r\n return { textContent };\r\n };\r\n return {\r\n created: register,\r\n unmounted: unregister,\r\n beforeUpdate: update,\r\n getSSRProps\r\n };\r\n}\r\nfunction parseValue(value) {\r\n if (isString(value)) {\r\n return { path: value };\r\n }\r\n else if (isPlainObject(value)) {\r\n if (!('path' in value)) {\r\n throw createI18nError(I18nErrorCodes.REQUIRED_VALUE, 'path');\r\n }\r\n return value;\r\n }\r\n else {\r\n throw createI18nError(I18nErrorCodes.INVALID_VALUE);\r\n }\r\n}\r\nfunction makeParams(value) {\r\n const { path, locale, args, choice, plural } = value;\r\n const options = {};\r\n const named = args || {};\r\n if (isString(locale)) {\r\n options.locale = locale;\r\n }\r\n if (isNumber(choice)) {\r\n options.plural = choice;\r\n }\r\n if (isNumber(plural)) {\r\n options.plural = plural;\r\n }\r\n return [path, named, options];\r\n}\n\nfunction apply(app, i18n, ...options) {\r\n const pluginOptions = isPlainObject(options[0])\r\n ? options[0]\r\n : {};\r\n const useI18nComponentName = !!pluginOptions.useI18nComponentName;\r\n const globalInstall = isBoolean(pluginOptions.globalInstall)\r\n ? pluginOptions.globalInstall\r\n : true;\r\n if ((process.env.NODE_ENV !== 'production') && globalInstall && useI18nComponentName) {\r\n warn(getWarnMessage(I18nWarnCodes.COMPONENT_NAME_LEGACY_COMPATIBLE, {\r\n name: Translation.name\r\n }));\r\n }\r\n if (globalInstall) {\r\n // install components\r\n app.component(!useI18nComponentName ? Translation.name : 'i18n', Translation);\r\n app.component(NumberFormat.name, NumberFormat);\r\n app.component(DatetimeFormat.name, DatetimeFormat);\r\n }\r\n // install directive\r\n {\r\n app.directive('t', vTDirective(i18n));\r\n }\r\n}\n\nconst VUE_I18N_COMPONENT_TYPES = 'vue-i18n: composer properties';\r\nlet devtoolsApi;\r\nasync function enableDevTools(app, i18n) {\r\n return new Promise((resolve, reject) => {\r\n try {\r\n setupDevtoolsPlugin({\r\n id: \"vue-devtools-plugin-vue-i18n\" /* PLUGIN */,\r\n label: VueDevToolsLabels[\"vue-devtools-plugin-vue-i18n\" /* PLUGIN */],\r\n packageName: 'vue-i18n',\r\n homepage: 'https://vue-i18n.intlify.dev',\r\n logo: 'https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png',\r\n componentStateTypes: [VUE_I18N_COMPONENT_TYPES],\r\n app: app // eslint-disable-line @typescript-eslint/no-explicit-any\r\n }, api => {\r\n devtoolsApi = api;\r\n api.on.visitComponentTree(({ componentInstance, treeNode }) => {\r\n updateComponentTreeTags(componentInstance, treeNode, i18n);\r\n });\r\n api.on.inspectComponent(({ componentInstance, instanceData }) => {\r\n if (componentInstance.vnode.el &&\r\n componentInstance.vnode.el.__VUE_I18N__ &&\r\n instanceData) {\r\n if (i18n.mode === 'legacy') {\r\n // ignore global scope on legacy mode\r\n if (componentInstance.vnode.el.__VUE_I18N__ !==\r\n i18n.global.__composer) {\r\n inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);\r\n }\r\n }\r\n else {\r\n inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);\r\n }\r\n }\r\n });\r\n api.addInspector({\r\n id: \"vue-i18n-resource-inspector\" /* CUSTOM_INSPECTOR */,\r\n label: VueDevToolsLabels[\"vue-i18n-resource-inspector\" /* CUSTOM_INSPECTOR */],\r\n icon: 'language',\r\n treeFilterPlaceholder: VueDevToolsPlaceholders[\"vue-i18n-resource-inspector\" /* CUSTOM_INSPECTOR */]\r\n });\r\n api.on.getInspectorTree(payload => {\r\n if (payload.app === app &&\r\n payload.inspectorId === \"vue-i18n-resource-inspector\" /* CUSTOM_INSPECTOR */) {\r\n registerScope(payload, i18n);\r\n }\r\n });\r\n const roots = new Map();\r\n api.on.getInspectorState(async (payload) => {\r\n if (payload.app === app &&\r\n payload.inspectorId === \"vue-i18n-resource-inspector\" /* CUSTOM_INSPECTOR */) {\r\n api.unhighlightElement();\r\n inspectScope(payload, i18n);\r\n if (payload.nodeId === 'global') {\r\n if (!roots.has(payload.app)) {\r\n const [root] = await api.getComponentInstances(payload.app);\r\n roots.set(payload.app, root);\r\n }\r\n api.highlightElement(roots.get(payload.app));\r\n }\r\n else {\r\n const instance = getComponentInstance(payload.nodeId, i18n);\r\n instance && api.highlightElement(instance);\r\n }\r\n }\r\n });\r\n api.on.editInspectorState(payload => {\r\n if (payload.app === app &&\r\n payload.inspectorId === \"vue-i18n-resource-inspector\" /* CUSTOM_INSPECTOR */) {\r\n editScope(payload, i18n);\r\n }\r\n });\r\n api.addTimelineLayer({\r\n id: \"vue-i18n-timeline\" /* TIMELINE */,\r\n label: VueDevToolsLabels[\"vue-i18n-timeline\" /* TIMELINE */],\r\n color: VueDevToolsTimelineColors[\"vue-i18n-timeline\" /* TIMELINE */]\r\n });\r\n resolve(true);\r\n });\r\n }\r\n catch (e) {\r\n console.error(e);\r\n reject(false);\r\n }\r\n });\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nfunction getI18nScopeLable(instance) {\r\n return (instance.type.name ||\r\n instance.type.displayName ||\r\n instance.type.__file ||\r\n 'Anonymous');\r\n}\r\nfunction updateComponentTreeTags(instance, // eslint-disable-line @typescript-eslint/no-explicit-any\r\ntreeNode, i18n) {\r\n // prettier-ignore\r\n const global = i18n.mode === 'composition'\r\n ? i18n.global\r\n : i18n.global.__composer;\r\n if (instance && instance.vnode.el && instance.vnode.el.__VUE_I18N__) {\r\n // add custom tags local scope only\r\n if (instance.vnode.el.__VUE_I18N__ !== global) {\r\n const tag = {\r\n label: `i18n (${getI18nScopeLable(instance)} Scope)`,\r\n textColor: 0x000000,\r\n backgroundColor: 0xffcd19\r\n };\r\n treeNode.tags.push(tag);\r\n }\r\n }\r\n}\r\nfunction inspectComposer(instanceData, composer) {\r\n const type = VUE_I18N_COMPONENT_TYPES;\r\n instanceData.state.push({\r\n type,\r\n key: 'locale',\r\n editable: true,\r\n value: composer.locale.value\r\n });\r\n instanceData.state.push({\r\n type,\r\n key: 'availableLocales',\r\n editable: false,\r\n value: composer.availableLocales\r\n });\r\n instanceData.state.push({\r\n type,\r\n key: 'fallbackLocale',\r\n editable: true,\r\n value: composer.fallbackLocale.value\r\n });\r\n instanceData.state.push({\r\n type,\r\n key: 'inheritLocale',\r\n editable: true,\r\n value: composer.inheritLocale\r\n });\r\n instanceData.state.push({\r\n type,\r\n key: 'messages',\r\n editable: false,\r\n value: getLocaleMessageValue(composer.messages.value)\r\n });\r\n {\r\n instanceData.state.push({\r\n type,\r\n key: 'datetimeFormats',\r\n editable: false,\r\n value: composer.datetimeFormats.value\r\n });\r\n instanceData.state.push({\r\n type,\r\n key: 'numberFormats',\r\n editable: false,\r\n value: composer.numberFormats.value\r\n });\r\n }\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nfunction getLocaleMessageValue(messages) {\r\n const value = {};\r\n Object.keys(messages).forEach((key) => {\r\n const v = messages[key];\r\n if (isFunction(v) && 'source' in v) {\r\n value[key] = getMessageFunctionDetails(v);\r\n }\r\n else if (isObject(v)) {\r\n value[key] = getLocaleMessageValue(v);\r\n }\r\n else {\r\n value[key] = v;\r\n }\r\n });\r\n return value;\r\n}\r\nconst ESC = {\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"',\r\n '&': '&'\r\n};\r\nfunction escape(s) {\r\n return s.replace(/[<>\"&]/g, escapeChar);\r\n}\r\nfunction escapeChar(a) {\r\n return ESC[a] || a;\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nfunction getMessageFunctionDetails(func) {\r\n const argString = func.source ? `(\"${escape(func.source)}\")` : `(?)`;\r\n return {\r\n _custom: {\r\n type: 'function',\r\n display: `<span>ƒ</span> ${argString}`\r\n }\r\n };\r\n}\r\nfunction registerScope(payload, i18n) {\r\n payload.rootNodes.push({\r\n id: 'global',\r\n label: 'Global Scope'\r\n });\r\n // prettier-ignore\r\n const global = i18n.mode === 'composition'\r\n ? i18n.global\r\n : i18n.global.__composer;\r\n for (const [keyInstance, instance] of i18n.__instances) {\r\n // prettier-ignore\r\n const composer = i18n.mode === 'composition'\r\n ? instance\r\n : instance.__composer;\r\n if (global === composer) {\r\n continue;\r\n }\r\n payload.rootNodes.push({\r\n id: composer.id.toString(),\r\n label: `${getI18nScopeLable(keyInstance)} Scope`\r\n });\r\n }\r\n}\r\nfunction getComponentInstance(nodeId, i18n) {\r\n let instance = null;\r\n if (nodeId !== 'global') {\r\n for (const [component, composer] of i18n.__instances.entries()) {\r\n if (composer.id.toString() === nodeId) {\r\n instance = component;\r\n break;\r\n }\r\n }\r\n }\r\n return instance;\r\n}\r\nfunction getComposer$1(nodeId, i18n) {\r\n if (nodeId === 'global') {\r\n return i18n.mode === 'composition'\r\n ? i18n.global\r\n : i18n.global.__composer;\r\n }\r\n else {\r\n const instance = Array.from(i18n.__instances.values()).find(item => item.id.toString() === nodeId);\r\n if (instance) {\r\n return i18n.mode === 'composition'\r\n ? instance\r\n : instance.__composer;\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n}\r\nfunction inspectScope(payload, i18n\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n) {\r\n const composer = getComposer$1(payload.nodeId, i18n);\r\n if (composer) {\r\n // TODO:\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n payload.state = makeScopeInspectState(composer);\r\n }\r\n return null;\r\n}\r\nfunction makeScopeInspectState(composer) {\r\n const state = {};\r\n const localeType = 'Locale related info';\r\n const localeStates = [\r\n {\r\n type: localeType,\r\n key: 'locale',\r\n editable: true,\r\n value: composer.locale.value\r\n },\r\n {\r\n type: localeType,\r\n key: 'fallbackLocale',\r\n editable: true,\r\n value: composer.fallbackLocale.value\r\n },\r\n {\r\n type: localeType,\r\n key: 'availableLocales',\r\n editable: false,\r\n value: composer.availableLocales\r\n },\r\n {\r\n type: localeType,\r\n key: 'inheritLocale',\r\n editable: true,\r\n value: composer.inheritLocale\r\n }\r\n ];\r\n state[localeType] = localeStates;\r\n const localeMessagesType = 'Locale messages info';\r\n const localeMessagesStates = [\r\n {\r\n type: localeMessagesType,\r\n key: 'messages',\r\n editable: false,\r\n value: getLocaleMessageValue(composer.messages.value)\r\n }\r\n ];\r\n state[localeMessagesType] = localeMessagesStates;\r\n {\r\n const datetimeFormatsType = 'Datetime formats info';\r\n const datetimeFormatsStates = [\r\n {\r\n type: datetimeFormatsType,\r\n key: 'datetimeFormats',\r\n editable: false,\r\n value: composer.datetimeFormats.value\r\n }\r\n ];\r\n state[datetimeFormatsType] = datetimeFormatsStates;\r\n const numberFormatsType = 'Datetime formats info';\r\n const numberFormatsStates = [\r\n {\r\n type: numberFormatsType,\r\n key: 'numberFormats',\r\n editable: false,\r\n value: composer.numberFormats.value\r\n }\r\n ];\r\n state[numberFormatsType] = numberFormatsStates;\r\n }\r\n return state;\r\n}\r\nfunction addTimelineEvent(event, payload) {\r\n if (devtoolsApi) {\r\n let groupId;\r\n if (payload && 'groupId' in payload) {\r\n groupId = payload.groupId;\r\n delete payload.groupId;\r\n }\r\n devtoolsApi.addTimelineEvent({\r\n layerId: \"vue-i18n-timeline\" /* TIMELINE */,\r\n event: {\r\n title: event,\r\n groupId,\r\n time: Date.now(),\r\n meta: {},\r\n data: payload || {},\r\n logType: event === \"compile-error\" /* COMPILE_ERROR */\r\n ? 'error'\r\n : event === \"fallback\" /* FALBACK */ ||\r\n event === \"missing\" /* MISSING */\r\n ? 'warning'\r\n : 'default'\r\n }\r\n });\r\n }\r\n}\r\nfunction editScope(payload, i18n) {\r\n const composer = getComposer$1(payload.nodeId, i18n);\r\n if (composer) {\r\n const [field] = payload.path;\r\n if (field === 'locale' && isString(payload.state.value)) {\r\n composer.locale.value = payload.state.value;\r\n }\r\n else if (field === 'fallbackLocale' &&\r\n (isString(payload.state.value) ||\r\n isArray(payload.state.value) ||\r\n isObject(payload.state.value))) {\r\n composer.fallbackLocale.value = payload.state.value;\r\n }\r\n else if (field === 'inheritLocale' && isBoolean(payload.state.value)) {\r\n composer.inheritLocale = payload.state.value;\r\n }\r\n }\r\n}\n\n/**\r\n * Supports compatibility for legacy vue-i18n APIs\r\n * This mixin is used when we use vue-i18n@v9.x or later\r\n */\r\nfunction defineMixin(vuei18n, composer, i18n) {\r\n return {\r\n beforeCreate() {\r\n const instance = getCurrentInstance();\r\n /* istanbul ignore if */\r\n if (!instance) {\r\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\r\n }\r\n const options = this.$options;\r\n if (options.i18n) {\r\n const optionsI18n = options.i18n;\r\n if (options.__i18n) {\r\n optionsI18n.__i18n = options.__i18n;\r\n }\r\n optionsI18n.__root = composer;\r\n if (this === this.$root) {\r\n this.$i18n = mergeToRoot(vuei18n, optionsI18n);\r\n }\r\n else {\r\n optionsI18n.__injectWithOption = true;\r\n this.$i18n = createVueI18n(optionsI18n);\r\n }\r\n }\r\n else if (options.__i18n) {\r\n if (this === this.$root) {\r\n this.$i18n = mergeToRoot(vuei18n, options);\r\n }\r\n else {\r\n this.$i18n = createVueI18n({\r\n __i18n: options.__i18n,\r\n __injectWithOption: true,\r\n __root: composer\r\n });\r\n }\r\n }\r\n else {\r\n // set global\r\n this.$i18n = vuei18n;\r\n }\r\n if (options.__i18nGlobal) {\r\n adjustI18nResources(composer, options, options);\r\n }\r\n vuei18n.__onComponentInstanceCreated(this.$i18n);\r\n i18n.__setInstance(instance, this.$i18n);\r\n // defines vue-i18n legacy APIs\r\n this.$t = (...args) => this.$i18n.t(...args);\r\n this.$rt = (...args) => this.$i18n.rt(...args);\r\n this.$tc = (...args) => this.$i18n.tc(...args);\r\n this.$te = (key, locale) => this.$i18n.te(key, locale);\r\n this.$d = (...args) => this.$i18n.d(...args);\r\n this.$n = (...args) => this.$i18n.n(...args);\r\n this.$tm = (key) => this.$i18n.tm(key);\r\n },\r\n mounted() {\r\n /* istanbul ignore if */\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\r\n !false &&\r\n this.$el &&\r\n this.$i18n) {\r\n this.$el.__VUE_I18N__ = this.$i18n.__composer;\r\n const emitter = (this.__v_emitter =\r\n createEmitter());\r\n const _vueI18n = this.$i18n;\r\n _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);\r\n emitter.on('*', addTimelineEvent);\r\n }\r\n },\r\n unmounted() {\r\n const instance = getCurrentInstance();\r\n /* istanbul ignore if */\r\n if (!instance) {\r\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\r\n }\r\n /* istanbul ignore if */\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\r\n !false &&\r\n this.$el &&\r\n this.$el.__VUE_I18N__) {\r\n if (this.__v_emitter) {\r\n this.__v_emitter.off('*', addTimelineEvent);\r\n delete this.__v_emitter;\r\n }\r\n if (this.$i18n) {\r\n const _vueI18n = this.$i18n;\r\n _vueI18n.__disableEmitter && _vueI18n.__disableEmitter();\r\n delete this.$el.__VUE_I18N__;\r\n }\r\n }\r\n delete this.$t;\r\n delete this.$rt;\r\n delete this.$tc;\r\n delete this.$te;\r\n delete this.$d;\r\n delete this.$n;\r\n delete this.$tm;\r\n i18n.__deleteInstance(instance);\r\n delete this.$i18n;\r\n }\r\n };\r\n}\r\nfunction mergeToRoot(root, options) {\r\n root.locale = options.locale || root.locale;\r\n root.fallbackLocale = options.fallbackLocale || root.fallbackLocale;\r\n root.missing = options.missing || root.missing;\r\n root.silentTranslationWarn =\r\n options.silentTranslationWarn || root.silentFallbackWarn;\r\n root.silentFallbackWarn =\r\n options.silentFallbackWarn || root.silentFallbackWarn;\r\n root.formatFallbackMessages =\r\n options.formatFallbackMessages || root.formatFallbackMessages;\r\n root.postTranslation = options.postTranslation || root.postTranslation;\r\n root.warnHtmlInMessage = options.warnHtmlInMessage || root.warnHtmlInMessage;\r\n root.escapeParameterHtml =\r\n options.escapeParameterHtml || root.escapeParameterHtml;\r\n root.sync = options.sync || root.sync;\r\n root.__composer[SetPluralRulesSymbol](options.pluralizationRules || root.pluralizationRules);\r\n const messages = getLocaleMessages(root.locale, {\r\n messages: options.messages,\r\n __i18n: options.__i18n\r\n });\r\n Object.keys(messages).forEach(locale => root.mergeLocaleMessage(locale, messages[locale]));\r\n if (options.datetimeFormats) {\r\n Object.keys(options.datetimeFormats).forEach(locale => root.mergeDateTimeFormat(locale, options.datetimeFormats[locale]));\r\n }\r\n if (options.numberFormats) {\r\n Object.keys(options.numberFormats).forEach(locale => root.mergeNumberFormat(locale, options.numberFormats[locale]));\r\n }\r\n return root;\r\n}\n\n/**\r\n * Injection key for {@link useI18n}\r\n *\r\n * @remarks\r\n * The global injection key for I18n instances with `useI18n`. this injection key is used in Web Components.\r\n * Specify the i18n instance created by {@link createI18n} together with `provide` function.\r\n *\r\n * @VueI18nGeneral\r\n */\r\nconst I18nInjectionKey = \r\n/* #__PURE__*/ makeSymbol('global-vue-i18n');\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\r\nfunction createI18n(options = {}, VueI18nLegacy) {\r\n // prettier-ignore\r\n const __legacyMode = __VUE_I18N_LEGACY_API__ && isBoolean(options.legacy)\r\n ? options.legacy\r\n : __VUE_I18N_LEGACY_API__;\r\n // prettier-ignore\r\n const __globalInjection = isBoolean(options.globalInjection)\r\n ? options.globalInjection\r\n : true;\r\n // prettier-ignore\r\n const __allowComposition = __VUE_I18N_LEGACY_API__ && __legacyMode\r\n ? !!options.allowComposition\r\n : true;\r\n const __instances = new Map();\r\n const [globalScope, __global] = createGlobal(options, __legacyMode);\r\n const symbol = makeSymbol((process.env.NODE_ENV !== 'production') ? 'vue-i18n' : '');\r\n function __getInstance(component) {\r\n return __instances.get(component) || null;\r\n }\r\n function __setInstance(component, instance) {\r\n __instances.set(component, instance);\r\n }\r\n function __deleteInstance(component) {\r\n __instances.delete(component);\r\n }\r\n {\r\n const i18n = {\r\n // mode\r\n get mode() {\r\n return __VUE_I18N_LEGACY_API__ && __legacyMode\r\n ? 'legacy'\r\n : 'composition';\r\n },\r\n // allowComposition\r\n get allowComposition() {\r\n return __allowComposition;\r\n },\r\n // install plugin\r\n async install(app, ...options) {\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\r\n !false) {\r\n app.__VUE_I18N__ = i18n;\r\n }\r\n // setup global provider\r\n app.__VUE_I18N_SYMBOL__ = symbol;\r\n app.provide(app.__VUE_I18N_SYMBOL__, i18n);\r\n // global method and properties injection for Composition API\r\n if (!__legacyMode && __globalInjection) {\r\n injectGlobalFields(app, i18n.global);\r\n }\r\n // install built-in components and directive\r\n if (__VUE_I18N_FULL_INSTALL__) {\r\n apply(app, i18n, ...options);\r\n }\r\n // setup mixin for Legacy API\r\n if (__VUE_I18N_LEGACY_API__ && __legacyMode) {\r\n app.mixin(defineMixin(__global, __global.__composer, i18n));\r\n }\r\n // release global scope\r\n const unmountApp = app.unmount;\r\n app.unmount = () => {\r\n i18n.dispose();\r\n unmountApp();\r\n };\r\n // setup vue-devtools plugin\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && !false) {\r\n const ret = await enableDevTools(app, i18n);\r\n if (!ret) {\r\n throw createI18nError(I18nErrorCodes.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);\r\n }\r\n const emitter = createEmitter();\r\n if (__legacyMode) {\r\n const _vueI18n = __global;\r\n _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);\r\n }\r\n else {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const _composer = __global;\r\n _composer[EnableEmitter] && _composer[EnableEmitter](emitter);\r\n }\r\n emitter.on('*', addTimelineEvent);\r\n }\r\n },\r\n // global accessor\r\n get global() {\r\n return __global;\r\n },\r\n dispose() {\r\n globalScope.stop();\r\n },\r\n // @internal\r\n __instances,\r\n // @internal\r\n __getInstance,\r\n // @internal\r\n __setInstance,\r\n // @internal\r\n __deleteInstance\r\n };\r\n return i18n;\r\n }\r\n}\r\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\r\nfunction useI18n(options = {}) {\r\n const instance = getCurrentInstance();\r\n if (instance == null) {\r\n throw createI18nError(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);\r\n }\r\n if (!instance.isCE &&\r\n instance.appContext.app != null &&\r\n !instance.appContext.app.__VUE_I18N_SYMBOL__) {\r\n throw createI18nError(I18nErrorCodes.NOT_INSLALLED);\r\n }\r\n const i18n = getI18nInstance(instance);\r\n const global = getGlobalComposer(i18n);\r\n const componentOptions = getComponentOptions(instance);\r\n const scope = getScope(options, componentOptions);\r\n if (__VUE_I18N_LEGACY_API__) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n if (i18n.mode === 'legacy' && !options.__useComponent) {\r\n if (!i18n.allowComposition) {\r\n throw createI18nError(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);\r\n }\r\n return useI18nForLegacy(instance, scope, global, options);\r\n }\r\n }\r\n if (scope === 'global') {\r\n adjustI18nResources(global, options, componentOptions);\r\n return global;\r\n }\r\n if (scope === 'parent') {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n let composer = getComposer(i18n, instance, options.__useComponent);\r\n if (composer == null) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(getWarnMessage(I18nWarnCodes.NOT_FOUND_PARENT_SCOPE));\r\n }\r\n composer = global;\r\n }\r\n return composer;\r\n }\r\n const i18nInternal = i18n;\r\n let composer = i18nInternal.__getInstance(instance);\r\n if (composer == null) {\r\n const composerOptions = assign({}, options);\r\n if ('__i18n' in componentOptions) {\r\n composerOptions.__i18n = componentOptions.__i18n;\r\n }\r\n if (global) {\r\n composerOptions.__root = global;\r\n }\r\n composer = createComposer(composerOptions);\r\n setupLifeCycle(i18nInternal, instance, composer);\r\n i18nInternal.__setInstance(instance, composer);\r\n }\r\n return composer;\r\n}\r\n/**\r\n * Cast to VueI18n legacy compatible type\r\n *\r\n * @remarks\r\n * This API is provided only with [vue-i18n-bridge](https://vue-i18n.intlify.dev/guide/migration/ways.html#what-is-vue-i18n-bridge).\r\n *\r\n * The purpose of this function is to convert an {@link I18n} instance created with {@link createI18n | createI18n(legacy: true)} into a `vue-i18n@v8.x` compatible instance of `new VueI18n` in a TypeScript environment.\r\n *\r\n * @param i18n - An instance of {@link I18n}\r\n * @returns A i18n instance which is casted to {@link VueI18n} type\r\n *\r\n * @VueI18nTip\r\n * :new: provided by **vue-i18n-bridge only**\r\n *\r\n * @VueI18nGeneral\r\n */\r\nconst castToVueI18n = (i18n\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n) => {\r\n if (!(__VUE_I18N_BRIDGE__ in i18n)) {\r\n throw createI18nError(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);\r\n }\r\n return i18n;\r\n};\r\nfunction createGlobal(options, legacyMode, VueI18nLegacy // eslint-disable-line @typescript-eslint/no-explicit-any\r\n) {\r\n const scope = effectScope();\r\n {\r\n const obj = __VUE_I18N_LEGACY_API__ && legacyMode\r\n ? scope.run(() => createVueI18n(options))\r\n : scope.run(() => createComposer(options));\r\n if (obj == null) {\r\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\r\n }\r\n return [scope, obj];\r\n }\r\n}\r\nfunction getI18nInstance(instance) {\r\n {\r\n const i18n = inject(!instance.isCE\r\n ? instance.appContext.app.__VUE_I18N_SYMBOL__\r\n : I18nInjectionKey);\r\n /* istanbul ignore if */\r\n if (!i18n) {\r\n throw createI18nError(!instance.isCE\r\n ? I18nErrorCodes.UNEXPECTED_ERROR\r\n : I18nErrorCodes.NOT_INSLALLED_WITH_PROVIDE);\r\n }\r\n return i18n;\r\n }\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nfunction getScope(options, componentOptions) {\r\n // prettier-ignore\r\n return isEmptyObject(options)\r\n ? ('__i18n' in componentOptions)\r\n ? 'local'\r\n : 'global'\r\n : !options.useScope\r\n ? 'local'\r\n : options.useScope;\r\n}\r\nfunction getGlobalComposer(i18n) {\r\n // prettier-ignore\r\n return i18n.mode === 'composition'\r\n ? i18n.global\r\n : i18n.global.__composer\r\n ;\r\n}\r\nfunction getComposer(i18n, target, useComponent = false) {\r\n let composer = null;\r\n const root = target.root;\r\n let current = target.parent;\r\n while (current != null) {\r\n const i18nInternal = i18n;\r\n if (i18n.mode === 'composition') {\r\n composer = i18nInternal.__getInstance(current);\r\n }\r\n else {\r\n if (__VUE_I18N_LEGACY_API__) {\r\n const vueI18n = i18nInternal.__getInstance(current);\r\n if (vueI18n != null) {\r\n composer = vueI18n\r\n .__composer;\r\n if (useComponent &&\r\n composer &&\r\n !composer[InejctWithOption] // eslint-disable-line @typescript-eslint/no-explicit-any\r\n ) {\r\n composer = null;\r\n }\r\n }\r\n }\r\n }\r\n if (composer != null) {\r\n break;\r\n }\r\n if (root === current) {\r\n break;\r\n }\r\n current = current.parent;\r\n }\r\n return composer;\r\n}\r\nfunction setupLifeCycle(i18n, target, composer) {\r\n let emitter = null;\r\n {\r\n onMounted(() => {\r\n // inject composer instance to DOM for intlify-devtools\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\r\n !false &&\r\n target.vnode.el) {\r\n target.vnode.el.__VUE_I18N__ = composer;\r\n emitter = createEmitter();\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const _composer = composer;\r\n _composer[EnableEmitter] && _composer[EnableEmitter](emitter);\r\n emitter.on('*', addTimelineEvent);\r\n }\r\n }, target);\r\n onUnmounted(() => {\r\n // remove composer instance from DOM for intlify-devtools\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\r\n !false &&\r\n target.vnode.el &&\r\n target.vnode.el.__VUE_I18N__) {\r\n emitter && emitter.off('*', addTimelineEvent);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const _composer = composer;\r\n _composer[DisableEmitter] && _composer[DisableEmitter]();\r\n delete target.vnode.el.__VUE_I18N__;\r\n }\r\n i18n.__deleteInstance(target);\r\n }, target);\r\n }\r\n}\r\nfunction useI18nForLegacy(instance, scope, root, options = {} // eslint-disable-line @typescript-eslint/no-explicit-any\r\n) {\r\n const isLocale = scope === 'local';\r\n const _composer = shallowRef(null);\r\n if (isLocale &&\r\n instance.proxy &&\r\n !(instance.proxy.$options.i18n || instance.proxy.$options.__i18n)) {\r\n throw createI18nError(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);\r\n }\r\n const _inheritLocale = isBoolean(options.inheritLocale)\r\n ? options.inheritLocale\r\n : true;\r\n const _locale = ref(\r\n // prettier-ignore\r\n isLocale && _inheritLocale\r\n ? root.locale.value\r\n : isString(options.locale)\r\n ? options.locale\r\n : DEFAULT_LOCALE);\r\n const _fallbackLocale = ref(\r\n // prettier-ignore\r\n isLocale && _inheritLocale\r\n ? root.fallbackLocale.value\r\n : isString(options.fallbackLocale) ||\r\n isArray(options.fallbackLocale) ||\r\n isPlainObject(options.fallbackLocale) ||\r\n options.fallbackLocale === false\r\n ? options.fallbackLocale\r\n : _locale.value);\r\n const _messages = ref(getLocaleMessages(_locale.value, options));\r\n // prettier-ignore\r\n const _datetimeFormats = ref(isPlainObject(options.datetimeFormats)\r\n ? options.datetimeFormats\r\n : { [_locale.value]: {} });\r\n // prettier-ignore\r\n const _numberFormats = ref(isPlainObject(options.numberFormats)\r\n ? options.numberFormats\r\n : { [_locale.value]: {} });\r\n // prettier-ignore\r\n const _missingWarn = isLocale\r\n ? root.missingWarn\r\n : isBoolean(options.missingWarn) || isRegExp(options.missingWarn)\r\n ? options.missingWarn\r\n : true;\r\n // prettier-ignore\r\n const _fallbackWarn = isLocale\r\n ? root.fallbackWarn\r\n : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)\r\n ? options.fallbackWarn\r\n : true;\r\n // prettier-ignore\r\n const _fallbackRoot = isLocale\r\n ? root.fallbackRoot\r\n : isBoolean(options.fallbackRoot)\r\n ? options.fallbackRoot\r\n : true;\r\n // configure fall back to root\r\n const _fallbackFormat = !!options.fallbackFormat;\r\n // runtime missing\r\n const _missing = isFunction(options.missing) ? options.missing : null;\r\n // postTranslation handler\r\n const _postTranslation = isFunction(options.postTranslation)\r\n ? options.postTranslation\r\n : null;\r\n // prettier-ignore\r\n const _warnHtmlMessage = isLocale\r\n ? root.warnHtmlMessage\r\n : isBoolean(options.warnHtmlMessage)\r\n ? options.warnHtmlMessage\r\n : true;\r\n const _escapeParameter = !!options.escapeParameter;\r\n // prettier-ignore\r\n const _modifiers = isLocale\r\n ? root.modifiers\r\n : isPlainObject(options.modifiers)\r\n ? options.modifiers\r\n : {};\r\n // pluralRules\r\n const _pluralRules = options.pluralRules || (isLocale && root.pluralRules);\r\n // track reactivity\r\n function trackReactivityValues() {\r\n return [\r\n _locale.value,\r\n _fallbackLocale.value,\r\n _messages.value,\r\n _datetimeFormats.value,\r\n _numberFormats.value\r\n ];\r\n }\r\n // locale\r\n const locale = computed({\r\n get: () => {\r\n return _composer.value ? _composer.value.locale.value : _locale.value;\r\n },\r\n set: val => {\r\n if (_composer.value) {\r\n _composer.value.locale.value = val;\r\n }\r\n _locale.value = val;\r\n }\r\n });\r\n // fallbackLocale\r\n const fallbackLocale = computed({\r\n get: () => {\r\n return _composer.value\r\n ? _composer.value.fallbackLocale.value\r\n : _fallbackLocale.value;\r\n },\r\n set: val => {\r\n if (_composer.value) {\r\n _composer.value.fallbackLocale.value = val;\r\n }\r\n _fallbackLocale.value = val;\r\n }\r\n });\r\n // messages\r\n const messages = computed(() => {\r\n if (_composer.value) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return _composer.value.messages.value;\r\n }\r\n else {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return _messages.value;\r\n }\r\n });\r\n const datetimeFormats = computed(() => _datetimeFormats.value);\r\n const numberFormats = computed(() => _numberFormats.value);\r\n function getPostTranslationHandler() {\r\n return _composer.value\r\n ? _composer.value.getPostTranslationHandler()\r\n : _postTranslation;\r\n }\r\n function setPostTranslationHandler(handler) {\r\n if (_composer.value) {\r\n _composer.value.setPostTranslationHandler(handler);\r\n }\r\n }\r\n function getMissingHandler() {\r\n return _composer.value ? _composer.value.getMissingHandler() : _missing;\r\n }\r\n function setMissingHandler(handler) {\r\n if (_composer.value) {\r\n _composer.value.setMissingHandler(handler);\r\n }\r\n }\r\n function warpWithDeps(fn) {\r\n trackReactivityValues();\r\n return fn();\r\n }\r\n function t(...args) {\r\n return _composer.value\r\n ? warpWithDeps(() => Reflect.apply(_composer.value.t, null, [...args]))\r\n : warpWithDeps(() => '');\r\n }\r\n function rt(...args) {\r\n return _composer.value\r\n ? Reflect.apply(_composer.value.rt, null, [...args])\r\n : '';\r\n }\r\n function d(...args) {\r\n return _composer.value\r\n ? warpWithDeps(() => Reflect.apply(_composer.value.d, null, [...args]))\r\n : warpWithDeps(() => '');\r\n }\r\n function n(...args) {\r\n return _composer.value\r\n ? warpWithDeps(() => Reflect.apply(_composer.value.n, null, [...args]))\r\n : warpWithDeps(() => '');\r\n }\r\n function tm(key) {\r\n return _composer.value ? _composer.value.tm(key) : {};\r\n }\r\n function te(key, locale) {\r\n return _composer.value ? _composer.value.te(key, locale) : false;\r\n }\r\n function getLocaleMessage(locale) {\r\n return _composer.value ? _composer.value.getLocaleMessage(locale) : {};\r\n }\r\n function setLocaleMessage(locale, message) {\r\n if (_composer.value) {\r\n _composer.value.setLocaleMessage(locale, message);\r\n _messages.value[locale] = message;\r\n }\r\n }\r\n function mergeLocaleMessage(locale, message) {\r\n if (_composer.value) {\r\n _composer.value.mergeLocaleMessage(locale, message);\r\n }\r\n }\r\n function getDateTimeFormat(locale) {\r\n return _composer.value ? _composer.value.getDateTimeFormat(locale) : {};\r\n }\r\n function setDateTimeFormat(locale, format) {\r\n if (_composer.value) {\r\n _composer.value.setDateTimeFormat(locale, format);\r\n _datetimeFormats.value[locale] = format;\r\n }\r\n }\r\n function mergeDateTimeFormat(locale, format) {\r\n if (_composer.value) {\r\n _composer.value.mergeDateTimeFormat(locale, format);\r\n }\r\n }\r\n function getNumberFormat(locale) {\r\n return _composer.value ? _composer.value.getNumberFormat(locale) : {};\r\n }\r\n function setNumberFormat(locale, format) {\r\n if (_composer.value) {\r\n _composer.value.setNumberFormat(locale, format);\r\n _numberFormats.value[locale] = format;\r\n }\r\n }\r\n function mergeNumberFormat(locale, format) {\r\n if (_composer.value) {\r\n _composer.value.mergeNumberFormat(locale, format);\r\n }\r\n }\r\n const wrapper = {\r\n get id() {\r\n return _composer.value ? _composer.value.id : -1;\r\n },\r\n locale,\r\n fallbackLocale,\r\n messages,\r\n datetimeFormats,\r\n numberFormats,\r\n get inheritLocale() {\r\n return _composer.value ? _composer.value.inheritLocale : _inheritLocale;\r\n },\r\n set inheritLocale(val) {\r\n if (_composer.value) {\r\n _composer.value.inheritLocale = val;\r\n }\r\n },\r\n get availableLocales() {\r\n return _composer.value\r\n ? _composer.value.availableLocales\r\n : Object.keys(_messages.value);\r\n },\r\n get modifiers() {\r\n return (_composer.value ? _composer.value.modifiers : _modifiers);\r\n },\r\n get pluralRules() {\r\n return (_composer.value ? _composer.value.pluralRules : _pluralRules);\r\n },\r\n get isGlobal() {\r\n return _composer.value ? _composer.value.isGlobal : false;\r\n },\r\n get missingWarn() {\r\n return _composer.value ? _composer.value.missingWarn : _missingWarn;\r\n },\r\n set missingWarn(val) {\r\n if (_composer.value) {\r\n _composer.value.missingWarn = val;\r\n }\r\n },\r\n get fallbackWarn() {\r\n return _composer.value ? _composer.value.fallbackWarn : _fallbackWarn;\r\n },\r\n set fallbackWarn(val) {\r\n if (_composer.value) {\r\n _composer.value.missingWarn = val;\r\n }\r\n },\r\n get fallbackRoot() {\r\n return _composer.value ? _composer.value.fallbackRoot : _fallbackRoot;\r\n },\r\n set fallbackRoot(val) {\r\n if (_composer.value) {\r\n _composer.value.fallbackRoot = val;\r\n }\r\n },\r\n get fallbackFormat() {\r\n return _composer.value ? _composer.value.fallbackFormat : _fallbackFormat;\r\n },\r\n set fallbackFormat(val) {\r\n if (_composer.value) {\r\n _composer.value.fallbackFormat = val;\r\n }\r\n },\r\n get warnHtmlMessage() {\r\n return _composer.value\r\n ? _composer.value.warnHtmlMessage\r\n : _warnHtmlMessage;\r\n },\r\n set warnHtmlMessage(val) {\r\n if (_composer.value) {\r\n _composer.value.warnHtmlMessage = val;\r\n }\r\n },\r\n get escapeParameter() {\r\n return _composer.value\r\n ? _composer.value.escapeParameter\r\n : _escapeParameter;\r\n },\r\n set escapeParameter(val) {\r\n if (_composer.value) {\r\n _composer.value.escapeParameter = val;\r\n }\r\n },\r\n t,\r\n getPostTranslationHandler,\r\n setPostTranslationHandler,\r\n getMissingHandler,\r\n setMissingHandler,\r\n rt,\r\n d,\r\n n,\r\n tm,\r\n te,\r\n getLocaleMessage,\r\n setLocaleMessage,\r\n mergeLocaleMessage,\r\n getDateTimeFormat,\r\n setDateTimeFormat,\r\n mergeDateTimeFormat,\r\n getNumberFormat,\r\n setNumberFormat,\r\n mergeNumberFormat\r\n };\r\n function sync(composer) {\r\n composer.locale.value = _locale.value;\r\n composer.fallbackLocale.value = _fallbackLocale.value;\r\n Object.keys(_messages.value).forEach(locale => {\r\n composer.mergeLocaleMessage(locale, _messages.value[locale]);\r\n });\r\n Object.keys(_datetimeFormats.value).forEach(locale => {\r\n composer.mergeDateTimeFormat(locale, _datetimeFormats.value[locale]);\r\n });\r\n Object.keys(_numberFormats.value).forEach(locale => {\r\n composer.mergeNumberFormat(locale, _numberFormats.value[locale]);\r\n });\r\n composer.escapeParameter = _escapeParameter;\r\n composer.fallbackFormat = _fallbackFormat;\r\n composer.fallbackRoot = _fallbackRoot;\r\n composer.fallbackWarn = _fallbackWarn;\r\n composer.missingWarn = _missingWarn;\r\n composer.warnHtmlMessage = _warnHtmlMessage;\r\n }\r\n onBeforeMount(() => {\r\n if (instance.proxy == null || instance.proxy.$i18n == null) {\r\n throw createI18nError(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const composer = (_composer.value = instance.proxy.$i18n\r\n .__composer);\r\n if (scope === 'global') {\r\n _locale.value = composer.locale.value;\r\n _fallbackLocale.value = composer.fallbackLocale.value;\r\n _messages.value = composer.messages.value;\r\n _datetimeFormats.value = composer.datetimeFormats.value;\r\n _numberFormats.value = composer.numberFormats.value;\r\n }\r\n else if (isLocale) {\r\n sync(composer);\r\n }\r\n });\r\n return wrapper;\r\n}\r\nconst globalExportProps = [\r\n 'locale',\r\n 'fallbackLocale',\r\n 'availableLocales'\r\n];\r\nconst globalExportMethods = ['t', 'rt', 'd', 'n', 'tm'] ;\r\nfunction injectGlobalFields(app, composer) {\r\n const i18n = Object.create(null);\r\n globalExportProps.forEach(prop => {\r\n const desc = Object.getOwnPropertyDescriptor(composer, prop);\r\n if (!desc) {\r\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\r\n }\r\n const wrap = isRef(desc.value) // check computed props\r\n ? {\r\n get() {\r\n return desc.value.value;\r\n },\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n set(val) {\r\n desc.value.value = val;\r\n }\r\n }\r\n : {\r\n get() {\r\n return desc.get && desc.get();\r\n }\r\n };\r\n Object.defineProperty(i18n, prop, wrap);\r\n });\r\n app.config.globalProperties.$i18n = i18n;\r\n globalExportMethods.forEach(method => {\r\n const desc = Object.getOwnPropertyDescriptor(composer, method);\r\n if (!desc || !desc.value) {\r\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\r\n }\r\n Object.defineProperty(app.config.globalProperties, `$${method}`, desc);\r\n });\r\n}\n\n// register message compiler at vue-i18n\r\nregisterMessageCompiler(compileToFunction);\r\n// register message resolver at vue-i18n\r\nregisterMessageResolver(resolveValue);\r\n// register fallback locale at vue-i18n\r\nregisterLocaleFallbacker(fallbackWithLocaleChain);\r\n{\r\n initFeatureFlags();\r\n}\r\n// NOTE: experimental !!\r\nif ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\r\n const target = getGlobalThis();\r\n target.__INTLIFY__ = true;\r\n setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);\r\n}\r\nif ((process.env.NODE_ENV !== 'production')) ;\n\nexport { DatetimeFormat, I18nInjectionKey, NumberFormat, Translation, VERSION, castToVueI18n, createI18n, useI18n, vTDirective };\n","export const esLocale = {\n accounts: {\n partner: 'Socio',\n client: 'Cliente',\n },\n product: {\n condition: {\n isNew: 'Nuevo',\n likeNew: 'Semi nuevo',\n used: 'Usado',\n veryUsed: 'Muy usado',\n },\n weight: {\n lt5: 'Menos de 5 kg',\n gt5Lt10: 'Entre 5 y 10 kg',\n gt10Lt20: 'Entre 10 y 20 kg',\n gt20: 'Más de 20 kg',\n },\n status: {\n pending: 'En revisión',\n active: 'Publicado',\n paused: 'Pausado',\n deleted: 'Eliminado',\n },\n shippingMethod: {\n clientAccount: {\n clientPickup: 'Tú debes retirarlo',\n partnerDelivery: 'Te lo entrega el socio',\n },\n partnerAccount: {\n clientPickup: 'El cliente lo retira',\n partnerDelivery: 'Tú lo entregas',\n },\n },\n },\n productBooking: {\n status: {\n awaitingApproval: 'Solicitado',\n partnerApproved: 'Esperando pago',\n partnerRejected: 'Rechazado',\n paid: 'Reservado',\n delivered: 'Entregado',\n complete: 'Completado',\n },\n },\n notification: {\n kind: {\n awaitingApproval: 'Nueva solicitud de arriendo',\n partnerApproved: 'Solicitud aceptada',\n clientApproved: 'Contrapropuesta aceptada',\n partnerRejected: 'Solicitud rechazada',\n clientRejected: 'Contrapropuesta rechazada',\n autoRejected: 'Solicitud rechazada automáticamente',\n delivered: 'Producto entregado',\n completed: 'Devolución exitosa',\n awaitingApprovalReminder: 'Recordatorio de solicitud de arriendo',\n },\n },\n bankAccount: {\n kind: {\n savingsAccount: 'Cuenta de ahorro',\n checkingAccount: 'Cuenta corriente',\n sightAccount: 'Cuenta vista',\n },\n },\n frequentlyAskedQuestion: {\n section: {\n general: 'Preguntas generales',\n partner: 'Preguntas de socios',\n client: 'Preguntas de clientes',\n },\n },\n newProductForm: {\n step1: {\n title: 'Nombre del producto',\n description: 'Para comenzar, ingresa el nombre de tu producto',\n tip: 'Escoge el nombre preciso para que la comunidad lo encuentre fácilmente.',\n },\n step2: {\n title: 'Entrega y devolución',\n description: '¿Cómo deseas realizar la entrega y devolución de tu producto?',\n tip: 'Puedes ofrecer ambas alternativas y dejar que el cliente escoja.',\n addressTitle: '¿Dónde está ubicado el producto?',\n addressTipTitle: 'En caso de retiro por cliente...',\n addressTip: 'La dirección será compartida con él luego de que haya pagado la reserva.',\n },\n step3: {\n title: 'Detalles del producto',\n description: 'Entréganos más características de tu producto',\n },\n step4: {\n title: 'Descripción',\n description: 'Describe lo mejor que puedas tu producto.',\n\n },\n step5: {\n title: 'Precio y garantía de arriendo',\n description: '¡Estás a un paso de hacer zirkular tus productos!',\n },\n summary: {\n description: 'Revisa la información que publicarás.',\n },\n successModal: {\n title: '¡Excelente!',\n description: 'Hemos recibido tu producto de forma exitosa.',\n tip: 'Verificaremos tu publicación y te notificaremos vía correo electrónico en un máximo de 24 horas.',\n },\n },\n};\n","import { esLocale } from './es';\n\nconst messages = {\n es: esLocale,\n};\n\nexport const Locales = { messages };\n","import { createI18n } from 'vue-i18n';\nimport { Locales } from '../locales/locales';\n\nexport const i18n = createI18n({\n legacy: false,\n locale: 'es',\n fallbackLocale: 'es',\n messages: Locales.messages,\n});\n","/* eslint-disable max-statements */\nimport { createApp } from 'vue';\nimport { createPinia } from 'pinia';\nimport { Form, Field } from 'vee-validate';\nimport { VueQueryPlugin } from '@tanstack/vue-query';\nimport piniaPluginPersistedstate from 'pinia-plugin-persistedstate';\n\nimport VueGoogleMaps from 'vue-google-maps-community-fork';\n\nimport VueDatePicker from '@vuepic/vue-datepicker';\nimport '@vuepic/vue-datepicker/dist/main.css';\n\nimport InlineSvg from 'vue-inline-svg';\n\nimport { VueperSlides, VueperSlide } from 'vueperslides';\nimport 'vueperslides/dist/vueperslides.css';\n\nimport { setDefaultOptions } from 'date-fns';\nimport { es } from 'date-fns/locale';\n\nimport ChatView from '@/components/chat-view.vue';\nimport ChatsView from '@/components/chats-view.vue';\nimport CategoryView from '@/components/category-view.vue';\nimport HomeView from '@/components/home-view.vue';\nimport PartnerStartView from '@/components/partner-start-view.vue';\nimport ProductView from '@/components/product-view.vue';\nimport ProfileView from '@/components/profile-view.vue';\nimport SearchView from '@/components/search-view.vue';\nimport FaqView from '@/components/faq-view.vue';\nimport ProductGrid from '@/components/product-grid.vue';\nimport PartnerStoreView from '@/components/partner-store-view.vue';\n\nimport ProfileProductBookings from '@/components/profile/profile-product-bookings.vue';\nimport ProfileBankAccount from '@/components/profile/profile-bank-account.vue';\nimport ProfileProductsHistory from '@/components/profile/profile-products-history.vue';\nimport ProfileProductHistoryDetails from '@/components/profile/profile-product-history-details.vue';\nimport ProfileProducts from '@/components/profile/profile-products.vue';\nimport ProfileAddresses from '@/components/profile/profile-addresses.vue';\nimport ProfileAddressDetail from '@/components/profile/profile-address-detail.vue';\nimport ProfileNewAddressForm from '@/components/profile/profile-new-address-form.vue';\nimport ProfileEditAddressForm from '@/components/profile/profile-edit-address-form.vue';\nimport ProfileAccount from '@/components/profile/profile-account.vue';\nimport ProfileProductBookingView from '@/components/profile/profile-product-booking-view.vue';\nimport ProfileProductBookingReport from '@/components/profile/profile-product-booking-report.vue';\nimport ProfileProductBookingDamageReport from '@/components/profile/profile-product-booking-damage-report.vue';\n\nimport LocationView from '@/components/location-view.vue';\nimport NewRatingForm from '@/components/new-rating-form.vue';\nimport ProductBookingReportView from '@/components/product-booking-report-view.vue';\n\nimport NewProductForm from '@/components/new-product-form.vue';\nimport EditProductForm from '@/components/edit-product-form.vue';\nimport NewProductRequestForm from '@/components/new-product-request-form.vue';\nimport ProductRequestsGrid from '@/components/product-requests-grid.vue';\nimport ProductRequestView from '@/components/product-request-view.vue';\n\nimport PaymentSuccess from '@/components/payment-success.vue';\nimport PaymentFailure from '@/components/payment-failure.vue';\n\nimport SupportChatView from '@/components/support-chat-view.vue';\nimport VerifyView from '@/components/verify-view.vue';\nimport SupportChatsView from '@/components/support-chats-view.vue';\n\nimport BaseButton from '@/components/base/base-button.vue';\nimport BaseFileInput from '@/components/base/base-file-input.vue';\nimport BaseInput from '@/components/base/base-input.vue';\nimport BaseCurrencyInput from '@/components/base/base-currency-input.vue';\nimport BaseLabel from '@/components/base/base-label.vue';\nimport BaseSelect from '@/components/base/base-select.vue';\nimport BaseDragAndDrop from '@/components/base/base-drag-and-drop.vue';\nimport BaseQrCode from '@/components/base/base-qr-code.vue';\nimport BaseModal from '@/components/base/base-modal.vue';\nimport BaseTip from '@/components/base/base-tip.vue';\nimport BaseCounter from '@/components/base/base-counter.vue';\nimport BaseGoogleAutocomplete from '@/components/base/base-google-autocomplete.vue';\nimport BaseStars from '@/components/base/base-stars.vue';\nimport BaseRibbonAlert from '@/components/base/base-ribbon-alert.vue';\nimport BaseProgressBar from '@/components/base/base-progress-bar.vue';\nimport SessionHandler from '@/components/session-handler.vue';\nimport TheBookingAlertOverlay from '@/components/the-booking-alert-overlay.vue';\nimport TheFooter from '@/components/the-footer.vue';\nimport TheLayout from '@/components/the-layout.vue';\nimport TheMenubar from '@/components/the-menubar.vue';\nimport TheNavbar from '@/components/the-navbar.vue';\nimport TheNotificationOverlay from '@/components/the-notification-overlay.vue';\nimport TheTitlebar from '@/components/the-titlebar.vue';\nimport ReferralCodeInput from '@/components/referral-code-input.vue';\nimport GoogleRegisterButton from '@/components/google-register-button.vue';\nimport GoogleOauthRedirect from '@/components/google-oauth-redirect.vue';\nimport RegisterForm from '@/components/register-form.vue';\nimport ReferralCodeInputRetriever from '@/components/referral-code-input-retriever.vue';\nimport TheWhatsappButton from '@/components/the-whatsapp-button.vue';\n\nimport { i18n } from '../utils/i18n';\n\nimport '../css/application.css';\n\nsetDefaultOptions({\n locale: es,\n weekStartsOn: 1,\n});\n\ndocument.addEventListener('DOMContentLoaded', () => {\n const app = createApp({\n components: {\n SessionHandler,\n TheBookingAlertOverlay,\n TheNotificationOverlay,\n HomeView,\n ProductView,\n ProductGrid,\n CategoryView,\n ChatsView,\n ChatView,\n NewProductForm,\n EditProductForm,\n NewProductRequestForm,\n SearchView,\n ProductRequestsGrid,\n ProductRequestView,\n PartnerStartView,\n ProfileView,\n ProfileProductBookings,\n ProfileBankAccount,\n ProfileProductsHistory,\n ProfileProductHistoryDetails,\n ProfileProducts,\n ProfileAddresses,\n ProfileNewAddressForm,\n ProfileEditAddressForm,\n ProfileAddressDetail,\n ProfileAccount,\n FaqView,\n PaymentSuccess,\n PaymentFailure,\n ProfileProductBookingView,\n ProfileProductBookingReport,\n ProfileProductBookingDamageReport,\n NewRatingForm,\n ProductBookingReportView,\n LocationView,\n SupportChatView,\n VerifyView,\n SupportChatsView,\n PartnerStoreView,\n ReferralCodeInput,\n GoogleRegisterButton,\n GoogleOauthRedirect,\n RegisterForm,\n ReferralCodeInputRetriever,\n },\n });\n\n const pinia = createPinia();\n\n app.component('VForm', Form);\n app.component('VField', Field);\n app.component('VueDatePicker', VueDatePicker);\n app.component('InlineSvg', InlineSvg);\n app.component('BaseButton', BaseButton);\n app.component('BaseFileInput', BaseFileInput);\n app.component('BaseInput', BaseInput);\n app.component('BaseCurrencyInput', BaseCurrencyInput);\n app.component('BaseLabel', BaseLabel);\n app.component('BaseSelect', BaseSelect);\n app.component('BaseDragAndDrop', BaseDragAndDrop);\n app.component('BaseQrCode', BaseQrCode);\n app.component('BaseModal', BaseModal);\n app.component('BaseTip', BaseTip);\n app.component('BaseCounter', BaseCounter);\n app.component('BaseGoogleAutocomplete', BaseGoogleAutocomplete);\n app.component('BaseStars', BaseStars);\n app.component('BaseRibbonAlert', BaseRibbonAlert);\n app.component('BaseProgressBar', BaseProgressBar);\n app.component('TheFooter', TheFooter);\n app.component('TheLayout', TheLayout);\n app.component('TheNavbar', TheNavbar);\n app.component('TheMenubar', TheMenubar);\n app.component('TheWhatsappButton', TheWhatsappButton);\n app.component('TheTitlebar', TheTitlebar);\n app.component('VueperSlides', VueperSlides);\n app.component('VueperSlide', VueperSlide);\n app.use(i18n);\n app.use(VueQueryPlugin);\n app.use(VueGoogleMaps, {\n load: {\n key: import.meta.env.VITE_GOOGLE_PLACES_API_KEY,\n },\n });\n app.use(pinia);\n pinia.use(piniaPluginPersistedstate);\n app.mount('#vue-app');\n\n return app;\n});\n"],"names":["addDays","dirtyDate","dirtyAmount","requiredArgs","date","toDate","amount","toInteger","addMonths","dayOfMonth","endOfDesiredMonth","daysInMonth","add","duration","_typeof","years","months","weeks","days","hours","minutes","seconds","dateWithMonths","dateWithDays","minutesToAdd","secondsToAdd","msToAdd","finalDate","startOfDay","compareAsc","dirtyDateLeft","dirtyDateRight","dateLeft","dateRight","diff","isSameDay","dateLeftStartOfDay","dateRightStartOfDay","differenceInCalendarMonths","yearDiff","monthDiff","differenceInMilliseconds","roundingMap","value","defaultRoundingMethod","getRoundingMethod","method","endOfDay","endOfMonth","month","isLastDayOfMonth","differenceInMonths","sign","difference","result","isLastMonthNotFull","differenceInSeconds","options","eachDayOfInterval","dirtyInterval","_options$step","interval","startDate","endDate","endTime","dates","currentDate","step","assign","target","object","property","cloneObject","MINUTES_IN_DAY","MINUTES_IN_ALMOST_TWO_DAYS","MINUTES_IN_MONTH","MINUTES_IN_TWO_MONTHS","formatDistance","dirtyBaseDate","_ref","_options$locale","defaultOptions","getDefaultOptions","locale","defaultLocale","comparison","localizeOptions","offsetInSeconds","getTimezoneOffsetInMilliseconds","nearestMonth","monthsSinceStartOfYear","MILLISECONDS_IN_MINUTE","MINUTES_IN_YEAR","formatDistanceStrict","_options$roundingMeth","roundingMethod","roundingMethodFn","milliseconds","timezoneOffset","dstNormalizedMinutes","defaultUnit","unit","roundedMinutes","formatDistanceToNow","distanceInWords","formatDistanceToNowStrict","isPast","isToday","setDefaultOptions","newOptions","_property","setInternalDefaultOptions","isVue2","activePinia","setActivePinia","pinia","piniaSymbol","isPlainObject","o","MutationType","createPinia","scope","effectScope","state","ref","_p","toBeInstalled","markRaw","app","plugin","noop","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","idx","getCurrentScope","onScopeDispose","triggerSubscriptions","args","fallbackRunWithContext","fn","mergeReactiveObjects","patchToApply","key","subPatch","targetValue","isRef","isReactive","skipHydrateSymbol","shouldHydrate","obj","isComputed","createOptionsStore","id","hot","actions","getters","initialState","store","setup","localState","toRefs","computedGetters","name","computed","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","isSyncListening","actionSubscriptions","debuggerEvents","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","newState","$state","$dispose","wrapAction","action","afterCallbackList","onErrorCallbackList","after","onError","ret","error","partialStore","stopWatcher","watch","reactive","setupStore","prop","actionValue","toRaw","extender","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","hasContext","hasInjectionContext","inject","storeToRefs","refs","toRef","isCallable","isNullOrUndefined","isObject","isIndex","toNumber","n","RULES","resolveRule","FormContextKey","FieldContextKey","IS_ABSENT","isClient","isLocator","isTypedSchema","isYupValidator","hasCheckedAttr","type","isContainerValue","isEmptyContainer","isNotNestedPath","path","isNativeMultiSelect","el","isNativeSelect","isNativeMultiSelectNode","tag","attrs","hasTruthyBindingValue","shouldHaveValueBinding","isFormSubmitEvent","evt","isEvent","isPropPresent","isEqual","a","b","length","i","keys","isFile","set","val","klona","x","k","list","tmp","str","cleanupNonNestedPath","getFromPath","fallback","acc","propKey","setInPath","unset","unsetPath","pathValues","_","keysOf","record","injectWithSelf","symbol","def","vm","getCurrentInstance","resolveNextCheckboxValue","currentValue","checkedValue","uncheckedValue","newVal","v","debounceAsync","inner","ms","timer","resolves","resolve","applyModelModifiers","modifiers","withLatest","onDone","latestRun","pending","unravel","unref","lazyToRef","normalizeChildren","context","slotProps","_a","_b","getBoundValue","hasValueBinding","normalizeEventValue","input","files","opt","selectedOption","normalizeRules","rules","prev","curr","params","normalizeParams","buildParams","rule","parsedRule","parseRule","provided","mapValueToLocator","createLocator","locator","crossTable","extractLocators","DEFAULT_CONFIG","field","currentConfig","getConfig","validate","shouldBail","errors","_validate","validateFieldWithTypedSchema","ctx","pipeline","message","_generateFieldError","normalizedContext","rulesKeys","_test","isYupError","err","yupToTypedSchema","yupSchema","values","schema","messages","validator","fillTargetValues","fieldCtx","normalize","param","validateTypedSchema","validationResult","results","m","validateObjectSchema","opts","validations","_c","strings","fieldResult","isAllValid","validationResults","ID_COUNTER","useFieldState","init","initialValue","setInitialValue","_useFieldValue","errorMessage","setErrors","_useFieldErrors","meta","_useFieldMeta","setState","modelValue","form","modelRef","resolveInitialValue","resolveModelValue","normalizeErrors","useField","useCheckboxField","_useField","validateOnMount","bails","label","validateOnValueUpdate","controlled","keepValueOnUnmount","modelPropName","syncVModel","controlForm","normalizeOptions","injectedForm","markedForRemoval","useVModel","handleChange","handleBlur","normalizedRules","rulesValue","extractRuleFromSchema","validateCurrentValue","mode","validateWithStateMutation","validateValidStateOnly","validate$1","e","shouldValidate","newValue","onMounted","setTouched","isTouched","unwatchValue","lastWatchedValue","watchValue","oldVal","resetField","setValue","provide","oldValue","onBeforeUnmount","dependencies","rulesVal","deps","dep","depAcc","depName","depValue","oldDeps","defaults","getCurrentModelValue","fieldName","patchCheckboxApi","checked","checkedVal","handleCheckboxChange","propName","emitName","propValue","FieldImpl","defineComponent","props","keepValue","validateField","handleReset","onChangeHandler","handleInput","onInputHandler","fieldProps","validateOnInput","validateOnChange","validateOnBlur","validateOnModelUpdate","resolveValidationTriggers","baseOnBlur","baseOnInput","baseOnChange","resolveTag","resolveDynamicComponent","children","h","_d","Field","FORM_COUNTER","resolveInitialValues","providedValues","useForm","formId","controlledModelPaths","RESET_LOCK","fieldsByPath","isSubmitting","submitCount","fieldArrays","formValues","errorBag","setErrorBag","setFieldErrorBag","useErrorBag","bag","getFirstFieldAtPath","fieldOrGroup","fieldExists","fieldNames","names","fieldBailsMap","map","initialErrors","keepValuesOnUnmount","initialValues","originalInitialValues","setInitialValues","useFormInitialValues","useFormMeta","controlledValues","debouncedSilentValidation","_validateSchema","debouncedValidation","validateSchema","formResult","fieldsById","formCtx","currentErrorsPaths","validation","setFieldError","applyFieldMutation","f","wasValidated","makeSubmissionFactory","onlyControlled","onValidationError","submittedValues","setFieldTouched","setValues","setFieldValue","resetForm","returnVal","handleSubmit","registerField","unregisterField","stageInitialValue","unsetInitialValue","setFieldInitialValue","useFieldModel","isFieldGroup","mutation","mutateAllFields","fields","force","fieldInstance","clonedValue","createModel","newValues","insertFieldAtPath","rawField","fieldPath","fieldAtPath","removeFieldFromPath","newPath","oldPath","initialErrorMessage","isGroup","shouldKeepValue","currentGroupValue","valueIdx","r","updateOriginal","schemaValue","submitForm","currentValues","MERGE_STRATEGIES","isDirty","calculateFlags","flag","mergeMethod","flags","watchEffect","updateFields","wasTouched","normalizeErrorItem","FormImpl","validationSchema","keepValues","onSubmit","handleFormReset","handleScopedSlotSubmit","getValues","getMeta","getErrors","formAttrs","Form","Subscribable","listener","identity","isServer","functionalUpdate","updater","isValidTimeout","timeUntilStale","updatedAt","staleTime","parseQueryArgs","arg1","arg2","arg3","isQueryKey","parseFilterArgs","matchQuery","filters","query","exact","fetchStatus","predicate","queryKey","stale","hashQueryKeyByOptions","partialMatchKey","isActive","matchMutation","fetching","mutationKey","hashQueryKey","partialDeepEqual","replaceEqualDeep","array","isPlainArray","aSize","bItems","bSize","copy","equalItems","shallowEqualObjects","hasObjectPrototype","ctor","prot","sleep","timeout","scheduleMicrotask","getAbortController","replaceData","prevData","data","FocusManager","onFocus","_this$cleanup","_this$cleanup2","focused","focusManager","onlineEvents","OnlineManager","onOnline","event","online","onlineManager","defaultRetryDelay","failureCount","canFetch","networkMode","CancelledError","isCancelledError","createRetryer","config","isRetryCancelled","isResolved","continueFn","promiseResolve","promiseReject","promise","outerResolve","outerReject","cancel","cancelOptions","reject","cancelRetry","continueRetry","shouldPause","pause","continueResolve","canContinue","run","promiseOrValue","_config$retry","_config$retryDelay","retry","retryDelay","delay","shouldRetry","defaultLogger","createNotifyManager","queue","transactions","notifyFn","batchNotifyFn","batch","flush","schedule","batchCalls","originalQueue","notifyManager","Removable","newCacheTime","Query","getDefaultState","newData","setStateOptions","_this$retryer","observer","_this$retryer2","_this$retryer3","fetchOptions","_this$options$behavio","_context$fetchOptions","_this$retryer4","abortController","queryFnContext","addSignalProperty","fetchFn","_context$fetchOptions2","_this$cache$config$on","_this$cache$config","_this$cache$config$on2","_this$cache$config2","_this$cache$config$on3","_this$cache$config3","_this$cache$config$on4","_this$cache$config4","reducer","_action$meta","_action$dataUpdatedAt","hasData","initialDataUpdatedAt","client","_options$queryHash","queryHash","queryInMap","Mutation","_this$retryer$continu","executeMutation","_this$options$retry","restored","_this$mutationCache$c3","_this$mutationCache$c4","_this$options$onSucce","_this$options2","_this$mutationCache$c5","_this$mutationCache$c6","_this$options$onSettl","_this$options3","_this$mutationCache$c","_this$mutationCache$c2","_this$options$onMutat","_this$options","_this$mutationCache$c7","_this$mutationCache$c8","_this$options$onError","_this$options4","_this$mutationCache$c9","_this$mutationCache$c10","_this$options$onSettl2","_this$options5","_this$resuming","pausedMutations","infiniteQueryBehavior","_context$fetchOptions3","_context$fetchOptions4","_context$state$data","_context$state$data2","refetchPage","fetchMore","pageParam","isFetchingNextPage","isFetchingPreviousPage","oldPages","oldPageParams","newPageParams","cancelled","_context$signal","_context$signal2","queryFn","buildNewPages","pages","page","previous","fetchPage","manual","queryFnResult","getNextPageParam","getPreviousPageParam","QueryClient$1","QueryCache","MutationCache","_this$unsubscribeFocu","_this$unsubscribeOnli","_this$queryCache$find","parsedOptions","cachedData","queryKeyOrFilters","defaultedOptions","_this$queryCache$find2","queryCache","refetchFilters","promises","_filters$refetchType","_options$cancelRefetc","firstMatchingDefaults","MutationObserver","_this$currentMutation","prevOptions","_this$currentMutation2","notifyOptions","variables","_this$mutateOptions$o","_this$mutateOptions","_this$mutateOptions$o2","_this$mutateOptions2","_this$mutateOptions$o3","_this$mutateOptions3","_this$mutateOptions$o4","_this$mutateOptions4","VUE_QUERY_CLIENT","getClientKey","suffix","isMutationKey","updateState","update","cloneDeep","customizer","entries","cloneDeepUnref","prototype","shouldThrowError","_useErrorBoundary","useQueryClient","_getCurrentInstance","queryClient","QueryCache$1","arg1Unreffed","arg2Unreffed","MutationCache$1","QueryClient","unreffedConfig","vueQueryConfig","unreffed","arg3Unreffed","VueQueryPlugin","clientKey","clientConfig","persisterUnmount","unmount","cleanup","originalUnmount","useMutation","_options$value$queryC","parseMutationArgs","unsubscribe","mutate","mutateOptions","resultRefs","readonly","plainArg1","plainArg2","factoryOptions","receiver","get","p","pick","baseState","paths","substate","pathArray","parsePersistence","storage","beforeRestore","afterRestore","serializer","debug","hydrateStore","fromStorage","persistState","toStore","createPersistedState","auto","persist","original_store","persistences","persistence","runHooks","_mutation","src_default","lazy","called","Env","createMapScript","googleMapScript","url","isApiSetUp","loadGMapApi","bindEvents","vueInst","googleMapsInst","events","eventName","c","ev","WatchPrimitiveProperties","propertiesToTrack","handler","immediate","isHandled","requestHandle","Str","string","getPropsValues","bindProps","attribute","twoWay","trackProperties","noBind","setMethodName","getMethodName","attributeValue","MapElementMixin","buildComponent","mappedProps","ctr","ctrArgs","beforeCreate","afterCreate","rest","promiseName","instanceName","assert","mappedPropsToVueProps","ConstructorObject","Polyline","inst","clearEvents","payload","mvcPath","eventListeners","updatePaths","listenerHandle","Polygon","mvcArray","Circle","Rectangle","_sfc_main","co","_createElementBlock","_cache","_renderSlot","_ctx","fastDeepEqual","equal","ARRAY_TYPES","VERSION","HEADER_SIZE","KDBush","magic","versionAndType","version","ArrayType","nodeSize","numItems","arrayTypeIndex","coordsByteSize","idsByteSize","padCoords","y","index","numAdded","sort","minX","minY","maxX","maxY","ids","coords","stack","axis","right","left","qx","qy","r2","sqDist","select","z","s","sd","newLeft","newRight","t","j","swapItem","swap","arr","ax","ay","bx","by","dx","dy","fround","OFFSET_ZOOM","OFFSET_ID","OFFSET_PARENT","OFFSET_NUM","OFFSET_PROP","Supercluster","points","log","minZoom","maxZoom","timerId","lng","lat","lngX","latY","tree","now","bbox","zoom","minLng","minLat","maxLng","maxLat","easternHem","westernHem","clusters","getClusterJSON","clusterId","originId","originZoom","errorMsg","limit","offset","leaves","z2","extent","radius","top","bottom","tile","expansionZoom","skipped","child","isCluster","tags","px","py","getClusterProperties","reduce","minPoints","nextData","stride","neighborIds","numPointsOrigin","numPoints","neighborId","wx","wy","clusterProperties","clusterPropIndex","numPoints2","clone","original","clusterProps","xLng","yLat","count","abbrev","propIndex","properties","sin","y2","__rest","MarkerUtils","marker","Cluster","markers","position","bounds","AbstractAlgorithm","SuperClusterAlgorithm","SuperCluster","changed","feature","leaf","ClusterStats","clusterMarkerCounts","clusterMarkerSum","DefaultRenderer","stats","svg","title","zIndex","svgEl","clusterOptions","extend","type1","type2","OverlayViewSafe","MarkerClustererEvents","defaultOnClusterClickHandler","cluster","MarkerClusterer","algorithmOptions","algorithm","renderer","onClusterClick","noDraw","removed","singleMarker","groupMarkers","otherOptions","reinsertMarkers","oldMarkers","mo","_hoisted_1","_openBlock","mountableMixin","functionToCheck","TwoWayBindingWrapper","counter","linkedMethods","all","methodName","customMethods","oldCenter","element","increment","decrement","shouldUpdate","_normalizeClass","_createElementVNode","_normalizeStyle","Heatmap","downArrowSimulator","_addEventListener","addEventListenerWrapper","origListener","suggestionSelected","simulatedEvent","_this","refInput","refName","scopedInput","finalOptions","_normalizeProps","_mergeProps","_createCommentVNode","_toHandlers","GMapApi","install","Vue","createApp","defaultResizeBus","gmapApiPromiseLazy","makeGMapApiPromiseLazy","Map","Marker","InfoWindow","GMapCluster","Autocomplete","onApiLoaded","millisecondsInWeek","millisecondsInDay","millisecondsInMinute","millisecondsInHour","millisecondsInSecond","constructFromSymbol","constructFrom","argument","_date","addMilliseconds","addHours","startOfWeek","weekStartsOn","day","startOfISOWeek","getISOWeekYear","year","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","utcDate","normalizeDates","differenceInCalendarDays","laterDate","earlierDate","laterDate_","earlierDate_","laterStartOfDay","earlierStartOfDay","laterTimestamp","earlierTimestamp","startOfISOWeekYear","fourthOfJanuary","addQuarters","addYears","isDate","isValid","getQuarter","differenceInCalendarYears","differenceInYears","partial","normalizeInterval","start","end","reversed","startOfQuarter","currentMonth","eachQuarterOfInterval","startOfMonth","endOfYear","startOfYear","date_","endOfWeek","endOfQuarter","formatDistanceLocale","token","tokenValue","buildFormatLongFn","width","dateFormats","timeFormats","dateTimeFormats","formatLong","formatRelativeLocale","formatRelative","_baseDate","_options","buildLocalizeFn","valuesArray","defaultWidth","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","dirtyNumber","number","rem100","localize","quarter","buildMatchFn","matchPattern","matchResult","matchedString","parsePatterns","findIndex","pattern","findKey","buildMatchPatternFn","parseResult","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match","enUS","getDayOfYear","getISOWeek","getWeekYear","firstWeekContainsDate","firstWeekOfNextYear","firstWeekOfThisYear","startOfWeekYear","firstWeek","getWeek","addLeadingZeros","targetLength","output","lightFormatters","signedYear","dayPeriodEnumValue","numberOfDigits","fractionalSeconds","dayPeriodEnum","formatters","era","signedWeekYear","weekYear","twoDigitYear","isoWeekYear","week","isoWeek","dayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","_localize","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","timestamp","delimiter","absOffset","dateLongFormatter","timeLongFormatter","dateTimeLongFormatter","datePattern","timePattern","dateTimeFormat","longFormatters","dayOfYearTokenRE","weekYearTokenRE","throwTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","warnOrThrowProtectedError","format","_message","subject","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","formatStr","_f","_e","_h","_g","originalDate","parts","substring","firstCharacter","longFormatter","cleanEscapedString","formatterOptions","part","formatter","matched","getDay","getDaysInMonth","monthIndex","lastDayOfMonth","getInternalDefaultOptions","getHours","getISODay","getMinutes","getMonth","getSeconds","getYear","isAfter","dateToCompare","isBefore","leftDate","rightDate","transpose","constructor","isConstructor","TIMEZONE_UNIT_PRIORITY","Setter","__publicField","_utcDate","ValueSetter","validateValue","priority","subPriority","DateTimezoneSetter","reference","Parser","dateString","_value","EraParser","numericPatterns","timezonePatterns","mapValue","parseFnResult","mapFn","parseNumericPattern","parseTimezonePattern","parseAnyDigitsSigned","parseNDigits","parseNDigitsSigned","dayPeriodEnumToHours","dayPeriod","normalizeTwoDigitYear","currentYear","isCommonEra","absCurrentYear","rangeEnd","rangeEndCentury","isPreviousCentury","isLeapYearIndex","YearParser","valueCallback","normalizedTwoDigitYear","LocalWeekYearParser","ISOWeekYearParser","_flags","firstWeekOfYear","ExtendedYearParser","QuarterParser","StandAloneQuarterParser","MonthParser","StandAloneMonthParser","setWeek","LocalWeekParser","setISOWeek","ISOWeekParser","DAYS_IN_MONTH","DAYS_IN_MONTH_LEAP_YEAR","DateParser","isLeapYear","DayOfYearParser","setDay","currentDay","dayIndex","delta","DayParser","LocalDayParser","wholeWeekDays","StandAloneLocalDayParser","setISODay","ISODayParser","AMPMParser","AMPMMidnightParser","DayPeriodParser","Hour1to12Parser","isPM","Hour0to23Parser","Hour0To11Parser","Hour1To24Parser","MinuteParser","SecondParser","FractionOfSecondParser","ISOTimezoneWithZParser","ISOTimezoneParser","TimestampSecondsParser","TimestampMillisecondsParser","parsers","notWhitespaceRegExp","parse","dateStr","referenceDate","invalidDate","subFnOptions","setters","tokens","usedTokens","parser","incompatibleTokens","incompatibleToken","usedToken","uniquePrioritySetters","setter","setterArray","isSameQuarter","dateLeft_","dateRight_","subDays","setMonth","midMonth","setHours","setMilliseconds","setMinutes","setSeconds","setYear","subMonths","sub","withoutMonths","withoutDays","minutesToSub","msToSub","subYears","Wt","qn","A","V","ge","Tn","Wa","Va","ja","Ka","Ga","et","Qa","Fa","hl","We","bl","kl","d","ut","it","Rt","Ge","wl","Je","Oe","Nt","sn","Dl","vt","Ml","u","qa","Cn","Sn","$l","Le","Al","Pn","Xa","Ne","un","dn","Rn","Tl","Xt","zt","Dt","Sl","Pl","La","Ja","Ta","ca","Rl","Ze","Cl","Ol","On","cn","Na","ia","sl","Pe","Bl","_l","nl","Mt","rl","ol","bn","kn","Ye","Ft","Ae","Et","Ee","Ot","Jt","dt","Sa","Ct","ht","$t","Lt","Bn","ye","$e","_n","Ht","Yn","hn","Yl","Pt","pt","Ua","wn","In","wt","yt","ll","ft","En","qt","El","Il","Nn","Yt","ra","za","Nl","Pa","Ra","Ca","Fl","Ll","Fn","Za","Ha","vn","ul","kt","jt","Zt","Ln","Q","Ce","Oa","te","oa","Ba","Ya","Ke","Ie","At","I","mn","zl","pn","Hl","Ul","Wl","Vl","jl","Kl","Gl","Ql","ql","Xl","Jl","Zl","Ia","xl","er","tr","ar","ee","H","C","P","U","N","q","nr","Gt","ot","R","l","D","W","il","ue","oe","T","S","X","O","K","fe","me","L","ne","$","M","he","Y","g","Z","se","lr","Tt","Dn","Mn","va","ct","rr","or","sr","Ve","je","xt","de","ze","He","ke","rt","J","gt","Qe","ur","ir","dr","cr","ea","ya","Xn","nt","ae","De","Qt","Be","sa","ua","fr","ma","vr","Kt","mr","zn","ta","Te","we","Jn","at","Ut","qe","xa","en","pa","Hn","Un","Wn","$n","da","dl","pr","aa","yr","Bt","tt","xe","gr","hr","br","kr","wr","Dr","Mr","$r","Ar","Tr","E","ce","B","An","cl","Me","be","Se","pe","re","F","fa","Sr","Pr","Rr","Cr","Vn","jn","Or","Br","_r","Yr","Ir","Er","Nr","Fr","Lr","zr","Hr","Ur","Wr","Vr","jr","fl","vl","yn","Kr","le","w","G","ie","Xe","_t","Vt","$a","St","la","Aa","Qn","st","Re","Fe","mt","ve","lt","ga","na","ha","ba","ka","wa","Da","Ma","Gr","Qr","fo","qr","ln","on","ml","pl","rn","Xr","Jr","Zr","Kn","xr","eo","to","ao","no","lo","ro","oo","so","gn","vo","Zn","Ue","It","uo","xn","an","bt","io","yl","gl","po","yo","go","ho","bo","Ea","ko","tl","wo","Do","Mo","$o","tn","nn","al","Gn","Ao","cache","filterAttrs","InlineSvg","createElement","svgAttrs","setTitle","src","makePromiseState","request","titleTags","titleEl","isPending","formatDistance$1","formatLong$1","formatRelativeLocalePlural","formatRelative$1","localize$1","match$1","es","_imports_0$q","chatMessagesApi","api","__props","user","userType","recipient","sendMessage","newMessages","messagesDiv","useActionCable","eventNewResource","newMessage","convertKeys","sortedMessages","allMessages","groupBy","sortBy","msg","handleBack","formatDate","activeTab","setActiveTab","_imports_4$3","currency","_imports_0$p","_imports_1$h","_imports_2$6","_imports_3$5","_imports_4$2","_imports_5$2","_imports_6$1","_imports_7","_imports_8","_imports_0$o","_imports_10","_imports_0$n","newProductBookingRange","productFormData","backUrl","userLocation","hasNewMessages","referralCode","setNewProductBookingRange","setProductFormData","setBackUrl","newFromHref","newToHref","newBackName","setUserLocation","location","setHasNewMessages","setReferralCode","resetNewProductBookingRange","resetProductFormData","resetBackUrl","resetUserLocation","resetHasNewMessages","productsApi","latitude","longitude","response","searchTerms","coordParams","productData","pictures","productId","picturesToDelete","newPictures","s$1","showPopover","closePopover","sortedCategories","orderBy","highlightedProducts","getHighlightedProducts","_imports_1$g","STEPS","_imports_0$m","_imports_1$f","locationRedIcon","chatActiveUrl","_imports_0$l","_imports_0$k","freeGlobal","global","_freeGlobal","require$$0","freeSelf","root","_root","Symbol","_Symbol","arrayMap","iteratee","_arrayMap","isArray","isArray_1","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","isOwn","unmasked","_getRawTag","objectToString","_objectToString","require$$1","require$$2","nullTag","undefinedTag","baseGetTag","_baseGetTag","isObjectLike","isObjectLike_1","symbolTag","isSymbol","isSymbol_1","require$$3","INFINITY","symbolProto","symbolToString","baseToString","_baseToString","toString","toString_1","baseSlice","_baseSlice","castSlice","_castSlice","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsVarRange","rsZWJ","reHasUnicode","hasUnicode","_hasUnicode","asciiToArray","_asciiToArray","rsAstral","rsCombo","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","reOptMod","rsOptVar","rsOptJoin","rsSeq","rsSymbol","reUnicode","unicodeToArray","_unicodeToArray","stringToArray","_stringToArray","createCaseFirst","strSymbols","chr","trailing","_createCaseFirst","upperFirst","upperFirst_1","capitalize","capitalize_1","arrayReduce","accumulator","initAccum","_arrayReduce","basePropertyOf","_basePropertyOf","deburredLetters","deburrLetter","_deburrLetter","reLatin","reComboMark","deburr","deburr_1","reAsciiWord","asciiWords","_asciiWords","reHasUnicodeWord","hasUnicodeWord","_hasUnicodeWord","rsDingbatRange","rsLowerRange","rsMathOpRange","rsNonCharRange","rsPunctuationRange","rsSpaceRange","rsUpperRange","rsBreakRange","rsApos","rsBreak","rsDigits","rsDingbat","rsLower","rsMisc","rsUpper","rsMiscLower","rsMiscUpper","rsOptContrLower","rsOptContrUpper","rsOrdLower","rsOrdUpper","rsEmoji","reUnicodeWord","unicodeWords","_unicodeWords","words","guard","words_1","reApos","createCompounder","_createCompounder","camelCase","word","camelCase_1","dateDiffInDays","utc1","utc2","geodistance","lat1","lng1","lat2","lng2","radlat1","radlat2","radtheta","dist","productBookingsApi","status","accountType","mapAdjustLat","randomizedCircleCenter","randomLat","randomLng","randomizedMapCenter","mapOptions","circleOptions","showMapDialog","toggleMapDialog","emit","__emit","allowSameDay","minimumDate","handleRange","rangeOptions","startTime","datePicker","selectDate","_imports_0$j","addressesApi","userId","selectedMethod","addressId","addresses","addressOptions","address","showNewAddressForm","toggleNewAddressForm","getAddresses","handleNewAddress","handleConfirm","place","errorEmpty","alias","createAddress","addressData","addressComponent","_imports_1$e","userRatingsApi","receiverId","closeModal","ratings","ratingsWithDescription","rating","CLIENT_COST","shippingMethods","selectedShippingMethod","showSummary","fromSummary","toggleSummary","showCalendarModal","toggleCalendarModal","showShippingModal","toggleShippingModal","selectedAddressId","handleShippingMethod","shippingMethod","handleAddressId","showPartnerDetailsModal","togglePartnerDetailsModal","showDeleteModal","toggleDeleteModal","bookingRange","blocksNumber","bookingPrice","serviceCost","disabledDates","disabledInterval","isProductBookingCreated","createProductBooking","selectedPictureUrl","setSelectedPictureUrl","pictureUrl","range","handleSummaryBack","deleteProduct","distance","_imports_0$i","_imports_1$d","_imports_1$c","_imports_3$4","_imports_4$1","storeIconUrl","menuUserIconUrl","bookingsIconUrl","partnerAccountsApi","_imports_0$h","open","toggleOpen","filteredSubitems","finalSubitems","subitem","activeReferralCampaign","partnerEarnings","loading","MENUS","filteredMenus","finalMenus","menu","shareReferralLink","copyReferralCode","showReferralDetails","toggleReferralDetails","groupedQuestions","groups","forEach","group","products","_imports_0$g","_imports_2$5","_imports_3$3","partnerServiceCost","_imports_1$b","_imports_0$f","_imports_2$4","Cache","maxSize","SPLIT_REGEX","DIGIT_REGEX","LEAD_DIGIT_REGEX","SPEC_CHAR_REGEX","CLEAN_QUOTES_REGEX","MAX_CACHE_SIZE","pathCache","setCache","getCache","propertyExpr","split","normalizePath","len","safe","segments","isQuoted","cb","thisArg","iter","isBracket","shouldBeQuoted","hasLeadingNumber","hasSpecialChars","reWords","join","next","pascalCase","snakeCase","kebabCase","sentenceCase","titleCase","tinyCase","toposortModule","edges","toposort","uniqueNodes","nodes","cursor","sorted","visited","outgoingEdges","makeOutgoingEdges","nodesHash","makeNodesHash","edge","visit","node","predecessors","nodeRep","outgoing","res","errorToString","regExpToString","SYMBOL_REGEXP","printNumber","printSimpleValue","quoteStrings","typeOf","printValue","toArray","strReg","ValidationError","errorOrErrors","mixed","originalValue","castMsg","boolean","isSchema","Condition","is","then","otherwise","check","_branch","branch","builder","base","prefixes","Reference","prefix","getter","parent","isAbsent","createValidation","panic","test","skipAbsent","abortEarly","item","createError","overrides","nextParams","invalid","handleResult","validOrError","handleError","shouldSkip","_result","getIn","lastPart","lastPartDebug","_part","isTuple","ReferenceSet","description","newItems","removeItems","seen","Schema","spec","before","combined","mergedSpec","conditions","prevSchema","condition","_options$strict","_options$abortEarly","_options$recursive","resolvedSchema","allowOptionality","formattedValue","formattedResult","rawValue","prevValue","strict","initialTests","runOptions","fired","tests","panicOnce","arg","nextOnce","nestedErrors","parentPath","originalParent","testOptions","parsed","validated","defaultValue","isStrict","nullable","optional","isExclusive","enums","valids","resolved","invalids","strip","rEmail","rUrl","rUUID","isTrimmed","objStringTag","create$6","StringSchema","_raw","strValue","min","max","regex","excludeEmptyString","isNaN$1","create$5","NumberSchema","less","more","_method","avail","isoReg","parseIsoDate","numericKeys","minutesOffset","struct","DateSchema","cast","sortFields","excludedEdges","excludes","addNode","depPath","ii","_err$path","sortByKeyOrder","parseJson","deepPartial","fieldSchema","nextArray","deepHas","last","unknown","known","defaultSort","create$3","ObjectSchema","_options$stripUnknown","intermediateValue","innerOptions","isChanged","exists","fieldValue","inputValue","fieldSpec","from","recursive","objectErrors","fieldErrors","nextFields","schemaOrRef","dft","_innerOptions","shape","additions","picked","fromGetter","newObj","noAllow","unknownKeys","allow","_innerOptions2","create$2","ArraySchema","_opts","castArray","castElement","innerType","arrayErrors","_options$originalValu2","_options$originalValu","innerTypeErrors","rejector","REJECT_OPTIONS","approvalTimeLimit","showApprovedModal","showRejectedModal","showBankAccountModal","showRejectForm","toggleApprovedModal","toggleRejectedModal","toggleBankAccountModal","toggleRejectForm","updateBooking","approveBooking","handleApproved","handleRejected","remainingTime","rejectReason","rejectMessage","formRules","showRejectSuccessModal","toggleRejectSuccessModal","handleRejectSuccess","rejectBooking","_imports_1$a","showCancelModal","toggleCancelModal","cancelBooking","loadMercadoPago_1","SDK_MERCADOPAGO_URL","SDK_MERCADOPAGO_URL_REGEX","EXISTING_SCRIPT_MESSAGE_INITIALIZED","EXISTING_SCRIPT_MESSAGE_NOT_AVAILABLE","EXISTING_SCRIPT_MESSAGE_FAILED_TO_LOAD","findScript","scripts","script","injectScript","headOrBody","LoadPromise","loadMercadoPago","onBeforeMount","paymentTimeLimit","showVerifyModal","productBookingDeliveriesApi","productBookingId","productBookingDeliveryId","picture","showAwaitingMessage","beginDelivery","CANCEL_OPTIONS","paidTimeLimit","paidTime","pastPaidTime","showCancelForm","showSuccessModal","toggleCancelForm","toggleSuccessModal","handleCancel","handleSuccess","cancelReason","cancelMessage","deliveryToday","showBeginDeliveryModal","toggleBeginDeliveryModal","_imports_1$9","productBookingReturnsApi","productBookingReturnId","createReturn","returnDate","returnToday","showBeginReturnModal","toggleBeginReturnModal","_imports_0$e","supportChatsApi","showSupportModal","toggleSupportModal","bookingOptions","pb","selectedBookingId","createSupportChat","productBookings","statusTabs","bookedTab","getBookings","setBookedTab","bookedBookings","reverse","partition","hash","tabIndex","tab","_imports_1$8","bankAccountsApi","bankEntitiesApi","rutClean","rutValidate","rut","rutDigits","checkDigit","rutValidate_1","rutFormat","rutFormat_1","bankEntityOptions","kindOptions","bankEntityId","kind","accountNumber","handleBankAccount","handleRutInput","showBankAccountForm","toggleBankAccountForm","redirect","maskNumber","_imports_0$d","_imports_1$7","_imports_0$c","sortedBookings","totalEarnings","acum","booking","productsGroupedByStatus","_imports_2$3","updateAddress","generateURL","file","fileSrc","handleReload","firstName","lastName","email","newPassword","passwordConfirmation","fakePassword","newPicture","showRatingsModal","toggleRatingsModal","editable","toggleEditable","handleClick","usersApi.update","showPictureUpload","togglePictureUpload","showSuccess","toggleSuccess","showNoPictureConfirmation","toggleNoPictureConfirmation","handleDeliver","handleContinue","handleSupportChat","automaticReturnMinutes","CONDITION_OPTIONS","handleReturn","showConditionForm","toggleConditionForm","handleLocation","omitGeolocation","handleOmit","automaticReturnComplete","otherUserType","showAddress","showClientDetailsModal","toggleClientDetailsModal","handleViewMore","showClientDeliveryModal","toggleClientDeliveryModal","handleClientDeliverySuccess","showPartnerReturnModal","togglePartnerReturnModal","productBookingReportsApi","ALL_REASON_OPTIONS","reasonOptions","reason","selectedReason","comment","showPictureForm","nonNullPictures","createReport","account","bookingTab","elementToSelectOption","arrayToSelectOption","elem","damageOptions","selectedDamage","userPicture","defaultProfileIcon","otherUserPicture","otherUserLocation","addressLocation","updateBounds","locationError","updateLocation","handleLocationError","getUserLocation","getOtherUserLocation","newUserLocationChannelValue","newLocationUpdate","showContinueReturnModal","toggleContinueReturnModal","distanceIsValid","canContinueReturn","userUrl","_imports_0$b","_imports_1$6","stars","setStars","createRating","_imports_0$a","scrollToTop","categoryId","_imports_1$5","mapPinIconUrl","shippingMethodIds","showAddressModal","toggleAddressModal","showErrors","handleInvalidSubmit","selectShippingMethod","shippingMethodId","sm","subcategories","subcategoryId","brand","model","weight","conditionOptions","weightOptions","subcategoriesApi.index","_imports_1$4","_imports_2$2","_imports_3$2","_imports_4","_imports_5$1","_imports_6","showPictureModal","showPictureErrors","togglePictureErrors","togglePictureModal","dailyPrice","minRange","maxRange","noMax","deposit","currentStep","showSuccessMessage","summaryMode","showProductRequestModal","alreadyShownModal","toggleProductRequestModal","handleStepBack","nextStep","goToStep","handleStep1","newName","handleStep2","handleStep3","handleStep4","handleStep5","_imports_1$3","pictureIdsToDelete","picturesToShow","removePicture","productRequestsApi","canSubmit","_imports_0$9","showConfirmModal","toggleConfirmModal","_hoisted_2","_imports_0","_createBlock","_component_the_layout","_withCtx","_hoisted_3","_hoisted_4","_createVNode","_component_base_button","supportChatMessagesApi","_imports_0$8","phoneNumber","birthDate","handleNextStep","queryParams","redirectTo","showBankAccountStep","handleVerify","goBack","lastMessage","useAttrs","currentTag","variants","sizes","dynamicClasses","uploadedFile","fileInput","onChange","_imports_0$7","_imports_1$2","showLabelInside","showPassword","togglePassword","passwordType","newModel","CurrencyDisplay","ValueScaling","escapeRegExp","removeLeadingZeros","search","substringBefore","DECIMAL_SEPARATORS","INTEGER_PATTERN","CurrencyFormat","currencyDisplay","precision","accountingSign","useGrouping","numberFormat","formatParts","getPrefix","getSuffix","negative","fraction","formattedNumber","integerNumber","digit","AbstractInputMask","currencyFormat","DefaultInputMask","previousConformedValue","isEmptyNegativeValue","checkIncompleteValue","incompleteValue","integer","integerDigits","fractionDigits","invalidFraction","invalidNegativeValue","AutoDecimalDigitsInputMask","numberValue","DEFAULT_OPTIONS","CurrencyInput","valueScalingOptions","maxFractionDigits","hideNegligibleDecimalDigits","conformedValue","maximumFractionDigits","minimumFractionDigits","selectionStart","inputEvent","getCaretPositionAfterFormat","decimalSymbol","groupingSymbol","caretPositionFromLeft","newValueLength","decimalSymbolPosition","selectionEnd","caretPositionOnFocus","negativePrefix","negativeSuffix","isNegative","currentPrefix","prefixLength","suffixLength","findInput","useCurrencyInput","autoEmit","currencyInput","inputRef","isVue3","lazyModel","changeEvent","handleInputChange","_imports_0$6","isDragging","handleDragover","handleDragleave","handleDrop","removeFile","canPromise","toSJISFunction","CODEWORDS_COUNT","utils","kanji","exports","fromString","level","BitBuffer","bufIndex","num","bit","bitBuffer","BitMatrix","size","row","col","reserved","bitMatrix","getSymbolSize","posCount","intervals","positions","pos","posLength","FINDER_PATTERN_SIZE","finderPattern","PenaltyScores","mask","sameCountCol","sameCountRow","lastCol","lastRow","module","bitsCol","bitsRow","darkCount","modulesCount","getMaskAt","maskPattern","setupFormatFunc","numPatterns","bestPattern","lowerPenalty","penalty","ECLevel","EC_BLOCKS_TABLE","EC_CODEWORDS_TABLE","errorCorrectionCode","errorCorrectionLevel","EXP_TABLE","LOG_TABLE","galoisField","GF","p1","p2","coeff","divident","divisor","degree","poly","Polynomial","ReedSolomonEncoder","paddedData","remainder","buff","reedSolomonEncoder","versionCheck","numeric","alphanumeric","byte","TEST_KANJI","TEST_NUMERIC","TEST_ALPHANUMERIC","VersionCheck","Regex","dataStr","Utils","ECCode","Mode","require$$4","G18","G18_BCH","getBestVersionForDataLength","currentVersion","getReservedBitsCount","getTotalBitsFromDataArray","totalBits","reservedBits","getBestVersionForMixedData","totalCodewords","ecTotalCodewords","dataTotalCodewordsBits","usableBits","seg","ecl","G15","G15_MASK","G15_BCH","formatInfo","NumericData","remainingNum","numericData","ALPHA_NUM_CHARS","AlphanumericData","alphanumericData","encodeUtf8","point","second","ByteData","byteData","KanjiData","kanjiData","dijkstra","graph","costs","closest","cost_of_s_to_u","adjacent_nodes","cost_of_e","cost_of_s_to_u_plus_cost_of_e","cost_of_s_to_v","first_visit","cost","require$$5","require$$6","require$$7","getStringByteLength","getSegments","getSegmentsFromString","numSegs","alphaNumSegs","byteSegs","kanjiSegs","s1","s2","getSegmentBitsLength","mergeSegments","segs","prevSeg","buildNodes","buildGraph","table","prevNodeIds","nodeGroup","currentNodeIds","prevNodeId","buildSingleSegment","modesHint","bestMode","optimizedSegs","AlignmentPattern","FinderPattern","MaskPattern","require$$8","Version","require$$9","FormatInfo","require$$10","require$$11","Segments","require$$12","setupFinderPattern","matrix","setupTimingPattern","setupAlignmentPattern","setupVersionInfo","bits","mod","setupFormatInfo","setupData","inc","bitIndex","byteIndex","dark","createData","buffer","remainingByte","createCodewords","dataTotalCodewords","ecTotalBlocks","blocksInGroup2","blocksInGroup1","totalCodewordsInGroup1","dataCodewordsInGroup1","dataCodewordsInGroup2","ecCount","rs","dcData","ecData","maxDataSize","dataSize","createSymbol","estimatedVersion","rawSegments","bestVersion","dataBits","moduleCount","modules","qrcode","hex2rgba","hex","hexCode","hexValue","margin","scale","qrSize","imgData","symbolSize","scaledMargin","palette","posDst","pxColor","iSrc","jSrc","clearCanvas","canvas","getCanvasElement","qrData","canvasEl","image","rendererOpts","getColorAttrib","color","attrib","alpha","svgCmd","cmd","qrToPath","moveBy","newRow","lineLength","svgTag","qrcodesize","bg","viewBox","QRCode","CanvasRenderer","SvgRenderer","renderCanvas","renderFunc","text","argsNum","isLastArgCb","browser","qrCanvas","_imports_0$5","titleClasses","bgClasses","_imports_0$4","subtract","isMinDisabled","isMaxDisabled","__awaiter","_arguments","generator","adopt","fulfilled","rejected","getDefaultExportFromCjs","DEFAULT_ID","LoaderStatus","Loader","apiKey","authReferrerPolicy","channel","language","libraries","mapIds","nonce","region","retries","libraryPromises","library","_useModel","searchQuery","Places","placeInput","autocomplete","TOTAL_STARS","fullStars","emptyStars","show","typeClasses","handlePosition","handlePositionError","PATHS_WITHOUT_ALERTS","allBookingsForDelivery","allBookingsForReturn","showModalForNewBooking","showDeliverySuccessMessage","toggleDeliverySuccessMessage","showReturnSuccessMessage","toggleReturnSuccessMessage","showReportAlertModal","toggleReportAlertModal","productBookingReport","newBookingForDelivery","completeBooking","newBookingForReturn","deliveredBooking","showModal","goToRating","goToDelivered","userRoute","handleDeliverySuccess","handleReturnSuccess","reload","_imports_2$1","_imports_0$3","_imports_2","_imports_3$1","_hoisted_5","menuHomeUrl","menuHomeActiveUrl","bagAddUrl","bagAddActiveUrl","userActiveUrl","chatUrl","activeIndex","goToHome","goToPartnerStart","goToProfile","goToChats","menuItems","defaultProfileUrl","_imports_1$1","_imports_3","_imports_5","searchResults","showSearchResults","categories","searchProducts","debouncedSearch","debounce","handleSearch","clearSearch","categoriesApi.index","goToNewProductRequest","goToProductRequests","MENU_ITEMS","_imports_0$2","_imports_1","notificationsApi","deleteNotification","markAsRead","handleClose","notifications","newNotification","sortedNotifications","unread","notification","handleDelete","handleRead","notificationIndex","searchFocus","showMenu","toggleMenu","showCategories","toggleCategories","newNotifications","newChatNotifications","newChatNotification","removeNotification","referralCodesApi","code","foundCode","showReferralInfo","findReferralCode","_imports_0$1","refcode","queryParam","googleForm","showMailForm","toggleMailForm","inBrowser","hasSymbol","makeSymbol","generateFormatCacheKey","source","friendlyJSONstringify","json","isNumber","toTypeString","isRegExp","isEmptyObject","warn","escapeHtml","rawText","hasOwn","isFunction","isString","isBoolean","toDisplayString","CompileErrorCodes","createCompileError","loc","domain","defaultOnError","createPosition","line","column","createLocation","CHAR_SP","CHAR_CR","CHAR_LF","CHAR_LS","CHAR_PS","createScanner","_buf","_index","_line","_column","_peekOffset","isCRLF","isLF","isPS","isLS","isLineEnd","peekOffset","charAt","currentChar","currentPeek","peek","reset","resetPeek","skipToPeek","EOF","LITERAL_DELIMITER","ERROR_DOMAIN$1","createTokenizer","_scnr","currentOffset","currentPosition","_initLoc","_initOffset","_context","emitError","getToken","getEndToken","eat","scnr","ch","peekSpaces","buf","skipSpaces","isIdentifierStart","cc","isNumberStart","isNamedIdentifierStart","currentType","isListIdentifierStart","isLiteralStart","isLinkedDotStart","isLinkedModifierStart","isLinkedDelimiterStart","isLinkedReferStart","isPluralStart","detectModuloStart","spaces","isTextStart","hasSpace","detectModulo","takeChar","takeIdentifierChar","takeDigit","takeHexDigit","getDigits","readModulo","readText","readNamedIdentifier","readListIdentifier","readLiteral","literal","readEscapeSequence","current","readUnicodeEscapeSequence","unicode","digits","sequence","readInvalidIdentifier","identifiers","closure","readLinkedModifier","readLinkedRefer","detect","readPlural","plural","readTokenInPlaceholder","readTokenInLinked","validNamedIdentifier","validListIdentifier","validLiteral","readToken","isModulo","nextToken","startLoc","endLoc","ERROR_DOMAIN","KNOWN_ESCAPES","fromEscapeSequence","codePoint4","codePoint6","codePoint","createParser","tokenzer","startNode","endNode","parseText","tokenizer","parseList","parseNamed","parseLiteral","parseLinkedModifier","getTokenCaption","parseLinkedKey","parseLinked","linkedNode","nextContext","emptyLinkedKeyNode","parseMessage","startOffset","endOffset","parsePlural","msgNode","hasEmptyMessage","parseResource","createTransformer","ast","traverseNodes","transformer","traverseNode","transform","createCodeGenerator","sourceMap","filename","breakLineCode","_needIndent","push","_newline","withBreakLine","_breakLineCode","indent","withNewLine","deindent","newline","generateLinkedNode","helper","generateNode","generateMessageNode","needIndent","generatePluralNode","generateResource","generate","helpers","baseCompile","assignedOptions","pathStateMachine","literalValueRE","isLiteral","exp","stripQuotes","getPathCharType","formatSubPath","trimmed","subPathDepth","newChar","transition","typeMap","maybeUnescapeQuote","nextChar","resolveWithKeyValue","resolveValue","hit","DEFAULT_MODIFIER","DEFAULT_MESSAGE","DEFAULT_MESSAGE_DATA_TYPE","DEFAULT_NORMALIZE","DEFAULT_INTERPOLATE","pluralDefault","choice","choicesLength","getPluralIndex","normalizeNamed","pluralIndex","createMessageContext","pluralRule","orgPluralRule","_list","_named","named","_modifier","interpolate","modifier","fallbackWithSimple","fallbackWithLocaleChain","startLocale","DEFAULT_LOCALE","chain","block","appendBlockToChain","blocks","follow","appendLocaleToChain","appendItemToChain","NOT_REOSLVED","MISSING_RESOLVE_VALUE","getDefaultLinkedModifiers","_compiler","registerMessageCompiler","compiler","_resolver","registerMessageResolver","resolver","_fallbacker","registerLocaleFallbacker","fallbacker","_cid","createCoreContext","fallbackLocale","datetimeFormats","numberFormats","pluralRules","missing","missingWarn","fallbackWarn","fallbackFormat","unresolving","postTranslation","processor","warnHtmlMessage","escapeParameter","messageCompiler","messageResolver","localeFallbacker","fallbackContext","onWarn","internalOptions","__datetimeFormatters","__numberFormatters","__meta","handleMissing","updateFallbackLocale","defaultOnCacheKey","compileCache","compileToFunction","cached","occurred","CoreErrorCodes","createCoreError","NOOP_MESSAGE_FUNCTION","isMessageFunction","translate","parseTranslateArgs","resolvedMessage","defaultMsgOrKey","enableDefaultMsg","escapeParams","formatScope","targetLocale","resolveMessageFormat","cacheBaseKey","errorDetector","compileMessageFormat","ctxOptions","getMessageContextOptions","msgContext","messaged","evaluateMessage","locales","missingRet","getCompileOptions","msgCtx","datetime","parseDateTimeArgs","datetimeFormat","DATETIME_FORMAT_OPTIONS_KEYS","arg4","matches","dateTime","clearDateTimeFormat","parseNumberArgs","NUMBER_FORMAT_OPTIONS_KEYS","clearNumberFormat","I18nErrorCodes","createI18nError","TransrateVNodeSymbol","DatetimePartsSymbol","NumberPartsSymbol","SetPluralRulesSymbol","InejctWithOption","handleFlatJson","subKeys","lastIndex","currentObj","getLocaleMessages","__i18n","flatJson","custom","resource","deepCopy","isNotObjectOrIsArray","des","getComponentOptions","instance","adjustI18nResources","componentOptions","createTextNode","createVNode","Text","composerID","defineCoreMissingHandler","createComposer","VueI18nLegacy","__root","_isGlobal","_inheritLocale","_locale","_fallbackLocale","_messages","_datetimeFormats","_numberFormats","_missingWarn","_fallbackWarn","_fallbackRoot","_fallbackFormat","_missing","_runtimeMissing","_postTranslation","_warnHtmlMessage","_escapeParameter","_modifiers","_pluralRules","trackReactivityValues","getPostTranslationHandler","setPostTranslationHandler","getMissingHandler","setMissingHandler","wrapWithDeps","argumentParser","warnType","fallbackSuccess","fallbackFail","successCondition","transrateVNode","numberParts","datetimeParts","setPluralRules","getLocaleMessage","resolveMessages","targetLocaleMessages","messageValue","tm","setLocaleMessage","mergeLocaleMessage","getDateTimeFormat","setDateTimeFormat","mergeDateTimeFormat","getNumberFormat","setNumberFormat","mergeNumberFormat","composer","baseFormatProps","getInterpolateArg","slots","slot","getFragmentableTag","Fragment","Translation","i18n","useI18n","assignedAttrs","isVNode","renderFormatter","slotKeys","partFormatter","NumberFormat","DatetimeFormat","getComposer$2","i18nInternal","vueI18n","vTDirective","_process","binding","parsedValue","parseValue","makeParams","textContent","apply","pluginOptions","useI18nComponentName","I18nInjectionKey","createI18n","__globalInjection","__allowComposition","__instances","globalScope","__global","createGlobal","__getInstance","component","__setInstance","__deleteInstance","injectGlobalFields","unmountApp","getI18nInstance","getGlobalComposer","getScope","getComposer","composerOptions","setupLifeCycle","legacyMode","useComponent","onUnmounted","globalExportProps","globalExportMethods","desc","wrap","esLocale","Locales","SessionHandler","TheBookingAlertOverlay","TheNotificationOverlay","HomeView","ProductView","ProductGrid","CategoryView","ChatsView","ChatView","NewProductForm","EditProductForm","NewProductRequestForm","SearchView","ProductRequestsGrid","ProductRequestView","PartnerStartView","ProfileView","ProfileProductBookings","ProfileBankAccount","ProfileProductsHistory","ProfileProductHistoryDetails","ProfileProducts","ProfileAddresses","ProfileNewAddressForm","ProfileEditAddressForm","ProfileAddressDetail","ProfileAccount","FaqView","PaymentSuccess","PaymentFailure","ProfileProductBookingView","ProfileProductBookingReport","ProfileProductBookingDamageReport","NewRatingForm","ProductBookingReportView","LocationView","SupportChatView","VerifyView","SupportChatsView","PartnerStoreView","ReferralCodeInput","GoogleRegisterButton","GoogleOauthRedirect","RegisterForm","ReferralCodeInputRetriever","VueDatePicker","BaseButton","BaseFileInput","BaseInput","BaseCurrencyInput","BaseLabel","BaseSelect","BaseDragAndDrop","BaseQrCode","BaseModal","BaseTip","BaseCounter","BaseGoogleAutocomplete","BaseStars","BaseRibbonAlert","BaseProgressBar","TheFooter","TheLayout","TheNavbar","TheMenubar","TheWhatsappButton","TheTitlebar","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B,KAAM,CACR,EACA,SAASK,IAAK,CACZ,OAAOH,EAAG,EAAEC,EACV,MACA,CACE,MAAO,6BACP,QAAS,YACT,KAAM,eACN,cAAe,OACf,MAAO,WACP,KAAM,KACP,EACD,CACEC,EAAG,OAAQ,CACT,EAAG,+HACX,CAAO,EACDA,EAAG,OAAQ,CACT,EAAG,8HACX,CAAO,CACF,CACL,CACA,CACAC,GAAG,aAAe,CAChB,KAAM,CACR,EACA,SAASC,IAAK,CACZ,OAAOJ,EAAG,EAAEC,EACV,MACA,CACE,MAAO,6BACP,QAAS,YACT,KAAM,eACN,cAAe,OACf,MAAO,WACP,KAAM,KACP,EACD,CACEC,EAAG,OAAQ,CACT,EAAG,qMACX,CAAO,CACF,CACL,CACA,CACAE,GAAG,aAAe,CAChB,KAAM,CACR,EACA,SAASC,IAAK,CACZ,OAAOL,EAAG,EAAEC,EACV,MACA,CACE,MAAO,6BACP,QAAS,YACT,KAAM,eACN,cAAe,OACf,MAAO,WACP,KAAM,KACP,EACD,CACEC,EAAG,OAAQ,CACT,EAAG,oMACX,CAAO,CACF,CACL,CACA,CACAG,GAAG,aAAe,CAChB,KAAM,CACR,EACA,SAASC,IAAK,CACZ,OAAON,EAAG,EAAEC,EACV,MACA,CACE,MAAO,6BACP,QAAS,YACT,KAAM,eACN,cAAe,OACf,MAAO,WACP,KAAM,KACP,EACD,CACEC,EAAG,OAAQ,CACT,EAAG,8NACX,CAAO,EACDA,EAAG,OAAQ,CACT,EAAG,8MACX,CAAO,CACF,CACL,CACA,CACAI,GAAG,aAAe,CAChB,KAAM,CACR,EACA,SAASC,IAAK,CACZ,OAAOP,EAAG,EAAEC,EACV,MACA,CACE,MAAO,6BACP,QAAS,YACT,KAAM,eACN,cAAe,OACf,MAAO,WACP,KAAM,KACP,EACD,CACEC,EAAG,OAAQ,CACT,EAAG,qMACX,CAAO,CACF,CACL,CACA,CACAK,GAAG,aAAe,CAChB,KAAM,CACR,EACA,SAASC,IAAK,CACZ,OAAOR,EAA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O1O,GAAI,CACT,OAAQ,MACR,IAAK5lD,CACN,CAAA,EAAE,KAAKupD,GAAYA,EAAS,IAAI,CACnC,CACF,uGChDMgL,GAAe,wEAFrB,MAAMlnD,EAAQw4C,EAIR2O,EAAyB54D,EAAS,IAAM,CAG5C,MAAM64D,EAAYpnD,EAAM,IAAM,KAAK,OAAO,EAAK,MAAa,MACtDqnD,EAAYrnD,EAAM,IAAM,KAAK,OAAO,GAAK,KAAM,QAAO,MAE5D,MAAO,CAAE,IAAKonD,EAAW,IAAKC,CAAU,CAAA,CACzC,EAEKC,EAAsB/4D,EAAS,KACnC,CAAE,IAAK44D,EAAuB,MAAM,IAAMD,GAAc,IAAKC,EAAuB,MAAM,KAC3F,EAEKI,EAAa,CACjB,OAAQ,CACN,CACE,YAAe,6BACf,YAAe,SACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,MACf,YAAe,cACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,iBACf,YAAe,cACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,eACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,cACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,WACf,YAAe,cACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,uBACf,YAAe,cACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,aACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,qBACf,YAAe,cACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,OACf,YAAe,cACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,aACf,YAAe,SACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,UACf,QAAW,CACT,C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Bi6E,EAA4Bj6E,EAAI,EAAK,EAC3C,SAASk6E,GAA8B,CACXD,EAAA,MAAQ,CAACA,EAA0B,KAC/D,CAEA,SAASO,GAAe,CACtBpZ,EAAQ,MAAQ,GACS8T,GAAA,OACvB9gE,EAAM,uBAAwB,CAAE,OAAQ,SAAU,EAAG2/D,EAAQ,KAAK,EACjE,KAAK,IAAM,CACVC,EAAoB,MAAQ,GAC5B5S,EAAQ,MAAQ,EAAA,CACjB,CACL,CAEA,SAASgZ,GAAiB,CACpBrG,EAAQ,MACGyG,IAEeN,GAEhC,iwDCZA,MAAM9lE,EAAQw4C,EACRC,EAAOtnD,GAAa,MAAM,EAM1B0R,EAAMjX,EAAI,IAAI,EACd27D,EAAa,CACjB,OAAQ,CACN,CACE,YAAe,6BACf,YAAe,SACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,MACf,YAAe,cACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,iBACf,YAAe,cACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,eACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,cACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,WACf,YAAe,cACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,uBACf,YAAe,cACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,aACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,qBACf,YAAe,cACf,QAAW,CACT,CACE,WAAc,KAChB,CACF,CACF,EACA,CACE,YAAe,OACf,YAAe,cACf,QAAW,CACT,CACE,WAAc,IAChB,CACF,CACF,EACA,CACE,YAAe,aACf,YAAe,SACf,QAAW,CACT,CACE,WAAc,IAChB,CACF,CACF,EACA,CACE,YAAe,UACf,QAAW,CACT,CACE,WAA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Ae,EAC5Cr/G,EAAA,UAAU,kBAAmBs/G,EAAe,EAC5Ct/G,EAAA,UAAU,YAAau/G,EAAS,EAChCv/G,EAAA,UAAU,YAAaw/G,EAAS,EAChCx/G,EAAA,UAAU,YAAay/G,EAAS,EAChCz/G,EAAA,UAAU,aAAc0/G,EAAU,EAClC1/G,EAAA,UAAU,oBAAqB2/G,EAAiB,EAChD3/G,EAAA,UAAU,cAAe4/G,EAAW,EACpC5/G,EAAA,UAAU,eAAgB6/G,EAAY,EACtC7/G,EAAA,UAAU,cAAe8/G,EAAW,EACxC9/G,EAAI,IAAIu4G,EAAI,EACZv4G,EAAI,IAAI+rB,EAAc,EACtB/rB,EAAI,IAAI+/G,GAAe,CACrB,KAAM,CACJ,IAAK,yCACP,CAAA,CACD,EACD//G,EAAI,IAAIb,CAAK,EACbA,EAAM,IAAI6gH,EAAyB,EACnChgH,EAAI,MAAM,UAAU,EAEbA,CACT,CAAC","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,349,350,351,352,356,374,447,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,487,528,529,530,531]}